/* RipCores - black, chrome and red, with colourful cel-shaded parts as the stars. */
:root {
  --bg: #060609;
  --bg2: #0d0d13;
  --panel: #12121a;
  --panel2: #191923;
  --line: #2a2a36;
  --ink: #f2f3f7;
  --muted: #9aa0ae;
  --red: #ff1f2d;
  --red2: #b3101b;
  --glow: 0 0 18px rgba(255, 31, 45, 0.55);
  --chrome: linear-gradient(180deg, #ffffff 0%, #d9dde5 38%, #8d93a0 52%, #e9ecf1 70%, #aab0bd 100%);
  --cut: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --r0: #a7b1c2;
  --r1: #2f9bff;
  --r2: #a855ff;
  --r3: #ffaa00;
  --r4: #ff2e7e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 31, 45, 0.16), transparent 60%),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.018) 46px 48px),
    var(--bg);
  color: var(--ink);
  font: 500 15px/1.45 'Exo 2', system-ui, sans-serif;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
h1, h2, h3, .display { font-family: 'Russo One', 'Exo 2', sans-serif; font-weight: 400; letter-spacing: 0.02em; margin: 0; }
.chrome-text {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.35);
  filter: drop-shadow(0 0 1px var(--red)) drop-shadow(2px 2px 0 var(--red2)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
  background: linear-gradient(180deg, rgba(6, 6, 9, 0.97), rgba(6, 6, 9, 0.85));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 31, 45, 0.35);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; text-decoration: none; height: 44px; }
.brand img { height: 44px; }
.tabs { display: flex; gap: 4px; margin-left: 6px; }
.tabs a {
  text-decoration: none; padding: 8px 16px; font-family: 'Russo One'; font-size: 15px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); clip-path: var(--cut); transition: 0.15s;
}
.tabs a:hover { color: var(--ink); background: var(--panel2); }
.tabs a.active { color: #fff; background: linear-gradient(180deg, var(--red), var(--red2)); box-shadow: var(--glow); }
.wallet { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--panel); border: 1px solid var(--line); clip-path: var(--cut); font-weight: 800;
}
.chip i { width: 14px; height: 14px; display: inline-block; }
.chip i.shard { background: linear-gradient(135deg, #ff6b75, var(--red)); transform: rotate(45deg) scale(0.8); box-shadow: var(--glow); }
.chip i.eth { background: #0052ff; border-radius: 3px; box-shadow: inset 0 0 0 3px #fff3; } /* Base blue */
.mode-banner {
  text-align: center; padding: 6px 12px; font-size: 13px; background: #1a0b0e; color: #ffb3b8;
  border-bottom: 1px solid #3a1218;
}
main { padding: 26px 22px 60px; max-width: 1360px; margin: 0 auto; }

/* ------------------------------------------------------------------ logo fallback */
.logo-fallback {
  display: inline-flex; align-items: center; font-family: 'Russo One'; font-size: 30px; font-style: italic;
  letter-spacing: 0.01em; line-height: 1; transform: skewX(-8deg);
}
.logo-fallback .core {
  width: 0.92em; height: 0.92em; margin: 0 0.02em; display: inline-block; position: relative;
  animation: spin 2.4s linear infinite;
}
.logo-fallback .core svg { width: 100%; height: 100%; overflow: visible; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-logo { font-size: clamp(44px, 8vw, 92px); }

/* ------------------------------------------------------------------ panels & buttons */
.panel {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); clip-path: var(--cut); padding: 18px; position: relative;
}
.panel::before { content: ''; position: absolute; left: 10px; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--red), transparent 70%); }
.panel h2 { font-size: 20px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.panel h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 0; cursor: pointer; clip-path: var(--cut);
  font-family: 'Russo One'; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(180deg, #ff3a46, var(--red2));
  box-shadow: inset 0 1px 0 #ffffff55, inset 0 -3px 0 #0000004d; transition: transform 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: not-allowed; }
.btn-ghost { background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.btn-chrome { background: var(--chrome); color: #16161c; box-shadow: inset 0 -3px 0 #0003; }
.btn-big { padding: 16px 28px; font-size: 19px; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
input.text {
  background: #0a0a0f; border: 1px solid var(--line); padding: 10px 12px; clip-path: var(--cut); width: 100%;
  font-family: 'Russo One'; letter-spacing: 0.15em; text-transform: uppercase;
}

/* ------------------------------------------------------------------ layout helpers */
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1.15fr 1fr; }
/* a grid's columns never grow past the screen to fit a long row inside them (a phone's page stays the phone's width) */
.grid > * { min-width: 0; }
.cols-3 { grid-template-columns: 1.05fr 1fr 0.95fr; }
@media (max-width: 1050px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } .tabs a { padding: 8px 10px; } }
/* phones: logo, balances and account on one row, every tab on the next (one row of 6, or 3 + 3 on narrow screens) */
/* (and a phone held sideways: at 740-930 px wide the desktop bar overflowed and widened the page past the screen) */
@media (max-width: 720px), (hover: none) and (pointer: coarse) and (max-height: 540px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .brand, .brand img { height: 34px; }
  .wallet { flex: 1 1 0; justify-content: flex-end; gap: 6px; min-width: 0; }
  .wallet .chip { flex-shrink: 0; padding: 4px 8px; gap: 5px; font-size: 13px; }
  .wallet .chip i { width: 11px; height: 11px; }
  #walletBtn { padding: 7px 10px; font-size: 12px; letter-spacing: 0.03em; min-width: 44px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs { order: 3; width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
  .tabs a { padding: 7px 2px; font-size: 12px; letter-spacing: 0.03em; text-align: center; }
  main { padding: 16px 12px 60px; }
}
@media (max-width: 520px) { .tabs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 360px) { .brand, .brand img { height: 28px; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ 3D viewers */
.viewer { position: relative; width: 100%; aspect-ratio: 1.15; background: radial-gradient(closest-side, #2a0d12, transparent), #08080c; clip-path: var(--cut); overflow: hidden; }
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer .overlay { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; gap: 8px; align-items: flex-end; pointer-events: none; }
.viewer .overlay > * { pointer-events: auto; }

/* ------------------------------------------------------------------ part cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  --rc: var(--r0);
  position: relative; cursor: pointer; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--el, #fff) 26%, transparent), transparent 62%), #0c0c12;
  border: 2px solid color-mix(in srgb, var(--rc) 70%, #000); clip-path: var(--cut); padding: 8px 8px 10px; transition: transform 0.12s, box-shadow 0.12s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 22px color-mix(in srgb, var(--rc) 40%, transparent); }
.card.selected { border-color: var(--red); box-shadow: var(--glow); }
.card.disabled { opacity: 0.38; cursor: not-allowed; }
.card img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; filter: drop-shadow(0 6px 8px #000a); }
.card .name { font-family: 'Russo One'; font-size: 13px; line-height: 1.15; margin-top: 4px; min-height: 2.3em; }
.card .meta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.card .rar { color: var(--rc); }
.card .count { position: absolute; top: 8px; right: 8px; background: var(--red); font-weight: 800; font-size: 12px; padding: 1px 7px; clip-path: var(--cut); }
.card .el { position: absolute; top: 6px; left: 8px; font-size: 15px; }
.card .season { margin-top: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.season-tag { font-size: 11px; vertical-align: middle; margin-left: 6px; }
.season-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.season-head:first-child { margin-top: 0; }
.season-head h3 { margin: 0; }
.card.unowned img { filter: grayscale(0.85) brightness(0.45); }
.r0 { --rc: var(--r0); } .r1 { --rc: var(--r1); } .r2 { --rc: var(--r2); } .r3 { --rc: var(--r3); } .r4 { --rc: var(--r4); }

/* ------------------------------------------------------------------ garage */
.slot {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px;
  background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); cursor: pointer; transition: 0.12s;
}
.slot:hover, .slot.open { border-color: var(--red); background: #150b0e; }
.slot img { width: 76px; height: 76px; object-fit: contain; }
.slot .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 800; }
.slot .pname { font-family: 'Russo One'; font-size: 16px; }
.slot .sub { font-size: 12px; color: var(--muted); }
/* The part picker is a full-width tray under the Garage's three panels, not a column inside one: open a slot and
   you see a whole wall of parts at once instead of scrolling a 2-wide window (screens/garage.js). */
.picker { grid-column: 1 / -1; }
.picker .cards { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); max-height: 56vh; overflow: auto; padding-right: 4px; }
.picker-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.picker-head h2 { margin: 0; }
.picker-head .muted { font-size: 13px; flex: 1; min-width: 180px; }
.picker-head .btn { flex: none; align-self: center; }
@media (max-width: 1050px) { .picker .cards { max-height: none; } }
.why { font-size: 11px; color: #ff8a92; margin-top: 3px; }

.stat { display: grid; grid-template-columns: 96px 1fr 34px; gap: 8px; align-items: center; margin: 7px 0; font-weight: 800; font-size: 13px; }
.stat .bar { height: 12px; background: #0a0a0f; border: 1px solid var(--line); clip-path: var(--cut); overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--chrome); box-shadow: inset -3px 0 0 var(--red); transition: width 0.3s; }
.stat .v { text-align: right; font-family: 'Russo One'; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; font-weight: 800; background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); text-transform: uppercase; letter-spacing: 0.05em; }
.tag.good { border-color: #1f7a43; color: #6dffa8; }
.tag.red { border-color: var(--red2); color: #ff8a92; }
.ability-box { padding: 12px; background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); }
.ability-box b { font-family: 'Russo One'; font-size: 17px; }
.power { font-family: 'Russo One'; font-size: 44px; line-height: 1; }

/* ------------------------------------------------------------------ hub */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin: 10px 0 26px; }
.hero p { margin: 0; color: var(--muted); max-width: 640px; }
.mode-card { display: grid; gap: 10px; }
.mode-card .desc { color: var(--muted); font-size: 14px; margin: 0; }
.leader { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 5px 0; border-bottom: 1px solid #1d1d27; font-size: 14px; }
.leader b { font-family: 'Russo One'; }
.searching { display: flex; align-items: center; gap: 12px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ------------------------------------------------------------------ forge */
.pack {
  display: grid; justify-items: center; gap: 10px; padding: 22px; text-align: center;
  background: radial-gradient(circle at 50% 30%, #3a0c12, #0c0c12 70%); border: 1px solid #3a1218; clip-path: var(--cut);
}
.pack .box {
  width: 150px; height: 190px; clip-path: var(--cut); display: grid; place-items: center;
  background: linear-gradient(160deg, #26262f, #0a0a0f 60%), #111; border: 2px solid var(--red); box-shadow: var(--glow);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
.odds { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; font-size: 13px; }
.reveal { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.reveal .card { width: 190px; animation: flip 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.reveal .card:nth-child(2) { animation-delay: 0.15s; } .reveal .card:nth-child(3) { animation-delay: 0.3s; }
.reveal .card:nth-child(4) { animation-delay: 0.45s; } .reveal .card:nth-child(5) { animation-delay: 0.6s; }
@keyframes flip { from { transform: rotateY(90deg) scale(0.6); opacity: 0; } }
.reveal .card.r3, .reveal .card.r4 { box-shadow: 0 0 34px var(--rc); }

/* ------------------------------------------------------------------ modal & toasts */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, 0.72); padding: 16px; }
.modal .dialog { width: min(920px, 100%); max-height: 92vh; overflow: auto; }
.modal .close { position: absolute; top: 10px; right: 12px; z-index: 20; } /* above the dialog content (art, cards), or taps land on that instead */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; }
.toast { padding: 12px 16px; background: var(--panel2); border-left: 4px solid var(--red); clip-path: var(--cut); max-width: 360px; animation: slidein 0.25s ease-out; box-shadow: 0 8px 24px #000a; }
.toast.ok { border-left-color: #2fd47a; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }

/* ------------------------------------------------------------------ battle */
#battle { position: fixed; inset: 0; z-index: 40; background: #000; }
#arenaHost, #arenaHost canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; inset: 0; pointer-events: none; font-weight: 800; }
.hud > * { pointer-events: auto; }
.plate { position: absolute; top: 16px; width: min(360px, 38vw); padding: 10px 14px; background: linear-gradient(180deg, #16161eee, #0b0b10ee); border: 1px solid var(--line); clip-path: var(--cut); }
.plate.p0 { left: 16px; border-left: 4px solid #3fa0ff; }
.plate.p1 { right: 16px; border-right: 4px solid var(--red); text-align: right; }
.plate .who { font-family: 'Russo One'; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.plate.p1 .who { justify-content: flex-end; }
.plate .sub { font-size: 12px; color: var(--muted); }
.meter { height: 14px; margin-top: 6px; background: #060609; border: 1px solid var(--line); clip-path: var(--cut); position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--chrome); transition: width 0.1s linear; }
.plate.p1 .meter i { left: auto; right: 0; }
.meter.burst { height: 7px; }
.meter.burst i { background: linear-gradient(90deg, #ffb020, var(--red)); }
.meter.low i { background: linear-gradient(180deg, #ff6b75, var(--red2)); }
/* labels on the bars: SPIN (your top's spin - not health) and BURST (fills up; at 100 the top bursts) */
.meter::after { content: attr(data-label); position: absolute; top: 50%; transform: translateY(-50%); left: 6px; font-size: 9px; font-weight: 800; letter-spacing: 0.12em; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; pointer-events: none; }
.plate.p1 .meter::after { left: auto; right: 6px; }
.meter.burst { height: 11px; }
.meter.burst::after { font-size: 8px; }
.meter.burst.danger { animation: burstwarn 0.5s ease-in-out infinite alternate; }
@keyframes burstwarn { to { box-shadow: 0 0 10px 2px var(--red); } }
.plate .ko { margin-top: 6px; font-family: 'Russo One'; font-size: 13px; letter-spacing: 0.08em; color: #fff; background: var(--red); padding: 2px 8px; display: inline-block; clip-path: var(--cut); }
.plate.p1 .ko { float: right; }
.plate.out { opacity: 0.75; }
.plate .riptag { margin-top: 6px; font-family: 'Russo One'; font-size: 13px; letter-spacing: 0.06em; color: #000; background: var(--rip, #6fb8ff); padding: 2px 8px; display: inline-block; clip-path: var(--cut); animation: slam 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.plate.p1 .riptag { float: right; }
.fxchips { display: flex; gap: 4px; margin-top: 5px; min-height: 18px; flex-wrap: wrap; }
.plate.p1 .fxchips { justify-content: flex-end; }
.fxchips span { font-size: 10px; padding: 1px 6px; clip-path: var(--cut); color: #000; }
.scoreboard { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); text-align: center; padding: 8px 18px; background: #0b0b10ee; border: 1px solid var(--line); clip-path: var(--cut); min-width: 170px; }
.scoreboard .pts { font-family: 'Russo One'; font-size: 30px; line-height: 1; }
.scoreboard .pts .a { color: #6fb8ff; } .scoreboard .pts .b { color: #ff5560; }
.scoreboard .sub { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.announcer {
  position: absolute; left: 0; right: 0; top: 34%; text-align: center; pointer-events: none;
  font-family: 'Russo One'; font-style: italic; font-size: clamp(42px, 9vw, 110px); line-height: 1; transform: skewX(-8deg);
}
.announcer .big { display: inline-block; animation: slam 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.announcer .small { display: block; font-size: 0.32em; margin-top: 10px; color: #fff; text-shadow: 0 2px 0 #000; font-style: normal; }
@keyframes slam { from { transform: scale(2.6); opacity: 0; } }
.ability {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer;
  background: conic-gradient(var(--ab, var(--red)) calc(var(--charge, 0) * 1%), #1b1b24 0);
  display: grid; place-items: center; box-shadow: 0 0 0 4px #000, 0 0 0 6px #33333f, 0 10px 30px #000;
}
.ability .inner { width: 108px; height: 108px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2a2a36, #0b0b10); display: grid; place-items: center; text-align: center; padding: 10px; }
.ability .nm { font-family: 'Russo One'; font-size: 13px; line-height: 1.1; }
.ability .key { font-size: 10px; color: var(--muted); margin-top: 3px; letter-spacing: 0.15em; }
.ability.ready { animation: pulse 0.9s ease-in-out infinite; }
.ability.ready .inner { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--ab) 70%, #fff), color-mix(in srgb, var(--ab) 55%, #000)); color: #000; }
.ability.ready .key { color: #000; }
.ability.none { opacity: 0.5; cursor: default; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px #000, 0 0 0 6px var(--ab), 0 0 40px var(--ab); } }
.quit { position: absolute; bottom: 18px; left: 18px; }
.signed-in { margin-top: 14px; padding: 10px 12px; background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); display: grid; gap: 4px; }
.signed-in code { font-size: 12px; word-break: break-all; cursor: pointer; color: #cfd3dc; }
/* before each round: the RIP button (wind-up meter round its edge) and the placing hint */
.ability.rip { touch-action: none; user-select: none; -webkit-user-select: none; }
.ability.rip .inner { background: radial-gradient(circle at 50% 35%, #232a3a, #0b0b12); }
.ability.rip .nm { font-size: 22px; letter-spacing: 0.06em; }
.ability.rip.held { transform: translateX(-50%) scale(0.94); box-shadow: 0 0 0 4px #000, 0 0 0 6px var(--ab), 0 0 34px var(--ab); }
.hud > .prep-hint {
  position: absolute; left: 50%; bottom: 172px; transform: translateX(-50%); pointer-events: none;
  padding: 7px 14px; background: #0b0b10dd; border: 1px solid var(--line); clip-path: var(--cut);
  font-size: 13px; font-weight: 600; text-align: center; width: max-content; max-width: calc(100vw - 32px);
}
.prep-hint b { font-family: 'Russo One'; font-weight: 400; letter-spacing: 0.03em; }
.result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.72); z-index: 3; }
.result .panel { width: min(560px, 92vw); text-align: center; }
.result .verdict { font-size: clamp(48px, 10vw, 96px); font-style: italic; transform: skewX(-8deg); }
.result table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.result td { padding: 4px 6px; border-bottom: 1px solid #1d1d27; }
@media (max-width: 720px) {
  .plate { width: 44vw; padding: 6px 8px; top: 8px; }
  .plate .who { font-size: 13px; }
  .scoreboard { top: auto; bottom: 170px; }
  .ability { width: 112px; height: 112px; }
  .ability .inner { width: 92px; height: 92px; }
  .hud > .prep-hint { bottom: 224px; font-size: 12px; }
}

/* RIP launch speed lines */
.speedlines {
  position: absolute; inset: -20%; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 3deg, rgba(255, 255, 255, 0.5) 3deg 3.6deg, transparent 3.6deg 7deg, rgba(255, 60, 70, 0.45) 7deg 7.4deg);
  -webkit-mask-image: radial-gradient(circle, transparent 18%, #000 60%);
  mask-image: radial-gradient(circle, transparent 18%, #000 60%);
}
.speedlines.go { animation: speedburst 0.75s ease-out; }
@keyframes speedburst {
  0% { opacity: 0; transform: scale(1.35) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: scale(1) rotate(8deg); }
}

/* Gold-plated parts: the rarest finish. Same stats, much shinier. */
.card.gold { border-color: #ffcf40; background: radial-gradient(circle at 50% 38%, rgba(255, 207, 64, 0.35), transparent 62%), #120e05; box-shadow: 0 0 18px rgba(255, 190, 40, 0.35); }
.card.gold .rar { color: #ffd84a; text-shadow: 0 0 8px #ffb300; }
.card.gold .name { background: linear-gradient(180deg, #fff6c8, #ffcc33 55%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card.gold::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 45%, transparent 60%);
  background-size: 250% 100%; animation: goldsweep 2.6s ease-in-out infinite; mix-blend-mode: overlay;
}
.card.gold img { filter: drop-shadow(0 6px 8px #000a) drop-shadow(0 0 10px rgba(255, 200, 50, 0.45)); }
.card.gold.nogoldart img { filter: sepia(1) saturate(3.2) hue-rotate(-12deg) brightness(1.08) drop-shadow(0 0 10px rgba(255, 200, 50, 0.5)); }
@keyframes goldsweep { 0% { background-position: 120% 0; } 60%, 100% { background-position: -40% 0; } }
.reveal .card.gold { box-shadow: 0 0 46px #ffc400, 0 0 12px #fff; }
.tag.gold { border-color: #ffcf40; color: #ffd84a; }

/* Mythic rarity: prismatic / holographic */
@property --prism { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.prism-text {
  background: linear-gradient(90deg, #ff3d6e, #ffb23d, #f5ff3d, #3dffa2, #3da8ff, #c13dff, #ff3d6e);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important;
  animation: prismslide 3s linear infinite;
}
@keyframes prismslide { to { background-position: 300% 0; } }
.card.r4:not(.gold) {
  border: 3px solid transparent;
  background:
    radial-gradient(circle at 50% 38%, rgba(190, 120, 255, 0.28), transparent 62%) padding-box,
    linear-gradient(#0c0c12, #0c0c12) padding-box,
    conic-gradient(from var(--prism), #ff3d6e, #ffb23d, #f5ff3d, #3dffa2, #3da8ff, #c13dff, #ff3d6e) border-box;
  animation: prismspin 4s linear infinite;
  box-shadow: 0 0 22px rgba(160, 110, 255, 0.45);
}
@keyframes prismspin { to { --prism: 360deg; } }
.card.r4:not(.gold)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0.35;
  background: linear-gradient(115deg, transparent 20%, #ff3d6e 32%, #f5ff3d 40%, #3dffa2 48%, #3da8ff 56%, transparent 68%);
  background-size: 260% 100%; animation: goldsweep 3.2s ease-in-out infinite;
}
.card.r4:not(.gold) img { filter: drop-shadow(0 6px 8px #000a) drop-shadow(0 0 12px rgba(170, 120, 255, 0.55)); }
.card.r4:not(.gold) .name { background: linear-gradient(90deg, #ffd1e0, #fff6b0, #c9ffe4, #cfe6ff, #ecd1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal .card.r4:not(.gold) { box-shadow: 0 0 50px #b26bff, 0 0 18px #3dffa2; }

/* ------------------------------------------------------------------ booster packs */
.packart { --rx: 0deg; --ry: 0deg; --sx: 50%; --sy: 30%; position: relative; width: 168px; perspective: 700px; animation: float 3s ease-in-out infinite; }
.packart svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 18px #000c); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out; }
.packart-sheen { position: absolute; inset: 1% 2%; pointer-events: none; border-radius: 6px; opacity: 0; transition: opacity .25s; mix-blend-mode: color-dodge;
  background: radial-gradient(circle at var(--sx) var(--sy), rgba(255,255,255,.55), transparent 42%), linear-gradient(115deg, transparent 30%, rgba(255,61,110,.25) 42%, rgba(61,255,162,.22) 50%, rgba(61,168,255,.25) 58%, transparent 70%);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.packart:hover .packart-sheen { opacity: 1; }
.packart[data-kind="starter"] { animation-delay: -1s; }
.packart[data-kind="shard"] { animation-delay: -2s; }

/* the opening stage (packopen.js) */
.po-stage { --beam: #fff; --tear: 0; position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow: hidden; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 50% 42%, #2a0a12 0%, #0a0810 55%, #030306 100%); animation: po-fade .25s ease-out; }
@keyframes po-fade { from { opacity: 0; } }
.po-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.po-spot { position: absolute; left: 50%; top: 44%; width: 140vmax; height: 140vmax; transform: translate(-50%, -50%); pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.06) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); mask: radial-gradient(circle, #000 0, transparent 55%);
  animation: po-spin 40s linear infinite; transition: opacity .5s; }
@keyframes po-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.po-ripped .po-spot { opacity: 1; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--beam) 30%, transparent) 0 7deg, transparent 7deg 16deg); animation-duration: 12s; }

.po-pack-wrap { --rx: 0deg; --ry: 0deg; position: relative; z-index: 2; perspective: 900px; animation: po-drop .7s cubic-bezier(.2, 1.35, .35, 1) both; transition: transform .7s cubic-bezier(.5, 0, .75, 0), opacity .5s; }
@keyframes po-drop { 0% { transform: translateY(-80vh) rotate(-18deg) scale(.7); opacity: 0; } 60% { opacity: 1; } }
.po-pack { --sx: 50%; --sy: 30%; position: relative; width: min(300px, 62vw, 46vh); aspect-ratio: 300 / 420; cursor: grab; outline: none; touch-action: none;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .18s ease-out; animation: po-float 3.2s .7s ease-in-out infinite; filter: drop-shadow(0 26px 30px #000d); }
.po-pack:active { cursor: grabbing; }
@keyframes po-float { 50% { translate: 0 -10px; } }
.po-pack > .po-body, .po-pack > .po-top { position: absolute; inset: 0; }
.po-pack svg { width: 100%; height: 100%; display: block; }
.po-top { transform-origin: 0% 100%; transition: transform .08s linear; z-index: 2; }
.po-sheen { position: absolute; inset: 1% 2%; z-index: 3; pointer-events: none; border-radius: 8px; mix-blend-mode: color-dodge;
  background: radial-gradient(circle at var(--sx) var(--sy), rgba(255,255,255,.28), transparent 38%), linear-gradient(115deg, transparent 30%, rgba(255,61,110,.12) 42%, rgba(255,210,61,.1) 47%, rgba(61,255,162,.1) 52%, rgba(61,168,255,.12) 57%, transparent 70%);
  background-size: 100% 100%, 220% 220%; background-position: center, var(--sx) var(--sy); }
.po-tearline { position: absolute; left: 6%; right: 6%; height: 4px; margin-top: -2px; z-index: 4; pointer-events: none; }
.po-tearline i { position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--tear) * 100%); background: linear-gradient(90deg, #fff, var(--beam)); box-shadow: 0 0 14px #fff, 0 0 26px var(--beam); border-radius: 2px; }
.po-count { position: absolute; top: 16%; right: -16px; z-index: 5; background: var(--red); color: #fff; font-family: 'Russo One'; font-size: 26px; padding: 4px 12px; clip-path: var(--cut); box-shadow: var(--glow); }
.po-tease-gold .po-pack { filter: drop-shadow(0 26px 30px #000d) drop-shadow(0 0 22px #ffc40099); }
.po-tease-prism .po-pack { animation: po-float 3.2s .7s ease-in-out infinite, po-prism 1.6s linear infinite; }
@keyframes po-prism { 0% { filter: drop-shadow(0 0 22px #ff3d6e88); } 25% { filter: drop-shadow(0 0 22px #f5ff3d88); } 50% { filter: drop-shadow(0 0 22px #3dffa288); } 75% { filter: drop-shadow(0 0 22px #3da8ff88); } 100% { filter: drop-shadow(0 0 22px #c13dff88); } }

/* the rip: the strip flies, light pours out of the opening */
.po-ripped .po-pack { animation: none; cursor: default; }
.po-ripped .po-top { animation: po-tearoff .6s cubic-bezier(.3, .1, .6, 1) forwards; }
@keyframes po-tearoff { 0% { transform: none; } 25% { transform: translate(8px, -8px) rotate(-6deg); } 100% { transform: translate(52vw, -38vh) rotate(48deg); opacity: 0; } }
.po-beams { position: absolute; left: 8%; right: 8%; top: 12.4%; height: 0; z-index: 1; pointer-events: none; }
.po-beams::before, .po-beams::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 120%; height: 0; transform: translateX(-50%); transform-origin: 50% 100%; opacity: 0;
  background: linear-gradient(0deg, #fff 0%, var(--beam) 18%, color-mix(in srgb, var(--beam) 40%, transparent) 55%, transparent 100%);
  -webkit-mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); filter: blur(6px); }
.po-beams::after { width: 60%; filter: blur(2px); }
.po-ripped .po-beams::before { animation: po-beam 1.2s .05s ease-out forwards; }
.po-ripped .po-beams::after { animation: po-beam 1.2s .1s ease-out forwards; }
@keyframes po-beam { 0% { height: 0; opacity: 0; } 25% { opacity: 1; } 100% { height: 70vh; opacity: .85; } }
.po-hint { position: absolute; left: 0; right: 0; bottom: 7vh; z-index: 5; text-align: center; font-size: 26px; letter-spacing: .08em; pointer-events: none; animation: pulsehint 1.1s ease-in-out infinite; }
.po-hint small { display: block; font-family: 'Exo 2', sans-serif; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@keyframes pulsehint { 50% { opacity: .55; transform: scale(.96); } }
.po-ripped .po-hint { opacity: 0; transition: opacity .2s; animation: none; }
.po-dealt .po-pack-wrap { transform: translateY(70vh) rotate(6deg); opacity: 0; }

/* the cards: out of the pack face down, fanned, flipped */
.po-cards { position: absolute; inset: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-content: center; padding: 8vh 4vw 20vh; pointer-events: none; perspective: 1100px; }
.po-card { --rc: #a7b1c2; position: relative; width: clamp(118px, calc(78vw / var(--n, 1)), 220px); aspect-ratio: .72; transform-style: preserve-3d;
  transform: translateY(45vh) scale(.4) rotateY(0deg); opacity: 0; transition: transform .65s cubic-bezier(.2, 1.3, .35, 1), opacity .3s; transition-delay: calc(var(--i) * 90ms); }
.po-out .po-card { transform: translateY(0) scale(1) rotateY(0deg); opacity: 1; }
.po-out .po-card.po-flipped { transform: rotateY(180deg); transition: transform .55s cubic-bezier(.3, 1.4, .4, 1); transition-delay: 0s; }
.po-out .po-card.po-big { transform: rotateY(180deg) scale(1.12); z-index: 2; }
.po-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; overflow: hidden; }
.po-back { display: grid; place-items: center; border: 2px solid #3a3a48; box-shadow: 0 14px 30px #000c;
  background: radial-gradient(circle at 50% 40%, #3a0a12, #120d18 60%), repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px); }
.po-mark { width: 52%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff 0 8%, #ff4a55 16%, #b3101b 34%, transparent 36%), conic-gradient(from 0deg, #d4d8e0, #7d8390, #eef0f4, #7d8390, #d4d8e0); -webkit-mask: radial-gradient(circle, #000 64%, transparent 66%); mask: radial-gradient(circle, #000 64%, transparent 66%); box-shadow: 0 0 20px #ff1f2d66; }
.po-front { transform: rotateY(180deg); }
.po-front .card { width: 100%; height: 100%; margin: 0; box-sizing: border-box; }
.po-flipped .po-front .card { box-shadow: 0 0 0 2px var(--rc), 0 0 34px color-mix(in srgb, var(--rc) 70%, transparent); }
.po-charge { animation: po-charge .9s ease-in forwards; }
@keyframes po-charge { 0% { filter: none; } 100% { filter: drop-shadow(0 0 26px var(--rc)) brightness(1.25); translate: 0 -10px; } }
.po-charge .po-back { animation: po-jitter .09s linear infinite; }
@keyframes po-jitter { 50% { transform: translate(1.5px, -1px) rotate(.6deg); } }
.po-big .po-front .card { box-shadow: 0 0 0 3px var(--rc), 0 0 60px var(--rc), 0 0 120px color-mix(in srgb, var(--rc) 50%, transparent); }

/* the banner, the shake, the haul */
.po-banner { position: absolute; left: 0; right: 0; top: 9vh; z-index: 7; text-align: center; pointer-events: none; }
.po-banner span { display: inline-block; font-family: 'Russo One'; font-size: clamp(40px, 9vw, 96px); color: var(--bc); -webkit-text-stroke: 3px #0a0006; paint-order: stroke fill; text-shadow: 0 0 30px var(--bc), 0 6px 0 #000; opacity: 0; }
.po-banner.po-show span { animation: po-slam 1.8s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes po-slam { 0% { opacity: 0; transform: scale(2.4) skewX(-10deg); } 12% { opacity: 1; transform: scale(1) skewX(-10deg); } 80% { opacity: 1; transform: scale(1.04) skewX(-10deg); } 100% { opacity: 0; transform: scale(1.1) skewX(-10deg); } }
.po-shake { animation: po-shake .45s linear; }
@keyframes po-shake { 10%, 50%, 90% { transform: translate(-6px, 3px); } 30%, 70% { transform: translate(6px, -4px); } }
.po-end { position: absolute; left: 0; right: 0; bottom: 5vh; z-index: 8; text-align: center; animation: po-up .4s ease-out; }
.po-end .row { justify-content: center; }
.po-title { font-size: clamp(26px, 5vw, 40px); margin: 0 0 14px; }
@keyframes po-up { from { opacity: 0; transform: translateY(16px); } }
.po-skip { position: absolute; bottom: 3vh; left: 0; right: 0; text-align: center; z-index: 8; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; color: var(--muted); pointer-events: none; }
.po-closing { opacity: 0; transition: opacity .25s; }
@media (prefers-reduced-motion: reduce) {
  .po-pack, .po-spot, .packart { animation: none; }
  .po-shake { animation: none; }
}

.fxchips span.perkchip { background: #fff; color: #111; animation: perkpop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes perkpop { from { transform: scale(1.8); opacity: 0; } }

/* ------------------------------------------------------------------ furnace */
.furnace { display: grid; grid-template-columns: 190px 1fr; gap: 18px; margin-top: 14px; align-items: start; }
.furnace-pack .packart { width: 170px; }
.furnace .cards { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); max-height: 420px; overflow: auto; padding-right: 4px; }
.burn-step { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }
.burn-step b { font-family: 'Russo One'; font-size: 16px; min-width: 18px; text-align: center; }
@media (max-width: 720px) { .furnace { grid-template-columns: 1fr; } .furnace-pack { display: none; } }

/* ---------------------------------------------------------------- Battle pass */
.tabs a.pass-tab { color: #e6b8ff; }
.tabs a.pass-tab.active { color: #fff; }
.pass-hero {
  background:
    radial-gradient(700px 260px at 85% 0%, rgba(193, 60, 255, 0.28), transparent 70%),
    radial-gradient(500px 220px at 0% 100%, rgba(226, 44, 104, 0.16), transparent 70%),
    var(--panel);
  border-color: #3a1a5a;
}
.pass-head { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.pass-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 800; color: #c98cff; }
.pass-title { font-size: clamp(34px, 6vw, 60px); line-height: 1; margin: 4px 0 6px; }
.pass-tier { display: flex; align-items: baseline; gap: 8px; }
.pass-tier b { font-size: 56px; line-height: 1; color: #fff; text-shadow: 0 0 22px #c13cff; }
.xpbar { position: relative; height: 22px; margin-top: 16px; background: #0b0812; border: 1px solid #3a1a5a; clip-path: var(--cut); }
.xpbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #7a26b2, #e22c68, #ffa85c); transition: width 0.6s; }
.xpbar span { position: relative; display: block; text-align: center; font-size: 12px; font-weight: 800; line-height: 20px; text-shadow: 0 1px 2px #000; }
.pass-buy { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.pass-pack svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(193, 60, 255, 0.35)); }
.pass-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 8px 0 12px; }
.pass-price .display { font-size: 34px; }
.pass-price .muted { font-size: 13px; }
.pass-track { position: relative; overflow-x: auto; display: grid; grid-template-columns: auto 1fr; gap: 8px; padding-bottom: 8px; margin-top: 10px; }
.pr-rows { display: grid; grid-template-rows: 22px 136px 136px; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); position: sticky; left: 0; background: var(--panel); z-index: 1; padding-right: 4px; }
.pr-rows span { display: flex; align-items: center; }
.pr-rows span:first-child { visibility: hidden; }
.pr-rows span:last-child { color: #e6b8ff; }
.pr-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 6px; }
.pr-col { display: grid; grid-template-rows: 22px 136px 136px; gap: 6px; }
.pr-tier { text-align: center; font-family: 'Russo One'; font-size: 13px; color: var(--muted); border-bottom: 3px solid var(--line); }
.pr-col.reached .pr-tier { color: #fff; border-color: #c13cff; }
.pr-col.current .pr-tier { color: #ffa85c; border-color: #ffa85c; }
.pr-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; background: #0d0c14; border: 1px solid var(--line); clip-path: var(--cut); cursor: default; text-align: center; }
.pr-cell.empty { background: transparent; border-style: dashed; opacity: 0.35; }
.pr-cell.premium { background: linear-gradient(180deg, #1a0d2a, #0d0c14); border-color: #3a1a5a; }
.pr-cell.future { opacity: 0.55; }
.pr-cell.locked { opacity: 0.7; }
.pr-cell.claimed { opacity: 0.45; }
.pr-cell.ready { cursor: pointer; border-color: #ffa85c; box-shadow: inset 0 0 18px rgba(255, 168, 92, 0.35); animation: prReady 1.6s ease-in-out infinite; }
.pr-cell.ready:hover { filter: brightness(1.2); }
.pr-cell:disabled.ready { animation: none; }
@keyframes prReady { 50% { box-shadow: inset 0 0 28px rgba(255, 168, 92, 0.6); } }
.pr-label { font-size: 10px; line-height: 1.15; font-weight: 700; color: #d9d4e6; max-height: 2.3em; overflow: hidden; }
.pr-state { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #ffa85c; min-height: 14px; }
.pr-cell.claimed .pr-state { color: #6dffa8; }
.pr-icon { width: 48px; height: 48px; display: grid; place-items: center; }
.pr-icon b { font-family: 'Russo One'; font-size: 18px; }
.pr-icon .shard { display: none; }
.pr-icon:not(.pr-random):not(.pr-part)::before { content: '◆'; color: var(--red); font-size: 18px; margin-right: 2px; }
.pr-icon:not(.pr-random):not(.pr-part) { display: flex; align-items: center; justify-content: center; }
.pr-random { border: 2px solid var(--c); clip-path: var(--cut); background: color-mix(in srgb, var(--c) 18%, #0d0c14); line-height: 1; }
.pr-random b { color: var(--c); font-size: 22px; }
.pr-random small { font-size: 8px; font-weight: 800; text-transform: uppercase; color: var(--c); }
.pr-part img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(193, 60, 255, 0.7)); }
@media (max-width: 720px) {
  .pass-buy { grid-template-columns: 1fr; }
  .pass-pack { max-width: 160px; margin: 0 auto; }
  .pass-tier b { font-size: 44px; }
}

/* ---------------------------------------------------------------- Rank'D */
.rankd-card {
  border-color: #6a0d16;
  background: radial-gradient(520px 200px at 100% 0%, rgba(255, 31, 45, 0.22), transparent 70%), var(--panel);
}
.rankd-title {
  font-family: 'Russo One';
  font-style: italic;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 3px 3px 0 var(--red2), 0 0 18px rgba(255, 31, 45, 0.6);
}
.rankd-btn { background: linear-gradient(180deg, #ff3b47, #a30d18); box-shadow: 0 0 22px rgba(255, 31, 45, 0.45); }
.rankd-stake { display: flex; gap: 8px; margin: 4px 0 10px; }
.rankd-stake img, .rankd-empty {
  width: 64px; height: 64px; object-fit: contain; background: #0c0c12; border: 1px solid #4a1016; clip-path: var(--cut);
  filter: drop-shadow(0 4px 6px #000a);
}
.rankd-empty { display: grid; place-items: center; color: var(--muted); font-family: 'Russo One'; }
.rankd-lock { font-size: 14px; }

.notice { padding: 10px 14px; border: 1px solid #4a3a10; background: rgba(255, 200, 60, 0.08); color: #f3e3b0; clip-path: var(--cut); font-size: 14px; }
.notice a { color: #ffd84a; }

/* ------------------------------------------------------------------ Rank'D ladder + Pink Slips */
.ladder-card {
  border-color: #5a4310;
  background: radial-gradient(520px 200px at 100% 0%, rgba(255, 198, 64, 0.18), transparent 70%), var(--panel);
}
.ladder-title { font-family: 'Russo One'; font-style: italic; letter-spacing: 0.04em; color: #fff; text-shadow: 0 0 18px rgba(255, 198, 64, 0.55); }
.ladder-btn { background: linear-gradient(180deg, #ffd34d, #b7790e); color: #1a1205; box-shadow: 0 0 22px rgba(255, 198, 64, 0.4); }
.ladder-rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 12px; }
.ladder-reward { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: grid; gap: 2px; font-size: 13px; background: rgba(0, 0, 0, 0.25); }
.ladder-reward b { font-family: 'Russo One'; font-size: 18px; }
.ladder-reward small { color: var(--muted); }
.ladder-reward.p1 { border-color: #c8901e; } .ladder-reward.p1 b { color: #ffc640; }
.ladder-reward.p2 { border-color: #7d8aa3; } .ladder-reward.p2 b { color: #c9d4e6; }
.ladder-reward.p3 { border-color: #8a4c22; } .ladder-reward.p3 b { color: #e08a4a; }
.title-tag { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #ffc640; }
.leader .title-tag { display: inline; margin-left: 6px; }
.leader.top1 b { color: #ffc640; } .leader.top2 b { color: #c9d4e6; } .leader.top3 b { color: #e08a4a; }
.leader.you { border-top: 1px dashed var(--line); margin-top: 4px; color: #fff; }
/* Pink Slips (the limited-time stakes mode) */
.rankd-card { border-color: #7a1450; background: radial-gradient(520px 200px at 100% 0%, rgba(255, 63, 164, 0.24), transparent 70%), var(--panel); }
.rankd-title { text-shadow: 0 0 18px rgba(255, 63, 164, 0.6); }
.rankd-btn { background: linear-gradient(180deg, #ff5fb4, #a3105c); box-shadow: 0 0 22px rgba(255, 63, 164, 0.45); }

/* ------------------------------------------------------------------ Diamond Hands pack (shop) */
.diamond-panel {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center;
  border-color: #2a6f8f;
  background: radial-gradient(600px 260px at 20% 30%, rgba(127, 227, 255, 0.16), transparent 70%), var(--panel);
}
.diamond-art .packart { max-width: 220px; margin: auto; }
.diamond-title { font-family: 'Russo One'; font-style: italic; letter-spacing: 0.04em; color: #fff; text-shadow: 0 0 16px rgba(127, 227, 255, 0.7); }
.diamond-tag { border-color: #7fe3ff; color: #bff3ff; }
.diamond-list { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.diamond-price { font-size: 24px; color: #e8fbff; }
.diamond-btn { background: linear-gradient(180deg, #bff3ff, #2a9cc4); color: #04131c; box-shadow: 0 0 22px rgba(127, 227, 255, 0.45); }
.good { color: #6dffa8; }
@media (max-width: 760px) { .diamond-panel { grid-template-columns: 1fr; } }
.mode-banner b { color: #1a1200; background: #ffd34d; padding: 1px 7px; border-radius: 3px; letter-spacing: 0.1em; }
.mode-banner a { color: #ffd34d; font-weight: 700; }

/* ------------------------------------------------------------------ home (the front door) */
.eyebrow { font-family: 'Russo One'; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
.eyebrow::before { content: ''; display: inline-block; width: 22px; height: 2px; background: var(--red); vertical-align: middle; margin-right: 8px; }
.home { display: grid; gap: 34px; }
.home h1 { font-family: 'Russo One'; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; margin: 10px 0 12px; letter-spacing: 0.01em; }
.home h1 .red, .home h2 .red { color: var(--red); }
.home h2 { font-family: 'Russo One'; font-size: clamp(22px, 3vw, 32px); margin: 6px 0 12px; }
.home .lead { font-size: 18px; color: #c9ccd6; max-width: 34em; }
.home-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; min-height: 440px; }
.home-wordmark { width: min(420px, 90%); height: auto; display: block; margin: 12px 0 0; filter: drop-shadow(0 8px 20px #000); }
.home-hero-art { position: relative; display: block; }
.home-hero-art img { width: 100%; max-width: 520px; display: block; margin: auto; filter: drop-shadow(0 20px 40px rgba(255, 31, 45, 0.35)); animation: float 4s ease-in-out infinite; }
.home-spot { position: absolute; left: 4%; bottom: 8%; display: grid; gap: 2px; padding: 10px 14px; background: rgba(10, 10, 16, 0.86); border: 1px solid var(--line); border-left: 3px solid var(--red); font-size: 14px; color: var(--ink); }
.home-spot b { font-family: 'Russo One'; font-size: 11px; letter-spacing: 0.12em; color: #ffaa00; text-transform: uppercase; }
.home-spot small { color: var(--muted); }
.home-stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-stats div { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.home-stats b { display: block; font-family: 'Russo One'; font-size: 30px; color: var(--ink); letter-spacing: 0; }
.home-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.home-slot { display: grid; gap: 6px; text-decoration: none; color: var(--ink); transition: transform 0.15s, border-color 0.15s; }
.home-slot:hover { transform: translateY(-3px); border-color: var(--red); }
.home-num { font-family: 'Russo One'; font-size: 28px; color: var(--red); }
.home-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-gold { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; border-color: #6b5214; background: radial-gradient(420px 220px at 10% 40%, rgba(255, 200, 60, 0.14), transparent 70%), var(--panel); }
.home-gold img { width: 100%; filter: drop-shadow(0 10px 20px rgba(255, 190, 40, 0.35)); }
.home-how ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); }
.home-how ol b { color: var(--ink); }
.home-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-modes > a { text-decoration: none; color: var(--ink); }
.home-diamond { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; border-color: #2a6f8f; background: radial-gradient(420px 220px at 15% 40%, rgba(127, 227, 255, 0.14), transparent 70%), var(--panel); }
.home-diamond-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 16px #000c); }
.home-cta { text-align: center; padding: 40px 16px; border: 1px solid var(--line); background: radial-gradient(600px 240px at 50% 0%, rgba(255, 31, 45, 0.18), transparent 70%), var(--panel); }
.home-cta h2 { font-size: clamp(36px, 6vw, 64px); }
@media (max-width: 900px) {
  .home-hero, .home-split, .home-modes { grid-template-columns: 1fr; }
  .home-slots, .home-stats { grid-template-columns: repeat(2, 1fr); }
  .home-stats div:last-child { grid-column: 1 / -1; }
  .home-hero { min-height: 0; }
}

/* ------------------------------------------------------------------ rules + market + footer */
.rules h3 { margin: 14px 0 6px; }
.rules h3:first-child { margin-top: 0; }
.rules-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.rules-table th, .rules-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.rules-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.market-head .row { align-items: center; }
.market-filters { margin-top: 12px; gap: 8px; flex-wrap: wrap; }
.market-filters select { max-width: 170px; text-transform: none; letter-spacing: 0; }
.market-item { display: flex; flex-direction: column; gap: 6px; }
.market-item > .card { flex: 1; }
.market-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); }
.market-item.diamond .market-bar { border-color: #2a6f8f; }
/* Sell: pick from your cards, see what you're listing */
.sell-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.sell-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.sell-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 440px; overflow: auto; padding-right: 4px; }
.sell-grid .card { cursor: pointer; }
.sell-form { display: grid; gap: 10px; position: sticky; top: 12px; }
.sell-form .text { max-width: none; }
.card .token-id { font-size: 11px; }
.card .nft-no { position: absolute; top: 6px; right: 8px; z-index: 1; font-family: 'Russo One'; font-size: 12px; letter-spacing: 0.04em; padding: 1px 7px; background: #08070ccc; border: 1px solid var(--rc, var(--line)); border-radius: 4px; color: #fff; }
@media (max-width: 720px) { .sell-layout { grid-template-columns: 1fr; } .sell-form { position: static; } }
.market-price { font-family: 'Russo One'; font-size: 17px; margin-right: auto; }
.market-price small { font-family: inherit; font-size: 11px; color: var(--muted); }
.market-diamond { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; }
.market-diamond-art { width: 70%; }
.market-diamond-art svg { width: 100%; height: auto; display: block; }
.site-footer { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; max-width: 1360px; margin: 0 auto; padding: 22px 22px 40px; border-top: 1px solid var(--line); font-size: 13px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .spacer { flex: 1; }
.site-footer .footer-legal { flex-basis: 100%; margin: 4px 0 0; color: var(--muted); font-size: 12px; opacity: 0.8; } /* the owner notice: FRAGMATCH LLC */

/* shop: a pack size is paused while the Chainlink randomness reserve is too low to deliver it */
.vrf-note { font-size: 12px; text-align: center; max-width: 360px; margin: 8px auto 0; color: #ffcf6e; }

/* ======================================================================== broadcast battle HUD (battle-hud.js) */
#battle .plate, #battle .scoreboard { display: none; }
.bh { position: absolute; inset: 0; pointer-events: none; font-family: 'Russo One', sans-serif; font-weight: 400; color: #fff; }
.bh > * { position: absolute; }
.bh-card {
  top: 14px; width: min(470px, 42vw); height: 168px; padding: 12px 36px 14px; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #0c0b12ee, #07060bee); border-bottom: 4px solid var(--team);
  clip-path: polygon(22px 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
}
.bh-card.me { left: 14px; --team: #3fa0ff; }
.bh-card.them { right: 14px; --team: #ff2a3d; flex-direction: row-reverse; text-align: right; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 22px 100%); }
.bh-ring { position: relative; width: 128px; height: 128px; flex: 0 0 auto; }
.bh-portrait { position: absolute; inset: 14px; width: 100px; height: 100px; border-radius: 50%; object-fit: cover; background: #14121c; border: 2px solid #ffffff26; }
.bh-ring-svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.bh-ring-svg circle { fill: none; stroke-width: 7; }
.bh-ring-svg .track { stroke: #ffffff1f; }
.bh-ring-svg .fill { stroke: var(--team); stroke-linecap: round; transition: stroke-dasharray 0.12s linear; filter: drop-shadow(0 0 4px var(--team)); }
.bh-card.low .bh-ring-svg .fill { animation: lowspin 0.3s ease-in-out infinite alternate; }
@keyframes lowspin { to { stroke: #ffb34d; filter: drop-shadow(0 0 10px #ff6a4d); } }
.bh-spin { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font-size: 15px; padding: 0 9px; border-radius: 9px; background: #08070ce6; text-shadow: 0 1px 0 #000; }
.bh-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.bh-card.them .bh-info { align-items: flex-end; }
.bh-head { display: flex; gap: 10px; align-items: baseline; }
.bh-card.them .bh-head { flex-direction: row-reverse; }
.bh-name { font-size: 22px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-rip { font-size: 12px; letter-spacing: 0.04em; color: #ffd34d; white-space: nowrap; }
.bh-title { font-size: 11px; color: #ffd34d; letter-spacing: 0.08em; }
.bh-build { font-family: 'Exo 2', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: 0.06em; color: #969cac; max-width: 270px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.bh-row { display: flex; align-items: center; gap: 8px; width: 270px; }
.bh-card.them .bh-row { flex-direction: row-reverse; }
.bh-label { width: 58px; font-size: 10px; letter-spacing: 0.1em; color: #aab0c0; }
.bh-card.them .bh-label { text-align: right; }
.bh-burst { flex: 1; display: flex; gap: 2px; height: 13px; }
.bh-card.them .bh-burst { flex-direction: row-reverse; }
.bh-burst i { flex: 1; background: #ffffff14; transform: skewX(-18deg); }
.bh-burst i.on:nth-child(-n+4) { background: #ffcc47; }
.bh-burst i.on:nth-child(n+5) { background: #ff8c26; }
.bh-burst i.on:nth-child(n+8) { background: #ff2a3d; }
.bh-burst.danger { animation: shake 0.08s linear infinite; }
@keyframes shake { 0% { transform: translate(-1px, 0); } 50% { transform: translate(1.5px, -0.5px); } 100% { transform: translate(-1px, 0.5px); } }
.bh-meter { flex: 1; height: 7px; background: #ffffff14; overflow: hidden; display: flex; }
.bh-card.them .bh-meter { flex-direction: row-reverse; }
.bh-meter i { display: block; height: 100%; transition: width 0.12s linear; }
.bh-meter i.charge { background: #ffd34d; box-shadow: 0 0 8px #ffd34d88; }
.bh-meter i.guard { background: #8ce6ff; box-shadow: 0 0 8px #8ce6ff88; }
.bh-fx { height: 20px; margin-top: 2px; }
.bh-fx span { font-size: 11px; letter-spacing: 0.08em; padding: 2px 7px; border: 1px solid currentColor; }
.bh-fx .ice { color: #8ce6ff; } .bh-fx .red { color: #ff4d5a; } .bh-fx .gold { color: #ffd34d; }
.bh-ko { position: absolute; bottom: 10px; font-size: 13px; letter-spacing: 0.08em; background: var(--team); padding: 2px 10px; }
.bh-ko.hidden { display: none; }
.bh-card.me .bh-ko { right: 40px; } .bh-card.them .bh-ko { left: 40px; }
.bh-card.out { opacity: 0.6; }

.bh-score { top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; flex-wrap: wrap; justify-content: center; width: 440px; }
.bh-side { width: 170px; height: 46px; display: grid; place-items: center; }
.bh-side.l { background: linear-gradient(180deg, #0f2550f0, #0a1838f0); border-bottom: 4px solid #3fa0ff; clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%); }
.bh-side.r { background: linear-gradient(180deg, #4a0c14f0, #320810f0); border-bottom: 4px solid #ff2a3d; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%); }
.bh-pips { display: flex; gap: 12px; }
.bh-side.r .bh-pips { flex-direction: row-reverse; }
.bh-pips i { width: 16px; height: 16px; transform: rotate(45deg); background: #ffffff1a; border: 2px solid #ffffff4d; }
.bh-pips[data-team=me] i.on { background: #3fa0ff; border-color: #fff; box-shadow: 0 0 10px #3fa0ff; }
.bh-pips[data-team=them] i.on { background: #ff2a3d; border-color: #fff; box-shadow: 0 0 10px #ff2a3d; }
.bh-timer { position: relative; width: 84px; height: 92px; margin: 0 -8px; display: grid; place-items: center; z-index: 1;
  background: #ffffff66; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-size: 30px; }
.bh-timer::before { content: ''; position: absolute; inset: 3px; background: #08080d; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.bh-timer span { position: relative; }
.bh-timer.late span { color: #ff2a3d; }
.bh-round { width: 100%; text-align: center; font-size: 15px; letter-spacing: 0.25em; margin-top: 4px; text-shadow: 0 2px 4px #000; }
.bh-format { width: 100%; text-align: center; font-family: 'Exo 2', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.14em; color: #969cac; text-shadow: 0 1px 2px #000; }

.bh-marker { left: 0; top: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; }
.bh-marker b { font-weight: 400; font-size: 13px; letter-spacing: 0.12em; padding: 2px 10px; background: var(--team); box-shadow: 0 2px 8px #0008; white-space: nowrap; }
.bh-marker i { font-style: normal; font-size: 12px; color: var(--team); margin-top: -3px; }
.bh-marker.me { --team: #3fa0ff; } .bh-marker.them { --team: #ff2a3d; }

.bh-count { left: 0; right: 0; bottom: 250px; text-align: center; font-size: 150px; line-height: 1; color: #fff; -webkit-text-stroke: 3px #ff2a3d; text-shadow: 0 6px 24px #000c; }
.bh-count.pop { animation: countpop 0.9s ease-out both; }
@keyframes countpop { 0% { transform: scale(1.7); opacity: 0; } 15% { transform: scale(1); opacity: 1; } 100% { opacity: 0.15; } }
.bh-riparc { left: 50%; bottom: 66px; transform: translateX(-50%); width: 560px; height: 196px; display: none; }
.bh.countdown .bh-riparc { display: block; }
.bh-riparc svg { width: 100%; height: 100%; overflow: visible; }
.bh-riparc path { fill: none; stroke-width: 22; }
.bh-riparc .track { stroke: #0a0a10c0; stroke-width: 26; }
.bh-riparc .zone { stroke: #ffd34d73; }
.bh-riparc .fill { stroke: #3fa0ff; transition: stroke 0.1s; }
.bh-riparc.locked .fill { filter: brightness(1.4); }
.bh-riparc .needle { stroke: #fff; stroke-width: 4; stroke-linecap: round; transform-origin: 200px 187.45px; transform-box: view-box; filter: drop-shadow(0 0 4px #000); }

.bh-actions { right: 30px; bottom: 26px; width: 330px; height: 300px; pointer-events: none; }
.bh-actions.hidden { display: none; }
.bh-action { position: absolute; width: 116px; height: 116px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; touch-action: none; color: #fff; font-family: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bh-action svg, #battle .ability.hex svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bh-action .bg, #battle .ability.hex .bg { fill: #0f0d17e6; }
.bh-action .edge, #battle .ability.hex .edge { fill: none; stroke: #ffffff40; stroke-width: 3; }
.bh-action .sweep, #battle .ability.hex .sweep { fill: none; stroke-width: 5; stroke-linejoin: miter; transition: stroke-dashoffset 0.1s linear; }
.bh-action .t, .bh-action .s, .bh-action .k, #battle .ability.hex .t, #battle .ability.hex .s, #battle .ability.hex .k { position: relative; text-align: center; }
.bh-action .t, #battle .ability.hex .t { font-size: 14px; letter-spacing: 0.06em; line-height: 1.05; max-width: 120px; }
.bh-action .s, #battle .ability.hex .s { font-size: 13px; color: #ffd678; min-height: 15px; }
.bh-action .k, #battle .ability.hex .k { font-family: 'Exo 2', sans-serif; font-weight: 800; font-size: 10px; color: #14121c; background: #e6e8f0; padding: 1px 6px; border-radius: 3px; margin-top: 4px; }
.bh-action.guard { right: 170px; bottom: 6px; }
.bh-action.guard .sweep { stroke: #8ce6ff; }
.bh-action.guard.active .bg { fill: #0f3a4ef0; }
.bh-action.guard.active .sweep { stroke: #fff; }
.bh-action.dash { right: 112px; bottom: 158px; }
.bh-action.dash .sweep { stroke: #ff8c4d; }
.bh-action.dash.counter { animation: counterpulse 0.14s ease-in-out infinite alternate; }
.bh-action.dash.counter .bg { fill: #5a0812f0; }
.bh-action.dash.counter .sweep { stroke: #ff2a3d; }
@keyframes counterpulse { from { transform: scale(1.06); } to { transform: scale(1.14); } }
.bh-counter { right: 10px; bottom: 286px; font-size: 18px; letter-spacing: 0.1em; background: #dc1428; padding: 4px 12px; white-space: nowrap; position: absolute; }
.bh-counter.hidden { display: none; }
.bh-hints { left: 92px; bottom: 30px; display: flex; align-items: center; gap: 6px; font-family: 'Exo 2', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0.06em; color: #c8ccd8; text-shadow: 0 1px 2px #000; }
.bh-hints kbd { font-family: inherit; font-size: 10px; color: #14121c; background: #e6e8f0; padding: 1px 6px; border-radius: 3px; margin-left: 12px; }
.bh-flash { inset: 0; box-shadow: inset 0 0 160px 40px #ff1f2dcc; opacity: 0; }
.bh-flash.go { animation: edgeflash 0.6s ease-out; }
@keyframes edgeflash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* the ability / RIP button: the big hex at the bottom right */
#battle .ability.hex { left: auto; right: 30px; bottom: 26px; transform: none; width: 170px; height: 170px; border-radius: 0; background: none; box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-family: 'Russo One'; }
#battle .ability.hex .sweep { stroke: var(--ab, #ffd34d); }
#battle .ability.hex.ready { animation: readypulse 0.25s ease-in-out infinite alternate; }
#battle .ability.hex.ready .bg { fill: #523307f0; }
@keyframes readypulse { from { transform: scale(1); } to { transform: scale(1.05); } }
#battle .ability.hex.rip .t { font-size: 22px; letter-spacing: 0.04em; }
#battle .ability.hex.rip .sweep { stroke: var(--ab, #3fa0ff); }
#battle .ability.hex.held { transform: scale(0.94); filter: drop-shadow(0 0 18px var(--ab)); }
#battle .ability.hex.none { opacity: 0.5; }
#battle .hud > .prep-hint { bottom: 16px; }

/* the call-out ribbon */
#battle .announcer { top: 22%; font-style: normal; transform: none; font-size: 64px; }
.bh-callout { display: flex; flex-direction: column; align-items: center; animation: calloutin 0.16s ease-out both; }
.bh-callout .ribbon { padding: 4px 90px 12px; background: #000000a0; border-bottom: 4px solid var(--c); clip-path: polygon(40px 0, 100% 0, calc(100% - 40px) 100%, 0 100%); }
.bh-callout .big { font-family: 'Russo One'; font-size: clamp(36px, 6vw, 76px); letter-spacing: 0.06em; text-shadow: 0 4px 18px #000; animation: none; display: inline; }
.bh-callout .small { font-family: 'Russo One'; font-size: 22px; letter-spacing: 0.12em; background: #000000a0; padding: 4px 18px; margin-top: 6px; color: #fff; }
@keyframes calloutin { from { transform: scale(1.4); opacity: 0; } }

/* the match result */
.result { background: rgba(4, 3, 8, 0.82); }
.rs { width: min(860px, 94vw); max-height: 94vh; overflow: auto; padding: 22px 26px 26px; background: #0e0c15f5; border-top: 3px solid #ff1f2d; display: flex; flex-direction: column; align-items: center; animation: rsin 0.25s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes rsin { from { transform: scale(0.92) translateY(18px); opacity: 0; } }
.rs-ribbon { padding: 2px 80px 10px; background: color-mix(in srgb, var(--c) 18%, #000); border-bottom: 4px solid var(--c); clip-path: polygon(30px 0, 100% 0, calc(100% - 30px) 100%, 0 100%); }
.rs-ribbon span { font-family: 'Russo One'; font-size: clamp(44px, 8vw, 72px); letter-spacing: 0.12em; }
.rs-vs { display: flex; align-items: center; justify-content: center; margin-top: 14px; width: 100%; }
.rs-blader { width: 290px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rs-portrait { width: 120px; height: 120px; border-radius: 50%; border: 5px solid; overflow: hidden; background: #100e16; }
.rs-portrait img { width: 100%; height: 100%; object-fit: cover; }
.rs-name { font-family: 'Russo One'; font-size: 19px; letter-spacing: 0.06em; }
.rs-build { font-size: 12px; color: #969cac; }
.rs-winner { font-family: 'Russo One'; font-size: 12px; color: #ffd34d; border: 1px solid #ffd34d; padding: 1px 8px; letter-spacing: 0.1em; }
.rs-score { width: 200px; text-align: center; }
.rs-score b { display: block; font-family: 'Russo One'; font-size: 60px; font-weight: 400; }
.rs-score small { color: #969cac; font-size: 11px; letter-spacing: 0.12em; }
.rs-rounds { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.rs-round { width: 132px; padding: 6px 4px; background: #18161f; border-top: 3px solid; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rs-round small { font-size: 10px; color: #969cac; letter-spacing: 0.06em; }
.rs-round b { font-family: 'Russo One'; font-weight: 400; font-size: 14px; letter-spacing: 0.04em; }
.rs-chips { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.rs-chip { width: 160px; padding: 8px 6px; background: #18161f; border-bottom: 3px solid; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; }
.rs-chip b { font-family: 'Russo One'; font-weight: 400; font-size: 28px; }
.rs-chip small { font-size: 10px; color: #aab0c0; letter-spacing: 0.08em; }
.rs-note { margin-top: 10px; font-size: 13px; color: #aab0c0; }
.rs-note.good { color: #6fe39a; } .rs-note.bad { color: #ff6b75; }
.rs-level { width: min(520px, 90%); margin-top: 14px; }
.rs-level-head { display: flex; justify-content: space-between; align-items: baseline; }
.rs-level-head b { font-family: 'Russo One'; font-weight: 400; font-size: 17px; letter-spacing: 0.06em; }
.rs-level.up .rs-level-head b { color: #6fbfff; }
.rs-level-head small { color: #969cac; font-size: 11px; }
.rs-bar { height: 14px; background: #1e1c27; margin-top: 6px; overflow: hidden; }
.rs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3f8fff, #7fcfff); transition: width 1s cubic-bezier(0.2, 0.9, 0.3, 1); }
.rs-unlock { margin-top: 12px; padding: 8px 14px; display: flex; align-items: center; gap: 14px; background: #ffc4401a; border: 1px solid #6e541e; }
.rs-unlock img { width: 150px; height: 100px; object-fit: contain; }
.rs-unlock small { display: block; font-size: 11px; color: #ffd34d; letter-spacing: 0.08em; }
.rs-unlock b { display: block; font-family: 'Russo One'; font-weight: 400; font-size: 18px; }
.rs-unlock span { font-size: 12px; color: #aab0c0; }
.rs-buttons { display: flex; gap: 10px; margin-top: 18px; }

@media (max-width: 900px) {
  .bh-card { width: 46vw; height: auto; padding: 6px 16px 8px; gap: 6px; top: 8px; }
  .bh-card.me { left: 6px; } .bh-card.them { right: 6px; }
  .bh-ring { width: 64px; height: 64px; }
  .bh-portrait { inset: 8px; width: 48px; height: 48px; }
  .bh-spin { font-size: 10px; }
  .bh-name { font-size: 13px; }
  .bh-build, .bh-title, .bh-fx { display: none; }
  .bh-row { width: 100%; }
  .bh-label { width: 44px; font-size: 8px; }
  .bh-head { flex-wrap: wrap; gap: 0 8px; width: 100%; }
  .bh-name { max-width: 100%; }
  .bh-score { top: var(--bh-score-top, 112px); width: 230px; }
  .bh-side { width: 82px; height: 30px; }
  .bh-pips { gap: 7px; } .bh-pips i { width: 10px; height: 10px; }
  .bh-timer { width: 54px; height: 60px; font-size: 18px; }
  .bh-round, .bh-format { display: none; }
  .bh-actions { right: 8px; bottom: 8px; transform: scale(0.72); transform-origin: bottom right; }
  #battle .ability.hex { right: 8px; bottom: 8px; width: 124px; height: 124px; }
  .bh-hints { display: none; }
  .bh-count { font-size: 96px; bottom: 200px; }
  .bh-riparc { width: 92vw; bottom: 130px; }
  .bh-callout .ribbon { padding: 4px 40px 8px; }
  .bh-callout .small { font-size: 14px; }
  .rs-vs { flex-direction: column; gap: 8px; }
  .rs-chips { flex-wrap: wrap; }
}
/* touch screens: no keyboard, so no key labels on the buttons */
@media (hover: none) {
  .bh-action .k, #battle .ability.hex .k { display: none; }
}

/* ---------------------------------------------------------------- launchers (garage) */
.launchers-panel { margin-top: 16px; }
.launchers-head { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.launchers-head .acct { min-width: 260px; }
.acct-lv { display: flex; justify-content: space-between; align-items: baseline; }
.acct-lv b { font-family: 'Russo One'; font-weight: 400; font-size: 20px; }
.acct-lv small { color: var(--muted); font-size: 12px; }
.acct-bar { height: 10px; background: #1b1a24; margin-top: 4px; overflow: hidden; }
.acct-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3f8fff, #7fcfff); }
.launcher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.launcher-card { background: #14131b; border: 2px solid #2e2b3a; padding: 8px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform 0.12s, border-color 0.12s; }
.launcher-card:hover { transform: translateY(-2px); border-color: #fff4; }
.launcher-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: radial-gradient(circle at 50% 60%, #2a2836, #14131b 70%); }
.launcher-card b { font-family: 'Russo One'; font-weight: 400; font-size: 14px; }
.launcher-card small { color: var(--muted); font-size: 11px; min-height: 28px; }
.launcher-card.equipped { border-color: var(--red); background: #2a1219; }
.launcher-card.claimable { border-color: #ffc640; box-shadow: 0 0 18px #ffc64033; }
.launcher-card.locked img { filter: grayscale(0.6) brightness(0.55); }
.launcher-card.locked small { color: #ffbf5a; }

/* launchers on the pass track */
.pr-launcher { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 4px; padding: 4px; border: 1px dashed #6e541e; background: #ffc4400d; text-decoration: none; color: inherit; font-size: 11px; text-align: center; }
.pr-launcher img { width: 92px; height: 58px; object-fit: contain; }
.pr-launcher span { font-family: 'Russo One'; font-size: 11px; }
.pr-launcher small { color: var(--muted); font-size: 10px; }
.pr-launcher.ready { border-style: solid; border-color: #ffc640; box-shadow: 0 0 12px #ffc64033; }
.pr-launcher.ready small { color: #ffd34d; }
.pr-cell.launcher-only { display: flex; align-items: center; justify-content: center; }

.pr-stack { display: flex; flex-direction: column; gap: 3px; min-height: 0; height: 100%; overflow: hidden; }
.pr-stack .pr-cell { flex: 1 1 0; min-height: 0; padding: 2px; gap: 1px; }
.pr-stack .pr-icon { width: 30px; height: 30px; }
.pr-stack .pr-part img { width: 32px; height: 32px; }
.pr-stack .pr-label { font-size: 9px; max-height: 1.2em; }
.pr-stack .pr-state { min-height: 0; font-size: 9px; }
.pr-stack .pr-launcher { flex: 1 1 0; min-height: 0; margin-top: 0; padding: 2px; }
.pr-stack .pr-launcher img { width: 64px; height: 30px; }
.pr-stack .pr-launcher small { display: none; }
.pr-cell.launcher-only .pr-launcher { margin: 0; border: 0; background: none; }

/* ---------------------------------------------------------------- launchers (market) */
.market-launcher { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; }
.market-launcher img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: radial-gradient(circle at 50% 60%, #2a2836, #14131b 70%); }
.market-launcher b { font-family: 'Russo One'; font-weight: 400; }

/* ---------------------------------------------------------------- garage: the Steam look */
/* the stadium behind the page (a still of the battle stadium), dimmed so the glass panels read */
body[data-screen='garage']::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #07060bd9 0%, #07060b99 35%, #07060bcc 100%), url('/assets/ui/stadium-backdrop.jpg') center 40% / cover no-repeat;
  filter: saturate(0.9);
}
body[data-screen='garage'] .panel { background: linear-gradient(180deg, #13121ccc, #0a0911e0); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body[data-screen='garage'] .slot { background: #0c0c12cc; }
body[data-screen='garage'] .slot:hover, body[data-screen='garage'] .slot.open { background: #1a0b10e0; }
.garage-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.9fr); align-items: start; }
.garage-grid .viewer { aspect-ratio: 0.92; background: #07070c; }
.launcher-slot { margin-top: 8px; }
.launcher-slot img { background: radial-gradient(circle at 50% 60%, #2a2836, transparent 70%); }
@media (max-width: 1050px) { .garage-grid { grid-template-columns: 1fr; } .garage-grid .viewer { aspect-ratio: 1.1; } }

/* ---------------------------------------------------------------- pass: claimed parts not minted yet */
.pr-cell.mint { cursor: pointer; opacity: 1; border-color: #ffd34d; box-shadow: inset 0 0 18px rgba(255, 211, 77, 0.35); animation: prReady 1.6s ease-in-out infinite; }
.pr-cell.mint .pr-state { color: #ffd34d; }
.pr-cell.mint:hover { filter: brightness(1.2); }
.pass-mint { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 12px; padding: 10px 14px; background: #ffd34d14; border: 1px solid #8a6d1e; clip-path: var(--cut); font-size: 14px; }
.pass-mint b { color: #ffd34d; }

/* ---------------------------------------------------------------- how to play */
.modal .dialog.howto-dialog { width: min(860px, 100%); }
.howto .ht-head { display: flex; align-items: center; gap: 14px; margin: -4px 40px 10px 0; }
.ht-dots { display: flex; gap: 6px; }
.ht-dots i { width: 22px; height: 4px; background: #ffffff26; }
.ht-dots i.on { background: var(--red); box-shadow: 0 0 8px var(--red); }
.ht-page { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 26px; align-items: center; min-height: 330px; }
.ht-art { display: grid; place-items: center; min-height: 260px; background: radial-gradient(circle at 50% 55%, #2a1420, #0b0a12 72%); clip-path: var(--cut); padding: 16px; }
.ht-text h2 { margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.ht-text p, .ht-text li { color: #d3d6e0; font-size: 15px; line-height: 1.5; }
.ht-text ol, .ht-list { padding-left: 20px; margin: 8px 0; }
.ht-list li { margin: 6px 0; }
.ht-tip { color: var(--muted) !important; font-size: 13px !important; border-left: 3px solid var(--red); padding-left: 10px; }
.ht-gold { color: #ffd34d; font-weight: 800; }
.ht-nav { display: flex; align-items: center; margin-top: 16px; }
.ht-build { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ht-build div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ht-build img { width: 74px; height: 74px; object-fit: contain; }
.ht-build small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.ht-build i { font-style: normal; color: var(--red); font-family: 'Russo One'; font-size: 20px; }
.ht-rip { position: relative; width: 100%; }
.ht-rip svg { width: 100%; overflow: visible; }
.ht-rip path { fill: none; stroke-width: 22; }
.ht-rip .track { stroke: #24212f; stroke-width: 26; }
.ht-rip .zone { stroke: #ffd34d99; }
.ht-rip .fill { stroke: #3fa0ff; }
.ht-rip .needle { stroke: #fff; stroke-width: 4; stroke-linecap: round; transform-origin: 200px 187.45px; transform-box: view-box; }
.ht-perfect { position: absolute; right: 0; top: 96%; font-family: 'Russo One'; font-size: 13px; color: #ffd34d; letter-spacing: 0.1em; }
.ht-moves { display: grid; grid-template-columns: repeat(2, 104px); gap: 6px 10px; justify-items: center; }
.ht-moves .ht-hex:last-child { grid-column: 1 / -1; }
.ht-hex { position: relative; width: 104px; height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ht-hex svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ht-hex polygon { fill: #0f0d17; stroke: var(--c); stroke-width: 3.5; filter: drop-shadow(0 0 8px var(--c)); }
.ht-hex b { position: relative; font-family: 'Russo One'; font-weight: 400; font-size: 14px; }
.ht-hex small { position: relative; font-weight: 800; font-size: 10px; color: #14121c; background: var(--c); padding: 0 6px; border-radius: 3px; margin-top: 4px; }
.ht-score { display: grid; gap: 8px; width: 100%; }
.ht-score div { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 12px; background: #0c0b12cc; border-left: 4px solid var(--c); }
.ht-score b { grid-row: 1 / 3; font-family: 'Russo One'; font-weight: 400; font-size: 28px; color: var(--c); }
.ht-score span { font-family: 'Russo One'; font-size: 15px; letter-spacing: 0.06em; }
.ht-score small { color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .ht-page { grid-template-columns: 1fr; gap: 14px; min-height: 0; }
  .ht-art { min-height: 170px; }
}

/* ---------------------------------------------------------------- shop: owner top-up of the VRF reserve */
.vrf-topup { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 10px; padding: 10px 12px; border: 1px solid #8a6d1e; background: #ffd34d12; clip-path: var(--cut); }
.vrf-topup > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.vrf-topup b { color: #ffd34d; font-size: 14px; }
.vrf-topup small { color: var(--muted); font-size: 12px; }
.vrf-topup input { width: 90px; text-transform: none; letter-spacing: 0; }

/* ---------------------------------------------------------------- garage: slots fused into a solid RipCore */
.slot.fused-slot { cursor: default; opacity: 0.75; border-style: dashed; border-color: #2f5bff66; }
.slot.fused-slot:hover { background: #0c0c12; border-color: #2f5bff66; }
.fused-lock { width: 76px; height: 76px; display: grid; place-items: center; font-size: 28px; background: radial-gradient(circle, #1d2a6b, transparent 70%); }

/* ---------------------------------------------------------------- touch screens and low-power devices */
/* taps act at once (no double-tap-to-zoom wait on buttons) and don't flash a grey box */
html { -webkit-tap-highlight-color: transparent; }
button, a, select, input, label, .btn, .slot, .card, .tabs a { touch-action: manipulation; }
/* in a battle: no text selection, magnifier or long-press menu while a thumb holds Guard, no pull-to-refresh */
#battle { overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* .lowfx (device.js: phones, or Graphics: Smooth): the same look, minus the effects that repaint every frame or
   force a re-raster of each card while scrolling - drop-shadow filters on dozens of images, animated blend sweeps,
   blur behind a sticky header */
.lowfx .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(6, 6, 9, 0.97); }
.lowfx body[data-screen='garage'] .panel { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(180deg, #13121cf2, #0a0911f7); }
.lowfx .card img, .lowfx .card.gold img, .lowfx .card.r4:not(.gold) img { filter: none; }
.lowfx .card.gold.nogoldart img { filter: sepia(1) saturate(3.2) hue-rotate(-12deg) brightness(1.08); }
.lowfx .card.gold::after, .lowfx .card.r4:not(.gold)::after { animation: none; background-position: 50% 0; }
.lowfx .bh-ring-svg .fill { filter: none; }
.lowfx .home-hero-art img, .lowfx .packart { animation: none; }
.lowfx .pr-part img { filter: none; }

/* ---------------------------------------------------------------- roadmap (roadmap.js: Home and #roadmap) */
.rm { display: grid; gap: 16px; }
.rm-head h2 { margin: 0; }
.rm-years { color: var(--gold, #ffd34d); }
.rm-now { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: #0c1a12; border: 1px solid #2fdc7a66; color: #d8f5e4; font-weight: 600; line-height: 1.4; }
.rm-now b { color: #fff; }
.rm-done { flex: none; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: #06140c; background: #3fe08a; padding: 6px 10px; border-radius: 7px; }
.rm-launch { display: grid; grid-template-columns: 1fr minmax(180px, 300px); gap: 12px; align-items: center; padding: 22px 24px; border-radius: 18px; border: 2px solid var(--red); background: linear-gradient(135deg, #2a060a, #120610 55%, #0a0a1a); box-shadow: 0 0 40px #ff1f2d44, inset 0 0 30px #ff1f2d1c; }
.rm-when { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold, #ffd34d); font-size: 14px; }
.rm-badge { background: var(--red); color: #fff; padding: 5px 10px; border-radius: 7px; box-shadow: 0 0 18px #ff1f2d; }
.rm-launch h3 { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.02; margin: 12px 0 4px; text-transform: uppercase; }
.rm-on { white-space: nowrap; }
.rm-base { display: inline-block; width: .78em; height: .78em; background: #0000ff; border-radius: .12em; box-shadow: 0 0 18px #2a5aff; vertical-align: -0.06em; }
.rm-stats { display: flex; gap: 24px; margin: 10px 0 12px; }
.rm-stats div { color: var(--muted); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
.rm-stats b { display: block; font-family: 'Russo One', sans-serif; font-weight: 400; font-size: clamp(40px, 6vw, 58px); line-height: 1; color: var(--gold, #ffd34d); letter-spacing: 0; text-shadow: 0 0 20px #ffb02a77; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rm-chip { font-weight: 800; font-size: 14px; padding: 6px 10px; border-radius: 7px; background: #ffffff12; border: 1px solid #ffffff22; }
.rm-chip:last-child { background: #0000ff40; border-color: #5a7aff; }
.rm-art { position: relative; aspect-ratio: 1.15; }
.rm-art img { position: absolute; filter: drop-shadow(0 10px 14px #000c); }
.rm-line { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; display: grid; gap: 10px; }
.rm-line::before { content: ''; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: linear-gradient(var(--red), #ffd34d 50%, #3fa0ff); }
.rm-line li { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 12px; background: #0b0b14; border: 1px solid var(--line); }
.rm-line li::before { content: ''; position: absolute; left: -28px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #06060a; border: 3px solid var(--c); box-shadow: 0 0 12px var(--c); }
.rm-step-when { font-weight: 800; font-style: italic; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.rm-line h4 { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 22px; margin: 0 0 3px; text-transform: uppercase; }
.rm-line p { margin: 0; color: var(--muted); font-weight: 600; }
.rm-note { font-size: 13px; margin: 0; }
/* done milestones: kept on the roadmap, crossed out hard, with a DONE stamp */
.rm-line li.done { border-color: #3fe08a55; background: #08130d; padding-right: 175px; }
.rm-line li.done::before { content: '✓'; color: #06140c; background: #3fe08a; border-color: #3fe08a; font: 900 10px/8px system-ui; text-align: center; }
.rm-line li.done h4, .rm-line li.done p, .rm-launch.done .rm-chip { text-decoration: line-through; text-decoration-color: var(--red, #ff1f2d); text-decoration-thickness: 4px; text-decoration-skip-ink: none; }
.rm-line li.done h4 { color: #b9c9bf; text-decoration-thickness: 5px; }
.rm-line li.done p { color: #7d8f84; text-decoration-thickness: 3px; }
.rm-launch { position: relative; }
.rm-launch.done .rm-chip { opacity: 0.85; }
.rm-stamp { position: absolute; right: 18px; top: 50%; transform: translateY(-50%) rotate(-9deg); padding: 6px 14px; border: 3px solid #3fe08a; border-radius: 8px; color: #3fe08a; font-family: 'Russo One', sans-serif; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; background: #06140ccc; box-shadow: 0 0 18px #3fe08a55; pointer-events: none; }
.rm-launch.done > .rm-stamp { top: 26px; right: 26px; transform: rotate(-9deg); font-size: 26px; z-index: 2; }
@media (max-width: 700px) { .rm-line li.done { padding-right: 16px; padding-top: 44px; } .rm-line li.done .rm-stamp { top: 10px; right: 10px; transform: rotate(-6deg); font-size: 16px; } }
@media (max-width: 720px) {
  .rm-launch { grid-template-columns: 1fr; }
  .rm-art { max-width: 280px; margin: 0 auto; width: 100%; }
  .rm-line li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------------------------------------------- controls (controls.js: Player menu -> Controls) */
.controls { min-width: min(520px, 86vw); }
.ctl-rows { display: grid; gap: 8px; }
.ctl-row { display: grid; grid-template-columns: 1fr 120px 120px; gap: 8px; align-items: center; padding: 8px 10px; background: var(--panel2); border: 1px solid var(--line); }
.ctl-row small { display: block; font-size: 12px; }
.ctl-key { font-family: 'Russo One'; letter-spacing: 0.04em; min-height: 36px; text-transform: none; }
.ctl-key.empty { opacity: 0.55; }
.ctl-key.listening { box-shadow: inset 0 0 0 2px #ffd34d; color: #ffd34d; animation: readypulse 0.5s ease-in-out infinite alternate; }
@media (max-width: 520px) { .ctl-row { grid-template-columns: 1fr 1fr; } .ctl-row > div { grid-column: 1 / -1; } }

/* the Connect wallet picker (main.js chooseWallet) */
.wallet-pick { display: grid; gap: 10px; max-width: 320px; margin: 14px auto 0; }
.wallet-choice { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 18px; padding: 14px 18px; text-transform: none; letter-spacing: 0; }
.wallet-choice img { border-radius: 6px; }
.wallet-choice small { display: block; font-size: 11px; color: var(--muted); font-family: 'Exo 2', sans-serif; text-transform: none; }
.wallet-choice > span:last-child { text-align: left; }
.wallet-mail { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #ff1f2d; color: #fff; font-weight: 800; }

/* the match intro (battle.js matchIntro): letterbox, the stadium's name, a card per blader, VS */
#battle .hud { transition: opacity 0.4s; }
#battle.intro .hud { opacity: 0; pointer-events: none; }
.mi { position: absolute; inset: 0; z-index: 5; overflow: hidden; font-family: 'Russo One', sans-serif; color: #fff; cursor: default; }
.mi-bar { position: absolute; left: 0; right: 0; height: 9vh; background: #000; transition: transform 0.5s ease-in; }
.mi-bar.t { top: 0; }
.mi-bar.b { bottom: 0; }
.mi:not(.show-top):not(.show-me):not(.show-them):not(.show-vs) .mi-bar.t { transform: translateY(-100%); }
.mi:not(.show-top):not(.show-me):not(.show-them):not(.show-vs) .mi-bar.b { transform: translateY(100%); }
.mi-top { position: absolute; left: 0; right: 0; bottom: 13vh; text-align: center; opacity: 0; transform: translateY(16px); transition: opacity 0.45s, transform 0.45s; }
.mi.show-top .mi-top { opacity: 1; transform: none; }
.mi-top small { display: block; font-size: clamp(13px, 1.6vw, 18px); letter-spacing: 0.4em; color: #ff6a74; text-shadow: 0 0 14px #ff1f2d88; }
.mi-top b { display: block; font-weight: 400; font-size: clamp(30px, 5.4vw, 72px); letter-spacing: 0.06em; text-shadow: 0 4px 24px #000, 0 0 30px #ffffff30; }
.mi-card { position: absolute; bottom: 14vh; display: flex; align-items: center; gap: 18px; padding: 14px 30px 14px 18px; max-width: min(560px, 86vw);
  background: linear-gradient(90deg, #000000d0, #00000080); border-bottom: 4px solid var(--c); opacity: 0; transition: transform 0.45s cubic-bezier(0.2, 1.2, 0.3, 1), opacity 0.3s; }
.mi-card.me { --c: #3fa0ff; left: 0; transform: translateX(-110%); clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%); }
.mi-card.them { --c: #ff2a3d; right: 0; flex-direction: row-reverse; text-align: right; padding: 14px 18px 14px 30px; transform: translateX(110%);
  background: linear-gradient(270deg, #000000d0, #00000080); clip-path: polygon(0 0, 100% 0, 100% 100%, 26px 100%); }
.mi.show-me .mi-card.me, .mi.show-them .mi-card.them { transform: none; opacity: 1; }
.mi-card img { width: clamp(64px, 9vw, 110px); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 14px #000) drop-shadow(0 0 16px var(--c)); }
.mi-card small { display: block; font-size: clamp(11px, 1.3vw, 15px); letter-spacing: 0.25em; color: var(--c); }
.mi-card b { display: block; font-weight: 400; font-size: clamp(26px, 4.2vw, 54px); line-height: 1.05; text-shadow: 0 3px 16px #000; overflow-wrap: anywhere; }
.mi-card span { display: block; font: 600 clamp(12px, 1.4vw, 16px) 'Exo 2', sans-serif; color: #c9ccd8; margin-top: 4px; }
.mi-vs { position: absolute; left: 0; right: 0; top: 50%; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 44px);
  transform: translateY(-50%) scale(1.6); opacity: 0; transition: transform 0.28s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.2s; }
.mi.show-vs .mi-vs { transform: translateY(-50%); opacity: 1; }
.mi-vs span { flex: 1; font-size: clamp(20px, 3.4vw, 46px); text-shadow: 0 3px 18px #000; overflow-wrap: anywhere; }
.mi-vs span:first-child { text-align: right; color: #bfe0ff; }
.mi-vs span:last-child { color: #ffc9cd; }
.mi-vs b { font-weight: 400; font-size: clamp(54px, 9vw, 120px); font-style: italic; color: #ffd34d; text-shadow: 0 0 40px #ffb02aaa, 0 6px 0 #7a3b00; }
.mi-skip { position: absolute; right: 18px; bottom: calc(9vh + 10px); font: 600 13px 'Exo 2', sans-serif; letter-spacing: 0.1em; color: #ffffff90; text-transform: uppercase; }
.mi:has(.mi-skip) { cursor: pointer; }

/* RipCore skins in the Garage (screens/garage.js) */
.skin-slot { margin-top: 8px; }
.skin-art { width: 76px; height: 76px; flex: none; position: relative; display: grid; place-items: center; object-fit: contain; }
.skin-art.big { width: 100%; height: auto; aspect-ratio: 1; }
.skin-art i { position: absolute; inset: 12%; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--a), var(--b), var(--c), var(--d), var(--c), var(--b), var(--a));
  box-shadow: 0 0 0 3px var(--a), 0 0 22px var(--g), inset 0 0 18px #0009; }
.skin-art b { position: relative; font-size: 26px; color: var(--k); text-shadow: 0 0 10px var(--g), 0 2px 0 #000; }
.skin-art.big b { font-size: 40px; }
.skin-art.none { border: 2px dashed var(--line); border-radius: 50%; inset: 0; transform: scale(0.82); }
.skin-art.none span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; text-align: center; }
.skin-card.unowned .skin-art { filter: grayscale(0.7) brightness(0.55); }
.skin-card.previewing { outline: 2px dashed var(--red); outline-offset: -2px; }

/* Shop: RipCore skins (screens/skins.js) */
.skins-body { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: 16px; margin-top: 12px; }
.skins-viewer { min-height: 340px; }
.skins-list { display: flex; flex-direction: column; gap: 10px; }
.skin-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; clip-path: var(--cut); }
.skin-row:hover, .skin-row.picked { border-color: var(--red); background: #150b0e; }
.skin-row.event { border-color: #ff7a1a88; background: linear-gradient(90deg, #2a1206, var(--panel2) 60%); }
.skin-row.event.picked, .skin-row.event:hover { border-color: #ff9a3a; }
.skin-row .skin-art { width: 64px; height: 64px; }
.skin-row .skin-art b { font-size: 22px; }
.skin-name { font-family: 'Russo One'; font-size: 16px; }
.skin-event { display: inline-block; margin-right: 8px; padding: 1px 7px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: #ff7a1a; color: #120a14; vertical-align: 2px; }
.skin-desc { font-size: 12px; margin-top: 2px; }
.skin-note { font-size: 12px; font-weight: 800; color: #ffd8a8; margin-top: 4px; }
.skin-act { text-align: right; }
@media (max-width: 800px) { .skins-body { grid-template-columns: 1fr; } .skins-viewer { min-height: 260px; } .skin-row { grid-template-columns: 48px 1fr; } .skin-row .skin-art { width: 48px; height: 48px; } .skin-act { grid-column: 1 / -1; text-align: left; } }
img.skin-art { object-fit: cover; border-radius: 6px; }
.skin-row img.skin-art { width: 72px; height: 72px; }
.market-skin img { object-fit: cover; border-radius: 6px; }

/* the Privy account's wallets (main.js privyWalletsPanel) */
.privy-wallets { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.pw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); background: var(--panel2); }
.pw-row.main { border-color: #3fbf6a; }
.pw-row code { font-size: 12px; color: var(--muted); }

/* the Furnace: what this burn is guaranteed to give (screens/furnace.js) */
.furnace-odds { margin-top: 10px; font-size: 14px; }
.furnace-odds:empty { display: none; }

/* ------------------------------------------------------------------ Genesis Aperture Launch Day pop-up (js/genesis-popup.js) */
/* One iris cycle is 8s (LOOP_MS): charge 0-11%, snap open 11-16%, the eye darts about, blink shut 84-89%. */
.gp {
  position: fixed; left: 16px; bottom: 16px; z-index: 30; width: 392px; max-height: calc(100vh - 96px); overflow: auto;
  background: radial-gradient(420px 260px at 50% 0%, rgba(255, 31, 45, 0.2), transparent 70%), linear-gradient(180deg, #121019, #08080c);
  border: 1px solid #3a2530; clip-path: var(--cut); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
  opacity: 0; transform: translateY(26px) scale(0.96); transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
  scrollbar-width: thin;
}
.gp.in { opacity: 1; transform: none; }
.gp.out { opacity: 0; transform: translateY(18px); transition-duration: 0.3s; }
#battle:not(.hidden) ~ .gp { display: none; } /* never over a battle */
.gp::before { /* Base-blue edge light */
  content: ''; position: absolute; inset: 0 0 auto; height: 2px; z-index: 2;
  background: linear-gradient(90deg, transparent, #0052ff, #7fb0ff, var(--red), transparent);
}
.gp-x {
  position: absolute; top: 6px; right: 8px; z-index: 3; width: 34px; height: 34px; border: 0; background: rgba(0, 0, 0, 0.45);
  color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; clip-path: var(--cut);
}
.gp-x:hover, .gp-x:focus-visible { background: var(--red); }
.gp-stage { position: relative; height: 172px; display: grid; place-items: center; overflow: hidden; }
.gp-head { padding: 0 18px; }
.gp-glow {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 40, 50, 0.55), rgba(0, 82, 255, 0.18) 55%, transparent 70%);
  animation: gp-glow 8s infinite;
}
.gp-iris { position: relative; width: 160px; height: 160px; overflow: visible; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.8)); }
.gp-iris * { transform-box: view-box; }
.gp-bolts { position: absolute; left: 50%; top: 50%; width: 187px; height: 187px; transform: translate(-50%, -50%); pointer-events: none; } /* 280/240 of the iris */
.gp-blade { transform-origin: 0 0; animation: gp-blade 8s cubic-bezier(0.3, 0, 0.2, 1) infinite; }
.gp-pupil { animation: gp-dart 8s infinite; }
.gp-iris-rings { animation: gp-dart-half 8s infinite; }
.gp-band { transform-origin: 120px 120px; animation: gp-turn 28s linear infinite; }
.gp-flash { opacity: 0; animation: gp-flash 8s infinite; }
.gp-shock { opacity: 0; transform-origin: 120px 120px; animation: gp-shock 8s ease-out infinite; }
.gp-spark { opacity: 0; animation: gp-spark 8s ease-out infinite; }
@keyframes gp-blade { /* rotate about the centre (a small twist) and about the blade's rim pivot (-60deg = open) */
  0%, 9% { transform: translate(120px, 120px) rotate(0deg) translate(-120px, -120px) translate(var(--px), var(--py)) rotate(0deg) translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
  10.5% { transform: translate(120px, 120px) rotate(-4deg) translate(-120px, -120px) translate(var(--px), var(--py)) rotate(3deg) translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
  14% { transform: translate(120px, 120px) rotate(14deg) translate(-120px, -120px) translate(var(--px), var(--py)) rotate(-66deg) translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
  15.5%, 84% { transform: translate(120px, 120px) rotate(10deg) translate(-120px, -120px) translate(var(--px), var(--py)) rotate(-60deg) translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
  88.5%, 100% { transform: translate(120px, 120px) rotate(0deg) translate(-120px, -120px) translate(var(--px), var(--py)) rotate(0deg) translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
}
@keyframes gp-dart { /* quick saccades: hold, flick, hold */
  0%, 22% { transform: translate(0, 0); } 23.5%, 34% { transform: translate(-21px, -8px); } 35.5%, 46% { transform: translate(18px, 11px); }
  47.5%, 56% { transform: translate(6px, -19px); } 57.5%, 66% { transform: translate(-15px, 14px); } 67.5%, 100% { transform: translate(0, 0); }
}
@keyframes gp-dart-half {
  0%, 22% { transform: translate(0, 0); } 23.5%, 34% { transform: translate(-13px, -5px); } 35.5%, 46% { transform: translate(11px, 7px); }
  47.5%, 56% { transform: translate(4px, -12px); } 57.5%, 66% { transform: translate(-9px, 9px); } 67.5%, 100% { transform: translate(0, 0); }
}
@keyframes gp-turn { to { transform: rotate(360deg); } }
@keyframes gp-flash { 0%, 12% { opacity: 0; } 13% { opacity: 0.4; } 15.5%, 100% { opacity: 0; } }
@keyframes gp-shock { 0%, 12.5% { opacity: 0; transform: scale(1); } 13% { opacity: 1; transform: scale(1); } 20%, 100% { opacity: 0; transform: scale(1.45); } }
@keyframes gp-spark { 0%, 12% { opacity: 0; transform: translate(0, 0); } 13% { opacity: 1; transform: translate(0, 0); } 21%, 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
@keyframes gp-glow { 0%, 10% { opacity: 0.35; transform: scale(0.85); } 13.5% { opacity: 1; transform: scale(1.12); } 20%, 82% { opacity: 0.8; transform: scale(1); } 89%, 100% { opacity: 0.35; transform: scale(0.85); } }
.gp-body { padding: 0 18px 18px; }
.gp-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #7fb0ff; }
.gp-live { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 31, 45, 0.7); animation: gp-live 1.4s infinite; }
@keyframes gp-live { 70% { box-shadow: 0 0 0 8px rgba(255, 31, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 31, 45, 0); } }
.gp-title {
  margin: 4px 0 6px; font-size: 30px; line-height: 1; font-style: italic; letter-spacing: 0.01em;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 2px 0 var(--red2)) drop-shadow(0 0 10px rgba(255, 31, 45, 0.45));
}
.gp-title span { display: inline-block; }
.gp-lead { margin: 0 0 12px; font-size: 14px; color: #d7d9e0; }
.gp-clock { padding: 10px 12px; margin-bottom: 10px; background: #0b0b11; border: 1px solid #2a2a36; border-left: 3px solid var(--red); }
.gp-clock-label { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.gp-digits { display: flex; gap: 8px; margin: 4px 0 2px; font-family: 'Russo One'; font-variant-numeric: tabular-nums; }
.gp-digits span { display: flex; align-items: baseline; gap: 2px; }
.gp-digits b { font-weight: 400; font-size: 28px; line-height: 1; color: #fff; text-shadow: 0 0 12px rgba(255, 31, 45, 0.6); }
.gp-digits i { font-style: normal; font-size: 13px; color: var(--red); }
.gp[data-phase='open'] .gp-digits b { color: #ffd9dc; }
.gp-clock-note { font-size: 12px; color: var(--muted); }
.gp-closed {
  display: inline-block; margin-bottom: 10px; padding: 6px 12px; font-family: 'Russo One'; letter-spacing: 0.08em; text-transform: uppercase;
  color: #ff8a92; border: 2px solid #ff3b47; transform: rotate(-2deg);
}
.gp-limits { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gp-limits li { padding: 8px 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid #24242f; }
.gp-limits b { display: block; font-family: 'Russo One'; font-weight: 400; font-size: 14px; color: #fff; }
.gp-limits span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.gp-limits li:only-child { grid-column: 1 / -1; }
.gp-ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.gp-ctas .btn { flex: 1 1 auto; text-align: center; justify-content: center; text-decoration: none; }
@media (max-width: 560px) { /* a compact bottom sheet: the iris beside the title, headline-only limits */
  .gp { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: min(70vh, calc(100vh - 80px)); }
  .gp-hero { display: flex; align-items: center; gap: 8px; padding: 8px 44px 4px 6px; }
  .gp-stage { flex: none; width: 96px; height: 96px; overflow: visible; }
  .gp-iris { width: 86px; height: 86px; }
  .gp-bolts { width: 100px; height: 100px; }
  .gp-glow { width: 110px; height: 110px; }
  .gp-head { padding: 0; min-width: 0; }
  .gp-eyebrow { font-size: 10px; letter-spacing: 0.14em; }
  .gp-body { padding: 0 12px 12px; }
  .gp-title { font-size: 23px; }
  .gp-lead { font-size: 13px; margin-bottom: 8px; }
  .gp-clock { padding: 8px 10px; margin-bottom: 8px; }
  .gp-digits b { font-size: 24px; }
  .gp-clock-note { font-size: 11px; }
  .gp-limits { margin-bottom: 10px; gap: 5px; }
  .gp-limits li { padding: 6px 8px; }
  .gp-limits b { font-size: 12.5px; }
  .gp-limits span { display: none; }
  .gp-limits li:only-child span { display: block; } /* the "over" card has room for its one detail */
}
@media (prefers-reduced-motion: reduce) {
  .gp, .gp.in, .gp.out { transition: opacity 0.2s; transform: none; }
  .gp-glow, .gp-pupil, .gp-iris-rings, .gp-band, .gp-live { animation: none; }
  .gp-flash, .gp-shock, .gp-spark, .gp-bolts { animation: none; display: none; }
  .gp-blade { /* held open */
    animation: none;
    transform: translate(120px, 120px) rotate(10deg) translate(-120px, -120px) translate(var(--px), var(--py)) rotate(-60deg) translate(calc(-1 * var(--px)), calc(-1 * var(--py)));
  }
}

/* Sealed packs (sealed-packs.js): the Collection's unopened packs, and the "open now?" dialog after buying */
.sealed-packs { margin-bottom: 14px; }
.sealed-packs .vrf-note { max-width: none; text-align: left; margin: 8px 0 0; }
.sealed-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.sealed-pack { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; text-align: center; font-size: 13px; }
.sealed-art { position: relative; width: 96px; }
.sealed-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)); }
.sealed-count { position: absolute; right: -10px; top: -6px; padding: 2px 8px; border-radius: 999px; background: var(--red, #ff1f2d); color: #fff; font-weight: 800; font-size: 13px; }
.sealed-bought { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 420px; margin: 0 auto; }
.modal .dialog:has(.sealed-bought) { width: min(520px, 100%); }
.sealed-bought .sealed-art { width: 120px; }
.sealed-bought h2 { margin: 4px 0 0; }
.sealed-bought p { margin: 0; }

/* Collection: opened packs / Furnace burns still waiting for Chainlink (screens/collection.js) */
.waiting-parts:empty { display: none; }
.waiting-parts { display: grid; gap: 8px; margin: 0 0 14px; }
.waiting-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(47, 98, 255, 0.55); background: rgba(20, 30, 70, 0.35); }
.waiting-card small { display: block; color: var(--muted, #9aa0b4); margin-top: 2px; }
.waiting-card .btn { margin-left: auto; }
.waiting-spin { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: #2f62ff; animation: waiting-spin 0.9s linear infinite; }
@keyframes waiting-spin { to { transform: rotate(360deg); } }

/* Player menu: a linked wallet's buttons (main.js privyWalletsPanel) */
.pw-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pw-send { display: grid; gap: 8px; margin: -2px 0 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(0, 0, 0, 0.25); }

/* ------------------------------------------------------------------ the Tower (screens/tower.js) */
/* a blood-red night behind the tower; the stage is the tower art's own box, so the bosses' % positions sit on it */
.tower-scene {
  position: relative; overflow: hidden; clip-path: var(--cut); padding: 22px 0 0;
  background:
    radial-gradient(38% 26% at 50% 16%, rgba(255, 40, 40, 0.34), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, rgba(120, 8, 16, 0.55), transparent 75%),
    linear-gradient(180deg, #120509 0%, #1c0609 55%, #0b0306 100%);
}
.tower-head { position: relative; z-index: 6; text-align: center; padding: 0 16px; }
.tower-title { font-size: clamp(34px, 6vw, 60px); color: #fff; letter-spacing: 0.08em; text-shadow: 0 0 24px rgba(255, 31, 45, 0.85), 0 4px 0 #3a0006; }
.tower-head p { margin: 4px 0 0; color: #f0b9bd; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }
.tower-stage { position: relative; width: min(78%, 600px); aspect-ratio: 1122 / 1402; margin: 18px auto 0; }
.tower-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.tower-art { z-index: 2; filter: drop-shadow(0 0 40px rgba(255, 20, 30, 0.35)); }
/* the window light: drawn over the art, pulsing, with a blurred copy as bloom */
.tower-glow { z-index: 3; mix-blend-mode: screen; animation: tower-pulse 3.2s ease-in-out infinite; }
.tower-bloom { z-index: 3; mix-blend-mode: screen; filter: blur(14px) saturate(1.4); transform: scale(1.02); animation: tower-pulse 3.2s ease-in-out infinite, tower-flicker 7s steps(1) infinite; }
@keyframes tower-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes tower-flicker { 0%, 100% { filter: blur(14px) saturate(1.4) brightness(1); } 41% { filter: blur(14px) saturate(1.4) brightness(1.5); } 43% { filter: blur(14px) saturate(1.4) brightness(0.8); } 45% { filter: blur(16px) saturate(1.4) brightness(1.35); } }
/* fog: one tiling texture (assets/ui/tower-fog.webp) drifting at three depths, wider than the stage */
.tower-fog { position: absolute; left: -70%; right: -70%; pointer-events: none; background: url('/assets/ui/tower-fog.webp') repeat-x 0 0 / auto 100%; }
.tower-fog-back { z-index: 1; top: 46%; height: 40%; opacity: 0.6; filter: sepia(1) hue-rotate(-40deg) saturate(3) brightness(0.55); animation: tower-drift 90s linear infinite; }
.tower-fog-mid { z-index: 4; top: 62%; height: 28%; opacity: 0.6; filter: sepia(1) hue-rotate(-40deg) saturate(2.6) brightness(0.75); animation: tower-drift 60s linear infinite reverse; background-position-y: 40%; }
.tower-fog-wisp { z-index: 4; top: 30%; height: 18%; opacity: 0.22; animation: tower-drift 75s linear infinite; }
.tower-fog-front { z-index: 4; bottom: -8%; height: 30%; opacity: 0.75; filter: sepia(0.5) hue-rotate(-40deg) saturate(1.8) brightness(0.9); animation: tower-drift 42s linear infinite; }
@keyframes tower-drift { from { background-position-x: 0; } to { background-position-x: -1024px; } }
/* a boss pinned at its floor: a medallion (their portrait, or sealed) and a tag pointing out from the tower */
.tower-boss { position: absolute; z-index: 5; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tower-boss.left { flex-direction: row-reverse; }
.tower-boss.top { flex-direction: column; }
.tower-boss:hover .tower-medal, .tower-boss:focus-visible .tower-medal { transform: scale(1.12); }
.tower-medal {
  --s: clamp(34px, 6.4vw, 56px); position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; transition: transform 0.15s;
  background: radial-gradient(circle at 50% 35%, #3a0d12, #12060a); border: 3px solid #ff2a36; box-shadow: 0 0 0 2px #1a0004, 0 0 18px rgba(255, 31, 45, 0.75);
}
.tower-boss.top .tower-medal { --s: clamp(44px, 8.4vw, 72px); border-color: #ffcf40; box-shadow: 0 0 0 2px #2a1800, 0 0 26px rgba(255, 190, 60, 0.8); }
.tower-medal img { width: 100%; height: 100%; object-fit: cover; }
/* cleared: greyed with a check; next up: pulsing */
.tower-check { position: absolute; inset: 0; display: none; place-items: center; font-style: normal; font: 400 clamp(16px, 3vw, 26px) 'Russo One'; color: #6dffa8; background: rgba(6, 12, 8, 0.55); text-shadow: 0 0 10px #1f7a43; }
.tower-boss.cleared .tower-medal { border-color: #2f9a5a; box-shadow: 0 0 0 2px #04140a; }
.tower-boss.cleared .tower-medal img { filter: grayscale(0.85) brightness(0.7); }
.tower-boss.cleared .tower-check { display: grid; }
.tower-boss.next .tower-medal { animation: tower-next 1.4s ease-in-out infinite; }
@keyframes tower-next { 0%, 100% { box-shadow: 0 0 0 2px #1a0004, 0 0 14px rgba(255, 31, 45, 0.6); } 50% { box-shadow: 0 0 0 3px #ffd34d, 0 0 30px rgba(255, 60, 60, 1); } }
/* the player's floor, on the tower's middle */
.tower-you { position: absolute; z-index: 5; left: 50%; transform: translate(-50%, -50%); transition: top 0.8s ease; pointer-events: none; }
.tower-you span { display: block; padding: 3px 8px; font: 400 11px 'Russo One'; letter-spacing: 0.1em; color: #061018; background: #3fa0ff; clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); padding-bottom: 7px; box-shadow: 0 0 14px #3fa0ff; }
.tower-tag { display: flex; align-items: center; gap: 6px; padding: 3px 9px; background: rgba(12, 4, 7, 0.85); border: 1px solid #6e0d15; clip-path: var(--cut); white-space: nowrap; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.tower-tag b { color: #ff4652; font-family: 'Russo One'; font-weight: 400; }
.tower-boss.top .tower-tag b { color: #ffd84a; }
/* the next opponent and the boss pop-up */
.tower-bosscard { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 16px; align-items: center; padding: 10px; background: radial-gradient(70% 90% at 20% 50%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); }
.tower-bossart { width: 100%; max-height: 360px; object-fit: contain; filter: drop-shadow(0 10px 20px #000c); }
.tower-bosscard.compact .tower-bossart { max-height: 220px; }
.tower-bossinfo small { color: var(--c); font-weight: 800; letter-spacing: 0.12em; font-size: 12px; }
.tower-bossinfo h3 { font-size: 28px; color: #fff; text-transform: none; letter-spacing: 0.02em; margin: 2px 0; }
.tower-bosstitle { display: block; color: var(--c); font-style: italic; margin-bottom: 8px; }
.tower-bossinfo p { margin: 0 0 8px; }
.tower-bossrole { font-size: 13px; }
.tower-parts { display: flex; gap: 6px; margin-top: 10px; }
.tower-parts img { width: 52px; height: 52px; object-fit: contain; background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); }
.tower-rival { padding: 14px; background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); }
.tower-rival b { font: 400 22px 'Russo One'; }
.tower-meter { height: 10px; background: #0c0c12; border: 1px solid var(--line); margin: 12px 0 6px; overflow: hidden; }
.tower-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--red2), var(--red)); box-shadow: var(--glow); transition: width 0.8s; }
.rs-note.tower-won b { color: #c58bff; margin-right: 6px; }
@media (max-width: 720px) {
  .tower-stage { width: 92%; }
  .tower-bosscard { grid-template-columns: 38% 1fr; gap: 10px; }
  .tower-bossinfo h3 { font-size: 22px; }
  .tower-parts img { width: 40px; height: 40px; }
  .tower-tag { font-size: 10px; padding: 2px 6px; }
  .tower-tag span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tower-glow, .tower-bloom, .tower-fog { animation: none; }
  .tower-glow { opacity: 0.85; }
}
.tower-card { display: flex; gap: 14px; align-items: center; text-decoration: none; background: linear-gradient(120deg, #2a070c, var(--panel) 60%); }
.tower-card-art { width: 74px; flex: none; filter: drop-shadow(0 0 12px rgba(255, 31, 45, 0.6)); }
.tower-card .tower-title { font-size: 24px; margin-top: 4px; }
.tower-card:hover .tower-card-art { filter: drop-shadow(0 0 18px rgba(255, 31, 45, 0.9)); }
.tower-card > div { min-width: 0; } /* (the text column shrinks with a phone's screen instead of widening the page) */
.tower-card-faces { display: flex; flex-wrap: wrap; row-gap: 4px; margin: 2px 0 10px 6px; }
.tower-card-faces img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; margin-left: -6px; border: 2px solid #ff2a36; background: #12060a; box-shadow: 0 0 8px rgba(255, 31, 45, 0.5); }
.tower-card-faces img:last-child { border-color: #ffcf40; }
/* the Play screen's "Unlocks soon": modes on their way, to look at before they open */
.unlocks-soon { display: grid; gap: 8px; }
.unlocks-soon > h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: #ffd84a; }
.tower-card.soon { border-color: #6b5410; }
/* the Tower page before it opens, and the boss gallery */
.tower-unlock { position: relative; z-index: 6; display: inline-block; margin-top: 10px; padding: 6px 14px; font: 400 15px 'Russo One'; letter-spacing: 0.1em; color: #1a1200; background: #ffd34d; clip-path: var(--cut); box-shadow: 0 0 22px rgba(255, 211, 77, 0.6); }
.tower-gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tower-gallery button { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; background: #0c0c12; border: 1px solid var(--line); clip-path: var(--cut); color: inherit; font: inherit; cursor: pointer; }
.tower-gallery button:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #0c0c12); }
.tower-gallery img { width: 100%; max-width: 110px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid var(--c); }
.tower-gallery b { font-size: 14px; line-height: 1.1; text-align: center; }
.tower-gallery small { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 720px) { .tower-gallery { grid-template-columns: repeat(3, 1fr); } }
/* a Tower boss in the match intro: their portrait, framed */
.mi-card.mi-boss img { object-fit: cover; border-radius: 50%; border: 3px solid var(--c); background: #12060a; }

/* ================================================================== game-UI pass
   The 3D content already reads as a game; this makes the chrome around it match.
   Pure styling - no markup or layout changes, so every screen keeps its behaviour.
   Panels become lit metal plates with corner brackets, headers get a cut-in accent,
   buttons and HUD chips get a bevel you can feel. Phone rules below stay as they are. */

/* panels: a rim-lit plate instead of a flat rectangle */
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 120px),
    repeating-linear-gradient(135deg, transparent 0 7px, rgba(255, 255, 255, 0.012) 7px 8px),
    linear-gradient(180deg, var(--panel2), var(--panel) 60%, #0c0c12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),   /* top rim light */
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    inset 0 0 44px rgba(0, 0, 0, 0.45);        /* settles the middle back */
}
/* corner brackets, drawn inside the clipped shape */
.panel::after {
  content: ''; position: absolute; inset: 7px; pointer-events: none; z-index: 0;
  background:
    linear-gradient(var(--red), var(--red)) left 0 top 0 / 1px 14px no-repeat,
    linear-gradient(var(--red), var(--red)) left 0 top 0 / 14px 1px no-repeat,
    linear-gradient(#5c6070, #5c6070) right 0 top 0 / 1px 14px no-repeat,
    linear-gradient(#5c6070, #5c6070) right 0 top 0 / 14px 1px no-repeat,
    linear-gradient(#5c6070, #5c6070) right 0 bottom 0 / 1px 14px no-repeat,
    linear-gradient(#5c6070, #5c6070) right 0 bottom 0 / 14px 1px no-repeat;
  opacity: 0.55;
}
.panel > * { position: relative; z-index: 1; }

/* section headers: an accent block cut in, then a rule running out to the edge */
.panel h2 {
  display: flex; align-items: center; gap: 10px;
}
.panel h2::before {
  content: ''; flex: none; width: 5px; height: 0.95em;
  background: linear-gradient(180deg, #ff6a74, var(--red2));
  box-shadow: 0 0 10px rgba(255, 31, 45, 0.9);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
}
.panel h2::after {
  content: ''; flex: 1; height: 1px; min-width: 18px;
  background: linear-gradient(90deg, rgba(255, 31, 45, 0.55), rgba(255, 255, 255, 0.10) 40%, transparent);
}

/* buttons: a harder bevel and a lit edge, so they read as pressable */
.btn {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.btn:hover:not(:disabled) {
  filter: brightness(1.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(0, 0, 0, 0.45),
    inset 0 0 18px rgba(255, 255, 255, 0.22);
}
.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.btn-ghost { box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.btn-ghost:hover:not(:disabled) { background: #1f1f2b; box-shadow: inset 0 0 0 1px #3a3a4a, inset 0 0 16px rgba(255, 31, 45, 0.16); }

/* HUD readouts: shard / ETH counters sit in a recessed slot */
.wallet .chip {
  background: linear-gradient(180deg, #0b0b11, #15151e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 4px rgba(0, 0, 0, 0.5);
  font-family: 'Russo One', 'Exo 2', sans-serif; letter-spacing: 0.04em;
}

/* the active tab reads as lit, not just coloured */
.tabs a.active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 31, 45, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.tabs a:not(.active):hover { box-shadow: inset 0 0 0 1px var(--line); }

/* equipment slots: a recessed socket the part sits in */
.slot {
  background: linear-gradient(180deg, #080810, #10101a);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}
.slot:hover, .slot.open {
  background: linear-gradient(180deg, #16090d, #1d0c11);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(255, 31, 45, 0.22);
}

/* part / item cards: a lit edge inside the cut, kept in the part's own rarity colour
   (the card is clip-path'd, so an outer glow would be cut away - this one sits inside) */
.card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -2px 6px rgba(0, 0, 0, 0.45); }
.card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 6px rgba(0, 0, 0, 0.45),
    inset 0 0 24px color-mix(in srgb, var(--rc) 30%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transition: none; transform: none; }
}

/* ------------------------------------------------------------------ Season 1 polish pass */
/* screens ease in instead of popping (main.js adds .screen-in on every route) */
#screen.screen-in > * { animation: screenin 0.3s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes screenin { from { opacity: 0; transform: translateY(10px); } }

/* dialogs fade and settle in; toasts slide out as well as in */
.modal:not(.hidden) { animation: po-fade 0.18s ease-out; }
.modal:not(.hidden) > .dialog { animation: dialogin 0.26s cubic-bezier(0.2, 1.25, 0.4, 1); }
@keyframes dialogin { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.toast.out { opacity: 0; transform: translateX(30px); transition: opacity 0.25s, transform 0.25s; }

/* keyboard focus is always visible */
.btn:focus-visible, .tabs a:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, .card:focus-visible, .slot:focus-visible {
  outline: 2px solid #ff6a74; outline-offset: -3px; /* inside, since clip-path would cut an outer ring away */
}

/* filters: dark dropdowns that match the inputs, instead of the browser's default */
select.text {
  appearance: none; -webkit-appearance: none; cursor: pointer; font-family: 'Exo 2', system-ui, sans-serif; font-weight: 600;
  padding: 10px 32px 10px 12px; background-color: #0a0a0f; color: var(--ink); border: 1px solid var(--line); clip-path: var(--cut);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat;
  transition: border-color 0.15s;
}
select.text:hover { border-color: #3a3a4a; }
select.text option { background: #12121a; color: var(--ink); }
.market-filters input.text { width: 220px; flex: 0 1 220px; }
.market-filters select.text { width: auto; }
#mMine:empty, .market-grid:empty { display: none; }

/* 3D previews: a spinner while the model loads, instead of an empty black box */
.viewer:not(:has(canvas))::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--red); animation: spin 0.8s linear infinite;
}

/* entering a battle: a spinner and the stadium's name while it builds (battle.js openView) */
.battle-loading { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: radial-gradient(600px 360px at 50% 50%, #1a0b10, #050508 70%); font-family: 'Russo One', sans-serif; letter-spacing: 0.25em;
  text-transform: uppercase; font-size: 13px; color: #c9ccd8; transition: opacity 0.35s; }
.battle-loading i { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--red);
  box-shadow: 0 0 22px rgba(255, 31, 45, 0.35); animation: spin 0.8s linear infinite; will-change: transform; }
.battle-loading.out { opacity: 0; pointer-events: none; }

/* "Built on Base": the Base square in Base blue, not a white placeholder block */
.home-stats b.base-mark { color: #0052ff; text-shadow: 0 0 14px rgba(0, 82, 255, 0.6); }

/* a section title with a season tag: the title never breaks, the tag wraps under it if it must */
.panel h2:has(.season-tag) { flex-wrap: wrap; row-gap: 6px; }
.panel h2 .season-tag { white-space: nowrap; font-size: 10px; padding: 3px 8px; margin-left: 0; }
.panel h2:has(.season-tag)::after { display: none; }
/* price buttons keep "5 packs · ..." on one line */
.btn[data-count] { white-space: nowrap; }

/* Odds & rules: panels keep their own height, not a tall empty box beside a long one */
.rules .grid.cols-2 { align-items: start; }

/* empty lists say what to do next */
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 26px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
.empty-state b { color: var(--ink); font-family: 'Russo One', 'Exo 2', sans-serif; font-weight: 400; letter-spacing: 0.04em; }
.empty-state .btn { margin-top: 6px; }

/* the Play hub: on wide screens your top stays in view while you scroll the modes */
@media (min-width: 1051px) {
  .hub-top { position: sticky; top: 84px; align-self: start; }
}

/* phones */
@media (max-width: 800px) {
  .skin-row img.skin-art { width: 48px; height: 48px; } /* was 72px in a 48px column, so it sat over the text */
}
@media (max-width: 560px) {
  .launcher-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } /* 12 launchers were one tall column */
  .launcher-card b { font-size: 13px; }
  .home-gold, .home-diamond { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .home-gold img { width: 140px; }
  .home-diamond-art { width: 120px; }
  .home-gold h2, .home-diamond h2 { justify-content: center; }
  .home-gold h2::before, .home-gold h2::after, .home-diamond h2::before, .home-diamond h2::after { display: none; }
  .btn[data-count] { font-size: 14px; padding: 11px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #screen.screen-in > *, .modal:not(.hidden), .modal:not(.hidden) > .dialog { animation: none; }
}
/* Tower: how the player's build measures up to the floor (floors 13+) */
.tower-measure { margin: 10px 0 0; font-size: 13px; color: var(--muted, #9aa0b4); }
.tower-measure.short { padding: 8px 10px; border: 1px solid rgba(255, 60, 60, 0.35); border-radius: 8px; background: rgba(255, 40, 40, 0.07); color: #ffd3d3; }
.tower-measure.short a { color: #ff6b6b; font-weight: 700; }

/* ------------------------------------------------------------------ holiday theme (js/holiday.js: body.holiday)
   December, while the Holiday Clash runs: a winter-night backdrop with snow falling behind the pages, a string of
   chasing lights under the top bar, candy-cane accents and red-to-green trims, and the Holiday Clash strip. */
body.holiday {
  --xmas-green: #1fd67a;
  --xmas-gold: #ffc94d;
  --ice: #bfe6ff;
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(255, 31, 45, 0.18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(31, 214, 122, 0.12), transparent 60%),
    radial-gradient(800px 600px at 110% 60%, rgba(120, 190, 255, 0.10), transparent 60%),
    #070a12;
}
.holiday-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* the lights: a dark green wire looping under the top bar, with red, green, gold and blue bulbs chasing along it */
body.holiday .topbar { box-shadow: 0 1px 0 rgba(31, 214, 122, 0.35); }
body.holiday .topbar::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background:
    radial-gradient(circle at 50% 62%, #ff5964 0 2.6px, rgba(255, 60, 75, 0.45) 3.6px, transparent 7px),
    radial-gradient(circle at 50% 62%, #4dff9e 0 2.6px, rgba(40, 230, 130, 0.45) 3.6px, transparent 7px),
    radial-gradient(circle at 50% 62%, #ffd866 0 2.6px, rgba(255, 200, 70, 0.45) 3.6px, transparent 7px),
    radial-gradient(circle at 50% 62%, #7cc8ff 0 2.6px, rgba(90, 170, 255, 0.45) 3.6px, transparent 7px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='16'%3E%3Cpath d='M0 2 Q12 12 24 2' fill='none' stroke='%23284f3a' stroke-width='1.4'/%3E%3C/svg%3E");
  background-size: 96px 16px, 96px 16px, 96px 16px, 96px 16px, 24px 16px;
  background-repeat: repeat-x;
  background-position: -36px 0, -12px 0, 12px 0, 36px 0, 0 0;
  animation: xmas-chase 2.4s steps(4) infinite;
}
@keyframes xmas-chase {
  to { background-position: 60px 0, 84px 0, 108px 0, 132px 0, 0 0; }
}
body.holiday .tabs a.active {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 4px, transparent 4px 14px),
    linear-gradient(180deg, var(--red), var(--red2));
}
body.holiday .btn:not(.btn-ghost):not(.btn-chrome) { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 #0000004d; } /* a frosted top edge */
body.holiday .panel::before { background: linear-gradient(90deg, var(--red), var(--xmas-green) 38%, transparent 75%); }
body.holiday .eyebrow::before { background: repeating-linear-gradient(90deg, var(--red) 0 4px, #fff 4px 8px); }
body.holiday .site-footer::before { content: '❄ Happy holidays from RipCores'; flex-basis: 100%; color: var(--ice); font-family: 'Russo One'; letter-spacing: 0.08em; font-size: 12px; text-transform: uppercase; }
/* the Holiday Clash strip */
.holiday-banner {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 16px 9px; font-size: 13px; text-align: center; color: #e8f6ff;
  background: linear-gradient(90deg, rgba(31, 214, 122, 0.16), rgba(12, 22, 40, 0.92) 30%, rgba(12, 22, 40, 0.92) 70%, rgba(255, 31, 45, 0.18));
  border-bottom: 1px solid #22344a;
}
.holiday-banner b { font-family: 'Russo One'; font-weight: 400; letter-spacing: 0.05em; color: #fff; }
.holiday-banner .hb-flake { color: var(--ice); font-size: 16px; text-shadow: 0 0 10px rgba(191, 230, 255, 0.8); }
.holiday-banner .hb-go {
  padding: 4px 14px; text-decoration: none; font-family: 'Russo One'; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px;
  color: #fff; clip-path: var(--cut); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 4px, transparent 4px 12px), linear-gradient(180deg, #ff3a46, var(--red2));
}
.holiday-banner .hb-go:hover { filter: brightness(1.15); }
@media (max-width: 720px) { .holiday-banner { font-size: 12px; gap: 8px; padding: 17px 12px 8px; } }
@media (prefers-reduced-motion: reduce) { body.holiday .topbar::after { animation: none; } }

/* spectating and replays (battle.js watchMatch / startReplay): the bar along the bottom of the battle view */
.watch-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); padding: 6px 12px; border-radius: 999px; background: #0b0b10cc; border: 1px solid #ffffff22; font: 600 13px 'Exo 2', sans-serif; letter-spacing: 0.04em; color: #e6e9f2; }
.watch-bar .live { color: #ff2a3d; letter-spacing: 0.12em; }
.watch-bar .rp { color: #ffd34d; letter-spacing: 0.12em; }
.watch-bar .speeds { display: flex; gap: 4px; }
.watch-bar .speeds .btn { padding: 2px 10px; min-width: 0; }
#battle.intro .watch-bar { opacity: 0.6; }
/* the Play hub's Watch list and the player menu's My replays */
.watch-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #ffffff14; }
.watch-row:first-child { border-top: 0; }
.watch-row .who { flex: 1; min-width: 140px; }
.watch-row small { color: #9aa0ae; }
#battle.watching .bh-actions, #battle.watching .bh-hints, #battle.watching .bh-riparc { display: none !important; }

/* ---------------------------------------------------------------- phones: battles held sideways (landscape.js) */
/* "turn your phone" screen: a phone held upright in a battle, when the browser couldn't turn it for us */
.turn-phone { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: #060509f2; color: #fff; }
.turn-phone b { font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 24px; letter-spacing: 0.04em; }
.turn-phone span { max-width: 300px; color: #aab0c0; font-size: 14px; line-height: 1.45; }
.turn-phone .btn { pointer-events: auto; }
.tp-phone { width: 46px; height: 80px; border: 3px solid #fff; border-radius: 9px; position: relative; margin-bottom: 8px; animation: tpturn 1.8s ease-in-out infinite; }
.tp-phone i { position: absolute; left: 50%; bottom: 5px; width: 10px; height: 3px; margin-left: -5px; border-radius: 2px; background: #fff; }
@keyframes tpturn { 0%, 20% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (orientation: landscape) { .turn-phone { display: none; } }

/* the sideways layout: small cards in the top corners, Guard under the left thumb, Ability / RIP and Dash under the right */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  #battle .bh-card { width: min(300px, 31vw); height: auto; top: 6px; padding: 4px 16px 5px; gap: 6px; }
  #battle .bh-card.me { left: 6px; } #battle .bh-card.them { right: 6px; }
  #battle .bh-ring { width: 46px; height: 46px; }
  #battle .bh-portrait { inset: 6px; width: 34px; height: 34px; }
  #battle .bh-spin { font-size: 9px; padding: 0 5px; }
  #battle .bh-name { font-size: 12px; max-width: 100%; }
  #battle .bh-head { flex-wrap: wrap; gap: 0 6px; width: 100%; }
  #battle .bh-rip { font-size: 9px; }
  #battle .bh-build, #battle .bh-title, #battle .bh-fx { display: none; }
  #battle .bh-row { width: 100%; gap: 5px; }
  #battle .bh-label { width: 40px; font-size: 7px; }
  #battle .bh-burst { height: 8px; }
  #battle .bh-meter { height: 5px; }
  #battle .bh-ko { font-size: 10px; bottom: 4px; }
  #battle .bh-score { top: 6px; width: 190px; }
  #battle .bh-side { width: 68px; height: 26px; }
  #battle .bh-pips { gap: 6px; } #battle .bh-pips i { width: 9px; height: 9px; }
  #battle .bh-timer { width: 46px; height: 52px; font-size: 15px; }
  #battle .bh-round, #battle .bh-format, #battle .bh-hints { display: none; }
  #battle .bh-marker b { font-size: 10px; padding: 1px 7px; }
  /* the thumbs: the action layer spans the screen, each button pinned to its corner */
  #battle .bh-actions { inset: 0; width: auto; height: auto; transform: none; }
  #battle .bh-action { width: 104px; height: 104px; }
  #battle .bh-action.guard { left: 14px; right: auto; bottom: 14px; width: 118px; height: 118px; }
  #battle .bh-action.dash { right: 134px; bottom: 96px; }
  #battle .bh-counter { right: 12px; bottom: 210px; font-size: 12px; padding: 3px 9px; }
  #battle .ability.hex { right: 12px; bottom: 10px; width: 132px; height: 132px; }
  #battle .ability.hex.rip .t { font-size: 18px; }
  #battle .bh-action .t, #battle .ability.hex .t { font-size: 12px; }
  /* the middle: rip gauge and countdown between the thumbs, hints under the score */
  #battle .bh-riparc { width: min(420px, 44vw); height: min(147px, 15.4vw); bottom: 14px; }
  #battle .bh-count { font-size: 76px; bottom: 30vh; -webkit-text-stroke: 2px #ff2a3d; }
  #battle .hud > .prep-hint { top: 70px; bottom: auto; font-size: 11px; padding: 4px 10px; max-width: 46vw; }
  #battle .announcer { top: 20%; }
  #battle .bh-callout .big { font-size: 34px; }
  #battle .bh-callout .ribbon { padding: 2px 36px 6px; }
  #battle .bh-callout .small { font-size: 12px; }
  #battle .quit { top: 72px; bottom: auto; left: 8px; padding: 4px 10px; font-size: 11px; }
  #battle .watch-bar { bottom: 6px; font-size: 11px; padding: 4px 10px; }
  /* the result screen fits the short screen (scrolls if it must) */
  #battle .rs { max-height: 96vh; padding: 10px 16px 14px; }
  #battle .rs-vs { flex-direction: row; }
  #battle .rs-portrait { width: 64px; height: 64px; border-width: 3px; }
  #battle .rs-score b { font-size: 38px; }
  #battle .rs-ribbon { padding: 0 44px 4px; }
  #battle .rs-ribbon span { font-size: 34px; }
  #battle .rs-vs { margin-top: 6px; }
  #battle .rs-blader { width: 34%; }
  #battle .rs-name { font-size: 14px; }
  #battle .rs-score { width: auto; }
  #battle .rs-rounds { margin-top: 8px; gap: 6px; }
  #battle .rs-round { width: 108px; padding: 4px; }
  #battle .rs-round b { font-size: 12px; }
  #battle .rs-chips, #battle .rs-level, #battle .rs-buttons { margin-top: 8px; }
}

/* ---- the RipCores Android app (client/js/app-shell.js): a game, not a web page ---- */
html.android-app, html.android-app body { overscroll-behavior: none; } /* no pull-to-refresh, no bounce */
html.android-app body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
html.android-app input, html.android-app textarea, html.android-app select, html.android-app [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html.android-app img { -webkit-user-drag: none; }
