/* キミテラス インターンシップ。ライト配色のみ。インラインの style は CSP で使えない。 */
:root {
  color-scheme: light;
  --fs-13: 13px;
  --fs-15: 15px;
  --fs-17: 17px;
  --fs-20: 20px;
  --fs-26: 26px;
  --fs-display: 32px;
  --r-nav: 8px;
  --fw-reg: 400;
  --fw-semi: 600;
  --fw-num: 700;
  --sp-4: 4px; --sp-8: 8px; --sp-12: 12px; --sp-16: 16px; --sp-24: 24px; --sp-32: 32px; --sp-48: 48px;
  --w-read: 720px;
  --w-table: 1120px;
  --gutter: 32px;
  --row-h: 48px;
  --hit: 44px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur-1: 100ms;
  --dur-2: 180ms;
  --dur-3: 300ms;
  --focus-ring: 3px solid var(--focus);
  --press-bg: color-mix(in srgb, var(--label) 10%, transparent);
  --hover-bg: color-mix(in srgb, var(--label) 5%, transparent);
  --disabled-op: .4;
  --glass: color-mix(in srgb, var(--bg) 78%, transparent);
  --line: #E2E8F0;
  --line-strong: #94A3B8;
  --ink-2: #4D5C70;
  --bg: #fff;
  --canvas: #f4f6fb;
  --side: #eef1f8;
  --group: #fff;
  --fill: #F1F5F9;
  --fill-hover: #E2E8F0;
  --sep: #CBD5E1;
  --sep-strong: #94A3B8;
  --label: #1e293b;
  --label2: #4d5c70;
  --brand: #2b4acb;
  --brand-hover: #1e3ab0;
  --brand-text: #2b4acb;
  --tint: #ECEFFA;
  --on-brand: #fff;
  --focus: #2b4acb;
  --good: #116a3a;
  --good-bg: #e4f4ea;
  --bad: #b3261e;
  --bad-bg: #fde9e7;
  --action-bg: #FFF0E2;
  --action-text: #9A3412;
  --warn-bg: #fff4d6;
  --warn-line: #a16207;
  --warn-text: #5c3b00;
  --bubble: #ececee;
  --bar: #fff;
  --shadow-card: none;
  --ink: #1e293b;
  --shadow-sheet: none;
  --ctl: 40px;
  /* 角丸はボタン・バッジ・入力欄などの操作部品だけ。面は罫線で区切る */
  --r-card: 0;
  --r-ctl: 6px;
  --r-point: 6px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (max-width: 699px), (pointer: coarse) { :root { --ctl: 44px; --gutter: 16px; --row-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--label);
  font: var(--fs-15)/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
body.standalone { overflow: auto; }
#app { height: calc(100vh - var(--bar-h) - var(--demo-h, 0px)); height: calc(100dvh - var(--bar-h) - var(--demo-h, 0px)); }
body.standalone #app { height: auto; min-height: calc(100vh - var(--bar-h)); min-height: calc(100dvh - var(--bar-h)); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
ul, ol { list-style: none; }
a { color: var(--brand-text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
small { font-size: var(--fs-13); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
main:focus-visible { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--label2); font-size: var(--fs-13); }
.spacer { flex: 1; }
.warn-text { color: var(--warn-text); font-weight: 600; }
.warn { padding: 8px 12px; background: var(--warn-bg); color: var(--warn-text); font-size: var(--fs-13); }
.pass-none { padding: 24px; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 70; padding: 8px 12px; background: var(--bg); border-radius: var(--r-ctl); }
.skip:focus { top: 8px; }
body.busy { cursor: progress; }
body.busy button, body.busy .btn { pointer-events: none; opacity: .72; }

/* ───────── 外枠 ───────── */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); height: 100%; }
.side { display: flex; flex-direction: column; gap: 12px; padding: 16px 8px 12px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; }
.side-brand { display: flex; flex-direction: column; gap: 1px; padding: 0 8px; }
.side-brand strong { font-size: var(--fs-13); line-height: 1.4; }
.side-brand small { color: var(--label2); }
.side-brand .logo { margin-bottom: 8px; }
.side-items { display: flex; flex-direction: column; gap: 0; }
.nav-item { position: relative; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; color: var(--label); text-decoration: none; font-size: var(--fs-13); transition: background-color .12s; }
@media (hover: hover) { .nav-item:hover { background: var(--fill); } }
.nav-item.on { background: var(--bg); color: var(--brand-text); font-weight: 600; }
.nav-item .i { width: 19px; height: 19px; }
.badge { margin-left: auto; min-width: 20px; padding: 0 4px; border-radius: var(--r-point); background: var(--brand); color: #fff; font-size: var(--fs-13); font-weight: 600; line-height: 20px; text-align: center; }
.nav-item.on .badge { background: var(--brand); color: #fff; }
.side-foot { margin-top: auto; padding: 8px 8px 0; font-size: var(--fs-13); }
.side-foot a { color: var(--label2); }
.side-views { margin-bottom: 8px; color: var(--label2); font-size: var(--fs-13); line-height: 1.7; }
.side-views b { color: var(--label); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.pane { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); scroll-behavior: auto; }
.pane-in { max-width: 920px; margin: 0 auto; padding: 28px 32px 72px; display: flex; flex-direction: column; gap: 20px; }
.tabbar { display: none; }
.ledger-banner { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 20px; background: var(--warn-bg); color: var(--warn-text); font-size: var(--fs-13); border-bottom: 1px solid var(--warn-line); }
.ledger-banner span { flex: 1; }

/* 2段メニュー：上に項目を横並び（折り返して全項目を見せる）、下に選んだ1つだけ */
.split { display: block; }
.subnav { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--line); }
.sub-item { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; min-height: 44px; margin-bottom: 0; padding: 4px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--label2); font-size: var(--fs-15); font-weight: 600; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .sub-item:hover { color: var(--brand-text); background: var(--fill-hover); } }
.sub-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sub-item.on { border-bottom-color: var(--brand); color: var(--brand-text); font-weight: 600; }
@media print { .subnav { display: none; } }
.split-body { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* 画面が変わったことを伝える：短いフェードだけ。定期更新では動かさない */
.view, .solo { animation: enter .2s var(--ease); }
.no-anim .view, .no-anim .solo { animation: none; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }

/* 700〜1099px もサイドは PC と同じ 216px・同じ形（11/17 本人決定・docs/meibo-screens.md §4）。形は末尾の「骨組み」。 */
@media (min-width: 700px) and (max-width: 1099px) {
  .pane-in { padding: 24px 24px 72px; }
}
@media (max-width: 699px) {
  .shell { display: flex; flex-direction: column; }
  .side { display: none; }
  .pane { flex: 1; min-height: 0; }
  .pane-in { padding: 16px 16px 32px; gap: 16px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px 4px calc(4px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--sep-strong); }
  .tabbar .nav-item { white-space: nowrap; min-width: 0; flex-direction: column; gap: 1px; min-height: 48px; padding: 4px 0 4px; color: var(--label2); font-size: var(--fs-13); line-height: 1.2; text-align: center; background: none; border-left: 0; }
  .tabbar .nav-item[href="#/find"] span { font-size: var(--fs-13); }
  .tabbar .nav-item.on { background: none; font-weight: 600; }
  .tabbar .nav-item.on { color: var(--brand-text); }
  .tabbar .nav-item .i { width: 23px; height: 23px; }
  .tabbar .badge { position: absolute; top: 1px; left: 54%; min-width: 16px; padding: 0 4px; font-size: var(--fs-13); line-height: 16px; }
  .tabbar .nav-item.on .badge { background: var(--brand); color: #fff; }
}

/* 1枚だけの画面（現場・生徒） */
.solo { max-width: 620px; margin: 0 auto; padding: 16px 16px calc(40px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.solo-head p { color: var(--label2); font-size: var(--fs-13); }
.solo-head h1 { font-size: var(--fs-26); line-height: 1.3; font-weight: 600; }
.solo-head .btn { margin-top: 8px; }
.solo-head .solo-sub { margin-top: 0; font-size: var(--fs-15); color: var(--label); }
.duty-count { text-align: center; }
.center-page { display: grid; place-items: center; min-height: calc(100vh - var(--bar-h)); min-height: calc(100dvh - var(--bar-h)); padding: 24px 16px; }
.center-card { width: 100%; max-width: 460px; padding: 28px 28px 32px; background: var(--group); border: 1px solid var(--sep); display: flex; flex-direction: column; gap: 16px; }
.center-card h1 { font-size: var(--fs-26); line-height: 1.35; font-weight: 600; }
.center-link { font-size: var(--fs-13); text-align: center; }
.code-input { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; text-align: center; font-size: var(--fs-17); }
.point-list { display: flex; flex-direction: column; gap: 8px; }
.point-list li { position: relative; padding-left: 20px; }
.point-list li::before { content: ""; position: absolute; left: 3px; top: .8em; width: 8px; height: 2px; background: var(--brand); }

/* ───────── 見出しとまとまり ───────── */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.page-title { flex: 1 1 240px; min-width: 0; }
.page-title h1 { font-size: var(--fs-26); line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.page-title p { margin-top: 4px; color: var(--label2); font-size: var(--fs-13); text-wrap: pretty; word-break: auto-phrase; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 32px; margin: -8px 0 -12px -4px; color: var(--brand-text); text-decoration: none; font-size: var(--fs-13); }
@media (hover: hover) { .back:hover { text-decoration: underline; } }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: -8px; font-size: var(--fs-13); }
.card { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 4px; background: none; border-top: 1px solid var(--line); }
.card .card { padding-top: 12px; border-top: 1px solid var(--sep); }
.card-title { font-size: var(--fs-15); font-weight: 600; }
.two-cards { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.card.form-grid { gap: 12px; }
.row-actions { display: flex; flex-wrap: wrap; min-width: 0; align-items: center; gap: 8px; }
.row-actions.wrap { flex-wrap: wrap; }
.danger-zone { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
/* 一覧の下線と続けて2本にしない。危険な行は自分の下線だけで区切る。 */
:is(.rows, .group:has(> .rows:last-child)) + .danger-zone { border-top: 0; }
@media (max-width: 699px) {
  .two-cards, .two { grid-template-columns: minmax(0, 1fr); }
  .page-title h1 { font-size: var(--fs-26); }
}

/* 次にやること。主操作はブランドの青 */
.next-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 20px; background: var(--tint); }
.next-card h2 { font-size: var(--fs-20); line-height: 1.4; font-weight: 600; text-wrap: balance; word-break: auto-phrase; }
.next-card > p { color: var(--label2); }
.next-card .kv, .next-card form { align-self: stretch; }
.reply-btns { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.reply-btns .btn { width: 100%; }

.dot { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--canvas); border: 2px solid var(--sep-strong); color: #fff; font-size: var(--fs-13); font-weight: 600; }
.dot .i { width: 14px; height: 14px; stroke-width: 2.6; }

/* ───────── 操作部品 ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: var(--ctl); padding: 4px 12px; border: 0; border-radius: var(--r-ctl); background: var(--fill); color: var(--label); font-size: var(--fs-13); font-weight: 600; line-height: 1.35; text-decoration: none; white-space: nowrap; transition: background-color .12s; cursor: pointer; }
@media (hover: hover) { .btn:hover { background: var(--fill-hover); } }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-plain { background: none; color: var(--brand-text); }
@media (hover: hover) { .btn-plain:hover { background: var(--tint); } }
.btn-main { background: var(--brand); color: var(--on-brand); }
@media (hover: hover) { .btn-main:hover { background: var(--brand-hover); } }
.btn-cta { background: var(--brand); color: #fff; border-radius: var(--r-point); padding-left: 20px; padding-right: 20px; }
@media (hover: hover) { .btn-cta:hover { background: var(--brand-hover); } }
.btn-danger { background: var(--bad); color: #fff; }
@media (hover: hover) { .btn-danger:hover { background: #8f1e18; } }
.btn-danger-outline { background: var(--bad-bg); color: var(--bad); }
@media (hover: hover) { .btn-danger-outline:hover { background: #fbd7d3; } }
.btn-danger-text { background: none; color: var(--bad); font-weight: 600; }
@media (hover: hover) { .btn-danger-text:hover { background: var(--bad-bg); } }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: var(--fs-13); }
.btn-lg { min-height: 48px; padding: 8px 20px; font-size: var(--fs-15); }
.btn-block { width: 100%; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 699px), (pointer: coarse) { .btn-sm { min-height: 40px; padding: 4px 12px; font-size: var(--fs-13); } }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { color: var(--label2); font-size: var(--fs-13); font-weight: 600; }
.field-hint { color: var(--label2); font-size: var(--fs-13); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; min-height: var(--ctl); padding: 8px 12px; background: var(--bg); border: 1px solid var(--sep-strong); border-radius: var(--r-ctl); font-size: var(--fs-15); line-height: 1.45; transition: border-color .12s, box-shadow .12s; -webkit-appearance: none; appearance: none;
}
select { padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234d5c70' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
textarea { display: block; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px var(--tint); border-radius: var(--r-ctl); }
@media (max-width: 699px), (pointer: coarse) { input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: var(--fs-15); } }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }
.inline-check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: var(--fs-13); cursor: pointer; }
.warn-check { padding: 8px 12px; background: var(--warn-bg); color: var(--warn-text); align-self: stretch; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0 8px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 0; padding: 0; background: var(--fill); border-radius: var(--r-ctl); align-self: flex-start; max-width: 100%; }
.seg-item { position: relative; cursor: pointer; }
.seg-item input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.seg-item span { display: flex; align-items: center; justify-content: center; min-height: calc(var(--ctl) - 4px); padding: 4px 12px; border-radius: 2px; font-size: var(--fs-13); font-weight: 600; transition: background-color .12s; }
.seg-item input:checked + span { background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .16); font-weight: 600; }
.seg-item input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg-btn { min-height: calc(var(--ctl) - 4px); padding: 4px 12px; border: 0; border-radius: 2px; background: none; font-size: var(--fs-13); font-weight: 600; }
.seg-n { margin-left: 4px; color: var(--label2); font-weight: 600; font-variant-numeric: tabular-nums; }
.group-title .seg-n { font-size: var(--fs-13); }
.list-count { margin: 0 0 4px; color: var(--label2); font-size: var(--fs-13); }
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.list-head > .list-count { margin: 0; }
/* 全選択のチェック欄を、下の行のチェック欄と同じ縦の線にそろえる。 */
.list-head > .inline-check { padding-left: 12px; }
tr.row-link { cursor: pointer; }
li { text-wrap: pretty; }
@media (hover: hover) { tr.row-link:hover td { background: var(--canvas); } }
.seg-btn.on { background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .16); font-weight: 600; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; cursor: pointer; }
.toggle input { position: absolute; width: 44px; height: 26px; opacity: 0; cursor: pointer; margin: 0; right: 0; }
.toggle { position: relative; }
.toggle i { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--sep-strong); transition: background-color .18s; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s var(--ease); }
.toggle input:checked + i { background: var(--brand); }
.toggle input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 2px; }
.date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border: 1px solid var(--sep-strong); border-radius: 2px; background: var(--bg); color: var(--label); font-size: var(--fs-13); font-weight: 600; line-height: 1.4; white-space: nowrap; }
.chip.wait { border-color: var(--brand); color: var(--brand-text); }
.chip.good { border-color: var(--good); color: var(--good); }
.chip.warn { border-color: var(--warn-line); color: var(--warn-text); background: var(--warn-bg); }
.chip.mute { color: var(--label2); }
.chips-list { display: flex; flex-wrap: wrap; gap: 4px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; text-align: center; }
.empty h3 { font-size: var(--fs-17); font-weight: 600; }
.empty p { color: var(--label2); font-size: var(--fs-13); }
.notice { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--tint); font-size: var(--fs-13); }
.notice > span { flex: 1; }
.notice > span { word-break: auto-phrase; text-wrap: pretty; }
.notice > span > small { display: block; margin-top: 4px; }
@media (max-width: 699px) { .notice:has(> .btn) { flex-direction: column; align-items: flex-start; } }
.notice .i { color: var(--brand-text); }

/* ───────── 一覧 ───────── */
.rows { background: none; border-top: 1px solid var(--sep-strong); border-bottom: 1px solid var(--line); }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 8px; min-height: 52px; width: 100%; padding: 8px 0; background: none; border: 0; color: inherit; text-align: left; text-decoration: none; transition: background-color .1s; }
@media (hover: hover) { a.row:hover, .row-btn:hover { background: var(--fill); } }
a.row:active, .row-btn:active { background: var(--fill-hover); }
.row:focus-visible { outline-offset: -3px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-main b { font-weight: 600; overflow-wrap: anywhere; }
.row-main small { color: var(--label2); overflow-wrap: anywhere; word-break: auto-phrase; text-wrap: pretty; }
.row-chev { color: var(--sep-strong); width: 16px; height: 16px; }
.row-select { display: flex; align-items: stretch; }
.row-select.on { background: var(--tint); }
.row-select .check { display: flex; align-items: center; padding: 0 0 0 4px; cursor: pointer; }
.row-select .check input { width: 20px; height: 20px; }
.row-select .row-btn { flex: 1; min-width: 0; }
.banner-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 8px 12px; background: var(--tint); border: 0; color: var(--brand-text); font-weight: 600; text-align: left; }
.banner-btn span { flex: 1; }
@media (hover: hover) { .banner-btn:hover { background: #DFE4F7; } }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; }
.filters select { width: auto; flex: 0 1 180px; }
.search { position: relative; flex: 1 1 240px; display: block; }
.search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--label2); pointer-events: none; }
.search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { padding-left: 32px; background: var(--fill); border-color: transparent; }
.select-bar { position: sticky; bottom: 12px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px 8px 16px; background: var(--bg); border: 0; border-top: 2px solid var(--ink); font-weight: 600; }
.select-bar > span { flex: 1 1 auto; }
.select-bar-note { flex: 1 0 100%; font-size: var(--fs-13); font-weight: 400; color: var(--label2); }
.no-anim .select-bar { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-size: var(--fs-13); }
.kv dt { color: var(--label2); font-weight: 600; }
.kv dd { overflow-wrap: anywhere; white-space: pre-line; }
.program { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.program h4 { font-size: var(--fs-15); font-weight: 600; }
.plan-list { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-13); }
.plan-list li { display: flex; gap: 8px; }
.plan-list b { flex: none; color: var(--label2); font-weight: 600; }
.option-box { margin-top: 8px; padding: 8px 12px; background: var(--canvas); }
.tag { display: inline-block; margin-bottom: 4px; color: var(--label2); font-size: var(--fs-13); font-weight: 600; }
.opt-sec { margin-bottom: 8px; }
.opt-sec h5 { font-size: var(--fs-13); font-weight: 600; color: var(--label2); margin-bottom: 0; }
.opt-sec p { font-size: var(--fs-13); white-space: pre-wrap; }
.opt-sec blockquote + blockquote { margin-top: 8px; }
.opt-sec cite { display: block; font-style: normal; font-size: var(--fs-13); color: var(--label2); margin-top: 0; }
.opt-group { display: flex; flex-direction: column; gap: 12px; border: 0; padding: 0; margin: 0; }
.opt-group legend { font-size: var(--fs-15); font-weight: 600; padding: 0; margin-bottom: 8px; }
.caption-row { display: flex; align-items: flex-end; gap: 12px; }
.caption-row img { width: 72px; height: 54px; flex: none; object-fit: cover; }
.caption-row > :last-child { flex: 1; min-width: 0; }
.link-list { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-13); }
.logo { width: 36px; height: 36px; flex: none; border-radius: 2px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
img.logo { background: var(--tint); }
.logo.lg { width: 96px; height: 96px; }
.logo-none { display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: var(--fs-15); font-weight: 600; line-height: 1; border: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photos figcaption { margin-top: 4px; font-size: var(--fs-13); color: var(--label2); }
.image-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.image-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.image-item img { width: 128px; height: 96px; object-fit: cover; border: 1px solid var(--line); display: block; }
.image-item img.logo { object-fit: contain; }
.receipt { flex: none; min-width: 42px; padding: 0 4px; background: var(--tint); border-radius: 2px; color: var(--brand-text); font-size: var(--fs-13); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.rows.is-closed .receipt { background: var(--fill); color: var(--label2); }
.rows.is-closed .row-main b { color: var(--label2); }
.pre-line { white-space: pre-line; }
.pass-panel { display: grid; gap: 12px; }
.pass-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pass-count b { font-size: var(--fs-20); }
.pass-count small { color: var(--muted, inherit); }
.pass-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pass-cell .btn { margin-left: 4px; }
.pass-slips { display: none; }
.wish-rank { flex: none; font-size: var(--fs-13); font-weight: 600; color: var(--brand-text); white-space: nowrap; }

/* ───────── 表 ───────── */
.table-wrap { overflow-x: auto; background: none; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.card .table-wrap { border-top-width: 1px; border-top-color: var(--sep-strong); }
.board, .eval-table, .place { width: 100%; font-size: var(--fs-13); }
.board th, .eval-table th, .place th { position: sticky; top: 0; padding: 8px 12px; background: var(--group); color: var(--label2); font-size: var(--fs-13); font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.board td, .eval-table td, .place td, .eval-table tbody th { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; background: none; position: static; }
.board tr:first-child td { border-top: 0; }
@media (hover: hover) { .board tbody tr:hover, .place tbody tr:hover { background: var(--canvas); } }
.board-co a { font-weight: 600; color: var(--label); text-decoration: none; }
@media (hover: hover) { .board-co a:hover { text-decoration: underline; } }
.board-st { white-space: nowrap; }
.board-co > * { display: block; }
.board-co small, .board-co > :not(:first-child) { font-size: var(--fs-13); font-weight: 400; color: var(--label2); }
.board td:nth-child(2), .board td:nth-child(3) { white-space: nowrap; }
.board-st .chip { margin: 1px 4px 1px 0; }
.eval-table tbody th { font-size: var(--fs-13); color: var(--label); font-variant-numeric: tabular-nums; border-bottom: 0; }
.eval-table tbody th small { display: block; color: var(--label2); font-weight: 400; }
.score { text-align: center; font-weight: 600; }
.cmt { min-width: 160px; font-size: var(--fs-13); color: var(--label2); white-space: pre-line; }
.place .name { font-weight: 600; white-space: nowrap; }
.place .no-cell { font-variant-numeric: tabular-nums; color: var(--label2); }
.place .chip { margin-right: 4px; }
.place select { min-width: 140px; }
.place tr.changed td { background: var(--tint); }
.cap-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cap { display: flex; flex-direction: column; min-width: 130px; padding: 4px 12px; background: none; border-bottom: 1px solid var(--sep); font-size: var(--fs-13); }
.cap b { font-weight: 600; }
.cap small { color: var(--label2); }
.cap.over { background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
.sticky-action { justify-content: space-between; }

/* ───────── 当日 ───────── */
.day-tabs { display: flex; gap: 0; overflow-x: auto; padding: 4px 4px 0; border-bottom: 1px solid var(--sep); scrollbar-width: none; }
.day-tab { flex: none; min-height: var(--ctl); padding: 4px 12px; background: none; border: 0; border-bottom: 3px solid transparent; font-size: var(--fs-13); font-weight: 600; white-space: nowrap; }
@media (hover: hover) { .day-tab:hover { background: var(--fill-hover); } }
.day-tab:focus-visible { outline-offset: -3px; }
.day-tab.on { border-bottom-color: var(--brand); color: var(--brand-text); font-weight: 600; }
.tally { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tally div { padding: 8px 4px; text-align: center; }
.tally div + div { border-left: 1px solid var(--line); }
.tally dt { color: var(--label2); font-size: var(--fs-13); }
.tally dd { font-size: var(--fs-26); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.alert-group .rows { border-color: var(--warn-line); }
.alert-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: var(--warn-bg); color: var(--warn-text); }
.alert-card h2 { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-15); font-weight: 600; line-height: 1.45; }
.alert-card .i { margin-top: 4px; }
.alert-card time { font-size: var(--fs-13); }
.alert-card input:not([type="checkbox"]) { background: #fff; }
.att-list { display: flex; flex-direction: column; }
.att-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; }
.att-row + .att-row { border-top: 1px solid var(--line); }
.att-who { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 96px; }
.no { font-size: var(--fs-17); font-weight: 700; font-variant-numeric: tabular-nums; }
.att-name { font-weight: 600; }
.att-who small { color: var(--label2); }
.att-btns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; flex: 0 1 340px; }
.att-btn { min-height: var(--ctl); padding: 0 4px; background: var(--fill); border: 0; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 600; transition: background-color .1s; }
@media (hover: hover) { .att-btn:hover { background: var(--fill-hover); } }
.att-btn.on { font-weight: 600; }
.att-btn.on.s-present { background: var(--good); color: #fff; }
.att-btn.on.s-late, .att-btn.on.s-early { background: var(--warn-line); color: #fff; }
.att-btn.on.s-absent { background: var(--bad); color: #fff; }
.solo .att-row { padding: 12px 0; }
.solo .att-row + .att-row { border-top: 1px solid var(--line); }
.solo .att-btns { flex: 1 1 100%; }
.solo .att-btn { min-height: 52px; font-size: var(--fs-15); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 4px; background: var(--fill); border: 2px solid transparent; border-radius: var(--r-ctl); font-weight: 600; }
.choice input:checked + span { background: var(--tint); border-color: var(--brand); color: var(--brand-text); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.eval-grid { display: flex; flex-direction: column; gap: 8px; }
.eval-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eval-row .seg { align-self: center; flex: none; }
.eval-row .seg-item span { padding: 4px 16px; }

/* ───────── 連絡 ───────── */
.thread { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
/* 連絡はチャットの作法で（11/16 本人）：相手は左にアイコンと名前、自分は右に会社色の吹き出し、時刻は吹き出しの横、日付で区切る */
.msg-day { align-self: center; margin: 16px 0 4px; font-size: var(--fs-13); color: var(--label2); font-variant-numeric: tabular-nums; }
.msg-day:first-child { margin-top: 0; }
.msg-day span, .msg-sys > span { display: inline-block; padding: 0 12px; background: var(--fill); border-radius: 999px; }
.msg-sys { align-self: center; max-width: 92%; margin: 8px 0 0; font-size: var(--fs-13); color: var(--label2); text-align: center; }
.msg-sys time { margin-left: 8px; font-variant-numeric: tabular-nums; }
.msg { align-self: flex-start; display: flex; align-items: flex-start; gap: 8px; max-width: min(88%, 680px); margin-top: 12px; }
.msg.cont { margin-top: 4px; }
.msg.mine { align-self: flex-end; }
.msg-av { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--tint); color: var(--brand); font-size: var(--fs-13); font-weight: 600; line-height: 1; }
.msg.cont .msg-av { height: 0; background: none; }
.msg-col { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.msg.mine .msg-col { align-items: flex-end; }
.msg-name { font-size: var(--fs-13); font-weight: 600; color: var(--label2); }
.msg-line { display: flex; align-items: flex-end; gap: 4px; max-width: 100%; }
.msg.mine .msg-line { flex-direction: row-reverse; }
.msg-line time { flex: none; font-size: var(--fs-13); color: var(--label2); font-variant-numeric: tabular-nums; }
.msg-bubble { min-width: 0; padding: 8px 12px; background: var(--bubble); border-radius: 18px; }
.msg.mine .msg-bubble { background: var(--brand); color: var(--on-brand); border-radius: 18px; }
.msg-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-flag { margin: 0; color: var(--warn-text); font-size: var(--fs-13); font-weight: 600; }
.msg .row-actions { margin-top: 0; }
/* 11/22：一覧・依頼の詳細で共通の入力欄。インライン style は使わない。 */
.composer { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: var(--sp-12) var(--sp-16); background: var(--bg); border-top: 1px solid var(--line); }
.composer-editor { border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--bg); overflow: visible; }
.composer-editor:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
html body .composer textarea { display: block; width: 100%; min-width: 0; min-height: 64px; max-height: min(192px, 28dvh); padding: var(--sp-12); border: 0; border-radius: var(--r-ctl); background: var(--bg); color: var(--label); resize: none; field-sizing: content; font-size: var(--fs-17); line-height: 1.5; }
html body .composer textarea:focus-visible { outline: none; }
.composer-tools { display: flex; align-items: center; gap: var(--sp-8); padding: 0 var(--sp-8) var(--sp-8); }
.composer-keys { flex: 1; color: var(--label2); font-size: var(--fs-13); }
html body .composer-send { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: var(--sp-4); width: auto; min-width: 80px; min-height: var(--hit); padding-inline: var(--sp-12); }
.composer-send .i { width: 20px; height: 20px; }
.composer-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--sp-8); font-size: var(--fs-13); color: var(--label2); }
.composer-foot:has(:not(:empty)) { padding-top: var(--sp-8); }
.composer-status.is-error { color: var(--bad); }
.chat-conversation { display: flex; flex-direction: column; min-height: 0; height: min(640px, 76dvh); }
.chat-conversation-room { flex: 1; height: auto; }
.chat-conversation > .lc-body { overflow-anchor: none; }
.chat-conversation > .composer { flex: none; }
.case-chat-channels { display: flex; gap: var(--sp-8); border-bottom: 1px solid var(--line); }
.case-chat-channels [aria-pressed="true"] { color: var(--brand-text); background: var(--tint); }
.chat-unavailable { display: flex; align-items: flex-start; gap: var(--sp-8); padding: var(--sp-16); border-top: 1px solid var(--line); color: var(--label2); background: var(--fill); font-size: var(--fs-15); }
.chat-unavailable p { margin: 0; }
.chat-unavailable .i { flex: none; }
.chat-latest { align-self: center; flex: none; gap: var(--sp-8); color: var(--brand-text); }
.chat-latest[hidden], .chat-starter[hidden] { display: none; }
.chat-starter { display: flex; align-items: center; justify-content: center; gap: var(--sp-8); padding: var(--sp-4) var(--sp-12); color: var(--label2); font-size: var(--fs-13); }
@media (max-width: 699px) {
  .composer-keys span { display: none; }
  .chat-conversation { height: min(640px, 80dvh); }
  .chat-conversation-room { height: auto; }
}

.qr-block { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.qr-code { flex: none; padding: 8px; background: #fff; border: 1px solid var(--line); }
.qr-code svg { display: block; width: 132px; height: 132px; }
.qr-text { flex: 1 1 160px; font-size: var(--fs-13); }
.code { font: 700 var(--fs-17)/1.5 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; }

/* 写真・動画オプション */
.option-plan { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px 24px; background: var(--group); border: 1px solid var(--sep); border-top: 4px solid var(--brand); }
.option-plan h2 { font-size: var(--fs-20); font-weight: 600; }
.price { font-size: var(--fs-26); font-weight: 600; line-height: 1.2; }
.price small { margin-left: 0; color: var(--label2); font-size: var(--fs-15); font-weight: 600; }

/* ───────── シート ───────── */
dialog { width: min(520px, calc(100vw - 32px)); max-height: min(88vh, 820px); padding: 0; border: 0; border-radius: 0; background: var(--bg); color: var(--label); box-shadow: var(--shadow-sheet); overflow: hidden; animation: sheet-in .16s var(--ease); }
dialog.wide { width: min(720px, calc(100vw - 32px)); }
dialog.still, dialog.still::backdrop { animation: none; }
dialog::backdrop { background: #E2E8F0; animation: dim .2s var(--ease); }
@keyframes sheet-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dim { from { opacity: 0; } to { opacity: 1; } }
.dlg { display: flex; flex-direction: column; max-height: min(88vh, 820px); }
.dlg-head { padding: 20px 20px 8px; }
.dlg-head h2 { font-size: var(--fs-20); font-weight: 600; line-height: 1.4; }
.dlg-head p { margin-top: 0; color: var(--label2); font-size: var(--fs-13); }
/* 題の添え書き（出欠のシートの「生徒番号2」など・11/18 apple r1 重2） */
.dlg-head .dlg-note { display: block; margin-top: 4px; color: var(--label2); font-size: var(--fs-13); font-weight: 400; }
.dlg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.import-list { list-style: none; padding: 0; margin: 0; min-width: 0; }
.import-row { padding: var(--sp-16) 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.import-row-check { background: var(--fill); padding: var(--sp-16); }
.import-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-4) var(--sp-12); }
.import-row-head strong { flex: 1; min-width: 0; font-size: var(--fs-15); }
.import-row-status { font-size: var(--fs-13); font-weight: var(--fw-semi); }
.import-row-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--sp-4) var(--sp-12); margin-top: var(--sp-8); font-size: var(--fs-13); }
.import-row-details dt { color: var(--label2); }
.import-row-details dd { margin: 0; white-space: pre-wrap; }
@media (max-width: 699px) {
  .import-row-status { flex-basis: 100%; }
}
.dlg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
@media (max-width: 699px) {
  dialog, dialog.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40%); opacity: .6; } to { transform: none; opacity: 1; } }
}

#toast { position: fixed; left: 50%; bottom: 28px; z-index: 2000; max-width: min(460px, calc(100vw - 32px)); padding: 8px 16px; background: #1E293B; color: #fff; border-radius: var(--r-ctl); font-size: var(--fs-13); font-weight: 600; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .22s var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 別の役の操作が届いた行（同じ画面の描き直しで文字が変わった行・増えた行） */
.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { from { background-color: var(--tint); } }
#toast.err { background: var(--bad); }
@media (max-width: 699px) { #toast { bottom: calc(72px + var(--safe-b)); } }
/* ───────── 書類 ───────── */
.letters { display: flex; flex-direction: column; gap: 20px; }
.letter { display: block; max-width: 720px; width: 100%; margin: 0 auto; padding: 48px 56px; background: #fff; border: 1px solid var(--line); font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif; font-size: var(--fs-15); line-height: 1.8; word-break: auto-phrase; color: #111; }
.letter mark { background: #fff0a8; color: inherit; border-radius: 2px; padding: 0 0; }
.letter .l-right { text-align: right; }
.letter .l-center { text-align: center; margin: 12px 0; }
.letter .l-to { margin-top: 16px; white-space: pre-line; }
.letter .l-from { margin: 8px 0 0 auto; width: fit-content; min-width: 45%; }
.letter .l-title { margin: 24px 0 16px; font-size: var(--fs-20); font-weight: 600; line-height: 1.5; text-align: center; text-wrap: balance; }
.letter .l-p { margin: 8px 0; text-indent: 1em; }
.letter .l-dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 12px; margin: 8px 0 16px; }
.letter .l-dl dt { font-weight: 600; }
.letter .l-dl dd { min-width: 0; }
.letter .l-ol { margin: 8px 0 8px 1.4em; list-style: decimal; }
.letter .l-sign { margin-top: 16px; text-align: right; }
.letter .l-sign p { margin-top: 12px; }
.letter .l-rule { margin: 20px 0 8px; border: 0; border-top: 1px dashed #777; }
/* 画面でも Word・印刷と同じく、別紙は次の紙に見せる（11/15 本人「画面は1枚・Wordは2枚」） */
.letter .l-break { height: 24px; margin: 48px -56px; background: var(--canvas); border-block: 1px solid var(--line); }
.letter .l-table { width: 100%; margin: 8px 0 16px; border-collapse: collapse; table-layout: fixed; }
.letter .l-table th, .letter .l-table td { padding: 8px 4px; border: 1px solid #444; vertical-align: top; }
.letter .l-table th { font-weight: 600; text-align: center; }
.letter .l-table.tall td { height: 118px; }
.letter .l-qr { display: flex; align-items: center; gap: 16px; margin: 12px 0; padding: 12px; border: 1px solid #444; break-inside: avoid; }
.letter .l-qr-code { flex: none; }
.letter .l-qr-code svg { display: block; width: 104px; height: 104px; }
.letter .l-qr-text { min-width: 0; }
.letter .l-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; letter-spacing: .05em; }
.letter .l-url { overflow-wrap: anywhere; font-size: var(--fs-13); }
.letter .w8 { width: 8%; } .letter .w12 { width: 12%; } .letter .w14 { width: 14%; } .letter .w16 { width: 16%; } .letter .w20 { width: 20%; } .letter .w28 { width: 28%; } .letter .w30 { width: 30%; } .letter .w32 { width: 32%; } .letter .w46 { width: 46%; } .letter .w50 { width: 50%; } .letter .w52 { width: 52%; } .letter .w76 { width: 76%; } .letter .w100 { width: 100%; }
@media (max-width: 699px) {
  .letter { padding: 24px 16px; font-size: var(--fs-13); }
  .letter .l-break { margin: 24px -20px; }
  .letter .l-dl { grid-template-columns: 5.5em 1fr; }
  .letter .l-table th, .letter .l-table td { padding: 4px 4px; font-size: var(--fs-13); }
}

/* 紙の余白は @page ではなく中身の内側に持つ。@page の余白が 0 だと、ブラウザが日時・タイトル・URL・ページ番号を刷らない
 * （11/15 本人「印刷にURLやページ番号、日時が載る」）。ページをまたぐ所も box-decoration-break: clone で各ページに余白を付ける。 */
@page { size: A4; margin: 0; }
@page board { size: A4 landscape; margin: 0; }
@page intro { size: A4; margin: 0; }
.intro-print, .doc-print-once { display: none; }
@media print {
  body:has(.doc-print-once) > :not(.doc-print-once), body:has(.doc-print-once) #app { display: none !important; }
  body:has(.doc-print-once) .doc-print-once { display: block; }
  .intro-print { page: intro; padding: 12mm; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  body:has(.intro-print) > :not(.intro-print), body:has(.intro-print) #app { display: none !important; }
  body:has(.intro-print) .intro-print { display: block; }
  .intro-sheet { font-size: 8.5pt; line-height: 1.5; color: #000; display: flex; flex-direction: column; gap: 3mm; }
  .is-head { display: flex; align-items: center; gap: 4mm; }
  .is-head h2 { font-size: 18pt; font-weight: 600; line-height: 1.25; }
  .is-head p { font-size: 9.5pt; }
  .is-logo { width: 15mm; height: 15mm; object-fit: contain; }
  .is-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
  .is-photos figure { margin: 0; }
  .is-photos img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
  .is-photos figcaption { font-size: 8pt; line-height: 1.35; margin-top: 1mm; }
  .is-body { columns: 2; column-gap: 6mm; }
  .is-sec { break-inside: avoid; margin-bottom: 2.5mm; }
  .is-sec h3 { font-size: 9.5pt; font-weight: 600; border-bottom: .3mm solid #000; margin-bottom: 1mm; }
  .is-sec p { white-space: pre-wrap; }
  .is-sec p + p { margin-top: 1.5mm; }
  .is-sec small { display: block; font-size: 8pt; }
  .is-foot { break-inside: avoid; display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; font-size: 8pt; }
  .is-foot p { text-align: right; }
  .is-codes { display: flex; gap: 4mm; }
  .is-codes figure { margin: 0; width: 20mm; text-align: center; }
  .is-codes svg { width: 20mm; height: 20mm; display: block; padding: 1.5mm; }
  .is-codes figcaption { font-size: 7pt; line-height: 1.25; margin-top: .5mm; overflow-wrap: anywhere; }
  html, body, #app, .shell, .pane, .pane-in { height: auto !important; overflow: visible !important; display: block !important; background: #fff !important; padding: 0 !important; max-width: none !important; }
  .pass-slips { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0; }
  .pass-slip { display: flex; justify-content: space-between; gap: 5mm; height: 68mm; padding: 6mm; border: .3mm dashed #777; break-inside: avoid; color: #000; font-size: 10pt; line-height: 1.5; }
  .pass-slip .l-code { white-space: nowrap; font-size: 9pt; }
  .pass-slip-name { font-size: 14pt; font-weight: 600; margin-bottom: 2mm; }
  .pass-slip-qr { flex: none; width: 38mm; }
  .pass-slip-qr svg { display: block; width: 100%; height: auto; }
  .no-print, #toast, dialog, .side, .tabbar, .skip, .back, .ledger-banner, .mchat { display: none !important; }
  .view { animation: none !important; }
  .view:has(.print-area) > :not(.print-area):not(:has(.print-area)), .view :has(.print-area) > :not(.print-area):not(:has(.print-area)) { display: none !important; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .table-wrap { overflow: visible; border: 0; box-shadow: none; }
  .print-area:has(.board) { page: board; padding: 12mm; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .board { font-size: 10pt; }
  .board th, .board td { padding: 4px 4px; border: 1px solid #555; position: static; }
  .board tr { break-inside: avoid; }
  .letters { gap: 0; }
  .letter { max-width: none; padding: 20mm 22mm; border: 0; font-size: 11pt; line-height: 1.7; break-after: page; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .letter:last-child { break-after: auto; }
  .letter mark { background: none; color: transparent; border-bottom: 1px solid #000; padding: 0; }
  .letter .l-break { break-after: page; height: 0; margin: 0; border: 0; }
  .letter tr { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .flash { animation: none !important; }
  #toast { transform: translate(-50%, 0); }
}

/* 年度ボード：会社名を折らない。スマホでは表をやめて1社1段に */
.board-co small, .board td:nth-child(5) { white-space: nowrap; }
.board td:nth-child(5) small { display: block; }
@media screen and (max-width: 1023px) {
  .board thead { display: none; }
  .board, .board tbody, .board tr, .board td { display: block; }
  .board tr { padding: 12px 12px; border-top: 1px solid var(--line); }
  .board tr:first-child { border-top: 0; }
  .board td, .board td:nth-child(2), .board td:nth-child(3) { padding: 0 0; border-top: 0; white-space: normal; }
  .board td:nth-child(2), .board td:nth-child(3) { display: inline; margin-right: 8px; font-size: var(--fs-13); color: var(--label2); }
  .board td:nth-child(5):not(:empty)::before { content: "巡回 "; color: var(--label2); }
  .board-st { margin-top: 4px; }
  .table-wrap:has(> .board) { overflow: visible; }
}
/* 体験の行の下（年度の受け入れ枠） */
.row-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px 12px; }
/* 宛名シール（A4・12面 83.8×42.3mm・角丸。岐南工業が使うエーワン 28176：上20・左20.3・列の間3.8・段の間0。11/16 本人の写真） */
@page tack { size: A4; margin: 0; }
.tacks { display: grid; grid-template-columns: repeat(2, 83.8mm); column-gap: 3.8mm; grid-auto-rows: 42.3mm; }
.tack { box-sizing: border-box; padding: 4mm 5mm; overflow: hidden; color: #000; font-size: 10pt; line-height: 1.4; border: .2mm dashed var(--sep); }
.tack-zip { font-size: 9.5pt; }
.tack-addr { font-size: 9.5pt; margin-bottom: 1.5mm; }
.tack-name { font-size: 12pt; font-weight: 600; }
.tack-to { font-size: 11pt; }
@media print {
  .print-area:has(.tacks) { page: tack; padding: 20mm 18.3mm 22mm 20.3mm; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .letters:has(.tacks) { display: block; }
  .tack { border: 0; break-inside: avoid; }
}

/* キミテラス本体（kimiteras.rebounder.jp）のヘッダーに合わせる：ロゴ1つ・右に文字リンク・すりガラスの帯。 */
:root { --bar-h: 56px; --gutter: 16px; }
@media (max-width: 768px) { :root { --bar-h: 56px; --gutter: 16px; } }
.bar {
  position: sticky; top: 0; z-index: 60; height: var(--bar-h);
  background: #fff; border-bottom: 1px solid #E2E8F0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.mark { display: flex; align-items: center; min-width: 0; }
.mark a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--label); }
.mark-home img { display: block; width: auto; height: 28px; }
.mark-name { position: relative; margin-left: 12px; padding-left: 12px; font-size: var(--fs-15); font-weight: 600; white-space: nowrap; }
.mark-name::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 18px; margin-top: -8px; background: #CBD5E1; }
.bar-nav { display: flex; align-items: center; }
.bar-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--label); font-size: var(--fs-15); font-weight: 600; white-space: nowrap; text-decoration: none; transition: background-color .2s, color .2s; }
@media (hover: hover) { .bar-link:hover { color: var(--brand-text); background: var(--tint); text-decoration: none; } }
.bar-link[hidden] { display: none; }
@media (max-width: 768px) {
  .mark-home img { height: 24px; }
  .mark-name { margin-left: 8px; padding-left: 12px; font-size: var(--fs-13); }
  .bar-link { padding: 0 8px; font-size: var(--fs-13); }
}
@media (max-width: 374px) {
  .mark-home img { height: 20px; }
  .mark-name { margin-left: 8px; padding-left: 8px; font-size: var(--fs-13); }
  .bar-link { padding: 0 4px; font-size: var(--fs-13); }
}

@keyframes meibo-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* top-layer の showModal() は sticky ヘッダーより手前。 */
dialog { z-index: 100; }
@media (prefers-reduced-motion: reduce) { .bar, .bar * { animation: none !important; transition: none !important; } }
@media print { .bar { display: none !important; } :root { --bar-h: 0px; } }

/* 初見で迷う当日・決定の案内。既存の色と罫線を使う。 */
.decision-title { font-size: var(--fs-20); font-weight: 600; padding-block: 1rem; }
.day-tabs { flex-wrap: wrap; overflow: visible; }
.day-tab { flex-shrink: 0; white-space: nowrap; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.eval-table { min-width: 36rem; }
.side .nav-item > svg { width: 1.5rem; height: 1.5rem; }
.meeting-line { padding-block: .5rem; }

.board tr.overdue td { background: var(--warn-bg); }

/* 初見で読める案内と、狭い画面の操作 */
.student-phone { white-space: normal; flex-direction: column; max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.student-phone strong { display: block; font-size: var(--fs-20); }
body.busy #app { pointer-events: none; }
input[aria-invalid="true"] { border-color: var(--bad); outline: 1px solid var(--bad); }
.time-error { display: block; color: var(--bad); background: none; padding: 0; }
.time-error[hidden] { display: none; }
.att-who { flex-wrap: wrap; }
.roster-action { position: static; }
.duty-phone { position: fixed; bottom: env(safe-area-inset-bottom, 0px); left: 0; right: 0; z-index: 20; background: var(--bg); border-radius: 0; }
html[data-role="duty"] .solo { padding-bottom: 6rem; }
/* 末尾の行・送信ボタンを、質問ボタンの裏までスクロールさせない。 */
html:has(.mchat) .pane-in { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
html:has(.select-bar):has(.shell) .mchat { bottom: calc(12rem + env(safe-area-inset-bottom)); }
html:has(.select-bar) .pane-in { padding-bottom: calc(15rem + env(safe-area-inset-bottom)); }
.composer-hint { margin: 0; }
.offer-lines { margin: 0; padding-left: 1.25em; }
.offer-lines li + li { margin-top: .5em; }
.row-sub > div { min-width: 0; overflow-wrap: anywhere; }
.inline-check:has([name^="excluded"]) { flex-wrap: wrap; }
.inline-check:has([name^="excluded"]) small { flex-basis: 100%; color: var(--label2); }
@media screen and (min-width: 700px) {
  .board { table-layout: fixed; font-size: var(--fs-13); }
  .board th, .board td { padding: .5rem .3rem; white-space: normal !important; overflow-wrap: anywhere; }
  .board-co { min-width: 9em; }
  .board-co > *, .board-co small { white-space: nowrap; }
  .board th:nth-child(4) { width: 14%; }
  .board th:nth-child(5) { width: 17%; }
  .board td small { white-space: normal; }
}
@media screen and (max-width: 699px) {
  .eval-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .eval-table, .eval-table tbody, .eval-table tr { display: block; }
  .eval-table tr { padding: .75rem 0; border-bottom: 1px solid var(--sep); }
  .eval-table td, .eval-table tbody th { display: block; width: auto; border: 0; padding: .3rem; white-space: normal; overflow-wrap: anywhere; }
  .eval-table .score { text-align: left; }
  .eval-table .score::before { content: attr(data-label) "："; color: var(--label2); }
  .table-wrap:has(> .eval-table) { overflow: visible; }
  .roster-action { flex-direction: column; align-items: stretch; }
}

.student-items { list-style: disc; padding-left: 1.5em; }

.solo .att-who { align-items: center; }
.exception-time[hidden] { display: none; }

/* 処理中の印はボタンの幅を変えずに重ねる。 */
.att-btn { position: relative; }

.att-btn[data-act$="-clear"] { padding-inline: calc(var(--ctl) / 2); }

/* デザイナーレビュー1：罫線・色帯と共通部品 */
:root { --sep: var(--line); --sep-strong: var(--line-strong); --label2: var(--ink-2); --bubble: var(--fill); --r-ctl: 4px; }
.pane-in { max-width: 1120px; }
.pane-in:has([data-form="letter"]), .pane-in:has([data-form="listing"]) { max-width: 720px; }
.bar-in { max-width: none; padding-inline: 16px; }
.mark-name, .bar-link { font-size: var(--fs-15); }
.group .card { border-top: 0; }
.row-main b { font-size: var(--fs-15); font-weight: 600; }
.btn, .att-btn { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-size: var(--fs-15); }
.btn-main, .btn-cta { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 6px; }
@media (hover: hover) { .btn-main:hover, .btn-cta:hover { background: var(--brand-hover); } }
.btn-danger, .btn-danger-outline, .btn-danger-text { color: var(--bad); background: #fff; border: 1px solid var(--bad); }
@media (hover: hover) { .btn-danger:hover, .btn-danger-outline:hover, .btn-danger-text:hover { background: var(--bad-bg); } }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea, .search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: 40px; border: 1px solid var(--line-strong); background-color: #fff; border-radius: 4px; font-size: var(--fs-15); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; }
.chip, .badge { height: 22px; min-height: 22px; padding: 0 8px; border: 0; border-radius: 3px; background: var(--fill); color: var(--ink-2); font-size: var(--fs-13); font-weight: 600; line-height: 22px; }
.chip.wait { background: #E8EDFF; color: var(--brand); }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn-text); }
.chip.action, .badge, .nav-item.on .badge { background: var(--action-bg); color: var(--action-text); }
.chip.mute { background: var(--fill); color: var(--ink-2); }
.nav-item { min-height: 40px; }
.side-foot a { display: inline-flex; align-items: center; min-height: 32px; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) 180px 180px auto; gap: 8px; }
.filters select { width: 100%; min-width: 0; }
.select-bar:has(button:disabled) { opacity: .6; }
.dlg-foot { justify-content: flex-end; }
.dlg-foot:has([data-act="listing-pick"]) .spacer { display: none; }
.dlg-foot [data-act="listing-pick"] { order: 2; }
.day-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
.board-tabs { align-self: stretch; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.capacity-table { width: 100%; }
.capacity-table td, .capacity-table th { padding: 8px 8px; border-bottom: 1px solid var(--line); }
.capacity-table th { text-align: left; }
.capacity-table .num { text-align: right; }
.att-row, .solo .att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; height: 56px; padding: 0; gap: 8px; }
.att-who, .solo .att-who { min-width: 0; flex-wrap: nowrap; align-items: center; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-btns, .solo .att-btns { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.solo .att-btn { min-height: 44px; font-size: var(--fs-15); }
.att-list + p { margin-top: 8px; }
.eval-table { table-layout: fixed; width: 100%; }
.eval-table th:first-child { width: 48px; }
.eval-table th:not(:first-child):not(:nth-last-child(-n+2)) { width: 64px; }
.eval-table th:last-child { width: 72px; }
.eval-table .score { color: var(--ink-2); }
[data-form="letter"] > .row-actions, [data-form="student-mode"] > .row-actions { justify-content: flex-end; }
.visit-notice { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
@media screen and (min-width: 700px) {
  .board td:nth-child(3) { white-space: nowrap !important; }
  .board { table-layout: auto; }
  .board th:nth-child(4), .board th:nth-child(5) { width: auto; }
}
@media screen and (max-width: 699px) {
  button, .btn, .btn-sm, .back { min-height: 44px; }
  .btn-main, .btn-cta { min-height: 48px; }
  .pane-in { padding-bottom: 80px; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .search { grid-column: 1 / -1; }
  .eval-table { min-width: 0; }
  .eval-table thead { display: none; }
  .eval-table tbody { display: block; }
  .eval-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
  .eval-table td, .eval-table tbody th { min-width: 0; width: auto; }
  .eval-table .cmt { grid-column: 1 / -1; }
  .board, .board tbody { min-width: 0; width: 100%; }
  .board tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; min-width: 0; padding: 12px 0; }
  .board td { min-width: 0; }
  .board-co { grid-column: 1; grid-row: 1; min-width: 0; }
  .board-co small { display: none; }
  .board-status { display: contents !important; }
  .board-status > .chip, .board-status > .chip-link { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .board-status > .status-rest { grid-column: 1 / -1; }
  .board td[data-label] { grid-column: 1 / -1; margin: 0; font-size: var(--fs-13); }
  .board td[data-label]::before { content: attr(data-label) " "; color: var(--ink-2); }
  .board-st small { display: none; }
  .board-days:empty { display: none; }
  .board-days { text-align: left; }
  html[data-role="duty"] .solo { gap: 8px; }
  html[data-role="duty"] .solo details { order: 10; }
  html[data-role="duty"] .att-list { margin-top: 0; }
  html[data-role="company"] .rows .row:has(.chip.action) { flex-wrap: wrap; }
  html[data-role="company"] .rows .row:has(.chip.action) .row-main { flex-basis: 100%; }
  html[data-role="company"] .row-main small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.board-mobile-meta { display: none; }
@media screen and (max-width: 699px) {
  .board tr { grid-template-columns: minmax(0, 1fr) auto; }
  .board tr > td[data-label] { display: none; }
  .board tr > .board-mobile-meta { display: flex; flex-wrap: wrap; gap: 0 12px; grid-column: 1 / -1; font-size: var(--fs-13); color: var(--ink-2); overflow-wrap: anywhere; }
}
@media print { .board-mobile-meta { display: none !important; } }
.pane-in:has([data-form="co-listing"]) { max-width: 720px; }
html[data-role="duty"] .duty-phone { border-radius: 0; }

/* デザイナーレビュー2：左揃え、読みやすい表、本文と重ならない操作 */
:root { --heading-line: #1E293B; --fixed-line: #CBD5E1; --tab-height: calc(56px + env(safe-area-inset-bottom)); }
.pane-in, .pane-in:has([data-form="letter"]), .pane-in:has([data-form="listing"]), .pane-in:has([data-form="co-listing"]) { max-width: 1056px; margin-inline: 0; }
.solo { max-width: 1056px; margin-inline: 0; padding-inline: 32px; }
.form-grid, [data-form="student-mode"] { width: 100%; max-width: 640px; }
.form-grid .btn, .solo > .btn, .center-card .btn { align-self: flex-start; width: auto; }
thead th { border-bottom: 2px solid var(--heading-line); }
ul.rows, .table-wrap, .card .table-wrap { border-top: 0; }
.board, .eval-table, .place, .capacity-table { font-size: var(--fs-15); }
.board thead th, .eval-table thead th, .place thead th, .capacity-table thead th { min-width: 6em; white-space: normal; border-bottom: 2px solid var(--heading-line); }
.eval-table { table-layout: auto; }
.eval-table th, .eval-table th:first-child, .eval-table th:last-child, .eval-table th:not(:first-child):not(:nth-last-child(-n+2)) { width: auto; }
.eval-table tbody th { font-size: var(--fs-15); }
.side .nav-item { min-height: 44px; font-size: var(--fs-15); font-weight: 600; }
.side .nav-item > svg { width: 20px; height: 20px; }
.side-foot { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.chat-launch { min-height: 44px; }
.select-bar, .select-bar:has(button:disabled) { background: #fff; opacity: 1; border-top: 1px solid var(--fixed-line); bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
dialog { border-top: 1px solid var(--line); box-shadow: none; }
dialog::backdrop { background: #E2E8F0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.center-page { display: block; padding: 16px 32px; }
.center-card { max-width: 640px; padding: 0; border: 0; }
.center-link { text-align: left; }
.group-title a { color: var(--brand); text-decoration: none; }
.group-title a::after { content: ' ›'; }
@media (hover: hover) { .group-title a:hover { text-decoration: underline; } }
.date-text { white-space: nowrap; }
.approval-row { align-items: flex-start; }
.approval-action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 260px; }
.approval-action .chip { align-self: flex-end; }
/* 受け入れ内容は表の形：項目は色帯、行ごとに罫線（11/13 本人「区切りがわかりにくい」） */
.program .kv { grid-template-columns: 7em minmax(0, 1fr); gap: 0; font-size: var(--fs-15); border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep); margin: 4px 0; }
.program .kv dt, .program .kv dd { padding: 8px 12px; border-top: 1px solid var(--line); }
.program .kv dt:first-of-type, .program .kv dd:first-of-type { border-top: 0; }
.program .kv dt { background: var(--fill); color: var(--label2); }
.board-st small { display: block; font-size: var(--fs-13); }
.capacity-table td:nth-child(2), .capacity-table td:nth-child(3), .capacity-table .num, .board .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.capacity-table th:last-child, .capacity-table td:last-child { width: 1%; }
.duty-phone { bottom: 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--fixed-line); }
.duty-phone .btn { width: 100%; height: 52px; margin: 0; color: var(--brand); }
html[data-role="duty"] .solo-head { padding-top: 20px; }
html[data-role="duty"] .att-btns .btn { padding: 0 16px; }
html[data-role="duty"] .day-tab { font-size: var(--fs-15); }
html[data-role="duty"] summary { display: flex; align-items: center; min-height: 44px; }
.duty-count { text-align: left; }
.wish-send-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--fixed-line); }
html:has(.wish-send-bar) .solo { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
@media screen and (min-width: 700px) {
  .board th, .board td { overflow-wrap: normal; }
  .board td:nth-child(2), .board td:nth-child(7) { white-space: nowrap !important; }
  html:has(.shell) .mchat-open { display: none; }
  html:has(.shell) .mchat { bottom: 16px; }
  html:has(.mchat) .pane-in { padding-bottom: 72px; }
  .shell { grid-template-columns: 216px minmax(0, 1fr); }
  .side { align-items: stretch; }
  .side .nav-item { flex-direction: row; text-align: left; padding: 4px 8px; }
  .side-brand { display: flex; }
  .side-foot { display: flex; }
}
@media screen and (max-width: 699px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea, .search input:not([type="checkbox"]):not([type="radio"]), .mchat-field textarea { font-size: var(--fs-17); min-height: 44px; }
  .solo { padding-inline: 16px; }
  .center-page { padding-inline: 16px; }
  html:has(.mchat) .pane-in { padding-bottom: calc(52px + 16px + var(--tab-height)); }
  html:has(.shell):has(.tabbar) .mchat { bottom: calc(var(--tab-height) + 16px); }
  html:has(.select-bar):has(.shell):has(.tabbar) .mchat { bottom: calc(var(--tab-height) + 120px); }
  html:has(.select-bar) .pane-in { padding-bottom: calc(52px + 136px + var(--tab-height)); }
  .board tr > .board-mobile-meta { font-size: var(--fs-15); color: var(--ink); }
  .board-st small { display: block; }
  .approval-row { flex-wrap: wrap; }
  .approval-action { margin-left: auto; }
}
.chat-launch { display: none; }
html:has(.mchat) .chat-launch { display: inline-flex; }
@media screen and (max-width: 699px) {
  html[data-role="duty"] .att-row { height: auto; min-height: 56px; padding-block: 4px; }
  html[data-role="duty"] .att-btns { flex-direction: column; align-items: flex-end; max-width: calc(100vw - 80px); }
  html[data-role="duty"] .att-btns .chip { max-width: 100%; height: auto; white-space: normal; }
}
@media screen and (min-width: 700px) {
  .board-st { text-align: right; font-variant-numeric: tabular-nums; }
  .board-st small { text-align: left; }
}
.capacity-table td:nth-child(8) { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 700px) and (max-width: 1099px) {
  .side .nav-item .badge { position: static; margin-left: auto; }
}

/* 年度ボード：人数と見出しを一続きにし、番号は次の行へ。 */
@media screen and (min-width: 700px) {
  .board th, .board .board-st { white-space: nowrap !important; }
  .board .board-st small { display: block; text-align: right; }
  .board th.num:last-child { width: 5em; }
}
html[data-ledger="1"] .chat-launch { display: none; }

/* レビュー3：操作は本文・タブに収め、区切りは不透明な罫線に統一。 */
.bar, .tabbar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.bar { border-bottom: 1px solid #E2E8F0; }
.tabbar { border-top: 1px solid #E2E8F0; }
#toast, #toast.err { background: #1E293B; backdrop-filter: none; -webkit-backdrop-filter: none; }
.row-main > .chip { align-self: flex-start; }
.approval-action { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-left: auto; }
.approval-action > small { flex-basis: 100%; text-align: right; }
.capacity-table th:nth-child(8), .board th.num, .capacity-table th.num { text-align: right; }
.board th, .place th, .capacity-table th { font-size: var(--fs-15); color: #1E293B; font-weight: 600; }
.eval-table th { text-align: center; }
.score-empty { font-weight: 400; }
.chip.danger { background: var(--bad-bg); color: var(--bad); }
.option-plan { padding-inline: 0; border: 0; background: #fff; }
.date-text { display: inline-block; white-space: nowrap !important; overflow-wrap: normal; word-break: normal; }
@media screen and (max-width: 699px) {
  html input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), html select, html textarea, html .search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { font-size: var(--fs-17); }
  .tabbar .chat-launch { border: 0; border-radius: 0; justify-content: center; }
  html:has(.tabbar) .mchat-open, html[data-role="duty"] .mchat-open { display: none; }
  html[data-role="duty"] .att-btns { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  html[data-role="duty"] .att-btns .chip { height: 22px; white-space: nowrap; flex-shrink: 0; }
  html[data-role="duty"] .att-row { min-height: 64px; }
}
@media (max-width: 600px) {
  .row-sub { flex-direction: column; align-items: stretch; }
  .row-sub .btn { width: 100%; }
}

/* レビュー4：表の読み順を保ち、スマートフォンでは罫線で行を区切る。 */
:root { --r-ctl: 6px; --r-point: 6px; }
.chip { align-self: flex-start; border-radius: var(--r-ctl); }
.tabbar .nav-item[href="#/find"] span { font-size: var(--fs-13); }
.tally { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board-co small a { font-weight: 400; }
.board th, .board td { padding-inline: 12px; }
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 0; }
.row-select .check { flex: 0 0 44px; min-width: 44px; min-height: 44px; padding: 0; justify-content: center; margin-right: 4px; }
.inline-check { min-height: 44px; }
.find-badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; width: 160px; flex: 0 0 160px; text-align: right; }
.visit-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.instant-settings { border-block: 1px solid var(--line); padding-block: 12px; }
[data-act="co-duty-revoke"] { margin-left: auto; }
.day-tab { font-size: var(--fs-15); }
.duty-phone .btn { color: var(--label); background: var(--bg); border: 1px solid var(--line-strong); }
.capacity-meta, .capacity-counts { display: none; }
.capacity-table th, .capacity-table td { min-width: 0; padding-inline: 4px; }
.capacity-table th:first-child, .capacity-table td:first-child { min-width: 9em; white-space: nowrap; }
.capacity-table th.num, .capacity-table td.num, .capacity-table th:nth-child(3), .capacity-table td:nth-child(3), .capacity-table th:nth-child(8), .capacity-table td:nth-child(8), .capacity-table th:nth-child(10), .capacity-table td:nth-child(10) { width: 1%; white-space: nowrap; }
.capacity-table th:last-child, .capacity-table td:last-child { min-width: 0; }
.capacity-table td:nth-child(10) { white-space: nowrap; }
.eval-table th { min-width: 0; }
.eval-table .eval-action { white-space: nowrap; width: 1%; }
@media screen and (max-width: 767px) {
  :root { --ctl: 44px; }
  html input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), html select, html textarea, html .search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: 44px; }
  .capacity-table, .capacity-table tbody { display: block; min-width: 0; width: 100%; }
  .capacity-table thead, .eval-table thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .capacity-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--line); }
  .capacity-table tr > td { display: none; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; }
  .capacity-table tr > .capacity-company { display: contents; }
  .capacity-name { grid-column: 1; grid-row: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-weight: 600; }
  .capacity-table tr > td:nth-child(9) { display: flex; flex-direction: column; align-items: flex-end; max-width: 140px; overflow-wrap: anywhere; grid-column: 2; grid-row: 1; }
  .capacity-table .capacity-meta { display: block; grid-column: 1 / -1; grid-row: 2; color: var(--ink-2); font-size: var(--fs-13); }
  .capacity-table .capacity-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; grid-column: 1 / -1; grid-row: 3; font-variant-numeric: tabular-nums; }
  .capacity-table tr > td:nth-child(10) { width: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; grid-column: 1 / -1; grid-row: 4; }
  .table-wrap:has(> .capacity-table), .table-wrap:has(> .eval-table) { overflow: visible; }
  .eval-table, .eval-table tbody { display: block; width: 100%; min-width: 0; }
  .eval-table tr { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .eval-table tr > td, .eval-table tr > th { display: block; min-width: 0; width: auto; padding: 0; border: 0; text-align: left; }
  .eval-table tr > th:first-child { grid-column: 1; grid-row: 1; min-width: 0; border: 0; text-align: left; align-self: center; }
  .eval-table tr > .eval-action { display: flex; justify-content: flex-end; grid-column: 2; grid-row: 1; }
  .eval-table tr > .score { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; gap: 8px; text-align: left; }
  .eval-table .score::before { content: attr(data-label); color: var(--ink-2); }
  .eval-table .cmt { grid-column: 1 / -1; overflow-wrap: anywhere; }
}
@media screen and (max-width: 699px) {
  .pane-in:has(.find-filters) { gap: 8px; }
  .pane-in:has(.find-filters) .page-head { gap: 8px; }
  .find-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 4px; }
  .find-filters .search { grid-column: 1 / -1; }
  .find-filters > .inline-check { grid-column: auto; gap: 4px; white-space: nowrap; }
  .find-filters select { font-size: var(--fs-13); padding-left: 4px; padding-right: 24px; }
  .find-badges { width: auto; flex: 0 1 100px; }
  .board-tabs .day-tab { flex: 0 0 auto; padding-inline: 8px; }
  html[data-role="company"] .rows .row { position: relative; padding-right: 28px; }
  html[data-role="company"] .rows .row > .row-chev { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin: 0; }
}

/* 操作部品の角丸も6pxへ統一。 */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea, .search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .badge { border-radius: var(--r-ctl); }
@media screen and (max-width: 699px) {
  .pane-in:has(.find-filters) > .group-title { margin-block: 8px 0; }
}

/* スマホ：評価の表の操作ボタンを1段目の右端へ（デスクトップの width:1% を打ち消す） */
@media screen and (max-width: 767px) {
  .eval-table tbody tr > .eval-action { width: auto; justify-self: end; }
}

/* 第5回レビュー：操作幅、罫線、タッチ領域を共通化。 */
.approval-action { flex: 0 0 260px; width: 260px; }
.approval-action .chip { align-self: center; }
#toast.show { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.toast-close { flex: none; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 6px; background: #fff; color: var(--ink); font-size: var(--fs-20); cursor: pointer; }
.row-actions > :is(.btn-danger, .btn-danger-outline, .btn-danger-text) { margin-left: auto; }
.visit-notice > p:first-child { font-size: var(--fs-17); font-weight: 600; }
.visit-notice .chip { background: #fff; border: 1px solid var(--line); color: var(--ink); }
[data-form="letter"] > .row-actions { justify-content: flex-start; }
[data-form="student-mode"] .toggle { border-bottom: 1px solid var(--line); padding-block: 12px; }
.instant-settings { border-bottom: 0; }
.day-tabs { max-width: 100%; min-width: 0; flex-shrink: 0; }
.day-tabs .day-tab { flex-shrink: 0; }
.board-co > a:first-child { display: inline-flex; align-items: center; gap: 8px; }
@media (min-width: 700px) {
  .board tbody th, .place tbody th, .capacity-table tbody th { border-bottom: 1px solid var(--line); }
}
@media (max-width: 599px) {
  .approval-row { flex-direction: column; align-items: stretch; }
  .approval-action { flex: none; width: 100%; max-width: none; align-self: flex-end; }
}
@media (max-width: 699px) {
  .eval-table .score { font-weight: 600; }
  .eval-table .score::before { font-weight: 400; }
  .board-mobile-meta .student-numbers { display: block; margin-top: 4px; }
}

.att-btns > .chip, .solo .att-btns > .chip { align-self: center; }
nav.row-actions .btn, .case-toc .btn { min-height: 44px; }
.board-mobile-meta .student-numbers::before { content: "／ "; }

/* 第6回：配置だけ画面幅を使い切る。 */
.pane-in.placement-view { max-width: var(--content-width); width: 100%; }
.capacity-table :is(th, td):nth-child(5), .capacity-table :is(th, td):nth-child(6), .capacity-table :is(th, td):nth-child(7) { width: 56px; min-width: 56px; }
/* 受付番号の列は、右寄せの「枠」と続いて1語に見えないよう左にも間をとる。 */
.capacity-table :is(th, td):nth-child(8) { padding-inline: 24px; }
:is(.student-settings, [data-form="student-mode"]) .toggle { min-height: 56px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.group .row-actions:has(> :is(.btn-danger, .btn-danger-outline, .btn-danger-text)) { width: 100%; }
html[data-role="company"] .nav-item .badge, html[data-role="company"] .nav-item.on .badge { background: var(--action-bg); color: var(--action-text); min-width: 20px; height: 20px; min-height: 20px; line-height: 20px; border-radius: 10px; padding: 0 4px; }
.board-mobile-meta .student-numbers { display: block; }
.board-mobile-meta .student-numbers::before { content: none; }
html[data-role="student"]:has(.mchat):not([data-ledger="1"]) .solo { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (max-width: 820px) {
  html[data-role="company"] .tabbar .badge { left: calc(50% + 14px); right: auto; top: 0; }
}
[data-act="teacher-revoke"] { margin-left: auto; }

/* 第7回：列幅、折り返し、危険操作の位置を全役で揃える。 */
html[data-role="student"] .solo, html[data-role="duty"] .solo { width: 100%; max-width: 720px; margin: 0 auto; }
nav.row-actions { flex-wrap: wrap; overflow: visible; white-space: normal; }
.pass-danger { justify-content: flex-end; margin-top: 16px; }
.duty-qr-danger { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.choice span { background: #fff; border: 1px solid var(--line-strong); color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
html[data-role="company"] .nav-item .badge, html[data-role="company"] .nav-item.on .badge { border-radius: var(--r-ctl); }
[data-form="student-mode"] { gap: 0; }
[data-form="student-mode"] .toggle { margin: 0; min-height: 48px; padding-block: 8px; }
[data-form="student-mode"] .toggle ~ .toggle { padding-left: 24px; }
.capacity-table { table-layout: fixed; }
.capacity-table :is(th, td) { width: auto; min-width: 0; overflow-wrap: anywhere; }
.capacity-table .capacity-col-0 { width: 20%; }
.capacity-table .capacity-col-1 { width: 8%; }
.capacity-table .capacity-col-2 { width: 5%; }
.capacity-table .capacity-col-3 { width: 17%; }
.capacity-table .capacity-col-4, .capacity-table .capacity-col-5, .capacity-table .capacity-col-6 { width: 6%; }
.capacity-table .capacity-col-7 { width: 8%; }
.capacity-table .capacity-col-8 { width: 14%; }
.capacity-table .capacity-col-9 { width: 10%; }
.capacity-table :is(th, td):nth-child(n) { min-width: 0; width: auto; white-space: normal; }
/* 2段メニューの右側は狭いので、列幅は中身に合わせる。会社名だけ折り返す */
.split-body .capacity-table { table-layout: auto; }
.split-body .capacity-table :is(th, td):first-child { min-width: 7.5em; }
.split-body .capacity-table col { width: auto; }
.split-body .capacity-table :is(th, td) { padding-inline: 8px; }
.split-body .capacity-table :is(th, td):nth-child(8) { padding-inline: 16px; }
.split-body .capacity-table :is(th, td):not(:first-child):not(:nth-child(4)):not(:nth-child(9)) { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 820px) {
  .tabbar .nav-item { min-width: 0; padding-inline: 1px; letter-spacing: normal; }
  .tabbar .nav-item span { font-size: var(--fs-13); white-space: nowrap; }
  html[data-role="company"] .tabbar .nav-item { flex: 1 1 auto; }
}
.directory-qr-print { display: none; }
@media print { .directory-qr-print { display: block; } }
@media (max-width: 820px) {
  html[data-role="school"] .tabbar { grid-template-columns: minmax(0, 1fr) 72px repeat(4, minmax(0, 1fr)); }
  html[data-role="company"] .tabbar { grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); }
}

/* 第8回：配置の列幅と共通の開閉表示。 */
.pane-in { max-width: 920px; }
.pane-in.placement-view { max-width: var(--content-width); }
.capacity-table .capacity-col-0 { width: 190px; }
.capacity-table .capacity-col-1 { width: 72px; }
.capacity-table .capacity-col-2 { width: 56px; }
.capacity-table .capacity-col-3 { width: auto; }
.capacity-table .capacity-col-4, .capacity-table .capacity-col-5, .capacity-table .capacity-col-6 { width: 56px; }
.capacity-table .capacity-col-7 { width: 112px; }
.capacity-table .capacity-col-8 { width: 160px; }
.capacity-table .capacity-col-9 { width: 120px; }
.capacity-table :is(th, td):nth-child(10) { min-width: 120px; }
/* display:table は表の border-collapse を継いで左右の余白が消えるので、幅を中身に合わせた flex にする。 */
.capacity-table td:nth-child(9) .chip { display: flex; width: fit-content; margin-block: 4px; }
.pass-danger-group { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.pass-danger-group .row-actions { justify-content: flex-end; margin: 0; }
.visit-reply-needed { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.visit-reply-needed, .chip.action { background: var(--action-bg); color: var(--action-text); }
html[data-role="student"] .solo,
html[data-role="student"]:has(.mchat):not([data-ledger="1"]) .solo { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
html[data-role="duty"] .duty-phone { max-width: 720px; margin-inline: auto; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
/* 開閉の印は一覧の › と同じ形（線の山形） */
summary::before { content: ''; display: inline-block; flex: none; width: 6px; height: 6px; margin: 0 12px 0 4px; border-right: 1.5px solid var(--sep-strong); border-bottom: 1.5px solid var(--sep-strong); vertical-align: middle; transform: translateY(-1px) rotate(-45deg); transition: transform .15s; }
details[open] > summary::before { content: ''; transform: translateY(-3px) rotate(45deg); }
summary::after { content: none; }
@media (max-width: 699px) {
  .find-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .find-filters > .inline-check { grid-column: 1 / -1; }
  .select-rows .row-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .select-rows .row-btn > .row-main { grid-column: 1 / -1; width: 100%; }
  .select-rows .row-btn > .find-badges { grid-column: 1 / -1; justify-content: flex-start; width: 100%; text-align: left; }
  .select-rows .row-btn > .row-chev { display: none; }
  .capacity-table :is(th, td):nth-child(10) { min-width: 0; }
}

/* design9: 同じ本文幅、役の表示、共有枠と承認の読み順 */
:root { --content-width: 1180px; }
.pane-in, .pane-in.placement-view,
.pane-in:has([data-form="letter"]), .pane-in:has([data-form="listing"]),
.pane-in:has([data-form="co-listing"]) { max-width: var(--content-width); width: 100%; }
.mobile-identity { display: none; }
.approval-overdue { background: var(--bad-bg); color: var(--bad); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.approval-overdue a { color: var(--bad); }
.approval-action > small { flex-basis: auto; text-align: left; }
.capacity-table .capacity-col-6 { width: 140px; }
.capacity-table td.num:nth-child(7) { white-space: nowrap; }
@media (min-width: 700px) {
  .board th:nth-child(4) { width: 18%; }
  .board th:nth-child(5) { width: 21%; }
  .board .student-numbers, .board td[data-label="巡回"] { overflow-wrap: normal; word-break: keep-all; }
}
@media (max-width: 699px) {
  .mobile-identity { display: flex; align-items: center; height: 32px; background: var(--fill); padding: 0 16px; font-size: var(--fs-13); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-identity .mobile-login { margin-left: auto; padding-left: 12px; flex-shrink: 0; color: var(--ink-2, inherit); }
  .approval-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .approval-row .approval-action { width: auto; max-width: 180px; margin-left: 0; flex-direction: row; gap: 8px; }
  /* ボタンのある行は操作を下の段に回し、補足文を全幅で読ませる。 */
  .approval-row:has(.btn) { grid-template-columns: minmax(0, 1fr); }
  .approval-row:has(.btn) .approval-action { max-width: none; justify-content: flex-end; }
  .approval-row .row-main small { text-wrap: pretty; }
  html[data-role="student"]:has(.wish-send-bar) .mchat:not(.is-open) { bottom: calc(88px + env(safe-area-inset-bottom)); }
  html[data-role="student"]:has(.wish-send-bar):has(.mchat):not([data-ledger="1"]) .solo { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }
}




/* 第10回：移動は下線タブ、本文は罫線で区切る。 */
.day-tabs, .case-links.day-tabs, .board-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; min-width: 0; border-bottom: 1px solid var(--sep); gap: 0; }
.day-tabs .day-tab, .day-tabs:not(.board-tabs) .day-tab, .board-tabs .day-tab { flex: 0 0 auto; white-space: nowrap; border-radius: 0; }
.eval-table .cmt { font-size: var(--fs-15); }
.eval-table .cmt small { display: block; font-size: var(--fs-13); margin-bottom: 8px; }
.approval-overdue a { display: block; text-decoration: none; }
.pass-danger-group .row-actions { justify-content: space-between; gap: 16px; }
html[data-role="duty"] .duty-phone { width: calc(100% - 64px); max-width: 656px; padding-inline: 0; }
@media (max-width: 699px) { html[data-role="duty"] .duty-phone { left: 16px; right: 16px; width: auto; max-width: none; } }
/* 第11回：設定のQR。小見出しと、赤ボタンの行を同じ形にそろえる。 */
.sub-title { font-size: var(--fs-15); font-weight: 600; margin-top: 16px; }
.danger-rows { border-top: 1px solid var(--sep); margin-top: 16px; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--sep); }
.danger-row p { color: var(--label2); font-size: var(--fs-13); flex: 1 1 auto; min-width: 0; }
.danger-row p b { display: block; color: var(--ink); font-size: var(--fs-15); }
.danger-row .btn { flex: 0 0 auto; }
@media (max-width: 699px) { .danger-row:not(.is-inline) { flex-direction: column; align-items: stretch; } .danger-row .btn { align-self: flex-start; } .danger-row.is-inline .btn { align-self: center; } }
.chip-link { text-decoration: none; }
/* デザイナー11回目 */
.eval-table th:nth-last-child(2), .eval-table td.cmt { text-align: left; }
.attendance-notice { font-size: var(--fs-13); color: var(--label2); }
.att-btn[data-act]:not([data-act$="-clear"]) { padding-inline: 12px; }

/* 名簿の暗号化送信（学校が送り、企業が開封番号で開く） */
.seal-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-15); margin-bottom: 8px; }
.seal-code { font-size: var(--fs-26); font-weight: 700; letter-spacing: .08em; line-height: 1.3; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; user-select: all; }
.seal-open input[name="code"] { font-size: var(--fs-20); letter-spacing: .06em; text-transform: uppercase; }
.seal-error { font-size: var(--fs-15); font-weight: 600; color: var(--bad, #b3261e); border-left: 3px solid currentColor; padding: 4px 8px; margin-bottom: 8px; }
.seal-title { font-size: var(--fs-17); font-weight: 600; margin-bottom: 8px; }
.seal-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.seal-table th, .seal-table td { border-bottom: 1px solid var(--line); padding: 4px 8px; text-align: left; white-space: nowrap; }
.seal-table th { font-size: var(--fs-13); font-weight: 600; }
@media print { .seal-table { font-size: 10pt; } .seal-table th, .seal-table td { border-bottom: .2mm solid #000; padding: 1.2mm 2mm; } .seal-title { font-size: 12pt; } }

/* 当日の一覧（#17） */
.tally3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tally3 dd small { font-size: var(--fs-13); font-weight: 400; margin-left: 0; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-item { border-bottom: 1px solid var(--line); }
.today-head { flex: 1 1 240px; min-height: 44px; display: flex; align-items: center; gap: 8px 12px; flex-wrap: nowrap; padding: 4px 0; border: 0; background: none; font: inherit; font-size: var(--fs-15); text-align: left; cursor: pointer; color: inherit; }
.today-head:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.today-name { flex: 1; min-width: 0; font-size: var(--fs-17); font-weight: 600; overflow-wrap: anywhere; }
.today-detail { padding: 4px 0 12px; }
.today-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin-bottom: 8px; }
.today-facts dt { color: var(--label2); font-size: var(--fs-13); }
.today-facts dd { font-size: var(--fs-15); overflow-wrap: anywhere; }
.today-students { list-style: none; margin: 0; padding: 0; font-size: var(--fs-15); }
.today-students li { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.today-students li.exc span:last-child { font-weight: 600; color: var(--warn-text); }
.today-students li.exc-danger span:last-child { color: var(--bad); }

/* お礼（#20） */
.thanks { padding: 4px 0; }
.thanks p { font-size: var(--fs-15); line-height: 1.8; }
.thanks .thanks-title { font-size: var(--fs-20); font-weight: 600; margin-bottom: 8px; }
.thanks .thanks-sign { margin-top: 12px; text-align: right; font-weight: 600; }

/* 操作の記録（#21b） */
.events-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; }
.events-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.events-table th, .events-table td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.events-table th { font-size: var(--fs-13); color: var(--label2); font-weight: 600; }
.events-pager { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* 第14回：見出し・罫線・余白・バッジを1つの規則にする。group／group-title／group-head／case-links の定義はここだけ。 */
.group { display: flex; flex-direction: column; gap: 0; }
.group > :not(.group-title):not(.group-head) + * { margin-top: 12px; }
/* 本文の gap 20px と合わせて、見出しの上は40px。見出しの下線は2pxの濃い線、それ以外は1px。 */
.group-title { color: var(--label); font-size: var(--fs-17); font-weight: 600; letter-spacing: normal; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--heading-line); }
.group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 20px 0 12px; border-bottom: 2px solid var(--heading-line); }
.group-head .group-title { flex: 1 1 auto; min-width: 0; margin: 0; padding-block: 12px; border-bottom: 0; }
.group-title + .tally, .group-title + * > .tally:first-child, .group-head + .tally { border-top: 0; }
.status-rest { color: var(--label2); font-size: var(--fs-13); font-weight: 400; }
.status-rest a { color: inherit; }
.board-status .status-rest, .find-badges .status-rest { display: block; width: 100%; text-align: inherit; }
/* 補足は「・」の区切りでだけ折り返す。1つの文言の途中では切らない。 */
.status-rest > .status-item { white-space: nowrap; }
.board-status .status-rest > .status-item { white-space: normal; }
/* 会社・案件ページの節タブ（日付タブと同じ部品） */
.case-links.day-tabs { gap: 0; }
.case-links .day-tab { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-15); color: var(--ink); text-decoration: none; }
.case-links .day-tab.on { color: var(--brand-text); }
/* スマホのタブは横スクロールで隠さず、2段に折り返して全部見せる */
@media (max-width: 699px) {
  .day-tabs, .case-links.day-tabs, .board-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
  /* 折り返しても指で押せる高さは保つ。 */
  .day-tabs .day-tab, .board-tabs .day-tab { min-height: 44px; padding-block: 4px; }
  .case-links .day-tab { padding-inline: 12px; }
}
/* ロゴが無い会社も、頭の1文字（.logo-none）で場所を固定する */
@media (max-width: 699px) {
  .select-rows .row-btn { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 8px; }
  .select-rows .row-btn > .logo { grid-column: 1; grid-row: 1; align-self: start; }
  .select-rows .row-btn > .row-main { grid-column: 2; grid-row: 1; width: auto; }
  .select-rows .row-btn > .find-badges { grid-column: 2; justify-content: flex-start; width: auto; text-align: left; }
  .select-rows .row-select .check { align-items: flex-start; }
  .select-rows .row-select .check input { margin-top: 8px; }
}
/* 当日：会社ごとに1行。開く印は他の一覧と同じ › */
.today-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 4px 0; }
.today-head .row-chev { margin-left: auto; transition: transform .15s; }
/* 11/19 apple r3 中6：行は「会社名＋札＋⌄」。› は別の画面へ、ここはその場で下に広がるので ⌄（開くと ⌃） */
.today-head .row-chev { transform: rotate(90deg); }
.today-head[aria-expanded="true"] .row-chev { transform: rotate(-90deg); }
/* スマホ：社名を1行で見せ、状態は社名の下、開く印（⌄）は右端で2行の中央。電話は開いた中の「電話」の行（11/19 apple r3 中6） */
@media (max-width: 699px) {
  .today-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .today-head > .today-name { grid-column: 1; grid-row: 1; }
  .today-head > :is(.chip, .today-status) { grid-column: 1; grid-row: 2; justify-self: start; }
  .today-head > .row-chev { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.today-name small { color: var(--label2); font-size: var(--fs-13); font-weight: 400; }
.today-body { padding-bottom: 12px; }
.today-body .no { font-size: var(--fs-15); font-weight: 600; }
/* 評価・巡回・書類 */
.eval-head-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* スマホで見出しの下に折り返したときに、札が太い罫線に付かないようにする。 */
@media (max-width: 699px) { .group-head > .eval-head-side { padding-bottom: 8px; } }
.visit-row { flex-wrap: wrap; align-items: flex-start; }
.visit-row > .btn { margin-left: auto; }
.visit-row small { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 699px) {
  .visit-heading { display: block; }
  .visit-heading > .chip { display: block; width: fit-content; margin-top: 4px; }
  /* ボタンは見出しと時刻の下に回し、見出しを狭めない。 */
  .visit-row > .row-main { flex-basis: 100%; }
  .visit-row > .btn { margin-left: 0; }
}
.visit-overlap { flex: 1 1 100%; }
/* 11/19 apple r3 中5：行全体が1件のページへのリンク。主文は --label、右に › */
html body a.visit-link { display: flex; flex-direction: row; align-items: center; gap: var(--sp-8); min-height: 44px; color: var(--label); text-decoration: none; }
html body a.visit-link > .visit-body { display: flex; flex-direction: column; gap: 0; flex: 1 1 auto; min-width: 0; }
html body a.visit-link > .row-chev { flex: none; margin-left: auto; }
html body a.visit-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.doc-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.doc-pick .row { cursor: pointer; background: none; }
.doc-pick .row-select.on { background: none; }
.doc-pick .row { align-items: flex-start; }
/* チェック欄は社名の行にそろえる（PC・スマホとも）。 */
.doc-pick .check { flex: 0 0 44px; align-items: flex-start; }
.doc-pick .check input { margin-top: 0; }
.letter-label { font-size: var(--fs-15); font-weight: 600; }

/* 巡回の列：札はどの行でも日付・担当の下の段に出す（11/14 デザイナー） */
@media screen and (min-width: 700px) {
  .board td[data-label="巡回"] .chip { display: block; width: fit-content; margin-top: 0; }
}
/* 言葉の途中で折れないよう、本文と案内は文節で折り返す */
p, .notice > span, .row-main small { word-break: auto-phrase; text-wrap: pretty; }
/* ホーム「今年度の流れ」：順番に並ぶ段。上の太線＝何割済んだか、太字＝残り（11/14 本人「根本的なレイアウトの問題」） */
.flow { margin-top: 8px; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 12px; }
.flow-step a { display: flex; flex-direction: column; gap: 4px; padding-block: 4px 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.flow-name { font-size: var(--fs-13); color: var(--label2); overflow-wrap: anywhere; }
.flow-no { display: inline-block; min-width: 1.4em; font-variant-numeric: tabular-nums; }
.flow-step progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0; background: var(--line); }
.flow-step progress::-webkit-progress-bar { background: var(--line); }
.flow-step progress::-webkit-progress-value { background: var(--brand); }
.flow-step progress::-moz-progress-bar { background: var(--brand); }
.flow-step b { font-size: var(--fs-15); font-weight: 700; color: var(--ink); line-height: 1.35; font-variant-numeric: tabular-nums; }
.flow-step.done b, .flow-step.none b { font-weight: 400; color: var(--label2); }
.flow-step small { font-size: var(--fs-13); color: var(--label2); }
@media (hover: hover) { .flow-step a:hover b { text-decoration: underline; } }
.flow-chev { display: none; }
@media (max-width: 699px) {
  .flow-steps { grid-auto-flow: row; grid-auto-columns: auto; }
  .flow-step + .flow-step { border-top: 1px solid var(--line); }
  .flow-step a { display: grid; grid-template-columns: minmax(0, 1fr) 128px 16px; grid-template-areas: "name main chev" "bar sub chev"; column-gap: 16px; row-gap: 4px; align-items: center; padding-block: 8px; }
  .flow-name { grid-area: name; font-size: var(--fs-15); color: var(--ink); }
  .flow-step progress { grid-area: bar; height: 4px; }
  .flow-step b { grid-area: main; text-align: right; }
  .flow-step small { grid-area: sub; text-align: right; }
  .flow-chev { display: block; grid-area: chev; width: 16px; height: 16px; color: var(--label2); }
}

/* 名簿を入れる：番号つきの3手（11/15） */
.paste-steps .steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.paste-steps .steps > li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; row-gap: 8px; align-items: start; }
.paste-steps .steps > li::before { content: counter(step); grid-row: 1 / span 3; width: 24px; height: 24px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: var(--fs-13); font-weight: 600; }
.paste-steps .steps > li > * { grid-column: 2; }
.paste-steps .step-h { font-size: var(--fs-15); font-weight: 600; color: var(--ink); line-height: 24px; }
.paste-steps textarea { width: 100%; }
/* 受け入れ先の一覧の下：まとめて出す／出さない（11/15 崩れの指摘） */
.shown-all { justify-content: flex-end; margin-top: 12px; }
.shown-all .muted { font-size: var(--fs-13); }

/* ホームのカレンダー（11/15）。PC は月の表、スマホは日付順の一覧 */
.cal { margin-top: 24px; }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cal-nav { display: flex; gap: 8px; }
.cal-key { display: flex; gap: 12px; margin: 8px 0; font-size: var(--fs-13); }
.cal-grid { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cal-grid th { padding: 4px 4px; font-size: var(--fs-13); font-weight: 600; color: var(--label2); text-align: left; border-bottom: 1px solid var(--sep-strong); }
.cal-grid td { height: 92px; padding: 4px; vertical-align: top; border: 1px solid var(--line); overflow: hidden; }
.cal-grid td.cal-out { background: var(--canvas); }
.cal-d { display: block; margin-bottom: 0; font-size: var(--fs-13); color: var(--label2); }
.cal-sun .cal-d { color: var(--bad); }
.cal-sat .cal-d { color: var(--brand-text); }
.cal-today { background: var(--tint); }
.cal-today .cal-d { font-weight: 600; color: var(--ink); }
.cal-ev { display: block; padding: 1px 4px; margin-top: 0; font-size: var(--fs-13); line-height: 1.5; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--brand); background: var(--tint); }
.cal-ev.cal-wait { border-left-color: var(--sep-strong); background: var(--canvas); color: var(--label2); }
.cal-ev.cal-visit { border-left-color: var(--good); background: var(--good-bg); }
.cal-ev.cal-vwait { border-left-color: var(--good); border-left-style: dotted; background: var(--canvas); color: var(--label2); }
@media (hover: hover) { a.cal-ev:hover { text-decoration: underline; } }
.cal-key .cal-ev { display: inline-block; margin: 0; }
.cal-list { display: none; list-style: none; margin: 0; padding: 0; }
.cal-list a { display: grid; grid-template-columns: 7em minmax(0, 1fr); column-gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cal-list .cal-ev { margin: 0; }
.cal-list small { grid-column: 2; color: var(--label2); }
.cal-list-d { font-size: var(--fs-13); }
.cal-list-d.cal-today { background: none; font-weight: 600; }
.cal-none { margin-top: 8px; }
.cal-grid + .cal-none { display: none; }
@media (max-width: 699px) {
  .cal-grid { display: none; }
  .cal-list { display: block; }
  .cal-grid + .cal-none { display: block; }
}
@media print { .cal { display: none; } }
/* 上で @page の余白を 0 にしたので、手紙・ボード・シール以外の印刷物にも内側の余白を付ける */
@media print {
  .print-area:not(.letters):not(:has(.board)):not(:has(.tacks)) { padding: 15mm !important; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
}

/* 承認：済／まだ は左の列にそろえ、ボタンの有無で位置が動かないようにする（11/15 本人）。 */
.approvals .approval-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center; flex-wrap: nowrap; }
.approvals .approval-row > .chip { width: 100%; justify-content: center; align-self: center; }
.approvals .approval-row .approval-action { display: flex; flex: none; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; width: auto; max-width: none; margin: 0; }
.approvals .approval-row .approval-action:empty { display: none; }
@media (max-width: 699px) {
  .approvals .approval-row, .approvals .approval-row:has(.btn) { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
  .approvals .approval-row > .chip { margin-top: 1px; }
  .approvals .approval-row .approval-action { grid-column: 2; justify-content: flex-start; }
}
.today-facts dd small { display: block; color: var(--label2); font-size: var(--fs-13); }

/* 連絡（会社ごとのチャット・11/15） */
.chat-mail { margin: 0 0 12px; }
.chat-mail a, .chat-mail .btn { margin-left: 8px; }
.chat-row .row-main { min-width: 0; }
.chat-last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label2); }
.chat-unread .row-main b { font-weight: 600; }
.chat-unread .chat-last { color: var(--label); }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; flex: none; font-size: var(--fs-13); color: var(--label2); }
.chat-meta .badge { margin-left: 0; }
.chat-page .composer { position: sticky; bottom: 0; z-index: 2; margin-top: 16px; padding: 8px 0; background: var(--bg); border-top: 1px solid var(--line); }
.chat-filters { margin-bottom: 8px; }
.chat-filters select { flex: 0 1 200px; }

/* 入口（リンク切れ・コード入力）：誰が何をするかを段で分ける */
.center-card .enter-way { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.center-card .enter-way h2 { font-size: var(--fs-17); font-weight: 600; }
.center-card .enter-way > p { color: var(--label); }
.enter-code { display: flex; align-items: flex-end; gap: 8px; }
.enter-code .field { flex: 1 1 auto; min-width: 0; }
.center-card .enter-code .btn { flex: none; align-self: flex-end; }
.enter-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.enter-new .center-link { text-align: left; }
.bar-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-15); font-weight: 600; color: var(--label); }
@media (max-width: 520px) { .bar-who { font-size: var(--fs-13); max-width: 46vw; } }

/* 生徒：会社をさがす */
.st-filters { margin-bottom: 12px; }
@media (min-width: 700px) { .st-filters { grid-template-columns: minmax(0, 1fr) 180px 160px; } }
@media (max-width: 699px) { .st-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .st-filters .search { grid-column: 1 / -1; } }

/* 生徒：会社の紹介 */
.sp { display: flex; flex-direction: column; gap: 20px; }
.sp-photos { display: flex; flex-direction: column; gap: 4px; }
.sp-photos figure { margin: 0; }
.sp-photos img { display: block; width: 100%; object-fit: cover; background: var(--fill); }
.sp-hero img { aspect-ratio: 16 / 9; }
.sp-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.sp-thumb img { aspect-ratio: 4 / 3; }
.sp-photos figcaption { margin-top: 4px; font-size: var(--fs-13); color: var(--label2); }
.sp-lead { font-size: var(--fs-17); line-height: 1.75; color: var(--label); }
.sp-prog { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 3px solid var(--brand); }
.sp-kicker { font-size: var(--fs-13); font-weight: 600; color: var(--brand-text); letter-spacing: .04em; }
.sp-prog .sp-kicker { margin-bottom: -8px; }
.sp-job { font-size: var(--fs-26); font-weight: 600; line-height: 1.3; }
.sp-work { font-size: var(--fs-15); line-height: 1.8; }
.sp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sp-facts > div { padding: 8px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sp-facts dt { font-size: var(--fs-13); color: var(--label2); font-weight: 600; }
.sp-facts dd { font-size: var(--fs-17); font-weight: 600; overflow-wrap: anywhere; }
.sp-days { display: flex; flex-direction: column; border-left: 0; }
.sp-days li { display: flex; gap: 12px; padding: 8px 0 8px 12px; }
.sp-days li + li { border-top: 1px solid var(--line); }
.sp-day { flex: none; width: 3.5em; font-weight: 600; color: var(--brand-text); }
.sp-days small { display: block; color: var(--label2); font-size: var(--fs-13); }
.sp-from { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px; background: var(--tint); }
.sp-message { font-size: var(--fs-20); font-weight: 600; line-height: 1.6; }
.sp-point h4 { font-size: var(--fs-15); font-weight: 600; margin-bottom: 0; }
.sp-voice { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.sp-voice cite { display: block; font-style: normal; font-size: var(--fs-13); color: var(--label2); }
@media (max-width: 520px) { .sp-job { font-size: var(--fs-20); } .sp-message { font-size: var(--fs-17); } .sp-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 700px) {
  .sp-photos:has(.sp-thumbs) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .sp-photos:has(.sp-thumbs) .sp-thumbs { grid-template-columns: minmax(0, 1fr); }
  .sp-hero img { max-height: 380px; }
}

/* 読み込み中：見出しと一覧の行の形を先に出す。動きはゆっくりした明滅だけ */
.skel { animation: none; }
.skel-head { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.skel-bar { display: block; height: 14px; background: var(--fill-hover); animation: skel-pulse 1.6s ease-in-out infinite; }
.skel-title { width: 55%; height: 26px; }
.skel-thin { height: 11px; }
.skel-w30 { width: 30%; } .skel-w40 { width: 40%; } .skel-w50 { width: 50%; } .skel-w60 { width: 60%; }
.skel-tabs { display: flex; gap: 12px; }
.skel-tab { width: 64px; height: 20px; }
.skel-rows { border-top: 1px solid var(--sep-strong); border-bottom: 1px solid var(--line); }
.skel-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 8px 0; }
.skel-row + .skel-row { border-top: 1px solid var(--line); }
.skel-logo { flex: none; width: 36px; height: 36px; }
.skel-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.skel-btn { flex: none; width: 96px; height: 32px; }
@keyframes skel-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skel-bar { animation: none !important; } }

/* 通信が切れた時の1行。中身のある時だけ上の帯のすぐ下に出し、その分だけ下の画面を縮めて何も隠さない */
body.offline { --net-h: 37px; }
body.offline #app { height: calc(100vh - var(--bar-h) - var(--net-h) - var(--demo-h, 0px)); height: calc(100dvh - var(--bar-h) - var(--net-h) - var(--demo-h, 0px)); }
body.offline.standalone #app { height: auto; min-height: calc(100dvh - var(--bar-h) - var(--net-h)); }
.net-banner { position: sticky; top: var(--bar-h); z-index: 55; padding: 8px var(--gutter); line-height: 20px; background: var(--warn-bg); color: var(--warn-text); font-size: var(--fs-13); font-weight: 600; text-align: center; border-bottom: 1px solid var(--warn-line); }
.net-banner:empty { display: none; }

/* 入口のコード：間違いは欄のすぐ下に出す。入れた文字は消さない */
.enter-code { flex-wrap: wrap; }
.field-error { flex: 1 1 100%; margin: 0; color: var(--bad); font-size: var(--fs-13); font-weight: 600; }

/* 文字のリンクも指で押せる高さに（見た目の位置は変えない） */
.center-link a, .link-list a, .tap-link { display: inline-flex; align-items: center; min-height: 44px; }
.link-list { gap: 0; }
@media (min-width: 700px) {
  .back { min-height: 44px; margin: -12px 0 -20px -4px; }
}

/* 上の帯：右の名前が長い時は名前の方を「…」で切る（左の「インターンシップ」に重ねない） */
.bar-in > .mark { flex: none; }
.bar-nav { min-width: 0; flex: 0 1 auto; }

/* 生徒の一覧：主役は「何をするか」。番号は控えめに右端へ（11/15 デザイナー1回目） */
.st-hint { margin: 0 0 4px; }
.solo .list-head { border-bottom: 2px solid var(--heading-line); margin: 20px 0 12px; padding-bottom: 8px; align-items: baseline; }
.solo .list-head > .group-title { margin: 0; padding: 0; border: 0; }
.st-rows .st-row { align-items: flex-start; gap: 12px; padding: 12px 0 12px 8px; border-left: 4px solid transparent; }
.st-rows .st-row.is-wished { border-left-color: transparent; }
.st-thumb, .logo.st-logo { width: 72px; height: 72px; flex: none; border-radius: 0; }
.st-thumb { object-fit: cover; background: var(--fill); }
.logo.st-logo.logo-none { font-size: var(--fs-26); }
.st-rows .row-main { gap: 4px; }
.st-rows .row-main b { font-size: var(--fs-17); font-weight: 600; line-height: 1.4; }
.st-job { font-size: var(--fs-15); color: var(--label); line-height: 1.5; overflow-wrap: anywhere; }
.st-few { color: var(--brand-text); font-weight: 600; }
.st-voice { display: block; margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--line-strong); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-rows .row-main .st-voice { overflow-wrap: normal; word-break: normal; }
.st-no { color: var(--label2); font-size: var(--fs-13); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-rows .row-chev { align-self: center; }
.st-rows.is-closed .st-job { color: var(--label2); }
/* 会社の窓：社名欄と本文の境をはっきりさせ、流れを主役に */
dialog:has(.sp) .dlg-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
dialog:has(.sp) .dlg-body { padding-top: 16px; }
.sp-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-facts > .sp-fact-wide { grid-column: 1 / -1; }
.sp-facts dd { word-break: keep-all; }
.sp-days { border-left: 0; }
.sp-days li { align-items: baseline; padding: 8px 0 8px 12px; font-size: var(--fs-17); line-height: 1.6; }
.sp-day { font-size: var(--fs-15); }
@media (max-width: 420px) { .st-thumb, .logo.st-logo { width: 60px; height: 60px; } }
.st-meta { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: var(--fs-13); }
.st-meta > * { white-space: nowrap; }
.st-rows .row-main .st-few { font-size: inherit; font-weight: 600; }
.st-rows > li > .st-row > .chip { align-self: flex-start; margin-top: 0; }
/* スマホで学校・学科が途中で切れないよう、2行まで折り返す */
@media (max-width: 520px) { html[data-role="student"] .bar-who { white-space: normal; line-height: 1.3; text-align: right; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; overflow-wrap: anywhere; } }

/* 生徒の会社ページ：服装・持ち物・集合などは開かずに見える表にする */
.sp-info { grid-template-columns: 6.5em minmax(0, 1fr); gap: 0; font-size: var(--fs-15); border-top: 1px solid var(--line); }
.sp-info > dt, .sp-info > dd { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-info > dt { padding-right: 12px; }
/* 日程・受け入れ・場所・受付番号は横に並べず、1行ずつ縦に積む（下の服装・持ち物と同じ列にそろえる） */
.sp-facts { grid-template-columns: minmax(0, 1fr); border-left: 0; }
.sp-facts > div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); align-items: baseline; padding: 8px 0; border-right: 0; }
.sp-facts dt { font-size: var(--fs-15); padding-right: 12px; }
.sp-facts + .sp-info { border-top: 0; }
/* 希望票の行を押すと、その会社のページをもう一度開ける */
.wish-list .wish-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.wish-list .wish-open .row-main { flex: 1 1 10em; }
.wish-list .wish-open .row-chev { flex: none; margin-left: auto; }
.wish-list .wish-open:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* 希望票の順番：左のつまみをつかんで上下に動かす（指でも動くよう、つまみの上ではスクロールさせない） */
.wish-list > li { position: relative; background: var(--bg); }
.wish-grip { flex: none; display: grid; place-items: center; width: 40px; height: 44px; margin: -4px 0 -4px -4px; padding: 0; border: 0; background: none; color: var(--label2); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@media (hover: hover) { .wish-grip:hover { color: var(--label); } }
.wish-grip:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.wish-list.is-sorting > li { transition: transform .15s ease; }
.wish-list.is-sorting > li.is-dragging { transition: none; z-index: 2; cursor: grabbing; box-shadow: 0 8px 20px rgba(15, 23, 42, .16); }
.wish-list.is-sorting, .wish-list.is-sorting * { user-select: none; -webkit-user-select: none; }
.wish-status .i { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; color: var(--good); }
@media (prefers-reduced-motion: reduce) { .wish-list.is-sorting > li { transition: none; } }
/* 会社の窓の見出し：ロゴ＋社名。本文だけが流れ、見出しは上に残る */
.sp-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.sp-head > .sp-close { grid-column: 3; grid-row: 1 / span 2; align-self: start; width: var(--ctl, 40px); min-width: 40px; height: 40px; padding: 0; justify-content: center; margin: -4px -8px 0 0; }
/* 下の帯は「希望に入れる」だけ。幅いっぱいに。押すものが無ければ帯ごと消す */
dialog:has(.sp) .dlg-foot .spacer { display: none; }
dialog:has(.sp) .dlg-foot > * { flex: 1 1 100%; }
dialog:has(.sp) .dlg-foot:not(:has(.btn, p)) { display: none; }
.sp-head > .logo { grid-row: 1 / span 2; width: 48px; height: 48px; }
.sp-head > .logo-none { font-size: var(--fs-20); }
.sp-head > h2, .sp-head > p { grid-column: 2; }
/* スマホでは会社の窓を画面いっぱいに（上の空きを残さない） */
@media (max-width: 699px) {
  dialog.wide:has(.sp) { height: 100dvh; max-height: 100dvh; margin: 0; border-top: 0; }
  dialog.wide:has(.sp) .dlg { height: 100%; max-height: none; }
  dialog:has(.sp) .dlg-head { padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
  dialog:has(.sp) .dlg-body { padding-left: 16px; padding-right: 16px; }
  .sp-head > .logo { width: 40px; height: 40px; }
}
/* 文の中のボタン（リンクの見た目） */
.link-btn { display: inline; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 学科のQRで初めて開いた生徒の入口（学籍番号＋名字カナ） */
.st-entry { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin-top: 8px; }
.st-entry input { font-size: var(--fs-17); }

/* 会社ごとの枠：表は列が多いので、PC の広い幅でだけ表にする（タブレットでは状態と操作が横スクロールの外に出る） */
@media screen and (max-width: 1099px) {
  .capacity-table, .capacity-table tbody { display: block; min-width: 0; width: 100%; }
  .capacity-table thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .capacity-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--line); }
  .capacity-table tr > td { display: none; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; }
  .capacity-table tr > .capacity-company { display: contents; }
  .capacity-name { grid-column: 1; grid-row: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-weight: 600; }
  .capacity-table tr > td:nth-child(9) { display: flex; flex-direction: column; align-items: flex-end; max-width: 140px; overflow-wrap: anywhere; grid-column: 2; grid-row: 1; }
  .capacity-table .capacity-meta { display: block; grid-column: 1 / -1; grid-row: 2; color: var(--ink-2); font-size: var(--fs-13); }
  .capacity-table .capacity-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; grid-column: 1 / -1; grid-row: 3; font-variant-numeric: tabular-nums; }
  .capacity-table tr > td:nth-child(10) { width: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; grid-column: 1 / -1; grid-row: 4; }
  .table-wrap:has(> .capacity-table) { overflow: visible; }
  .split-body .capacity-table tr > td, .split-body .capacity-table :is(th, td) { padding-inline: 0; }
  .capacity-table .capacity-col-0, .capacity-table col { width: auto; }
}

/* 11/16 2段目のタブはスマホで詰める。学科担当の配置表はスマホでカードに */
@media screen and (max-width: 699px) {
  .sub-item { min-height: 44px; padding: 4px 8px; font-size: var(--fs-13); }
  .place-dept thead { display: none; }
  .place-dept, .place-dept tbody, .place-dept tr, .place-dept td { display: block; width: 100%; }
  .place-dept tr { padding: 8px 0; border-top: 1px solid var(--line); }
  .place-dept td { display: flex; gap: 12px; padding: 0 0; border: 0; }
  .place-dept td::before { content: attr(data-label); flex: 0 0 6em; color: var(--label2); font-size: var(--fs-13); }
}
.warn.danger { background: var(--danger-bg, #FDECEC); color: var(--danger, #B42318); font-weight: 600; }
/* 11/16 下線タブは折り返さず1段で横に送る（折り返すと選択中の下線が中段に浮き、ボタンの並びに見える） */
@media screen and (max-width: 1099px) {
  /* 続きがあると分かるよう、細いスクロールバーは隠さない（11/16 デザイナー指摘） */
  .subnav, .day-tabs, .board-tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch; }
  .subnav::-webkit-scrollbar, .day-tabs::-webkit-scrollbar, .board-tabs::-webkit-scrollbar { height: 4px; }
  .subnav::-webkit-scrollbar-thumb, .day-tabs::-webkit-scrollbar-thumb, .board-tabs::-webkit-scrollbar-thumb { background: var(--line); }
  .sub-item, .day-tab { flex: 0 0 auto; }
}
/* 企業の依頼ページの節へのリンクは目次（選択を持たない）。タブと見分ける（11/16） */
.case-links.case-toc { align-items: center; border-bottom: 0; }
.case-links .toc-label { flex: none; padding-right: 8px; color: var(--label2); font-size: var(--fs-13); }
.case-toc .day-tab, .case-toc .day-tab.on { border-bottom: 0; color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* 学科担当の配置：生徒番号はリンクではないので本文の色 */
.place-dept .no-cell { color: var(--label); }
/* 枠カードの人数：会社どうしで縦にそろう4列（820px・スマホ） */
@media screen and (max-width: 1099px) {
  .capacity-table .capacity-counts { display: grid; grid-template-columns: 6.5em 6.5em minmax(8.5em, max-content) max-content; gap: 4px 12px; }
}
@media screen and (max-width: 420px) {
  .capacity-table .capacity-counts { grid-template-columns: repeat(2, max-content); column-gap: 20px; }
}
/* 11/16 デザイナー：書類の対象を「返事待ち」「受け入れ済み」に分ける小見出し。同意書・保険の表は横幅いっぱい、行ごとに押せる。 */
.doc-pick .group-sub { margin: 16px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: var(--fs-13); font-weight: 600; color: var(--label2); }
.doc-pick .group-sub:first-of-type { margin-top: 0; }
.consent-table { width: 100%; }
.consent-table td, .consent-table th { padding: 4px 12px 4px 0; }
.consent-table .inline-check { min-height: 44px; min-width: 44px; width: 100%; }
.consent-table .inline-check input { width: 22px; height: 22px; }
.sticky-save { position: sticky; bottom: 0; z-index: 2; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
.att-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 12px; }
.att-all .muted { font-size: var(--fs-13); }
.att-all-done { margin: 8px 0 12px; }
#ledger-text { tab-size: 14; -moz-tab-size: 14; }

/* 公開デモ（#/demo） */
.demo-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 8px var(--gutter); line-height: 20px; background: var(--tint); color: var(--label); font-size: var(--fs-13); border-bottom: 1px solid var(--sep); text-align: center; }
.demo-bar[hidden] { display: none; }
.demo-bar a { font-weight: 600; color: var(--brand-text); }
.demo-roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.demo-roles li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.demo-role { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.demo-role b { font-size: var(--fs-17); }
.demo-role span { color: var(--label2); font-size: var(--fs-13); }
.demo-roles .btn { flex: none; }
.demo-notes { margin: 0; padding-left: 1.2em; color: var(--label2); display: flex; flex-direction: column; gap: 4px; }

/* 11/16 デザイナー3回目：未確認を先頭に・割れない */
.tally4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tally4 dd small { font-size: var(--fs-13); font-weight: 400; margin-left: 0; }
.tally5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tally .tally-warn dt, .tally .tally-warn dd { color: var(--warn-text); }
@media (max-width: 520px) { .tally5 dt { font-size: var(--fs-13); } .tally5 dd { font-size: var(--fs-20, 20px); } }
/* 同意書・保険：未配置の生徒は既定でたたむ（描き直さずに切り替える） */
.consent-collapsed tr.consent-unplaced { display: none; }
/* 中止・遅れの連絡：選んだ方を塗りとチェックで示す（11/16 デザイナー4回目） */
.seg-strong .seg-item input:checked + span { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.seg-strong .seg-item input:checked + span::before { content: "✓"; margin-right: 4px; }
.alert-preview { padding: 8px 12px; border-left: 3px solid var(--sep); background: var(--fill); }
.day-alert { margin-top: 8px; }
.consent-table tr[hidden] { display: none; }
@media (max-width: 699px) {
  /* 同意書・保険：スマホは1人2段（上段＝学籍番号・名字・配置先、下段＝同意書・保険） */
  .consent-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .consent-table, .consent-table tbody { display: block; }
  .consent-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid var(--sep); }
  .consent-table td { display: block; padding: 0; }
  .consent-table td[data-label="学籍番号"], .consent-table td[data-label="名字"] { font-weight: 600; }
  .consent-table td[data-label="学科"] { display: none; }
  .consent-table td[data-label="配置先"] { grid-column: 1 / -1; color: var(--label2); font-size: var(--fs-13); }
  .consent-table td[data-label="同意書"]::before, .consent-table td[data-label="保険"]::before { content: attr(data-label); display: block; color: var(--label2); font-size: var(--fs-13); }
  .consent-table .inline-check { min-height: 44px; }
}
.consent-table th { text-align: left; }
/* 出欠の行：スマホは名前を1段目に全幅、ボタンは2段目（11/16 デザイナー5回目：取り消すを足して名前が縦に折れた） */
@media (max-width: 699px) {
  html .att-row, html .solo .att-row, html[data-role="duty"] .att-row { display: grid; grid-template-columns: minmax(0, 1fr); height: auto; min-height: 56px; padding: 8px 0; row-gap: 4px; }
  html .att-who .no { white-space: nowrap; }
  html .att-btns, html .solo .att-btns, html[data-role="duty"] .att-btns { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; max-width: none; }
  /* 同意書・保険のカード：1段目に学籍番号・名字・配置先を横に並べる */
  .consent-table tr { grid-template-columns: auto auto minmax(0, 1fr); }
  .consent-table td[data-label="配置先"] { grid-column: auto; align-self: baseline; }
  .consent-table td[data-label="同意書"] { grid-column: 1 / 2; }
  .consent-table td[data-label="保険"] { grid-column: 2 / 4; }
}
.btn.btn-danger:disabled { background: var(--fill); color: var(--label2); border-color: var(--sep); opacity: 1; }
/* 開始時刻の欄は場所を空けたまま隠す（出し入れでシートが動かない） */
.alert-at.is-off { display: none; }

/* 生徒の画面：自分の生徒番号を大きく（現場で番号を見せる。11/16 デザイナー6回目） */
.my-no { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.my-no b { font-size: var(--fs-26); line-height: 1.2; }
.my-no small { flex-basis: 100%; color: var(--label2); }
.names-missing { align-items: center; margin-bottom: 12px; }
.names-missing > span { flex: 1 1 260px; }

/* 1年の段階（石井先生 2026-11-16）。罫線と色帯だけ。 */
.stage-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stage-steps > li { display: flex; flex-direction: column; gap: 0; padding: 8px 8px 8px 8px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.stage-steps > li:first-child { border-left: 0; }
.stage-steps b { font-size: var(--fs-13); }
.stage-steps span { font-size: var(--fs-13); color: var(--label2); font-variant-numeric: tabular-nums; }
.stage-steps small { font-size: var(--fs-13); color: var(--label2); }
.stage-steps .stage-now { background: none; }
.stage-steps .stage-now small { color: var(--brand); font-weight: 600; }
.stage-steps .stage-past b, .stage-steps .stage-past span, .stage-steps .stage-none b, .stage-steps .stage-none span { color: var(--label2); }
@media (max-width: 640px) {
  .stage-steps { grid-template-columns: 1fr; }
  .stage-steps > li { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; border-left: 0; padding: 8px 8px; }
  .stage-steps b { min-width: 7em; }
}
.stage-lock { padding: 8px 12px; background: var(--tint); font-size: var(--fs-13); }
.plain-fieldset { display: contents; border: 0; margin: 0; padding: 0; min-width: 0; }

/* 石井先生 11/16：生徒の「確認しました」・学校の「見ました」・地図・訪問の記録・印刷の承認 */
.chip-ack { display: inline-block; margin-left: 4px; padding: 0 4px; border-left: 0; color: var(--good); font-size: var(--fs-13); font-weight: 600; line-height: 20px; white-space: nowrap; }
.ack-done { margin: 8px 0 0; padding: 4px 8px; border-left: 0; background: none; color: var(--good); font-size: var(--fs-13); font-weight: 600; }
.sp-address { margin: 4px 0 0; font-size: var(--fs-13); }
.sp-address a { margin-left: 8px; white-space: nowrap; }
.visit-log { margin-bottom: 8px; }
.print-flow { margin: 12px 0; padding: 8px 12px; border-top: 1px solid var(--sep-strong); border-bottom: 1px solid var(--sep-strong); }
.print-steps { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; font-size: var(--fs-13); }
.print-flow .row-actions { margin-top: 8px; }

/* 企業のログイン（ID とパスワード）：入口の欄は縦に並べる・ID は読み上げやすい等幅 */
.enter-login { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.center-card .enter-login .btn { align-self: flex-start; }
.login-id-line { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-15); }
.login-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-17); letter-spacing: .06em; }
.notice.login-temp { flex-direction: column; align-items: flex-start; background: var(--warn-bg); color: var(--warn-text); }
.notice.login-temp p { margin: 0; }
.row-main small .login-id { font-size: inherit; letter-spacing: .04em; }
.login-pair { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; align-items: baseline; }
.login-pair dt { color: var(--label2); font-size: var(--fs-13); }
.login-pair dd { margin: 0; overflow-wrap: anywhere; }
.login-form .field .field-error { margin-top: 4px; }

/* 企業のメニュー：1年の進め方（5段）を順に並べ、今の段階を示す（11/16 本人「メニューで操作のルートを案内」）。 */
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 8px -8px; font-size: var(--fs-13); font-weight: 600; color: var(--label2); }
.side-head small { font-weight: 400; font-variant-numeric: tabular-nums; }
.side-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.step-item { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 4px 8px 4px 8px; color: var(--label); text-decoration: none; border-left: 0; }
@media (hover: hover) { .step-item:hover { background: var(--fill); } }
.step-n { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border: 1px solid var(--sep-strong); background: var(--bg); color: var(--label2); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.step-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.step-t b { font-size: var(--fs-15); font-weight: 600; }
.step-t small { font-size: var(--fs-13); color: var(--label2); }
.step-past .step-t b { font-weight: 600; color: var(--label2); }
/* 今の時期は番号の塗りと太字だけ。帯と左の線は「今いるページ」(.on) だけに使う（二重に光らせない）。 */
.step-now .step-n { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.step-now .step-t small { color: var(--brand-text); font-weight: 600; }
.step-item.on .step-t b { color: var(--brand-text); font-weight: 600; }
.step-item.on { background: var(--fill); }
/* ホームの「今やること」と、押せる5段 */
.now-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 20px; background: var(--action-bg); border-top: 3px solid var(--action-text); }
.now-label { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: var(--fs-13); font-weight: 600; color: var(--action-text); }
.now-label span { color: var(--label); font-size: var(--fs-15); }
.now-card > p:not(.now-label) { font-size: var(--fs-15); }
.stage-steps-links .stage-link { display: flex; flex-direction: column; gap: 0; margin: -8px -8px -8px -8px; padding: 8px 8px 8px 8px; color: inherit; text-decoration: none; min-height: 100%; }
@media (hover: hover) { .stage-steps-links .stage-link:hover { background: var(--fill); } }
.stage-steps-links .stage-link b { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
@media screen and (min-width: 1100px) { .stage-box-links { display: none; } }
.next-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .stage-steps-links > li { padding: 0; }
  .stage-steps-links .stage-link { flex: 1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; padding: 8px; min-height: 44px; }
  .stage-steps-links .stage-link b { min-width: 7em; }
}
/* 企業の下のメニューは6つまで並ぶので、狭い画面では字を詰める */
@media (max-width: 400px) { html[data-role="company"] .tabbar .nav-item span { font-size: var(--fs-13); letter-spacing: normal; } }

/* ホームの進め方はスマホだけ・畳んで1行（PCはサイドに同じものがある）。 */
.stage-fold { border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep); }
.stage-fold > summary { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; padding: 8px 0; cursor: pointer; font-size: var(--fs-15); }
.stage-fold > summary b { color: var(--brand-text); }
.stage-fold[open] > summary { border-bottom: 1px solid var(--sep); }
/* 1100px 以上はサイドに5段があるので畳みは出さない（700〜1099px は下の 11/17 の規則）。 */
@media screen and (min-width: 1100px) { .stage-fold { display: none; } }
@media print { .stage-fold { display: none; } }
.pane .group[id], .pane .next-card[id] { scroll-margin-top: 12px; }

/* 企業のサイド（11/16 再レビュー）：見出しは「進め方」の1語、学校名・年度は下の行。 */
.side-head-stack { flex-direction: column; align-items: flex-start; gap: 0; }
.side-foot-row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.side-foot a[aria-current="page"] { color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* 背の低い画面では、今の段階だけ時期を出す（サイドを1画面に収める）。 */
@media screen and (min-width: 1100px) and (max-height: 760px) {
  .step-item:not(.step-now) .step-t small { display: none; }
  .step-item { min-height: 36px; align-items: center; }
}
/* ホームの畳み：2行目も「＞」の後ろから。スマホでは期間を省く。 */
.stage-fold > summary .fold-t { flex: 1; min-width: 0; }
@media (max-width: 699px) { .stage-fold .fold-span { display: none; } }
/* 11/17 再レビュー：当日・前日の訪問は注意の色。語の途中で折らない。畳みの中は見出しを重ねない。 */
.now-card.now-warn { background: var(--action-bg); border-top-color: var(--action-text); }
.now-card.now-warn .now-label span { color: var(--action-text); }
.nw { white-space: nowrap; }
.stage-fold .stage-box > .group-title, .stage-fold .stage-box > p.muted { display: none; }
.eval-table thead th.score { text-align: center; }
@media (max-width: 699px) { .eval-table thead th.score { text-align: left; } }

/* 11/17 デザイナー4回目：700〜1099px の細いサイドにも 1〜5 を出す（番号と短い名前だけ）。畳みはスマホだけ。 */
@media (min-width: 700px) and (max-width: 1099px) {
  .side-steps { display: flex; width: 100%; }
  .side-steps > li { flex: none; min-width: 0; }
  .side > .side-head:not(.side-head-stack) { display: none; }
  .side .side-head-stack { display: flex; margin: 0; align-items: center; font-size: var(--fs-13); }
  .side .side-head-stack small { display: none; }
  .side-steps .step-item { flex-direction: column; align-items: center; gap: 0; padding: 4px 0 4px 0; text-align: center; min-height: 44px; }
  .side-steps .step-t { align-items: center; }
  .side-steps .step-t b { font-size: var(--fs-13); line-height: 1.25; }
  .side-steps .step-t small { display: none; }
  .stage-fold { display: none; }
}
.stage-fold { margin-bottom: 4px; }
/* 評価表：空のコメントはほかの欄と同じ中央の「—」。スマホは番号とコメントにも見出し。 */
.eval-table td.cmt-empty { text-align: center; vertical-align: middle; }
.eval-table td.cmt-empty small { display: none; }
@media screen and (max-width: 699px) {
  .eval-table tbody th[data-label]::before, .eval-table td.cmt[data-label]::before { content: attr(data-label) "："; color: var(--label2); font-weight: 400; }
  .eval-table td.cmt-empty { text-align: left; }
  /* ページ内リンク：「このページ」を1行目に置き、リンクの左端をそろえる。 */
  .case-toc .toc-label { flex-basis: 100%; }
}
.flow-note { margin: -4px 0 8px; }

/* 11/17 デザイナー5回目 */
/* 細いサイドの1〜5：番号の下に1語（今／済／11/19〜）。今の段階＝塗り＋「今」、開いているページ＝左の線だけ。 */
.step-w { display: none; }
@media (min-width: 700px) and (max-width: 1099px) {
  .side-steps .step-w { display: block; font-style: normal; font-size: var(--fs-13); line-height: 1.2; color: var(--label2); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .side-steps .step-now { background: none; }
  .side-steps .step-now .step-w { color: var(--brand-text); font-weight: 600; }
  .side-steps .step-item.on { background: none; }
  .side-steps .step-now.on { background: var(--tint); }
  .side-steps .step-item.on .step-t b { color: var(--label); font-weight: 600; }
}
/* 今やることが2つ（今日の出欠と返事）のとき */
.now-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.now-list > li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: var(--fs-15); }
.now-list > li + li { padding-top: 12px; border-top: 1px solid var(--sep); }
.now-list > li.now-item-warn > p { color: var(--action-text); font-weight: 600; }
/* 依頼の節の見出しの横に学校名・学科（節へ飛ぶと上の見出しが見えないため） */
.group-ctx { color: var(--label2); font-size: var(--fs-13); font-weight: 400; }
/* 評価表の見出し：700〜1099px は短い語で1行に */
.eval-table .th-short { display: none; }
@media (min-width: 700px) and (max-width: 1099px) {
  .eval-table thead th.score { white-space: nowrap; }
  .eval-table thead .th-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .eval-table thead .th-short { display: inline; }
}
/* 出欠の日付タブ（スマホ）：3つまでは均等に並べて収め、4つ以上だけ横に送る */
@media (max-width: 699px) {
  .day-tabs:not(.case-links):not(.board-tabs):not(:has(> .day-tab:nth-child(4))) { overflow-x: visible; }
  .day-tabs:not(.case-links):not(.board-tabs):not(:has(> .day-tab:nth-child(4))) > .day-tab { flex: 1 1 0; min-width: 0; padding-inline: 4px; white-space: normal; text-align: center; }
  .day-tabs:not(.case-links):not(.board-tabs):not(:has(> .day-tab:nth-child(4))) > .day-tab small { display: block; }
}
/* 現場の画面：電話は下の1つだけ（けが・体調・困ったとき）。 */
.duty-phone .btn.btn-danger-outline { color: var(--bad); background: #fff; border-color: var(--bad); }
.kana-lead { font-size: var(--fs-15); font-weight: 600; }

/* 11/17 デザイナー6回目 */
/* 細いサイド（700〜1099px）：1〜5 と 依頼・連絡・オプション の間に線と短い見出し（76px に収まる）。 */
@media (min-width: 700px) and (max-width: 1099px) {
  .side > .side-head.side-head-any { display: block; margin: 0; padding-top: 4px; border-top: 1px solid var(--sep-strong); font-size: var(--fs-13); font-weight: 600; text-align: center; color: var(--label2); }
  /* 依頼の「このページ」は折り返して全部見せる（横に送るスクロールバーを出さない） */
  .case-links.case-toc { flex-wrap: wrap; overflow-x: visible; }
}
/* 進め方の畳み：見ている段階が今の段階と違うときの1語 */
.stage-fold .fold-here:empty { display: none; }
.stage-fold .fold-here { color: var(--label2); }
.stage-fold .fold-here::before { content: '・'; }
/* スマホ：畳みの1行は上に貼りつく（影なし・下に線）。開いているときは貼りつかない。 */
@media (max-width: 699px) {
  .stage-fold { margin: -16px -16px 4px; padding: 0 16px; background: var(--bg); border-top: 0; }
  /* 開いても貼りついたまま。1〜5は帯の下に重ねて出す（ページは動かさない・長ければ中だけ送る・11/17 デザイナー8回目）。 */
  .stage-fold { position: sticky; top: 0; z-index: 5; }
  .stage-fold[open] > .stage-box { position: absolute; left: 0; right: 0; top: 100%; max-height: 60vh; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 4px 16px 12px; background: var(--bg); border-bottom: 1px solid var(--sep-strong); }
  /* 貼りつく1行の高さ＋8px（高さは app.js が測って --band-h に入れる。測れないときは 68px）。 */
  .pane:has(.stage-fold) .group[id], .pane:has(.stage-fold) .next-card[id] { scroll-margin-top: calc(var(--band-h, 68px) + 8px); }
}

/* 11/17 デザイナー7回目 */
/* サイドの1〜5：今の段階＝番号の塗り＋薄い帯、表示中＝太い左の線（アクセント色）＋「表示中」の小さな語。帯は「今」だけに使う。 */
.step-item { border-left-width: 0; padding-left: 8px; }
.side-steps .step-now { background: none; }
.side-steps .step-item.on { background: var(--fill); }
.side-steps .step-now.on { background: var(--tint); }
.side-steps .step-item.on .step-t b { color: var(--label); font-weight: 600; }
.side-steps .step-now .step-t b { font-weight: 600; }
.step-here { display: none; font-style: normal; font-size: var(--fs-13); line-height: 1.2; font-weight: 600; color: var(--brand-text); }
.side-steps .step-item.on .step-here { display: block; }
@media (min-width: 700px) and (max-width: 1099px) {
  /* 900×700 でも「IDとパスワード」まで1画面に収める：段の高さと間を詰める */
  .side { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .side-steps { gap: 0; }
  .side-steps .step-item { min-height: 0; padding-top: 4px; padding-bottom: 4px; gap: 1px; }
  .side-steps .step-n { width: 20px; height: 20px; }
  .side-steps .step-w, .step-here { line-height: 1.1; }
  .side-items .nav-item { padding-top: 4px; padding-bottom: 4px; }
}
/* メールのリンクなどで節へ着いたとき：位置を合わせるだけで光らせない（apple r2 軽6） */
/* 評価表：「出席・時間」を付ける前は、ここまでの出欠（出2・遅1） */
.eval-table .att-so-far { color: var(--label2); font-size: var(--fs-13); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 現場の画面：本人確認が済んでいない生徒の印と、出欠の上の1行 */
.kana-first { margin: 0 0 4px; color: var(--warn-text); font-weight: 600; }
.att-who .kana-not { flex: none; white-space: nowrap; }

/* 11/17 デザイナー8回目 */
/* 細いサイド：今の段階を表示中のときは「今・表示中」（両方の語を残す） */
@media (min-width: 700px) and (max-width: 1099px) {
  .side-steps .step-now.on .step-here { font-size: var(--fs-13); letter-spacing: normal; white-space: nowrap; }
}
/* 評価表のここまでの出欠（出席2日・遅刻1日）：狭い欄では「・」で折り返す */
.eval-table .att-so-far { white-space: normal; word-break: keep-all; }
/* 現場の画面：本人確認の前は出席を押せない */
.att-btns .btn:disabled, .att-all .btn:disabled { opacity: 1; color: var(--label2); background: var(--fill); border-color: var(--sep); cursor: default; }
/* スマホ：会社名の帯は依頼のページでも見えるように、進め方の1行と一緒に上に貼りつける（11/17 デザイナー8回目） */
@media (max-width: 699px) {
  .pane:has(.stage-fold) > .mobile-identity { position: sticky; top: 0; z-index: 6; height: 28px; }
  /* `#main .stage-fold { top: 0 }`（id つき）に負けないよう、id つきで書く。負けると2つの帯の top が同じになり重なる（11/17 デザイナー） */
  #main.pane:has(.stage-fold) .stage-fold { top: 28px; }
}

/* 11/17 デザイナー9回目 */
/* スマホの帯：「次は」を残す。開いた1〜5では見ているページの段階に左の線と「表示中」。開いている間は下を薄く暗くする（影なし）。 */
.stage-fold .stage-steps li.is-here { padding-left: 0; }
.stage-fold .stage-steps li.is-here b::after { content: '　表示中'; font-size: var(--fs-13); font-weight: 600; color: var(--brand-text); }
@media (max-width: 699px) {
  .stage-fold[open]::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; top: var(--band-h, 68px); background: #000; opacity: .2; z-index: -1; }
}
/* 評価表（スマホ）：空のコメントもほかの行と同じく、左に見出し・右に値 */
@media screen and (max-width: 699px) {
  .eval-table tr > td.cmt-empty { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; gap: 8px; text-align: left; }
  .eval-table td.cmt-empty[data-label]::before { content: attr(data-label); color: var(--ink-2); }
}

/* 11/17 デザイナー10回目 */
/* 細いサイド（900×700）：「進め方」の見出しを省き、行を詰めて「IDとパスワード」まで1画面に */
@media (min-width: 700px) and (max-width: 1099px) {
  .side .side-head-stack { display: none; }
  .side { gap: 4px; padding-top: 8px; }
  .side-items .nav-item { padding-top: 0; padding-bottom: 0; gap: 1px; }
  .side > .side-head.side-head-any { padding-top: 4px; }
  /* 1〜5 と「いつでも」の項目を同じく中央にそろえる */
  .side:has(> .side-steps) .side-items .nav-item { align-items: center; text-align: center; }
}
/* スマホの帯：左の線は「表示中」だけ。今の段階は塗りと字だけ（PC と同じ）。どの行も左端をそろえる。 */
@media (max-width: 699px) {
  .stage-fold .stage-steps > li { border-left: 0; padding-left: 0; }
  .stage-fold .stage-steps .stage-now { border-top: 0; margin-top: 0; }
  .stage-fold .stage-steps .stage-now b { font-weight: 600; }
  .stage-fold .stage-steps li.is-here { padding-left: 0; }
  /* 開いた帯の見出しの行は暗くしない */
  .stage-fold[open] > summary { position: relative; z-index: 1; background: var(--bg); }
}
/* 帯の開け閉めの印：細い「⌟」に見えないよう、太く濃く */
.stage-fold > summary::before { width: 8px; height: 8px; border-right: 2px solid var(--label2); border-bottom: 2px solid var(--label2); }
.stage-fold .fold-here.is-next::before { content: none; }
/* 本人確認：全員済んだら1行にたたむ（開けば見直せる） */
.kana-done > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.kana-done > summary .seg-n { color: var(--good); font-weight: 600; }
.kana-done .kana-open { margin-left: auto; font-size: var(--fs-13); font-weight: 400; color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.kana-done[open] .kana-open { display: none; }
.kana-count { margin: 0 0 4px; }
/* 日付タブ：選んだ日は下線だけ。:hover の塗りは (hover: hover) の中だけで当てる（11/19 apple r3 軽2：外に置いた打ち消しの規則は消した） */

/* 11/17 デザイナー11回目 */
/* スマホの帯：今と違う段階を見ているときは2行目に「表示中：2. 実施登録」（番号と名前の間で折れない） */
.stage-fold .fold-here:not(.is-next):not(:empty) { display: block; white-space: nowrap; }
.stage-fold .fold-here:not(.is-next)::before { content: none; }
/* 細いサイド：「いつでも」の見出しも消して区切り線だけに。項目は1〜5と同じく中央そろえ */
@media (min-width: 700px) and (max-width: 1099px) {
  .side > .side-head.side-head-any { font-size: 0; padding-top: 0; height: 0; overflow: hidden; }
  .side:has(> .side-steps) .side-items .nav-item { justify-content: center; }
  .side-steps .step-item { text-align: center; }
  .side:has(> .side-steps) .side-foot { justify-content: center; align-items: center; text-align: center; }
}
/* 本人確認をたたんだ1行は大見出しより弱い細い線（下の出欠の数が中身に見えない） */
.kana-done > summary.group-title { font-size: var(--fs-15); border-bottom-width: 1px; border-bottom-color: var(--sep); padding-bottom: 4px; margin-bottom: 8px; }
.kana-done[open] > summary.group-title { margin-bottom: 4px; }

/* 11/17 デザイナー12回目 */
@media (min-width: 700px) and (max-width: 1099px) {
  /* 依頼のバッジはアイコンの右上に重ねる（項目を左へ押さない） */
  html[data-role="company"] .side .nav-item { position: relative; }
  html[data-role="company"] .side .nav-item .badge { position: absolute; top: -6px; left: calc(50% + 8px); right: auto; margin: 0; height: 16px; min-height: 16px; line-height: 16px; }
  /* 今の段階は塗りで分かるので「今」の1語は出さない */
  .side-steps .step-now .step-w { display: none; }
}
.rows .row-main > small.nw { display: block; }

/* 11/17 先生のメニュー：1年の10段（企業の5段と同じ部品）。名前は細いサイドとタブで短い語。 */
.step-short { display: none; }
.side-steps-school .step-item { position: relative; }
.side-steps-school .step-item .badge { margin-left: auto; align-self: center; }
.step-sub { display: block; margin: 0 0 0 36px; padding: 4px 8px; font-size: var(--fs-13); color: var(--label2); text-decoration: none; border-left: 0; min-height: 28px; }
@media (hover: hover) { .step-sub:hover { background: var(--fill); } }
.step-sub.on { color: var(--label); font-weight: 600; background: var(--fill); }
@media screen and (min-width: 1100px) and (max-height: 860px) {
  .side-steps-school .step-item:not(.step-now) .step-t small { display: none; }
  .side-steps-school .step-item { min-height: 34px; align-items: center; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .side-steps-school .step-long { display: none; }
  .side-steps-school .step-short { display: inline; }
  .side-steps-school .step-w { display: none; }
  .side-steps-school .step-item .badge { position: absolute; top: 0; left: calc(50% + 6px); margin: 0; height: 16px; min-height: 16px; line-height: 16px; }
  .step-sub { margin: 0; padding: 0 0; text-align: center; font-size: var(--fs-13); min-height: 24px; }
}
.flow-step.flow-now .flow-no { background: var(--brand); color: #fff; text-align: center; margin-right: 4px; font-weight: 600; }
/* 11/17 デザイナー（10段の1周目）：細いサイドに今／済を戻す・質問するを下に固定・帯の一覧の巡回と列幅・ホームの段の札 */
@media (min-width: 700px) and (max-width: 1099px) {
  .side-steps-school .step-w { display: block; font-size: var(--fs-13); line-height: 1; }
  .side-steps-school .step-now .step-w { display: block; }
  .side-steps-school .step-item { padding-top: 4px; padding-bottom: 4px; }
}
.side:has(> .side-steps-school) .side-foot { position: sticky; bottom: -12px; margin-bottom: -12px; padding-bottom: 12px; background: var(--side); }
.stage-steps-links > li.stage-sub.is-here { border-left: 0; }
@media (max-width: 699px) { .stage-steps-links .stage-link b { min-width: 9.5em; } }
.next-stage { margin: 0 0 4px; font-size: var(--fs-13); color: var(--label2); }
.next-stage b { color: var(--brand-text); }
/* 10段2周目：前に残った段は「まだ」を注意の色で。いつでもの3つは段の上へ移した */
@media (min-width: 700px) and (max-width: 1099px) {
  .side-steps-school .step-item.step-next .step-w { color: var(--warn-text); font-weight: 600; }
}
.stage-steps-links > li.stage-sub b { padding-left: 1em; }
.side-items + .side-head-stack { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 0; }
/* 10段3周目：細いサイドでは「質問する」を固定しない（今の段を覆うため）。巡回の件数・帯の「まだ」の色 */
@media (max-width: 1099px) { .side:has(> .side-steps-school) .side-foot { position: static; margin-bottom: 0; } }
@media (min-width: 1100px) and (max-height: 860px) { .side:has(> .side-steps-school) .side-items .nav-item { min-height: 36px; } }
.step-sub small { display: inline; margin-left: 4px; font-size: var(--fs-13); font-weight: 400; color: var(--label2); }
@media (min-width: 700px) and (max-width: 1099px) { .step-sub small { display: none; } }
.stage-steps-links > li.stage-late small { color: var(--warn-text); font-weight: 600; }
@media (min-width: 1100px) and (max-height: 860px) { .side:has(> .side-steps-school) { gap: 4px; } }

/* 体験の入口（#/taiken）と、役の画面の上の帯（11/17 本人「全ての流れを私が体験してみたい」） */
.center-card.tour { max-width: 820px; }
.tour-today { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.tour-today b { font-size: var(--fs-26); line-height: 1.3; }
.tour-today span { color: var(--brand-text); font-weight: 600; }
.tour-periods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.tour-periods .btn { width: 100%; min-height: 56px; flex-direction: column; align-items: flex-start; gap: 0; white-space: normal; text-align: left; }
.tour-periods .btn span { font-weight: 400; font-size: var(--fs-13); }
.tour-step { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.tour-set { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.tour-set label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-13); color: var(--label2); }
.tour-set input { min-height: var(--ctl); }
.tour-guide { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.tour-guide th, .tour-guide td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tour-guide thead th { color: var(--label2); font-weight: 600; }
.tour-guide tbody th { white-space: nowrap; }
@media (max-width: 560px) {
  .tour-guide thead { display: none; }
  .tour-guide tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tour-guide th, .tour-guide td { display: block; padding: 0 0; border: 0; }
}
.demo-bar[data-tour] { align-items: center; }
.demo-bar[data-tour] .btn { min-height: 32px; padding: 4px 8px; background: #fff; border: 1px solid var(--sep); }
.tour-bar-period { display: inline-flex; align-items: center; gap: 4px; }
.tour-bar-period select { min-height: 32px; max-width: 260px; }

/* 体験の入口：左に操作、右に役の画面（iframe）を並べる。docs/meibo-screens.md「体験」 */
html.tour-hub #app { width: 360px; overflow-y: auto; border-right: 1px solid var(--sep); background: var(--group); }
.tour-rail { display: flex; flex-direction: column; gap: 0; padding: 16px 16px 40px; outline: none; }
.tour-rail h1 { font-size: var(--fs-17); font-weight: 600; }
.tour-rail > .muted { margin-top: 4px; font-size: var(--fs-13); }
.tour-sec { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tour-sec h2 { font-size: var(--fs-15); font-weight: 600; }
.tour-sec .muted { font-size: var(--fs-13); }
.tour-rail .tour-today b { font-size: var(--fs-20, 20px); }
.tour-rail .tour-periods { grid-template-columns: 1fr; gap: 4px; }
.tour-rail .tour-periods .btn { min-height: 36px; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; }
.tour-rail .tour-periods .btn b { font-size: var(--fs-13); }
.tour-rail .tour-periods .btn span { font-size: var(--fs-13); }
.tour-rail .tour-step, .tour-rail .tour-set { gap: 4px; }
.tour-rail .tour-set input { min-height: 32px; }
.tour-rail .demo-roles li { gap: 8px; padding: 8px 0; }
.tour-rail .demo-role b { font-size: var(--fs-13); }
.tour-rail .demo-role span { font-size: var(--fs-13); }
.tour-rail .btn-small, .tour-rail .demo-roles .btn { min-height: 32px; padding: 4px 12px; font-size: var(--fs-13); }
.tour-how summary { cursor: pointer; font-weight: 600; font-size: var(--fs-15); }
.tour-guide-list { list-style: none; margin: 8px 0 0; padding: 0; }
.tour-guide-list li { display: flex; flex-direction: column; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-13); }
.tour-guide-list li span:nth-child(2) { color: var(--brand-text); font-size: var(--fs-13); }

#tour-ws { position: fixed; top: var(--bar-h); left: 360px; right: 0; bottom: 0; display: flex; flex-direction: column; background: #E9EDF2; }
#tour-ws[hidden] { display: none; }
.tws-bar { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 4px 12px; background: #fff; border-bottom: 1px solid var(--sep); }
.tws-tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.tws-tab { display: inline-flex; align-items: stretch; border: 1px solid var(--sep); background: #fff; }
.tws-tab button { border: 0; background: none; font: inherit; font-size: var(--fs-13); padding: 4px 8px; min-height: 32px; cursor: pointer; color: var(--label); }
.tws-tab .tws-x { padding: 4px 8px; color: var(--label2); border-left: 1px solid var(--line); }
.tws-tab.on { border-color: var(--brand); border-bottom-width: 3px; }
.tws-tools .btn { min-height: 32px; padding: 4px 12px; font-size: var(--fs-13); }
.tws-tab button[aria-selected="true"] { font-weight: 600; color: var(--brand-text); }
.tws-tools { display: flex; align-items: center; gap: 12px; font-size: var(--fs-13); }
.tws-two { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tws-empty { padding: 4px 0; color: var(--label2); font-size: var(--fs-13); }
.tws-frames { flex: 1; min-height: 0; display: flex; gap: 8px; padding: 8px; }
.tws-pane { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.tws-pane[hidden] { display: none; }
.tws-pane iframe { width: 100%; height: 100%; border: 1px solid var(--sep); background: #fff; }
.tws-pane.phone iframe { width: 390px; max-width: 100%; }
@media (max-width: 899px) {
  html.tour-hub body { overflow: auto; }
  html.tour-hub #app { width: auto; height: auto; overflow: visible; border-right: 0; }
  #tour-ws { position: static; height: 88vh; }
  .tws-frames.two { flex-direction: column; }
}

/* 11/17 本人「メニューがとてもみにくい」：700〜1099px もサイドは 216px なので、中身も PC と同じ横並び（番号＋名前）にする。
   上の「細いサイド」用の積み重ねた形（番号の下に短い語）はここで打ち消す。 */
@media (min-width: 700px) and (max-width: 1099px) {
  html .side { padding: 16px 8px 12px; }
  html .side > .side-head, html .side .side-head-stack { display: flex; align-items: flex-start; margin: 0 8px -8px; min-height: auto; font-size: var(--fs-13); line-height: 1.6; }
  html .side > .side-head.side-head-any { height: auto; overflow: visible; padding-top: 0; border-top: 0; text-align: left; margin: 4px 8px -8px; font-size: var(--fs-13); font-weight: 600; color: var(--label2); }
  html .side .side-foot, html .side:has(> .side-steps) .side-foot { align-items: flex-start; justify-content: normal; text-align: start; }
  html .side:has(> .side-steps) .side-foot.side-foot-row { align-items: center; }
  html .side:has(> .side-steps-school) .side-foot { position: sticky; margin-top: auto; margin-bottom: -12px; }
  html .side .side-items .nav-item, html .side:has(> .side-steps) .side-items .nav-item { flex-direction: row; gap: 8px; justify-content: normal; align-items: center; text-align: left; line-height: 1.6; min-height: 36px; padding: 4px 8px; }
  html .side-steps { gap: 0; }
  html .side-steps .step-item { flex-direction: row; align-items: flex-start; gap: 8px; min-height: 34px; padding: 4px 8px 4px 4px; text-align: start; }
  html .side-steps .step-n { width: 22px; height: 22px; }
  html .side-steps .step-t { align-items: normal; text-align: start; }
  html .side-steps .step-t b { font-size: var(--fs-15); line-height: 1.3; text-align: start; }
  html .side-steps .step-t small { display: block; text-align: start; }
  html .side-steps .step-w, html .side-steps-school .step-w, html .side-steps-school .step-now .step-w { display: none; }
  html .step-here, html .side-steps .step-now.on .step-here { text-align: start; font-size: var(--fs-13); letter-spacing: normal; white-space: normal; line-height: 1.2; }
  html .side-steps-school .step-long { display: inline; font-size: var(--fs-15); }
  html .side-steps-school .step-short { display: none; }
  html .side-steps-school .step-item .badge { position: static; margin-left: auto; align-self: center; min-width: 20px; height: auto; min-height: 0; padding: 0 4px; line-height: 20px; }
  html .side .nav-item .badge { position: static; margin-left: auto; min-width: 20px; padding: 0 4px; line-height: 20px; }
  html[data-role="company"] .side .nav-item .badge { position: static; margin-left: auto; height: 20px; min-height: 20px; line-height: 20px; padding: 0 4px; }
  html .step-sub { margin: 0 0 0 36px; padding: 4px 8px; min-height: 28px; font-size: var(--fs-13); text-align: start; }
  html .step-sub small { display: inline; }
  /* 企業の PC は先生より間がゆったり（実測で合わせる） */
  html[data-role="company"] .side { gap: 12px; }
  html[data-role="company"] .side .side-items .nav-item, html[data-role="company"] .side:has(> .side-steps) .side-items .nav-item, html[data-role="company"] .side-steps .step-item { min-height: 44px; }
  html[data-role="company"] .side .side-head-stack { margin: 4px 8px -8px; }
  html[data-role="company"] .side .side-head-stack small { display: block; }
  html[data-role="company"] .side > .side-head.side-head-any { display: flex; align-items: baseline; text-align: start; }
}
@media (min-width: 700px) and (max-width: 1099px) and (max-height: 860px) {
  html .side-steps-school .step-item:not(.step-now) .step-t small { display: none; }
  html .side-steps-school .step-item { min-height: 34px; align-items: center; }
}

/* ───────── 入口の画面（ログイン・生徒の入口・期限切れ・つながらない・デモの入口）11/18 本人「Googleのログイン画面をパクって」 ─────────
   薄い地の中央に白い面。PC幅は左に見出し・右に入力の2列、900px未満は1列の面、600px未満は全画面の白。
   入口だけは Google にならって面の角を大きく丸め、ボタンを丸くする（中の画面の「角丸の箱を使わない」決まりは入口の外では変えない）。
   「骨組み」の節（角丸・px の字を使わない決まり・skeleton-1117 のテスト）より前に置く。影は使わない。色はこのアプリの主色（--brand）。ヘッダーの帯は出さず、ロゴは面の左上に置く。 */
body:has(.gl) { --bar-h: 0px; background: var(--canvas); overflow: auto; }
body:has(.gl) .bar { display: none; }
body:has(.gl) #app { height: auto; min-height: 100vh; min-height: 100dvh; }
.gl { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px 24px 16px; background: var(--canvas); }
.gl-card { display: grid; align-content: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr; column-gap: 48px; width: 100%; max-width: 1040px; min-height: 384px; padding: 36px 36px 32px; background: var(--bg); border-radius: 28px; }
.gl-wide .gl-card { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.gl-head { display: flex; flex-direction: column; min-width: 0; }
.gl-logo { display: block; align-self: flex-start; width: auto; height: 32px; margin-bottom: 24px; }
.gl-title { margin: 0 0 12px; font-size: var(--fs-26); font-weight: 400; line-height: 1.25; color: var(--label); word-break: auto-phrase; overflow-wrap: anywhere; }
.gl-sub { font-size: var(--fs-15); line-height: 1.5; color: var(--label); }
.gl-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-top: 56px; }
/* 主ボタンは面の右下に寄せる（中身が短いとき） */
.gl-body > .gl-actions:last-child, .gl-form > .gl-actions:last-child { margin-top: auto; padding-top: 16px; }
.gl-body > .gl-form:only-child { flex: 1 0 auto; }
.gl-form, .gl .enter-login { display: flex; flex-direction: column; gap: 16px; max-width: none; }

/* 枠線の入力欄。ラベルは欄の中、入力中・入力済みは枠の上に浮く。フォーカスで枠が主色・太く。 */
.gl-field { position: relative; display: block; min-width: 0; }
.gl .gl-field input.gl-in:not([type="checkbox"]):not([type="radio"]) {
  display: block; width: 100%; height: 56px; min-height: 56px; margin: 0; padding: 0 16px;
  border: 1px solid var(--ink-2); border-radius: 4px; background: var(--bg); color: var(--label);
  font-size: var(--fs-15); text-align: left; outline: none; box-shadow: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.gl .gl-field input.gl-in:not([type="checkbox"]):not([type="radio"]):focus { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); outline: none; }
.gl .gl-field input.gl-in[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]) { border-color: var(--bad); }
.gl .gl-field input.gl-in[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]):focus { box-shadow: inset 0 0 0 1px var(--bad); }
.gl-mono .gl-in { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; }
.gl .gl-in::placeholder { color: transparent; opacity: 1; }
.gl .gl-in:focus::placeholder { color: var(--label2); opacity: .7; }
.gl-label {
  position: absolute; left: 11px; top: 28px; max-width: calc(100% - 24px); padding: 0 4px;
  transform: translateY(-50%); background: var(--bg); color: var(--label2);
  font-size: var(--fs-15); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  transition: top .15s var(--ease), font-size .15s var(--ease), color .15s var(--ease);
}
.gl-in:focus + .gl-label, .gl-in:not(:placeholder-shown) + .gl-label, .gl-in:-webkit-autofill + .gl-label { top: 0; font-size: var(--fs-13); }
.gl-in:focus + .gl-label { color: var(--brand-text); }
.gl-in[aria-invalid="true"] + .gl-label { color: var(--bad); }

/* 誤りは欄の下に赤い印つきの1行 */
.gl-err { margin-top: -8px; }
.gl-err:empty { display: none; }
.gl .field-error { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--bad); font-size: var(--fs-13); font-weight: 400; line-height: 1.5; }
.gl .field-error::before { content: "!"; flex: none; width: 16px; height: 16px; margin-top: 0; border-radius: 50%; background: var(--bad); color: var(--on-brand); font: 700 11px/16px -apple-system, BlinkMacSystemFont, sans-serif; text-align: center; }

.gl-check { display: flex; align-items: center; gap: 12px; min-height: 40px; margin-top: -8px; font-size: var(--fs-15); cursor: pointer; }
.gl-note { color: var(--label2); font-size: var(--fs-13); line-height: 1.6; }

/* 文字だけのボタン（「はじめての方」「分からないとき」） */
.gl-text-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; margin-left: -12px; border-radius: 20px; color: var(--brand-text); font-size: var(--fs-13); font-weight: 600; list-style: none; cursor: pointer; transition: background-color .15s var(--ease); }
.gl-text-btn::-webkit-details-marker { display: none; }
.gl-text-btn::before, .gl-text-btn::after { content: none; display: none; }
@media (hover: hover) { .gl-text-btn:hover { background: var(--tint); } }
.gl-forgot { margin-top: -8px; }
.gl-forgot p { padding: 4px 0 0; color: var(--label2); font-size: var(--fs-13); }

/* 主ボタンは面の右下。左に補助のメニュー */
.gl-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.gl-actions .gl-menu .gl-text-btn { margin-left: 0; }
.gl .btn { min-height: var(--ctl); padding: 0 24px; border-radius: 20px; font-size: var(--fs-13); font-weight: 600; }
.gl .btn:not(.btn-main) { border-color: var(--ink-2); color: var(--brand-text); background: var(--bg); }
@media (hover: hover) { .gl .btn:not(.btn-main):hover { background: var(--tint); } }
.gl-menu { position: relative; }
.gl-menu-list { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; min-width: 248px; padding: 4px 0; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 4px; }
.gl-menu-list a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; color: var(--label); font-size: var(--fs-15); text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .gl-menu-list a:hover { background: var(--fill); } }

/* ほかの開き方（メールのリンク・紙のコード・生徒のQR） */
.gl-alt { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--label2); font-size: var(--fs-13); }
.gl-alt h2 { color: var(--label); font-size: var(--fs-15); font-weight: 600; }
.gl-alt p b { display: block; color: var(--label); font-weight: 600; }
.gl-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.gl-code .gl-field { flex: 1 1 200px; }
.gl-code .code-input { text-transform: uppercase; }
.gl .demo-roles li { padding: 12px 0; }
.gl .demo-roles + .gl-alt { margin-top: 4px; padding-top: 0; border-top: 0; }
.gl .demo-notes { display: flex; flex-direction: column; gap: 4px; padding-left: 1.2em; list-style: disc; }

/* 面の外の下：小さいリンクの行 */
.gl-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; width: 100%; max-width: 1040px; padding-top: 8px; color: var(--label2); font-size: var(--fs-13); }
.gl-links { display: flex; flex-wrap: wrap; margin-right: -12px; }
.gl-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 4px; color: var(--label2); text-decoration: none; }
@media (hover: hover) { .gl-links a:hover { background: var(--fill-hover); color: var(--label); } }

@media (max-width: 899px) {
  .gl-card, .gl-wide .gl-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; max-width: 520px; min-height: 0; padding: 40px 40px 32px; }
  .gl-foot { max-width: 520px; }
  .gl-body { padding-top: 24px; }
}
@media (max-width: 599px) {
  body:has(.gl) { background: var(--bg); }
  .gl { justify-content: flex-start; padding: 0; background: var(--bg); }
  .gl-card, .gl-wide .gl-card { flex: 1 0 auto; max-width: none; padding: 24px 24px 16px; border-radius: 0; }
  .gl-title { font-size: var(--fs-26); }
  .gl-foot { max-width: none; padding: 8px 12px calc(12px + var(--safe-b)); }
  .gl-links { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gl .gl-field input.gl-in:not([type="checkbox"]):not([type="radio"]), .gl-label, .gl-text-btn { transition: none; }
}

/* ═════════ 骨組み（11/17 作り直し・docs/design/screens.dc.html S1〜S3・Side.dc.html・docs/meibo-components.md） ═════════
   ここより上の サイド・帯・下のタブ の積み重ね（デザイナー◯回目）は、ここで id（#k-side・#k-tabbar・#main）を付けて上書きする。
   色はトークンだけ。字は 13・15・17・20・26。角丸は確定ボタン・件数の札・スイッチだけ。 */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── サイド（PC・700〜1099px とも 216px） ── */
#k-side { display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 216px; padding: 12px 0; background: var(--side); border-right: 1px solid var(--line); text-align: start; }
#k-side .side-brand { display: flex; flex-direction: column; gap: 0; margin: 0 0 8px; padding: 0 16px 8px; border-bottom: 1px solid var(--line); }
#k-side .side-brand strong { font-size: var(--fs-15); font-weight: 600; line-height: 1.4; }
#k-side .side-brand small { font-size: var(--fs-13); color: var(--label2); }
#k-side .side-items { display: flex; flex-direction: column; gap: 0; width: auto; }
#k-side .side-top { margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
#k-side .side-bottom { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
#k-side .side-bottom:empty { display: none; }
#k-side .nav-item, #k-side .step-item { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; min-height: 40px; height: auto; margin: 0; padding: 0 12px 0 12px; border: 0; border-left: 0; background: none; color: var(--label); font-size: var(--fs-15); font-weight: 400; line-height: 1.3; text-align: start; text-decoration: none; }
@media (hover: hover) { #k-side .nav-item:hover, #k-side .step-item:hover { background: var(--fill); } }
/* 共通の .i の線幅・丸い端を使う。チャット・設定もほかの項目と同じ大きさ。 */
#k-side .nav-item .i, .k-li-lead .menu-icon { display: block; width: var(--sp-24); height: var(--sp-24); }
#k-side .nav-item.on, #k-side .step-item.on { background: var(--fill); font-weight: 600; color: var(--label); }
#k-side .badge { position: static; margin: 0 0 0 auto; min-width: 22px; height: 22px; min-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--brand); color: var(--on-brand); font-size: var(--fs-13); font-weight: 600; line-height: 22px; text-align: center; }
#k-side .side-head { display: block; height: auto; margin: 0; padding: 4px 16px 8px; border: 0; overflow: visible; font-size: var(--fs-13); font-weight: 400; line-height: 1.5; color: var(--label2); text-align: start; }
#k-side .side-steps { display: flex; flex-direction: column; gap: 0; width: auto; margin: 0; padding: 0; }
#k-side .side-steps > li { flex: none; min-width: 0; }
#k-side .step-n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 0; border: 1px solid var(--line-strong); background: var(--bg); color: var(--label2); font-size: var(--fs-13); font-weight: 700; font-variant-numeric: tabular-nums; }
#k-side .step-past .step-n { border-color: var(--good-bg); background: var(--good-bg); color: var(--good); }
#k-side .step-now .step-n { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
#k-side .step-now { background: none; }
#k-side .step-now.on { background: var(--bg); }
#k-side .step-t { flex: 1; display: flex; flex-direction: row; align-items: center; gap: 4px; min-width: 0; text-align: start; }
#k-side .step-t b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-15); font-weight: inherit; line-height: 1.3; color: inherit; text-align: start; }
#k-side .step-long { display: inline; font-size: inherit; }
#k-side .step-short, #k-side .step-t small, #k-side .step-here, #k-side .step-w { display: none; }
#k-side .step-now .step-w { display: inline; margin-left: auto; font-size: var(--fs-13); font-style: normal; font-weight: 600; line-height: 1; color: var(--brand-text); }
#k-side .step-item .badge { margin-left: 4px; }
#k-side .step-sub { display: flex; align-items: center; gap: 4px; min-height: 32px; margin: 0; padding: 0 12px 0 48px; border-left: 0; font-size: var(--fs-13); color: var(--label2); text-align: start; text-decoration: none; }
#k-side .step-sub small { display: inline; margin: 0; font-size: var(--fs-13); }
@media (hover: hover) { #k-side .step-sub:hover { background: var(--fill); } }
#k-side .step-sub.on { background: var(--fill); color: var(--label); font-weight: 600; }
/* 「質問する」とログアウトはメニューの下端に止めておく。メニューが画面より長くてもスクロールせずに見える（11/22 本人「質問するが隠れている」） */
#k-side .side-foot { position: sticky; bottom: -12px; z-index: 1; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 12px; margin: auto 0 -12px; padding: 8px 16px 12px; background: var(--side); text-align: start; }
#k-side .side-foot .btn { min-height: 40px; }
@media (min-width: 700px) and (max-width: 1099px) {
  .shell { grid-template-columns: 216px minmax(0, 1fr); }
}
/* 「質問する」はチャットが読み込まれてから（上の .chat-launch の規則を id の形でも守る） */
html:not(:has(.mchat)) :is(#k-side, #k-tabbar) .chat-launch, html[data-ledger="1"] :is(#k-side, #k-tabbar) .chat-launch { display: none; }

/* ── スマホ（〜699px）：上に「進め方」の帯、下にタブ ── */
@media (min-width: 700px) { #main .stage-fold { display: none; } }
@media (max-width: 699px) {
  #k-side { display: none; }
  #main .stage-fold { position: sticky; top: 0; z-index: 5; margin: -16px -16px 0; padding: 0; background: var(--side); border: 0; border-bottom: 1px solid var(--line); }
  #main .stage-fold > summary { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 0; padding: 8px 16px; border: 0; background: var(--side); list-style: none; cursor: pointer; }
  #main .stage-fold > summary::-webkit-details-marker { display: none; }
  #main .stage-fold > summary::before, #main .stage-fold > summary::after { content: none; display: none; }
  #main .fold-row { display: flex; align-items: center; gap: 8px; min-height: 24px; }
  #main .fold-l, #main .fold-of { font-size: var(--fs-13); color: var(--label2); white-space: nowrap; }
  #main .fold-no { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; background: var(--brand); color: var(--on-brand); font-size: var(--fs-13); font-weight: 600; }
  #main .stage-fold .fold-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-15); font-weight: 600; color: var(--label); }
  #main .fold-all { margin-left: auto; padding-left: 8px; font-size: var(--fs-13); color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
  #main .stage-fold[open] .fold-all { font-weight: 600; }
  #main .fold-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 4px; }
  #main .fold-seg { display: block; height: 4px; background: var(--line-strong); }
  #main .fold-seg.is-done { background: var(--good); }
  #main .fold-seg.is-now { background: var(--brand); }
  #main .fold-seg.is-late { background: var(--action-text); }
  #main .fold-seg.is-none { background: var(--label2); }
  #main .stage-fold .fold-here { display: block; font-size: var(--fs-13); color: var(--label2); }
  #main .stage-fold .fold-here:empty { display: none; }
  #main .stage-fold .fold-here::before { content: none; }
  #main .stage-fold[open] > summary { border-bottom: 1px solid var(--line); }

  #k-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; min-height: calc(60px + var(--safe-b)); padding: 0 0 var(--safe-b); background: var(--bg); border-top: 1px solid var(--line-strong); backdrop-filter: none; }
  #k-tabbar .nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4); min-width: 0; min-height: 60px; margin: 0; padding: var(--sp-4) 0; border: 0; border-top: 0; background: none; color: var(--label); font-size: var(--fs-13); font-weight: 400; line-height: 1.2; text-align: center; white-space: nowrap; }
  #k-tabbar .nav-item span { font-size: var(--fs-13); letter-spacing: normal; }
  #k-tabbar .nav-item .i { display: block; width: var(--sp-24); height: var(--sp-24); }
  #k-tabbar .nav-item.on { color: var(--brand-text); font-weight: 600; }
  #k-tabbar .badge { position: absolute; top: 0; left: calc(50% + var(--sp-8)); margin: 0; min-width: 0; height: 18px; padding: 0 4px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-size: var(--fs-13); font-weight: 600; line-height: 18px; }
}

/* ── ページの見出し（段の番号の四角 → 題 → 右に締切など） ── */
.page-title p { font-size: var(--fs-15); }
.page-head.has-no { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: start; }
.page-no { display: inline-grid; place-items: center; width: 36px; height: 36px; background: var(--brand); color: var(--on-brand); font-size: var(--fs-20); font-weight: 700; font-variant-numeric: tabular-nums; }
.page-head.has-no .page-title h1 { line-height: 36px; }
.page-head.has-no .page-title p { margin-top: 0; }
.page-head.has-no .page-actions { align-self: center; justify-content: flex-end; }
.page-aside { font-size: var(--fs-13); color: var(--label2); }
@media (max-width: 1099px) {
  .page-head.has-no { grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; }
  .page-no { width: 32px; height: 32px; font-size: var(--fs-17); }
  .page-head.has-no .page-title h1 { line-height: 32px; }
}
@media (max-width: 699px) {
  .page-head.has-no { grid-template-columns: 32px minmax(0, 1fr); }
  .page-head.has-no .page-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .page-head.has-no .page-title h1 { font-size: var(--fs-20); }
}

/* ── 今やること ── */
.now-box { display: flex; align-items: center; gap: 24px; padding: 16px 0; background: none; border-top: 2px solid var(--ink); }
.now-box-t { flex: 1; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.now-box-l { font-size: var(--fs-13); font-weight: 600; color: var(--action-text); }
.now-box-title { font-size: var(--fs-20); font-weight: 600; line-height: 1.4; color: var(--label); text-wrap: pretty; }
.now-box-d { font-size: var(--fs-15); color: var(--label2); }
.now-box-a { flex: none; }
@media (max-width: 699px) {
  .now-box { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 16px; }
  .now-box-a .k-btn { width: 100%; }
}

/* ── ボタン3種（main は確定・角丸／line・bad は四角） ── */
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: var(--ctl); padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--label); font-size: var(--fs-15); font-weight: 400; line-height: 1.3; text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .k-btn:hover { background: var(--fill); } }
.k-btn-main { padding: 0 20px; border-color: var(--brand); border-radius: var(--r-ctl); background: var(--brand); color: var(--on-brand); font-weight: 600; }
@media (hover: hover) { .k-btn-main:hover { border-color: var(--brand-hover); background: var(--brand-hover); } }
.k-btn-bad { border-color: var(--bad); color: var(--bad); font-weight: 600; }
@media (hover: hover) { .k-btn-bad:hover { background: var(--bad-bg); } }
@media (max-width: 699px), (pointer: coarse) { .k-btn-main { padding: 0 24px; } }
.k-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: none; color: var(--brand-text); font-size: var(--fs-13); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ── 件数の札・状態の札 ── */
.badge.k-count { display: inline-block; margin-left: auto; min-width: 22px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: var(--fs-13); font-weight: 600; line-height: 22px; text-align: center; }
.badge.k-count-act { background: var(--action-bg); color: var(--action-text); }
.badge.k-count-brand { background: var(--brand); color: var(--on-brand); }
.badge.k-count:not(.k-count-act):not(.k-count-brand) { min-width: 0; padding: 0; border-radius: 0; background: none; color: var(--label2); font-weight: 400; }
.k-tag { display: inline-block; flex: none; padding: 1px 8px; border: 1px solid transparent; font-size: var(--fs-13); font-weight: 400; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.k-tag-good { background: var(--good-bg); color: var(--good); }
.k-tag-now { background: var(--tint); color: var(--brand-text); }
.k-tag-warn { background: var(--warn-bg); color: var(--warn-text); }
.k-tag-act { background: var(--action-bg); color: var(--action-text); }
.k-tag-bad { border-color: var(--bad); background: var(--bg); color: var(--bad); }
.k-tag-opt { padding: 0 4px; border-color: var(--line); background: var(--canvas); color: var(--label2); }

/* ── 欄の1行（左に名前、右に入力、下に説明） ── */
.k-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.k-row-stack { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 0; border-bottom: 0; }
.k-row-l { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.k-row-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-15); font-weight: 600; color: var(--label); }
.k-row-status { font-size: var(--fs-13); font-weight: 600; color: var(--action-text); }
.k-row-c { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-row-hint { font-size: var(--fs-13); color: var(--label2); }
.k-row-err { font-size: var(--fs-13); font-weight: 600; color: var(--bad); }
.k-row :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea), .k-tl-date, .k-pick-other { min-height: var(--ctl); padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 0; font-size: var(--fs-15); }
.k-row textarea { padding: 8px 12px; }
.k-row :is(input, select, textarea):focus-visible, .k-tl-date:focus-visible, .k-pick-other:focus-visible { border: 2px solid var(--brand); border-radius: 0; box-shadow: none; padding-left: 12px; }
.k-row.is-error :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea), .k-tl-i.is-error .k-tl-date { border: 2px solid var(--bad); padding-left: 12px; }
@media (max-width: 699px) { .k-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; } }

/* ── 表 ── */
.k-table-wrap { max-width: 100%; overflow-x: auto; }
.k-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.k-table thead th { padding: 8px; border-bottom: 1px solid var(--line-strong); font-size: var(--fs-13); font-weight: 400; color: var(--label2); text-align: left; white-space: nowrap; }
.k-table tbody td { height: 48px; padding: 0 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.k-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.k-table tr.is-lack td { background: var(--action-bg); }
.k-table tr.is-lack :is(b, strong) { color: var(--action-text); }
.k-table-empty { color: var(--label2); }

/* ── ファイルを落とす所 ── */
.k-drop-wrap { display: flex; flex-direction: column; gap: 4px; }
.k-drop { position: relative; display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 12px 16px; border: 2px dashed var(--line-strong); background: var(--canvas); cursor: pointer; text-align: center; }
.k-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.k-drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.k-drop-idle { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; }
.k-drop-t { font-size: var(--fs-15); color: var(--label); }
.k-drop-or { font-size: var(--fs-13); color: var(--label2); }
.k-drop-over { display: none; font-size: var(--fs-15); font-weight: 600; color: var(--brand-text); }
.k-drop.is-over { border: 2px solid var(--brand); background: var(--tint); }
.k-drop.is-over .k-drop-idle { display: none; }
.k-drop.is-over .k-drop-over { display: block; }
.k-drop-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; font-size: var(--fs-13); color: var(--label2); }

/* ── 日付の縦の線 ── */
.k-tl { position: relative; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.k-tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 20px; width: 2px; background: var(--line-strong); }
.k-tl-i { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 16px; padding-bottom: 20px; }
.k-tl-dot { display: block; width: 12px; height: 12px; margin-top: 4px; background: var(--brand); }
.k-tl-i.is-future .k-tl-dot, .k-tl-i.is-off .k-tl-dot { border: 2px solid var(--line-strong); background: var(--bg); }
.k-tl-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-tl-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-15); font-weight: 600; }
.k-tl-i.is-off .k-tl-t { color: var(--label2); }
.k-tl-date { width: 200px; max-width: 100%; }

/* ── 候補から選んで足す ── */
.k-pick { display: flex; flex-direction: column; gap: 8px; }
.k-pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.k-pick-i { position: relative; display: inline-flex; cursor: pointer; }
.k-pick-i input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.k-pick-i span { display: inline-flex; align-items: center; min-height: var(--ctl); padding: 0 12px; border: 1px solid var(--line-strong); background: var(--bg); font-size: var(--fs-15); color: var(--label); }
.k-pick-i span::before { content: "＋ "; white-space: pre; color: var(--label2); }
.k-pick-i input:checked + span { border-color: var(--brand); background: var(--tint); color: var(--brand-text); font-weight: 600; }
.k-pick-i input:checked + span::before { content: "✓ "; color: var(--brand-text); }
.k-pick-i input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.k-pick-other { width: 100%; max-width: 420px; }

/* ── 3つから1つ ── */
.k-choice { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 420px; border: 1px solid var(--line-strong); background: var(--bg); }
.k-choice-i { position: relative; cursor: pointer; }
.k-choice-i + .k-choice-i { border-left: 1px solid var(--line-strong); }
.k-choice-i input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.k-choice-i span { display: flex; align-items: center; justify-content: center; min-height: calc(var(--ctl) + 2px); padding: 0 8px; font-size: var(--fs-15); color: var(--label); }
.k-choice-i input:checked + span { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.k-choice-i input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ── 番号つきの段 ── */
.k-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.k-step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 24px; border-top: 4px solid var(--line); }
.k-step.is-done { border-top-color: var(--good); }
.k-step.is-now { border-top-color: var(--brand); background: var(--tint); }
.k-step-n { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--label2); font-size: var(--fs-17); font-weight: 600; }
.k-step.is-done .k-step-n { border-color: var(--good-bg); background: var(--good-bg); color: var(--good); }
.k-step.is-now .k-step-n { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.k-step-b { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; }
.k-step-t { font-size: var(--fs-17); font-weight: 600; color: var(--label); }
.k-step.is-now .k-step-t { color: var(--brand-text); }
.k-step.is-next .k-step-t { color: var(--label2); }
.k-step-now { font-size: var(--fs-13); font-weight: 600; color: var(--brand-text); }
.k-step-note { flex-basis: 100%; font-size: var(--fs-13); color: var(--label2); }
@media (max-width: 699px) {
  .k-steps { grid-auto-flow: row; }
  .k-step { padding: 8px 12px; }
}

/* ── 1件の進み具合の帯 ── */
.k-band { display: flex; flex-direction: column; gap: 4px; }
.k-band-c { font-size: var(--fs-13); font-weight: 600; color: var(--label2); }
.k-band-l { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.k-band-i { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; border-top: 4px solid var(--line); }
.k-band-i b { font-size: var(--fs-15); font-weight: 400; color: var(--label); }
.k-band-i span { font-size: var(--fs-13); color: var(--label2); }
.k-band-one { display: none; margin: 0; font-size: var(--fs-15); font-weight: 600; color: var(--brand-text); }
.k-band-i.is-late { border-top-color: var(--action-text); }
.k-band-i.is-late span { color: var(--action-text); font-weight: 600; }
.k-band-i.is-done { border-top-color: var(--good); }
.k-band-i.is-done b { font-weight: 600; color: var(--good); }
.k-band-i.is-now { border-top-color: var(--brand); }
.k-band-i.is-now b { font-weight: 600; color: var(--brand-text); }
@media (max-width: 699px) { .k-band-i b { font-size: var(--fs-13); } }

/* ── 2段メニュー（subPage）：PC は押せる行、700〜1099px は折り返す横タブ、スマホは1段の横送り ──
   11/22：現在地は淡い地＋帯、移動先は区切り＋›。角丸の箱にせず、行全体を押せる形にそろえる。 */
.split { display: block; background: var(--bg); border: 0; }
.split .subnav { display: flex; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border: 0; border-bottom: 1px solid var(--line); }
.split .sub-item { flex: none; gap: var(--sp-8); min-height: max(var(--hit), var(--row-h)); margin: 0; padding: var(--sp-8) var(--sp-12); border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent; border-radius: 0; background: var(--bg); color: var(--label); font-size: var(--fs-15); font-weight: var(--fw-reg); white-space: nowrap; }
.split .sub-item-label { min-width: 0; }
.split .sub-item-chevron { display: none; }
.split .sub-item.on { border-bottom-color: var(--brand); background: var(--tint); color: var(--brand-text); font-weight: var(--fw-semi); }
@media (hover: hover) { .split .sub-item:hover { background: var(--fill-hover); color: var(--brand-text); } }
.split .sub-item:focus-visible { outline: var(--focus-ring); outline-offset: -3px; border-radius: 0; }
.split .sub-item .badge { flex: none; margin-left: auto; }
.split > .split-body { padding: 20px 24px; }
.split-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.split-head h2 { font-size: var(--fs-17); font-weight: 600; }
.split-head span { font-size: var(--fs-13); color: var(--label2); }
@media (min-width: 1100px) {
  .split { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: stretch; }
  .split .subnav { flex-direction: column; padding: 0; overflow: visible; border-bottom: 0; border-right: 1px solid var(--line); }
  .split .sub-item { display: flex; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; white-space: normal; }
  .split .sub-item:first-child { border-top: 1px solid var(--line); }
  .split .sub-item.on { border-bottom-color: var(--line); border-left-color: var(--brand); }
  .split .sub-item-label { flex: 1; overflow-wrap: anywhere; }
  .split .sub-item-chevron { display: block; flex: none; width: var(--sp-8); height: var(--sp-8); margin-right: var(--sp-4); border-top: 2px solid var(--label2); border-right: 2px solid var(--label2); rotate: 45deg; }
  .split .sub-item.on .sub-item-chevron { border-color: var(--brand); }
  /* 左の小メニューは、本文をスクロールしても上に残す（11/22 本人）。区切り線は本文側に持たせ、メニューが短くても線は下まで通す */
  .split .subnav { position: sticky; top: 16px; z-index: 3; align-self: start; max-height: calc(100dvh - var(--bar-h) - var(--demo-h, 0px) - 32px); overflow-y: auto; border-right: 0; background: var(--bg); }
  .split > .split-body { border-left: 1px solid var(--line); }
}
/* 項目が多くて1行に入らないときは、横に送らず折り返して2段にする（続きがあることが見えないため・グラデの目印は使わない） */
@media (max-width: 1099px) {
  .split .subnav { flex-wrap: wrap; overflow-x: visible; }
}
@media (max-width: 699px) {
  .split { margin: 0 -16px; border-left: 0; border-right: 0; }
  .split > .split-body { padding: 16px; }
}
@media print { .split { display: block; border: 0; } .split > .split-body { padding: 0; } }

/* 評価表：幅800px前後で横に送る表でも「代わりに入力」を右端に貼りつけて見せる（11/17 デザイナー2周目 L2） */
@media screen and (min-width: 768px) {
  .eval-table th:last-child, .eval-table td.eval-action { position: sticky; right: 0; z-index: 1; background: var(--bg); border-left: 1px solid var(--line); }
}

/* 入力欄の「例」は薄く（入れた文字と見間違えない）。名簿を貼る欄などの例が濃かった（11/17 デザイナー2周目 L5） */
input::placeholder, textarea::placeholder { color: var(--label2); opacity: .55; }

/* 11/18 デザイナー指摘：現場の「様子を書く」はその日全体の記録。最後の生徒の行に付いて見えないよう、一覧との間に罫線と余白。 */
html[data-role="duty"] .duty-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--sep); }
/* 11/18 デザイナー指摘：ホームの「今年度の流れ」は PC では左の進め方と同じなのでタブを出さない（スマホの入口として残す）。 */
/* 11/22 レビュー：今年度の流れはPC・スマホとも同じタブで開く。 */

/* ═════════ Apple F（11/18・apple-spec.md の決定・apple-audit.md §2 F）：共通の土台の最後の層 ═════════
   ここより前の決まりを上書きする。色は変数だけ（16進・rgba を書かない）、影なし、角丸は操作部品だけ、
   拡大縮小の動きなし、負の字間なし、字の大きさは --fs-* だけ。すりガラスは浮くもの（下タブ・選択バー・注意帯・シートの背景・トースト）だけ。 */

b, strong { font-weight: var(--fw-semi); }

/* ── ボタンは1系統：main（塗り・1画面に1つ）／line（線）／text（文字）／danger（赤い文字・枠なし） ──
   別名：btn-cta・k-btn-main → main／k-btn・ただの .btn → line／btn-plain → text／btn-danger・btn-danger-outline・btn-danger-text・k-btn-bad → danger */
html body :is(.btn, .k-btn) {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8);
  min-height: var(--hit); padding: 0 var(--sp-16);
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  background: var(--bg); color: var(--label);
  font-size: var(--fs-15); font-weight: var(--fw-semi); line-height: 1.3; text-decoration: none;
  box-shadow: none; transform: none;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), opacity var(--dur-1) var(--ease-out);
}
html body :is(.btn-main, .btn-cta, .k-btn-main) { padding: 0 var(--sp-24); border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
html body :is(.btn-plain, .btn-text) { padding: 0 var(--sp-12); border-color: transparent; background: none; color: var(--brand-text); }
html body :is(.btn-danger, .btn-danger-outline, .btn-danger-text, .k-btn-bad) { padding: 0 var(--sp-12); border-color: transparent; background: none; color: var(--bad); }
@media (hover: hover) {
  html body :is(.btn, .k-btn):hover:not(:disabled):not([aria-disabled="true"]) { background: var(--hover-bg); }
  html body :is(.btn-main, .btn-cta, .k-btn-main):hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--brand-hover); background: var(--brand-hover); }
}
html body :is(.btn, .k-btn):active:not(:disabled):not([aria-disabled="true"]) { background: var(--press-bg); transform: none; }
html body :is(.btn-main, .btn-cta, .k-btn-main):active:not(:disabled):not([aria-disabled="true"]) { border-color: var(--brand-hover); background: color-mix(in srgb, var(--brand-hover) 88%, var(--label)); }
html body :is(.btn, .k-btn):focus-visible { outline: var(--focus-ring); outline-offset: 2px; box-shadow: none; }
html body :is(.btn, .k-btn):is(:disabled, [aria-disabled="true"]) { opacity: var(--disabled-op); cursor: default; }
html body :is(button, .btn, .k-btn, .att-btn).is-busy { position: relative; cursor: progress; opacity: 1; }
html body :is(button, .btn, .k-btn, .att-btn).is-busy::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: k-spin .7s linear infinite; }
@keyframes k-spin { to { rotate: 1turn; } }
/* 支払い方法の二択（決定9）は2つとも線のボタン：呼び出し側で btn-line を2つ並べる */

/* ── 札は文字の色だけ（淡い塗り・枠なし） ── */
html body :is(.k-tag, .chip, .badge) { height: auto; min-height: 0; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; font-size: var(--fs-13); font-weight: var(--fw-semi); line-height: 1.5; }
html body :is(.k-tag-good, .chip.good) { color: var(--good); background: none; border: 0; }
html body .k-tag-now { color: var(--brand-text); background: none; border: 0; }
/* 11/19 apple r3 中4：「〜の返事待ち」（chip wait）は文脈によらずオレンジの文字。押せない状態を主色で出さない */
html body .chip.wait { color: var(--action-text); background: none; border: 0; }
html body :is(.k-tag-warn, .chip.warn) { color: var(--warn-text); background: none; border: 0; }
html body :is(.k-tag-act, .chip.action, .badge) { color: var(--action-text); background: none; border: 0; }
html body :is(.k-tag-bad, .chip.danger) { color: var(--bad); background: none; border: 0; }
html body :is(.k-tag-opt, .chip.mute) { color: var(--label2); background: none; border: 0; font-weight: var(--fw-reg); }
html body .badge { font-variant-numeric: tabular-nums; font-weight: var(--fw-num); }
html body .chip-ack { padding: 0; border-left: 0; }

/* 注意・お知らせは文字だけ（淡い塗りをやめる・11/18） */
html body :is(.warn, .warn-check) { padding: 0; background: none; color: var(--warn-text); }
html body .notice { padding: 0; background: none; }

/* ── 状態の文字（statusText）：要対応＝オレンジ・取り消し＝赤・済み＝緑・今＝主色 ── */
.k-status { flex: none; font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--label2); white-space: nowrap; }
.k-status-act { color: var(--action-text); }
/* 11/22 レビュー：未入力は集計・出欠行とも同じ茶色。 */
.k-status-missing { color: var(--warn-text); }
.k-status-bad { color: var(--bad); }
.k-status-done { color: var(--good); }
.k-status-now { color: var(--brand-text); }

/* ── 今やること（決定6）：塗りなし・上に --ink 2px・見出し17・1文15・主ボタン1つ ── */
html body .now-box { padding: var(--sp-16) 0; background: none; border-top: 2px solid var(--ink); }
html body .now-box-l { font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--label2); }
html body .now-box-title { font-size: var(--fs-17); font-weight: var(--fw-semi); }
html body .now-box-d { font-size: var(--fs-15); }

/* ── 一覧の行（row / rows） ── */
.k-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.k-li + .k-li { border-top: 1px solid var(--line); }
.k-li-in { display: flex; align-items: center; gap: var(--sp-12); width: 100%; min-height: var(--row-h); padding: var(--sp-8) 0; border: 0; background: none; color: var(--label); font: inherit; text-align: start; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
a.k-li-in, button.k-li-in { cursor: pointer; }
@media (hover: hover) { :is(a, button).k-li-in:hover { background: var(--hover-bg); } }
:is(a, button).k-li-in:active { background: var(--press-bg); }
.k-li-in:focus-visible { outline: var(--focus-ring); outline-offset: -3px; }
.k-li-lead { flex: none; display: flex; align-items: center; }
.k-li-b { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.k-li-t { font-size: var(--fs-17); font-weight: var(--fw-reg); line-height: 1.4; overflow-wrap: anywhere; }
.k-li-s { font-size: var(--fs-13); color: var(--label2); }
.k-li-r { flex: none; display: flex; align-items: center; gap: var(--sp-8); }
.k-li-trail { font-size: var(--fs-15); color: var(--label2); font-variant-numeric: tabular-nums; }
.k-li-chev { flex: none; width: 8px; height: 8px; margin-inline-end: var(--sp-4); border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong); rotate: 45deg; }
@media (min-width: 700px) { .k-li-t { font-size: var(--fs-15); } }

/* ── 空・失敗 ── */
html body .k-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-12); padding: var(--sp-32) 0; border: 0; background: none; text-align: start; }
html body .k-empty-what { font-size: var(--fs-17); font-weight: var(--fw-semi); color: var(--label); }
.k-empty-a:empty { display: none; }
.k-error { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-12); padding: var(--sp-24) 0; color: var(--bad); font-size: var(--fs-15); }

/* ── 骨組み（skeleton の kind） ── */
.k-skel { display: flex; flex-direction: column; gap: var(--sp-16); }
.skel-w20 { width: 20%; }
.skel-table { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.skel-tr { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-16); align-items: center; min-height: var(--row-h); border-bottom: 1px solid var(--line); }
.skel-tr.is-head { min-height: var(--sp-32); }
.skel-dots { display: flex; gap: var(--sp-12); }
.skel-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--fill-hover); }
.skel-form { display: flex; flex-direction: column; gap: var(--sp-24); }
.skel-field { display: flex; flex-direction: column; gap: var(--sp-8); }
.skel-input { height: var(--hit); width: 100%; }

/* ── 上の帯（決定4）：スマホは1本。左＝戻る（深い画面）かロゴ、中＝画面名、右＝主操作1つ ── */
.bar-back, .bar-title, .bar-act { display: none; }
@media (max-width: 699px) {
  html body .bar-who { display: none; }
  html body .bar-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--sp-8); padding: 0 var(--gutter); }
  .bar-in > .mark, .bar-in > .bar-back { grid-column: 1; grid-row: 1; justify-self: start; }
  .bar-title { display: block; grid-column: 2; grid-row: 1; max-width: calc(100vw - 224px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-17); font-weight: var(--fw-semi); color: var(--label); text-align: center; transition: opacity var(--dur-2) var(--ease-out); }
  html[data-title-shown="1"] .bar-title { opacity: 0; }
  .bar-in > .bar-act, .bar-in > .bar-nav { grid-column: 3; grid-row: 1; justify-self: end; }
  html body .mark-name { display: none; }
  html[data-deep="1"] .bar-in > .mark { display: none; }
  html[data-deep="1"] .bar-back:not([hidden]) { display: inline-flex; }
  .bar-back { align-items: center; min-height: var(--hit); padding: 0 var(--sp-8) 0 var(--sp-16); margin-inline-start: calc(var(--sp-8) * -1); position: relative; color: var(--brand-text); font-size: var(--fs-17); text-decoration: none; }
  .bar-back::before { content: ""; position: absolute; left: var(--sp-8); top: calc(50% - 5px); width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; }
  html[data-bar-act="1"] .bar-act { display: flex; }
  html[data-bar-act="1"] .bar-in > .bar-nav { display: none; }
  .bar-act > * { min-height: var(--hit); }
  html:has(#main .stage-fold) .bar { border-bottom-color: transparent; }
  /* 学校名の細い帯（mobile-identity）は無くしたので、段の帯は上の帯のすぐ下に付ける */
  html body #main.pane:has(.stage-fold) .stage-fold { top: 0; }
  .bar-act, .bar-in > .bar-nav { min-width: 0; white-space: nowrap; }
}
/* 画面の中の navBar：スマホは上の帯へ移すので出さない。PC は戻ると操作の細い1行（画面名は大きな題に任せる） */
.k-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12); min-height: var(--hit); }
.k-nav-t { display: none; }
.k-nav-back { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--brand-text); font-size: var(--fs-15); text-decoration: none; }
.k-nav-back::before { content: ""; width: 8px; height: 8px; margin: 0 var(--sp-8) 0 var(--sp-4); border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; }
@media (max-width: 699px) { .k-nav { display: none; } }
/* 大きな画面名（26）と下の要約（15） */
.k-large { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-8) 0 var(--sp-16); }
.k-large-t { font-size: var(--fs-26); font-weight: var(--fw-semi); line-height: 1.3; color: var(--label); overflow-wrap: anywhere; }
.k-large-s { font-size: var(--fs-15); color: var(--label2); }

/* ── 段の丸（stageDots・numSteps・progressBand・スマホの進め方の行）：済み＝主色で ✓、今＝主色の輪、次＝灰の輪 ── */
.k-dots { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8) var(--sp-16); margin: 0; padding: 0; list-style: none; }
.k-dots.is-compact { gap: var(--sp-8); }
.k-dots-i, .k-dots-a { display: inline-flex; align-items: center; gap: var(--sp-8); min-width: 0; color: var(--label2); font-size: var(--fs-13); text-decoration: none; }
.k-dots-a { min-height: var(--hit); }
.k-dots-i.is-now { color: var(--label); font-weight: var(--fw-semi); }
.k-dots-i.is-done { color: var(--label); }
.k-dot, #main .fold-seg { position: relative; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--on-brand); transition: background-color var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out); }
:is(.k-dots-i, .k-band-i, .k-step).is-now .k-dot, #main .fold-seg.is-now { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 3px, var(--bg) 3.5px); }
:is(.k-dots-i, .k-band-i, .k-step).is-late .k-dot, #main .fold-seg.is-late { border-color: var(--action-text); }
:is(.k-dots-i, .k-band-i, .k-step).is-done .k-dot, #main .fold-seg.is-done { border-color: var(--brand); background: var(--brand); }
/* 「—」の段（対象の依頼が無いまま過ぎた）：灰色の輪に灰色の横棒。済み（主色＋✓）でも今（中心の点）でもこれから（空の輪）でもない（11/19 最終レビュー軽1） */
#main .fold-seg.is-none { border-color: var(--line-strong); background: var(--bg); }
#main .fold-seg.is-none::after { content: ""; width: 6px; height: 2px; background: var(--label2); }
:is(.k-dots-i, .k-band-i, .k-step).is-done .k-dot::after, #main .fold-seg.is-done::after { content: ""; width: 7px; height: 4px; translate: 0 -1px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; }
/* 新しく済みになった丸（app.js の markDots）：300ms で主色に満ち、✓ が出る（大きさは変えない） */
:is(.k-dots-i, .k-band-i, .k-step, #main .fold-seg).is-fresh .k-dot, #main .fold-seg.is-fresh { animation: k-dot-fill var(--dur-3) var(--ease-out) both; }
:is(.k-dots-i, .k-band-i, .k-step).is-fresh .k-dot::after, #main .fold-seg.is-fresh::after { animation: k-dot-check var(--dur-3) var(--ease-out) both; }
@keyframes k-dot-fill { from { background: var(--bg); border-color: var(--line-strong); } }
@keyframes k-dot-check { from { opacity: 0; } 60% { opacity: 0; } }
/* 番号つきの段（numSteps）：上の線・淡い塗りをやめ、丸と番号 */
html body .k-step { border-top: 0; background: none; padding: var(--sp-12) var(--sp-16) var(--sp-12) 0; }
html body .k-step .k-step-n.k-dot { width: 28px; height: 28px; font-size: var(--fs-13); font-weight: var(--fw-num); color: var(--label2); }
html body .k-step.is-now .k-step-n.k-dot { color: var(--brand-text); background: var(--bg); }
html body .k-step.is-done .k-step-n.k-dot { color: var(--on-brand); }
html body .k-step.is-done .k-dot-no { display: none; }
html body .k-step.is-now .k-step-t { color: var(--label); }
/* 1件の進み具合の帯（progressBand）：上の線をやめ、丸の行 */
/* 11/19 apple r3 中7：丸の列（16px）と文字の列。補足は段名の左端にそろえ、13pxで1行（中の日付の span には当てない） */
html body .k-band-i { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; column-gap: var(--sp-8); padding-top: 0; border-top: 0; }
html body .k-band-i > b, html body .k-band-i > span:not(.k-dot) { grid-column: 2; }
html body .k-band-i > span:not(.k-dot) { font-size: var(--fs-13); padding-inline-start: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .k-band-i.is-now b { color: var(--label); }
html body .k-band-i.is-done b { color: var(--good); }
/* スマホの進め方：上の帯の続き（白・1行）。丸の列と今の段の名前だけ */
@media (max-width: 699px) {
  html body #main .stage-fold, html body #main .stage-fold > summary { background: var(--bg); }
  html body #main .stage-fold > summary { flex-direction: row; align-items: center; gap: var(--sp-12); min-height: var(--hit); padding: 0 var(--gutter); }
  html body #main .fold-bar { order: -1; display: flex; flex: none; gap: var(--sp-8); height: auto; }
  html body #main .fold-row { flex: 1; min-width: 0; min-height: 0; }
  html body #main .stage-fold .fold-here { display: none; }
  .fold-chev { flex: none; width: 8px; height: 8px; margin-inline-start: auto; border-right: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); rotate: 45deg; transition: rotate var(--dur-2) var(--ease-out); }
  #main .stage-fold[open] .fold-chev { rotate: 225deg; }
}

/* ── 出欠の行：左は行全体が押せる（記録を直す）、右に1つだけの操作 ── */
html body .att-row, html body .solo .att-row, html[data-role="duty"] body .att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-8); height: auto; min-height: var(--row-h); padding: 0; }
.att-open { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12); width: 100%; min-width: 0; min-height: var(--row-h); padding: 0; border: 0; background: none; color: var(--label); font: inherit; text-align: start; }
button.att-open { cursor: pointer; transition: background-color var(--dur-1) var(--ease-out); }
@media (hover: hover) { button.att-open:hover { background: var(--hover-bg); } }
button.att-open:active { background: var(--press-bg); }
button.att-open:focus-visible { outline: var(--focus-ring); outline-offset: -3px; }
html body .att-open .att-who { flex: 1; min-width: 0; }
.att-state { flex: none; }
html body .att-btns, html body .solo .att-btns, html[data-role="duty"] body .att-btns { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; max-width: none; }
html body .att-btn { min-height: var(--hit); padding: 0 var(--sp-12); border-radius: var(--r-ctl); font-size: var(--fs-15); }
.att-row.is-pending .att-state { color: var(--label2); }

/* ── 押してすぐの見た目・行が縮んで消える（removeRow） ── */
.is-pending { opacity: .6; transition: opacity var(--dur-2) var(--ease-out); }
.is-leaving { overflow: hidden; pointer-events: none; }

/* ── すりガラス：浮くものだけ ── */
html body :is(.tabbar, #k-tabbar) { background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
html body #k-tabbar .nav-item.on { color: var(--brand-text); font-weight: var(--fw-semi); }
html body .select-bar, html body .select-bar:has(button:disabled) { background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); opacity: 1; }
html body .net-banner { background: color-mix(in srgb, var(--warn-bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
html body dialog::backdrop { background: color-mix(in srgb, var(--label) 28%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html body #toast, html body #toast.err { background: color-mix(in srgb, var(--label) 84%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); color: var(--on-brand); font-size: var(--fs-15); font-weight: var(--fw-reg); padding: var(--sp-8) var(--sp-8) var(--sp-8) var(--sp-16); transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out); }
html body #toast.err { background: color-mix(in srgb, var(--bad) 90%, transparent); }
html body #toast:not(.has-undo):not(.err) { padding: var(--sp-12) var(--sp-16); }
.toast-t { flex: 1; min-width: 0; }
.toast-undo { flex: none; min-height: var(--hit); padding: 0 var(--sp-12); border: 0; border-radius: var(--r-ctl); background: none; color: var(--on-brand); font-weight: var(--fw-semi); text-decoration: underline; text-underline-offset: 3px; }
.toast-undo:active { background: color-mix(in srgb, var(--on-brand) 16%, transparent); }

/* ── シート：スマホは下からせり上がる（全画面の .sp は除く）。危ない操作は赤い文字で、やめるから離す ── */
html body dialog { border-top: 0; box-shadow: none; }
@media (max-width: 699px) {
  html body dialog:not(:has(.sp)) { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 12px 12px 0 0; animation: k-sheet-up var(--dur-3) var(--ease-out); }
  @keyframes k-sheet-up { from { translate: 0 100%; } }
}
html body .dlg-foot.is-danger { justify-content: flex-start; }
html body .dlg-foot.is-danger .spacer { display: block; flex: 1; }
html body dialog:has(.sp) .dlg-foot.is-danger > * { flex: 0 0 auto; }

/* ── 画面の切り替え（app.js の navigate）：進む＝右から、戻る＝左から、タブ＝中身だけ入れ替え。拡大縮小なし ── */
#main { view-transition-name: main; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
html[data-dir="forward"]::view-transition-old(main) { animation: k-vt-out-l var(--dur-3) var(--ease-out) both; }
html[data-dir="forward"]::view-transition-new(main) { animation: k-vt-in-r var(--dur-3) var(--ease-out) both; }
html[data-dir="back"]::view-transition-old(main) { animation: k-vt-out-r var(--dur-3) var(--ease-out) both; }
html[data-dir="back"]::view-transition-new(main) { animation: k-vt-in-l var(--dur-3) var(--ease-out) both; }
html[data-dir="tab"]::view-transition-old(main) { animation: k-vt-fade-out var(--dur-2) var(--ease-out) both; }
html[data-dir="tab"]::view-transition-new(main) { animation: k-vt-fade-in var(--dur-2) var(--ease-out) both; }
@keyframes k-vt-in-r { from { translate: 40px 0; opacity: 0; } }
@keyframes k-vt-in-l { from { translate: -40px 0; opacity: 0; } }
@keyframes k-vt-out-l { to { translate: -40px 0; opacity: 0; } }
@keyframes k-vt-out-r { to { translate: 40px 0; opacity: 0; } }
@keyframes k-vt-fade-in { from { opacity: 0; } }
@keyframes k-vt-fade-out { to { opacity: 0; } }
html[data-dir] .view, html[data-dir] .pane-in { animation: none; }

/* ── 押せる大きさ：スマホは 44、行は 56（PC は 48） ── */
@media (max-width: 699px), (pointer: coarse) {
  html body :is(button, .btn, .k-btn, .day-tab, .seg-btn, .k-link, .chip-link) { min-height: var(--hit); }
  html input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), html select, html textarea { font-size: var(--fs-17); }
}

@media (prefers-reduced-motion: reduce) {
  html body :is(button, .btn, .k-btn, .att-btn).is-busy::after { animation: none; border-right-color: currentColor; opacity: .5; }
  .k-dot, #main .fold-seg, :is(.k-dots-i, .k-band-i, .k-step).is-fresh .k-dot, #main .fold-seg.is-fresh, .k-dot::after, #main .fold-seg::after { animation: none; transition: none; }
  ::view-transition-old(main), ::view-transition-new(main) { animation: none; }
  html body dialog { animation: none; }
  .bar-title, .is-pending, .k-li-in, .att-open, .fold-chev { transition: none; }
}
/* スマホだけに出す入口（会社の「IDとパスワード」など） */
@media (min-width: 700px) { .only-sp { display: none; } }

/* 11/18 レビュー後の直し：送信中は触れない（暗くしない）／回る印は1つ／View Transitions のときは古いフェードを止める／印刷に戻るを出さない／生徒は学校・学科を帯に出す */
body.k-busy #app { pointer-events: none; }
@supports (view-transition-name: none) { html body :is(.view, .solo) { animation: none; } }
@media print { .k-nav { display: none !important; } }
@media (max-width: 699px) { html[data-role="student"] body .bar-who { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media (max-width: 520px) { html[data-role="student"] body .bar-who { display: -webkit-box; white-space: normal; } }

/* 11/18 体験：ログイン・登録・届いたメール・ID とパスワード */
/* 入口の欄もスマホは 17px（iOS が拡大しない大きさ）。.gl の 15px より強く当てる */
@media (max-width: 699px), (pointer: coarse) {
  html .gl .gl-field input.gl-in:not([type="checkbox"]):not([type="radio"]) { font-size: var(--fs-17); }
  html .gl .gl-label { font-size: var(--fs-17); }
  html .gl .gl-in:focus + .gl-label, html .gl .gl-in:not(:placeholder-shown) + .gl-label { font-size: var(--fs-13); }
}
/* 登録：欄と誤りの1行を組にする */
.treg { gap: 16px; }
.treg-row { display: flex; flex-direction: column; gap: 4px; }
.treg-row .gl-check { margin-top: 0; align-items: flex-start; line-height: 1.5; }
.treg-row .gl-check input { margin-top: 4px; flex: none; }
/* パスワード：条件は入力欄の前に1行で示す。 */
.pw-rule { color: var(--label2); font-size: var(--fs-13); }
.logout-row { display: flex; justify-content: flex-start; }
/* 入口の役の行：ボタンを2つ並べる */
.tour-acts { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.tour-rail .tour-acts .btn { white-space: nowrap; }
.tour-rail .demo-roles .btn[aria-pressed="true"] { color: var(--brand-text); }
/* 届いたメール */
.tour-mails { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tour-mails > li { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tour-mails > li > .tour-acts { justify-content: flex-start; align-items: center; }
.tour-mails summary { display: grid; grid-template-columns: auto 1fr; align-items: center; cursor: pointer; list-style: none; }
.tour-mails summary::before { grid-row: 1 / span 2; }
.tour-mails summary > span { grid-column: 2; }
.tour-mails summary::-webkit-details-marker { display: none; }
.tour-mail-subj { font-size: var(--fs-13); font-weight: 600; color: var(--label); }
.tour-mail-meta { font-size: var(--fs-13); color: var(--label2); overflow-wrap: anywhere; }
.tour-mail-body { margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: var(--fs-13); line-height: 1.6; color: var(--label); }
.tour-mail-url { color: var(--brand-text); text-decoration: underline; }

/* ═════════ 11/18 apple r1（デザイナー1周目の直し） ═════════ */
/* 重4・中21：PC の左の進め方も SP の上の帯と同じ丸。済み＝主色で満ちて✓、今＝中心に点、遅れている段＝オレンジの丸。番号は丸の右の文字に。
   新しく済みになった丸は 300ms で満ちる（app.js の markDots が .side-steps も見る）。拡大しない。 */
#k-side .step-n.k-dot { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--on-brand); font-size: 0; }
#k-side .step-item.is-now .step-n.k-dot { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 3px, var(--bg) 3.5px); }
#k-side .step-item.is-late .step-n.k-dot { border-color: var(--action-text); background: var(--bg); }
#k-side .step-item.is-done .step-n.k-dot { border-color: var(--brand); background: var(--brand); }
#k-side .step-item.is-done .step-n.k-dot::after { content: ""; width: 7px; height: 4px; translate: 0 -1px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; }
#k-side .step-item.is-fresh .step-n.k-dot { animation: k-dot-fill var(--dur-3) var(--ease-out) both; }
#k-side .step-item.is-fresh .step-n.k-dot::after { animation: k-dot-check var(--dur-3) var(--ease-out) both; }
#k-side .step-no { font-variant-numeric: tabular-nums; }
#k-side .step-item.is-none .step-n.k-dot { border-color: var(--line-strong); background: var(--bg); }
#k-side .step-item.is-none .step-n.k-dot::after { content: ""; width: 6px; height: 2px; background: var(--label2); }
#k-side .step-item.is-none .step-w { display: inline; margin-left: auto; font-size: var(--fs-13); font-style: normal; line-height: 1; color: var(--label2); }
#k-side .step-item.is-late .step-w { display: inline; margin-left: auto; font-size: var(--fs-13); font-style: normal; font-weight: 600; line-height: 1; color: var(--action-text); }
@media (prefers-reduced-motion: reduce) {
  #k-side .step-n.k-dot, #k-side .step-item.is-fresh .step-n.k-dot, #k-side .step-item.is-fresh .step-n.k-dot::after { animation: none; transition: none; }
}
/* 重5：企業のホームの今やることも now-box。急ぎはラベルの文字だけオレンジ */
html body .now-box.is-warn .now-box-l { color: var(--action-text); }

/* 中1：学校の下タブも均等に割る（列を決め打ちにせず、ある分だけ 1fr） */
@media (max-width: 699px) {
  html body #k-tabbar, html[data-role="school"] body #k-tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  /* 企業は段階未設定だと6項目。「オプション」も320px幅で欠けない列幅にする。 */
  html[data-role="company"] body #k-tabbar { grid-auto-columns: minmax(max-content, 1fr); }
  html body #k-tabbar > .nav-item { width: auto; }
}

/* 中2：押した瞬間の見た目を全部品でそろえる（ブラウザの水色のタップ色はやめ、--press-bg） */
html { -webkit-tap-highlight-color: transparent; }
html body :is(#k-tabbar .nav-item, #k-side .nav-item, #k-side .step-item, #k-side .step-sub, #bar-back, .bar-back, .k-nav-back, [role="tab"], .day-tab, .stage-link, .sub-item, .seg-btn, .k-dots-a):active { background: var(--press-bg); }

/* 中4・中5：スマホのページ内タブは1段の横送り（折り返さない）。右端の先は切れて見えるので、続きがあると分かる。
   日付タブが4つ以上なら、3つ半の幅にして次の日を半分見せる。 */
@media (max-width: 699px) {
  html body :is(.split .subnav, .case-links.day-tabs, .board-tabs, .day-tabs) { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: 16px; }
  html body :is(.split .subnav, .case-links.day-tabs, .board-tabs, .day-tabs)::-webkit-scrollbar { display: none; }
  html body :is(.split .subnav, .case-links.day-tabs, .board-tabs) > * { flex: 0 0 auto; white-space: nowrap; }
  html body .day-tabs:not(.case-links):not(.board-tabs):has(> .day-tab:nth-child(4)) > .day-tab { flex: 0 0 calc((100% - 8px) / 3.5); min-width: 0; padding-inline: 4px; white-space: normal; text-align: center; }
  html body .day-tabs:not(.case-links):not(.board-tabs):has(> .day-tab:nth-child(4)) > .day-tab small { display: block; }
}

/* 中6：スマホの入力欄は全部 17px（iPhone が拡大しない大きさ・決定3）。ページごとの 13・15px の指定より強く当てる */
@media (max-width: 699px), (pointer: coarse) {
  html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea) { font-size: var(--fs-17) !important; }
}

/* 中7：連絡の画面も大きな題から */
html body .lc .lc-list > .k-large { flex: none; padding: var(--sp-16) var(--sp-16) var(--sp-8); }
@media (min-width: 700px) { html body .lc .lc-list > .k-large { padding: var(--sp-16) var(--sp-16) var(--sp-8); } }

/* 中8・軽1：スマホの行は 56px。段の一覧は主文17＋補足13の2段、生徒の行は状態を補足の段に下ろす（名前が省かれない） */
@media (max-width: 699px) {
  html body .stage-steps-links .stage-link { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: center; gap: 0; min-height: 56px; padding: var(--sp-8) var(--sp-16); }
  html body .stage-steps-links .stage-link b { min-width: 0; font-size: var(--fs-17); }
  html body .stage-steps-links .stage-link small { font-size: var(--fs-13); }
  html body .att-row, html body .solo .att-row, html[data-role="duty"] body .att-row { min-height: 56px; }
  html body .att-open { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-height: 56px; padding: var(--sp-8) 0; }
  html body .att-open .att-who { flex: none; width: 100%; font-size: var(--fs-17); }
  html body .att-open .att-state { font-size: var(--fs-13); }
}
/* 中11：段の一覧の「済み」は緑の文字（決定10） */
html body .stage-steps-links > li.stage-past small { color: var(--good); }
/* 中9：ロゴが無いときは灰色の線の四角に頭文字（色は使わない） */
html body .logo-none { background: var(--bg); border: 1px solid var(--line-strong); color: var(--label2); }
/* 中10：予定表・巡回の凡例と予定は枠を付けない。確定は字だけ、返事待ちはオレンジの字（要対応） */
html body .cal-ev, html body .cal-ev.cal-wait, html body .cal-ev.cal-visit, html body .cal-ev.cal-vwait { border: 0; background: none; padding: 0; }
html body .cal-ev.cal-run { color: var(--brand-text); }
/* 11/22 レビュー：依頼の返事待ちは茶の丸、巡回の返事待ちは青の菱形で区別。 */
html body .cal-ev.cal-wait { color: var(--action-text); }
html body .cal-ev.cal-vwait { color: var(--brand-text); }
html body .cal-ev.cal-wait::before { content: '●'; margin-right: var(--sp-4); }
html body .cal-ev.cal-vwait::before { content: '◇'; margin-right: var(--sp-4); }
html body .cal-ev.cal-visit { color: var(--good); }
html body .visit-row .chip.wait { color: var(--action-text); }
/* 中12：企業の1件の見出しの学校の電話は、学校側と同じ線のボタン（アイコン＋番号・44px） */
html body .case-page .case-contact { align-items: center; }
html body .case-page .case-contact a.case-tel-btn { min-height: var(--hit, 44px); margin-left: 8px; font-size: var(--fs-15); color: var(--brand-text); text-decoration: none; }
/* 中14：生徒の身元はスマホでは帯から外し、一覧の頭の補足（13）にする */
html body .st-who { display: none; }
@media (max-width: 699px) {
  html[data-role="student"] body .bar-who { display: none; }
  html body .st-page .st-who { display: block; margin: calc(var(--sp-8) * -1) 0 var(--sp-12); font-size: var(--fs-13); color: var(--label2); }
}
/* 中15・中16：見出しの右の操作は、スマホでは帯の右（1つは文字のボタン、2つ以上は「…」のシート）。本文の見出しの右は隠す */
@media (max-width: 699px) {
  html[data-bar-head="1"] body #main .page-head .page-actions > :is(.btn, .k-btn) { display: none; }
  html body .bar-act .bar-more { min-width: var(--hit); font-size: var(--fs-20); letter-spacing: 0; }
  /* 「操作の案内」は学校・企業ではその他（学校）・質問のシート（企業）へ移した */
  html:is([data-role="school"], [data-role="company"]) body .bar-in > .bar-nav { display: none; }
}
html body .bar-more-list { display: grid; gap: var(--sp-8); }
html body .bar-more-list > * { width: 100%; justify-content: center; min-height: var(--hit); }
/* 中19：まとめて断るのは赤の文字ボタン（枠は付けない） */
html body .danger-zone .btn.btn-danger-text { border: 0; background: none; min-height: var(--hit); padding-inline: 0; color: var(--bad); }
@media (max-width: 699px) { html body .bar-back { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; } html[data-deep="1"] body .bar-back:not([hidden]) { display: inline-block; line-height: var(--hit); } }
/* 軽6：評価の表の見出しは折らない（列は見出しの幅を最小にとる） */
@media (min-width: 700px) { html body .eval-table thead th { white-space: nowrap; min-width: max-content; } html body .eval-table td.score { white-space: nowrap; } }
/* 軽7：本人確認の「見直す」は下線の文字でなく、行の右の › */
html body .kana-done > summary { min-height: var(--hit); }
html body .kana-done .kana-open { width: 8px; height: 8px; text-decoration: none; rotate: 135deg; }
html body .kana-done:not([open]) .kana-open { rotate: 45deg; }
/* 軽13：スマホの下タブは本文の上に浮かせ、本文は下タブの下まで伸ばす（すりガラスが効く）。本文の末尾と下に貼りつく帯は下タブの分だけ逃がす。
   連絡（.lc）は部屋の入力欄が下タブに隠れるので、いままでどおり並べる。 */
@media (max-width: 699px) {
  html body .shell:has(> #k-tabbar):not(:has(.lc)) { --under-tab: calc(60px + var(--safe-b)); }
  html body .shell:not(:has(.lc)) > #k-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; }
  html body .shell:has(> #k-tabbar):not(:has(.lc)) .pane-in { padding-bottom: calc(var(--under-tab) + 32px); }
  html body .shell:has(> #k-tabbar):not(:has(.lc)) .select-bar { bottom: calc(var(--under-tab) + 12px); }
  html body .shell:has(> #k-tabbar):not(:has(.lc)) :is(.chat-page .composer, .sticky-save, .case-page .case-foot) { bottom: var(--under-tab); }
}
@media (max-width: 699px) {
  html:has(.mchat) body .shell:has(> #k-tabbar):not(:has(.lc)) .pane-in { padding-bottom: calc(var(--under-tab) + 68px); }
  html:has(.select-bar) body .shell:has(> #k-tabbar):not(:has(.lc)) .pane-in { padding-bottom: calc(var(--under-tab) + 188px); }
}

/* ═════════ 11/19 apple r2（apple-designer-r2.md の指摘。この節も Apple F の層の決まり：16進・rgba・影・px の字・拡大縮小を使わない） ═════════ */
/* 重1：開いた会社の生徒の行で、記録の無い今日の生徒は「未入力」をオレンジの文字（要対応） */
html body .today-students li.unc span:last-child { font-weight: var(--fw-semi); color: var(--action-text); }
/* 重3：入口・登録・体験は PC も白い地。角丸の面をやめ、中身の幅（720px）と余白で中央に置く。区切りは罫線だけ */
html body:has(.gl), html body .gl { background: var(--bg); }
html body .gl-card { max-width: var(--w-read); border-radius: 0; background: none; }
html body .gl-wide .gl-card { max-width: 1040px; }
html body .gl-foot { max-width: var(--w-read); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
html body .gl-wide .gl-foot { max-width: 1040px; }
@media (min-width: 900px) {
  html body .gl-card { column-gap: 48px; padding: 32px 0; border-top: 1px solid var(--line); }
}
/* 中2：入口の見出しはアプリの見出しと同じ 600 */
html body .gl-title { font-weight: var(--fw-semi); }
/* 中5：入口のボタンはアプリの中と同じ角の小さい四角 */
html body .gl .btn, html body .gl-text-btn { border-radius: var(--r-ctl); }
/* 軽11：入口のスマホの下の行も、左右の余白は 24px にそろえる */
@media (max-width: 599px) {
  html body .gl-foot { padding: 12px 24px calc(12px + var(--safe-b)); margin-top: 0; }
  html body .gl-card { padding: 24px 24px 16px; border-top: 0; }
}
/* 軽12：欄の名前は欄の上の 13px のラベル（浮かせない） */
html body .gl .gl-field { display: flex; flex-direction: column; gap: 4px; }
html body .gl .gl-label { position: static; order: -1; max-width: none; padding: 0; transform: none; background: none; color: var(--label2); font-size: var(--fs-13); font-weight: var(--fw-semi); line-height: 1.4; transition: none; }
html body .gl .gl-in:focus + .gl-label, html body .gl .gl-field:focus-within .gl-label { color: var(--brand-text); }
html body .gl .gl-field:has(.gl-in[aria-invalid="true"]) .gl-label { color: var(--bad); }
html body .gl .gl-in::placeholder { color: var(--label2); opacity: .6; }
/* 中4：ほかの開き方の「紙の依頼状」は小見出しの下に欄と「依頼状を開く」 */
html body .gl-alt-paper { display: flex; flex-direction: column; gap: 8px; }
html body .gl-alt-paper > b { color: var(--label); font-weight: var(--fw-semi); }
html body .gl-code { align-items: flex-end; }
/* 重2：「はじめての方」のメニュー。PC は画面の中に収め、スマホは下から出るシート（全幅の3行＋やめる） */
html body .gl-menu-scrim, html body .gl-menu-cancel { display: none; }
/* 11/19 apple r3 軽3：入口の「はじめての方」のシートの背景も、ほかのシートと同じぼかし（スマホでだけ出る） */
html body .gl-menu-scrim { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html body .gl-menu-list { max-width: calc(100vw - 32px); }
html body .gl-menu-list li { list-style: none; }
@media (max-width: 699px) {
  html body .gl-menu[open] .gl-menu-scrim { display: block; position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--label) 28%, transparent); }
  html body .gl-menu[open] .gl-menu-list { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 61; min-width: 0; max-width: none; margin: 0; padding: 8px 0 calc(8px + var(--safe-b)); border: 0; border-radius: 12px 12px 0 0; background: var(--bg); }
  html body .gl-menu-list a { min-height: 56px; padding: 0 24px; border-bottom: 1px solid var(--line); font-size: var(--fs-17); white-space: normal; }
  html body .gl-menu[open] .gl-menu-cancel { display: block; }
  html body .gl-menu-cancel button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border: 0; background: none; color: var(--brand-text); font: inherit; font-size: var(--fs-17); font-weight: var(--fw-semi); cursor: pointer; }
  html body .gl-menu-cancel button:active, html body .gl-menu-list a:active { background: var(--press-bg); }
}
/* 中7：企業の返事の表の「訪問の返事待ち」は要対応のオレンジの文字（押せない青にしない） */
html body .board td[data-label="巡回"] .chip.wait { color: var(--action-text); }
/* 中8：企業の返事のスマホの行は、会社名17＋補足13の1段、右に要対応の札1つと ›（行の右端） */
html body .board-chev { display: none; }
@media screen and (max-width: 699px) {
  html body .board tr { grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 4px 8px; min-height: 64px; padding: 12px 0; }
  html body .board-co { grid-column: 1; grid-row: 1; }
  html body .board-co > a:first-child { font-size: var(--fs-17); }
  html body .board-co .row-chev { display: none; }
  html body .board tr > .board-mobile-meta { display: block; grid-column: 1; grid-row: 2; font-size: var(--fs-13); color: var(--label2); }
  html body .board-status > :is(.chip, .chip-link) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  html body .board-status > .status-rest { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  html body .board tr > .board-chev { display: flex; grid-column: 3; grid-row: 1 / span 2; align-items: center; justify-content: flex-end; color: var(--label2); }
  html body .board tr > .board-days { display: none; }
  /* 11/19 apple r3 中9：補足は主文の左端にそろえ、状態は右（› の左）に1つ */
  html body .board tr > :is(.board-co, .board-mobile-meta) { padding-inline: 0; }
  html body .board tr > .board-status { display: none !important; }
  html body .board tr > .board-sp-state { display: flex; flex-direction: column; align-items: flex-end; gap: 0; grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 0; text-align: right; max-width: 10em; }
  html body .board tr > .board-sp-state:empty { display: none; }
}
@media print { html body .board-chev { display: none !important; } }
.board td.board-sp-state, .board th.board-sp-state { display: none; }
/* 中9：暦の曜日の色をやめる（土日・祝日は --label2）。主色は今日の数字だけ */
html body :is(.cal-sun, .cal-sat) .cal-d { color: var(--label2); }
html body .cal-today .cal-d { color: var(--brand-text); font-weight: var(--fw-semi); }
/* 中10：具体的な内容の保存の帯は1行（説明は帯の上の1文へ出した）。スマホでも折り返さない */
html body .case-page .case-foot-lead { margin: 16px 0 0; font-size: var(--fs-13); color: var(--label2); }
html body .case-page .case-foot { flex-wrap: nowrap; padding-block: 8px; }
html body .case-page .case-foot-btns { flex-wrap: nowrap; justify-content: flex-end; min-width: 0; }
html body .case-page .case-foot-btns [data-dirty-note] { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-13); }
@media (max-width: 699px) {
  html body .case-page .case-foot-btns .k-btn { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
}
/* 中13：PC の左・下タブの件数の札は要対応のオレンジの塗りの丸（iOS の札の形。主色の青・淡い塗りは使わない） */
html body :is(#k-side, #k-tabbar) .badge { min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--action-text); color: var(--on-brand); font-size: var(--fs-13); font-weight: var(--fw-semi); line-height: 20px; text-align: center; }
/* 中14：設定はスマホでは「行の一覧 → 詳細」。PC は左の項目＋右の中身のまま */
html body .settings-index { display: none; }
@media (max-width: 699px) {
  html body .settings-wrap.is-index .settings-index { display: block; }
  html body .settings-wrap.is-index > .split { display: none; }
  html body .settings-wrap.is-detail > .split > .subnav { display: none; }
}
/* 中17：段の一覧（SP の帯の ˅）は行の形。主文は --label・下線なし・右に ›。今の段だけ主色 */
html body .stage-steps-links .stage-link { position: relative; padding-right: 32px; }
html body .stage-steps-links .stage-link b { color: var(--label); text-decoration: none; }
html body .stage-steps-links > li.stage-now .stage-link b { color: var(--brand-text); }
html body .stage-steps-links .stage-link::after { content: "›"; position: absolute; right: 12px; top: 50%; translate: 0 -50%; font-size: var(--fs-17); color: var(--label2); }
/* 軽3：PC の左で段（または巡回）が選ばれているときは「ホーム」を塗らない（今どこかを1つに） */
html body #k-side:has(:is(.step-item, .step-sub).on) .nav-item.on { background: none; font-weight: 400; }
/* 軽4：遅れている段の丸は PC の左と同じ線の丸（オレンジ）。SP の帯も塗らない */
html body #main .fold-seg.is-late { background: var(--bg); border-color: var(--action-text); }
/* 軽5：会社の情報の下の罫線と、今やることの 2px の罫線を二重にしない */
html body .case-page > :has(+ .now-box) { border-bottom: 0; }
/* 軽10：見出しの罫線のすぐ下に一覧の上の罫線を重ねない */
html body .group-title + .k-list { border-top: 0; }
/* 軽13：出欠シートの遅刻・欠席・早退は1段の分割ボタン（2列で「早退」だけ2段目に残さない） */
html body .exception-kinds { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
html body .exception-kinds .choice span { min-height: var(--hit); border-radius: 0; }
html body .exception-kinds .choice + .choice span { border-left-width: 0; }
html body .exception-kinds .choice:first-child span { border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
html body .exception-kinds .choice:last-child span { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
html body .exception-kinds .choice:only-child span { border-radius: var(--r-ctl); }
/* 軽14：押したときの見た目は --press-bg にそろえる（一覧の行も） */
html body :is(a.row, .row-btn):active { background: var(--press-bg); }
/* 11/19 apple r3 中3：主な一覧の行（今日の会社・チャット・board・巡回）と帯の段の折りたたみも同じ押した見た目 */
html body :is(.today-head, .lc-row, a.visit-link, .stage-fold > summary):active, html body tr.row-link:active td { background: var(--press-bg); }
/* 軽15：質問のシートの背景も、出欠のシート（dialog::backdrop）と同じ薄い影＋ぼかし */
html body .mchat-scrim { background: color-mix(in srgb, var(--label) 28%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html body .tally2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html body .tally2 dd small { font-size: var(--fs-13); font-weight: 400; margin-left: 0; }
html body .today-cap { margin: 16px 0 0; font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--label2); }
html body .board-mobile-meta .board-visit-ask { color: var(--action-text); font-weight: var(--fw-semi); white-space: nowrap; }

/* 11/19 r2 のコードレビュー：シートを開いたら後ろを止める（軽1）・600〜899 の下の行を見出しにそろえる（軽3）・設定の詳細の戻るは PC で出さない（中1） */
@media (max-width: 699px) { html:has(.gl-menu[open]) { overflow: hidden; } }
@media (min-width: 600px) and (max-width: 899px) { html body .gl-foot { padding-inline: 40px; } }
@media (min-width: 700px) { html body .settings-back { display: none; } }
/* 11/19 apple r3 軽11：巡回の月の見出しは、文字幅の下線（タブに見える）を引かない。今やることの題は最後の数文字だけ折り返さない */
html body .cal-head > .group-title { border-bottom: 0; padding-bottom: 0; }
html body .now-box-title { word-break: auto-phrase; text-wrap: balance; }
/* 11/19 apple r3 軽4：入口のボタンもアプリの中と同じ 15px。入力欄の角もボタンと同じ --r-ctl */
html body .gl .btn, html body .gl-text-btn { font-size: var(--fs-15); }
html body .gl .gl-field input.gl-in:not([type="checkbox"]):not([type="radio"]) { border-radius: var(--r-ctl); }
/* 軽5：入口 PC の、上に何も無い罫線は引かない。「依頼状のコード」の欄（56px）と「依頼状を開く」は高さをそろえる */
@media (min-width: 900px) { html body .gl-card { border-top: 0; } }
html body .gl-code > .btn { min-height: 56px; }
/* 11/19 apple r3 軽9：出欠シートで選んだ種類・理由は黒（--ink）で塗らず、アプリの選択と同じ主色 */
html body .choice input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: var(--fw-semi); }
/* 11/19 apple r3 軽10：#/place の手順の番号は押せない青の塗りにしない（灰の数字）。文字のボタンは上のボタンの左端にそろえる */
html body .paste-steps .steps > li::before { content: counter(step) "."; background: none; color: var(--label2); font-size: var(--fs-15); font-weight: var(--fw-semi); place-items: start; width: auto; height: auto; line-height: 1.5; }
html body .paste-steps .row-actions { column-gap: var(--sp-16); }
html body .paste-steps .row-actions .btn-plain { padding-inline: 0; }
/* 11/19 apple r3 軽12：#/day の「名簿を入れる」は上の線のボタンの左端にそろえる（文字のボタンの左の余白を取る） */
html body .day-roster-link .btn-text { padding-inline: 0; }
/* 体験の入口（11/19 本人「ぱっと見てわからない」）：最初の3択を上に、ほかの役は名前＋横並びのボタン */
.tour-start { display: flex; flex-direction: column; gap: 8px; }
.tour-start h2 { font-size: var(--fs-20, 20px); font-weight: 600; }
.tour-picks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tour-picks li { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tour-picks li > b { font-size: var(--fs-15); }
.tour-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.tour-how h3 { font-size: var(--fs-15); font-weight: 600; margin-top: 16px; }
/* 体験の入口：登録からログインまで（学校・企業の4段を縦に重ねる。入口の右の欄は狭いので2列にしない） */
.tour-flows { display: flex; flex-direction: column; gap: 16px; }
.tour-flow h3 { font-size: var(--fs-15); font-weight: 600; margin-bottom: 4px; }
.tour-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tour-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tour-steps .btn, .tour-steps li > .muted { flex: none; }
.tour-n { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--label2); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-13); font-weight: 600; }
.tour-steps li.is-done .tour-n { background: var(--brand-text); border-color: var(--brand-text); color: var(--on-brand); }
.tour-done { font-style: normal; font-weight: 600; font-size: var(--fs-13); color: var(--brand-text); margin-left: 8px; }
.tour-start > .demo-roles { margin-top: 8px; }
/* 体験の入口のスマホ：ボタンを説明の下へ回す（横に並べると説明が1行3〜4字に折れる）。学校名の見出しは26だと「校」1字が次の行に落ちるので20に */
@media (max-width: 699px) {
  html body .gl-wide .gl-title { font-size: var(--fs-20); }
  .tour-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: start; }
  .tour-steps li > .btn, .tour-steps li > .muted { grid-column: 2; justify-self: start; }
  .tour-start > .demo-roles li { flex-wrap: wrap; gap: 8px; }
  .tour-start > .demo-roles li > .demo-role { flex: 1 1 100%; }
}
/* 体験の入口：登録から試す2つの立場と、直接開ける役の画面を分ける。選択後はいまの手順1つを大きく出す。 */
.tour-pick h2, .tour-preview h2, .tour-now h2 { font-size: var(--fs-20); font-weight: 600; line-height: 1.4; }
.tour-pick .start-roles { margin-top: var(--sp-12); }
.tour-preview { display: flex; flex-direction: column; gap: var(--sp-8); margin-top: var(--sp-24); }
.tour-preview > p { font-size: var(--fs-13); }
.tour-preview .demo-roles > li { flex-wrap: wrap; gap: var(--sp-8) var(--sp-16); }
.tour-preview .demo-role { flex: 1 1 10rem; }
.tour-preview-actions { display: flex; flex: 0 1 55%; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--sp-8); min-width: 0; max-width: 100%; font-size: var(--fs-13); overflow-wrap: anywhere; }
.tour-preview-actions .btn { max-width: 100%; white-space: normal; text-align: start; overflow-wrap: anywhere; }
.tour-now .btn-main { min-height: 48px; min-width: 240px; padding-inline: 24px; font-size: var(--fs-17); }
.tour-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--fs-15); }
.tour-now { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 16px 0; border-block: 1px solid var(--line); }
.tour-count { font-size: var(--fs-15); font-weight: 600; color: var(--brand-text); }
.tour-now > p { font-size: var(--fs-15); line-height: 1.7; }
.tour-now > .btn-main { margin-top: 4px; }
.tour-now > p.muted { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tour-track { list-style: none; margin: 16px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tour-track li { display: flex; align-items: center; gap: 12px; font-size: var(--fs-15); color: var(--label2); }
.tour-track li.is-now { color: var(--label); font-weight: 600; }
.tour-track li.is-done .tour-n { background: var(--brand-text); border-color: var(--brand-text); color: var(--on-brand); }
.tour-track li.is-now .tour-n { border-color: var(--brand); color: var(--brand-text); }
.tour-here { font-style: normal; font-weight: 600; font-size: var(--fs-13); color: var(--brand-text); }
.tour-more { margin-top: 24px; }
@media (max-width: 699px) {
  .tour-now .btn-main { width: 100%; min-width: 0; }
  .tour-preview-actions { flex-basis: auto; justify-content: flex-start; }
}
.tour-track .tour-done { margin-left: 0; }
/* 体験の入口のスマホ：「いまここ」「済み」は折らない。見出しは語の途中で折らない */
.tour-here, .tour-track .tour-done { flex: none; white-space: nowrap; }
.tour-now h2, .tour-track li > span:not(.tour-n) { word-break: auto-phrase; }
/* 11/21 本人「無駄なのが多すぎる」：ログインの画面は1列・中央。ロゴ・見出し・ID・パスワード・ログイン・下に1行だけ */
html body .gl-solo .gl-card { display: flex; flex-direction: column; max-width: 400px; min-height: 0; padding: 32px 0; border-top: 0; }
html body .gl-solo .gl-head { align-items: center; text-align: center; }
html body .gl-solo .gl-logo { align-self: center; height: 40px; margin-bottom: 16px; }
html body .gl-solo .gl-title { margin-bottom: 0; }
html body .gl-solo .gl-sub { margin-top: 8px; }
html body .gl-solo .gl-body { padding-top: 32px; }
html body .gl-solo .gl-submit { width: 100%; min-height: 48px; margin-top: 8px; font-size: var(--fs-17); }
html body .gl-solo .gl-actions { justify-content: center; }
html body .gl-solo .gl-foot { max-width: 400px; border-top: 0; justify-content: center; }
.gl-solo-foot { margin: 8px 0 0; text-align: center; font-size: var(--fs-15); color: var(--label2); }
.gl-solo-foot a { color: var(--brand-text); font-weight: var(--fw-semi); text-decoration: underline; text-underline-offset: 4px; }
/* ID がない方（#/start） */
/* はじめての方（11/22）：先に役を選ぶ。行全体が押せる */
.start-roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.start-roles li { border-bottom: 1px solid var(--line); }
.start-roles :is(a, button) { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 4px; color: var(--label); text-decoration: none; }
.start-roles button { width: 100%; border: 0; border-radius: 0; background: none; font: inherit; text-align: start; cursor: pointer; }
.start-roles :is(a, button) > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.start-roles b { font-size: var(--fs-17); font-weight: var(--fw-semi); }
.start-roles :is(a, button) > span:first-child > span { color: var(--label2); font-size: var(--fs-13); }
.start-go { flex: none; color: var(--label2); font-size: var(--fs-20); line-height: 1; }
@media (hover: hover) { .start-roles :is(a, button):hover b { color: var(--brand-text); } }
.start-roles :is(a, button):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.start-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.start-step { padding: 16px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.start-step:first-child { padding-top: 0; border-top: 0; }
.start-step h2 { margin: 0; font-size: var(--fs-17); font-weight: var(--fw-semi); color: var(--label); }
.start-step p { margin: 0; font-size: var(--fs-15); line-height: 1.6; color: var(--label); }
.start-step > .btn { align-self: flex-start; }
.gl-start { display: flex; flex-direction: column; gap: 8px; }
.gl-start h2 { margin: 16px 0 0; font-size: var(--fs-17); font-weight: var(--fw-semi); color: var(--label); }
.gl-start h2:first-child { margin-top: 0; }
.gl-start p { margin: 0; font-size: var(--fs-15); line-height: 1.6; color: var(--label); }
.gl-start-links { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gl-start-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--brand-text); font-size: var(--fs-15); font-weight: var(--fw-semi); text-decoration: underline; text-underline-offset: 4px; }
/* IDとパスワードを決めたあとの知らせ（11/21 本人「小さくて全然わからない」）。大きな見出しと大きな ID、次にすること、ボタン1つ */
.login-done { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: var(--w-read); padding: 24px 0 32px; border-block: 1px solid var(--line); }
.login-done h2 { margin: 0 0 8px; font-size: var(--fs-26); font-weight: var(--fw-semi); line-height: 1.3; color: var(--label); word-break: auto-phrase; }
.login-done-label { margin: 0; font-size: var(--fs-15); color: var(--label2); }
.login-done-id { margin: 0 0 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-26); font-weight: 700; letter-spacing: .08em; color: var(--label); }
.login-done-next { margin: 0; font-size: var(--fs-17); line-height: 1.6; color: var(--label); }
.login-done-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.login-done-act .btn-main { min-height: 48px; min-width: 240px; font-size: var(--fs-17); }
@media (max-width: 599px) {
  html body .gl-solo .gl-card { padding: 24px 24px 16px; }
  .login-done-act, .login-done-act .btn-main { width: 100%; }
}
/* はじめてのパスワード（11/21）：下の1行の「ログアウト」はリンクと同じ見た目。決めたあとの知らせは枠の中で中央・罫線なし */
html body .gl-solo-foot .gl-text-btn { display: inline; min-height: 0; margin: 0; padding: 0; border-radius: 0; font-size: var(--fs-15); font-weight: var(--fw-semi); text-decoration: underline; text-underline-offset: 4px; background: none; border: 0; }
html body .gl-solo-foot span { margin: 0 8px; }
html body .gl-solo .login-done { align-items: center; text-align: center; max-width: none; padding: 8px 0 0; border-block: 0; }
html body .gl-solo .login-done-act { flex-direction: column; width: 100%; }
html body .gl-solo .login-done-act .btn-main { width: 100%; min-width: 0; }
/* ═════════ 11/21 ログインの浮いた1枚（ここから下は Apple F・r2 の「影・角丸の面を使わない」の例外。.gl-solo だけ） ═════════ */
/* ログインまわりは本体（app.school-signage.net/login）と同じ「浮いた1枚」（11/21 本人「キミテラス正本のようにフロートに」）。
   薄い地の上に白い1枚・細い枠・やわらかい影・角丸16。この1枚だけの例外で、ほかの画面の面には使わない。 */
html body .gl-solo { padding: 32px 16px 16px; background: var(--canvas); }
html body .gl-solo .gl-card { max-width: 400px; padding: 36px 32px 28px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(31, 41, 55, .08); }
html body .gl-solo .gl-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 24px; }
html body .gl-solo .gl-logo-stack { display: block; width: 96px; height: auto; }
html body .gl-solo .gl-product { font-size: var(--fs-15); font-weight: var(--fw-semi); letter-spacing: .12em; padding-left: .12em; color: var(--label); }
html body .gl-solo .gl-title { font-size: var(--fs-20); font-weight: var(--fw-semi); }
html body .gl-solo .gl-body { padding-top: 24px; }
html body .gl-solo .gl-foot { margin-top: 16px; }
/* 1枚の中の欄とボタンは、1枚の角丸に合わせて 8（本体のログインと同じ）。下の行の「キミテラス インターンシップ」は1枚の頭と重なるので出さない */
html body .gl-solo .gl-field input.gl-in:not([type="checkbox"]):not([type="radio"]), html body .gl-solo .gl-submit, html body .gl-solo .login-done-act .btn-main { border-radius: 8px; }
html body .gl-solo .gl-foot > span { display: none; }
html body .gl-solo .gl-card { flex: none; }
html body .gl-solo .gl-links { justify-content: center; }
@media (max-width: 599px) {
  html body .gl-solo .gl-card { padding: 28px 20px 20px; }
  html body .gl-solo .gl-logo-stack { width: 80px; }
}
html body:has(.gl-solo) { background: var(--canvas); }

/* 2026-11-21: reading hierarchy and tactile controls. Keep work surfaces flat. */
@media screen {
  html body .page-title h1, html body .k-large-t {
    font-size: clamp(var(--fs-26), 2.5vw, var(--fs-display));
    line-height: 1.3;
    text-wrap: balance;
  }
  html body .page-title p { margin-top: var(--sp-8); font-size: var(--fs-15); line-height: 1.7; }
  html body .now-box { padding-block: var(--sp-24); }
  html body .now-box-title { font-size: var(--fs-20); line-height: 1.5; text-wrap: balance; }
  html body .now-box-d { max-width: var(--w-read); line-height: 1.8; }
  html body .now-box :is(.btn-main, .k-btn-main) { min-height: var(--hit); padding-inline: var(--sp-24); font-size: var(--fs-15); }
  html body #k-side .nav-item, html body #k-side .step-item {
    min-height: var(--hit);
    border-radius: var(--r-nav);
    transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
  }
  html body #k-side .side-brand { padding-block: var(--sp-16); gap: var(--sp-4); }
  html body #k-side .side-brand strong { font-size: var(--fs-15); }
  html body :is(input, select, textarea)[aria-invalid="true"] {
    border-color: var(--bad);
    background-color: var(--bad-bg);
  }
  html body .warn.live { color: var(--bad); font-size: var(--fs-15); line-height: 1.6; }
  html body :is(input, textarea) { caret-color: var(--brand); }
  html body :is(.btn, .k-btn, .nav-item, .step-item) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  html body :is(.btn, .k-btn) { transition: background-color var(--dur-2) var(--ease-out), opacity var(--dur-1) var(--ease-out); }
  html body :is(.btn, .k-btn):disabled { cursor: not-allowed; }
  html body .dlg-head { padding-top: var(--sp-24); }
  html body .dlg-body { overscroll-behavior: contain; scroll-padding-block: var(--sp-24); }
  html body .pane { scroll-padding-block: var(--sp-24); }
  html body :is(input, select, textarea, button, a) { scroll-margin-block: var(--sp-24); }
  html body .seg { gap: var(--sp-4); padding: var(--sp-4); }
  html body .seg-item span, html body .seg-btn { border-radius: var(--r-ctl); }
}
@media screen and (max-width: 699px), screen and (pointer: coarse) {
  html body :is(.btn-sm, .inline-check, .seg-btn), html body .seg-item span { min-height: var(--hit); }
  html body .now-box :is(.btn-main, .k-btn-main) { width: 100%; white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html body :is(.btn, .k-btn, #k-side .nav-item, #k-side .step-item) { transition: none; }
}

@media screen {
  #k-side .step-item .step-t b { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.45; }
  #k-side .step-item .step-w { flex-shrink: 0; }
  .att-row[data-awaiting-attendance]:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
}
/* メニューの一番下のログアウト（11/22 本人）。リンクと同じ控えめな文字のボタン */
.side-logout { background: none; border: 0; padding: 0; min-height: 32px; font: inherit; font-size: var(--fs-13); color: var(--label2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .side-logout:hover { color: var(--label); } }
.side-logout:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* パスワード：文字と重ならない余白と、欄ごとの44pxの表示切り替え。 */
.pw-control { position: relative; display: block; min-width: 0; width: 100%; }
html body .pw-field .pw-control > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-height: calc(var(--hit) + var(--sp-8)); padding-right: calc(var(--hit) + var(--sp-12)); }
html body .pw-field > label { pointer-events: auto; }
.pw-toggle { position: absolute; right: var(--sp-4); top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; justify-content: center; width: var(--hit); height: var(--hit); padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--label2); touch-action: manipulation; }
.pw-toggle .i { width: 20px; height: 20px; }
@media (hover: hover) { .pw-toggle:hover { background: var(--hover-bg); color: var(--brand-text); } }
.pw-toggle:active { background: var(--press-bg); }
.pw-toggle:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }

/* 11/22 読み込み：完成画面と共通の幅・段組み。案内は下に置き、骨組みを押し動かさない。 */
.loading-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.loading-page .loading-slot { position: relative; width: 100%; flex: none; }
.loading-feedback { padding-block: var(--sp-8); color: var(--label2); font-size: var(--fs-13); line-height: 1.6; }
.loading-feedback p:empty { display: none; }
.loading-feedback .btn { margin-top: var(--sp-8); }
.loading-feedback [hidden] { display: none; }
.loading-now-label { height: calc(var(--fs-13) * 1.6); }
.loading-now-title { height: calc(var(--fs-17) * 1.4); }
.loading-now-desc { height: calc(var(--fs-15) * 1.6); }
.loading-now-button { height: var(--hit); }
.loading-page .side .skel-row { min-height: 56px; padding-inline: var(--sp-8); }
.loading-page .side-brand { min-height: 44px; padding-block: var(--sp-8); }
.loading-page .side .skel-rows { border: 0; }
.loading-page .side .skel-row { border: 0; }
.loading-tabbar { align-items: center; justify-content: space-around; }
.loading-flow-tab { display: none; }
.loading-page.solo { width: 100%; max-width: var(--w-read); margin-inline: auto; }
.loading-companies .skel-row { min-height: 96px; }
.loading-page .demo-roles .skel-lines { gap: var(--sp-8); min-height: 44px; justify-content: center; }
.loading-page .gl-body { gap: 0; }
.loading-login-field { gap: 4px; }
.loading-login-field .skel-thin { height: calc(var(--fs-13) * 1.4); }
.loading-login-field .skel-input { height: 56px; }
.loading-login-submit { height: 48px; width: 100%; margin-top: 24px; }
.loading-login-links { height: 24px; width: 88%; margin-inline: auto; }
.loading-page.gl-solo .gl-title { line-height: 1.25; }
@media (max-width: 699px) {
  .loading-flow-tab { display: inline-flex; }
}
@media (prefers-reduced-motion: no-preference) {
  html body #main.loading-reveal { animation: loading-arrive 150ms ease-out; }
}
@keyframes loading-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .loading-page .skel-bar, .loading-reveal { animation: none; }
}

.loading-page.gl > .loading-slot { max-width: 1040px; height: 0; }
.loading-page.gl > .loading-slot .loading-feedback { position: absolute; inset: 0 0 auto; }
.loading-page.gl-solo > .loading-slot { max-width: 400px; }
.loading-progress { display: flex; flex-wrap: wrap; gap: var(--sp-8) var(--sp-24); padding-bottom: var(--sp-16); font-size: var(--fs-13); color: var(--label2); }
.loading-progress [aria-current] { color: var(--label); font-weight: var(--fw-semi); }
.loading-progress li + li::before { content: '›'; margin-right: var(--sp-24); }
.tour-ready { font-size: var(--fs-13); color: var(--label2); }

.loading-page .loading-content { gap: var(--sp-16); }
.loading-page .pane-in > .loading-content { gap: 20px; }
html body .loading-page .loading-copy { color: var(--fill-hover); background: var(--fill-hover); border-color: var(--fill-hover); }
.loading-page .gl-alt .demo-notes { gap: 4px; }
.loading-reveal .view { animation: none; }

/* 審査用の一覧（gallery.html）の中では、公開デモの案内と役の切り替えを出さない */
/* 見本モード（?review=1）でも帯は出す。役の切り替えはここから */

/* 初回のオプション紹介：同じ幅・同じ文字の強さ。無料を先に、区切り線で並べる。 */
html body dialog.option-intro { width: min(800px, calc(100vw - var(--sp-32))); max-height: 90dvh; border-radius: 0; }
html body .option-intro .dlg { max-height: 90dvh; }
html body .option-intro-head { position: relative; padding: var(--sp-32) var(--sp-32) var(--sp-24); }
html body .option-intro-head h2 { padding-right: var(--hit); font-size: var(--fs-26); line-height: 1.5; }
html body .option-intro-head p { margin-top: var(--sp-12); font-size: var(--fs-15); line-height: 1.7; }
html body .option-intro-close { position: absolute; top: var(--sp-24); right: var(--sp-24); width: var(--hit); min-height: var(--hit); padding: 0; color: var(--label); }
html body .option-intro-body { padding: 0 var(--sp-32) calc(var(--sp-24) + var(--safe-b)); gap: var(--sp-16); font-size: var(--fs-15); line-height: 1.7; }
.option-intro-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; border-block: 1px solid var(--sep); }
.option-intro-choice { display: flex; flex-direction: column; gap: var(--sp-12); min-width: 0; padding-block: var(--sp-24); }
.option-intro-choice:first-child { padding-right: var(--sp-24); }
.option-intro-choice + .option-intro-choice { border-left: 1px solid var(--sep); padding-left: var(--sp-24); }
.option-intro-choice h3 { margin: 0; font-size: var(--fs-17); font-weight: var(--fw-semi); }
.option-intro-choice p { margin: 0; }
.option-intro-choice .option-intro-price { font-size: var(--fs-26); font-weight: var(--fw-semi); line-height: 1.5; }
.option-intro-choice ul { padding-left: var(--sp-24); margin: 0 0 var(--sp-12); }
.option-intro-choice li + li { margin-top: var(--sp-8); }
html body .option-intro-choice .btn { width: 100%; min-height: var(--hit); margin-top: auto; font-size: var(--fs-15); }
.option-intro-terms, .option-intro-later { margin: 0; color: var(--label2); }
@media (max-width: 699px) {
  html body dialog.option-intro { width: 100%; max-width: 100%; }
  html body .option-intro-head { padding: var(--sp-24) var(--sp-24) var(--sp-16); }
  html body .option-intro-head h2 { font-size: var(--fs-20); }
  html body .option-intro-close { top: var(--sp-16); right: var(--sp-16); }
  html body .option-intro-body { padding-inline: var(--sp-24); }
  .option-intro-choices { grid-template-columns: minmax(0, 1fr); }
  .option-intro-choice:first-child { padding-right: 0; }
  .option-intro-choice + .option-intro-choice { border-left: 0; border-top: 1px solid var(--sep); padding-left: 0; }
}

/* 11/22 レビュー：状況の下に待ち日数を収め、横に列を足さない。 */
.board th > small, .board-wait-days { display: block; font-weight: var(--fw-reg); }
.today-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-4); }
@media (min-width: 700px) {
  html body .board th:last-child { width: 20%; }
  html body .board .board-status { white-space: normal !important; overflow-wrap: anywhere; }
  html body .board .board-status .chip { white-space: normal; }
}

.request-output { display: grid; gap: var(--sp-12); }

@media (max-width: 699px) { .today-head > .today-status { justify-content: flex-start; } }
