/* ============================================================
   指南頁：長文排版、提醒框、檢核清單、分頁籤、時間軸、表格、小工具
   ============================================================ */

.guide-head { display: grid; gap: 10px; padding: 6px 0 2px; }
.guide-head .ic-wrap { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.guide-head .ic-wrap .ic { width: 28px; height: 28px; }
.guide-head .lead { color: var(--ink-2); max-width: 62ch; font-size: 1.04rem; }
.guide-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.toc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 18px 14px; background: var(--surface); }
.toc b { font-size: .85rem; letter-spacing: .1em; color: var(--ink-3); }
.toc ol { margin: 6px 0 0; padding-left: 1.4em; columns: 2 240px; column-gap: 28px; display: block; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { text-decoration: none; font-weight: 600; }
.toc a:hover { text-decoration: underline; }

.prose { max-width: 72ch; line-height: 1.9; font-size: 1.02rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.4em; display: flex; align-items: center; gap: 10px; font-size: 1.42rem; scroll-margin-top: 80px; }
.prose h2::before { content: ""; width: 6px; height: 1.15em; border-radius: 3px; background: var(--brand); flex: none; }
.prose h3 { margin-top: 1.7em; font-size: 1.13rem; scroll-margin-top: 80px; }
.prose h3::before { content: "◆"; color: var(--brand); font-size: .7em; margin-right: .5em; vertical-align: .12em; }
.prose ul, .prose ol { padding-left: 1.45em; display: grid; gap: .5em; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose strong { font-weight: 750; }
.prose em { font-style: normal; background: linear-gradient(transparent 62%, var(--gold-soft) 62%); }
.prose blockquote { margin: 1.2em 0; padding: 10px 18px; border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 12px 12px 0; color: var(--ink); }
.prose code, .kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.prose .lead-in { font-size: 1.1rem; color: var(--ink-2); }

.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--info-soft); border-left: 5px solid var(--info); line-height: 1.8;
}
.callout > .ic { margin-top: 4px; color: var(--info); width: 1.3rem; height: 1.3rem; }
.callout.tip { background: var(--leaf-soft); border-left-color: var(--leaf); }
.callout.tip > .ic { color: var(--leaf); }
.callout.warn { background: var(--gold-soft); border-left-color: var(--gold); }
.callout.warn > .ic { color: var(--gold); }
.callout.danger { background: var(--danger-soft); border-left-color: var(--danger); }
.callout.danger > .ic { color: var(--danger); }
.callout.key { background: var(--brand-soft); border-left-color: var(--brand); }
.callout.key > .ic { color: var(--brand); }
.callout .t { display: block; font-weight: 800; margin-bottom: 2px; }
.callout p + p, .callout ul { margin-top: .5em; }
.callout ul { padding-left: 1.3em; display: grid; gap: .3em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table.t { width: 100%; min-width: 520px; font-size: .94rem; line-height: 1.65; }
table.t th, table.t td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
table.t th { background: var(--bg-2); font-weight: 750; }
table.t tr:last-child td { border-bottom: 0; }
table.t td:first-child { font-weight: 700; }
.table-note { margin-top: 6px; font-size: .84rem; color: var(--ink-3); }

details.acc { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
details.acc + details.acc { margin-top: 10px; }
details.acc > summary { cursor: pointer; padding: 12px 16px; font-weight: 750; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: ""; width: 9px; height: 9px; border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; flex: none; }
details.acc[open] > summary::after { transform: rotate(-135deg); }
details.acc > summary:hover { background: var(--bg-2); }
details.acc > .acc-body { padding: 4px 18px 16px; line-height: 1.85; }
details.acc > .acc-body > * + * { margin-top: .8em; }

/* ---------- 檢核清單 ---------- */
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 6px !important; }
.checklist li { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); line-height: 1.7; }
.checklist li:hover { background: var(--surface-2); }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; cursor: pointer; width: 100%; }
.checklist input { margin-top: 4px; }
.checklist li.checked { background: var(--leaf-soft); border-color: transparent; }
.checklist li.checked label > span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.checklist label > span { flex: 1; min-width: 0; }
.cl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .86rem; color: var(--ink-3); }
.cl-head .progress { flex: 1; max-width: 220px; height: 8px; }

/* ---------- 分頁籤 ---------- */
.tabs-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.tab-btn { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.tab-btn[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tab-panel { margin-top: 10px; }
.tab-panel > * + * { margin-top: 1em; }

/* ---------- 時間軸 / 路線卡 ---------- */
.tline { position: relative; display: grid; gap: 18px; padding-left: 28px; }
.tline::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 3px; background: var(--line); border-radius: 2px; }
.phase { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 18px; box-shadow: var(--shadow-1); }
.phase::before { content: ""; position: absolute; left: -27px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.phase.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-1); }
.phase.current::before { border-color: var(--brand); background: var(--brand); }
.phase.past::before { border-color: var(--leaf); background: var(--leaf); }
.phase-head { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.phase-date { color: var(--ink-3); font-size: .86rem; font-variant-numeric: tabular-nums; }
.phase .tagline { color: var(--ink-2); margin-bottom: 8px; }
.phase h4 { margin: 12px 0 6px; font-size: .92rem; color: var(--ink-2); letter-spacing: .04em; }

.routes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.route { border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; background: var(--surface); display: grid; gap: 8px; align-content: start; }
.route h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.route h3::before { display: none; }
.route .tag { font-size: .74rem; }
.route ul { padding-left: 1.2em; display: grid; gap: .35em; font-size: .94rem; }
.route .pros { color: var(--leaf); font-weight: 700; font-size: .86rem; }
.route .cons { color: var(--danger); font-weight: 700; font-size: .86rem; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 10px !important; }
.steps > li { counter-increment: step; position: relative; padding: 12px 14px 12px 56px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-height: 56px; }
.steps > li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.steps > li > b:first-child { display: block; }

.pill-list { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 !important; list-style: none; }
.pill-list li { padding: 4px 12px; border-radius: 999px; background: var(--bg-2); font-size: .9rem; font-weight: 600; }

.two-col { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.col-box { border-radius: var(--r-md); padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); }
.col-box h4 { font-size: .95rem; margin-bottom: 6px; }
.col-box.no { background: var(--danger-soft); border-color: transparent; }
.col-box.yes { background: var(--leaf-soft); border-color: transparent; }
.col-box ul { padding-left: 1.2em; display: grid; gap: .4em; }

.talk-table td:first-child { color: var(--danger); font-weight: 600; white-space: normal; }
.talk-table td:nth-child(2) { color: var(--leaf); font-weight: 650; }

.guide-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.guide-nav a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); }
.guide-nav a:hover { border-color: var(--brand); }
.guide-nav small { color: var(--ink-3); }
.guide-nav b { font-size: 1.02rem; }
.guide-nav .next { text-align: right; grid-column: 2; }
.guide-nav .prev { grid-column: 1; }

.sources { font-size: .86rem; color: var(--ink-3); line-height: 1.7; }
.sources h2 { font-size: 1rem; margin-bottom: 6px; }
.sources ul { padding-left: 1.2em; display: grid; gap: 4px; }
.sources a { word-break: break-all; }

/* ---------- 小工具：呼吸練習、志願草稿、專注計時 ---------- */
.breath { display: grid; justify-items: center; gap: 14px; padding: 18px 10px; text-align: center; }
.breath-stage { width: 190px; height: 190px; display: grid; place-items: center; }
.breath-orb {
  width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.15rem;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .45), transparent 45%), var(--leaf);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--leaf) 18%, transparent);
  transition-property: transform; transition-timing-function: ease-in-out;
}
:root[data-theme="dark"] .breath-orb { color: #06231a; }
.breath-count { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: .9rem; min-height: 1.4em; }

.wish-list { list-style: none; padding: 0 !important; display: grid; gap: 8px !important; }
.wish-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.wish-no { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.wish-name { font-weight: 750; }
.wish-name small { display: block; font-weight: 500; color: var(--ink-3); }
.wish-tools { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tier-reach { border-left: 5px solid var(--danger); }
.tier-match { border-left: 5px solid var(--gold); }
.tier-safe { border-left: 5px solid var(--leaf); }
.wish-check { padding: 10px 14px; border-radius: var(--r-md); font-weight: 650; }
.wish-add { display: grid; gap: 10px; grid-template-columns: 1fr auto auto; align-items: end; }
@media (max-width: 560px) { .wish-add { grid-template-columns: 1fr; } }

.focus-timer { display: grid; justify-items: center; gap: 14px; text-align: center; }
.focus-time { font-size: 3.4rem; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; }

/* ---------- 積分試算器 ---------- */
.calc-out { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.calc-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.calc-row b { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.calc-row small { grid-column: 1 / -1; color: var(--ink-3); font-size: .8rem; }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; margin-top: 4px; border-top: 2px solid var(--line); font-weight: 800; }
.calc-total b { font-size: 1.6rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.widget { margin: 1.2em 0; }
