/* Fathom Golems — the Golem games look: dark panels, italic yellow display type, big round touch buttons. */
:root {
  --bg: #06121a; --panel: #0f2029; --panel2: #152b36; --line: #24414e;
  --text: #eef5f4; --muted: #8aa6ad; --accent: #ffd23f; --accent2: #3ee08f; --danger: #ff5a5f; --blue: #4a9dff; --spark: #5ab8ff; --glow: #ff7ad9; --orange: #ff8a2a; --violet: #a98bff; --brass: #c9a86a;
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px); --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
canvas#game, canvas#over { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
canvas#over { pointer-events: none; z-index: 2; }
.hidden { display: none !important; }
.h { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.box { background: rgba(5, 14, 18, .82); border: 1px solid #ffffff22; border-radius: 12px; box-shadow: 0 6px 20px #0008; }

/* ------------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#hud .ui { pointer-events: auto; }
.vig { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s; }
.vit { position: absolute; left: calc(10px + var(--sl)); top: calc(8px + var(--st)); display: flex; gap: 8px; align-items: center; padding: 5px 10px 5px 5px; }
.vit canvas { width: 38px; height: 38px; border-radius: 9px; flex: 0 0 38px; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar { position: relative; width: 150px; height: 10px; border-radius: 5px; background: #00000080; overflow: hidden; border: 1px solid #ffffff1a; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; transition: width .15s; }
.bar:after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 14px, #0008 14px 15px); }
.bar.hp i { background: linear-gradient(180deg, #ff8a8d, #d0303a); }
.bar.sp i { background: linear-gradient(180deg, #9cd8ff, #2f7ae0); box-shadow: 0 0 8px #4a9dff; }
.bar.air i { background: linear-gradient(180deg, #d8f6ff, #5ac8e8); }
.bar.low i { animation: blink .5s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.pills { display: flex; gap: 6px; margin-top: 1px; }
.pills span { font-size: 10px; font-weight: 900; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.pills b { font-style: italic; }
.pills .gl { color: var(--glow); } .pills .sh { color: var(--accent); } .pills .kit { color: #ff8a8d; } .pills .via { color: var(--spark); } .pills .ai { color: #9ce8ff; }
.pills .kit, .pills .via { cursor: pointer; padding: 0 2px; }
.comp { position: absolute; left: 50%; top: calc(8px + var(--st)); transform: translateX(-50%); width: min(340px, 42vw); height: 30px; overflow: hidden; border-radius: 9px; background: rgba(5, 14, 18, .72); border: 1px solid #ffffff22; }
.comp .tk { position: absolute; top: 4px; font-size: 10px; font-weight: 900; color: var(--muted); transform: translateX(-50%); }
.comp .tk.n { color: var(--accent); }
.comp .mk { position: absolute; bottom: 3px; transform: translateX(-50%) rotate(45deg); width: 9px; height: 9px; border-radius: 2px; }
.comp .mk small { position: absolute; }
.comp:after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: translateX(-50%); }
.obj { position: absolute; left: 50%; top: calc(44px + var(--st)); transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: rgba(5, 14, 18, .82); border: 1px solid #ffd23f66; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; }
.obj b { color: var(--accent); font-style: italic; } .obj em { color: var(--muted); font-style: normal; }
.obj:empty { display: none; }
.where { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity .6s; pointer-events: none; }
.where b { display: block; font-size: 26px; font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--accent); text-shadow: 0 3px 0 #000a, 0 0 20px #000; }
.where small { display: block; font-size: 10px; font-weight: 900; letter-spacing: .3em; color: var(--muted); margin-top: 4px; text-shadow: 0 1px 2px #000; }
.where.on { opacity: 1; }
.tbtn { position: absolute; right: calc(10px + var(--sr)); top: calc(8px + var(--st)); display: flex; gap: 6px; }
.mb { width: 40px; height: 40px; border-radius: 11px; border: 1px solid #ffffff2a; background: rgba(5, 14, 18, .82); display: grid; place-items: center; font-weight: 900; font-size: 13px; position: relative; cursor: pointer; }
.mb small { position: absolute; bottom: -11px; font-size: 8px; letter-spacing: .1em; color: var(--muted); }
.chip2 { position: absolute; right: calc(10px + var(--sr)); display: flex; align-items: center; gap: 7px; padding: 4px 9px 4px 4px; border-radius: 12px; background: rgba(5, 14, 18, .82); border: 1px solid #ffffff22; cursor: pointer; min-width: 150px; }
#h-wchip { top: calc(62px + var(--st)); } #h-schip { top: calc(114px + var(--st)); }
.chip2 canvas { width: 46px; height: 32px; border-radius: 7px; background: #ffffff0a; }
.chip2 .nm { font-size: 10.5px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; }
.chip2 .am { font-size: 16px; font-weight: 900; font-style: italic; line-height: 1.05; font-variant-numeric: tabular-nums; }
.chip2 .am small { font-size: 11px; color: var(--muted); }
.chip2 .ty { font-size: 8.5px; font-weight: 900; letter-spacing: .1em; color: var(--accent); }
.chip2.sg { border-color: #5ab8ff66; } .chip2.sg .ty { color: var(--spark); }
.chip2 kbd, .use kbd, kbd { font-family: inherit; font-size: 9.5px; font-weight: 900; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 5px; padding: 1px 5px; margin-left: 2px; }
.crack { position: absolute; right: calc(12px + var(--sr)); top: calc(162px + var(--st)); font-size: 9.5px; font-weight: 900; letter-spacing: .1em; color: var(--muted); display: flex; gap: 3px; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(5, 14, 18, .8); border: 1px solid #ffffff1c; }
.crack i { width: 8px; height: 12px; border-radius: 2px; background: #ffffff18; } .crack i.on { background: var(--glow); box-shadow: 0 0 6px var(--glow); }
.feed { position: absolute; left: calc(10px + var(--sl)); top: calc(70px + var(--st)); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 46vw; }
.feed div { font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 999px; background: rgba(5, 14, 18, .8); border: 1px solid #ffffff1c; white-space: nowrap; animation: feedin .25s; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.feed div small { color: var(--muted); font-size: 9px; letter-spacing: .1em; margin-left: 6px; }
.feed .g { color: var(--accent2); } .feed .p { color: var(--glow); } .feed .y { color: var(--accent); } .feed .bl { color: var(--spark); } .feed .r { color: #ff8a8d; } .feed .m { color: var(--muted); }
@keyframes feedin { from { transform: translateX(-20px); opacity: 0; } }
.radio { position: absolute; left: 50%; bottom: calc(14px + var(--sb)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; width: min(560px, 60vw); }
.radio canvas { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px; }
.radio div { font-size: 12px; font-weight: 700; line-height: 1.3; color: #dfe9e3; }
.radio div b { display: block; font-size: 9px; font-weight: 900; letter-spacing: .14em; color: #7ff0d0; }
.hint { position: absolute; left: calc(10px + var(--sl)); bottom: calc(150px + var(--sb)); font-size: 11.5px; font-weight: 700; line-height: 1.3; background: rgba(5, 14, 18, .92); border: 1.5px solid var(--spark); border-radius: 11px; padding: 6px 10px; max-width: 260px; box-shadow: 0 8px 20px #000a; }
.hint .k { display: block; font-size: 9px; font-weight: 900; letter-spacing: .14em; color: var(--spark); margin-bottom: 2px; }
.boss { position: absolute; left: 50%; top: calc(72px + var(--st)); transform: translateX(-50%); width: min(420px, 50vw); text-align: center; }
.boss b { font-size: 13px; font-weight: 900; font-style: italic; text-transform: uppercase; color: #ffd27a; text-shadow: 0 2px 4px #000; }
.bbar { height: 9px; border-radius: 5px; background: #0009; border: 1px solid #ffffff33; overflow: hidden; margin-top: 3px; } .bbar i { display: block; height: 100%; background: linear-gradient(180deg, #ff8a8d, #d0303a); transition: width .2s; }
.wave { position: absolute; left: 50%; top: calc(72px + var(--st)); transform: translateX(-50%); font-size: 12px; font-weight: 900; padding: 4px 12px; border-radius: 999px; background: rgba(5, 14, 18, .85); border: 1px solid var(--accent); white-space: nowrap; }
.wave b { color: var(--accent); font-style: italic; }
.use { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(5, 14, 18, .88); border: 1.5px solid var(--accent); white-space: nowrap; cursor: pointer; }
.use i { min-width: 26px; height: 26px; border-radius: 13px; background: var(--accent); color: #241900; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 11px; padding: 0 5px; }
.use span { font-size: 12px; font-weight: 900; } .use em { font-size: 10px; color: var(--muted); font-style: normal; font-weight: 800; letter-spacing: .06em; }
.use.dead { border-color: var(--danger); } .use.dead i { background: var(--danger); color: #fff; }
.xh { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); }
.xh:before, .xh:after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 3px #000; }
.xh:before { left: 14px; top: 6px; width: 2px; height: 18px; } .xh:after { top: 14px; left: 6px; height: 2px; width: 18px; }
.xh i { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #ffffff44; transition: inset .1s, border-color .1s; }
.xh.hit i { border-color: #ff5a5f; inset: -9px; } .xh.ally i { border-color: var(--accent2); } .xh.target i { border-color: #ffd23f; }
.stick { position: absolute; left: calc(26px + var(--sl)); bottom: calc(22px + var(--sb)); width: 112px; height: 112px; border-radius: 50%; border: 2px solid #ffffff30; background: radial-gradient(circle, #ffffff0c, #ffffff04); }
.stick i { position: absolute; left: 33px; top: 33px; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffffffcc, #c8d8dc99); box-shadow: 0 4px 10px #0008; }
.rb { position: absolute; border-radius: 50%; display: grid; place-items: center; text-align: center; font-weight: 900; font-style: italic; text-transform: uppercase; box-shadow: 0 6px 14px #000a; align-content: center; cursor: pointer; }
.fstick { position: absolute; right: calc(18px + var(--sr)); bottom: calc(18px + var(--sb)); width: 88px; height: 88px; border-radius: 50%; background: rgba(5, 14, 18, .45); border: 2px dashed #fff3b055; }
.fstick .fz { position: absolute; left: 50%; bottom: calc(100% - 4px); transform: translateX(-50%); font-size: 9px; z-index: 1; font-weight: 900; font-style: italic; letter-spacing: .1em; color: #ffe98a; padding: 3px 9px; border-radius: 999px; background: rgba(5, 14, 18, .75); border: 1px solid #ffe98a66; white-space: nowrap; pointer-events: none; transition: background .08s, color .08s; }
.fstick.hot .fz { background: #ffd23f; color: #241900; border-color: #fff3b0; box-shadow: 0 0 16px #ffd23faa; }
.fstick .rb.fire { left: -2px; top: -2px; pointer-events: none; transition: box-shadow .08s; }
.fstick.on .rb.fire { filter: brightness(1.12); }
.fstick.hot .rb.fire { box-shadow: 0 0 0 4px #ffffffaa, 0 0 26px #ffd23f; filter: brightness(1.3); }
.rb.fire { width: 88px; height: 88px; background: radial-gradient(circle at 40% 30%, #ffe98a, #f0b400 70%); color: #241900; border: 3px solid #fff3b0; font-size: 17px; }
.rb.fire small, .rb.sig small { display: block; font-size: 8px; letter-spacing: .1em; font-style: normal; opacity: .7; }
.rb.sig { right: calc(116px + var(--sr)); bottom: calc(34px + var(--sb)); width: 66px; height: 66px; background: radial-gradient(circle at 40% 30%, #9cd8ff, #2457b0 72%); border: 3px solid #cfe9ff; color: #fff; font-size: 12px; box-shadow: 0 0 18px #4a9dffaa, 0 6px 14px #000a; }
.rb.sm { width: 48px; height: 48px; background: rgba(5, 14, 18, .82); border: 2px solid #ffffff33; font-size: 9.5px; color: var(--text); }
#b-jump { right: calc(30px + var(--sr)); bottom: calc(118px + var(--sb)); }
#b-reload { right: calc(128px + var(--sr)); bottom: calc(112px + var(--sb)); }
#b-crouch { right: calc(196px + var(--sr)); bottom: calc(20px + var(--sb)); }
.rb.down { filter: brightness(1.3); transform: scale(.94); } #b-crouch.on { border-color: var(--accent); color: var(--accent); }
body.desk .stick, body.desk .rb, body.desk .fstick { display: none; }
body.desk .use i { font-size: 11px; }
.wheel { position: absolute; left: 50%; top: 52%; width: 290px; height: 290px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #06121af0 34%, #0f2029e8 35%, #0f2029e0 70%, transparent 71%); pointer-events: auto; }
.wheel .ws { position: absolute; width: 58px; height: 58px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--panel2); border: 2px solid var(--line); display: grid; place-items: center; }
.wheel .ws canvas { width: 44px; height: 44px; }
.wheel .ws.sel { border-color: var(--accent); box-shadow: 0 0 0 4px #ffd23f33, 0 0 16px #ffd23f88; background: #2a2a10; }
.wheel .ws.lk { opacity: .35; }
.wheel .mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 150px; text-align: center; }
.wheel .mid b { display: block; font-size: 18px; color: var(--accent); line-height: 1; font-style: italic; text-transform: uppercase; font-weight: 900; }
.wheel .mid small { display: block; font-size: 9px; font-weight: 900; letter-spacing: .12em; color: var(--spark); margin: 3px 0 4px; }
.wheel .mid span { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.wheel .lab { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 10px; font-weight: 900; letter-spacing: .16em; color: var(--muted); white-space: nowrap; }
.fps { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-weight: 700; }

/* ------------------------------------------------------------------ sheets: shops, map, pause, the hack, the choice */
#sheet { position: fixed; inset: 0; z-index: 10; background: rgba(4, 12, 16, .78); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: calc(10px + var(--st)) calc(10px + var(--sr)) calc(10px + var(--sb)) calc(10px + var(--sl)); }
.pane { width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, #102430, #0a1820); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px #000c; overflow: hidden; }
.pane.wide { width: min(980px, 100%); }
.ph { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ph .x { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); font-weight: 900; cursor: pointer; flex: 0 0 38px; }
.ph .ttl { font-size: 17px; line-height: 1; } .ph small { display: block; font-size: 9.5px; font-weight: 900; color: var(--muted); letter-spacing: .12em; margin-top: 3px; }
.ph .bank { margin-left: auto; text-align: right; font-weight: 900; font-style: italic; font-size: 16px; line-height: 1.1; }
.ph .bank small { font-style: normal; }
.pb { padding: 10px 12px 12px; overflow: auto; flex: 1; }
.tabs { display: flex; gap: 5px; margin-bottom: 10px; }
.tabs div { flex: 1; text-align: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 2px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.tabs div.sel { background: var(--accent); color: #1a1400; border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 7px; }
.sc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; gap: 8px; align-items: center; position: relative; cursor: pointer; }
.sc canvas { width: 48px; height: 48px; border-radius: 10px; flex: 0 0 48px; background: #06121a; }
.sc .nm { font-size: 12.5px; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1.05; }
.sc .ds { font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.sc .pr { font-size: 10.5px; font-weight: 900; color: var(--glow); margin-top: 3px; }
.sc .pr.y { color: var(--accent); } .sc .pr.g { color: var(--accent2); } .sc .pr.m { color: var(--muted); } .sc .pr.s { color: #c8ccd0; }
.sc.sel { border-color: var(--accent); background: #2a2a10; } .sc.on { border-color: var(--accent2); } .sc.lk { opacity: .5; }
.sc .eq { position: absolute; right: 6px; top: 6px; font-size: 9px; font-weight: 900; letter-spacing: .1em; color: var(--accent2); }
.lv { display: flex; gap: 2px; margin-top: 3px; } .lv i { width: 12px; height: 4px; border-radius: 2px; background: #ffffff1a; } .lv i.on { background: var(--spark); }
.row { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.btn { flex: 1; min-width: 110px; text-align: center; font-size: 12.5px; font-weight: 900; font-style: italic; text-transform: uppercase; padding: 11px 6px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.btn small { display: block; font-size: 8.5px; letter-spacing: .1em; color: var(--accent); font-style: normal; margin-top: 2px; }
.btn.y { background: linear-gradient(180deg, #ffe066, #f0b400); color: #241900; border: 0; } .btn.y small { color: #5a4a00; }
.btn.r { border-color: #ff5a5f88; color: #ff9a9d; }
.btn.off { opacity: .45; pointer-events: none; }
.note { font-size: 11.5px; color: var(--muted); font-weight: 700; line-height: 1.4; }
.note b { color: var(--accent); }
.err { color: #ff8a8d; font-size: 11.5px; font-weight: 900; margin-top: 6px; } .err:empty { display: none; }
.lbl { font-size: 11px; font-weight: 900; color: var(--muted); letter-spacing: .14em; margin: 4px 0 8px; text-transform: uppercase; display: flex; justify-content: space-between; }
.lbl b { color: var(--accent); letter-spacing: .06em; }
.tray { display: flex; gap: 6px; margin-bottom: 10px; }
.tray div { flex: 1; height: 46px; border-radius: 10px; border: 1.5px dashed #ffffff2a; display: grid; place-items: center; background: #ffffff06; font-size: 9px; font-weight: 900; color: var(--muted); }
.tray div canvas { width: 34px; height: 34px; } .tray div.f { border-style: solid; border-color: var(--line); background: var(--panel2); }
.list { display: flex; flex-direction: column; gap: 5px; }
.li { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; cursor: pointer; }
.li canvas { width: 30px; height: 30px; flex: 0 0 30px; }
.li span { flex: 1; } .li em { font-style: normal; font-size: 11px; font-weight: 900; color: var(--accent); white-space: nowrap; } .li.off { opacity: .45; } .li.cur { outline: 2px solid var(--accent); }
.li small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.mapwrap { position: relative; display: flex; gap: 10px; align-items: flex-start; }
.mapwrap canvas { border-radius: 12px; border: 1px solid var(--line); touch-action: none; }
.mapside { flex: 1; min-width: 200px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 10.5px; font-weight: 800; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.hackbox { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.hackbox canvas { border-radius: 12px; touch-action: none; cursor: pointer; }
.hackhd { display: flex; align-items: center; gap: 10px; }
.hackhd .tm { margin-left: auto; text-align: right; font-size: 22px; font-weight: 900; font-style: italic; color: var(--glow); line-height: 1; }
.hackhd .tm small { display: block; font-size: 8.5px; letter-spacing: .12em; color: var(--muted); font-style: normal; }
.choice { position: fixed; inset: 0; z-index: 11; }
.choice > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ch { position: absolute; bottom: calc(18px + var(--sb)); width: min(230px, 32vw); padding: 12px; border-radius: 16px; text-align: center; cursor: pointer; }
.ch b { display: block; font-size: 24px; line-height: 1; font-weight: 900; font-style: italic; text-transform: uppercase; }
.ch small { display: block; font-size: 10px; font-weight: 900; letter-spacing: .1em; margin-top: 4px; }
.ch span { display: block; font-size: 11px; font-weight: 700; margin-top: 5px; line-height: 1.3; }
.ch.rel { left: calc(24px + var(--sl)); background: linear-gradient(180deg, #1d6a46, #0e3a26); border: 2px solid #7dffb8; box-shadow: 0 0 24px #3ee08f66, 0 8px 20px #000a; } .ch.rel b { color: #d8ffe8; } .ch.rel small { color: #7dffb8; } .ch.rel span { color: #bfe8d0; }
.ch.drn { right: calc(24px + var(--sr)); background: linear-gradient(180deg, #6a1a3a, #3a0a1e); border: 2px solid #ff7ad9; box-shadow: 0 0 24px #ff7ad966, 0 8px 20px #000a; } .ch.drn b { color: #ffe0f4; } .ch.drn small { color: #ff9ae0; } .ch.drn span { color: #f0c0d8; }
.ch i { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: #06121a; border: 1px solid currentColor; white-space: nowrap; }
.ch.rel i { color: #7dffb8; } .ch.drn i { color: #ff9ae0; }
.choice .radio { position: absolute; top: calc(12px + var(--st)); bottom: auto; transform: none; width: min(320px, 44vw); }
.choice .radio.l { left: calc(14px + var(--sl)); } .choice .radio.r { right: calc(14px + var(--sr)); left: auto; flex-direction: row-reverse; text-align: right; }
.choice .cnt { position: absolute; left: 50%; bottom: calc(22px + var(--sb)); transform: translateX(-50%); padding: 5px 12px; font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--muted); white-space: nowrap; }
.choice .cancel { position: absolute; left: 50%; bottom: calc(52px + var(--sb)); transform: translateX(-50%); font-size: 11px; font-weight: 900; color: var(--muted); padding: 6px 12px; cursor: pointer; }
.stat { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 8px 0; }
.stat div { background: var(--panel2); border-radius: 10px; padding: 8px; text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 900; font-style: italic; color: var(--accent); }
.stat small { font-size: 9px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.big { font-size: 30px; line-height: 1; text-align: center; margin: 6px 0 2px; color: var(--accent); }
.echo { background: var(--panel2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; border-left: 3px solid var(--glow); }
.echo b { display: block; font-size: 13px; font-style: italic; } .echo small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.echo p { font-size: 12.5px; line-height: 1.45; margin-top: 4px; color: #dfe9e3; font-weight: 600; }
.set { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #ffffff10; font-size: 12.5px; font-weight: 800; }
.set span { flex: 1; } .set input[type=range] { width: 160px; accent-color: var(--accent); }
.set .tg { padding: 6px 12px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; font-weight: 900; font-size: 11px; min-width: 60px; text-align: center; }
.set .tg.on { background: var(--accent); color: #241900; border-color: var(--accent); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; font-size: 12px; font-weight: 700; color: var(--muted); align-items: center; }

/* ------------------------------------------------------------------ menu */
#menu { position: fixed; inset: 0; z-index: 20; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; }
#m-back { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
#menu .wrap { position: relative; padding: calc(12px + var(--st)) 16px calc(16px + var(--sb)); max-width: 540px; margin: 0 auto; }
.logo { text-align: center; margin: 0 0 8px; }
.logo svg { display: block; margin: 0 auto 2px; }
.logo .t1, .logo .t2 { font-size: 38px; line-height: .9; text-shadow: 0 4px 0 #0008; } .logo .t2 { color: var(--accent); }
.logo .sub2 { color: var(--muted); font-size: 11px; letter-spacing: .3em; margin-top: 6px; }
.card { background: rgba(15, 32, 41, .92); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.cont { display: flex; align-items: center; gap: 10px; background: #2a2a10; border: 2px solid var(--accent); border-radius: 12px; padding: 4px 10px 4px 4px; cursor: pointer; }
.cont canvas { width: 74px; height: 62px; border-radius: 8px; flex: 0 0 74px; }
.cont .nm { font-weight: 900; font-size: 14px; font-style: italic; } .cont .ds { font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 1px; }
.cont .pg { height: 6px; border-radius: 3px; background: #ffffff18; margin-top: 6px; overflow: hidden; width: 150px; } .cont .pg i { display: block; height: 100%; background: var(--accent2); }
.cont .play { margin-left: auto; font-size: 13px; color: var(--accent); white-space: nowrap; }
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; } .chips.c4 { grid-template-columns: repeat(4, 1fr); } .chips.c3 { grid-template-columns: repeat(3, 1fr); }
.chip { text-align: center; background: var(--panel2); border: 1px solid var(--line); padding: 9px 2px 8px; border-radius: 10px; font-size: 13px; cursor: pointer; font-weight: 900; font-style: italic; text-transform: uppercase; }
.chip small { display: block; font-size: 8.5px; font-weight: 900; letter-spacing: .06em; color: var(--muted); font-style: normal; margin-top: 2px; text-transform: none; }
.chip.sel { background: var(--accent); color: #1a1400; border-color: var(--accent); } .chip.sel small { color: #5a4a00; }
.htxt { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; font-weight: 600; } .htxt b { color: var(--accent); }
.go { display: block; width: 100%; padding: 13px; border-radius: 14px; background: linear-gradient(180deg, #ffe066, #f0b400); color: #241900; font-size: 20px; box-shadow: 0 8px 20px #f0b40044; text-align: center; margin-top: 4px; cursor: pointer; }
.btnrow { display: flex; gap: 7px; margin-top: 8px; }
.foot { text-align: center; color: var(--muted); font-size: 10.5px; font-weight: 700; margin-top: 10px; letter-spacing: .04em; }
.ggs-foot { text-align: center; margin-top: 8px; } .ggs-foot a { color: var(--muted); font-size: 10.5px; font-weight: 800; text-decoration: none; letter-spacing: .1em; }
.ext { margin-top: 8px; }

/* ------------------------------------------------------------------ loading / arrival */
.loading { position: fixed; inset: 0; z-index: 30; background: #04121a; }
.loading canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lcap { position: absolute; left: 50%; bottom: calc(26px + var(--sb)); transform: translateX(-50%); text-align: center; width: min(360px, 80vw); }
.lcap .h { font-size: 20px; color: var(--accent); text-shadow: 0 2px 0 #000; }
.lcap .bar { width: 100%; margin: 8px auto 4px; height: 8px; } .lcap .bar i { background: linear-gradient(90deg, #ffd23f, #ff9a4a); width: 0; }
.ltip { font-size: 11px; color: var(--muted); font-weight: 700; }
.loading .sub { position: absolute; left: 50%; top: calc(16px + var(--st)); transform: translateX(-50%); width: min(620px, 90vw); text-align: left; font-size: 13px; font-weight: 700; line-height: 1.4; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .55); }
.loading .sub b { display: block; font-size: 9px; letter-spacing: .14em; color: #7ff0d0; }
.skip { position: absolute; right: calc(14px + var(--sr)); bottom: calc(14px + var(--sb)); padding: 8px 14px; border-radius: 11px; background: rgba(5, 14, 18, .82); border: 1px solid #ffffff2a; font-size: 11px; font-weight: 900; cursor: pointer; }
.turn { position: fixed; inset: 0; z-index: 40; background: #04121aee; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; }
.turn div { font-size: 54px; color: var(--accent); animation: spin 2s ease-in-out infinite; } .turn b { font-size: 20px; } .turn span { color: var(--muted); font-size: 12px; font-weight: 700; }
.turn .ok { margin-top: 10px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); cursor: pointer; }
@keyframes spin { 50% { transform: rotate(90deg); } }

@media (max-height: 420px) {
  .vit canvas { width: 32px; height: 32px; flex-basis: 32px; } .bar { width: 120px; height: 8px; }
  .chip2 { min-width: 0; } #h-wchip { top: calc(54px + var(--st)); } #h-schip { top: calc(100px + var(--st)); } .crack { top: calc(144px + var(--st)); }
  .fstick, .rb.fire { width: 80px; height: 80px; } .rb.sig { width: 60px; height: 60px; right: calc(108px + var(--sr)); }
  .stick { width: 100px; height: 100px; } .stick i { left: 27px; top: 27px; }
  .radio { left: calc(124px + var(--sl)); transform: none; width: min(440px, calc(100vw - 380px - var(--sl) - var(--sr))); bottom: calc(8px + var(--sb)); } .radio div { font-size: 11px; }
  .choice .radio { width: min(300px, 40vw); }
  .hint { bottom: calc(132px + var(--sb)); max-width: 230px; font-size: 10.5px; }
  .feed div:nth-child(n+4) { display: none; }
  .mb small { display: none; }
  .pane { border-radius: 14px; } .ph { padding: 6px 10px; } .pb { padding: 8px 10px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .comp { width: 46vw; } .chip2 { min-width: 0; } .bar { width: 110px; }
  .radio { width: 92vw; bottom: calc(150px + var(--sb)); }
}
body:has(.choice) #h-radio, body:has(.choice) #h-hint, body:has(.choice) .feed { display: none; }

/* ------------------------------------------------------------------ playing together */
#m-mp .mprow { display: flex; gap: 7px; margin-top: 7px; }
#m-mp input { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; font-weight: 800; font-size: 14px; padding: 9px 10px; outline: none; -webkit-user-select: text; user-select: text; }
#m-mp input:focus { border-color: var(--accent); }
#m-code { text-transform: uppercase; letter-spacing: .3em; font-style: italic; }
#m-mp .btn { flex: 0 0 112px; }
#m-mp .note { margin-top: 7px; } #m-mp .note.bad { color: #ff8a8d; }
.lobby .code { text-align: center; font-size: 46px; letter-spacing: .3em; color: var(--accent); margin: 2px 0 6px; text-shadow: 0 0 18px #ffd23f55; }
.lobby .pl span i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.lobby .chips { margin-bottom: 6px; }
.party { position: absolute; right: calc(10px + var(--sr)); top: calc(192px + var(--st)); display: flex; flex-direction: column; gap: 3px; align-items: flex-end; pointer-events: none; }
.party div { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; background: rgba(5, 14, 18, .78); border: 1px solid #ffffff1c; font-size: 10.5px; font-weight: 900; }
.party div i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.party div em { font-style: normal; color: var(--muted); font-size: 9.5px; letter-spacing: .06em; }
.party div u { display: block; width: 38px; height: 4px; border-radius: 2px; background: #ffffff22; overflow: hidden; text-decoration: none; } .party div u b { display: block; height: 100%; background: #ff5a5f; }
.party div.down { opacity: .55; } .party div.me { border-color: #ffffff55; }
.party .vt { color: var(--accent); letter-spacing: .1em; font-size: 9.5px; }
.board { width: 100%; border-collapse: collapse; margin: 6px 0; font-weight: 900; }
.board td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 13px; } .board td:nth-child(n+2) { text-align: right; color: var(--muted); } .board tr.win td:first-child { color: var(--accent); }
@media (max-height: 420px) { .party { top: calc(172px + var(--st)); } .lobby .code { font-size: 34px; } }
#sheet.top { z-index: 25; }
@media (max-height: 420px) { .party { top: calc(76px + var(--st)); right: auto; left: 50%; transform: translateX(-50%); flex-direction: row; } }
#m-qp .chip.off { opacity: .45; pointer-events: none; }
#m-servers { max-height: 168px; overflow-y: auto; }
#m-servers .li span { flex: 1; min-width: 0; } #m-servers .li small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#m-servers .li em { font-style: normal; color: var(--accent); font-size: 12px; } #m-servers .li.off { opacity: .5; cursor: default; }
#m-servers .note { margin: 2px 0; }
#m-mp #btn-join { flex-basis: 72px; } #m-mp .mprow:first-of-type { margin-top: 4px; }
/* cloud saves */
.cloud { display: flex; align-items: center; gap: 8px; background: rgba(15, 32, 41, .92); border: 1px solid var(--line); border-radius: 14px; padding: 7px 8px 7px 12px; margin-bottom: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cloud span { flex: 1; min-width: 0; } .cloud b { color: var(--text); } .cloud .btn { flex: 0 0 auto; min-width: 86px; padding: 8px 12px; }
.li.cv span { flex: 1; min-width: 0; } .li.cv small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; margin-top: 2px; }
.li.cv em { font-style: normal; color: var(--accent); }
