:root {
  --green-950: #061311;
  --green-900: #0a1d19;
  --green-800: #102c25;
  --green-700: #194438;
  --charcoal: #101413;
  --ink: #f6f2e8;
  --muted: #b7bcad;
  --soft: rgba(246, 242, 232, 0.08);
  --line: rgba(246, 242, 232, 0.14);
  --gold: #d8b464;
  --sand: #d9d0bb;
  --danger: #d9785f;
  --blue: #8fb6aa;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.115);
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.34);
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --cream: #f6f2e8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--green-950);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    radial-gradient(circle at 50% -12%, rgba(216, 180, 100, 0.18), transparent 33rem),
    linear-gradient(180deg, #071511 0%, #101a17 45%, #070b0a 100%);
  background-size: 38px 38px, 38px 38px, auto, auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  border: 0;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 14px calc(92px + env(safe-area-inset-bottom));
}

.screen {
  min-height: 100vh;
  padding-top: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 100, 0.42);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.brand-logo {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
}

.hero-logo {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto var(--space-3);
}

.auth-hero {
  display: grid;
  place-items: center;
  padding-top: 32px;
  padding-bottom: 4px;
  text-align: center;
}

.home-masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 0 0 var(--space-4);
}

.home-player-heading {
  min-width: 0;
  padding-top: var(--space-1);
}

.home-player-heading h1 {
  margin: var(--space-1) 0 0;
  color: var(--text);
  font-size: clamp(1.85rem, 9vw, 2.65rem);
  line-height: 0.98;
}

.home-brand-stack {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: var(--space-2);
}

.home-logo-badge {
  display: grid;
  flex: 0 0 auto;
  width: 118px;
  height: 74px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(216, 180, 100, 0.72);
  border-radius: 18px;
  background: #f6f2e8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.home-logo {
  display: block;
  width: 96px;
  height: auto;
  object-fit: contain;
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}

.home-primary-action {
  margin-bottom: var(--space-4);
}

.home-start-button {
  min-height: 62px;
  font-size: 1.03rem;
}

.home-secondary-actions {
  margin-top: var(--space-4);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2.32rem;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.46rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.48;
}

.hero {
  padding: 22px 2px 14px;
}

.panel,
.card,
.thought-card,
.round-row,
.field,
.stat-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 16px;
  margin-bottom: var(--space-4);
}

.card {
  padding: 14px;
}

.login-panel {
  margin-top: 18px;
}

.welcome-panel {
  position: relative;
  display: grid;
  gap: var(--space-3);
  overflow: hidden;
  padding: 20px;
  border-color: rgba(216, 180, 100, 0.28);
  background:
    linear-gradient(145deg, rgba(216, 180, 100, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
}

.welcome-panel h1 {
  margin-bottom: 0;
}

.welcome-panel p {
  margin-bottom: 0;
}

.welcome-points {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-1) 0;
}

.welcome-points div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(246, 242, 232, 0.12);
  border-radius: 8px;
  background: rgba(6, 19, 17, 0.42);
}

.welcome-points strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-950);
  background: var(--gold);
}

.welcome-points span {
  color: var(--ink);
  font-weight: 750;
}

.oauth-button {
  margin-top: var(--space-1);
  margin-bottom: 0;
}

.auth-note {
  margin: 0;
  color: var(--sand);
}

.profile-setup-panel h2 {
  margin-bottom: var(--space-2);
}

.choice-group {
  margin-bottom: var(--space-4);
}

.choice-label {
  margin: 0 0 var(--space-2);
  color: var(--sand);
  font-size: 0.84rem;
  font-weight: 700;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.choice-button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-weight: 800;
}

.choice-button.active {
  border-color: rgba(216, 180, 100, 0.72);
  background: rgba(216, 180, 100, 0.18);
  color: var(--gold);
}

.format-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.format-toggle label {
  cursor: pointer;
}

.format-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.format-toggle span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-weight: 850;
}

.format-toggle span small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.format-toggle input:checked + span {
  border-color: rgba(216, 180, 100, 0.76);
  background: rgba(216, 180, 100, 0.2);
  color: var(--gold);
}

.match-setup-panel,
.match-setup-details {
  display: grid;
  gap: var(--space-3);
}

.match-setup-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease;
}

.match-setup-details.is-visible {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
}

.match-join-code {
  display: none;
}

.match-join-code.is-visible {
  display: grid;
}

.match-choice-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.match-choice-card.active {
  border-color: rgba(216, 180, 100, 0.54);
  background: linear-gradient(180deg, rgba(216, 180, 100, 0.16), rgba(255, 255, 255, 0.055));
}

.match-choice-card strong,
.match-choice-card p {
  margin: 0;
}

.match-choice-card strong {
  color: var(--ink);
}

.match-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.match-choice-actions .ghost-button:only-child {
  grid-column: 1 / -1;
}

.match-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.match-created-box {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid rgba(216, 180, 100, 0.42);
  border-radius: 12px;
  background: rgba(216, 180, 100, 0.1);
}

.match-created-box span {
  color: var(--sand);
  font-weight: 800;
}

.match-created-box strong,
.match-code-display {
  color: var(--gold);
  font-size: clamp(2.35rem, 13vw, 3.55rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 0.95;
}

.danger-notice {
  border-color: rgba(217, 120, 95, 0.45);
}

.danger-notice p {
  margin: 0 0 var(--space-2);
}

.profile-check-group {
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
}

.profile-check-group legend {
  margin: 0 0 var(--space-2);
  color: var(--sand);
  font-size: 0.84rem;
  font-weight: 700;
}

.profile-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.profile-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-weight: 750;
}

.profile-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.profile-check.active {
  border-color: rgba(216, 180, 100, 0.72);
  background: rgba(216, 180, 100, 0.18);
  color: var(--gold);
}

.number-stepper {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: var(--space-2);
  margin-bottom: 12px;
}

.stepper-field {
  margin-bottom: 0;
  text-align: center;
  font-weight: 850;
}

.stepper-button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
}

.stepper-button:active {
  border-color: rgba(216, 180, 100, 0.78);
  background: rgba(216, 180, 100, 0.2);
  color: var(--gold);
}

.field {
  width: 100%;
  min-height: 54px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.field::placeholder {
  color: rgba(246, 242, 232, 0.48);
}

.course-select,
.profile-select {
  margin-bottom: var(--space-4);
  color-scheme: dark;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.field-grid .field {
  margin-bottom: 0;
}

.round-handicap-meta {
  margin-top: var(--space-2);
  color: var(--sand);
  font-weight: 700;
}

textarea.field {
  min-height: 88px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--sand);
  font-size: 0.84rem;
  font-weight: 650;
}

.button,
.ghost-button,
.icon-button,
.chip,
.outcome-button {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(216, 180, 100, 0.28);
  touch-action: manipulation;
  transition: transform 90ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.button:active,
.ghost-button:active,
.icon-button:active,
.chip:active,
.outcome-button:active {
  transform: translateY(1px) scale(0.985);
}

.button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: #071511;
  background: linear-gradient(180deg, #e2c477, var(--gold));
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(216, 180, 100, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.ghost-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  backdrop-filter: blur(18px);
}

.danger-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(216, 180, 100, 0.42);
  border-radius: 8px;
  background: rgba(216, 180, 100, 0.12);
  color: var(--sand);
  font-weight: 800;
}

.icon-button {
  display: grid;
  min-width: 48px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.action-stack {
  display: grid;
  gap: var(--space-3);
}

.round-management {
  margin-bottom: var(--space-4);
}

.dev-fill-button {
  margin-top: var(--space-3);
}

.round-story-panel {
  display: grid;
  gap: var(--space-3);
}

.round-story-accordion {
  display: block;
}

.round-story-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  cursor: pointer;
  list-style: none;
}

.round-story-accordion summary::-webkit-details-marker {
  display: none;
}

.round-story-accordion summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  line-height: 1.25;
}

.round-story-body {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.accordion-icon {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
}

.round-story-accordion[open] .accordion-icon {
  font-size: 0;
}

.round-story-accordion[open] .accordion-icon::after {
  content: "Close";
  font-size: 0.78rem;
}

.player-comment {
  margin: 0;
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: rgba(216, 180, 100, 0.09);
  color: var(--sand);
}

.hole-story-list {
  display: grid;
  gap: var(--space-3);
}

.hole-story {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.hole-story p {
  margin-bottom: var(--space-2);
}

.hole-story p:last-child {
  margin-bottom: 0;
}

.hole-story-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.hole-story-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.psych-question {
  color: var(--gold);
  font-weight: 700;
}

.compact-notice {
  margin-bottom: var(--space-3);
  padding: 10px 12px;
}

.mini-meta {
  display: block;
  margin-top: 6px;
  font-size: 0.73rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.stat-tile {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 76px;
  padding: 12px 10px;
  box-shadow: none;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 850;
}

.stat-label {
  color: var(--muted);
  font-size: 0.72rem;
}

.guidance-hero {
  padding: 20px;
  margin-bottom: var(--space-4);
  border: 1px solid rgba(216, 180, 100, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(216, 180, 100, 0.18), rgba(143, 182, 170, 0.08)),
    rgba(246, 242, 232, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.guidance-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.thought-grid {
  display: grid;
  gap: var(--space-3);
}

.thought-card {
  min-height: 92px;
  padding: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(216, 180, 100, 0.07));
  box-shadow: none;
}

.thought-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.03rem;
}

.thought-card span {
  display: block;
  color: var(--sand);
  font-size: 0.86rem;
  line-height: 1.35;
}

.thought-context {
  margin-bottom: 7px;
  color: var(--muted) !important;
}

.tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(6, 19, 17, 0.94);
  backdrop-filter: blur(16px);
}

.tab {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.tab.active {
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab svg,
.button svg,
.ghost-button svg,
.icon-button svg,
.inline-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hole-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 52px;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-padding-inline: 18px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.hole-pill {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 242, 232, 0.065);
  color: var(--ink);
  scroll-snap-align: center;
}

.hole-pill.active {
  border-color: var(--gold);
  background: rgba(216, 180, 100, 0.18);
}

.hole-pill.complete {
  color: #071511;
  background: linear-gradient(180deg, #a9d0c3, var(--blue));
}

.round-header {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 10;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  margin: -2px -2px var(--space-4);
  padding: 10px 2px var(--space-3);
  background: linear-gradient(180deg, rgba(7, 21, 17, 0.96), rgba(7, 21, 17, 0.78));
  backdrop-filter: blur(18px);
}

.round-hole-meta h1 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 0.98;
}

.round-header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.round-header-stats span,
.round-total-badge {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--sand);
  font-size: 0.75rem;
  font-weight: 800;
}

.round-total-badge {
  display: grid;
  min-width: 60px;
  min-height: 58px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
}

.round-total-badge span {
  color: var(--muted);
  font-size: 0.68rem;
}

.round-total-badge strong {
  font-size: 1.25rem;
}

.round-panel {
  padding-top: 12px;
}

.shot-stage {
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 180, 100, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(29, 76, 63, 0.84), rgba(10, 29, 25, 0.78));
  border: 1px solid rgba(143, 182, 170, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shot-count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.shot-count strong {
  font-size: 3.4rem;
  line-height: 0.95;
}

.score-only-stage {
  display: grid;
  gap: var(--space-4);
}

.score-only-control {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: var(--space-3);
}

.score-stepper,
.score-only-input {
  min-height: 72px;
  border: 1px solid rgba(216, 180, 100, 0.54);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
}

.score-only-input {
  width: 100%;
  font-size: 3.2rem;
  background: rgba(251, 245, 224, 0.13);
}

.score-only-control.disabled {
  opacity: 0.45;
}

.score-only-control.disabled .score-stepper {
  pointer-events: none;
}

.score-only-skip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 180, 100, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 850;
}

.score-only-skip input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

.score-stepper:active {
  transform: translateY(1px);
  background: rgba(216, 180, 100, 0.24);
}

.shot-feedback {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.mode-switch,
.feedback-row {
  display: grid;
  gap: var(--space-2);
}

.mode-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feedback-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feedback-row.club-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.near-green-position {
  margin-top: calc(-1 * var(--space-2));
  scroll-margin-block: 28vh;
}

.near-green-position .feedback-group {
  border-color: rgba(216, 180, 100, 0.72);
  background:
    linear-gradient(180deg, rgba(216, 180, 100, 0.19), rgba(36, 78, 60, 0.42)),
    rgba(255, 255, 255, 0.075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.28);
}

.near-green-position .feedback-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.near-green-position .feedback-chip {
  border-color: rgba(240, 220, 165, 0.58);
  background: rgba(251, 245, 224, 0.13);
  color: var(--ink);
}

.feedback-group {
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
}

.feedback-group .eyebrow {
  margin-bottom: var(--space-2);
  font-size: 0.68rem;
}

.feedback-chip {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--sand);
  font-size: 0.82rem;
  font-weight: 850;
}

.feedback-chip.active {
  border-color: rgba(216, 180, 100, 0.62);
  background: linear-gradient(180deg, rgba(216, 180, 100, 0.28), rgba(216, 180, 100, 0.12));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.feedback-chip.selected {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--green-950);
}

.inline-prompt {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 1px solid rgba(216, 180, 100, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(216, 180, 100, 0.19), rgba(36, 78, 60, 0.42)),
    rgba(255, 255, 255, 0.075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.28);
  scroll-margin-block: 28vh;
}

.inline-prompt h3,
.inline-prompt p {
  margin: 0;
}

.inline-prompt h3 {
  margin-bottom: var(--space-1);
}

.inline-prompt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.inline-prompt-actions.single-action {
  grid-template-columns: 1fr;
}

.inline-prompt.danger-prompt {
  border-color: rgba(217, 120, 95, 0.7);
  background:
    linear-gradient(180deg, rgba(217, 120, 95, 0.22), rgba(36, 78, 60, 0.34)),
    rgba(255, 255, 255, 0.075);
}

.hole-complete-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.round-secondary-actions {
  margin-top: var(--space-3);
}

.shot-steps-panel {
  box-shadow: none;
  margin-top: var(--space-3);
}

.round-total-panel {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.round-total-panel .inline-prompt {
  margin: 0;
}

.match-round-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  padding: 12px 14px;
  border: 1px solid rgba(216, 180, 100, 0.36);
  border-radius: 8px;
  background: rgba(216, 180, 100, 0.12);
}

.match-round-notice span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.match-round-notice strong {
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.match-round-notice em {
  display: inline-grid;
  min-width: 34px;
  min-height: 28px;
  place-items: center;
  margin-left: 8px;
  border: 1px solid rgba(216, 180, 100, 0.45);
  border-radius: 999px;
  background: rgba(216, 180, 100, 0.16);
  color: var(--ink);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0;
}

.shot-steps {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.shot-steps li {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--sand);
  line-height: 1.35;
}

.text-action {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(216, 180, 100, 0.42);
  border-radius: 8px;
  background: rgba(216, 180, 100, 0.1);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.outcome-grid.putt-outcomes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.outcome-grid.putt-outcomes .outcome-button {
  min-height: 96px;
}

.outcome-button {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1px solid rgba(246, 242, 232, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.18);
  user-select: none;
  -webkit-user-select: none;
}

.outcome-button.pressed,
.outcome-button:active {
  border-color: rgba(216, 180, 100, 0.78);
  background: linear-gradient(180deg, rgba(216, 180, 100, 0.35), rgba(216, 180, 100, 0.16));
  box-shadow:
    inset 0 0 0 2px rgba(216, 180, 100, 0.45),
    0 0 0 3px rgba(216, 180, 100, 0.16);
}

.outcome-button.selected {
  border-color: var(--gold);
  background: var(--gold);
  color: #071511;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    0 0 0 4px rgba(216, 180, 100, 0.22);
  transform: scale(0.985);
}

.outcome-button:disabled {
  opacity: 1;
}

.outcome-button span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.outcome-button.holed {
  background: linear-gradient(180deg, #e5c97d, var(--gold));
  color: #071511;
}

.outcome-button.trouble {
  border-color: rgba(143, 182, 170, 0.42);
  color: #d9f1e7;
  background: linear-gradient(180deg, rgba(143, 182, 170, 0.2), rgba(143, 182, 170, 0.085));
}

.outcome-button.penalty {
  border-color: rgba(217, 120, 95, 0.5);
  color: #ffd7cc;
  background: rgba(217, 120, 95, 0.16);
}

.scorecard {
  display: grid;
  grid-template-columns: repeat(6, minmax(42px, 1fr));
  gap: var(--space-2);
}

.score-cell {
  min-height: 54px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 242, 232, 0.06);
  text-align: center;
}

.score-button {
  color: var(--ink);
  cursor: pointer;
}

.score-button.active {
  border-color: rgba(216, 180, 100, 0.72);
  background: rgba(216, 180, 100, 0.16);
}

.score-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.score-cell .hole-no {
  color: var(--gold);
  font-weight: 900;
}

.score-cell .hole-par {
  color: var(--sand);
  font-weight: 650;
}

.score-cell strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.branded-scorecard {
  display: grid;
  gap: var(--space-3);
  border-color: rgba(216, 180, 100, 0.5);
  background: #f8f4ea;
  color: #101413;
}

.scorecard-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.scorecard-brand h2 {
  margin-bottom: 4px;
  color: #102c25;
}

.scorecard-brand p:last-child {
  margin-bottom: 0;
  color: rgba(16, 20, 19, 0.68);
}

.club-brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(216, 180, 100, 0.5);
  border-radius: 50%;
  background: #ffffff;
}

.club-brand-mark svg {
  width: 25px;
  height: 25px;
  stroke: var(--gold);
}

.scorecard-nine {
  display: grid;
  gap: var(--space-2);
  padding: 10px;
  border: 1px solid rgba(16, 44, 37, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.scorecard-nine-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  color: #194438;
  font-weight: 950;
  text-transform: uppercase;
}

.scorecard-nine-title strong {
  color: #102c25;
  font-size: 0.8rem;
}

.vertical-scorecard-grid {
  display: grid;
  gap: 3px;
}

.scorecard-grid-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 0.8fr 0.9fr 1fr 1fr;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(16, 44, 37, 0.11);
  border-radius: 7px;
  background: #f7f1e3;
  color: #101413;
  text-align: center;
}

.scorecard-grid-row span {
  min-width: 0;
  padding: 7px 4px;
  font-size: 0.82rem;
  font-weight: 800;
}

.scorecard-grid-row span:not(:last-child) {
  border-right: 1px solid rgba(16, 44, 37, 0.1);
}

.scorecard-grid-head,
.scorecard-grid-total {
  background: #194438;
  color: #f8f4ea;
}

.scorecard-grid-head span,
.scorecard-grid-total span {
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hole-number,
.gross-score {
  color: #102c25;
  font-weight: 950;
}

.net-score {
  display: inline-grid;
  min-width: 30px;
  margin: 0 auto;
  border-radius: 999px;
}

.net-under {
  color: #ffffff;
  background: #1f7a4d;
}

.net-par {
  color: #102c25;
  background: #d8b464;
}

.net-bogey {
  color: #ffffff;
  background: #7f7a6a;
}

.net-double {
  color: #ffffff;
  background: #b64d3f;
}

.net-unknown {
  color: #102c25;
  background: rgba(16, 44, 37, 0.1);
}

.marker-line {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px dashed rgba(16, 44, 37, 0.22);
  border-radius: 7px;
  color: rgba(16, 20, 19, 0.5);
  font-size: 0.8rem;
  font-weight: 800;
}

.scorecard-signoff {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.scorecard-signoff div {
  min-height: 56px;
  padding: 10px;
  border: 1px solid rgba(16, 44, 37, 0.14);
  border-radius: 8px;
  background: #ffffff;
}

.scorecard-signoff span {
  display: block;
  color: rgba(16, 20, 19, 0.58);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.scorecard-signoff strong {
  color: #102c25;
  font-size: 1.1rem;
}

.scorecard-note {
  margin-bottom: 0;
  color: rgba(16, 20, 19, 0.68);
  font-size: 0.82rem;
}

.match-card {
  display: grid;
  gap: var(--space-4);
  border-color: rgba(216, 180, 100, 0.5);
  background: #f8f4ea;
  color: #101413;
}

.match-list-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-color: rgba(216, 180, 100, 0.38);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  text-align: left;
}

.match-list-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-3);
}

.match-list-main h3,
.match-list-main p {
  margin: 0;
}

.match-list-score {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  text-align: right;
}

.match-list-score span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.match-list-score strong {
  color: var(--gold);
  font-size: 0.82rem;
}

.match-status-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(216, 180, 100, 0.12);
}

.match-status-dot.running {
  background: #47d16c;
  box-shadow: 0 0 0 4px rgba(71, 209, 108, 0.16), 0 0 16px rgba(71, 209, 108, 0.62);
  animation: running-pulse 1.4s ease-in-out infinite;
}

.match-status-dot.complete {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 180, 100, 0.16);
}

.match-detail-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(16, 44, 37, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #102c25;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.match-table {
  display: grid;
  gap: 6px;
}

.match-result-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1.5fr) 0.62fr 0.56fr 0.68fr 0.72fr;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(16, 44, 37, 0.12);
  border-radius: 8px;
  background: #f7f1e3;
  color: #101413;
}

.match-result-head {
  min-height: 36px;
  background: #194438;
  color: #f8f4ea;
  text-transform: uppercase;
}

.match-result-head span,
.match-result-head strong {
  color: inherit;
  font-size: 0.66rem;
}

.match-result-row span,
.match-result-row strong {
  min-width: 0;
}

.match-result-row strong:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-winner {
  margin: 0;
  color: #102c25;
  font-weight: 850;
}

.match-created-by {
  margin: 0;
  color: #6c715f;
  font-size: 0.76rem;
  font-weight: 750;
}

.match-share-block {
  display: grid;
  gap: var(--space-3);
}

.match-share-preview {
  max-height: 420px;
  object-fit: contain;
  background: transparent;
}

@keyframes running-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.22);
    opacity: 0.72;
  }
}

.ai-transition-screen {
  min-height: calc(100vh - 120px);
  align-content: center;
}

.ai-transition-card {
  text-align: left;
}

.loading-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(246, 242, 232, 0.12);
}

.loading-bar span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  animation: loading-sweep 1.2s ease-in-out infinite;
}

@keyframes loading-sweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(240%);
  }
}

.review-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.review-tab {
  min-height: 50px;
  border: 1px solid rgba(216, 180, 100, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.review-tab.active {
  border-color: rgba(216, 180, 100, 0.8);
  background: linear-gradient(180deg, #e1bf67, #b88e36);
  color: #071511;
  box-shadow: 0 12px 24px rgba(216, 180, 100, 0.18);
}

.detail-prompt {
  color: var(--sand);
  text-align: center;
}

.detail-prompt p {
  margin-bottom: 0;
}

.round-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  padding: 14px;
  box-shadow: none;
  text-align: left;
}

.round-row p {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.round-row-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 21px;
}

.round-exclusion-label {
  color: rgba(216, 180, 100, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
}

.round-exclusion-label:not(.is-visible) {
  opacity: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(216, 180, 100, 0.15);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.summary-text {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.5;
}

.bullet-list {
  margin: 0;
  padding-left: 20px;
  color: var(--sand);
  line-height: 1.58;
}

.bullet-list li + li {
  margin-top: var(--space-2);
}

.stats-overview-panel,
.analysis-panel,
.assessment-panel {
  display: grid;
  gap: var(--space-4);
}

.stats-overview-panel {
  justify-items: center;
  text-align: center;
}

.analysis-panel {
  justify-items: stretch;
  text-align: left;
}

.stats-overview-panel h2,
.stats-overview-panel h3,
.analysis-panel h3,
.assessment-panel h3 {
  margin-bottom: 0;
}

.analysis-panel .row,
.assessment-panel .row {
  align-items: flex-start;
}

.analysis-panel .stats-grid,
.stats-overview-panel .stats-grid {
  width: 100%;
  margin-top: 2px;
}

.analysis-panel p,
.assessment-panel p {
  margin-bottom: 0;
}

.analysis-panel .bullet-list {
  width: 100%;
  padding-left: 20px;
  list-style-position: outside;
  text-align: left;
}

.assessment-panel h3:not(:first-child) {
  margin-top: var(--space-2);
}

.share-panel {
  display: grid;
  gap: var(--space-4);
}

.share-panel p,
.share-panel h3 {
  margin-bottom: 0;
}

.share-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.share-grid,
.share-item {
  display: grid;
  gap: var(--space-4);
}

.share-item {
  min-width: 0;
}

.share-item > div {
  display: grid;
  gap: var(--space-2);
}

.share-preview {
  display: block;
  width: 100%;
  margin-top: var(--space-1);
  border: 1px solid rgba(216, 180, 100, 0.3);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.share-preview-scorecard {
  background: #f2f0e8;
}

.share-download {
  text-decoration: none;
}

.notice {
  padding: var(--space-3);
  border: 1px dashed rgba(216, 180, 100, 0.5);
  border-radius: 8px;
  color: var(--sand);
  background: rgba(216, 180, 100, 0.08);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 80;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(calc(100% - 32px), 420px);
  padding: 12px 14px;
  border: 1px solid rgba(216, 180, 100, 0.42);
  border-radius: 14px;
  background: rgba(19, 35, 30, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  color: var(--cream);
  transform: translateX(-50%);
}

.app-toast span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(216, 180, 100, 0.18);
  color: var(--gold);
  font-weight: 950;
}

.app-toast strong {
  min-width: 0;
  font-size: 0.95rem;
}

.app-toast.danger-toast {
  border-color: rgba(217, 120, 95, 0.5);
}

.app-toast.danger-toast span {
  background: rgba(217, 120, 95, 0.18);
  color: var(--danger);
}

.focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(3, 12, 10, 0.64);
}

.focus-sheet {
  width: min(100%, 520px);
  max-height: min(720px, calc(100dvh - 32px));
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(216, 180, 100, 0.48);
  border-radius: 18px;
  background: #13231e;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  overflow-y: auto;
}

.focus-sheet h2,
.focus-sheet p {
  margin: 0;
}

.delete-round-sheet {
  width: min(100%, 440px);
  gap: var(--space-4);
  border-color: rgba(216, 180, 100, 0.42);
}

.confirm-sheet {
  place-self: center;
  gap: var(--space-4);
}

.delete-round-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3);
  border: 1px solid rgba(246, 242, 232, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.delete-round-sheet > p:last-of-type {
  color: var(--sand);
  line-height: 1.45;
}

.delete-round-summary span {
  color: var(--muted);
}

.delete-round-summary strong {
  color: var(--cream);
}

.match-setup-backdrop {
  place-items: center;
  background: rgba(3, 12, 10, 0.66);
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
}

.match-setup-sheet {
  width: min(100%, 430px);
  max-height: min(720px, calc(100dvh - 32px));
  gap: 14px;
  overflow-y: auto;
  padding: 18px;
  border-color: rgba(216, 180, 100, 0.34);
  border-radius: 18px;
  background: #13231e;
}

.match-sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0;
}

.match-sheet-header h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.35rem, 6vw, 1.75rem);
  line-height: 1.12;
}

.match-sheet-header p:not(.eyebrow) {
  color: var(--muted);
}

.match-format-badge {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(216, 180, 100, 0.58);
  border-radius: 999px;
  background: rgba(251, 245, 224, 0.1);
  color: var(--gold);
  font-weight: 950;
}

.match-sheet-summary {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.match-sheet-summary span {
  color: var(--sand);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.match-sheet-summary strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.match-choice-buttons,
.match-action-grid {
  display: grid;
  gap: 12px;
  padding: 0;
}

.match-choice-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.match-action-card {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--ink);
  text-align: left;
}

.match-action-card.primary {
  border-color: rgba(216, 180, 100, 0.64);
  background:
    linear-gradient(135deg, rgba(216, 180, 100, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
}

.match-action-card span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(216, 180, 100, 0.16);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.match-action-card strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.match-action-card small,
.match-code-entry p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.4;
}

.match-sheet-help {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.match-code-entry {
  display: grid;
  gap: var(--space-2);
  padding: 0;
}

.match-code-input {
  min-height: 62px;
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-align: center;
}

.match-sheet-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-3);
  padding: 0;
}

.match-setup-sheet .danger-notice {
  margin: 0;
}

.text-button {
  min-height: 44px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--sand);
  font-weight: 850;
}

@media (max-width: 520px) {
  .focus-sheet {
    width: min(100%, 390px);
    max-height: calc(100dvh - 28px);
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
  }

  .delete-round-sheet h2,
  .confirm-sheet h2 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
    line-height: 1.04;
  }

  .delete-round-summary {
    padding: 14px;
  }

  .match-setup-backdrop {
    padding-inline: 12px;
  }

  .match-setup-sheet {
    width: min(100%, 390px);
    max-height: calc(100dvh - 28px);
    padding: 16px;
    border-radius: 16px;
  }

  .match-choice-buttons {
    grid-template-columns: 1fr;
  }

  .match-action-card {
    padding: 13px;
  }

  .match-sheet-actions {
    grid-template-columns: 1fr;
  }
}

.match-link-box {
  display: grid;
  gap: var(--space-2);
}

.match-created-backdrop {
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
}

.match-created-sheet {
  place-self: center;
  width: min(100%, 410px);
  max-height: calc(100dvh - 32px);
  gap: 14px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 18px;
}

.match-joined-sheet {
  width: min(100%, 360px);
  gap: 16px;
}

.match-created-header {
  display: grid;
  gap: 4px;
}

.match-created-header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 7vw, 2rem);
  line-height: 1.05;
}

.match-created-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.match-code-panel {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(246, 242, 232, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.match-code-panel span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.match-code-panel {
  border-color: rgba(216, 180, 100, 0.5);
  background: rgba(216, 180, 100, 0.12);
}

.match-share-url {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(246, 242, 232, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.match-share-url span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.match-share-url code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.3;
}

.match-created-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.match-joined-confirmation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(216, 180, 100, 0.28);
  border-radius: 12px;
  background: rgba(216, 180, 100, 0.08);
}

.match-joined-confirmation span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: rgba(216, 180, 100, 0.18);
  color: var(--gold);
  font-weight: 950;
}

.match-joined-confirmation strong {
  min-width: 0;
  color: var(--cream);
  font-size: 1rem;
  line-height: 1.25;
}

.button-row {
  display: grid;
  gap: var(--space-3);
}

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

.danger {
  color: var(--danger);
}

.hide {
  display: none !important;
}

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

@media (max-width: 520px) {
  .scorecard-signoff {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
