:root {
  --ink: #0b0b10;
  --panel: rgba(12, 12, 18, 0.86);
  --panel-2: rgba(28, 26, 34, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f3efe6;
  --muted: #a9a39a;
  --gold: #f1c40f;
  --red: #d6312b;
  --blue: #2e86de;
  --green: #3ecf6e;
  --display: Impact, 'Haettenschweiler', 'Arial Narrow Bold', 'Franklin Gothic Bold', 'Arial Black', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --scale: 1;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--body); overflow: hidden; }
body { font-size: calc(15px * var(--scale)); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; mix-blend-mode: overlay; }
#vignette { position: fixed; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 28%, rgba(20,0,0,0.55) 58%, rgba(0,0,0,0.96) 88%); }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 24px; background: var(--ink); z-index: 50; text-align: center; transition: opacity .6s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-logo { font-family: var(--display); font-size: 64px; line-height: .9; letter-spacing: 2px; color: var(--text); }
.boot-logo span { color: var(--gold); font-size: .62em; }
.boot-bar { width: 220px; height: 6px; background: #222; margin: 0 auto; }
.boot-bar i { display: block; height: 100%; width: 30%; background: var(--gold); animation: boot 1.2s ease-in-out infinite; }
@keyframes boot { 0% { margin-left: 0; } 50% { margin-left: 70%; } 100% { margin-left: 0; } }

/* ---------- screens ---------- */
#screens { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; padding: calc(18px + var(--safe-t)) calc(20px + var(--safe-r)) calc(18px + var(--safe-b)) calc(20px + var(--safe-l)); overflow-y: auto; animation: fadein .35s ease; }
.screen.clear { pointer-events: none; }
.screen.clear > * { pointer-events: auto; }
.screen.clear > .ringcard, .screen.clear > .intro-plate { pointer-events: none; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.shade-left { background: linear-gradient(90deg, rgba(8,8,12,.92) 0%, rgba(8,8,12,.75) 38%, rgba(8,8,12,0) 70%); }
.shade-full { background: rgba(8, 8, 12, 0.8); }
.shade-bottom { background: linear-gradient(0deg, rgba(8,8,12,.95) 0%, rgba(8,8,12,.6) 45%, rgba(8,8,12,0) 75%); }

.logo { font-family: var(--display); font-size: clamp(46px, 9vw, 104px); line-height: .86; letter-spacing: 1px; text-transform: uppercase; margin: 4vh 0 2vh; text-shadow: 0 6px 0 rgba(0,0,0,.5); }
.logo span { display: block; color: var(--gold); font-size: .6em; letter-spacing: 4px; }
.tag { color: var(--muted); max-width: 420px; line-height: 1.45; margin-bottom: 3vh; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(22px, 3.4vw, 34px); }
h3 { font-size: 18px; color: var(--gold); }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.red { color: var(--red); }

.menu { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.btn { appearance: none; border: 2px solid var(--line); background: var(--panel-2); padding: 12px 18px; text-align: left; cursor: pointer; font-family: var(--display); font-size: 22px; letter-spacing: 1px; text-transform: uppercase; transition: transform .12s, border-color .12s, background .12s; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
.btn small { font-family: var(--body); font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.btn:hover, .btn:focus-visible { border-color: var(--gold); transform: translateX(4px); outline: none; background: #26221a; }
.btn.primary { background: var(--gold); color: #111; border-color: var(--gold); }
.btn.primary small { color: #3a2e00; }
.btn.primary:hover { background: #ffd83a; }
.btn.danger:hover { border-color: var(--red); }
.btn.small { font-size: 16px; padding: 8px 12px; min-height: 40px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.hint-new { border-left: 4px solid var(--gold); padding: 8px 12px; background: rgba(241,196,15,.08); margin: 8px 0 16px; max-width: 420px; font-size: .95em; }
.footer-keys { position: absolute; bottom: calc(12px + var(--safe-b)); left: calc(20px + var(--safe-l)); color: var(--muted); font-size: 12px; }

/* key caps */
kbd { display: inline-block; min-width: 1.9em; padding: 2px 6px; border: 1px solid #555; border-bottom-width: 3px; border-radius: 4px; background: #1c1c22; font-family: var(--body); font-size: .85em; text-align: center; color: #fff; margin: 0 1px; }
kbd.mouse { border-radius: 10px 10px 12px 12px; }

/* ---------- career / select cards ---------- */
.ladder { display: flex; flex-direction: column; gap: 6px; }
.rung { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); }
.rung.done { opacity: .6; }
.rung.next { border-color: var(--gold); background: #231f12; }
.rung.locked { opacity: .45; }
.rung b { font-family: var(--display); font-size: 20px; letter-spacing: 1px; font-weight: 400; }
.rung .num { font-family: var(--display); font-size: 24px; color: var(--gold); text-align: center; }
.tape { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px 14px; align-items: center; text-align: center; }
.tape .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.tape .name { font-family: var(--display); font-size: 26px; }
.tape .nick { color: var(--gold); font-style: italic; }
.statbar { height: 8px; background: #222; position: relative; }
.statbar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.opp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opp { padding: 10px; border: 2px solid var(--line); background: var(--panel); cursor: pointer; text-align: left; }
.opp.sel { border-color: var(--gold); background: #231f12; }
.opp b { font-family: var(--display); font-weight: 400; font-size: 18px; display: block; }
.opp span { font-size: 12px; color: var(--muted); }
.rival { border-left: 4px solid var(--red); padding: 8px 12px; background: rgba(214,49,43,.1); font-style: italic; }

/* ---------- create fighter ---------- */
.create { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; height: 100%; }
.create .form { overflow-y: auto; padding-right: 6px; max-height: 100%; }
.field { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.field label { color: var(--muted); font-size: 13px; }
.field input[type=text] { background: #16161c; border: 1px solid var(--line); color: var(--text); padding: 8px; font: inherit; user-select: text; -webkit-user-select: text; }
.field input[type=range] { width: 100%; accent-color: var(--gold); }
.field select { background: #16161c; color: var(--text); border: 1px solid var(--line); padding: 7px; font: inherit; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.swatch { width: 26px; height: 26px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid var(--line); background: #16161c; padding: 5px 9px; cursor: pointer; font-size: 13px; }
.chip.sel { border-color: var(--gold); color: var(--gold); }
.stat-row { display: grid; grid-template-columns: 110px 34px 1fr 34px 30px; gap: 6px; align-items: center; margin: 6px 0; }
.stat-row button { width: 34px; height: 34px; background: #1c1c22; border: 1px solid var(--line); cursor: pointer; font-size: 18px; }
.stat-row .pips { display: flex; gap: 2px; }
.stat-row .pips i { flex: 1; height: 12px; background: #2a2a30; }
.stat-row .pips i.on { background: var(--gold); }
.stat-effect { font-size: 12px; color: var(--muted); margin: -2px 0 8px 110px; }
.pool { font-family: var(--display); font-size: 20px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; font-family: var(--body); }
.hud-top { position: absolute; top: calc(10px + var(--safe-t)); left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.fpanel { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fpanel.right { align-items: flex-end; text-align: right; }
.fname { font-family: var(--display); font-size: clamp(16px, 2.2vw, 24px); letter-spacing: 1px; text-shadow: 0 2px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fname .corner { display: inline-block; width: 10px; height: 10px; margin: 0 6px; vertical-align: middle; }
.bar { width: min(34vw, 330px); height: 12px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.25); position: relative; overflow: hidden; }
.fpanel.right .bar { transform: scaleX(-1); }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2ecc71, #a8e063); transition: width .12s linear; }
.bar i.cap { background: rgba(255,255,255,.12); transition: width .5s; }
.bar.low i:not(.cap) { background: linear-gradient(90deg, #e67e22, #f1c40f); }
.bar.gassed i:not(.cap) { background: linear-gradient(90deg, #c0392b, #e74c3c); animation: pulse .5s infinite alternate; }
@keyframes pulse { from { opacity: .6; } to { opacity: 1; } }
.dmg { display: flex; gap: 6px; font-size: 11px; color: var(--muted); align-items: center; }
.dmg .pip { width: 16px; height: 16px; display: grid; place-content: center; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.5); font-size: 10px; }
.dmg .lbl { text-transform: uppercase; letter-spacing: 1px; }
.dmgbar { width: 64px; height: 6px; background: rgba(0,0,0,.6); position: relative; }
.dmgbar i { position: absolute; inset: 0 auto 0 0; background: #e74c3c; }
.clockbox { background: rgba(0,0,0,.78); border: 2px solid var(--gold); padding: 4px 14px; text-align: center; min-width: 96px; }
.clockbox .rnd { font-size: 11px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.clockbox .clk { font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: 1px; }
.clockbox.warn { border-color: var(--red); }
.clockbox.warn .clk { color: #ff6b5b; }
.callouts { position: absolute; top: 24%; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.callout { font-family: var(--display); font-size: clamp(26px, 5vw, 54px); letter-spacing: 2px; text-shadow: 0 4px 0 #000, 0 0 24px rgba(0,0,0,.6); animation: pop .9s ease forwards; text-transform: uppercase; }
.callout.small { font-size: clamp(16px, 2.6vw, 26px); }
.callout.gold { color: var(--gold); }
.callout.red { color: #ff5a4a; }
@keyframes pop { 0% { transform: scale(1.6); opacity: 0; } 12% { transform: scale(1); opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }
.hud-hint { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); background: rgba(0,0,0,.72); border: 1px solid var(--line); padding: 8px 14px; font-size: 14px; max-width: min(92vw, 640px); text-align: center; transition: opacity .3s; }
.hud-keys { position: absolute; left: calc(12px + var(--safe-l)); bottom: calc(10px + var(--safe-b)); font-size: 12px; color: rgba(255,255,255,.65); }
.hud-plan { position: absolute; right: calc(12px + var(--safe-r)); bottom: calc(10px + var(--safe-b)); font-size: 12px; color: var(--gold); }
.combo { position: absolute; left: calc(14px + var(--safe-l)); top: 32%; font-family: var(--display); font-size: 22px; color: var(--gold); text-shadow: 0 2px 0 #000; }
.bigcount { position: absolute; top: 18%; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: clamp(90px, 18vw, 200px); color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,.7); animation: countpop .5s ease; }
@keyframes countpop { from { transform: scale(1.5); opacity: .2; } to { transform: scale(1); opacity: 1; } }
.getup { position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); width: min(86vw, 520px); text-align: center; pointer-events: auto; }
.getup .meter { position: relative; height: 34px; background: rgba(0,0,0,.75); border: 2px solid #fff; margin: 10px 0; }
.getup .zone { position: absolute; top: 0; bottom: 0; background: rgba(62,207,110,.55); border-left: 2px solid var(--green); border-right: 2px solid var(--green); }
.getup .needle { position: absolute; top: -6px; bottom: -6px; width: 6px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.getup .steps { display: flex; gap: 6px; justify-content: center; }
.getup .steps i { width: 26px; height: 10px; background: #333; }
.getup .steps i.on { background: var(--green); }
.getup .label { font-family: var(--display); font-size: 24px; letter-spacing: 1px; }
.getup.miss .meter { border-color: var(--red); animation: shakex .25s; }
@keyframes shakex { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mini-legend { position: absolute; right: calc(12px + var(--safe-r)); top: calc(92px + var(--safe-t)); background: rgba(0,0,0,.6); padding: 8px 10px; font-size: 12px; line-height: 1.8; border: 1px solid var(--line); max-width: 260px; }

/* high contrast HUD */
body.hc .bar { border-color: #fff; height: 16px; }
body.hc .fname, body.hc .callout { text-shadow: 0 0 4px #000, 0 3px 0 #000; }
body.hc .hud-hint, body.hc .mini-legend { background: #000; border-color: #fff; }
body.hc .clockbox { background: #000; }

/* ---------- ring card / interstitial ---------- */
.ringcard { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.ringcard .card { background: #fff; color: #111; padding: 20px 46px; border: 8px solid var(--gold); box-shadow: 0 20px 0 rgba(0,0,0,.4); transform: rotate(-2deg); animation: cardin .6s cubic-bezier(.2,1.6,.4,1); image-rendering: pixelated; }
.ringcard .card small { display: block; font-family: var(--body); letter-spacing: 3px; font-size: 13px; text-transform: uppercase; color: #555; }
.ringcard .card b { font-family: var(--display); font-weight: 400; font-size: clamp(60px, 12vw, 120px); line-height: 1; display: block; }
.ringcard .card em { display: block; font-style: normal; font-family: var(--display); color: var(--red); letter-spacing: 2px; }
@keyframes cardin { from { transform: translateY(60px) rotate(8deg); opacity: 0; } to { transform: rotate(-2deg); opacity: 1; } }
.intro-plate { position: absolute; left: 0; right: 0; bottom: calc(10% + var(--safe-b)); text-align: center; pointer-events: none; animation: fadein .5s; }
.intro-plate .corner-lbl { letter-spacing: 4px; font-size: 13px; text-transform: uppercase; }
.intro-plate .big { font-family: var(--display); font-size: clamp(34px, 7vw, 76px); line-height: 1; text-shadow: 0 5px 0 #000; }
.intro-plate .rec { color: var(--gold); letter-spacing: 2px; }
.skip { position: absolute; right: calc(16px + var(--safe-r)); bottom: calc(16px + var(--safe-b)); pointer-events: auto; }

/* ---------- corner break ---------- */
.cornerbox { margin-top: auto; background: var(--panel); border: 1px solid var(--line); padding: 16px; max-width: 860px; width: 100%; align-self: center; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.choice { border: 2px solid var(--line); background: #16161c; padding: 12px; cursor: pointer; text-align: left; }
.choice b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 1px; }
.choice span { font-size: 13px; color: var(--muted); }
.choice.sel { border-color: var(--gold); background: #231f12; }
.choice.urgent { border-color: var(--red); }
.plans { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.trainer { font-style: italic; border-left: 4px solid var(--gold); padding: 6px 12px; margin: 6px 0; }
.meters { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.timer { font-family: var(--display); color: var(--gold); font-size: 20px; }

/* ---------- post fight ---------- */
.result-banner { font-family: var(--display); font-size: clamp(40px, 8vw, 90px); line-height: .95; text-transform: uppercase; letter-spacing: 1px; }
.result-banner.win { color: var(--gold); }
.result-banner.loss { color: #ff5a4a; }
table.cards { border-collapse: collapse; width: 100%; font-size: 13px; }
table.cards th, table.cards td { border: 1px solid var(--line); padding: 5px 6px; text-align: center; }
table.cards th { background: rgba(255,255,255,.06); font-weight: 600; }
table.cards td.win { color: var(--gold); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 4px; margin: 8px 0; flex-wrap: wrap; }
.tab { padding: 6px 10px; border: 1px solid var(--line); background: #16161c; cursor: pointer; font-size: 13px; }
.tab.sel { border-color: var(--gold); color: var(--gold); }

/* ---------- overlay modal ---------- */
#overlay { position: fixed; inset: 0; z-index: 30; background: rgba(4,4,8,.82); display: flex; align-items: center; justify-content: center; padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b)); backdrop-filter: blur(3px); }
.modal { background: #121218; border: 1px solid var(--line); width: min(900px, 100%); max-height: 100%; overflow-y: auto; padding: 18px 20px; animation: fadein .25s; }
.modal .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.legend section { background: rgba(255,255,255,.03); border: 1px solid var(--line); padding: 10px 12px; }
.legend .li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,.08); font-size: 14px; }
.legend .li:last-child { border-bottom: 0; }
.dirpad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 44px); gap: 4px; justify-content: center; margin: 8px auto; }
.dirpad div { display: grid; place-content: center; background: #1c1c22; border: 1px solid var(--line); font-size: 11px; text-align: center; line-height: 1.2; }
.dirpad .c { background: transparent; border: 0; color: var(--gold); font-size: 10px; }
.settings-group { margin: 12px 0; }
.settings-group h3 { margin-bottom: 6px; }
.setting { display: grid; grid-template-columns: 1fr minmax(140px, 240px); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.setting input[type=range] { width: 100%; accent-color: var(--gold); }
.setting select { background: #1c1c22; color: var(--text); border: 1px solid var(--line); padding: 6px; font: inherit; }
.toggle { width: 52px; height: 28px; border-radius: 14px; background: #333; border: 0; position: relative; cursor: pointer; justify-self: end; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #aaa; transition: left .15s; }
.toggle.on { background: var(--gold); }
.toggle.on::after { left: 27px; background: #111; }

/* ---------- captions & toasts ---------- */
#captions { position: fixed; left: 50%; bottom: calc(64px + var(--safe-b)); transform: translateX(-50%); z-index: 20; pointer-events: none; display: flex; flex-direction: column; gap: 4px; align-items: center; width: min(92vw, 720px); }
.cap { background: rgba(0,0,0,.78); padding: 6px 12px; font-size: 15px; animation: fadein .2s; text-align: center; }
.cap b { color: var(--gold); font-weight: 600; margin-right: 6px; }
#toast { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 40; pointer-events: none; }
.toast { background: var(--gold); color: #111; padding: 8px 14px; font-weight: 600; animation: fadein .2s; margin-bottom: 4px; }

/* ---------- gym ---------- */
.drill { position: absolute; right: calc(12px + var(--safe-r)); top: calc(86px + var(--safe-t)); width: min(340px, 44vw); background: var(--panel); border: 1px solid var(--line); padding: 12px; pointer-events: auto; }
.drill h3 { margin: 0 0 4px; }
.drill .task { font-size: 16px; margin: 6px 0; }
.drill .keys { margin: 8px 0; font-size: 14px; }
.drill .prog { display: flex; gap: 3px; margin-top: 8px; }
.drill .prog i { flex: 1; height: 6px; background: #333; }
.drill .prog i.on { background: var(--green); }
.drill .prog i.cur { background: var(--gold); }
.drill .count { color: var(--gold); font-family: var(--display); font-size: 22px; }
.drill.done { border-color: var(--green); }

/* ---------- touch ---------- */
#touch { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.stick { position: absolute; left: calc(18px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.2); pointer-events: auto; touch-action: none; }
.stick .knob { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.5); }
.stick .dl { position: absolute; font-size: 10px; color: rgba(255,255,255,.55); }
.tpad { position: absolute; right: calc(12px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); display: grid; grid-template-columns: repeat(4, 58px); gap: 6px; pointer-events: auto; }
.tbtn { height: 52px; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); background: rgba(20,20,26,.6); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; touch-action: none; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.tbtn.on { background: rgba(241,196,15,.5); border-color: var(--gold); }
.tbtn.punch { background: rgba(214,49,43,.45); }
.tbtn.big { grid-column: span 2; }
.tpause { position: absolute; top: calc(70px + var(--safe-t)); left: 50%; transform: translateX(-50%); pointer-events: auto; width: 44px; height: 32px; border-radius: 6px; background: rgba(0,0,0,.6); border: 1px solid var(--line); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .create { grid-template-columns: 1fr; grid-template-rows: 38vh 1fr; }
  .create .preview-space { order: -1; }
  .choices { grid-template-columns: 1fr; }
  .bar { width: 36vw; }
  .dmg .lbl { display: none; }
  .mini-legend { display: none; }
  .drill { top: auto; bottom: calc(210px + var(--safe-b)); left: 12px; right: 12px; width: auto; font-size: 13px; }
  .hud-keys { display: none; }
  .clockbox .clk { font-size: 22px; }
  .clockbox { min-width: 72px; padding: 3px 8px; }
  .shade-left { background: rgba(8,8,12,.78); }
  .btn { font-size: 19px; }
  #captions { bottom: calc(190px + var(--safe-b)); }
  .hud-hint { bottom: calc(180px + var(--safe-b)); }
}
@media (max-height: 460px) {
  .logo { font-size: 44px; margin: 1vh 0; }
  .tpad { grid-template-columns: repeat(5, 52px); }
  .tbtn { height: 44px; }
  .stick { width: 124px; height: 124px; }
}
@media (prefers-reduced-motion: reduce) {
  .callout, .screen, .bigcount, .ringcard .card { animation: none; }
}
