[hidden] { display: none !important; }
:root {
  --sky: oklch(0.72 0.12 258); --sky2: oklch(0.80 0.09 250); --ink: oklch(0.19 0.05 285); --cream: oklch(0.95 0.035 92);
  --cream2: oklch(0.89 0.05 88); --grass: oklch(0.70 0.18 142); --grass2: oklch(0.56 0.16 145); --brick: oklch(0.56 0.15 40);
  --brick2: oklch(0.45 0.13 38); --gold: oklch(0.84 0.16 86); --gold2: oklch(0.70 0.15 75); --red: oklch(0.56 0.21 27);
  --elixir: oklch(0.60 0.24 332); --shade: oklch(0.42 0.06 270); --px: 3px;
  --navy: oklch(0.30 0.10 266); --navy2: oklch(0.23 0.08 268); --navy-hi: oklch(0.40 0.11 264); --on-navy: oklch(0.84 0.05 258);
  --notch: polygon(0 var(--px), var(--px) var(--px), var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px), 100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)));
  --step: steps(4, end);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* the site stands on land: a pixel meadow with dirt roads, where the characters scrap in the fields */
body { margin: 0; font-family: 'Pixelify Sans', system-ui, sans-serif; font-size: 17px; line-height: 1.45; color: var(--ink); overflow-x: hidden;
  background: oklch(0.67 0.13 138) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' shape-rendering='crispEdges'%3E%3Cpath fill='%23478a37' d='M10 14h2v4h-2zM13 11h2v7h-2zM16 15h2v3h-2zM60 70h2v4h-2zM63 67h2v7h-2zM66 71h2v3h-2zM80 20h2v3h-2zM83 18h2v5h-2zM22 60h2v3h-2zM25 58h2v5h-2z'/%3E%3Cpath fill='%2388c96a' d='M40 40h3v2h-3zM20 80h3v2h-3zM86 52h3v2h-3zM6 36h2v2H6z'/%3E%3Cpath fill='%23fbf7ea' d='M32 22h2v2h-2zM30 24h2v2h-2zM34 24h2v2h-2zM32 26h2v2h-2z'/%3E%3Cpath fill='%23f5c542' d='M32 24h2v2h-2zM86 84h2v2h-2z'/%3E%3Cpath fill='%23f290b4' d='M72 44h2v2h-2zM70 46h2v2h-2zM74 46h2v2h-2zM72 48h2v2h-2z'/%3E%3Cpath fill='%23857f90' d='M50 88h5v3h-5z'/%3E%3Cpath fill='%23c2bdcc' d='M51 88h2v1h-2z'/%3E%3C/svg%3E") 0 0 / 192px 192px; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; image-rendering: pixelated;
  background: var(--land, none) 0 0 / var(--land-size, 100% 100%) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M-5 30C20 26 30 48 52 46S82 20 105 24' stroke='%237a5a34' stroke-width='46' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M-5 30C20 26 30 48 52 46S82 20 105 24' stroke='%23c9a468' stroke-width='36' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M30 105C34 80 12 70 18 52' stroke='%237a5a34' stroke-width='34' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M30 105C34 80 12 70 18 52' stroke='%23c9a468' stroke-width='26' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M78 105C74 84 94 72 88 60' stroke='%237a5a34' stroke-width='34' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M78 105C74 84 94 72 88 60' stroke='%23c9a468' stroke-width='26' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat,
    radial-gradient(40% 30% at 15% 70%, oklch(0.60 0.12 140 / 0.55), transparent 70%),
    radial-gradient(35% 28% at 85% 12%, oklch(0.74 0.12 130 / 0.5), transparent 70%); }
/* the second land layer: the next arena map fades in over the first in pixel steps, every 5 seconds (held during a match) */
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; image-rendering: pixelated;
  background: var(--land-b, none) 0 0 / var(--land-size, 100% 100%) no-repeat; opacity: 0; transition: opacity 900ms steps(6, end); }
body.land-b::after { opacity: 1; }
.fights { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fight { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: flex-end; }
.fight::before { content: ''; position: absolute; left: -12px; right: -12px; bottom: -10px; height: 20px; background: oklch(0.63 0.07 72); border: 3px solid oklch(0.45 0.06 62); z-index: -1; clip-path: var(--notch); }
.fight .spr { width: 64px; height: 64px; filter: drop-shadow(0 4px 0 rgba(30, 22, 51, 0.35)); }
.fight .fb .spr { transform: scaleX(-1); }
.fight .fa { animation: jabA 1.8s steps(1) infinite; } .fight .fb { animation: jabB 1.8s steps(1) infinite; }
.pow { align-self: center; width: 0; position: relative; left: -22px; top: -26px; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 13px; color: var(--gold); text-shadow: 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); opacity: 0; animation: pow 1.8s steps(1) infinite; white-space: nowrap; }
.fight.f1 * { animation-delay: -0.5s; } .fight.f2 * { animation-delay: -1.1s; animation-duration: 2.2s; } .fight.f3 * { animation-delay: -0.3s; animation-duration: 1.5s; }
.fight.f4 * { animation-delay: -0.8s; } .fight.f5 * { animation-delay: -1.4s; animation-duration: 2s; } .fight.f6 * { animation-delay: -0.2s; animation-duration: 1.6s; }
@keyframes jabA { 0% { transform: none; } 10% { transform: translateX(14px); } 20% { transform: none; } 50% { transform: translate(-8px, -3px) rotate(-10deg); } 60% { transform: none; } 80% { transform: translateY(-8px); } 88% { transform: none; } }
@keyframes jabB { 0% { transform: none; } 10% { transform: translate(8px, -3px) rotate(10deg); } 22% { transform: none; } 50% { transform: translateX(-14px); } 60% { transform: none; } }
@keyframes pow { 0% { opacity: 0; } 10% { opacity: 1; transform: scale(1.3); } 18% { opacity: 1; transform: none; } 22% { opacity: 0; } 50% { opacity: 1; transform: translateX(-10px) scale(1.2); } 58% { opacity: 0; } }
body.playing .fights { display: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ink); }
h1, h2, h3, .disp { font-family: 'Silkscreen', monospace; font-weight: 700; line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: 0.01em; }
.num, .w-num b, .m-timer b, .gem, dd, td.n { font-variant-numeric: tabular-nums; }
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }

/* blocks and buttons */
.block { background: var(--cream); border: var(--px) solid var(--ink); clip-path: var(--notch); box-shadow: inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 var(--cream2), inset var(--px) var(--px) 0 oklch(0.99 0.01 92); }
.btn { font-family: 'Silkscreen', monospace; font-size: 14px; border: var(--px) solid var(--ink); background: var(--brick); color: var(--cream); padding: 8px 14px; clip-path: var(--notch);
  box-shadow: inset -3px -3px 0 var(--brick2), inset 3px 3px 0 oklch(0.68 0.13 45); min-height: 40px; transition: transform 80ms var(--step); }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: inset 3px 3px 0 var(--brick2); }
.btn.ghost { background: var(--cream); color: var(--ink); box-shadow: inset -3px -3px 0 var(--cream2), inset 3px 3px 0 oklch(0.99 0.01 92); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: inset -4px -4px 0 var(--gold2), inset 4px 4px 0 oklch(0.94 0.1 95); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; text-align: left; text-decoration: underline; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-family: 'Silkscreen', monospace; font-size: 13px; background: var(--cream); border: var(--px) solid var(--ink); clip-path: var(--notch); padding: 6px 10px; min-height: 40px; white-space: nowrap; }
.chip .up { color: oklch(0.45 0.16 145); } .chip .down { color: var(--red); }
.gem { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 14px; color: #fff8fb; background: var(--elixir); border: 2px solid var(--ink); clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%); }
.spr { display: block; image-rendering: pixelated; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 30; background: var(--ink); color: var(--cream); font: 13px/1.3 'Pixelify Sans', sans-serif; padding: 6px 8px; width: max-content; max-width: 220px; white-space: normal; pointer-events: none; }

/* HUD header */
.hud { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px clamp(12px, 2vw, 28px); background: var(--ink); color: var(--cream); border-bottom: 4px solid var(--brick2); }
.mark { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 12px; line-height: 1.05; }
.score { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; text-decoration: none; min-width: 210px; }
.w-badge { grid-row: span 2; align-self: center; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 13px; background: var(--gold); color: var(--ink); padding: 6px 7px; border: 2px solid var(--cream); }
.w-num b { font-family: 'Silkscreen', monospace; font-size: 22px; color: var(--gold); letter-spacing: 0.04em; }
.w-num i { font-style: normal; font-family: 'Silkscreen', monospace; font-size: 12px; margin-left: 4px; }
.w-bar { height: 6px; background: oklch(0.32 0.05 285); border: 1px solid var(--cream); }
.w-bar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); transition: transform 400ms var(--step); }
.shell { position: relative; z-index: 1; }
.dz { position: fixed; bottom: 10px; z-index: 0; display: flex; gap: 6px; align-items: flex-end; pointer-events: none; }
.dz.l { left: 14px; } .dz.r { right: 14px; }
.dancer { display: block; animation: dance 0.9s linear infinite; filter: drop-shadow(0 4px 0 rgba(30, 22, 51, 0.25)); }
.dancer .spr { width: 56px; height: 56px; }
.dancer.d1 { animation-delay: -0.3s; } .dancer.d2 { animation-delay: -0.6s; } .dancer.d3 { animation-delay: -0.15s; animation-duration: 0.7s; } .dancer.d4 { animation-delay: -0.45s; animation-duration: 1.1s; }
@keyframes dance { 0%, 24% { transform: translateY(0); } 25%, 49% { transform: translateY(-12px) scaleX(-1); } 50%, 74% { transform: translateY(0) scaleX(-1); } 75%, 100% { transform: translateY(-6px); } }
.rightcol { display: grid; gap: 14px; align-content: start; min-width: 0; }
.lobby > .botcard { min-width: 0; }
.rankpanel, .m-box { padding: 14px 16px; display: grid; gap: 6px; }
.rankpanel b, .m-box b { font-family: 'Silkscreen', monospace; font-size: 15px; }
.m-box { background: var(--cream); border: 3px solid var(--ink); max-width: 280px; }
.rank-sub { color: var(--shade); font-size: 14px; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ranks li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 3px 6px; border-bottom: 2px dotted var(--cream2); font-size: 15px; }
.ranks li:nth-child(-n+3) .rk { background: var(--gold); }
.ranks .rk { font-family: 'Silkscreen', monospace; font-size: 12px; text-align: center; border: 2px solid var(--ink); }
.ranks .wn { font-family: 'Silkscreen', monospace; font-size: 14px; }
.ranks li.me { background: oklch(0.9 0.1 90); }
.ranks li.ghost, .table tr.ghost td { color: var(--shade); }
.m-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; max-height: 190px; overflow: hidden; }
.m-log li span { font-family: 'Silkscreen', monospace; font-size: 11px; margin-right: 6px; color: var(--shade); }
.m-log li.bot { color: oklch(0.45 0.18 27); }
.demo-tag { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-family: 'Silkscreen', monospace; font-size: 11px; background: var(--ink); color: var(--cream); padding: 2px 8px; white-space: nowrap; }
.hstat { font-family: 'Silkscreen', monospace; font-size: 9px; color: var(--shade); position: relative; }
.m-mul-s, .m-quit-s, .sticky-battle { display: none; }
.m-you > * { width: 280px; max-width: 280px; }
.m-you .m-actions .btn { flex: 1; }
.qrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qblock { width: 40px; height: 40px; display: grid; place-items: center; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 22px; color: var(--cream); background: var(--gold2); border: 3px solid var(--ink); box-shadow: inset -4px -4px 0 oklch(0.58 0.14 70), inset 4px 4px 0 var(--gold); text-shadow: 2px 2px 0 var(--ink); animation: qbump 2.4s steps(1) infinite; }
.qblock:nth-child(2) { animation-delay: 0.6s; } .qblock:nth-child(3) { animation-delay: 1.2s; } .qblock:nth-child(4) { animation-delay: 1.8s; }
@keyframes qbump { 0% { transform: translateY(-4px); } 8% { transform: none; } }
.slot small { font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--shade); }
.tray { max-width: 520px; }
.tray .slot { aspect-ratio: auto; min-width: 0; min-height: 124px; }
.m-botlist { list-style: none; margin: 0; padding: 8px 12px; background: var(--cream); border: 3px solid var(--ink); min-width: 220px; display: grid; gap: 3px; font-size: 14px; }
.m-botlist li { display: flex; justify-content: space-between; gap: 10px; }
.m-botlist span { font-family: 'Silkscreen', monospace; font-size: 11px; }
.m-you { align-items: flex-start; }
.m-you .m-plate { max-width: 280px; width: 100%; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a, .tabs button { display: flex; align-items: center; gap: 6px; font-family: 'Silkscreen', monospace; font-size: 13px; text-decoration: none; padding: 8px 10px; background: none; border: 0; color: var(--cream); }
.tabs svg { width: 16px; height: 16px; fill: currentColor; shape-rendering: crispEdges; }
.tabs a[aria-current] { background: var(--gold); color: var(--ink); }
.hud-right { display: flex; gap: 8px; align-items: center; min-width: 0; max-width: 100%; }
.chip.coin { max-width: min(52vw, 360px); min-width: 0; overflow: hidden; }
.hud .chip { color: var(--ink); }
.walletbox { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--cream); color: var(--ink); border: 3px solid var(--ink); display: grid; min-width: 170px; z-index: 40; }
.menu button { background: none; border: 0; text-align: left; padding: 10px 12px; font-family: 'Silkscreen', monospace; font-size: 13px; }
.menu button:hover, .menu button:focus-visible { background: var(--gold); }

/* lobby */
.lobby { display: grid; grid-template-columns: minmax(250px, 1fr) auto minmax(300px, 1.1fr); gap: clamp(14px, 2vw, 32px); padding: 18px clamp(12px, 2vw, 32px) 28px; align-items: start; max-width: 1800px; margin: 0 auto; }
.arena-box { height: min(calc(100dvh - 130px), 720px); min-height: 420px; aspect-ratio: 9 / 16; display: grid; place-items: center; position: relative; }
.arena-frame { padding: 8px; background: var(--brick); border: 3px solid var(--ink); box-shadow: inset -4px -4px 0 var(--brick2), inset 4px 4px 0 oklch(0.68 0.13 45); line-height: 0; }
.arena-frame canvas { image-rendering: pixelated; display: block; }
.botcard { padding: 16px; display: grid; gap: 12px; }
.botcard h2 { font-size: 26px; }
.plate { display: inline-flex; gap: 8px; align-items: center; font-family: 'Silkscreen', monospace; font-size: 13px; background: var(--red); color: var(--cream); padding: 4px 8px; border: 2px solid var(--ink); width: max-content; }
.mults { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 0; }
.mults div { display: flex; justify-content: space-between; border-bottom: 2px dotted var(--shade); padding: 3px 0; }
.mults dt { color: var(--shade); } .mults dd { margin: 0; font-family: 'Silkscreen', monospace; font-weight: 700; }
.curve { width: 100%; height: 70px; display: block; }
.side-note { color: var(--shade); font-size: 15px; margin: 0; }
.deckpanel { padding: 16px; display: grid; gap: 14px; }
.deckpanel h2 { font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; }
.deckpanel h2 small { font-family: 'Pixelify Sans'; font-weight: 500; font-size: 15px; color: var(--shade); }
.tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { aspect-ratio: 3 / 4; border: 3px dashed var(--shade); display: grid; place-items: center; align-content: center; gap: 4px; padding: 6px 4px; background: oklch(0.91 0.04 90); font-size: 13px; text-align: center; position: relative; }
.slot.full { border-style: solid; border-color: var(--ink); background: var(--sky2); }
.slot .gem { position: absolute; top: -8px; left: -8px; }
.slot b { font-family: 'Silkscreen', monospace; font-size: 11px; line-height: 1.1; }
.avg { display: flex; justify-content: space-between; font-size: 15px; color: var(--shade); }
.battle { font-family: 'Silkscreen', monospace; font-weight: 700; font-size: clamp(28px, 3vw, 40px); padding: 18px 20px; width: 100%; background: var(--gold); color: var(--ink); border: 4px solid var(--ink); clip-path: var(--notch); box-shadow: inset -6px -6px 0 var(--gold2), inset 6px 6px 0 oklch(0.94 0.1 95); position: relative; }
.battle small { display: block; font-family: 'Pixelify Sans'; font-weight: 500; font-size: 15px; margin-top: 4px; }
.battle:active { transform: translateY(3px); box-shadow: inset 6px 6px 0 var(--gold2); }
.battle[disabled] { filter: grayscale(0.7); cursor: not-allowed; }
.rule { font-size: 16px; margin: 0; }

/* sections */
.band { padding: clamp(40px, 6vw, 80px) clamp(14px, 3vw, 40px); }
.band > .in { max-width: 1400px; margin: 0 auto; }
.band h2 { font-size: clamp(26px, 3.2vw, 44px); margin-bottom: 8px; }
.band .lede { max-width: 60ch; margin: 0 0 28px; font-size: 18px; }
.band.brick { background: var(--brick) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' fill-opacity='.25' d='M0 0h32v2H0zM0 8h32v2H0zM14 2h2v6h-2zM30 10h2v6h-2z'/%3E%3C/svg%3E"); color: var(--cream); }
.band.grass { background: var(--grass2); color: var(--cream); }
.band.dark { background: var(--ink); color: var(--cream); }
.booklet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { text-align: left; padding: 14px; display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; position: relative; color: var(--ink); }
.card[aria-pressed="true"] { background: oklch(0.9 0.1 90); outline: 4px solid var(--gold); outline-offset: -8px; }
.card .spr { grid-row: span 2; width: 64px; height: 64px; background: var(--sky2); border: 3px solid var(--ink); padding: 4px; }
.card h3 { font-size: 16px; display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.card .tag { font-size: 14px; color: var(--shade); }
.card .bars { grid-column: 1 / -1; display: grid; gap: 4px; margin: 4px 0; font-size: 14px; }
.card .bars div { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; align-items: center; }
.card .bars span:last-child { text-align: right; font-family: 'Silkscreen', monospace; font-size: 12px; }
.meter { height: 8px; background: oklch(0.85 0.03 90); border: 2px solid var(--ink); }
.meter i { display: block; height: 100%; background: var(--grass2); }
.meter.dmg i { background: var(--red); }
/* a stat that is a rule rather than a number: it spans the bar and number columns on one line */
div.txt > b { grid-column: 2 / -1; text-align: left; font: 700 12px/1.3 'Silkscreen', monospace; color: var(--gold); letter-spacing: 0.02em; }
.card .ab { grid-column: 1 / -1; font-size: 15px; margin: 0; font-weight: 600; }
.card .fl { grid-column: 1 / -1; font-size: 14px; margin: 0; color: var(--shade); }
.card .in-deck { position: absolute; top: 10px; right: 12px; font-family: 'Silkscreen', monospace; font-size: 11px; background: var(--ink); color: var(--gold); padding: 2px 5px; }

/* road */
.road { overflow-x: auto; padding-bottom: 8px; }
.road svg { display: block; width: 100%; min-width: 760px; height: auto; }
.road text { font-family: 'Silkscreen', monospace; }
.flag { cursor: pointer; }
.road-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; }

/* money */
.pipes { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr 1fr; gap: 16px; align-items: stretch; }
.vault { padding: 16px; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.vault h3 { font-size: 17px; }
.vault .big { font-family: 'Silkscreen', monospace; font-size: 30px; font-weight: 700; }
.vault ul { list-style: none; margin: 0; padding: 0; font-size: 15px; display: grid; gap: 4px; }
.vault li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px dotted var(--cream2); padding-bottom: 3px; }
.vault .empty { color: var(--shade); }
.pct { font-family: 'Silkscreen', monospace; font-size: 13px; background: var(--ink); color: var(--gold); padding: 2px 6px; width: max-content; }
.pipe-h { height: 14px; background: var(--grass); border: 3px solid var(--ink); margin: 4px 0; }

/* how to */
.pages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.page { padding: 16px; color: var(--ink); }
.page h3 { font-size: 17px; margin-bottom: 8px; }
.page p { margin: 0 0 6px; font-size: 16px; }
.page svg { display: block; width: 100%; height: 90px; margin-bottom: 10px; background: var(--sky2); border: 3px solid var(--ink); }

/* ladder */
.ladder-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 24px clamp(12px, 3vw, 40px) 40px; max-width: 1500px; margin: 0 auto; width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th { position: sticky; top: 0; background: var(--ink); color: var(--cream); font-family: 'Silkscreen', monospace; font-size: 12px; text-align: left; padding: 8px; }
.table td { padding: 8px; border-bottom: 2px dotted var(--cream2); }
.table td.n, .table th.n { text-align: right; }
.table tr.me td { background: oklch(0.9 0.1 90); }
.prog { width: 90px; height: 8px; background: oklch(0.85 0.03 90); border: 2px solid var(--ink); display: inline-block; vertical-align: middle; }
.prog i { display: block; height: 100%; background: var(--gold2); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.feed li { display: flex; justify-content: space-between; gap: 8px; }
.res { font-family: 'Silkscreen', monospace; font-size: 12px; padding: 1px 5px; border: 2px solid var(--ink); }
.res.w { background: var(--gold); } .res.l { background: var(--red); color: var(--cream); } .res.d { background: var(--cream2); }
.xname { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; color: inherit; text-decoration: none; vertical-align: middle; }
.xname b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.xname small { font-size: 13px; color: var(--shade); white-space: nowrap; }
.xname:hover b, .xname:focus-visible b { background: var(--gold); color: var(--ink); }
.xi { flex: none; image-rendering: pixelated; }
.band.dark .xname small, .foot .xname small { color: var(--cream2); }
.ranks .wl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ranks .wl .xname { flex: 0 1 auto; }
.xbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--sky2); border: 2px solid var(--ink); padding: 8px 10px; font-size: 15px; }
.xbox.linked { background: oklch(0.9 0.1 90); }
.xbox .btn { display: inline-flex; align-items: center; gap: 6px; }
.wallet .xi { margin-right: 2px; }
.pname b { text-decoration: none; }
.namebox { display: grid; gap: 6px; background: var(--cream2); border: 2px solid var(--ink); padding: 8px 10px; }
.namebox label { font-family: 'Silkscreen', monospace; font-size: 12px; }
.nb-row { display: flex; gap: 6px; }
.namebox input { flex: 1; min-width: 0; min-height: 36px; font: 600 16px 'Pixelify Sans', sans-serif; color: var(--ink); background: oklch(0.98 0.015 92); border: 3px solid var(--ink); padding: 4px 8px; box-shadow: inset 3px 3px 0 var(--cream2); border-radius: 0; }
.namebox input::placeholder { color: oklch(0.5 0.05 280); }
.namebox input:focus-visible { outline: 3px solid var(--gold); outline-offset: 0; box-shadow: inset 3px 3px 0 var(--cream2); }
.nb-err { margin: 0; color: var(--red); font-size: 14px; font-weight: 600; }
.nb-err:empty { display: none; }
.nb-hint { font-size: 13px; color: var(--shade); }
.namebox .copy { justify-self: start; }
.copy { background: none; border: 0; padding: 2px 4px; font-family: 'Silkscreen', monospace; font-size: 11px; text-decoration: underline; }

/* match */
body.playing .foot { display: none; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; height: calc(100dvh - 68px); padding: 10px 16px; }
.m-side { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; min-width: 0; }
.m-bot { align-items: flex-end; text-align: right; }
.m-plate { font-family: 'Silkscreen', monospace; font-size: 14px; background: var(--ink); color: var(--cream); padding: 6px 10px; display: flex; gap: 8px; align-items: center; }
.m-plate.bot { background: var(--red); }
.m-lv { background: var(--cream); color: var(--ink); padding: 0 5px; }
.m-mults { margin: 0; display: grid; gap: 4px; background: var(--cream); border: 3px solid var(--ink); padding: 8px 12px; min-width: 220px; }
.m-mults div { display: flex; justify-content: space-between; gap: 12px; }
.m-mults dt { color: var(--shade); font-size: 15px; } .m-mults dd { margin: 0; font-family: 'Silkscreen', monospace; font-size: 14px; }
.m-botdeck { display: flex; gap: 6px; }
.mini { position: relative; background: var(--cream); border: 3px solid var(--ink); padding: 3px; }
.mini i { position: absolute; bottom: -6px; right: -6px; font-style: normal; font-family: 'Silkscreen', monospace; font-size: 11px; background: var(--elixir); color: #fff8fb; padding: 0 4px; border: 2px solid var(--ink); }
.m-center { display: flex; flex-direction: column; min-height: 0; width: min(100vw, 520px); }
.m-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--ink); color: var(--cream); padding: 6px 10px; border: 3px solid var(--ink); }
.m-crowns { display: flex; gap: 8px; align-items: center; font-family: 'Silkscreen', monospace; font-size: 12px; }
.m-crowns b { font-size: 22px; min-width: 32px; text-align: center; padding: 0 6px; border: 2px solid var(--cream); }
.m-crowns.bot b { background: var(--red); } .m-crowns.you { justify-content: flex-end; } .m-crowns.you b { background: var(--gold); color: var(--ink); }
.m-timer { text-align: center; display: grid; }
.m-timer b { font-family: 'Silkscreen', monospace; font-size: 30px; color: var(--cream); }
.m-timer b.low { color: var(--gold); animation: blink 1s steps(2) infinite; }
.m-timer span { font-family: 'Silkscreen', monospace; font-size: 11px; color: var(--elixir); background: var(--cream); padding: 0 4px; }
@keyframes blink { 50% { opacity: 0.4; } }
body { font-variant-ligatures: none; }
.troll-peek { position: fixed; right: 12px; bottom: 0; z-index: 16; width: 64px; height: 44px; overflow: hidden; padding: 0; background: none; border: 0; }
.troll-peek .spr { width: 64px; height: 64px; transform: translateY(12px) rotate(-10deg); transition: transform 160ms var(--step); }
.troll-peek:hover .spr, .troll-peek:focus-visible .spr { transform: translateY(2px) rotate(-4deg); }
.secret-stage { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
body.playing .troll-peek, body:has(.deckscreen.open) .troll-peek { display: none; }
@media (max-width: 760px) { .troll-peek { bottom: 64px; right: 4px; } body:has(.sticky-battle) .troll-peek { bottom: 128px; } }
.m-timer span.ot { background: var(--red); color: var(--cream); }
.m-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; background: var(--grass2); border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); touch-action: none; }
.m-stage canvas { image-rendering: pixelated; cursor: crosshair; }
[data-mute][aria-pressed="false"] .wave { display: none; }
.m-banner { position: absolute; top: 27%; left: 0; right: 0; text-align: center; font-family: 'Silkscreen', monospace; font-weight: 700; font-size: 34px; color: var(--gold); text-shadow: 3px 3px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink); pointer-events: none; opacity: 0; }
.m-banner.show { animation: bann 1.4s steps(7) forwards; }
@keyframes bann { 0% { opacity: 0; transform: scale(2); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.m-hud { background: var(--brick); border: 3px solid var(--ink); padding: 8px; display: grid; gap: 8px; }
.m-detail { background: var(--cream); border: 2px solid var(--ink); padding: 6px 8px; font-size: 14px; min-height: 32px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.m-detail b { font-family: 'Silkscreen', monospace; font-size: 13px; }
.m-detail.warn { animation: warn 0.4s steps(4); background: oklch(0.88 0.08 30); }
@keyframes warn { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.m-hand { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hcard { position: relative; background: var(--sky2); border: 3px solid var(--ink); padding: 6px 2px 4px; display: grid; justify-items: center; gap: 2px; min-height: 84px; }
.hcard.on { background: var(--gold); transform: translateY(-6px); }
.hcard.dim .spr { filter: grayscale(1) brightness(0.8); }
.hfill { position: absolute; inset: 0; background: rgba(30, 22, 51, 0.45); transform-origin: top; transform: scaleY(0); pointer-events: none; }
.hname { font-family: 'Silkscreen', monospace; font-size: 10px; line-height: 1.1; text-align: center; position: relative; }
.hcard .gem { position: absolute; top: 2px; left: 2px; min-width: 22px; height: 22px; font-size: 12px; }
.hcard kbd { position: absolute; top: 2px; right: 4px; font-family: 'Silkscreen', monospace; font-size: 10px; opacity: 0.7; }
.m-elixir { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; color: var(--cream); font-family: 'Silkscreen', monospace; font-size: 11px; }
.m-elixir b { font-size: 22px; background: var(--elixir); border: 2px solid var(--ink); min-width: 38px; text-align: center; color: #fff8fb; }
.m-elixir .bar { position: relative; height: 18px; background: oklch(0.3 0.06 330); border: 3px solid var(--ink); display: grid; grid-template-columns: repeat(10, 1fr); }
.m-elixir .bar i { position: absolute; inset: 0; background: var(--elixir); transform-origin: left; transform: scaleX(0.5); }
.m-elixir .bar s { position: relative; border-right: 2px solid var(--ink); }
.m-rule { background: var(--cream); border: 3px solid var(--ink); padding: 10px 12px; margin: 0; font-size: 15px; max-width: 280px; }
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30, 22, 51, 0.55); z-index: 5; padding: 12px; }
.result .block { padding: 20px; text-align: center; display: grid; gap: 10px; width: min(92%, 340px); }
.result h2 { font-size: 40px; }
.result h2.w { color: oklch(0.5 0.16 80); } .result h2.l { color: var(--red); }
.result .acts { display: grid; gap: 8px; }
.stamp { font-family: 'Silkscreen', monospace; font-size: 13px; padding: 4px 8px; border: 2px dashed var(--ink); }

/* sheet, toast, footer */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(30, 22, 51, 0.6); display: grid; place-items: center; padding: 16px; }
.sheet { background: var(--cream); border: 4px solid var(--ink); max-width: 560px; width: 100%; max-height: 88dvh; overflow: auto; padding: 20px; animation: pop 200ms steps(4); }
@keyframes pop { from { transform: translateY(24px); opacity: 0; } }
.sheet h2 { font-size: 22px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.sheet dt { color: var(--shade); font-size: 14px; } .sheet dd { margin: 0; font-family: 'Silkscreen', monospace; font-size: 16px; }
.ca { display: flex; gap: 8px; align-items: center; background: oklch(0.9 0.04 90); border: 2px solid var(--ink); padding: 6px 8px; font-size: 14px; word-break: break-all; margin-bottom: 12px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--cream); border: 3px solid var(--gold); padding: 10px 14px; max-width: min(92vw, 440px); font-size: 15px; }
.toast a { color: var(--gold); }
.foot { background: var(--ink); color: var(--cream); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 20px; padding: 28px clamp(14px, 3vw, 40px); max-width: 1400px; margin: 0 auto; }
.foot-grid > div { display: grid; gap: 4px; align-content: start; min-width: 0; font-size: 15px; }
.foot-grid b { font-family: 'Silkscreen', monospace; font-size: 13px; color: var(--gold); }
.foot-grid p { margin: 0; }
.foot-grid span { overflow-wrap: anywhere; }
.ground { height: 28px; background: var(--brick) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' fill-opacity='.3' d='M0 0h32v2H0zM0 8h32v2H0zM14 2h2v6h-2zM30 10h2v6h-2z'/%3E%3C/svg%3E"); border-top: 4px solid var(--grass); }
.skel { background: repeating-linear-gradient(90deg, var(--cream2) 0 8px, var(--cream) 8px 16px); min-height: 18px; }

/* deck of 6, ranks, seasons */
.tray { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: none; gap: 6px; }
.gem { font-weight: 400; }
.tray .slot { min-height: 104px; padding: 8px 2px 4px; }
.tray .slot b { font-size: 10px; }
.slot.swap { background: var(--gold); animation: qbump 1.2s steps(1) infinite; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 12px; text-decoration: none; }
.firstrun { background: var(--sky2); border: 2px solid var(--ink); padding: 8px 10px; font-size: 15px; }
.tier { display: inline-block; font-family: 'Silkscreen', monospace; font-size: 10px; line-height: 1; padding: 3px 5px; background: var(--tc); color: var(--ink); border: 2px solid var(--ink); vertical-align: middle; }
.tiers { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 14px; }
.drops { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.drop { color: var(--ink); text-decoration: none; padding: 12px; display: grid; gap: 6px; align-content: start; transition: transform 120ms var(--step); }
.drop:hover { transform: translateY(-4px); }
.drop img { width: 100%; height: auto; image-rendering: pixelated; border: 3px solid var(--ink); display: block; }
.drop b { font-family: 'Silkscreen', monospace; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.drop small { font-size: 14px; color: var(--shade); }
.drop.locked { background: oklch(0.86 0.03 280); }
.lockart { aspect-ratio: 1; display: grid; place-items: center; font-family: 'Silkscreen', monospace; font-size: 64px; color: var(--cream); background: repeating-linear-gradient(45deg, var(--shade) 0 8px, oklch(0.36 0.06 270) 8px 16px); border: 3px solid var(--ink); text-shadow: 4px 4px 0 var(--ink); }
.newtag { position: absolute; top: -8px; right: -6px; font-family: 'Silkscreen', monospace; font-size: 10px; background: var(--red); color: var(--cream); border: 2px solid var(--ink); padding: 1px 4px; z-index: 1; }
.deckscreen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 20px; padding: 20px clamp(12px, 2.5vw, 36px) 40px; max-width: 1600px; margin: 0 auto; align-items: start; }
.dk-main { display: grid; gap: 16px; min-width: 0; }
.dk-deck, .dk-coll { padding: 16px; display: grid; gap: 12px; }
.dk-deck h2, .dk-coll h2 { font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dk-deck h2 small, .dk-coll h2 small { font-family: 'Pixelify Sans'; font-weight: 500; font-size: 15px; color: var(--shade); }
.dk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.dk-tile { position: relative; display: grid; justify-items: center; gap: 3px; padding: 12px 4px 8px; background: var(--sky2); border: 3px solid var(--ink); min-width: 0; transition: transform 100ms var(--step); }
.dk-tile:hover, .dk-tile:focus-visible { transform: translateY(-4px); background: oklch(0.86 0.08 250); }
.dk-tile.in { background: oklch(0.9 0.1 90); }
.dk-tile.in::after { content: 'IN DECK'; position: absolute; bottom: -8px; font-family: 'Silkscreen', monospace; font-size: 9px; background: var(--ink); color: var(--gold); padding: 1px 4px; }
.dk-tile.pin { outline: 4px solid var(--gold); outline-offset: -8px; }
.dk-tile .gem { position: absolute; top: -8px; left: -8px; }
.dk-tile b { font-family: 'Silkscreen', monospace; font-size: 11px; text-align: center; line-height: 1.1; }
.dk-tile small { font-size: 12px; color: var(--shade); text-align: center; }
.dk-detail { padding: 16px; display: grid; gap: 10px; position: sticky; top: 84px; }
.dt-art { position: relative; }
.portrait { display: block; width: 100%; height: auto; image-rendering: pixelated; border: 4px solid var(--ink); background: var(--sky2); }
.gem.big { position: absolute; top: -10px; left: -10px; min-width: 44px; height: 44px; font-size: 22px; }
.dt-art .newtag { top: 8px; right: 8px; font-size: 12px; }
.dk-detail h2 { font-size: 26px; }
.dk-detail .tag { color: var(--shade); }
.dk-detail .bars { display: grid; gap: 5px; font-size: 14px; }
.dk-detail .bars div { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; }
.dk-detail .bars span:last-child { text-align: right; font-family: 'Silkscreen', monospace; font-size: 12px; }
.dk-detail .ab { margin: 0; font-weight: 600; } .dk-detail .fl { margin: 0; color: var(--shade); }
.dt-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .dt-acts .btn:only-child { grid-column: 1 / -1; }
.swapnote { margin: 0; background: var(--gold); border: 2px solid var(--ink); padding: 8px; font-weight: 600; }
.lt-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.lt-pot { display: grid; text-align: right; background: var(--ink); color: var(--cream); padding: 8px 12px; font-size: 13px; }
.lt-pot b { font-family: 'Silkscreen', monospace; font-size: 22px; color: var(--gold); }
.table tr.lead td { background: oklch(0.93 0.07 90); }

/* bigger match: the header steps aside and the arena takes the height */
body.playing .hud { display: none; }
.match { height: 100dvh; padding: 8px 16px; }
.m-center { width: clamp(400px, calc((100dvh - 150px) * 0.5625 + 6px), 820px); }
.m-stage .m-detail { position: absolute; top: 6px; left: 8px; right: 8px; z-index: 3; pointer-events: none; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; min-height: 0; height: 30px; opacity: 0.94; }
.m-hand { grid-template-columns: 58px repeat(4, minmax(0, 1fr)); }
.m-next { display: grid; justify-items: center; align-content: center; gap: 2px; background: oklch(0.4 0.1 38); border: 3px dashed var(--ink); position: relative; color: var(--cream); font-family: 'Silkscreen', monospace; font-size: 9px; }
.m-next .spr { width: 30px; height: 30px; background: var(--sky2); border: 2px solid var(--ink); }
.m-next .gem { min-width: 18px; height: 18px; font-size: 10px; }
.hcard.fresh { animation: deal 260ms var(--step); }
@keyframes deal { from { transform: translateX(-24px) scale(0.6); opacity: 0; } }
.hcard .spr { width: clamp(40px, 5.2dvh, 60px); height: clamp(40px, 5.2dvh, 60px); }
.hcard { min-height: clamp(84px, 10.5dvh, 118px); }
.hcard .hname { font-size: 11px; } .hcard .hstat { font-size: 10px; }
.m-stage .m-detail { transition: opacity 300ms var(--step); }
.m-stage .m-detail.gone { opacity: 0; }
.score { grid-template-rows: auto auto auto; }
.score .w-badge { grid-row: span 3; }
.w-rank { font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--cream2); margin-top: 2px; white-space: nowrap; }
.dk-detail .bars div { grid-template-columns: 96px 1fr 48px; }
.dk-detail .portrait { width: min(100%, calc(100dvh - 620px)); min-width: 200px; margin: 0 auto; }
/* the card panel never runs past the window: its text scrolls inside and the card's action stays pinned at the bottom */
@media (min-width: 901px) {
  .dk-detail { max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; }
  /* the card's action sits right under its stats, so it is always in view; longer text scrolls below it */
  .dk-detail > .dt-art, .dk-detail > h2, .dk-detail > .tag, .dk-detail > .bars { order: -2; }
  .dk-detail > .dt-acts { order: -1; }
  /* a long card (Goku) pushes it past the fold: it then sticks to the panel's bottom edge until you scroll to it */
  .dk-detail > .dt-acts { position: sticky; bottom: -16px; z-index: 2; background: var(--navy); padding: 10px 0 16px; margin-bottom: -6px; box-shadow: 0 -16px 14px -6px var(--navy); }
  /* a fade pinned to the panel's bottom edge says the card's text scrolls on */
  .dk-detail::after { content: ''; order: 99; position: sticky; bottom: -16px; height: 32px; margin: -32px -16px -16px; background: linear-gradient(transparent, var(--navy)); pointer-events: none; }
}
.dt-emo { display: flex; align-items: center; gap: 10px; }
.dt-emo .real { width: 44px; height: auto; flex: none; border: 3px solid var(--ink); image-rendering: pixelated; }
.dt-emo small { display: block; color: var(--gold); font-family: 'Silkscreen', monospace; font-size: 11px; }
.m-hand { grid-template-columns: 72px repeat(4, minmax(0, 1fr)); }
.m-next .spr { width: 44px; height: 44px; }
.m-next .gem { min-width: 24px; height: 24px; font-size: 13px; }
.m-next span:first-child { font-size: 11px; }
body[data-route="/deck"] .dz, body[data-route="/ladder"] .dz { display: none; }

/* wide screens: the hand stands beside the arena so the arena gets the full height */
@media (min-width: 1181px) {
  .m-center { display: grid; grid-template-columns: auto 200px; grid-template-rows: auto minmax(0, 1fr); width: auto; }
  .m-top { grid-column: 1 / -1; }
  .m-stage { width: calc((100dvh - 86px) * 0.5625 + 6px); }
  .m-hud { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .m-hand { grid-template-columns: 1fr; grid-template-rows: 0.8fr repeat(4, 1fr); }
  .m-hand .hcard { min-height: 0; align-content: center; }
  .m-hand .hcard .spr { width: min(64px, 7dvh); height: min(64px, 7dvh); }
  .m-hand .hname { font-size: 12px; } .m-hand .hstat { font-size: 11px; }
  .m-elixir { grid-template-columns: auto 1fr; } .m-elixir > span { display: none; }
}
@media (max-width: 1180px) {
  .deckscreen { grid-template-columns: minmax(0, 1fr) 320px; }
  .desk-only, .m-rankbox { display: none !important; }
  .lobby { grid-template-columns: auto 1fr; }
  .lobby .botcard { grid-column: 1 / -1; order: 3; }
  .pipes { grid-template-columns: 1fr 1fr; }
  .pages { grid-template-columns: 1fr 1fr; }
  .m-bot .m-mults { min-width: 0; }
}
@media (max-width: 900px) {
  .ladder-wrap { grid-template-columns: 1fr; }
  .match { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 70px); padding: 4px; gap: 4px; }
  .m-side.m-you { display: none; }
  .m-bot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 0; order: -1; gap: 4px 6px; }
  .m-mul-s { display: inline; font-size: 10px; } .m-quit-s { display: block; min-height: 32px; padding: 4px 8px; font-size: 11px; }
  .m-plate { flex-wrap: wrap; }
  .m-bot .m-mults, .m-botlist { display: none; }
  .m-plate { font-size: 12px; padding: 4px 8px; }
  .mini .spr { width: 22px; height: 22px; }
  .m-center { width: 100%; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hud { gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  .hud-right { margin-left: auto; }
  .mark span { display: none; }
  .score { min-width: 0; order: 5; flex: 1 1 100%; }
  .w-badge { white-space: nowrap; }
  body.playing .hud { display: none; }
  body.playing .shell { padding-bottom: 0; }
  body.playing .match { height: 100dvh; }
  .dz { display: none; }
  .hcard { min-height: 76px; }
  .w-num b { font-size: 18px; } .w-num i { font-size: 9px; }
  .signin, .chip { min-height: 36px; font-size: 12px; padding: 4px 8px; }
  .chip.coin .chg { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 30; background: var(--ink); border-top: 4px solid var(--brick2); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabs a, .tabs button { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; }
  .shell { padding-bottom: 64px; }
  .lobby { grid-template-columns: 1fr; padding: 10px; gap: 12px; }
  .arena-box { height: min(58dvh, 560px); width: 100%; aspect-ratio: auto; min-height: 0; }
  .demo-tag { bottom: 6px; top: auto; }
  .sticky-battle { display: flex; position: fixed; left: 0; right: 0; bottom: 64px; z-index: 25; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--brick); border-top: 3px solid var(--ink); }
  .sb-deck { display: flex; gap: 4px; }
  .sb-deck .spr { background: var(--sky2); border: 2px solid var(--ink); padding: 2px; width: 34px; height: 34px; }
  .sb-empty { width: 34px; height: 34px; border: 2px dashed var(--cream); }
  .sticky-battle .btn { font-size: 16px; min-height: 44px; flex: 1; max-width: 190px; }
  body:has(.sticky-battle) .shell { padding-bottom: 128px; }
  body:has(.sticky-battle) .toast { bottom: 140px; }
  .lobby .deckpanel { order: 2; } .lobby .botcard { order: 3; }
  .pipes, .pages { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .mults { grid-template-columns: 1fr; }
  .table .hide-s { display: none; }
  .toast { bottom: 80px; }
}
@media (max-width: 900px) {
  .match { height: 100dvh; }
  .deckscreen { grid-template-columns: 1fr; padding: 12px 10px 24px; }
  .dk-detail { position: static; }
  .deckscreen.has-card .dk-detail { order: -1; }
  .dk-detail .portrait { width: 100%; }
  .dk-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .m-hand { grid-template-columns: 46px repeat(4, minmax(0, 1fr)); gap: 4px; }
  .m-next .spr { width: 24px; height: 24px; }
  .hcard .spr { width: 36px; height: 36px; }
}
@media (max-width: 760px) {
  .tray { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sb-deck .spr { width: 26px; height: 26px; padding: 1px; }
  .sticky-battle .btn { max-width: 150px; font-size: 14px; }
  .tabs a, .tabs button { padding: 6px 4px; font-size: 10px; }
  .drops { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dk-tile small { display: none; }
  .dk-row { display: grid; } .dk-row .btn { width: 100%; min-height: 48px; }
  .w-rank { font-size: 9px; }
}
/* scoreboard on the left of the arena: bot on top, the clock, you and your emotes at the bottom */
.m-center { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; width: clamp(470px, calc((100dvh - 150px) * 0.5625 + 78px), 900px); }
.m-top { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 10px; padding: 10px 6px; position: relative; border-right: 0; }
.m-stage { grid-row: 1; grid-column: 2; }
.m-hud { grid-row: 2; grid-column: 1 / -1; }
.m-crowns { flex-direction: column; gap: 4px; text-align: center; }
.m-crowns.you { justify-content: flex-start; }
.m-crowns b { font-size: 24px; padding: 2px 0; }
.m-timer { margin: auto 0; gap: 4px; }
.m-timer b { font-size: 22px; }
.m-timer span { font-size: 9px; line-height: 1.2; padding: 2px; }
.m-emo-btn { display: grid; justify-items: center; gap: 2px; background: var(--gold); color: var(--ink); border: 3px solid var(--cream); padding: 6px 2px; font-family: 'Silkscreen', monospace; font-size: 10px; min-height: 56px; }
.m-emo-btn[aria-expanded="true"] { background: var(--cream); }
.m-emos { position: absolute; left: calc(100% + 6px); bottom: 8px; z-index: 10; display: grid; grid-template-columns: repeat(2, 132px); gap: 6px; padding: 8px; background: var(--ink); border: 3px solid var(--cream); }
.m-emos button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 4px; background: var(--cream); border: 3px solid var(--ink); font-family: 'Silkscreen', monospace; font-size: 10px; line-height: 1.1; min-height: 76px; }
.m-emos button:hover, .m-emos button:focus-visible { background: var(--gold); }
.m-emos i { position: absolute; top: 2px; right: 4px; font-style: normal; color: var(--elixir); }
@media (min-width: 1181px) {
  .m-center { grid-template-columns: 112px auto 200px; grid-template-rows: minmax(0, 1fr); width: auto; }
  .m-top { grid-column: 1; grid-row: 1; padding: 14px 10px; }
  .m-stage { grid-column: 2; grid-row: 1; width: calc((100dvh - 22px) * 0.5625 + 6px); }
  .m-hud { grid-column: 3; grid-row: 1; }
  .m-timer b { font-size: 27px; }
  .m-crowns { font-size: 13px; } .m-crowns b { font-size: 30px; }
  .m-timer span { font-size: 11px; }
  .m-emo-btn { font-size: 12px; min-height: 70px; }
}
@media (max-width: 900px) {
  .m-center { grid-template-columns: 56px minmax(0, 1fr); width: 100%; }
  .m-top { padding: 6px 3px; gap: 6px; }
  .m-crowns { font-size: 10px; } .m-crowns b { font-size: 18px; min-width: 0; }
  .m-timer b { font-size: 17px; }
  .m-emo-btn { min-height: 50px; font-size: 9px; }
  .m-emos { grid-template-columns: repeat(2, 118px); }
}

/* emotes */
.emote { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.emote .bubble { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--cream); border: 3px solid var(--ink); animation: bub 2.4s steps(6) forwards; white-space: nowrap; }
.emote.s1 .bubble { bottom: auto; top: 7%; }
.emote .bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 14px; height: 10px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.emote.s1 .bubble::after { bottom: auto; top: -12px; transform: rotate(180deg); }
.emote .bubble b { font-family: 'Silkscreen', monospace; font-size: 15px; }
.emote .fig { display: block; position: relative; }
.emote .fig .spr { width: 56px; height: 56px; }
@keyframes bub { 0% { opacity: 0; transform: translateX(-50%) scale(0.3); } 8% { opacity: 1; transform: translateX(-50%) scale(1.12); } 14% { transform: translateX(-50%) scale(1); } 88% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
.emote.legend .bubble { animation-duration: 3.6s; padding: 8px 16px 8px 8px; border-width: 4px; background: linear-gradient(115deg, #fff3b0, #f2a7c3, #8fd3ff, #b8f0a0, #fff3b0) 0 0 / 300% 100%; animation: bub 3.6s steps(8) forwards, foil 1.4s linear infinite; }
.emote.legend .fig .real { width: 96px; height: 96px; display: block; border: 3px solid var(--ink); }
.emote.legend .bubble b { font-size: 18px; }
@keyframes foil { to { background-position: 300% 0; } }
.a-sway { animation: sway 0.5s steps(2) infinite; } @keyframes sway { 50% { transform: rotate(-10deg); } 0%, 100% { transform: rotate(10deg); } }
.a-tilt { animation: tilt 0.8s steps(3) infinite; } @keyframes tilt { 50% { transform: rotate(-18deg) scale(1.1); } }
.a-cry { animation: cry 0.2s steps(2) infinite; } @keyframes cry { 50% { transform: translateX(-2px); } 0%, 100% { transform: translateX(2px); } }
.a-cry::before, .a-cry::after { content: ''; position: absolute; top: 55%; width: 4px; height: 8px; background: #8fd3ff; border: 1px solid var(--ink); animation: tear 0.6s steps(4) infinite; }
.a-cry::before { left: 26%; } .a-cry::after { right: 26%; animation-delay: 0.3s; }
@keyframes tear { to { transform: translateY(22px); opacity: 0; } }
.a-pop { animation: popm 0.26s steps(2) infinite; transform-origin: bottom; } @keyframes popm { 50% { transform: scale(1.15, 0.85); } }
/* angry Pop Cat: red-faced, shaking, a throbbing anger mark and steam */
.a-rage { animation: rage 0.12s steps(2) infinite; transform-origin: bottom; filter: sepia(1) saturate(4) hue-rotate(-40deg) brightness(0.95); }
@keyframes rage { 0%, 100% { transform: translateX(-2px) scale(1.08, 0.92); } 50% { transform: translateX(2px) scale(0.96, 1.06); } }
.a-rage::before { content: ''; position: absolute; top: -4px; right: -6px; width: 18px; height: 18px; z-index: 1; filter: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%23d8282c' d='M1 0h2v3H0V1h1zM6 0h2v1h1v2H6zM0 6h3v3H1V8H0zM6 6h3v2H8v1H6z'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; animation: vein 0.3s steps(2) infinite; }
.a-rage::after { content: ''; position: absolute; top: -10px; left: 4px; width: 10px; height: 10px; background: #fbf7ea; border: 2px solid var(--ink); animation: steam 0.6s steps(3) infinite; }
@keyframes vein { 50% { transform: scale(1.35); } }
@keyframes steam { to { transform: translate(-6px, -12px); opacity: 0; } }
.angry { position: relative; display: block; }
.angry .spr { filter: sepia(1) saturate(4) hue-rotate(-40deg) brightness(0.95); }
.angry::before { content: ''; position: absolute; top: -4px; right: -8px; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%23d8282c' d='M1 0h2v3H0V1h1zM6 0h2v1h1v2H6zM0 6h3v3H1V8H0zM6 6h3v2H8v1H6z'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; }
.a-flip { animation: flip 0.9s steps(6) infinite; } @keyframes flip { to { transform: rotateY(360deg); } }
.a-vibe { animation: vibe 0.6s steps(4) infinite; } @keyframes vibe { 25% { transform: translateX(-5px) rotate(-6deg); } 75% { transform: translateX(5px) rotate(6deg); } }
.a-chomp { animation: chomp 0.4s steps(2) infinite; } @keyframes chomp { 50% { transform: scale(1.3); } }
.a-nod { animation: nod 0.5s steps(2) infinite; } @keyframes nod { 50% { transform: translateY(6px); } }
.a-ascend { animation: ascend 1.2s steps(6) infinite; filter: drop-shadow(0 0 6px #fff3b0); } @keyframes ascend { 50% { transform: translateY(-10px); } }
.a-ascend::before { content: ''; position: absolute; left: 20%; right: 20%; top: -6px; height: 8px; border: 3px solid var(--gold); border-radius: 50%; }
.fx { position: absolute; inset: 0; }
.fx-ink { position: absolute; width: calc(90px * var(--s)); height: calc(80px * var(--s)); background: radial-gradient(circle at 40% 40%, #5a8ce0, #2f6fd6 45%, #1f4284 70%); border-radius: 46% 54% 40% 60% / 55% 40% 60% 45%; opacity: 0; animation: splat 3.4s steps(8) forwards; }
@keyframes splat { 0% { opacity: 0; transform: scale(0); } 10% { opacity: 0.92; transform: scale(1.2); } 16% { transform: scale(1); } 80% { opacity: 0.85; } 100% { opacity: 0; } }
.fx-nut { position: absolute; top: -24px; width: 12px; height: 16px; background: linear-gradient(#6b4424 0 35%, #b8743a 35%); border: 2px solid var(--ink); border-radius: 40% 40% 50% 50%; animation: nut 1.6s steps(10) infinite; }
@keyframes nut { to { transform: translateY(120vh) rotate(var(--r)); } }
.fx-web { position: absolute; width: 46%; height: 46%; stroke-dasharray: 160; stroke-dashoffset: 160; animation: web 3.4s steps(8) forwards; }
.fx-web path { stroke-dasharray: 160; stroke-dashoffset: 160; animation: webd 0.8s steps(6) forwards; }
.fx-web.tl { left: 0; top: 0; } .fx-web.tr { right: 0; top: 0; transform: scaleX(-1); } .fx-web.bl { left: 0; bottom: 0; transform: scaleY(-1); } .fx-web.br { right: 0; bottom: 0; transform: scale(-1); }
@keyframes webd { to { stroke-dashoffset: 0; } } @keyframes web { 85% { opacity: 1; } 100% { opacity: 0; } }
.fx-ship { position: absolute; left: -30%; width: 90px; height: 50px; background: linear-gradient(transparent 0 58%, #6b4424 58% 82%, transparent 82%), linear-gradient(90deg, transparent 0 46%, #3a2412 46% 52%, transparent 52%), linear-gradient(90deg, transparent 20%, #d8402c 20% 80%, transparent 80%) 0 4px / 100% 26px no-repeat; animation: sail 3.2s steps(16) forwards; }
@keyframes sail { to { left: 115%; } }
.fx-ring { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border: 4px solid var(--gold); border-radius: 50%; animation: ring 1.2s steps(6) forwards; }
@keyframes ring { to { transform: scale(12); opacity: 0; } }
.fx-bonk { position: absolute; left: 0; right: 0; top: 36%; text-align: center; font-family: 'Silkscreen', monospace; font-size: 64px; color: var(--gold); text-shadow: 4px 4px 0 var(--ink), -4px -4px 0 var(--ink), 4px -4px 0 var(--ink), -4px 4px 0 var(--ink); animation: slam 3.4s steps(8) forwards; }
@keyframes slam { 0% { transform: scale(3); opacity: 0; } 10% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.fx-crack { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; }
.shake { animation: shake 0.5s steps(6); } @keyframes shake { 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(3px, 0); } }

.emote.hold .bubble { animation: bubin 300ms steps(3) both; }
.emote.hold .fig .spr { width: 72px; height: 72px; }
@keyframes bubin { from { opacity: 0; transform: translateX(-50%) scale(0.5); } }
.bubble .wave { display: block; width: 16px; height: 16px; background: linear-gradient(var(--ink) 0 0) 0 60% / 3px 40% no-repeat, linear-gradient(var(--ink) 0 0) 6px 50% / 3px 70% no-repeat, linear-gradient(var(--ink) 0 0) 12px 60% / 3px 40% no-repeat; animation: wv 0.3s steps(2) infinite; }
@keyframes wv { 50% { transform: scaleY(0.5); } }
/* legendary = gold question-block treasure: gold plate, a darker gold frame, sparkle pixels */
.emote.legend .bubble, .lk-tile.legend { background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff3b0' d='M3 3h2v2H3zM16 9h2v2h-2zM8 17h2v2H8zM20 19h1v1h-1z'/%3E%3C/svg%3E") 0 0 / 24px; box-shadow: inset -4px -4px 0 var(--gold2), inset 4px 4px 0 oklch(0.94 0.1 95); }
.emote.legend .bubble { animation: bub 3.6s steps(8) forwards, spark 0.6s steps(2) infinite; }
.emote.legend.hold .bubble { animation: bubin 300ms steps(3) both, spark 0.6s steps(2) infinite; }
.lk-tile.legend { animation: spark 1.2s steps(2) infinite; }
.lk-tile.legend:hover, .lk-tile.legend:focus-visible { box-shadow: inset -4px -4px 0 var(--gold2), inset 4px 4px 0 oklch(0.94 0.1 95), 0 0 0 4px var(--cream), 0 0 0 7px var(--ink); }
@keyframes spark { 50% { background-position: 12px 12px; } }
.fight::before { left: 8px; right: 8px; bottom: -4px; height: 8px; background: rgba(30, 22, 51, 0.3); border: 0; clip-path: polygon(0 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, 100% 4px, 100% 100%, 0 100%); border-radius: 0; }
.m-stage .m-detail { top: auto; bottom: 6px; }
@media (max-width: 900px) {
  .match { position: relative; grid-template-rows: minmax(0, 1fr); }
  .m-bot { position: absolute; top: 4px; left: 4px; width: 56px; z-index: 4; flex-direction: column; align-items: stretch; gap: 4px; }
  .m-bot .m-plate { flex-direction: column; gap: 2px; padding: 3px 2px; text-align: center; }
  .m-bot .m-plate b { font-size: 9px; }
  .m-bot .m-lv { font-size: 10px; }
  .m-bot .m-mul-s, .m-bot .m-botdeck { display: none; }
  .m-bot .m-quit-s { width: 100%; font-size: 9px; padding: 2px; min-height: 30px; display: grid; place-items: center; }
  .m-top { padding-top: 124px; }
  .lk-stage { height: 210px; }
}
/* realistic card art in the deck */
.portrait.real-art { background: none; image-rendering: auto; line-height: 0; }
.portrait.real-art svg, .portrait.real-art img { display: block; width: 100%; height: auto; }
img.real { image-rendering: pixelated; }
.dt-pix { position: absolute; right: 10px; bottom: 10px; background: var(--sky2); border: 3px solid var(--ink); padding: 2px; }

/* locker */
.locker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 20px; padding: 20px clamp(12px, 2.5vw, 36px) 40px; max-width: 1500px; margin: 0 auto; align-items: start; }
.lk-main { display: grid; gap: 16px; min-width: 0; }
.lk-deck, .lk-coll, .lk-skins, .lk-side { padding: 16px; display: grid; gap: 12px; }
.locker h2 { font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.locker h2 small, .locker h3 small { font-family: 'Pixelify Sans'; font-weight: 500; font-size: 15px; color: var(--shade); }
.locker h3 { font-size: 15px; margin-top: 6px; }
.lk-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lk-slot { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 4px 8px; background: var(--sky2); border: 3px solid var(--ink); min-width: 0; }
.lk-slot.on { background: var(--gold); outline: 3px dashed var(--ink); outline-offset: 3px; }
.lk-slot i { position: absolute; top: 2px; left: 6px; font-style: normal; font-family: 'Silkscreen', monospace; font-size: 12px; }
.lk-slot b, .lk-tile b, .lk-skin b { font-family: 'Silkscreen', monospace; font-size: 11px; text-align: center; line-height: 1.15; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.lk-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 6px 8px; background: var(--cream); border: 3px solid var(--ink); min-width: 0; transition: transform 100ms var(--step); }
.lk-tile:hover, .lk-tile:focus-visible { transform: translateY(-4px); }
.lk-tile.pin { outline: 4px solid var(--gold); outline-offset: -8px; }
.lk-tile small, .lk-skin small { font-size: 13px; color: var(--shade); }
.lk-tile.locked > .spr, .lk-skin.locked canvas { filter: grayscale(1) brightness(0.75); }
.lk-tile.locked > .spr { filter: grayscale(0.5) opacity(0.6); }
.lk-tile.locked:not(.legend)::after { content: ''; position: absolute; top: 6px; right: 6px; width: 14px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 8' shape-rendering='crispEdges'%3E%3Cpath fill='%231e1633' d='M2 0h3v1h1v2h1v5H0V3h1V1h1zM2 1v2h3V1z'/%3E%3Cpath fill='%23f5c542' d='M1 4h5v3H1z'/%3E%3Cpath fill='%231e1633' d='M3 5h1v1H3z'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; }
.tabs a, .tabs button, .signin { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 1560px) { .tabs [data-how], .tabs [data-music] { font-size: 0; gap: 0; } }
.lk-real svg, .lk-real img { display: block; width: 72px; height: 72px; border: 3px solid var(--ink); }
.lk-tile.legend small { color: var(--ink); font-weight: 600; }
.lk-side { position: sticky; top: 84px; }
.lk-stage { position: relative; height: 320px; display: grid; place-items: end center; border: 3px solid var(--ink); overflow: hidden; background: oklch(0.67 0.13 138) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cpath fill='%23478a37' d='M4 6h2v3H4zM7 5h2v4H7zM20 22h2v3h-2zM23 20h2v5h-2z'/%3E%3Cpath fill='%23fbf7ea' d='M26 8h2v2h-2z'/%3E%3C/svg%3E") 0 0 / 64px; }
.lk-stage .twr { image-rendering: pixelated; margin-bottom: 8px; }
.lk-stage .emote.s0 .bubble { bottom: auto; top: 10px; }
.lk-side .tag { color: var(--shade); }
.lk-side .dt-acts { grid-template-columns: 1fr; }
.lk-skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.lk-skin { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; background: var(--sky2); border: 3px solid var(--ink); min-width: 0; }
.lk-skin canvas { image-rendering: pixelated; display: block; }
.lk-skin.on { background: var(--gold); }
.pipes { grid-template-columns: 1fr 1.3fr 1.3fr 1.2fr 1fr; }
@media (max-width: 1180px) { .pipes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .locker { grid-template-columns: 1fr; padding: 12px 10px 24px; }
  .lk-side { position: static; order: -1; }
  .lk-stage { height: 260px; }
}
@media (max-width: 760px) {
  .pipes { grid-template-columns: 1fr; }
  .fight:nth-child(n+4) { display: none; }
  .fight { transform: translate(-50%, -50%) scale(0.8); }
  .lk-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lk-grid, .lk-skin-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .tabs a, .tabs button { padding: 6px 2px; font-size: 9px; }
}
/* ---------- dark blue panels: every box that used to be white paper is now deep blue with light type ---------- */
.block, .sheet, .menu, .m-box, .m-mults, .m-botlist, .m-rule, .m-detail, .mini, .btn.ghost, .chip, .lk-tile, .m-emos button, .emote .bubble {
  --shade: var(--on-navy); background-color: var(--navy); color: var(--cream); }
.block { background: var(--navy); box-shadow: inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 var(--navy2), inset var(--px) var(--px) 0 var(--navy-hi); }
.btn.ghost { background: var(--navy); color: var(--cream); box-shadow: inset -3px -3px 0 var(--navy2), inset 3px 3px 0 var(--navy-hi); }
.hud .chip { color: var(--cream); }
.chip .up { color: oklch(0.80 0.17 145); } .chip .down { color: oklch(0.72 0.18 27); }
.menu button:hover, .menu button:focus-visible { color: var(--ink); }
.vault, .page, .drop, .card { color: var(--cream); }
.drop.locked { background: var(--navy2); }
.slot { background: var(--navy2); border-color: var(--on-navy); color: var(--cream); }
.skel { background: repeating-linear-gradient(90deg, var(--navy2) 0 8px, var(--navy-hi) 8px 16px); }
.namebox { background: var(--navy2); }
.namebox input { background: oklch(0.18 0.06 268); color: var(--cream); box-shadow: inset 3px 3px 0 oklch(0.14 0.05 268); }
.namebox input::placeholder { color: oklch(0.72 0.05 258); }
.namebox input:focus-visible { box-shadow: inset 3px 3px 0 oklch(0.14 0.05 268); }
.ca { background: var(--navy2); color: var(--cream); }
.nb-err { color: oklch(0.74 0.17 27); }
.m-log li.bot { color: oklch(0.76 0.15 27); }
.m-detail.warn { background: oklch(0.40 0.14 27); }
.m-timer span { background: var(--navy); color: oklch(0.80 0.16 340); }
.m-emo-btn[aria-expanded="true"] { background: var(--navy); color: var(--cream); }
.stamp { border-color: currentColor; }
.result h2.w { color: var(--gold); } .result h2.l { color: oklch(0.70 0.19 27); }
.res { color: var(--ink); } .res.l { color: var(--cream); }
.ranks li:nth-child(-n+3) .rk { color: var(--ink); }
/* the pale blue and pale yellow text tiles go dark blue too: state shows in the border and the badge, not a pale fill */
.slot.full, .dk-tile, .lk-slot, .lk-skin, .xbox, .xbox.linked, .firstrun, .hcard, .ranks li.me, .table tr.me td, .table tr.lead td {
  --shade: var(--on-navy); background: var(--navy-hi); color: var(--cream); }
.dk-tile:hover, .dk-tile:focus-visible { background: oklch(0.46 0.12 262); }
.dk-tile.in { background: var(--navy-hi); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.ranks li.me, .table tr.me td { box-shadow: inset 3px 0 0 var(--gold), inset -3px 0 0 var(--gold); }
.table tr.lead td { background: oklch(0.36 0.10 264); }
.m-next .spr, .sb-deck .spr, .dt-pix { background: var(--navy-hi); }
.slot.swap, .lk-slot.on, .lk-skin.on { color: var(--ink); --shade: oklch(0.40 0.06 270); }
.slot.swap { background: var(--gold); }
.lk-slot.on, .lk-skin.on { background: var(--gold); }
.hcard.on { background: var(--gold); color: var(--ink); --shade: oklch(0.40 0.06 270); }
/* pieces that stay gold keep dark type */
.swapnote, .card[aria-pressed="true"], .lk-tile.legend, .emote.legend .bubble, .m-emos button:hover, .m-emos button:focus-visible {
  --shade: oklch(0.40 0.06 270); color: var(--ink); }
.dk-minitray { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding-top: 6px; }
.dk-minitray .slot { min-height: 0; aspect-ratio: auto; padding: 10px 2px 4px; }
.dk-minitray .slot .gem { top: -7px; left: -5px; min-width: 20px; height: 20px; font-size: 11px; }
.dk-minitray .slot b { font-size: 9px; }
@media (max-width: 900px) { .dk-minitray .slot b { display: none; } .dk-minitray .slot .spr { width: 34px; height: 34px; } }
.xbox .xname small, .ranks li.me .xname small { color: var(--shade); }
.dk-tile .xname, .xbox a { color: inherit; }
.meter { background: var(--navy2); border-color: var(--ink); }

/* ---------- emotes: every one wears its own colour, a ribbon and a burst of its own particles ---------- */
.emote .bubble { background: radial-gradient(120% 140% at 20% 0%, color-mix(in oklab, var(--ec) 34%, var(--navy)) 0 40%, var(--navy) 75%); box-shadow: inset 0 0 0 3px var(--ec), 0 0 18px color-mix(in oklab, var(--ec) 55%, transparent); overflow: visible; }
.emote .bubble b { color: var(--cream); text-shadow: 2px 2px 0 var(--ink); }
.emote .bubble .wave { background: linear-gradient(var(--ec) 0 0) 0 60% / 3px 40% no-repeat, linear-gradient(var(--ec) 0 0) 6px 50% / 3px 70% no-repeat, linear-gradient(var(--ec) 0 0) 12px 60% / 3px 40% no-repeat; }
/* a hard 2px outline in the emote's colour instead of a soft glow, so the sprite stays crisp 8-bit */
.emote .fig { filter: drop-shadow(2px 0 0 var(--ec)) drop-shadow(-2px 0 0 var(--ec)) drop-shadow(0 2px 0 var(--ec)) drop-shadow(0 -2px 0 var(--ec)); }
.emote .fig .spr { image-rendering: pixelated; }
.rib { position: absolute; top: -13px; left: 10px; z-index: 2; font: 700 10px/1 'Silkscreen', monospace; font-style: normal; letter-spacing: 0.04em; padding: 3px 6px; background: var(--ec); color: var(--ink); border: 2px solid var(--ink); white-space: nowrap; }
.r-rank .rib { background: var(--ink); color: var(--ec); border-color: var(--ec); }
.r-shop .rib, .r-secret .rib { background: var(--ink); color: var(--gold); border-color: var(--gold); }
.r-wins .rib { background: oklch(0.42 0.13 150); color: var(--gold); border-color: var(--gold); }
.pts { position: absolute; left: 36px; top: 50%; width: 0; height: 0; pointer-events: none; }
.pt { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: var(--ec); opacity: 0; animation: ptfly 1.2s steps(8) infinite; }
.pt-star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.pt-heart { clip-path: polygon(20% 0, 40% 0, 50% 15%, 60% 0, 80% 0, 100% 20%, 100% 45%, 50% 100%, 0 45%, 0 20%); }
.pt-drop { clip-path: polygon(50% 0, 80% 45%, 90% 70%, 75% 95%, 25% 95%, 10% 70%, 20% 45%); }
.pt-bolt { clip-path: polygon(40% 0, 90% 0, 60% 40%, 90% 40%, 20% 100%, 40% 55%, 10% 55%); }
.pt-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.pt-note { clip-path: polygon(40% 0, 100% 0, 100% 25%, 60% 25%, 60% 80%, 50% 100%, 10% 100%, 0 80%, 10% 60%, 40% 60%); }
.pt-crown { clip-path: polygon(0 30%, 25% 55%, 50% 10%, 75% 55%, 100% 30%, 90% 100%, 10% 100%); }
.pt-cross { clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); }
.pt-coin { border-radius: 50%; box-shadow: inset -2px -2px 0 rgba(30, 22, 51, 0.35); }
.pt-bill { width: 18px; height: 10px; background: linear-gradient(90deg, #3d7a34 0 2px, #6ab45a 2px calc(50% - 2px), var(--gold) calc(50% - 2px) calc(50% + 2px), #6ab45a calc(50% + 2px) calc(100% - 2px), #3d7a34 calc(100% - 2px)); border: 1px solid var(--ink); }
@keyframes ptfly { 0% { opacity: 0; transform: translate(0, 0) scale(0.3); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } }
.emote.legend .bubble { box-shadow: inset -4px -4px 0 var(--gold2), inset 4px 4px 0 oklch(0.94 0.1 95), 0 0 0 3px var(--ec), 0 0 24px color-mix(in oklab, var(--ec) 60%, transparent); }
.emote.legend .bubble b { color: var(--ink); text-shadow: none; }
/* the 10-win milestone: a green money plate with a gold frame */
.emote.r-wins .bubble { background: oklch(0.40 0.12 150) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%23f5c542' fill-opacity='.35' d='M3 3h2v2H3zM16 9h2v2h-2zM8 17h2v2H8z'/%3E%3C/svg%3E") 0 0 / 24px; color: var(--cream); box-shadow: inset -4px -4px 0 oklch(0.30 0.10 150), inset 4px 4px 0 oklch(0.55 0.14 150), 0 0 0 3px var(--gold), 0 0 26px oklch(0.8 0.16 140 / 0.7); }
.emote.r-wins .bubble b { color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
.fx-bill, .fx-brick { position: absolute; left: 50%; top: 55%; width: 34px; height: 18px; border: 2px solid var(--ink); opacity: 0; }
.fx-bill { background: linear-gradient(90deg, #3d7a34 0 3px, #6ab45a 3px 13px, var(--gold) 13px 19px, #6ab45a 19px 27px, #3d7a34 27px); }
.fx-brick { width: 30px; height: 20px; background: linear-gradient(#fffdf5 0 40%, #e8e4f0 40% 60%, #fffdf5 60%); box-shadow: inset -3px -3px 0 #c8c4d4; }
.fx-bill.fly, .fx-brick.fly { animation: brickfly 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fx-bill.rain, .fx-brick.rain { top: -30px; animation: brickrain 1.8s steps(12) forwards; }
@keyframes brickfly { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 10% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1.2); } }
@keyframes brickrain { 0% { opacity: 1; transform: none; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(110vh) rotate(var(--r)); } }
.fx-ring.money { border-color: #7fd46a; }
/* Steve's loot: pixel diamonds and gold ingots */
.fx-gem, .fx-ingot { position: absolute; left: 50%; top: 55%; opacity: 0; filter: drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink)); }
.fx-gem { width: 26px; height: 26px; background: linear-gradient(135deg, #e8fffd 0 30%, #6fe8e0 30% 68%, #2fb0a8 68%); clip-path: polygon(30% 0, 70% 0, 100% 35%, 50% 100%, 0 35%); }
.fx-ingot { width: 30px; height: 14px; background: linear-gradient(#fff3b0 0 35%, #f5c542 35% 75%, #c8901e 75%); clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
.fx-gem.fly, .fx-ingot.fly { animation: brickfly 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fx-gem.rain, .fx-ingot.rain { top: -30px; animation: brickrain 1.8s steps(12) forwards; }
.fx-ring.loot { border-color: #6fe8e0; }
/* locker and match menu: the same colour frame and ribbon */
.lk-tile { box-shadow: inset 0 0 0 3px var(--ec); padding-top: 14px; }
.lk-tile .rib { top: -9px; left: 50%; transform: translateX(-50%); font-size: 9px; }
.lk-tile.r-wins { background: oklch(0.36 0.11 150); }
/* each source has its own plate: starters on the arena's brick, rank rewards on riveted steel, legendaries on gold foil */
.lk-tile.r-start { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' fill-opacity='.22' d='M0 0h32v2H0zM0 8h32v2H0zM14 2h2v6h-2zM30 10h2v6h-2z'/%3E%3C/svg%3E") 0 0 / 32px 16px, var(--navy); }
.emote.r-start .bubble { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' fill-opacity='.22' d='M0 0h32v2H0zM0 8h32v2H0zM14 2h2v6h-2zM30 10h2v6h-2z'/%3E%3C/svg%3E") 0 0 / 32px 16px, radial-gradient(120% 140% at 20% 0%, color-mix(in oklab, var(--ec) 34%, var(--navy)) 0 40%, var(--navy) 75%); }
.lk-tile.r-rank, .emote.r-rank .bubble { background: linear-gradient(160deg, oklch(0.46 0.03 260) 0 30%, oklch(0.34 0.03 262) 55%, oklch(0.42 0.03 260) 80%); }
.lk-tile.r-rank::before, .emote.r-rank .bubble::before { content: ''; position: absolute; inset: 6px; pointer-events: none; background: radial-gradient(circle at 0 0, var(--ec) 0 2px, transparent 2.5px), radial-gradient(circle at 100% 0, var(--ec) 0 2px, transparent 2.5px), radial-gradient(circle at 0 100%, var(--ec) 0 2px, transparent 2.5px), radial-gradient(circle at 100% 100%, var(--ec) 0 2px, transparent 2.5px); background-size: auto; opacity: 0.8; }
.lk-tile.legend { overflow: hidden; }
.lk-tile.legend::before { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 253, 245, 0.55), transparent); transform: skewX(-18deg); animation: sheen 2.8s steps(14) infinite; pointer-events: none; }
@keyframes sheen { 0%, 40% { left: -60%; } 100% { left: 130%; } }
/* locked emotes show in full colour behind their lock plate, so they look worth earning */
.lk-tile.locked > .spr, .lk-tile.locked > .angry, .lk-tile.locked .lk-real img { filter: none !important; opacity: 0.92; }
.lk-tile.locked::after { content: ''; position: absolute; top: 6px; right: 6px; width: 18px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 8' shape-rendering='crispEdges'%3E%3Cpath fill='%231e1633' d='M2 0h3v1h1v2h1v5H0V3h1V1h1zM2 1v2h3V1z'/%3E%3Cpath fill='%23f5c542' d='M1 4h5v3H1z'/%3E%3Cpath fill='%231e1633' d='M3 5h1v1H3z'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; z-index: 2; }
.lk-tile.legend { box-shadow: inset -4px -4px 0 var(--gold2), inset 4px 4px 0 oklch(0.94 0.1 95), inset 0 0 0 7px var(--ec); }
.lk-slot { box-shadow: inset 0 0 0 3px var(--ec); }
.m-emos button { box-shadow: inset 0 0 0 3px var(--ec); }
.m-emos button .spr { filter: drop-shadow(0 0 4px var(--ec)); }

/* ---------- deck editor on phones: the card opens as a bottom sheet, swapping points back at the deck ---------- */
.dk-close, .dk-grab, .dk-scrim { display: none; }
.dk-swapbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--gold); color: var(--ink); border: 3px solid var(--ink); padding: 8px 10px; font-weight: 600; }
@media (max-width: 900px) {
  .deckscreen.has-card .dk-detail { order: 0; }
  .dk-detail { position: fixed !important; left: 0; right: 0; bottom: 0; top: auto; z-index: 46; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain; padding: 22px 14px calc(16px + env(safe-area-inset-bottom)); clip-path: none; border: 0; box-shadow: 0 -4px 0 var(--ink), inset 0 3px 0 var(--navy-hi); transform: translateY(105%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 220ms; }
  .deckscreen.open .dk-detail { transform: none; visibility: visible; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
  .dk-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(20, 16, 40, 0.6); opacity: 0; pointer-events: none; transition: opacity 200ms; }
  .deckscreen.open .dk-scrim { opacity: 1; pointer-events: auto; }
  .dk-grab { display: block; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; background: var(--on-navy); }
  .dk-close { display: inline-flex; align-items: center; position: absolute; top: 12px; right: 12px; z-index: 2; }
  .dk-detail .dt-art { width: min(58vw, 220px); margin: 0 auto; }
  .dk-detail .portrait { width: 100%; min-width: 0; }
  .dk-detail h2 { font-size: 22px; padding-right: 70px; }
  .dk-detail .dt-acts { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin-bottom: calc(-16px - env(safe-area-inset-bottom)); background: var(--navy); padding: 8px 0 calc(16px + env(safe-area-inset-bottom)); border-top: 3px solid var(--ink); z-index: 1; }
  .dk-detail .dt-acts .btn { min-height: 48px; font-size: 15px; }
  /* the text fades out above the pinned button, so it reads as more to scroll */
  .dk-detail .dt-acts { box-shadow: 0 -22px 18px -6px var(--navy); }
  .dk-deck { position: sticky; top: 0; z-index: 12; }
  body[data-route="/deck"] .hud { position: static; }
  .dk-deck .tray { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .dk-deck .tray .slot { min-height: 0; aspect-ratio: auto; padding: 8px 1px 3px; }
  .dk-deck .tray .slot .spr { width: 34px; height: 34px; }
  .dk-deck .tray .slot b, .dk-deck .tray .slot small { display: none; }
  .dk-deck .tray .slot .gem { top: -6px; left: -6px; min-width: 20px; height: 20px; font-size: 11px; }
  .dk-deck .avg { font-size: 13px; }
  .dk-deck { padding: 10px; gap: 8px; }
  .dk-deck h2 small { display: none; }
  .dk-deck .dk-row .side-note { display: none; }
  .dk-deck .dk-row .btn { min-height: 40px; }
  .dk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .dk-tile { padding: 12px 2px 10px; }
  .dk-tile .spr { width: 48px; height: 48px; }
}

/* ---------- card art is the arena sprite itself: a sky window with a grass strip, the sprite stood on it in whole pixels ---------- */
.pix-stage { position: relative; display: grid; place-items: end center; aspect-ratio: 1; width: 100%; overflow: hidden; border: 3px solid var(--ink); image-rendering: pixelated;
  background: linear-gradient(var(--grass) 0 0) 0 100% / 100% 14% no-repeat, linear-gradient(var(--grass2) 0 0) 0 86% / 100% 3% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cpath fill='%23fbf7ea' fill-opacity='.5' d='M4 6h6v2H4zM2 8h10v2H2zM20 20h4v2h-4zM18 22h8v2h-8z'/%3E%3C/svg%3E") 0 0 / 64px 64px, linear-gradient(var(--sky2), var(--sky)); }
.pix-stage .spr { width: 78%; height: auto; margin-bottom: 6%; filter: drop-shadow(0 4px 0 rgba(30, 22, 51, 0.35)); }
.dk-detail .portrait.pix-stage { border-width: 4px; }
.drop .pix-stage .spr { width: 70%; }
.dt-emo-fig { flex: none; display: grid; place-items: center; width: 52px; height: 52px; background: var(--navy-hi); border: 3px solid var(--ink); }
.dt-emo-fig .spr { width: 44px; height: 44px; }
.emote.legend .fig .spr { width: 96px; height: 96px; }
.emote.legend.hold .fig .spr { width: 104px; height: 104px; }
.lk-tile.legend > .spr, .lk-tile.r-wins > .spr, .lk-tile.r-secret > .spr { width: 64px; height: 64px; }
/* every emote bubble fits its arena: one line when there is room, the words wrap beside the figure when there is not */
.emote .bubble { width: max-content; max-width: calc(100% - 16px); white-space: normal; box-sizing: border-box; }
.emote .bubble .fig { flex: none; }
.emote .bubble b { min-width: 0; line-height: 1.15; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .emote .bubble { gap: 6px; padding: 5px 10px 5px 5px; }
  .emote .bubble b { font-size: 13px; }
  .emote .fig .spr { width: 44px; height: 44px; }
  .emote.legend .bubble { padding: 6px 10px 6px 6px; border-width: 3px; }
  .emote.legend .bubble b { font-size: 14px; }
  .emote.legend .fig .spr { width: 60px; height: 60px; }
  .emote.legend.hold .fig .spr { width: 68px; height: 68px; }
  .emote .bubble .wave { display: none; }
}

/* ---------- emotes without a box (owner, c4): only the character acting it out, its words floating over its head ---------- */
.emote.emote .bubble.bubble { flex-direction: column; align-items: center; gap: 4px; padding: 0; background: none; border: 0; box-shadow: none; }
.emote.emote .bubble.bubble::before, .emote.emote .bubble.bubble::after, .emote .bubble .rib, .emote .bubble .wave { display: none; }
.emote.emote .bubble.bubble b { order: -1; max-width: 18ch; text-align: center; font-size: 17px; line-height: 1.1; color: var(--cream);
  text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 5px 0 color-mix(in oklab, var(--ec) 70%, var(--ink)); }
.emote.legend .bubble.bubble b, .emote.r-wins .bubble.bubble b { font-size: 20px; color: color-mix(in oklab, var(--ec) 40%, var(--cream)); }
.emote .bubble .pts { left: 50%; top: 62%; }
.emote .fig { position: relative; }
/* Thanos laughing: the whole bust shakes, his jaw drops open and shut, HA floats off him */
.a-laugh { animation: laugh 0.32s steps(2) infinite; transform-origin: 50% 100%; }
@keyframes laugh { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg) scale(1.05); } }
.emo-jaw { animation: jaw 0.32s steps(1) infinite; }
@keyframes jaw { 50% { opacity: 0; } }
.pt-ha { width: auto; height: auto; background: none; }
.pt-ha::before { content: 'HA'; font: 700 13px/1 'Silkscreen', monospace; color: var(--ec); text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.fx-stone { background: linear-gradient(135deg, #fffdf5 0 26%, var(--g) 26% 70%, color-mix(in oklab, var(--g) 60%, var(--ink)) 70%); }
.fx-ring.stones { border-color: #b04ae0; }
@media (max-width: 600px) {
  .emote.emote .bubble.bubble { padding: 0; gap: 3px; }
  .emote.emote .bubble.bubble b { font-size: 14px; }
  .emote.legend .bubble.bubble b, .emote.r-wins .bubble.bubble b { font-size: 16px; }
}

/* ---------- Thanos (owner, c4): the special card, its Time Stone button, the snap ---------- */
.m-stone { position: absolute; right: 8px; bottom: 8px; z-index: 7; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 12px 6px 6px; border: 3px solid var(--ink); background: linear-gradient(oklch(0.62 0.17 150), oklch(0.46 0.15 150)); color: var(--cream); font: 700 12px/1.1 'Silkscreen', monospace; text-align: left; box-shadow: inset -3px -3px 0 oklch(0.36 0.12 150), inset 3px 3px 0 oklch(0.78 0.15 150), 0 4px 0 var(--ink); cursor: pointer; animation: stone-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.m-stone[hidden] { display: none; }
.m-stone .m-stone-gem { width: 30px; height: 30px; flex: none; background: linear-gradient(135deg, #e8ffe8 0 25%, #3fd35a 25% 68%, #1f8a34 68%); clip-path: polygon(30% 0, 70% 0, 100% 35%, 50% 100%, 0 35%); filter: drop-shadow(0 0 4px #3fd35a); }
.m-stone b { display: block; font-size: 13px; }
.m-stone small { display: block; font: 600 11px/1.2 'Pixelify Sans', sans-serif; color: #e8ffe8; }
.m-stone .gem { margin-left: 2px; }
.m-stone:hover:not(:disabled), .m-stone:focus-visible { transform: translateY(-2px); }
.m-stone:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 3px 3px 0 oklch(0.36 0.12 150), 0 1px 0 var(--ink); }
.m-stone:disabled { filter: grayscale(0.7); cursor: not-allowed; opacity: 0.8; }
.m-stone:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* Goku (owner, c8): the Ultra Instinct button, silver and cold blue, above the Time Stone when both wait */
.m-stone.m-ui { background: linear-gradient(oklch(0.72 0.05 260), oklch(0.46 0.09 262)); }
.m-stone.m-ui small { color: oklch(0.95 0.02 260); }
.m-stone.m-ui:active:not(:disabled) { box-shadow: inset 3px 3px 0 oklch(0.34 0.08 262), 0 1px 0 var(--ink); }
[data-stone]:not([hidden]) ~ .m-ui { bottom: 66px; }
.m-ui-gem { width: 30px; height: 30px; flex: none; background: linear-gradient(0deg, #c8d4ff, #fbfcff 70%); clip-path: polygon(50% 0, 62% 30%, 80% 14%, 76% 48%, 100% 40%, 84% 100%, 16% 100%, 0 40%, 24% 48%, 20% 14%, 38% 30%); filter: drop-shadow(0 0 5px #fbfcff); animation: ui-flick 0.5s steps(2) infinite; }
@keyframes ui-flick { 50% { transform: scaleY(0.9) translateY(2px); } }
.combo-pop.gohan-pop { animation: cp-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) both, cp-out 0.35s ease-in 5.2s forwards; }
@media (prefers-reduced-motion: reduce) { .m-ui-gem { animation: none; } .combo-pop.gohan-pop { animation: cp-out 0.3s ease-in 5.2s forwards; } }
@keyframes stone-in { from { opacity: 0; transform: translateY(12px) scale(0.8); } }
.m-stage.frozen canvas { filter: grayscale(0.85) contrast(1.05) brightness(0.9); transition: filter 0.2s; }
.m-stage canvas { transition: filter 0.4s; }
.snap-pop { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; align-content: center; gap: 8px; pointer-events: none; }
.snap-pop .sp-fig { filter: drop-shadow(3px 0 0 var(--ink)) drop-shadow(-3px 0 0 var(--ink)) drop-shadow(0 3px 0 var(--ink)) drop-shadow(0 -3px 0 var(--ink)) drop-shadow(0 0 14px #b04ae0); animation: sp-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.snap-pop .sp-fig .spr { width: 132px; height: 132px; image-rendering: pixelated; }
.snap-pop .sp-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.5em; max-width: 92%; font: 700 clamp(20px, 4.4vw, 34px)/1.05 'Silkscreen', monospace; color: #e8c8ff; text-align: center;
  text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 3px 3px 0 var(--ink), -3px 3px 0 var(--ink), 3px -3px 0 var(--ink), -3px -3px 0 var(--ink), 0 6px 0 #5a1f8a; }
.snap-pop .sp-line span { opacity: 0; animation: sp-word 0.25s steps(3) forwards; }
.snap-pop .sp-who { font: 700 11px/1 'Silkscreen', monospace; color: var(--cream); text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink); }
.snap-pop.s1 .sp-who { color: #ff9b8a; }
.snap-pop .sp-flash { position: absolute; inset: 0; background: #fffdf5; opacity: 0; animation: sp-flash 0.5s ease-out 2.75s forwards; }
.snap-pop .sp-snap { position: absolute; left: 50%; top: 50%; font: 700 clamp(34px, 8vw, 60px)/1 'Silkscreen', monospace; color: var(--cream); transform: translate(-50%, -50%) scale(0.4); opacity: 0; text-shadow: 4px 4px 0 var(--ink), -4px -4px 0 var(--ink), 4px -4px 0 var(--ink), -4px 4px 0 var(--ink); animation: sp-snap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 2.8s forwards; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(24px) scale(0.7); } }
@keyframes sp-word { to { opacity: 1; } }
@keyframes sp-flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
@keyframes sp-snap { 0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
.ts-demo { margin: 12px 0; }
.ts-demo canvas { display: block; width: 100%; height: auto; aspect-ratio: 10 / 6; image-rendering: pixelated; border: 3px solid var(--ink); background: #5a9a45; }
.ts-demo figcaption { margin-top: 6px; font: 600 13px/1.4 'Pixelify Sans', sans-serif; }
.demo-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.demo-steps li { padding: 3px 7px; border: 2px solid var(--ink); background: var(--surface-1, #fbf7ea); color: var(--ink); font: 400 11px/1.3 'Silkscreen', monospace; transition: background-color 180ms ease-out, color 180ms ease-out; }
.demo-steps li[aria-current] { background: var(--ink); color: #ffe27a; }
.demo-note { display: block; margin-top: 6px; }
.lk-tile.r-special > .spr { width: 64px; height: 64px; }
.lk-tile.r-special { background: radial-gradient(120% 120% at 50% 0%, oklch(0.42 0.14 305), var(--navy) 70%); }
.r-special .rib { background: #5a1f8a; color: #f0dcff; border-color: var(--ink); }
.road-intro { max-width: 760px; margin-bottom: 16px; padding: 16px 20px; }
.road-intro h2 { margin: 0 0 8px; }
.road-intro .lede { margin: 0; }
.special-tag { display: inline-block; padding: 2px 6px; background: #5a1f8a; color: #f0dcff; border: 2px solid var(--ink); font: 700 10px/1.2 'Silkscreen', monospace; }
.dk-tile.locked > .spr, .dk-tile.locked > .spr + b { filter: grayscale(0.9) brightness(0.8); }
.dk-tile .lockline { display: block; font: 700 9px/1.2 'Silkscreen', monospace; color: var(--gold); }
@media (max-width: 600px) {
  .m-stone { right: 6px; bottom: 6px; min-height: 44px; padding: 4px 8px 4px 4px; }
  .m-stone .m-stone-gem, .m-ui-gem { width: 24px; height: 24px; }
  [data-stone]:not([hidden]) ~ .m-ui { bottom: 56px; }
  .m-stone small { display: none; }
  .snap-pop .sp-fig .spr { width: 96px; height: 96px; }
}

/* ---------- boss matches: every 5th win, a one-card king in a gold crown plate ---------- */
.botcard .botsub { margin: -6px 0 0; color: var(--on-navy); font-size: 15px; }
.botcard h2 { overflow-wrap: anywhere; }
.botcard.boss { box-shadow: inset 0 0 0 3px var(--gold); }
.botcard.boss .plate { background: var(--gold); color: var(--ink); }
.botcard.boss .botsub { color: var(--gold); }
.boss-row .spr { width: 36px; height: 36px; background: var(--navy-hi); border: 3px solid var(--ink); }
.m-plate.bot.boss { background: linear-gradient(var(--red), oklch(0.46 0.19 27)); box-shadow: inset 0 0 0 2px var(--gold); }
.m-plate.bot.boss .m-lv { background: var(--gold); }
.m-boss-s { flex-basis: 100%; }
@media (max-width: 760px) { .m-boss-s { display: none !important; } }

/* card panel (c6): a small portrait beside the name, so the live demo and its steps sit in the first screen */
.dk-detail { grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.dk-detail > * { grid-column: 1 / -1; }
.dk-detail > .dt-art { grid-column: 1; grid-row: span 2; width: 100%; margin: 0; }
.dk-detail > h2, .dk-detail > .tag { grid-column: 2; }
.dk-detail > h2 { align-self: end; font-size: 22px; }
.dk-detail > .tag { align-self: start; }
.dk-detail .portrait, .dk-detail .portrait.pix-stage { width: 100%; min-width: 0; border-width: 3px; }
.dk-detail .gem.big { min-width: 34px; height: 34px; font-size: 17px; top: -8px; left: -8px; }
.dk-detail .dt-art .newtag { top: 4px; right: 4px; font-size: 10px; }
.dk-detail > .ts-demo { margin: 4px 0 0; }
.dk-detail .bars div { grid-template-columns: 96px 1fr 60px; }
@media (min-width: 901px) { .dk-detail > .ts-demo { order: -2; } }

/* ---------- rarities (owner, c7): common grey, rare shiny blue, epic purple shine with sparkle,
   legendary gold glossy hexagon with an aura, goated pearl with a rainbow shine and sparkle ---------- */
[data-rarity=common] { --rc1: oklch(0.50 0.012 270); --rc2: oklch(0.36 0.012 270); --rink: var(--cream); --rsh: oklch(0.85 0.01 270); }
[data-rarity=rare] { --rc1: oklch(0.58 0.17 248); --rc2: oklch(0.36 0.15 258); --rink: var(--cream); --rsh: oklch(0.88 0.07 240); --rglow: oklch(0.72 0.16 240); }
[data-rarity=epic] { --rc1: oklch(0.55 0.21 308); --rc2: oklch(0.32 0.17 298); --rink: var(--cream); --rsh: oklch(0.88 0.08 310); --rglow: oklch(0.70 0.22 312); }
[data-rarity=legendary] { --rc1: oklch(0.90 0.15 92); --rc2: oklch(0.66 0.15 70); --rink: var(--ink); --rsh: oklch(0.34 0.08 60); --rglow: oklch(0.86 0.17 88); }
[data-rarity=goated] { --rc1: oklch(0.96 0.02 330); --rc2: oklch(0.86 0.04 280); --rink: var(--ink); --rsh: oklch(0.36 0.06 300); --rglow: oklch(0.95 0.05 330); }
.rar-card { isolation: isolate; }
.rar-card > .rfx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rar-card > .rfx::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, var(--rc1), var(--rc2)); }
/* the shine: a light band that sweeps across the card */
[data-rarity=rare] > .rfx::before, [data-rarity=epic] > .rfx::before, [data-rarity=legendary] > .rfx::before {
  background: linear-gradient(112deg, transparent 38%, oklch(1 0 0 / 0.42) 48%, oklch(1 0 0 / 0.12) 54%, transparent 62%) 160% 0 / 260% 100% no-repeat, linear-gradient(160deg, var(--rc1), var(--rc2));
  animation: rshine 3.4s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
[data-rarity=epic] > .rfx::before { animation-duration: 2.8s; }
/* rare keeps a still gloss and a bright inner edge between sweeps, so it reads shiny even when the band is off the card */
[data-rarity=rare] > .rfx::before {
  background: linear-gradient(112deg, transparent 38%, oklch(1 0 0 / 0.42) 48%, oklch(1 0 0 / 0.12) 54%, transparent 62%) 160% 0 / 260% 100% no-repeat,
    linear-gradient(135deg, transparent 0 28%, oklch(0.96 0.05 230 / 0.30) 28% 40%, transparent 40% 52%, oklch(0.96 0.05 230 / 0.16) 52% 57%, transparent 57%),
    radial-gradient(90% 55% at 18% 0%, oklch(0.95 0.06 230 / 0.55), transparent 62%), linear-gradient(160deg, var(--rc1), var(--rc2));
  box-shadow: inset 0 0 0 1px oklch(0.86 0.10 235), inset 2px 2px 0 1px oklch(0.80 0.12 238 / 0.6);
  animation-duration: 4.2s; }
/* goated: pearl bands (cream, blush, mint, lilac), a still rainbow sheen and a moving one */
:root { --rainbow: linear-gradient(112deg, transparent 18%, oklch(0.80 0.14 25 / 0.6) 28%, oklch(0.90 0.14 95 / 0.6) 36%, oklch(0.85 0.15 150 / 0.6) 44%, oklch(0.80 0.12 230 / 0.6) 52%, oklch(0.74 0.16 300 / 0.6) 60%, transparent 70%);
  --pearl: linear-gradient(160deg, oklch(0.97 0.02 90) 0 18%, oklch(0.91 0.05 350) 18% 36%, oklch(0.94 0.04 170) 36% 54%, oklch(0.90 0.05 285) 54% 72%, oklch(0.96 0.03 60) 72% 100%); }
[data-rarity=goated] > .rfx::before {
  background: var(--rainbow) 160% 0 / 260% 100% no-repeat, linear-gradient(135deg, transparent 30%, oklch(0.85 0.12 330 / 0.35) 45%, oklch(0.88 0.1 190 / 0.35) 55%, transparent 70%),
    radial-gradient(120% 80% at 30% 15%, oklch(1 0.01 90 / 0.65), transparent 55%), var(--pearl);
  animation: rshine 2.6s linear infinite; }
@keyframes rshine { 0% { background-position: 160% 0, 0 0, 0 0, 0 0; } 70%, 100% { background-position: -60% 0, 0 0, 0 0, 0 0; } }
/* sparkle: pixel stars that twinkle over epic and goated cards */
[data-rarity=epic] > .rfx::after, [data-rarity=goated] > .rfx::after { content: ''; position: absolute; inset: 0; pointer-events: none; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' shape-rendering='crispEdges'%3E%3Cpath fill='%23fffbe8' d='M10 6h2v2h-2zM8 8h2v2H8zM12 8h2v2h-2zM10 10h2v2h-2zM44 30h2v2h-2zM42 32h2v2h-2zM46 32h2v2h-2zM44 34h2v2h-2zM22 46h2v2h-2z'/%3E%3C/svg%3E") 0 0 / 60px 60px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' shape-rendering='crispEdges'%3E%3Cpath fill='%23fffbe8' d='M34 12h2v2h-2zM32 14h2v2h-2zM36 14h2v2h-2zM34 16h2v2h-2zM8 38h2v2H8zM52 50h2v2h-2zM50 52h2v2h-2zM54 52h2v2h-2zM52 54h2v2h-2z'/%3E%3C/svg%3E") 30px 18px / 60px 60px;
  animation: rtwinkle 1.4s steps(1) infinite; }
@keyframes rtwinkle { 0% { opacity: 1; } 50% { opacity: 0.25; } }
/* on cards with text, the sparkle keeps to a frame round the edge and never crosses a word */
.rar-card:not(.pix-stage) > .rfx::after {
  -webkit-mask: linear-gradient(var(--ink) 0 0) top / 100% 12px no-repeat, linear-gradient(var(--ink) 0 0) bottom / 100% 12px no-repeat, linear-gradient(var(--ink) 0 0) left / 12px 100% no-repeat, linear-gradient(var(--ink) 0 0) right / 12px 100% no-repeat;
  mask: linear-gradient(var(--ink) 0 0) top / 100% 12px no-repeat, linear-gradient(var(--ink) 0 0) bottom / 100% 12px no-repeat, linear-gradient(var(--ink) 0 0) left / 12px 100% no-repeat, linear-gradient(var(--ink) 0 0) right / 12px 100% no-repeat; }
.rar-card[data-rarity=legendary]:not(.pix-stage) > .rfx::after { -webkit-mask: none; mask: none; }
/* cards take the rarity's colours and type */
.dk-tile.rar-card, .slot.full.rar-card { background: transparent; color: var(--rink); --shade: var(--rsh); }
.dk-tile.rar-card:hover, .dk-tile.rar-card:focus-visible { background: transparent; filter: brightness(1.08); }
.dk-tile.rar-card.in { background: transparent; }
[data-rarity=rare].rar-card:not(.pix-stage) { box-shadow: 0 0 0 2px oklch(0.72 0.16 240 / 0.6); }
[data-rarity=epic].rar-card:not(.pix-stage) { box-shadow: 0 0 0 2px oklch(0.70 0.22 312 / 0.6), 0 0 12px oklch(0.70 0.22 312 / 0.45); }
[data-rarity=goated].rar-card:not(.pix-stage) { box-shadow: 0 0 0 2px oklch(0.95 0.05 330 / 0.8), 0 0 16px oklch(0.85 0.1 300 / 0.55); }
/* legendary: the card itself becomes a gold hexagon with a dark rim and a pulsing aura */
.rar-card[data-rarity=legendary]:not(.pix-stage) { border-color: transparent; box-shadow: none; padding-bottom: 14px; }
.rar-card[data-rarity=legendary]:not(.pix-stage) > .rfx { inset: -3px; filter: drop-shadow(0 0 4px var(--rglow)) drop-shadow(0 0 10px oklch(0.86 0.17 88 / 0.7)); animation: raura 2.2s ease-in-out infinite; }
.rar-card[data-rarity=legendary] > .rfx::before, .rar-card[data-rarity=legendary] > .rfx::after { clip-path: polygon(50% 0, 100% 14%, 100% 86%, 50% 100%, 0 86%, 0 14%); }
.rar-card[data-rarity=legendary]:not(.pix-stage) > .rfx::before { inset: 3px; }
.rar-card[data-rarity=legendary]:not(.pix-stage) > .rfx::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); }
@keyframes raura { 50% { filter: drop-shadow(0 0 7px var(--rglow)) drop-shadow(0 0 18px oklch(0.86 0.17 88 / 0.85)); } }
.dk-tile[data-rarity=legendary] .gem { top: -2px; left: 4px; }
.dk-tile[data-rarity=legendary].in::after { bottom: -4px; }
/* the portrait keeps its arena sky; the rarity shows in its frame and a shine that sweeps over it */
/* on the art, the shine plays over the sky behind the sprite, never over the character */
.pix-stage.rar-card > .rfx { z-index: -1; }
.pix-stage.rar-card > .rfx::before { background-color: transparent; background-image: linear-gradient(112deg, transparent 38%, oklch(1 0 0 / 0.35) 48%, transparent 60%); background-size: 260% 100%; background-repeat: no-repeat; animation: rshine 3.4s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.pix-stage.rar-card[data-rarity=common] > .rfx::before { display: none; }
.pix-stage.rar-card[data-rarity=rare] { border-color: oklch(0.62 0.17 248); }
.pix-stage.rar-card[data-rarity=epic] { border-color: oklch(0.58 0.21 308); }
.pix-stage.rar-card[data-rarity=goated] { border: 5px solid; border-image: var(--pearl) 1; box-shadow: 0 0 0 2px var(--ink), 0 0 14px oklch(0.88 0.1 330 / 0.8), 0 0 26px oklch(0.85 0.1 200 / 0.5); }
.pix-stage.rar-card[data-rarity=goated] > .rfx::before { background-image: var(--rainbow), linear-gradient(135deg, transparent 30%, oklch(0.85 0.12 330 / 0.28) 45%, oklch(0.88 0.1 190 / 0.28) 55%, transparent 70%); background-size: 260% 100%, 100% 100%; animation: rshine 2.6s linear infinite; }
.pix-stage.rar-card[data-rarity=epic] > .rfx::after, .pix-stage.rar-card[data-rarity=goated] > .rfx::after { background-size: 44px 44px, 44px 44px; }
.rar-tag[data-rarity=goated] { background: var(--rainbow) 30% 0 / 180% 100% no-repeat, var(--pearl); box-shadow: 0 0 8px oklch(0.88 0.1 330 / 0.7); animation: rshine 2.6s linear infinite; }
/* the New characters cards wear their rarity too */
.drop.rar-card { position: relative; background: transparent; color: var(--rink); --shade: var(--rsh); }
.drop.rar-card > .rar-tag { justify-self: start; max-width: 100%; }
.drop.rar-card[data-rarity=legendary] { clip-path: none; box-shadow: none; border-color: transparent; padding: 26px 14px 30px; }
.drop.rar-card[data-rarity=legendary] > .rfx::before, .drop.rar-card[data-rarity=legendary] > .rfx::after { clip-path: polygon(50% 0, 100% 5%, 100% 95%, 50% 100%, 0 95%, 0 5%); }
.drop.rar-card[data-rarity=legendary] > .rar-tag { justify-self: center; }
.drop.rar-card[data-rarity=goated] { border: 4px solid; border-image: var(--pearl) 1; clip-path: none; box-shadow: 0 0 16px oklch(0.88 0.1 330 / 0.7), 0 0 30px oklch(0.85 0.1 200 / 0.45); }
.pix-stage.rar-card[data-rarity=legendary] { border: 0; clip-path: polygon(50% 0, 100% 14%, 100% 86%, 50% 100%, 0 86%, 0 14%); }
.dt-art:has(.portrait[data-rarity=legendary]) { filter: drop-shadow(0 0 5px oklch(0.86 0.17 88)) drop-shadow(0 0 12px oklch(0.86 0.17 88 / 0.6)); }
.rc-rar { font: 700 9px/1 'Silkscreen', monospace; letter-spacing: 0.04em; color: var(--rsh); text-transform: uppercase; }
.rar-tag { display: inline-block; padding: 2px 6px; font: 700 10px/1.2 'Silkscreen', monospace; color: var(--rink); background: linear-gradient(160deg, var(--rc1), var(--rc2)); border: 2px solid var(--ink); }
.rar-tag[data-rarity=legendary] { clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); border: 0; padding: 4px 12px; }
.rar-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
/* levels: a badge and a copies bar toward the next level */
.lvline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px; width: 100%; font: 700 9px/1 'Silkscreen', monospace; }
.lvline b { font: inherit; font-size: 10px; }
.lvbar { height: 7px; background: oklch(0.18 0.05 285 / 0.55); border: 2px solid var(--ink); position: relative; overflow: hidden; }
.lvbar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.lvbar.max i { background: linear-gradient(90deg, var(--gold), oklch(0.95 0.08 95)); }
.lvtag { position: absolute; top: -8px; right: -6px; font: 700 9px/1 'Silkscreen', monospace; padding: 3px 4px; background: var(--ink); color: var(--gold); }
.dk-tile .lvline { padding: 0 4px; }
.dt-lv { display: grid; gap: 4px; }
.dt-lv .lvline { font-size: 11px; } .dt-lv .lvline b { font-size: 13px; } .dt-lv .lvbar { height: 10px; }
.dt-lv > small { font-size: 13px; color: var(--shade); }
@media (min-width: 901px) { .dk-detail > .dt-lv { order: -2; } }
.hcard[data-rarity=rare] { border-color: oklch(0.62 0.17 248); } .hcard[data-rarity=epic] { border-color: oklch(0.62 0.21 308); }
.hcard[data-rarity=legendary] { border-color: var(--gold); box-shadow: 0 0 10px oklch(0.86 0.17 88 / 0.6); } .hcard[data-rarity=goated] { border-color: oklch(0.94 0.04 330); box-shadow: 0 0 10px oklch(0.9 0.08 300 / 0.6); }
.hcard .hlv { position: absolute; bottom: 2px; right: 3px; font: 700 8px/1 'Silkscreen', monospace; color: var(--gold); }
/* progress strip: coins, towers, chests */
.prog-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 12px; background: var(--navy2); border: 3px solid var(--ink); }
.prog-strip.guest { grid-template-columns: auto 1fr; font-size: 14px; }
.ps-coins { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; }
.ps-coins b { font: 700 18px/1 'Silkscreen', monospace; color: var(--gold); }
.ps-coins small { grid-column: 2; font: 700 9px/1 'Silkscreen', monospace; color: var(--on-navy); }
.coinico { grid-row: span 2; width: 22px; height: 22px; background: var(--gold); border: 3px solid var(--ink); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); box-shadow: inset -3px -3px 0 var(--gold2), inset 3px 3px 0 oklch(0.95 0.1 95); }
.ps-tower { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; flex-wrap: wrap; }
.ps-tl { display: grid; font-size: 13px; line-height: 1.1; } .ps-tl b { font-family: 'Silkscreen', monospace; } .ps-tl small { color: var(--on-navy); font-size: 11px; }
.ps-tower.behind .ps-tl small { color: oklch(0.78 0.16 40); }
.ps-chest { display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 0; position: relative; color: var(--cream); }
.ps-chest b { font: 700 10px/1 'Silkscreen', monospace; color: var(--gold); }
.ps-chest i { position: absolute; top: -6px; right: -8px; font: 700 10px/1 'Silkscreen', monospace; font-style: normal; background: var(--red); color: var(--cream); padding: 2px 3px; border: 2px solid var(--ink); }
.ps-chest.empty { opacity: 0.8; } .ps-chest.empty small { font: 700 10px/1.15 'Silkscreen', monospace; text-align: center; max-width: 96px; }
button.ps-chest .chest-svg { animation: chestbob 1.2s steps(2) infinite; filter: drop-shadow(0 0 6px oklch(0.86 0.17 88 / 0.8)); }
@keyframes chestbob { 50% { transform: translateY(-3px) rotate(-3deg); } }
.chest-svg { display: block; image-rendering: pixelated; overflow: visible; }
.reward { display: grid; justify-items: center; gap: 8px; }
.rw-coins { display: inline-flex; align-items: center; gap: 8px; font: 700 16px/1 'Silkscreen', monospace; } .rw-coins b { color: var(--gold); font-size: 22px; } .rw-coins .coinico { grid-row: auto; }
.ps-chest.big { padding: 6px 12px 8px; } .ps-chest.big b { font-size: 12px; }
.rw-done { font-size: 14px; }
@media (max-width: 600px) { .prog-strip { grid-template-columns: auto 1fr auto; gap: 8px; padding: 6px 8px; } .ps-tower .btn { width: 100%; } .ps-tl { font-size: 12px; } }

/* towers panel on /deck */
.dk-towers { padding: 16px; display: grid; gap: 12px; }
.dk-towers h2 small { display: block; margin-top: 6px; font-family: 'Pixelify Sans', sans-serif; font-weight: 400; font-size: 14px; color: var(--shade); letter-spacing: 0; }
.tw-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px; align-items: center; }
.tw-card { margin: 0; display: grid; justify-items: center; gap: 6px; padding: 8px 12px; background: var(--navy2); border: 3px solid var(--ink); }
.tw-card figcaption { display: grid; justify-items: center; font-size: 13px; line-height: 1.3; }
.tw-card figcaption > b { font: 700 11px/1.2 'Silkscreen', monospace; }
.tw-card i { font-style: normal; color: var(--gold); }
.tw-up { display: grid; gap: 10px; justify-items: start; }
.tw-up .side-note { margin: 0; }
.tw-pips { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; width: 100%; max-width: 320px; }
.tw-pips i { height: 16px; border: 2px solid var(--ink); background: oklch(0.18 0.05 285); }
.tw-pips i.open { background: repeating-linear-gradient(45deg, oklch(0.70 0.15 75 / 0.55) 0 3px, oklch(0.18 0.05 285) 3px 6px); }
.tw-pips i.on { background: var(--gold); box-shadow: inset -2px -2px 0 var(--gold2); }
.tw-costs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; width: 100%; max-width: 320px; margin-top: -6px; font: 700 9px/1 'Silkscreen', monospace; color: var(--on-navy); text-align: center; }
@media (max-width: 700px) { .tw-row { grid-template-columns: 1fr 1fr; } .tw-up { grid-column: 1 / -1; } .tw-up .btn { width: 100%; } }
.slot small { color: var(--gold); }

/* ---------- the chest opening ---------- */
body.chest-open { overflow: hidden; }
.chest-fx { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; align-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); overflow: hidden;
  background: radial-gradient(60% 50% at 50% 55%, oklch(0.34 0.12 280), oklch(0.12 0.05 285) 75%); color: var(--cream); animation: cxin 260ms cubic-bezier(0.16, 1, 0.3, 1); }
.chest-fx.out { opacity: 0; transition: opacity 240ms; }
@keyframes cxin { from { opacity: 0; } }
.cx-rays { position: absolute; left: 50%; top: 55%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; pointer-events: none; opacity: 0.18; transition: opacity 600ms;
  background: repeating-conic-gradient(from 0deg, oklch(0.92 0.14 90 / 0.9) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(closest-side, var(--ink) 10%, transparent 70%); mask: radial-gradient(closest-side, var(--ink) 10%, transparent 70%); animation: cxspin 24s linear infinite; }
.chest-fx.lit .cx-rays { opacity: 0.55; animation-duration: 9s; }
@keyframes cxspin { to { transform: rotate(1turn); } }
.cx-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(closest-side, transparent 60%, oklch(0.08 0.03 285 / 0.8)); }
.cx-title { position: relative; margin: 0; font: 700 clamp(22px, 4vw, 34px)/1 'Silkscreen', monospace; color: var(--gold); text-shadow: 3px 3px 0 var(--ink); letter-spacing: 0.06em; }
.cx-chest { position: relative; grid-row: 2; background: none; border: 0; padding: 0; cursor: pointer; transform-origin: 50% 100%; }
.cx-chest .chest-svg { width: min(56vw, 240px); height: auto; filter: drop-shadow(0 10px 0 oklch(0.08 0.03 285 / 0.6)); }
.cx-chest[data-state=drop] { animation: cxdrop 520ms cubic-bezier(0.55, 0, 1, 0.45) both; }
@keyframes cxdrop { from { transform: translateY(-80vh) scale(0.9); } }
.cx-chest[data-state=idle] { animation: cxidle 1.6s ease-in-out infinite; }
@keyframes cxidle { 50% { transform: translateY(-6px) scale(1.02); } }
.cx-chest[data-state=shake] { animation: cxshake 140ms steps(2) infinite; }
@keyframes cxshake { 0% { transform: rotate(-4deg) translateX(-3px); } 50% { transform: rotate(4deg) translateX(3px); } }
.cx-glow { position: absolute; left: 50%; top: 40%; width: 60%; height: 30%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, oklch(0.95 0.14 92), transparent); opacity: 0; pointer-events: none; }
.cx-chest[data-state=shake] .cx-glow { opacity: 0.6; animation: cxglow 280ms steps(2) infinite; }
@keyframes cxglow { 50% { opacity: 0.9; } }
.cx-chest[data-state=open] { cursor: default; animation: cxpop 420ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes cxpop { 30% { transform: scale(1.12, 0.9); } }
.cx-chest[data-state=open] .cx-lid { animation: cxlid 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes cxlid { to { transform: translate(6px, -9px) rotate(28deg); opacity: 0; } }
.cx-chest[data-state=open] .cx-glow { opacity: 1; width: 120%; height: 90%; top: 20%; background: radial-gradient(closest-side, oklch(0.98 0.1 92), oklch(0.9 0.15 88 / 0.5) 50%, transparent); }
.chest-fx.thud { animation: cxthud 300ms steps(3); }
@keyframes cxthud { 33% { transform: translateY(6px); } 66% { transform: translateY(-3px); } }
.chest-fx.flash::after, .chest-fx.flash2::after { content: ''; position: absolute; inset: 0; background: oklch(0.99 0.02 92); pointer-events: none; animation: cxflash 500ms ease-out forwards; }
@keyframes cxflash { from { opacity: 0.9; } to { opacity: 0; } }
.cx-hint { position: relative; grid-row: 3; margin: 8px 0 0; min-height: 1.4em; font: 700 14px/1.3 'Silkscreen', monospace; text-align: center; animation: cxblink 1s steps(1) infinite; }
@keyframes cxblink { 50% { opacity: 0.4; } }
.cx-sparks { position: absolute; left: 50%; top: 55%; pointer-events: none; }
.cx-burst i { position: absolute; width: 8px; height: 8px; background: var(--c); box-shadow: 0 0 6px var(--c); animation: cxbit 1.1s cubic-bezier(0.16, 1, 0.3, 1) var(--d) forwards; }
@keyframes cxbit { to { transform: translate(var(--dx), var(--dy)) rotate(180deg); opacity: 0; } }
.cx-cards { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); pointer-events: none; perspective: 900px; z-index: 2; }
.cx-cards:empty { display: none; }
.rcard { width: clamp(138px, 38vw, 200px); aspect-ratio: 5 / 7; opacity: 0; transform: translateY(18vh) scale(0.3); }
.rcard.fly { opacity: 1; transform: none; transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms; }
.rcard-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.rcard.spin .rcard-in { animation: cxcard 1050ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.rcard.spin.long .rcard-in { animation-duration: 1500ms; animation-name: cxcardlong; }
@keyframes cxcard { from { transform: rotateY(0); } to { transform: rotateY(1260deg); } }
@keyframes cxcardlong { from { transform: rotateY(0) scale(1); } 60% { transform: rotateY(1600deg) scale(1.08); } to { transform: rotateY(1980deg) scale(1); } }
.rcard-back, .rcard-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rcard-back { display: grid; place-items: center; border: 4px solid var(--ink); background: repeating-linear-gradient(45deg, var(--brick) 0 10px, var(--brick2) 10px 20px); box-shadow: inset 0 0 0 4px var(--gold); }
.rcard-back span { font: 700 48px/1 'Silkscreen', monospace; color: var(--gold); text-shadow: 3px 3px 0 var(--ink); }
.rcard-face { transform: rotateY(180deg); display: grid; justify-items: center; align-content: center; gap: 4px; padding: 14px 10px 12px; border: 4px solid var(--ink); color: var(--rink); --shade: var(--rsh); text-align: center; }
.rcard-face .spr { width: 62%; height: auto; }
.rcard-face > b { font: 700 13px/1.1 'Silkscreen', monospace; }
.rcard-face .gem { position: absolute; top: -10px; left: -10px; }
.rcard-face .rc-rar { font-size: 11px; }
.rc-x { font: 700 18px/1 'Silkscreen', monospace; color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
.rcard-face .lvline { font-size: 10px; } .rcard-face .lvbar { height: 9px; }
.rcard-face .lvbar i { width: 0; }
.rcard.shown .rcard-face .lvbar i { width: var(--to); transition: width 900ms cubic-bezier(0.16, 1, 0.3, 1) 200ms; }
.rc-up { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%) rotate(-6deg) scale(0); white-space: nowrap; font: 700 13px/1 'Silkscreen', monospace; padding: 6px 8px; background: var(--red); color: var(--cream); border: 3px solid var(--ink); }
.rcard.shown .rc-up { animation: cxstamp 380ms cubic-bezier(0.16, 1, 0.3, 1) 450ms forwards; }
@keyframes cxstamp { from { transform: translateX(-50%) rotate(-6deg) scale(2.2); opacity: 0; } to { transform: translateX(-50%) rotate(-6deg) scale(1); opacity: 1; } }
.rcard[data-rarity=legendary] .rcard-face { border: 0; }
.rcard[data-rarity=legendary] .rcard-face > .rfx { inset: 0; filter: drop-shadow(0 0 8px var(--rglow)) drop-shadow(0 0 22px oklch(0.86 0.17 88 / 0.8)); }
.rcard[data-rarity=legendary] .rcard-face > .rfx::before { inset: 4px; }
.rcard[data-rarity=legendary] .rcard-face > .rfx::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); }
.rcard[data-rarity=epic].shown .rcard-face { box-shadow: 0 0 24px oklch(0.70 0.22 312 / 0.7); }
.rcard[data-rarity=rare].shown .rcard-face { box-shadow: 0 0 20px oklch(0.72 0.16 240 / 0.7); }
.rcard[data-rarity=goated].shown .rcard-face { box-shadow: 0 0 30px oklch(0.95 0.06 330 / 0.9), 0 0 60px oklch(0.8 0.12 280 / 0.6); }
.cx-acts { grid-row: 4; position: relative; z-index: 3; min-height: 48px; }
.cx-done { min-width: 180px; min-height: 48px; font-size: 16px; }
@media (max-width: 600px) { .rcard-face > b { font-size: 11px; } .rc-x { font-size: 15px; } .cx-cards { top: 46%; } }

/* c10: Majin Vegeta's Super Saiyan aura on his sprite: two frames of gold flame that flicker */
.spr .spr-fa, .spr .spr-fb { animation: spr-flick 0.36s step-end infinite; }
.spr .spr-fb { animation-delay: -0.18s; }
@keyframes spr-flick { 50% { opacity: 0; } }
/* ---------- c11: the title screen ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.title-screen { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: var(--ink); color: var(--cream); cursor: pointer; user-select: none; -webkit-user-select: none; transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1), transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.title-screen.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.ts-arena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ts-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 34% at 50% 50%, oklch(0.16 0.05 285 / 0.62), oklch(0.16 0.05 285 / 0.28) 62%, transparent 80%),
    linear-gradient(oklch(0.16 0.05 285 / 0.5), transparent 22%, transparent 78%, oklch(0.16 0.05 285 / 0.55)),
    repeating-linear-gradient(0deg, oklch(0.1 0.03 285 / 0.14) 0 2px, transparent 2px 4px); }
.ts-rays { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; pointer-events: none; opacity: 0.2;
  background: repeating-conic-gradient(from 0deg, oklch(0.9 0.15 88 / 0.85) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(closest-side, var(--ink) 8%, transparent 46%); mask: radial-gradient(closest-side, var(--ink) 8%, transparent 46%); animation: cxspin 30s linear infinite; }
.ts-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: clamp(14px, 3vh, 28px); padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); text-align: center; pointer-events: none; }
.ts-logo { display: grid; justify-items: center; gap: 0.08em; font: 700 clamp(46px, 9.5vw, 148px)/0.9 'Silkscreen', monospace; letter-spacing: 0.02em; }
.ts-line { display: flex; align-items: center; }
.ts-l { display: inline-block; color: var(--gold); animation: tsdrop 700ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 70ms + 150ms) both, tswave 2.4s ease-in-out calc(var(--i) * 120ms + 1s) infinite;
  text-shadow: 0.05em 0 0 var(--ink), -0.05em 0 0 var(--ink), 0 0.05em 0 var(--ink), 0 -0.05em 0 var(--ink), 0.05em 0.05em 0 var(--ink), -0.05em 0.05em 0 var(--ink), 0.05em -0.05em 0 var(--ink), -0.05em -0.05em 0 var(--ink),
    0.1em 0.1em 0 var(--brick2), 0.14em 0.14em 0 var(--ink); }
.ts-line2 .ts-l { color: var(--cream); letter-spacing: 0.12em; font-size: 0.62em;
  text-shadow: 0.07em 0 0 var(--ink), -0.07em 0 0 var(--ink), 0 0.07em 0 var(--ink), 0 -0.07em 0 var(--ink), 0.12em 0.12em 0 var(--red), 0.17em 0.17em 0 var(--ink); }
@keyframes tsdrop { from { transform: translateY(-120vh) scale(1.3); } 70% { transform: translateY(0.06em) scale(1, 0.9); } }
@keyframes tswave { 0%, 100% { transform: none; } 50% { transform: translateY(-0.06em); } }
/* the J: a $JIANCO coin that flips over once every second */
.ts-coin { display: inline-block; width: 0.96em; height: 0.96em; margin-right: 0.04em; perspective: 4em; animation: tsdrop 700ms cubic-bezier(0.16, 1, 0.3, 1) 150ms both; filter: drop-shadow(0.1em 0.1em 0 var(--ink)); }
.ts-coin-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: tsflip 1s cubic-bezier(0.45, 0, 0.2, 1) infinite; }
.ts-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ts-face svg { display: block; width: 100%; height: 100%; }
.ts-back { transform: rotateY(180deg); }
@keyframes tsflip { 0%, 62% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
/* the coin's gold edge: edge-on in mid-flip it still reads as a thick coin, never a sliver */
.ts-coin-in::before { content: ''; position: absolute; top: 6%; bottom: 6%; left: 50%; width: 0.16em; margin-left: -0.08em; background: linear-gradient(180deg, #fff3b0, #f5c542 40%, #b8860b); box-shadow: 0 0 0 0.03em var(--ink); transform: rotateY(90deg); }
.ts-press { position: relative; z-index: 2; margin: 0; padding: 10px 18px; font: 700 clamp(16px, 2vw, 24px)/1.2 'Silkscreen', monospace; color: var(--cream); letter-spacing: 0.08em; background: oklch(0.19 0.05 285 / 0.88); border: 3px solid var(--ink); clip-path: var(--notch); animation: tsblink 1s steps(1) infinite; }
@keyframes tsblink { 50% { color: var(--gold); } }
.ts-map { margin: 0; font: 700 12px/1 'Silkscreen', monospace; padding: 6px 10px; background: var(--navy); color: var(--gold); border: 3px solid var(--ink); clip-path: var(--notch); }
.ts-map.swap { background: var(--navy); }
.ts-map i { font-style: normal; color: var(--on-navy); }
.ts-map.swap { animation: tsswap 380ms steps(3); }
@keyframes tsswap { 0% { transform: scale(1.25); } }
@media (max-width: 600px) { .ts-logo { font-size: clamp(40px, 15vw, 64px); } .ts-press { font-size: 14px; } }

/* ---------- c11: the shop ---------- */
.shop { width: min(1240px, 100%); margin: 0 auto; padding: 22px 16px 36px; display: grid; gap: 16px; }
.sh-head { padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.sh-head h2 { font-size: clamp(26px, 3vw, 36px); }
.sh-head p { margin: 6px 0 0; max-width: 62ch; }
.sh-wallet { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; padding: 10px 16px; background: var(--navy); color: var(--cream); border: 3px solid var(--ink); clip-path: var(--notch); }
.sh-wallet .coinico { width: 30px; height: 30px; }
.sh-wallet b { font: 700 28px/1 'Silkscreen', monospace; color: var(--gold); }
.sh-wallet small { grid-column: 2; font: 700 10px/1.2 'Silkscreen', monospace; color: var(--on-navy); }
.sh-waiting { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; } .sh-waiting b { flex: 1; font-family: 'Silkscreen', monospace; font-size: 14px; }
.sh-band { justify-self: start; font-size: 18px; padding: 8px 12px; background: var(--ink); color: var(--gold); clip-path: var(--notch); }
.sh-band small { display: block; margin-top: 4px; font: 400 12px/1.3 'Pixelify Sans', sans-serif; color: var(--on-navy); }
.sh-chests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sh-chest { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 14px 18px; text-align: center; }
.sh-emote { display: flex !important; flex-direction: column; align-items: center; } .sh-emote .btn, .sh-emote .tag { margin-top: auto; }
@media (min-width: 1081px) { .sh-emotes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sh-chest h3 { font-size: 17px; }
.sh-chest p { margin: 0; font-size: 15px; line-height: 1.35; min-height: 3.9em; }
.sh-chest .btn { width: 100%; margin-top: auto; }
.sh-art { height: 118px; display: grid; place-items: end center; }
.sh-art .chest-svg { width: 120px; height: auto; filter: drop-shadow(0 6px 0 oklch(0.19 0.05 285 / 0.35)); animation: chestbob 1.6s steps(2) infinite; }
.sh-price { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1 'Silkscreen', monospace; } .sh-price b { font-size: 20px; } .sh-price .coinico { grid-row: auto; }
.sh-chest[data-kind=bronze] { background: linear-gradient(oklch(0.88 0.06 60), oklch(0.82 0.08 55)); color: var(--ink); }
.sh-chest[data-kind=bronze] .sh-price b { color: var(--brick2); }
.sh-chest[data-kind=goated] { color: var(--ink); }
.sh-chest[data-kind=goated] .sh-price b { color: oklch(0.45 0.2 320); }
.sh-chest[data-kind=bronze] h3, .sh-chest[data-kind=goated] h3, .sh-chest[data-kind=bronze] p, .sh-chest[data-kind=goated] p, .sh-chest[data-kind=bronze] .sh-price, .sh-chest[data-kind=goated] .sh-price { color: var(--ink); text-shadow: none; }
.sh-chest[data-kind=goated] .sh-pool, .sh-chest[data-kind=bronze] .sh-pool { color: var(--ink); background: oklch(0.19 0.05 285 / 0.1); }
.sh-chest[data-kind=legendary] { background: radial-gradient(90% 60% at 50% 20%, oklch(0.42 0.12 285), var(--navy2)); color: var(--cream); box-shadow: inset -3px -3px 0 oklch(0.18 0.07 285), inset 3px 3px 0 oklch(0.5 0.12 285), 0 0 0 3px var(--gold) inset; }
.sh-chest[data-kind=legendary] h3, .sh-chest[data-kind=legendary] .sh-price b { color: var(--gold); }
.sh-chest[data-kind=goated] { background: linear-gradient(135deg, oklch(0.96 0.03 330), oklch(0.95 0.04 250) 40%, oklch(0.96 0.05 150) 70%, oklch(0.96 0.05 80)); }
.sh-chest[data-kind=goated] .chest-svg { animation: chestbob 1.6s steps(2) infinite, pearl 4s linear infinite; }
@keyframes pearl { to { filter: drop-shadow(0 6px 0 oklch(0.19 0.05 285 / 0.35)) hue-rotate(360deg); } }
.sh-chest[data-kind=legendary] .sh-art { background: radial-gradient(closest-side, oklch(0.86 0.16 88 / 0.35), transparent); }
.sh-pools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sh-pool { display: grid; justify-items: center; gap: 2px; padding: 4px; background: oklch(0.19 0.05 285 / 0.18); border: 2px solid var(--ink); }
.sh-pool small { font: 700 9px/1 'Silkscreen', monospace; }
.sh-pool.locked .spr { filter: grayscale(1) brightness(0.55); }
.sh-emotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sh-emote { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 14px 12px; text-align: center; }
.sh-emote > b { font: 700 13px/1.15 'Silkscreen', monospace; }
.sh-emote > small { font-size: 13px; line-height: 1.3; color: var(--shade); }
.sh-efig { width: 72px; height: 72px; display: grid; place-items: center; }
.sh-foot { margin: 0; padding: 10px 14px; background: oklch(0.19 0.05 285 / 0.72); color: var(--cream); justify-self: start; }
a.ps-chest { text-decoration: none; }
@media (max-width: 1080px) { .sh-chests { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sh-chests { grid-template-columns: 1fr 1fr; gap: 10px; } .sh-chest { padding: 12px 8px 14px; } .sh-art { height: 84px; } .sh-art .chest-svg { width: 84px; } .sh-chest p { font-size: 13px; min-height: 0; } .sh-chest h3 { font-size: 13px; } .sh-emotes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .tabs [data-how], .tabs [data-music] { font-size: 0; gap: 0; } }

/* ---------- c11: the card detail waits for a tap, and each demo step plays on a tap ---------- */
.dk-tap { margin: 8px 0 10px; font-size: 15px; color: var(--cream); }
.cx-chest:focus-visible { outline: none; box-shadow: none; }
.cx-chest:focus-visible .chest-svg { filter: drop-shadow(0 10px 0 oklch(0.08 0.03 285 / 0.6)) drop-shadow(0 0 14px var(--cx-glow, oklch(0.9 0.15 88))); }
.chest-fx .cx-hint { font-size: clamp(16px, 2vw, 22px); color: var(--gold); text-shadow: 3px 3px 0 var(--ink); }
.dk-pick { display: grid; justify-items: center; gap: 10px; padding: 28px 12px; text-align: center; grid-column: 1 / -1; }
.dk-pick-art { display: flex; gap: 8px; } .dk-pick-art .spr:nth-child(2) { transform: translateY(-8px); }
.dk-pick h2 { font-size: 22px; } .dk-pick p { margin: 0; max-width: 34ch; }
.demo-steps li { padding: 0; }
.demo-steps li button { display: block; padding: 5px 8px; min-height: 28px; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.demo-steps li:not([aria-current]):hover { background: var(--gold); }
.demo-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--shade); }

/* ---------- c11: chest kinds and the cinematic Legendary and Goated openings ---------- */
.chest-fx .cx-glow { background: radial-gradient(closest-side, var(--cx-glow, oklch(0.95 0.14 92)), transparent); }
.chest-fx[data-kind=legendary] { background: radial-gradient(60% 50% at 50% 55%, oklch(0.3 0.13 290), oklch(0.08 0.04 285) 75%); }
.chest-fx[data-kind=goated] { background: radial-gradient(60% 50% at 50% 55%, oklch(0.42 0.1 320), oklch(0.12 0.05 285) 75%); }
.chest-fx[data-kind=goated] .cx-rays { animation: cxspin 16s linear infinite, pearlrays 5s linear infinite; }
@keyframes pearlrays { to { filter: hue-rotate(360deg); } }
.chest-fx[data-kind=goated] .chest-svg { animation: pearl 4s linear infinite; }
.chest-fx.epic .cx-chest[data-state=drop] { animation: cxdropepic 1000ms cubic-bezier(0.55, 0, 1, 0.45) both; }
.chest-fx.intro .cx-chest[data-state=drop] { animation-delay: 1200ms; }
@keyframes cxdropepic { 0% { transform: translateY(-90vh) scale(0.6) rotate(-8deg); } 80% { transform: translateY(0) scale(1.1, 0.86); } }
.chest-fx.epic.lit .cx-rays { opacity: 0.8; animation-duration: 6s; }
.cx-bars { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.cx-bars i { position: absolute; left: 0; right: 0; height: 9vh; background: oklch(0.06 0.02 285); z-index: 4; pointer-events: none; animation: cxbar 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.cx-bars i:first-child { top: 0; } .cx-bars i:last-child { bottom: 0; transform-origin: bottom; }
@keyframes cxbar { from { transform: scaleY(0); } }
.chest-fx.epic .cx-title { position: relative; z-index: 5; margin-top: 9vh; }
.chest-fx.epic .cx-acts { position: relative; z-index: 5; margin-bottom: 9vh; }
.cx-intro { position: absolute; left: 0; right: 0; top: 46%; margin: 0; z-index: 5; text-align: center; font: 700 clamp(18px, 3.4vw, 40px)/1.1 'Silkscreen', monospace; color: var(--gold); letter-spacing: 0.08em; text-shadow: 3px 3px 0 var(--ink); padding: 0 16px; animation: cxintro 2200ms cubic-bezier(0.16, 1, 0.3, 1) both; pointer-events: none; }
@keyframes cxintro { 0% { opacity: 0; transform: scale(0.8); letter-spacing: 0.4em; } 25% { opacity: 1; transform: none; letter-spacing: 0.08em; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }
.chest-fx.intro .cx-title { animation: cxin 400ms 1600ms both; }
.rc-unlock { background: var(--gold); color: var(--ink); }

/* ================= c12: the slotted deck, dramatic pages, the ladder's stage ================= */
/* the deck: three plain slots on top, Legendary / Goated / Legendary underneath on a special plinth */
.tray, .dk-deck .tray, .lobby .tray { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 620px; width: 100%; margin: 0 auto; }
.tray-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tray-special { position: relative; padding: 16px 10px 10px; background: linear-gradient(180deg, oklch(0.26 0.09 280), oklch(0.20 0.07 285)); border: 3px solid var(--ink); box-shadow: inset 0 3px 0 oklch(0.36 0.12 290), 0 0 0 2px oklch(0.84 0.16 86 / 0.35); }
.tray-special::before { content: 'SPECIAL SLOTS: 2 LEGENDARY, 1 GOATED. LOWER CARDS FIT TOO'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font: 700 9px/1 'Silkscreen', monospace; letter-spacing: 0.06em; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); padding: 2px 6px; white-space: nowrap; }
.tray .slot { min-height: 128px; aspect-ratio: auto; padding: 12px 4px 8px; }
@media (min-width: 901px) { .dk-deck .tray { max-width: 780px; } .dk-deck .tray .slot { min-height: 140px; } .dk-deck .tray .slot .spr { width: 52px; height: 52px; } }
.dk-minitray { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dk-minitray .slot { min-height: 84px; }
.tray-special .slot[data-kind=goated] { transform: translateY(-6px); }
.slot.empty { display: grid; place-items: center; align-content: center; gap: 4px; border: 3px dashed var(--on-navy); background: oklch(0.21 0.07 270); color: var(--on-navy); cursor: pointer; }
.slot.empty b { font: 700 12px/1 'Silkscreen', monospace; }
.slot.empty small { font: 500 11px/1.2 'Pixelify Sans', sans-serif; color: var(--on-navy); max-width: 16ch; }
.slot .sl-ico { font: 700 22px/1 'Silkscreen', monospace; }
.slot.empty[data-kind=legendary] { border-color: oklch(0.84 0.16 86); color: oklch(0.90 0.13 90); background: radial-gradient(circle at 50% 40%, oklch(0.84 0.16 86 / 0.22), transparent 70%), oklch(0.22 0.07 280); clip-path: polygon(50% 0, 100% 12%, 100% 88%, 50% 100%, 0 88%, 0 12%); border: 0; box-shadow: inset 0 0 0 3px oklch(0.84 0.16 86); }
.slot.empty[data-kind=legendary] small { color: oklch(0.86 0.10 88); }
.slot.empty[data-kind=goated] { border: 3px dashed; border-color: oklch(0.92 0.06 330); color: oklch(0.95 0.04 330); background: radial-gradient(circle at 50% 40%, oklch(0.85 0.12 330 / 0.3), oklch(0.85 0.10 200 / 0.12) 55%, transparent 75%), oklch(0.22 0.07 285); box-shadow: 0 0 14px oklch(0.88 0.1 330 / 0.45); }
.slot.empty[data-kind=goated] small { color: oklch(0.92 0.05 330); }
.slot.empty:hover, .slot.empty:focus-visible { filter: brightness(1.18); }
.slot[disabled] { opacity: 0.35; cursor: not-allowed; animation: none; }
.slot .sl-note { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font: 700 8px/1 'Silkscreen', monospace; color: var(--rink); opacity: 0.8; white-space: nowrap; }
.slot.empty.swap { background: var(--gold); color: var(--ink); }
.slot.empty.swap small { color: var(--ink); }
.avg .ok { color: oklch(0.84 0.16 86); } .avg .todo { color: oklch(0.78 0.14 40); }
.slot.dealt { animation: deal 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes deal { from { opacity: 0; transform: translateY(-26px) rotateY(90deg) scale(0.8); } }
.dk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dk-head h2 { display: grid; gap: 4px; }
.dk-tools { display: flex; gap: 6px; }
.dk-tools .btn { display: inline-flex; align-items: center; gap: 6px; }
.dice { width: 14px; height: 14px; background: radial-gradient(circle, var(--ink) 1.5px, transparent 2px) 2px 2px / 5px 5px, var(--cream); border: 2px solid var(--ink); display: inline-block; }
.dk-row .btn[disabled] { opacity: 0.5; }
/* the card list, under the deck, in rarity bands from common up to goated */
.dk-groups { display: grid; gap: 22px; }
.dk-group { display: grid; gap: 10px; }
.dk-gh { display: flex; align-items: center; gap: 10px; font-size: 14px; padding-bottom: 8px; background: linear-gradient(var(--gl, var(--navy-hi)), var(--gl, var(--navy-hi))) left bottom / 100% 3px no-repeat; }
.dk-gh small { font: 500 14px/1.2 'Pixelify Sans', sans-serif; color: var(--on-navy); }
.dk-group[data-rarity=legendary] .dk-gh { --gl: oklch(0.84 0.16 86); }
.dk-group[data-rarity=goated] .dk-gh { background: var(--pearl) left bottom / 100% 3px no-repeat; }
.battle small { letter-spacing: 0; }
.lockline.inline { background: var(--gold); color: var(--ink); }

/* the battle lobby: the arena on a turning sunburst, the bot's card in red steel, a battle button that shines */
.lobby .arena-box::before { content: ''; position: absolute; inset: -6% -30%; z-index: -1; pointer-events: none; background: repeating-conic-gradient(from 0deg at 50% 45%, oklch(0.84 0.16 86 / 0.16) 0 9deg, transparent 9deg 18deg); -webkit-mask: radial-gradient(closest-side, var(--ink) 30%, transparent 100%); mask: radial-gradient(closest-side, var(--ink) 30%, transparent 100%); animation: burst 40s linear infinite; }
@keyframes burst { to { transform: rotate(360deg); } }
.lobby .arena-frame { box-shadow: inset -4px -4px 0 var(--brick2), inset 4px 4px 0 oklch(0.68 0.13 45), 0 0 0 4px var(--ink), 0 0 36px oklch(0.84 0.16 86 / 0.45), 0 18px 0 -6px oklch(0.19 0.05 285 / 0.5); }
.lobby .botcard { box-shadow: inset 0 6px 0 var(--red), inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 var(--navy2), inset var(--px) var(--px) 0 var(--navy-hi); padding-top: 22px; }
.lobby .botcard h2 { font-size: clamp(26px, 2.4vw, 34px); color: oklch(0.80 0.15 30); text-shadow: 3px 3px 0 var(--ink); }
.lobby .botcard.boss h2 { color: var(--gold); }
.lobby .deckpanel { box-shadow: inset 0 6px 0 var(--gold), inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 var(--navy2), inset var(--px) var(--px) 0 var(--navy-hi); padding-top: 22px; }
.battle { overflow: hidden; text-shadow: 2px 2px 0 oklch(0.94 0.1 95); letter-spacing: 0.04em; animation: bpulse 2.4s ease-in-out infinite; text-decoration: none; display: block; text-align: center; }
.battle::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, oklch(1 0 0 / 0.55) 48%, transparent 60%) -120% 0 / 60% 100% no-repeat; animation: bshine 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite; pointer-events: none; }
@keyframes bshine { 60%, 100% { background-position: 220% 0; } }
@keyframes bpulse { 50% { box-shadow: inset -6px -6px 0 var(--gold2), inset 6px 6px 0 oklch(0.94 0.1 95), 0 0 24px oklch(0.84 0.16 86 / 0.7); } }
.battle.build { background: oklch(0.62 0.16 40); color: var(--cream); text-shadow: 2px 2px 0 var(--ink); box-shadow: inset -6px -6px 0 var(--brick2), inset 6px 6px 0 oklch(0.72 0.14 45); animation: none; font-size: clamp(22px, 2.2vw, 30px); }

/* the locker: the preview tower under stage spotlights */
.lk-stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; background: conic-gradient(from 160deg at 20% -10%, transparent 0 8deg, oklch(1 0.02 90 / 0.28) 8deg 18deg, transparent 18deg), conic-gradient(from 176deg at 80% -10%, transparent 0 6deg, oklch(1 0.02 90 / 0.28) 6deg 16deg, transparent 16deg); animation: sweep 6s ease-in-out infinite alternate; }
.lk-stage > * { position: relative; z-index: 1; }
@keyframes sweep { to { transform: translateX(6%); } }
.lk-tile { transition: transform 140ms var(--step), filter 140ms; }
.lk-tile:hover, .lk-tile:focus-visible { transform: translateY(-3px); filter: brightness(1.1); }
.lk-deck { box-shadow: inset 0 6px 0 var(--gold), inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 var(--navy2), inset var(--px) var(--px) 0 var(--navy-hi); padding-top: 22px; }

/* the ladder's stage: a night arena with sweeping spotlights, the podium in the light */
.ladder-stage { position: relative; isolation: isolate; min-height: 100%; background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff3b0' d='M10 12h2v2h-2zM70 30h2v2h-2zM100 8h2v2h-2zM40 80h2v2h-2zM90 100h2v2h-2zM20 60h1v1h-1zM60 60h1v1h-1zM110 70h1v1h-1zM30 110h1v1h-1zM80 50h1v1h-1z'/%3E%3C/svg%3E") 0 0 / 240px 240px,
    radial-gradient(60% 40% at 50% 0%, oklch(0.40 0.14 290 / 0.9), transparent 70%),
    linear-gradient(180deg, oklch(0.16 0.06 285), oklch(0.22 0.08 280) 55%, oklch(0.18 0.06 285)); }
.ladder-stage::before, .ladder-stage::after { content: ''; position: absolute; top: 0; width: 40%; height: 70%; z-index: -1; pointer-events: none; transform-origin: 50% 0; background: linear-gradient(180deg, oklch(0.95 0.08 90 / 0.28), transparent 85%); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); animation: spot 7s ease-in-out infinite alternate; }
.ladder-stage::before { left: 5%; transform: rotate(-18deg); }
.ladder-stage::after { right: 5%; transform: rotate(18deg); animation-delay: -3.5s; }
@keyframes spot { from { transform: rotate(-24deg); } to { transform: rotate(10deg); } }
.ladder-stage::after { animation-name: spot2; }
@keyframes spot2 { from { transform: rotate(24deg); } to { transform: rotate(-10deg); } }
.ladder-wrap { position: relative; }
/* the sunburst and the spotlights never widen the page */
.lobby, .ladder-stage { overflow-x: clip; }
.lad-meter { display: block; height: 10px; margin: 4px 0 2px; background: oklch(0.16 0.05 285); border: 2px solid var(--ink); }
.lad-meter i { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.lad-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; }
.lad-title { max-width: none; }
.lad-title h2 { font-size: clamp(26px, 3vw, 42px); }
@media (min-width: 1400px) {
  .lad-hero { grid-template-columns: minmax(0, 1fr) 300px; }
  .lad-hero .lt-pot { width: 100%; }
  .lad-title h2 { font-size: clamp(22px, 1.6vw, 38px); white-space: nowrap; }
}
.lad-main .table th, .lad-main .table td { padding: 8px 12px; }
.lad-main .lt-pot { justify-self: start; width: min(100%, 440px); }
.podium { margin-bottom: 8px; }
.dt-acts a.btn { text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.pod-note { margin: 0 auto 22px; text-align: center; font-size: 14px; color: var(--on-navy); }
@media (max-width: 900px) { small.pod-w { display: none; } }
.slot.empty[data-kind=goated] { border: 0; clip-path: polygon(50% 0, 100% 12%, 100% 88%, 50% 100%, 0 88%, 0 12%); box-shadow: inset 0 0 0 3px oklch(0.92 0.06 330), inset 0 0 18px oklch(0.85 0.12 300 / 0.5); }
.lad-main { padding: 20px; overflow: auto; background: oklch(0.24 0.08 280 / 0.92); }
.lad-side { display: grid; gap: 16px; align-content: start; }
.lad-hero { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.lad-title { display: grid; gap: 8px; max-width: 46ch; }
.lad-title .plate { background: var(--gold); color: var(--ink); }
.lad-title h2 { font-size: clamp(28px, 3.4vw, 46px); color: var(--cream); text-shadow: 4px 4px 0 var(--ink), 0 0 24px oklch(0.84 0.16 86 / 0.5); }
.lad-main .lt-pot { position: relative; padding: 12px 14px 12px 78px; min-width: 240px; border: 3px solid var(--gold); background: linear-gradient(160deg, oklch(0.24 0.08 280), oklch(0.16 0.05 285)); box-shadow: 0 0 22px oklch(0.84 0.16 86 / 0.45); }
.lad-main .lt-pot b { font-size: 30px; text-shadow: 3px 3px 0 var(--ink); }
.lad-trophy { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); animation: trophy 2.4s steps(2) infinite; }
.lad-trophy svg { display: block; filter: drop-shadow(0 0 8px oklch(0.84 0.16 86 / 0.8)); }
@keyframes trophy { 50% { transform: translateY(calc(-50% - 3px)); } }
.lad-ends { color: var(--gold); font-family: 'Silkscreen', monospace; }
/* the podium: second, first (tallest, crowned), third */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; max-width: 640px; margin: 20px auto 26px; }
.pod { display: grid; justify-items: center; min-width: 0; text-align: center; }
.pod-top { display: grid; justify-items: center; gap: 4px; padding: 0 4px 8px; min-width: 0; max-width: 100%; }
.pod-crown { animation: trophy 1.6s steps(2) infinite; line-height: 0; }
.pod-crown svg { filter: drop-shadow(0 0 6px oklch(0.84 0.16 86 / 0.9)); }
.pod-medal { width: 38px; height: 38px; display: grid; place-items: center; font: 700 18px/1 'Silkscreen', monospace; color: var(--ink); border: 3px solid var(--ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--pc); }
.pod-who { max-width: 100%; min-width: 0; overflow: hidden; font-size: 15px; font-weight: 600; color: var(--cream); }
.pod-who .xname, .pod-who .addr { max-width: 100%; }
.pod-who.open { font: 700 13px/1 'Silkscreen', monospace; color: var(--on-navy); }
.pod-w { font: 700 18px/1 'Silkscreen', monospace; color: var(--pc); }
.pod-w small { font-size: 11px; color: var(--on-navy); }
small.pod-w { font: 500 12px/1.2 'Pixelify Sans', sans-serif; color: var(--on-navy); }
.pod-step { width: 100%; display: grid; place-items: start center; padding-top: 10px; border: 3px solid var(--ink); background: linear-gradient(180deg, var(--pc), color-mix(in oklab, var(--pc) 55%, var(--ink))); box-shadow: inset 4px 4px 0 oklch(1 0 0 / 0.35), inset -4px -4px 0 oklch(0 0 0 / 0.25); }
.pod-step span { font: 700 18px/1 'Silkscreen', monospace; color: var(--ink); text-shadow: 2px 2px 0 oklch(1 0 0 / 0.4); }
.pod-1 { --pc: #f5c542; } .pod-2 { --pc: #c7c9d6; } .pod-3 { --pc: #d08a4e; }
.pod-1 .pod-step { height: 130px; box-shadow: inset 4px 4px 0 oklch(1 0 0 / 0.4), inset -4px -4px 0 oklch(0 0 0 / 0.25), 0 0 30px oklch(0.84 0.16 86 / 0.6); }
.pod-2 .pod-step { height: 92px; } .pod-3 .pod-step { height: 70px; }
.pod.me .pod-who { color: var(--gold); }
.lad-main .table th { background: oklch(0.16 0.05 285); color: var(--gold); }
.lad-main .table tr:nth-child(-n+3) td.n:first-child { color: var(--gold); font-family: 'Silkscreen', monospace; font-weight: 700; }

@media (max-width: 900px) {
  .dk-deck { position: static; }
  .tray, .dk-deck .tray { gap: 8px; }
  .tray-row { gap: 6px; }
  .tray .slot, .dk-deck .tray .slot { min-height: 76px; padding: 10px 2px 4px; }
  .dk-deck .tray .slot .spr { width: 36px; height: 36px; }
  .dk-deck .tray .slot.full b { display: block; font-size: 9px; }
  .tray .slot.empty small, .tray .slot .sl-note { display: none; }
  .tray .slot.empty b { font-size: 10px; }
  .tray .slot.empty[data-kind=any] small { display: block; font-size: 10px; }
  .dk-deck .avg, .deckpanel .avg { margin-top: 6px; }
  .dk-deck .tray .slot.empty b { display: block; font-size: 10px; }
  .tray-special { padding: 14px 6px 6px; }
  .tray-special::before { font-size: 8px; content: '2 LEGENDARY, 1 GOATED. LOWER CARDS FIT TOO'; }
  .dk-minitray { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dk-minitray .slot { min-height: 64px; }
  .podium { gap: 6px; }
  .pod-1 .pod-step { height: 96px; } .pod-2 .pod-step { height: 70px; } .pod-3 .pod-step { height: 54px; }
  .lad-main { padding: 14px 12px; }
  .lad-main .lt-pot { width: 100%; }
  .ladder-stage::before, .ladder-stage::after { width: 70%; }
}

@media (prefers-reduced-motion: reduce) {
  .spr .spr-fa, .spr .spr-fb { animation: none; }
  .spr .spr-fb { opacity: 0; }
  body::before { animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
