/* RICOCHET RIVALS - menus, HUD and touch controls. The arena itself is drawn in 3D on the canvas. */
:root {
  --bg: #05070c; --panel: #0d1118; --panel2: #141a24; --line: #283244; --ink: #020306;
  --text: #e9eef8; --muted: #8e9ab2; --cyan: #2ee6ff; --cyan2: #9cf3ff; --coral: #ff6f5e; --violet: #a77bff; --gold: #ffc93c;
  --green: #5dff9e; --red: #ff4d5e; --r: 14px;
  --head: Orbitron, 'Exo 2', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
button, input { font: inherit; color: inherit; }
a { color: var(--cyan2); }
#app { position: fixed; inset: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* screens */
.screen { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; z-index: 5; }
.screen.show { display: flex; }
.screen:not(.hud):not(.title-screen) { background: rgba(3, 5, 10, .78); backdrop-filter: blur(4px); }
.screen.overlay { z-index: 20; }
.panel { position: relative; width: min(560px, 100%); margin: auto; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 0 0 1px rgba(46, 230, 255, .08), 0 24px 60px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .05); }
.panel::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: .7; }
.panel.narrow { width: min(420px, 100%); }
.panel.wide { width: min(880px, 100%); }
h2 { font-family: var(--head); font-weight: 900; margin: 0 0 10px; font-size: clamp(1.15rem, 3.2vw, 1.6rem); letter-spacing: .08em; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(46, 230, 255, .35); }
h3 { margin: 14px 0 6px; font-size: 1rem; color: var(--cyan2); letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.field { display: block; margin: 14px 0 6px; font-weight: 800; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field.sub { margin-top: 10px; letter-spacing: .1em; }
.field small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.err { color: #ff8a94; font-weight: 700; min-height: 1.2em; margin: 8px 0 0; }
.row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.row.left { justify-content: flex-start; }
.row.tight { margin-top: 6px; gap: 6px; }
input:not([type]), #codeIn, #nameIn { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #070a10; font-weight: 700; font-size: 1.05rem; outline: none; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46, 230, 255, .15); }
#codeIn { letter-spacing: .35em; font-family: var(--head); font-size: 1.4rem; text-align: center; }
.join-row { display: flex; gap: 10px; }
.join-row input { flex: 1; min-width: 0; }
input[type=range] { width: 100%; accent-color: var(--cyan); }
.check { display: flex; gap: 10px; align-items: center; margin: 12px 0; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--cyan); flex: none; }

/* buttons */
.btn { border: 1px solid var(--line); border-radius: 12px; padding: 11px 18px; background: #18202d; font-weight: 800; cursor: pointer; letter-spacing: .02em; min-height: 44px; }
.btn:hover, .btn:focus-visible { border-color: var(--cyan); outline: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #47ecff, #12b8d6); color: #021218; border-color: #7af2ff; box-shadow: 0 0 18px rgba(46, 230, 255, .35); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: .88rem; }
.btn.big { font-size: 1.08rem; padding: 12px 26px; }
.btn.on { background: #11402a; border-color: var(--green); color: var(--green); }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10, 14, 20, .85); font-size: 1.2rem; cursor: pointer; flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-width: 64px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 10px; background: #111823; font-weight: 700; cursor: pointer; }
.seg button.on { border-color: var(--cyan); background: rgba(46, 230, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px var(--cyan); }
.seg.small button { padding: 7px 8px; font-size: .86rem; min-width: 52px; }

/* title */
.title-screen { background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(46, 230, 255, .14), transparent 60%), linear-gradient(180deg, rgba(3, 5, 10, .35), rgba(3, 5, 10, .85) 70%); align-items: flex-start; }
.title-wrap { position: relative; width: min(680px, 100%); margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 18px; z-index: 1; }
.logo { margin: 4px 0 0; font-family: var(--head); font-weight: 900; line-height: .92; text-align: center; display: flex; flex-direction: column; letter-spacing: .06em; }
.logo .l1 { font-size: clamp(2rem, 8vw, 3.6rem); color: #fff; text-shadow: 0 0 22px rgba(46, 230, 255, .7), 0 0 2px #fff; }
.logo .l2 { font-size: clamp(1.6rem, 6.4vw, 2.9rem); background: linear-gradient(90deg, var(--cyan), var(--violet) 45%, var(--coral) 75%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .34em; margin-right: -.34em; }
.by { margin: 0; font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.tagline { margin: 2px 0 4px; text-align: center; color: #c9d4ea; font-weight: 600; max-width: 34ch; }
.title-art.xp-anchor { display: block; width: 0; height: 0; }
.gold-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #6a5420; background: rgba(30, 22, 6, .85); border-radius: 999px; padding: 6px 14px 6px 8px; cursor: pointer; color: var(--gold); font-weight: 800; }
.coin-ico { width: 20px; height: 20px; border-radius: 50%; background: url(/play/assets/dca-coin-48.png) center / cover, radial-gradient(circle at 35% 30%, #fff3b0, #ffc93c 45%, #a8740c); }
.pill-sub { color: #b9a46a; font-weight: 600; font-size: .85rem; }
.name-row { display: flex; align-items: center; gap: 10px; width: min(360px, 100%); }
.name-row label { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.name-row input { padding: 8px 12px !important; font-size: .98rem !important; }
.menu { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.mbtn { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(12, 16, 24, .9); cursor: pointer; min-height: 62px; transition: border-color .15s, box-shadow .15s; }
.mbtn:hover, .mbtn:focus-visible { border-color: var(--cyan); box-shadow: 0 0 16px rgba(46, 230, 255, .2); outline: none; }
.mbtn:active { transform: translateY(1px); }
.mbtn .mi { font-family: var(--head); font-size: 1.3rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(46, 230, 255, .1); color: var(--cyan); flex: none; }
.mbtn .mt { display: flex; flex-direction: column; min-width: 0; }
.mbtn b { font-size: 1.02rem; }
.mbtn small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.mbtn.big { grid-column: 1 / -1; min-height: 74px; }
.mbtn.hot { background: linear-gradient(100deg, rgba(46, 230, 255, .22), rgba(167, 123, 255, .18) 60%, rgba(255, 111, 94, .16)); border-color: #4fd8ef; box-shadow: 0 0 22px rgba(46, 230, 255, .25); }
.mbtn.hot b { font-family: var(--head); font-weight: 900; letter-spacing: .08em; font-size: 1.25rem; text-transform: uppercase; }
.mbtn.hot .mi { background: var(--cyan); color: #021218; }
.acct { font-size: .9rem; color: var(--muted); text-align: center; }
.foot { font-size: .85rem; color: var(--muted); margin: 0; }

/* online / solo pickers */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mode { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; background: #0f141d; cursor: pointer; }
.mode:hover, .mode:focus-visible { border-color: var(--cyan); outline: none; box-shadow: 0 0 16px rgba(46, 230, 255, .2); }
.mode canvas { width: 84px; height: 84px; border-radius: 10px; }
.mode b { font-size: .95rem; }
.mode small { color: var(--muted); font-size: .78rem; }
.solo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scard { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(46, 230, 255, .08), rgba(167, 123, 255, .06)); cursor: pointer; min-height: 88px; }
.scard:hover, .scard:focus-visible { border-color: var(--cyan); outline: none; }
.scard b { font-family: var(--head); font-size: 1.05rem; letter-spacing: .05em; }
.scard span { color: var(--muted); font-size: .88rem; }
.kinds { display: grid; gap: 6px; }
.kinds button { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #111823; cursor: pointer; font-weight: 700; }
.kinds .k { color: var(--cyan); }
.kinds small { display: block; color: var(--muted); font-weight: 600; }
.circuit { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.cm { position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px 10px 40px; border-radius: 12px; border: 1px solid var(--line); background: #0f141d; cursor: pointer; min-height: 96px; }
.cm:hover:not(:disabled) { border-color: var(--cyan); }
.cm .num { position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(46, 230, 255, .14); color: var(--cyan); font-family: var(--head); font-size: .75rem; }
.cm b { font-size: .96rem; }
.cm small { color: var(--muted); font-size: .76rem; line-height: 1.25; }
.cm .st i { font-style: normal; color: #3a4254; margin-right: 2px; }
.cm .st i.on { color: var(--gold); text-shadow: 0 0 8px rgba(255, 201, 60, .6); }
.cm .g { font-size: .74rem; color: #c9d4ea; }
.cm.locked { opacity: .5; cursor: default; }
.cm .lock { font-size: .72rem; color: var(--coral); }
.records { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.records div { text-align: center; padding: 12px 6px; border-radius: 12px; background: #0f141d; border: 1px solid var(--line); }
.records b { display: block; font-family: var(--head); font-size: 1.4rem; color: var(--cyan2); }
.records span { color: var(--muted); font-size: .78rem; }
.lab-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.lessons { display: grid; gap: 6px; }
.ls { position: relative; display: flex; flex-direction: column; text-align: left; padding: 8px 10px 8px 42px; border-radius: 10px; border: 1px solid var(--line); background: #0f141d; cursor: pointer; }
.ls:hover { border-color: var(--cyan); }
.ls .num { position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1b2332; font-size: .8rem; font-weight: 800; }
.ls.done .num { background: var(--green); color: #032010; }
.ls small { color: var(--muted); font-size: .8rem; }

/* lobby */
.lobby-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.code { font-family: var(--head); letter-spacing: .18em; color: var(--cyan); }
.mode-line { margin: 4px 0; font-size: .92rem; }
.ping { color: var(--muted); }
.plist { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.plist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: #0f141d; border: 1px solid var(--line); border-left: 4px solid var(--c, #3a4254); }
.plist .sw { width: 26px; height: 26px; border-radius: 7px; background: var(--c, #3a4254); color: #021218; display: grid; place-items: center; font-weight: 900; font-size: .85rem; flex: none; }
.plist .sw.empty { background: #1b2332; }
.plist .nm { font-weight: 700; flex: 1; min-width: 80px; }
.tag { font-size: .72rem; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: #1b2332; color: var(--muted); letter-spacing: .04em; }
.tag.you { background: rgba(46, 230, 255, .18); color: var(--cyan2); }
.tag.host { background: rgba(255, 201, 60, .18); color: var(--gold); }
.tag.bot { background: rgba(167, 123, 255, .18); color: #cdb8ff; }
.tag.ready { background: rgba(93, 255, 158, .15); color: var(--green); }
.tag.gone { background: rgba(255, 77, 94, .18); color: #ff8a94; }
.tag.team.t0 { background: rgba(46, 230, 255, .2); color: var(--cyan2); }
.tag.team.t1 { background: rgba(255, 111, 94, .22); color: #ffb0a6; }
.tag.emo { background: #fff; color: #111; }
.xbtn { border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px 6px; }
.emotes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.emotes button { border: 1px solid var(--line); background: #111823; border-radius: 999px; padding: 6px 10px; font-size: .86rem; cursor: pointer; }
.friend-list .fr { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }

/* customize */
.look-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 1.3fr; gap: 18px; }
.look-prev canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 14px; border: 1px solid var(--line); background: #070a10; display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stats div { text-align: center; background: #0f141d; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.stats b { display: block; font-family: var(--head); color: var(--cyan2); }
.stats span { font-size: .72rem; color: var(--muted); }
.look-pick { max-height: min(62vh, 520px); overflow-y: auto; padding-right: 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 40px; height: 40px; border-radius: 10px; border: 2px solid transparent; background: var(--c); color: #021218; font-weight: 900; cursor: pointer; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), 0 0 14px var(--c); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: #111823; border-radius: 999px; padding: 7px 12px; font-size: .86rem; font-weight: 700; cursor: pointer; }
.chips button.on { border-color: var(--cyan); background: rgba(46, 230, 255, .14); color: #fff; }
.chips button.locked { color: var(--muted); }
.chips button.locked::before { content: "🔒 "; font-size: .75rem; }

/* how to play */
.hint-big { font-size: 1.05rem; font-weight: 700; color: #dce6f7; }
.how-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hc { display: flex; flex-direction: column; gap: 4px; background: #0f141d; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.hc canvas { width: 100%; border-radius: 8px; }
.hc b { color: var(--cyan2); }
.hc span { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.more { margin-top: 12px; }
.more summary { cursor: pointer; font-weight: 800; }
.rules { color: #c9d4ea; font-size: .9rem; line-height: 1.45; padding-left: 1.1rem; }

/* HUD */
.hud { display: none; pointer-events: none; padding: 0; align-items: stretch; justify-content: stretch; z-index: 6; }
.hud.show { display: block; }
.topbar { position: absolute; top: max(6px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); display: flex; gap: 6px; align-items: stretch; justify-content: center; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.topbar .icon-btn:first-child { position: absolute; left: 0; top: 0; }
.topbar #bEmote { position: absolute; right: 0; top: 0; }
.hpill { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 74px; padding: 4px 10px; border-radius: 10px; background: rgba(8, 11, 17, .82); border: 1px solid var(--line); line-height: 1.1; }
.hpill .lbl { font-size: .58rem; letter-spacing: .16em; color: var(--muted); font-weight: 800; }
.hpill b { font-family: var(--head); font-size: .98rem; }
.hpill .meter { display: block; width: 72px; height: 8px; border-radius: 4px; background: #1b2332; overflow: hidden; margin-top: 3px; }
.hpill .meter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #12b8d6, var(--cyan)); transition: width .08s linear; }
.hpill.strike .meter i { background: linear-gradient(90deg, #c9a020, var(--gold)); }
.hpill.strike.ready { border-color: rgba(255, 201, 60, .6); }
.hpill.clock.od { border-color: #ff7a2a; box-shadow: 0 0 14px rgba(255, 122, 42, .5); }
.hpill.clock.od .lbl { color: #ffb070; }
.hpill.net.bad b { color: #ff8a94; }
.board { position: absolute; right: max(8px, env(safe-area-inset-right)); top: 60px; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; pointer-events: none; }
.board li { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(8, 11, 17, .75); border-left: 3px solid var(--c); font-size: .82rem; font-weight: 700; }
.board li.me { background: rgba(46, 230, 255, .12); }
.board li.out { opacity: .45; text-decoration: line-through; }
.board .d { color: var(--c); }
.board small { font-size: .62rem; color: var(--muted); }
.board .w { color: var(--gold); font-size: .7rem; }
.board .pips { display: flex; gap: 2px; }
.board .pips i { width: 6px; height: 6px; border-radius: 50%; background: #2a3140; }
.board .pips i.on { background: var(--c); box-shadow: 0 0 4px var(--c); }
.banner { position: absolute; left: 50%; top: 96px; transform: translate(-50%, -10px); padding: 8px 18px; border-radius: 12px; background: rgba(8, 11, 17, .9); border: 1px solid var(--line); font-weight: 800; opacity: 0; transition: opacity .2s, transform .2s; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.banner.show { opacity: 1; transform: translate(-50%, 0); }
.banner.green { border-color: var(--green); color: var(--green); }
.banner.red { border-color: var(--red); color: #ff9aa4; }
.bigmsg { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.6); font-family: var(--head); font-weight: 900; font-size: clamp(2rem, 8vw, 4.6rem); color: #fff; text-shadow: 0 0 24px rgba(46, 230, 255, .8); opacity: 0; pointer-events: none; text-align: center; white-space: nowrap; }
.bigmsg.show { animation: big .8s ease-out forwards; }
@keyframes big { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.calm .bigmsg.show { animation: bigCalm .9s linear forwards; }
@keyframes bigCalm { 0%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.toasts { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; }
.toasts div { padding: 8px 14px; border-radius: 10px; background: rgba(8, 11, 17, .92); border: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
.conn { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); padding: 8px 14px; border-radius: 10px; background: rgba(90, 20, 30, .9); border: 1px solid var(--red); font-weight: 800; }
.lesson { position: absolute; left: 50%; top: 140px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-radius: 12px; background: rgba(8, 11, 17, .9); border: 1px solid var(--cyan); max-width: 92vw; font-size: .9rem; }
.lesson b { color: var(--cyan2); white-space: nowrap; }
.lesson i { font-style: normal; font-family: var(--head); color: var(--gold); white-space: nowrap; }
.spect { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 12px; background: rgba(8, 11, 17, .9); border: 1px solid var(--line); pointer-events: auto; font-weight: 700; }
.emote-pop { position: absolute; right: 8px; top: 54px; display: grid; gap: 4px; pointer-events: auto; }
.emote-pop button { border: 1px solid var(--line); background: rgba(8, 11, 17, .95); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 700; }

/* names over the arena (always upright) */
.labels { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.nlbl { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(5, 7, 12, .7); border: 1px solid var(--c); font-size: .74rem; font-weight: 800; white-space: nowrap; will-change: transform; }
.nlbl .mk { color: var(--c); }
.nlbl.me { box-shadow: 0 0 10px var(--c); }
.nlbl.out { opacity: .35; }
.nlbl .tg { font-size: .58rem; letter-spacing: .08em; color: #cdb8ff; background: rgba(167, 123, 255, .2); padding: 1px 4px; border-radius: 4px; }
.nlbl .tg.temp { color: #ffd38a; background: rgba(255, 170, 40, .22); }
.nlbl .bub { position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: #fff; color: #111; padding: 3px 8px; border-radius: 10px; font-size: .78rem; }
.big-marks .nlbl { font-size: .9rem; }
.big-marks .nlbl .mk { font-size: 1.15rem; }
.float { position: absolute; left: 0; top: 0; font-family: var(--head); font-weight: 900; font-size: .95rem; text-shadow: 0 0 10px rgba(0, 0, 0, .9); pointer-events: none; white-space: nowrap; }

/* touch controls: keep thumbs below/beside the arena */
.touch { position: absolute; inset: 0; display: none; pointer-events: none; }
.touch.on { display: block; }
.slider { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); width: min(36vw, 330px); height: 74px; border-radius: 37px; background: rgba(10, 14, 20, .55); border: 1px solid rgba(46, 230, 255, .35); pointer-events: auto; touch-action: none; }
.slider .track { position: absolute; left: 28px; right: 28px; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: linear-gradient(90deg, rgba(46, 230, 255, .1), rgba(46, 230, 255, .5), rgba(46, 230, 255, .1)); }
.slider .thumb { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #b8f8ff, var(--cyan) 55%, #0a7f95); box-shadow: 0 0 18px rgba(46, 230, 255, .6); }
.slider .hint { position: absolute; left: 0; right: 0; top: -18px; text-align: center; font-size: .6rem; letter-spacing: .3em; color: rgba(156, 243, 255, .6); font-weight: 800; }
.tbtn { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); border-radius: 50%; border: 2px solid; pointer-events: auto; touch-action: none; font-family: var(--head); font-weight: 900; letter-spacing: .06em; cursor: pointer; overflow: hidden; }
.tbtn.strike { right: max(14px, env(safe-area-inset-right)); width: 96px; height: 96px; background: radial-gradient(circle at 40% 35%, rgba(255, 233, 150, .95), rgba(255, 201, 60, .85) 55%, rgba(150, 100, 10, .85)); border-color: #ffe9a0; color: #2a1a00; font-size: .78rem; box-shadow: 0 0 22px rgba(255, 201, 60, .45); }
.tbtn.strike::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); transform: translateY(calc(var(--p, 1) * -100%)); }
.tbtn.strike.cool { box-shadow: none; }
.tbtn.magnet { right: calc(max(14px, env(safe-area-inset-right)) + 104px); bottom: max(22px, calc(env(safe-area-inset-bottom) + 8px)); width: 72px; height: 72px; background: radial-gradient(circle at 40% 35%, rgba(156, 243, 255, .9), rgba(46, 230, 255, .75) 55%, rgba(8, 90, 110, .85)); border-color: #b8f8ff; color: #021218; font-size: .6rem; }
.tbtn.magnet.low { filter: grayscale(.8) brightness(.7); }
.tbtn span { position: relative; z-index: 1; }
.tbtn.down { transform: scale(.94); filter: brightness(1.3); }
.tmeter { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .35); z-index: 1; }
.tmeter i { display: block; height: 100%; background: #fff; border-radius: 3px; }

/* results */
.rounds { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.rounds span { background: #0f141d; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: .86rem; }
.rtable { display: grid; gap: 4px; margin: 8px 0; overflow-x: auto; }
.rrow { display: grid; grid-template-columns: 28px minmax(110px, 1.6fr) repeat(6, minmax(44px, .6fr)); gap: 6px; align-items: center; padding: 7px 8px; border-radius: 10px; background: #0f141d; border: 1px solid transparent; font-size: .9rem; }
.rrow.head { background: none; font-size: .64rem; letter-spacing: .12em; color: var(--muted); font-weight: 800; padding: 0 8px; }
.rrow.me { border-color: var(--cyan); }
.rrow.win .pl { color: var(--gold); }
.rrow .pl { font-family: var(--head); font-weight: 900; }
.rrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.rrow .score { color: var(--gold); font-weight: 800; }
.rrow small { color: var(--muted); font-weight: 600; }
.goals .goal { display: flex; gap: 8px; align-items: center; padding: 4px 0; color: var(--muted); }
.goals .goal.ok { color: #fff; }
.goals .goal i { font-style: normal; color: #3a4254; font-size: 1.2rem; }
.goals .goal.ok i { color: var(--gold); text-shadow: 0 0 8px rgba(255, 201, 60, .7); }
.gold-line { color: var(--gold); font-weight: 800; margin: 6px 0; }

/* overlays */
.rotate { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; text-align: center; padding: 20px; }
.rotate > div { display: grid; gap: 8px; justify-items: center; }
.phone-ico { width: 46px; height: 76px; border: 3px solid var(--cyan); border-radius: 10px; animation: turn 2s ease-in-out infinite; }
@keyframes turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
.modal, .nogl { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; }

/* small screens */
@media (max-width: 720px) {
  .modes { grid-template-columns: 1fr 1fr; }
  .how-cards { grid-template-columns: 1fr 1fr; }
  .look-grid, .lab-grid { grid-template-columns: 1fr; }
  .look-pick { max-height: none; }
  .rrow { grid-template-columns: 22px minmax(90px, 1.4fr) repeat(6, minmax(34px, .5fr)); font-size: .8rem; }
}
@media (max-width: 480px) { .menu { grid-template-columns: 1fr; } .solo-grid { grid-template-columns: 1fr; } }
@media (max-height: 500px) {
  .hpill { min-width: 60px; padding: 3px 8px; }
  .hpill b { font-size: .86rem; }
  .hpill .meter { width: 56px; }
  .board { top: 52px; }
  .board li { font-size: .74rem; padding: 3px 6px; }
  .banner { top: 82px; }
  .lesson { top: 118px; }
  .slider { height: 64px; }
  .tbtn.strike { width: 84px; height: 84px; }
  .tbtn.magnet { width: 64px; height: 64px; right: calc(max(14px, env(safe-area-inset-right)) + 92px); }
  .title-wrap { gap: 6px; }
  .logo .l1 { font-size: 2rem; } .logo .l2 { font-size: 1.6rem; }
  .menu { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mbtn { min-height: 50px; padding: 8px 10px; }
  .mbtn small { display: none; }
  .mbtn.big { grid-column: 1 / -1; min-height: 54px; }
}

/* power-ups */
.pu-chips { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; pointer-events: none; max-width: 70vw; }
.pu-chip { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: rgba(8, 11, 17, .85); border: 1px solid var(--c); font-size: .78rem; font-weight: 800; position: relative; overflow: hidden; }
.pu-chip i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #05070c; display: grid; place-items: center; font-size: .8rem; }
.pu-chip small { color: var(--muted); font-weight: 700; }
.pu-chip::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--f, 1) * 100%); background: var(--c); }
.pu-chip.bad { border-style: dashed; }
.pu-list b { color: var(--c); }
@media (max-height: 500px) { .pu-chips { top: 48px; } .pu-chip { font-size: .7rem; } }
