/* スキルチェック・進捗 — 見た目のすべて。色は CSS 変数。スマホ縦を基準に、広い画面では 2 列にする */
:root {
  --bg: #F4F7F5;
  --panel: #FFFFFF;
  --ink: #0F3A57;          /* 文字（紺） */
  --ink-sub: #4A6477;
  --border: #CBD8D1;
  --header: #2E8B57;       /* ヘッダー（緑。試合組合せアプリと揃える） */
  --header-ink: #FFFFFF;
  --accent: #E2A33B;       /* 差し色（アンバー） */
  --press-bg: #0F3A57;
  --press-ink: #FFFFFF;
  --btn-bg: #FFFFFF;
  --primary-bg: #1F6F45;
  --primary-ink: #FFFFFF;
  --danger: #A12B2B;
  --focus: #1E6FD9;
  --pass-bg: #DDF2E5; --pass-ink: #0E5A31;
  --fail-bg: #FBE3E3; --fail-ink: #8A1F1F;
  --short-bg: #FFF0CF; --short-ink: #6B4700;
  --senior-bg: #E3ECFA; --senior-ink: #1B3F7A;
  --none-bg: #E8EDF0; --none-ink: #3D5261;
  --tab-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10181F;
    --panel: #1A252E;
    --ink: #E6EEF3;
    --ink-sub: #9FB3C1;
    --border: #34464F;
    --press-bg: #E2A33B;
    --press-ink: #1B1405;
    --btn-bg: #223039;
    --primary-bg: #3FA06A;
    --primary-ink: #06180E;
    --danger: #FF9A9A;
    --focus: #7FB4FF;
    --pass-bg: #1D4A31; --pass-ink: #BDEFD0;
    --fail-bg: #552626; --fail-ink: #FFD0D0;
    --short-bg: #54400F; --short-ink: #FFE3A3;
    --senior-bg: #1E3558; --senior-ink: #CFE0FF;
    --none-bg: #2C3B45; --none-ink: #C9D6DE;
  }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* 固定の下タブに、スクロールで寄せた要素が隠れないよう、下に余白を取る */
  scroll-padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
  overflow-wrap: anywhere;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- ヘッダー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left));
  background: var(--header); color: var(--header-ink);
}
.owner-icon { width: 28px; height: 28px; flex: none; display: block; }
.topbar h1 { margin: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 700; min-width: 0; }

/* ---------- 下のタブ ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 8px;
  padding: 6px calc(8px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  background: var(--panel); border-top: 1px solid var(--border);
}
.tab {
  flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600;
  border-bottom: 4px solid transparent;
}
.tab[aria-current="page"] { background: var(--none-bg); border-bottom-color: var(--accent); }

/* ---------- 共通 ---------- */
main { max-width: 960px; margin: 0 auto; padding: 12px calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left)); }
h2 { font-size: 1.25rem; margin: 4px 0 8px; line-height: 1.4; }
h3 { font-size: 1rem; margin: 18px 0 4px; }
p { margin: 4px 0; }
.sub { color: var(--ink-sub); font-size: .9rem; }
.btn {
  min-height: 44px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--btn-bg); cursor: pointer; font-weight: 600;
}
.btn[aria-pressed="true"] { background: var(--press-bg); color: var(--press-ink); border-color: var(--press-bg); }
.btn.primary { background: var(--primary-bg); color: var(--primary-ink); border-color: var(--primary-bg); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.notice { background: var(--short-bg); color: var(--short-ink); border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; }

/* ---------- バッジ（色だけでなく文字でも区別する） ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.badge[data-status="pass"] { background: var(--pass-bg); color: var(--pass-ink); border-color: var(--pass-ink); }
.badge[data-status="fail"] { background: var(--fail-bg); color: var(--fail-ink); border-color: var(--fail-ink); }
.badge[data-status="short"] { background: var(--short-bg); color: var(--short-ink); border-color: var(--short-ink); }
.badge[data-status="none"] { background: var(--none-bg); color: var(--none-ink); border-color: var(--none-ink); }

/* ---------- 一覧 ---------- */
.filter-group { margin: 8px 0; }
.filter-label { font-size: .9rem; font-weight: 700; margin: 0 0 4px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-buttons .btn { padding: 8px 12px; }
#list-count { margin: 12px 0 8px; font-weight: 700; }
.cards { display: grid; grid-template-columns: 1fr; gap: 8px; list-style: none; margin: 0; padding: 0; }
.item-card {
  display: grid; gap: 2px; min-height: 44px; padding: 10px 14px;
  background: var(--panel); color: var(--ink); text-decoration: none;
  border: 1px solid var(--border); border-radius: 12px;
}
.item-card:hover { border-color: var(--accent); }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item-name { font-weight: 700; min-width: 0; }
.item-meta, .item-last { font-size: .9rem; color: var(--ink-sub); }
#list-empty { text-align: center; padding: 24px 12px; }

/* ---------- 詳細 ---------- */
.detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.detail-section p { white-space: pre-line; }

/* ---------- 画面の枠（広い画面） ---------- */
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  main { padding-top: 16px; }
}

/* ---------- 評価フォーム ---------- */
[hidden] { display: none !important; }
#eval-form { margin-top: 20px; }
.field { margin: 12px 0; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type="date"], input[type="number"], textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--ink);
}
textarea { resize: vertical; }
.stepper { display: flex; gap: 8px; align-items: stretch; }
.stepper input { flex: 1; min-width: 0; text-align: center; font-size: 1.25rem; font-weight: 700; }
.stepper .step { width: 56px; padding: 0; font-size: 1.5rem; flex: none; }
.scale-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scale-btn { min-height: 56px; font-size: 1.05rem; }
.field-error { margin: 4px 0 0; color: var(--danger); font-weight: 600; font-size: .9rem; }
.preview { min-height: 1.6em; margin: 8px 0; font-size: 1.1rem; font-weight: 700; }
.ok-msg { margin: 8px 0 0; color: var(--pass-ink); font-weight: 600; min-height: 1.4em; }
.form-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- 履歴 ---------- */
.history-wrap { margin: 16px 0; }
.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hist-row { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.hist-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.hist-date { font-weight: 700; }
.hist-result { font-size: 1.1rem; font-weight: 700; }
.hist-lv { font-size: .9rem; font-weight: 700; color: var(--ink-sub); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; }
.chart-lv-title { font-size: .95rem; margin: 14px 0 4px; }
.hist-memo { color: var(--ink-sub); margin: 4px 0; }
.warn { color: var(--danger); font-weight: 600; margin: 4px 0; }
.hist-btns { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- ダイアログ ---------- */
.dlg-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 25, 40, .5); }
.dlg { width: 100%; max-width: 420px; background: var(--panel); color: var(--ink); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.dlg-msg { margin: 0 0 14px; white-space: pre-line; line-height: 1.6; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- 進捗 ---------- */
.table-wrap { overflow-x: auto; }
#pillar-table, #compare-table { width: 100%; border-collapse: collapse; background: var(--panel); }
#pillar-table th, #pillar-table td, #compare-table th, #compare-table td { border: 1px solid var(--border); padding: 10px 8px; text-align: center; font-size: .95rem; }
#pillar-table th[scope="row"], #compare-table th[scope="row"] { text-align: left; }
#pillar-table td.zero { color: var(--ink-sub); }
select { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); }

/* ---------- グラフ ---------- */
.chart { margin: 8px 0; }
.chart-svg { width: 100%; height: auto; display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.chart-svg .grid { stroke: var(--border); stroke-width: 1; }
.chart-svg .baseline { stroke: var(--accent); stroke-width: 2; }
.chart-svg .series { stroke: var(--primary-bg); stroke-width: 2; }
.chart-svg .pt { fill: var(--primary-bg); stroke: var(--panel); stroke-width: 2; }
.chart-svg text { fill: var(--ink); font-size: 12px; }
.chart-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.chart-table th, .chart-table td { border-bottom: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.chart-empty { padding: 16px 0; color: var(--ink-sub); }

/* ---------- データ画面 ---------- */
.file-btn { display: inline-flex; align-items: center; justify-content: center; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-btn { position: relative; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
#import-preview { margin-top: 12px; }
.danger-wrap { margin: 24px 0 8px; }
.danger-zone { border: 1px solid var(--danger); border-radius: 12px; padding: 4px 14px 12px; }
.danger-zone summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--danger); cursor: pointer; }

/* ---------- 練習（ドリル・メニュー） ---------- */
.tab { min-width: 0; }
.sub-tabs { display: flex; gap: 8px; margin: 0 0 8px; }
.sub-tab { flex: 1; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.sub-tab[aria-current="page"] { background: var(--press-bg); color: var(--press-ink); border-color: var(--press-bg); }
.list-count { margin: 12px 0 8px; font-weight: 700; }
.banner { margin: 8px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.banner p { margin: 0; font-weight: 700; flex: 1 1 12rem; }
#drills-empty { text-align: center; padding: 24px 12px; }
.drill-card .item-name, .menu-card .item-name { font-size: 1.05rem; }
.junior-mark { background: var(--short-bg); color: var(--short-ink); border-color: var(--short-ink); }
.keiken { color: var(--ink-sub); font-size: .9rem; margin-left: .25em; }
.plain-list { margin: 4px 0; padding-left: 1.4em; }
.plain-list li { margin: 2px 0; }
.link-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.link-btn { display: flex; align-items: center; text-decoration: none; min-height: 44px; }
.item-card .link-btn { margin-top: 6px; justify-content: center; }
.mistakes { width: 100%; border-collapse: collapse; background: var(--panel); }
.mistakes th, .mistakes td { border: 1px solid var(--border); padding: 8px 8px; text-align: left; vertical-align: top; font-size: .95rem; }
#drill-detail .detail-head { margin-bottom: 4px; }
#menu-detail .total { font-size: 1.5rem; font-weight: 800; margin: 4px 0 0; }
.flow-title { margin-top: 20px; }
.phase-head { font-size: .95rem; margin: 14px 0 4px; color: var(--ink-sub); }
.flow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flow-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.flow-row a { color: var(--ink); font-weight: 700; min-width: 0; }
.flow-min { white-space: nowrap; font-weight: 700; }

/* ---------- 絞り込みの折りたたみ ---------- */
.filter-box { margin: 8px 0; }
.filter-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.filter-toggle::after { content: "▼"; font-size: .8em; flex: none; }
.filter-toggle[aria-expanded="true"]::after { content: "▲"; }
.filter-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px 8px; margin-top: 8px; }

/* ---------- チェック一覧（柱 → 技術） ---------- */
.pillar-group { margin: 12px 0; }
.pillar-group > summary {
  min-height: 44px; display: flex; align-items: center; padding: 6px 12px; margin-bottom: 8px;
  font-weight: 700; font-size: 1.05rem; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: 10px;
}
.tech-li { display: flex; gap: 8px; align-items: stretch; }
.tech-li .tech-card { flex: 1; min-width: 0; }
.focus-toggle { flex: none; width: 76px; padding: 4px 6px; font-size: .85rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; }
.stairs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.stairs .step {
  min-width: 24px; height: 24px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: .75rem; font-weight: 700; border: 1px solid var(--none-ink); background: var(--none-bg); color: var(--none-ink);
}
.stairs .step[data-state="pass"] { background: var(--pass-ink); color: var(--pass-bg); border-color: var(--pass-ink); }

/* ---------- 技術の詳細（Lv の一覧・取組中） ---------- */
.detail-head .focus-btn { margin-left: auto; }
.lv-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.lv-btn {
  width: 100%; min-height: 56px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 4px 10px;
  text-align: left; font-weight: 400;
}
/* 選んだ Lv：大きさ（枠・余白）は変えず、外側の影で示す（フォーカスの輪郭とは別） */
.lv-btn[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.lv-num { font-weight: 800; white-space: nowrap; }
.lv-band { font-size: .85rem; color: var(--ink-sub); white-space: nowrap; }
.lv-text { min-width: 0; font-size: .9rem; }
@media (max-width: 480px) {
  .lv-btn { grid-template-columns: auto 1fr auto; }
  .lv-btn .lv-text { grid-column: 1 / -1; grid-row: 2; }
}
#stage-detail { margin-top: 8px; }

/* ---------- 点数・柱のレベル・Lv の階段の印（計画 3 段階 B） ---------- */
.pillar-group > summary { flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; }
.pillar-name { flex: 1 1 auto; }
.pillar-score { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: .85rem; font-weight: 600; color: var(--ink-sub); }
.pillar-points, .pillar-pct, .pillar-level { white-space: nowrap; }
.pillar-level { color: var(--ink); font-weight: 700; }
.pillar-scope { white-space: nowrap; font-weight: 500; font-size: .75rem; }
.lv-end { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 6px; }
.lv-mark {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: .75rem; font-weight: 800; white-space: nowrap;
  background: var(--press-bg); color: var(--press-ink); border: 1px solid var(--press-bg);
}
.lv-mark[data-mark="next"] { background: var(--short-bg); color: var(--short-ink); border-color: var(--short-ink); }
.lv-row[data-status="pass"] .lv-btn { background: var(--pass-bg); border-color: var(--pass-ink); }
.lv-row[data-status="pass"] .lv-btn[aria-current="true"] { border-color: var(--accent); }
.lvup { font-weight: 800; }
#detail-points { white-space: nowrap; }
.overall { font-weight: 700; margin: 8px 0; }
.radar-box { max-width: 420px; margin: 8px auto; }
.radar-svg { width: 100%; height: auto; display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.radar-svg .radar-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-svg .radar-ring[data-level="2"], .radar-svg .radar-ring[data-level="4"],
.radar-svg .radar-ring[data-level="6"], .radar-svg .radar-ring[data-level="8"] { stroke-dasharray: 3 3; }
.radar-svg .radar-ring[data-level="10"] { stroke: var(--ink-sub); }
.radar-svg .radar-axis { stroke: var(--border); stroke-width: 1; }
.radar-svg .radar-area { fill: var(--primary-bg); fill-opacity: .3; stroke: var(--primary-bg); stroke-width: 2.5; stroke-linejoin: round; }
.radar-svg .radar-dot { fill: var(--primary-bg); stroke: var(--panel); stroke-width: 1.5; }
.radar-svg .radar-label { fill: var(--ink); font-size: 13px; font-weight: 700; }
.radar-svg .radar-tick { fill: var(--ink-sub); font-size: 10px; }
@media (max-width: 480px) {
  #pillar-table th, #pillar-table td, #compare-table th, #compare-table td { padding: 8px 4px; font-size: .85rem; }
}

/* ---------- 推移・2 日の比較・おすすめ（段階 C） ---------- */
.trend-svg .trend-line { stroke: var(--primary-bg); stroke-width: 2.5; stroke-linejoin: round; }
.trend-svg .trend-pt { fill: var(--primary-bg); stroke: var(--panel); stroke-width: 2; }
.trend-svg .trend-pt.last { fill: var(--accent); stroke: var(--primary-bg); stroke-width: 2; }
.trend-svg .trend-val { font-weight: 700; }
.trend-summary { font-weight: 700; margin: 8px 0; }
#trend-table th[scope="row"] { font-weight: 600; }
.diff-svg .diff-label { font-size: 12px; font-weight: 600; }
.diff-svg .diff-bar[data-sign="plus"] { fill: var(--primary-bg); }
.diff-svg .diff-bar[data-sign="minus"] { fill: var(--danger); }
.diff-svg .diff-bar[data-sign="zero"] { fill: var(--ink-sub); }
.diff-svg .diff-zero { stroke: var(--ink-sub); stroke-width: 1.5; }
.compare-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 8px; }
.compare-dates input[type="date"] { min-width: 0; }
#compare-table td[data-sign="plus"] { font-weight: 700; }
#compare-table td[data-sign="minus"] { color: var(--danger); font-weight: 700; }
#compare-table td[data-sign="zero"] { color: var(--ink-sub); }
.rec-reason { margin: 4px 0; color: var(--ink-sub); }
.rec-drills { margin-top: 6px; }
.rec-drills-label { margin: 4px 0; font-weight: 700; font-size: .9rem; }
.rec-drills .link-list { margin-bottom: 6px; }
.cmp-diff { display: block; white-space: nowrap; }
#compare-table td { white-space: nowrap; }

/* ---------- 画像（SVG。js/figures.js が図形を作り、色はここで付ける。ダークモード対応） ---------- */
:root {
  --fig-court-bg: #D3EADC; --fig-court-line: #2E8B57;
  --fig-arrow: #C2410C; --fig-racket: #9A5B00; --fig-target-fill: rgba(226, 163, 59, .38);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fig-court-bg: #1F3A2D; --fig-court-line: #6FBF8F;
    --fig-arrow: #FFB067; --fig-racket: #E2A33B; --fig-target-fill: rgba(226, 163, 59, .32);
  }
}
.fig-wrap { margin: 12px auto; }
.fig-svg { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto; }
.fig-svg[data-kind="court"] { max-width: 220px; }
.fig-svg[data-kind="body"] { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.fig-svg .fig-court-bg { fill: var(--fig-court-bg); }
.fig-svg .fig-court-line { fill: none; stroke: var(--fig-court-line); stroke-width: 1.5; }
.fig-svg .fig-net { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.fig-svg .fig-ladder { fill: none; stroke: var(--fig-court-line); stroke-width: 3; }
.fig-svg .fig-ground { stroke: var(--ink-sub); stroke-width: 2; stroke-linecap: round; }
.fig-svg .fig-body { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.fig-svg .fig-head { fill: var(--panel); stroke: var(--ink); stroke-width: 4; }
.fig-svg .fig-racket { stroke: var(--fig-racket); stroke-width: 3.5; stroke-linecap: round; }
.fig-svg .fig-racket-head { fill: none; stroke: var(--fig-racket); stroke-width: 3.5; }
.fig-svg .fig-shuttle { fill: var(--panel); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.fig-svg .fig-target { fill: var(--fig-target-fill); stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 5 3; }
.fig-svg .fig-arrow { fill: none; stroke: var(--fig-arrow); stroke-width: 3.5; stroke-linecap: round; }
.fig-svg .fig-arrow.fig-dash { stroke-dasharray: 6 5; }
.fig-svg .fig-arrowhead { fill: var(--fig-arrow); stroke: var(--fig-arrow); stroke-width: 1; stroke-linejoin: round; }
.fig-svg .fig-mark { fill: var(--primary-bg); stroke: var(--panel); stroke-width: 2; }
.fig-svg .fig-label { fill: var(--ink); font-weight: 700; paint-order: stroke; stroke: var(--panel); stroke-width: 3; stroke-linejoin: round; }
.fig-svg[data-kind="court"] .fig-label { stroke: var(--fig-court-bg); }

/* ---------- シニア向けの印（段階 D） ---------- */
.tech-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.senior-mark {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 800; white-space: nowrap;
  background: var(--senior-bg); color: var(--senior-ink); border: 1px solid var(--senior-ink);
}
.notes { margin-top: 4px; }

/* ---------- 設定のスイッチ（データ画面。role="switch"） ---------- */
.switch-btn { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 48px; text-align: left; }
.switch-track { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--none-bg); border: 2px solid var(--none-ink); }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--none-ink); transition: left .12s; }
.switch-btn[aria-checked="true"] .switch-track { background: var(--primary-bg); border-color: var(--primary-bg); }
.switch-btn[aria-checked="true"] .switch-knob { left: 24px; background: var(--primary-ink); }
.switch-label { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .switch-knob { transition: none; } }

/* ---------- やさしい表示（body.easy）：本文 18px 以上・ボタン 48px 以上・絵を大きく ---------- */
body.easy { font-size: 18px; line-height: 1.75; }
body.easy .btn { min-height: 48px; }
body.easy .sub, body.easy .lv-text, body.easy .item-meta { font-size: 18px; }
body.easy .item-name { font-size: 1.1em; }
body.easy .fig-wrap { margin: 16px auto; }
body.easy .fig-svg { max-width: 360px; }
body.easy .fig-svg[data-kind="court"] { max-width: 280px; }
