:root {
  /* Hackou Silver River palette (designs/2026-11-03-hackou-world/ART.md §3) */
  --void: #070d1c;
  --hull: #0f1a33;
  --hull-2: #16223a;
  --frost: #eef2f8;
  --mist: #8ea6c2;
  --cryo: #6fd3ff;
  --amber: #ffb347;
  --gold: #e8be62;
  --gold-2: #f6d98f;
  --vent: #ff5a5a;
  --line: rgba(143, 211, 255, .16);
  --goldline: rgba(232, 190, 98, .38);
  --display: 'Noto Serif TC', 'Noto Serif', 'Songti TC', 'PMingLiU', Georgia, serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --gut: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--void); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--void); color: var(--frost); font: 400 16px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--cryo); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cryo); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.45rem, 5vw, 2.2rem); }
h3 { font-size: 1.05rem; }
main > section { padding: 40px var(--gut); max-width: 1080px; margin: 0 auto; }
small { color: var(--mist); font-size: .8em; }

/* network banner */
.net { position: sticky; top: 0; z-index: 50; padding: 10px var(--gut); background: #3a1d1d; color: #ffd9d9; text-align: center; font-size: .95rem; }
.net.ok { background: #13283a; color: var(--frost); }

/* header */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gut); }
.brand { display: flex; gap: 8px; align-items: center; color: var(--frost); text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1rem; white-space: nowrap; }
.river-link { color: var(--gold); font-size: .72rem; text-decoration: none; margin-right: auto; margin-left: 8px; white-space: nowrap; }
@media (max-width: 400px) { .brand span { font-size: .8rem; } .top nav .ghost { padding: 7px 10px; font-size: .82rem; } }
@media (max-width: 420px) { html[lang="en"] .river-link { display: none; } }
.brand img { border-radius: 50%; flex: none; }
.top nav { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.top nav a { color: var(--frost); font-size: .9rem; text-decoration: none; padding: 8px 6px; }

/* buttons */
button { font: inherit; cursor: pointer; }
.ghost, .btnlike { background: rgba(7, 11, 20, .55); color: var(--frost); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: .9rem; line-height: 1.4; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.ghost:hover, .btnlike:hover { border-color: var(--cryo); }
.ghost.small { padding: 4px 10px; font-size: .8rem; }
.cta { display: inline-flex; gap: 10px; align-items: center; justify-content: center; background: var(--cryo); color: #04121d; border: 0; border-radius: 4px; padding: 15px 22px; font: 600 1.05rem var(--body); text-decoration: none; box-shadow: 0 0 0 0 rgba(111, 211, 255, .5); }
.cta:hover { filter: brightness(1.08); }
.cta[disabled] { opacity: .45; cursor: not-allowed; }
.cta b { font-weight: 600; opacity: .75; }
.cta.wide { width: 100%; }

/* hero */
.hero { position: relative; padding: 0 !important; max-width: none !important; min-height: 92svh; display: grid; align-items: end; overflow: hidden; }
.hero picture, .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 13, 28, .3) 0%, rgba(7, 13, 28, .05) 14%, rgba(7, 13, 28, .82) 34%, rgba(7, 13, 28, .94) 55%, var(--void) 100%); }
.hero-copy { position: relative; z-index: 2; text-shadow: 0 1px 12px rgba(7, 13, 28, .9), 0 0 2px rgba(7, 13, 28, .9); padding: 0 var(--gut) 36px; max-width: 760px; }
.hero h1 { font-size: clamp(1.85rem, 8vw, 3.6rem); text-wrap: balance; margin-bottom: .3em; }
.lede { font-size: 1.05rem; color: #c4dcf3; max-width: 34em; margin: 0 0 22px; }
.hero .lede { font-size: 1rem; margin-bottom: 16px; }
.facts { margin: 0 0 14px; font-size: .8rem; line-height: 1.5; color: var(--frost); background: rgba(7, 13, 28, .72); border: 1px solid var(--goldline); border-radius: 3px; padding: 8px 10px; text-shadow: none; }
.facts a { color: var(--gold-2); margin-left: 6px; white-space: nowrap; }
.hero .readout { margin: 0 0 14px; gap: 10px 20px; }
.hero .readout dd { font-size: clamp(1.2rem, 5.2vw, 1.8rem); }
.even { margin: 0 0 16px; font-size: .92rem; color: var(--gold-2); max-width: 36em; }
.even b { font-family: var(--mono); font-weight: 500; }
.hero-sub { color: var(--mist); font-size: .9rem; margin: 12px 0 0; min-height: 1.6em; }
.plain { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; color: var(--frost); font-size: .95rem; }
.plain li { padding-left: 14px; border-left: 2px solid var(--cryo); }
.hero-trust { margin: 6px 0 0; font-size: .85rem; }
.hero-trust a { color: var(--mist); }
@media (min-width: 760px) {
  .hero { min-height: 88vh; }
  .hero-copy { padding: 0 40px 64px; }
}

/* monitor: the ECG strip */
.monitor { position: relative; padding-top: 8px !important; }
.ecg { width: 100%; height: 90px; display: block; }
.ecg path { fill: none; stroke: var(--cryo); stroke-width: 2.2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(111, 211, 255, .6)); }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin: 6px 0 0; }
.readout div { border-left: 2px solid var(--cryo); padding-left: 12px; }
.readout .vent { border-color: var(--vent); }
.readout .share { border-color: var(--gold); }
.readout dt { color: var(--mist); font-size: .85rem; }
.readout dd { margin: 0; font: 500 clamp(1.3rem, 5.6vw, 1.9rem)/1.2 var(--mono); font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .readout { grid-template-columns: repeat(4, 1fr); } }
.mon-foot { margin: 22px 0 0; color: var(--frost); }
.clock { color: var(--amber); font-variant-numeric: tabular-nums; }
.mon-src { color: var(--mist); font-size: .82rem; margin: 6px 0 0; overflow-wrap: anywhere; }
.skeleton { color: transparent !important; background: linear-gradient(90deg, var(--hull) 0, var(--hull-2) 50%, var(--hull) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* board */
.board-grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .board-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.tiers { display: grid; gap: 10px; }
.tier { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 14px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--goldline); border-radius: 3px; background: var(--hull); }
.tier b { font-family: var(--mono); font-weight: 500; font-size: .95rem; }
.tier span { text-align: right; grid-column: 3; font-weight: 600; }
.tier em { grid-column: 1 / 4; font-style: normal; color: var(--mist); font-size: .85rem; }
.tier[data-tier="1"] { border-color: rgba(242, 196, 107, .45); }
.tier[data-tier="1"] em { color: var(--gold); }
.tier.now { border-color: var(--cryo); box-shadow: inset 0 0 0 1px var(--cryo); }
.tier.done { opacity: .5; }
.bar { grid-column: 1 / 4; height: 4px; background: var(--hull-2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--cryo); transition: width .6s ease; }
.buy { background: var(--hull); border: 1px solid var(--goldline); border-radius: 3px; padding: 20px; display: grid; gap: 16px; }
.qty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--hull-2); color: var(--frost); font-size: 1.4rem; }
.qty output { font: 500 1.8rem var(--mono); min-width: 2ch; text-align: center; }
.qty-lab { color: var(--mist); font-size: .9rem; }
.spare { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.spare input { width: 22px; height: 22px; margin-top: 2px; accent-color: #7cfc9a; flex: none; }
.spare span span { color: var(--mist); display: block; }
.total { display: flex; justify-content: space-between; margin: 0; font-size: 1.1rem; }
.msg { margin: 0; min-height: 1.4em; font-size: .92rem; color: var(--mist); overflow-wrap: anywhere; }
.msg.err { color: #ffb4b4; }
.msg.ok { color: #9ff0bd; }
.fine { color: var(--mist); font-size: .85rem; margin: 0; }
.gate { color: var(--mist); font-size: .9rem; margin: 16px 0 0; }

/* voyage */
.timeline { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(9, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 5%; right: 5%; top: 50%; height: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; place-items: center; }
.timeline b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 500 .8rem var(--mono); background: var(--void); border: 1px solid var(--line); color: var(--mist); position: relative; z-index: 1; }
.timeline li.past b { border-color: var(--cryo); color: var(--cryo); }
.timeline li.now b { background: var(--cryo); color: #04121d; border-color: var(--cryo); box-shadow: 0 0 0 6px rgba(111, 211, 255, .18); }
.timeline li[data-w="8"] b { border-color: var(--gold); color: var(--gold); }
.phases { display: grid; gap: 14px; }
@media (min-width: 760px) { .phases { grid-template-columns: repeat(2, 1fr); } .phases article:last-child { grid-column: 1 / -1; } }
.phases article { background: var(--hull); border: 1px solid var(--goldline); border-radius: 3px; overflow: hidden; display: grid; grid-template-columns: 96px 1fr; gap: 0 14px; align-items: start; padding: 12px; }
.phases img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; grid-row: span 2; }
.phases h3 { margin: 2px 0 4px; }
.phases p { margin: 0; color: #bcd3ea; font-size: .93rem; }

/* my pods */
.mine-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.pod { background: var(--hull); border-radius: 3px; overflow: hidden; border: 1px solid var(--goldline); }
.pod img { aspect-ratio: 1; width: 100%; background: var(--hull-2); }
.pod .pi { padding: 10px; display: grid; gap: 6px; font-size: .85rem; }
.pod .st { font-weight: 600; }
.pod .st.s0 { color: var(--cryo); } .pod .st.s1 { color: var(--amber); } .pod .st.s2 { color: var(--vent); } .pod .st.s3 { color: var(--gold); }
.pod button { width: 100%; }
.empty { color: var(--mist); }
.crew { margin-top: 28px; background: var(--hull); border: 1px solid var(--goldline); border-radius: 3px; padding: 18px; }
/* downstream card */
.river-card { background: var(--hull); border: 1px solid var(--goldline); border-radius: 3px; padding: 18px; display: grid; gap: 10px; justify-items: start; }
.river-card p { margin: 0; color: #c8d6e8; }
.river-state { font-family: var(--mono); color: var(--gold) !important; }
.gift { color: var(--gold-2) !important; }
.ghost.gold { border-color: var(--gold); color: var(--gold-2); }
.crew p { color: #bcd3ea; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; background: var(--void); color: var(--frost); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: .85rem var(--body); }
.crew-earn { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* manifest */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.tabs button { background: transparent; border: 1px solid var(--line); color: var(--mist); border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: #04121d; background: var(--frost); border-color: var(--frost); }
.board-list ol { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.board-list li { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board-list li::before { counter-increment: r; content: counter(r); color: var(--mist); }
.board-list li.me { color: var(--cryo); }
.board-list .addr { overflow: hidden; text-overflow: ellipsis; }
.deckrow { display: grid; grid-template-columns: 6em 1fr 4em; gap: 10px; align-items: center; padding: 8px 0; }
.deckrow i { height: 10px; border-radius: 6px; background: var(--hull-2); overflow: hidden; display: block; }
.deckrow i i { height: 100%; }
.feed-h { margin-top: 32px; }
.feed { list-style: none; padding: 0; margin: 0; font-size: .9rem; color: #bcd3ea; max-height: 260px; overflow: auto; }
.feed li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.feed .t { color: var(--mist); font-variant-numeric: tabular-nums; margin-right: 8px; }

/* faq, agents */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq p { color: #bcd3ea; margin: 10px 0 0; }
.agents { border-top: 1px solid var(--line); }
.agents .links { display: flex; gap: 16px; }
.prompt { white-space: pre-wrap; background: var(--hull); border-radius: 12px; padding: 14px; font: .85rem/1.5 ui-monospace, Consolas, monospace; color: #bcd3ea; overflow-wrap: anywhere; }

/* footer */
.foot { padding: 32px var(--gut) 48px; color: var(--mist); font-size: .85rem; border-top: 1px solid var(--line); max-width: 1080px; margin: 0 auto; }
.foot p { margin: 4px 0; overflow-wrap: anywhere; }

/* sheets */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(2, 4, 9, .72); display: grid; align-items: end; }
.sheet[hidden] { display: none; }
.sheet-card { background: var(--hull); border-radius: 20px 20px 0 0; padding: 22px var(--gut) calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-card { border-radius: 20px; } }
.ws-links { display: grid; gap: 8px; }
.ws-links a { text-align: center; }
#shareCanvas { width: 100%; height: auto; border-radius: 10px; }
.ss-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* rules page */
.rules { padding: 88px var(--gut) 48px; max-width: 860px; margin: 0 auto; }
.rules h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.rules .intro { color: #bcd3ea; }
.rules ol { padding-left: 1.3em; }
.rules li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rules li p { margin: 0 0 6px; }
.rules code { font: .85rem ui-monospace, Consolas, monospace; color: var(--cryo); background: var(--hull); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.rules .src { color: var(--mist); font-size: .88rem; overflow-wrap: anywhere; }
[data-l] { display: none; }
html[lang="en"] [data-l="en"], html[lang="zh-TW"] [data-l="zh"] { display: block; }

/* 404 */
.lost { min-height: 100svh; display: grid; place-items: center; padding: 24px var(--gut); background: linear-gradient(180deg, rgba(7,11,20,.55), var(--void)), url(img/ark-deck.jpg) center / cover; }
.lost div { max-width: 520px; }
.lost h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.lost p { color: #c4dcf3; }
