:root {
  color-scheme: light;
  --navy: #08263f;
  --navy-2: #123b5a;
  --mustard: #d9ad31;
  --mustard-soft: #f4e8be;
  --red: #a92f2a;
  --red-soft: #fae5e2;
  --green: #2e6249;
  --green-soft: #e3f0e8;
  --ink: #17212a;
  --muted: #5b6974;
  --line: #cdd4d9;
  --surface: #fffdfa;
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  color: var(--ink);
  background: #f4f1e9;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #0c78b8; outline-offset: 3px; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 20; padding: 10px 14px; background: #fff; color: var(--navy); font-weight: 900; }
.skip-link:focus { top: 12px; }
.app-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 8px max(14px, env(safe-area-inset-left)) 8px max(14px, env(safe-area-inset-right)); border-bottom: 1px solid #31516a; background: var(--navy); color: #fff; }
.brand-button, .package-trigger { border: 0; color: inherit; background: transparent; }
.brand-button { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0; text-align: left; }
.brand-button img { object-fit: contain; }
.brand-button strong, .brand-button small { display: block; }
.brand-button strong { letter-spacing: .08em; }
.brand-button small { margin-top: 1px; color: #d5e0e8; font-size: 12px; }
.package-trigger { display: flex; align-items: center; gap: 7px; min-height: 44px; max-width: 174px; padding: 7px 9px; border: 1px solid #86a0b4; color: #edf4f8; font-size: 12px; font-weight: 800; text-align: left; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #aab6bf; }
.status-dot.is-ready { background: #6fca8f; }
.status-dot.is-warning { background: #f3c754; }
.global-notice { position: sticky; top: 68px; z-index: 8; padding: 10px 16px; border-bottom: 1px solid #b78e22; background: var(--mustard-soft); color: #49370a; font-size: 14px; font-weight: 800; text-align: center; }
#app { width: min(100%, 780px); min-height: calc(100dvh - 138px); margin: 0 auto; padding: 24px 14px 112px; }
.eyebrow { margin: 0 0 6px; color: #735914; font-size: 13px; font-weight: 900; letter-spacing: .05em; }
h1 { margin: 0; color: var(--navy); font-size: clamp(32px, 9vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin: 0; color: var(--navy); font-size: 23px; line-height: 1.25; }
p { line-height: 1.58; }
.lead { margin: 12px 0 0; color: #293a47; font-size: 18px; font-weight: 800; }
.truth-card { margin: 18px 0; padding: 15px 16px; border-left: 6px solid var(--mustard); background: var(--mustard-soft); }
.truth-card.is-danger { border-color: var(--red); background: var(--red-soft); }
.truth-card strong { color: var(--navy); font-size: 18px; }
.truth-card p { margin: 6px 0 0; }
.call-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 62px; margin: 17px 0 8px; border: 2px solid #7f201d; background: var(--red); color: #fff; font-size: 21px; font-weight: 950; text-decoration: none; }
.call-boundary { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.plain-button, .action-button, .tool-link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font-weight: 900; text-align: center; text-decoration: none; }
.plain-button.is-primary, .action-button.is-primary { background: var(--navy); color: #fff; }
.list { display: grid; gap: 11px; margin-top: 18px; }
.scenario-row, .branch-row, .status-row { width: 100%; min-height: 82px; padding: 14px; border: 1px solid var(--line); border-left: 5px solid var(--navy); background: var(--surface); color: var(--ink); text-align: left; }
.scenario-row[disabled] { cursor: not-allowed; opacity: .75; }
.scenario-row strong, .branch-row strong, .status-row strong { display: block; color: var(--navy); font-size: 18px; line-height: 1.35; }
.scenario-row span, .branch-row span, .status-row span { display: block; margin-top: 5px; color: var(--muted); line-height: 1.48; }
.scenario-row em, .status-row em { display: inline-block; margin-top: 8px; color: #625018; font-size: 12px; font-style: normal; font-weight: 850; }
.branch-row { min-height: 96px; border-left-color: var(--mustard); }
.back-button { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 15px; padding: 0; border: 0; background: transparent; color: var(--navy); font-weight: 900; }
.detail-stack, .action-stack { display: grid; gap: 12px; margin-top: 18px; }
.infographic { margin: 18px 0; padding: 0; border: 1px solid var(--line); background: #fff; }
.infographic img { display: block; width: 100%; height: auto; }
.infographic figcaption { padding: 9px 11px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.media-offer { margin: 18px 0; padding: 15px; border: 2px dashed #92721b; background: #fff9e8; }
.media-offer strong { color: var(--navy); font-size: 17px; }
.media-offer p, .media-offer span { display: block; margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.media-status { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--navy); }
.media-status > p { color: var(--muted); }
.detail-panel { padding: 15px; border: 1px solid var(--line); background: var(--surface); }
.detail-panel.is-action { border-width: 3px; border-color: var(--navy); }
.detail-panel.is-uncertain { border: 2px dashed #92721b; background: #fff9e8; }
.detail-panel.is-failure { border-left: 5px solid var(--red); }
.detail-panel h2 { font-size: 18px; }
.detail-panel p { margin: 7px 0 0; }
.status-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.status-summary div { padding: 12px; border: 1px solid var(--line); background: #fff; }
.status-summary strong, .status-summary span { display: block; }
.status-summary strong { color: var(--navy); font-size: 22px; }
.status-summary span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.progress { width: 100%; height: 8px; margin-top: 8px; accent-color: var(--mustard); }
.time-grid { display: grid; gap: 9px; margin-top: 17px; }
.time-button { min-height: 52px; padding: 11px 13px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.time-button strong, .time-button span { display: block; }
.time-button span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); min-height: 62px; padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left)); border-top: 1px solid #9dacb8; background: #fff; }
.bottom-nav button { min-height: 48px; border: 0; background: transparent; color: var(--navy); font-size: 13px; font-weight: 900; }
.bottom-nav button[aria-current="page"] { background: var(--navy); color: #fff; }
dialog { width: min(calc(100% - 28px), 440px); padding: 20px; border: 3px solid var(--navy); color: var(--ink); }
dialog::backdrop { background: rgb(4 18 29 / .68); }
.dialog-actions { display: grid; gap: 9px; margin-top: 16px; }
.dialog-actions button { min-height: 52px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font-weight: 900; }
.dialog-actions .is-primary { background: var(--navy); color: #fff; }
.no-script { margin: 30px auto; padding: 20px; max-width: 700px; }
.no-script a { display: block; padding: 15px; background: var(--red); color: #fff; font-weight: 900; text-align: center; }
@media (min-width: 760px) {
  #app { padding-top: 38px; }
  .list.is-two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav { left: 50%; width: 780px; transform: translateX(-50%); border-right: 1px solid #9dacb8; border-left: 1px solid #9dacb8; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (forced-colors: active) { .status-dot { border: 1px solid ButtonText; } }
