:root { --ink: #f4f1ff; --dim: #9aa0c8; --pink: #ff2bd6; --cyan: #22e0ff; --yellow: #ffe234; --bg: #05060d; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }

/* The broadcast: scanlines and a dark frame over everything drawn, under the HUD. */
#scan { position: fixed; inset: 0; pointer-events: none; z-index: 2; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .16) 2px 3px), radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(5, 2, 30, .6) 100%); }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; box-shadow: inset 0 0 90px 30px rgba(255, 40, 80, .75); transition: opacity .5s; }
#hurt.on { opacity: 1; transition: none; }

#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
#top { display: flex; align-items: flex-start; gap: 10px; }
#views b { display: block; font: 900 26px/1 system-ui, sans-serif; color: var(--yellow); text-shadow: 0 0 12px rgba(255, 226, 52, .6); font-variant-numeric: tabular-nums; }
#views span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
#where { flex: 1; text-align: center; }
#where b { font: 800 13px/1 system-ui, sans-serif; letter-spacing: .12em; color: var(--cyan); text-shadow: 0 0 10px rgba(34, 224, 255, .6); }
#left { height: 5px; margin: 6px auto 0; width: min(220px, 70%); background: rgba(255, 255, 255, .12); border-radius: 3px; overflow: hidden; }
#left i { display: block; height: 100%; width: 100%; background: var(--pink); transition: width .2s; }
#menuBtn { pointer-events: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(5, 6, 13, .6); color: var(--ink); font: 900 14px/1 system-ui, sans-serif; cursor: pointer; }
#team { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: rgba(5, 6, 13, .65); border: 1px solid var(--c); font: 700 12px/1.3 system-ui, sans-serif; }
.chip.down { opacity: .55; border-style: dashed; }
.chip u { text-decoration: none; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.chip u.off { background: rgba(255, 255, 255, .15); }
.chip em { font-style: normal; color: var(--yellow); }
#bossbar { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(420px, 80%); text-align: center; }
#bossbar span { font: 800 11px/1 system-ui, sans-serif; letter-spacing: .18em; color: #ff8fa6; }
#bossbar div { height: 9px; margin-top: 4px; border: 1px solid #ff3355; border-radius: 5px; overflow: hidden; background: rgba(0, 0, 0, .5); }
#bossbar i { display: block; height: 100%; background: #ff3355; box-shadow: 0 0 12px #ff3355; }
#banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) rotate(-3deg); padding: 8px 18px; background: var(--pink); color: #fff; font: 900 clamp(20px, 6vw, 40px)/1.1 system-ui, sans-serif; letter-spacing: .03em; text-align: center; text-transform: uppercase; box-shadow: 6px 6px 0 #05060d, 0 0 30px rgba(255, 43, 214, .6); white-space: nowrap; animation: pop .25s ease-out; }
#banner small { display: block; font-size: .45em; letter-spacing: .12em; color: var(--yellow); margin-top: 4px; }
@keyframes pop { from { transform: translate(-50%, -50%) rotate(-3deg) scale(1.5); opacity: 0; } }
/* The host's lower third. */
/* The host's lower third, over every screen. With a portrait card (.card) his face is on a small tube beside the line. */
#dax { position: fixed; z-index: 25; pointer-events: none; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 20px)); display: flex; align-items: center; gap: 10px; background: rgba(5, 6, 13, .86); border-left: 5px solid var(--yellow); padding: 7px 12px 8px; animation: slide .2s ease-out; }
#dax[hidden] { display: none; }
#dax b { font: 800 11px/1 system-ui, sans-serif; letter-spacing: .12em; color: var(--yellow); }
#dax b span { color: var(--dim); font-weight: 600; text-transform: none; letter-spacing: .02em; }
#dax p { margin: 3px 0 0; font: 600 15px/1.3 system-ui, sans-serif; }
#dax .tube { display: none; position: relative; flex: none; width: 112px; height: 112px; background: #000; overflow: hidden; border: 2px solid var(--pink); box-shadow: 0 0 0 2px #05060d, 0 0 0 4px var(--cyan); margin: 2px 4px 2px 0; }
#dax .tube video { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#dax .tube::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, #0000 0 3px, #0005 3px 4px); box-shadow: inset 0 0 18px #000b; }
#dax .tube span { position: absolute; left: 4px; top: 4px; z-index: 1; font: 800 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; background: #ff2b4a; color: #fff; padding: 2px 4px; }
#dax.tv { border-left-color: var(--pink); background: rgba(5, 6, 13, .94); }
#dax.tv .tube { display: block; }
#dax.tv p { font: 800 17px/1.25 system-ui, sans-serif; text-transform: uppercase; text-shadow: 2px 2px 0 var(--pink); }
@keyframes slide { from { transform: translate(-50%, 20px); opacity: 0; } }
@media (orientation: portrait) { body.touch #dax { bottom: calc(14% + env(safe-area-inset-bottom)); } }
/* Over a sponsor break on a tall screen the card goes to the top, clear of the reroll and heal buttons. */
@media (orientation: portrait) { body:has(#draft:not([hidden])) #dax.tv { bottom: auto; top: calc(8px + env(safe-area-inset-top)); } }
#net { position: absolute; right: 10px; bottom: 8px; font: 11px/1.3 ui-monospace, Menlo, monospace; color: var(--dim); white-space: pre; text-align: right; }

.screen { position: fixed; inset: 0; z-index: 20; display: flex; padding: 16px; overflow: auto; background: rgba(5, 6, 13, .78); }
.card { margin: auto; width: min(430px, 100%); text-align: center; background: #10122b; border: 2px solid var(--pink); border-radius: 18px; padding: 20px 20px 16px; box-shadow: 8px 8px 0 #05060d, 0 0 50px rgba(255, 43, 214, .3); }
.live { margin: 0 0 6px; font: 900 12px/1 system-ui, sans-serif; letter-spacing: .2em; color: #ff3355; }
.live span { color: var(--dim); font-weight: 600; letter-spacing: .08em; }
h1 { margin: 0; font: 900 clamp(40px, 13vw, 58px)/.92 system-ui, sans-serif; letter-spacing: -.02em; text-transform: uppercase; color: var(--yellow); text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #05060d; transform: rotate(-3deg); }
h2 { margin: 0 0 8px; font: 900 28px/1 system-ui, sans-serif; text-transform: uppercase; color: var(--yellow); text-shadow: 2px 2px 0 var(--pink); }
.tag { color: var(--dim); margin: 14px 0 12px; font-size: 15px; }
.tag b, .how b { color: var(--ink); }
.btn { display: block; width: 100%; min-height: 48px; margin-top: 9px; padding: 0 16px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: var(--ink); font: 800 16px/1 system-ui, sans-serif; cursor: pointer; }
.btn:hover { background: rgba(255, 255, 255, .13); }
.btn.go { background: var(--yellow); color: #1a1500; border-color: transparent; box-shadow: 4px 4px 0 var(--pink); }
.btn.go:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .4; cursor: default; }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.mini { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: var(--dim); font: 700 13px/1.2 system-ui, sans-serif; cursor: pointer; margin-top: 8px; }
.row .mini { margin-top: 0; }
.mini:hover { color: var(--ink); border-color: var(--dim); }
.how { color: var(--dim); font-size: 13px; margin: 12px 0 0; }
.for-touch, .for-pad { display: none; }
body.touch .for-touch { display: block; } body.touch .for-kb { display: none; }
body.pad .for-pad { display: block; } body.pad .for-kb, body.pad .for-touch { display: none; }
.links { font-size: 13px; margin: 14px 0 0; }
.links a, .credit a { color: var(--cyan); }
.credit { font-size: 11px; color: var(--dim); margin: 8px 0 0; }
#slots { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 6px; }
#slots li { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, .2); color: var(--dim); font-weight: 700; }
#slots li.in { border: 2px solid var(--c); color: var(--ink); }
#slots li i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
#cardWrap canvas { width: min(190px, 46vw); height: auto; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .6); transform: rotate(2deg); }
#vote p { margin: 14px 0 0; font-weight: 700; font-size: 14px; }
#lobbyBack { position: fixed; z-index: 60; left: 12px; top: calc(8px + env(safe-area-inset-top)); background: rgba(5, 6, 13, .8); }

/* The kit's lobby, in the show's colours. */
.mp-lobby { --mp-bg: rgba(5, 6, 13, .8); --mp-card: #10122b; --mp-accent: #ffe234; --mp-accent-ink: #1a1500; --mp-dim: #9aa0c8; }

/* Thumb sticks: they appear where the thumb lands. */
.stick { position: fixed; left: 0; top: 0; z-index: 6; width: 92px; height: 92px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .05); pointer-events: none; }
.stick i { position: absolute; left: 24px; top: 24px; width: 44px; height: 44px; border-radius: 50%; background: rgba(34, 224, 255, .55); }
.stick-aim { border-color: rgba(255, 226, 52, .5); }
.stick-aim i { background: rgba(255, 226, 52, .65); }

@media (min-width: 900px) {
  #views b { font-size: 40px; }
  #where b { font-size: 16px; }
  #team { flex-direction: column; align-items: flex-start; }
  .chip { font-size: 14px; padding: 5px 10px; }
}

/* Round 2: the run. Patch notes, the views toast, the lights, the sponsor break and the end screen's headline. */
#mut { margin: 5px 0 0; font: 800 11px/1.2 system-ui, sans-serif; letter-spacing: .1em; color: var(--yellow); text-shadow: 0 0 8px rgba(0, 0, 0, .9); min-height: 13px; }
#views { position: relative; }
#toast { display: inline-block; margin: 4px 0 0; white-space: nowrap; padding: 3px 8px; border-radius: 8px; background: rgba(5, 6, 13, .85); font: 800 12px/1.3 system-ui, sans-serif; animation: slideIn .2s ease-out; z-index: 2; }
#toast.bad { color: #ff6b85; border: 1px solid #ff3355; } #toast.good { color: #7dffa0; border: 1px solid #3dff7a; }
@keyframes slideIn { from { transform: translateX(-12px); opacity: 0; } }
#dark { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: #02020a; opacity: 0; transition: opacity .08s; }
.chip s { text-decoration: none; color: var(--cyan); font-weight: 800; }

#draft { position: fixed; inset: 0; z-index: 15; display: flex; padding: 10px; overflow: auto; background: rgba(5, 6, 13, .72); }
.sheet { margin: auto; width: min(760px, 100%); text-align: center; background: #10122b; border: 2px solid var(--yellow); border-radius: 18px; padding: 14px 14px 10px; box-shadow: 8px 8px 0 #05060d, 0 0 50px rgba(255, 226, 52, .25); animation: pop2 .22s ease-out; }
@keyframes pop2 { from { transform: scale(.94); opacity: 0; } }
.sheet .tag { margin: 2px 0 10px; font-size: 14px; }
#draftClock { color: var(--yellow); margin-left: 6px; }
.drow { margin-top: 8px; padding-top: 2px; }
.drow .who { display: block; text-align: left; color: var(--c); font: 800 13px/1.6 system-ui, sans-serif; letter-spacing: .08em; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.upg { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 10px 10px 9px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.upg:hover, .upg.focus { border-color: var(--yellow); background: rgba(255, 226, 52, .12); box-shadow: 3px 3px 0 var(--pink); }
.upg b { font: 900 15px/1.15 system-ui, sans-serif; color: var(--yellow); text-transform: uppercase; }
.upg span { font: 700 15px/1.25 system-ui, sans-serif; }
.upg i { font: italic 500 12px/1.3 system-ui, sans-serif; color: var(--dim); }
.upg em { font: 800 11px/1 system-ui, sans-serif; font-style: normal; color: var(--cyan); }
.upg kbd { position: absolute; right: 8px; top: 7px; font: 800 11px/1 ui-monospace, Menlo, monospace; color: var(--dim); border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; padding: 2px 5px; }
.drow .reroll { margin-top: 6px; }
.mini:disabled { opacity: .35; cursor: default; }
.locked { margin: 6px 0; padding: 12px; border-radius: 12px; border: 2px dashed var(--c, rgba(255, 255, 255, .3)); color: var(--ink); font-weight: 700; }
#draftViews { margin: 8px 0 0; font: 800 13px/1.3 system-ui, sans-serif; color: var(--yellow); }
#spendLog { margin: 2px 0 0; min-height: 17px; font: 700 13px/1.3 system-ui, sans-serif; color: #ff8fa6; }
#draft .how { margin: 4px 0 0; }
#draft.many .upg { min-height: 0; padding: 7px 9px; }
#draft.many .upg i { display: none; }
#draft.many .drow { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; border-left: 4px solid var(--c); padding-left: 8px; }
#draft.many .who { grid-column: 1 / -1; }
#draft.many .reroll { margin: 0; }
/* One thumb: three big cards, stacked. */
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .upg { min-height: 86px; padding: 11px 12px; }
  .upg b { font-size: 16px; }
  #draft.many .drow { grid-template-columns: 1fr; }
  #draft.many .cards { grid-template-columns: repeat(3, 1fr); }
  #draft.many .upg span { font-size: 12px; } #draft.many .upg b { font-size: 12px; }
}

#bigViews { margin: 4px 0 0; }
#bigViews b { display: block; font: 900 clamp(48px, 17vw, 76px)/1 system-ui, sans-serif; color: var(--yellow); text-shadow: 3px 3px 0 var(--pink), 0 0 26px rgba(255, 226, 52, .5); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
#bigViews span { font: 800 13px/1 system-ui, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
#newBest { display: inline-block; margin: 0 0 2px; padding: 4px 12px; background: var(--pink); color: #fff; font: 900 15px/1.2 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-3deg); box-shadow: 3px 3px 0 #05060d; animation: pop .3s ease-out; }
@keyframes popBest { from { transform: rotate(-3deg) scale(2); opacity: 0; } }
#newBest { animation-name: popBest; }
#bestLine { margin: 8px 0 0; font: 800 15px/1.3 system-ui, sans-serif; color: var(--ink); }
#spentLine { margin: 2px 0 0; font: 600 13px/1.3 system-ui, sans-serif; color: #ff8fa6; }
#endLine { margin: 4px 0 12px; font: 600 13px/1.3 system-ui, sans-serif; color: var(--dim); }

/* Round 3: classes, the special button, the two volumes, and the looks page's viewer. */
.ci { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 4px; }
.ci svg { width: 100%; height: 100%; }
.chip .ci { color: var(--c); margin-right: 0; }
.chip q { quotes: none; position: relative; display: inline-block; min-width: 34px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .16); overflow: hidden; font: 800 10px/14px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.chip q::before { content: ""; position: absolute; inset: 0; width: var(--f, 0%); background: var(--c); }
.chip q.full { height: 14px; padding: 0 6px; background: var(--c); color: #10122b; animation: ready .5s ease-in-out infinite alternate; }
.chip q.full::before { display: none; }
@keyframes ready { to { filter: brightness(1.5); } }
#spBtn { position: absolute; right: calc(12px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); pointer-events: auto; touch-action: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 86px; height: 86px; border-radius: 50%; border: 0; padding: 0; color: var(--dim); cursor: pointer; font: 800 10px/1.1 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase;
  background: radial-gradient(circle, #10122b 0 60%, transparent 61%), conic-gradient(var(--cyan) var(--f, 0%), rgba(255, 255, 255, .16) 0); }
#spBtn .ci { width: 26px; height: 26px; margin: 0; }
#spBtn small { font-size: 10px; color: var(--dim); }
#spBtn.full { color: #1a1500; background: radial-gradient(circle, var(--yellow) 0 60%, transparent 61%), conic-gradient(var(--pink) 100%, var(--pink) 0); box-shadow: 0 0 26px rgba(255, 226, 52, .7); animation: ready .45s ease-in-out infinite alternate; }
#spBtn.full small { color: #1a1500; }
@media (orientation: portrait) { body.touch #spBtn { bottom: calc(24% + env(safe-area-inset-bottom)); } }
body:not(.touch) #spBtn { width: 72px; height: 72px; font-size: 9px; }
.card.wide { width: min(760px, 100%); }
#classCards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 4px; }
.cls { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 12px 12px 11px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.cls:hover, .cls.focus { border-color: var(--yellow); background: rgba(255, 226, 52, .12); box-shadow: 4px 4px 0 var(--pink); }
.cls .ci { width: 38px; height: 38px; color: var(--yellow); margin: 0; }
.cls b { font: 900 18px/1.1 system-ui, sans-serif; color: var(--yellow); text-transform: uppercase; }
.cls em { font: 800 12px/1.2 system-ui, sans-serif; font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #ff8fa6; }
.cls span { font: 600 14px/1.3 system-ui, sans-serif; }
.cls span.sp { color: var(--cyan); }
.cls i { font: italic 500 12px/1.3 system-ui, sans-serif; color: var(--dim); }
.cls kbd { position: absolute; right: 9px; top: 8px; font: 800 11px/1 ui-monospace, Menlo, monospace; color: var(--dim); border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; padding: 2px 5px; }
@media (max-width: 620px) {
  #classCards { grid-template-columns: 1fr; gap: 8px; }
  .cls { display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; row-gap: 2px; padding: 10px 12px; }
  .cls .ci { grid-row: 1 / span 5; align-self: start; }
  .cls > :not(.ci) { grid-column: 2; }
  .cls i { display: none; }
}
#slots li .mini { margin: 0 0 0 auto; min-height: 36px; color: var(--ink); }
#clsBtn { position: fixed; z-index: 60; right: 12px; top: calc(8px + env(safe-area-inset-top)); background: rgba(5, 6, 13, .8); color: var(--yellow); border-color: var(--yellow); margin: 0; }
.vols { display: grid; gap: 4px; margin: 12px 0 0; }
.vols label { display: grid; grid-template-columns: 62px 1fr 46px; align-items: center; gap: 8px; min-height: 40px; font: 700 13px/1 system-ui, sans-serif; color: var(--dim); text-align: left; }
.vols input { width: 100%; height: 32px; margin: 0; accent-color: var(--yellow); touch-action: pan-y; }
.vols output { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.vols .unmute { margin: 0; color: var(--yellow); border-color: var(--yellow); }
#banner small + small { color: #fff; margin-top: 2px; }
.upg em.own { color: #ff8fa6; }
body.demo #menuBtn, body.demo #dax, body.demo .stick { display: none; }
