/* 業務アプリ「つるケア」の見た目：大きめの文字・ボタンらしいボタン・やさしい色（画面の方針）
 *
 * ■ 目次（上から順に。同じ強さの決まりは後に書いた方が効くので、この順を崩さない）
 *   1. 土台 ……………… 変数（色は site_src/config/colors.py から作る・字の大きさ・押す所の高さ）、ページ全体（body・main・見出し・説明の文 .hint・リンク）
 *   2. 上の帯・メニュー・版数
 *   3. 部品（どの画面でも使う物）
 *      3-1 ボタン（.btn・.btn-sub・.btn-danger・.btn-big・並び .buttons）
 *      3-2 枠と置き方（.card・畳める見出し・見るだけの形 .result・枠と枠の間）
 *      3-3 入力の欄（label・input・select・textarea・チェック・誤りの帯・日時・ファイル・郵便番号・日付の見出し）
 *      3-4 表（.list・数の列・操作の列 .ops・その他 .more-ops・確かめ .confirm・表の下の説明）
 *      3-5 タブ・切り替え（.tabs・.sub-tabs・目次 .toc・前と次 .month-nav・絞り込み）
 *      3-6 知らせと文の色（.message・.notice・.caution-box・.alert・.warn・.caution・.info・札 .badge・.state-tag）
 *      3-7 小さな決まり（.nowrap・.keep・.pre・.sp-only・.pc-only）
 *   4. 画面ごと（ログイン・今日の仕事・利用者・予定・ヘルパーの訪問・割り当て・勤務条件・ケアの書類・マスタ・書類チェック・
 *               月の数字・研修計画・書類と出力・料金シミュレーター・運営・事故・祝日）
 *   5. PC の広い画面（601px 以上：列の多い表の .wide ほか）
 *   6. スマホ（600px 以下）：部品ごと（3 の順）→ 画面ごと（4 の順）
 *   7. 印刷
 *
 * ■ 見た目の決まり（画面を足す・直す時は、ここの変数と共通のクラスを使う。色・大きさを画面ごとに書かない）
 * - 色はすべて変数（var(--…)）。値は site_src/config/colors.py の1か所で決め、リポジトリの根で python -m site_src.config.colors で下の :root の間を作り直す（下の印の行は作る時の目印なので書き換えない）
 *   （ホームページの CSS・チラシ・theme-color も同じ元から。ここの間は手で直さない。確かめるのは --check）
 * - 色の土台：ホームページと同じ自然の緑（千歳緑・アイビー・苔色・鶸萌黄・萌黄・若芽色）と温かいアイボリー。深い緑の面積は少なく（上の帯・今いる画面・押す物）。見出しの左に葉の印（--leaf）
 *   押す物は --green-dark（白い文字でコントラスト 5.2）、見出し・リンクの文字は --green-text
 * - 色の意味：赤（--error）＝誤り（直さないと先に進めない）→ 文は .warn、箱は .message・.alert-red・.field-error
 *            黄・茶（--caution）＝注意（進めるが確かめてほしい）→ 文は .caution、箱は .caution-box（.notice-strong・.alert も同じ色）
 *            緑（--info）＝お知らせ・済んだこと → 文は .info、箱は .notice
 *            まだ決めていない決まり（仮の値）は設定＞事業所の .note-box の1か所だけに出す（core.js の provisionalNote）
 * - 字の大きさは --fs-…（本文は --fs-base の 18px）
 * - 押す所：高さ --tap（44px）以上。主なボタン .btn は 52px、ヘルパーの大きいボタン .btn-big は 56px
 * - ボタンの種類：.btn（主）・.btn-sub（ほか）・.btn-danger-text（元に戻せない操作。赤い字。core.js の dangerButton で作る）・.btn-danger（確かめた後の「はい」）
 *   ボタンを並べる時は必ず .buttons の入れ物に入れる（間と折り返しが付く）。ボタン形のリンク a.btn も見た目は同じ（下線なし）
 * - リンクの色は --link（押した後も同じ色）
 * - 狭い画面：600px 以下（@media (max-width: 600px)）。決まりは 6 にまとめる。2列の欄 .row は1列、前・次の切り替え .month-nav は見出しを上・ボタンを下に
 * - 表は core.js の table() で作る（横にずらす枠 .table-wrap に入る。スマホでは、縦横で見る表も含めて、どの表も1行1枚の枠になる）。日付は core.js の dayLabel（表）・dateLabel（それ以外）
 * - 列の多い表の画面は、画面の入れ物に .wide を付けるだけ（PC で main を広げ、見出し・ボタンを折り返さない。5）。名前の列は td に .nowrap、文の列は .col-text、長い説明は表の下の .table-notes
 * - 画面に null を出さない：子を足す時は core.js の put（append を直接使わない）
 * - !important は3か所だけ（[hidden]・.pc-only・印刷で隠す物）。ほかは強さ（セレクタ）と順で決める
 */

/* ======================================================================== 1. 土台 */
:root {
  /* ---- colors.py から作る（ここは手で直さない。色は site_src/colors.py で変えて python site_src/colors.py） ---- */
  /* ホームページと業務アプリで共通 */
  --chitose: #2b6442; /* 千歳緑：深い森 */
  --chitose-light: #36703f; /* 千歳緑とアイビーの間（上の帯・下の帯のグラデーションの中ほど） */
  --ivy: #487c38; /* アイビーグリーン：茂った葉（今いるタブ・チェックの色。白い文字を載せる） */
  --koke: #56752a; /* 苔色（やや濃く） */
  --koke-light: #63822d; /* 苔色（飾り用） */
  --hiwa: #82ae46; /* 鶸萌黄：新緑（飾り用） */
  --moegi: #a9d159; /* 萌黄：明るい新緑（飾り用） */
  --wakame: #e0ebaf; /* 若芽色 */
  --mint: #eef3d6; /* 日なたの若葉のような淡い黄緑（表の見出し・タブの地） */
  --mint-line: #d3e0ae; /* 淡い黄緑の線（枠の線） */
  --ivory: #fbf8ec; /* 温かみのあるクリーム（ページの地） */
  --wood: #a9835a; /* 木の色 */
  --wood-light: #f4eee0; /* 淡い木の色（区切りの見出し・使えない欄の地） */
  --wood-line: #ded2bb; /* 木の色の線 */
  --cream: #fff6d6; /* 淡い黄（注意の地） */
  --cream-line: #eedfb8; /* 淡い黄の枠の線（クリーム色の囲み・チラシのご案内） */
  --green-dark: #3f7a3c; /* 押す物・強調の緑（白い文字を載せる） */
  --green-text: #2f5a32; /* 見出し・リンクの文字の緑 */
  --green-shadow: #2b4f2c; /* 押す物の下の影 */
  --menu-1: #dfe9c3; /* メニューの地のグラデーション（上） */
  --menu-2: #e9f0cf; /* メニューの地のグラデーション（中） */
  --menu-3: #f4f6df; /* メニューの地のグラデーション（下）・葉の印の葉脈 */
  --menu-hover: #fbfdf2; /* メニューの項目に指を置いた時の地 */
  --text: #2b2b26; /* 本文の文字 */
  --text-sub: #55554c; /* 補足の文字（説明・小さな見出し） */
  --white: #fff; /* 白（枠の地・緑の上の文字） */
  /* 業務アプリだけ */
  --error: #a32020; /* 赤：誤り（直さないと先に進めない）・元に戻せない操作 */
  --error-dark: #6d1515; /* 濃い赤：元に戻せない操作のボタンの影・指を置いた時 */
  --error-bg: #fdecea; /* 誤りの地 */
  --caution: #7a4d00; /* 黄茶：注意（進めるが確かめてほしい）の文字 */
  --caution-bg: var(--cream); /* 注意の地 */
  --caution-line: #d9a300; /* 注意の線 */
  --caution-pale: #fffbea; /* 注意の行・知らせの淡い地 */
  --secret-line: #e0b000; /* 初期パスワードを見せる枠の線 */
  --changed-bg: #fff3c4; /* マスタの取り込みで変わる列の地 */
  --unassigned-bg: #fff1d6; /* 割り当て：まだ担当のいない訪問の地 */
  --unassigned-text: #8a5a00; /* 割り当て：まだ担当のいない行の文字 */
  --info: var(--green-text); /* 緑：お知らせ・済んだことの文字 */
  --info-bg: #e7f4e1; /* お知らせ・済んだことの地 */
  --link: var(--green-text); /* リンク（押した後も同じ色） */
  --focus: #f0b400; /* キーボードで選んでいる所の枠 */
  --line: #c9d8a4; /* 表・枠の線 */
  --input-line: #8a8576; /* 入力の欄の線（地とのコントラスト 3 以上） */
  --disabled-text: #5f5c50; /* 使えない欄の文字 */
  --muted: #888; /* 退職した人の文字・合計の行の線・点線の枠 */
  --retired-bg: #f4f4f4; /* 退職した人の行の地 */
  --cancel-line: #999; /* キャンセルした訪問の左の線 */
  --scale-text: #444; /* 目盛り・グラフの字 */
  --off-bg: #e2e2e2; /* 割り当て（日）：勤務できない時間 */
  --cell-off-bg: #eee; /* 割り当て（月）：休みのマス */
  --na-bg: #f0f0f0; /* 書類チェック：対象外 */
  --sub-card-bg: #fbfcf8; /* 枠の中の枠の地 */
  --rest-bg: #f4f7ea; /* 勤務の集計：仕事の間（移動・待機・休憩）の帯 */
  --row-hover: #f3f7e8; /* 押せる行に指を置いた時の地 */
  --work-bg: #e3ecf7; /* 割り当て：勤務の帯の地（青） */
  --work-line: #7a95b8; /* 割り当て：勤務の帯の線（青） */
  --visit-text: #1d3b12; /* 割り当て：訪問の帯の文字 */
  --holiday: var(--error); /* 祝日の文字 */
  --saturday: #1f4f9c; /* 土曜の文字 */
  --chart-past: #a9c98f; /* グラフ：前の月の棒 */
  --version-text: #6b6a5c; /* 画面のいちばん下の版数 */
  --shade: rgba(0, 0, 0, .25); /* 上の帯の題・アイコンの影 */
  --wood-shadow: rgba(80, 70, 40, .07); /* 枠の影 */
  --wood-shadow-strong: rgba(80, 70, 40, .12); /* ログインの絵の影 */
  --sunlight: rgba(255, 248, 200, .16); /* 上の帯の木漏れ日 */
  --sunlight-weak: rgba(255, 248, 200, .10); /* 上の帯の木漏れ日（淡い） */
  /* 色を使う絵 */
  --leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23487c38'/%3E%3Cstop offset='1' stop-color='%23a9d159'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M3.5 20.5C3 12 8.5 4.8 20.8 3.2C20.6 14.6 13.4 20.4 3.5 20.5Z' fill='url(%23g)'/%3E%3Cpath d='M4.2 19.8C9 15 13.5 10.5 18.6 5.6M8.6 15.5l-.4-3.6M12 12.3l-.2-3.4M8.6 15.5l3.4.3M12 12.3l3.3.2' stroke='%23f4f6df' stroke-width='1.1' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23487c38' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  /* ---- colors.py から作る：ここまで ---- */
  /* 字の大きさ（本文は --fs-base） */
  --fs-2xs: 12px;      /* 開く印（▼） */
  --fs-xs: 13px;       /* 表の中の小さな注意・グラフの字 */
  --fs-s: 14px;        /* 札・表の帯・版数・スマホの枠の見出し */
  --fs-sm: 15px;       /* 表の中のボタン・スマホのタブ */
  --fs-m: 16px;        /* 説明 .hint・ほかのボタン .btn-sub・誤りの帯 */
  --fs-ml: 17px;       /* 入力の区切りの見出し・h4 */
  --fs-base: 18px;     /* 本文・入力の欄・主なボタン */
  --fs-title-sp: 19px; /* スマホの上の帯の題 */
  --fs-l: 20px;        /* 大きいボタン・ヘルパーの訪問の名前 */
  --fs-xl: 22px;       /* 画面の題 h2・上の帯の題・月の見出し */
  --fs-2xl: 26px;      /* 月の数字の値 */
  --fs-3xl: 28px;      /* 初期パスワード */
  /* 押す所の高さ（これより小さくしない） */
  --tap: 44px;
}
* { box-sizing: border-box; }
/* hidden を付けた部品は、ほかの表示指定（display: grid など）より優先して必ず隠す */
[hidden] { display: none !important; }
/* 言葉の途中で折り返さない：日本語は文節（ことばのまとまり）の切れ目で折り返す（Chrome・Edge。lang="ja" が要る）。
 * 文節より長い物は main の overflow-wrap で折れるので、横にはみ出さない。日付・単位・（必須）などの短いまとまりは .keep（core.js が付ける） */
body { margin: 0; font-family: "BIZ UDPGothic", "Meiryo", "Hiragino Sans", sans-serif; font-size: var(--fs-base); line-height: 1.6; color: var(--text); background: var(--ivory); word-break: auto-phrase; }
main { max-width: 960px; margin: 0 auto; padding: 16px; overflow-wrap: break-word; }
a, a:visited { color: var(--link); }
/* キーボードで選んでいる所 */
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 見出し：左に新緑の葉の印（ホームページの見出しと同じ） */
h2 { font-size: var(--fs-xl); color: var(--green-text); display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; flex: none; width: .95em; height: .95em; background: var(--leaf) center / contain no-repeat; }
/* 小見出し：左に鶸萌黄の縦線（まとまりの区切りが分かるように。デザインの見直し 2026-10-15） */
h3 { margin: 0; color: var(--green-text); border-left: 5px solid var(--hiwa); padding-left: 8px; line-height: 1.4; }
/* 小見出しは、前に何があっても上を空けてくっつかないように。枠の中は枠の間（gap）で空けるので足さない（配置の見直し） */
main h3:not(:first-child) { margin-top: 24px; }
main .card > h3, main details > summary h3 { margin-top: 0; }
/* 説明の文 */
.hint { font-size: var(--fs-m); color: var(--text-sub); margin: 0; }
h3 + .hint { margin-top: 4px; }

/* ======================================================================== 2. 上の帯・メニュー・版数 */
/* 上の帯：森の奥（千歳緑）から新緑（鶸萌黄）へ。木漏れ日の淡い光を重ねる */
.bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; color: var(--white);
  background:
    radial-gradient(ellipse 260px 120px at 72% 20%, var(--sunlight), transparent 70%),
    radial-gradient(ellipse 200px 90px at 40% 90%, var(--sunlight-weak), transparent 70%),
    linear-gradient(100deg, var(--chitose) 0%, var(--chitose-light) 30%, var(--ivy) 55%, var(--koke-light) 80%, var(--hiwa) 100%);
}
.bar h1 { margin: 0; font-size: var(--fs-xl); display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 2px var(--shade); }
/* 題の左のアイコン「橋と若葉」（ホームページと同じ。若芽色の台ごと。site_src/tools/icon/make_icon.py で作る） */
.bar h1::before { content: ""; flex: none; width: 36px; height: 36px; background: url("/img/favicon.svg") center / contain no-repeat; filter: drop-shadow(0 1px 1px var(--shade)); }
/* 今の事業所（左上・つるケアの名前の右。いつも出す。働ける事業所が2つ以上の時はここが切り替えの欄。2026-11-01 ご本人「ログイン後にどの事業所かわかるように」） */
.bar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-width: 0; }
.office-name { font-weight: bold; padding: 2px 10px; border-left: 2px solid var(--white); text-shadow: 0 1px 2px var(--shade); }
#who-role { font-size: var(--fs-s); margin-left: 4px; }
.office-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--white); }
/* 事業所の名前が切れないように、縮めず、右の矢印の分の余白を取る（2026-10-15 の測る仕組みで見つけた） */
.office-switch select { width: auto; flex: none; min-height: var(--tap); padding: 4px 32px 4px 8px; }
/* メニュー（ログイン後）。「メニュー」ボタンはスマホの幅で、ログインした人みんなに出す（C6。ヘルパーも：S-091-1。.collapsible。6） */
.nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 16px; background: linear-gradient(180deg, var(--menu-1) 0%, var(--menu-2) 55%, var(--menu-3) 100%); border-bottom: 1px solid var(--mint-line); }
.nav a { padding: 10px 16px; border-radius: 8px; color: var(--green-text); font-weight: bold; text-decoration: none; }
.nav a:hover { background: var(--menu-hover); color: var(--green-text); }
.nav a.active { background: var(--chitose); color: var(--white); }
.nav a[hidden] { display: none; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-toggle { display: none; }
/* メニューの「まとまり」（案1。menu-structure.md）：1段目はまとまりの名前（押すと2段目にその中身を出す）、
 * 2段目は今いるまとまりの項目をいつも出す（flex: 1 0 100% で1段目の下に折り返す）。ヘルパーは見出しを出さない今の形のまま（navGroups が空） */
.nav-groups, .nav-panel { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 0 100%; }
.nav-group-btn { padding: 10px 16px; border-radius: 8px; border: none; background: transparent; color: var(--green-text); font-weight: bold; cursor: pointer; font: inherit; }
.nav-group-btn:hover { background: var(--menu-hover); }
.nav-group-btn.active { background: var(--chitose-light); color: var(--white); }
.nav-panel { border-top: 1px solid var(--mint-line); margin-top: 4px; padding-top: 4px; }
.nav-note { flex: 1 0 100%; margin: 2px 0 0; font-size: var(--fs-s); color: var(--text-sub); }
/* 版数（画面のいちばん下）。温かい色に */
.version { text-align: center; font-size: var(--fs-s); color: var(--version-text); padding: 16px 0 24px; }

/* ======================================================================== 3. 部品 */
/* ------------------------------------------------ 3-1 ボタン */
.btn { font-size: var(--fs-base); font-weight: bold; min-height: 52px; padding: 10px 20px; border: none; border-radius: 10px; background: var(--green-dark); color: var(--white); cursor: pointer; box-shadow: 0 3px 0 var(--green-shadow); text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; }
a.btn, a.btn:visited { color: var(--white); }
.btn:hover { background: var(--chitose); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--green-shadow); }
.btn-sub { background: var(--white); color: var(--green-text); min-height: var(--tap); font-size: var(--fs-m); border: 1.5px solid var(--hiwa); box-shadow: 0 2px 0 var(--mint-line); }
a.btn-sub, a.btn-sub:visited { color: var(--green-text); }
.btn-sub:hover { background: var(--mint); color: var(--green-text); border-color: var(--ivy); }
/* 元に戻せない操作：確かめた後の「はい」は赤いボタン、ほかの所では赤い字（core.js の dangerButton） */
.btn-danger { background: var(--error); box-shadow: 0 2px 0 var(--error-dark); }
.btn-danger:hover { background: var(--error-dark); }
.btn-danger-text, .btn-danger-text:hover { color: var(--error); }
.btn.active { background: var(--green-dark); color: var(--white); }
.btn.pick { text-align: left; }
/* ヘルパーの大きいボタン（片手で押せる大きさ） */
.btn-big { width: 100%; min-height: 56px; font-size: var(--fs-l); }
.btn-now { min-height: var(--tap); padding: 4px 12px; margin-left: 6px; }
/* ボタンの並び：ボタン（とボタン形のリンク）は必ずこの入れ物に入れる（C18） */
.buttons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.card > .buttons, .confirm .buttons { margin: 0; }
/* 長い入力の保存のボタンは上と下に（saveTopAndBottom。下に固定すると誤りの文を隠すのでやめた：C14・C24） */
.card > .buttons.save-top { margin: 0 0 12px; }
/* 元に戻せない操作は、ほかのボタンから離して置く（S-020-1） */
.buttons.danger-zone { border-top: 1px dashed var(--line); padding-top: 12px; }

/* ------------------------------------------------ 3-2 枠と置き方 */
.card { background: var(--white); border: 1px solid var(--mint-line); border-radius: 12px; box-shadow: 0 1px 3px var(--wood-shadow); padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* 枠の中の表・長い行が枠を押し広げない（中の表は .table-wrap で横にずらす：C5） */
.card > *, .table-wrap { min-width: 0; }
/* 枠の中の枠（ケアの書類の目標・週間計画・援助内容・23項目など） */
.card.sub { margin: 8px 0; background: var(--sub-card-bg); }
/* 見るだけの形（dl）。見るだけの形（fieldsView）は、長い項目名で値が右に寄りすぎないよう、名前の列の幅を決める */
.result { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.result dt { font-weight: bold; color: var(--green-text); }
.result dd { margin: 0; }
/* 畳める見出し（fold・foldForm）：見出しを押すと開く。押す所は --tap 以上 */
details.item > summary { cursor: pointer; font-weight: bold; padding: 4px 0; }
/* 枠の中の段落・小見出し・一覧は、枠の間（gap）だけを空ける（段落の上下の余白が重なって大きく空かない：S-013-1・S-018-1） */
.card > p, .card > h4, .card > dl, .card > .sub > p { margin: 0; }
/* 押したボタンのすぐ下に開く入力の欄（openBelow）。表の行の下に開く時は、行と分かるように地の色 */
.open-below { margin: 12px 0; }
.open-below-row > td { background: var(--ivory); padding: 8px; }
.open-below-row .open-below { margin: 0; }
details.fold > summary { cursor: pointer; font-weight: bold; min-height: var(--tap); padding: 8px 0; color: var(--green-text); }
details.fold > summary h3 { display: inline; }
details.form-section { border-top: 1px solid var(--line); }
/* 閉じた項目（アセスメントの23項目など .card の details）は、見出しの高さだけにする（中身の分の空きを残さない） */
details.card:not([open]) { display: block; }
.result.fields-view { grid-template-columns: minmax(0, 14em) minmax(0, 1fr); }
details.form-section > summary ~ * { margin-top: 14px; }
details.form-section[open] { padding-bottom: 6px; }
/* 表の後の別のまとまり（利用者＞基本の書類の記録 など）は上を空ける（S-007-2） */
.section-gap, .section-gap + .teikyohyo-print, main h3.section-gap { margin-top: 28px; }
/* 枠のすぐ後の説明の文は、枠にくっつけない */
.card + .hint, .card + p.hint { margin-top: 8px; }
/* 「くわしく（開くと出る）」（事故の第一報：S-086-1） */
details.more { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
details.more > summary { font-weight: bold; cursor: pointer; color: var(--green-text); }
details.more[open] { display: grid; gap: 14px; }
/* 枠と枠・表と枠をくっつけない（1つの枠に見えないように。配置の見直し 2026-10-15）。並べる入れ物（.my-cards・.tiles）と枠の中の枠は、入れ物の間（gap）で空ける */
.card + .card, .table-wrap + .card, .card + .table-wrap, .month-nav + .card, .hint + .card { margin-top: 16px; }
.my-cards > .card + .card, .tiles > .card + .card, .card > .card + .card { margin-top: 0; }
/* ログイン・パスワードの変更など、欄の少ない入力は狭い枠に（ボタンはその幅いっぱい） */
.card.narrow { max-width: 480px; }
.card.narrow > .btn, .card.narrow > button, .card.narrow .buttons > [type=submit] { justify-self: stretch; flex: 1 1 100%; }
/* PC の「やめる」も、横の送るボタンと同じ高さに */
form .buttons > .btn-sub { min-height: 52px; }
/* 入力の区切り（buildForm の { section }）を見るだけの形で出す時の見出し */
.result.fields-view .fields-view-section { grid-column: 1 / -1; color: var(--green-text); padding: 5px 12px; background: var(--wood-light); border-radius: 8px; margin-top: 10px; font-size: var(--fs-ml); }
/* 画面の題（h3）のすぐ下の枠は、題にくっつけない（事故1件の「次にすること」・虐待の疑いの窓口：045・047）。枠の中は枠の間（gap）で空ける */
:not(.card) > h3 + .card { margin-top: 12px; }
/* 見出しと枠の置き方：見出しのすぐ下の枠・表は少し空ける（くっつかない）。表の下の説明も空ける */
main h3 + .card, main h3 + form, main h3 + .table-wrap, main h2 + .card { margin-top: 10px; }
.table-wrap + .hint, .table-wrap + p, .table-wrap + .table-notes { margin-top: 10px; }
/* 小見出し（h4）も見出しの色に（黒い太字に見えない） */
main h4 { margin: 8px 0 0; color: var(--green-text); font-size: var(--fs-ml); }

/* ------------------------------------------------ 3-3 入力の欄 */
label { display: grid; gap: 4px; font-weight: bold; align-content: start; }
/* 入力の欄：白地に温かい灰色の線（線は背景とのコントラスト 3 以上）。選ぶ欄も白地にそろえ、矢印はアイビーの緑（デザインの見直し 2026-10-15） */
input, select, textarea { font-size: var(--fs-base); padding: 10px; border: 1px solid var(--input-line); border-radius: 8px; min-height: 48px; width: 100%; min-width: 0; background-color: var(--white); color: var(--text); }
select { appearance: none; padding-right: 36px; background: var(--white) var(--select-arrow) right 10px center / 16px no-repeat; }
select:disabled, input:disabled, textarea:disabled { background-color: var(--wood-light); color: var(--disabled-text); }
/* チェック・丸い選択は、ブラウザの青でなくアイビーの緑に */
input[type=checkbox], input[type=radio] { accent-color: var(--ivy); }
/* 2列の欄（スマホは1列：6） */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row > * { min-width: 0; }
/* チェックの並び：列をそろえる（がたがたにしない：配置の見直し） */
.checks { border: 1px solid var(--line); border-radius: 6px; }
/* チェックの一覧（buildForm の checks など）だけ、列のそろう升目に。2択の丸（.task-choice）と div.checks（実施・キャンセル、勤務できる時間の行）は横に並べたまま */
fieldset.checks:not(.task-choice) { display: grid; grid-template-columns: repeat(auto-fill, minmax(14em, 1fr)); gap: 8px 16px; padding: 8px 12px; }
fieldset.checks:not(.task-choice) .check { margin-right: 0; }
.checks legend { font-weight: bold; }
.check { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: normal; }
.check input { width: 24px; min-height: 24px; }
/* 説明の長いチェックでも、四角を縮めない（縮むと点のようになって押せない：2026-10-15 の写真の点検） */
.check input[type=checkbox], .check input[type=radio], .candidate input { flex: none; }
/* 入力欄のすぐ下に出す理由 */
.field-error { color: var(--error); background: var(--error-bg); border-left: 4px solid var(--error); margin: 2px 0 0; padding: 6px 10px; font-weight: bold; font-size: var(--fs-m); }
/* 小さな欄（予定の時刻・数など） */
input.small { width: 7em; min-height: var(--tap); font-size: var(--fs-m); padding: 4px 8px; }
.check input.small { width: 5em; }
.check.big { font-size: var(--fs-l); margin-right: 24px; }
.check.big input { width: 28px; min-height: 28px; }
/* 日付の見出しを押すと日付を選べる（日ごとの確認：S-026-1）。欄は見えないように見出しの後ろに置く */
.date-pick { font: inherit; color: inherit; background: none; border: none; border-bottom: 2px dashed var(--line); padding: 0 2px; cursor: pointer; min-height: var(--tap); }
/* 押すと日付を選べると分かる印（S-026-1 の写真の点検：2026-10-15） */
.date-pick::after { content: ' ▼'; font-size: .6em; vertical-align: middle; }
.date-pick:hover { border-bottom-color: var(--green-dark); }
.date-pick-input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
/* 2択の丸（援助内容の「した・しない」：C23） */
.task-choice { border: none; padding: 0; margin: 4px 0 0; }
/* 短い値（日付・時刻・数・電話・郵便番号など）の欄は、値に合った幅に（間延びさせない）。.short は core.js の buildForm が付ける */
input[type=date], input[type=datetime-local], input[type=month], input[type=tel], input.short { max-width: 16em; }
input[type=time], input[type=number], input.short-xs { max-width: 9em; }
/* 入力の区切りの見出し（core.js の buildForm の { section }）。2つ目からは上に点線 */
form h3.form-section-title { margin-top: 6px; border-left: none; padding: 5px 12px; background: var(--wood-light); border-radius: 8px; font-size: var(--fs-ml); color: var(--green-text); }
form h3.form-section-title ~ h3.form-section-title { margin-top: 14px; }
/* 郵便番号の欄と「郵便番号から住所を入れる」をひとまとまりに（誤りの文は欄のすぐ下に出る） */
.postal-field { display: grid; gap: 6px; }
.postal-field > .buttons { margin: 0; }
/* 地名から探す（phase8 I18）：欄は狭い画面でも1行に収まる幅まで縮む */
.postal-town-row { align-items: center; }
.postal-town-row .postal-town { flex: 1 1 10em; min-width: 0; max-width: 18em; }
/* 欄と、その欄だけを保存するボタンを横に並べる（予定の計画単位数：016）。狭ければボタンは欄の下 */
.inline-save { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.inline-save > label { flex: 0 1 auto; max-width: 30em; }
.inline-save > label input { max-width: 12em; }
/* パスワードの欄は、ほかの入力の枠と同じ幅の枠の中で、値に合った幅に（095：枠だけ狭かった） */
input[type=password] { max-width: 24em; }
/* 選ぶ言葉の短い選ぶ欄（区分・人数など）は、値に合った幅に（全幅に間延びさせない：056） */
select.short-select { max-width: 16em; }
/* 誤りの帯（欄の下）の後に次の欄の名前がくっつかない */
.field-error + label, label:has(> .field-error) + label, .row:has(.field-error) + label, .row:has(.field-error) + .row { margin-top: 6px; }
label > .field-error { margin-bottom: 4px; }
/* 日時の欄（core.js の dateTimeInput）：日付の欄と時刻の欄を横に並べる */
.datetime { display: flex; flex-wrap: wrap; gap: 8px; }
.datetime > input[type=date] { flex: 1 1 10em; }
.datetime > input[type=time] { flex: 0 1 8em; }
.datetime > .time-field { flex: 0 1 auto; }
/* 入力の部品（phase8 入力しやすさ：core/ の time-field・suggest・pick-search・month-grid、form.js の textArea、fold.js の「まだ n」） */
/* 小さな札（長さの札・よく使う文・50音の行）：折り返して並ぶ。押す所は --tap 以上 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: var(--tap); padding: 4px 12px; font-weight: normal; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.chip[aria-pressed=true] { background: var(--green-dark); color: var(--white); border-color: var(--green-dark); }
/* 時刻の欄：PC の文字の欄（4桁で打つ）も時刻の欄と同じ幅。長さの札は欄の下に折り返す */
input.time-input { width: 8em; max-width: 9em; }
.time-field-lengths { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: normal; }
.time-field-lengths > .time-chips { flex-basis: 100%; }
.time-length { color: var(--text-sub); font-size: var(--fs-m); }
/* 文の欄：右下に「あと n字」と帳票の目安 */
.text-area { display: block; }
.text-area > textarea { width: 100%; }
.text-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 12px; font-size: var(--fs-m); color: var(--text-sub); font-weight: normal; }
.text-fit.caution { color: var(--caution); background: var(--caution-pale); padding: 0 6px; border-radius: 4px; }
/* よく使う文の札：見出しごとに並べる。札は長い文でも折り返す */
.suggest { margin-top: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-weight: normal; }
.suggest-chips { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.suggest-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.suggest-head { flex-basis: 100%; font-size: var(--fs-m); color: var(--text-sub); font-weight: bold; }
/* 探して選ぶ欄：候補は欄の下に縦に並ぶ（1行 --tap 以上）。選んでいる行は色と線で分かる */
.pick-search { display: flex; flex-direction: column; gap: 6px; font-weight: normal; }
.pick-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.pick-option, .pick-none { min-height: var(--tap); padding: 8px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border-bottom: 1px solid var(--line); cursor: pointer; overflow-wrap: anywhere; }
.pick-option:last-child, .pick-none:last-child { border-bottom: none; }
.pick-option[aria-selected=true], .pick-option:hover { background: var(--mint); outline: 2px solid var(--green-dark); outline-offset: -2px; }
.pick-none { cursor: default; color: var(--text-sub); }
.pick-kana { font-size: var(--fs-m); color: var(--text-sub); }
/* 月の小さなカレンダー：7列が画面の幅に入る（日のボタンは --tap 以上）。選んだ日は濃い緑 */
.month-grid { width: 100%; max-width: 30em; border-collapse: collapse; table-layout: fixed; }
.month-grid th { font-size: var(--fs-m); font-weight: bold; padding: 4px 0; color: var(--green-text); }
.month-grid td { padding: 2px; }
.month-grid th.month-wd0 { color: var(--holiday); }
.month-grid th.month-wd6 { color: var(--saturday); }
.month-day { width: 100%; min-height: var(--tap); padding: 2px; border: 1.5px solid var(--hiwa); border-radius: 8px; background: var(--white); color: var(--text); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; line-height: 1.2; }
.month-day:disabled { opacity: 0.45; cursor: default; }
.month-day.picked { background: var(--green-dark); color: var(--white); border-color: var(--green-dark); }
.month-day-no { font-size: var(--fs-m); font-weight: bold; }
.month-day-sub { font-size: var(--fs-s); overflow-wrap: anywhere; }
/* 畳んだ見出しの横の「まだ n」「済」 */
.fold-left { margin-left: 12px; font-size: var(--fs-m); color: var(--caution); white-space: nowrap; }
.fold-left.done { color: var(--info); }
/* ファイルを選ぶ欄（core.js の filePicker）：元の欄は見えなくし（選ぶ・必須の検査は効く）、ボタンと名前を出す */
.file-pick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: normal; }
.file-pick > .file-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; }
.file-name { color: var(--text-sub); overflow-wrap: anywhere; }

/* ------------------------------------------------ 3-4 表（一覧） */
/* 表は横にずらす枠に入る。氏名・ID・権限は折り返さない（.nowrap）。画面が狭い時は表を横にずらして見る（スマホは1行1枚の枠：6） */
.table-wrap { overflow-x: auto; margin-top: 16px; }
.list { width: 100%; border-collapse: collapse; background: var(--white); min-width: 640px; }
.list th, .list td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.list th { background: var(--mint); color: var(--green-text); }
.list tr.retired td { color: var(--muted); background: var(--retired-bg); }
/* 操作のボタンの間は広めに。元に戻せない操作（取り消す・消す）はさらに離す（押し間違えない：配置の見直し 2026-10-15） */
.ops { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.ops > .btn-danger-text { margin-left: 12px; }
.ops .btn { min-height: var(--tap); font-size: var(--fs-sm); padding: 6px 10px; }
/* 元に戻せない操作の確かめ（「はい」と「やめる」） */
.confirm { flex-basis: 100%; background: var(--caution-bg); border: 1px solid var(--caution-line); border-radius: 6px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.confirm p { margin: 0; flex-basis: 100%; font-weight: bold; }
.nowrap { white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--row-hover); }
/* 数の列は右に寄せて位をそろえる（表の中は .list の td の左寄せが .num より強いので、表の中の決まりも置く：048・053・054 の写真の点検） */
.num { text-align: right; white-space: nowrap; }
tr.has-warn td { background: var(--caution-pale); }
/* 表の合計の行（本部のまとめ） */
tr.total td { font-weight: bold; border-top: 2px solid var(--muted); }
/* マスタの取り込みの差分：変わる列（前 → 後） */
td.changed { background: var(--changed-bg); font-weight: bold; }
/* 色の意味の説明（凡例） */
.legend { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.legend li { border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; font-weight: bold; }
.list td .btn, .list td a.btn { white-space: nowrap; }
/* 表の見出しの中のチェック（「選ぶ」）は右の間を取らない（見出しのマスからはみ出さないように） */
.list th .check { margin-right: 0; min-width: max-content; }
.table-notes { margin-top: 8px; }
.table-notes ul { margin: 4px 0 0; padding-left: 1.2em; }
/* 職員の一覧：主な操作だけ出し、ほかは「その他」で開く（S-060-1） */
.more-ops > summary { display: inline-flex; align-items: center; list-style: none; padding: 6px 10px; }
.more-ops > summary::-webkit-details-marker { display: none; }
.more-ops > summary::after { content: " ▼"; font-size: var(--fs-2xs); margin-left: 4px; }
.more-ops[open] > summary::after { content: " ▲"; }
.more-ops > .ops { margin-top: 6px; }
.list td.num, .list th.num { text-align: right; }
/* 表の操作の列（.ops）：同じ高さのボタンを左そろえで横に並べる（縦に並んで左がずれる・間が広すぎる・「その他」だけ2段目、を直す）。
 * PC では1行（狭いと表が横にずれて見える：5）、スマホでは折り返し、元に戻せない操作は右の端（6） */
.list td .ops { gap: 8px; align-items: center; }
.list td .ops > .btn, .list td .ops > a { min-height: var(--tap); }
/* 操作の列のリンク（開く など）は、ボタンと同じ形に見せる（ボタンとリンクが混ざらない） */
.list td .ops > a:not(.btn) { display: inline-flex; align-items: center; padding: 6px 10px; border: 1.5px solid var(--hiwa); border-radius: 10px; background: var(--white); font-size: var(--fs-sm); font-weight: bold; text-decoration: none; }
/* 「その他」で開く操作（職員の一覧）：主な操作の並びの横に置く。開いたら下に広げる */
.list td > div:has(> .ops + .more-ops) { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.list td > div > .more-ops[open] { flex-basis: 100%; }
.more-ops > summary.btn { min-height: var(--tap); font-size: var(--fs-sm); }

/* ------------------------------------------------ 3-5 タブ・切り替え */
/* タブ（設定・利用者1人の画面） */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 3px solid var(--ivy); margin: 12px 0 16px; }
.tabs a { padding: 10px 16px; border-radius: 10px 10px 0 0; color: var(--green-text); font-weight: bold; text-decoration: none; background: var(--mint); }
.tabs a:hover { background: var(--wakame); }
.tabs a.active { background: var(--ivy); color: var(--white); }
/* 一覧の絞り込み */
.filters { display: grid; gap: 8px; margin-bottom: 8px; }
.kana-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kana-row .btn { min-height: 44px; min-width: 52px; padding: 6px 10px; }
/* 前・次の切り替え（月・週・日）。ボタンの字は折り返さない（C22） */
.month-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0; }
.month-nav strong { font-size: var(--fs-xl); }
.month-nav .btn { white-space: nowrap; }
/* 見出しへの目次（toc） */
.toc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.toc-title { font-weight: bold; color: var(--green-text); }
/* 押した目次のボタン（いまここ）と、目次で着いた枠を少しの間光らせる（fold.js の toc・jumpTo。2026-11-01 ご本人「どこをクリックしたのかわかりづらい」） */
.toc .btn.active { background: var(--mint); border-color: var(--green-text); }
.jump-hit { animation: jump-hit 2.2s ease-out; }
@keyframes jump-hit {
  0%, 40% { box-shadow: 0 0 0 4px var(--focus); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .jump-hit { animation: none; box-shadow: 0 0 0 4px var(--focus); } }
/* PC では目次を画面の上に貼りつける（下に動いても目次からすぐ別の所へ行ける）。スマホは目次が何行にもなるので貼りつけない */
@media (min-width: 601px) {
  .toc { position: sticky; top: 0; z-index: 5; background: var(--ivory); padding: 6px 0; }
  .toc ~ * { scroll-margin-top: 72px; }
}
/* 目次をタブの切り替えに（T281。運営・月の数字・予定・設定・計画書の5画面。2026-11-01 ご本人「クリックした後の動作がわかりづらい」）。
   opsTabs と同じタブの見た目（.tabs）。押しても太さ・枠は変えず色だけ変えるので、幅がコロコロ変わらない。スマホは .toc の flex-wrap でタブが折り返す */
.toc-switch { border-bottom: 3px solid var(--ivy); }
.toc-switch .btn { padding: 10px 16px; border-radius: 10px 10px 0 0; border: none; box-shadow: none; font-weight: bold; color: var(--green-text); background: var(--mint); }
.toc-switch .btn:hover { background: var(--wakame); }
.toc-switch .btn.active { background: var(--ivy); color: var(--white); }
/* タブの中の切り替え（事故・ヒヤリハット｜虐待の疑い）。タブより一段小さい丸い札。今いる方は塗る */
.sub-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.sub-tabs a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 4px 16px; border: 1.5px solid var(--hiwa); border-radius: 22px; background: var(--white); color: var(--green-text); font-size: var(--fs-m); font-weight: bold; text-decoration: none; }
.sub-tabs a:hover { background: var(--mint); }
.sub-tabs a.active { background: var(--ivy); border-color: var(--ivy); color: var(--white); }
/* タブの中の上の1行「このタブを使えるのは：…」（core.js の tabNote。ご本人の決定 2026-10-29）。長い時は折り返す */
.tab-note { margin: -8px 0 12px; overflow-wrap: anywhere; }

/* ------------------------------------------------ 3-6 知らせと文の色 */
.message { background: var(--error-bg); color: var(--error); border: 1px solid var(--error); border-radius: 6px; padding: 12px; font-weight: bold; }
.notice { background: var(--info-bg); color: var(--info); border: 1px solid var(--green-dark); border-radius: 6px; padding: 12px; font-weight: bold; }
.notice-strong, .caution-box, .note-box { background: var(--caution-bg); border: 2px solid var(--caution-line); border-radius: 6px; padding: 12px; font-weight: bold; }
.note-box { font-weight: normal; }
.note-box ul { margin: 0; }
/* テスト用の環境の帯（main.js。[app] env = test の時だけ。ページのいちばん上・ログインの画面にも出る。two-environments.md の 3-4） */
.env-band { margin: 0; padding: 8px 16px; background: var(--caution-bg); color: var(--caution); border-bottom: 3px solid var(--caution-line); font-weight: bold; text-align: center; overflow-wrap: anywhere; }
/* 文の色の意味（頭の決まり）：.warn＝誤り（赤）・.caution＝注意（黄茶）・.info＝お知らせ（緑） */
.caution { color: var(--caution); font-weight: bold; }
.info { color: var(--info); font-weight: bold; }
/* 初期パスワードを1回だけ見せる枠 */
.secret { border: 3px solid var(--secret-line); background: var(--caution-pale); margin-bottom: 16px; }
.secret-value { font-family: Consolas, "Courier New", monospace; font-size: var(--fs-3xl); letter-spacing: 2px; background: var(--white); border: 1px dashed var(--muted); padding: 8px 12px; margin: 0; word-break: break-all; }
.warn { color: var(--error); font-weight: bold; }
/* 今日の仕事の知らせ */
.alerts { list-style: none; margin: 0; padding: 0; }
.alert { border-left: 6px solid var(--caution-line); background: var(--caution-pale); margin: 6px 0; padding: 10px 12px; border-radius: 4px; }
.alert-red { border-left-color: var(--error); background: var(--error-bg); }
.alert a { color: inherit; text-decoration: none; display: block; }
.alert a:hover { text-decoration: underline; }
.badge { font-size: var(--fs-s); font-weight: normal; border: 1px solid var(--line); border-radius: 12px; padding: 2px 10px; background: var(--white); }
/* わたしの予定：前に見た時の後に変わった予定 */
.badge-change { background: var(--caution-bg); border-color: var(--caution-line); font-weight: bold; }
.warn-tag { display: block; font-size: var(--fs-xs); font-weight: bold; color: var(--error); }
/* 料金シミュレーター：誤りの行の頭の文字の印（色だけに頼らない：S-057-1） */
.row-mark { display: block; font-size: var(--fs-s); }
/* 急ぐ知らせの印（色だけに頼らない：S-003-1） */
.badge-urgent { background: var(--error); border-color: var(--error); color: var(--white); font-weight: bold; margin-right: 6px; }
/* ログインの誤り：送るボタンのすぐ上（S-001-1） */
form .message { margin: 0; }
/* 状態の印（休みの希望）：文字と色の両方で。申請＝白・承認＝緑・却下＝黄茶 */
.badge.state-承認 { border-color: var(--green-dark); color: var(--info); background: var(--info-bg); }
.badge.state-却下 { border-color: var(--caution-line); color: var(--caution); background: var(--caution-bg); }
/* 運営の状態：状態は色付きの小さな札（色と文字の両方で。列が1文字の幅に縮まないよう折り返さない：2026-10-16 の写真の点検） */
.state-tag { display: inline-block; white-space: nowrap; font-size: var(--fs-s); font-weight: bold; line-height: 1.5; padding: 1px 8px; margin: 0 4px 4px 0; border: 1px solid; border-radius: 10px; }
.state-ok { background: var(--info-bg); color: var(--info); border-color: var(--green-dark); }
.state-soon { background: var(--caution-bg); color: var(--caution); border-color: var(--caution-line); }
.state-overdue, .state-none { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.state-genzan { background: var(--error); color: var(--white); border-color: var(--error); }
.alert a.inline-link { display: inline; text-decoration: underline; }
.warn-mark { color: var(--error); font-weight: bold; margin-right: 2px; }
/* 誤りの枠を画面の題（h2）の下に出す時（core.js の showMessage）の間 */
#view .message { margin: 8px 0 12px; }

/* ------------------------------------------------ 3-7 小さな決まり */
.pre { white-space: pre-wrap; }
.small-text { font-size: var(--fs-s); }
/* 折り返す所でも、この中は折らない（「（7件）」など） */
.keep { white-space: nowrap; }
/* スマホ（600px 以下）だけに出す物・PC だけに出す物（印刷の案内 printHint・ブラウザで印刷するボタン など。切り替えは 6） */
.sp-only { display: none; }

/* ======================================================================== 4. 画面ごと */
/* 利用者1人の画面の見出し */
/* 一覧へ戻るリンクと、前の人・次の人（phase8 I11）を1行に。狭ければ折り返す */
.client-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.client-top > p, .client-move { margin: 0; }
.client-head h2 { margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: bold; }
.search-results { display: flex; flex-direction: column; gap: 6px; }
/* 勤務の集計の日ごとの帯：仕事の間（移動・待機・休憩） */
tr.gap-row td { background: var(--rest-bg); color: var(--green-text); }
/* ヘルパーのスマホ：今日の訪問（G30）・記録（G31）。片手で押せる大きさ */
.visit-card { border-left: 6px solid var(--line); }
.visit-card.status-実施 { border-left-color: var(--green-dark); }
.visit-card.status-キャンセル, .visit-card.status-取消 { border-left-color: var(--cancel-line); opacity: .85; }
.visit-time { font-size: var(--fs-xl); font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
.visit-client { font-size: var(--fs-l); margin: 4px 0; }
.actual-form input[type=time] { width: 8em; }
/* ヘルパーの割り当て（K18）：日は横に時刻・縦にヘルパー。灰色は勤務できない時間 */
.timeline { display: grid; gap: 2px; margin-top: 12px; overflow-x: auto; }
.tl-row { display: grid; grid-template-columns: 8em minmax(560px, 1fr); gap: 6px; align-items: stretch; }
.tl-name { font-weight: bold; font-size: var(--fs-m); padding: 4px 0; }
.track { position: relative; min-height: 44px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.track.scale { min-height: 24px; border: none; background: none; }
/* 帯（位置は shift.js が left・width で入れる）。画面の上の帯 .bar とは別の名前（C12） */
.track .tl-bar { position: absolute; top: 2px; bottom: 2px; overflow: hidden; white-space: nowrap; font-size: var(--fs-s); }
.track .tick { border-left: 1px solid var(--line); padding-left: 2px; color: var(--scale-text); }
.track .off { background: var(--off-bg); }
.track .on { background: var(--white); }
.shift-visit { font-size: var(--fs-s); border: 1px solid var(--green-text); border-radius: 4px; background: var(--info-bg); color: var(--visit-text); padding: 2px 6px; cursor: pointer; text-align: left; }
.shift-visit.unassigned { background: var(--unassigned-bg); border-color: var(--caution-line); }
.shift-visit.has-warn { border: 2px solid var(--error); }
.shift-work { background: var(--work-bg); border: 1px solid var(--work-line); border-radius: 4px; padding: 2px 6px; font-size: var(--fs-s); }
.tl-unassigned .tl-name, tr.tl-unassigned td:first-child { color: var(--unassigned-text); }
/* 割り当て（日）のスマホの一覧（時刻の帯の代わり：C12） */
.tl-list-row { border: 1px solid var(--line); border-radius: 6px; background: var(--white); padding: 6px 10px; margin-bottom: 8px; }
.tl-list-items { display: flex; flex-direction: column; gap: 6px; }
.tl-list-items > button { text-align: left; min-height: var(--tap); padding: 6px 10px; }
.shift-week td { vertical-align: top; min-width: 9em; }
.shift-week .shift-visit { display: block; width: 100%; margin: 2px 0; }
.shift-month td, .shift-month th { padding: 4px; font-size: var(--fs-s); }
.cell-off { background: var(--cell-off-bg); }
.day-holiday { color: var(--holiday); }
.day-sat { color: var(--saturday); }
.candidates { display: grid; gap: 6px; }
.candidate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font-weight: normal; }
.candidate.has-warn { background: var(--caution-pale); }
.candidate input { width: 24px; min-height: 24px; }
.candidate-name { font-weight: bold; min-width: 6em; }
.candidate-reason { flex-basis: 100%; font-size: var(--fs-sm); }
/* 勤務できる時間（設定＞勤務条件）：曜日ごとの行 */
.avail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.avail-row input { width: 7em; }
/* 勤務できる時間の1行をほかの曜日にも写す欄（phase8 I16）：曜日の印を横に並べ、狭い画面では折り返す */
.weekday-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 4px 0; }
.weekday-copy legend { font-weight: bold; }
.weekday-copy .check { margin-right: 0; }
.weekday-copy .buttons, .weekday-copy .field-error { flex-basis: 100%; }
/* 休みの希望の休む日（phase8 I16）：カレンダーと選んだ日 */
.leave-days { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; min-width: 0; }
.leave-days legend { font-weight: bold; }
.leave-picked { font-weight: bold; margin: 8px 0 0; }
/* ケアの書類（計画書・アセスメント）：中の行（目標・週間計画・援助内容・23項目）（枠の中の枠 .card.sub は 3-2） */
.task { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 6px; }
/* スマホの訪問：申し送り・援助内容・サ責の訪問と同行の印（フェーズ4b） */
.handovers ul { margin: 4px 0 0; padding-left: 1.2em; font-weight: normal; }
/* スマホの訪問：緊急の連絡先（連絡する順・続柄・名前・電話。phase7 C1） */
.emergency-contacts { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin: 8px 0; }
.emergency-contacts > div { font-weight: bold; }
.emergency-contacts ol { margin: 4px 0 0; padding-left: 1.4em; }
.emergency-contacts a { overflow-wrap: anywhere; }
fieldset.tasks, details.tasks, details.sa-mark { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin: 8px 0; }
fieldset.tasks legend, details.tasks > summary, details.sa-mark > summary { font-weight: bold; cursor: pointer; }
/* 書類チェック表（P03）：状態は色と文字の両方で出す */
.doc-ok { background: var(--info-bg); }
.doc-none { background: var(--caution-pale); }
.doc-expired, .doc-order { background: var(--error-bg); color: var(--error); }
.doc-redo { background: var(--caution-bg); color: var(--caution); }
.doc-nover { background: var(--caution-pale); color: var(--caution); }
.doc-na { background: var(--na-bg); color: var(--text-sub); }
.doc-cell a { color: inherit; text-decoration: none; display: block; }
.doc-cell .note { font-size: var(--fs-xs); line-height: 1.3; }
/* 月の数字（P16。フェーズ5c）：大きな数の欄と、売上の棒グラフ（SVG）。札は PC は5つを1段に（スマホは2つずつ：6） */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0; }
.tile { gap: 4px; }
.tile-value { font-size: var(--fs-2xl); font-weight: bold; color: var(--green-text); }
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 560px; height: auto; }
.chart .bar-past { fill: var(--chart-past); }
.chart .bar-now { fill: var(--green-dark); }
.chart .chart-label { font-size: var(--fs-xs); fill: var(--scale-text); }
/* 割り当て（週）：注意の印の説明（凡例）と、帯の中の短い言葉 */
.shift-legend { margin: 4px 0; }
.track .warn-tag { display: inline; margin-left: 4px; }
/* 日の割り当て：訪問しない人を出す・隠す */
.tl-toggle { margin: 4px 0; }
/* 研修計画の表：月と題目が切れないように */
.plan-table [name=planned_month] { min-width: 5.5em; }
.plan-table [name=theme] { min-width: 12em; }
.plan-table [name=req_code] { min-width: 17em; }
/* 書類と出力：名前のボタンと説明の並び（点を付けない） */
.output-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.output-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.output-code { font-size: var(--fs-xs); font-weight: normal; color: var(--text-sub); margin-left: 6px; }
/* 次にすること（事故1件：S-045-2） */
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.next-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* 援助内容の「全部した」と、1つずつの「した・しない」（C23） */
fieldset.tasks > .buttons { margin: 4px 0 8px; }
/* ヘルパーの表のかわりのカード（休みの希望・今月の勤務：C21）。大事な所（状態・合計）を上の行の左に */
.my-cards { display: grid; gap: 8px; margin-top: 8px; }
.my-cards .card { gap: 4px; padding: 10px 14px; }
.my-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-weight: bold; }
.my-card-head .badge { font-size: var(--fs-m); font-weight: bold; }
.my-card-figures { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; }
.my-card-figures div { display: flex; gap: 6px; }
.my-card-figures dt { color: var(--text-sub); }
.my-card-figures dd { margin: 0; }
.my-cards .card.total { border: 2px solid var(--green-dark); }
/* 今日の仕事の木の絵：木の上から二人のベンチまでの切り出し（588×476）を、看板の字が読める大きさ（幅 400px で字が約12px）で本文の中央に */
.day-strip { display: block; width: 100%; max-width: 400px; height: auto; border-radius: 14px; margin: 4px auto 8px; background: var(--mint); }
/* ログインの画面（T278 の 2-1）：PC もスマホも同じ1列・真ん中（幅 400px まで）。名前 → 札なしの木の絵（高さ 160px まで。スマホは 96px）→ ログインの枠 → 運営からのお知らせ → 版数 */
.login-page { display: grid; gap: 12px; max-width: 400px; margin-inline: auto; }
.login-page > .card.narrow { max-width: none; }
.login-title { margin: 4px 0 0; text-align: center; font-size: var(--fs-l); color: var(--green-text); }
.login-hero { display: block; width: 100%; max-height: 160px; object-fit: cover; height: auto; border-radius: 16px; box-shadow: 0 2px 8px var(--wood-shadow-strong); background: var(--mint); }
.login-form, .login-forgot { display: grid; gap: 14px; }
.login-form > .btn { justify-self: stretch; }
.login-card > h2 { margin: 0; }
.login-card > .login-forgot-link { justify-self: start; background: none; border: none; padding: 6px 0; min-height: var(--tap); color: var(--green-text); text-decoration: underline; font-size: var(--fs-s); cursor: pointer; }
.login-forgot[hidden], .login-forgot [hidden] { display: none; }
.login-notices h3 { margin: 0; }
.login-notices ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.login-foot { margin: 0; text-align: center; font-size: var(--fs-xs); color: var(--text-sub); }
@media (max-width: 600px) { .login-hero { max-height: 96px; } }
/* ヘルパーの訪問の欄：「記録する」は幅いっぱい、「サ責に伝える」「事故の報告」は2つ並べて同じ幅・同じ高さに（配置の見直し） */
.visit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
.visit-actions > .btn-big { grid-column: 1 / -1; }
.visit-actions > .btn-sub { white-space: normal; min-height: 52px; }
/* 予定どおり報告の枠（phase8 I19）：淡い若葉の地。様子の2択は大きい札（--tap 以上・折り返す）。報告のボタンは幅いっぱいで、長い文は折り返す */
.quick-report { display: grid; gap: 12px; background: var(--mint); border: 1.5px solid var(--hiwa); border-radius: 10px; padding: 12px; }
.quick-report[hidden] { display: none; }
/* 札を読む（T068）：カメラの映像は枠の幅に合わせる（スマホではみ出さない）。理由のボタンは縦に並べる */
.proof-scan { display: grid; gap: 10px; }
.proof-video { width: 100%; max-height: 50vh; background: #000; border-radius: 8px; object-fit: cover; }
.proof-reasons { display: grid; gap: 8px; }
.proof-reasons > .btn { white-space: normal; }
.quick-title { font-size: var(--fs-l); font-weight: bold; color: var(--green-text); }
.quick-report > .btn-big { white-space: normal; overflow-wrap: anywhere; }
.quick-report > .btn-big:disabled { opacity: .55; cursor: not-allowed; }
.condition-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.condition-choice > legend { margin-bottom: 4px; }
.condition-choice .check { min-height: var(--tap); margin-right: 0; padding: 6px 14px; background: var(--white); border: 1.5px solid var(--hiwa); border-radius: 10px; overflow-wrap: anywhere; }
.condition-choice .check:has(input:checked) { border-color: var(--green-dark); outline: 2px solid var(--green-dark); }
/* バイタルの欄（任意・畳む）：体温・脈拍は1行に1つ、血圧の上・下は狭い画面でも2つ並べる */
details.vitals { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: var(--white); }
details.vitals > summary { font-weight: bold; cursor: pointer; color: var(--green-text); min-height: var(--tap); display: flex; align-items: center; }
details.vitals[open] { display: grid; gap: 10px; }
.vital-bp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; border: none; padding: 0; margin: 0; }
.vital-bp > legend { font-weight: bold; padding: 0; margin-bottom: 4px; }
.vital-bp > label { min-width: 0; }
input.vital { max-width: 9em; }
/* 運営の状態：措置の名前の列は広めに、間隔・担当者は狭くしすぎない */
.ops-status td:first-child { min-width: 12em; }
.ops-status td:nth-child(5) { min-width: 8em; }
/* 減算の見込みの枠の中の、体制との食い違い（同じ減算の枠にまとめる：C20） */
.genzan-mismatch { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--caution-line); font-weight: normal; }
/* 運営の記録の一覧：見出しは折り返さず、題名・措置の列は狭くしすぎない（「種／類」「研／修」と折れない） */
.ops-records th { white-space: nowrap; }
.ops-records td:nth-child(3), .ops-records td:nth-child(4) { min-width: 8em; }
/* 通報・相談の窓口：見出しと箇条の間を詰める（047） */
.card.desks { gap: 8px; }
.card.desks > h4 { color: var(--green-text); font-size: var(--fs-base); }
.card.desks ul { margin: 0; padding-left: 1.4em; }
/* 割り当て（日）の時刻の帯：苗字と ⚠ だけ（段の位置と高さは shift.js が入れる）。入らない時は「…」 */
.track button.tl-bar { text-overflow: ellipsis; padding: 2px 4px; }
/* ヘルパーの訪問の「まだ・記録済み」の札は読める大きさに（083 の写真の点検） */
.visit-time .badge { font-size: var(--fs-m); font-weight: bold; padding: 4px 12px; }
.chart .chart-year { font-weight: bold; fill: var(--green-text); }
/* 祝日の一覧（設定＞事業所）：1行に1つ。PC では段に分けて並べる */
.holiday-list { columns: 15em; margin: 4px 0; padding-left: 1.2em; }
.holiday-list li { break-inside: avoid; }

/* ======================================================================== 5. PC の広い画面（601px 以上） */
/* PC の表（C11）：列の多い表の画面は、画面の入れ物（main.js が画面ごとに作る box）か、タブの中身に .wide を付けるだけ。
 * PC では main を画面いっぱい（1366px の PC で約1330px）に広げ、表の見出し・ボタンは折り返さない。名前の列は td に .nowrap。
 * 長い説明は表の中に書かず、表の下に1回だけ（.table-notes）。スマホは今までどおり（表は1行1枚の枠：6） */
@media (min-width: 601px) {
  main:has(.wide) { max-width: 1600px; }
  /* 表は広く、同じ画面の入力の枠は普通の幅に（欄が横いっぱいに伸びないように：配置の見直し） */
  .wide form.card, .wide .open-below > .card { max-width: 928px; }
  .wide .list th { white-space: nowrap; }
  /* 文が入る列（注意など）は狭くしすぎない */
  .wide .list td.col-text { min-width: 13em; }
  /* 操作の列：主なボタンは1行に並べる（ほかは「その他」） */
  .wide .list td.col-ops > div > .ops { flex-wrap: nowrap; }
  /* 割り当て（月）：31日と合計が PC の幅に入るように、マスを詰める */
  /* 31日分を PC の幅に入れる（マスの時間は「2時間30分」の言葉で「2:30」より幅が要る：2026-10-16 の写真の測り） */
  .wide .shift-month td, .wide .shift-month th { padding: 2px; font-size: var(--fs-2xs); }
  .wide .shift-month { min-width: 0; }
  /* 書類チェック表：11列と利用者の名前を 1366px の PC の幅に入れる（見出しは折り返さないので、見出しの字と余白を詰める。phase7 D2 で2列足した） */
  .wide .doc-check-table th:not(:first-child), .wide .doc-check-table td:not(:first-child) { padding: 6px 4px; }
  .wide .doc-check-table th { font-size: var(--fs-s); }
  /* 週の見出し（祝日の名前つき）は折り返してよい（7日が PC の幅に入るように） */
  .wide .shift-week th { white-space: normal; }
  .wide .shift-week td { min-width: 8.5em; }
  /* 枠の中にじかに置いたボタン（計算する・ログインする など）は、PC で横いっぱいに伸ばさない（スマホは幅いっぱいのまま） */
  .card > .btn, .card > button { justify-self: start; }
  /* 列の少ない表（.compact）は PC で中身に合った幅に（全幅に間延びさせない：未収の経過の表） */
  .list.compact { width: auto; min-width: 28em; }
  /* 表の操作の列は1行に（元に戻せない操作も横に続ける） */
  .list td .ops { flex-wrap: nowrap; }
  .list td .ops > .btn-danger-text { margin-left: 0; }
}

/* ======================================================================== 6. スマホ（600px 以下） */
/* ---- 表：1行を1枚の枠にする。core/table.js の table() が .fit を付ける：スマホの幅（600px 以下）か、パソコンでも表が枠に入りきらず右が隠れる時
 *      （文字を大きくした時・列の多い表。右が切れて見づらい：ご本人 2026-10-24「スマホでもパソコンでも切れないように」）。
 *      決まりはこの1か所（前は 600px 以下の中だけにあった） */
/*      見出しの行を隠し、各マスを「見出し｜値」の1段にして縦に並べる。
 *      値が無い（－）マスは出さない（S-036-1） */
.list.stack.fit { min-width: 0; }
.list.stack.fit thead { display: none; }
.list.stack.fit, .list.stack.fit tbody, .list.stack.fit tr, .list.stack.fit td { display: block; }
.list.stack.fit tr { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; background: var(--white); }
.list.stack.fit td { border: none; border-bottom: 1px solid var(--line); padding: 4px 8px; }
.list.stack.fit td[data-label] { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); column-gap: 8px; }
.list.stack.fit td[data-label] > * { grid-column: 2; }
.list.stack.fit td.stack-empty { display: none; }
/* 入力の欄があるマスは、見出しを上・欄を下にして欄を全幅に（選ぶ欄の文字が切れないように：2026-10-15 研修計画） */
.list.stack.fit td[data-label]:has(select, textarea, input:not([type=checkbox]):not([type=radio]):not([hidden])) { display: block; }
.list.stack.fit td[data-label]:has(select, textarea, input:not([type=checkbox]):not([type=radio]):not([hidden]))::before { display: block; }
.list.stack.fit td:last-child { border-bottom: none; }
.list.stack.fit td[data-label]::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 9; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-size: var(--fs-s); color: var(--text-sub); font-weight: bold; }
/* 行の見出し（tbody の th。月の数字の比べる表の「売上」など）は枠の見出しに */
.list.stack.fit tbody th { display: block; border: none; border-bottom: 1px solid var(--line); background: var(--mint); text-align: left; }
/* 枠の中では折り返す（折り返さない文字・最小の幅のある入力欄が右にはみ出さないように） */
.list.stack.fit td.nowrap, .list.stack.fit td .nowrap { white-space: normal; }
.list.stack.fit td input, .list.stack.fit td select, .list.stack.fit td textarea { min-width: 0; max-width: 100%; }
.list.stack.fit td input[type=checkbox], .list.stack.fit td input[type=radio] { width: 28px; }
.list.stack.fit td:has(> input[type=checkbox]:only-child) { text-align: left; }
/* 縦横で見る表（割り当ての週・月）・運営の表のマスの最小の幅も外す（4 の画面ごとの決まりより後に置くので、同じ強さなら こちらが効く） */
.list.stack.fit td { min-width: 0; }

@media (max-width: 600px) {
  /* ---- 上の帯・メニュー：帯は低めに（題と名前・ログアウトが2段になるので、文字とボタンを少し小さく）。メニューは「メニュー」ボタンで開く */
  .bar { padding: 8px 12px; }
  .bar h1 { font-size: var(--fs-title-sp); }
  .bar h1::before { width: 28px; height: 28px; background-size: 20px, auto; }
  #who .btn { min-height: var(--tap); padding: 6px 14px; }
  .nav.collapsible { flex-direction: column; align-items: stretch; }
  .nav.collapsible .nav-toggle { display: block; }
  .nav.collapsible:not(.open) .nav-links { display: none; }

  /* ---- ボタン：送るボタンは全部の入力で幅いっぱいの大きいボタン（訪問の欄の「記録する」と同じ。S-084-2・S-086-1・配置の見直し）。やめるは小さく下に */
  form .buttons > [type=submit] { flex: 1 1 100%; min-height: 56px; font-size: var(--fs-l); }

  /* ---- 枠：見るだけの形は1列に */
  .result { grid-template-columns: minmax(0, 1fr); }
  .result dd { margin-bottom: 6px; }
  .result.fields-view { grid-template-columns: minmax(0, 1fr); }

  /* ---- 入力の欄：2列の欄は1列（C4）、チェックは大きく（C7）、チェックの一覧は1列に */
  .row { grid-template-columns: 1fr; }
  .check input, .candidate input { width: 28px; min-height: 28px; }
  fieldset.checks:not(.task-choice) { grid-template-columns: minmax(0, 1fr); }

  /* 枠の中では、元に戻せない操作を右の端へ */
  .ops > .btn-danger-text { margin-left: auto; }

  /* ---- タブ：幅のそろう升目に（1つだけの段を作らない）。4つ・7つ・8つの並びは4列に（3列だと最後の1つだけが次の段に残っていた：
   *      利用者・設定のタブ 7つ、割り当て 4つ）。長い名前は2行に折る。ヘルパーのタブ（6つ）は3つずつ2段に（S-091-1） */
  .tabs.my-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tabs.my-tabs a { padding: 8px 2px; text-align: center; font-size: var(--fs-sm); border-radius: 8px 8px 0 0; }
  .tabs:not(.my-tabs) { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5em, 1fr)); }
  .tabs:not(.my-tabs):has(> a:nth-child(4):last-child),
  .tabs:not(.my-tabs):has(> a:nth-child(7):last-child),
  .tabs:not(.my-tabs):has(> a:nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabs:not(.my-tabs) a { padding: 8px 4px; text-align: center; font-size: var(--fs-s); border-radius: 8px 8px 0 0; line-height: 1.3; display: flex; align-items: center; justify-content: center; overflow-wrap: anywhere; min-width: 0; }
  /* 8つ（運営。T067 で災害・安否・当番表を足して6つ→8つに）は4つ・7つより文字が増え、「・」の後ろのまとまり（.keep は white-space: nowrap）が枠に収まらない
   * （事故・ヒヤリハット）。文字を削らず、字を少し小さく・余白を狭くし、それでも収まらない時だけ最後の手段で途中でも折る（UT-656・UT-1002・UT-1446） */
  .tabs:not(.my-tabs):has(> a:nth-child(8):last-child) a { font-size: var(--fs-xs); padding: 6px 2px; }
  .tabs:not(.my-tabs):has(> a:nth-child(8):last-child) a .keep { white-space: normal; overflow-wrap: anywhere; }
  /* 前・次の切り替えは見出しを上・ボタンを下に（C22） */
  .month-nav > strong, .month-nav > input { order: -1; flex-basis: 100%; }

  /* ---- 小さな決まり：スマホだけ・PC だけに出す物 */
  .sp-only { display: block; }
  .pc-only { display: none !important; }

  /* ---- 画面ごと */
  /* 月の数字の札：2つずつ（最後に1つ余れば幅いっぱい。2段目に1つだけ小さく残さない）。グラフは画面の幅に縮める（横にずらさない） */
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tile-value { font-size: var(--fs-xl); }
  .chart { min-width: 0; }
  /* 今日の仕事の木の絵 */
  .day-strip { max-width: 300px; }
  /* 枠の最後の主なボタン1つ（料金シミュレーターの「計算する」など。form の送るボタンでない物）も、送るボタンと同じ幅いっぱいの大きさに
   * （単位数の試算の「計算する」とそろえる） */
  .card > .buttons:last-child > .btn:not(.btn-sub):only-child { flex: 1 1 100%; min-height: 56px; font-size: var(--fs-l); }
}

/* ======================================================================== 7. 印刷 */
@media print { #nav, header, .buttons, button, .no-print { display: none !important; } .doc-cell .note { font-size: 9px; } }
