/* ============================================================================
   ACE RECEIVER — arcade volleyball reflex
   ========================================================================== */

@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-normal-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-normal-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-normal-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-italic-700.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-italic-800.woff2") format("woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-italic-900.woff2") format("woff2");
  font-style: italic;
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Bebas Neue";
  src: url("assets/fonts/BebasNeue-normal-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-condensed: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --font-ui: "Barlow Condensed", "Segoe UI", sans-serif;
  --paper: #f6f1e7;
  --paper-dim: rgba(246, 241, 231, 0.68);
  --ink: #060912;
  --ink-soft: #0b1020;
  --panel: rgba(8, 14, 28, 0.72);
  --panel-solid: #0a1020;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #ffc93e;
  --accent-2: #ff6534;
  --accent-rgb: 255, 201, 62;
  --accent-soft: rgba(255, 201, 62, 0.16);
  --accent-glow: rgba(255, 201, 62, 0.4);
  --danger: #4b87ff;
  --success: #ffd35a;
  --safe: env(safe-area-inset-top, 0px);
  --edge: clamp(18px, 4vw, 72px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #05070e;
}

body {
  color: var(--paper);
  font-family: var(--font-condensed);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.app {
  touch-action: none;
  --accent: #ffc93e;
  --accent-2: #ff5d2e;
  --accent-rgb: 255, 201, 62;
  --accent-soft: rgba(255, 201, 62, 0.13);
  --accent-glow: rgba(255, 201, 62, 0.44);
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  isolation: isolate;
  background: #05070e;
}

.app[data-theme="tactician"] {
  --accent: #ffcf57;
  --accent-2: #ff8a27;
  --accent-rgb: 255, 207, 87;
  --accent-soft: rgba(255, 207, 87, 0.13);
  --accent-glow: rgba(255, 158, 35, 0.48);
}
.app[data-theme="dual"] {
  --accent: #ff5b64;
  --accent-2: #e10f3b;
  --accent-rgb: 255, 91, 100;
  --accent-soft: rgba(255, 91, 100, 0.14);
  --accent-glow: rgba(255, 28, 78, 0.46);
}
.app[data-theme="cannon"] {
  --accent: #c477ff;
  --accent-2: #6b2bff;
  --accent-rgb: 196, 119, 255;
  --accent-soft: rgba(196, 119, 255, 0.14);
  --accent-glow: rgba(143, 58, 255, 0.52);
}
.app[data-theme="king"] {
  --accent: #45f4ff;
  --accent-2: #057dff;
  --accent-rgb: 69, 244, 255;
  --accent-soft: rgba(69, 244, 255, 0.14);
  --accent-glow: rgba(0, 208, 255, 0.5);
}
.app[data-screen="title"] {
  --accent: #ffd25a;
  --accent-2: #ff5c2f;
  --accent-rgb: 255, 210, 90;
  --accent-soft: rgba(255, 210, 90, 0.13);
  --accent-glow: rgba(255, 157, 47, 0.42);
}
.app[data-screen="gameplay"] {
  cursor: crosshair;
}
.app[data-screen="gameplay"] button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Stage + background effects
   -------------------------------------------------------------------------- */

.arena-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.screen-fx {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.fx-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 28%, rgba(1, 4, 10, 0.12) 62%, rgba(1, 4, 10, 0.72) 100%),
    linear-gradient(180deg, rgba(3, 5, 12, 0.42) 0%, transparent 18%, transparent 80%, rgba(2, 4, 10, 0.56) 100%);
}
.fx-grain {
  position: absolute;
  inset: -20%;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  animation: grain-shift 0.42s steps(2) infinite;
}
.fx-scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 3px, rgba(255, 255, 255, 0.12) 4px);
  mix-blend-mode: overlay;
}
.fx-corners {
  position: absolute;
  inset: clamp(12px, 2vw, 28px);
}
.fx-corners i {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(255, 255, 255, 0.25);
  border-style: solid;
}
.fx-corners i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.fx-corners i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.fx-corners i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.fx-corners i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.flash {
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.95), transparent 58%);
}
.flash.flash-active {
  animation: flash-out 0.38s ease-out both;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(var(--edge) + var(--safe)) var(--edge) calc(var(--edge) * 0.8);
}

/* --------------------------------------------------------------------------
   Shared UI
   -------------------------------------------------------------------------- */

.eyebrow,
.hud-kicker,
.overlay-kicker,
.serve-card-label,
.result-rounds-label,
.title-topright,
.intro-team,
.intro-read-label {
  font-family: var(--font-condensed);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: clamp(11px, 0.9vw, 15px);
  letter-spacing: 0.26em;
}
.eyebrow-line {
  width: clamp(28px, 4vw, 60px);
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.btn {
  --btn-skew: -8deg;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  min-height: 68px;
  padding: 12px 62px 12px 24px;
  border: 1px solid transparent;
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
  transform: skewX(var(--btn-skew));
  overflow: hidden;
}
.btn > * {
  transform: skewX(calc(var(--btn-skew) * -1));
}
.btn:hover {
  transform: skewX(var(--btn-skew)) translateY(-2px);
  filter: brightness(1.07);
}
.btn:active {
  transform: skewX(var(--btn-skew)) translateY(0) scale(0.99);
}
.btn-main {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(19px, 1.65vw, 26px);
  line-height: 1;
  letter-spacing: 0.035em;
}
.btn-sub {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  opacity: 0.6;
}
.btn-primary {
  color: #171005;
  background: linear-gradient(115deg, #fff8e2 0%, var(--accent) 48%, var(--accent-2) 130%);
  box-shadow: 0 16px 38px -20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.btn-primary .btn-sub {
  opacity: 0.64;
}
.btn-primary .btn-arrow {
  position: absolute;
  right: 19px;
  top: 50%;
  translate: 0 -50%;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.58;
}
.btn-camera {
  color: var(--paper);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015));
  border-color: var(--line-strong);
  backdrop-filter: blur(14px);
}
.btn-camera:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.btn-quiet {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
  backdrop-filter: blur(10px);
}
.btn-quiet:hover {
  background: rgba(255, 255, 255, 0.075);
}
.camera-dot {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--accent-glow);
  animation: camera-blink 2s ease-in-out infinite;
}
.btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.btn:disabled:hover {
  transform: skewX(var(--btn-skew));
}
.btn[disabled] .camera-dot {
  animation: none;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper-dim);
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   HUD
   -------------------------------------------------------------------------- */

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: calc(var(--edge) * 0.65 + var(--safe)) var(--edge) 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.hud.is-hidden {
  opacity: 0;
  display: grid !important;
  pointer-events: none;
}
.hud-block,
.hud-center,
.hud-right {
  pointer-events: auto;
}
.hud-round {
  position: relative;
  width: max-content;
  min-width: 178px;
  padding: 10px 18px 13px 15px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(100deg, rgba(4, 8, 16, 0.86), rgba(4, 8, 16, 0.28) 82%, transparent);
  box-shadow: -14px 0 40px -30px var(--accent-glow);
}
.hud-round::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.hud-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--paper-dim);
  font-size: 8px;
  letter-spacing: 0.22em;
}
.hud-round-line {
  display: flex;
  align-items: baseline;
  color: var(--paper);
  font-family: var(--font-display);
  line-height: 0.9;
}
.hud-round-current {
  font-size: 31px;
  letter-spacing: 0.04em;
}
.hud-round-slash {
  margin: 0 3px;
  color: var(--accent);
  font-size: 19px;
  opacity: 0.8;
}
.hud-round-total {
  color: var(--paper-dim);
  font-size: 19px;
}
.round-balls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.round-ball {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.035);
  color: transparent;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  transition: all 0.3s ease;
  overflow: hidden;
}
.round-ball svg {
  width: 13px;
  height: 13px;
  opacity: 0.26;
  transition: opacity 0.25s ease;
}
.round-ball.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 14px var(--accent-glow);
}
.round-ball.is-active svg {
  opacity: 1;
  color: var(--accent);
}
.round-ball.is-good {
  border-color: var(--accent);
  background: var(--accent);
  color: #1a1200;
  box-shadow: 0 0 16px var(--accent-glow);
}
.round-ball.is-good svg {
  display: none;
}
.round-ball.is-good::after {
  content: "✓";
  font-family: var(--font-condensed);
  font-size: 13px;
  font-weight: 900;
}
.round-ball.is-nice {
  border-color: #fff1ac;
  background: linear-gradient(135deg, #fff7c4, var(--accent));
  box-shadow: 0 0 21px rgba(255, 210, 90, 0.7);
}
.round-ball.is-nice::after {
  content: "★";
  font-size: 11px;
}
.round-ball.is-miss {
  border-color: rgba(91, 130, 255, 0.7);
  background: rgba(36, 57, 119, 0.55);
  color: #c4d8ff;
  box-shadow: none;
}
.round-ball.is-miss svg {
  display: none;
}
.round-ball.is-miss::after {
  content: "×";
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 900;
}

.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 1px;
}
.hud-live {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--paper-dim);
  font-family: var(--font-condensed);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.live-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.hud-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 0.9;
  letter-spacing: 0.055em;
  color: var(--paper);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.hud-score small {
  color: var(--accent);
  font-family: var(--font-condensed);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.hud-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}
.input-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 0 12px;
  margin-right: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 9, 18, 0.6);
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--paper-dim);
}
.input-glyph {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}
.input-badge.is-motion {
  border-color: var(--accent);
  color: var(--paper);
  background: var(--accent-soft);
}
.input-badge.is-motion .input-glyph {
  animation: pulse-glyph 1.8s ease-in-out infinite;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(5, 9, 18, 0.55);
  color: var(--paper-dim);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.icon-sound-off {
  display: none;
}
.is-muted .icon-sound-on {
  display: none;
}
.is-muted .icon-sound-off {
  display: block;
}

/* --------------------------------------------------------------------------
   Title
   -------------------------------------------------------------------------- */

.title-screen {
  padding-top: calc(var(--edge) * 0.72 + var(--safe));
  overflow: hidden;
}
.title-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: 0.19em;
}
.title-arena {
  display: flex;
  align-items: center;
  gap: 9px;
}
.title-arena i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.title-arena em {
  color: var(--accent);
  font-style: normal;
  opacity: 0.7;
}
.title-topright {
  color: rgba(246, 241, 231, 0.38);
  font-size: 8px;
}

.title-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(20px, 3vw, 54px);
  flex: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 2vh 0 4vh;
}
.title-copy {
  position: relative;
  z-index: 3;
  max-width: 670px;
  padding-left: clamp(0px, 1vw, 20px);
}
.title-copy > * {
  animation: title-in 0.75s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}
.title-copy .eyebrow { animation-delay: 0.03s; }
.title-copy .game-logo { animation-delay: 0.1s; }
.title-copy .title-tagline { animation-delay: 0.2s; }
.title-copy .difficulty-picker { animation-delay: 0.26s; }
.title-copy .title-actions { animation-delay: 0.32s; }
.title-copy .title-meta { animation-delay: 0.4s; }

.game-logo {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 1.6vh 0 1.4vh;
  font-weight: 900;
  text-transform: uppercase;
  transform: skewX(-5deg);
  transform-origin: left center;
}
.logo-kicker {
  position: relative;
  z-index: 3;
  width: max-content;
  margin-left: 0.8em;
  margin-bottom: 0.15em;
  padding: 0.28em 0.6em;
  color: var(--ink);
  background: var(--accent);
  font-family: var(--font-condensed);
  font-size: clamp(8px, 0.68vw, 11px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.2em;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
}
.logo-ace {
  position: relative;
  z-index: 1;
  display: block;
  margin-left: -0.02em;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(112px, 15.5vw, 246px);
  font-weight: 400;
  line-height: 0.62;
  letter-spacing: 0.035em;
  -webkit-text-stroke: clamp(1px, 0.14vw, 2px) rgba(255, 255, 255, 0.9);
  text-stroke: clamp(1px, 0.14vw, 2px) rgba(255, 255, 255, 0.9);
  filter: drop-shadow(7px 9px 0 rgba(0, 0, 0, 0.38));
}
.logo-ace::after {
  content: "ACE";
  position: absolute;
  inset: 0.035em 0 0 0.028em;
  z-index: -1;
  color: var(--accent);
  -webkit-text-stroke: 0 transparent;
  opacity: 0.2;
  filter: blur(0.5px);
}
.logo-receiver {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 0.03em;
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(51px, 8.35vw, 135px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.75;
  letter-spacing: -0.025em;
  text-shadow:
    3px 3px 0 rgba(6, 9, 18, 0.92),
    -1px -1px 0 rgba(6, 9, 18, 0.92),
    0 0 64px rgba(255, 198, 58, 0.14);
}
.logo-receiver::before {
  content: "RECEIVER";
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-2);
  translate: 0.04em 0.055em;
  opacity: 0.65;
}
.logo-jp {
  position: absolute;
  top: 24%;
  right: -0.35em;
  writing-mode: vertical-rl;
  color: var(--accent);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: clamp(10px, 0.9vw, 14px);
  font-weight: 700;
  letter-spacing: 0.45em;
  opacity: 0.64;
}
.title-tagline {
  max-width: 440px;
  margin: 0 0 clamp(14px, 2vh, 22px);
  color: var(--paper-dim);
  font-family: var(--font-condensed);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.difficulty-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 clamp(14px, 2vh, 22px);
}
.difficulty-label {
  margin-right: 3px;
  color: rgba(246, 241, 231, 0.4);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.difficulty-switch {
  display: flex;
  gap: 4px;
}
.difficulty-btn {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(246, 241, 231, 0.56);
  font-family: var(--font-condensed);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.difficulty-btn:hover {
  border-color: var(--accent);
  color: var(--paper);
}
.difficulty-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #171005;
  box-shadow: 0 0 18px -6px var(--accent-glow);
}
.difficulty-hint {
  color: rgba(246, 241, 231, 0.4);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}
.title-actions .btn {
  min-width: 232px;
}
.title-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 2.3vw, 34px);
  margin-top: clamp(18px, 2.5vh, 30px);
}
.motion-copy {
  display: flex;
  align-items: center;
  gap: 4px;
}
.motion-copy span {
  margin-left: 7px;
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.best-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: clamp(16px, 2.3vw, 34px);
  border-left: 1px solid var(--line);
}
.best-label {
  color: rgba(246, 241, 231, 0.42);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.best-strip strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* Title roster */
.title-visual {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: min(69vh, 690px);
  min-height: 420px;
  animation: title-visual-in 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) 0.12s both;
}
.title-sunburst {
  position: absolute;
  top: 50%;
  left: 54%;
  width: 120%;
  aspect-ratio: 1;
  translate: -50% -50%;
  opacity: 0.15;
  background: repeating-conic-gradient(from 8deg, transparent 0deg 8deg, rgba(var(--accent-rgb), 0.6) 8deg 9deg);
  mask-image: radial-gradient(circle, black 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 68%);
  animation: sun-drift 45s linear infinite;
  pointer-events: none;
}
.title-roster {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(5px, 0.6vw, 10px);
  height: 100%;
  padding: 8% 4% 0 2%;
}
.title-roster::before {
  content: "VS";
  position: absolute;
  top: 20%;
  left: 18%;
  z-index: 5;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(44px, 5.2vw, 84px);
  line-height: 0.7;
  letter-spacing: 0.03em;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 38px rgba(var(--accent-rgb), 0.2);
  transform: rotate(-9deg);
  opacity: 0.86;
}
.roster-card {
  position: relative;
  flex: 0 1 24%;
  height: 88%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--card-rgb), 0.32);
  background:
    radial-gradient(ellipse at 50% 18%, rgba(var(--card-rgb), 0.38), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(2, 5, 12, 0.25));
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  transform: translateY(var(--lift, 0)) rotate(var(--tilt, 0deg));
  transform-origin: bottom center;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease;
  isolation: isolate;
}
.roster-card:nth-child(1) { --lift: 18px; --tilt: -1.8deg; }
.roster-card:nth-child(2) { --lift: 0px; --tilt: -0.6deg; }
.roster-card:nth-child(3) { --lift: 12px; --tilt: 0.8deg; }
.roster-card:nth-child(4) { --lift: 4px; --tilt: 2deg; }
.roster-card:hover {
  transform: translateY(calc(var(--lift) - 8px)) rotate(0deg);
  border-color: rgba(var(--card-rgb), 0.7);
}
.roster-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, transparent 36%, rgba(3, 6, 14, 0.12) 52%, rgba(3, 6, 14, 0.94) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 26%, transparent 78%, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}
.roster-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  z-index: 3;
  height: 2px;
  background: rgb(var(--card-rgb));
  box-shadow: 0 0 18px rgba(var(--card-rgb), 0.75);
  opacity: 0.8;
}
.roster-card img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 113%;
  object-fit: contain;
  object-position: top center;
  filter: brightness(0.76) contrast(1.08) saturate(0.95);
  transform: scale(1.1);
  transform-origin: top center;
}
.roster-card .roster-num {
  position: absolute;
  top: 11px;
  left: 12px;
  z-index: 4;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.04em;
}
.roster-card .roster-data {
  position: absolute;
  left: 13px;
  right: 12px;
  bottom: 14px;
  z-index: 4;
}
.roster-card .roster-role {
  display: block;
  margin-bottom: 3px;
  color: rgb(var(--card-rgb));
  font-size: 7px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.18em;
}
.roster-card .roster-name {
  display: block;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.55vw, 24px);
  line-height: 0.92;
  letter-spacing: 0.035em;
}
.roster-card .roster-serve {
  display: block;
  margin-top: 6px;
  color: rgba(246, 241, 231, 0.45);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.12em;
}
.roster-card .roster-avatar-silhouette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 40%, rgba(var(--card-rgb), 0.24), transparent 58%);
}
.title-stamp {
  position: absolute;
  right: -2%;
  top: 3%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 13px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.52);
  background: rgba(4, 8, 17, 0.6);
  backdrop-filter: blur(7px);
  transform: rotate(5deg);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.title-stamp span {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 0.7;
}
.title-stamp small {
  color: var(--paper-dim);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.14em;
}
.title-roster-caption {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 9px 2% 0;
  color: rgba(246, 241, 231, 0.4);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.title-roster-caption span {
  color: var(--accent);
}

.title-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
}
.ticker {
  overflow: hidden;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(3, 6, 14, 0.55);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 30px;
  width: max-content;
  animation: ticker-move 26s linear infinite;
  color: rgba(246, 241, 231, 0.55);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.ticker-track i {
  color: var(--accent);
  font-style: normal;
  font-size: 8px;
  opacity: 0.7;
}
.footer-note {
  margin: 0;
  padding: 7px var(--edge) 8px;
  color: rgba(246, 241, 231, 0.26);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
  background: rgba(3, 6, 14, 0.8);
}

/* --------------------------------------------------------------------------
   Round intro
   -------------------------------------------------------------------------- */

.intro-screen {
  --intro-accent: var(--accent);
  background:
    radial-gradient(ellipse at 74% 48%, rgba(var(--accent-rgb), 0.19), transparent 45%),
    linear-gradient(100deg, rgba(5, 8, 16, 0.97) 0%, rgba(5, 8, 16, 0.83) 44%, rgba(5, 8, 16, 0.22) 78%, rgba(5, 8, 16, 0.46) 100%);
  overflow: hidden;
}
.intro-theme-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 55%, rgba(var(--accent-rgb), 0.07) 55% 56%, transparent 56%),
    repeating-linear-gradient(115deg, transparent 0 60px, rgba(255, 255, 255, 0.018) 60px 61px);
  mask-image: linear-gradient(90deg, transparent 20%, black 80%);
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, black 80%);
}
.intro-theme-wash::before {
  content: "";
  position: absolute;
  top: -20%;
  right: 16%;
  width: 38vw;
  height: 130%;
  border-left: 1px solid rgba(var(--accent-rgb), 0.18);
  border-right: 1px solid rgba(var(--accent-rgb), 0.08);
  transform: skewX(-12deg);
}
.intro-theme-wash::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: -30%;
  width: 60vw;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.04), transparent 66%);
}
.intro-topline,
.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.intro-topline {
  opacity: 0;
  pointer-events: none;
}
.intro-topline em,
.result-topline em {
  color: var(--accent);
  font-style: normal;
  opacity: 0.7;
}
.intro-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  flex: 1;
  align-items: center;
  gap: clamp(20px, 3vw, 60px);
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 1vh 0 5vh;
}
.intro-copy {
  position: relative;
  z-index: 4;
  max-width: 570px;
  padding-left: clamp(4px, 2.5vw, 38px);
  animation: intro-copy-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.intro-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 700;
  letter-spacing: 0.24em;
}
.intro-eyebrow span {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: 0.03em;
}
.intro-eyebrow em {
  color: var(--paper-dim);
  font-family: var(--font-condensed);
  font-size: 0.7em;
  font-style: normal;
  letter-spacing: 0.08em;
}
.intro-team {
  margin: 0 0 -3px;
  color: rgba(246, 241, 231, 0.54);
  font-size: 9px;
  letter-spacing: 0.24em;
}
.intro-name {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(44px, 5.9vw, 94px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.8;
  letter-spacing: -0.025em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.intro-role {
  margin: 9px 0 clamp(17px, 2.5vh, 26px);
  color: var(--accent);
  font-family: var(--font-condensed);
  font-size: clamp(15px, 1.55vw, 22px);
  font-weight: 700;
  letter-spacing: 0.17em;
}
.serve-card {
  position: relative;
  width: min(100%, 430px);
  padding: 15px 20px 16px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.015) 72%, transparent);
  backdrop-filter: blur(5px);
  clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%);
}
.serve-card-label {
  display: block;
  margin-bottom: 4px;
  color: var(--paper-dim);
  font-size: 8px;
  letter-spacing: 0.22em;
}
.serve-card strong {
  display: block;
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(21px, 2.1vw, 30px);
  font-weight: 800;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.serve-card p {
  max-width: 360px;
  margin: 8px 0 11px;
  color: rgba(246, 241, 231, 0.56);
  font-size: clamp(11px, 0.85vw, 14px);
  line-height: 1.25;
}
.speed-meter {
  display: flex;
  align-items: center;
  gap: 4px;
}
.speed-meter span {
  margin-right: 7px;
  color: rgba(246, 241, 231, 0.34);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.speed-meter i {
  display: block;
  width: 20px;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  transform: skewX(-22deg);
}
.speed-meter i.is-lit {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.intro-quote {
  max-width: 430px;
  margin: clamp(16px, 2.4vh, 25px) 0 0;
  padding: 0;
  color: rgba(246, 241, 231, 0.7);
  font-family: var(--font-condensed);
  font-size: clamp(13px, 1.05vw, 17px);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
}
.intro-quote::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 9px;
  vertical-align: middle;
  background: var(--accent);
  opacity: 0.6;
}
.intro-read {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.intro-read-label {
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.16em;
}
.intro-read span:last-child {
  color: rgba(246, 241, 231, 0.4);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.intro-figure {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: 100%;
  animation: intro-figure-in 0.95s cubic-bezier(0.16, 0.8, 0.22, 1) both;
}
.intro-ghost-number {
  position: absolute;
  top: 2%;
  right: 2%;
  z-index: 0;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(240px, 35vw, 550px);
  font-weight: 400;
  line-height: 0.7;
  letter-spacing: -0.05em;
  -webkit-text-stroke: 1px rgba(var(--accent-rgb), 0.17);
  opacity: 0.8;
  transform: skewX(-7deg);
  user-select: none;
}
.intro-figure-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: min(47vw, 610px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  box-shadow:
    0 0 0 28px rgba(var(--accent-rgb), 0.025),
    0 0 0 70px rgba(var(--accent-rgb), 0.018);
}
.intro-figure-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112%;
  height: 1px;
  translate: -50% -50%;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.22), transparent);
}
.intro-figure-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 112%;
  translate: -50% -50%;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.17), transparent);
}
.intro-figure-glow {
  position: absolute;
  bottom: 9%;
  left: 50%;
  width: 55%;
  height: 30%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.3), transparent 68%);
  filter: blur(12px);
}
.intro-portrait {
  position: relative;
  z-index: 3;
  display: block;
  max-width: min(93%, 590px);
  max-height: min(72vh, 680px);
  object-fit: contain;
  object-position: bottom center;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 87%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 87%, transparent 100%);
  filter:
    contrast(1.03) saturate(0.96)
    drop-shadow(0 22px 46px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 24px rgba(var(--accent-rgb), 0.16));
}
.intro-portrait::selection {
  background: transparent;
}
.intro-name-tag {
  position: absolute;
  bottom: 8.5%;
  left: 1%;
  z-index: 4;
  min-width: 128px;
  padding: 9px 14px 8px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(100deg, rgba(4, 8, 16, 0.9), rgba(4, 8, 16, 0.22));
  transform: skewX(-7deg);
}
.intro-name-tag span {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.intro-name-tag strong {
  display: block;
  font-family: var(--font-condensed);
  font-size: 15px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.08em;
  transform: skewX(7deg);
}
.intro-name-tag > * {
  transform: skewX(7deg);
}
.intro-stat-tag {
  position: absolute;
  right: 1%;
  bottom: 16%;
  z-index: 4;
  text-align: right;
}
.intro-stat-tag span {
  display: block;
  margin-bottom: 2px;
  color: rgba(246, 241, 231, 0.42);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.intro-stat-tag strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.05em;
}
.intro-bottom {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr minmax(210px, 34%);
  align-items: end;
  gap: 30px;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.intro-callout {
  display: flex;
  align-items: baseline;
  gap: 13px;
}
.intro-callout-label {
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.intro-callout strong {
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(12px, 1.05vw, 16px);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08em;
}
.intro-progress {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.intro-progress-track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.intro-progress-track i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 12px var(--accent-glow);
}
.intro-progress span {
  align-self: flex-end;
  color: var(--paper-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

/* --------------------------------------------------------------------------
   Gameplay overlay
   -------------------------------------------------------------------------- */

.gameplay-screen {
  pointer-events: none;
  padding: 0;
}
.gameplay-top {
  display: flex;
  justify-content: center;
  padding-top: calc(15vh + var(--safe));
}
.prompt-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 8, 17, 0.48);
  backdrop-filter: blur(7px);
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.prompt-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent-glow);
  animation: prompt-blink 1.4s ease-in-out infinite;
}
.prompt-bar.is-hot {
  color: var(--paper);
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(4, 8, 17, 0.66);
}
.prompt-bar.is-dismissed {
  opacity: 0;
  transform: translateY(-6px);
}
.gameplay-screen.is-receiving .prompt-bar {
  opacity: 0;
  transform: translateY(-6px);
}
.serve-callout {
  position: absolute;
  top: 26%;
  left: var(--edge);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: auto;
  max-width: min(380px, 46vw);
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.serve-callout.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.serve-callout span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.25em;
}
.serve-callout strong {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.55);
}
.serve-callout-ticks {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}
.serve-callout-ticks i {
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-22deg);
}
.serve-callout-ticks i.is-lit {
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent-glow);
}
.impact-text {
  position: absolute;
  top: 43%;
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: min(860px, 90vw);
  translate: -50% -50%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.impact-text.is-visible {
  animation: impact-pop 0.5s cubic-bezier(0.18, 1.7, 0.32, 1) both;
}
.impact-main {
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(50px, 7.5vw, 112px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.82;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
  text-shadow:
    4px 4px 0 rgba(4, 7, 14, 0.94),
    -1px -1px 0 rgba(4, 7, 14, 0.94),
    0 0 43px rgba(var(--accent-rgb), 0.25);
  transform: skewX(-7deg);
}
.impact-sub {
  color: rgba(246, 241, 231, 0.7);
  font-size: clamp(9px, 0.95vw, 13px);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}
.impact-text.is-nice .impact-main {
  color: #ffecac;
  text-shadow:
    4px 4px 0 rgba(4, 7, 14, 0.94),
    -1px -1px 0 rgba(4, 7, 14, 0.94),
    0 0 58px rgba(255, 207, 79, 0.58);
}
.impact-text.is-good .impact-main {
  color: var(--accent);
}
.impact-text.is-miss .impact-main {
  color: #bfd3ff;
  text-shadow:
    4px 4px 0 rgba(4, 7, 14, 0.94),
    -1px -1px 0 rgba(4, 7, 14, 0.94),
    0 0 31px rgba(69, 126, 255, 0.38);
}
.impact-text.is-miss .impact-sub {
  color: rgba(191, 211, 255, 0.68);
}
.gameplay-bottom {
  position: absolute;
  right: var(--edge);
  bottom: calc(var(--edge) * 0.55 + var(--safe));
  left: var(--edge);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}
.move-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--paper-dim);
  transition: opacity 0.3s ease;
}
.move-key {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 8, 17, 0.45);
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  backdrop-filter: blur(5px);
}
.move-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.move-copy strong {
  color: var(--paper);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.move-copy small {
  color: rgba(246, 241, 231, 0.42);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.balance-note {
  color: rgba(246, 241, 231, 0.32);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.gameplay-screen.is-receiving .move-hint {
  opacity: 0.4;
}
.gameplay-screen.is-receiving .balance-note {
  opacity: 0.35;
}
.gameplay-screen.is-serving .move-hint {
  opacity: 0.8;
}
.app[data-input="motion"] .move-hint,
.app[data-input="motion"] .balance-note {
  visibility: hidden;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */

.result-screen {
  background:
    radial-gradient(ellipse at 74% 35%, rgba(var(--accent-rgb), 0.18), transparent 44%),
    linear-gradient(100deg, rgba(5, 8, 16, 0.98) 0%, rgba(5, 8, 16, 0.88) 43%, rgba(5, 8, 16, 0.38) 80%, rgba(5, 8, 16, 0.7) 100%);
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
}
.result-topline {
  margin-bottom: 2vh;
}
.result-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 1.22fr);
  align-items: center;
  gap: clamp(20px, 3vw, 55px);
  flex: 1;
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: 0 0 3vh;
}
.result-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  min-height: min(58vh, 620px);
  animation: intro-figure-in 0.8s cubic-bezier(0.16, 0.8, 0.22, 1) both;
}
.result-ghost {
  position: absolute;
  top: 3%;
  left: 50%;
  z-index: 0;
  translate: -50% 0;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(300px, 41vw, 610px);
  font-weight: 400;
  line-height: 0.7;
  -webkit-text-stroke: 1px rgba(var(--accent-rgb), 0.16);
  transform: skewX(-7deg);
}
.result-figure-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(39vw, 510px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  box-shadow: 0 0 0 35px rgba(var(--accent-rgb), 0.022);
}
.result-figure-ring::after {
  content: "";
  position: absolute;
  inset: 50% -15% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), transparent);
}
.result-portrait {
  position: relative;
  z-index: 2;
  max-width: min(96%, 510px);
  max-height: min(58vh, 610px);
  object-fit: contain;
  object-position: bottom center;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 84%, transparent 100%);
  filter:
    contrast(1.02) saturate(0.9)
    drop-shadow(0 20px 46px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 25px rgba(var(--accent-rgb), 0.14));
}
.result-character {
  position: absolute;
  right: 1%;
  bottom: 7%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-right: 2px solid var(--accent);
  background: linear-gradient(270deg, rgba(4, 8, 16, 0.85), transparent);
  text-align: right;
}
.result-character span {
  color: var(--accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.result-character strong {
  font-family: var(--font-condensed);
  font-size: 16px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.06em;
}
.result-main {
  position: relative;
  z-index: 3;
  max-width: 660px;
  animation: result-main-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}
.result-eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
}
.result-eyebrow span {
  color: rgba(246, 241, 231, 0.48);
}
.result-headline {
  margin: 0 0 clamp(14px, 2vh, 20px);
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(38px, 4.7vw, 70px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.85;
  letter-spacing: -0.025em;
  transform: skewX(-4deg);
  transform-origin: left center;
}
.rank-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 23px);
  min-height: 96px;
  padding: 12px 25px 12px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background:
    linear-gradient(100deg, rgba(var(--accent-rgb), 0.13), rgba(255, 255, 255, 0.02) 55%, transparent),
    rgba(5, 9, 18, 0.6);
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  overflow: hidden;
}
.rank-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}
.rank-letter {
  display: grid;
  place-items: center;
  width: clamp(69px, 6vw, 90px);
  height: clamp(69px, 6vw, 90px);
  flex-shrink: 0;
  color: var(--accent);
  background: rgba(2, 5, 12, 0.5);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  font-family: var(--font-display);
  font-size: clamp(52px, 5.5vw, 79px);
  line-height: 0.8;
  text-shadow: 0 0 30px var(--accent-glow);
}
.rank-letter[data-rank="S"] {
  color: #fff3ba;
  text-shadow: 0 0 15px rgba(255, 213, 80, 0.8), 0 0 45px rgba(255, 184, 44, 0.45);
}
.rank-letter[data-rank="A"] {
  color: var(--accent);
}
.rank-letter[data-rank="B"] {
  color: #d8c9ff;
}
.rank-letter[data-rank="C"] {
  color: #acc7f8;
}
.rank-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.rank-kicker {
  color: rgba(246, 241, 231, 0.46);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.rank-copy strong {
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(19px, 1.8vw, 26px);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.03em;
}
.rank-copy p {
  margin: 3px 0 0;
  color: var(--accent);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.rank-seal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-left: auto;
  flex-shrink: 0;
  border: 1px dashed rgba(var(--accent-rgb), 0.46);
  border-radius: 50%;
  color: var(--accent);
  transform: rotate(-13deg);
}
.rank-seal span {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 0.8;
  letter-spacing: 0.08em;
}
.rank-seal small {
  margin-top: 2px;
  font-size: 5px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.result-quote {
  max-width: 560px;
  margin: clamp(12px, 1.8vh, 18px) 0 0;
  color: rgba(246, 241, 231, 0.71);
  font-family: var(--font-condensed);
  font-size: clamp(13px, 1.12vw, 17px);
  font-style: italic;
  line-height: 1.32;
}
.result-quote::before {
  content: "“";
  margin-right: 2px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 20px;
  font-style: normal;
  vertical-align: -2px;
}
.result-quote::after {
  content: "”";
  margin-left: 2px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 20px;
  font-style: normal;
  vertical-align: -2px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: clamp(14px, 2vh, 20px) 0 0;
}
.stat-box {
  min-width: 0;
  padding: 8px 10px 7px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.024);
}
.stat-box span {
  display: block;
  overflow: hidden;
  color: rgba(246, 241, 231, 0.38);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-box strong {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: 1px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 33px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.02em;
}
.stat-box strong small {
  color: var(--accent);
  font-family: var(--font-condensed);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.result-rounds {
  margin-top: clamp(14px, 2vh, 18px);
}
.result-rounds-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(246, 241, 231, 0.34);
  font-size: 7px;
  letter-spacing: 0.17em;
}
.result-round-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.result-round-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.result-round-item .result-round-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}
.result-round-item.is-good .result-round-icon {
  color: #1a1200;
  background: var(--accent);
}
.result-round-item.is-nice .result-round-icon {
  color: #221600;
  background: #ffefaf;
  box-shadow: 0 0 10px rgba(255, 216, 94, 0.4);
}
.result-round-item.is-miss .result-round-icon {
  color: #b9d0ff;
  background: rgba(67, 105, 188, 0.35);
  border: 1px solid rgba(91, 131, 227, 0.5);
}
.result-round-item .result-round-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.result-round-item span {
  overflow: hidden;
  color: var(--paper-dim);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-round-item strong {
  overflow: hidden;
  color: var(--paper);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: clamp(16px, 2.2vh, 24px);
}
.result-actions .btn {
  min-width: 206px;
  min-height: 59px;
  padding: 10px 50px 10px 20px;
}
.result-actions .btn-main {
  font-size: 19px;
}
.result-actions .btn-arrow {
  font-size: 27px;
}
.result-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  width: min(1340px, 100%);
  margin: 0 auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: rgba(246, 241, 231, 0.27);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.result-footer em {
  color: var(--accent);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   Overlays / dialogs
   -------------------------------------------------------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(15px, 5vw, 45px);
  background: rgba(2, 4, 10, 0.68);
  backdrop-filter: blur(12px);
  animation: overlay-in 0.28s ease both;
}
.overlay-card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100dvh - 30px);
  touch-action: pan-y;
  padding: clamp(24px, 3.2vw, 38px);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background:
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.075), transparent 42%),
    #080d19;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  animation: card-in 0.42s cubic-bezier(0.18, 0.9, 0.24, 1) both;
  overflow-y: auto;
}
.overlay-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 36%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}
.overlay-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.24em;
}
.overlay-card h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(37px, 4vw, 52px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.85;
  letter-spacing: -0.02em;
}
.overlay-copy {
  margin: 12px 0 0;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 1.4;
}
.pause-card {
  width: min(430px, 100%);
}
.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 25px;
}
.pause-actions .btn {
  width: 100%;
  min-height: 61px;
}
.pause-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 18px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: rgba(246, 241, 231, 0.35);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.pause-controls span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Camera modal */
.camera-card {
  width: min(930px, 100%);
  padding: clamp(20px, 2.7vw, 34px);
}
.motion-intro {
  max-width: 610px;
  margin-top: 8px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--paper-dim);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.modal-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.camera-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(15px, 2vw, 24px);
  margin-top: clamp(17px, 2.5vh, 25px);
}
.camera-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background:
    radial-gradient(ellipse at 50% 55%, rgba(var(--accent-rgb), 0.1), transparent 65%),
    linear-gradient(160deg, #121a2b, #070b14);
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 17px, 100% 100%, 0 100%);
}
.camera-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scaleX(-1);
  transition: opacity 0.4s ease;
  filter: saturate(0.72) contrast(1.08) brightness(0.83);
}
.camera-preview.has-video video {
  opacity: 1;
}
.camera-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 17, 0.15), transparent 22%, transparent 74%, rgba(4, 8, 17, 0.65)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.035) 3px 4px);
  pointer-events: none;
}
.camera-guide {
  position: absolute;
  top: 16%;
  left: 50%;
  z-index: 3;
  width: 54%;
  height: 72%;
  translate: -50% 0;
  border: 1px dashed rgba(var(--accent-rgb), 0.4);
  border-radius: 45% 45% 15% 15%;
  pointer-events: none;
}
.camera-guide i {
  position: absolute;
  top: 23%;
  width: 32%;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.28);
}
.camera-guide i:first-child {
  left: 7%;
  rotate: 8deg;
}
.camera-guide i:nth-child(2) {
  right: 7%;
  rotate: -8deg;
}
.camera-guide span {
  position: absolute;
  bottom: -21px;
  left: 50%;
  translate: -50% 0;
  color: rgba(246, 241, 231, 0.38);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
.camera-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(246, 241, 231, 0.35);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  transition: opacity 0.3s ease;
}
.camera-preview.has-video .camera-placeholder {
  opacity: 0;
  pointer-events: none;
}
.camera-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 50%;
  color: var(--accent);
  font-size: 24px;
}
.camera-live-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  background: rgba(4, 8, 16, 0.66);
  color: var(--paper-dim);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0;
}
.camera-preview.has-video .camera-live-tag {
  opacity: 1;
}
.camera-live-tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff5f6a;
  box-shadow: 0 0 7px rgba(255, 95, 106, 0.7);
}
.camera-side {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.camera-status {
  min-height: 33px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.065);
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
}
.camera-status.is-error {
  border-color: #ff5d6c;
  background: rgba(255, 93, 108, 0.08);
  color: #ffacb4;
}
.camera-status.is-ready {
  border-color: var(--accent);
  color: var(--paper);
}
.tracking-meter {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.tracking-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: rgba(246, 241, 231, 0.4);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.tracking-meter-head span:last-child {
  color: var(--accent);
}
.tracking-track {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
}
.tracking-track b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 12px;
  translate: -50% -50%;
  background: rgba(255, 255, 255, 0.32);
}
.tracking-track i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent-glow);
  transition: width 0.08s linear;
}
.camera-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.camera-steps li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.camera-steps li > span {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
}
.camera-steps strong {
  display: block;
  margin-bottom: 1px;
  color: var(--paper);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.camera-steps small {
  display: block;
  color: rgba(246, 241, 231, 0.38);
  font-size: 9px;
  line-height: 1.25;
}
.camera-beam {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.camera-beam span {
  color: rgba(246, 241, 231, 0.35);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.camera-beam-track {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.camera-beam-track i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--accent);
  transition: width 0.1s linear;
}
.camera-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(18px, 2.4vh, 24px);
}
.camera-actions .btn {
  flex: 1 1 200px;
  min-height: 59px;
  padding: 10px 18px;
}
.camera-actions .btn-main {
  font-size: 18px;
}
.camera-privacy {
  margin: 15px 0 0;
  color: rgba(246, 241, 231, 0.28);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Motion PIP
   -------------------------------------------------------------------------- */

.motion-pip {
  position: absolute;
  bottom: calc(var(--edge) * 0.55 + var(--safe));
  left: var(--edge);
  z-index: 34;
  width: clamp(145px, 12vw, 190px);
  padding: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(4, 8, 16, 0.74);
  backdrop-filter: blur(10px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.motion-pip.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}
.pip-head span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--paper-dim);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.pip-head span i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff5f6a;
  box-shadow: 0 0 6px rgba(255, 95, 106, 0.65);
}
.pip-head button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.pip-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1220;
}
.pip-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: saturate(0.6) brightness(0.7);
}
.pip-video canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pip-video b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  translate: -50% -50%;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: left 0.08s linear;
}
.pip-bar {
  height: 2px;
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.1);
}
.pip-bar i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--accent);
  transition: width 0.1s linear;
}
.motion-pip > span {
  display: block;
  margin-top: 4px;
  color: rgba(246, 241, 231, 0.3);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* --------------------------------------------------------------------------
   Toast / boot
   -------------------------------------------------------------------------- */

.toast {
  position: absolute;
  bottom: calc(var(--edge) + 12px + var(--safe));
  left: 50%;
  z-index: 100;
  max-width: min(520px, 90vw);
  padding: 9px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(5, 9, 18, 0.92);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  translate: -50% 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.boot-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: #05070e;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot-overlay.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-mark {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: 0.04em;
}
.boot-mark span {
  margin: 0 8px;
  color: var(--accent);
}
.boot-track {
  width: min(240px, 50vw);
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}
.boot-track i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: boot-progress 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.boot-overlay p {
  margin: 0;
  color: rgba(246, 241, 231, 0.38);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
  100% { transform: translate(-1%, -1%); }
}
@keyframes flash-out {
  0% { opacity: 0.92; }
  100% { opacity: 0; }
}
@keyframes camera-blink {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 0 4px var(--accent-soft), 0 0 10px var(--accent-glow); }
  50% { opacity: 1; box-shadow: 0 0 0 5px var(--accent-soft), 0 0 18px var(--accent-glow); }
}
@keyframes pulse-glyph {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes title-visual-in {
  from { opacity: 0; transform: translateX(22px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes sun-drift {
  to { transform: rotate(360deg); }
}
@keyframes ticker-move {
  to { transform: translateX(-50%); }
}
@keyframes intro-copy-in {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes intro-figure-in {
  from { opacity: 0; transform: translateX(28px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes result-main-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes impact-pop {
  0% { opacity: 0; transform: scale(0.75); }
  55% { opacity: 1; transform: scale(1.075); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes boot-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes prompt-blink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .title-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  }
  .title-visual {
    height: min(60vh, 570px);
  }
  .roster-card .roster-name {
    font-size: 15px;
  }
  .roster-card .roster-serve {
    display: none;
  }
  .intro-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }
  .intro-stat-tag {
    right: 0;
    bottom: 10%;
  }
  .result-grid {
    grid-template-columns: minmax(210px, 0.72fr) minmax(390px, 1.28fr);
  }
  .stat-box span {
    letter-spacing: 0.05em;
  }
}

@media (max-width: 860px) {
  .app {
    --edge: clamp(16px, 4vw, 30px);
  }
  .title-grid {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 10px;
    padding-top: 1vh;
  }
  .title-copy {
    z-index: 5;
    max-width: 590px;
    margin: 0 auto;
    padding-left: 0;
  }
  .game-logo {
    margin-top: 1vh;
  }
  .logo-ace {
    font-size: clamp(104px, 22vw, 172px);
  }
  .logo-receiver {
    font-size: clamp(48px, 11.2vw, 90px);
  }
  .title-tagline {
    max-width: 390px;
    font-size: 13px;
  }
  .title-visual {
    position: absolute;
    inset: 0;
    z-index: 1;
    height: 100%;
    min-height: 0;
    opacity: 0.34;
    pointer-events: none;
    justify-content: flex-end;
    padding-bottom: 8vh;
  }
  .title-roster {
    height: 68%;
    padding: 0;
    justify-content: flex-end;
    gap: 6px;
  }
  .title-roster::before,
  .title-roster-caption,
  .title-stamp {
    display: none;
  }
  .roster-card {
    flex: 0 0 20%;
    height: 85%;
    transform: translateY(0) rotate(0deg);
  }
  .roster-card:nth-child(1),
  .roster-card:nth-child(3) {
    display: none;
  }
  .roster-card .roster-data {
    display: none;
  }
  .title-sunburst {
    left: 82%;
  }
  .title-actions .btn {
    min-width: 210px;
  }
  .title-footer {
    z-index: 8;
  }
  .intro-screen {
    background: linear-gradient(90deg, rgba(5, 8, 16, 0.98), rgba(5, 8, 16, 0.7) 65%, rgba(5, 8, 16, 0.4));
  }
  .intro-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 8px;
  }
  .intro-copy {
    padding-left: 0;
  }
  .intro-name {
    font-size: clamp(40px, 7.7vw, 62px);
  }
  .intro-portrait {
    max-height: 56vh;
  }
  .intro-bottom {
    grid-template-columns: 1fr minmax(170px, 38%);
    gap: 15px;
  }
  .intro-callout strong {
    font-size: 11px;
  }
  .result-grid {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 4vh;
    padding-bottom: 6vh;
  }
  .result-visual {
    position: absolute;
    right: -4%;
    bottom: 5%;
    z-index: 1;
    width: 52%;
    min-height: 0;
    height: 65%;
    opacity: 0.46;
    pointer-events: none;
  }
  .result-portrait {
    max-height: 65vh;
  }
  .result-character {
    display: none;
  }
  .result-ghost {
    font-size: 55vw;
  }
  .result-main {
    z-index: 4;
    max-width: 630px;
  }
  .result-stats {
    max-width: 620px;
  }
  .camera-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .camera-preview {
    max-height: 35vh;
  }
  .camera-side {
    gap: 9px;
  }
  .camera-steps {
    display: none;
  }
  .camera-actions {
    margin-top: 14px;
  }
}

@media (max-aspect-ratio: 3/4) {
  .title-screen {
    padding-top: calc(var(--edge) * 0.9 + var(--safe));
  }
  .title-topline .title-topright {
    display: none;
  }
  .title-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .title-copy {
    max-width: 100%;
    margin: auto 0;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.22em;
  }
  .game-logo {
    margin-top: 14px;
    margin-bottom: 14px;
  }
  .logo-ace {
    font-size: clamp(120px, 31vw, 250px);
    -webkit-text-stroke-width: 1.5px;
  }
  .logo-receiver {
    font-size: clamp(53px, 14.5vw, 105px);
  }
  .logo-jp {
    right: 0.1em;
  }
  .title-tagline {
    margin-bottom: 22px;
    font-size: 14px;
  }
  .title-actions {
    flex-direction: column;
    gap: 8px;
  }
  .title-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .title-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-top: 18px;
  }
  .best-strip {
    padding-left: 0;
    border-left: 0;
  }
  .title-visual {
    position: relative;
    inset: auto;
    z-index: 3;
    height: 25vh;
    min-height: 150px;
    opacity: 1;
    padding: 0;
    margin-top: 18px;
    pointer-events: none;
    justify-content: center;
  }
  .title-roster {
    display: flex;
    height: 100%;
    padding: 0;
    justify-content: center;
    gap: 5px;
  }
  .roster-card {
    display: block !important;
    flex: 0 1 22%;
    height: 100%;
    clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
  }
  .roster-card img {
    height: 140%;
    object-position: top center;
    transform: scale(1.05);
  }
  .roster-card .roster-data {
    display: none;
  }
  .title-sunburst {
    left: 50%;
    width: 90vw;
  }
  .title-roster::before,
  .title-stamp,
  .title-roster-caption {
    display: none;
  }
  .title-footer {
    position: relative;
    margin: 0 calc(var(--edge) * -1) calc(var(--edge) * -0.8);
  }
  .ticker {
    padding: 7px 0;
  }
  .footer-note {
    padding-top: 5px;
    padding-bottom: 6px;
  }
  .hud {
    padding-top: calc(var(--edge) * 0.66 + var(--safe));
    gap: 7px;
  }
  .hud-round {
    min-width: 0;
    padding: 7px 11px 9px 9px;
  }
  .hud-kicker {
    font-size: 6px;
    letter-spacing: 0.12em;
  }
  .hud-round-current {
    font-size: 25px;
  }
  .hud-round-slash,
  .hud-round-total {
    font-size: 15px;
  }
  .round-ball {
    width: 16px;
    height: 16px;
  }
  .round-ball.is-good::after,
  .round-ball.is-miss::after {
    font-size: 11px;
  }
  .hud-center {
    display: none;
  }
  .hud-right {
    gap: 4px;
  }
  .input-badge {
    min-height: 28px;
    padding: 0 7px;
    margin-right: 1px;
    font-size: 7px;
  }
  .input-badge .input-glyph {
    font-size: 12px;
  }
  .icon-btn {
    width: 28px;
    height: 28px;
  }
  .icon-btn svg {
    width: 12px;
    height: 12px;
  }
  .intro-screen {
    background: linear-gradient(180deg, rgba(5, 8, 16, 0.94), rgba(5, 8, 16, 0.78) 54%, rgba(5, 8, 16, 0.72));
  }
  .intro-topline {
    font-size: 7px;
  }
  .intro-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding-top: 2vh;
  }
  .intro-copy {
    position: relative;
    z-index: 4;
    max-width: 100%;
  }
  .intro-name {
    font-size: clamp(44px, 12vw, 72px);
  }
  .intro-role {
    margin-bottom: 15px;
  }
  .serve-card {
    width: min(100%, 440px);
    padding: 12px 16px 13px;
  }
  .intro-quote {
    max-width: 420px;
    margin-top: 14px;
    font-size: 12px;
  }
  .intro-read {
    margin-top: 10px;
    padding-top: 8px;
  }
  .intro-read span:last-child {
    font-size: 9px;
  }
  .intro-figure {
    position: absolute;
    right: -14%;
    bottom: -2%;
    width: 78%;
    height: 69%;
    opacity: 0.61;
    pointer-events: none;
  }
  .intro-portrait {
    max-height: 58vh;
    max-width: 100%;
  }
  .intro-ghost-number {
    top: 6%;
    right: 1%;
    font-size: 44vw;
  }
  .intro-figure-ring {
    width: 86vw;
  }
  .intro-name-tag,
  .intro-stat-tag {
    display: none;
  }
  .intro-bottom {
    grid-template-columns: 1fr;
    gap: 11px;
    padding-top: 10px;
  }
  .intro-callout {
    display: block;
  }
  .intro-callout-label {
    display: block;
    margin-bottom: 3px;
  }
  .intro-callout strong {
    font-size: 12px;
    line-height: 1.2;
  }
  .intro-progress {
    gap: 5px;
  }
  .gameplay-top {
    padding-top: calc(12vh + var(--safe));
  }
  .prompt-bar {
    font-size: 7px;
    letter-spacing: 0.14em;
    padding: 6px 10px;
  }
  .serve-callout {
    top: 22%;
    left: var(--edge);
    width: auto;
    max-width: 58%;
    translate: 0 0;
    align-items: flex-start;
    text-align: left;
  }
  .serve-callout strong {
    font-size: 28px;
  }
  .impact-text {
    top: 42%;
    width: 94vw;
  }
  .impact-main {
    font-size: clamp(43px, 13vw, 72px);
  }
  .impact-sub {
    font-size: 8px;
    letter-spacing: 0.16em;
  }
  .gameplay-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .balance-note {
    display: none;
  }
  .result-screen {
    padding-bottom: calc(var(--edge) * 0.7);
  }
  .result-topline {
    font-size: 7px;
  }
  .result-grid {
    display: flex;
    flex-direction: column;
    flex: none;
    gap: 16px;
    padding-bottom: 2vh;
  }
  .result-visual {
    position: absolute;
    right: -10%;
    bottom: 0;
    width: 68%;
    height: 54%;
    opacity: 0.32;
  }
  .result-portrait {
    max-height: 52vh;
  }
  .result-main {
    max-width: 100%;
  }
  .result-headline {
    font-size: clamp(37px, 10vw, 55px);
    margin-bottom: 12px;
  }
  .rank-card {
    min-height: 84px;
    padding: 8px 15px 8px 8px;
  }
  .rank-letter {
    width: 62px;
    height: 62px;
    font-size: 49px;
  }
  .rank-copy strong {
    font-size: 19px;
  }
  .rank-seal {
    display: none;
  }
  .result-quote {
    margin-top: 10px;
    font-size: 12px;
  }
  .result-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-top: 11px;
  }
  .result-rounds {
    margin-top: 11px;
  }
  .result-round-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-actions {
    flex-direction: column;
    gap: 7px;
    margin-top: 12px;
  }
  .result-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .result-footer {
    display: none;
  }
  .overlay-card {
    max-height: calc(100dvh - 24px);
    padding: 23px 20px;
  }
  .camera-card {
    width: 100%;
  }
  .camera-layout {
    gap: 12px;
  }
  .camera-preview {
    max-height: 26vh;
  }
  .camera-status {
    font-size: 8px;
  }
  .tracking-meter {
    display: none;
  }
  .camera-actions {
    flex-direction: column;
  }
  .camera-actions .btn {
    width: 100%;
    flex-basis: auto;
  }
  .camera-beam {
    display: none;
  }
  .camera-privacy {
    margin-top: 10px;
  }
  .motion-pip {
    width: 122px;
    bottom: auto;
    top: calc(var(--edge) * 0.65 + var(--safe) + 70px);
    left: auto;
    right: var(--edge);
  }
  .pip-video {
    aspect-ratio: 4 / 3;
  }
  .motion-pip > span {
    display: none;
  }
  .overlay {
    padding: 12px;
  }
  .pause-card {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }
  .pause-actions {
    margin-top: 18px;
  }
}

@media (max-height: 620px) and (min-width: 861px) {
  .title-grid {
    padding: 0;
  }
  .game-logo {
    margin-top: 1vh;
    margin-bottom: 1vh;
  }
  .logo-ace {
    font-size: clamp(84px, 13vw, 150px);
  }
  .logo-receiver {
    font-size: clamp(40px, 7vw, 85px);
  }
  .title-tagline {
    display: none;
  }
  .title-actions .btn {
    min-height: 57px;
  }
  .title-meta {
    margin-top: 11px;
  }
  .intro-quote,
  .intro-read {
    display: none;
  }
  .intro-serve-card {
    margin-top: 12px;
  }
  .intro-name {
    font-size: clamp(40px, 5.3vw, 68px);
  }
  .intro-portrait {
    max-height: 62vh;
  }
  .result-stats {
    margin-top: 10px;
  }
  .result-quote {
    display: none;
  }
  .result-actions {
    margin-top: 11px;
  }
  .result-actions .btn {
    min-height: 49px;
  }
  .camera-preview {
    max-height: 42vh;
  }
}

/* Portrait kiosk refinements: content becomes a lower-third poster so the
   opponent art can own the upper half of a 9:16 screen. */
@media (max-aspect-ratio: 3/4) {
  .hud-center {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
    gap: 1px;
  }
  .hud-live {
    font-size: 6px;
    letter-spacing: 0.14em;
  }
  .hud-score {
    font-size: 26px;
  }
  .hud-score small {
    font-size: 6px;
  }

  .intro-screen {
    padding-top: calc(var(--edge) * 0.7 + var(--safe));
    background:
      linear-gradient(180deg, rgba(5, 8, 16, 0.35) 0%, rgba(5, 8, 16, 0.42) 36%, rgba(5, 8, 16, 0.92) 66%, rgba(5, 8, 16, 0.99) 100%),
      radial-gradient(ellipse at 72% 27%, rgba(var(--accent-rgb), 0.2), transparent 50%);
  }
  .intro-grid {
    position: relative;
    display: block;
    flex: 1;
    min-height: 0;
    padding: 0;
  }
  .intro-figure {
    position: absolute;
    top: 0;
    right: -8%;
    bottom: auto;
    left: auto;
    width: 92%;
    height: 63%;
    opacity: 1;
    margin: 0;
    pointer-events: none;
  }
  .intro-portrait {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    opacity: 0.92;
    object-position: bottom center;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 97%);
    mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 97%);
  }
  .intro-ghost-number {
    top: 2%;
    right: 2%;
    font-size: 68vw;
    -webkit-text-stroke-color: rgba(var(--accent-rgb), 0.13);
  }
  .intro-figure-ring {
    top: 48%;
    width: 88vw;
  }
  .intro-figure-glow {
    bottom: 14%;
    width: 66%;
    height: 26%;
  }
  .intro-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    max-width: 100%;
    padding: 3vh 2vw 0;
    background: linear-gradient(180deg, transparent, rgba(5, 8, 16, 0.72) 12%, rgba(5, 8, 16, 0.94) 42%);
  }
  .intro-eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
  }
  .intro-eyebrow span {
    font-size: 26px;
  }
  .intro-team {
    font-size: 9px;
  }
  .intro-name {
    font-size: clamp(56px, 11.6vw, 120px);
    line-height: 0.79;
    letter-spacing: -0.035em;
  }
  .intro-role {
    margin: 7px 0 13px;
    font-size: clamp(17px, 2.2vw, 24px);
    letter-spacing: 0.14em;
  }
  .serve-card {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px 13px;
  }
  .serve-card strong {
    font-size: clamp(24px, 3.6vw, 34px);
  }
  .serve-card p {
    max-width: none;
    margin: 5px 0 8px;
    font-size: clamp(11px, 1.45vw, 14px);
  }
  .intro-quote {
    display: block;
    max-width: none;
    margin-top: 11px;
    font-size: clamp(11px, 1.55vw, 14px);
  }
  .intro-read {
    margin-top: 8px;
    padding-top: 7px;
  }
  .intro-read span:last-child {
    font-size: 9px;
  }
  .intro-bottom {
    flex: 0 0 auto;
    margin-top: 1.2vh;
  }

  .result-screen {
    padding-top: calc(var(--edge) * 0.7 + var(--safe));
    padding-bottom: calc(var(--edge) * 0.7);
  }
  .result-topline {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
  }
  .result-grid {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 1.4vh;
    width: 100%;
    padding: 0 0 1vh;
  }
  .result-visual {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    order: -1;
    width: 100%;
    height: 28vh;
    min-height: 160px;
    max-height: none;
    flex: 0 0 auto;
    opacity: 1;
    overflow: hidden;
  }
  .result-portrait {
    width: auto;
    max-width: 54%;
    max-height: 32vh;
    opacity: 0.88;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  }
  .result-ghost {
    top: -14%;
    font-size: 48vw;
    opacity: 0.8;
  }
  .result-figure-ring {
    width: 54vw;
  }
  .result-character {
    display: flex;
    right: 1vw;
    bottom: 7%;
  }
  .result-main {
    position: relative;
    z-index: 4;
    max-width: 100%;
    padding: 0 1.5vw;
  }
  .result-eyebrow {
    font-size: 8px;
  }
  .result-headline {
    margin-bottom: 10px;
    font-size: clamp(37px, 9.2vw, 76px);
    line-height: 0.86;
  }
  .rank-card {
    min-height: 80px;
    padding: 8px 15px 8px 8px;
  }
  .rank-copy {
    padding-right: 8px;
  }
  .rank-copy strong {
    font-size: clamp(19px, 2.8vw, 25px);
  }
  .result-quote {
    margin-top: 9px;
    font-size: clamp(12px, 1.8vw, 15px);
  }
  .result-stats {
    margin-top: 10px;
  }
  .result-rounds {
    margin-top: 10px;
  }
  .result-rounds-label {
    margin-bottom: 5px;
  }
  .result-actions {
    flex-direction: row;
    gap: 8px;
    margin-top: 12px;
  }
  .result-actions .btn {
    flex: 1 1 48%;
    width: auto;
    min-width: 0;
    min-height: 54px;
    padding: 9px 38px 9px 16px;
  }
  .result-actions .btn-main {
    font-size: 17px;
  }
  .result-footer {
    display: none;
  }
}

@media (max-aspect-ratio: 2/3) {
  .intro-name {
    font-size: clamp(52px, 11.6vw, 120px);
  }
  .intro-quote {
    display: none;
  }
  .intro-copy {
    padding-top: 2vh;
  }
  .intro-figure {
    height: 60%;
  }
  .result-actions {
    flex-direction: column;
  }
  .result-actions .btn {
    width: 100%;
    flex-basis: auto;
  }
  .result-visual {
    height: 28vh;
  }
  .result-portrait {
    max-height: 32vh;
  }
}

@media (max-aspect-ratio: 2/3) and (min-height: 1100px) {
  .result-grid {
    justify-content: center;
    gap: 2vh;
    padding: 1vh 0 2vh;
  }
  .result-visual {
    height: 30vh;
    min-height: 330px;
  }
  .result-portrait {
    max-width: 60%;
    max-height: 34vh;
  }
  .result-headline {
    font-size: clamp(64px, 8.6vw, 96px);
  }
  .rank-card {
    min-height: 108px;
    padding: 11px 20px 11px 11px;
  }
  .rank-letter {
    width: 82px;
    height: 82px;
    font-size: 64px;
  }
  .rank-copy strong {
    font-size: 28px;
  }
  .rank-copy p {
    font-size: 11px;
  }
  .result-quote {
    margin-top: 14px;
    font-size: 16px;
  }
  .result-stats {
    gap: 8px;
    margin-top: 16px;
  }
  .stat-box {
    padding: 12px 14px 10px;
  }
  .stat-box span {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
  .stat-box strong {
    font-size: 40px;
  }
  .stat-box strong small {
    font-size: 9px;
  }
  .result-rounds {
    margin-top: 17px;
  }
  .result-rounds-label {
    margin-bottom: 7px;
    font-size: 8px;
  }
  .result-round-list {
    gap: 8px;
  }
  .result-round-item {
    padding: 9px 11px;
  }
  .result-round-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .result-round-item span {
    font-size: 8px;
  }
  .result-round-item strong {
    font-size: 11px;
  }
  .result-actions {
    gap: 8px;
    margin-top: 20px;
  }
  .result-actions .btn {
    min-height: 66px;
    padding: 11px 50px 11px 20px;
  }
  .result-actions .btn-main {
    font-size: 21px;
  }
  .result-actions .btn-sub {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .fx-grain {
    animation: none;
  }
  .ticker-track {
    animation: none;
  }
}
