/* CLAUDE.md セクション8 デザイントークン。色は必ずここから引く。ハードコード禁止 */
:root {
  --bg:     #F7F6F2;
  --ink:    #14161A;
  --sub:    #5B6068;
  --line:   #D6D3CA;
  --card:   #FFFFFF;
  --red:    #FF4B00;
  --orange: #F6AA00;
  --yellow: #F2E700;
  --green:  #03AF7A;
  --blue:   #005AFF;

  --radius: 6px;
  --header-height: 96px;
  --nav-height: 64px;

  --font-body: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Yu Gothic", monospace;
}

/* 屋外の直射日光下を前提にした固定の明るいテーマ。ダークテーマは実装しない */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- 新バージョン通知バナー（フェーズ7） ---------- */

.sw-update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--bg);
}

.sw-update-banner[hidden] {
  display: none;
}

.sw-update-text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.sw-update-reload-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

/* ---------- ヘッダー：常時 sticky。ハザードバンドと119ボタンを常に表示 ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

/* 斜めストライプのハザードバンド。現在の危険度で色が変わる識別要素 */
.hazard-band {
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--band-color, var(--line)),
    var(--band-color, var(--line)) 12px,
    var(--bg) 12px,
    var(--bg) 24px
  );
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
}

.header-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-wbgt {
  flex: 0 0 auto;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.header-wbgt-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--sub);
  margin-right: 3px;
  letter-spacing: 0.02em;
}

.header-wbgt-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--sub);
  margin-left: 2px;
}

/* 119番。スクロールせず常に1タップで押せる位置。確認ダイアログは挟まない */
.emergency-call {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--red);
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.emergency-call:active {
  filter: brightness(0.92);
}

/* 設定への導線。119番より目立たないよう小さく無彩色にする
   （設定は緊急時に押すものではないので下部ナビの一等地を占めない） */
.header-settings-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--sub);
  cursor: pointer;
}

.header-settings-btn:active {
  background: var(--bg);
}

.header-settings-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ---------- メイン領域・タブ ---------- */

.app-main {
  padding: 8px 12px calc(var(--nav-height) + 24px);
  max-width: 640px;
  margin: 0 auto;
}

.tab-panel[hidden] {
  display: none;
}

/* タブの最上部見出し。.section-heading と併用する（HTML側でクラスを重ねる） */
.tab-heading {
  margin-top: 0;
}

.tab-placeholder {
  color: var(--sub);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

/* 「現在のWBGT」のような、大きな数値のすぐ上に置く小さなキャプション専用。
   カードや一覧の見出しには使わない（それは .section-heading） */
.card-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--sub);
}

/* 数値（WBGT・秒数・統計）は等幅・太字・本文よりはっきり大きくする */
.card-value {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.card-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: var(--radius);
  background: var(--badge-color, var(--line));
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

/* 注記・出典。本文と区別できるよう常に --sub・13px に統一する */
.card-note {
  margin: 0;
  font-size: 13px;
  color: var(--sub);
}

.card-source {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--sub);
}

/* ---------- 文字階層・セクション見出し ----------
   見出し：太字・本文(16px)より明確に大きい・内容に応じた安全色の細いアクセント
   （左ボーダー）を付ける。色だけに頼らないよう、見出しの文言自体でも
   種別が分かるようにする（例：「危険」「安全」等の語を色に頼らず書く）。
   既存の危険度別の色（判定結果・WBGT区分）はデータ駆動のままここでは触れない。
   このアクセントは、あくまで画面上のセクションを分類する第二の色の語彙。 */

.section-heading {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.section-heading--danger {
  border-left-color: var(--red);
}

.section-heading--caution {
  border-left-color: var(--orange);
}

.section-heading--notice {
  border-left-color: var(--yellow);
}

.section-heading--info {
  border-left-color: var(--blue);
}

.section-heading--safe {
  border-left-color: var(--green);
}

.section-heading--neutral {
  border-left-color: var(--line);
}

.attribution {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--sub);
}

/* ---------- 判定フロー（triage.js が描画する内容） ---------- */

.triage-question {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.triage-question-text {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
}

.triage-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 症状の複数選択（Q3、選択肢が多い）は2列にして縦の高さを抑える */
.triage-options.is-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 危険側（qⅣ度・Ⅲ度・Ⅱ度へ直行）は左端の太い赤ボーダー＋太字で区別する。
   色だけに頼らないよう、通常側との差はフォントの太さでも出す */
.triage-option {
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
}

.triage-option[data-danger="true"] {
  border-left: 4px solid var(--red);
  font-weight: 700;
}

.triage-option:active {
  background: var(--line);
}

.triage-option[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--line);
}

.triage-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.triage-btn-primary {
  min-height: 56px;
  min-width: 44px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.triage-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.triage-result {
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--result-color, var(--line));
}

.triage-result-label {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.triage-result-heading {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}

.triage-steps {
  margin: 0 0 16px;
  padding-left: 1.4em;
  background: var(--card);
  border-radius: var(--radius);
}

.triage-steps li {
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}

.triage-steps li:last-child {
  border-bottom: none;
}

/* 医学的な警告文（腎臓・心臓疾患の人向けの注意）。判定カードの色に関係なく
   直射日光下でも読める濃さにする。装飾ではないので --sub の淡い文字にしない */
.triage-caution {
  background: var(--card);
  border-radius: var(--radius);
  border-left: 4px solid var(--red);
  padding: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--ink);
}

/* 救急要請の実発信ボタン。判定カード自体が赤/橙のため、同系色に埋もれないよう
   白地・赤文字・太い枠で反転させ、押せる見た目を作る（CLAUDE.md セクション2） */
.triage-call {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 3px solid var(--red);
  background: var(--card);
  color: var(--red);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.triage-call:active {
  background: var(--bg);
}

/* 判定結果画面の主ボタン。記録機能自体はフェーズ4だが、導線は先に置く */
.triage-record-btn {
  width: 100%;
  margin-bottom: 8px;
}

.triage-record-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--sub);
}

/* 「最初からやり直す」は副ボタン。記録ボタンより控えめな見た目にする */
.triage-restart {
  min-height: 44px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}

/* ---------- 下部ナビ：5タブ。軍手・濡れた手でも押せる大きさ ---------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  height: var(--nav-height);
  background: var(--card);
  border-top: 1px solid var(--line);
}

.nav-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 2px;
  border: none;
  background: transparent;
  font-size: 13px;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-btn[aria-current="true"] {
  font-weight: 700;
  box-shadow: inset 0 3px 0 var(--ink);
}

.disclaimer {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px calc(var(--nav-height) + 16px);
  font-size: 13px;
  font-weight: 400;
  color: var(--sub);
}

/* ---------- 判定結果画面：緊急連絡先・搬送先候補（フェーズ4） ---------- */

.triage-contacts,
.triage-hospital {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

.triage-contacts-heading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

.triage-contact-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.triage-contact-link:last-child {
  border-bottom: none;
}

.triage-hospital-name {
  margin: 0 0 4px;
  font-weight: 700;
}

.triage-hospital-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--sub);
}

/* ---------- 点呼（フェーズ4） ---------- */

.rollcall-question {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.rollcall-progress {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--sub);
}

.rollcall-person-name {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.rollcall-status-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.rollcall-status-btn {
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.rollcall-status-btn[data-status="concerned"] {
  border-left-color: var(--orange);
}

.rollcall-status-btn[data-status="unwell"] {
  border-left-color: var(--red);
}

.rollcall-status-btn[data-selected="true"] {
  background: var(--line);
  border-color: var(--ink);
}

.rollcall-chips {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rollcall-chips-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--sub);
}

.rollcall-summary .card {
  margin-bottom: 12px;
}

.rollcall-attention-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.rollcall-attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.rollcall-attention-info {
  margin: 0;
  font-size: 14px;
}

.rollcall-attention-item .triage-restart {
  flex: 0 0 auto;
  width: auto;
  min-height: 44px;
  padding: 8px 14px;
}

/* ---------- 設定タブ：グループ化アコーディオン ---------- */

.settings-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.settings-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  list-style: none;
}

.settings-group-summary::-webkit-details-marker {
  display: none;
}

.settings-group-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--sub);
  border-bottom: 2px solid var(--sub);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.settings-group[open] > .settings-group-summary::after {
  transform: rotate(45deg);
}

.settings-group-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.settings-subheading {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sub);
}

.settings-subheading:first-child {
  margin-top: 0;
}

/* ---------- 設定タブ（フェーズ4） ---------- */

.settings-input,
.settings-select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}

.settings-field-label {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--sub);
}

.settings-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-bottom: 10px;
  font-size: 14px;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.settings-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 14px;
}

.settings-add-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-notification-permission {
  margin-bottom: 8px;
}

.settings-add-btn,
.settings-remove-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font-weight: 700;
}

.settings-remove-btn {
  flex: 0 0 auto;
  color: var(--red);
  border-color: var(--red);
  background: var(--card);
}

.settings-file-input {
  display: block;
  margin-bottom: 8px;
}

/* ---------- 記録タブ（フェーズ4） ---------- */

.records-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.records-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
}

.records-item-heading {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
}

/* ---------- 点呼タブ：名前の下のバッジ（フェーズ5a） ---------- */

.rollcall-person-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.rollcall-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg);
}

.rollcall-badge-age {
  border-color: var(--orange);
  color: var(--orange);
}

.rollcall-badge-chronic {
  border-color: var(--red);
  color: var(--red);
}

.rollcall-badge-solo {
  border-color: var(--blue);
  color: var(--blue);
}

.rollcall-badge-heat-acclimatization {
  border-color: var(--orange);
  color: var(--orange);
}

.rollcall-attention-item.is-chronic {
  border-left: 4px solid var(--red);
}

/* ---------- 帰宅後フォロー・単独作業の安否確認（フェーズ5a） ---------- */

.followup-reminder {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.followup-attention-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.followup-attention-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
}

.followup-attention-item.is-chronic {
  border-left: 4px solid var(--red);
}

.followup-attention-info {
  margin: 0;
  font-size: 14px;
}

.followup-solo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.followup-solo-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
}

.followup-solo-item.is-overdue {
  border: 1px solid var(--red);
  background: var(--card);
}

.followup-solo-info {
  margin: 0 0 4px;
  font-size: 14px;
}

.followup-solo-warning {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

/* ---------- 義務化対象バッジ（安衛則612条の2。フェーズ5a） ---------- */
/* 対象外のときは表示自体を消す。「安全です」と読める表示は出さない */

.card-badge.is-legal {
  display: block;
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- セルフチェック：爪押し・尿の色（フェーズ5b） ---------- */

.selfcheck-heading {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
}

.selfcheck-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.selfcheck-diagram svg {
  width: 140px;
  height: auto;
}

.selfcheck-diagram-caption {
  margin: 0;
  font-size: 12px;
  color: var(--sub);
  text-align: center;
}

.selfcheck-steps {
  margin: 0 0 12px;
  padding-left: 1.4em;
  font-size: 15px;
}

.selfcheck-steps li {
  padding: 6px 4px;
}

.selfcheck-timer {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
}

.selfcheck-result {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  font-weight: 700;
}

.selfcheck-result.is-warning {
  background: var(--yellow);
}

.selfcheck-actions {
  margin-bottom: 12px;
}

.selfcheck-actions .triage-btn-primary {
  width: 100%;
}

.selfcheck-urine-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.selfcheck-urine-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--bg);
}

.selfcheck-urine-row.is-urgent {
  border: 2px solid var(--red);
}

.selfcheck-urine-swatch {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.selfcheck-urine-text {
  flex: 1 1 auto;
}

.selfcheck-urine-number {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
}

.selfcheck-urine-label {
  margin: 2px 0 0;
  font-size: 14px;
}

.selfcheck-urine-followup-note {
  margin-bottom: 8px;
}

.selfcheck-shortcut {
  margin: 12px 0 0;
  font-size: 14px;
}

.selfcheck-shortcut a {
  color: var(--ink);
}

/* ---------- 予防チェックリスト（フェーズ5b） ---------- */

.prevention-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.prevention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
  cursor: pointer;
}

.prevention-item[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--card);
}

.prevention-item-num {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
}

.prevention-item[aria-pressed="true"] .prevention-item-num {
  background: var(--green);
}

.prevention-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prevention-item-title {
  font-weight: 700;
  font-size: 15px;
}

.prevention-item-detail {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14px;
  color: var(--ink);
}

.prevention-item-detail li {
  padding: 2px 0;
}

/* ---------- 資料タブ（フェーズ5b） ---------- */

/* カードの外に置く大分類見出し（セルフチェック／予防／資料）。
   カード内の個別見出し（.section-heading）より一段大きくし、
   「分類 > 個別項目」の階層が見た目でも分かるようにする */
.resources-group-heading {
  margin: 24px 0 12px;
  padding-left: 10px;
  border-left-width: 4px;
  border-left-style: solid;
  font-size: 21px;
  font-weight: 700;
}

.resources-group-heading:first-child {
  margin-top: 0;
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resources-item {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.resources-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resources-item-title-row {
  margin-bottom: 4px;
}

.resources-item-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
}

.resources-item-link.is-unavailable {
  color: var(--sub);
  text-decoration: none;
}

.resources-item-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.resources-lang-chip {
  padding: 2px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--sub);
}

.resources-lang-chip a {
  color: var(--blue);
}

.resources-item-note {
  margin: 0;
  font-size: 12px;
  color: var(--sub);
}

.resources-item-note.is-unconfirmed {
  color: var(--orange);
  font-weight: 700;
}

.resources-stat-year-source {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

.resources-detail-link {
  display: block;
  margin-top: 4px;
}

.resources-stat-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resources-stat-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.resources-stat-row:last-child {
  border-bottom: none;
}

.resources-stat-value {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.resources-stat-label {
  margin: 2px 0 0;
  font-size: 13px;
}

.resources-time-note {
  margin-top: 12px;
}

/* ---------- 尿の色チェック専用オーバーレイ（単独で開けるショートカット） ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
  background: var(--bg);
  padding: 16px;
}

.overlay[hidden] {
  display: none;
}

.overlay-closebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.overlay-emergency-call {
  position: static;
}

.overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
