/* AION 2 チャント TA チャート */
:root {
  --bg: #0a0d14;
  --bg-2: #0e131d;
  --surface: #121a28;
  --surface-2: #172133;
  --line: #22304a;
  --line-2: #2c3d5c;
  --text: #e6edf7;
  --text-2: #a9b6ca;
  --text-3: #74839b;
  --accent: #38bdf8;
  --accent-ink: #04121c;
  --gold: #fbbf24;
  --ahead: #4ade80;
  --behind: #f87171;
  --danger: #f87171;
  --radius: 12px;
  --header-h: 64px;
  --dock-h: 72px;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, .08), transparent 60%),
                    radial-gradient(900px 500px at 100% 10%, rgba(192, 132, 252, .06), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.6 var(--sans);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 24px);
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd {
  font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--text);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
  text-decoration: none; list-style: none;
}
.btn:hover { background: #1d2a40; border-color: #3a4f75; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-icon { width: 40px; padding: 0; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); min-width: 92px; }
.btn-primary:hover { background: #7dd3fc; border-color: #7dd3fc; }
.btn-primary.is-running { background: transparent; color: var(--accent); }
.btn[aria-pressed="true"] { background: rgba(56, 189, 248, .15); border-color: var(--accent); color: var(--accent); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }

/* ---------- ヘッダー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 13, 20, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-row {
  max-width: 1320px; margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #0ea5e9, #6366f1); font-weight: 800; font-size: 14px; color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 15px; white-space: nowrap; }
.brand-text small { font-size: 12px; color: var(--text-3); }
.clock { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.timer {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 700 28px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--text-2);
}
.timer.is-running { color: var(--text); }
.pace { font: 600 12px/1.4 var(--mono); color: var(--text-3); margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.menu { position: relative; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 8px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; gap: 2px;
}
.switch, .menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 8px;
  background: none; border: 0; text-align: left; cursor: pointer; font-size: 14px;
}
.menu-item { justify-content: space-between; }
.switch:hover, .menu-item:hover { background: var(--surface-2); }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.menu-item.danger { color: var(--danger); }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
.menu-help { display: grid; gap: 6px; padding: 6px 10px 8px; font-size: 13px; color: var(--text-2); }

.progress { display: flex; gap: 3px; height: 4px; max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.progress-seg { position: relative; background: color-mix(in srgb, var(--pc) 18%, transparent); border-radius: 2px; overflow: hidden; }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--pc); transition: width .3s; }

/* ---------- レイアウト ---------- */
.layout {
  max-width: 1320px; margin: 0 auto; padding: 24px 20px 0;
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start;
}
.sidebar {
  position: sticky; top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - var(--dock-h) - 40px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px;
}
.side-block { display: flex; flex-direction: column; gap: 10px; }
.side-note { font-size: 13px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 14px; }
.side-note p { margin: 0; }
.video-link { color: var(--accent); font-weight: 600; }

.phase-nav { display: flex; flex-direction: column; gap: 4px; }
.pn-item {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; text-decoration: none;
  border: 1px solid transparent; border-left: 3px solid color-mix(in srgb, var(--pc) 45%, transparent);
}
.pn-item:hover { background: var(--surface); }
.pn-item.is-active { background: var(--surface); border-color: var(--line-2); border-left-color: var(--pc); }
.pn-no { font: 800 13px var(--mono); color: var(--pc); }
.pn-main { display: flex; flex-direction: column; line-height: 1.3; }
.pn-lv { font-weight: 700; font-size: 14px; }
.pn-sub { font-size: 11px; color: var(--text-3); }
.pn-right { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.pn-count { font-size: 12px; color: var(--text-2); }
.pn-delta { font-size: 11px; font-weight: 700; }
.pn-item.is-complete .pn-count { color: var(--ahead); }

.search { position: relative; display: block; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search input {
  width: 100%; height: 40px; padding: 0 12px 0 34px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2); font-size: 14px;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 32px; padding: 0 10px; border-radius: 999px; cursor: pointer; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active { background: rgba(56, 189, 248, .15); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.filter-count { margin: 0; font-size: 13px; color: var(--text-2); }

/* ---------- 概要 ---------- */
.main { min-width: 0; }
.overview {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin-bottom: 36px;
}
.ov-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.overview h1 { margin: 0; font-size: 26px; line-height: 1.25; }
.ov-stats { display: flex; gap: 22px; margin: 0; }
.ov-stats div { display: flex; flex-direction: column; }
.ov-stats dt { font-size: 11px; color: var(--text-3); }
.ov-stats dd { margin: 0; font-size: 18px; font-weight: 700; }
.ov-lead { margin: 12px 0 18px; color: var(--text-2); font-size: 14px; max-width: 70ch; }
.ov-lead strong { color: var(--text); }

.laps { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lap {
  display: grid; grid-template-columns: 120px 84px 76px 150px 1fr; gap: 12px; align-items: center;
  padding: 9px 14px; font-size: 13px; text-decoration: none; border-top: 1px solid var(--line);
  border-left: 3px solid var(--pc, transparent);
}
.lap:hover { background: var(--surface-2); }
.lap.is-active { background: color-mix(in srgb, var(--pc) 10%, transparent); }
.lap-head { border-top: 0; color: var(--text-3); font-size: 11px; font-weight: 700; background: var(--bg-2); border-left-color: transparent; }
.lap-head:hover { background: var(--bg-2); }
.lap-name b { color: var(--pc); }
.lap-dur { color: var(--text-2); }
.lap-you .delta { margin-left: 4px; }
.lap-ms { color: var(--text-2); }

/* ---------- フェーズ ---------- */
.phase { margin-bottom: 28px; }
.phase-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px solid color-mix(in srgb, var(--pc) 40%, transparent);
}
.phase-no {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); font: 800 16px var(--mono);
  border: 1px solid color-mix(in srgb, var(--pc) 40%, transparent);
}
.phase-info h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.phase-lv { color: var(--pc); }
.phase-time { margin: 1px 0 0; font-size: 12px; color: var(--text-2); }
.phase-maps { margin: 0; font-size: 12px; color: var(--text-3); }
.phase-split { display: flex; flex-direction: column; align-items: flex-end; gap: 0; font-size: 13px; color: var(--text-2); padding-top: 2px; }
.phase-split .delta { font-weight: 700; }
.phase.is-complete .phase-no { background: var(--pc); color: var(--bg); }

.phase-tips {
  border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; font-size: 13px; line-height: 1.55;
  background: rgba(56, 189, 248, .07); border: 1px solid rgba(56, 189, 248, .25);
}
.phase-tips.important { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .35); }
.phase-tips strong { display: block; font-size: 11px; letter-spacing: .04em; color: var(--accent); margin-bottom: 2px; }
.phase-tips.important strong { color: var(--gold); }
.phase-tips ul { margin: 0; padding-left: 1.2em; color: var(--text-2); }

/* ---------- 手順カード（縦幅を詰めた一覧） ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.step {
  position: relative;
  display: grid; grid-template-columns: 36px 104px minmax(0, 1fr) 32px; gap: 0 10px; align-items: start;
  padding: 6px 8px 7px 4px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  transition: background .2s, border-color .2s, opacity .2s;
  scroll-margin: calc(var(--header-h) + 24px) 0 calc(var(--dock-h) + 24px);
}
.step.is-key { border-left: 3px solid var(--gold); }
.step.is-current {
  background: var(--surface-2); border-color: var(--pc);
  box-shadow: 0 0 0 1px var(--pc), 0 8px 24px rgba(0, 0, 0, .35);
}
.step.is-goal { background: linear-gradient(135deg, rgba(192, 132, 252, .14), rgba(251, 191, 36, .08)); border-color: rgba(192, 132, 252, .5); }
.step.is-done { opacity: .5; }
.step.is-done:hover { opacity: .85; }

.check { display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line-2); background: var(--bg-2); color: transparent; transition: all .15s;
}
.check .box svg { width: 14px; height: 14px; stroke-width: 3; }
.check:hover .box { border-color: var(--pc); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input:checked + .box { background: var(--pc); border-color: var(--pc); color: var(--bg); }
.step.is-current .check .box { border-color: var(--pc); }

.step-time { display: flex; flex-direction: column; padding-top: 6px; line-height: 1.35; white-space: nowrap; }
.t-start { font-size: 14px; font-weight: 700; color: var(--pc); }
.t-sub { font-size: 11px; color: var(--text-3); }
.step-split { font-size: 11px; color: var(--text-2); }
.step-split:empty { display: none; }
.step-split b { color: var(--text); font-weight: 600; }

.step-body { padding-top: 5px; min-width: 0; }
.step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.step-title { margin: 0; font-size: 15px; line-height: 1.4; }
.loc { color: var(--text-2); font-weight: 600; font-size: 12px; }
.lv { padding: 0 6px; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; line-height: 18px; color: var(--text); }
.ms { padding: 0 6px; border-radius: 5px; background: rgba(251, 191, 36, .12); color: var(--gold); font-weight: 700; font-size: 11px; line-height: 18px; }
.now-badge { display: none; padding: 0 6px; border-radius: 5px; background: var(--pc, var(--accent)); color: var(--bg); font: 800 11px/18px var(--mono); letter-spacing: .06em; }
.step.is-current .now-badge { display: inline-block; }
.step-points { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.step-points span + span::before { content: '／'; margin: 0 .35em; color: var(--text-3); }
.step-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { padding: 0 7px; border-radius: 999px; font-size: 11px; line-height: 18px; font-weight: 600; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag-key { color: var(--gold); border-color: rgba(251, 191, 36, .45); }
.tag-boss { color: #fca5a5; border-color: rgba(248, 113, 113, .4); }
.tag-dungeon { color: #fdba74; border-color: rgba(251, 146, 60, .4); }
.tag-skip { color: #d8b4fe; border-color: rgba(192, 132, 252, .45); }
.tag-move { color: #6ee7b7; border-color: rgba(52, 211, 153, .4); }
.tag-unlock { color: #fcd34d; border-color: rgba(251, 191, 36, .4); }
.tag-setup { color: #93c5fd; border-color: rgba(96, 165, 250, .4); }

.play {
  display: grid; place-items: center; width: 32px; height: 32px; margin-top: 2px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text-2); cursor: pointer;
}
.play:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
.play svg { width: 12px; height: 12px; margin-left: 2px; }

/* 完了済みを折りたたむ */
.hide-done .step.is-done { padding-top: 0; padding-bottom: 0; }
.hide-done .step.is-done .step-points,
.hide-done .step.is-done .tag,
.hide-done .step.is-done .t-sub,
.hide-done .step.is-done .play { display: none; }
.hide-done .step.is-done .step-time { flex-direction: row; gap: 6px; align-items: baseline; padding-top: 8px; }
.hide-done .step.is-done .step-body { padding: 7px 0; }
.hide-done .step.is-done .step-title { font-size: 13.5px; }

.delta { font-family: var(--mono); font-weight: 700; }
.ahead { color: var(--ahead); }
.behind { color: var(--behind); }
.even { color: var(--text-2); }
.pace.ahead, .pace.behind { font-weight: 700; }

/* ---------- チャント立ち回り ---------- */
.chanter { margin-top: 8px; }
.chanter h2 { font-size: 20px; margin: 0 0 12px; }
.chanter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chanter-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.chanter-card h3 { margin: 0 0 6px; font-size: 15px; }
.chanter-card ul { margin: 0; padding-left: 1.15em; font-size: 14px; color: var(--text-2); }
.chanter-card li + li { margin-top: 4px; }
.footer { margin: 40px 0 0; padding: 20px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.footer p { margin: 0; }

/* ---------- ドック ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(14, 19, 29, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom);
}
.dock-inner { max-width: 1320px; margin: 0 auto; height: var(--dock-h); padding: 0 20px; display: flex; align-items: center; gap: 12px; }
.dock-current {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
}
.dock-label { flex: none; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font: 800 12px var(--mono); letter-spacing: .06em; }
.dock-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.dock-meta { font: 12px var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-actions { display: flex; gap: 8px; flex: none; }
.btn-done { min-height: 48px; padding: 0 22px; font-size: 15px; background: var(--ahead); border-color: var(--ahead); color: #052e16; }
.btn-done:hover { background: #86efac; border-color: #86efac; }
.btn-done svg { stroke-width: 3; }
.dock-actions .btn-icon { width: 48px; min-height: 48px; }

/* ---------- 動画プレイヤー ---------- */
.player {
  position: fixed; right: 20px; bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 14px); z-index: 50;
  width: min(440px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); overflow: hidden;
}
.player-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.player-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-ext { font-size: 12px; color: var(--accent); }
.player-bar .btn-icon { width: 34px; min-height: 34px; }
.player-frame { aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- フォーカスモード ---------- */
.focus-mode .layout { display: none; }
.focus { padding: 24px 20px 0; }
.focus-inner { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.f-phase { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); border-left: 3px solid var(--pc); padding-left: 10px; }
.f-phase-name { font-weight: 600; }
.f-label { font: 800 11px var(--mono); letter-spacing: .1em; color: var(--text-3); }
.f-prev { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; color: var(--text-3); }
.f-prev-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-now {
  --pc: inherit;
  padding: 22px 24px; border-radius: 16px; background: var(--surface-2);
  border: 2px solid var(--pc); box-shadow: 0 16px 50px rgba(0, 0, 0, .4);
}
.f-now.is-key { box-shadow: 0 0 0 4px rgba(251, 191, 36, .15), 0 16px 50px rgba(0, 0, 0, .4); }
.f-now-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.f-now .now-badge { display: inline-block; font-size: 13px; padding: 3px 9px; }
.f-time { font-size: 20px; font-weight: 700; color: var(--pc); }
.f-target { margin-left: auto; font-size: 15px; font-weight: 700; }
.f-loc { margin: 10px 0 0; font-size: 16px; color: var(--text-2); font-weight: 600; }
.f-title { margin: 4px 0 10px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3; }
.f-points { margin: 0; padding-left: 1.2em; font-size: clamp(16px, 1.9vw, 19px); line-height: 1.7; }
.f-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.f-foot .step-tags { margin: 0; }
.f-next { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.f-next ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.f-next li { display: flex; align-items: baseline; gap: 12px; font-size: 15px; }
.f-next li .mono { color: var(--text-3); font-size: 13px; flex: none; width: 64px; }
.f-next-title { font-weight: 600; }
.f-next-loc { color: var(--text-3); font-size: 13px; }
.f-goal { text-align: center; padding: 60px 20px; }
.f-goal-time { font-size: 56px; font-weight: 800; margin: 8px 0; }
.f-goal .delta { font-size: 20px; margin: 0 0 24px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1080px) {
  .lap { grid-template-columns: 110px 76px 70px 1fr; }
  .lap .lap-ms { display: none; }
  .chanter-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 12px; }
  .sidebar { position: static; max-height: none; overflow: visible; gap: 10px; }
  .phase-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .phase-nav::-webkit-scrollbar { display: none; }
  .pn-item { flex: none; grid-template-columns: auto auto; gap: 2px 8px; padding: 6px 10px; border: 1px solid var(--line); border-top: 3px solid color-mix(in srgb, var(--pc) 45%, transparent); }
  .pn-item.is-active { border-top-color: var(--pc); border-left-color: var(--line-2); }
  .pn-right { grid-column: 1 / -1; flex-direction: row; gap: 8px; }
  .pn-sub { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .side-note { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; --dock-h: 68px; }
  body { font-size: 14px; }
  .topbar-row { gap: 8px; padding: 0 12px; }
  .brand-text { display: none; }
  .brand-mark { width: 32px; height: 32px; font-size: 12px; }
  .clock { margin-left: 0; margin-right: auto; align-items: flex-start; }
  .timer { font-size: 24px; }
  .pace { font-size: 11px; margin-top: 1px; }
  .btn-primary { min-width: 0; padding: 0 12px; }
  #btn-focus .label { display: none; }
  #btn-focus { width: 40px; padding: 0; }
  .progress { padding: 0 12px; }
  .layout { padding: 12px 12px 0; }
  .overview { padding: 16px; margin-bottom: 24px; }
  .overview h1 { font-size: 21px; }
  .ov-stats { gap: 16px; }
  .ov-stats dd { font-size: 16px; }
  .lap { grid-template-columns: 1fr auto auto; gap: 8px; padding: 9px 12px; }
  .lap .lap-dur { display: none; }
  .lap-head span:nth-child(2) { display: none; }
  .phase-head { grid-template-columns: auto 1fr; }
  .phase-split { display: none; }
  .phase-info h2 { font-size: 17px; }

  .step {
    grid-template-columns: 34px minmax(0, 1fr) 32px; gap: 0 6px; padding: 4px 6px 7px 2px;
    grid-template-areas: "check time play" "check body play";
  }
  .check { grid-area: check; width: 34px; }
  .step-time { grid-area: time; flex-direction: row; align-items: baseline; gap: 8px; padding-top: 7px; }
  .step-body { grid-area: body; padding-top: 1px; }
  .play { grid-area: play; margin-top: 4px; }
  .step-title { font-size: 14.5px; }
  .step-points { font-size: 13px; }
  .hide-done .step.is-done .step-body { padding: 0 0 5px; }
  .hide-done .step.is-done .step-time { padding-top: 5px; }

  .dock-inner { padding: 0 10px; gap: 8px; }
  .dock-label { display: none; }
  .dock-title { font-size: 14px; }
  .btn-done { padding: 0 16px; }
  .btn-done span { display: none; }
  .btn-done svg { width: 24px; height: 24px; }
  .btn-done { width: 56px; padding: 0; }
  .player { right: 8px; left: 8px; width: auto; }
  .focus { padding: 14px 12px 0; }
  .f-now { padding: 16px; }
  .f-time { font-size: 17px; }
  .f-target { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
