:root {
  --paper: #fbfbf2;
  --ink: #242426;
  --muted: #656566;
  --line: #d6d8d3;
  --blue: #2d7dd2;
  --blue-deep: #185596;
  --green: #97cc04;
  --yellow: #eeb902;
  --orange: #f45d01;
  --shadow: 0 24px 60px rgba(36, 36, 38, .18);
}

* { box-sizing: border-box; }
.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
html, body { width: 100%; min-height: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  overscroll-behavior: none;
}
button, a { font: inherit; }
button { touch-action: manipulation; }

.game-shell { min-height: 100dvh; display: grid; grid-template-rows: 1fr; }
.game-header {
  min-height: 66px;
  padding: .75rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-family: "Space Grotesk", sans-serif; font-weight: 600; letter-spacing: -.03em; text-decoration: none; }
.brand strong { color: var(--blue); }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--ink); color: var(--paper); font-weight: 700; transform: rotate(-4deg); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-button, .exit-link { min-height: 38px; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: .75rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.reset-progress-button { color: #6b6b67; }
.reset-dialog { width: min(calc(100% - 2rem), 430px); padding: 0; border: 0; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(36,36,38,.28); }
.reset-dialog::backdrop { background: rgba(24,27,25,.58); backdrop-filter: blur(4px); }
.reset-dialog form { padding: 1.6rem; }
.reset-dialog h2 { margin: .25rem 0 .65rem; font-family: "Space Grotesk"; font-size: clamp(1.65rem, 7vw, 2.2rem); letter-spacing: -.05em; }
.reset-dialog p:not(.eyebrow) { margin: 0; color: #676763; line-height: 1.5; }
.reset-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1.35rem; }
.secondary-button, .danger-button { min-height: 48px; padding: .7rem .85rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.secondary-button { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.danger-button { border: 0; background: #a9362c; color: white; }

@media (max-width: 560px) {
  .game-header { gap: .5rem; }
  .header-actions { gap: .3rem; }
  .icon-button, .exit-link { padding-inline: .6rem; font-size: .68rem; }
}

.game-card { min-height: 0; display: grid; padding: 0; }
.scene-wrap { min-height: 100dvh; position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(#8ed7ff 0 38%, #6cae38 38% 100%); }
#game-canvas { width: 100%; height: 100%; position: absolute; inset: 0; display: block; touch-action: none; }

.top-hud { position: absolute; z-index: 5; top: max(.75rem, env(safe-area-inset-top)); left: .75rem; right: .75rem; display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: .45rem; pointer-events: none; }
.hud-chip { min-width: 0; padding: .58rem .65rem; display: grid; gap: .08rem; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; background: rgba(251,251,242,.88); box-shadow: 0 8px 24px rgba(36,36,38,.1); backdrop-filter: blur(8px); }
.hud-chip span { overflow: hidden; color: var(--muted); font-size: .57rem; font-weight: 700; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.hud-chip strong { overflow: hidden; font-family: "Space Grotesk"; font-size: .82rem; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.record-chip { text-align: center; }
.wind-chip { text-align: right; }
.record-chip b { color: var(--blue); font-size: 1.05rem; }
.xp-hud { grid-column: 1 / -1; padding: .48rem .65rem .5rem; border: 1px solid rgba(255,255,255,.62); border-radius: 14px; background: rgba(25,45,62,.88); color: white; box-shadow: 0 8px 24px rgba(20,35,48,.18); backdrop-filter: blur(9px); }
.xp-meta, .xp-reward { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.xp-meta { min-height: 17px; font-family: "Space Grotesk"; }
.xp-meta strong { font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.xp-meta span { margin-left: auto; color: rgba(255,255,255,.74); font-size: .6rem; font-weight: 700; }
.xp-meta em { padding: .12rem .38rem; border-radius: 999px; background: var(--yellow); color: #202832; font-size: .6rem; font-style: normal; font-weight: 800; opacity: 0; transform: translateY(4px) scale(.88); transition: opacity .18s ease, transform .25s ease; }
.xp-meta em.is-active { opacity: 1; transform: translateY(0) scale(1); }
.xp-track { height: 9px; position: relative; margin: .28rem 0 .27rem; overflow: hidden; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(255,255,255,.14); }
.xp-fill { width: 0; position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #42b9ff 0%, var(--blue) 42%, #9bd720 72%, var(--yellow) 100%); box-shadow: 0 0 12px rgba(66,185,255,.62); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.xp-track i { width: 1px; position: absolute; z-index: 1; top: 1px; bottom: 1px; background: rgba(255,255,255,.35); }
.xp-track i:nth-of-type(1) { left: 25%; }
.xp-track i:nth-of-type(2) { left: 50%; }
.xp-track i:nth-of-type(3) { left: 75%; }
.xp-reward { color: rgba(255,255,255,.65); font-size: .52rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.xp-reward strong { overflow: hidden; color: #ffe07a; text-overflow: ellipsis; white-space: nowrap; }

.panel { width: min(430px, calc(100% - 2rem)); position: absolute; z-index: 10; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); padding: 1.4rem; border: 1px solid rgba(255,255,255,.72); border-radius: 24px; background: rgba(251,251,242,.95); box-shadow: var(--shadow); transform: translateX(-50%); backdrop-filter: blur(12px); }
.eyebrow, .result-kicker { margin: 0 0 .55rem; color: var(--blue); font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: "Space Grotesk", sans-serif; line-height: .96; letter-spacing: -.055em; }
h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
h1 span { color: var(--blue); }
.start-panel > p:not(.eyebrow, .control-note) { max-width: 34rem; margin: 1rem 0 1.15rem; color: var(--muted); line-height: 1.45; }
.primary-button { width: 100%; min-height: 52px; padding: .8rem 1.2rem; border: 0; border-radius: 999px; background: var(--ink); color: white; font-weight: 700; box-shadow: 0 8px 20px rgba(36,36,38,.2); cursor: pointer; }
.primary-button:active { transform: translateY(1px); }
.control-note { margin: .75rem 0 0; color: var(--muted); font-size: .68rem; text-align: center; }
.start-brand { margin-bottom: 1rem; display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-family: "Space Grotesk"; font-size: .82rem; font-weight: 700; text-decoration: none; }
.start-brand strong { color: var(--blue); }
.start-brand .brand-mark { width: 28px; height: 28px; font-size: .75rem; }
.primary-button:disabled { cursor: wait; opacity: .72; }
.loading-dot { width: 9px; height: 9px; display: inline-block; margin-right: .45rem; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: loading-spin .75s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.start-menu-actions { margin-top: .65rem; display: grid; grid-template-columns: 1fr 1.35fr .8fr; gap: .45rem; }
.menu-button, .round-menu-button { min-height: 42px; display: grid; place-items: center; padding: .55rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.56); color: var(--ink); font-size: .68rem; font-weight: 800; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; }
.round-menu-button { width: 100%; margin-top: .5rem; background: transparent; color: var(--muted); }

.swing-panel { width: min(540px, calc(100% - 2rem)); position: absolute; z-index: 8; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); padding: 1rem 1.2rem; border-radius: 22px; background: rgba(36,36,38,.92); color: white; box-shadow: var(--shadow); transform: translateX(-50%); }
.swing-panel.is-shot-summary { opacity: .58; pointer-events: none; transform: translateX(-50%) scale(.96); transition: opacity .25s ease, transform .25s ease; }
.swing-panel.is-shot-summary.is-dismissing { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.96); }
.swing-prompt { margin: 0 0 .7rem; font-family: "Space Grotesk"; font-size: 1.05rem; font-weight: 700; text-align: center; }
.meter { height: 25px; position: relative; overflow: hidden; border: 3px solid white; border-radius: 999px; background: #555; }
.meter-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--yellow) 65%, var(--orange)); transform: scaleX(0); transform-origin: left center; will-change: transform; }
.meter-marker { width: 5px; position: absolute; top: -3px; bottom: -3px; left: 0; border-radius: 4px; background: white; box-shadow: 0 0 0 2px rgba(36,36,38,.35); transform: translateX(-50%); will-change: transform; }
.power-meter.is-locked { border-color: var(--green); box-shadow: 0 0 0 3px rgba(151,204,4,.2); }
.power-meter.is-locked .meter-marker { background: white; }
.meter-labels { margin-top: .3rem; display: flex; justify-content: space-between; color: rgba(255,255,255,.65); font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.meter-labels strong { color: white; }
.accuracy-wrap { margin-top: .9rem; }
.accuracy-meter { display: grid; grid-template-columns: 28% 17% 10% 17% 28%; background: transparent; }
.accuracy-bad.left { background: var(--orange); }
.accuracy-bad.right { grid-column: 5; background: var(--orange); }
.accuracy-good { grid-column: 2 / 5; grid-row: 1; background: var(--yellow); }
.accuracy-perfect { grid-column: 3; grid-row: 1; z-index: 1; background: var(--green); }
.accuracy-marker { z-index: 2; background: white; }

.distance-live { position: absolute; z-index: 5; left: 50%; top: 18%; display: flex; align-items: baseline; gap: .25rem; color: white; filter: drop-shadow(0 3px 3px rgba(36,36,38,.45)); transform: translateX(-50%); }
.distance-live strong { font-family: "Space Grotesk"; font-size: clamp(3.4rem, 15vw, 6rem); letter-spacing: -.08em; line-height: 1; }
.distance-live span { font-weight: 700; }
.drive-intro { position: absolute; z-index: 9; left: 50%; top: 39%; display: grid; justify-items: center; color: white; filter: drop-shadow(0 4px 5px rgba(36,36,38,.5)); opacity: 0; transform: translate(-50%, 12px) scale(.94); transition: opacity .38s ease, transform .5s ease; pointer-events: none; }
.drive-intro.is-active { opacity: 1; transform: translate(-50%, 0) scale(1); }
.drive-intro span { font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.drive-intro strong { font-family: "Space Grotesk"; font-size: clamp(4.8rem, 24vw, 8.5rem); letter-spacing: -.08em; line-height: .9; white-space: nowrap; }

.impact-feedback { position: absolute; z-index: 7; top: 34%; left: 50%; padding: .55rem .9rem; border-radius: 999px; background: rgba(36,36,38,.86); color: white; font-family: "Space Grotesk"; font-size: clamp(.85rem, 3.6vw, 1.15rem); font-weight: 800; letter-spacing: .04em; text-align: center; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: translate(-50%, 8px) scale(.94); transition: opacity .14s ease, transform .22s ease; pointer-events: none; }
.impact-feedback.is-active { opacity: 1; transform: translate(-50%, 0) scale(1); }
.impact-feedback.is-perfect { background: var(--green); color: var(--ink); }
.impact-feedback.is-good { background: var(--yellow); color: var(--ink); }
.impact-feedback.is-miss { background: var(--orange); }
.boundary-feedback {
  position: absolute;
  z-index: 7;
  top: 26%;
  left: 50%;
  padding: .42rem .72rem .38rem;
  border: 2px solid rgba(255,255,255,.86);
  border-radius: 6px;
  background: rgba(8,29,41,.88);
  color: white;
  font-family: "Space Grotesk";
  font-size: clamp(.72rem, 3vw, .95rem);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 8px) scale(.96);
  transition: opacity .14s ease, transform .2s ease;
  pointer-events: none;
}
.boundary-feedback.is-active { opacity: 1; transform: translate(-50%, 0) scale(1); }
.boundary-feedback.is-near { border-color: #ffe143; color: #ffe143; }
.boundary-feedback.is-outside { border-color: #ff7046; background: rgba(76,24,19,.9); color: white; }
.boundary-feedback.is-safe { border-color: #b9ed2c; color: #b9ed2c; }
.impact-flash { position: absolute; z-index: 4; inset: 0; background: radial-gradient(circle at 55% 58%, rgba(255,255,255,.72), rgba(255,255,255,0) 18%); opacity: 0; transition: opacity .18s ease-out; pointer-events: none; }
.impact-flash.is-active { opacity: 1; transition-duration: .03s; }

.result-panel { width: min(590px, calc(100% - 1rem)); max-height: calc(100dvh - 98px); overflow-y: auto; }
.result-hero { display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: center; gap: 1rem; }
.result-panel h2 { font-size: clamp(2rem, 9vw, 3rem); }
.result-distance { margin: 1rem 0 .75rem; display: flex; align-items: baseline; gap: .65rem; }
.result-distance strong { color: var(--blue); font-family: "Space Grotesk"; font-size: clamp(3.5rem, 17vw, 5.4rem); letter-spacing: -.075em; line-height: .8; }
.result-distance span { color: var(--muted); font-weight: 700; }
.result-distance span { display: grid; justify-items: start; gap: .22rem; line-height: 1.08; }
.result-distance span b { font: inherit; }
.result-distance span em { padding: .18rem .3rem .16rem; border-radius: 4px; background: #ff7046; color: white; font-size: .55rem; font-style: normal; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.new-record { margin-bottom: .8rem; padding: .5rem .7rem; border-radius: 10px; background: var(--yellow); font-size: .78rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.strike-card { min-width: 0; margin: 0; display: grid; justify-items: center; gap: .55rem; }
.driver-head { width: 190px; height: 125px; position: relative; filter: drop-shadow(0 9px 10px rgba(36,36,38,.2)); }
.clubface { --strike-x: 53%; --strike-y: 55%; --face-center-x: 59%; --face-center-y: 60%; --club-tier-color: #737e83; width: 100%; height: 100%; position: relative; }
.contact-club-image { width: 100%; height: 100%; display: block; object-fit: contain; }
.clubface-target { width: 22px; height: 22px; position: absolute; z-index: 1; left: var(--face-center-x); top: var(--face-center-y); border: 2px solid rgba(255,255,255,.55); border-radius: 50%; transform: translate(-50%, -50%); }
.strike-dot { width: 17px; height: 17px; position: absolute; z-index: 2; left: var(--strike-x); top: var(--strike-y); border: 3px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 2px 7px rgba(0,0,0,.4); transform: translate(-50%, -50%); }
.strike-dot.is-good { background: var(--yellow); }
.strike-dot.is-miss { background: var(--orange); }
.strike-card figcaption { display: grid; justify-items: center; line-height: 1.1; }
.strike-card figcaption span { color: var(--muted); font-size: .58rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.strike-card figcaption strong { margin-top: .2rem; font-family: "Space Grotesk"; font-size: .9rem; text-transform: capitalize; }
.stats-grid { margin: 1rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.stats-grid div { min-width: 0; padding: .65rem; border-radius: 12px; background: #eceee8; }
.stats-grid dt { color: var(--muted); font-size: .57rem; font-weight: 700; text-transform: uppercase; }
.stats-grid dd { margin: .12rem 0 0; overflow: hidden; font-size: .78rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rank-progress { margin: .8rem 0; color: var(--muted); font-size: .75rem; text-align: center; }
.result-panel.is-out .result-kicker, .result-panel.is-out .result-distance strong { color: var(--orange); }
.reward-reveal { width: min(430px, calc(100% - 1rem)); max-height: calc(100dvh - 98px); overflow-y: auto; text-align: center; }
.reward-reveal:not(.is-hidden) { animation: driver-reveal-arrival .6s cubic-bezier(.2,.9,.25,1.12) both; }
.reward-reveal h2 { margin-top: .65rem; font-size: clamp(2.25rem, 12vw, 3.4rem); }
.reward-reveal > p:not(.eyebrow) { max-width: 22rem; margin: .55rem auto .9rem; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.reward-orbit { width: 142px; height: 142px; position: relative; margin: .3rem auto; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--blue), var(--blue-deep)); box-shadow: 0 16px 32px rgba(45,125,210,.28); color: white; }
.reward-orbit span { width: 118px; height: 118px; position: absolute; border: 2px dashed rgba(255,255,255,.55); border-radius: 50%; animation: driver-burst-spin 14s linear infinite; }
.reward-orbit strong { position: relative; font-family: "Space Grotesk"; font-size: 4.8rem; letter-spacing: -.08em; line-height: 1; }
.reward-next { margin: 0 0 .9rem; padding: .7rem .8rem; display: grid; gap: .12rem; border: 1px solid rgba(45,125,210,.2); border-radius: 13px; background: rgba(45,125,210,.08); }
.reward-next span { color: var(--muted); font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.reward-next strong { color: var(--blue-deep); font-family: "Space Grotesk"; font-size: .9rem; }
.rank-emblem { width: 142px; height: 142px; margin: .3rem auto; display: grid; place-content: center; border: 8px solid #ffd94d; border-radius: 50% 50% 45% 45%; background: linear-gradient(145deg, var(--yellow), #f5a900); box-shadow: 0 16px 32px rgba(238,185,2,.3); color: var(--ink); clip-path: polygon(50% 0, 93% 18%, 86% 76%, 50% 100%, 14% 76%, 7% 18%); }
.rank-emblem span { font-size: .52rem; font-weight: 900; letter-spacing: .16em; }
.rank-emblem strong { font-family: "Space Grotesk"; font-size: 4rem; line-height: .9; }
.driver-reveal { width: min(480px, calc(100% - 1rem)); max-height: calc(100dvh - 98px); overflow-y: auto; text-align: center; }
.driver-reveal:not(.is-hidden) { animation: driver-reveal-arrival .6s cubic-bezier(.2,.9,.25,1.12) both; }
@keyframes driver-reveal-arrival { 0% { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.92); } 100% { opacity: 1; transform: translateX(-50%); } }
.driver-reveal .eyebrow { margin-bottom: .3rem; }
.driver-reveal-art { --driver-accent: var(--yellow); height: 190px; position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(36,36,38,.14); border-radius: 20px; background: linear-gradient(145deg, #c9cecc, #aeb5b2); }
.driver-reveal-halo { width: 156px; height: 156px; position: absolute; border: 12px solid var(--driver-accent); border-radius: 50%; box-shadow: 0 0 0 1px rgba(36,36,38,.12), 0 0 34px color-mix(in srgb, var(--driver-accent) 38%, transparent); }
@keyframes driver-burst-spin { to { transform: rotate(360deg); } }
.driver-reveal-art canvas { width: 100%; height: 100%; position: relative; z-index: 1; display: block; transform: scaleX(-1); }
.driver-reveal-copy { margin: .8rem 0 .65rem; }
.driver-reveal-level { color: var(--blue); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.driver-reveal h2 { margin-top: .18rem; font-size: clamp(1.7rem, 8vw, 2.25rem); }
.driver-reveal-copy p { margin: .45rem auto 0; max-width: 24rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.driver-reveal-stats { margin: 0 0 .55rem; display: flex; justify-content: center; gap: .5rem 1.2rem; }
.driver-reveal-stats div { min-width: 0; }
.driver-reveal-stats dt { color: var(--muted); font-size: .54rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.driver-reveal-stats dd { margin: .15rem 0 0; color: var(--blue-deep); font-family: "Space Grotesk"; font-size: .88rem; font-weight: 800; }
.driver-reveal-next { margin: 0 0 .7rem; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-align: center; }
.round-panel { width: min(520px, calc(100% - 1rem)); max-height: calc(100dvh - 98px); overflow-y: auto; }
.round-panel h2 { font-size: clamp(2.1rem, 9vw, 3.2rem); }
.round-score { margin: 1rem 0; display: flex; align-items: baseline; gap: .65rem; }
.round-score strong { color: var(--blue); font-family: "Space Grotesk"; font-size: clamp(3.7rem, 17vw, 5.5rem); letter-spacing: -.075em; line-height: .8; }
.round-score span { max-width: 7rem; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.15; }
.round-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.round-summary-grid div { min-width: 0; padding: .65rem; border-radius: 12px; background: #eceee8; }
.round-summary-grid span { display: block; color: var(--muted); font-size: .55rem; font-weight: 700; text-transform: uppercase; }
.round-summary-grid strong { display: block; margin-top: .18rem; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.xp-breakdown { margin-top: .55rem; padding: .55rem .65rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; border: 1px solid #dfe3dc; border-radius: 12px; background: rgba(255,255,255,.5); }
.xp-breakdown span { color: var(--muted); font-size: .5rem; font-weight: 700; line-height: 1.15; text-align: center; text-transform: uppercase; }
.xp-breakdown strong { display: block; margin-top: .18rem; color: var(--blue); font-family: "Space Grotesk"; font-size: .72rem; }
.round-shots { margin: .2rem 0 .65rem; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: .35rem .5rem; list-style: none; }
.round-shots li { min-height: 42px; position: relative; padding: .45rem .55rem; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .35rem; border: 1px solid transparent; border-radius: 10px; background: #eceee8; font-weight: 800; }
.round-shots li span { color: var(--muted); font-size: .5rem; letter-spacing: .06em; text-transform: uppercase; }
.round-shots li strong { font-family: "Space Grotesk"; font-size: .7rem; white-space: nowrap; }
.round-shots li.is-out strong { color: var(--orange); }
.round-shots li.is-best { border-color: rgba(238,185,2,.75); background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: white; box-shadow: 0 6px 14px rgba(45,125,210,.24); }
.round-shots li.is-best span { color: rgba(255,255,255,.75); }
.round-shots li.is-best em { padding: .1rem .26rem; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: .4rem; font-style: normal; letter-spacing: .05em; text-transform: uppercase; }
.qualification-card { margin: .6rem 0 .7rem; padding: .58rem .7rem; border: 1px solid rgba(45,125,210,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(45,125,210,.09), rgba(238,185,2,.09)); }
.qualification-heading, .qualification-target, .qualification-history { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.qualification-heading { cursor: pointer; list-style: none; }
.qualification-heading::-webkit-details-marker { display: none; }
.qualification-heading span, .qualification-history > span { color: var(--muted); font-size: .52rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.qualification-heading strong { color: var(--blue); font-family: "Space Grotesk"; font-size: 1.05rem; }
.qualification-heading em { color: var(--muted); font-size: .52rem; font-style: normal; font-weight: 800; text-transform: uppercase; }
.qualification-card[open] .qualification-heading em { color: transparent; }
.qualification-card[open] .qualification-heading em::after { content: 'Hide'; color: var(--muted); }
.qualification-target { margin-top: .35rem; }
.qualification-target strong { font-family: "Space Grotesk"; font-size: .82rem; }
.qualification-target span { color: var(--muted); font-size: .58rem; font-weight: 700; }
.qualification-requirements { margin-top: .45rem; padding-top: .38rem; display: grid; gap: .1rem; border-top: 1px solid rgba(45,125,210,.16); }
.qualification-requirements > span { min-height: 34px; padding: .28rem 0; display: block; }
.qualification-requirements b { color: var(--muted); font-size: .52rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.qualification-requirements strong { display: block; margin-top: .14rem; color: var(--ink); font-family: "Space Grotesk"; font-size: .65rem; line-height: 1.25; text-align: left; }
.qualification-requirements > span.is-met b, .qualification-requirements > span.is-met strong { color: var(--blue); }
.qualification-requirements > span:not(.is-met) strong { color: #8c6700; }
.qualification-slots { margin: .4rem 0; display: grid; grid-template-columns: repeat(var(--slot-count, 2), 1fr); gap: .4rem; }
.qualification-slot { height: 9px; overflow: hidden; border: 1px solid rgba(45,125,210,.35); border-radius: 999px; background: rgba(255,255,255,.7); }
.qualification-slot.is-filled { border-color: transparent; background: linear-gradient(90deg, var(--blue), var(--green), var(--yellow)); box-shadow: 0 2px 7px rgba(45,125,210,.22); }
.qualification-history > div { display: flex; gap: .27rem; }
.qualification-dot { width: 9px; height: 9px; border: 1px solid #c5cac4; border-radius: 50%; background: rgba(255,255,255,.75); }
.qualification-dot.is-played { background: #aeb5ad; }
.qualification-dot.is-qualified { border-color: var(--yellow); background: var(--yellow); box-shadow: 0 0 0 2px rgba(238,185,2,.18); }
.qualification-card .rank-progress { margin: .4rem 0 0; color: var(--ink); font-weight: 700; }
.qualification-card.is-complete { background: linear-gradient(135deg, rgba(45,125,210,.15), rgba(151,204,4,.18)); }
.rotate-note { display: none; }
.is-hidden { display: none !important; }

@media (max-width: 430px) {
  .round-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .xp-breakdown { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-inline: .35rem; }
  .xp-breakdown span { font-size: .44rem; }
}

@media (orientation: portrait) and (max-height: 650px) {
  .scene-wrap { min-height: 100dvh; }
  .top-hud { top: max(.45rem, env(safe-area-inset-top)); gap: .3rem; }
  .hud-chip { padding: .42rem .5rem; border-radius: 12px; }
  .xp-hud { padding: .34rem .5rem; border-radius: 12px; }
  .xp-track { margin-bottom: 0; }
  .xp-reward { display: none; }
  .start-panel { bottom: max(.45rem, env(safe-area-inset-bottom)); padding: 1rem; }
  .start-brand { margin-bottom: .55rem; }
  .start-panel h1 { font-size: clamp(2.25rem, 12vw, 2.65rem); }
  .start-panel > p:not(.eyebrow, .control-note) { margin: .65rem 0 .75rem; line-height: 1.35; }
  .start-panel .primary-button { min-height: 48px; }
  .control-note { margin-top: .5rem; font-size: .59rem; }
  .result-panel, .reward-reveal, .driver-reveal, .round-panel { max-height: calc(100dvh - 72px); }
  .reward-reveal { padding: .9rem; }
  .reward-orbit, .rank-emblem { width: 104px; height: 104px; }
  .reward-orbit span { width: 86px; height: 86px; }
  .reward-orbit strong { font-size: 3.5rem; }
  .rank-emblem { border-width: 6px; }
  .rank-emblem strong { font-size: 3rem; }
  .reward-reveal h2 { margin-top: .4rem; }
  .reward-reveal > p:not(.eyebrow) { margin-block: .35rem .55rem; }
  .reward-next { margin-bottom: .55rem; padding-block: .5rem; }
  .driver-reveal { padding: .9rem; }
  .driver-reveal-art { height: 128px; }
  .driver-reveal-halo { width: 104px; height: 104px; border-width: 8px; }
  .driver-reveal-copy { margin: .5rem 0; }
  .driver-reveal-copy p { margin-top: .25rem; }
  .driver-reveal-stats { margin-bottom: .45rem; }
  .driver-reveal-next { margin-bottom: .5rem; }
  .driver-reveal .primary-button { min-height: 46px; }
}

@media (min-width: 760px) {
  .game-card { padding: 1.25rem; }
  .scene-wrap { width: min(620px, 100%); min-height: min(840px, calc(100dvh - 2.5rem)); margin: auto; border-radius: 28px; box-shadow: var(--shadow); }
}

@media (max-width: 430px) {
  .brand > span:last-child { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 1.15rem; }
  .swing-panel.is-shot-summary { opacity: .52; }
  .result-hero { grid-template-columns: 1fr; align-items: start; }
  .strike-card { grid-template-columns: auto 1fr; align-items: center; justify-content: center; }
  .driver-head { width: 158px; height: 103px; }
  .clubface { width: 100%; height: 100%; }
  .strike-card figcaption { justify-items: start; }
  .round-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

/* v179: mobile-first arcade/broadcast UI polish. */
.top-hud {
  top: max(.5rem, env(safe-area-inset-top));
  left: .5rem;
  right: .5rem;
  gap: .35rem;
}
.hud-chip {
  min-height: 58px;
  padding: .7rem .72rem .58rem;
  gap: .12rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18,34,48,.97), rgba(31,52,68,.93));
  box-shadow: inset 0 4px 0 var(--blue), 0 8px 22px rgba(15,28,40,.24);
  color: white;
}
.hud-chip:nth-child(2) { box-shadow: inset 0 4px 0 var(--green), 0 8px 22px rgba(15,28,40,.24); }
.hud-chip:nth-child(3) { box-shadow: inset 0 4px 0 var(--yellow), 0 8px 22px rgba(15,28,40,.24); }
.hud-chip span { color: rgba(255,255,255,.64); font-size: .62rem; letter-spacing: .095em; }
.hud-chip strong { color: white; font-size: .98rem; line-height: 1.05; }
.record-chip b { color: #b9ed2c; font-size: 1.3rem; }
.wind-chip strong { color: #ffe06a; }
.xp-hud {
  padding: .58rem .72rem .6rem;
  border: 1px solid rgba(68,185,255,.38);
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(18,39,56,.97), rgba(22,65,91,.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 9px 24px rgba(15,28,40,.25);
}
.xp-meta { min-height: 20px; }
.xp-meta strong { color: white; font-size: .76rem; }
.xp-meta span { font-size: .66rem; }
.xp-track { height: 12px; margin: .34rem 0 .32rem; border-width: 2px; }
.xp-reward { font-size: .58rem; }

.start-panel {
  width: auto;
  top: max(.5rem, env(safe-area-inset-top));
  right: .5rem;
  bottom: max(.5rem, env(safe-area-inset-bottom));
  left: .5rem;
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 2px solid rgba(66,185,255,.5);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 18%, rgba(151,204,4,.22), transparent 26%),
    radial-gradient(circle at 12% 42%, rgba(45,125,210,.28), transparent 34%),
    linear-gradient(155deg, rgba(15,33,48,.96), rgba(20,50,70,.94) 58%, rgba(24,38,48,.97));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 24px 70px rgba(8,20,31,.38);
  color: white;
  transform: none;
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.start-panel > * { position: relative; z-index: 1; }
.start-menu-ball {
  width: clamp(150px, 47vw, 210px);
  aspect-ratio: 1;
  position: absolute;
  z-index: 0;
  top: 15%;
  left: 50%;
  object-fit: contain;
  transform: translateX(-50%) rotate(-10deg);
  animation: menu-ball-float 4.8s ease-in-out infinite;
}
.start-panel::after {
  content: '';
  width: clamp(205px, 65vw, 292px);
  aspect-ratio: 1;
  position: absolute;
  z-index: 0;
  top: 10.5%;
  left: 50%;
  border: 2px dashed rgba(93,196,255,.38);
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgba(45,125,210,.06), 0 0 0 36px rgba(151,204,4,.025);
  transform: translateX(-50%) rotate(9deg);
  animation: menu-target-turn 22s linear infinite;
}
.start-brand { margin-bottom: auto; color: white; font-size: .95rem; }
.start-brand .brand-mark {
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 7px;
  background: linear-gradient(145deg, #b8e83c, var(--green));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 4px 10px rgba(0,0,0,.2);
  transform: none;
}
.start-brand .brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.start-brand .publisher-name { display: inline-flex; align-items: baseline; gap: .32rem; line-height: 1; }
.start-brand .publisher-name b {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .015em;
}
.start-brand .publisher-name strong {
  color: #66bfff;
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .025em;
}
.start-game-logo {
  width: min(100%, 390px);
  height: auto;
  margin: 0 auto .55rem;
  filter: drop-shadow(0 7px 12px rgba(3,14,22,.28));
}
.start-panel .eyebrow { color: #b9ed2c; font-size: .72rem; }
.start-panel h1 { max-width: 7ch; font-size: clamp(3.5rem, 17vw, 5.4rem); text-transform: uppercase; }
.start-panel h1 span { color: #ffe14f; }
.start-panel > p:not(.eyebrow, .control-note) { margin: .85rem 0 1rem; color: rgba(255,255,255,.72); font-size: .98rem; line-height: 1.42; }
.start-panel .primary-button {
  min-height: 58px;
  border: 2px solid rgba(255,255,255,.4);
  background: linear-gradient(135deg, #ffe34f, var(--yellow));
  color: var(--ink);
  font-family: "Space Grotesk";
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(238,185,2,.25);
}
.start-panel .menu-button { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: white; font-size: .72rem; }
.start-panel .reset-progress-button { color: rgba(255,255,255,.7); }
.start-panel .control-note { color: rgba(255,255,255,.54); font-size: .72rem; }

.swing-panel {
  width: min(560px, calc(100% - 1rem));
  bottom: max(.5rem, env(safe-area-inset-bottom));
  padding: 1rem;
  border: 2px solid rgba(66,185,255,.55);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(14,31,45,.97), rgba(23,54,73,.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 16px 38px rgba(9,23,34,.35);
}
.swing-prompt { margin-bottom: .72rem; color: #ffe363; font-size: 1.28rem; letter-spacing: -.025em; }
.meter { height: 34px; border-width: 4px; border-color: rgba(255,255,255,.9); background: #263644; }
.meter-marker { width: 7px; top: -4px; bottom: -4px; box-shadow: 0 0 0 3px rgba(18,34,48,.45), 0 0 13px rgba(255,255,255,.75); }
.meter-labels { margin-top: .38rem; font-size: .7rem; }
.meter-labels strong { color: #ffe363; font-size: .76rem; }
.accuracy-wrap { margin-top: .72rem; }

.result-panel {
  border: 2px solid rgba(66,185,255,.5);
  background:
    radial-gradient(circle at 100% 0, rgba(45,125,210,.25), transparent 32%),
    linear-gradient(155deg, rgba(15,33,48,.98), rgba(24,52,68,.97));
  color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 24px 70px rgba(8,20,31,.42);
}
.result-panel .result-kicker { color: #b9ed2c; font-size: .72rem; }
.result-panel h2 { color: white; }
.result-distance { margin: .72rem 0 .65rem; gap: .5rem; }
.result-distance strong { color: #ffe14f; }
.result-distance span { color: rgba(255,255,255,.68); font-size: .82rem; }
.new-record { background: var(--green); color: var(--ink); }
.result-panel.is-out .result-kicker, .result-panel.is-out .result-distance strong { color: #ff784a; }
.strike-card { padding: .55rem; border-radius: 18px; background: rgba(251,251,242,.94); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 8px 20px rgba(5,15,24,.2); }
.stats-grid { margin: .75rem 0; gap: .42rem; }
.stats-grid div { padding: .72rem; border: 1px solid rgba(92,191,255,.2); background: rgba(255,255,255,.08); }
.stats-grid dt { color: rgba(255,255,255,.56); font-size: .62rem; letter-spacing: .065em; }
.stats-grid dd { margin-top: .2rem; color: white; font-family: "Space Grotesk"; font-size: .92rem; }
.result-panel .rank-progress { color: rgba(255,255,255,.66); font-size: .82rem; }
.result-panel .primary-button { min-height: 56px; background: linear-gradient(135deg, #ffe34f, var(--yellow)); color: var(--ink); font-family: "Space Grotesk"; font-size: .95rem; font-weight: 800; }
.top-hud { animation: hud-arrival .48s cubic-bezier(.2,.85,.22,1) both; }
.swing-panel:not(.is-hidden):not(.is-shot-summary) { animation: controls-arrival .34s cubic-bezier(.2,.88,.22,1.08) both; }
.result-panel:not(.is-hidden) { animation: result-arrival .42s cubic-bezier(.18,.9,.24,1.08) both; }
.result-panel:not(.is-hidden) .result-distance strong { animation: score-pop .46s .08s cubic-bezier(.18,.9,.24,1.16) both; }

@keyframes hud-arrival {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes controls-arrival {
  from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes result-arrival {
  from { opacity: 0; transform: translateX(-50%) translateY(22px) scale(.95); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes score-pop {
  from { opacity: 0; transform: scale(.72) rotate(-3deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes menu-ball-float {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-10deg); }
  50% { transform: translateX(-50%) translateY(-8px) rotate(-6deg); }
}
@keyframes menu-target-turn {
  from { transform: translateX(-50%) rotate(9deg); }
  to { transform: translateX(-50%) rotate(369deg); }
}

@media (max-width: 430px) {
  .result-hero { grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: .5rem; }
  .result-panel h2 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .result-distance strong { font-size: clamp(3.2rem, 16vw, 4.3rem); }
  .strike-card { grid-template-columns: 1fr; gap: .25rem; }
  .driver-head { width: 118px; height: 78px; }
  .strike-card figcaption { justify-items: center; }
  .strike-card figcaption span { font-size: .52rem; }
  .panel { padding: 1rem; }
}

@media (orientation: portrait) and (max-height: 650px) {
  .hud-chip { min-height: 49px; padding: .56rem .55rem .45rem; }
  .hud-chip span { font-size: .54rem; }
  .hud-chip strong { font-size: .84rem; }
  .record-chip b { font-size: 1.05rem; }
  .xp-hud { padding: .42rem .56rem; }
  .xp-meta strong { font-size: .66rem; }
  .xp-meta span { font-size: .58rem; }
  .xp-track { height: 9px; margin-block: .25rem 0; }
  .start-panel { padding: 1rem; }
  .start-menu-ball { width: 118px; top: 12%; }
  .start-panel::after { width: 166px; top: 8%; }
  .start-brand { margin-bottom: auto; }
  .start-game-logo { width: min(82%, 300px); margin-bottom: .32rem; }
  .start-panel h1 { font-size: clamp(2.65rem, 14vw, 3.35rem); }
  .start-panel > p:not(.eyebrow, .control-note) { margin: .55rem 0 .65rem; font-size: .82rem; }
  .start-panel .primary-button { min-height: 48px; }
  .start-panel .control-note { margin-top: .4rem; font-size: .58rem; }
  .swing-panel { padding: .72rem .8rem; }
  .swing-prompt { margin-bottom: .48rem; font-size: 1.02rem; }
  .meter { height: 28px; border-width: 3px; }
  .accuracy-wrap { margin-top: .5rem; }
  .result-panel { padding: .8rem; }
  .stats-grid div { padding: .5rem .55rem; }
  .result-panel .primary-button { min-height: 48px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .rotate-note { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; padding: 2rem; background: var(--paper); font-family: "Space Grotesk"; font-size: 1.5rem; font-weight: 700; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* v189: first UI cleanup checkpoint — connected scorebug and punchier swing deck. */
.top-hud {
  gap: 3px;
  filter: drop-shadow(0 9px 16px rgba(7,18,28,.28));
}
.hud-chip {
  --hud-accent: var(--blue);
  min-height: 50px;
  padding: .58rem .66rem .48rem;
  border: 0;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), transparent 45%),
    rgba(12,30,44,.94);
  box-shadow: inset 0 -3px 0 var(--hud-accent);
}
.hud-chip:first-child { border-radius: 15px 5px 5px 5px; }
.hud-chip:nth-child(2) { --hud-accent: var(--green); box-shadow: inset 0 -3px 0 var(--hud-accent); }
.hud-chip:nth-child(3) { --hud-accent: var(--yellow); border-radius: 5px 15px 5px 5px; box-shadow: inset 0 -3px 0 var(--hud-accent); }
.hud-chip span { font-size: .58rem; letter-spacing: .105em; }
.hud-chip strong { font-size: 1.02rem; }
.record-chip b { font-size: 1.28rem; }
.xp-hud {
  margin-top: 0;
  padding: .42rem .68rem .45rem;
  border: 0;
  border-radius: 5px 5px 15px 15px;
  background:
    linear-gradient(90deg, rgba(45,125,210,.15), transparent 45%, rgba(151,204,4,.08)),
    rgba(12,30,44,.94);
  box-shadow: none;
}
.xp-meta { min-height: 17px; }
.xp-meta strong { font-size: .7rem; }
.xp-meta span { font-size: .61rem; }
.xp-track { height: 8px; margin: .24rem 0 .22rem; border-width: 1px; }
.xp-reward { font-size: .54rem; }

.swing-panel {
  width: min(560px, calc(100% - .75rem));
  bottom: max(.375rem, env(safe-area-inset-bottom));
  padding: 1rem .85rem .78rem;
  overflow: visible;
  border: 0;
  border-radius: 18px 18px 24px 24px;
  background:
    radial-gradient(circle, rgba(255,255,255,.065) 0 1px, transparent 1.5px) 0 0 / 10px 10px,
    linear-gradient(135deg, rgba(11,29,43,.98), rgba(20,60,81,.97));
  box-shadow: inset 0 3px 0 #57bcff, 0 16px 34px rgba(5,16,25,.42);
}
.swing-panel::before {
  content: 'SWING TIMING';
  position: absolute;
  top: -10px;
  left: 18px;
  padding: .23rem .58rem .2rem;
  border-radius: 5px;
  background: #ffe143;
  color: #112838;
  font-family: "Space Grotesk";
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.swing-prompt {
  margin-bottom: .62rem;
  color: white;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  text-transform: uppercase;
}
.meter {
  height: 38px;
  border: 3px solid rgba(255,255,255,.92);
  border-radius: 12px;
  background: #24323d;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.28), 0 0 0 1px rgba(3,14,22,.4);
}
.meter-fill {
  background: linear-gradient(90deg, #62a9ff 0 18%, var(--green) 42%, #e8dd22 70%, #ff7a22 100%);
}
.meter-marker {
  width: 8px;
  top: -3px;
  bottom: -3px;
  border-radius: 2px;
  background: white;
  box-shadow: 0 0 0 2px rgba(11,29,43,.78), 0 0 15px 3px rgba(255,255,255,.7);
}
.power-meter.is-locked {
  border-color: #c6f43a;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.24), 0 0 0 2px rgba(151,204,4,.28), 0 0 18px rgba(151,204,4,.24);
}
.meter-labels {
  margin-top: .32rem;
  padding-inline: .08rem;
  font-size: .64rem;
  letter-spacing: .11em;
}
.meter-labels strong {
  color: #ffe143;
  font-size: .7rem;
}
.accuracy-wrap { margin-top: .62rem; }
.accuracy-meter {
  background: #24323d;
}
.accuracy-bad.left, .accuracy-bad.right { background: #e95128; }
.accuracy-good { background: #e2bd23; }
.accuracy-perfect { background: #91d521; box-shadow: 0 0 14px rgba(151,204,4,.5); }

@media (orientation: portrait) and (max-height: 650px) {
  .hud-chip { min-height: 43px; padding: .47rem .5rem .4rem; }
  .hud-chip span { font-size: .5rem; }
  .hud-chip strong { font-size: .84rem; }
  .record-chip b { font-size: 1.05rem; }
  .xp-hud { padding: .32rem .52rem .35rem; }
  .xp-track { height: 7px; margin-block: .18rem 0; }
  .swing-panel { padding: .88rem .7rem .6rem; }
  .swing-panel::before { left: 14px; font-size: .52rem; }
  .swing-prompt { margin-bottom: .42rem; font-size: 1rem; }
  .meter { height: 32px; }
  .meter-labels { margin-top: .24rem; font-size: .56rem; }
  .accuracy-wrap { margin-top: .44rem; }
}

/* v190: approved broadcast-arcade language across every menu and reveal. */
.panel,
.reset-dialog {
  --panel-line: rgba(82,190,255,.45);
  color: white;
  border: 0;
  border-radius: 18px 18px 24px 24px;
  background:
    radial-gradient(circle, rgba(255,255,255,.055) 0 1px, transparent 1.5px) 0 0 / 10px 10px,
    radial-gradient(circle at 100% 0, rgba(45,125,210,.24), transparent 36%),
    linear-gradient(145deg, rgba(11,29,43,.985), rgba(20,55,74,.975));
  box-shadow: inset 0 3px 0 #57bcff, 0 20px 52px rgba(5,16,25,.44);
}
.panel h1,
.panel h2,
.reset-dialog h2 { color: white; text-transform: uppercase; }
.panel .eyebrow,
.reset-dialog .eyebrow {
  width: fit-content;
  margin-bottom: .65rem;
  padding: .25rem .56rem .22rem;
  border-radius: 5px;
  background: #ffe143;
  color: #112838;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .13em;
}
.primary-button {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffe552, #f4bd13);
  color: #14293a;
  font-family: "Space Grotesk";
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(238,185,2,.2);
}
.primary-button:active { transform: translateY(2px); }
.menu-button,
.round-menu-button,
.secondary-button,
.danger-button {
  border-radius: 10px;
  font-family: "Space Grotesk";
  font-weight: 800;
  letter-spacing: .025em;
}

.start-panel {
  border-radius: 18px 18px 24px 24px;
  background:
    radial-gradient(circle, rgba(255,255,255,.05) 0 1px, transparent 1.5px) 0 0 / 10px 10px,
    radial-gradient(circle at 88% 18%, rgba(151,204,4,.19), transparent 27%),
    radial-gradient(circle at 12% 42%, rgba(45,125,210,.27), transparent 35%),
    linear-gradient(155deg, rgba(10,28,42,.975), rgba(17,52,71,.965) 58%, rgba(13,32,44,.98));
  box-shadow: inset 0 3px 0 #57bcff, 0 24px 70px rgba(8,20,31,.4);
}
.start-panel .eyebrow { color: #112838; }
.start-panel .primary-button { border-radius: 12px; text-transform: uppercase; }
.start-panel .menu-button {
  border: 1px solid rgba(89,192,255,.26);
  border-radius: 10px;
  background: rgba(4,20,31,.28);
}

.result-panel {
  border-radius: 18px 18px 24px 24px;
  background:
    radial-gradient(circle, rgba(255,255,255,.055) 0 1px, transparent 1.5px) 0 0 / 10px 10px,
    radial-gradient(circle at 100% 0, rgba(45,125,210,.27), transparent 34%),
    linear-gradient(155deg, rgba(11,29,43,.99), rgba(20,55,74,.98));
}
.result-panel .result-kicker {
  width: fit-content;
  margin-bottom: .48rem;
  padding: .22rem .5rem .2rem;
  border-radius: 5px;
  background: var(--green);
  color: #112838;
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.result-panel.is-out .result-kicker { background: #ff7046; color: white; }
.result-panel.is-out .result-distance strong { color: #ff7046; }
.result-panel.is-close {
  box-shadow: 0 0 0 2px rgba(255,225,67,.86), 0 18px 50px rgba(2,15,24,.46), 0 0 32px rgba(255,225,67,.22);
}
.result-panel.is-close:not(.is-out) .result-kicker { background: #ffe143; color: #112838; }
.result-panel.is-close:not(.is-out) .result-distance strong { color: #b9ed2c; }
.result-panel.is-close.is-out { box-shadow: 0 0 0 2px rgba(255,112,70,.9), 0 18px 50px rgba(2,15,24,.46), 0 0 34px rgba(255,112,70,.24); }
.result-panel.is-close h2 { animation: close-call-title .5s cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes close-call-title { from { opacity: .45; transform: translateY(5px) scale(.97); } to { opacity: 1; transform: none; } }
.result-panel h2 { text-transform: uppercase; }
.result-distance strong { color: #ffe143; }
.new-record { border-radius: 6px; background: var(--green); color: #112838; letter-spacing: .06em; }
.strike-card { border-radius: 12px; }
.stats-grid { gap: 3px; }
.stats-grid div {
  min-height: 58px;
  padding: .62rem .68rem;
  border: 0;
  border-radius: 5px;
  background: rgba(6,24,36,.54);
  box-shadow: inset 0 -2px 0 rgba(82,190,255,.28);
}
.stats-grid dt { color: rgba(255,255,255,.52); letter-spacing: .1em; }
.stats-grid dd { color: white; font-size: .9rem; }
.result-panel .rank-progress {
  margin: .68rem 0;
  padding: .5rem .6rem;
  border-radius: 6px;
  background: rgba(255,255,255,.065);
  color: rgba(255,255,255,.72);
  font-weight: 700;
}
.result-panel .primary-button { border-radius: 12px; text-transform: uppercase; }

.reward-reveal,
.driver-reveal,
.round-panel { color: white; }
.reward-reveal .eyebrow,
.driver-reveal .eyebrow,
.round-panel .eyebrow { margin-inline: auto; }
.reward-reveal > p:not(.eyebrow),
.driver-reveal-copy p { color: rgba(255,255,255,.66); }
.reward-orbit {
  border: 3px solid rgba(115,203,255,.46);
  background:
    radial-gradient(circle, rgba(255,255,255,.08) 0 1px, transparent 1.5px) 0 0 / 9px 9px,
    linear-gradient(145deg, #2d7dd2, #124d80);
  box-shadow: 0 0 0 8px rgba(45,125,210,.1), 0 18px 35px rgba(4,18,29,.38);
}
.reward-orbit span { border-color: rgba(255,225,67,.72); }
.reward-next {
  border: 0;
  border-radius: 7px;
  background: rgba(4,20,31,.48);
  box-shadow: inset 0 -2px 0 rgba(82,190,255,.28);
}
.reward-next span { color: rgba(255,255,255,.5); letter-spacing: .11em; }
.reward-next strong { color: #ffe143; }
.rank-emblem {
  border-color: #ffe143;
  background:
    radial-gradient(circle, rgba(255,255,255,.1) 0 1px, transparent 1.5px) 0 0 / 9px 9px,
    linear-gradient(145deg, #ffd943, #f09c13);
  box-shadow: 0 0 0 8px rgba(255,225,67,.1), 0 18px 35px rgba(4,18,29,.34);
}
.driver-reveal-art {
  border: 0;
  border-radius: 12px;
  background:
    linear-gradient(120deg, transparent 48%, rgba(82,190,255,.09) 49% 51%, transparent 52%) 0 0 / 38px 38px,
    radial-gradient(circle at 50% 54%, rgba(82,190,255,.2), transparent 48%),
    rgba(4,20,31,.54);
  box-shadow: inset 0 -3px 0 rgba(82,190,255,.3);
}
.driver-reveal-level { color: #78cbff; }
.driver-reveal-stats { gap: 4px; }
.driver-reveal-stats div {
  min-width: 120px;
  padding: .55rem .7rem;
  border-radius: 6px;
  background: rgba(4,20,31,.48);
  box-shadow: inset 0 -2px 0 rgba(151,204,4,.45);
}
.driver-reveal-stats dt { color: rgba(255,255,255,.5); }
.driver-reveal-stats dd { color: #b9ed2c; }
.driver-reveal-next { color: rgba(255,255,255,.58); }
.driver-reveal.is-competition .driver-reveal-art::after {
  content: "";
  width: 42%;
  height: 180%;
  position: absolute;
  z-index: 2;
  top: -40%;
  left: -65%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent);
  filter: blur(2px);
  transform: rotate(18deg);
  animation: competition-glimmer 1.7s .35s ease-in-out 2;
}
.driver-reveal.is-competition .driver-reveal-art {
  background:
    linear-gradient(120deg, transparent 48%, rgba(45,125,210,.12) 49% 51%, transparent 52%) 0 0 / 38px 38px,
    radial-gradient(circle at 50% 52%, #f2fbff 0 18%, #b9e0ef 52%, #82b6cd 100%);
  box-shadow: inset 0 -3px 0 rgba(45,125,210,.48), inset 0 0 34px rgba(255,255,255,.52);
}
.driver-reveal.is-competition .driver-reveal-halo {
  border-color: rgba(45,125,210,.7);
  box-shadow: 0 0 0 1px rgba(255,255,255,.72), 0 0 34px rgba(45,125,210,.3);
}
@keyframes competition-glimmer {
  0% { left: -65%; opacity: 0; }
  18% { opacity: .85; }
  55%, 100% { left: 125%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .driver-reveal.is-competition .driver-reveal-art::after { animation: none; }
}

.round-shots { gap: 3px; }
.round-shots li {
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  background: rgba(4,20,31,.5);
  color: white;
  box-shadow: inset 0 -2px 0 rgba(82,190,255,.2);
}
.round-shots li span { color: rgba(255,255,255,.5); }
.round-shots li.is-out { box-shadow: inset 0 -2px 0 rgba(244,93,1,.55); }
.round-shots li.is-out strong { color: #ff784a; }
.round-shots li.is-best {
  border: 0;
  background: linear-gradient(135deg, #2d7dd2, #165a91);
  box-shadow: inset 0 -3px 0 #ffe143, 0 6px 14px rgba(5,18,28,.3);
}
.round-summary-grid { gap: 3px; }
.round-summary-grid div {
  padding: .68rem;
  border-radius: 5px;
  background: rgba(4,20,31,.5);
  box-shadow: inset 0 -2px 0 rgba(151,204,4,.38);
}
.round-summary-grid span { color: rgba(255,255,255,.5); letter-spacing: .09em; }
.round-summary-grid strong { color: white; font-family: "Space Grotesk"; font-size: .86rem; }
.xp-breakdown {
  border: 0;
  border-radius: 6px;
  background: rgba(4,20,31,.42);
}
.xp-breakdown span { color: rgba(255,255,255,.5); }
.xp-breakdown strong { color: #78cbff; }
.qualification-card {
  border: 0;
  border-radius: 7px;
  background: rgba(4,20,31,.5);
  box-shadow: inset 0 -2px 0 rgba(82,190,255,.3);
}
.qualification-heading span,
.qualification-history > span,
.qualification-heading em,
.qualification-card[open] .qualification-heading em::after,
.qualification-target span,
.qualification-requirements b { color: rgba(255,255,255,.5); }
.qualification-heading strong,
.qualification-requirements > span.is-met b,
.qualification-requirements > span.is-met strong { color: #78cbff; }
.qualification-target strong,
.qualification-requirements strong,
.qualification-card .rank-progress { color: white; }
.qualification-requirements { border-top-color: rgba(82,190,255,.18); }
.qualification-requirements > span:not(.is-met) strong { color: #ffe143; }
.qualification-slot { border-color: rgba(82,190,255,.3); background: rgba(255,255,255,.08); }
.qualification-dot { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.07); }
.qualification-dot.is-played { background: rgba(255,255,255,.45); }
.qualification-card.is-complete { background: linear-gradient(135deg, rgba(45,125,210,.35), rgba(151,204,4,.2)); }
.round-menu-button {
  border: 1px solid rgba(82,190,255,.26);
  background: rgba(4,20,31,.32);
  color: rgba(255,255,255,.72);
}

.reset-dialog { overflow: hidden; }
.reset-dialog::backdrop { background: rgba(4,14,22,.72); backdrop-filter: blur(6px); }
.reset-dialog form { padding: 1.3rem; }
.reset-dialog p:not(.eyebrow) { color: rgba(255,255,255,.66); }
.secondary-button {
  border: 1px solid rgba(82,190,255,.34);
  background: rgba(4,20,31,.35);
  color: white;
}
.danger-button {
  border: 1px solid rgba(255,120,74,.5);
  background: #b53b27;
  color: white;
}

@media (max-width: 430px) {
  .result-panel,
  .reward-reveal,
  .driver-reveal,
  .round-panel { padding: 1rem; }
  .stats-grid { gap: 3px; }
  .stats-grid div { padding: .6rem; }
}

@media (orientation: portrait) and (max-height: 650px) {
  .panel .eyebrow,
  .reset-dialog .eyebrow { margin-bottom: .42rem; }
  .result-panel,
  .reward-reveal,
  .driver-reveal,
  .round-panel { padding: .78rem; }
  .result-panel .result-kicker { margin-bottom: .28rem; }
  .result-panel h2 { font-size: 1.55rem; }
  .result-distance { margin-block: .42rem .36rem; }
  .result-distance strong { font-size: 3rem; }
  .new-record { margin-bottom: .35rem; padding: .34rem .4rem; font-size: .62rem; line-height: 1.15; }
  .strike-card { padding: .38rem; }
  .driver-head { width: 104px; height: 68px; }
  .stats-grid { margin-block: .44rem; }
  .stats-grid div { min-height: 48px; padding: .4rem .5rem; }
  .stats-grid dd { font-size: .82rem; }
  .result-panel .rank-progress { margin-block: .48rem; padding-block: .38rem; }
  .primary-button { min-height: 47px; }
}

/* v191: round summary gains a score-first hierarchy and denser scorecard. */
.round-panel {
  padding: 1rem;
}
.round-panel > .eyebrow {
  margin-bottom: .5rem;
}
.round-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 4px;
}
.round-best {
  min-width: 0;
  padding: .72rem .85rem .68rem;
  display: grid;
  align-content: center;
  border-radius: 8px 5px 5px 8px;
  background:
    linear-gradient(135deg, rgba(45,125,210,.95), rgba(19,82,130,.96));
  box-shadow: inset 0 -3px 0 #ffe143;
}
.round-best > span,
.round-section-label {
  color: rgba(255,255,255,.64);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.round-best > div {
  margin-top: .1rem;
  display: flex;
  align-items: baseline;
  gap: .35rem;
}
.round-best strong {
  font-family: "Space Grotesk";
  font-size: clamp(3.25rem, 15vw, 4.7rem);
  letter-spacing: -.085em;
  line-height: .86;
}
.round-best b {
  color: #ffe143;
  font-family: "Space Grotesk";
  font-size: .9rem;
  text-transform: uppercase;
}
.round-best.is-empty {
  background:
    linear-gradient(135deg, rgba(24,82,119,.98), rgba(8,43,64,.98));
  box-shadow: inset 0 -3px 0 #ff6a2a;
}
.round-best.is-empty > div {
  display: grid;
  align-content: center;
  gap: .08rem;
}
.round-best.is-empty strong {
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  letter-spacing: -.055em;
  line-height: .92;
  text-transform: uppercase;
}
.round-best.is-empty b {
  color: #ffe143;
  font-size: .72rem;
  letter-spacing: .08em;
}
.round-recovery {
  margin: .5rem 0 0;
  padding: .48rem .62rem;
  border: 1px solid rgba(255,106,42,.34);
  border-radius: 7px;
  background: rgba(255,106,42,.08);
  color: rgba(255,255,255,.72);
  font-size: .64rem;
  line-height: 1.3;
  text-align: center;
}
.round-recovery strong { color: white; }
.round-panel .round-summary-grid {
  grid-template-columns: 1fr;
  gap: 4px;
}
.round-panel .round-summary-grid div {
  min-height: 0;
  padding: .58rem .68rem;
  display: grid;
  align-content: center;
}
.round-panel .round-summary-grid span { font-size: .56rem; }
.round-panel .round-summary-grid strong {
  margin-top: .12rem;
  font-size: 1.05rem;
}
.round-section-label {
  margin: .72rem 0 .36rem;
}
.round-panel .round-shots {
  margin: 0 0 .55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 4px;
}
.round-panel .round-shots li {
  min-height: 52px;
  padding: .5rem .58rem;
  grid-template-columns: 1fr auto;
  gap: .2rem .4rem;
}
.round-panel .round-shots li span {
  font-size: .56rem;
  letter-spacing: .09em;
}
.round-panel .round-shots li strong {
  font-size: .9rem;
}
.round-panel .round-shots li em {
  grid-column: 1 / -1;
  justify-self: start;
}
.round-panel .qualification-card {
  margin: .5rem 0 .58rem;
  padding: .65rem .72rem;
}
.round-panel .qualification-heading span { font-size: .55rem; }
.round-panel .qualification-heading strong { font-size: 1.18rem; }
.round-panel .primary-button { min-height: 52px; }
.round-panel .round-menu-button { margin-top: 4px; }

/* v212: Sloppy Golf owns the title-card hierarchy and palette. */
.start-panel .start-brand .brand-mark {
  background: linear-gradient(145deg, #b8e83c, var(--green));
  color: #102838;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 10px rgba(92,137,0,.22);
}
.start-panel .start-game-logo {
  width: min(100%, 520px);
  margin-bottom: .45rem;
  filter: drop-shadow(0 8px 14px rgba(3,14,22,.3));
}
.start-panel .eyebrow {
  background: linear-gradient(135deg, #b8e83c, var(--green));
  color: #102838;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.start-panel h1 {
  max-width: 9ch;
  font-size: clamp(2.8rem, 11vw, 3.8rem);
}
.start-panel h1 span { color: #a9dc18; }
.start-panel .primary-button {
  background: linear-gradient(135deg, #b8e83c 0%, #97cc04 58%, #82b600 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 9px 20px rgba(92,137,0,.28);
}
.panel .primary-button {
  background: linear-gradient(135deg, #b8e83c 0%, #97cc04 58%, #82b600 100%);
  color: #102838;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 9px 20px rgba(92,137,0,.28);
}

@media (orientation: portrait) and (max-height: 650px) {
  .start-panel .start-game-logo { width: min(92%, 390px); margin-bottom: .25rem; }
  .start-panel h1 { font-size: clamp(2.25rem, 10.5vw, 2.8rem); }
}

@media (max-width: 430px) {
  .round-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .round-best { padding-inline: .68rem; }
  .round-best strong { font-size: clamp(2.8rem, 15vw, 3.6rem); }
  .round-panel .round-shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
  }
}

@media (orientation: portrait) and (max-height: 650px) {
  .round-panel { padding: .72rem; }
  .round-panel > .eyebrow { margin-bottom: .32rem; }
  .round-best { padding-block: .52rem; }
  .round-best strong { font-size: 2.65rem; }
  .round-section-label { margin: .48rem 0 .25rem; }
  .round-panel .round-shots li { min-height: 42px; padding-block: .4rem; }
  .round-panel .qualification-card { margin-block: .38rem .42rem; }
}

/* v228: restrained EverElms presentation marks bookend the game. */
.studio-splash {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  background: #102838;
  pointer-events: none;
  animation: studio-splash-away 1.55s cubic-bezier(.55, 0, .72, 1) forwards;
}
.studio-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(93,196,255,.16) 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: .38;
}
.studio-splash-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: .72rem;
  color: white;
  animation: studio-lockup-arrival .48s cubic-bezier(.2,.88,.22,1.08) both;
}
.studio-splash-lockup img {
  width: 58px;
  height: 58px;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.24));
}
.studio-splash-lockup span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: .38rem;
  line-height: 1;
}
.studio-splash-lockup b {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: .025em;
}
.studio-splash-lockup strong {
  color: #66bfff;
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .03em;
}
.studio-splash-lockup em {
  grid-column: 1 / -1;
  margin-top: .38rem;
  color: rgba(255,255,255,.58);
  font-family: "Space Grotesk", sans-serif;
  font-size: .58rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .22em;
}
@keyframes studio-lockup-arrival {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes studio-splash-away {
  0%, 62% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

.round-studio-signature {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .28rem;
  margin-top: .48rem;
  color: rgba(255,255,255,.56);
  line-height: 1;
}
.round-studio-signature span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: 5px;
  background: linear-gradient(145deg, #b8e83c, var(--green));
}
.round-studio-signature img { width: 100%; height: 100%; display: block; }
.round-studio-signature b {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .035em;
}
.round-studio-signature strong {
  color: rgba(102,191,255,.72);
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: .48rem;
  font-weight: 500;
  letter-spacing: .025em;
}

@media (prefers-reduced-motion: reduce) {
  .studio-splash { animation-duration: .01ms; }
  .studio-splash-lockup { animation: none; }
}
