:root {
  --ink: #f8fafc;
  --muted: #9fb1c7;
  --dim: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --panel: rgba(8, 18, 32, 0.78);
  --panel-strong: rgba(4, 10, 20, 0.9);
  --glass: rgba(15, 23, 42, 0.62);
  --turf: #0f6a3c;
  --turf-dark: #07391f;
  --cyan: #22d3ee;
  --teal: #14b8a6;
  --gold: #f59e0b;
  --amber: #fbbf24;
  --red: #ef4444;
  --blue: #3b82f6;
  --green: #22c55e;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #020617;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: "Segoe UI", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.45;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.22), transparent 38%),
    radial-gradient(circle at 18% 14%, rgba(245, 158, 11, 0.2), transparent 22%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.96)),
    url("assets/hero-stadium.svg") center top / cover no-repeat;
  -webkit-tap-highlight-color: rgba(34, 211, 238, 0.18);
  overscroll-behavior-y: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(20px + env(safe-area-inset-bottom));
  position: relative;
}

.app-shell::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100%, 480px);
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.56));
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 80px rgba(0,0,0,.72);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 -2px 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 18, 32, .86), rgba(8, 18, 32, .68));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.eyebrow,
.mode-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 1px 0 0;
  font-size: 31px;
  line-height: 1;
  text-shadow: 0 2px 18px rgba(34, 211, 238, 0.24);
}

.platform-note {
  margin: 4px 0 0;
  color: rgba(219, 234, 254, .72);
  font-size: 11px;
  font-weight: 800;
}

h2 {
  margin: 3px 0 0;
  font-size: 21px;
  line-height: 1.18;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(2, 58px);
  gap: 6px;
}

.scoreboard div {
  min-height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.03)),
    rgba(15, 23, 42, .72);
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.scoreboard strong {
  display: block;
  font-size: 25px;
  line-height: 1.08;
}

.start-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.start-copy {
  min-height: 62svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 28px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.34) 44%, rgba(2, 6, 23, 0.95)),
    url("assets/hero-stadium.svg") center / cover no-repeat;
  box-shadow: var(--shadow);
  position: relative;
}

.start-copy::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  pointer-events: none;
}

.start-copy::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 140px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .82), rgba(245, 158, 11, .82), transparent);
  filter: blur(.2px);
}

.start-copy > * {
  position: relative;
  z-index: 1;
}

.start-copy .mode-kicker {
  color: #67e8f9;
}

.start-copy h2 {
  margin: 10px 0 10px;
  font-size: clamp(40px, 13vw, 62px);
  line-height: 0.96;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}

.start-copy p:last-child {
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
}

.hero-props {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.start-panel,
.result-panel,
.field-section,
.play-section,
.summary-screen {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.8));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 1;
}

.start-panel {
  padding: 12px;
}

.start-visual {
  height: 118px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.06)),
    url("assets/tablet-board.svg") center / cover no-repeat;
}

.quick-guide {
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(245, 158, 11, .06)),
    rgba(2, 6, 23, .48);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.guide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.guide-head .sprite-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.guide-head h2 {
  margin-top: 1px;
  font-size: 18px;
}

.quick-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.quick-guide li {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: start;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 13px;
  padding: 8px;
  background: rgba(15, 23, 42, .5);
}

.quick-guide li::before {
  counter-increment: guide;
  content: counter(guide);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 13px;
  font-weight: 950;
}

.quick-guide li strong,
.quick-guide li span {
  grid-column: 2;
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
}

.quick-guide li strong {
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.25;
}

.quick-guide li span {
  color: #cbd5e1;
  font-size: 12px;
}

fieldset {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
}

legend {
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 950;
}

.choice {
  display: block;
  min-height: 68px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  padding: 11px 12px;
  margin-bottom: 8px;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span,
.choice small {
  display: block;
}

.choice span {
  color: #f8fafc;
  font-weight: 950;
}

.choice small {
  color: var(--muted);
}

.choice:has(input:checked) {
  border-color: rgba(34, 211, 238, .78);
  background:
    linear-gradient(90deg, rgba(20, 184, 166, .26), rgba(15, 23, 42, .34)),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18), inset 4px 0 0 var(--cyan);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.segmented label {
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, .7);
  color: #cbd5e1;
  font-weight: 950;
}

.segmented input:checked + span {
  background: linear-gradient(180deg, rgba(245, 158, 11, .95), rgba(180, 83, 9, .92));
  color: #111827;
  box-shadow: 0 0 24px rgba(245, 158, 11, .22);
}

.primary-action,
.ghost-action {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 11px 15px;
  font-weight: 950;
  touch-action: manipulation;
}

.primary-action {
  width: 100%;
  color: #111827;
  background:
    linear-gradient(180deg, rgba(254, 243, 199, .92), rgba(245, 158, 11, .94)),
    #f59e0b;
  box-shadow: 0 10px 28px rgba(245, 158, 11, .25), inset 0 0 0 1px rgba(255,255,255,.45);
}

.ghost-action {
  color: #dbeafe;
  background: rgba(15, 23, 42, .72);
  border-color: rgba(148, 163, 184, .28);
}

.game-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.field-section {
  padding: 10px;
  overflow: hidden;
}

.utility-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.sound-toggle {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 999px;
  padding: 7px 11px;
  color: #dbeafe;
  background: rgba(15, 23, 42, .76);
  font-size: 12px;
  font-weight: 950;
}

.sound-toggle.enabled {
  color: #111827;
  background: linear-gradient(180deg, #a7f3d0, #22c55e);
  box-shadow: 0 0 18px rgba(34,197,94,.26);
}

.sound-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100,116,139,.18);
}

.sound-toggle.enabled .sound-dot {
  background: #052e16;
  box-shadow: 0 0 0 3px rgba(5,46,22,.18);
}

.drive-status {
  min-width: 0;
  justify-self: end;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.field-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 52% 18%, rgba(34, 211, 238, .18), transparent 34%),
    url("assets/tablet-board.svg") center / cover no-repeat;
  opacity: .32;
  pointer-events: none;
}

.field-section > * {
  position: relative;
  z-index: 1;
}

.situation-strip,
.tendency-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.situation-strip div,
.tendency-board div,
.summary-grid div {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  padding: 9px 10px;
  min-width: 0;
}

.situation-strip span,
.tendency-board span,
.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.situation-strip strong,
.tendency-board strong,
.summary-grid strong {
  display: block;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.18;
  white-space: nowrap;
}

.field {
  display: grid;
  grid-template-rows: 30px 1fr 30px;
  min-height: 390px;
  margin: 10px 0;
  border: 1px solid rgba(34, 211, 238, .42);
  border-radius: 18px;
  background: var(--turf);
  color: white;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 28px rgba(34, 211, 238, .16);
}

.formation-panel {
  margin: 10px 0;
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, .58), rgba(2, 6, 23, .34)),
    radial-gradient(circle at 50% 0, rgba(34, 211, 238, .18), transparent 45%);
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.formation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.formation-head h2 {
  font-size: 18px;
}

.formation-pill {
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 999px;
  padding: 6px 9px;
  color: #fef3c7;
  background: rgba(69, 26, 3, .48);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.formation-board {
  position: relative;
  height: 245px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(34,211,238,.12), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 1px, transparent 1px 10%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.08) 0 1px, transparent 1px 20%),
    linear-gradient(180deg, #14532d, #052e16);
}

.formation-board::before,
.formation-board::after {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  background: rgba(2, 6, 23, .58);
  backdrop-filter: blur(8px);
}

.formation-board::before {
  content: "相手";
  top: 8px;
  right: 8px;
  color: #bfdbfe;
}

.formation-board::after {
  content: "自軍";
  right: 8px;
  bottom: 8px;
  color: #fed7aa;
}

.los-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 47%;
  height: 3px;
  background: rgba(248,250,252,.86);
  box-shadow: 0 0 14px rgba(248,250,252,.42);
}

.player-dot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0;
  animation: playerPop .38s both;
}

.player-dot.offense {
  background: linear-gradient(180deg, #fb7185, #b91c1c);
  border: 2px solid #fecaca;
  box-shadow: 0 0 14px rgba(248,113,113,.48);
}

.player-dot.defense {
  background: linear-gradient(180deg, #60a5fa, #1e3a8a);
  border: 2px solid #bfdbfe;
  box-shadow: 0 0 12px rgba(96,165,250,.34);
}

.player-dot.featured {
  width: 35px;
  height: 35px;
  z-index: 4;
  box-shadow: 0 0 0 5px rgba(248,113,113,.18), 0 0 22px rgba(248,113,113,.74);
}

@keyframes playerPop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.formation-route {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.formation-route::before,
.formation-route::after {
  content: "";
  position: absolute;
  border: 3px solid rgba(34, 211, 238, .88);
  filter: drop-shadow(0 0 7px rgba(34,211,238,.9));
}

.route-run::before {
  left: 32%;
  top: 50%;
  width: 24%;
  height: 0;
  border-width: 3px 0 0;
  transform: rotate(8deg);
}

.route-quick::before {
  left: 28%;
  top: 33%;
  width: 38%;
  height: 28%;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 24px 0 0;
}

.route-deep::before {
  left: 33%;
  top: 16%;
  width: 0;
  height: 34%;
  border-width: 0 0 0 3px;
}

.route-deep::after {
  left: 70%;
  top: 14%;
  width: 0;
  height: 48%;
  border-width: 0 0 0 3px;
}

.route-cross::before {
  left: 36%;
  top: 30%;
  width: 38%;
  height: 26%;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 28px 0;
  transform: skewX(-16deg);
}

.route-screen::before {
  left: 20%;
  top: 60%;
  width: 42%;
  height: 0;
  border-width: 3px 0 0;
  transform: rotate(-14deg);
}

.replay-stage {
  margin: 10px 0;
  border: 1px solid rgba(245, 158, 11, .32);
  border-radius: 20px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(69,26,3,.36), rgba(2,6,23,.44));
  overflow: hidden;
}

.replay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.replay-head span {
  color: #fef3c7;
  font-size: 12px;
  font-weight: 950;
}

.replay-head strong {
  color: #111827;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fbbf24;
  font-size: 12px;
}

.replay-field {
  position: relative;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.25) 0 1px, transparent 1px 10%),
    radial-gradient(circle at 50% 24%, rgba(34,211,238,.16), transparent 36%),
    linear-gradient(180deg, #166534, #052e16);
}

.replay-ball {
  position: absolute;
  left: 50%;
  top: var(--ball-start, 78%);
  width: 24px;
  height: 24px;
  border: 3px solid #fed7aa;
  border-radius: 999px;
  background: #7c2d12;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.replay-route {
  position: absolute;
  left: 32%;
  top: 16%;
  width: 36%;
  height: 62%;
  border: 3px solid rgba(34,211,238,.88);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 28px 0 0;
  filter: drop-shadow(0 0 8px rgba(34,211,238,.84));
  opacity: .75;
}

.replay-gain {
  position: absolute;
  left: 50%;
  bottom: var(--gain-bottom, 18%);
  width: 7px;
  height: var(--gain-height, 24%);
  border-radius: 999px;
  background: linear-gradient(180deg, #facc15, #22c55e);
  transform-origin: bottom center;
  transform: translateX(-50%) scaleY(.05);
}

.replay-stage.loss .replay-gain {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.replay-stage.playing .replay-ball {
  animation: ballTravel .92s cubic-bezier(.2,.8,.2,1) both;
}

.replay-stage.playing .replay-gain {
  animation: gainGrow .92s cubic-bezier(.2,.8,.2,1) both;
}

.replay-stage.playing .replay-route {
  animation: routeDraw .92s ease both;
}

.replay-stage p {
  margin: 8px 0 0;
  color: #fde68a;
  font-size: 12px;
}

@keyframes ballTravel {
  from { top: var(--ball-start, 78%); transform: translate(-50%, -50%) scale(.92); }
  55% { transform: translate(-50%, -58%) scale(1.1); }
  to { top: var(--ball-end, 42%); transform: translate(-50%, -50%) scale(1); }
}

@keyframes gainGrow {
  to { transform: translateX(-50%) scaleY(1); }
}

@keyframes routeDraw {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: .85; clip-path: inset(0 0 0 0); }
}

.endzone {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.72)),
    #122c47;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 950;
  writing-mode: horizontal-tb;
  letter-spacing: .12em;
}

.field-grid {
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(34,211,238,.18), transparent 28%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0 2px, transparent 2px 10%),
    linear-gradient(180deg, #187342, var(--turf-dark));
}

.field-grid::before,
.field-grid::after {
  content: "";
  position: absolute;
  inset: 26px 22px;
  pointer-events: none;
  background:
    linear-gradient(168deg, transparent 0 36%, rgba(34, 211, 238, .95) 36.4% 38%, transparent 38.4%),
    linear-gradient(12deg, transparent 0 46%, rgba(34, 211, 238, .9) 46.4% 48%, transparent 48.5%);
  filter: drop-shadow(0 0 7px rgba(34,211,238,.86));
  opacity: .7;
}

.field-grid::after {
  inset: 42px 72px 92px;
  border: 3px solid rgba(250, 204, 21, .62);
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 36px 0;
  transform: skewY(-7deg);
  opacity: .48;
}

.yard {
  position: absolute;
  left: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 950;
  transform: translateY(-50%);
}

.y10 { top: 90%; }
.y20 { top: 80%; }
.y30 { top: 70%; }
.y40 { top: 60%; }
.y50 { top: 50%; }
.y60 { top: 40%; }
.y70 { top: 30%; }
.y80 { top: 20%; }
.y90 { top: 10%; }

.marker {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  transform: translateY(-50%);
}

.marker.first {
  background: #facc15;
  box-shadow: 0 0 16px rgba(250, 204, 21, .88);
}

.marker.ball {
  width: 30px;
  height: 30px;
  left: 50%;
  top: 75%;
  border-radius: 999px;
  background: #7c2d12;
  border: 3px solid #fed7aa;
  box-shadow: 0 0 0 7px rgba(245, 158, 11, .18), 0 4px 18px rgba(0,0,0,.42);
  transform: translate(-50%, -50%);
}

.marker.ball::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 2px;
  background: #fff7ed;
}

.drive-mini-map {
  display: none;
}

.play-section {
  padding: 12px 0 14px 12px;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 12px 10px 0;
}

.section-heading.compact {
  margin-bottom: 8px;
}

.hint-bar {
  margin: 0 12px 10px 0;
  border: 1px solid rgba(245, 158, 11, .36);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(245, 158, 11, .16), rgba(15, 23, 42, .3));
  color: #fde68a;
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 850;
}

.swipe-coach {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -2px 12px 10px 0;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 950;
}

.swipe-coach i {
  display: block;
  width: 22px;
  height: 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, .25);
}

.swipe-coach i:nth-child(2) {
  background: #22d3ee;
  animation: swipePulse 1.3s infinite;
}

@keyframes swipePulse {
  0%, 100% { transform: translateX(0); opacity: .55; }
  50% { transform: translateX(8px); opacity: 1; }
}

.play-nav {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 8px;
  margin: -2px 12px 10px 0;
}

.nav-icon {
  width: 46px;
  min-height: 46px;
  border: 1px solid rgba(34, 211, 238, .34);
  border-radius: 14px;
  color: #e0f2fe;
  background:
    linear-gradient(180deg, rgba(34, 211, 238, .18), rgba(15, 23, 42, .72)),
    rgba(2, 6, 23, .58);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.nav-icon:active {
  transform: translateY(1px) scale(.98);
  background:
    linear-gradient(180deg, rgba(245, 158, 11, .32), rgba(15, 23, 42, .72)),
    rgba(2, 6, 23, .58);
}

.nav-icon:disabled {
  opacity: .38;
  cursor: default;
}

#play-counter {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  color: #bae6fd;
  background: rgba(15, 23, 42, .5);
  font-size: 13px;
  font-weight: 950;
}

.fourth-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 18px;
  background: rgba(69, 26, 3, .42);
  padding: 10px;
  margin: 0 12px 10px 0;
}

.fourth-actions strong,
.fourth-actions span {
  display: block;
}

.fourth-actions strong {
  color: #fef3c7;
}

.fourth-actions span {
  color: #fed7aa;
  font-size: 13px;
}

.playbook {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 12px 10px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, black 0 82%, transparent 100%);
}

.playbook::-webkit-scrollbar {
  display: none;
}

.play-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: min(76vw, 326px);
  min-height: 238px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.035) 44%, rgba(15,23,42,.7)),
    rgba(15, 23, 42, .86);
  padding: 14px;
  color: #f8fafc;
  text-align: left;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 14px 28px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.05);
}

.play-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 0 12px 0 0;
}

.play-dots span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .42);
}

.play-dots span.active {
  width: 18px;
  background: #22d3ee;
  box-shadow: 0 0 12px rgba(34,211,238,.58);
}

.play-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 88px;
  height: 72px;
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 1px, transparent 1px 20%),
    linear-gradient(135deg, rgba(22, 101, 52, .88), rgba(5, 46, 22, .88));
  opacity: .75;
}

.play-card::after {
  content: "";
  position: absolute;
  left: 42px;
  right: 36px;
  top: 122px;
  height: 3px;
  border-radius: 999px;
  background: var(--amber);
  transform: rotate(-8deg);
  box-shadow: 0 0 12px rgba(250, 204, 21, .78);
}

.play-card:hover {
  border-color: rgba(34, 211, 238, .58);
}

.play-card.selected {
  border-color: rgba(34, 211, 238, .86);
  box-shadow:
    0 16px 34px rgba(0,0,0,.34),
    0 0 0 3px rgba(34,211,238,.16),
    inset 0 0 0 1px rgba(255,255,255,.08);
}

.play-card:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.play-card:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.34);
  outline-offset: 2px;
}

.play-card header,
.play-meta,
.card-copy,
.matchup-line,
.play-icon {
  position: relative;
  z-index: 1;
}

.play-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.play-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.06;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  color: white;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.tag.run { background: linear-gradient(180deg, #22c55e, #166534); }
.tag.quick { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.tag.dropback { background: linear-gradient(180deg, #334155, #172554); }
.tag.play-action { background: linear-gradient(180deg, #f59e0b, #b45309); }
.tag.screen { background: linear-gradient(180deg, #facc15, #ca8a04); color: #111827; }

.play-icon {
  align-self: flex-end;
  margin-top: 68px;
  opacity: .72;
}

.play-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.play-meta div {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(2, 6, 23, .46);
  padding: 6px;
}

.play-meta span,
.card-label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.play-meta strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
}

.card-copy {
  margin: 0;
  color: #cbd5e1;
  font-size: 12px;
}

.matchup-line {
  margin-top: auto;
  display: grid;
  gap: 4px;
  color: #dbeafe;
  font-size: 11px;
}

.matchup-line b {
  color: #f8fafc;
}

.result-panel {
  order: 2;
  padding: 12px;
  overflow: hidden;
}

.current-result {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .1), rgba(245, 158, 11, .06)),
    rgba(2, 6, 23, .48);
  padding: 12px;
  min-height: 142px;
}

.current-result.result-pop {
  animation: resultPop .34s ease both;
}

@keyframes resultPop {
  from { transform: translateY(8px) scale(.98); opacity: .68; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.result-grade {
  display: inline-block;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 0 20px rgba(59, 130, 246, .22);
}

.result-grade.great {
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #111827;
  box-shadow: 0 0 24px rgba(245, 158, 11, .36);
}

.result-grade.solid {
  background: linear-gradient(180deg, #67e8f9, #2563eb);
}

.result-grade.risky {
  background: linear-gradient(180deg, #fbbf24, #b45309);
  color: #111827;
}

.result-grade.bad {
  background: linear-gradient(180deg, #fb7185, #b91c1c);
}

.current-result h3 {
  margin: 0 0 4px;
  color: white;
  font-size: 28px;
  letter-spacing: 0;
}

.current-result p {
  margin: 8px 0 0;
  color: #dbeafe;
  font-size: 13px;
}

.play-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.play-pair div {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
  padding: 8px;
}

.play-pair strong {
  display: block;
  color: #f8fafc;
}

.drive-log {
  max-height: 132px;
  overflow: auto;
  margin: 10px 0 0;
  padding-left: 22px;
}

.drive-log li {
  margin: 0 0 8px;
  padding-left: 2px;
  color: #cbd5e1;
  font-size: 12px;
}

.drive-log strong {
  color: #f8fafc;
}

.summary-screen {
  padding: 10px;
  overflow: hidden;
}

.summary-hero {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 24px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(2,6,23,.05), rgba(2,6,23,.42) 42%, rgba(2,6,23,.94)),
    url("assets/summary-ball.svg") center / cover no-repeat;
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 30px rgba(245, 158, 11, .12);
}

.summary-hero .mode-kicker {
  color: #fef3c7;
}

.summary-hero h2 {
  margin-top: 6px;
  font-size: clamp(42px, 14vw, 68px);
  line-height: .92;
  text-shadow: 0 5px 30px rgba(0,0,0,.72);
}

.summary-hero p:last-child {
  max-width: 780px;
  color: #dbeafe;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.summary-actions {
  display: grid;
  gap: 8px;
}

.summary-actions .primary-action,
.summary-actions .ghost-action {
  width: 100%;
}

.sprite-icon {
  display: inline-block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background-image: url("assets/equipment-sprite.svg");
  background-repeat: no-repeat;
  background-size: 400% 400%;
  filter: drop-shadow(0 5px 8px rgba(2, 6, 23, 0.34));
}

.sprite-icon.football { background-position: 0 0; }
.sprite-icon.helmet { background-position: 33.333% 0; }
.sprite-icon.whistle { background-position: 66.666% 0; }
.sprite-icon.stopwatch { background-position: 100% 0; }
.sprite-icon.cone { background-position: 0 33.333%; }
.sprite-icon.playbook { background-position: 33.333% 33.333%; }
.sprite-icon.marker { background-position: 66.666% 33.333%; }
.sprite-icon.headset { background-position: 100% 33.333%; }
.sprite-icon.goalpost { background-position: 0 66.666%; }
.sprite-icon.clipboard { background-position: 33.333% 66.666%; }
.sprite-icon.bottle { background-position: 66.666% 66.666%; }
.sprite-icon.yardmarker { background-position: 100% 66.666%; }
.sprite-icon.tablet { background-position: 0 100%; }
.sprite-icon.flag { background-position: 33.333% 100%; }
.sprite-icon.cleats { background-position: 66.666% 100%; }
.sprite-icon.trophy { background-position: 100% 100%; }

@media (min-width: 760px) {
  .app-shell {
    padding-top: 18px;
  }

  .app-shell::after {
    content: "MOBILE FIRST BUILD";
    position: fixed;
    left: calc(50% + 260px);
    top: 34px;
    color: rgba(203, 213, 225, .62);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .16em;
    writing-mode: vertical-rl;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-left: 8px;
    padding-right: 8px;
  }

  h1 {
    font-size: 28px;
  }

  .scoreboard {
    grid-template-columns: repeat(2, 52px);
  }

  .play-card {
    min-width: 78vw;
  }

  .play-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}
