/* Shared look of the /game/ area (hall + every game). Scoped to body[data-game]. Three themes: light / dark / warm. */
:root{font-family:system-ui,"Microsoft JhengHei",sans-serif;color:#243345;background:#f3f6ff}
*{box-sizing:border-box}body{margin:0;overflow-x:hidden}
button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}
[hidden]{display:none!important}
body[data-game]{--bg:#f3f6ff;--panel:#fff;--text:#22304a;--muted:#5a6a84;--line:#d9e0f2;--accent:#3d63dd;--accent-text:#2f52c4;--soft:#e8eeff;--card:#f8faff;--shadow:0 4px 20px #23305a14;--hdr:#fff;--cell:#e3e9f8;--cell-line:#cfd8ef;--ok:#1f9d55;--bad:#d4493f;color:var(--text);background:var(--bg);min-height:100vh}
body[data-game][data-theme=dark]{--bg:#12162a;--panel:#1b2038;--text:#e8ecfa;--muted:#a8b2cf;--line:#2e3558;--accent:#6f8cff;--accent-text:#a9bbff;--soft:#283056;--card:#222848;--shadow:0 4px 20px #00000045;--hdr:#171c33;--cell:#262d4d;--cell-line:#343c63;--ok:#4fd08a;--bad:#ff8d85;color-scheme:dark}
body[data-game][data-theme=warm]{--bg:#f8f1e4;--panel:#fffaf0;--text:#3a2f22;--muted:#6e5f4c;--line:#e8dcc4;--accent:#b4571f;--accent-text:#9c4915;--soft:#fbe8d0;--card:#fff6e6;--shadow:0 4px 20px #6a3b1512;--hdr:#fffaf0;--cell:#f1e4c9;--cell-line:#e2d2b0;--ok:#2f8a4c;--bad:#b9382f}
:root:has(body[data-game][data-theme=dark]){background:#12162a;color:#e8ecfa}
:root:has(body[data-game][data-theme=warm]){background:#f8f1e4}
a{color:var(--accent-text)}
header{background:var(--hdr);border-bottom:1px solid var(--line);position:relative}
header::after{content:"";position:absolute;left:0;right:0;bottom:-3px;height:3px;background:linear-gradient(90deg,#ff6b6b,#ffb347,#ffe066,#6bd68a,#5aa9ff,#9b7bff)}
.header{max-width:1120px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px}
.brand{font-weight:800;display:flex;gap:10px;align-items:center;min-width:0;color:var(--text)}.brand span{background:var(--soft);border-radius:12px;font-size:22px;padding:7px;line-height:1}
.header-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.header a{font-weight:700;text-decoration:none;white-space:nowrap;min-height:44px;display:inline-flex;align-items:center}
.theme-dots{display:flex;gap:4px;background:var(--soft);border-radius:24px;padding:3px}
.theme-dot,.round-btn{width:38px;height:38px;border-radius:50%;border:2px solid transparent;background:transparent;font-size:17px;line-height:1;padding:0;display:inline-flex;align-items:center;justify-content:center;color:var(--text)}
.theme-dot[aria-pressed=true]{background:var(--panel);border-color:var(--accent);box-shadow:var(--shadow)}
.round-btn{background:var(--soft)}.round-btn[aria-pressed=true]{background:var(--panel);border-color:var(--accent)}
main{max-width:1120px;margin:auto;padding:22px 18px 60px}
.eyebrow{color:var(--accent-text);font-size:13px;font-weight:750;margin:0}
h1{font-size:clamp(24px,5vw,34px);margin:6px 0;color:var(--text)}h2{font-size:19px;margin:0 0 10px;color:var(--text)}h3{font-size:16px;margin:16px 0 6px;color:var(--text)}
.lead,.small{line-height:1.7;color:var(--muted)}.lead{margin:0}.small{font-size:13px;margin:6px 0}
.intro{margin-bottom:16px}
.intro.hero{display:flex;align-items:center;gap:20px;background:var(--panel);border:1px solid var(--line);border-radius:22px;padding:18px 22px;box-shadow:var(--shadow)}
.hero-text{flex:1;min-width:0}.hero-art{flex:0 0 auto;width:min(34%,280px);height:auto;display:block}
@media (max-width:700px){.intro.hero{flex-direction:column-reverse;align-items:stretch;gap:10px;padding:14px}.hero-art{width:min(62%,230px);align-self:center}}
/* on a phone the game itself comes first: game pages drop the picture and tighten the intro (the hall keeps it) */
@media (max-width:700px){body[data-game]:not([data-game=hall]) .hero-art{display:none}body[data-game]:not([data-game=hall]) .intro.hero{padding:10px 14px;margin-bottom:10px}body[data-game]:not([data-game=hall]) .intro .lead{display:none}body[data-game]:not([data-game=hall]) .intro h1{margin:2px 0;font-size:22px}}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:16px;min-width:0;box-shadow:var(--shadow);color:var(--text)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:8px 14px;background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:12px;font-weight:700;font-size:14px;text-decoration:none;line-height:1.3;transition:background .15s}
.btn:hover:not(:disabled){background:var(--soft)}
.btn.primary,.btn[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.primary:hover:not(:disabled),.btn[aria-pressed=true]:hover:not(:disabled){background:var(--accent);filter:brightness(1.08)}
.btn.danger{color:var(--bad)}
.seg{display:flex;gap:6px;flex-wrap:wrap}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 0}
.notice{background:var(--soft);border:1px solid var(--line);border-left:5px solid var(--accent);color:var(--text);border-radius:12px;padding:9px 13px;line-height:1.6;margin:12px 0 0;overflow-wrap:anywhere;min-height:44px;font-size:14px}
.notice.ok{border-left-color:var(--ok)}.notice.error{border-left-color:var(--bad)}
.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
.stat{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:8px 10px;min-width:0}
.stat dt{font-size:12px;color:var(--muted);margin:0}.stat dd{margin:2px 0 0;font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--text)}
.guide{margin-top:18px;line-height:1.8}.guide p,.guide li{color:var(--text);font-size:15px}.guide ol,.guide ul{padding-left:22px;margin:6px 0}
.guide details{border-top:1px solid var(--line);padding:8px 0}.guide summary{font-weight:700;cursor:pointer;min-height:36px;display:flex;align-items:center}
footer{text-align:center;color:var(--muted);font-size:13px;line-height:1.8;padding:24px 16px 40px}
footer .ver{opacity:.7}
/* game hall */
.hall{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin-top:16px}
.hall-card{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow);min-height:150px}
a.hall-card:hover{border-color:var(--accent)}
.hall-card .ico{font-size:34px;line-height:1}.hall-card strong{font-size:18px}.hall-card span{color:var(--muted);font-size:14px;line-height:1.6}
.hall-card .tag{align-self:flex-start;font-size:12px;font-weight:700;border-radius:20px;padding:2px 10px;background:var(--soft);color:var(--accent-text);margin-top:auto}
.hall-card.soon{opacity:.72}
@media (max-width:600px){.header{padding:10px 12px}main{padding:16px 12px 50px}.panel{padding:12px;border-radius:16px}.brand{font-size:15px}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}
