:root {
  --bg: #1b1033; --bg2: #2a1a52; --card: #2f2060; --ink: #fff; --muted: #c9bdf0;
  --pink: #ff3fa4; --teal: #2ff0c4; --gold: #ffd23f; --purple: #9b5de5; --red: #ff4d6d;
  --radius: 18px; --font: 'Baloo 2', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-tap-highlight-color: transparent; }
body { background: radial-gradient(circle at 20% 10%, #3b1f73 0, transparent 50%), radial-gradient(circle at 80% 90%, #0f5d63 0, transparent 50%), var(--bg); }
.hidden { display: none !important; }
button { font-family: var(--font); font-weight: 700; font-size: 17px; border: 0; border-radius: 14px; padding: 10px 18px; cursor: pointer; color: #1b1033; background: var(--gold); box-shadow: 0 4px 0 #b8901a; transition: transform .08s; }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 #b8901a; }
button.secondary { background: #ffffff; box-shadow: 0 4px 0 #b9b0d6; }
button.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
button.small { padding: 6px 12px; font-size: 14px; }
button.danger { background: var(--red); color: #fff; box-shadow: 0 4px 0 #a32a40; }
button:disabled { opacity: .5; cursor: default; }
button.big { font-size: 26px; padding: 16px 22px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
button.big small { font-size: 14px; font-weight: 600; opacity: .7; }
input, select { font-family: var(--font); font-size: 17px; padding: 10px 12px; border-radius: 12px; border: 2px solid #5b4a99; background: #1b1033; color: #fff; }
h1, h2 { margin: .3em 0; line-height: 1.1; }
h2 small { font-size: 14px; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.mt { margin-top: 18px; }

/* Logo */
.logo { display: flex; gap: 6px; font-weight: 800; font-size: 30px; letter-spacing: 1px; transform: rotate(-3deg); }
.logo span:first-child { color: var(--pink); text-shadow: 3px 3px 0 #7a1050; }
.logo span:last-child { color: var(--teal); text-shadow: 3px 3px 0 #0b6b56; }
.logo.big { font-size: 64px; }

/* Layout */
#app { height: 100%; display: flex; flex-direction: column; }
#topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
#topbar .spacer { flex: 1; }
.pill { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; padding: 8px 14px; font-size: 15px; }
.pill.icon { padding: 8px 10px; }
.pill b { background: var(--teal); color: #102; border-radius: 10px; padding: 0 7px; margin-left: 4px; }
#screens { flex: 1; overflow: auto; padding: 0 16px 24px; }
.screen { max-width: 1180px; margin: 0 auto; }
.screen-head { display: flex; align-items: center; gap: 14px; }
.screen-head .back { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.card { background: linear-gradient(160deg, #3a2775, #281a55); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.home-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .home-grid { grid-template-columns: 1fr 1fr; } .card.play { grid-column: 1 / -1; } }
@media (max-width: 640px) { .home-grid { grid-template-columns: 1fr; } .logo { font-size: 22px; } }
.goal { font-size: 18px; background: rgba(255,255,255,.08); padding: 8px 12px; border-radius: 12px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.modes .mode:nth-child(1) { background: var(--pink); box-shadow: 0 5px 0 #a3226a; color: #fff; }
.modes .mode:nth-child(2) { background: var(--teal); box-shadow: 0 5px 0 #149a7c; }
.modes .mode:nth-child(3) { background: var(--gold); }
.modes.small { display: flex; gap: 8px; }
.mode-pick { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }
.mode-pick.on { background: var(--teal); color: #102; }
#char-preview { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; border-radius: 14px; background: radial-gradient(circle, #4a3590, #281a55); }
#loadout-summary { font-size: 15px; color: var(--muted); margin: 8px 0; }
#loadout-summary b { color: #fff; }
#rotation-list .stage { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.07); padding: 8px 12px; border-radius: 12px; margin: 6px 0; }
#rotation-list .stage.event { background: linear-gradient(90deg, #8a1b2a, #1f7a3a); }
#rotation-list .stage small { color: var(--muted); }
#leaderboard { padding-left: 22px; margin: 6px 0; font-size: 15px; }
#leaderboard li { margin: 3px 0; }
#leaderboard small { color: var(--muted); }
.event { margin: 6px 0 14px; padding: 12px 18px; border-radius: var(--radius); font-size: 20px; font-weight: 800; text-align: center;
  background: linear-gradient(90deg, #c4162a, #e3262f 30%, #1fa64a 70%, #138a37); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.event.newyear { background: linear-gradient(90deg, #2a1a6e, #7b5cff 40%, #ffd23f); color: #fff; }
.event small { display: block; font-weight: 600; font-size: 14px; opacity: .9; }

/* Locker */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.grid.chars { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt { background: rgba(255,255,255,.08); border: 3px solid transparent; border-radius: 14px; padding: 10px 12px; cursor: pointer; text-align: left; color: #fff; box-shadow: none; font-weight: 600; font-size: 14px; }
.opt b { display: block; font-size: 17px; }
.opt .ab { display: inline-block; margin-top: 4px; background: rgba(255,210,63,.18); color: var(--gold); border-radius: 8px; padding: 1px 7px; font-size: 13px; }
.opt.on { border-color: var(--gold); background: rgba(255,210,63,.12); }
.opt .sw { width: 34px; height: 34px; border-radius: 50%; float: right; border: 3px solid rgba(255,255,255,.4); }

/* Party */
.code { background: #fff; color: #1b1033; border-radius: 10px; padding: 0 10px; letter-spacing: 3px; }
.members { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.member { background: rgba(255,255,255,.08); border-radius: 14px; padding: 12px 16px; min-width: 150px; }
.member .tag { font-size: 12px; color: var(--gold); }
.member.playing { opacity: .7; }
.status { font-size: 18px; color: var(--teal); min-height: 1.4em; }
.voice-box { margin-top: 18px; background: rgba(255,255,255,.06); border-radius: 14px; padding: 12px 16px; }
.voice-peer { display: inline-flex; align-items: center; gap: 6px; margin: 4px 8px 4px 0; background: rgba(255,255,255,.08); padding: 4px 10px; border-radius: 10px; }
.voice-peer.talking { outline: 2px solid var(--teal); }

/* Friends panel */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: #22164a; box-shadow: -10px 0 40px rgba(0,0,0,.4); padding: 16px; overflow: auto; z-index: 40; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel .close, .modal .close { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; padding: 4px 10px; }
#friend-add { display: flex; gap: 8px; margin: 10px 0; } #friend-add input { flex: 1; min-width: 0; }
.friend { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); margin: 6px 0; }
.friend .dot { width: 12px; height: 12px; border-radius: 50%; background: #666; flex: none; }
.friend.online .dot { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.friend .who { flex: 1; min-width: 0; } .friend .who small { display: block; color: var(--muted); }
.friend button { padding: 6px 10px; font-size: 13px; }

/* Modal / overlays / toasts */
.modal, .overlay { position: fixed; inset: 0; background: rgba(10,5,25,.7); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box { background: #2a1a52; border-radius: var(--radius); padding: 22px; width: min(460px, 100%); max-height: 90vh; overflow: auto; position: relative; }
.modal-box .close { position: absolute; top: 10px; right: 10px; }
.modal-box form { display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; } .tabs button { flex: 1; background: rgba(255,255,255,.1); color: #fff; box-shadow: none; } .tabs button.on { background: var(--teal); color: #102; }
.google { background: #fff; color: #333; display: flex; align-items: center; justify-content: center; gap: 8px; }
.err { color: #ff8fa3; min-height: 1.2em; }
.queue-box { text-align: center; background: #2a1a52; padding: 28px 36px; border-radius: var(--radius); }
.spinner { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 8px; border: 7px solid rgba(255,255,255,.15); border-top-color: var(--pink); border-right-color: var(--teal); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading { flex-direction: column; background: var(--bg); }
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; pointer-events: none; }
.toast { background: #fff; color: #1b1033; padding: 10px 16px; border-radius: 14px; font-weight: 700; box-shadow: 0 8px 20px rgba(0,0,0,.3); pointer-events: auto; animation: pop .25s; max-width: 92vw; display: flex; gap: 10px; align-items: center; }
.toast.friend { border-left: 6px solid var(--teal); } .toast.request, .toast.party { border-left: 6px solid var(--gold); } .toast.error { border-left: 6px solid var(--red); }
.toast button { padding: 4px 10px; font-size: 13px; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }

/* Profile */
.profile-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.lvl { font-size: 46px; font-weight: 800; color: var(--gold); line-height: 1; }
.xpbar { height: 14px; background: rgba(255,255,255,.12); border-radius: 8px; overflow: hidden; width: 260px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: rgba(255,255,255,.07); border-radius: 12px; padding: 10px; } .stat b { display: block; font-size: 24px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { background: rgba(255,255,255,.07); border-radius: 12px; padding: 10px; text-align: center; font-size: 13px; }
.badge .ic { font-size: 34px; display: block; } .badge.locked { opacity: .35; filter: grayscale(1); }
.badge.event { background: linear-gradient(160deg, #6b1020, #145c2c); }

/* Results */
.verdict { text-align: center; }
.verdict h1 { font-size: 58px; margin: 6px 0; }
.verdict h1.win { color: var(--gold); text-shadow: 0 4px 0 #8a6a00; } .verdict h1.lose { color: #b9b0d6; }
.bars { display: flex; height: 54px; border-radius: 16px; overflow: hidden; margin: 14px auto; max-width: 720px; font-size: 22px; font-weight: 800; }
.bars div { display: flex; align-items: center; justify-content: center; transition: flex-grow 1.6s cubic-bezier(.2,.8,.2,1); flex-grow: 1; color: #1b1033; min-width: 60px; }
.res-players { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
@media (max-width: 700px) { .res-players { grid-template-columns: 1fr; } }
.res-team { background: rgba(255,255,255,.06); border-radius: 14px; padding: 10px; border-top: 6px solid; }
.res-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; font-size: 15px; }
.res-row.me { background: rgba(255,210,63,.15); } .res-row .nm { flex: 1; } .res-row small { color: var(--muted); }
.res-row .medal { font-size: 18px; }
.xp-box { background: rgba(255,255,255,.07); border-radius: 14px; padding: 12px 16px; max-width: 520px; margin: 0 auto; }
.xp-box .line { display: flex; justify-content: space-between; }
.newbadge { display: inline-block; background: var(--gold); color: #1b1033; border-radius: 12px; padding: 6px 12px; margin: 4px; font-weight: 800; animation: pop .4s; }

/* ============ In-game HUD ============ */
#game { position: fixed; inset: 0; z-index: 30; background: #000; }
#view { width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#hud { position: absolute; inset: 0; pointer-events: none; user-select: none; }
#quit { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; z-index: 5; }
.hud-top { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; }
.timer { font-size: 38px; font-weight: 800; background: rgba(0,0,0,.45); padding: 0 18px; border-radius: 16px; min-width: 120px; text-align: center; }
.timer.final { color: var(--gold); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.team-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; }
.goal-tip { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.55); padding: 6px 16px; border-radius: 12px; font-size: 18px; transition: opacity .8s; white-space: nowrap; }
.goal-tip.hide { opacity: 0; }
.tags { position: absolute; inset: 0; overflow: hidden; }
.nametag { position: absolute; left: 0; top: 0; font-size: 14px; font-weight: 700; text-align: center; text-shadow: 0 2px 3px #000; white-space: nowrap; }
.nametag .hp { display: block; width: 46px; height: 6px; background: rgba(0,0,0,.5); border-radius: 4px; margin: 2px auto 0; overflow: hidden; }
.nametag .hp i { display: block; height: 100%; background: #4ade80; }
.nametag.enemy .hp i { background: #ff4d6d; }
.feed { position: absolute; top: 70px; right: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.feed div { background: rgba(0,0,0,.55); padding: 3px 10px; border-radius: 10px; border-left: 5px solid; font-size: 15px; }
.banner { position: absolute; top: 24%; left: 50%; transform: translate(-50%, -20px) scale(.9); opacity: 0; font-size: 40px; font-weight: 800; padding: 8px 26px; border-radius: 18px; background: rgba(20,10,40,.75); transition: all .35s; text-align: center; white-space: nowrap; }
.banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.banner.final { color: var(--gold); } .banner.item { color: #fff3a0; } .banner.good { color: var(--teal); } .banner.bad { color: var(--red); }
@media (max-width: 700px) { .banner { font-size: 24px; } .timer { font-size: 28px; } }
.center-msg { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-weight: 800; text-align: center; }
.center-msg.count { font-size: 110px; color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.4); animation: pop .3s; }
.center-msg.respawn { font-size: 34px; background: rgba(0,0,0,.5); padding: 6px 20px; border-radius: 14px; }
.center-msg.judge { font-size: 46px; color: var(--gold); text-shadow: 0 4px 0 #000; }
.hud-bottom { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 14px; }
.ink { position: relative; width: 34px; height: 120px; border-radius: 17px; background: rgba(0,0,0,.45); border: 3px solid #fff; overflow: hidden; }
.ink-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--team); transition: height .1s; }
.ink span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 12px; }
.ink.low { border-color: var(--red); animation: pulse .6s infinite; }
.ink.sticky::after { content: 'STICKY!'; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--red); }
.special { position: relative; width: 74px; height: 74px; }
.special svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.special circle { fill: rgba(0,0,0,.45); stroke-width: 4; }
.special .bg { stroke: rgba(255,255,255,.25); }
.special .fg { fill: none; stroke: var(--team); stroke-dasharray: 97.4; stroke-linecap: round; transition: stroke-dashoffset .2s; }
.special b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; opacity: .5; }
.special .sp-name { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 12px; white-space: nowrap; }
.special.full b { opacity: 1; color: var(--gold); animation: pulse .8s infinite; }
.dash { position: relative; width: 54px; height: 54px; }
.dash svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash circle { fill: rgba(0,0,0,.45); stroke-width: 4; } .dash .bg { stroke: rgba(255,255,255,.25); }
.dash .fg { fill: none; stroke: #fff; stroke-dasharray: 97.4; transition: stroke-dashoffset .1s; }
.dash b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; opacity: .45; }
.dash span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 12px; }
.dash.ready b { opacity: 1; }
.buff { background: rgba(255,210,63,.9); color: #1b1033; font-weight: 800; padding: 4px 12px; border-radius: 12px; font-size: 18px; }
.minimap { position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 170px; border-radius: 10px; border: 3px solid rgba(255,255,255,.8); image-rendering: auto; transition: all .2s; background: rgba(0,0,0,.4); }
.minimap.big { width: min(70vw, 720px); right: 50%; bottom: 50%; transform: translate(50%, 50%); }
.hurt { position: absolute; inset: 0; box-shadow: inset 0 0 120px 40px rgba(255,30,60,.8); opacity: 0; transition: opacity .2s; }
.owls { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 700px) { .minimap { width: 110px; top: 60px; bottom: auto; } }

/* Touch controls: standard mobile-shooter layout */
.touch { position: absolute; inset: 0; pointer-events: none; }
.touch .stick-ghost { position: absolute; left: max(40px, env(safe-area-inset-left)); bottom: max(40px, env(safe-area-inset-bottom)); width: 120px; height: 120px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.22); }
.touch .stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.4); display: none; }
.touch .stick.on { display: block; }
.touch .knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; background: rgba(255,255,255,.7); box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.touch .tbtn { position: absolute; pointer-events: auto; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1b1033;
  background: rgba(255,255,255,.72); box-shadow: 0 3px 0 rgba(0,0,0,.25); width: 62px; height: 62px; font-size: 22px; touch-action: none; }
.touch .tbtn small { font-size: 9px; font-weight: 800; margin-top: -2px; }
.touch .tbtn.down { transform: scale(.9); background: var(--gold); }
/* Battle-royale mobile layout: stick bottom-left, second fire above it; big FIRE middle-right,
   big JUMP bottom-right with CROUCH (swim) beside it and DASH above; item slots (sub, special)
   in a row top-right under the mini-map. */
.touch .fire { width: 92px; height: 92px; font-size: 32px; right: max(112px, calc(env(safe-area-inset-right) + 112px)); bottom: max(118px, calc(env(safe-area-inset-bottom) + 118px)); background: rgba(255,47,160,.85); color: #fff; }
.touch .fire small { font-size: 11px; }
.touch .fire2 { width: 60px; height: 60px; left: max(40px, env(safe-area-inset-left)); bottom: max(200px, calc(env(safe-area-inset-bottom) + 200px)); background: rgba(255,47,160,.7); color: #fff; }
.touch .jmp { width: 82px; height: 82px; font-size: 28px; right: max(18px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); }
.touch .swim { width: 58px; height: 58px; right: max(118px, calc(env(safe-area-inset-right) + 118px)); bottom: max(18px, env(safe-area-inset-bottom)); }
.touch .dsh { width: 58px; height: 58px; right: max(28px, env(safe-area-inset-right)); bottom: max(130px, calc(env(safe-area-inset-bottom) + 130px)); }
.touch .sub, .touch .spc { width: 58px; height: 58px; top: max(102px, calc(env(safe-area-inset-top) + 102px)); bottom: auto; left: auto; border-radius: 14px !important; }
.touch .spc { right: max(12px, env(safe-area-inset-right)); }
.touch .sub { right: max(78px, calc(env(safe-area-inset-right) + 78px)); }
.touch .spc.ready { background: var(--gold); animation: pulse .8s infinite; box-shadow: 0 0 18px var(--gold); }
@media (max-height: 420px) { .touch .tbtn { transform: scale(.88); } .touch .fire2 { bottom: 160px; } .touch .fire { bottom: 104px; } .touch .dsh { bottom: 116px; } .touch .sub, .touch .spc { top: 92px; } }

/* =====================================================================
   PAINT SPLATTER THEME: no plain boxes. Buttons are wobbly paint blobs
   with drips, the big play buttons are full splats, panels have painted
   corners, headings sit on brush strokes.
   ===================================================================== */
.splatmask { -webkit-mask: var(--shape) center / 100% 100% no-repeat; mask: var(--shape) center / 100% 100% no-repeat; }

/* Background: big faint splats */
body::before, body::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; opacity: .16;
  -webkit-mask: url(/img/splat-2.svg) center / contain no-repeat; mask: url(/img/splat-2.svg) center / contain no-repeat;
}
body::before { width: 520px; height: 520px; left: -140px; top: 30%; background: var(--pink); transform: rotate(-20deg); }
body::after { width: 620px; height: 620px; right: -180px; bottom: -160px; background: var(--teal); transform: rotate(35deg); -webkit-mask-image: url(/img/splat-3.svg); mask-image: url(/img/splat-3.svg); }

/* Every button is a lumpy paint blob with a drip */
button {
  position: relative;
  border-radius: 26px 16px 24px 14px / 18px 24px 16px 22px;
  transition: transform .12s, border-radius .4s;
}
button:hover { border-radius: 16px 26px 14px 24px / 24px 16px 22px 18px; transform: translateY(-1px) rotate(-.6deg); }
button:active { transform: translateY(3px) scale(.96, .92); }
button:not(.ghost):not(.pill):not(.small):not(.close):not(.tbtn):not(.opt):not(.mode)::after {
  content: ''; position: absolute; width: 10px; height: 14px; left: 22%; bottom: -9px;
  background: inherit; border-radius: 0 0 8px 8px / 0 0 10px 10px; box-shadow: none; pointer-events: none;
  transition: height .3s;
}
button:not(.ghost):not(.pill):not(.small):not(.close):not(.tbtn):not(.opt):not(.mode):hover::after { height: 20px; }
button.secondary::after { left: auto !important; right: 26%; }

/* Big Play buttons: full paint splats */
.modes .mode {
  background: transparent !important; box-shadow: none !important; color: #fff; isolation: isolate;
  min-height: 118px; text-shadow: 0 3px 0 rgba(0,0,0,.35); font-size: 30px; border-radius: 0;
}
.modes .mode::before {
  content: ''; position: absolute; inset: -30px -22px -18px; z-index: -1; background: var(--c);
  -webkit-mask: url(/img/splat-1.svg) center / 100% 100% no-repeat; mask: url(/img/splat-1.svg) center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.modes .mode:nth-child(1) { --c: var(--pink); }
.modes .mode:nth-child(2) { --c: var(--teal); color: #08352c; text-shadow: 0 2px 0 rgba(255,255,255,.4); }
.modes .mode:nth-child(3) { --c: var(--gold); color: #3a2a00; text-shadow: 0 2px 0 rgba(255,255,255,.4); }
.modes .mode:nth-child(2)::before { -webkit-mask-image: url(/img/splat-2.svg); mask-image: url(/img/splat-2.svg); }
.modes .mode:nth-child(3)::before { -webkit-mask-image: url(/img/splat-3.svg); mask-image: url(/img/splat-3.svg); }
.modes .mode:hover { transform: none; }
.modes .mode:hover::before { transform: scale(1.08) rotate(-4deg); }
.modes .mode:active::before { transform: scale(.94); }
.modes .mode small { font-size: 15px; opacity: .85; }

/* Panels: lumpy edges + a painted corner splat + a drip */
.card { position: relative; border-radius: 34px 22px 38px 20px / 24px 36px 22px 34px; overflow: visible; }
.card::before {
  content: ''; position: absolute; width: 130px; height: 130px; top: -38px; right: -30px; z-index: 0; pointer-events: none; opacity: .9;
  background: var(--corner, var(--pink));
  -webkit-mask: url(/img/splat-2.svg) center / contain no-repeat; mask: url(/img/splat-2.svg) center / contain no-repeat;
}
.card::after {
  content: ''; position: absolute; width: 14px; height: 34px; bottom: -22px; left: 18%; border-radius: 0 0 10px 10px;
  background: #281a55; pointer-events: none;
}
.card > * { position: relative; z-index: 1; }
.card.locker-mini { --corner: var(--teal); }
.card.rotation { --corner: var(--gold); }
.card.play::before { width: 110px; height: 110px; top: -30px; right: 30px; }

/* Headings sit on brush strokes */
.card h2, .screen > h2, #locker h2 { display: block; width: fit-content; padding: 0 14px; margin-left: -6px; isolation: isolate; position: relative; }
.card h2::before, #locker h2::before {
  content: ''; position: absolute; inset: 10% -4px 0; z-index: -1; background: rgba(255,63,164,.55);
  -webkit-mask: url(/img/brush.svg) center / 100% 100% no-repeat; mask: url(/img/brush.svg) center / 100% 100% no-repeat;
}
.card.locker-mini h2::before { background: rgba(47,240,196,.45); }
.card.rotation h2::before { background: rgba(255,210,63,.45); }
#locker h2:nth-of-type(2n)::before { background: rgba(47,240,196,.45); }

/* Pills, inputs, chips: blobby */
.pill, input, select, .goal, .code, .toast, .member, .friend, .opt, .stat, .badge, .res-team, .xp-box, .voice-box, .queue-box, .modal-box, .event, #rotation-list .stage {
  border-radius: 22px 14px 20px 12px / 14px 20px 12px 18px;
}
#event-banner { position: relative; overflow: visible; }
#event-banner::after {
  content: ''; position: absolute; width: 90px; height: 90px; left: -26px; top: -26px; background: #fff; opacity: .85;
  -webkit-mask: url(/img/splat-3.svg) center / contain no-repeat; mask: url(/img/splat-3.svg) center / contain no-repeat;
}
#event-banner.newyear::after { background: var(--gold); }

/* Locker options: selected one gets a paint splat badge */
.opt { position: relative; overflow: visible; transition: transform .15s, border-radius .4s; }
.opt:hover { transform: rotate(-1deg) scale(1.02); }
.opt.on::after {
  content: '✓'; position: absolute; top: -14px; right: -12px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  color: #1b1033; font-weight: 800; background: var(--gold);
  -webkit-mask: url(/img/splat-1.svg) center / contain no-repeat; mask: url(/img/splat-1.svg) center / contain no-repeat;
}

/* Logo drips */
.logo span { position: relative; }
.logo span::after { content: ''; position: absolute; width: 6px; height: 12px; bottom: -8px; left: 30%; border-radius: 0 0 4px 4px; background: currentColor; }
.logo span:last-child::after { left: 62%; height: 16px; }

/* Queue spinner: a spinning splat */
.spinner { border: 0; width: 70px; height: 70px; background: conic-gradient(var(--pink), var(--teal), var(--gold), var(--pink));
  -webkit-mask: url(/img/splat-1.svg) center / contain no-repeat; mask: url(/img/splat-1.svg) center / contain no-repeat; animation: spin 1.6s linear infinite; }

/* Results win banner splat */
.verdict h1 { position: relative; display: inline-block; padding: 10px 40px; isolation: isolate; }
.verdict h1::before { content: ''; position: absolute; inset: -20px -30px; z-index: -1; opacity: .35; background: currentColor;
  -webkit-mask: url(/img/splat-3.svg) center / 100% 100% no-repeat; mask: url(/img/splat-3.svg) center / 100% 100% no-repeat; }
.bars { border-radius: 30px 18px 28px 16px / 20px 30px 16px 26px; }

/* In-game HUD: timer on a splat, badges as blobs */
.timer { background: transparent; position: relative; isolation: isolate; padding: 6px 26px; }
.timer::before { content: ''; position: absolute; inset: -10px -14px; z-index: -1; background: rgba(15,8,35,.75);
  -webkit-mask: url(/img/splat-btn.svg) center / 100% 100% no-repeat; mask: url(/img/splat-btn.svg) center / 100% 100% no-repeat; }
.banner { border-radius: 40px 24px 36px 22px / 26px 40px 22px 36px; }
.feed div, .buff, .goal-tip, .center-msg.respawn { border-radius: 18px 10px 16px 9px / 10px 16px 9px 14px; }
.ink { border-radius: 18px 18px 22px 22px / 14px 14px 26px 26px; }
.minimap { border-radius: 22px 14px 20px 12px / 14px 20px 12px 18px; }
.touch .tbtn { border-radius: 50% 44% 52% 46% / 46% 52% 44% 50%; }
.opt .sw { border: 0; width: 46px; height: 46px; margin: -6px -6px 0 0; border-radius: 0;
  -webkit-mask: url(/img/splat-2.svg) center / contain no-repeat; mask: url(/img/splat-2.svg) center / contain no-repeat; }
.opt:nth-child(3n) .sw { -webkit-mask-image: url(/img/splat-1.svg); mask-image: url(/img/splat-1.svg); }
.opt:nth-child(3n+1) .sw { -webkit-mask-image: url(/img/splat-3.svg); mask-image: url(/img/splat-3.svg); }

/* Phone/tablet layout tweaks while touch controls are showing */
#hud.touch-on .minimap { width: 124px; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); left: auto; bottom: auto; }
#hud.touch-on .feed { top: max(76px, calc(env(safe-area-inset-top) + 76px)); bottom: auto; right: auto; left: max(10px, env(safe-area-inset-left)); transform: none; align-items: flex-start; }
#hud.touch-on .feed div { font-size: 12px; }
#hud.touch-on .feed div:nth-child(n+3) { display: none; }
#hud.touch-on .hud-bottom .dash { display: none; }
#hud.touch-on .hud-bottom { left: 50%; right: auto; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); gap: 10px; }
#hud.touch-on .hud-bottom .ink { height: 90px; width: 28px; }
#hud.touch-on .hud-bottom .special { width: 60px; height: 60px; }
#hud.touch-on .goal-tip { font-size: 14px; top: 60px; }

/* ---------- full screen & landscape on phones ---------- */
.fs-banner { position: absolute; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30; display: none; }
.fs-banner.on { display: block; }
.fs-go { font: inherit; font-weight: 800; font-size: 20px; padding: 14px 26px; border: 0; border-radius: 999px; background: #ffd23f; color: #1b1033; box-shadow: 0 6px 0 #c99a00, 0 10px 24px rgba(0,0,0,.35); animation: fsPulse 1.4s ease-in-out infinite; }
@keyframes fsPulse { 50% { transform: scale(1.06); } }
.fs-tip { max-width: min(92vw, 460px); background: #fff; color: #1b1033; border-radius: 18px; padding: 12px 16px; font-size: 15px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.fs-tip .shr { white-space: nowrap; font-weight: 800; }
.fs-tip .fs-x { display: block; margin: 8px auto 0; font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: 6px 18px; background: #ff3fa4; color: #fff; }
.rotate-cover { position: absolute; inset: 0; z-index: 40; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(27,16,51,.96); color: #fff; text-align: center; font-size: 22px; padding: 24px; }
.rotate-cover.on { display: flex; }
.rotate-cover span { font-size: 15px; opacity: .8; }
.rot-phone { font-size: 64px; animation: rotPhone 1.8s ease-in-out infinite; }
@keyframes rotPhone { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }

.legal-links { text-align: center; font-size: 13px; opacity: .7; margin: 18px 0 6px; }
.legal-links a { color: inherit; }

/* 5, 4, 3, 2, 1, GO! */
.center-msg.start-count { font-size: 150px; color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,.45), 0 0 30px rgba(255,63,164,.6); }
.center-msg.start-count.pop { animation: cdPop .9s ease-out; }
.center-msg.start-count.go { color: #ffd23f; font-size: 170px; animation: cdGo .9s ease-out forwards; }
@keyframes cdPop { 0% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(.85); opacity: .2; } }
@keyframes cdGo { 0% { transform: translate(-50%, -50%) scale(.6) rotate(-8deg); } 30% { transform: translate(-50%, -50%) scale(1.15) rotate(4deg); } 100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } }
@media (max-height: 500px) { .center-msg.start-count { font-size: 100px; } .center-msg.start-count.go { font-size: 120px; } }

.verdict .gallons { font-size: 18px; margin: 6px 0 0; }
.verdict .gallons b { text-shadow: 0 2px 0 rgba(0,0,0,.35); }

/* ---------- Splat Shop ---------- */
.pill.cash { background: #ffd23f; color: #1b1033; font-weight: 800; }
.shop-cash { margin-left: auto; font-size: 20px; background: #ffd23f; color: #1b1033; padding: 6px 16px; border-radius: 999px; font-weight: 700; }
.shop-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.shop-tabs button { font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: 8px 18px; background: rgba(255,255,255,.12); color: inherit; cursor: pointer; }
.shop-tabs button.on { background: #ff3fa4; color: #fff; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.shop-item { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; background: rgba(255,255,255,.08); border-radius: 18px 12px 20px 10px / 12px 20px 10px 18px; padding: 14px; }
.shop-item.have { outline: 2px solid #2fe08a; }
.shop-item .si-icon { font-size: 42px; line-height: 1; }
.shop-item small { opacity: .8; min-height: 34px; }
.shop-item button { margin-top: auto; width: 100%; }
.shop-item .swatches { display: flex; gap: 4px; }
.shop-item .swatches i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,.3); }
#locker .opt.locked { opacity: .55; position: relative; }
#locker .opt .lock { display: block; margin-top: 4px; font-weight: 800; color: #ffd23f; }
.cashgain { font-size: 16px; margin-left: 10px; background: #ffd23f; color: #1b1033; padding: 3px 10px; border-radius: 999px; vertical-align: middle; }
.center { text-align: center; }

/* =====================================================================
   SPLAT STREET THEME: loud turf-war menus. Black + lime + hot pink,
   chunky outlined lettering, tilted sticker labels, halftone dots,
   diagonal stripes, hard shadows, and paint splats everywhere.
   ===================================================================== */
:root {
  --bg: #0b0b10; --bg2: #16161f; --card: #15151d; --ink: #fff; --muted: #c9c9d6;
  --pink: #ff2fa0; --teal: #19e3c2; --gold: #ffe600; --lime: #c6ff00; --purple: #7a2cff; --red: #ff3b5c;
  --font: 'Rubik', system-ui, sans-serif; --display: 'Lilita One', 'Rubik', system-ui, sans-serif;
  --outline: #000;
}
body {
  background:
    radial-gradient(circle, rgba(255,255,255,.07) 1.4px, transparent 1.6px) 0 0 / 14px 14px,                  /* halftone dots */
    repeating-linear-gradient(-45deg, rgba(198,255,0,.05) 0 26px, transparent 26px 52px),                     /* diagonal stripes */
    radial-gradient(ellipse 60% 45% at 0% 0%, rgba(122,44,255,.55), transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(255,47,160,.35), transparent 70%),
    #0b0b10;
}
body::before { opacity: .9; background: var(--lime); filter: drop-shadow(6px 6px 0 #000); }
body::after { opacity: .85; background: var(--pink); filter: drop-shadow(6px 6px 0 #000); }

/* Chunky outlined display lettering */
h1, h2, .logo, button.big, .modes .mode, .verdict h1, .center-msg, .banner, .shop-cash, .timer, #queue-title {
  font-family: var(--display); font-weight: 400; letter-spacing: .5px;
}
h1 { font-size: 40px; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 4px 4px 0 #000; transform: rotate(-2deg); }
h2 { font-size: 24px; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; }
h2 small { font-family: var(--font); -webkit-text-stroke: 0; text-shadow: none; }

/* Logo: big chunky sticker letters */
.logo { gap: 4px; transform: rotate(-4deg); }
.logo span { -webkit-text-stroke: 3px #000; paint-order: stroke fill; }
.logo span:first-child { color: var(--pink); text-shadow: 4px 4px 0 #000; }
.logo span:last-child { color: var(--lime); text-shadow: 4px 4px 0 #000; transform: rotate(3deg) translateY(4px); display: inline-block; }

/* Panels: black cards with a thick colored edge, slightly tilted like stickers */
.card {
  background: radial-gradient(circle, rgba(255,255,255,.05) 1.2px, transparent 1.4px) 0 0 / 10px 10px, #121219;
  border: 4px solid var(--edge, var(--lime)); box-shadow: 8px 8px 0 #000;
}
.card.play { --edge: var(--lime); --corner: var(--pink); transform: rotate(-.6deg); }
.card.locker-mini { --edge: var(--pink); --corner: var(--lime); transform: rotate(.5deg); }
.card.rotation { --edge: var(--teal); --corner: var(--gold); transform: rotate(-.4deg); }
.card::before { filter: drop-shadow(4px 4px 0 #000); }
.card::after { background: var(--edge, var(--lime)); width: 16px; height: 30px; bottom: -28px; }
/* Section titles become tilted tags */
.card h2, #locker h2, .screen > h2 { background: var(--edge, var(--lime)); color: #000; -webkit-text-stroke: 0; text-shadow: none;
  padding: 4px 16px 2px; transform: rotate(-2deg); border-radius: 6px 14px 6px 12px; box-shadow: 4px 4px 0 #000; margin-bottom: 12px; }
.card h2::before, #locker h2::before { display: none; }
#locker h2:nth-of-type(3n+1) { --edge: var(--lime); } #locker h2:nth-of-type(3n+2) { --edge: var(--pink); color: #fff; } #locker h2:nth-of-type(3n) { --edge: var(--teal); }
.card.locker-mini h2 { color: #fff; }

/* Buttons: chunky paint blobs with black outline + hard shadow */
button {
  font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .4px; text-transform: none;
  background: var(--lime); color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000;
}
button:hover { filter: brightness(1.08); }
button:active { box-shadow: 1px 1px 0 #000; }
button.secondary { background: #fff; color: #000; box-shadow: 4px 4px 0 #000; }
button.danger { background: var(--red); color: #fff; }
button.ghost, .pill, .screen-head .back { font-family: var(--font); font-weight: 800; background: #1d1d27; color: #fff; border: 2px solid #000; box-shadow: 3px 3px 0 #000; }
.pill b { background: var(--lime); color: #000; }
.pill.cash { background: var(--gold); color: #000; font-family: var(--display); font-weight: 400; }
button:not(.ghost):not(.pill):not(.small):not(.close):not(.tbtn):not(.opt):not(.mode)::after { border: 3px solid #000; border-top: 0; bottom: -12px; }

/* Big Play splats: loud colors, black outline shadow */
.modes .mode { font-size: 34px; color: #fff !important; border: 0; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; }
.modes .mode::before { filter: drop-shadow(0 0 0 #000) drop-shadow(5px 6px 0 #000); }
.modes .mode:nth-child(1) { --c: var(--pink); }
.modes .mode:nth-child(2) { --c: var(--purple); }
.modes .mode:nth-child(3) { --c: var(--lime); }
.modes .mode:nth-child(3) { color: #fff !important; }
.modes .mode small { font-family: var(--font); font-weight: 900; font-style: italic; letter-spacing: 1px; text-transform: uppercase; -webkit-text-stroke: 1px #000; }

/* Chips & text blocks */
.goal { background: var(--gold); color: #000; font-weight: 800; border: 3px solid #000; box-shadow: 4px 4px 0 #000; transform: rotate(-1deg); }
.goal b { color: var(--pink); -webkit-text-stroke: .5px #000; }
input, select { background: #fff; color: #000; border: 3px solid #000; font-weight: 700; }
input:focus, select:focus { outline: none; box-shadow: 0 0 0 3px var(--lime); }
#rotation-list .stage { background: #1d1d27; border: 2px solid #000; box-shadow: 3px 3px 0 #000; }
#rotation-list .stage:nth-child(odd) { transform: rotate(-.7deg); } #rotation-list .stage:nth-child(even) { transform: rotate(.6deg); }
#char-preview { background: radial-gradient(circle, rgba(0,0,0,.25) 1.5px, transparent 1.7px) 0 0 / 12px 12px, linear-gradient(160deg, var(--pink), var(--purple)); border: 3px solid #000; box-shadow: 5px 5px 0 #000; }
#loadout-summary b { color: var(--lime); }
.opt { background: #1d1d27; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
.opt.on { background: #26262f; outline: 3px solid var(--lime); outline-offset: -6px; }
.opt.on::after { background: var(--pink); color: #fff; }
#locker .opt .lock { color: var(--gold); -webkit-text-stroke: .5px #000; }
.tabs button, .shop-tabs button { font-family: var(--display); font-weight: 400; background: #1d1d27; color: #fff; border: 3px solid #000; box-shadow: 3px 3px 0 #000; }
.tabs button.on, .shop-tabs button.on { background: var(--pink); color: #fff; transform: rotate(-2deg); }

/* Waiting / queue screen, modal, toasts */
.overlay { background:
  radial-gradient(circle, rgba(255,255,255,.06) 1.4px, transparent 1.6px) 0 0 / 14px 14px,
  repeating-linear-gradient(-45deg, rgba(255,47,160,.12) 0 30px, rgba(122,44,255,.12) 30px 60px), rgba(8,8,12,.94);
  animation: stripes 3s linear infinite; }
@keyframes stripes { to { background-position: 0 0, 85px 0, 0 0; } }
.queue-box, .modal-box { background: #121219; border: 4px solid var(--lime); box-shadow: 10px 10px 0 #000; }
#queue-title { font-size: 34px; color: var(--lime); -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 4px 4px 0 #000; transform: rotate(-2deg); }
.toast { background: #fff; color: #000; font-weight: 800; border: 3px solid #000; box-shadow: 5px 5px 0 #000; }

/* Results */
.verdict h1.win { color: var(--lime); -webkit-text-stroke: 3px #000; text-shadow: 6px 6px 0 #000; }
.verdict h1.lose { color: var(--pink); -webkit-text-stroke: 3px #000; text-shadow: 6px 6px 0 #000; }
.xp-box, .res-team { background: #121219; border: 3px solid #000; box-shadow: 5px 5px 0 #000; }
.bars { border: 3px solid #000; box-shadow: 5px 5px 0 #000; }

/* Shop */
.shop-item { background: #1a1a23; border: 3px solid #000; box-shadow: 6px 6px 0 #000; }
.shop-item:nth-child(odd) { transform: rotate(-.8deg); } .shop-item:nth-child(even) { transform: rotate(.7deg); }
.shop-item:hover { transform: rotate(0) scale(1.03); outline: 3px solid var(--pink); }
.shop-item.have { outline: 3px solid var(--lime); }
.shop-cash { background: var(--gold); color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000; transform: rotate(2deg); }

/* Topbar: black strip with a lime edge */
#topbar { background: #0b0b10; border-bottom: 4px solid var(--lime); box-shadow: 0 5px 0 #000; }
.legal-links { opacity: .8; }

/* In-match push-to-talk */
.mic { position: absolute; z-index: 6; top: max(10px, env(safe-area-inset-top)); left: max(62px, calc(env(safe-area-inset-left) + 62px));
  width: 56px; height: 56px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 22px; background: #fff; color: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
.mic small { font-size: 9px; font-weight: 900; margin-top: -2px; }
.mic.talking { background: var(--red); color: #fff; animation: pulse .8s infinite; }
.mic::after { display: none !important; }

/* =====================================================================
   POLISH PASS: readability, consistency, in-game HUD
   ===================================================================== */
/* Locker cards: display font only for the name, clean text for details */
.opt { font-family: var(--font); font-weight: 600; font-size: 13.5px; line-height: 1.35; text-align: left; color: #e9e9f2; padding: 14px; }
.opt b { font-family: var(--display); font-weight: 400; font-size: 19px; color: #fff; display: block; margin-bottom: 4px; letter-spacing: .3px; }
.opt small { color: #b9b9c8; }
.opt .ab { display: inline-block; margin: 6px 0 2px; background: var(--gold); color: #000; font-weight: 800; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; }
#locker .opt.locked { opacity: .7; filter: saturate(.4); }
#locker .opt .lock { font-family: var(--display); font-size: 15px; }
#locker .grid, .shop-grid { gap: 14px; }
.hint a, .help-body a { color: var(--teal); }

/* Sticker treatment for the remaining plain boxes */
.member, .stat, .badge, .voice-box, .friend, .lb-row { background: #1a1a23; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
.member { min-width: 170px; } .member b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.member:nth-child(odd) { transform: rotate(-1deg); } .member:nth-child(even) { transform: rotate(1deg); }
.stat b { font-family: var(--display); font-weight: 400; color: var(--lime); font-size: 28px; }
.badge { font-weight: 600; } .badge.locked { opacity: .45; }
.badge:not(.locked) { background: #23232f; outline: 2px solid var(--gold); outline-offset: -5px; }
.voice-box { padding: 14px 18px; } .voice-box > b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.voice-peer { display: inline-flex; align-items: center; gap: 6px; background: #26262f; border: 2px solid #000; border-radius: 999px; padding: 4px 10px; margin: 4px 6px 0 0; }
.voice-peer.talking { outline: 3px solid var(--lime); }
.code { background: #fff; color: #000; -webkit-text-stroke: 0; text-shadow: none; padding: 2px 14px; border: 3px solid #000; box-shadow: 4px 4px 0 #000; display: inline-block; transform: rotate(2deg); letter-spacing: 3px; }
#party-status { font-weight: 800; color: var(--lime); }

/* Results */
.cashgain, .newbadge { -webkit-text-stroke: 0; text-shadow: none; font-family: var(--font); font-weight: 900; }
.newbadge { background: var(--gold); color: #000; border: 2px solid #000; border-radius: 999px; padding: 3px 12px; display: inline-block; margin: 3px; }
.cashgain { border: 2px solid #000; }
.xp-box h2 { -webkit-text-stroke: 0; text-shadow: 2px 2px 0 #000; }
.xp-box .line { font-weight: 600; padding: 2px 0; border-bottom: 1px dashed rgba(255,255,255,.12); }
.res-team { font-weight: 600; }
.verdict .hint { font-weight: 700; font-size: 15px; }

/* Settings and help */
.modal-box { max-width: min(94vw, 620px); }
.modal-box label { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 12px; font-weight: 700; margin: 6px 0; }
.modal-box label.stat { display: block; }
.modal-box label:has(input[type=checkbox]) { display: flex; }
input[type=range] { accent-color: var(--lime); padding: 0; border: 0; background: transparent; height: 26px; width: 100%; }
input[type=checkbox] { accent-color: var(--lime); width: 20px; height: 20px; }
.modal-box h3 { font-family: var(--display); font-weight: 400; font-size: 19px; margin: 16px 0 6px; color: var(--lime); }
.help-tabs { flex-wrap: wrap; } .help-tabs button { flex: 0 1 auto; font-size: 15px; padding: 6px 14px; }
.help-body { font-size: 15.5px; line-height: 1.5; max-height: 56vh; overflow: auto; padding-right: 6px; }
.help-body li { margin: 6px 0; } .help-body ol, .help-body ul { padding-left: 22px; }
kbd { font-family: var(--font); font-weight: 800; font-size: .85em; background: #fff; color: #000; border: 2px solid #000; border-bottom-width: 4px; border-radius: 6px; padding: 0 6px; white-space: nowrap; }

/* Toasts sit above the bottom edge without covering buttons for long */
.toast button { font-size: 14px; padding: 4px 12px; box-shadow: 2px 2px 0 #000; }

/* In-game HUD: match the sticker look */
.hud-bottom { bottom: max(30px, calc(env(safe-area-inset-bottom) + 30px)); }
.timer { font-size: 40px; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; }
.timer.final { color: var(--gold); }
.team-dot { border: 3px solid #000; box-shadow: 3px 3px 0 #000; width: 28px; height: 28px; }
.ink { border: 3px solid #000 !important; box-shadow: 3px 3px 0 #000; background: rgba(0,0,0,.55); }
.special .sp-name, .dash small, .dash .lbl { font-family: var(--display); font-size: 13px; -webkit-text-stroke: .8px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; color: #fff; }
.minimap { border: 3px solid #000 !important; box-shadow: 4px 4px 0 #000; }
.nametag .nm { font-family: var(--display); font-weight: 400; -webkit-text-stroke: .8px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; letter-spacing: .3px; }
.feed div { background: #fff; color: #000; font-weight: 800; border: 2px solid #000; box-shadow: 3px 3px 0 #000; }
.banner { font-family: var(--display); border: 4px solid #000; box-shadow: 6px 6px 0 #000; -webkit-text-stroke: 0; }
.goal-tip { background: var(--gold); color: #000; font-weight: 800; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
#quit { background: #fff; color: #000; border: 3px solid #000; box-shadow: 3px 3px 0 #000; font-weight: 900; }
.center-msg.judge { color: var(--lime); -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 4px 4px 0 #000; }
.center-msg.respawn { background: #fff; color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }

.opt { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; }

/* ---------- daily card ---------- */
.daily { background: #1a1a23; border: 3px solid #000; box-shadow: 4px 4px 0 #000; border-radius: 16px 10px 16px 10px; padding: 10px 12px; margin: 12px 0 4px; font-size: 14px; }
.daily-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.daily-head b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.daily-head button { margin-left: auto; }
.daily .streak { background: var(--pink); color: #fff; font-weight: 800; border-radius: 999px; padding: 1px 10px; border: 2px solid #000; }
.chal { display: grid; grid-template-columns: 1fr 70px auto; align-items: center; gap: 10px; padding: 3px 0; font-weight: 700; }
.chal i { height: 10px; background: #000; border-radius: 999px; overflow: hidden; display: block; }
.chal i u { display: block; height: 100%; background: var(--lime); }
.chal b { color: var(--gold); white-space: nowrap; } .chal.done { opacity: .6; } .chal.done b { color: var(--lime); }
.xp-box .daily-done b { color: var(--gold); }

/* ---------- hit marker ---------- */
.hitmark { position: absolute; left: 50%; top: 46%; width: 44px; height: 44px; margin: -22px; pointer-events: none; opacity: 0; }
.hitmark::before, .hitmark::after { content: ''; position: absolute; left: 50%; top: 0; width: 6px; height: 100%; margin-left: -3px; background: #fff; border: 2px solid #000; border-radius: 3px; transform: rotate(45deg); }
.hitmark::after { transform: rotate(-45deg); }
.hitmark.on { animation: hitPop .22s ease-out; }
.hitmark.on.splat { animation: hitPop .45s ease-out; } .hitmark.splat::before, .hitmark.splat::after { background: var(--gold); width: 9px; margin-left: -4.5px; }
@keyframes hitPop { 0% { opacity: 1; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.25); } 100% { opacity: 0; transform: scale(1.5); } }

/* ---------- quick chat ---------- */
.qc { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); z-index: 6; pointer-events: auto; }
.qc-open { width: 46px; height: 46px; padding: 0; font-size: 20px; background: #fff; }
.qc-open::after, .qc-menu button::after { display: none !important; }
.qc-menu { display: none; position: absolute; left: 54px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 6px; width: max-content; }
.qc.open .qc-menu { display: flex; }
.qc-menu button { font-family: var(--font); font-weight: 800; font-size: 14px; padding: 6px 12px; background: #fff; text-align: left; }
#hud.touch-on .qc { top: auto; bottom: max(270px, calc(env(safe-area-inset-bottom) + 270px)); transform: none; }
#hud.touch-on .qc kbd { display: none; }
.nametag .bubble { display: none; position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); white-space: nowrap; background: #fff; color: #000; font-weight: 800; font-size: 13px; border: 2px solid #000; border-radius: 12px; padding: 2px 10px; margin-bottom: 4px; }
.nametag .bubble.show { display: block; animation: bubble 2.6s ease-out forwards; }
@keyframes bubble { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 8%, 80% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; } }

/* ---------- animated title screen ---------- */
#title { position: fixed; inset: 0; z-index: 80; overflow: hidden; transition: opacity .4s, transform .4s;
  background:
    radial-gradient(circle, rgba(255,255,255,.08) 1.6px, transparent 1.8px) 0 0 / 16px 16px,
    repeating-linear-gradient(-45deg, rgba(198,255,0,.07) 0 30px, transparent 30px 60px),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(255,47,160,.55), transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(122,44,255,.7), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(25,227,194,.45), transparent 70%), #0b0b10; }
#title.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
#title canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.title-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; padding: max(18px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom)); }
.title-logo { font-family: var(--display); font-size: clamp(54px, 13vw, 150px); line-height: .9; display: flex; gap: .12em; transform: rotate(-4deg); animation: logoIn .7s cubic-bezier(.2,1.6,.4,1) both; }
.title-logo span { -webkit-text-stroke: clamp(3px, .5vw, 7px) #000; paint-order: stroke fill; text-shadow: clamp(4px, .7vw, 9px) clamp(4px, .7vw, 9px) 0 #000; }
.title-logo span:first-child { color: var(--pink); } .title-logo span:last-child { color: var(--lime); transform: rotate(4deg) translateY(.06em); display: inline-block; }
@keyframes logoIn { from { transform: rotate(-14deg) scale(2.2); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.title-tag { margin-top: clamp(6px, 1.2vh, 14px); font-family: var(--display); font-size: clamp(15px, 2.6vw, 28px); letter-spacing: 3px; background: var(--gold); color: #000; border: 3px solid #000; box-shadow: 5px 5px 0 #000; padding: 2px 18px; transform: rotate(2deg); animation: logoIn .7s .15s cubic-bezier(.2,1.6,.4,1) both; }
.title-play { pointer-events: auto; margin-top: auto; font-size: clamp(30px, 5vw, 54px) !important; padding: 12px 54px !important; background: var(--lime); border: 5px solid #000 !important; box-shadow: 8px 8px 0 #000 !important; animation: playPulse 1.1s ease-in-out infinite; }
.title-play::after { display: none !important; }
@keyframes playPulse { 50% { transform: scale(1.07) rotate(-1.5deg); } }
.title-sub { margin-top: 12px; font-weight: 800; font-size: clamp(12px, 1.6vw, 16px); color: #fff; text-shadow: 2px 2px 0 #000; }
.title-splat { position: absolute; pointer-events: none; -webkit-mask: url(/img/splat-1.svg) center / contain no-repeat; mask: url(/img/splat-1.svg) center / contain no-repeat; animation: splatIn .5s cubic-bezier(.2,1.7,.4,1) both; }
.title-splat.a { width: 34vmin; height: 34vmin; left: -6vmin; top: 12vh; background: var(--pink); animation-delay: .3s; }
.title-splat.b { width: 30vmin; height: 30vmin; right: -5vmin; top: 6vh; background: var(--lime); -webkit-mask-image: url(/img/splat-2.svg); mask-image: url(/img/splat-2.svg); animation-delay: .5s; }
.title-splat.c { width: 26vmin; height: 26vmin; right: 8vw; bottom: 18vh; background: var(--teal); -webkit-mask-image: url(/img/splat-3.svg); mask-image: url(/img/splat-3.svg); animation-delay: .7s; opacity: .9; }
@keyframes splatIn { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
@media (max-height: 460px) { .title-logo { font-size: clamp(40px, 16vh, 90px); } .title-sub { display: none; } .title-play { padding: 6px 40px !important; } }

/* ---------- menus share the title screen's backdrop; livelier text ---------- */
body {
  background:
    radial-gradient(circle, rgba(255,255,255,.08) 1.6px, transparent 1.8px) 0 0 / 16px 16px,
    repeating-linear-gradient(-45deg, rgba(198,255,0,.07) 0 30px, transparent 30px 60px),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(255,47,160,.55), transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(122,44,255,.7), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(25,227,194,.45), transparent 70%), #0b0b10;
  background-attachment: fixed;
}
#topbar { background: rgba(11,11,16,.82); backdrop-filter: blur(6px); }
.card { background: radial-gradient(circle, rgba(255,255,255,.05) 1.2px, transparent 1.4px) 0 0 / 10px 10px, rgba(16,16,24,.9); }
/* Section tags pop in and wobble; the tagline shouts */
.card h2, #locker h2, .screen > h2 { font-size: 28px; letter-spacing: 1px; animation: tagIn .5s cubic-bezier(.2,1.7,.4,1) both, tagWobble 3.2s ease-in-out .6s infinite; transform-origin: 20% 60%; }
.card.locker-mini h2 { animation-delay: .1s, .9s; } .card.rotation h2 { animation-delay: .2s, 1.3s; }
@keyframes tagIn { from { transform: rotate(-14deg) scale(0); } to { transform: rotate(-2deg) scale(1); } }
@keyframes tagWobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(1.5deg) scale(1.04); } }
.goal { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .5px; line-height: 1.2; }
.goal b { color: var(--pink); -webkit-text-stroke: 0; }
.screen-head h1 { font-size: 48px; color: var(--lime); -webkit-text-stroke: 3px #000; text-shadow: 5px 5px 0 #000; }
.modes .mode { font-size: 38px; animation: modeBob 2.4s ease-in-out infinite; }
.modes .mode:nth-child(2) { animation-delay: .3s; } .modes .mode:nth-child(3) { animation-delay: .6s; }
@keyframes modeBob { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
.modes .mode small { font-size: 16px; }
#rotation-list .stage b, #rotation-list .stage > span:first-child { font-family: var(--display); font-weight: 400; font-size: 18px; }
#queue-title { animation: tagWobble 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .card h2, #locker h2, .modes .mode, #queue-title, .title-play { animation: none !important; } }

#friend-search { margin: 6px 0 10px; } #friend-search .friend { padding: 6px 10px; }
#party-versus[hidden] { display: none !important; }

/* ---- Splat City (career) ---- */
.career-btn { width: 100%; margin-top: 10px; padding: 14px 16px; font-size: 22px; font-weight: 900; letter-spacing: 1px; color: #14141d; background: linear-gradient(100deg, #ffd23f, #ff9f1c 55%, #ff2fa0); border: 3px solid #14141d; border-radius: 22px 12px 20px 10px / 12px 20px 10px 18px; box-shadow: 0 5px 0 #14141d; cursor: pointer; }
.career-btn small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0; opacity: .85; }
.career-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #14141d; }
.career { position: absolute; top: max(64px, calc(env(safe-area-inset-top) + 56px)); left: 10px; width: min(250px, 42vw); background: rgba(12,12,20,.72); border: 2px solid #ffd23f; border-radius: 16px 9px 14px 8px / 9px 14px 8px 12px; padding: 8px 10px; font-size: 13px; line-height: 1.25; pointer-events: none; }
.career .c-rank { font-size: 11px; color: #ffd23f; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.career b { font-size: 16px; } .career p { margin: 2px 0 6px; opacity: .9; } .career small { opacity: .75; }
.career .c-bar { position: relative; height: 18px; background: rgba(255,255,255,.15); border-radius: 9px; overflow: hidden; margin-bottom: 3px; }
.career .c-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffd23f, #ff9f1c); transition: width .3s; }
.career .c-bar span { position: relative; display: block; text-align: center; font-weight: 800; font-size: 12px; line-height: 18px; text-shadow: 0 1px 2px #000; }
#hud.touch-on .career { top: 52px; right: auto; left: 50%; transform: translateX(-50%); width: min(300px, 44vw); font-size: 11px; padding: 5px 8px; }
#hud.touch-on .career p, #hud.touch-on .career small { display: none; }
#hud.touch-on .career b { font-size: 13px; }

.districts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
@media (max-width: 620px) { .districts { grid-template-columns: 1fr; } }
.district { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 14px 9px 13px 8px / 9px 13px 8px 12px; }
.district .d-n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: #14141d; color: #ffd23f; display: grid; place-items: center; font-weight: 900; }
.district .d-t { flex: 1; min-width: 0; } .district .d-t b { display: block; } .district .d-t small { display: block; font-weight: 600; opacity: .8; font-size: 11px; }
.district .d-p { font-weight: 900; }
.district.cur { outline: 3px solid #ffd23f; }
.district.locked { opacity: .45; cursor: not-allowed; }
.district.locked .d-t small { display: none; }
.district { padding: 6px 10px; }

/* ---- Home: hero stage (your character, big, in the middle) ---- */
.home-grid { grid-template-columns: 1.15fr 1.25fr 0.9fr; align-items: start; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.hero #char-preview { width: 100%; max-width: none; height: min(62vh, 560px); background: radial-gradient(ellipse at 50% 78%, rgba(198,255,0,.22), transparent 55%), radial-gradient(ellipse at 50% 40%, rgba(255,47,160,.28), transparent 62%); border: 0; box-shadow: none; border-radius: 0; }
.hero-plate { margin-top: -34px; width: min(100%, 440px); background: rgba(14,14,24,.82); border: 3px solid #000; box-shadow: 6px 6px 0 #000; border-radius: 22px 12px 20px 10px / 12px 20px 10px 18px; padding: 12px 14px; text-align: center; backdrop-filter: blur(6px); transform: rotate(-.6deg); }
.hero-plate #loadout-summary { font-size: 14px; line-height: 1.35; margin-bottom: 8px; }
.hero-plate #loadout-summary > b:first-child { display: block; font-size: 30px; letter-spacing: 1px; text-transform: uppercase; color: var(--lime); text-shadow: 3px 3px 0 #000; line-height: 1; margin-bottom: 4px; }
.hero-plate .row { justify-content: center; }
@media (max-width: 1000px) { .home-grid { grid-template-columns: 1fr 1fr; } .hero { grid-column: 1 / -1; grid-row: 1; } .hero #char-preview { height: min(44vh, 380px); } }
@media (max-width: 640px) { .home-grid { grid-template-columns: 1fr; } .hero #char-preview { height: 300px; } }

/* =====================================================================
   STUDIO THEME: one design system for every screen.
   Ink-black surfaces, glass panels, one typeface for UI (Outfit), one for
   display (Lilita One), three accents. No tilts, no stickers, no drips.
   ===================================================================== */
:root {
  --ink0: #07080f; --ink1: #0d0f1a; --ink2: #151827; --ink3: #1f2337;
  --line: rgba(255,255,255,.10); --line2: rgba(255,255,255,.18);
  --txt: #f3f5ff; --mute: #98a1c2;
  --lime: #c8ff1a; --pink: #ff2e88; --cyan: #2fd4ff; --gold: #ffc93c; --purple: #8a5cff; --teal: #2fd4ff; --red: #ff4d67;
  --font: 'Outfit', 'Rubik', system-ui, sans-serif; --display: 'Lilita One', 'Outfit', system-ui, sans-serif;
  --r: 18px; --r-sm: 12px; --shadow: 0 18px 50px rgba(0,0,0,.5);
}
html, body { background: var(--ink0); color: var(--txt); font-family: var(--font); }
body { background:
  radial-gradient(1100px 700px at 12% -10%, rgba(255,46,136,.20), transparent 60%),
  radial-gradient(900px 700px at 100% 110%, rgba(47,212,255,.16), transparent 60%),
  radial-gradient(700px 500px at 60% 30%, rgba(138,92,255,.14), transparent 65%),
  var(--ink0) !important; }
body::before, body::after { display: none !important; }

/* ---- Type */
h1, h2, .screen > h2, #locker h2, .card h2 { font-family: var(--font) !important; font-weight: 800 !important; letter-spacing: .2px; text-transform: none; -webkit-text-stroke: 0 !important; text-shadow: none !important; color: var(--txt) !important; background: none !important; padding: 0 !important; margin: 18px 0 10px !important; transform: none !important; animation: none !important; border: 0 !important; box-shadow: none !important; width: auto !important; }
h1 { font-size: 30px; } h2 { font-size: 19px; }
.card h2::before, #locker h2::before, .card h2::after { display: none !important; }
h2 small { color: var(--mute); font-weight: 600; }
.hint, small { color: var(--mute); }

/* ---- Buttons: flat, confident, no drips */
button { font-family: var(--font); font-weight: 700; border-radius: var(--r-sm) !important; border: 1px solid transparent !important; box-shadow: none !important; background: var(--lime); color: #0b0d12; transition: transform .12s ease, filter .12s ease, background .12s ease; transform: none; text-shadow: none; -webkit-text-stroke: 0; }
button::after, button::before { display: none !important; }
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:active { transform: translateY(1px) scale(.99); box-shadow: none !important; }
button.secondary, button.ghost, button.back, .mode-pick { background: rgba(255,255,255,.08) !important; color: var(--txt) !important; border: 1px solid var(--line2) !important; }
button.secondary:hover, button.ghost:hover { background: rgba(255,255,255,.14) !important; }
button.danger { background: var(--red) !important; color: #fff !important; }
button.big { font-family: var(--font) !important; font-weight: 800; font-size: 20px; padding: 16px 20px; letter-spacing: .2px; }
button.big small { color: inherit; opacity: .7; font-weight: 600; }
.mode-pick.on { background: var(--lime) !important; color: #0b0d12 !important; border-color: transparent !important; }
input, select { background: var(--ink1) !important; border: 1px solid var(--line2) !important; border-radius: var(--r-sm) !important; color: var(--txt) !important; box-shadow: none !important; font-family: var(--font); }
input:focus, select:focus { outline: 2px solid var(--lime); outline-offset: 1px; }

/* ---- Top bar */
#topbar { background: rgba(7,8,15,.72) !important; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line) !important; box-shadow: none !important; padding: 10px 22px; }
.logo { transform: none !important; font-family: var(--display); font-size: 26px; letter-spacing: 1px; gap: 7px; }
.logo span { text-shadow: none !important; -webkit-text-stroke: 0 !important; filter: none !important; }
.logo span:first-child { color: var(--pink) !important; } .logo span:last-child { color: var(--lime) !important; }
.pill { background: rgba(255,255,255,.07) !important; border: 1px solid var(--line2) !important; color: var(--txt) !important; border-radius: 999px !important; box-shadow: none !important; font-weight: 700; transform: none !important; }
.pill.cash { color: var(--gold) !important; }

/* ---- Surfaces: every card, box and modal */
.card, .queue-box, .modal-box, .xp-box, .voice-box, .res-team, .member, .friend, .stat, .badge, .opt, .daily, .goal, .code, #rotation-list .stage, .district {
  background: rgba(21,24,39,.78) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important; box-shadow: none !important; transform: none !important; color: var(--txt); }
.card, .queue-box, .modal-box { backdrop-filter: blur(14px); box-shadow: var(--shadow) !important; }
.card::before, .card::after, .queue-box::before, .queue-box::after, .modal-box::before, .modal-box::after { display: none !important; }
.modal-box { border-color: var(--line2) !important; padding: 26px !important; }
.opt { border-radius: var(--r-sm) !important; text-align: left; }
.opt.on { border-color: var(--lime) !important; background: rgba(200,255,26,.10) !important; box-shadow: inset 0 0 0 1px var(--lime) !important; }
.opt:hover { border-color: var(--line2) !important; }
.district { border-radius: var(--r-sm) !important; color: var(--txt) !important; }
.district.cur { outline: 0 !important; border-color: var(--lime) !important; background: rgba(200,255,26,.10) !important; }
.district .d-n { background: var(--ink0); color: var(--lime); }
.toast { border-radius: var(--r-sm) !important; border: 1px solid var(--line2) !important; background: rgba(13,15,26,.94) !important; color: var(--txt) !important; box-shadow: var(--shadow) !important; transform: none !important; }
.event { border-radius: var(--r) !important; border: 1px solid var(--line2) !important; box-shadow: none !important; transform: none !important; font-size: 15px !important; padding: 10px 14px !important; margin: 0 0 12px !important; text-align: left !important; }
.event::before, .event::after { display: none !important; }
.event small { font-size: 12px !important; }
.screen { max-width: 1240px; }
.screen-head h1 { margin: 0 !important; }

/* =====================================================================
   LOBBY (home): your character fills the stage, panels float either side.
   ===================================================================== */
#home { max-width: none; height: 100%; display: flex; flex-direction: column; }
#screens:has(#home:not(.hidden)) { padding: 0; overflow: hidden auto; }
.lobby { position: relative; flex: 1; min-height: 560px; display: grid; grid-template-columns: minmax(300px, 380px) 1fr minmax(280px, 340px); gap: 18px; padding: 18px 22px 8px; align-items: start; }
.lobby #char-preview { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; pointer-events: none; }
.lb-left, .lb-right { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; }
.lb-panel { background: rgba(13,15,26,.74); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.lb-label { font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.lb-label::before { content: ''; width: 18px; height: 3px; border-radius: 2px; background: var(--lime); }
.lb-label small { margin-left: auto; letter-spacing: .4px; text-transform: none; font-weight: 600; }

.lb-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#home .lb-mode { position: relative; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 12px; border-radius: 16px !important; color: #0b0d12 !important; overflow: hidden; animation: none !important; font-size: inherit; -webkit-text-stroke: 0 !important; text-shadow: none !important; }
#home .lb-mode b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: .95; letter-spacing: .5px; }
#home .lb-mode span { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; opacity: .75; }
#home .lb-mode.m1 { background: linear-gradient(150deg, #ff7ab6, var(--pink)) !important; color: #fff !important; }
#home .lb-mode.m2 { background: linear-gradient(150deg, #7ee6ff, var(--cyan)) !important; }
#home .lb-mode.m3 { background: linear-gradient(150deg, #e2ff7a, var(--lime)) !important; }
#home .lb-mode::before { display: block !important; content: ''; position: absolute; right: -22px; top: -22px; width: 86px; height: 86px; border-radius: 50%; background: rgba(255,255,255,.28); -webkit-mask: none; mask: none; filter: none; transform: none; }
#home .lb-mode:hover { transform: translateY(-3px); filter: none; box-shadow: 0 12px 28px rgba(0,0,0,.45) !important; }

#home .lb-career { width: 100%; margin-top: 10px; padding: 16px; text-align: left; display: grid; gap: 2px; border-radius: 16px !important; color: #fff !important;
  background: linear-gradient(120deg, rgba(138,92,255,.95), rgba(255,46,136,.92) 70%, rgba(255,201,60,.95)) !important; position: relative; overflow: hidden; }
#home .lb-career .lc-k { font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; opacity: .85; }
#home .lb-career b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: .5px; }
#home .lb-career .lc-s { font-size: 12.5px; font-weight: 600; opacity: .92; }
#home .lb-career::before { display: block !important; content: '→'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 800; opacity: .9; background: none; width: auto; height: auto; -webkit-mask: none; mask: none; }

.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
#home .lb-tile { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 11px 12px; background: rgba(255,255,255,.06) !important; border: 1px solid var(--line) !important; color: var(--txt) !important; border-radius: 14px !important; }
#home .lb-tile i { grid-row: 1 / 3; font-style: normal; font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; background: rgba(255,255,255,.08); border-radius: 10px; }
#home .lb-tile b { font-size: 14.5px; font-weight: 800; line-height: 1.15; }
#home .lb-tile span { font-size: 11.5px; color: var(--mute); font-weight: 500; line-height: 1.2; }
#home .lb-tile:hover { background: rgba(255,255,255,.11) !important; border-color: var(--line2) !important; }

/* Hero: name plate sits under the character */
.lb-hero { position: relative; z-index: 2; align-self: end; justify-self: center; width: min(100%, 460px); margin-bottom: 6px; }
.lb-plate { text-align: center; padding: 14px 18px 16px; background: linear-gradient(180deg, rgba(13,15,26,.0), rgba(13,15,26,.82) 34%); border-radius: var(--r); }
.ls-name { font-family: var(--display); font-size: 46px; line-height: 1; letter-spacing: 2px; text-transform: uppercase; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.ls-ab { font-size: 13.5px; color: var(--mute); margin-top: 6px; } .ls-ab b { color: var(--lime); font-weight: 800; margin-right: 4px; }
.ls-gear { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.ls-gear span { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.lb-plate-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
#home .lb-btn { padding: 11px 26px; font-size: 15px; font-weight: 800; border-radius: 999px !important; background: var(--lime) !important; color: #0b0d12 !important; }
#home .lb-btn.alt { background: rgba(255,255,255,.10) !important; color: var(--txt) !important; border: 1px solid var(--line2) !important; }

/* Right column content */
.lb-right .daily { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
.daily-head b { font-family: var(--font) !important; font-weight: 800 !important; font-size: 15px !important; }
.daily .streak { border: 0 !important; background: rgba(255,46,136,.18) !important; color: #ff8fc0 !important; }
#rotation-list .stage { padding: 10px 12px !important; margin-bottom: 8px; border-radius: 14px !important; font-size: 14px; background: rgba(255,255,255,.05) !important; }
#rotation-list .stage b { font-weight: 800; } #rotation-list .stage small { font-size: 12px; line-height: 1.25; display: inline-block; }
#rotation-list .stage.event { background: linear-gradient(110deg, rgba(227,38,47,.35), rgba(31,166,74,.35)) !important; }
#leaderboard { margin: 0; padding-left: 20px; font-size: 14px; } #leaderboard li { margin: 4px 0; }
#home .legal-links { margin: 2px 0 8px; font-size: 12px; position: relative; z-index: 2; }

@media (max-width: 1080px) {
  .lobby { grid-template-columns: 1fr 1fr; padding: 14px; }
  .lobby #char-preview { height: 420px; }
  .lb-hero { grid-column: 1 / -1; grid-row: 1; margin-top: 250px; }
  .lb-left { grid-row: 2; } .lb-right { grid-row: 2; }
  #home { height: auto; }
}
@media (max-width: 680px) {
  .lobby { grid-template-columns: 1fr; gap: 12px; padding: 10px; }
  .lobby #char-preview { height: 320px; }
  .lb-hero { margin-top: 170px; grid-row: 1; } .lb-left { grid-row: 2; } .lb-right { grid-row: 3; }
  .ls-name { font-size: 36px; }
  #topbar { padding: 8px 12px; } .logo { font-size: 20px; }
}

.lobby::before { content: ''; position: absolute; left: 50%; top: 8%; width: min(760px, 70%); height: 78%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,46,136,.26), rgba(138,92,255,.14) 55%, transparent 75%); filter: blur(6px); }
#rotation-list .stage b { font-family: var(--font) !important; font-size: 15px; -webkit-text-stroke: 0 !important; text-shadow: none !important; letter-spacing: 0; }
#rotation-list .stage small { color: var(--mute) !important; text-shadow: none !important; -webkit-text-stroke: 0 !important; font-weight: 500; }
#toasts { top: 76px !important; bottom: auto !important; }

@media (max-width: 680px) { #toasts { top: auto !important; bottom: 14px !important; } #btn-profile { white-space: nowrap; } }

/* Career tracker: several live missions */
.career { background: rgba(13,15,26,.78) !important; border: 1px solid var(--line2) !important; border-radius: 14px !important; width: min(270px, 44vw); font-family: var(--font); }
.career .c-rank { color: var(--lime); letter-spacing: .8px; margin-bottom: 6px; }
.career .c-ms { margin-bottom: 7px; } .career .c-ms .c-t { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.career .c-ms.big .c-t { font-size: 15px; } .career .c-ms .c-t span { color: var(--gold); font-weight: 800; }
.career .c-ms p { margin: 1px 0 4px; font-size: 12px; opacity: .85; }
.career .c-bar { height: 15px; border-radius: 8px; margin: 2px 0 0; } .career .c-bar span { font-size: 11px; line-height: 15px; }
.career .c-bar i { background: linear-gradient(90deg, var(--lime), #7dff6a); }
#hud.touch-on .career .c-ms:not(.big) { display: none; }

/* ---- Splat Pass, weekly, featured mode ---- */
#home .lb-pass { display: block; width: 100%; text-align: left; color: var(--txt) !important; background: linear-gradient(135deg, rgba(138,92,255,.30), rgba(13,15,26,.78) 60%) !important; border: 1px solid var(--line2) !important; border-radius: var(--r) !important; padding: 16px; cursor: pointer; }
#home .lb-pass:hover { border-color: var(--lime) !important; transform: translateY(-2px); }
.pass-top { display: flex; align-items: center; gap: 14px; }
.pass-tier { display: flex; align-items: baseline; gap: 4px; } .pass-tier b { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: .9; color: var(--lime); } .pass-tier span { color: var(--mute); font-weight: 700; font-size: 13px; }
.pass-info { display: grid; gap: 2px; min-width: 0; } .pass-info b { font-size: 16px; font-weight: 800; } .pass-info span { font-size: 12.5px; color: var(--mute); font-weight: 500; }
.pass-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 12px; } .pass-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--purple), var(--pink), var(--gold)); transition: width .5s; }
.pass-tag { margin-top: 10px; font-size: 12px; font-weight: 800; color: var(--gold); letter-spacing: .3px; }
.daily-head.wk { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
#home .lb-mode.featured::after { display: block !important; content: '+50%'; position: absolute; left: 10px; top: 10px; right: auto; bottom: auto; width: auto; height: auto; padding: 3px 8px; border: 0 !important; border-radius: 999px; background: #0b0d12; color: var(--lime); font-family: var(--font); font-size: 11px; font-weight: 900; letter-spacing: .5px; }
.pass-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.pass-track .pt { display: grid; grid-template-columns: 28px 1fr 16px; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 13px; }
.pass-track .pt span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink0); color: var(--mute); font-weight: 800; font-size: 12px; }
.pass-track .pt b { font-weight: 700; } .pass-track .pt i { font-style: normal; color: var(--lime); font-weight: 900; }
.pass-track .pt.gear { border-color: rgba(255,201,60,.45); background: rgba(255,201,60,.08); }
.pass-track .pt.got { opacity: .6; } .pass-track .pt.next { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.line.pass-line b { color: var(--gold); }

/* =====================================================================
   FINAL POLISH: in-match controls, shop, small screens.
   ===================================================================== */
/* Touch controls stay round glass buttons (the global button style must not square them off). */
.touch .tbtn { border-radius: 50% !important; background: rgba(13,15,26,.50) !important; color: #fff !important; border: 2px solid rgba(255,255,255,.55) !important; backdrop-filter: blur(4px); }
.touch .tbtn:hover { transform: none; filter: none; }
.touch .tbtn.down { background: var(--lime) !important; color: #0b0d12 !important; border-color: transparent !important; transform: scale(.92); }
.touch .tbtn.fire, .touch .tbtn.fire2 { border-color: var(--lime) !important; }
.touch .tbtn small { color: inherit; }
/* Quick chat and leave buttons */
.qc-open { border-radius: 50% !important; background: rgba(13,15,26,.6) !important; border: 1px solid var(--line2) !important; color: #fff !important; }
.qc-menu button { background: rgba(13,15,26,.86) !important; color: #fff !important; border: 1px solid var(--line2) !important; text-align: left; }
.qc-menu button:hover { border-color: var(--lime) !important; }
/* In-match text: banner and kill feed in the new type */
.banner, .feed div, .goal-tip, .center-msg.respawn { border-radius: 14px !important; transform: none !important; }
.feed div { font-family: var(--font); font-weight: 700; }
/* Career tracker on short screens (phones in landscape): one mission, tucked under the timer */
@media (max-height: 520px) {
  .career { top: 8px !important; left: 60px !important; right: auto !important; transform: none !important; width: min(230px, 34vw) !important; padding: 6px 9px !important; }
  .career .c-ms:not(.big), .career p, .career > small { display: none !important; }
  .career .c-rank { font-size: 9.5px; margin-bottom: 2px; }
}
/* Shop: flat cards, clean tabs */
.shop-item, .shop-item:nth-child(odd), .shop-item:nth-child(even) { transform: none !important; background: rgba(21,24,39,.78) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important; box-shadow: none !important; padding: 18px 14px 14px; outline: 0 !important; transition: border-color .12s, transform .12s; }
.shop-item:hover { transform: translateY(-3px) !important; border-color: var(--line2) !important; }
.shop-item.have { border-color: rgba(200,255,26,.6) !important; }
.shop-item b { font-family: var(--font); font-weight: 800; font-size: 16px; }
.shop-item small { color: var(--mute); opacity: 1; }
.tabs button, .shop-tabs button { font-family: var(--font) !important; font-weight: 800 !important; background: rgba(255,255,255,.07) !important; color: var(--txt) !important; border: 1px solid var(--line) !important; border-radius: 999px !important; transform: none !important; }
.tabs button.on, .shop-tabs button.on { background: var(--lime) !important; color: #0b0d12 !important; border-color: transparent !important; transform: none !important; }
.shop-cash { background: rgba(255,201,60,.14) !important; color: var(--gold) !important; border: 1px solid rgba(255,201,60,.5) !important; box-shadow: none !important; transform: none !important; border-radius: 999px !important; font-family: var(--font) !important; font-weight: 800; }
/* Results */
.verdict h1 { font-family: var(--display) !important; font-size: clamp(44px, 8vw, 84px) !important; letter-spacing: 2px; margin: 4px 0 12px !important; }
.verdict h1.win { color: var(--lime) !important; } .verdict h1.lose { color: var(--pink) !important; }
.bars { border-radius: 999px !important; overflow: hidden; border: 1px solid var(--line2) !important; box-shadow: none !important; }
.res-row.me { background: rgba(200,255,26,.10); border-radius: 10px; }
.newbadge, .cashgain { border-radius: 999px !important; transform: none !important; box-shadow: none !important; }
/* The first-visit training prompt sits below the top bar and never over a screen title */
#toasts { top: auto !important; bottom: 18px !important; }
#toasts { left: 22px !important; transform: none !important; align-items: flex-start !important; }
@media (max-width: 680px) { #toasts { left: 10px !important; right: 10px; } }
