/* 試作頁共用樣式（題目頁和選題頁）。顏色、字型、按鈕沿用 ../assets/site.css。 */
main { max-width: 42rem; margin-inline: auto; padding-bottom: 6rem; }
.tag { display: inline-block; padding: 0.15rem 0.6rem; border: 1px solid var(--line); font-size: var(--step-small); color: var(--muted); }
.bar .back { font-size: var(--step-small); text-underline-offset: 0.25em; margin-left: auto; }
.hero { padding-block: 1.5rem 2rem; display: grid; gap: 1rem; }
body.quick .hero { padding-block: 0.75rem 1rem; }
.hero h1 { font-size: clamp(2rem, 1.2rem + 4.2vw, 3.25rem); line-height: 1.2; }
.nw { display: inline-block; white-space: nowrap; }
.seg { display: inline-flex; justify-self: start; border: 1px solid var(--line); }
.seg button { min-height: 2.75rem; padding: 0 1rem; background: transparent; border: 0; cursor: pointer; font-size: 0.9375rem; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--bg); }

.result { background: var(--field); color: var(--field-ink); padding: 1.75rem 1.5rem 1.5rem; display: grid; gap: 0.25rem; }
.result .kicker { color: var(--field-muted); }
.big { display: flex; align-items: baseline; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; line-height: 1; margin-top: 0.5rem; }
.big b { font-size: clamp(4.5rem, 2rem + 16vw, 7.5rem); font-variant-numeric: tabular-nums; }
.big span { font-family: var(--font-text); font-weight: 500; font-size: 1.5rem; }
.result .what { font-size: var(--step-lead); font-weight: 500; }
.result .rest { color: var(--field-muted); }
.dots { display: grid; grid-template-columns: repeat(40, 1fr); gap: 2px; margin-top: 1.25rem; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.dots i.w { background: var(--gold); }
.dots i.c { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 0.9rem; font-size: 0.9375rem; color: var(--field-muted); }
.legend i { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; margin-right: 0.4em; background: rgba(255, 255, 255, 0.28); }
.legend i.w { background: var(--gold); }
.legend i.c { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); }

.mini { position: sticky; top: 0; z-index: 5; background: var(--cocoa); color: var(--field-ink); padding: 0.55rem 1.5rem; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.mini b { color: var(--gold); font-weight: 700; }

section.block { padding-top: 2.75rem; display: grid; gap: 1.25rem; }
section.block.first { padding-top: 0.5rem; }
/* 擲骰子的按鈕：填數字的時候一直貼在畫面下緣，不用捲到最底 */
.go { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 0.5rem; padding-block: 1rem; background: var(--bg); border-top: 1px solid var(--line); }
.go .btn { width: 100%; min-height: 3.5rem; font-size: 1.125rem; }
#out[hidden] { display: none; }
#out .result { margin-top: 2.5rem; scroll-margin-top: 0.75rem; }
#out .result:focus { outline: none; }
#say { border-left: 3px solid var(--accent); padding-left: 1rem; }
#sens-sec { scroll-margin-top: 0.5rem; }
.actions a.btn { text-decoration: none; }
section.block > h2 { font-size: 1.5rem; }
.q { display: grid; gap: 0.35rem; padding-block: 1rem; border-top: 1px solid var(--line); }
.q-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.q label { font-weight: 500; }
.q .lab { font-weight: 500; }
/* 數字可以直接點下去打：長得像一個大數字，下面一條虛線提示可以改 */
.val { display: inline-flex; align-items: baseline; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.val small { font-family: var(--font-text); font-weight: 400; font-size: 0.6em; color: var(--muted); margin-left: 0.2em; }
.num { font: inherit; color: inherit; min-width: 2ch; max-width: 9ch; padding: 0 0.1em; text-align: right; background: transparent; border: 0; border-bottom: 2px dotted var(--muted); border-radius: 0; -moz-appearance: textfield; appearance: textfield; }
.num::-webkit-outer-spin-button, .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num:focus { outline: none; border-bottom: 2px solid var(--accent); background: var(--surface); }
.num::placeholder { color: var(--accent); opacity: 1; }
.q.blank .hint { color: var(--accent); font-weight: 500; }
.q.blank input[type=range] { opacity: 0.45; }
.q.need { background: var(--surface); box-shadow: 0 0 0 0.75rem var(--surface); }
.q .hint { font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }
.q .hint:empty { display: none; }
.q.preset { gap: 0.6rem; }
.q.preset .seg { display: flex; justify-self: stretch; }
.q.preset .seg button { flex: 1; padding: 0 0.5rem; font-size: 0.9375rem; }
.keep { font-size: 0.9375rem; color: var(--muted); padding-block: 1rem 0.5rem; }
.go-note { font-size: 0.9375rem; color: var(--muted); }
.go-note:empty { display: none; }
/* 快玩法和完整版各自才有的東西 */
body.quick .full-only, body:not(.quick) .quick-only { display: none; }
.fine { font-size: 0.875rem; line-height: 1.5; color: var(--field-muted); margin-top: 0.6rem; }
.fine + .fine { margin-top: 0.2rem; }
.fine-out { font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }
.fine-out:empty { display: none; }
#card-view { display: grid; gap: 0.75rem; justify-items: start; }
#card-view[hidden] { display: none; }
#card-img { width: 100%; max-width: 22rem; background: var(--surface); }
.next { background: var(--surface); padding: 1.75rem 1.5rem; margin-top: 2.75rem; }
section.block.next { padding-top: 1.75rem; }
input[type=range] { width: 100%; height: 2.5rem; accent-color: var(--accent); margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; font-size: inherit; color: var(--accent); }
details.more { border-top: 1px solid var(--line); padding-top: 1rem; }
details.more > summary, details.notes > summary { cursor: pointer; font-weight: 500; min-height: 2.75rem; display: flex; align-items: center; }

.three { display: grid; gap: 0; }
.three div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; border-top: 1px solid var(--line); }
.three div:last-child { border-bottom: 1px solid var(--line); }
.three strong { font-variant-numeric: tabular-nums; text-align: right; }
.even { background: var(--surface); padding: 1.25rem 1.5rem; }
.even strong { font-family: var(--font-display); font-size: 1.35em; }
.sens { display: grid; gap: 1rem; }
.sens-row { display: grid; gap: 0.3rem; }
.sens-row .line { display: flex; justify-content: space-between; gap: 0.25rem 1rem; flex-wrap: wrap; }
.sens-row .line span:last-child { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.track { position: relative; height: 0.6rem; background: var(--surface-2); }
.track .range { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.track .now { position: absolute; top: -0.25rem; bottom: -0.25rem; width: 2px; background: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.actions .btn { flex: 1 1 12rem; }
#toast { font-size: 0.9375rem; color: var(--muted); }
#toast:empty { display: none; }
details.notes ul { padding-left: 1.2em; display: grid; gap: 0.5rem; font-size: 0.9375rem; color: var(--muted); }
#card { display: none; }

/* 通行證：三個不同運氣的你、錢哪一年見底、長圖（pass.js） */
.life { display: grid; gap: 0.4rem; padding-block: 1.25rem; border-top: 1px solid var(--line); }
#lives-list > :last-child { border-bottom: 1px solid var(--line); }
.life h3 { font-size: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 1rem; }
.life h3 strong { font-family: var(--font-text); font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.life .rank { font-size: 0.9375rem; color: var(--muted); }
.yrs { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.85rem; }
.yrs li { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 0.1rem 0.6rem; }
.yrs .yr { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.yrs .cm { grid-column: 2; font-size: 0.9375rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.life .locked { margin-top: 0.5rem; background: var(--surface); padding: 0.75rem 1rem; font-size: 0.9375rem; max-width: none; }
section.block.gate { background: var(--gold); color: var(--gold-ink); padding: 1.75rem 1.5rem; margin-top: 2.75rem; }
.gate[hidden], #pass-in[hidden] { display: none; }
.gate ul { margin: 0; padding-left: 1.2em; display: grid; gap: 0.35rem; }
.gate .btn { background: var(--ink); color: var(--bg); }
.gate .btn:hover { background: var(--cocoa); }
.gate .fine-out { color: var(--gold-ink); }
.opened { font-size: 0.9375rem; color: var(--muted); padding-top: 1.5rem; }
.num.wide { width: 6ch; }
.check { display: flex; gap: 0.7rem; align-items: center; padding-block: 1rem; border-top: 1px solid var(--line); font-weight: 500; cursor: pointer; }
.check[hidden] { display: none; }
.check input { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--accent); }
#c-two-box[hidden] { display: none; }
.cash-out { background: var(--surface); padding: 1.25rem 1.5rem; display: grid; gap: 0.75rem; }
.cash-out:empty { display: none; }
.cash-big { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; }
.cash-big b { font-size: 2.75rem; font-variant-numeric: tabular-nums; margin-right: 0.15em; }
.cash-two { font-weight: 500; }
.bars { display: grid; gap: 0.45rem; }
.bar-row { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 4rem; gap: 0.75rem; align-items: center; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.bar-row span:last-child { text-align: right; }
#long-view { display: grid; gap: 0.75rem; justify-items: start; }
#long-view[hidden] { display: none; }
#long-img { width: 100%; max-width: 22rem; background: var(--surface); }

/* 存檔追蹤：登入小表單、把這次存起來、我的存檔（save.js、saved.js） */
.auth { display: grid; gap: 1rem; background: var(--surface); padding: 1.25rem 1.5rem; }
.auth .field input { width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: 0; font-size: 1.0625rem; }
.auth .field input:focus { outline: none; border-color: var(--accent); }
.auth .field[hidden] { display: none; }
.auth-links { font-size: 0.9375rem; }
.auth-msg, .save-msg, .run-msg { font-size: 0.9375rem; color: var(--accent); font-weight: 500; }
.auth-msg:empty, .save-msg:empty { display: none; }
#save-act[hidden] { display: none; }
.who { font-size: 0.9375rem; color: var(--muted); }
.run { display: grid; gap: 1rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.run h2 { font-size: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 1rem; }
.run h2 span { font-family: var(--font-text); font-weight: 400; font-size: 0.9375rem; color: var(--muted); }
.kv { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; font-size: 0.9375rem; }
.kv li { display: flex; justify-content: space-between; gap: 1rem; }
.kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.was { background: var(--surface); padding: 0.75rem 1rem; font-size: 0.9375rem; max-width: none; }
.track-box[hidden] { display: none; }
.place { display: grid; gap: 0.75rem; }
.place:not(:empty) { background: var(--surface); padding: 1.25rem 1.5rem; margin-top: 0.5rem; }
.place-big { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.4; }
.place-big b { font-size: 2.5rem; font-variant-numeric: tabular-nums; }
.strip { display: grid; gap: 0.3rem; padding-block: 0.25rem; }
.strip .track { height: 0.9rem; }
.strip .track .now { width: 4px; background: var(--accent); top: -0.35rem; bottom: -0.35rem; margin-left: -2px; }
.strip-ends { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--muted); }
.run-foot { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9375rem; max-width: none; }

/* 完整報告的入口（ui.js 的 .report-in、report.html） */
section.block.report-in { background: var(--cocoa); color: var(--field-ink); padding: 1.75rem 1.5rem; margin-top: 2.75rem; }
.report-in .btn { background: var(--gold); color: var(--gold-ink); }
.report-in .btn:hover { background: var(--gold-hover); }
.fit { margin: 0; padding-left: 1.2em; display: grid; gap: 0.5rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { display: grid; gap: 0.35rem; padding-left: 1rem; border-left: 3px solid var(--accent); }
.steps h3 { font-size: 1.25rem; }
#carry[hidden] { display: none; }
.draft { margin: 0; background: var(--surface); padding: 1rem 1.25rem; white-space: pre-line; font-size: 0.9375rem; line-height: 1.7; }
.go-last .btn { width: 100%; min-height: 3.5rem; font-size: 1.125rem; }

/* report.html 的範例報告片段 */
.sample { display: grid; gap: 6px; }
.sample article { background: var(--surface); padding: 1.25rem 1.5rem; display: grid; gap: 0.6rem; }
.sample article:first-child { background: var(--accent); color: var(--accent-ink); }
.sample article:first-child .tag-s, .sample article:first-child .key { color: var(--field-muted); }
.sample h3 { font-size: 1.25rem; line-height: 1.35; }
.sample ol { margin: 0; padding-left: 1.2em; display: grid; gap: 0.3rem; }
.tag-s { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.key { font-size: 0.9375rem; }
.sample table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.sample th, .sample td { text-align: right; padding: 0.45rem 0.3rem; }
.sample th:first-child { text-align: left; font-weight: 500; }
.sample thead th { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.sample tr.win { background: var(--gold); }

/* 題目頁的桌機版：左邊填數字（跟著捲），右邊結果。手機版不變。 */
.wait { display: none; }
@media (min-width: 1100px) {
  body[data-topic] #app { max-width: 78rem; display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); column-gap: clamp(3rem, 5vw, 5rem); align-items: start; }
  body[data-topic] #app > * { grid-column: 1 / -1; }
  body[data-topic] #app > #inputs { grid-column: 1; grid-row: 2; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; padding-right: 0.5rem; }
  body[data-topic] #app > #out, body[data-topic] #app > .wait { grid-column: 2; grid-row: 2; }
  body[data-topic] #app > #out .result { margin-top: 0.5rem; }
  body[data-topic] #app > #out[hidden] + .wait { display: grid; gap: 1.25rem; background: var(--surface); padding: 1.75rem 1.5rem; margin-top: 0.5rem; }
  .wait .dots i { background: var(--surface-2); }
  .wait p { color: var(--muted); }
  body[data-topic] .bar { max-width: 78rem; margin-inline: auto; }
}

/* 選題頁 */
.picks { display: grid; gap: 0; }
.pick { display: grid; gap: 0.3rem; padding-block: 1.25rem; border-top: 1px solid var(--line); text-decoration: none; }
.picks > :last-child { border-bottom: 1px solid var(--line); }
.pick h3 { font-size: 1.5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.pick h3 span { font-family: var(--font-text); font-weight: 400; font-size: var(--step-small); color: var(--accent); white-space: nowrap; }
.pick p { color: var(--muted); font-size: var(--step-small); }
a.pick:hover h3 { text-decoration: underline; text-underline-offset: 0.2em; }
.soon { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 0.9rem; border-top: 1px solid var(--line); }
.soon button { min-height: 2.5rem; padding: 0 0.9rem; background: var(--surface-2); border: 0; cursor: pointer; font-size: var(--step-small); white-space: nowrap; }
.soon button[disabled] { background: transparent; color: var(--muted); cursor: default; }
