/* Jet Lag: mobile field companion. Project-specific interpretation of the Workshop UI guide. */
:root {
  --field:#8DCFFF; --ink:#243128; --paper:#F8F5E9;
  --bg:var(--field); --panel:var(--paper); --text:var(--ink); --dim:#5C6957; --line:var(--ink); --soft:rgba(36,49,40,.2);
  --stage-bg:var(--ink); --stage-fg:var(--field); --go-bg:var(--ink); --go-fg:var(--field); --shadow:var(--ink);
  --hot:#D93A22; --good:#17824A; --cool:#174BCE; --gold:#A87400; --curse:#6B3FC4;
  --ui:Arial, Helvetica, sans-serif; --display:"Arial Black", "Helvetica Neue", Arial, Helvetica, sans-serif; --mono:"Courier New", monospace;
  --motion:140ms; color-scheme:light;
}
:root[data-theme=night] {
  --bg:#111713; --panel:#1B2520; --text:#E9EDD8; --dim:#93A08F; --line:#40524A; --soft:rgba(233,237,216,.14);
  --stage-bg:#0A0F0C; --stage-fg:var(--field); --go-bg:var(--field); --go-fg:var(--ink); --shadow:#000;
  --hot:#FF6B52; --good:#4CD08A; --cool:#8DB0FF; --gold:#E8CE6A; --curse:#B79CFF; color-scheme:dark;
}
@media (prefers-reduced-motion: reduce) { :root { --motion:0ms; } }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.4 var(--ui); overflow:hidden; overscroll-behavior:none; }
.hidden { display:none !important; }
.dim { color:var(--dim); } .small { font-size:13px; } .center { text-align:center; }
.label { font:700 11px/1.3 var(--mono); letter-spacing:.12em; text-transform:uppercase; }
h1 { font:900 34px/1 var(--display); letter-spacing:-.03em; text-transform:uppercase; margin:0 0 12px; }
h2 { font:700 11px/1.3 var(--mono); letter-spacing:.12em; text-transform:uppercase; margin:0 0 10px; color:var(--dim); }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; } .spacer { flex:1; }
.actions { margin-top:14px; align-items:stretch; }

/* ---- controls */
button { font:700 15px/1.2 var(--ui); min-height:44px; padding:10px 14px; border-radius:4px; border:2px solid var(--line); background:var(--panel); color:var(--text);
  cursor:pointer; box-shadow:3px 3px 0 var(--shadow); transition:transform var(--motion), box-shadow var(--motion); touch-action:manipulation; }
button:active:not(:disabled) { transform:translate(3px, 3px); box-shadow:0 0 0 var(--shadow); }
button:disabled { opacity:.4; box-shadow:none; cursor:default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline:3px solid var(--cool); outline-offset:2px; }
button.go { background:var(--go-bg); color:var(--go-fg); border-color:var(--go-bg); font:900 17px/1.1 var(--display); text-transform:uppercase; letter-spacing:.02em;
  width:100%; margin-top:14px; padding:14px; box-shadow:4px 4px 0 var(--hot); }
button.go.big { font-size:22px; padding:18px; }
button.go:active:not(:disabled) { transform:translate(4px, 4px); }
button.warn { border-color:var(--hot); color:var(--hot); box-shadow:3px 3px 0 var(--hot); }
button.mini { min-height:36px; padding:6px 10px; font-size:13px; box-shadow:2px 2px 0 var(--shadow); }
button.wide { width:100%; margin-top:12px; }
button.icon { width:44px; padding:0; font-size:20px; flex:none; }
input, select { width:100%; padding:12px; font:16px var(--ui); border-radius:4px; border:2px solid var(--line); background:var(--panel); color:var(--text); }
select { width:auto; padding:8px 10px; font-weight:700; }
.panel { background:var(--panel); border:2px solid var(--line); border-radius:6px; padding:14px; margin-top:14px; box-shadow:4px 4px 0 var(--shadow); }
.panel.urgent { border-color:var(--hot); box-shadow:4px 4px 0 var(--hot); }
.panel.cursed { border-color:var(--curse); box-shadow:4px 4px 0 var(--curse); }
.chips { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.chip { min-height:34px; padding:6px 12px; border-radius:999px; font-size:13px; box-shadow:none; }
.chip.on { background:var(--go-bg); color:var(--go-fg); border-color:var(--go-bg); }
.chip:disabled { opacity:1; }
.seg { display:flex; margin-top:8px; }
.seg button { flex:1; border-radius:0; box-shadow:none; margin-left:-2px; }
.seg button:first-child { margin-left:0; border-radius:4px 0 0 4px; } .seg button:last-child { border-radius:0 4px 4px 0; }
.seg button.on { background:var(--go-bg); color:var(--go-fg); border-color:var(--go-bg); position:relative; }
.seg.answer button { min-height:56px; font:900 18px var(--display); text-transform:uppercase; }
.setting { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-top:1px solid var(--soft); font-weight:700; }
.setting:first-of-type { border-top:0; padding-top:0; }
.toggle { display:flex; align-items:center; justify-content:space-between; width:100%; box-shadow:none; border:0; border-top:1px solid var(--soft); border-radius:0; background:none; padding:10px 0; }
.toggle:first-of-type { border-top:0; }
.toggle i { width:46px; height:26px; border:2px solid var(--line); border-radius:999px; position:relative; flex:none; }
.toggle i::after { content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:var(--dim); transition:transform var(--motion); }
.toggle.on i { background:var(--go-bg); border-color:var(--go-bg); } .toggle.on i::after { transform:translateX(20px); background:var(--go-fg); }
.toggle:active:not(:disabled) { transform:none; }
.xp { height:10px; border:2px solid currentColor; overflow:hidden; } .xp i { display:block; height:100%; background:currentColor; transition:width .5s; }
.av { --c:var(--paper); display:inline-grid; place-items:center; width:38px; height:38px; flex:none; border-radius:50%; background:var(--c); border:2px solid var(--ink);
  font-size:20px; line-height:1; position:relative; font-style:normal; }
.av.sm { width:30px; height:30px; font-size:16px; } .av.xl { width:88px; height:88px; font-size:48px; border-width:3px; }
.gps { position:absolute; right:-3px; bottom:-3px; width:12px; height:12px; border-radius:50%; border:2px solid var(--ink); background:#AAAFA3; }
.gps.fresh { background:#3BD17F; } .gps.stale { background:#FFD166; } .gps.old { background:#D93A22; }

/* ---- title screen */
#home { height:100vh; height:100dvh; overflow-y:auto; max-width:560px; margin:0 auto; padding:calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 28px); }
.mast { border-bottom:3px solid var(--line); padding-bottom:14px; }
.mast h1 { font-size:clamp(84px, 30vw, 150px); line-height:.82; letter-spacing:-.06em; margin:10px 0 14px; }
#home label { display:block; margin:12px 0 6px; } #home label:first-child { margin-top:0; }
.error { color:var(--hot); font-weight:700; min-height:1.4em; margin-top:10px; }
.me-card { display:flex; gap:14px; align-items:center; }
.me-av { padding:0; border:0; background:none; box-shadow:none; position:relative; border-radius:50%; }
.me-av i { position:absolute; right:-4px; bottom:-2px; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:var(--go-bg); color:var(--go-fg); font-style:normal; font-size:15px; }
.me-id { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.me-name { font:900 26px/1 var(--display); letter-spacing:-.03em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tiles { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-top:14px; }
.tile { background:var(--panel); border:2px solid var(--line); border-radius:6px; padding:10px 4px 8px; text-align:center; }
.tile b { display:block; font:900 24px/1.1 var(--display); letter-spacing:-.03em; font-variant-numeric:tabular-nums; } .tile .label { color:var(--dim); font-size:10px; }
.badges { display:grid; grid-template-columns:repeat(auto-fill, minmax(64px, 1fr)); gap:10px 6px; }
.badge { display:flex; flex-direction:column; align-items:center; gap:4px; font:700 10px/1.2 var(--mono); text-transform:uppercase; text-align:center; }
.badge i { width:48px; height:48px; display:grid; place-items:center; border:2px solid var(--ink); border-radius:50%; background:var(--field); font-size:24px; font-style:normal; }
.badge.off { opacity:.32; } .badge.off i { background:none; border-style:dashed; border-color:var(--text); filter:grayscale(1); }
.pick { display:grid; grid-template-columns:repeat(6, 1fr); gap:8px; margin-top:14px; }
.pick button { padding:0; font-size:24px; box-shadow:none; aspect-ratio:1; min-height:0; }
.pick button.on { outline:4px solid var(--hot); outline-offset:1px; }
.pick.swatches { grid-template-columns:repeat(8, 1fr); } .pick.swatches button { border-radius:50%; border-color:var(--ink); }

/* ---- the shell: HUD, swipeable pages, tab bar */
#game { height:100vh; height:100dvh; max-width:560px; margin:0 auto; display:flex; flex-direction:column; }
#hud { display:flex; align-items:center; gap:10px; padding:calc(env(safe-area-inset-top) + 8px) 12px 8px; background:var(--stage-bg); color:var(--stage-fg); border-bottom:3px solid var(--field); }
#hud button { background:none; border:0; box-shadow:none; color:inherit; padding:0; display:flex; align-items:center; gap:8px; }
#hud button:active { transform:none; opacity:.7; }
.hud-lv { display:flex; flex-direction:column; gap:3px; width:54px; text-align:left; } .hud-lv .xp { height:8px; }
#hudRoom { flex:1; flex-direction:column; gap:0 !important; align-items:center; }
#hudRoom .label { opacity:.7; font-size:9px; } #hudCode { font:700 20px/1 var(--mono); letter-spacing:.16em; }
#hudPts { display:flex; align-items:center; gap:4px; font:900 20px/1 var(--display); font-variant-numeric:tabular-nums; min-width:54px; justify-content:flex-end; }
#hudPts i { font-style:normal; font-size:16px; }
#hud #hudRules { width:36px; height:36px; min-height:0; justify-content:center; border:2px solid currentColor; border-radius:50%; font:900 17px var(--display); }
#pager { flex:1; min-height:0; display:flex; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; }
#pager::-webkit-scrollbar, .hand::-webkit-scrollbar, .modes::-webkit-scrollbar { display:none; }
.page { flex:0 0 100%; min-width:0; overflow-y:auto; overflow-x:hidden; scroll-snap-align:start; scroll-snap-stop:always; padding:14px 14px 28px; overscroll-behavior-y:contain; }
.page > div > :first-child { margin-top:0; }
#tabs { position:relative; display:grid; grid-template-columns:repeat(4, 1fr); background:var(--panel); border-top:3px solid var(--line); padding-bottom:env(safe-area-inset-bottom); }
#tabs button { position:relative; display:flex; flex-direction:column; align-items:center; gap:2px; border:0; border-radius:0; background:none; box-shadow:none; padding:9px 0 8px; opacity:.5; min-height:56px; }
#tabs button:active { transform:none; }
#tabs button.on { opacity:1; }
#tabs button i { font-style:normal; font-size:20px; line-height:1; } #tabs button span { font:700 10px var(--mono); letter-spacing:.12em; text-transform:uppercase; }
#tabInk { position:absolute; top:-3px; left:0; width:25%; height:6px; background:var(--hot); will-change:transform; }
#feedBadge { position:absolute; top:4px; left:calc(50% + 8px); min-width:20px; height:20px; padding:0 5px; border-radius:10px; background:var(--hot); color:#fff; font:700 12px/20px var(--ui); }

/* ---- game screens */
.stage { background:var(--stage-bg); color:var(--stage-fg); border:2px solid var(--stage-bg); border-radius:6px; padding:14px 14px 18px; text-align:center; box-shadow:4px 4px 0 var(--hot); }
:root[data-theme=night] .stage { border-color:var(--field); }
.clock { font:900 clamp(72px, 25vw, 124px)/.92 var(--display); letter-spacing:-.06em; font-variant-numeric:tabular-nums; margin-top:6px; }
.clock .word { font-size:clamp(40px, 13vw, 66px); letter-spacing:-.03em; line-height:1.1; display:block; padding:10px 0; }
.clock .hot, .panel .hot { color:var(--hot); }
:root[data-theme=day] .clock .hot { color:#FF7A5C; }
.state { font:700 19px/1.25 var(--ui); margin-top:8px; } .stage .label { opacity:.8; } .stage .state + .label { display:block; margin-top:8px; }
.ask { font:900 22px/1.15 var(--display); letter-spacing:-.02em; }
.waiting { text-align:center; margin-top:18px; padding:14px; border:2px dashed var(--line); border-radius:6px; }
.player { display:flex; gap:10px; align-items:center; padding:9px 0; border-top:1px solid var(--soft); } .player:first-of-type { border-top:0; }
.player .name { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; } .player .name b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.player .rank { font:700 12px var(--mono); width:14px; color:var(--dim); } .pts { font:900 17px var(--display); font-variant-numeric:tabular-nums; white-space:nowrap; }
.a { color:var(--good); font-weight:700; white-space:nowrap; }
.modes, .hand { position:relative; display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; margin:0 -14px; padding:4px 14px 10px; scroll-padding:0 14px; }
.poster { flex:0 0 76%; min-height:176px; scroll-snap-align:center; display:flex; flex-direction:column; align-items:flex-start; text-align:left; padding:14px; border-color:var(--ink); border-radius:6px; }
.modes .poster:only-child { flex-basis:100%; }
.poster i { font-style:normal; font-size:52px; line-height:1; margin-bottom:auto; }
.poster b { font:900 28px/1 var(--display); letter-spacing:-.03em; text-transform:uppercase; margin-top:14px; } .poster span { font-size:13px; font-weight:400; margin-top:6px; }
.poster:disabled { opacity:1; }
.poster:not(.on):not(:disabled) { opacity:.72; }
.poster.on { outline:4px solid var(--text); outline-offset:2px; }
.m-hostage { background:#D93A22; color:#FFF4E8; }
.grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; }
.cat { display:flex; flex-direction:column; align-items:center; gap:4px; padding:12px 4px; font-size:12px; }
.cat i { font-style:normal; font-size:30px; line-height:1; } .cat.off { opacity:.3; }
.q { display:flex; align-items:center; gap:8px; width:100%; text-align:left; margin-top:8px; font-weight:400; box-shadow:2px 2px 0 var(--shadow); } .q.off { opacity:.4; }
.cards { display:grid; grid-template-columns:repeat(2, 1fr); gap:10px; }
.card { display:block; width:100%; text-align:left; padding:10px 10px 12px; min-height:92px; border-left:10px solid var(--dim); font-weight:400; }
.hand .card { flex:0 0 62%; min-height:168px; scroll-snap-align:center; }
.card.time { border-left-color:var(--gold); } .card.power { border-left-color:var(--cool); } .card.curse { border-left-color:var(--curse); }
.card.sel { outline:4px solid var(--hot); outline-offset:1px; }
.card .label { display:flex; justify-content:space-between; color:var(--dim); font-size:10px; }
.card b { display:block; font:900 16px/1.15 var(--display); letter-spacing:-.02em; margin-top:6px; } .card span { display:block; font-size:13px; color:var(--dim); margin-top:4px; }
.card .cost { color:var(--curse); font-weight:700; }
.curse-row { display:flex; gap:8px; align-items:flex-start; padding:8px 0; border-top:1px solid var(--soft); } .curse-row:first-of-type { border-top:0; }
.radar { display:block; width:min(100%, 300px); height:auto; margin:4px auto 6px; }
.pips { letter-spacing:4px; font-size:18px; color:var(--gold); }
.power { display:flex; gap:10px; align-items:center; width:100%; text-align:left; margin-top:10px; }
.power i { font-style:normal; font-size:26px; } .power small { display:block; color:var(--dim); font-size:12px; font-weight:400; }
.power .cost { margin-left:auto; color:var(--gold); white-space:nowrap; }
.task { display:flex; gap:10px; align-items:center; width:100%; text-align:left; margin-top:8px; box-shadow:2px 2px 0 var(--shadow); }
.task small { display:block; margin-top:2px; font-weight:400; } .task.locked { opacity:.55; }
.beep { display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--hot); vertical-align:baseline; }
.task.done { opacity:.45; text-decoration:line-through; } .task.sel { border-color:var(--cool); box-shadow:2px 2px 0 var(--cool); }
.bar { height:12px; border:2px solid var(--line); overflow:hidden; margin-top:6px; } .bar i { display:block; height:100%; background:var(--good); }
.danger1 { border-color:var(--good); box-shadow:4px 4px 0 var(--good); } .danger2 { border-color:var(--gold); box-shadow:4px 4px 0 var(--gold); }
.danger3 { border-color:var(--hot); box-shadow:4px 4px 0 var(--hot); background:var(--hot); color:#fff; } .danger3 .dim { color:#fff; }
.url { font:12px/1.4 var(--mono); word-break:break-all; border:1px solid var(--line); padding:10px; margin:8px 0; }
details { margin-top:12px; border-top:1px solid var(--soft); padding-top:10px; } summary { font-weight:700; cursor:pointer; min-height:32px; }

/* ---- feed */
#composer { display:flex; gap:8px; position:sticky; top:-14px; z-index:2; margin:-14px -14px 0; padding:14px 14px 12px; background:var(--bg); border-bottom:2px solid var(--line); }
#composer input { flex:1; min-width:0; } #composer .send { background:var(--go-bg); color:var(--go-fg); border-color:var(--go-bg); }
#composer + div > .panel { margin-top:14px; }
.feed { padding:2px 14px; }
.post { display:flex; gap:10px; padding:12px 0; border-top:1px solid var(--soft); } .post:first-child { border-top:0; }
.post .body { flex:1; min-width:0; } .post .by { display:flex; gap:8px; align-items:baseline; justify-content:space-between; }
.post time { font:11px var(--mono); color:var(--dim); white-space:nowrap; } .post .msg { font-size:16px; overflow-wrap:anywhere; margin-top:2px; }
.post.sys .msg { font-weight:700; } .post.sys .label { color:var(--dim); }
.post img { display:block; width:100%; border:2px solid var(--line); border-radius:4px; margin-top:8px; }
.post.xp { justify-content:space-between; align-items:baseline; color:var(--gold); padding:8px 0; } .post.xp b { font:700 13px var(--mono); }
.reacts { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.react { min-height:32px; padding:3px 10px; border-radius:999px; border-width:1px; box-shadow:none; font-size:14px; font-weight:400; }
.react.on { background:var(--go-bg); color:var(--go-fg); border-color:var(--go-bg); font-weight:700; } .react.add { opacity:.55; }

/* ---- sheet, rules */
#sheet { position:fixed; inset:0; background:rgba(10, 15, 12, .6); z-index:30; display:flex; align-items:flex-end; }
#sheetCard { background:var(--panel); border:3px solid var(--line); border-bottom:0; border-radius:14px 14px 0 0; width:100%; max-width:560px; margin:0 auto; max-height:88dvh;
  display:flex; flex-direction:column; transition:transform var(--motion); animation:rise .2s ease-out; }
#sheetGrip { padding:10px 0 12px; flex:none; touch-action:none; } #sheetGrip i { display:block; width:54px; height:6px; border-radius:3px; background:var(--dim); margin:0 auto; }
#sheetBody { overflow-y:auto; padding:0 14px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior:contain; }
.rules h3 { font:900 18px var(--display); letter-spacing:-.02em; margin:20px 0 6px; padding-top:10px; border-top:2px solid var(--line); }
.rules p, .rules li { font-size:15px; } .rules ul, .rules ol { padding-left:20px; margin:6px 0; }
.rules table { width:100%; border-collapse:collapse; font-size:14px; } .rules td, .rules th { border-top:1px solid var(--soft); padding:6px 4px; text-align:left; vertical-align:top; }

/* ---- alerts, splash, effects */
#alerts { position:fixed; top:calc(env(safe-area-inset-top) + 8px); left:0; right:0; z-index:40; display:flex; flex-direction:column; align-items:center; gap:8px; padding:0 10px; pointer-events:none; }
.alert { pointer-events:auto; width:100%; max-width:540px; display:flex; gap:10px; align-items:center; text-align:left; font-weight:400; padding:10px 12px;
  background:#243128; color:#F8F5E9; border-color:#8DCFFF; box-shadow:4px 4px 0 rgba(0, 0, 0, .35); animation:drop .24s cubic-bezier(.2, 1.3, .4, 1); }
.alert .ico { font-style:normal; font-size:22px; } .alert .ico:empty { display:none; } .alert .txt { flex:1; min-width:0; overflow-wrap:anywhere; }
.alert.good { background:#17824A; border-color:#fff; color:#fff; } .alert.bad { background:#D93A22; border-color:#fff; color:#fff; }
.alert.ask { background:#174BCE; border-color:#fff; color:#fff; } .alert.xp { background:#8DCFFF; border-color:#243128; color:#243128; font:900 16px var(--display); }
.alert.out { opacity:0; transform:translateY(-12px); transition:opacity .16s, transform .16s; }
.splash { position:fixed; inset:0; z-index:50; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px; text-align:center;
  background:#8DCFFF; color:#243128; animation:splash .26s cubic-bezier(.2, 1.2, .4, 1); }
.splash i { font-style:normal; font-size:96px; line-height:1; }
.splash b { font:900 clamp(60px, 21vw, 132px)/.86 var(--display); letter-spacing:-.06em; text-transform:uppercase; }
.splash span { font:700 17px var(--mono); letter-spacing:.14em; text-transform:uppercase; }
.splash.lose { background:#243128; color:#FF7A5C; } .splash.win { background:#8DCFFF; }
#fx { position:fixed; inset:0; z-index:60; pointer-events:none; overflow:hidden; }
.bit { position:absolute; top:34%; width:10px; height:16px; animation:bit 1.7s cubic-bezier(.15, .7, .3, 1) forwards; }
.float { position:absolute; transform:translate(-50%, -50%); font:900 26px var(--display); color:#8DCFFF; -webkit-text-stroke:5px #243128; paint-order:stroke fill; animation:float 1.1s ease-out forwards; }
.flash { position:absolute; inset:0; background:#D93A22; animation:flash .45s ease-out forwards; }
.pop { animation:pop .5s cubic-bezier(.2, 1.6, .4, 1); }
#toast { position:fixed; left:50%; bottom:calc(env(safe-area-inset-bottom) + 76px); transform:translateX(-50%); background:#243128; color:#F8F5E9; border:2px solid #8DCFFF; padding:10px 16px; z-index:45;
  font-weight:700; font-size:14px; max-width:90%; text-align:center; }
#blind { position:fixed; inset:0; background:#000; z-index:70; display:flex; align-items:center; justify-content:center; font-size:90px; }
@keyframes drop { from { transform:translateY(-140%); } }
@keyframes rise { from { transform:translateY(40%); opacity:0; } }
@keyframes splash { from { transform:scale(1.25); opacity:0; } }
@keyframes bit { 0% { transform:translate(0, 0) rotate(0); opacity:1; } 25% { transform:translate(calc(var(--dx) * .55), -24vh) rotate(calc(var(--rot) * .4)); opacity:1; }
  100% { transform:translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity:0; } }
@keyframes float { from { opacity:1; } to { transform:translate(-50%, -260%) scale(1.35); opacity:0; } }
@keyframes flash { from { opacity:.5; } to { opacity:0; } }
@keyframes pop { 30% { transform:scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .alert, .splash, #sheetCard, .pop { animation:none; } }

/* Field companion: calm surfaces, one activity per page, thumb-friendly controls. */
:root {
  --field:#8DCFFF; --ink:#17354D; --paper:#FFFFFF;
  --bg:#EDF5FB; --panel:#FFFFFF; --text:#17354D; --dim:#557086;
  --line:#D1E1ED; --soft:rgba(42,85,118,.13);
  --stage-bg:#173F60; --stage-fg:#F1F8FF; --go-bg:#226EAD; --go-fg:#FFFFFF; --shadow:transparent;
  --hot:#C54B50; --good:#187F74; --cool:#226EAD; --gold:#956B20;
  --ui:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --display:var(--ui); --mono:var(--ui);
}
:root[data-theme=night] {
  --bg:#101F30; --panel:#1A3045; --text:#E7F3FF; --dim:#ABC1D3; --line:#36536B; --soft:rgba(178,210,235,.15);
  --stage-bg:#193E60; --stage-fg:#EEF7FF; --go-bg:#8DCFFF; --go-fg:#102E45;
  --hot:#FF9A9D; --good:#79D7C7; --cool:#8DCFFF; --gold:#EFCA85;
}
/* The glow is one fixed layer behind everything: painted on the body it tiled once per screen on long pages. */
body::before { content:''; position:fixed; inset:0; z-index:-1; pointer-events:none; background:radial-gradient(ellipse at 80% 0%,color-mix(in srgb,var(--field) 24%,transparent),transparent 65%); }
button { border-width:1px; border-radius:18px; box-shadow:none; transition:background var(--motion),transform var(--motion); }
button:active:not(:disabled),button.go:active:not(:disabled) { transform:scale(.97); box-shadow:none; }
button.go { border-radius:999px; box-shadow:0 6px 18px #173f601a; font-size:17px; font-weight:700; text-transform:none; letter-spacing:0; }
button.go.big { font-size:18px; padding:17px; }
button.mini,.chip,.react { min-height:44px; box-shadow:none; }
button.warn { box-shadow:none; }
input,select { border:1px solid var(--line); border-radius:14px; min-height:46px; }
.panel { border:1px solid var(--soft); border-radius:24px; padding:18px; box-shadow:none; margin-top:16px; }
.panel.urgent,.panel.cursed,.danger1,.danger2,.danger3 { box-shadow:none; }
h1 { font-weight:750; text-transform:none; letter-spacing:-.045em; }
h2,.label { font-weight:650; letter-spacing:.08em; }
.xp,.bar { border:0; border-radius:999px; background:var(--soft); }
.xp i { border-radius:999px; background:var(--cool); }
.av { border:2px solid var(--panel); box-shadow:0 2px 8px #17354d16; }
#home { padding:calc(env(safe-area-inset-top) + 32px) 24px calc(env(safe-area-inset-bottom) + 28px); }
.mast { border:0; padding:0 4px 18px; }
.mast h1 { font-size:clamp(64px,20vw,92px); line-height:.94; margin:24px 0 18px; }
.mast h1 br { display:none; }
.mast .label:last-child { text-transform:none; letter-spacing:0; font-size:15px; color:var(--dim); }
#home .me-card { background:transparent; border:0; padding:8px 0; margin-bottom:22px; }
#home .av.xl { width:60px; height:60px; font-size:32px; }
#home .me-name { font-size:22px; }
#home .error:empty { display:none; }
.home-progress { margin:24px 0; color:var(--dim); }
summary { min-height:44px; padding:10px 0; }
.tile { border:0; border-radius:18px; padding:16px 4px; }
.badge i { border:0; background:color-mix(in srgb,var(--field) 30%,var(--panel)); }
#hud { background:transparent; color:var(--text); border:0; padding:calc(env(safe-area-inset-top) + 12px) 20px 12px; }
#hudCode { font-size:16px; letter-spacing:.1em; }
#hud #hudRules { min-height:44px; width:44px; border:1px solid var(--line); font-size:18px; }
#hudPts { font-size:17px; }
.page { padding:12px 20px 24px; }
.page-heading { padding:12px 4px 20px; }
.page-heading h1 { margin:8px 0 0; font-size:34px; }
.page-heading p { color:var(--dim); margin:10px 0 0; font-size:14px; }
.swipe-hint { color:var(--dim); text-align:center; font-size:12px; padding:24px 0 8px; }
.swipe-hint span { margin-left:8px; }
#tabs { grid-template-columns:repeat(5,1fr); margin:0 12px calc(env(safe-area-inset-bottom) + 10px); padding:4px; border:1px solid var(--soft); border-radius:26px; box-shadow:0 6px 24px #173f6010; }
#tabs button { min-height:54px; border-radius:20px; opacity:1; color:var(--dim); gap:6px; }
#tabs button.on { background:color-mix(in srgb,var(--field) 24%,var(--panel)); color:var(--text); }
#tabs button i { font-size:18px; }
#tabs button span { font-size:10px; letter-spacing:.02em; text-transform:none; }
#tabInk { width:20%; height:3px; top:auto; bottom:3px; background:var(--cool); border-radius:99px; left:0; opacity:0; }
.stage { border:0; border-radius:30px; padding:30px 16px; box-shadow:none; background:radial-gradient(ellipse at top right,#326F96,transparent 85%),var(--stage-bg); }
:root[data-theme=night] .stage { border:0; }
.clock { font-weight:650; font-size:clamp(64px,22vw,102px); letter-spacing:-.06em; margin:22px 0; }
.state { font-size:17px; font-weight:500; }
.waiting { border:1px dashed var(--line); border-radius:20px; color:var(--dim); }
.modes,.hand { margin:0 -20px; padding:6px 20px 18px; scroll-padding:0 20px; gap:16px; }
.poster { flex-basis:88%; min-height:260px; border:0; border-radius:30px; padding:26px; position:relative; overflow:hidden; box-shadow:none; }
.poster::after { content:''; position:absolute; width:220px; height:220px; right:-90px; top:-50px; border:1px solid #ffffff30; border-radius:50%; box-shadow:0 0 0 35px #ffffff08,0 0 0 70px #ffffff06; pointer-events:none; }
.poster b { text-transform:none; font-weight:700; font-size:32px; }
.poster i { font-size:64px; }
.poster span { font-size:14px; line-height:1.5; }
.poster.on { outline:0; }
.poster:not(.on):not(:disabled) { opacity:.85; }
.m-stops { background:#27577D; color:#F0F8FF; }
.m-race { background:#2F7A73; color:#F0FFFB; }
.m-row { background:#6B5A9C; color:#F7F4FF; }
.m-hostage { background:#81625C; color:#FFF6EF; }
.seg { border-radius:16px; background:var(--bg); padding:4px; gap:4px; }
.seg button,.seg button:first-child,.seg button:last-child { border:0; border-radius:12px; margin:0; font-size:14px; }
.card,.q,.task,.task.sel { box-shadow:none; }
.card { border-left-width:5px; }
.radar { width:min(100%,280px); }
#composer { top:-12px; margin:-12px -20px 0; padding:12px 20px; border-bottom:1px solid var(--soft); }
#composer input { border-radius:999px; }
#composer .icon { border-radius:50%; }
#sheetCard { position:relative; border:0; border-radius:30px 30px 0 0; box-shadow:0 -16px 64px #102a4426; }
#sheetClose { position:absolute; right:12px; top:7px; width:44px; height:44px; border:0; border-radius:50%; background:var(--bg); font-size:24px; z-index:1; }
#sheetGrip { padding:18px 0 24px; }
#sheetGrip i { height:4px; width:36px; opacity:.5; }
#sheetBody { padding-left:22px; padding-right:22px; }
.alert { border:0; border-radius:20px; box-shadow:0 8px 30px #102a4426; }
.alert.xp,.splash,.splash.win { background:#D7EDFD; color:#17354D; }
#toast { background:#17354D; border:0; border-radius:99px; }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }

/* Intuitive navigation: game cards, role positions, contextual drawers. */
.glyph { width:24px; height:24px; display:inline-block; flex:none; vertical-align:middle; }
button.icon { display:inline-grid; place-items:center; }
.home-top { display:flex; justify-content:space-between; align-items:center; }
.home-top .icon { border:0; background:transparent; }
.site-home { color:var(--text); font:800 19px/1 var(--display); letter-spacing:-.03em; text-decoration:none; }
#home .mast { padding-bottom:8px; }
#home .mast h1 { margin:20px 0; font-size:clamp(56px,18vw,82px); }
#joinForm { margin:0 0 24px; }
.join-row { display:flex; gap:8px; margin-top:10px; }
.join-row input { min-width:0; }
.join-row button { background:var(--go-bg); color:var(--go-fg); border:0; width:50px; flex:none; }
#home .error:empty { display:none; }
.home-modes { margin:0 -24px; padding:6px 24px 20px; scroll-padding:0 24px; }
.poster > .glyph { width:64px; height:64px; margin-bottom:auto; stroke-width:1.1; }
.poster .card-arrow { position:absolute; right:24px; top:26px; }
.poster .card-arrow .glyph { width:22px; height:22px; }
.poster b { margin-top:36px; }
.poster span { max-width:92%; }
.lobby-card .poster { width:100%; min-height:190px; }
.lobby-card .poster > .glyph { width:44px; height:44px; }
.lobby-card .poster b { margin-top:18px; }
.room-state { text-align:center; color:var(--dim); font-size:13px; margin:14px 4px 28px; }
#hudRoom { flex:0!important; align-items:flex-start!important; }
#hudStatus { flex:1; font-size:12px; color:var(--dim); text-align:center; }
#hud .icon { display:grid; place-items:center; border:1px solid var(--soft); border-radius:50%; width:44px; height:44px; position:relative; }
.unread::after { content:''; position:absolute; right:4px; top:4px; width:7px; height:7px; border-radius:50%; background:var(--hot); border:2px solid var(--bg); }
.av { font:650 14px/1 var(--ui); color:#17354D; }
.av.sm { font-size:11px; }
.av.xl { font-size:28px; width:64px; height:64px; }
.crew-lobby { margin:24px 0; }
.team-group { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.team-group h3 { grid-column:1/-1; margin:8px 0 0; font-size:14px; }
.seat { display:flex; flex-direction:column; gap:12px; align-items:flex-start; text-align:left; min-height:104px; padding:16px 12px; border:1px solid var(--soft); background:color-mix(in srgb,var(--panel) 75%,transparent); }
.seat:disabled { opacity:1; }
.seat-player { display:flex; align-items:center; gap:7px; min-width:0; max-width:100%; font-size:13px; font-weight:550; }
.seat-player > span:last-child { overflow-wrap:anywhere; }
.empty-seat { font-size:23px; color:var(--dim); }
.tracking-note { display:flex; gap:12px; align-items:center; text-align:left; width:100%; background:transparent; border:0; border-top:1px solid var(--soft); border-radius:0; padding:18px 0; }
.tracking-note > span:nth-child(2) { flex:1; }
.tracking-note b,.tracking-note small { display:block; }
.tracking-note b { font-size:14px; font-weight:600; }
.tracking-note small { color:var(--dim); font-size:12px; margin-top:4px; font-weight:400; }
#pageDots { flex:none; display:flex; justify-content:center; padding-bottom:env(safe-area-inset-bottom); }
#pageDots:empty { min-height:env(safe-area-inset-bottom); }
#pageDots button { background:transparent; border:0; border-radius:50%; padding:0; width:44px; height:44px; display:grid; place-items:center; }
#pageDots i { width:6px; height:6px; border-radius:50%; background:var(--dim); opacity:.35; transition:width var(--motion); }
#pageDots button[aria-current=page] i { width:18px; opacity:1; border-radius:9px; background:var(--cool); }
.menu-list { display:flex; flex-direction:column; margin-top:20px; }
.menu-list button { display:flex; align-items:center; gap:12px; border:0; border-bottom:1px solid var(--soft); border-radius:0; background:transparent; padding:16px 0; text-align:left; }
.onboard-mark { width:64px; height:64px; border-radius:24px; background:var(--bg); display:grid; place-items:center; margin-bottom:20px; color:var(--cool); }
.onboard-mark .glyph { width:32px; height:32px; }
#sheetBody h1 { padding-right:30px; font-size:28px; }
#sheetBody ol { padding-left:24px; }
#sheetBody li { padding:7px 0; }
a { color:var(--cool); text-underline-offset:3px; }
#activity { overflow-y:auto; padding:0 20px 24px; }
#activity #composer { top:0; margin:0 -20px; padding-top:6px; }
#sheetBody .me-card { margin-top:24px; }
#sheetBody .me-name { font-size:22px; }
#sheetBody .tiles { gap:8px; }
#sheetBody .tile { background:var(--bg); }
#sheetBody .tile b { font-size:21px; }
#blind { font-size:24px; color:#F0F8FF; }

/* Quiet rules links keep the game open while the reference is read. */
.rules-link { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; color:var(--dim); font-size:12px; font-weight:600; text-decoration:none; }
.rules-link:hover { text-decoration:underline; }
.rules-link:focus-visible { outline:3px solid var(--cool); outline-offset:2px; border-radius:8px; }
.mode-choice { flex:0 0 88%; min-width:0; scroll-snap-align:center; }
.mode-choice .poster { width:100%; }
.mode-choice > .rules-link { display:flex; width:max-content; margin:0 auto; }
.menu-list .rules-link { justify-content:flex-start; font-size:15px; color:var(--text); padding:16px 0; border-bottom:1px solid var(--soft); }
#hud { gap:6px; }
#hudStatus { min-width:0; }
body.rules-document { height:auto; min-height:100vh; overflow:auto; overscroll-behavior:auto; }
.rules-document main { max-width:760px; margin:0 auto; padding:calc(env(safe-area-inset-top) + 32px) 24px calc(env(safe-area-inset-bottom) + 48px); }
.rules-document h1 { font-size:clamp(32px,8vw,48px); margin:18px 0 32px; }
.rules-document h2 { font-size:24px; text-transform:none; letter-spacing:-.02em; margin:36px 0 16px; color:var(--text); }
.rules-document .rules h3 { border-top:1px solid var(--line); margin-top:24px; padding-top:16px; }
.rules-document li { margin:8px 0; }
.rules-document table { display:block; overflow-x:auto; }
.rules-catalog { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
.rules-catalog article { background:var(--panel); border:1px solid var(--soft); border-radius:20px; padding:18px; }
.rules-document .rules-catalog h3 { border:0; margin:10px 0; padding:0; }

.rules-back { display:inline-flex; align-items:center; min-height:44px; margin-bottom:16px; font-weight:600; text-decoration:none; }

/* Outings: Stop Wars, Across Town, The Expedition. */
.t-A { --tc:#226EAD; } .t-B { --tc:#C54B50; } .t-C { --tc:#187F74; } .t-D { --tc:#956B20; }
:root[data-theme=night] .t-A { --tc:#8DCFFF; } :root[data-theme=night] .t-B { --tc:#FF9A9D; } :root[data-theme=night] .t-C { --tc:#79D7C7; } :root[data-theme=night] .t-D { --tc:#EFCA85; }
.tchip { display:inline-grid; place-items:center; flex:none; width:30px; height:30px; border-radius:50%; font-weight:700; font-size:14px;
  background:var(--tc, var(--soft)); color:var(--panel); }
.tchip:not([class*=t-]) { color:var(--dim); }
.check { display:flex; align-items:center; gap:10px; min-height:44px; padding:6px 0; color:inherit; text-decoration:none; border-top:1px solid var(--soft); }
.check b { width:22px; text-align:center; color:var(--dim); } .check.on b { color:var(--good); } .check span { flex:1; }
.check.on span { color:var(--dim); text-decoration:line-through; }
.meter { height:10px; border-radius:999px; background:var(--soft); overflow:hidden; margin:10px 0 6px; }
.meter i { display:block; height:100%; border-radius:999px; background:var(--good); transition:width var(--motion); }
.panel.here { border-color:var(--cool); }
.stepper { display:flex; align-items:center; justify-content:center; gap:24px; margin:18px 0 10px; }
.stepper button { width:58px; height:58px; border-radius:50%; font-size:28px; }
.stepper b { font-size:48px; font-weight:700; min-width:64px; text-align:center; font-variant-numeric:tabular-nums; }
.button-link { width:100%; margin-top:12px; display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; border:1px solid var(--line); border-radius:18px;
  color:var(--text); text-decoration:none; font-weight:600; box-sizing:border-box; }
.regions { display:block; width:100%; max-width:380px; margin:0 auto; }
.regions line { stroke:var(--line); stroke-width:3; stroke-linecap:round; } .regions line.lit { stroke:var(--cool); }
.regions .node { cursor:pointer; } .regions circle { fill:var(--panel); stroke:var(--line); stroke-width:2.5; }
.regions text { text-anchor:middle; font:700 15px var(--ui); fill:var(--text); pointer-events:none; }
.regions text.name { font-size:10px; font-weight:600; fill:var(--dim); }
.regions text.rival { font-size:10px; fill:var(--hot); text-anchor:start; }
.regions .open circle { fill:color-mix(in srgb,var(--cool) 18%,var(--panel)); stroke:var(--cool); }
.regions .done circle { fill:var(--good); stroke:var(--good); } .regions .done text:not(.name) { fill:var(--panel); }
.regions .start circle { fill:var(--stage-bg); stroke:var(--stage-bg); } .regions .start text:not(.name) { fill:var(--stage-fg); }
.regions .here circle { stroke-width:5; stroke:var(--text); }
.cards .card { display:flex; flex-direction:column; align-items:stretch; }
.panel.here .ask { margin:4px 0 2px; }
.map-panel { padding:0; overflow:hidden; }
.omap-slot, .omap { height:min(62vh, 440px); }
.omap { border-radius:24px; z-index:0; background:var(--bg); }
.leaflet-container { font:13px var(--ui); }
:root[data-theme=night] .omap .leaflet-tile-pane { filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.mpin { position:relative; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; box-sizing:border-box; font:700 15px var(--ui);
  background:var(--panel); color:var(--text); border:2.5px solid var(--dim); box-shadow:0 2px 8px #17354d33; }
.mpin.open { border-color:var(--cool); color:var(--cool); } .mpin.done { background:var(--good); border-color:var(--good); color:#fff; }
.mpin.start { background:var(--stage-bg); border-color:var(--stage-bg); color:var(--stage-fg); } .mpin.here { outline:3px solid var(--text); }
.mpin i { position:absolute; right:-10px; top:-8px; font:700 10px var(--ui); font-style:normal; color:#fff; background:var(--hot); border-radius:8px; padding:1px 4px; }
.mme { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; box-sizing:border-box; background:var(--c); border:2px solid #fff;
  font:700 12px var(--ui); color:#17354D; box-shadow:0 2px 8px #17354d55; }
.rules-map { height:min(70vh, 480px); margin:12px 0 8px; border:1px solid var(--soft); }

/* Playing cards: powerups, curses and challenges, in the proportions of a real card (2.5 x 3.5 in), always white. */
.pcards { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap:12px; }
button.pcard, .pcard { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; text-align:center;
  aspect-ratio:5 / 7; width:100%; min-height:auto; box-sizing:border-box; padding:34px 14px 32px; margin:0;
  background:#FFFFFF; color:#17354D; border:1px solid #D4E1EB; border-radius:14px; box-shadow:0 6px 18px #17354d1c; font-weight:400; --k:#226EAD; }
.pcard.k-power { --k:#226EAD; } .pcard.k-curse { --k:#6B3FC4; } .pcard.k-challenge { --k:#B4611E; }
.pcard::before { content:''; position:absolute; inset:6px; border:1.5px solid color-mix(in srgb, var(--k) 30%, transparent); border-radius:9px; pointer-events:none; }
.pc-ico { display:block; flex:none; width:16px; height:16px; background:var(--k); -webkit-mask:var(--icon) center / contain no-repeat; mask:var(--icon) center / contain no-repeat; }
.k-power { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7l1-8Z'/%3E%3C/svg%3E"); } .k-challenge { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1.2'/%3E%3C/svg%3E"); } .k-curse { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M12 1.8C7 1.8 3.4 5.3 3.4 10c0 2.8 1.3 5 3.3 6.3v2.4c0 .8.6 1.5 1.4 1.5h.7v1.6c0 .5.4.9.9.9h.6c.5 0 .9-.4.9-.9v-1.6h1.6v1.6c0 .5.4.9.9.9h.6c.5 0 .9-.4.9-.9v-1.6h.7c.8 0 1.4-.7 1.4-1.5v-2.4c2-1.3 3.3-3.5 3.3-6.3 0-4.7-3.6-8.2-8.6-8.2ZM8.3 8.6a2.2 2.2 0 1 0 0 4.4 2.2 2.2 0 0 0 0-4.4ZM15.7 8.6a2.2 2.2 0 1 0 0 4.4 2.2 2.2 0 0 0 0-4.4ZM12 13.2l-1.4 2.6h2.8L12 13.2Z'/%3E%3C/svg%3E"); }
.pc-big { width:44px; height:44px; margin:2px 0 8px; }
.pc-kind { font:700 10px/1 var(--ui); letter-spacing:.14em; text-transform:uppercase; color:var(--k); }
.pc-name { display:block; font:750 17px/1.15 var(--ui); letter-spacing:-.01em; margin:8px 0 6px; color:#17354D; }
.pc-text { display:block; font-size:12.5px; line-height:1.4; color:#41596E; }
.pc-foot { display:block; margin-top:auto; padding-top:8px; font-size:11px; font-weight:650; color:var(--k); }
.pc-corner { position:absolute; display:flex; flex-direction:column; align-items:center; gap:2px; min-width:16px; font:800 11px/1 var(--ui); color:var(--k); }
.pc-corner.tl { top:12px; left:12px; } .pc-corner.br { bottom:12px; right:12px; transform:rotate(180deg); }
.pcard.solo { max-width:250px; margin:4px auto 14px; }
.pcard.solo .pc-text { font-size:14px; }
.pcard.locked { opacity:.55; }
button.pcard:disabled { opacity:1; }
button.pcard:active:not(:disabled) { transform:scale(.97); }
.rules-catalog.pcards { grid-template-columns:repeat(auto-fill, minmax(min(100%, 148px), 1fr)); }
.rules-catalog.pcards .pcard { max-width:240px; justify-self:center; }
.rules-document .rules-catalog .pcard { padding:34px 16px 30px; border:1px solid #D4E1EB; border-radius:14px; background:#FFFFFF; }

/* Drawing cards. .cback is the card back: a placeholder in the style of a classic deck until the owner's artwork exists. */
.cback { position:relative; display:block; box-sizing:border-box; aspect-ratio:5 / 7; border-radius:14px; background:#FFFFFF; box-shadow:0 6px 18px #0000003a; }
.cback::before { content:''; position:absolute; inset:7px; border-radius:9px; border:2px solid #A8232B;
  background:repeating-linear-gradient(45deg, transparent 0 6px, #ffffff50 6px 7.5px), repeating-linear-gradient(-45deg, transparent 0 6px, #ffffff50 6px 7.5px), #B3262D;
  box-shadow:inset 0 0 0 3px #B3262D, inset 0 0 0 4.5px #ffffffb0; }
.cback::after { content:''; position:absolute; left:50%; top:50%; width:38%; aspect-ratio:3 / 4; transform:translate(-50%, -50%); border-radius:50%;
  background:radial-gradient(circle, #B3262D 0 30%, #FFFFFF 31% 38%, #B3262D 39% 60%, #FFFFFF 61% 68%, #B3262D 69%); box-shadow:0 0 0 2px #FFFFFF; }
#deal { position:fixed; inset:0; z-index:60; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:24px 16px;
  background:color-mix(in srgb, #0B1D2E 82%, transparent); backdrop-filter:blur(3px); color:#F1F8FF; animation:deal-in .25s ease-out; }
#deal.hidden { display:none; }
#deal .deck { position:relative; width:120px; aspect-ratio:5 / 7; }
#deal .deck .cback { position:absolute; inset:0; }
#deal.shuffling .deck .cback:nth-child(odd) { animation:riffle-l .38s ease-in-out 3; }
#deal.shuffling .deck .cback:nth-child(even) { animation:riffle-r .38s ease-in-out 3; }
#deal .deck .cback:nth-child(2) { top:-2px; } #deal .deck .cback:nth-child(3) { top:-4px; } #deal .deck .cback:nth-child(4) { top:-6px; }
#deal .deck .cback:nth-child(5) { top:-8px; } #deal .deck .cback:nth-child(6) { top:-10px; }
#deal .dealt { display:none; gap:14px; justify-content:center; width:100%; perspective:1200px; }
#deal.dealing .deck, #deal.shown .deck { display:none; }
#deal.dealing .dealt, #deal.shown .dealt { display:flex; }
#deal .deal-card { width:min(44vw, 210px); animation:deal-card .42s cubic-bezier(.2, .8, .3, 1.1) both; animation-delay:calc(var(--i) * 120ms); }
#deal .dealt.n1 .deal-card { width:min(64vw, 250px); }
#deal .flip { position:relative; display:grid; transform-style:preserve-3d; transition:transform .62s cubic-bezier(.3, .7, .2, 1.15); transform:rotateY(180deg); }
#deal .flip.open { transform:rotateY(0deg); }
#deal .face { grid-area:1 / 1; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
#deal .face.cback { transform:rotateY(180deg); height:100%; aspect-ratio:auto; }
#deal .front .pcard { box-shadow:0 10px 30px #00000055; }
#deal .deal-title { margin:6px 0 0; font:750 24px var(--ui); letter-spacing:-.02em; opacity:0; transition:opacity .3s; }
#deal .deal-tap { margin:0; font-size:13px; color:#ABC1D3; opacity:0; transition:opacity .3s; }
#deal.shown .deal-title, #deal.shown .deal-tap { opacity:1; }
@keyframes deal-in { from { opacity:0; } }
@keyframes riffle-l { 50% { transform:translateX(-70px) rotate(-10deg); } }
@keyframes riffle-r { 50% { transform:translateX(70px) rotate(10deg); } }
@keyframes deal-card { from { opacity:0; transform:translateY(-60px) scale(.55) rotate(-6deg); } }

/* Sheets are pages: full screen with a Back bar (the phone's back gesture works too). */
#sheet { align-items:stretch; background:var(--bg); }
#sheetCard { display:flex; flex-direction:column; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; box-shadow:none; background:var(--bg); animation:page-in .18s ease-out; }
#sheetBar { position:sticky; top:0; z-index:2; display:flex; align-items:center; gap:10px; min-height:52px; padding:calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background:var(--bg); border-bottom:1px solid var(--soft); }
#sheetClose { position:static; width:auto; height:44px; padding:0 14px 0 8px; border-radius:999px; background:transparent; border:1px solid var(--line); font-size:16px; font-weight:650; }
#sheetTitle { font-size:17px; font-weight:700; }
#sheetBody, #activity { flex:1; width:100%; max-width:640px; margin:0 auto; box-sizing:border-box; padding-top:12px; }
@keyframes page-in { from { opacity:0; transform:translateX(24px); } }

/* Game cards: real playing-card proportions. Each pattern is a placeholder for that game's card-back artwork. */
.modes.home-modes, .home-modes { gap:16px; padding:8px 24px 14px; margin:0 -24px; scroll-padding:0 24px; }
.poster, button.poster { flex:0 0 min(64vw, 270px); width:min(64vw, 270px); aspect-ratio:5 / 7; min-height:0; height:auto; padding:10px; border:0; border-radius:18px;
  display:flex; align-items:stretch; overflow:hidden; box-shadow:0 10px 26px #17354d2e; scroll-snap-align:center; opacity:1; }
.poster::after { display:none; }
.poster:not(.on):not(:disabled) { opacity:1; }
.poster-frame { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center; padding:18px 14px;
  border:2px solid #ffffffcc; border-radius:11px; background:color-mix(in srgb, var(--pc) 70%, transparent); }
.poster-mark { display:grid; place-items:center; width:84px; height:84px; border-radius:50%; background:#ffffff; color:var(--pc); box-shadow:0 0 0 5px #ffffff55; }
.poster-mark .glyph { width:46px; height:46px; }
.poster b { margin:6px 0 0; font-size:26px; line-height:1.05; color:#fff; text-transform:none; }
.poster-frame > span:last-child { font-size:13px; line-height:1.4; color:#ffffffe6; margin:0; }
.m-hostage { --pc:#7A4F45; background:repeating-linear-gradient(45deg, #8A5B50 0 10px, #6F463D 10px 20px); }
.m-stops { --pc:#1F5C8C; background:radial-gradient(circle at 50% 50%, #ffffff40 0 3px, transparent 3.5px) 0 0 / 18px 18px, #27699C; }
.m-race { --pc:#22665F; background:repeating-linear-gradient(-30deg, #2F7A73 0 12px, #26675F 12px 24px); }
.m-row { --pc:#55468A; background:repeating-radial-gradient(circle at 30% 30%, #6B5A9C 0 9px, #5A4B8B 9px 18px); }
.mode-choice { display:flex; flex-direction:column; align-items:center; gap:6px; }
.lobby-card { display:flex; justify-content:center; }
.lobby-card .poster { flex-basis:min(56vw, 230px); width:min(56vw, 230px); }
.lobby-card .poster b { font-size:22px; }
.poster .poster-frame, .poster .poster-mark { margin:0; max-width:none; font-size:inherit; }
.lobby-card .poster b { margin-top:6px; }

/* Cards in a row are all the same size: the face shows a short line, the card's page shows everything. */
.pcards .pcard, #deal .pcard { overflow:hidden; }
.pc-name { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pc-text { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; font-size:13px; }
.pcard .pc-foot { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pcard.solo { width:min(64vw, 230px); max-width:none; }
.card-full { font-size:16px; line-height:1.5; margin:0 0 14px; }

/* The board: grey streets only, territory shading, board-game pieces (board.js). */
.omap.leaflet-container, .guide-map.leaflet-container { background:#F4F1EA; }
:root[data-theme=night] .omap.leaflet-container, :root[data-theme=night] .guide-map.leaflet-container { background:#22262B; }
.bp { display:grid; place-items:center; box-sizing:border-box; font:800 14px/1 var(--ui); }
.bp.token { width:34px; height:34px; border-radius:50%; background:var(--f); color:var(--c); border:3px solid var(--c);
  box-shadow:0 3px 0 color-mix(in srgb, var(--c) 55%, #000), 0 5px 10px #0003; }
.bp.token.filled { color:#fff; }
.bp.token.closed { opacity:.75; text-decoration:line-through; }
.bp.pawn { width:28px; height:28px; border-radius:50% 50% 50% 0; transform:rotate(-45deg); background:var(--c); border:2.5px solid #fff; box-shadow:0 3px 8px #0005; }
.bp.pawn { font-size:0; }
.bp.pawn::after { content:''; width:9px; height:9px; border-radius:50%; background:#fff; }
.bp.pin { width:18px; height:18px; border-radius:50%; background:var(--f); border:3px solid var(--c); box-shadow:0 2px 6px #0004; }
.bp.flag { position:relative; width:34px; height:34px; }
.bp.flag i { position:absolute; left:6px; bottom:0; width:3px; height:32px; background:var(--c); border-radius:2px; }
.bp.flag i::after { content:''; position:absolute; left:3px; top:0; width:22px; height:15px; background:repeating-conic-gradient(var(--c) 0 25%, #fff 0 50%) 0 0 / 10px 10px; border:1.5px solid var(--c); }

/* Guide pages: Guide and Rules tabs; each guide step is a caption over a small looping animation (guide.js). */
.guide-tabs { position:sticky; top:0; z-index:5; display:flex; gap:4px; padding:4px; margin:4px 0 18px; border-radius:16px; background:var(--panel); border:1px solid var(--soft); }
.guide-tabs a { flex:1; text-align:center; padding:11px 0; border-radius:12px; font-weight:700; color:var(--dim); text-decoration:none; }
.guide-tabs a[aria-selected=true] { background:var(--go-bg); color:var(--go-fg); }
.g-step { position:relative; margin:0 0 22px; padding:16px; border-radius:22px; background:var(--panel); border:1px solid var(--soft); }
.g-step > p { margin:0 0 12px 40px; font-size:17px; font-weight:600; line-height:1.35; min-height:30px; }
.g-n { position:absolute; left:16px; top:15px; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--go-bg); color:var(--go-fg); font-weight:800; font-size:14px; }
.scene { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:220px; overflow:hidden; border-radius:16px; background:var(--bg); padding:14px 10px; }
.scene .g-caption { margin:0; min-height:20px; font-size:14px; color:var(--dim); text-align:center; }
.g-card { width:min(36vw, 150px); perspective:900px; }
.g-card.solo { width:min(40vw, 160px); }
.g-flip { position:relative; display:grid; transform-style:preserve-3d; transform:rotateY(180deg); transition:transform .6s cubic-bezier(.3, .7, .2, 1.15); }
.g-flip.open, .scene.still .g-flip { transform:rotateY(0deg); }
.g-face, .g-back { grid-area:1 / 1; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
.g-back { transform:rotateY(180deg); height:100%; aspect-ratio:auto; }
.g-deck { position:relative; width:96px; aspect-ratio:5 / 7; }
.g-deck .cback { position:absolute; inset:0; }
.scene.draw.shuffle .g-deck .cback:nth-child(odd) { animation:riffle-l .38s ease-in-out 3; }
.scene.draw.shuffle .g-deck .cback:nth-child(even) { animation:riffle-r .38s ease-in-out 3; }
.g-dealt { display:none; gap:12px; }
.scene.draw.dealt .g-deck, .scene.draw.still .g-deck { display:none; }
.scene.draw.dealt .g-dealt, .scene.draw.still .g-dealt { display:flex; }
.scene.draw.dealt .g-card { animation:deal-card .42s cubic-bezier(.2, .8, .3, 1.1) both; }
.scene.draw.dealt .g-card:nth-child(2) { animation-delay:.12s; }
.g-checks { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.g-checks li { padding:6px 10px; border-radius:999px; background:var(--panel); border:1px solid var(--soft); font-size:13px; opacity:.35; transition:opacity .25s, background .25s; }
.g-checks li b { color:var(--good); }
.g-checks li.on, .scene.still .g-checks li { opacity:1; }
.g-reward { margin:0; font-size:20px; font-weight:800; color:var(--good); opacity:0; transform:scale(.8); transition:opacity .3s, transform .3s; }
.scene.paid .g-reward, .scene.still .g-reward { opacity:1; transform:none; }
.scene.map { padding:0; gap:0; }
.guide-map { width:100%; height:260px; }
.scene.map .g-caption { padding:10px 12px; color:var(--text); font-weight:600; }
.g-stop { display:flex; align-items:center; gap:10px; font-size:18px; }
.g-stop .bp { font-style:normal; transition:all .3s; }
.g-stakes { width:min(100%, 300px); }
.g-stakes p { display:flex; align-items:center; gap:10px; margin:8px 0; font-weight:800; }
.g-stakes i { display:block; height:16px; width:0; border-radius:8px; transition:width .4s; }
.g-stakes .ta i { background:#226EAD; } .g-stakes .tb i { background:#C54B50; }
.g-points { display:flex; align-items:baseline; gap:8px; } .g-points b { font-size:56px; font-weight:800; font-variant-numeric:tabular-nums; }
.g-buy { padding:10px 16px; border-radius:16px; background:var(--panel); border:1px solid var(--soft); font-weight:700; transition:transform .25s, background .25s; }
.scene.points.buying .g-buy { transform:scale(1.08); background:var(--go-bg); color:var(--go-fg); }
.g-needle { position:relative; width:150px; height:150px; border-radius:50%; border:2px solid var(--line); }
.g-needle i { position:absolute; left:50%; top:12%; width:0; height:38%; transform-origin:50% 100%; transition:transform .8s cubic-bezier(.3, .7, .2, 1.2);
  border-left:12px solid transparent; border-right:12px solid transparent; border-bottom:60px solid var(--cool); margin-left:-12px; }
.scene.teams { flex-direction:row; gap:12px; }
.g-team { flex:1; max-width:160px; display:flex; flex-direction:column; gap:8px; padding:14px; border-radius:16px; background:var(--panel); border:2px solid var(--c); }
.g-team b { color:var(--c); } .g-team span { padding:8px; border-radius:10px; background:var(--bg); font-size:14px; }
.g-win { padding:18px 26px; border-radius:999px; background:var(--go-bg); color:var(--go-fg); font-size:20px; font-weight:800; animation:win-pulse 1.6s ease-in-out infinite; }
@keyframes win-pulse { 50% { transform:scale(1.06); } }
.guide-page #rules h3 { margin-top:22px; }
.guide-page #rules li { margin:6px 0; line-height:1.45; }
.omap, .guide-map, .scene.map { position:relative; isolation:isolate; z-index:0; }

/* One card size everywhere: in hands, offers, the draw animation, card pages and the guides (owner, 2026-10-17). */
:root { --card-w:clamp(108px, calc((100vw - 100px) / 2), 156px); }
.pcards, .rules-catalog.pcards { grid-template-columns:repeat(auto-fill, var(--card-w)); justify-content:center; }
button.pcard, .pcard, .pcard.solo, .rules-catalog.pcards .pcard { width:var(--card-w); max-width:none; justify-self:center; }
.pcard.solo { margin:4px auto 14px; }
.pcard.solo .pc-text { font-size:13px; }
.pcard { overflow:hidden; }
#deal .deal-card, #deal .dealt.n1 .deal-card, .g-card, .g-card.solo { width:var(--card-w); }
.pcard.sel { outline:3px solid var(--k); outline-offset:2px; }
/* The draw scene keeps one height from the shuffle to the flip, so the box never grows halfway through. */
.scene.draw { height:calc(var(--card-w) * 1.4 + 44px); min-height:0; box-sizing:border-box; }

/* Board pieces for the district board: bus stops and district names. */
.bp-label { position:absolute; transform:translate(-50%, -50%); white-space:nowrap; font:750 10.5px/1 var(--ui); letter-spacing:.02em; color:#41596E;
  text-shadow:0 0 3px #F4F1EA, 0 0 3px #F4F1EA, 0 0 2px #F4F1EA; pointer-events:none; }
.bp-label.open { color:#226EAD; } .bp-label.done { color:#17354D; }
:root[data-theme=night] .bp-label { color:#B9C7D3; text-shadow:0 0 3px #22262B, 0 0 3px #22262B; }
/* Zoomed out, small districts keep their names to themselves and stops shrink, so the middle of town stays readable. */
.leaflet-container:not(.zoomed) .bp-label.small { display:none; }
.qchip { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:8px; background:var(--c); opacity:.75; vertical-align:-1px; }
/* Everything on a card's face scales with the one card width, so nothing is clipped at any screen size. */
button.pcard, .pcard { padding:calc(var(--card-w) * .19) calc(var(--card-w) * .07) calc(var(--card-w) * .17); }
.pcard .pc-big { width:calc(var(--card-w) * .22); height:calc(var(--card-w) * .22); margin:0 0 calc(var(--card-w) * .04); }
.pcard .pc-kind { font-size:calc(var(--card-w) * .064); }
.pcard .pc-name { font-size:calc(var(--card-w) * .106); margin:calc(var(--card-w) * .04) 0 calc(var(--card-w) * .03); }
.pcard .pc-text, .pcard.solo .pc-text { font-size:calc(var(--card-w) * .08); line-height:1.35; }
.pcard .pc-foot { font-size:calc(var(--card-w) * .068); padding-top:calc(var(--card-w) * .03); }

/* Title screen: portrait game cards in a row, swiped (or wheeled) sideways one game at a time; no scrollbars. */
#home { scrollbar-width:none; } #home::-webkit-scrollbar { display:none; }
.home-modes { --gw:clamp(170px, min(62vw, calc((100dvh - 380px) * 5 / 7)), 250px); }
.home-modes, .modes.home-modes { padding-left:calc(50% + 24px - var(--gw) / 2); padding-right:calc(50% + 24px - var(--gw) / 2); scroll-padding:0; }   /* the end cards can sit in the middle too */
.poster .wip { position:absolute; top:18px; left:50%; transform:translateX(-50%); z-index:1; padding:5px 10px; border-radius:999px; background:#FFF4D6; color:#7A4B00;
  font:800 10px/1 var(--ui); letter-spacing:.1em; text-transform:uppercase; white-space:nowrap; box-shadow:0 2px 6px #0003; }
.home-modes .mode-choice { flex:0 0 auto; width:var(--gw); scroll-snap-align:center; }
.home-modes .poster, .home-modes button.poster { flex:none; width:var(--gw); height:calc(var(--gw) * 7 / 5); aspect-ratio:auto; }

/* Rules tab decks: one card at a time in the middle, the next ones peeking in at the sides. */
.deck { --card-w:min(68vw, 260px); margin:8px -24px 8px; }
.deck-track { display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain;
  padding:10px calc(50% - var(--card-w) / 2) 16px; }
.deck-track::-webkit-scrollbar { display:none; }
.deck-track .pcard { flex:none; scroll-snap-align:center; cursor:pointer; transition:transform .25s, opacity .25s; transform:scale(.92); opacity:.6; }
.deck-track .pcard.on { transform:none; opacity:1; cursor:default; }
.deck .pcard .pc-text, .card-zoom .pcard .pc-text { display:block; -webkit-line-clamp:none; overflow:visible; font-size:calc(var(--card-w) * .056); }
.deck .pcard .pc-note, .card-zoom .pcard .pc-note { display:block; margin-top:calc(var(--card-w) * .04); font-size:calc(var(--card-w) * .048); line-height:1.35; font-style:italic; color:#6B7F90; }
.deck .pcard .pc-name, .card-zoom .pcard .pc-name { font-size:calc(var(--card-w) * .085); }
.deck .pcard .pc-big, .card-zoom .pcard .pc-big { width:calc(var(--card-w) * .16); height:calc(var(--card-w) * .16); }
.deck .pcard, .card-zoom .pcard { padding-top:calc(var(--card-w) * .15); }
.deck-nav { display:flex; align-items:center; justify-content:center; gap:18px; }
.deck-nav button { width:40px; height:40px; padding:0; border-radius:50%; font-size:22px; line-height:1; }
.deck-nav button:disabled { opacity:.3; }
.deck-count { min-width:64px; text-align:center; font-variant-numeric:tabular-nums; color:var(--dim); font-size:14px; }
@media (prefers-reduced-motion: reduce) { .deck-track .pcard { transition:none; } }

/* The menu: a small profile row (its page has the details), then the game's settings up front. */
.me-row { display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px; margin:0 0 14px; text-align:left; border-radius:14px; }
.me-row .av { width:36px; height:36px; font-size:18px; flex:none; }
.me-row b { flex:1; font-size:16px; } .me-row .chev { color:var(--dim); font-size:20px; }
.game-settings { display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%; text-align:left; margin:0 0 14px; padding:16px 18px; }
.game-settings b { font-size:17px; } .game-settings small { font-weight:500; opacity:.85; }

/* Rules tab: the three map sizes, one at a time. */
.size-view { margin:10px 0 6px; }
.size-view .seg { display:flex; gap:6px; margin-bottom:10px; }
.size-view .seg button { flex:1; padding:9px 0; border-radius:999px; font-weight:700; }
.size-view .seg button[aria-selected=true] { background:var(--text); color:var(--bg); border-color:var(--text); }
.size-map { border-radius:14px; overflow:hidden; }

/* A challenge deck's page: the full rules, specifics and fun fact for the card in the middle. */
.deck-pages { display:none; margin:10px 24px 0; padding:14px 16px; border-radius:14px; background:var(--panel); border:1px solid var(--soft); }
.deck-page p { margin:0 0 8px; line-height:1.45; } .deck-page p:last-child { margin-bottom:0; }
.deck .pcard .pc-foot, .card-zoom .pcard .pc-foot { font-size:calc(var(--card-w) * .05); }

/* Challenge cards: long punny titles get a smaller line so they fit in two. */
.pcard.long .pc-name { font-size:calc(var(--card-w) * .082); }
/* What a challenge reveals once started: the secret object, the destination, the riddle, the quiz. */
.reveal { margin:10px 0; padding:12px 14px; border-radius:12px; background:color-mix(in srgb, #B4611E 10%, var(--panel)); border:1px dashed #B4611E; }
.reveal ol { margin:6px 0 0; padding-left:20px; } .reveal li { margin:3px 0; font-weight:650; }
.reveal > b { display:block; font-size:28px; margin-top:4px; }
.reveal .answers li { font-weight:400; }
.label.warn { color:#C54B50; }
.deck .pcard .pc-name, .card-zoom .pcard .pc-name { -webkit-line-clamp:3; }
.deck .pcard.long .pc-name, .card-zoom .pcard.long .pc-name { font-size:calc(var(--card-w) * .07); }

/* Wild cards (playable in any district) carry a gold frame. The colour-word test prints each word in another ink. */
.pcard.wild::before { border-color:#C9A227; border-style:dashed; }
.reveal.stroop { display:flex; flex-wrap:wrap; gap:6px 12px; font-size:20px; letter-spacing:.02em; background:#FFFFFF; }
.reveal.stroop b { --ink-red:#D0312D; --ink-blue:#1E5AA8; --ink-green:#1E7B34; --ink-yellow:#C9A000; --ink-purple:#6B3FA0; --ink-orange:#E06A10; }

/* the drawing pad (app.js padOpen): a white page over everything, tools above and below */
.pad { position:fixed; inset:0; z-index:60; display:flex; flex-direction:column; background:var(--bg); padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.pad-bar { display:flex; align-items:center; gap:6px; padding:8px 10px; flex-wrap:wrap; background:var(--panel); border-bottom:2px solid var(--line); }
.pad-bar:last-child { border-bottom:0; border-top:2px solid var(--line); }
.pad-bar button { padding:8px 12px; }
.pad-bar button.on { background:var(--go-bg); color:var(--go-fg); border-color:var(--go-bg); }
.pad-bar .spacer { flex:1; }
.pad-ink { width:44px; padding:0 !important; background:var(--c) !important; border-color:var(--line); }
.pad-ink.on { outline:3px solid var(--line); outline-offset:2px; }
.pad-sheet { flex:1; min-height:0; width:100%; background:#FFFFFF; touch-action:none; cursor:crosshair; display:block; }

/* a deck card's details (cards.js openCard): a plain fade in the middle of the screen */
.deck-hint { margin:6px 0 0; text-align:center; font-size:13px; color:var(--dim); }
.deck-track .pcard.on { cursor:pointer; }
.card-zoom { position:fixed; inset:0; z-index:70; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:16px;
  background:rgba(10, 15, 12, .66); opacity:0; transition:opacity .16s ease-out; cursor:pointer; }
.card-zoom.open { opacity:1; }
.cz-back { --card-w:min(84vw, 340px); width:var(--card-w); min-height:calc(var(--card-w) * 1.4); max-height:calc(100dvh - 90px); overflow-y:auto;
  overscroll-behavior:contain; outline:none; box-sizing:border-box; cursor:default;
  padding:calc(var(--card-w) * .1) calc(var(--card-w) * .08) calc(var(--card-w) * .08); text-align:left; position:relative;
  background:#FFFFFF; color:#17354D; border:1px solid #D4E1EB; border-radius:14px; box-shadow:0 18px 50px #0006; --k:#226EAD; }
.cz-back.k-power { --k:#226EAD; } .cz-back.k-curse { --k:#6B3FC4; } .cz-back.k-challenge { --k:#B4611E; }
.cz-back::before { content:''; position:absolute; inset:6px; border:1.5px solid color-mix(in srgb, var(--k) 30%, transparent); border-radius:9px; pointer-events:none; }
.cz-back .pc-kind { display:block; font:700 11px/1 var(--ui); letter-spacing:.14em; text-transform:uppercase; color:var(--k); }
.cz-back.wild .pc-kind::after { content:' · Wild card'; }
.cb-name { display:block; font:800 21px/1.15 var(--ui); margin:8px 0 12px; color:#17354D; }
.cb-rules { margin:0 0 14px; font-size:15.5px; line-height:1.5; }
.cb-specs { display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:0 0 14px; padding:12px 0; border-top:1px solid #E3EAF0; border-bottom:1px solid #E3EAF0; font-size:14px; }
.cb-specs div { display:contents; }
.cb-specs dt { font:700 11px/1.6 var(--ui); letter-spacing:.08em; text-transform:uppercase; color:var(--k); white-space:nowrap; }
.cb-specs dd { margin:0; color:#41596E; line-height:1.4; }
.cb-fact { margin:0 0 12px; padding:10px 12px; border-radius:10px; background:color-mix(in srgb, var(--k) 9%, #FFFFFF); font-size:14px; line-height:1.45; color:#2C465C; }
.cb-fact b { display:block; font:700 11px/1.4 var(--ui); letter-spacing:.08em; text-transform:uppercase; color:var(--k); margin-bottom:2px; }
.cb-fact a { color:var(--k); font-weight:650; }
.cb-note { margin:0; font-size:13.5px; font-style:italic; color:#5F7488; line-height:1.4; }
.cz-hint { margin:0; font-size:13px; color:#FFFFFFB0; }
@media (prefers-reduced-motion: reduce) { .card-zoom { transition:none; } }
