/* Supporting pages are separate bundles; this link does not affect game layout. */
.home-support { margin-top: 13px; text-align: center; font-size: 12px; }
.home-support a { color: #c3d8ff; text-decoration: underline; text-underline-offset: 4px; }
.home-support a:hover, .home-support a:focus-visible { color: white; }
/* Rabid Rivals — celestial glass UI */
:root {
  --accent: #5B8CFF;
  --glow: #9CC2FF;
  --tint: #0B2466;
  --ink: #F3F7FF;
  --ink-2: #B9CCF2;
  --ink-3: #8EA6D6;
  --sky-1: #040C26;
  --sky-2: #0A1D52;
  --sky-3: #14388C;
  --gold: #FFD66B;
  --glass: rgba(150, 185, 255, 0.08);
  --glass-2: rgba(150, 185, 255, 0.14);
  --line: rgba(170, 205, 255, 0.24);
  --radius: 22px;
  --display: 'Fredoka', 'Inter', system-ui, sans-serif;
  --ui: 'Inter', system-ui, sans-serif;
  --a: #4F7DF3;
  --b: #F59E42;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--ui); color: var(--ink); font-size: 18px; line-height: 1.45;
  background: radial-gradient(120% 80% at 50% 0%, var(--sky-3) 0%, var(--sky-2) 38%, var(--sky-1) 100%);
  background-color: var(--sky-1);
  min-height: 100dvh; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.stars { position: absolute; inset: -10%; background-repeat: repeat; }
.stars.s1 {
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, #fff, transparent 60%),
    radial-gradient(1px 1px at 120px 80px, #cfe0ff, transparent 60%),
    radial-gradient(1.6px 1.6px at 200px 160px, #fff, transparent 60%),
    radial-gradient(1px 1px at 60px 210px, #bcd3ff, transparent 60%),
    radial-gradient(1.2px 1.2px at 250px 40px, #fff, transparent 60%);
  background-size: 280px 260px; opacity: .8; animation: twinkle 6s ease-in-out infinite;
}
.stars.s2 {
  background-image:
    radial-gradient(2px 2px at 90px 120px, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 330px 260px, #e6efff, transparent 60%),
    radial-gradient(2.4px 2.4px at 400px 60px, color-mix(in srgb, var(--glow) 80%, white), transparent 60%);
  background-size: 470px 380px; opacity: .6; animation: twinkle 9s ease-in-out infinite reverse;
}
@keyframes twinkle { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
.nebula { position: absolute; inset: 0;
  background: radial-gradient(40% 30% at 80% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
              radial-gradient(35% 28% at 12% 45%, rgba(120, 170, 255, .16), transparent 70%); }
.clouds { position: absolute; left: -10%; right: -10%; bottom: 4%; height: 34%; }
.clouds i { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 220, 255, .22), transparent); filter: blur(8px); animation: drift 38s ease-in-out infinite alternate; }
.clouds i:nth-child(1) { width: 60%; height: 60%; left: 0; bottom: 10%; }
.clouds i:nth-child(2) { width: 50%; height: 50%; left: 45%; bottom: 25%; animation-duration: 46s; }
.clouds i:nth-child(3) { width: 40%; height: 40%; left: 25%; bottom: 0; animation-duration: 30s; }
.clouds i:nth-child(4) { width: 35%; height: 45%; right: 0; bottom: 5%; animation-duration: 52s; }
@keyframes drift { to { transform: translateX(6%); } }
.ocean { position: absolute; left: 0; right: 0; bottom: 0; height: 16%;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--tint) 70%, #030a20) 70%);
  mask: linear-gradient(transparent, #000 40%); }
.reduced .stars, .reduced .clouds i { animation: none; }

#app { position: relative; z-index: 1; }
.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; animation: screenIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }
.reduced .screen.active { animation: none; }

/* ---------- type ---------- */
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .3em; color: color-mix(in srgb, var(--glow) 75%, white); text-transform: uppercase; }
.eyebrow.green { color: #7BE8B5; }
.title { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 11vw, 80px); line-height: .95; margin: 6px 0 4px; letter-spacing: .01em;
  text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 70%, transparent); outline: none; }
.title-md { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 7vw, 40px); margin: 2px 0 0; line-height: 1.05; outline: none; }
.subtitle { margin: 0 0 22px; font-weight: 700; letter-spacing: .3em; font-size: 14px; color: var(--ink-2); }
.hint { margin: 4px 0 0; color: var(--ink-3); font-size: 15px; }
.section-label { font-size: 13px; letter-spacing: .3em; color: var(--ink-2); margin: 28px 4px 12px; font-weight: 700; }
.legal { color: var(--ink-3); font-size: 13px; text-align: center; margin: 28px auto 8px; max-width: 520px; }
.empty-note { margin: 0 4px; color: var(--ink-3); font-size: 16px; padding: 18px; border: 1.5px dashed var(--line); border-radius: 18px; text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 24px; border-radius: 999px;
  font-weight: 800; letter-spacing: .08em; font-size: 16px; transition: transform .15s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--glow) 55%, white)); color: #0A1E57;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 -3px 0 rgba(10, 30, 87, .15); }
.btn.primary:hover { box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn.glassy { background: var(--glass-2); border: 1px solid var(--line); color: var(--ink); backdrop-filter: blur(10px); }
.btn.glassy:hover { background: rgba(170, 205, 255, .2); }
.btn.ghost { color: var(--ink-2); border: 1.5px solid transparent; }
.btn.ghost:hover { border-color: var(--line); }
.btn.xl { min-height: 66px; font-size: 19px; padding: 0 38px; }
.btn.small { min-height: 48px; padding: 0 16px; font-size: 14px; }
.btn.wide { grid-column: 1 / -1; }
.btn.danger-btn { background: #FF6B7A; color: #2A0610; }
.round-btn { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--line); color: var(--ink); transition: transform .15s, background .2s; }
.round-btn svg { width: 24px; height: 24px; }
.round-btn:hover { background: rgba(170, 205, 255, .22); }
.round-btn:active { transform: scale(.92); }
.round-btn.big { width: 60px; height: 60px; }
.round-btn.listening { background: #FF6B7A; color: #fff; animation: pulse 1s infinite; }

.glass { background: linear-gradient(160deg, rgba(160, 195, 255, .12), rgba(120, 160, 255, .04)); border: 1px solid var(--line);
  border-radius: var(--radius); backdrop-filter: blur(14px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 18px 40px rgba(2, 8, 30, .35); }
.block { padding: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chips.even { display: grid; grid-template-columns: repeat(5, 1fr); }
.chip { min-height: 48px; padding: 0 18px; border-radius: 999px; background: var(--glass); border: 1.5px solid var(--line); font-weight: 700; font-size: 16px; transition: all .18s; }
.chip.on { background: #fff; color: #0A1E57; border-color: #fff; box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 60%, transparent); }
.chip.big { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 10px 16px; border-radius: 18px; text-align: left; flex: 1 1 140px; }
.chip.big small { font-weight: 500; font-size: 13px; opacity: .8; }
.modes { display: grid; grid-template-columns: repeat(2, 1fr); }

/* ---------- home ---------- */
.home { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px 36px; gap: 8px; text-align: center; }
.home-stage { display: grid; place-items: center; }
.sphere-btn { position: relative; width: min(72vw, 40dvh, 340px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.sphere { position: relative; width: 74%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; z-index: 2;
  box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 140px color-mix(in srgb, var(--glow) 35%, transparent); transition: transform .3s; }
.sphere-btn:hover .sphere { transform: scale(1.04); }
.sphere-btn:active .sphere { transform: scale(.96); }
.sphere-spin { position: absolute; inset: -20%; background: conic-gradient(#F4F8FF 0 25%, var(--accent) 0 50%, #F4F8FF 0 75%, var(--accent) 0);
  animation: spin 5s linear infinite; }
.sphere-interior { position: absolute; inset: 7%; border-radius: 50%; overflow: hidden; pointer-events: none;
  background: radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--accent) 35%, #10234e), #040c26);
  border: 2px solid rgba(240, 248, 255, .8); box-shadow: inset 0 0 20px #02081c, 0 0 6px rgba(255,255,255,.45); }
.sphere-balls { position: absolute; inset: 0; border-radius: 50%; animation: spin 12s linear infinite; animation-play-state: paused; }
#screen-home.active .sphere-balls { animation-play-state: running; }
.home-mini-ball { position: absolute; width: 12.6%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  --ball-color: var(--accent); background: radial-gradient(circle at 30% 25%, #fff 0%, color-mix(in srgb, var(--ball-color) 65%, white) 20%, var(--ball-color) 60%, color-mix(in srgb, var(--ball-color) 55%, #03102c) 100%);
  border: 1px solid rgba(255,255,255,.45); box-shadow: 1px 2px 3px rgba(0,0,0,.65);
  animation: homeBallDrift 2.8s ease-in-out infinite alternate; animation-delay: var(--delay); animation-play-state: paused; }
#screen-home.active .home-mini-ball { animation-play-state: running; }
.home-mini-ball.ball-tone-0 { --ball-color: #e8f3ff; }
.home-mini-ball.ball-tone-2 { --ball-color: color-mix(in srgb, var(--accent) 70%, #1241a2); }
@keyframes homeBallDrift { to { transform: translate(-42%, -42%); } }
.reduced .sphere-balls, .reduced .home-mini-ball { animation: none; }
@media (prefers-reduced-motion: reduce) { .sphere-balls, .home-mini-ball { animation: none; } }
.sphere-shade { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 70% 75%, rgba(4, 14, 50, .55), transparent 55%), radial-gradient(circle at 50% 50%, transparent 55%, rgba(4, 14, 50, .45) 100%); }
.sphere-gloss { position: absolute; left: 16%; top: 10%; width: 42%; height: 30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .85), transparent); filter: blur(2px); transform: rotate(-25deg); }
.halo { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 40%, transparent), transparent 75%); animation: breathe 4s ease-in-out infinite; }
.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(190, 215, 255, .22); animation: spin 18s linear infinite; }
.orbit.o1 { inset: 2%; }
.orbit.o2 { inset: -8%; animation-duration: 28s; animation-direction: reverse; border-style: dashed; border-color: rgba(190, 215, 255, .14); }
.orbit.o3 { inset: 10%; animation-duration: 12s; transform: rotateX(70deg); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.bubble { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--glow) 70%, transparent) 45%, transparent 72%); box-shadow: 0 0 14px var(--glow); }
.bubble.sm { width: 10px; height: 10px; top: auto; bottom: 10%; left: 6%; }
.bubble.b2 { left: auto; right: 4%; top: 70%; }
.bubble.b3 { top: 60%; left: -9px; width: 14px; height: 14px; }
.spark { position: absolute; right: 8%; top: 12%; width: 16px; height: 16px; background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); filter: drop-shadow(0 0 6px #fff); animation: twinkle 2.4s infinite; }
.spark.s2 { left: 2%; right: auto; top: 40%; width: 12px; height: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }
.reduced .sphere-spin { animation-duration: 20s; }
.reduced .orbit, .reduced .halo { animation: none; }
.home-copy { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 460px; }
.progress-line { margin: 16px 0 18px; font-size: 14px; font-weight: 700; letter-spacing: .14em; color: var(--ink-2); }
.rivalry-btn { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border-radius: 22px; min-height: 84px;
  background: linear-gradient(110deg, rgba(255, 120, 90, .22), rgba(120, 160, 255, .14) 55%, rgba(90, 200, 255, .2)); border: 1px solid var(--line); transition: transform .15s, border-color .2s; }
.rivalry-btn:hover { border-color: rgba(220, 235, 255, .5); }
.rivalry-btn:active { transform: scale(.98); }
.rb-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
.rb-icon svg, .rb-go svg { width: 26px; height: 26px; }
.rb-text { flex: 1; display: flex; flex-direction: column; }
.rb-text strong { font-family: var(--display); font-size: 22px; letter-spacing: .04em; }
.rb-text small { color: var(--ink-2); font-size: 15px; }
.home-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 12px; }
.home-row .btn { padding: 0 12px; font-size: 15px; }
.home-row .btn span { display: contents; }

@media (min-width: 960px) {
  .home { flex-direction: row; gap: 7vw; text-align: left; padding: 40px 6vw; }
  .home-stage { flex: 0 0 auto; }
  .sphere-btn { width: min(46vw, 72vh, 600px); }
  .home-copy { align-items: flex-start; max-width: 480px; }
  .title { font-size: 88px; }
}
@media (max-height: 700px) and (max-width: 959px) {
  .home { padding: 14px 20px 20px; }
  .sphere-btn { width: min(58vw, 26dvh, 220px); }
  .home .subtitle { margin-bottom: 16px; }
  .progress-line { margin: 12px 0 14px; }
}

/* ---------- page shell ---------- */
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.page-head > div { flex: 1; min-width: 0; }
.pill-count { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-weight: 800; font-family: var(--display); font-size: 18px; }
.pill-count svg { width: 18px; height: 18px; color: #7BE8B5; }

/* ---------- stages ---------- */
.stages-layout { display: grid; gap: 16px; }
.stages-side { display: grid; gap: 14px; align-content: start; }
.bc-head .hint { font-size: 14px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 14px 0 4px; }
.step-num { font-family: var(--display); font-size: 54px; font-weight: 700; min-width: 2.2ch; text-align: center; line-height: 1; }
.chips.even .chip { padding: 0; }
.tut-card-btn { display: flex; align-items: center; gap: 12px; text-align: left; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(52, 211, 153, .16), rgba(52, 211, 153, .04)); border: 1.5px solid rgba(110, 231, 183, .6); box-shadow: 0 0 24px rgba(52, 211, 153, .14); }
.tut-card-btn > span:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tut-card-btn b { font-family: var(--display); font-size: 24px; }
.tut-card-btn small { color: var(--ink-2); font-size: 16px; }
.tcb-play { width: 56px; height: 56px; border-radius: 50%; background: #6EE7B7; color: #053B28; display: grid; place-items: center; flex: none; }
.tcb-play svg { width: 26px; height: 26px; }
.stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: .86; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--t) 22%, transparent), rgba(10, 25, 70, .5)); border: 2px solid color-mix(in srgb, var(--t) 75%, transparent);
  transition: transform .15s, box-shadow .2s; min-height: 76px; padding: 4px; }
.tile:hover { box-shadow: 0 0 22px color-mix(in srgb, var(--t) 55%, transparent); transform: translateY(-2px); }
.tile:active { transform: scale(.95); }
.tile-num { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 7.5vw, 38px); line-height: 1; }
.tile-theme { display: flex; align-items: center; gap: 4px; font-size: clamp(8.5px, 2.4vw, 12px); font-weight: 800; letter-spacing: .08em; color: var(--ink-2); }
.tile-theme i { width: 8px; height: 8px; border-radius: 50%; background: var(--t); box-shadow: 0 0 8px var(--t); flex: none; }
.tile-check { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: #6EE7B7; color: #053B28; display: grid; place-items: center; }
.tile-check svg { width: 13px; height: 13px; }
.tile-check.lock { background: rgba(255, 255, 255, .2); color: #fff; }
.tile.locked { opacity: .45; }
.tile .stars-row svg { width: 13px; height: 13px; }
.stars-row { display: inline-flex; gap: 2px; }
.st { color: rgba(255, 255, 255, .3); display: inline-flex; }
.st.on { color: var(--gold); filter: drop-shadow(0 0 4px rgba(255, 214, 107, .6)); }
@media (min-width: 900px) {
  .stages-layout { grid-template-columns: 340px 1fr; align-items: start; }
  .stages-side { position: sticky; top: 18px; }
  .stage-grid { gap: 14px; }
  .tile { aspect-ratio: 1.15; }
}

/* ---------- rivalry select ---------- */
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .preset-grid { grid-template-columns: repeat(3, 1fr); } .modes { grid-template-columns: repeat(4, 1fr); } }
.match-wrap { position: relative; }
.match-card { width: 100%; min-height: 128px; border-radius: 22px; padding: 16px 10px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px;
  background: linear-gradient(105deg, color-mix(in srgb, var(--a) 70%, #06123a) 0 49.5%, color-mix(in srgb, var(--b) 70%, #06123a) 50.5%);
  border: 1px solid rgba(255, 255, 255, .22); box-shadow: inset 0 0 40px rgba(4, 12, 40, .35), 0 12px 26px rgba(2, 8, 30, .35); transition: transform .15s; }
.match-card:active { transform: scale(.97); }
.mc-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.mc-side b { font-family: var(--display); font-size: 17px; line-height: 1.1; overflow-wrap: anywhere; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.mc-vs { font-family: var(--display); color: var(--gold); font-weight: 700; font-size: 18px; }
.fav-btn { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .8); background: rgba(4, 12, 40, .35); }
.fav-btn svg { width: 22px; height: 22px; }
.fav-btn.on { color: var(--gold); }
.hrow { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.hrow .match-wrap { flex: 0 0 min(64vw, 260px); scroll-snap-align: start; }
.badge { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 22px; color: #fff; flex: none;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, white), var(--c) 60%); border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 60%, transparent); text-shadow: 0 1px 3px rgba(0, 0, 0, .4); overflow: hidden; }
.badge img { width: 100%; height: 100%; object-fit: cover; }
.badge.lg { width: 64px; height: 64px; font-size: 30px; }
.badge.xl { width: 96px; height: 96px; font-size: 44px; margin: 10px auto; }
.sports-pick { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; align-items: end; }
.sports-pick .mc-vs { text-align: center; }
.nascar-details { display: grid; gap: 12px; margin: 16px 0; }
.nascar-driver { display: flex; gap: 12px; align-items: center; min-width: 0; }
.nascar-driver small { display: block; color: var(--ink-2); margin-top: 4px; line-height: 1.4; }
@media (min-width: 640px) { .sports-pick { grid-template-columns: 1fr auto 1fr auto; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field > span, .field-label { font-size: 12px; font-weight: 800; letter-spacing: .24em; color: var(--ink-2); }
.field em { font-style: normal; letter-spacing: .04em; font-weight: 500; color: var(--ink-3); }
select, input[type=text] { min-height: 54px; border-radius: 16px; background: rgba(5, 15, 50, .55); border: 1.5px solid var(--line); padding: 0 14px; font-size: 18px; width: 100%; }
select option { background: #0A1D52; }
.create-card { width: 100%; margin-top: 20px; display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); text-align: left;
  border: 2px dashed rgba(200, 220, 255, .45); background: rgba(150, 185, 255, .06); transition: background .2s; }
.create-card:hover { background: rgba(150, 185, 255, .12); }
.create-card > span:last-child { display: flex; flex-direction: column; }
.create-card b { font-family: var(--display); font-size: 24px; }
.create-card small { color: var(--ink-2); font-size: 16px; }
.cc-plus { width: 60px; height: 60px; border-radius: 50%; background: #fff; color: #0A1E57; display: grid; place-items: center; flex: none; }
.cc-plus svg { width: 30px; height: 30px; }

/* ---------- builder ---------- */
.panels { display: grid; gap: 14px; }
.panel-vs { text-align: center; font-family: var(--display); color: var(--gold); font-size: 28px; }
@media (min-width: 900px) { .panels { grid-template-columns: 1fr auto 1fr; align-items: start; } .panel-vs { align-self: center; } }
.side-panel { padding: 18px; border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 18%, transparent); }
.sp-head { display: flex; align-items: center; gap: 14px; }
.sp-name { margin: 0; font-family: var(--display); font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; }
.name-row { display: flex; gap: 8px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; max-height: 176px; overflow-y: auto; padding: 2px; }
.emo { height: 50px; border-radius: 14px; background: var(--glass); border: 1.5px solid transparent; font-size: 26px; }
.emo.letter { font-family: var(--display); font-weight: 700; }
.emo.on { border-color: #fff; background: rgba(255, 255, 255, .2); }
.swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.sw { aspect-ratio: 1; min-height: 40px; border-radius: 50%; background: var(--c); border: 3px solid rgba(255, 255, 255, .25); position: relative; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 50%, transparent); }
.sw.wheel { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; cursor: pointer; }
.sw.wheel input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.err { min-height: 1.2em; margin: 6px 0 0; color: #FFB4BD; font-weight: 700; font-size: 16px; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-prev { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; }
.preview-block { margin-top: 16px; display: grid; gap: 16px; }
@media (min-width: 760px) { .preview-block { grid-template-columns: 300px 1fr; align-items: center; } }
.preview-drum { width: min(100%, 300px); margin: 0 auto; aspect-ratio: 420 / 460; }
.preview-drum canvas { width: 100%; height: 100%; display: block; }
.preview-title { font-family: var(--display); font-size: 26px; margin: 4px 0 0; }
.preview-title em { color: var(--gold); font-style: normal; font-size: 18px; }
.toggle { display: flex; align-items: center; gap: 12px; margin-top: 16px; min-height: 48px; cursor: pointer; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg { width: 58px; height: 34px; border-radius: 999px; background: rgba(255, 255, 255, .18); position: relative; transition: background .2s; flex: none; }
.tg::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .tg { background: var(--accent); }
.toggle input:checked + .tg::after { transform: translateX(24px); }
.toggle input:focus-visible + .tg { outline: 3px solid var(--gold); outline-offset: 2px; }
.toggle.row { justify-content: space-between; margin-top: 6px; }
.toggle.row span:first-child { flex: 1; }
.start-btn { width: 100%; margin-top: 18px; }

/* ---------- play ---------- */
#screen-play { touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.play { position: relative; min-height: 100dvh; display: flex; flex-direction: column; padding: 10px 12px 12px; }
.play-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.solo-bg { background: radial-gradient(70% 50% at 50% 55%, color-mix(in srgb, var(--stage) 26%, transparent), transparent 70%); }
.riv-bg .half { position: absolute; top: 0; bottom: 0; width: 50%; }
.riv-bg .ha { left: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--a) 38%, transparent), color-mix(in srgb, var(--a) 12%, transparent)); }
.riv-bg .hb { right: 0; background: linear-gradient(270deg, color-mix(in srgb, var(--b) 38%, transparent), color-mix(in srgb, var(--b) 12%, transparent)); }
.riv-bg .seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); background: linear-gradient(transparent, #fff 30%, #fff 70%, transparent); box-shadow: 0 0 24px 6px rgba(200, 225, 255, .5); opacity: .7; }
.reeses .ha { background: radial-gradient(120% 60% at 0% 70%, rgba(246, 170, 80, .7), transparent 60%), linear-gradient(90deg, rgba(242, 140, 40, .45), rgba(200, 120, 40, .15)); }
.reeses .hb { background: repeating-linear-gradient(0deg, rgba(60, 35, 20, .55) 0 46px, rgba(40, 22, 12, .6) 46px 50px), linear-gradient(270deg, rgba(90, 58, 34, .7), rgba(70, 40, 20, .2)); }
.pb-swirl { position: absolute; left: -10%; bottom: -10%; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: repeating-radial-gradient(circle at 40% 40%, rgba(255, 200, 120, .35) 0 14px, rgba(230, 150, 60, .2) 14px 30px); filter: blur(1px); }
.choc-blocks { position: absolute; right: 4%; top: 18%; display: grid; grid-template-columns: repeat(2, 54px); gap: 6px; opacity: .55; transform: rotate(8deg); }
.choc-blocks i { height: 54px; border-radius: 8px; background: linear-gradient(145deg, #7A4B2C, #3E2414); box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .12), inset -3px -3px 0 rgba(0, 0, 0, .3); }
.play-top { display: flex; align-items: center; gap: 10px; }
.play-top-mid { flex: 1; text-align: center; min-width: 0; }
.play-top-mid .eyebrow { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.play-top-right { display: flex; gap: 8px; }
.play-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hud { width: 100%; max-width: 560px; }
.solo-hud { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.hud-stat, .hud-stage { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.hud-label { font-size: 11px; font-weight: 800; letter-spacing: .2em; color: var(--ink-2); }
.hud-num { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hud-theme { font-family: var(--display); font-size: 22px; font-weight: 700; color: color-mix(in srgb, var(--stage) 55%, white); line-height: 1.1; }
.mods { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.mods i { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--stage) 30%, transparent); }
.drum-wrap { position: relative; width: min(100%, calc((100dvh - 300px) * 420 / 460), 640px); aspect-ratio: 420 / 460; margin: 0 auto; min-width: 240px; }
.rivalry .drum-wrap { width: min(100%, calc((100dvh - 350px) * 420 / 460), 640px); }
.drum-wrap canvas { position: relative; width: 100%; height: 100%; display: block; z-index: 1; }
.drum-glow { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--stage, var(--accent)) 30%, transparent), transparent); transition: transform .4s, opacity .4s; opacity: .7; }
.holding .drum-glow { transform: scale(1.08); opacity: 1; }
.fx-layer, .token-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.token-layer { z-index: 3; }
.float-num { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700; font-size: 30px; text-shadow: 0 0 12px rgba(0, 0, 0, .5), 0 0 2px #000; animation: floatUp 1.05s ease-out forwards; }
.float-num.golden { font-size: 40px; color: var(--gold) !important; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.spark-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; animation: burst .7s ease-out forwards; }
@keyframes burst { from { transform: translate(-50%, -50%); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; } }
.play-banner { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%) scale(.8); opacity: 0; pointer-events: none; text-align: center; padding: 14px 24px; border-radius: 20px;
  background: rgba(5, 15, 50, .82); border: 1px solid var(--line); backdrop-filter: blur(8px); transition: opacity .25s, transform .25s; min-width: 60%; }
.play-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.play-banner b { display: block; font-family: var(--display); font-size: 28px; letter-spacing: .04em; }
.play-banner small { font-size: 16px; color: var(--ink-2); }
.hold-prompt { margin: 6px 0 0; text-align: center; font-size: 20px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; animation: pulse 1.6s ease-in-out infinite; }
.hold-prompt b { font-family: var(--display); letter-spacing: .04em; color: color-mix(in srgb, var(--glow) 60%, white); }
.hold-prompt.quiet { animation: none; opacity: .55; }
.hp-hand svg { width: 28px; height: 28px; }
@keyframes pulse { 50% { transform: scale(1.06); opacity: .8; } }
.reduced .hold-prompt { animation: none; }

.riv-hud { text-align: center; }
.riv-title { margin: 2px 0 0; font-family: var(--display); font-size: clamp(22px, 6.4vw, 34px); line-height: 1.1; font-weight: 700; outline: none; overflow-wrap: anywhere; }
.riv-title em { font-style: normal; color: var(--gold); font-size: .6em; margin: 0 4px; }
.riv-sub { margin-top: 2px; font-size: 12px; }
.pills { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.pill { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; border-radius: 999px; flex-wrap: wrap;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 85%, white), var(--c)); border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); transition: transform .15s; }
.pill .badge { width: 38px; height: 38px; font-size: 18px; }
.pill b { font-family: var(--display); font-size: 34px; line-height: 1; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; }
.pill small { width: 100%; text-align: center; font-size: 12px; font-weight: 700; margin-top: -2px; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.pill.bump { animation: bump .15s ease-out; }
@keyframes bump { 50% { transform: scale(1.15); } }
.riv-clock { font-family: var(--display); font-size: 22px; font-weight: 700; padding: 8px 12px; border-radius: 14px; background: rgba(5, 15, 50, .6); border: 1px solid var(--line); min-width: 74px; font-variant-numeric: tabular-nums; }
.riv-clock.urgent { color: #FFB4BD; animation: pulse 1s infinite; }
.riv-clock.sudden { color: var(--gold); border-color: var(--gold); }
.tug { position: relative; height: 14px; margin: 10px 4px 0; border-radius: 999px; background: var(--b); overflow: visible; box-shadow: 0 0 14px rgba(0, 0, 0, .3) inset; }
.tug-a { position: absolute; inset: 0; border-radius: 999px 0 0 999px; background: var(--a); transform-origin: left; transform: scaleX(.5); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tug-knot { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 0 14px #fff; transition: left .35s cubic-bezier(.2, .8, .2, 1); }
.riv-status { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 8px; min-height: 8px; }
.effects { display: contents; }
.chip-info { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.chip-info svg { width: 16px; height: 16px; }
.chip-info.gold, .fx-turbo { color: var(--gold); border-color: rgba(255, 214, 107, .5); }
.side-label { position: fixed; bottom: 12px; font-family: var(--display); font-size: 16px; color: rgba(255, 255, 255, .5); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.side-label.la { left: 14px; } .side-label.lb { right: 14px; }
.token { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; height: 74px; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--gold) 80%, white) 40%, #E9A93A); color: #3A2500; box-shadow: 0 0 26px rgba(255, 214, 107, .8); animation: tokenFloat 2s ease-in-out infinite; }
.token svg { width: 26px; height: 26px; }
.token span { font-size: 9px; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.token.t-reverse { background: radial-gradient(circle at 35% 30%, #fff, #9FD8FF 40%, #3A8EDB); color: #04213D; box-shadow: 0 0 26px rgba(120, 200, 255, .8); }
.token.t-magnet { background: radial-gradient(circle at 35% 30%, #fff, #FFB0D0 40%, #E2508C); color: #3D0420; box-shadow: 0 0 26px rgba(255, 140, 190, .8); }
@keyframes tokenFloat { 50% { transform: translate(-50%, -62%); } }

@media (min-width: 960px) {
  .play { display: grid; grid-template-columns: 1fr; padding: 18px 28px; }
  .play-body { flex-direction: row; align-items: center; justify-content: center; gap: 48px; }
  .hud { max-width: 340px; flex: 0 0 340px; }
  .solo-hud { grid-template-columns: 1fr; }
  .hud-num { font-size: 52px; }
  .hud-stat, .hud-stage { padding: 18px; }
  .drum-wrap, .rivalry .drum-wrap { width: min(calc((100dvh - 150px) * 420 / 460), 640px, 52vw); margin: 0; }
  .riv-title { font-size: 40px; }
  .pills { grid-template-columns: 1fr; }
  .riv-clock { order: -1; justify-self: center; font-size: 32px; }
}
@media (max-height: 680px) and (max-width: 959px) {
  .hud-num { font-size: 26px; } .hud-stat, .hud-stage { padding: 6px; } .hud-theme { font-size: 18px; }
  .pill b { font-size: 26px; } .pill .badge { width: 30px; height: 30px; font-size: 15px; } .riv-sub { display: none; }
  .drum-wrap { width: min(100%, calc((100dvh - 250px) * 420 / 460)); }
  .rivalry .drum-wrap { width: min(100%, calc((100dvh - 285px) * 420 / 460)); }
  .hold-prompt { font-size: 18px; }
}

/* ---------- modal ---------- */
#modal-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#modal-root.open { pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 7, 25, .66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .25s; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(100%, 520px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px 20px; border-radius: 28px; text-align: center;
  background: linear-gradient(165deg, rgba(30, 60, 140, .96), rgba(8, 20, 62, .97)); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: pop .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(14px); } }
.modal-title { font-family: var(--display); font-size: 32px; line-height: 1.1; margin: 6px 0 10px; }
.modal-title.big { font-size: clamp(30px, 8vw, 42px); }
.modal-text { font-size: 18px; color: var(--ink-2); margin: 0 0 16px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; text-align: left; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.modal-actions.stack { flex-direction: column; }
.modal-actions.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.modal-actions.grid2 .btn { padding: 0 10px; font-size: 14px; }
.result-stars { margin: 4px 0 8px; }
.result-stars svg { width: 50px; height: 50px; }
.results.won .st.on { animation: starIn .5s backwards; }
.results.won .st:nth-child(2) { animation-delay: .15s; } .results.won .st:nth-child(3) { animation-delay: .3s; }
@keyframes starIn { from { transform: scale(0) rotate(-60deg); } }
.new-best { color: var(--gold); font-weight: 800; margin: 0; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.result-stats > div { padding: 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; }
.result-stats b { font-family: var(--display); font-size: 34px; }
.side-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 12px; }
.side-btn { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; border-radius: 22px; min-height: 140px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, transparent), color-mix(in srgb, var(--c) 20%, transparent)); border: 2px solid color-mix(in srgb, var(--c) 80%, white); transition: transform .15s; }
.side-btn:active { transform: scale(.96); }
.side-btn b { font-family: var(--display); font-size: 22px; overflow-wrap: anywhere; }
.shared-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 4px; }
.shared-vs em { color: var(--gold); font-family: var(--display); font-style: normal; font-size: 22px; }

.customize, .howto { text-align: left; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.pal { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--glass); font-weight: 700; font-size: 14px; }
.pal.on { border-color: #fff; background: rgba(255, 255, 255, .14); }
.pal-orb { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .35), 0 0 12px rgba(255, 255, 255, .2); }
.toggles { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; }
.danger { margin-top: 16px; text-align: center; }
.howto-list { padding-left: 22px; font-size: 20px; display: grid; gap: 10px; margin: 14px 0; }
.howto-list b { color: #fff; }

/* win */
.win-backdrop .modal { background: transparent; border: 0; box-shadow: none; width: min(100%, 560px); overflow: visible; }
.win-backdrop { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 40%, rgba(2, 7, 25, .7)), rgba(2, 7, 25, .9)); }
.win-wash { position: relative; padding: 26px 18px; border-radius: 30px; background: linear-gradient(170deg, color-mix(in srgb, var(--w) 80%, white 5%), color-mix(in srgb, var(--w) 55%, #06123a)); border: 2px solid rgba(255, 255, 255, .5); box-shadow: 0 0 80px color-mix(in srgb, var(--w) 70%, transparent); overflow: hidden; }
.win-wash .eyebrow { color: #fff; }
.win-title { font-family: var(--display); font-size: clamp(36px, 10vw, 58px); line-height: 1; margin: 6px 0; text-shadow: 0 4px 18px rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
.win-score { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 700; margin: 6px 0 12px; flex-wrap: wrap; }
.win-score b { font-family: var(--display); font-size: 40px; }
.win-score em { font-style: normal; opacity: .7; }
.tally-card { background: rgba(4, 12, 40, .35); border-radius: 18px; padding: 12px 16px; text-align: left; }
.tally-row { display: flex; justify-content: space-between; font-size: 17px; padding: 4px 0; }
.tally-row b { font-family: var(--display); font-size: 20px; }
.win-wash .legal { color: rgba(255, 255, 255, .75); margin-top: 14px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 15px; border-radius: 2px; animation: confetti var(--t) linear var(--d) infinite; }
@keyframes confetti { to { transform: translateY(820px) rotate(var(--r)); } }

/* ---------- tutorial ---------- */
#tutorial-root { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: none; }
#tutorial-root.open { display: block; }
.tut-dim { position: absolute; inset: 0; background: rgba(2, 7, 25, .7); transition: opacity .3s; }
.tut-dim.clear { opacity: 0; }
.tut-spot { position: absolute; box-shadow: 0 0 0 200vmax rgba(2, 7, 25, .7), 0 0 0 3px rgba(255, 255, 255, .85), 0 0 40px 8px color-mix(in srgb, var(--glow) 70%, transparent); transition: all .35s cubic-bezier(.2, .8, .2, 1); }
.tut-card { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 24px), 520px); pointer-events: auto;
  padding: 18px; border-radius: 24px; background: linear-gradient(165deg, rgba(30, 60, 140, .97), rgba(8, 20, 62, .98)); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.tut-card.top { bottom: auto; top: max(16px, env(safe-area-inset-top)); }
.tut-head { display: flex; justify-content: space-between; align-items: center; }
.tut-dots { display: flex; gap: 4px; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.tut-dots i.on { background: #fff; }
.tut-text { font-size: 22px; font-weight: 600; line-height: 1.35; margin: 10px 0 12px; }
.tut-progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-bottom: 12px; }
.tut-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--glow), #fff); transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }
.tut-actions { display: flex; justify-content: space-between; gap: 10px; }
.tut-actions .btn { flex: 1; }
.tut-finger { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); color: #fff; width: 80px; height: 80px; filter: drop-shadow(0 0 12px rgba(255, 255, 255, .8)); }
.tut-finger svg { width: 80px; height: 80px; animation: press 1.6s ease-in-out infinite; }
.tut-finger .ripple { position: absolute; left: 16px; top: 2px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; animation: ripple 1.6s ease-out infinite; }
@keyframes press { 30%, 70% { transform: scale(.88) translateY(4px); } }
@keyframes ripple { 0%, 25% { transform: scale(.4); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 14px 22px; border-radius: 999px;
  background: #F3F7FF; color: #0A1E57; font-weight: 700; font-size: 17px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: all .3s; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.reduced *, .reduced *::before, .reduced *::after { transition-duration: .01ms !important; }
.reduced .confetti, .reduced .spark-dot { display: none; }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .sphere-spin { animation-duration: 20s; } }

/* ---------- Minecraft / Roblox inspired identity (scoped) ---------- */
.match-wrap.brand-mcrb { grid-column: span 2; }
.match-card.brand-mcrb { min-height: 156px; }
.match-card.brand-mcrb .mc-side b { font-size: clamp(17px, 4.5vw, 23px); overflow-wrap: normal; }
.match-card.brand-mcrb .brand-badge { width: 56px; height: 56px; }
.brand-badge { padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
.brand-badge svg { width: 100%; height: 100%; display: block; }
.brand-badge.b-mc { border-radius: 6px; overflow: hidden; outline: 2px solid #2B1D10; box-shadow: 4px 4px 0 rgba(20, 12, 4, .45); }
.brand-badge.b-rb { border-radius: 10px; background: #E2231A; border: 2px solid #fff; box-shadow: 0 4px 0 #8E120C; }
.wm-mc { font-family: 'Courier New', ui-monospace, monospace !important; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #D9DADB;
  text-shadow: 1px 1px 0 #8C8F93, 2px 2px 0 #5B5E62, 3px 3px 0 #2E3033, 4px 4px 0 #17181A !important; }
.wm-rb { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; text-shadow: 0 3px 0 #8E120C !important; }
.match-card.brand-mcrb { border-radius: 14px; border: 2px solid #2B1D10;
  background:
    linear-gradient(105deg, transparent 0 49.5%, #E2231A 49.5%),
    linear-gradient(#5E9B3C 0 22%, transparent 22%),
    repeating-conic-gradient(#7A5230 0 25%, #6B4628 0 50%) 0 0 / 16px 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), 0 10px 22px rgba(2, 8, 30, .35);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s; }
.match-card.brand-mcrb:hover { transform: translateY(-2px); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), 0 14px 26px rgba(2, 8, 30, .45); }
.match-card.brand-mcrb:active { transform: translateY(1px) scale(.98); }
.match-card.brand-mcrb .mc-vs { color: #fff; background: #17181A; padding: 2px 8px; border-radius: 4px; font-size: 15px; }
.brand-mcrb.play .ha, .play.sa-mc .ha { background:
    linear-gradient(90deg, transparent 70%, rgba(10, 20, 50, .35)),
    linear-gradient(#5E9B3C 0 9%, #4A7F2E 9% 10%, transparent 10%),
    repeating-conic-gradient(#6E4A2B 0 25%, #5F3F24 0 50%) 0 0 / 28px 28px; opacity: .78; }
.brand-mcrb.play .hb, .play.sb-rb .hb { background:
    linear-gradient(270deg, transparent 70%, rgba(10, 20, 50, .3)),
    linear-gradient(-15deg, transparent 46%, rgba(255, 255, 255, .1) 46% 54%, transparent 54%), #E2231A; opacity: .78; }
.play.sa-rb .ha { background: #E2231A; opacity: .78; }
.play.sb-mc .hb { background: linear-gradient(#5E9B3C 0 9%, transparent 9%), repeating-conic-gradient(#6E4A2B 0 25%, #5F3F24 0 50%) 0 0 / 28px 28px; opacity: .78; }
.brand-mcrb .riv-title .wm-mc, .brand-mcrb .riv-title .wm-rb { display: inline-block; padding: 2px 10px; border-radius: 6px; }
.brand-mcrb .riv-title .wm-mc { background: rgba(23, 24, 26, .55); }
.brand-mcrb .riv-title .wm-rb { background: #E2231A; transform: rotate(-2deg); }
.brand-mcrb .pill b { text-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
.brand-mcrb .pill.pa { border-radius: 10px; border-color: #2B1D10; }
.brand-mcrb .pill.pb { border-radius: 10px; border-color: #fff; }
@media (prefers-reduced-motion: reduce) { .match-card.brand-mcrb, .match-card.brand-mcrb:hover { transition: none; transform: none; } }
.reduced .match-card.brand-mcrb:hover { transform: none; }

/* ---------- home rivalry punch-up (scoped) ---------- */
#screen-home .title { white-space: nowrap; font-size: clamp(34px, 10vw, 72px); }
@media (min-width: 960px) { #screen-home .title { font-size: 80px; } }
.home-vs-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: #FF4B3E; color: #fff; letter-spacing: .14em; font-size: 12px; transform: skewX(-8deg); }
#screen-home .rivalry-btn { position: relative; overflow: hidden; display: grid; grid-template-columns: 52px minmax(0, 1fr) 36px; column-gap: 10px; row-gap: 4px; padding: 14px; min-height: 96px; border-radius: 22px;
  background: linear-gradient(105deg, #F4F8FF 0 46%, #1F4FE0 46.4% 100%); border: 2px solid #fff; color: #0A1E57;
  box-shadow: 0 0 0 3px #FF4B3E, 0 14px 34px rgba(255, 75, 62, .35), 0 6px 0 #0A1E57; transition: transform .15s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
#screen-home .rivalry-btn::after { content: ''; position: absolute; left: 46.2%; top: -10%; bottom: -10%; width: 4px; background: #FF4B3E; transform: skewX(-15deg); pointer-events: none; }
#screen-home .rivalry-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 3px #FF4B3E, 0 18px 40px rgba(255, 75, 62, .5), 0 8px 0 #0A1E57; border-color: #fff; }
#screen-home .rivalry-btn:active { transform: translateY(3px); box-shadow: 0 0 0 3px #FF4B3E, 0 6px 16px rgba(255, 75, 62, .35), 0 2px 0 #0A1E57; }
.rb-vs { position: relative; z-index: 1; grid-column: 1; grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #FF4B3E; color: #fff;
  border: 3px solid #fff; box-shadow: 0 4px 0 #0A1E57; transform: rotate(-8deg); }
.rb-vs b { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.rb-vs .rb-icon { display: none; }
#screen-home .rb-text { display: contents; }
.rb-kicker { position: relative; z-index: 1; grid-column: 2; grid-row: 1; align-self: end; font-style: normal; font-size: 10px; line-height: 1.4; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0A1E57; background: #F4F8FF; border-radius: 5px; padding: 2px 6px; }
#screen-home .rb-text strong { position: relative; z-index: 1; grid-column: 2; grid-row: 2; align-self: start; font-size: 23px; line-height: 1.1; letter-spacing: .01em; white-space: nowrap; color: #fff; background: #0A1E57; border-radius: 5px; padding: 3px 6px; text-shadow: none; }
#screen-home .rb-text small { color: #0A1E57; font-weight: 600; font-size: 14px; line-height: 1.3; margin-top: 3px;
  position: relative; z-index: 1; grid-column: 1 / -1; grid-row: 3; background: #F4F8FF; border-radius: 8px; padding: 7px 9px; }
#screen-home .rb-go { position: relative; z-index: 1; grid-column: 3; grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #1F4FE0; transition: transform .15s; }
#screen-home .rivalry-btn:hover .rb-go { transform: translateX(3px); }
@media (max-height: 700px) and (max-width: 959px) {
  #screen-home .rivalry-btn { min-height: 84px; padding: 12px; }
  .rb-vs { width: 48px; height: 48px; } .rb-vs b { font-size: 21px; }
  #screen-home .rb-text strong { font-size: 22px; } #screen-home .rb-text small { font-size: 13px; }
  .rb-kicker { font-size: 10px; } #screen-home .rb-go { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { #screen-home .rivalry-btn, #screen-home .rb-go { transition: none; } #screen-home .rivalry-btn:hover, #screen-home .rivalry-btn:hover .rb-go { transform: none; } }
.reduced #screen-home .rivalry-btn:hover, .reduced #screen-home .rivalry-btn:hover .rb-go { transform: none; }
