/* レイアウト・共通コンポーネント（UIモックアップv4準拠：サイドバー型シェル・追加修正指示07） */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 24px 20px 70px;
}

/* アプリシェル：左サイドバー＋中央寄せ本文。login.htmlは個別にdisplay:blockで上書きする。 */
#app {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 184px 1fr;
  overflow: hidden;
  min-height: 560px;
}

/* SVGアイコン共通 */
svg.ico, svg.ico-sm { display: inline-block; vertical-align: middle; }
.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* グローバルサイドバー（学習者用：ブライトブルーのグラデ。管理画面では.admin-modeで濃色に切替）。 */
.side {
  background: linear-gradient(180deg, var(--side-bg), var(--side-bg-d));
  color: #fff;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#app.admin-mode .side { background: linear-gradient(180deg, var(--side-admin), var(--side-admin-d)); }

.side .brand-link { text-decoration: none; display: block; margin-bottom: 14px; }
.side .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: #fff; padding: 0 6px; }
.side .brand .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(255, 255, 255, .22); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
}
.side .brand .word, .side .brand .word span { color: #fff; }
.side .grp { color: rgba(255, 255, 255, .7); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; margin: 12px 8px 4px; }
.side a {
  display: flex; align-items: center; gap: 9px;
  color: rgba(255, 255, 255, .86); text-decoration: none;
  font-size: 12.5px; padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.side a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.side a.active { background: rgba(255, 255, 255, .2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-2); }
.side .foot { margin-top: auto; font-size: 11px; color: rgba(255, 255, 255, .7); padding: 8px 10px; }
.side .foot-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.side .exit-admin { opacity: .85; }

/* 本文エリア（#view）。 */
.main {
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}

/* ロゴ（マーク＋ワードマーク）。白背景（login.html等）用の既定スタイル。
   サイドバー内（濃色背景）では上の.side .brandで白文字に上書きされる。 */
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18);
}
.brand .word { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.brand .word span { color: var(--brand); }

/* 汎用の横並びバー（結果画面のバッジ表示等。以前はグローバルヘッダーだったが
   ナビがサイドバーへ移ったため、現在は本文内の小さな見出しバーとしてのみ使う）。 */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar.plain { /* 互換のため維持（現状はtopbarと同一） */ }

.icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 10px;
  display: grid; place-items: center;
  color: var(--muted); background: transparent; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.icon-btn:hover { border-color: var(--brand-2); color: var(--brand); }
/* サイドバー内（濃色背景）では白系の色調に上書きする。 */
.side .icon-btn { width: 30px; height: 30px; border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .85); }
.side .icon-btn:hover { border-color: #fff; color: #fff; }
.side .logout { color: rgba(255, 255, 255, .85); font-size: 11px; text-decoration: none; }
.side .logout:hover { color: #fff; }

/* 戻る（本文左上） */
.backrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 13px;
  font-size: 13px; color: var(--muted); background: transparent; cursor: pointer; font-family: inherit;
  transition: color .15s ease, border-color .15s ease;
}
.back:hover { color: var(--ink); border-color: var(--brand-2); }

.kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-2); }
.h { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.muted { color: var(--muted); font-size: 13px; }

/* カード・パネル */
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ボタン（既定＝プライマリ） */
.btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .15s ease, transform .15s ease, border-color .15s ease;
}
.btn:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.ghost:hover:not(:disabled) { color: var(--ink); border-color: var(--brand-2); }
.btn.danger { background: var(--ng); }
.btn.sm { width: auto; padding: 8px 13px; font-size: 12.5px; border-radius: 9px; }

/* 入力フィールド */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea,
select, input:not([type="radio"]):not([type="checkbox"]), textarea {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
}
.field input:focus, .field select:focus, .field textarea:focus,
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand-2); }

input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }

/* セクション見出し（Overview/Practice等で階層を作る。追加修正指示07：区切り・カテゴリの明確化） */
.sec { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
.sec.mt { margin-top: 20px; }

/* KPIカード（3列。ホーム・成績ページで共通使用。追加修正指示07） */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; background: var(--card); }
.kpi .n { font-size: 21px; font-weight: 700; color: var(--ink); }
.kpi .n small { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi .n.acc { color: var(--brand); }
.kpi .n.pop { color: var(--pop); }
.kpi .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.kpi.streak { border-top: 3px solid var(--pop); }

/* F形式リスト（先頭ドット＋右シェブロン。押せる項目だと統計カードと見た目を変えて示す。追加修正指示07-2） */
.list { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s ease; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--brand-soft); }
.row .d { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; }
.row .d.sky { background: var(--brand-2); }
.row .d.pop { background: var(--pop); }
.row .t { min-width: 0; }
.row .t b { font-size: 13px; display: block; }
.row .t span { font-size: 11px; color: var(--muted); display: block; }
.row .cta { margin-left: auto; color: var(--muted); flex: 0 0 auto; }

/* 実戦モードの解答タイマー（円形カウントダウン。全パート共通10秒）。 */
.exam-timer { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.exam-timer .timer-ring { width: 40px; height: 40px; transform: rotate(-90deg); }
.exam-timer .timer-ring-bg { fill: none; stroke: var(--line); stroke-width: 3; }
.exam-timer .timer-ring-fg {
  fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke .15s ease;
}
.exam-timer .timer-ring-fg.danger { stroke: var(--ng); }
.exam-timer .timer-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--ink);
}

/* リザルト詳細オーバーレイ（実戦モード終了後、番号タップで解説を確認する導線）。 */
.review-overlay .review-modal {
  max-width: 480px; width: 92%; max-height: 84vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; position: relative;
}
.review-overlay .review-close {
  position: absolute; top: 10px; right: 10px; z-index: 1;
}
.review-list { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.review-list .badge { cursor: pointer; border: none; font-family: inherit; }

/* スタッツ（横3列）。表示専用と分かるよう控えめに、罫線のみで1枚ずつ独立して見せる
   （v4方針：影は控えめ・罫線でくっきり。以前はbox-shadowを付与していたが、
   .card/.panel/.kpiなど他のカード類と統一するため罫線のみに変更）。 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; background: var(--card); }
.stat.pop { border-top: 3px solid var(--pop); }
.stat.pop .num { color: var(--pop); }
.stat .num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.stat .num small { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .lab { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ホーム下部の統計帯（表示のみ・控えめ。指示02-1/02-2） */
.statsbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px;
  background: color-mix(in srgb, var(--brand-soft) 55%, transparent);
  border-radius: var(--radius-md); padding: 12px 18px;
  font-size: 12.5px; color: var(--muted);
}
.statsbar b { color: var(--ink); font-size: 15px; }
.statsbar .pop-num { color: var(--pop); font-size: 15px; font-weight: 700; }
.statsbar a { margin-left: auto; color: var(--brand); text-decoration: none; font-weight: 600; }

/* パート選択カード（モード選択はhome.jsで.list/.rowのF形式リストに移行済み。追加修正指示07） */
.parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.part { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; cursor: pointer; background: var(--card); transition: border-color .15s ease; }
.part:hover { border-color: var(--brand-2); }
.part .tag { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 9px; border-radius: 999px; }
.part b { display: block; margin: 10px 0 3px; font-size: 15px; }
.part span { font-size: 12px; color: var(--muted); }
/* チップ（出題形式・件数サマリー等で共通使用。v3モック更新分＋管理画面へ汎用化） */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.chip { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--card); }

/* バッジ・タグ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge.ng { background: color-mix(in srgb, var(--ng) 14%, transparent); color: var(--ng); }
.badge.warn { background: color-mix(in srgb, #C98A2B 16%, transparent); color: #B07A22; }
.badge.exam { background: var(--brand); color: #fff; }
.badge.pop { background: var(--pop-soft); color: var(--pop); }
/* 出題中の進捗表示（n/合計）専用。他のbadge用途より大きく、太字にして視認性を上げる。 */
.badge.progress { font-size: 13.5px; font-weight: 800; padding: 5px 13px; }
.tagpill {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}

/* 進捗バー */
.bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }

/* 出題（応答選択）：音声再生パネル */
.listen {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 26px 18px; text-align: center;
  background: linear-gradient(180deg, var(--brand-soft), transparent);
}
/* 音声インジケータ：再生中は波がアニメーションし、停止中（.paused）は静止する */
@keyframes wv { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.wave { display: flex; gap: 5px; justify-content: center; align-items: center; height: 48px; margin: 14px 0 8px; }
.wave i {
  width: 5px; height: 44px; border-radius: 3px; background: var(--brand-2);
  transform-origin: center; animation: wv 1s ease-in-out infinite;
}
.wave.paused i { animation-play-state: paused; transform: scaleY(.3); }
.wave i:nth-child(1) { animation-delay: 0s; }
.wave i:nth-child(2) { animation-delay: .12s; }
.wave i:nth-child(3) { animation-delay: .24s; }
.wave i:nth-child(4) { animation-delay: .36s; }
.wave i:nth-child(5) { animation-delay: .18s; }
.wave i:nth-child(6) { animation-delay: .30s; }
.wave i:nth-child(7) { animation-delay: .06s; }

/* 1/2/3ボタン：画面を占有しすぎない適度なサイズ（指示03-6） */
.choices3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 420px; margin: 0 auto; width: 100%; }
.choices3 .c {
  height: 64px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card);
  display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--brand);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.choices3 .c:hover { border-color: var(--brand-2); transform: translateY(-2px); }
.choices3 .c.sel { background: var(--brand); color: #fff; border-color: var(--brand); }

/* チェック付きラベル（管理画面のイラスト聴解切替など） */
.confidence { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.confidence input { width: 16px; height: 16px; }

/* 要復習マークのトグルボタン（出題画面・結果画面共通。追加修正指示04-A）。
   backrow/topbarの右側に置く小さい丸アイコンボタン（フィードバック対応：以前は幅いっぱいで大きすぎた）。 */
.mark-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer;
}
.mark-toggle-btn svg { width: 16px; height: 16px; }
.mark-toggle-btn.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* 選択肢（テキスト4択） */
.opt {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 13px 14px; font-size: 13.5px; cursor: pointer;
  transition: border-color .15s ease;
}
.opt:hover { border-color: var(--brand-2); }
.opt .n {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: 12px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.opt.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.opt.ok .n { background: var(--ok); color: #fff; }
.opt.ng { border-color: var(--ng); background: color-mix(in srgb, var(--ng) 10%, transparent); }
.opt.ng .n { background: var(--ng); color: #fff; }
.opt.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.opt.sel .n { background: var(--brand); color: #fff; }

/* 和訳セクションの選択肢番号バッジ（.opt .nと同じ見た目を汎用化）。 */
.choice-num {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: 11.5px;
  display: grid; place-items: center; flex: 0 0 auto;
  margin-top: 1px;
}

/* 結果画面：色だけでは「正解」「自分の回答」の区別が付かないという指摘への対応。
   選択肢の右端に明示ラベルを添える。 */
.opt .tag-label { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; flex: 0 0 auto; }
.opt.ok .tag-label { background: var(--ok); color: #fff; }
.opt.ng .tag-label { background: var(--ng); color: #fff; }

.split { display: flex; gap: 12px; }
.split > * { flex: 1; }

/* 使い方（マニュアル）ページ。プレーンテキストの羅列だと読みづらいため、
   見出しに色・左ボーダー、要点はカード・注意書きボックスで視覚的に区切る。 */
.manual { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.manual h2 {
  font-size: 14px; font-weight: 800; margin-top: 22px; margin-bottom: 2px;
  padding: 6px 12px; background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 0 8px 8px 0; color: var(--brand-d);
}
.manual h3 { font-size: 14px; font-weight: 700; margin-top: 12px; color: var(--brand); }
.manual p, .manual li { font-size: 13.5px; color: var(--ink); }
.manual ul, .manual ol { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.manual .note-box { border-left: 3px solid var(--brand-2); background: var(--brand-soft); border-radius: 0 8px 8px 0; padding: 10px 14px; font-size: 13px; margin: 4px 0; }
.manual .note-box + .note-box { margin-top: 8px; }

/* 学習モード3種のカード（使い方ページ）。色分けでモードの違いを視覚化する。 */
.mode-cards { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.mode-card { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; padding: 10px 14px; background: var(--card); }
.mode-card.sky { border-left-color: var(--brand-2); }
.mode-card.pop { border-left-color: var(--pop); }
.mode-card-title { font-weight: 800; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.mode-card p { margin: 0; }

/* 管理画面コンテンツ（グローバルサイドバーの.mainにそのまま描画される。
   以前は管理専用の.admin/.sideグリッドを持っていたが、サイドバーをグローバル共通化したため
   .apanelは単なるコンテンツラッパーになった）。 */
.apanel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.apanel .top { display: flex; align-items: center; justify-content: space-between; }

/* 管理コンソールのモバイル用サブナビ（横スクロールタブ）。PCではサイドバーで足りるため非表示。 */
.admin-subnav { display: none; }

/* 管理：一覧行 */
.qrow {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
}
.qrow .tx { font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .acts { margin-left: auto; display: flex; gap: 12px; color: var(--muted); flex: 0 0 auto; }
.qrow .acts span { cursor: pointer; display: grid; place-items: center; transition: color .12s ease; }
.qrow .acts span:hover { color: var(--brand); }

/* アプリ内モーダル（破壊的操作の確認。指示02-4） */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 21, 29, .45);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow);
  padding: 22px; width: 100%; max-width: 400px;
}
.modal-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.modal-message { margin-top: 8px; }

/* ロゴはホームへのリンク（指示03-8） */
a.brand-link { text-decoration: none; color: inherit; }

/* 読み上げ速度の切替（出題画面。指示03-9） */
.rate-row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.rate-row .lab { font-size: 11.5px; color: var(--muted); }

/* 下部タブバー（スマホ専用）。デスクトップでは非表示。 */
.tabbar { display: none; }

/* スマホ縦画面：サイドバーを下部タブバーに切り替える（追加修正指示07-1）。 */
@media (max-width: 640px) {
  body { padding: 0; }
  #app { grid-template-columns: 1fr; max-width: 100%; border-radius: 0; border: none; min-height: 100vh; }
  .side { display: none; }
  .main { padding: 26px 16px 78px; }
  .h { font-size: 21px; }
  .stats, .parts { grid-template-columns: 1fr; }

  /* KPIカード（今日の学習・正答率・連続学習）は3列だと窮屈なので2列にし、
     縦積み4行（KPI3つ+目標バー）でスクロールが発生していた分を圧縮する。 */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi { padding: 9px 10px; }
  .kpi .n { font-size: 17px; }
  .kpi .l { font-size: 10px; }

  /* タブバーの背景をブランドカラーに統一（サイドバーと同じグラデ。管理画面では濃色に切替）。 */
  .tabbar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: linear-gradient(180deg, var(--side-bg), var(--side-bg-d));
    border-top: none;
  }
  #app.admin-mode .tabbar { background: linear-gradient(180deg, var(--side-admin), var(--side-admin-d)); }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 0; color: rgba(255, 255, 255, .75); font-size: 9.5px; text-decoration: none;
  }
  .tabbar a.active { color: #fff; font-weight: 700; }

  /* 管理コンソールのモバイル用サブナビ：横スクロールタブで全項目に入れるようにする。 */
  .admin-subnav {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin: -2px 0 2px;
    -webkit-overflow-scrolling: touch;
  }
  .admin-subnav a {
    flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
    padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
    color: var(--muted); text-decoration: none; font-size: 13.5px; white-space: nowrap;
  }
  .admin-subnav a.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 700; }
}

/* ディクテーション（書き取り）モード（追加修正指示04-C1） */
.dictation-line { line-height: 2; margin-top: 8px; }
.dictation-blank {
  border: none; border-bottom: 2px solid var(--brand-2); background: transparent;
  font: inherit; text-align: center; margin: 0 2px; padding: 0 2px; color: inherit;
}
.dictation-answer { font-weight: 600; }
.dictation-answer.ok { color: var(--ok); }
.dictation-answer.ng { color: var(--ng); }
