/* Cannonfall: the same calm look as Cogwild. One dark-blue theme, thin lines, no glow, no hover text. */
@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/lilita-one-latin.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(../fonts/nunito-latin.woff2) format('woff2'); }

:root {
  --bg1: #121a33; --bg2: #1a2342; --txt: #eef2ff; --muted: #9aa6cc; --muted2: #9fb3d9; --hl: #5ce1ff;
  --line: #34416b; --line2: rgba(159, 179, 217, .22); --rad: 10px; --bad: #ff5d5d; --good: #7bc950;
  --hudBg: .6; --z: 1; --glass: rgba(18, 26, 51, var(--hudBg));
  color-scheme: dark;
}
html[data-theme=midnight] { --bg1: #0b1024; --bg2: #121933; }
html[data-theme=graphite] { --bg1: #181b22; --bg2: #22262f; }
html[data-theme=ocean] { --bg1: #0d2230; --bg2: #143041; }
html[data-theme=dusk] { --bg1: #221a35; --bg2: #2e2345; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg1); color: var(--txt); font-family: 'Nunito', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#app, #game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; zoom: var(--z); pointer-events: none; }
#ui section { position: absolute; inset: 0; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; color: var(--txt); pointer-events: auto; }
button:focus { outline: none; }
button:focus-visible { outline: 1px solid var(--muted2); outline-offset: -1px; }
input, select { font: inherit; color: var(--txt); pointer-events: auto; }
small { color: var(--muted); }
.pic { display: inline-block; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; }
.pic svg { display: block; width: 100%; height: 100%; }

/* ---- main menu ---- */
.logo { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font-family: 'Lilita One', 'Nunito', sans-serif; font-size: clamp(46px, 7.5vw, 86px); line-height: 1; letter-spacing: 2px; color: #fff; text-shadow: 0 3px 0 rgba(13, 106, 130, .9), 0 8px 26px rgba(8, 14, 34, .55); animation: cwPopIn .5s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.chip { position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; background: var(--glass); border: 1px solid var(--line2); border-radius: var(--rad); text-align: left; min-width: 170px; }
.chip b { display: block; font-weight: 800; font-size: 14px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { display: block; font-size: 11px; }
.lobby-side { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.lobby-side.left { left: 14px; } .lobby-side.right { right: 14px; }
.side-btn { width: 86px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line2); border-radius: var(--rad); background: var(--glass); font-weight: 800; font-size: 12px; white-space: nowrap; transition: transform .08s, background .12s, border-color .12s; animation: cwPopIn .4s cubic-bezier(.2, .9, .3, 1.3) backwards; }
.side-btn:nth-child(2) { animation-delay: .04s; } .side-btn:nth-child(3) { animation-delay: .08s; }
.side-btn span { font-size: 24px; line-height: 1.15; display: inline-block; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.side-btn:hover span { transform: translateY(-3px) scale(1.12) rotate(-6deg); }
.side-btn:active { transform: scale(.95); }
.lobby-bottom { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: stretch; gap: 10px; }
.mode-card { display: flex; flex-direction: column; justify-content: center; text-align: left; min-width: 190px; padding: 10px 16px; background: var(--glass); border: 1px solid var(--line2); border-radius: var(--rad); }
.mode-card b { font-weight: 800; font-size: 19px; }
.mode-card small { font-size: 12px; }
.play-btn { position: relative; overflow: hidden; min-width: 210px; height: 92px; font-family: 'Lilita One', 'Nunito', sans-serif; font-size: 50px; letter-spacing: 1px; color: #fff; background: linear-gradient(180deg, #1597b5, #0d6a82); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--rad); box-shadow: 0 4px 0 #084456, 0 6px 16px rgba(0, 0, 0, .3); transition: transform .08s, filter .12s; }
.play-btn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; left: -90px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); animation: cwShine 4.2s ease-in-out infinite; }
.play-btn:hover { filter: brightness(1.08); }
.play-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #084456; }

/* every button hovers with the same gray-blue line */
.side-btn:hover, .mode-card:hover, .chip:hover, .line-btn:hover, .x:hover, .hud-btn:hover, .tab:hover, .cat:hover, .slot:hover, .card:hover:not(:disabled), .pick-card:hover:not(:disabled), .pic-btn:hover { outline: 1px solid var(--muted2); outline-offset: -1px; }

/* ---- windows ---- */
.screen { display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 28, .5); pointer-events: auto; animation: cwFade .14s ease-out; z-index: 10; padding: 14px; }
.screen.top { z-index: 30; }
.screen.full { padding: 0; z-index: 12; }
.panel { width: min(620px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--rad); overflow: hidden; animation: cwPanel .16s cubic-bezier(.2, .9, .3, 1.1); }
.panel.wide { width: min(860px, 100%); }
.panel.small { width: min(350px, 100%); }
.screen.full .panel { width: 100%; height: 100%; border: 0; border-radius: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 9px 18px; background: var(--bg1); border-bottom: 1px solid var(--line2); flex: none; }
.panel-head h2 { margin: 0; font-weight: 700; font-size: 20px; color: var(--muted2); }
.panel-body { padding: 14px 18px 18px; overflow-y: auto; touch-action: pan-y; }
.x { width: 32px; height: 32px; flex: none; background: transparent; border: 1px solid var(--line2); border-radius: var(--rad); font-size: 14px; color: var(--muted2); }
.line-btn { padding: 8px 16px; min-height: 36px; background: transparent; border: 1px solid var(--line2); border-radius: var(--rad); font-weight: 700; font-size: 14px; color: var(--txt); }
.line-btn.action { color: var(--hl); }
.line-btn.warn { color: #ff9a9a; }
.line-btn:active { transform: scale(.97); }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.ask-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#askText { margin: 2px 0; font-weight: 600; line-height: 1.4; }
.panel-body p { margin: 0 0 10px; line-height: 1.45; color: #d5dcf2; font-size: 14px; }
.panel-body h3 { margin: 14px 0 6px; font-size: 15px; font-weight: 700; color: var(--muted2); }
.panel-body h3:first-child { margin-top: 0; }
.panel-body ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.5; color: #d5dcf2; }
.kv { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 4px 20px; font-size: 14px; }
.kv > span { color: var(--muted2); }
.kv > b { font-weight: 800; text-align: right; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; font-size: 14px; margin-bottom: 10px; }
.keys b { color: var(--hl); font-weight: 800; }
.keys span { color: #d5dcf2; }

/* picker */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pick-card { position: relative; padding: 14px; min-height: 104px; text-align: left; background: transparent; border: 1px solid var(--line2); border-radius: var(--rad); transition: transform .08s; }
.pick-card b { display: block; font-size: 16px; font-weight: 800; margin: 2px 0 4px; }
.pick-card small { display: block; font-size: 12px; line-height: 1.35; }
.pick-card .ic { font-size: 22px; }
.pick-card.on { border-color: var(--hl); }
.pick-card:disabled { opacity: .55; cursor: default; }
.soon { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; color: var(--muted2); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
#pickOpts { margin-top: 12px; }

/* settings rows */
.set-panel { display: flex; flex-direction: column; }
.set-wrap { flex: 1; min-height: 0; display: flex; }
.set-cats { flex: none; width: 170px; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; touch-action: pan-y; border-right: 1px solid var(--line2); }
.cat { padding: 9px 12px; text-align: left; font-weight: 700; font-size: 14px; background: transparent; border: 1px solid transparent; border-radius: 0; color: var(--muted); }
.cat.on { color: var(--txt); border-left: 2px solid var(--hl); }
.set-body { flex: 1; min-width: 0; overflow-y: auto; touch-action: pan-y; padding: 8px 24px 28px; }
.set-inner { max-width: 640px; }
.set-title { margin: 12px 0 6px; font-size: 15px; font-weight: 700; color: var(--muted2); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 46px; padding: 6px 0; border-bottom: 1px solid var(--line2); font-size: 14px; font-weight: 600; }
.set-row > span { transition: color .12s; }
.set-row:hover > span { color: var(--muted2); }
.set-row small { display: block; font-weight: 500; font-size: 12px; }
label.set-row { cursor: pointer; }
.set-row select, .set-row input[type=text] { height: 32px; min-width: 170px; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 0 8px; }
.set-row select:hover, .set-row input[type=text]:hover, .set-row input[type=checkbox]:hover { outline: 1px solid var(--muted2); outline-offset: -1px; }
.set-row input[type=checkbox] { width: 20px; height: 20px; accent-color: #1597b5; flex: none; }
.set-row .rng { display: flex; align-items: center; gap: 10px; }
.set-row input[type=range] { width: 170px; accent-color: #1597b5; touch-action: pan-y; }
.set-row .val { min-width: 42px; text-align: right; color: var(--muted2); font-size: 13px; }
.set-btn { height: 32px; min-width: 110px; padding: 0 12px; background: transparent; border: 1px solid var(--line2); border-radius: var(--rad); font-weight: 700; font-size: 13px; }
.set-btn:hover { outline: 1px solid var(--muted2); outline-offset: -1px; }
.set-btn.listening { color: var(--hl); border-color: var(--hl); }
.set-btn.small { min-width: 32px; padding: 0; color: var(--muted2); }
.key-cell { display: flex; gap: 6px; }

.pic-grid { display: grid; grid-template-columns: repeat(4, 60px); gap: 10px; margin: 8px 0; }
.pic-btn { padding: 0; width: 60px; height: 60px; border-radius: 50%; background: none; border: 1px solid transparent; }
.pic-btn.on { border-color: var(--hl); }
.pic-btn .pic { width: 100%; height: 100%; }
.name-row { display: flex; gap: 8px; margin-bottom: 8px; }
.name-row input { flex: 1; min-width: 0; height: 36px; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 0 10px; user-select: text; -webkit-user-select: text; }

/* weapons list */
.w-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.w-row .ic { font-size: 24px; width: 34px; text-align: center; flex: none; }
.w-row b { font-weight: 800; font-size: 14px; }
.w-row small { display: block; font-size: 12px; line-height: 1.35; margin-top: 1px; }
.w-nums { margin-top: 3px; color: var(--muted2); font-size: 12px; }

/* shop */
.shop-panel .panel-head .res-row { flex: 1; justify-content: center; background: transparent; border: 0; }
.tabs { display: flex; gap: 6px; padding: 10px 18px 0; flex: none; }
.tab { padding: 7px 16px; background: transparent; border: 1px solid var(--line2); border-radius: var(--rad); font-weight: 700; font-size: 14px; color: var(--muted); }
.tab.on { color: var(--txt); border-color: var(--hl); }
.shop-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 10px; align-content: start; }
.card { position: relative; display: flex; gap: 10px; padding: 12px; text-align: left; background: transparent; border: 1px solid var(--line2); border-radius: var(--rad); transition: transform .08s; }
.card:active:not(:disabled) { transform: scale(.98); }
.card .ic { font-size: 26px; width: 36px; text-align: center; flex: none; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.card:hover:not(:disabled) .ic { transform: translateY(-2px) scale(1.1); }
.card b { display: block; font-weight: 800; font-size: 14px; }
.card small { display: block; font-size: 12px; line-height: 1.32; margin: 2px 0 5px; }
.card.poor { opacity: .55; }
.cost { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 800; }
.cost i { font-style: normal; }
.cost .no { color: var(--bad); }
.own { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 800; color: var(--muted2); }

/* ---- the screen display ---- */
.box { background: rgba(18, 26, 51, var(--hudBg)); border: 1px solid var(--line2); border-radius: var(--rad); }
html.glass .box, html.glass .hud-btn, html.glass .slot, html.glass .side-btn, html.glass .chip, html.glass .mode-card { backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.hud-tl { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hp-box { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.hp-ico { color: #ff6b6b; font-size: 15px; line-height: 1; }
.hp-bar { width: 170px; height: 12px; border-radius: 6px; overflow: hidden; background: rgba(8, 12, 28, .75); }
.hp-bar i { display: block; height: 100%; width: 100%; background: var(--good); transition: width .12s, background .12s; }
.hp-box b { font-size: 13px; font-weight: 800; min-width: 22px; text-align: right; }
.res-row { display: flex; gap: 12px; padding: 5px 10px; font-weight: 800; font-size: 14px; }
.res-row i { font-style: normal; display: inline-flex; gap: 4px; align-items: center; }
.res-row i.bump { animation: cwBump .25s ease-out; }
.fps { padding: 2px 8px; font-size: 12px; font-weight: 700; color: var(--muted2); }
.hud-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 5px 16px; text-align: center; white-space: nowrap; }
.hud-top b { display: block; font-weight: 800; font-size: 15px; }
.hud-top small { display: block; font-size: 12px; }
.hud-tr { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.hud-btn { width: 46px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; line-height: 1.1; font-size: 18px; background: rgba(18, 26, 51, var(--hudBg)); border: 1px solid var(--line2); border-radius: var(--rad); }
.hud-btn small { font-size: 10px; font-weight: 800; color: var(--muted2); }
.feed { position: absolute; top: 70px; right: 12px; width: 270px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; font-weight: 700; }
.feed div { padding: 3px 10px; background: rgba(18, 26, 51, var(--hudBg)); border-radius: 7px; animation: cwFade .15s; }
.cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.cross i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(10, 14, 30, .75); }
.cross u { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; display: none; background: conic-gradient(#fff var(--p, 0%), rgba(255, 255, 255, .15) 0); -webkit-mask: radial-gradient(circle, transparent 12px, #000 12.5px); mask: radial-gradient(circle, transparent 12px, #000 12.5px); }
.banner { position: absolute; top: 19%; left: 0; right: 0; margin: auto; width: fit-content; max-width: 90%; padding: 7px 22px; font-size: 21px; font-weight: 800; text-align: center; background: rgba(18, 26, 51, .78); border-left: 3px solid var(--bad); border-radius: var(--rad); animation: cwPopIn .25s; }
.prompt { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); padding: 5px 14px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.prompt b, .tip b, #gunHint b { color: var(--hl); font-weight: 800; }
.tip { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); padding: 7px 16px; max-width: min(620px, 88vw); font-weight: 700; font-size: 14px; text-align: center; border-left: 2px solid var(--hl); animation: cwFade .2s; }
.gun-panel { position: absolute; left: 12px; top: 98px; width: 262px; padding: 7px 12px; }
.gp-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 800; }
.gp-top span { color: var(--good); }
.gp-top span.busy { color: #ffc43d; }
.gp-top span.bad { color: #b89cff; }
.gp-bars { display: flex; gap: 6px; margin: 5px 0 3px; }
.gp-bar { flex: 2; height: 7px; background: rgba(8, 12, 28, .75); border-radius: 4px; overflow: hidden; }
.gp-bar.hp { flex: 1; }
.gp-bar i { display: block; height: 100%; background: var(--hl); }
.gp-bar.hp i { background: var(--good); }
#gunHint { font-size: 11px; display: block; text-align: center; }
.hotbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px; }
.slot { position: relative; width: 56px; height: 56px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; background: rgba(18, 26, 51, var(--hudBg)); border: 1px solid var(--line2); border-radius: var(--rad); transition: transform .08s; }
.slot.on { border: 2px solid var(--hl); transform: translateY(-3px); }
.slot:disabled { cursor: default; opacity: .55; }
.slot .k { position: absolute; top: 2px; left: 5px; font-size: 10px; font-weight: 800; color: var(--muted2); }
.slot .n { position: absolute; bottom: 1px; right: 5px; font-size: 12px; font-weight: 800; }
.numbers { overflow: hidden; }
.num { position: absolute; font-weight: 900; font-size: 18px; color: #ffd166; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); animation: cwNum .75s ease-out forwards; transform: translate(-50%, -50%); }
.num.me { color: var(--bad); }
.num.pay { color: var(--hl); }
.click-play { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted2); background: rgba(18, 26, 51, .7); border-radius: var(--rad); }
#hud.nohud > *:not(.cross) { visibility: hidden; }

/* ---- online, results and the rest ---- */
.touch-only { display: none; }
html.touch .touch-only { display: flex; }
.hud-btn.pulse { animation: cwPulse 1.1s ease-in-out infinite; border-color: var(--hl); }
.way { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 14px; font-weight: 800; font-size: 14px; white-space: nowrap; border-left: 2px solid var(--hl); }
.way i { font-style: normal; display: inline-block; font-size: 20px; color: var(--hl); line-height: 1; }
.net-bad { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); padding: 8px 16px; font-weight: 800; background: rgba(160, 60, 40, .85); border-radius: var(--rad); white-space: nowrap; }
.qchat { position: absolute; left: 12px; top: 45%; display: flex; flex-direction: column; gap: 3px; padding: 6px; z-index: 3; }
.qchat button { text-align: left; padding: 5px 10px; background: transparent; border: 0; border-radius: 7px; font-size: 13px; font-weight: 700; }
.qchat button:hover { outline: 1px solid var(--muted2); outline-offset: -1px; }
.qchat b { color: var(--hl); margin-right: 5px; }
.board { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; gap: 26px; width: min(620px, 92vw); padding: 12px 18px; background: rgba(18, 26, 51, .86); border: 1px solid var(--line2); border-radius: var(--rad); z-index: 3; }
.board h3 { margin: 0 0 6px; font-size: 14px; font-weight: 800; }
.r-row { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; }
.r-row small { margin-left: auto; font-size: 12px; }
.r-row.me b { color: var(--hl); }
.r-row.gone { opacity: .45; }
.r-row .pic { width: 26px; height: 26px; }
.r-row.empty { opacity: .6; }
.pic.bot { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.out-box { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); width: min(420px, 90vw); padding: 12px 18px; text-align: center; background: rgba(18, 26, 51, .88); pointer-events: auto; z-index: 3; }
.out-box b { display: block; font-size: 19px; font-weight: 800; }
.out-box small { display: block; margin-top: 3px; }
.out-box .ask-row { justify-content: center; margin-top: 10px; }
.center { text-align: center; }
.center h3 { margin: 0 0 8px !important; }
.spin { width: 30px; height: 30px; margin: 6px auto 10px; border: 3px solid var(--line2); border-top-color: var(--hl); border-radius: 50%; animation: cwSpin .9s linear infinite; }
.room-top { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.room-code { font-family: 'Lilita One', 'Nunito', sans-serif; font-size: 36px; letter-spacing: 4px; line-height: 1.1; color: #fff; user-select: text; -webkit-user-select: text; }
.room-mode { margin-left: auto; display: flex; flex-direction: column; gap: 3px; }
.room-mode select { height: 32px; min-width: 90px; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; padding: 0 8px; }
.room-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
#roomWait { align-self: center; margin-right: auto; }
.res-title { margin: 2px 0 10px; font-family: 'Lilita One', 'Nunito', sans-serif; font-weight: 400; font-size: 34px; text-align: center; }
.res-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.res-table th { font-weight: 700; font-size: 12px; color: var(--muted2); text-align: right; padding: 3px 6px; }
.res-table th:nth-child(2) { text-align: left; }
.res-table td { padding: 4px 6px; border-top: 1px solid var(--line2); text-align: right; font-weight: 700; }
.res-table td:nth-child(2) { text-align: left; }
.res-table td small { font-size: 11px; }
.res-table tr.me td { color: var(--hl); }
.res-table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.res-coins { margin: 12px 0 0 !important; text-align: center; font-weight: 800; color: #ffd166 !important; }
.res-coins span { color: var(--hl); }
.busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 28, .8); font-weight: 800; pointer-events: auto; z-index: 50; }
.join-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 2px; }
.join-row input { width: 92px; height: 34px; padding: 0 8px; text-transform: uppercase; letter-spacing: 2px; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; user-select: text; -webkit-user-select: text; }
.drop-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.lock-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.lock-top b { font-size: 16px; font-weight: 800; color: #ffd166; }
.tabs.in { padding: 0 0 10px; flex-wrap: wrap; }
.lock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.card.equipped { border-color: var(--hl); }
.sw { display: inline-block; flex: none; width: 26px; height: 26px; border-radius: 50%; }
.lock-note { margin: 10px 0 0 !important; font-size: 12px !important; color: var(--muted) !important; }
a { color: var(--hl); pointer-events: auto; }

.toasts { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 5px; align-items: center; z-index: 40; }
.note { padding: 6px 14px; font-weight: 700; font-size: 14px; white-space: nowrap; background: rgba(16, 22, 43, .92); border: 1px solid var(--line2); border-radius: var(--rad); animation: cwPopIn .2s; }

/* ---- phone controls ---- */
#touch { touch-action: none; pointer-events: auto; z-index: 1; }
.stick { position: absolute; left: 26px; bottom: 26px; width: calc(124px * var(--tz, 1)); height: calc(124px * var(--tz, 1)); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(18, 26, 51, .32); opacity: var(--to, .75); }
.stick i { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; margin: -23% 0 0 -23%; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.t-buttons { position: absolute; right: 20px; bottom: 18px; display: grid; grid-template-columns: repeat(2, calc(66px * var(--tz, 1))); gap: 10px; opacity: var(--to, .75); align-items: end; }
.t-btn { width: calc(66px * var(--tz, 1)); height: calc(66px * var(--tz, 1)); padding: 0; font-size: 22px; font-weight: 800; color: #fff; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(18, 26, 51, .42); touch-action: none; }
.t-btn.act { grid-row: span 1; background: rgba(21, 151, 181, .55); }
.t-btn.down { background: rgba(92, 225, 255, .5); }
#ui section#hud { pointer-events: none; z-index: 2; }
#hud button { pointer-events: auto; }
html.touch #clickToPlay, html.touch .slot .k, html.touch .hud-btn small { display: none; }
html.touch .hotbar { bottom: 8px; }
html.touch .slot { width: 46px; height: 46px; font-size: 20px; }
html.touch .tip { bottom: 62px; }
html.touch .toasts { bottom: 112px; }

/* short screens: phones held sideways */
html.compact .logo { top: 10px; font-size: 42px; }
html.compact .chip { top: 8px; left: 8px; min-width: 0; padding: 4px 10px 4px 4px; }
html.compact .pic { width: 30px; height: 30px; }
html.compact .chip small { display: none; }
html.compact .lobby-side { gap: 6px; top: 54%; }
html.compact .lobby-side.left { left: 8px; } html.compact .lobby-side.right { right: 8px; }
html.compact .side-btn { width: 64px; height: 50px; font-size: 10px; }
html.compact .side-btn span { font-size: 19px; }
html.compact .lobby-bottom { right: 82px; bottom: 8px; }
html.compact .mode-card { min-width: 130px; padding: 6px 12px; }
html.compact .mode-card b { font-size: 15px; }
html.compact .play-btn { min-width: 140px; height: 66px; font-size: 34px; }
html.compact .hud-tl { top: 6px; left: 6px; gap: 4px; }
html.compact .hud-top { top: 6px; padding: 3px 12px; }
html.compact .hud-top b { font-size: 13px; }
html.compact .hud-top small { display: none; }
html.compact .hud-tr { top: 6px; right: 6px; }
html.compact .hud-btn { width: 40px; height: 40px; font-size: 16px; }
html.compact .hp-bar { width: 110px; height: 9px; }
html.compact .res-row { gap: 8px; font-size: 12px; padding: 3px 8px; }
html.compact .hp-box { padding: 3px 8px; }
html.compact .feed { top: 50px; right: 6px; width: 210px; font-size: 11px; }
html.compact .panel-head { padding: 6px 10px 5px 14px; }
html.compact .panel-head h2 { font-size: 16px; }
html.compact .panel-body { padding: 10px 12px 12px; }
html.compact .set-cats { width: 118px; padding: 4px; gap: 0; }
html.compact .cat { padding: 6px 8px; font-size: 12px; }
html.compact .set-body { padding: 2px 12px 16px; }
html.compact .set-row { min-height: 38px; font-size: 13px; }
html.compact .set-row input[type=range] { width: 120px; }
html.compact .set-row select { min-width: 120px; }
html.compact .banner { font-size: 16px; top: 16%; }
html.compact .tip { font-size: 12px; padding: 4px 10px; bottom: 62px; max-width: 46vw; }
html.compact .gun-panel { left: 6px; top: 62px; width: 186px; padding: 4px 8px; }
html.compact .gp-top { font-size: 12px; }
html.compact .way { top: 40px; font-size: 12px; padding: 3px 10px; }
html.compact .board { top: 40px; }
html.compact .room-code { font-size: 26px; }
html.compact .res-title { font-size: 24px; margin: 0 0 4px; }
html.compact .res-table td { padding: 2px 6px; }
html.compact .r-row { min-height: 26px; font-size: 13px; }
html.compact .hud-btn.touch-only { width: 36px; }
html.compact .pick-card { min-height: 78px; padding: 9px; }
html.compact .pick-card .ic { font-size: 17px; }
html.compact .pick-card b { font-size: 14px; }
html.compact .shop-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
html.compact .card { padding: 7px; }
html.compact .tabs { padding: 6px 12px 0; }
html.compact .tab { padding: 4px 12px; font-size: 12px; }

@keyframes cwPulse { 50% { background: rgba(92, 225, 255, .35); } }
@keyframes cwSpin { to { transform: rotate(360deg); } }
@keyframes cwPopIn { from { opacity: 0; transform: scale(.88); } }
@keyframes cwFade { from { opacity: 0; } }
@keyframes cwPanel { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes cwShine { 0%, 70% { left: -90px; } 100% { left: 110%; } }
@keyframes cwBump { 50% { transform: scale(1.25); } }
@keyframes cwNum { 0% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -46px; } }
