:root {
  /* Button jobs. Renamed buttons keep these colors everywhere. */
  --role-strike: #c8402b;
  --role-privacy: #1f6f99;
  --role-mint: #a83578;
  --role-rug: #5a3fb0;
  --bg: #0b0a12;
  --panel: #16131f;
  --panel-2: #201b2d;
  --ink: #f6f3ff;
  --muted: #a8a2bb;
  --line: #07060b;
  --gold: #ffd23f;
  --gold-deep: #e0a800;
  --hp: #ffd23f;
  --hp-low: #ff5a36;
  --lag: #d7263d;
  --good: #3ddc97;
  --bad: #ff4d4d;
  --display: 'Bungee', Impact, 'Arial Black', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --app-w: 540px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(ellipse at top, #1d1530 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button, select, a.btn { font: inherit; touch-action: manipulation; }

#app {
  max-width: var(--app-w);
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: .7em 1.1em;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .06s, box-shadow .06s, filter .15s;
  user-select: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn:focus-visible, .move:focus-visible, .pick-card:focus-visible, .icon-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.btn-big { width: 100%; font-size: 1.1rem; min-height: 58px; }
.btn-sm { min-height: 40px; padding: .4em .8em; font-size: .9rem; }
.btn-gold { background: var(--gold); color: #1a1200; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:active { transform: none; }
.btn-x { background: #000; color: #fff; border-color: #333; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

/* ---------- Title ---------- */
#screen-title { overflow-y: auto; }
.title-wrap {
  margin: auto 0;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  text-align: center;
}
.title-roster { display: flex; justify-content: center; gap: 6px; margin-bottom: 4px; }
.title-roster span {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--c);
  font-size: 20px;
  animation: bob 1.6s ease-in-out infinite;
}
.title-roster span:nth-child(even) { animation-delay: -.8s; }
.logo {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: .95;
  font-size: clamp(44px, 14vw, 72px);
  display: flex;
  flex-direction: column;
  color: var(--gold);
  -webkit-text-stroke: 2px var(--line);
  text-shadow: 0 5px 0 #b3261e, 0 9px 0 var(--line);
  transform: rotate(-3deg);
}
.logo-of { font-size: .45em; color: #fff; -webkit-text-stroke: 0; text-shadow: 0 3px 0 var(--line); }
.tagline { color: var(--muted); margin: 6px 0 10px; }
#btn-daily { flex-direction: column; gap: 2px; line-height: 1.2; }
#btn-daily small { font-weight: 600; font-size: .85rem; opacity: .8; }
.title-stats { color: var(--muted); font-size: .9rem; margin: 2px 0; min-height: 1.2em; }
.rules-pick {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  color: var(--muted); font-size: .85rem;
}
.rules-pick select {
  background: var(--panel-2); color: var(--ink);
  border: 2px solid #3a3350; border-radius: 8px; padding: 6px 8px;
}
.disclaimer { color: #7d7791; font-size: .75rem; line-height: 1.4; margin-top: 8px; }

/* ---------- Pick ---------- */
#screen-pick { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); gap: 12px; overflow-y: auto; }
.pick-head { display: flex; align-items: center; gap: 8px; }
.pick-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.btn-suggest { background: #2a2140; border-color: var(--gold); color: var(--ink); font-weight: 500; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 35%, var(--panel)) 0%, var(--panel) 70%);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
}
.pick-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.pick-face {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; border: 3px solid var(--line); background: var(--c); font-size: 26px;
}
.pick-name { font-family: var(--display); font-size: 1.05rem; line-height: 1.1; }
.pick-lane { font-size: .78rem; color: var(--muted); }
.pick-super { font-size: .78rem; color: var(--gold); font-weight: 700; }
.pick-odds { font-size: .72rem; color: var(--muted); }
.pick-moves { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.pick-moves span { font-size: .68rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; color: #fff; }
.pick-moves small { font-weight: 600; opacity: .8; }
.role-strike, .f-chip.role-strike { background: var(--role-strike); }
.role-privacy, .f-chip.role-privacy { background: var(--role-privacy); }
.role-mint, .f-chip.role-mint { background: var(--role-mint); }
.role-rug, .f-chip.role-rug { background: var(--role-rug); }

/* ---------- HUD ---------- */
.hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(#000a, #0000);
  position: relative;
  z-index: 3;
}
.hud-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hud-name {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: .85rem; line-height: 1;
  white-space: nowrap; overflow: hidden;
}
#hud-c .hud-name { justify-content: flex-end; }
.you-tag, .cpu-tag {
  font-family: var(--body); font-weight: 900; font-size: .6rem;
  padding: 2px 5px; border-radius: 4px; background: var(--gold); color: #1a1200;
}
.cpu-tag { background: #4a4460; color: #fff; }
.hp {
  position: relative;
  height: 18px;
  border: 3px solid var(--line);
  border-radius: 4px;
  background: #3a0d12;
  overflow: hidden;
}
.hp-fill, .hp-lag { position: absolute; top: 0; bottom: 0; width: 100%; }
/* bars drain toward the outside edge, anchored at the center like an arcade HUD */
#hud-p .hp-fill, #hud-p .hp-lag { right: 0; }
#hud-c .hp-fill, #hud-c .hp-lag { left: 0; }
.hp-lag { background: var(--lag); transition: width .8s ease .35s; }
.hp-fill { background: linear-gradient(#fff3a6, var(--hp) 45%, var(--gold-deep)); transition: width .25s ease; }
.hp.low .hp-fill { background: linear-gradient(#ffb199, var(--hp-low) 45%, #c1300f); }
.hp-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 .72rem var(--body); color: #1a1200; text-shadow: 0 0 3px #fff8;
}
.blocks { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.blocks i {
  display: block; height: 11px;
  border: 2px solid #2d2840;
  border-radius: 2px;
  background: #110f18;
}
.blocks i.on {
  border-color: var(--line);
  background:
    linear-gradient(135deg, transparent 40%, #0003 41%, #0003 48%, transparent 49%),
    linear-gradient(#ffe58a, #f0b400);
}
.blocks.full i.on { animation: glow .8s ease-in-out infinite alternate; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; min-height: 18px; }
#hud-c .chips { justify-content: flex-end; }
.chip {
  font-size: .62rem; font-weight: 800; letter-spacing: .02em;
  padding: 2px 5px; border-radius: 99px;
  background: #2b2440; border: 1px solid #4a4068; color: #e9e3ff;
  white-space: nowrap;
}
.chip.bad { background: #4a1621; border-color: #8a2c3d; }
.chip.good { background: #173d2f; border-color: #2c7a5c; }
.hud-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; }
.hud-turn { font-family: var(--display); font-size: .7rem; color: var(--muted); white-space: nowrap; }
.hud-turn b { color: var(--ink); font-weight: 400; font-size: 1rem; display: block; text-align: center; }
.hud-mode { font-size: .6rem; font-weight: 800; color: var(--gold); white-space: nowrap; }
.hud-buttons { display: flex; gap: 3px; }
.hud-buttons .icon-btn { width: 28px; height: 28px; font-size: .8rem; } /* three fit without squeezing the names */

/* ---------- Stage ---------- */
.stage {
  position: relative;
  flex: 1;
  min-height: 170px;
  overflow: hidden;
  margin-top: -8px;
  user-select: none;
}
.sky {
  position: absolute; inset: 0;
  background: linear-gradient(#150f2b 0%, #3a1d53 45%, #a0435a 72%, #f08a4b 78%);
}
.skyline { position: absolute; left: 0; right: 0; bottom: 22%; height: 42%; opacity: .55; }
.candle { position: absolute; bottom: 0; width: 5%; }
.candle i { position: absolute; left: 50%; width: 2px; transform: translateX(-50%); background: currentColor; }
.candle b { position: absolute; left: 18%; right: 18%; background: currentColor; border-radius: 1px; }
.candle.up { color: #2fd18a; }
.candle.down { color: #ff5470; }
.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background:
    repeating-linear-gradient(90deg, #ffffff08 0 2px, transparent 2px 40px),
    linear-gradient(#35203c, #120b17);
  border-top: 3px solid #0006;
}

/* Fighter: .fighter (position, lunge, KO) > .f-flip (mirror) > .f-bob (idle) > .f-sprite (hit) */
.fighter {
  position: absolute;
  bottom: 12%;
  height: min(52%, 300px);
  aspect-ratio: .6;
  max-width: 34%;
  container-type: size;
  transition: transform .15s ease-out, opacity .3s;
  z-index: 2;
}
.side-p { left: 9%; }
.side-c { right: 9%; }
.f-flip, .f-bob, .f-sprite { position: absolute; inset: 0; }
.side-c .f-flip { transform: scaleX(-1); }
.f-bob { animation: bob 1.3s ease-in-out infinite; }
.side-c .f-bob { animation-delay: -.65s; }
.f-sprite { transition: opacity .25s, filter .25s; }

.f-head {
  position: absolute; left: 14%; width: 62%; top: 0; aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: #f5e9d8;
  background: color-mix(in srgb, var(--c) 55%, #fff);
  font-size: 34px;
  font-size: 34cqw;
  z-index: 2;
}
.side-c .f-head span { transform: scaleX(-1); }
.f-torso {
  position: absolute; left: 8%; width: 70%; top: 34%; height: 36%;
  border: 3px solid var(--line);
  border-radius: 18px 18px 10px 10px;
  background: var(--c);
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 80%, #fff) 0%, var(--c) 40%, color-mix(in srgb, var(--c) 70%, #000) 100%);
}
.f-fist {
  position: absolute; width: 30%; aspect-ratio: 1;
  border: 3px solid var(--line); border-radius: 40%;
  background: #ffe2c4;
  background: color-mix(in srgb, var(--c) 45%, #ffe2c4);
  z-index: 3;
}
.f-fist-a { right: -2%; top: 36%; }
.f-fist-b { right: 14%; top: 50%; }
.f-legs { position: absolute; left: 18%; width: 50%; top: 68%; bottom: 0; display: flex; justify-content: space-between; }
.f-legs span { width: 38%; background: #221c2e; border: 3px solid var(--line); border-radius: 6px 6px 4px 4px; }
.f-shadow {
  position: absolute; left: 0; right: 10%; bottom: -8px; height: 12px;
  background: radial-gradient(#0008, transparent 70%);
}
.f-bubble {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  font-size: 22px; z-index: 4;
  filter: drop-shadow(0 2px 0 #0008);
}
.f-bubble.spin { animation: spin 1.2s linear infinite; }
.f-chip {
  position: absolute; left: 50%; top: -58px; transform: translateX(-50%) scale(.6);
  opacity: 0;
  white-space: nowrap;
  font: 800 .72rem var(--body);
  padding: 4px 8px; border-radius: 99px;
  background: #000c; border: 2px solid var(--c); color: #fff;
  transition: opacity .15s, transform .15s;
  z-index: 5;
}
.f-chip.show { opacity: 1; transform: translateX(-50%) scale(1); }
.f-chip.role-super { background: var(--gold); color: #1a1200; }

/* Fighter art: round portraits and a stage sprite. Fighters without art keep the emoji and block body. */
.art-head { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pick-face, .title-roster span, .res-faces span.face, .f-head { overflow: hidden; }
.cutin-head.has-art { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
/* The sprite stands a bit taller than the block body, so its label and status bubble sit higher. */
.f-art {
  position: absolute; bottom: 0; left: 50%;
  height: 118%; width: auto; max-width: none;
  transform: translateX(-50%);
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
/* A wide sprite (arm out, big stance) shrinks to stay on screen instead of stretching past 150% of its spot. */
@supports (width: 1cqw) {
  .f-art { height: auto; max-height: 118cqh; max-width: 150cqw; }
}
.fighter.has-art .f-chip { top: calc(-18% - 58px); }
.fighter.has-art .f-bubble { top: calc(-18% - 30px); }
.fighter.has-art .f-shadow { left: -8%; right: -8%; }
/* KO: the sprite falls flat on its back, at 70% so it fits on its own side of a phone-width stage.
   The CPU side is mirrored, so the same transform drops it the other way. */
.f-art { transform-origin: 50% 100%; transition: transform .35s ease-in; }
.fighter.has-art.is-ko.side-p, .fighter.has-art.is-ko.side-c { transform: none; }
.fighter.has-art.is-ko .f-art { transform: translateX(-50%) rotate(-90deg) translate(35%, 40%) scale(.7); }
.fighter.has-art.is-ko .f-bubble { top: auto; bottom: 22%; }

.fighter.lunge.side-p { transform: translateX(38%); }
.fighter.lunge.side-c { transform: translateX(-38%); }
.fighter.wobble .f-sprite { animation: wobble .5s ease; }
.fighter.hurt .f-sprite { animation: shake .35s ease; filter: brightness(2.2) saturate(.3); }
.fighter.is-hidden .f-sprite { opacity: .22; filter: blur(1.5px); }
.fighter.is-ko { opacity: .85; }
.fighter.is-ko.side-p { transform: translate(-10%, 18%) rotate(-82deg); }
.fighter.is-ko.side-c { transform: translate(10%, 18%) rotate(82deg); }
.fighter.is-ko .f-bob { animation: none; }
.fighter.dance .f-bob { animation: awkward .45s steps(2, jump-none) infinite alternate; transform-origin: 50% 100%; }

.popups { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.popup {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 1.5rem;
  -webkit-text-stroke: 1.5px var(--line);
  animation: floatUp 1.1s ease-out forwards;
  white-space: nowrap;
}
.popup.dmg { color: #ff5a4f; font-size: 1.9rem; }
.popup.good { color: var(--good); }
.popup.status { color: #fff; font-size: 1rem; }
.popup.miss { color: #cfc8e6; }
.popup.repeat { font-size: 1.15rem; color: #fff; padding: 2px 10px; border-radius: 6px; background: var(--role-mint); -webkit-text-stroke: 1px var(--line); }
.popup.ticker { font-size: 1.15rem; padding: 2px 8px; border-radius: 6px; background: #0b2a1ccc; -webkit-text-stroke: 1px var(--line); }

.banner {
  position: absolute; left: 4%; right: 4%; top: 9%;
  text-align: center; pointer-events: none; z-index: 7;
  opacity: 0;
}
.banner.show { animation: slam 1.25s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.banner.ko.show { animation: slam 2s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.banner-text {
  font-family: var(--display);
  font-size: clamp(26px, 9vw, 46px);
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 2px var(--line);
  text-shadow: 0 4px 0 #b3261e, 0 7px 0 var(--line);
  transform: rotate(-4deg);
}
.banner.long .banner-text { font-size: clamp(20px, 6.4vw, 34px); }
.banner.ko .banner-text { font-size: clamp(56px, 20vw, 96px); color: #fff; text-shadow: 0 5px 0 #b3261e, 0 9px 0 var(--line); }
.banner-sub {
  margin-top: 10px;
  display: inline-block;
  font: 800 .85rem var(--body);
  letter-spacing: .04em;
  padding: 4px 10px;
  background: #000c; border-radius: 6px;
  transform: rotate(-4deg);
}
.banner-sub:empty { display: none; }

.log {
  margin: 0; padding: 6px 12px;
  min-height: 2.2em;
  font-size: .82rem; color: var(--muted);
  text-align: center;
  background: #0006;
}

/* ---------- Controls ---------- */
.controls {
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel);
  border-top: 3px solid var(--line);
}
.turn-note { margin: 0; font-size: .82rem; text-align: center; color: var(--gold); min-height: 1.1em; }
.turn-note:empty { display: none; }
.move-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.move {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  text-align: left;
  min-height: 60px;
  padding: 8px 10px;
  border: 3px solid var(--line);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
  user-select: none;
  transition: transform .06s, box-shadow .06s, filter .15s, opacity .15s;
}
.move:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.move:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }
.move-icon { grid-row: span 2; font-size: 1.6rem; }
.move-label { font-family: var(--display); font-size: 1rem; line-height: 1; }
.move-sub { font-size: .72rem; opacity: .85; font-weight: 600; }
.move-nick { font: 700 .68rem var(--body); opacity: .8; text-transform: none; letter-spacing: 0; }
.move-strike { background: linear-gradient(#e8553f, #b8321f); }
.move-privacy { background: linear-gradient(#2a8fb8, #1b5f86); }
.move-mint { background: linear-gradient(#d0479a, #962f6e); }
.move-rug { background: linear-gradient(#6d4fc9, #45308c); }
.move-super {
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto;
  min-height: 52px;
  background: linear-gradient(#57513f, #3b3629);
  color: #e8e1c5;
}
.move-super .move-icon { grid-row: auto; }
.move-super .move-sub { text-align: right; }
.move-super.ready {
  background: linear-gradient(#fff08a, var(--gold) 45%, var(--gold-deep));
  color: #1a1200;
  animation: pulse 1s ease-in-out infinite;
}
.btn-continue { min-height: 60px; }
.controls.skipping .move, .controls.skipping .move-grid { display: none; }

/* ---------- Super cut-in ---------- */
.cutin {
  position: fixed; inset: 0; z-index: 50;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  padding: 16px;
}
.cutin:not([hidden]) { display: flex; }
.cutin-stripes {
  position: absolute; inset: -20% -50% -20% -20%;
  background: repeating-linear-gradient(-20deg, var(--c) 0 38px, #0006 38px 76px);
  background: repeating-linear-gradient(-20deg, var(--c) 0 38px, color-mix(in srgb, var(--c) 55%, #000) 38px 76px);
  opacity: .9;
}
.cutin.play .cutin-stripes { animation: stripes 2.6s linear; }
.cutin-portrait {
  position: relative;
  flex: none;
  width: min(46vw, 220px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 6px solid var(--line);
  background: #f5e9d8;
  background: color-mix(in srgb, var(--c) 55%, #fff);
  box-shadow: 0 0 0 8px #fff3;
}
.cutin-head { font-size: min(26vw, 120px); line-height: 1; }
.cutin-prop {
  position: absolute; right: -14%; bottom: -8%;
  font-size: min(16vw, 76px);
  filter: drop-shadow(0 4px 0 #0008);
}
.cutin-card { position: relative; text-align: center; width: 100%; }
.cutin-card small {
  display: inline-block; font: 900 .8rem var(--body); letter-spacing: .3em;
  padding: 3px 10px; background: #000; color: var(--gold); border-radius: 4px;
}
.cutin-name {
  font-family: var(--display);
  font-size: clamp(34px, 11vw, 64px);
  line-height: 1;
  margin-top: 6px;
  color: #fff;
  -webkit-text-stroke: 2px var(--line);
  text-shadow: 0 5px 0 var(--line);
  transform: rotate(-4deg);
}
.cutin-name.flicker { color: #9ff; text-shadow: -3px 0 0 #f0f, 3px 0 0 #0ff, 0 5px 0 var(--line); }
.cutin-name.glitch { animation: glitch .16s steps(2) 1; }
.cutin-name.lock { animation: lockPop .4s cubic-bezier(.2, 1.5, .4, 1); }
.cutin-who { font: 900 1rem var(--body); letter-spacing: .2em; margin-top: 8px; color: #fff; text-shadow: 0 2px 0 #000; }
.cutin-line {
  position: relative;
  max-width: 520px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(18px, 6vw, 30px);
  line-height: 1.15;
  color: var(--gold);
  -webkit-text-stroke: 1px var(--line);
  text-shadow: 0 3px 0 var(--line);
  opacity: 0;
}
.cutin-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cutin.play .cutin-portrait { animation: slideIn .35s cubic-bezier(.2, 1.3, .4, 1) both; }
.cutin.play.from-c .cutin-portrait { animation-name: slideInR; }
.cutin.play .cutin-card { animation: slamSmall .45s var(--card-delay, .15s) cubic-bezier(.2, 1.4, .4, 1) both; }
.cutin.play .cutin-line { animation: fadeUp .35s var(--line-delay, .6s) ease-out forwards; }
.cutin.play .cutin-flash { animation: flash var(--dur, 2.6s) linear forwards; }
.cutin-deco { position: absolute; inset: 0; pointer-events: none; }

.deco-row { position: absolute; left: 0; right: 0; top: 6%; text-align: center; font-size: 42px; letter-spacing: 4px; }
.deco-sun {
  position: absolute; left: 50%; top: 30%; width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(#fff6 0 8deg, transparent 8deg 20deg);
  animation: spinC 6s linear infinite;
}
.deco-run {
  position: absolute; top: 13%; left: 100%; white-space: nowrap; font-size: 46px;
  animation: runAcross 3s linear forwards;
}
.deco-run span { position: relative; }
.army-bubble, .army-sign {
  position: absolute; left: 50%; bottom: 100%;
  transform: translateX(-50%);
  white-space: nowrap;
  border: 2px solid var(--line);
}
.army-bubble { padding: 3px 8px; border-radius: 10px; background: #fff; color: #111; font: 900 13px var(--body); }
.army-sign { padding: 3px 6px; border-radius: 2px; background: #fff3c4; color: #8a1c1c; font: 900 11px var(--body); transform: translateX(-50%) rotate(-6deg); }
.gold-truck {
  position: absolute; left: 6%; bottom: 7%;
  display: flex; flex-direction: column; align-items: center;
  font-size: 44px; line-height: 1;
  animation: creep 3.2s linear forwards;
}
.gold-truck small { font: 900 10px var(--body); color: var(--gold); background: #000b; padding: 2px 6px; border-radius: 4px; margin-top: 4px; }
.deco-run span { display: inline-block; animation: rise .25s ease-in-out infinite alternate; }
.deco-run span:nth-child(odd) { animation-delay: -.12s; }

/* Sergey: Link Marines. The target says it first, then the flannel crowd charges through them. */
.doubter {
  position: absolute; top: 3%; right: 5%;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.from-c .doubter { right: auto; left: 5%; align-items: flex-start; }
.doubter-face {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 42px;
  border: 3px solid var(--line); background: #fff;
}
.doubter-face img { width: 100%; height: 100%; object-fit: cover; }
.from-p .doubter-face { transform: scaleX(-1); } /* looks back at the attacker */
.doubt-bubble {
  max-width: 62vw; padding: 4px 9px; border-radius: 10px;
  border: 2px solid var(--line); background: #fff; color: #111; font: 900 13px var(--body);
}
.cutin.play .doubter { animation: popIn .25s cubic-bezier(.2, 1.5, .4, 1) both, trampled .5s 1.5s ease-in forwards; }
.deco-march {
  position: absolute; top: 9%; left: 0; display: flex; gap: 8px;
  transform: translateX(-105%);
}
.from-c .deco-march { left: auto; right: 0; transform: translateX(105%); flex-direction: row-reverse; }
.cutin.play .deco-march { animation: marchR 2.6s .45s linear forwards; }
.cutin.play.from-c .deco-march { animation-name: marchL; }
.marine {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  font-size: 40px; line-height: 1;
  animation: rise .22s ease-in-out infinite alternate;
}
.marine:nth-child(odd) { animation-delay: -.11s; }
.marine u { width: 26px; height: 19px; margin-top: -12px; border-radius: 0 0 50% 50%; background: #e0a878; border: 2px solid var(--line); border-top: 0; }
.marine i {
  width: 42px; height: 38px; margin-top: 1px; border: 2px solid var(--line); border-radius: 10px 10px 3px 3px;
  background:
    repeating-linear-gradient(90deg, #375bd2aa 0 6px, transparent 6px 12px),
    repeating-linear-gradient(0deg, #375bd2aa 0 6px, transparent 6px 12px),
    #eef2ff;
}
.deco-drop { position: absolute; left: 8%; top: 4%; font-size: 90px; animation: drop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.deco-bytes {
  position: absolute; left: 0; top: 7%; white-space: nowrap;
  font: 800 20px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #7CFF9B; background: #000c; padding: 6px 10px; border-radius: 6px;
  animation: bytes 2.4s linear forwards;
}

/* Saylor: Another Orange Dot. His Sunday tracker, dots stamping onto the line. */
.cutin.sup-orangedot { justify-content: flex-end; padding-bottom: 8vh; }
.tracker {
  position: absolute; left: 6%; right: 6%; top: 5%; height: 26%;
  padding: 10px 12px;
  border: 5px solid #111; border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, #ffffff10 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, #ffffff10 0 1px, transparent 1px 30px),
    #141018;
  box-shadow: 0 0 30px #f7931a55;
}
.tracker svg { width: 100%; height: 100%; overflow: visible; }
.odot { fill: #f7931a; stroke: #111; stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.odot-big { filter: drop-shadow(0 0 6px #ffb347); }
.cutin.play .odot { animation: stamp .35s cubic-bezier(.3, 1.8, .5, 1) both; }

/* Saylor's Super KO: the astronaut DJ. */
.koscene {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 16px;
  background: #0b0a12;
  cursor: pointer;
  text-align: center;
}
.ks-art { width: min(94vw, 520px); }
.ks-art svg { display: block; width: 100%; height: auto; border: 4px solid #111; border-radius: 10px; }
.ks-small { font: 900 clamp(14px, 4.4vw, 22px) var(--body); letter-spacing: .08em; color: #fff; opacity: 0; }
.ks-big {
  font-family: var(--display);
  font-size: clamp(30px, 10vw, 56px);
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 2px var(--line);
  text-shadow: 0 5px 0 #b3261e, 0 9px 0 var(--line);
  transform: rotate(-3deg);
  opacity: 0;
}
.koscene.play .ks-small { animation: fadeUp .35s .35s ease-out forwards; }
.koscene.play .ks-big { animation: slamSmall .45s 1.1s cubic-bezier(.2, 1.4, .4, 1) both; }
.astro { animation: nod .46s ease-in-out infinite; }
.astro-arm { transform-box: fill-box; transform-origin: 50% 100%; animation: pump .46s ease-in-out infinite; }
.spk { transform-box: fill-box; transform-origin: 50% 100%; animation: thump .46s ease-out infinite; }
.result-card { position: relative; overflow: hidden; }
.res-astro { position: absolute; right: -4px; top: -2px; width: 70px; opacity: .9; transform: rotate(10deg); pointer-events: none; }
.res-astro svg { width: 100%; height: auto; display: block; }

/* Charles: Midnight Express. His nearly-four-hour video, captions typing at reading speed, then lights
   out mid-word, moon, stars and 💤. --off (when the lights go out) is worked out from the captions. */
.sup-midnight .cutin-card, .sup-midnight .cutin-line { z-index: 5; }
.cutin.sup-midnight { justify-content: flex-end; padding-bottom: 7vh; } /* the video takes the top */
.midnight { position: absolute; inset: 0; }
.vplayer {
  position: absolute; left: 50%; top: 4%;
  transform: translateX(-50%);
  width: min(90%, 440px); aspect-ratio: 16 / 9;
  border: 3px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #15131f;
  box-shadow: 0 6px 0 #0006;
}
.vp-frame { position: absolute; inset: 0; display: grid; place-items: center; font-size: 70px; filter: brightness(.55) saturate(.8); }
.vp-frame .art-head { border-radius: 0; object-position: 50% 30%; }
.vp-title {
  position: absolute; left: 10px; top: 8px;
  font: 800 clamp(10px, 3vw, 13px) var(--body); letter-spacing: .06em; color: #fff;
  text-shadow: 0 1px 2px #000;
}
.vp-caps {
  position: absolute; left: 0; right: 0; bottom: 30px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.vp-caps span {
  display: block; overflow: hidden; white-space: nowrap; width: 0;
  padding: 2px 0;
  background: #000d; color: #fff;
  font: 800 clamp(12px, 4.1vw, 17px) ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cutin.play .vp-caps span { animation: typeOn var(--t) var(--d) steps(var(--chars), end) forwards; }
.vp-time { position: absolute; left: 10px; bottom: 9px; font: 700 clamp(9px, 2.8vw, 12px) var(--body); color: #fff; }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #fff4; }
.vp-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 3%; background: #ef4444; }
.blackout { position: absolute; inset: 0; background: #04050c; opacity: 0; z-index: 2; }
.cutin.play .blackout { animation: lightsOut .01s var(--off, 1.35s) forwards; }
.night { position: absolute; inset: 0; z-index: 3; opacity: 0; }
.cutin.play .night { animation: fadeIn .4s calc(var(--off, 1.35s) + .05s) forwards; }
.zzz { position: absolute; left: 20%; top: 34%; font-size: 40px; opacity: 0; }
.cutin.play .zzz { animation: zzzRise 1.8s calc(var(--off, 1.35s) + .3s) ease-out forwards; }
.moon {
  position: absolute; right: 14%; top: 7%;
  width: min(22vw, 110px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset -18px 10px 0 0 #f4e7a1;
  filter: drop-shadow(0 0 18px #f4e7a155);
}
.night i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0; }
.cutin.play .night i { animation: twinkle 1.2s ease-in-out infinite alternate; }

/* Mert: CEO of Helium. Sun catches the dome, a beam sweeps out toward the opponent. */
.dome-beam {
  position: absolute; left: 50%; top: 20%;
  width: 110vw; height: 30px;
  border-radius: 15px;
  background: linear-gradient(90deg, #fffbe0, #fff6 45%, transparent);
  transform-origin: 0 50%;
  opacity: 0;
}
.cutin.play .dome-beam { animation: beamSweep 1.3s var(--lock, .55s) ease-out both; }
.cutin-head.has-art ~ .cutin-pdeco .dome-beam { top: 9%; left: 55%; } /* off the shine on top of his portrait's dome */

/* Toly: Second Best Salesman. Brochure of phone bricks fans open, one gets slapped in, airdrop confetti. */
.cutin { --dir: 1; }
.cutin.from-c { --dir: -1; }
.brick {
  position: relative;
  width: 54px; height: 100px;
  padding: 26px 5px 6px;
  border: 3px solid var(--line); border-radius: 12px;
  background: #1c1c26;
  box-shadow: 0 4px 0 #0008;
}
.brick-bump {
  position: absolute; left: 5px; top: 4px;
  width: 28px; height: 18px;
  display: flex; align-items: center; justify-content: space-evenly;
  border: 2px solid #000; border-radius: 7px;
  background: #34344a;
}
.brick-bump i { width: 8px; height: 8px; border-radius: 50%; background: #0b0b12; border: 1px solid #6a6a80; }
.brick-screen {
  display: grid; place-items: center;
  height: 100%;
  padding: 2px;
  border-radius: 6px;
  background: linear-gradient(160deg, #19c6a0, #7b5cff);
  font: 900 8px/1.1 var(--body);
  color: #fff; text-align: center;
}
.brochure { position: absolute; left: 50%; top: 5%; }
.brochure .brick { position: absolute; left: -27px; top: 0; transform-origin: 50% 140%; }
.cutin.play .brochure .brick { animation: fanOpen .45s var(--d) cubic-bezier(.2, 1.4, .4, 1) both; }
.cutin-pdeco { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.sup-salesman .cutin-prop { display: none; }
.slap { position: absolute; left: 50%; top: 4%; }
.slap .brick { left: -42px; width: 84px; height: 156px; padding: 38px 8px 10px; }
.slap .brick-bump { width: 42px; height: 27px; left: 7px; top: 6px; }
.slap .brick-bump i { width: 12px; height: 12px; }
.slap .brick-screen { font-size: 16px; }
.cutin.play .slap { animation: slap 1.5s .75s cubic-bezier(.3, 1.5, .5, 1) both; }
.confetti { position: absolute; left: calc(50% + var(--dir) * 32vw); top: calc(4% + 78px); z-index: 4; }
.confetti i { position: absolute; width: 10px; height: 10px; opacity: 0; }
.cutin.play .confetti i { animation: burst 1.1s 1.2s cubic-bezier(.1, .8, .3, 1) both; }
.saga-box {
  position: absolute; bottom: 7%; left: calc(50% + var(--dir) * 28vw - 50px);
  width: 100px; padding: 10px 6px 8px;
  border: 3px solid var(--line); border-radius: 4px;
  background: #a98556;
  box-shadow: 0 6px 0 #0008;
  color: #3a2610; text-align: center;
  z-index: 2;
}
.saga-box::before { content: ''; position: absolute; top: 0; bottom: 0; left: 42%; width: 16%; background: #d6b37f; opacity: .6; }
.saga-box::after { content: '💨'; position: absolute; left: -28px; bottom: -4px; font-size: 26px; }
.saga-box b { position: relative; display: block; font: 400 20px var(--display); letter-spacing: .1em; }
.saga-box small { position: relative; display: block; font: 900 8px var(--body); letter-spacing: .05em; }
.cutin.play .saga-box { animation: boxDrop .55s .95s cubic-bezier(.3, 1.6, .5, 1) both; }

/* Vitalik: the badger dance. Green screen of badgers, a stage of people in front, everyone's arms
   straight out and flapping up and down in sync. */
.cutin.sup-dance { justify-content: flex-end; padding-bottom: 5vh; }
.sup-dance .cutin-portrait { display: none; }
.badger-screen {
  position: absolute; left: 4%; right: 4%; top: 4%; height: 42%;
  overflow: hidden;
  border: 5px solid #111; border-radius: 8px;
  background: radial-gradient(ellipse at 50% 40%, #9cff63, #4bd424 65%, #2f9f12);
  box-shadow: 0 0 34px #8cff5a66;
}
.badger { position: absolute; height: auto; overflow: visible; }
.badger-stage { position: absolute; left: 1%; right: 1%; top: 30%; height: 31%; }
.badger-stage::after {
  content: ''; position: absolute; left: -6%; right: -6%; bottom: -5%; height: 9%;
  background: linear-gradient(#0000, #000c);
}
.row-back, .row-front { position: absolute; left: 0; right: 0; display: flex; justify-content: space-around; align-items: flex-end; }
.row-back { bottom: 22%; height: 62%; justify-content: space-evenly; }
.row-front { bottom: 0; height: 80%; z-index: 1; }
.person { height: 100%; width: auto; overflow: visible; }
.row-front .person { margin: 0 -14px; }
.person.vit { height: 114%; }
.flap-l { transform-box: fill-box; transform-origin: 100% 50%; animation: flapL .45s ease-in-out infinite alternate; }
.flap-r { transform-box: fill-box; transform-origin: 0% 50%; animation: flapR .45s ease-in-out infinite alternate; }
.bob { animation: dip .45s ease-in-out infinite alternate; }

/* Vitalik's green tea, in hand on stage */
.f-held {
  position: absolute; right: -14%; top: 24%;
  font-size: 20cqw; z-index: 4;
  transform-origin: 50% 100%;
  animation: sip 4.5s ease-in-out infinite;
}

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: 16px;
  background: #000b;
  overflow-y: auto;
}
.modal-card {
  width: 100%; max-width: 440px;
  padding: 20px 16px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 0 var(--line), 0 0 60px #0008;
  text-align: center;
}
.res-kicker { font: 900 .75rem var(--body); letter-spacing: .2em; color: var(--muted); }
.res-title {
  margin: 4px 0 8px; font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1;
  color: var(--gold); -webkit-text-stroke: 1.5px var(--line); text-shadow: 0 4px 0 var(--line);
}
.res-title.lose { color: #ff6b6b; }
.res-faces { display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 900; color: var(--muted); }
.res-faces span.face {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; border: 3px solid var(--line); background: var(--c); font-size: 28px;
}
.res-faces span.face.lost { filter: grayscale(1) brightness(.6); }
.face-wrap { position: relative; }
.face-prop { position: absolute; right: -10px; bottom: -8px; font-size: 26px; font-style: normal; transform: rotate(14deg); }
.res-line { margin: 10px 0 4px; font-weight: 700; }
.res-finish { font-family: var(--display); color: var(--gold); font-size: 1.1rem; }
.res-quote { margin: 6px 0 0; font-size: .85rem; color: var(--muted); font-style: italic; }
.res-grid { font-size: 1.3rem; letter-spacing: 1px; margin: 12px 0 4px; word-break: break-all; line-height: 1.4; }
.res-legend { font-size: .7rem; color: var(--muted); margin: 0 0 8px; }
.res-meta { font-size: .85rem; color: var(--muted); margin: 6px 0 14px; min-height: 1.2em; }
.res-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.help-card { text-align: left; max-height: calc(100dvh - 32px); overflow-y: auto; }
.help-card h2 { font-family: var(--display); font-weight: 400; margin: 0 0 8px; }
.help-card h3 { font-size: .95rem; margin: 14px 0 6px; color: var(--gold); }
.help-card p, .help-card li { font-size: .9rem; line-height: 1.45; color: #ddd7ef; }
.help-card ul { padding-left: 18px; margin: 4px 0; }
.help-card .btn { width: 100%; margin-top: 12px; }

/* ---------- Sound ---------- */
.sound-row { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.sound-row .btn[aria-pressed="false"] { opacity: .6; }

/* PRESS START, then the title intro: a portrait pops in on each beat of the build, the logo slams on the drop. */
#screen-title { position: relative; }
.press-start {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 45%, #2a1c4a 0%, var(--bg) 70%);
  cursor: pointer;
}
.press-btn {
  padding: 24px;
  font-family: var(--display); font-size: clamp(30px, 10vw, 46px);
  color: var(--gold); background: none; border: none; cursor: pointer;
  -webkit-text-stroke: 1.5px var(--line);
  text-shadow: 0 4px 0 #b3261e, 0 7px 0 var(--line);
  animation: blink 1.1s steps(2, jump-none) infinite;
}
.press-hint { margin: 0; color: var(--muted); font-size: .85rem; }
#screen-title.boot .title-wrap { visibility: hidden; }
#screen-title.intro .title-wrap > :not(.title-roster) { opacity: 0; }
#screen-title.intro .title-roster span { opacity: 0; transform: scale(.3); animation: none; }
#screen-title.intro .title-roster span.in {
  opacity: 1; transform: scale(1);
  transition: transform .2s cubic-bezier(.2, 1.6, .4, 1), opacity .08s;
}
.logo.slam { animation: titleSlam .5s cubic-bezier(.2, 1.3, .4, 1) both; }
#screen-title.reveal .title-wrap > :not(.title-roster):not(.logo) { animation: fadeUp .4s .25s both; }
#app.quake { animation: quake .45s linear; }
.slam-flash { position: fixed; inset: 0; z-index: 60; background: #fff; pointer-events: none; animation: flashOut .45s ease-out forwards; }

.sounds-card { text-align: left; max-height: calc(100dvh - 32px); overflow-y: auto; }
.sounds-card h2 { font-family: var(--display); font-weight: 400; margin: 0 0 4px; }
.sounds-card h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 14px 0 6px; color: var(--gold); }
.sounds-card h3 .snd-face { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: var(--c); display: grid; place-items: center; font-size: 15px; }
.snd-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.snd-grid button {
  padding: 7px 10px; border-radius: 8px; border: 2px solid var(--line);
  background: var(--panel-2); color: var(--ink); font: 700 .8rem var(--body); cursor: pointer;
}
.snd-grid button:active { transform: translateY(2px); }
.sounds-card .btn { width: 100%; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60;
  padding: 10px 16px; border-radius: 10px;
  background: #fff; color: #111; font-weight: 800;
  box-shadow: 0 6px 20px #0008;
}

/* ---------- Landscape phones: stage left, buttons right ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  #app { max-width: 100%; }
  #screen-fight {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 38%);
    grid-template-rows: auto 1fr auto;
  }
  .hud { grid-column: 1 / -1; padding-top: 6px; }
  .stage { grid-column: 1; grid-row: 2; min-height: 0; margin-top: 0; }
  .log { grid-column: 1; grid-row: 3; }
  .controls {
    grid-column: 2; grid-row: 2 / 4;
    border-top: none; border-left: 3px solid var(--line);
    justify-content: center;
    padding-left: max(10px, env(safe-area-inset-right));
  }
  .move { min-height: 48px; }
  .fighter { height: 70%; width: auto; aspect-ratio: .6; }
  /* Cut-ins: a smaller portrait so portrait, name card and line fit a short screen. */
  .cutin { gap: 10px; }
  .cutin-portrait { width: min(36vh, 200px); }
  .cutin-head { font-size: min(20vh, 100px); }
  .cutin-name { font-size: min(13vh, 56px); }
  .cutin-line { font-size: min(6.5vh, 26px); max-width: 70vw; }
  /* Toly's brochure and Saylor's chart move to the left half, clear of the portrait. */
  .brochure { left: 18%; top: 22%; }
  .tracker { left: 3%; right: auto; width: 34%; top: 8%; height: 46%; }
  .saga-box { left: 4%; bottom: 5%; }
}

/* ---------- Keyframes ---------- */
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes spinC { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@keyframes wobble { 25% { transform: rotate(-8deg); } 75% { transform: rotate(6deg); } }
@keyframes flapL { from { transform: rotate(16deg); } to { transform: rotate(-16deg); } }
@keyframes flapR { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes dip { to { transform: translateY(3%); } }
@keyframes sip { 0%, 82%, 100% { transform: rotate(-6deg); } 88%, 94% { transform: rotate(-38deg) translateY(-8%); } }
@keyframes awkward {
  from { transform: rotate(-10deg) translateY(0); }
  to { transform: rotate(10deg) translateY(-4%); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -60px) scale(1); }
}
@keyframes slam {
  0% { opacity: 0; transform: scale(2.4); }
  18% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.96); }
}
@keyframes slamSmall { from { opacity: 0; transform: scale(2); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { transform: translateX(-120vw) rotate(-20deg); } to { transform: none; } }
@keyframes slideInR { from { transform: translateX(120vw) rotate(20deg); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0%, 86% { opacity: 0; } 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes stripes { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@keyframes runAcross { from { transform: translateX(0); } to { transform: translateX(calc(-100vw - 110%)); } }
@keyframes marchR { from { transform: translateX(-105%); } to { transform: translateX(100vw); } }
@keyframes marchL { from { transform: translateX(105%); } to { transform: translateX(-100vw); } }
@keyframes trampled { to { opacity: 0; transform: translateY(-30px) rotate(25deg) scale(.6); } }
@keyframes popIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes drop { from { transform: translateY(-160%); } to { transform: translateY(0); } }
@keyframes bytes { from { transform: translateX(100vw); } to { transform: translateX(-110%); } }
@keyframes fanOpen { from { opacity: 0; transform: rotate(0) scale(.6); } to { opacity: 1; transform: rotate(var(--r)); } }
@keyframes slap {
  0% { opacity: 0; transform: translate(0, 40px) scale(.4) rotate(-20deg); }
  30% { opacity: 1; transform: translate(calc(var(--dir) * 29vw), 0) scale(1.2) rotate(calc(var(--dir) * 16deg)); }
  42%, 100% { opacity: 1; transform: translate(calc(var(--dir) * 32vw), 0) scale(1) rotate(calc(var(--dir) * 10deg)); }
}
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 70px)) rotate(var(--rot)) scale(1); }
}
@keyframes boxDrop { from { transform: translateY(-120vh) rotate(-25deg); } to { transform: rotate(-6deg); } }
@keyframes glitch { 50% { transform: rotate(-4deg) skewX(-12deg) translateX(4px); } }
@keyframes lockPop { 0% { transform: rotate(-4deg) scale(1.5); } 100% { transform: rotate(-4deg) scale(1); } }
@keyframes beamSweep {
  0% { opacity: 0; transform: scaleX(var(--dir)) rotate(-40deg) scaleY(.4); }
  25% { opacity: 1; }
  100% { opacity: .9; transform: scaleX(var(--dir)) rotate(12deg) scaleY(1); }
}
@keyframes stamp { from { opacity: 0; transform: scale(2.6); } to { opacity: 1; transform: scale(1); } }
@keyframes nod { 50% { transform: translateY(3px); } }
@keyframes pump { 50% { transform: rotate(-14deg); } }
@keyframes thump { 0% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes typeOn { to { width: calc(var(--chars) * 1ch); } }
@keyframes zzzRise { 0% { opacity: 0; transform: translateY(20px) scale(.7); } 30% { opacity: 1; } 100% { opacity: .9; transform: translateY(-40px) scale(1.1); } }
@keyframes lightsOut { to { opacity: 1; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes titleSlam { 0% { opacity: 0; transform: scale(3.2); } 60% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
@keyframes quake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-9px, 5px); } 30% { transform: translate(8px, -6px); } 45% { transform: translate(-6px, -4px); }
  60% { transform: translate(5px, 4px); } 75% { transform: translate(-3px, 2px); } 90% { transform: translate(2px, -1px); }
}
@keyframes flashOut { from { opacity: .85; } to { opacity: 0; } }
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }
@keyframes creep { to { transform: translateX(8vw); } }
@keyframes glow { from { filter: brightness(1); } to { filter: brightness(1.35); } }
@keyframes pulse { 50% { filter: brightness(1.15); transform: scale(1.015); } }

/* Landscape phones: Charles's video on the left, his portrait and name card on the right. */
@media (orientation: landscape) and (max-height: 520px) {
  .cutin.sup-midnight { justify-content: center; align-items: flex-end; padding: 16px 5vw 16px 16px; }
  .sup-midnight .vplayer { left: 4%; top: 50%; transform: translateY(-50%); width: min(50%, 440px); }
}

@media (prefers-reduced-motion: reduce) {
  .f-bob, .title-roster span, .move-super.ready, .blocks.full i.on, .deco-sun, .deco-run, .deco-bytes, .marine,
  .flap-l, .flap-r, .bob, .f-held, .fighter.dance .f-bob, .f-bubble.spin, .fighter.hurt .f-sprite, .cutin-stripes,
  .astro, .astro-arm, .spk, .press-btn, #app.quake {
    animation: none !important;
  }
  .fighter { transition: none; }
}
