/* ゲーム画面は演出を映えさせるため、常に暗い配色にする */
.game-page {
  --bg: #0b100d;
  --surface: #141b17;
  --text: #f1f4f0;
  --muted: #93a096;
  --line: #27322b;
  --accent: #3fd487;
  --accent-text: #06170d;

  --pitch: #0d3b25;
  --pitch-line: rgba(255, 255, 255, 0.16);
  --normal: #cfd6d1;
  --hot: #f5a623;
  --awaken: #e06bff;
  --slump: #6f7b84;
  --injury: #ef5350;
  --miss: #6f7b84;
  --base: #e8ece9;
  --nice: #3fd487;
  --great: #f5a623;
  --super: #e06bff;
}

.game { padding-top: 20px; }

/* display を指定した要素でも hidden 属性が効くようにする */
.game [hidden] { display: none !important; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 8px;
}

.game h1 { font-size: 24px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
}

.panel h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 17px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.field small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.chips button {
  font: inherit;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.chips button[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

button.primary,
button.secondary {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 800;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

button.primary {
  border: 0;
  background: linear-gradient(180deg, #5be29b, #27b56c);
  color: var(--accent-text);
  box-shadow: 0 4px 0 #17703f, 0 10px 24px rgba(63, 212, 135, 0.25);
}

button.primary:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #17703f;
}

button.secondary {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}

button.big {
  font-size: 20px;
  padding: 20px;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.link-button {
  font: inherit;
  font-size: 14px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.center { text-align: center; }

.note { margin-top: 10px; }

.boost p { font-size: 14px; }

/* ---------- プレイ画面:上部 ---------- */

.status {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.year-label {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
}

.path-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.path-label {
  font-size: 13px;
  color: var(--muted);
}

.role-chip {
  font-size: 12px;
  font-weight: 800;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.role-chip[data-level="1"] { color: var(--base); border-color: #55615a; }
.role-chip[data-level="2"] { color: var(--accent-text); background: var(--nice); border-color: var(--nice); }
.role-chip[data-level="3"] { color: #2a1800; background: var(--great); border-color: var(--great); }
.role-chip.pop { animation: pop 0.4s ease-out; }

.rank-box { text-align: right; }

.rank-box span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.rank-box strong {
  display: block;
  font-size: 26px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--great);
}

.rank-box strong.pop { animation: pop 0.4s ease-out; }

.rank-box em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rank-box em[data-dir="up"] { color: var(--nice); }
.rank-box em[data-dir="down"] { color: var(--injury); }

.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  padding: 0;
  margin: 12px 0;
}

.timeline li {
  height: 8px;
  border-radius: 3px;
  background: var(--line);
}

.timeline li.gap { margin-left: 4px; }
.timeline.small { margin: 14px 0 0; }
.timeline li[data-form="normal"] { background: var(--normal); }
.timeline li[data-form="hot"] { background: var(--hot); }
.timeline li[data-form="awaken"] { background: var(--awaken); }
.timeline li[data-form="slump"] { background: var(--slump); }
.timeline li[data-form="injury"] { background: var(--injury); }

/* ---------- その年の流れ ---------- */

.stage {
  position: relative;
  height: 112px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 38px, var(--pitch-line) 38px 40px, transparent 40px),
    linear-gradient(90deg, transparent calc(50% - 1px), var(--pitch-line) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 40px, transparent 40px 80px),
    var(--pitch);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.stage .rays {
  position: absolute;
  inset: -120%;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.5) 0deg 6deg, transparent 6deg 18deg);
  pointer-events: none;
}

.stage[data-form="hot"] { box-shadow: 0 0 0 2px var(--hot), 0 0 32px rgba(245, 166, 35, 0.55); }
.stage[data-form="awaken"] { box-shadow: 0 0 0 2px var(--awaken), 0 0 44px rgba(224, 107, 255, 0.7); }
.stage[data-form="injury"] { box-shadow: 0 0 0 2px var(--injury); }
.stage[data-form="slump"] { filter: saturate(0.3) brightness(0.8); }
.stage[data-outcome="pass"] { box-shadow: 0 0 0 2px var(--hot), 0 0 40px rgba(245, 166, 35, 0.6); }

.stage[data-form="hot"] .rays,
.stage[data-outcome="pass"] .rays {
  opacity: 0.16;
  animation: spin 9s linear infinite;
}

.stage[data-form="awaken"] .rays {
  opacity: 0.3;
  animation: spin 4s linear infinite;
}

.reveal {
  position: relative;
  text-align: center;
  color: #ffffff;
  padding: 0 12px;
}

.reveal-label {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.reveal-gain {
  font-size: 14px;
  opacity: 0.9;
}

.stage[data-form="hot"] .reveal-label { color: var(--hot); font-size: 38px; }
.stage[data-form="awaken"] .reveal-label {
  font-size: 46px;
  background: linear-gradient(90deg, #ffe26b, #ff7ad9, #7ad7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 10px rgba(224, 107, 255, 0.9));
}
.stage[data-form="slump"] .reveal-label { color: var(--slump); }
.stage[data-form="injury"] .reveal-label { color: var(--injury); }
.stage[data-outcome="pass"] .reveal-label { color: var(--hot); font-size: 40px; }
.stage[data-outcome="fail"] .reveal-label { color: var(--slump); }

.stage.rolling .reveal { animation: roll 0.12s linear infinite; }
.stage.pop .reveal { animation: pop 0.35s ease-out; }
.stage.slam .reveal { animation: slam 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
.stage.charge { animation: charge 0.9s ease-in; }

/* ---------- 6つの能力 ---------- */

.stats {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.stat {
  display: grid;
  grid-template-columns: 96px 1fr 44px 46px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.stat-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-name i {
  font-style: normal;
  font-size: 10px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--great);
  border: 1px solid var(--great);
}

.stat-bar {
  height: 8px;
  border-radius: 4px;
  background: #0a0f0c;
  overflow: hidden;
}

.stat-bar b {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #2a9d63, #7df0b3);
  transition: width 0.35s ease-out;
}

.stat-value {
  text-align: right;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-gain {
  font-style: normal;
  font-weight: 800;
  font-size: 15px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--base);
}

.stat.rolling .stat-gain { opacity: 0.5; }
.stat[data-tier="miss"] .stat-gain { color: var(--miss); }
.stat[data-tier="nice"] .stat-gain { color: var(--nice); }
.stat[data-tier="great"] .stat-gain { color: var(--great); font-size: 19px; }
.stat[data-tier="super"] .stat-gain { color: var(--super); font-size: 22px; }

.stat[data-tier="great"] {
  border-color: var(--great);
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.45), inset 0 0 18px rgba(245, 166, 35, 0.15);
}

.stat[data-tier="super"] {
  border-color: var(--super);
  box-shadow: 0 0 22px rgba(224, 107, 255, 0.6), inset 0 0 22px rgba(224, 107, 255, 0.2);
}

.stat[data-tier="great"] .stat-bar b { background: linear-gradient(90deg, #c87a0a, #ffd27a); }
.stat[data-tier="super"] .stat-bar b { background: linear-gradient(90deg, #9b3fd0, #ffb0f5); }
.stat.hit { animation: hit 0.35s ease-out; }

/* ---------- 下部:総合とボタン ---------- */

.control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.total { min-width: 92px; }

.total span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.total strong {
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.total em {
  display: block;
  min-height: 20px;
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
  color: var(--nice);
}

/* ---------- 分かれ道 ---------- */

.gate-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}

.gate-options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.gate-options button:not(.primary) {
  font: inherit;
  text-align: left;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}

.gate-options button:not(.primary):hover { border-color: var(--accent); }

.gate-options .option-label {
  display: block;
  font-weight: 800;
}

.gate-options .option-desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.gate-options .option-odds {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.gate-result {
  font-size: 17px;
  font-weight: 700;
  margin: 14px 0 0;
}

/* ---------- 大会 ---------- */

.cup-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.cup-rounds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.cup-rounds li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: #5f6b63;
  white-space: nowrap;
}

.cup-rounds li b { font-weight: 800; }

.cup-rounds li[data-result="win"] {
  color: #ffffff;
  border-color: var(--nice);
  background: rgba(63, 212, 135, 0.14);
  animation: hit 0.3s ease-out;
}

.cup-rounds li[data-result="win"][data-finals="true"] {
  border-color: var(--great);
  background: rgba(245, 166, 35, 0.18);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.4);
}

.cup-rounds li[data-result="lose"] {
  color: var(--text);
  border-color: var(--injury);
  background: rgba(239, 83, 80, 0.12);
}

.cup-reached {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  margin: 16px 0 0;
  min-height: 40px;
}

.cup-reached.pop { animation: slam 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }

/* ---------- 全画面の演出 ---------- */

.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.fx::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
}

.fx[data-tint="hot"]::before { background: radial-gradient(circle at 50% 35%, rgba(245, 166, 35, 0.45), transparent 70%); animation: tint 1.1s ease-out; }
.fx[data-tint="awaken"]::before { background: radial-gradient(circle at 50% 35%, rgba(224, 107, 255, 0.6), rgba(122, 215, 255, 0.25) 60%, transparent 85%); animation: tint 1.8s ease-out; }
.fx[data-tint="injury"]::before { background: rgba(239, 83, 80, 0.4); animation: tint 0.7s ease-out; }
.fx[data-tint="dark"]::before { background: #000000; opacity: 0.82; }
.fx[data-tint="white"]::before { background: #ffffff; animation: tint 0.6s ease-out; }

.fx .bit {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: fly var(--time, 1s) cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

.fx .banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 32%;
  padding: 18px 0;
  text-align: center;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
  transform: skewY(-4deg);
  animation: banner 1.9s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.fx .banner[data-kind="pro"] { background: linear-gradient(90deg, #f5a623, #ffe26b, #f5a623); color: #2a1800; text-shadow: none; }
.fx .banner[data-kind="awaken"] { background: linear-gradient(90deg, #7a2bd9, #e06bff, #7ad7ff); }
.fx .banner[data-kind="finals"] { background: linear-gradient(90deg, #17703f, #3fd487, #17703f); font-size: 34px; }

.game.shake { animation: shake 0.5s linear; }

@keyframes roll {
  0% { transform: translateY(-5px); opacity: 0.4; }
  100% { transform: translateY(5px); opacity: 0.9; }
}

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes slam {
  0% { transform: scale(3); opacity: 0; }
  60% { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes hit {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes charge {
  0% { filter: brightness(1); transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-4px); filter: brightness(0.6); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); filter: brightness(0.3); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes tint {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes fly {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.4); opacity: 0; }
}

@keyframes banner {
  0% { transform: translateX(-110%) skewY(-4deg); }
  18% { transform: translateX(0) skewY(-4deg); }
  80% { transform: translateX(0) skewY(-4deg); opacity: 1; }
  100% { transform: translateX(110%) skewY(-4deg); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-6px, 3px); }
  30% { transform: translate(6px, -4px); }
  45% { transform: translate(-5px, -2px); }
  60% { transform: translate(5px, 3px); }
  80% { transform: translate(-2px, 1px); }
}

@media (prefers-reduced-motion: reduce) {
  .stage.rolling .reveal,
  .stage.charge,
  .stage .rays,
  .game.shake,
  .fx .bit { animation: none !important; }
  .fx .bit { display: none; }
}

/* ---------- 結果カード ---------- */

.card-result {
  border-radius: 18px;
  padding: 20px;
  color: #ffffff;
  background: linear-gradient(160deg, #2b3138, #15181c);
  border: 2px solid #4a515a;
}

.card-result[data-tier="silver"] { background: linear-gradient(160deg, #5d6b7a, #252c34); border-color: #b9c4d0; }
.card-result[data-tier="pro"] { background: linear-gradient(160deg, #14653c, #082616); border-color: #46c47c; }
.card-result[data-tier="gold"] { background: linear-gradient(160deg, #a06a12, #33210a); border-color: #f2c14e; box-shadow: 0 0 36px rgba(242, 193, 78, 0.35); }
.card-result[data-tier="legend"] { background: linear-gradient(140deg, #6a2bd9, #c2307a 55%, #f2a33a); border-color: #ffffff; box-shadow: 0 0 44px rgba(224, 107, 255, 0.5); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.card-mode {
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 10px;
  margin-right: 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #15181c;
}

.card-name {
  font-size: 24px;
  font-weight: 800;
  margin-top: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.card-position { font-size: 13px; opacity: 0.8; }

.card-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.35;
  margin-top: 10px;
}

.card-route { font-size: 13px; opacity: 0.85; }

.card-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.card-stats span,
.card-foot span:first-child {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.4;
}

.card-stats strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.card-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.card-radar svg { display: block; width: 100%; height: auto; }

.card-statlist {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  margin: 0;
  font-size: 13px;
}

.card-statlist dt { opacity: 0.85; }

.card-statlist dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.card-cups {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.card-cups li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 8px;
  align-items: center;
}

.card-cups li span:first-child {
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.card-cups li span:last-child { opacity: 0.8; font-size: 12px; }

.card-totals {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.card-totals b { font-size: 17px; margin: 0 2px 0 8px; }

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 14px;
}

.card-foot > div { display: flex; align-items: center; gap: 8px; }

.pips { display: inline-flex; gap: 3px; }

.pips i {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transform: skewX(-18deg);
}

.pips i.on { background: #ffffff; }

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card-badges span {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-result .timeline li { background: rgba(255, 255, 255, 0.14); }
.card-result .timeline li[data-form="normal"] { background: var(--normal); }
.card-result .timeline li[data-form="hot"] { background: var(--hot); }
.card-result .timeline li[data-form="awaken"] { background: var(--awaken); }
.card-result .timeline li[data-form="slump"] { background: var(--slump); }
.card-result .timeline li[data-form="injury"] { background: var(--injury); }

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.about-game { margin-top: 56px; }

.about-game p { font-size: 15px; }

@media (max-width: 380px) {
  .stat { grid-template-columns: 82px 1fr 40px 42px; gap: 6px; }
  .card-body { grid-template-columns: 120px 1fr; }
}

/* ================= 演出の強化 ================= */

/* 画面の縁の光。絶好調・覚醒・ゾーンのあいだ灯り続ける */
.aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transition: opacity 0.4s;
}

.aura[data-kind="hot"] {
  opacity: 1;
  box-shadow: inset 0 0 70px 14px rgba(245, 166, 35, 0.55);
  animation: breathe 1.4s ease-in-out infinite;
}

.aura[data-kind="zone"] {
  opacity: 1;
  box-shadow: inset 0 0 90px 18px rgba(255, 94, 58, 0.6), inset 0 -60px 80px -20px rgba(255, 200, 60, 0.5);
  animation: breathe 0.9s ease-in-out infinite;
}

.aura[data-kind="awaken"] {
  opacity: 1;
  box-shadow: inset 0 0 90px 20px rgba(224, 107, 255, 0.7), inset 0 0 30px 6px rgba(122, 215, 255, 0.8);
  animation: hue 1.6s linear infinite;
}

.zone-chip {
  font-size: 12px;
  font-weight: 900;
  padding: 1px 10px;
  border-radius: 999px;
  color: #2a0d00;
  background: linear-gradient(90deg, #ff5e3a, #ffc83c);
  box-shadow: 0 0 14px rgba(255, 94, 58, 0.8);
  animation: breathe 0.9s ease-in-out infinite;
}

/* 予告 */
.omen {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 2px 12px;
  border-radius: 6px;
  transform: skewX(-10deg);
  animation: tag-in 0.3s cubic-bezier(0.2, 1.6, 0.4, 1), blink 0.28s steps(2) 3;
}

.omen[data-level="1"] { background: var(--nice); color: #06170d; }
.omen[data-level="2"] { background: linear-gradient(90deg, #f5a623, #ffe26b); color: #2a1800; box-shadow: 0 0 16px rgba(245, 166, 35, 0.9); }
.omen[data-level="3"] {
  background: linear-gradient(90deg, #ff5e5e, #ffd35e, #5eff9b, #5ecbff, #c25eff);
  color: #ffffff;
  font-size: 16px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.9);
}

.stage[data-omen="1"] { box-shadow: 0 0 0 2px var(--nice), 0 0 22px rgba(63, 212, 135, 0.6); }
.stage[data-omen="2"] { box-shadow: 0 0 0 3px var(--hot), 0 0 36px rgba(245, 166, 35, 0.8); }
.stage[data-omen="3"] { box-shadow: 0 0 0 3px #ffffff, 0 0 60px rgba(224, 107, 255, 1); }

/* その年の合計 */
.reveal-gain[data-size] {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  opacity: 1;
  animation: slam 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.reveal-gain[data-size="1"] { font-size: 18px; }
.reveal-gain[data-size="2"] { font-size: 24px; color: var(--nice); }
.reveal-gain[data-size="3"] { font-size: 30px; color: var(--hot); text-shadow: 0 0 14px rgba(245, 166, 35, 0.9); }
.reveal-gain[data-size="4"] {
  font-size: 38px;
  background: linear-gradient(90deg, #ffe26b, #ff7ad9, #7ad7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(224, 107, 255, 1));
}

/* 能力の行 */
.stats-wrap { position: relative; }

.stat { position: relative; overflow: hidden; }

.stat::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0;
}

.stat[data-tier="nice"]::after,
.stat[data-tier="great"]::after,
.stat[data-tier="super"]::after { animation: sweep 0.5s ease-out; }

.stat[data-tier="nice"] { border-color: rgba(63, 212, 135, 0.7); }

.stat[data-tier="great"] { animation: glow-great 0.9s ease-in-out infinite alternate; }

.stat[data-tier="super"] {
  background: linear-gradient(90deg, rgba(224, 107, 255, 0.28), rgba(122, 215, 255, 0.18), rgba(255, 226, 107, 0.22));
  animation: glow-super 0.7s ease-in-out infinite alternate;
}

.stat-tag {
  position: absolute;
  left: 104px;
  top: 50%;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 1px 10px;
  border-radius: 4px;
  transform: translateY(-50%) skewX(-10deg);
  animation: tag-in 0.3s cubic-bezier(0.2, 1.6, 0.4, 1);
  z-index: 1;
}

.stat-tag[data-tier="great"] { background: linear-gradient(90deg, #f5a623, #ffe26b); color: #2a1800; }
.stat-tag[data-tier="super"] { background: linear-gradient(90deg, #c25eff, #5ecbff); color: #ffffff; }

.combo {
  position: absolute;
  right: 8px;
  top: -30px;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  color: var(--hot);
  text-shadow: 0 2px 0 #000000, 0 0 14px rgba(245, 166, 35, 0.9);
  transform: rotate(-6deg);
  z-index: 2;
}

.combo.pop { animation: combo-in 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
.combo[data-big="true"] { font-size: 30px; color: var(--awaken); text-shadow: 0 2px 0 #000000, 0 0 18px rgba(224, 107, 255, 1); }

/* ボタンとボール */
.kick-wrap { position: relative; }

#advance:not(:disabled) { animation: pulse 1.6s ease-in-out infinite; }

.ball {
  position: absolute;
  left: 50%;
  bottom: 40%;
  font-size: 30px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.ball.kick { animation: kick 0.42s cubic-bezier(0.3, 0.8, 0.5, 1); }

.total.fire strong {
  color: var(--hot);
  text-shadow: 0 0 18px rgba(245, 166, 35, 0.9);
}

/* 全画面の演出(追加) */
.fx .pop-num {
  position: absolute;
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #000000;
  animation: rise 0.9s ease-out forwards;
}

.fx .big {
  position: absolute;
  left: 0;
  right: 0;
  top: 26%;
  text-align: center;
  font-size: 96px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: #ffffff;
  animation: zoom 1.7s cubic-bezier(0.15, 1.2, 0.3, 1) forwards;
}

.fx .big[data-kind="awaken"] {
  background: linear-gradient(90deg, #ffe26b, #ff7ad9, #7ad7ff, #5eff9b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(224, 107, 255, 1)) drop-shadow(0 4px 0 rgba(0, 0, 0, 0.6));
}

.fx .big[data-kind="pro"] {
  font-size: 80px;
  color: #ffe26b;
  text-shadow: 0 0 34px rgba(245, 166, 35, 1), 0 5px 0 #7a4a00;
}

.fx .big[data-kind="zone"] {
  font-size: 64px;
  color: #ffc83c;
  text-shadow: 0 0 30px rgba(255, 94, 58, 1), 0 4px 0 #6a1d00;
}

.fx .rays {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  opacity: 0;
  animation: rays 2.6s ease-out forwards;
}

.fx .rays[data-kind="pro"] { background: repeating-conic-gradient(from 0deg, rgba(255, 226, 107, 0.55) 0deg 5deg, transparent 5deg 15deg); }
.fx .rays[data-kind="awaken"] { background: repeating-conic-gradient(from 0deg, rgba(224, 107, 255, 0.55) 0deg 4deg, rgba(122, 215, 255, 0.4) 4deg 8deg, transparent 8deg 16deg); }
.fx .rays[data-kind="zone"] { background: repeating-conic-gradient(from 0deg, rgba(255, 94, 58, 0.5) 0deg 5deg, transparent 5deg 15deg); }

.fx[data-tint="strobe"]::before { background: #ffffff; animation: strobe-full 0.5s steps(1) forwards; }
.fx[data-tint="zone"]::before { background: radial-gradient(circle at 50% 100%, rgba(255, 94, 58, 0.6), transparent 70%); animation: tint 1.4s ease-out; }

.fx .banner[data-kind="zone"] { background: linear-gradient(90deg, #ff5e3a, #ffc83c, #ff5e3a); color: #2a0d00; text-shadow: none; }
.fx .banner[data-kind="rank"] { background: linear-gradient(90deg, #1b2a6b, #4a7dff, #1b2a6b); font-size: 32px; top: 18%; }
.fx .banner[data-kind="role"] { background: linear-gradient(90deg, #17703f, #3fd487, #17703f); font-size: 30px; top: 46%; }

/* 結果カードの登場 */
.card-result { position: relative; overflow: hidden; }

.card-result.enter { animation: card-in 0.7s cubic-bezier(0.2, 1.3, 0.3, 1); }

.card-result::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}

.card-result[data-tier="pro"]::after,
.card-result[data-tier="gold"]::after,
.card-result[data-tier="legend"]::after { animation: shine 2.6s ease-in-out infinite; }

@keyframes breathe { 50% { opacity: 0.55; } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
@keyframes blink { 50% { opacity: 0.2; } }
@keyframes tag-in { 0% { scale: 2.4; opacity: 0; } 100% { scale: 1; opacity: 1; } }
@keyframes combo-in { 0% { scale: 2.2; opacity: 0; } 100% { scale: 1; opacity: 1; } }
@keyframes strobe-full { 0%, 40%, 80% { opacity: 0.9; } 20%, 60%, 100% { opacity: 0; } }
@keyframes sweep { 0% { left: -40%; opacity: 1; } 100% { left: 110%; opacity: 0; } }
@keyframes glow-great { to { box-shadow: 0 0 26px rgba(245, 166, 35, 0.8), inset 0 0 22px rgba(245, 166, 35, 0.3); } }
@keyframes glow-super { to { box-shadow: 0 0 34px rgba(224, 107, 255, 1), inset 0 0 28px rgba(122, 215, 255, 0.4); } }
@keyframes pulse { 50% { box-shadow: 0 4px 0 #17703f, 0 0 34px rgba(63, 212, 135, 0.75); } }
@keyframes kick {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-80%, -330px) scale(0.35) rotate(540deg); }
}
@keyframes rise {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
  20% { transform: translate(-50%, -10px) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -70px) scale(1); opacity: 0; }
}
@keyframes zoom {
  0% { transform: scale(6); opacity: 0; }
  14% { transform: scale(0.9); opacity: 1; }
  22% { transform: scale(1.08); }
  75% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes rays {
  0% { opacity: 0; transform: rotate(0deg) scale(0.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: rotate(140deg) scale(1); }
}
@keyframes card-in {
  0% { transform: perspective(900px) rotateY(80deg) scale(0.6); opacity: 0; }
  100% { transform: perspective(900px) rotateY(0deg) scale(1); opacity: 1; }
}
@keyframes shine { 0%, 55% { left: -60%; opacity: 0; } 60% { opacity: 1; } 100% { left: 130%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .aura, .zone-chip, .omen, #advance, .ball, .fx .rays, .fx .big, .card-result, .card-result::after, .stat { animation: none !important; }
  .fx .rays, .fx[data-tint="strobe"]::before { display: none; }
}

/* ================= 視差のある背景 ================= */

.game-page { background: #04070a; }

.backdrop {
  position: fixed;
  inset: -6%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* 奥の層ほど小さく、手前の層ほど大きく動く */
.backdrop .layer {
  position: absolute;
  inset: 0;
  translate: calc(var(--px, 0) * var(--depth) * -1px) calc(var(--py, 0) * var(--depth) * -1px);
  transition: translate 0.25s ease-out;
  animation: drift calc(18s - var(--depth) * 0.2s) ease-in-out infinite alternate;
}

.backdrop .sky {
  --depth: 6;
  background: radial-gradient(120% 80% at 50% 0%, #143a55 0%, #081219 55%, #04070a 100%);
}

.backdrop .beams {
  --depth: 16;
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 255, 230, 0.7) 0, transparent 8%),
    radial-gradient(circle at 92% 4%, rgba(255, 255, 230, 0.7) 0, transparent 8%),
    radial-gradient(circle at 32% 2%, rgba(255, 255, 230, 0.4) 0, transparent 5%),
    radial-gradient(circle at 68% 2%, rgba(255, 255, 230, 0.4) 0, transparent 5%),
    conic-gradient(from 105deg at 8% 4%, transparent 0deg, rgba(255, 255, 255, 0.11) 10deg, transparent 24deg, rgba(255, 255, 255, 0.07) 38deg, transparent 54deg),
    conic-gradient(from 201deg at 92% 4%, transparent 0deg, rgba(255, 255, 255, 0.07) 16deg, transparent 30deg, rgba(255, 255, 255, 0.11) 44deg, transparent 54deg);
}

.backdrop .crowd {
  --depth: 30;
  top: 16%;
  bottom: auto;
  height: 30%;
  opacity: 0.7;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.24) 1px, transparent 1.6px) 0 0 / 9px 9px,
    radial-gradient(circle, rgba(255, 214, 120, 0.2) 1px, transparent 1.6px) 4px 5px / 13px 11px;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 60%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 60%, transparent);
}

.backdrop .turf {
  --depth: 48;
  top: 56%;
  background: repeating-linear-gradient(90deg, rgba(63, 212, 135, 0.12) 0 70px, rgba(63, 212, 135, 0.04) 70px 140px);
  transform-origin: 50% 0;
  transform: perspective(600px) rotateX(60deg) scale(1.8);
  -webkit-mask-image: linear-gradient(transparent, #000 25%);
  mask-image: linear-gradient(transparent, #000 25%);
}

/* 状態ごとの色かぶり */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, var(--mood, transparent), transparent 75%);
  transition: opacity 0.5s;
}

.game-page[data-zone="chance"] { --mood: rgba(74, 157, 255, 0.4); }
.game-page[data-zone="on"] { --mood: rgba(255, 94, 58, 0.45); }
.game-page[data-zone="on"] .backdrop::after { animation: breathe 0.9s ease-in-out infinite; }

/* キックの瞬間、手前の層ほど大きく寄る */
.backdrop.push .layer { animation: push 0.5s ease-out; }

/* 盤面の中にも少しだけ奥行きをつける */
.stage .reveal { translate: calc(var(--px, 0) * 6px) calc(var(--py, 0) * 4px); transition: translate 0.25s ease-out; }
.stage .rays { translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -10px); }

/* 背景が透けて見えるよう、面を少し透かす */
.stat { background: rgba(20, 27, 23, 0.82); }
.game .panel { background: rgba(20, 27, 23, 0.9); }
.game-page .site-header { background: rgba(11, 16, 13, 0.85); }

@keyframes drift {
  from { transform: translateX(calc(var(--depth) * -0.25px)); }
  to { transform: translateX(calc(var(--depth) * 0.25px)); }
}

.backdrop .turf { animation: none; }

@keyframes push {
  0% { scale: 1; }
  30% { scale: calc(1 + var(--depth) * 0.0016); }
  100% { scale: 1; }
}

/* ================= 電飾 ================= */

.lamps {
  position: absolute;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  z-index: 1;
}

.lamps.top { top: 5px; }
.lamps.bottom { bottom: 5px; }

.lamps i {
  --lamp: #3fd487;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lamp);
  opacity: 0.2;
  animation: lamp 1.8s linear infinite;
  animation-delay: calc(var(--i) * -0.11s);
}

.lamps.bottom i { animation-direction: reverse; }

.game-page[data-zone="chance"] .lamps i { --lamp: #4a9dff; animation-duration: 0.7s; }
.game-page[data-zone="on"] .lamps i { --lamp: #ff7a3a; animation-duration: 0.45s; }
.stage[data-omen="1"] .lamps i { --lamp: #3fd487; animation-duration: 0.6s; }
.stage[data-omen="2"] .lamps i { --lamp: #f5a623; animation-duration: 0.4s; }
.stage[data-form="hot"] .lamps i { --lamp: #f5a623; animation-duration: 0.5s; }
.stage[data-omen="3"] .lamps i,
.stage[data-form="awaken"] .lamps i {
  --lamp: hsl(calc(var(--i) * 22deg) 100% 65%);
  animation-duration: 0.28s;
}

@keyframes lamp {
  0%, 18% { opacity: 1; box-shadow: 0 0 9px 1px var(--lamp); }
  40%, 100% { opacity: 0.18; box-shadow: none; }
}

.omen { top: 16px; }

/* ================= チャンスゾーンとゾーン ================= */

.aura[data-kind="chance"] {
  opacity: 1;
  box-shadow: inset 0 0 80px 16px rgba(74, 157, 255, 0.6), inset 0 0 26px 4px rgba(122, 215, 255, 0.7);
  animation: breathe 0.7s ease-in-out infinite;
}

.zone-chip[data-kind="chance"] {
  color: #04162e;
  background: linear-gradient(90deg, #7ad7ff, #4a9dff);
  box-shadow: 0 0 14px rgba(74, 157, 255, 0.9);
}

.game-page[data-zone="chance"] .stage:not([data-form]):not([data-outcome]) { box-shadow: 0 0 0 2px #4a9dff, 0 0 36px rgba(74, 157, 255, 0.7); }
.game-page[data-zone="on"] .stage:not([data-form]):not([data-outcome]) { box-shadow: 0 0 0 2px #ff7a3a, 0 0 40px rgba(255, 94, 58, 0.75); }

.game-page[data-zone="chance"] #advance {
  background: linear-gradient(180deg, #8fe0ff, #2f7de0);
  color: #04162e;
  box-shadow: 0 4px 0 #1b4a8a, 0 0 32px rgba(74, 157, 255, 0.8);
  animation: pulse-chance 0.7s ease-in-out infinite;
}

.game-page[data-zone="on"] #advance {
  background: linear-gradient(180deg, #ffd35e, #ff5e3a);
  color: #2a0d00;
  box-shadow: 0 4px 0 #8a2a10, 0 0 36px rgba(255, 94, 58, 0.85);
  animation: pulse-zone 0.45s ease-in-out infinite;
}

.fx .big[data-kind="chance"] {
  font-size: 54px;
  color: #bfeaff;
  text-shadow: 0 0 30px rgba(74, 157, 255, 1), 0 4px 0 #0c2f66;
}

.fx .rays[data-kind="chance"] { background: repeating-conic-gradient(from 0deg, rgba(122, 215, 255, 0.5) 0deg 5deg, transparent 5deg 15deg); }
.fx[data-tint="chance"]::before { background: radial-gradient(circle at 50% 35%, rgba(74, 157, 255, 0.6), transparent 75%); animation: tint 1.2s ease-out; }

.timeline li[data-form="miracle"],
.card-result .timeline li[data-form="miracle"] { background: linear-gradient(90deg, #ff5e5e, #ffd35e, #5eff9b, #5ecbff, #c25eff); }

@keyframes pulse-chance { 50% { filter: brightness(1.25); scale: 1.02; } }
@keyframes pulse-zone { 50% { filter: brightness(1.3); scale: 1.03; } }

@media (prefers-reduced-motion: reduce) {
  .backdrop .layer, .lamps i, .backdrop::after { animation: none !important; }
  .backdrop .layer, .stage .reveal, .stage .rays { translate: none; }
}

/* ================= ボタンを画面下部に固定 ================= */

#play { padding-bottom: 120px; }

#play .control {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  margin: 0;
  padding: 10px max(20px, calc((100vw - var(--max)) / 2 + 20px)) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(4, 7, 10, 0.92) 26%);
}

#play .control .total strong { font-size: 38px; }

#mode-note { min-height: 0; margin: 0; }

/* 表示の出入りで高さが変わらないよう、場所を先に確保しておく */
.path-row { min-height: 26px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.rank-box em { display: none; }
.stage { height: 150px; }
.reveal { padding-bottom: 44px; }
.reveal-gain { min-height: 40px; display: flex; align-items: center; justify-content: center; }
.total em { min-height: 20px; }
.stats-wrap { min-height: 290px; }
.stats-wrap:has(#stats[hidden]) { display: none; }
.gate, .cup { margin-top: 12px; }

/* ================= 順位のトラック ================= */

.ladder { margin: 10px 0 2px; }

.ladder-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.ladder-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 7px;
  background: linear-gradient(90deg, #1f6f49, #3fd487 60%, #ffe26b);
  transition: width 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.ladder-tick {
  position: absolute;
  top: 16px;
  font-size: 9px;
  color: var(--muted);
  transform: translateX(-50%);
  white-space: nowrap;
}

.ladder-tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -17px;
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.3);
}

.ladder-gate {
  position: absolute;
  right: -2px;
  top: -5px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #2a1800;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #ffe26b, #f5a623);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.8);
}

.ladder-me {
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent);
  box-shadow: 0 0 12px rgba(63, 212, 135, 0.9);
  transition: left 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 1;
}

.ladder-me.hit { animation: marker 0.9s ease-out; }

.overtake {
  height: 22px;
  margin-top: 12px;
  text-align: right;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.overtake[data-dir="up"] { color: var(--nice); }
.overtake[data-dir="down"] { color: var(--injury); font-size: 12px; font-weight: 700; }
.overtake[data-big="true"] { font-size: 19px; color: var(--hot); text-shadow: 0 0 12px rgba(245, 166, 35, 0.8); }
.overtake.pop { animation: combo-in 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); transform-origin: right center; }

/* ================= シュートの場面 ================= */

.scene {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 40px;
  z-index: 1;
}

.scene-goal {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58px;
  height: 38px;
  border: 3px solid #ffffff;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 6px);
}

.scene-ball {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 20px;
  line-height: 1;
  opacity: 0;
}

.scene[data-shot="goal"] .scene-ball { animation: shot-goal 0.45s cubic-bezier(0.3, 0.6, 0.6, 1) forwards; }
.scene[data-shot="super"] .scene-ball { animation: shot-super 0.45s cubic-bezier(0.3, 0.6, 0.6, 1) forwards; }
.scene[data-shot="saved"] .scene-ball { animation: shot-saved 0.6s ease-out forwards; }
.scene[data-shot="weak"] .scene-ball { animation: shot-weak 0.6s ease-out forwards; }
.scene[data-shot="down"] .scene-ball { animation: shot-down 0.6s ease-out forwards; }

.scene[data-shot="goal"] .scene-goal { animation: net 0.5s ease-out 0.4s; }
.scene[data-shot="super"] .scene-goal { animation: net-super 0.7s ease-out 0.4s; }

@keyframes shot-goal {
  0% { opacity: 1; left: 0; bottom: 0; rotate: 0deg; }
  50% { bottom: 22px; }
  100% { opacity: 1; left: calc(100% - 44px); bottom: 12px; rotate: 720deg; }
}

@keyframes shot-super {
  0% { opacity: 1; left: 0; bottom: 0; rotate: 0deg; scale: 1; }
  40% { bottom: 34px; scale: 1.5; }
  100% { opacity: 1; left: calc(100% - 44px); bottom: 20px; rotate: 1080deg; scale: 1.2; }
}

@keyframes shot-saved {
  0% { opacity: 1; left: 0; bottom: 0; rotate: 0deg; }
  60% { left: calc(100% - 84px); bottom: 14px; rotate: 540deg; }
  100% { opacity: 0.7; left: calc(100% - 120px); bottom: 0; rotate: 360deg; }
}

@keyframes shot-weak {
  0% { opacity: 1; left: 0; rotate: 0deg; }
  100% { opacity: 0.6; left: 38%; rotate: 300deg; }
}

@keyframes shot-down {
  0% { opacity: 1; left: 0; rotate: 0deg; }
  100% { opacity: 0.5; left: 12%; rotate: 60deg; }
}

@keyframes net {
  0% { transform: skewX(0deg); border-color: #ffffff; }
  30% { transform: skewX(-9deg) scaleX(1.12); border-color: var(--nice); box-shadow: 0 0 18px rgba(63, 212, 135, 0.9); }
  100% { transform: skewX(0deg); }
}

@keyframes net-super {
  0% { transform: skewX(0deg); }
  25% { transform: skewX(-16deg) scale(1.3); border-color: var(--awaken); box-shadow: 0 0 34px rgba(224, 107, 255, 1); }
  60% { transform: skewX(6deg) scale(1.1); }
  100% { transform: skewX(0deg); }
}

@keyframes marker {
  0% { scale: 1; }
  30% { scale: 1.8; box-shadow: 0 0 26px rgba(255, 226, 107, 1); border-color: #ffe26b; }
  100% { scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ladder-fill, .ladder-me { transition: none; }
  .scene-ball, .scene-goal, .ladder-me { animation: none !important; }
}
