/* =====================================================================
   保健 授業ツール ― ビジュアル方針「保健室」
   温かい紙の地色／落ち着いたセージ（健やかさ・成長）を基調に、
   注意喚起だけを土色のアクセントで。見出しは先生の蛍光ペンの一筆。
   （クラス名は全機能で温存。JSは変更なし。単一テーマ＝昼の教室・投影向け）
   ===================================================================== */
:root {
  --paper: #f6f4ee;         /* ページの地：温かいオフホワイト */
  --surface: #fffdf8;       /* カード面：わずかに温かい白 */
  --surface-plain: #ffffff;

  --ink: #2b2a26;           /* 温かみのある黒に近い文字色 */
  --ink-soft: #6f6b61;      /* 温かいグレー */
  --line: #e4e0d5;          /* ヘアライン（温色） */

  --primary: #3f7d6e;       /* セージ・グリーン（健康・落ち着き・成長） */
  --primary-deep: #2f5f54;  /* 見出し・ボタン */
  --primary-wash: #eaf1ee;  /* ごく淡いセージの面 */

  --accent: #c97b4d;        /* 土色・クレイ：「今」「注意」だけに */
  --accent-wash: #f6e9e2;

  --good: #3f7d6e;          /* 成功＝成長（セージ） */
  --warn: #c9902f;          /* 注意（琥珀） */
  --bad:  #b34a3f;          /* 誤り・警告（れんが色） */

  /* 後方互換エイリアス（旧クラス名が参照） */
  --pitch: var(--primary);
  --pitch-dark: var(--primary-deep);
  --pitch-soft: var(--primary-wash);
  --chalk: var(--primary-wash);
  --chalk-line: var(--line);
  --gold: var(--accent);

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(43,42,38,.05);
  --shadow-lg: 0 2px 12px rgba(43,42,38,.09);
  --tap: 48px;

  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-head: "Zen Kaku Gothic New", "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
::selection { background: var(--accent-wash); }

/* 画面切り替え時のごく短いフェード（落ち着いた印象） */
#app > div { animation: viewIn .16s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(12px, 3vw, 24px);
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .01em; color: var(--primary-deep); display: flex; align-items: baseline; gap: 6px; }
.brand span { color: var(--ink-soft); font-weight: 500; font-size: 11px; }
#topbar-right { font-size: 13px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#topbar-right span.who { color: var(--ink-soft); max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar-right button {
  font-size: 12px; font-weight: 700; padding: 7px 12px; min-height: 36px;
  background: var(--primary-wash); color: var(--primary-deep); border-radius: 999px; text-decoration: none;
}
#topbar-right button:hover { background: #dfeae6; }
#topbar-right button.home { background: var(--primary-deep); color: #fff; }
#topbar-right button.home:hover { background: var(--primary); }
.subj-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }

/* 本時の授業タイマー：どの画面にいても上部に小さく出る */
#lesson-hud {
  position: sticky; top: 0; z-index: 39;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px clamp(12px, 3vw, 24px);
  background: #3d4bb0; color: #fff;
  font-size: 12.5px; font-weight: 700;
}
#lesson-hud.done { background: var(--good); }
#lesson-hud.paused { background: #6b6b6b; }
#lesson-hud.soon { background: var(--bad); animation: lh-pulse 1s ease-in-out infinite; }
@keyframes lh-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
#lesson-hud .lh-time { font-variant-numeric: tabular-nums; font-size: 14px; }
#lesson-hud .lh-cur { }
#lesson-hud .lh-next { opacity: .88; font-weight: 500; }
#lesson-hud .lh-sp { flex: 1; }
#lesson-hud button.lh-open, #lesson-hud button.lh-x {
  font: inherit; font-weight: 700; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.22); color: #fff; padding: 4px 11px; min-height: 26px;
}
#lesson-hud button.lh-open:hover, #lesson-hud button.lh-x:hover { background: rgba(255,255,255,.34); }
@media (prefers-reduced-motion: reduce) { #lesson-hud.soon { animation: none; } }

/* 本時の授業を作成：組み立て画面を横並びで一画面に */
.lp-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
@media (max-width: 680px) { .lp-grid { grid-template-columns: 1fr; } }
.subj-toggle button { min-height: 32px; padding: 5px 12px; font-size: 12px; font-weight: 800; background: transparent; color: var(--ink-soft); border-radius: 0; }
.subj-toggle button.on { background: var(--primary-deep); color: #fff; }
.subj-toggle button + button { border-left: 1px solid var(--line); }
@media (max-width: 560px) { #topbar-right span.who { display: none; } }

/* ---------- layout ---------- */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 30px) clamp(14px, 4vw, 28px) 80px;
}
.loading { color: var(--ink-soft); text-align: center; padding: 80px 0; font-weight: 700; }

/* 見出し＝先生の蛍光ペン（このアプリの「顔」。ここだけ主張し、他は静かに） */
h2 {
  font-family: var(--font-head);
  color: var(--ink);
  font-size: clamp(19px, 4.4vw, 24px);
  font-weight: 700;
  margin: 4px 0 20px;
  letter-spacing: .01em;
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0 .12em;
  background-image: linear-gradient(var(--accent-wash), var(--accent-wash));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% .40em;
}
h3 {
  font-family: var(--font-head);
  color: var(--ink); font-size: 15px; font-weight: 700; margin: 22px 0 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 20px);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card.white { background: var(--surface-plain); }
.card.center { text-align: center; }

.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--ink-soft); font-size: 12.5px; }
.muted.warn { color: var(--bad); font-weight: 700; }
.center { text-align: center; }

/* ---------- buttons ---------- */
button {
  font: inherit; font-weight: 700; cursor: pointer;
  border: none; border-radius: 10px;
  min-height: 44px; padding: 11px 18px;
  background: var(--primary-deep); color: #fff;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
button:hover { background: var(--primary); }
button:active { transform: translateY(1px) scale(.99); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible { outline: 3px solid rgba(63,125,110,.35); outline-offset: 2px; }
button.ghost { background: transparent; color: var(--ink-soft); min-height: 40px; padding: 8px 12px; text-decoration: underline; font-weight: 700; }
button.ghost:hover { color: var(--ink); background: rgba(43,42,38,.05); text-decoration: none; }
button.light { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
button.light:hover { background: var(--surface); border-color: var(--primary); color: var(--primary-deep); }
button.danger { background: transparent; color: var(--bad); font-weight: 700; }
button.danger:hover { background: rgba(179,74,63,.08); }
button.big { display: block; width: 100%; min-height: var(--tap); padding: 15px; font-size: 16px; border-radius: 12px; }

/* ---------- forms ---------- */
input[type=text], input[type=number], input[type=date], select, textarea {
  font: inherit; font-size: 16px;
  padding: 12px 14px; min-height: var(--tap);
  border: 1.5px solid var(--line); border-radius: 10px;
  width: 100%; background: var(--surface-plain); color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(63,125,110,.22);
}
textarea { min-height: 120px; line-height: 1.6; }
label { font-size: 12px; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: 6px; letter-spacing: .02em; }
.field { margin-bottom: 14px; }

/* ---------- tiles (タップして選ぶカード) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin: 4px 0 12px;
}
.tiles.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left; width: 100%;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 16px 15px; min-height: 88px;
  box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--primary); background: var(--primary-wash); }
.tile:active { transform: scale(.985); }
.tile .ti { font-size: 24px; line-height: 1; }
.tile .tt { font-family: var(--font-head); font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.tile .td { font-size: 12px; font-weight: 400; color: var(--ink-soft); line-height: 1.5; }
.tile.go { background: var(--primary-deep); color: #fff; border-color: transparent; }
.tile.go:hover { background: var(--primary); }
.tile.go .td { color: rgba(255,255,255,.85); }
.tile.accent { border-color: var(--line); border-left: 4px solid var(--accent); }
.tile.accent .tt { color: var(--ink); }
.tile.on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(63,125,110,.18), var(--shadow); }
.tile[disabled] { opacity: .5; }
/* 使える機能／使えない機能の見分け */
.tile.free { border-left: 4px solid var(--good); }
.tile.paid { border-left: 4px solid var(--accent); }
.tile.locked {
  border-left: 4px solid var(--line);
  background: repeating-linear-gradient(135deg, var(--paper), var(--paper) 8px, var(--surface) 8px, var(--surface) 16px);
  opacity: .72;
  box-shadow: none;
}
.tile.locked:hover { border-color: var(--line); background: var(--paper); }
.tile.locked .ti { filter: grayscale(1); opacity: .45; }
.tile.locked .tt, .tile.locked .td { color: var(--ink-soft); }
.tile .tag {
  display: inline-block; margin-top: 3px; margin-right: 4px; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; line-height: 1.6;
}
.tile .tag.t-free { background: rgba(63,125,110,.14); color: var(--good); }
.tile .tag.t-paid { background: var(--accent-wash); color: var(--accent); }
.tile .tag.t-lock { background: var(--line); color: var(--ink-soft); }

/* ---------- hero (生徒ホームの「今の課題」) ― 配布プリントの見立て ---------- */
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px 4px var(--radius-lg) var(--radius-lg);
  padding: clamp(16px, 4vw, 24px);
  box-shadow: var(--shadow-lg);
  margin-bottom: 14px;
}
.hero .kicker { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .08em; }
.hero .htitle { font-family: var(--font-head); font-size: clamp(17px, 4.5vw, 21px); font-weight: 700; margin: 6px 0 14px; color: var(--ink); }

/* ---------- choices (一問一答・4択) ---------- */
.choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .choices.grid2 { grid-template-columns: 1fr 1fr; } }
.choice {
  display: block; width: 100%; text-align: left;
  background: var(--surface-plain); color: var(--ink); font-weight: 400; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 11px;
  padding: 15px 16px; min-height: 54px;
}
.choice:hover { border-color: var(--primary); background: var(--primary-wash); }
.choice.correct { border-color: var(--good); background: rgba(63,125,110,.12); font-weight: 700; }
.choice.wrong { border-color: var(--bad); background: rgba(179,74,63,.12); }
.choice:disabled { opacity: 1; }

/* ---------- misc ---------- */
.pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(43,42,38,.08); color: var(--ink); display: inline-block; }
.pill.gold { background: var(--accent); color: #fff; }
.pill.pitch { background: var(--primary); color: #fff; }
.list-item {
  background: var(--surface-plain); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; margin-bottom: 7px; min-height: 50px;
  display: flex; align-items: center; gap: 10px;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code {
  font-family: ui-monospace, Menlo, monospace; font-size: clamp(22px, 6vw, 30px);
  font-weight: 800; color: var(--primary-deep); letter-spacing: 3px;
  background: var(--surface-plain); border: 1.5px dashed var(--line); border-radius: 10px; padding: 6px 14px;
}
.err { color: var(--bad); font-size: 13.5px; font-weight: 700; margin: 8px 0; background: rgba(179,74,63,.08); border-radius: 8px; padding: 8px 12px; }
.err:empty { display: none; }
.big-emoji { font-size: clamp(40px, 10vw, 52px); text-align: center; line-height: 1; }

.session-card { border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; background: var(--primary-wash); padding: 4px; border-radius: 10px; }
.tabs button { flex: 1; background: transparent; color: var(--ink-soft); min-height: 40px; font-weight: 700; border-radius: 7px; }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(43,42,38,.08); }

/* ---------- typing (情報アプリ互換・保健では未使用でも保持) ---------- */
.typing-target { font-family: ui-monospace, Menlo, monospace; font-size: 20px; line-height: 1.9; background: var(--surface-plain); padding: 16px; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }
.typing-target .done { color: rgba(43,42,38,.35); }
.typing-target .cur { background: var(--accent); color: #fff; border-radius: 3px; }
.typing-target .bad { background: rgba(179,74,63,.3); }
.typing-target.scroll { max-height: 42vh; overflow-y: auto; font-size: 18px; line-height: 1.8; }
.stat { display: inline-block; margin-right: 16px; font-weight: 700; }
.stat span { font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.typing-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 12px; }
.typing-bar span { display: block; height: 100%; background: var(--primary); transition: width .25s ease; }
.typing-rank { font-size: 46px; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.rank-S { color: var(--accent); } .rank-A { color: var(--good); } .rank-B { color: var(--primary); }
.rank-C { color: rgba(43,42,38,.55); } .rank-D { color: var(--bad); }
.misskey { display: inline-block; background: rgba(179,74,63,.14); color: var(--bad); border-radius: 6px; padding: 2px 7px; margin: 0 2px; font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
.typing-timer { text-align: center; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.typing-timer.warn { color: var(--bad); }

/* ---------- 先生ダッシュボード ---------- */
.stat-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px; margin: 4px 0 12px;
}
.stat-tile {
  background: var(--surface-plain); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 8px; text-align: center;
}
.stat-tile b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile span { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.stat-tile.bad b { color: var(--bad); }

.chip {
  font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: rgba(43,42,38,.08); color: var(--ink); white-space: nowrap;
}
.chip.bad { background: rgba(179,74,63,.14); color: var(--bad); }

.live-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 8px; margin-bottom: 8px;
}
.live-row {
  background: var(--surface-plain); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px;
}
.live-row.idle { opacity: .6; }
.live-row.done { border-color: rgba(63,125,110,.5); background: rgba(63,125,110,.06); }
.live-row .top { display: flex; align-items: center; gap: 8px; }
.live-row .name { flex: 1; font-weight: 800; font-size: 14px; }
.live-row .bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 0; }
.live-row .bar span { display: block; height: 100%; background: var(--primary); transition: width .3s ease; }
.live-row.done .bar span { background: var(--good); }
.live-row .sub { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--ink-soft); margin-top: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.on { background: var(--good); } .dot.idle { background: var(--warn); } .dot.off { background: rgba(43,42,38,.25); }

/* ---------- 動画つき授業 ---------- */
.watch-progress { height: 9px; background: var(--line); border-radius: 999px; overflow: hidden; }
.watch-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s ease; }
#w-meta { color: var(--ink-soft); font-weight: 700; }
.watch-stage { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.watch-video { display: block; width: 100%; max-height: 58vh; background: #000; }
.watch-q {
  margin: 10px 0 4px; background: var(--card, #fffdf8); padding: 16px clamp(14px, 4vw, 22px) 18px;
  border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); scroll-margin-bottom: 12px;
}
.watch-q-tag { font-size: 11px; font-weight: 800; color: var(--primary-deep); margin-bottom: 6px; letter-spacing: .04em; }
.watch-q-body { font-size: clamp(15px, 4vw, 17px); line-height: 1.6; margin-bottom: 12px; font-weight: 600; }
.watch-q input[type=text] { margin-bottom: 8px; }
.watch-q button { margin-top: 6px; }
.w-hint { background: var(--accent-wash); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 8px 0 12px; }
.w-hint b { font-variant-numeric: tabular-nums; }
button.w-hint-btn { display: inline-flex; margin-top: 8px; padding: 9px 14px; font-size: 13px; min-height: 40px; }

.w-timeline { position: relative; height: 26px; margin: 4px 0; background: var(--line); border-radius: 999px; cursor: pointer; }
.w-tl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(63,125,110,.35); border-radius: 999px; }
.w-tl-head { position: absolute; top: -3px; bottom: -3px; width: 3px; left: 0; background: var(--ink); border-radius: 2px; }
button.w-mark {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 20px; height: 20px; min-height: 20px; padding: 0; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
button.w-mark.done { background: var(--primary); }
button.w-mark.think { background: var(--primary-deep); }

/* ---------- 出席簿 ---------- */
.att-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.att-row:last-child { border-bottom: none; }
.att-no { min-width: 2.6em; text-align: right; color: var(--ink-soft); flex: none; font-weight: 700; }
.att-name { flex: 1; min-width: 7em; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
button.att-mark {
  min-width: 46px; min-height: 38px; padding: 4px 10px; font-size: 13px; font-weight: 800;
  border: 1.5px solid var(--line); background: var(--surface-plain); color: var(--ink-soft); border-radius: 9px;
}

/* ---------- グループ分け ---------- */
.grp-card { padding: 14px; }
.grp-head { font-family: var(--font-head); font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.grp-mems { display: flex; flex-wrap: wrap; gap: 7px; }
button.grp-mem {
  background: var(--surface-plain); color: var(--ink); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 9px 14px; min-height: 40px; font-weight: 700; font-size: 13px;
}
button.grp-mem .mono { color: var(--ink-soft); font-weight: 700; }
button.grp-mem.sel { background: var(--accent); color: #fff; border-color: var(--accent); }
button.grp-mem.sel .mono { color: rgba(255,255,255,.85); }

/* ---------- details（折りたたみ） ---------- */
details.card > summary {
  cursor: pointer; font-weight: 700; list-style: none; padding: 2px 0;
  display: flex; align-items: center; gap: 8px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸"; color: var(--primary); font-size: 12px; transition: transform .15s ease; }
details.card[open] > summary::before { transform: rotate(90deg); }

/* --- 体験シミュレーション --- */
.sim-big { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sim-big span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.sim-bar { margin: 10px 0; }
.sim-bar-l { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.sim-bar-t { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 3px 0; }
.sim-bar-t span { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.sim-bar-c { font-size: 11px; color: var(--ink-soft); }
input[type=range] { width: 100%; min-height: 32px; accent-color: var(--primary); }

/* --- ヘルスログのミニグラフ --- */
.hl-bars { display: flex; align-items: flex-end; gap: 3px; height: 76px; }
.hl-b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.hl-b span { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--line); }
.hl-b em { font-style: normal; font-size: 9px; color: var(--ink-soft); margin-top: 2px; }
.hl-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hl-cd { text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 5px 2px; background: var(--surface-plain); }
.hl-cd b { display: block; font-size: 15px; line-height: 1.2; color: var(--ink-soft); }
.hl-cd em { font-style: normal; font-size: 9px; color: var(--ink-soft); }
.hl-cd.ok { background: rgba(63,125,110,.12); border-color: var(--good); }
.hl-cd.ok b { color: var(--good); }
.hl-cd.ng { background: rgba(179,74,63,.10); border-color: var(--bad); }
.hl-cd.ng b { color: var(--bad); }

/* --- 観点別評価テーブル --- */
.grade-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.grade-table th, .grade-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; vertical-align: middle; }
.grade-table th { background: var(--primary-wash); font-weight: 700; white-space: nowrap; }
.grade-table td { background: var(--surface-plain); }
.gseg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.gseg button { min-height: 32px; padding: 4px 9px; font-size: 13px; font-weight: 800; background: var(--surface-plain); color: var(--ink-soft); border-radius: 0; }
.gseg button + button { border-left: 1px solid var(--line); }
.gseg button.on { background: var(--primary); color: #fff; }
.gauto { font-size: 10.5px; color: var(--ink-soft); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* カードの外（紙の地の上）に置く小見出し */
.sec-h {
  color: var(--ink-soft); font-weight: 700; font-size: 13px;
  letter-spacing: .02em; margin: 20px 0 8px;
  border-left: 3px solid var(--primary); padding-left: 8px;
}

@media (min-width: 720px) {
  .card { padding: 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, #app > div { animation: none !important; transition: none !important; }
}

/* 学習指導案などの印刷（🖨 印刷する） */
@media print {
  body { background: #fff !important; }
  #topbar, .home, button { display: none !important; }
  #app { padding: 0 !important; }
  #app > div { animation: none !important; }
  #app .card, #app .card.white { box-shadow: none !important; border: 1px solid #999; }
  h2 { background: none !important; }
  .sec-h { background: #eee !important; color: #000 !important; border-left-color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .grade-table { font-size: 11px; }
  #app > div > h2 { color: #000 !important; }
  h3 { break-after: avoid; }
  tr, .card { break-inside: avoid; }
}
