:root {
  color-scheme: light;
  --ink: #071322;
  --soft-ink: #1f2937;
  --muted: #6d7480;
  --paper: #f7f8f6;
  --panel: #ffffff;
  --panel-warm: #fbfcfa;
  --line: #e3e7e4;
  --line-strong: #cfd8d1;
  --action: #159947;
  --action-dark: #087a33;
  --green: #2bbf5b;
  --mint: #e8f7ec;
  --amber: #ffad3d;
  --coral: #ff6647;
  --blue-soft: #eef4ff;
  --shadow: 0 1.1rem 2.75rem rgba(7, 19, 34, 0.08);
  --shadow-soft: 0 0.5rem 1.35rem rgba(7, 19, 34, 0.06);
  --radius: 0.5rem;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 0%, rgba(43, 191, 91, 0.08), transparent 30rem),
    linear-gradient(180deg, #fbfcfa 0%, var(--paper) 100%);
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
}

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

button,
select,
input {
  min-height: 2.9rem;
}

button {
  border: 1px solid var(--action);
  border-radius: var(--radius);
  background: var(--action);
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
  padding: 0.72rem 1rem;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover,
button:focus-visible {
  background: var(--action-dark);
  border-color: var(--action-dark);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(43, 191, 91, 0.25);
  outline-offset: 2px;
}

button:disabled {
  border-color: #d9dfdb;
  background: #e8ece9;
  color: #87918c;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

button.danger {
  border-color: var(--coral);
  background: var(--coral);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0.72rem 0.85rem;
}

input::placeholder,
textarea::placeholder {
  color: #98a29d;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.82rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: 1.35rem;
  font-weight: 900;
}

h2 {
  font-size: 2rem;
  font-weight: 900;
}

h3 {
  font-size: 1.05rem;
  font-weight: 900;
}

.app-shell {
  display: grid;
  gap: 0.9rem;
  min-height: 100vh;
  padding: 0.75rem;
}

.sidebar {
  order: 1;
  align-content: start;
  display: grid;
  gap: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.workspace {
  order: 2;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.2rem 0.55rem;
}

.eyebrow {
  color: var(--action);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-section {
  display: grid;
  gap: 0.45rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--line);
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
}

.nav-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.85rem;
  border: 0;
  background: transparent;
  color: var(--soft-ink);
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 850;
  padding: 0.45rem 0.65rem;
  text-align: left;
}

.nav-item:hover,
.nav-item:focus-visible {
  border-color: transparent;
  background: var(--paper);
  box-shadow: none;
  color: var(--ink);
  transform: none;
}

.nav-item.is-active {
  background: var(--mint);
  color: var(--action-dark);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 950;
}

.nav-item.is-active .nav-icon {
  border-color: rgba(21, 153, 71, 0.22);
  background: #ffffff;
  color: var(--action);
}

.brand-lockup h1 strong {
  color: var(--action);
}

.brand-lockup h1 span {
  color: var(--ink);
}

.sidebar label {
  color: var(--soft-ink);
}

.sidebar input,
.sidebar select {
  border-color: var(--line);
  background: var(--panel-warm);
}

.sidebar button {
  border-color: var(--ink);
  background: var(--ink);
}

.sidebar .nav-item {
  border-color: transparent;
  background: transparent;
  color: var(--soft-ink);
}

.sidebar .nav-item:hover,
.sidebar .nav-item:focus-visible {
  border-color: transparent;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.sidebar .nav-item.is-active {
  background: var(--mint);
  color: var(--action-dark);
}

.sidebar .nav-item.is-active:hover,
.sidebar .nav-item.is-active:focus-visible {
  background: var(--mint);
  color: var(--action-dark);
}

.inline-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.invite-code {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mint);
  color: #0a5f43;
  font-size: 0.875rem;
  font-weight: 950;
  padding: 0.35rem 0.6rem;
}

.topbar {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.topbar-actions button {
  min-height: 2.65rem;
  padding-inline: 1rem;
}

.notification-pill {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--coral);
  font-weight: 950;
  box-shadow: var(--shadow-soft);
}

.avatar-pill {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 950;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-soft);
  color: #14437c;
  font-size: 0.875rem;
  font-weight: 900;
  padding: 0.35rem 0.65rem;
}

.panel {
  padding: 1rem;
}

.dashboard-grid,
.my-golf-grid,
.round-form,
.scorecard-workflow,
.settings-grid {
  display: grid;
  gap: 1rem;
}

.api-key-strip,
.capture-panel,
.confirmation-form,
.dashboard-card,
.metric,
.profile-panel,
.round-record {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.metric,
.dashboard-card,
.profile-panel,
.round-record {
  box-shadow: var(--shadow-soft);
}

.dashboard-layout {
  display: grid;
  gap: 1rem;
}

.dashboard-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.next-rail {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.next-rail .dashboard-card {
  gap: 0.75rem;
}

.support-card {
  background: var(--panel-warm);
}

.player-list {
  display: grid;
}

.player-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}

.player-row:first-child {
  border-top: 0;
}

.player-row h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.player-row p {
  color: var(--muted);
  font-size: 0.875rem;
}

.player-avatar {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: var(--radius);
  background: var(--mint);
  color: var(--action-dark);
  font-weight: 950;
}

.player-meta {
  display: grid;
  gap: 0.1rem;
  border-top: 1px solid var(--line);
  grid-column: span 2;
  padding-top: 0.65rem;
}

.player-meta span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.player-meta strong {
  color: var(--ink);
  font-size: 1rem;
}

.api-key-strip {
  align-items: end;
  background: var(--panel-warm);
}

.key-status {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 900;
}

.capture-panel {
  overflow: hidden;
  border-color: #091527;
  background:
    linear-gradient(135deg, rgba(43, 191, 91, 0.2), transparent 56%),
    linear-gradient(135deg, #071322 0%, #0c2137 100%);
  color: #ffffff;
}

.capture-panel label,
.capture-panel .photo-picker span {
  color: #ffffff;
}

.capture-panel input {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.capture-grid {
  display: grid;
  gap: 0.75rem;
}

.photo-picker input {
  min-height: 3rem;
}

.capture-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.scorecard-drop,
.scorecard-empty {
  min-height: 12rem;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-weight: 900;
  text-align: center;
  padding: 1rem;
}

.scorecard-empty {
  background: var(--panel-warm);
  color: var(--muted);
}

.capture-panel .scorecard-drop {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
}

.scorecard-preview-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-warm);
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  padding: 0.75rem;
}

.scorecard-preview-grid {
  display: grid;
  gap: 0.75rem;
}

.scorecard-preview {
  width: 100%;
  max-height: 24rem;
  border-radius: calc(var(--radius) - 0.15rem);
  object-fit: contain;
  background: #eef3f0;
}

.scorecard-file-meta,
.ai-status,
.review-notes,
.unmatched-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.scorecard-file-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}

.scorecard-file-meta strong {
  color: var(--ink);
}

.ai-status {
  border: 1px solid #bce6c8;
  border-radius: var(--radius);
  background: var(--mint);
  color: #0b6730;
  font-weight: 900;
  padding: 0.75rem;
}

.ai-status.is-error {
  border-color: rgba(255, 102, 71, 0.45);
  background: #fff1ed;
  color: #a53624;
}

.attempt-pill,
.review-notes span,
.unmatched-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 900;
  padding: 0.35rem 0.65rem;
}

.attempt-pill.is-ok {
  border-color: rgba(15, 138, 95, 0.35);
  color: var(--green);
}

.attempt-pill.is-error,
.review-notes span {
  border-color: rgba(255, 102, 71, 0.38);
  color: #a53624;
}

.review-notes {
  border: 1px solid rgba(255, 102, 71, 0.26);
  border-radius: var(--radius);
  background: #fff6f3;
  padding: 0.75rem;
}

.unmatched-list {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.metric {
  position: relative;
  min-height: 6.2rem;
  align-content: center;
}

.metric::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0.42rem var(--mint);
}

.metric span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 900;
}

.metric strong {
  font-size: 1.85rem;
  font-weight: 950;
  line-height: 1.1;
}

.metric span,
.metric strong {
  margin-left: 1.45rem;
}

.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.add-player {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-wrap table {
  background: #ffffff;
}

.compact table {
  min-width: 36rem;
}

.result-grid {
  display: grid;
  gap: 1rem;
}

.whatsapp-box {
  min-height: 15rem;
  resize: vertical;
  white-space: pre-wrap;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.segmented legend {
  color: var(--muted);
  font-weight: 900;
  padding: 0 0 0.35rem;
}

.segmented label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0.65rem 0.75rem;
}

.segmented label:has(input:checked) {
  border-color: var(--green);
  background: var(--mint);
}

.segmented input {
  width: auto;
  min-height: 1rem;
}

.process-step {
  display: grid;
  gap: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 950;
}

.handicap-mode-block {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.handicap-mode-block legend {
  color: var(--muted);
  font-weight: 900;
  padding: 0 0 0.1rem;
}

.mode-option {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0.75rem;
}

.mode-option:has(input:checked) {
  border-color: var(--action);
  background: var(--blue-soft);
}

.mode-option input {
  width: auto;
  min-height: 1rem;
}

.mode-option span,
.handicap-entry span,
.score-entry span {
  display: grid;
}

.mode-option small,
.handicap-entry small,
.score-entry small {
  color: var(--muted);
  font-size: 0.875rem;
}

.handicap-entry-list,
.score-entry-list {
  display: grid;
  gap: 0.75rem;
}

.handicap-mode-block .handicap-entry-list {
  display: none;
}

.handicap-mode-block:has(input[value="aus_social"]:checked) .handicap-entry-list {
  display: grid;
}

.handicap-entry,
.score-entry {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-warm);
  color: var(--ink);
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.primary-action {
  min-width: 10rem;
}

.round-list {
  display: grid;
  gap: 1rem;
}

.round-record-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.settings-actions {
  display: grid;
  gap: 0.75rem;
}

.definition-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.definition-list div {
  display: grid;
  gap: 0.2rem;
}

.definition-list dt {
  color: var(--muted);
  font-weight: 900;
}

.definition-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-warm);
  color: var(--muted);
  font-weight: 900;
  padding: 1.5rem;
  text-align: center;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  max-width: min(24rem, calc(100vw - 2rem));
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .inline-control {
    grid-template-columns: 1fr auto;
  }

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

  .player-row {
    grid-template-columns: auto minmax(0, 1fr) 5.5rem 5.5rem;
  }

  .player-meta {
    border-top: 0;
    grid-column: auto;
    padding-top: 0;
  }

  .result-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .add-player {
    grid-template-columns: minmax(10rem, 1fr) 7rem auto;
  }

  .api-key-strip {
    grid-template-columns: minmax(12rem, 1fr) auto auto;
  }

  .capture-grid {
    align-items: end;
    grid-template-columns: minmax(14rem, 1fr) auto;
  }

  .capture-actions {
    grid-template-columns: auto auto;
  }

  .handicap-entry,
  .score-entry {
    grid-template-columns: minmax(10rem, 1fr) 9rem;
  }

  .round-record-head,
  .topbar,
  .section-head {
    align-items: center;
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: minmax(10rem, 0.6fr) minmax(14rem, 1fr) minmax(18rem, 1fr);
  }

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

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.55fr);
  }
}

@media (min-width: 1024px) {
  .app-shell {
    grid-template-columns: 14.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.36fr);
  }

  .sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
  }

  .topbar,
  .panel {
    padding: 1.15rem;
  }

}

/* BlockReady-inspired product polish */
html {
  background: #f6f8f7;
}

body {
  color: #111827;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 248, 247, 0.92)),
    #f6f8f7;
}

button {
  border-radius: 0.45rem;
  font-weight: 850;
}

.app-shell {
  gap: 1rem;
  padding: 0.9rem;
}

.sidebar,
.workspace,
.dashboard-card,
.metric,
.profile-panel,
.round-record,
.api-key-strip,
.capture-panel,
.confirmation-form {
  border-radius: 0.5rem;
}

.sidebar {
  gap: 1rem;
  border-color: #e6ebe7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.85rem 2.25rem rgba(15, 23, 42, 0.05);
  padding: 1.05rem;
}

.sidebar-account {
  display: grid;
  gap: 0.65rem;
  border: 1px solid #edf1ee;
  border-radius: 0.5rem;
  background: #fbfcfb;
  padding: 0.8rem;
}

.sidebar-account strong {
  overflow: hidden;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-kicker {
  color: #159947;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.workspace {
  border-color: #e5e9e6;
  background: #ffffff;
  box-shadow: 0 1rem 2.6rem rgba(15, 23, 42, 0.07);
}

.brand-lockup {
  padding: 0.35rem 0.25rem 0.9rem;
}

.brand-wordmark {
  font-size: 1.38rem;
  letter-spacing: 0;
}

.brand-wordmark span {
  color: #111827;
}

.brand-wordmark strong {
  color: #21a64b;
}

.sidebar-nav {
  gap: 0.28rem;
}

.nav-item {
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.65rem;
  min-height: 2.75rem;
  border-radius: 0.45rem;
  color: #4b5563;
  font-size: 0.88rem;
  padding: 0.45rem 0.65rem;
}

.nav-item:hover,
.nav-item:focus-visible {
  background: #f3f6f4;
}

.nav-item.is-active,
.sidebar .nav-item.is-active,
.sidebar .nav-item.is-active:hover,
.sidebar .nav-item.is-active:focus-visible {
  background: #eaf7ee;
  color: #10813a;
}

.nav-icon {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7b8794;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
}

.nav-item.is-active .nav-icon {
  color: #159947;
}

.nav-item[data-tab="my"] .nav-icon::before {
  inset: 0.18rem;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}

.nav-item[data-tab="my"] .nav-icon::after {
  left: 0.47rem;
  top: 0.46rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: currentColor;
}

.nav-item[data-tab="dashboard"] .nav-icon::before {
  inset: 0.14rem;
  border: 1.7px solid currentColor;
  border-radius: 0.24rem;
}

.nav-item[data-tab="dashboard"] .nav-icon::after {
  left: 0.36rem;
  top: 0.36rem;
  width: 0.52rem;
  height: 0.52rem;
  border-top: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
}

.nav-item[data-tab="round"] .nav-icon::before,
.nav-item[data-tab="history"] .nav-icon::before,
.nav-item[data-tab="courses"] .nav-icon::before,
.nav-item[data-tab="settings"] .nav-icon::before {
  inset: 0.18rem 0.26rem;
  border: 1.7px solid currentColor;
  border-radius: 0.22rem;
}

.nav-item[data-tab="round"] .nav-icon::after {
  left: 0.42rem;
  top: 0.5rem;
  width: 0.42rem;
  border-top: 1.7px solid currentColor;
  box-shadow: 0 0.25rem 0 currentColor;
}

.nav-item[data-tab="history"] .nav-icon::after {
  left: 0.39rem;
  top: 0.42rem;
  width: 0.48rem;
  height: 0.32rem;
  border-left: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
}

.nav-item[data-tab="courses"] .nav-icon::after {
  left: 0.39rem;
  top: 0.38rem;
  width: 0.45rem;
  border-top: 1.7px solid currentColor;
  box-shadow: 0 0.25rem 0 currentColor, 0 0.5rem 0 currentColor;
}

.nav-item[data-tab="settings"] .nav-icon::before {
  border-radius: 999px;
}

.nav-item[data-tab="settings"] .nav-icon::after {
  left: 0.5rem;
  top: 0.5rem;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 999px;
  background: currentColor;
}

.sidebar-divider {
  background: #edf1ee;
}

.sidebar-section {
  gap: 0.4rem;
}

.sidebar-section label,
.sidebar label {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sidebar input,
.sidebar select {
  min-height: 2.55rem;
  border-color: #e3e8e4;
  background: #fbfcfb;
  font-size: 0.9rem;
  padding: 0.62rem 0.7rem;
}

.sidebar button {
  min-height: 2.55rem;
  border-color: #071322;
  background: #071322;
  padding: 0.6rem 0.78rem;
}

.invite-code {
  background: #eaf7ee;
  color: #0b7132;
  font-size: 0.78rem;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid #edf0ed;
  background: #ffffff;
  padding: 1.2rem;
}

.topbar h2 {
  color: #111827;
  font-size: 1.8rem;
  font-weight: 900;
}

.topbar .eyebrow {
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.add-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.55rem;
  border-color: #159947;
  background: #159947;
  box-shadow: 0 0.45rem 1rem rgba(21, 153, 71, 0.16);
}

.add-action span {
  font-size: 1.05rem;
  line-height: 1;
}

.notification-pill {
  position: relative;
  width: 2.55rem;
  height: 2.55rem;
  border-color: #e5e9e6;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.notification-pill::before {
  content: "";
  width: 0.72rem;
  height: 0.82rem;
  border: 1.7px solid #6b7280;
  border-radius: 0.45rem 0.45rem 0.28rem 0.28rem;
}

.notification-pill::after {
  content: "";
  position: absolute;
  top: 0.62rem;
  right: 0.66rem;
  width: 0.46rem;
  height: 0.46rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ff6647;
}

.avatar-pill {
  width: 2.55rem;
  height: 2.55rem;
  background: #111827;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.12);
}

.panel {
  padding: 1.2rem;
  background: #ffffff;
}

.metric-row {
  grid-template-columns: repeat(auto-fit, minmax(11.75rem, 1fr));
  gap: 0.85rem;
}

.metric {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 6.35rem;
  border-color: #e7ebe8;
  background: #ffffff;
  box-shadow: 0 0.65rem 1.6rem rgba(15, 23, 42, 0.055);
  padding: 1rem;
}

.metric::before {
  content: none;
}

.metric span,
.metric strong {
  margin-left: 0;
}

.metric-icon {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--metric-bg, #eaf7ee);
  color: var(--metric-accent, #159947);
}

.metric-icon::before {
  content: "";
  position: absolute;
  inset: 0.66rem;
  border: 2px solid currentColor;
  border-radius: 0.28rem;
}

.metric-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.metric-copy strong {
  overflow: hidden;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-copy span {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 850;
}

.metric-copy small {
  overflow: hidden;
  color: #8b949e;
  font-size: 0.76rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-green {
  --metric-accent: #159947;
  --metric-bg: #e8f7ec;
}

.metric-violet {
  --metric-accent: #8b5cf6;
  --metric-bg: #f1ecff;
}

.metric-amber {
  --metric-accent: #f59e0b;
  --metric-bg: #fff3dc;
}

.metric-blue {
  --metric-accent: #3b82f6;
  --metric-bg: #eaf2ff;
}

.dashboard-layout {
  gap: 1rem;
}

.dashboard-card {
  border-color: #e7ebe8;
  background: #ffffff;
  box-shadow: 0 0.65rem 1.7rem rgba(15, 23, 42, 0.055);
  padding: 1rem;
}

.section-head {
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.section-head h3 {
  color: #111827;
  font-size: 1rem;
}

.section-head p {
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 700;
  margin-top: 0.18rem;
}

.status-pill {
  width: fit-content;
  border-radius: 999px;
  background: #e8f7ec;
  color: #10813a;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.35rem 0.65rem;
}

.ghost-button {
  min-height: 2.35rem;
  border-color: #cfe8d6;
  background: #ffffff;
  color: #159947;
  box-shadow: none;
  padding: 0.55rem 0.75rem;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: #9fd6ae;
  background: #f2fbf4;
  color: #087a33;
  box-shadow: none;
}

.personal-summary {
  display: grid;
  gap: 1rem;
}

.profile-avatar-large {
  display: grid;
  place-items: center;
  width: 5.35rem;
  height: 5.35rem;
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 52%),
    #e8f7ec;
  color: #10813a;
  font-size: 1.55rem;
  font-weight: 950;
}

.definition-list {
  gap: 0.6rem;
}

.definition-list div {
  grid-template-columns: minmax(7rem, 0.55fr) minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #edf1ee;
  padding-bottom: 0.55rem;
}

.definition-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.definition-list dt {
  color: #6b7280;
  font-size: 0.82rem;
}

.definition-list dd {
  color: #111827;
  font-weight: 850;
}

.compact-list div {
  grid-template-columns: 1fr;
  gap: 0.12rem;
}

.round-row-list,
.result-row-list,
.player-list {
  display: grid;
}

.round-row,
.result-row,
.player-row {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid #edf1ee;
  padding: 0.9rem 0;
}

.round-row:first-child,
.result-row:first-child,
.player-row:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

.round-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.result-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.player-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.score-thumb,
.result-rank,
.player-avatar {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.5rem;
  background: #f0f7f2;
  color: #159947;
  font-weight: 950;
}

.result-rank {
  width: 2.4rem;
  height: 2.4rem;
  background: #f3f6f4;
  color: #6b7280;
}

.round-row h4,
.result-row h4,
.player-row h4 {
  margin: 0;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 900;
}

.round-row p,
.result-row p,
.player-row p {
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 0.12rem;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.row-badges span {
  border-radius: 999px;
  background: #f3f6f4;
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 0.25rem 0.5rem;
}

.round-row-value,
.player-meta {
  display: grid;
  justify-items: end;
  gap: 0.08rem;
}

.round-row-value span,
.player-meta span {
  color: #8b949e;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.round-row-value strong,
.player-meta strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
}

.player-meta {
  border-top: 0;
  grid-column: span 2;
  justify-items: start;
  padding-top: 0;
}

.add-player {
  align-items: center;
  border-top: 1px solid #edf1ee;
  margin-top: 0.65rem;
  padding-top: 0.9rem;
}

.add-player input {
  min-height: 2.55rem;
  background: #fbfcfb;
}

.add-player button {
  min-height: 2.55rem;
  padding: 0.6rem 0.85rem;
}

.next-rail {
  gap: 1rem;
}

.next-rail .dashboard-card {
  gap: 0.65rem;
}

.rail-action {
  position: relative;
  width: 100%;
  min-height: 3.15rem;
  border-color: #edf1ee;
  background: #ffffff;
  color: #111827;
  box-shadow: none;
  font-size: 0.9rem;
  padding: 0.75rem 2rem 0.75rem 0.85rem;
  text-align: left;
}

.rail-action::after {
  content: ">";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  color: #9aa3ad;
  transform: translateY(-50%);
}

.rail-action:hover,
.rail-action:focus-visible {
  border-color: #d9e7dd;
  background: #f8fbf9;
  color: #087a33;
  box-shadow: none;
  transform: none;
}

.rail-action-primary {
  border-color: #071322;
  background: #071322;
  color: #ffffff;
}

.rail-action-primary::after {
  color: rgba(255, 255, 255, 0.72);
}

.rail-action-primary:hover,
.rail-action-primary:focus-visible {
  border-color: #0f2238;
  background: #0f2238;
  color: #ffffff;
}

.support-card {
  background: #fbfcfb;
}

.settings-form {
  display: grid;
  gap: 0.55rem;
  border-top: 1px solid #edf1ee;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.settings-form:first-of-type {
  margin-top: 0.85rem;
}

.whatsapp-box {
  min-height: 13rem;
  border-color: #e4e9e6;
  background: #ffffff;
  font-size: 0.9rem;
}

.weekly-report-box {
  min-height: 26rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  line-height: 1.45;
}

.api-key-strip {
  border-color: #e7ebe8;
  background: #fbfcfb;
  box-shadow: 0 0.65rem 1.7rem rgba(15, 23, 42, 0.045);
}

.capture-panel {
  border-color: #071322;
  background:
    linear-gradient(90deg, rgba(43, 191, 91, 0.23) 0 0.32rem, transparent 0.32rem 100%),
    linear-gradient(135deg, rgba(43, 191, 91, 0.13), transparent 48%),
    #071322;
  box-shadow: 0 1rem 2.4rem rgba(7, 19, 34, 0.12);
}

.scorecard-preview-shell {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.scorecard-file-meta strong {
  color: #ffffff;
}

.scorecard-file-meta {
  color: rgba(255, 255, 255, 0.74);
}

.confirmation-form,
.round-record {
  border-color: #e7ebe8;
  box-shadow: 0 0.65rem 1.7rem rgba(15, 23, 42, 0.055);
}

.process-step {
  border-top-color: #edf1ee;
}

.step-number {
  background: #071322;
}

.mode-option:has(input:checked),
.segmented label:has(input:checked) {
  border-color: #9dd8ac;
  background: #eaf7ee;
}

.table-wrap {
  border-color: #e7ebe8;
}

th {
  color: #6b7280;
  font-size: 0.78rem;
}

td {
  color: #111827;
}

.empty-state {
  border-color: #dfe7e2;
  background: #fbfcfb;
  color: #7b8794;
}

@media (min-width: 640px) {
  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-summary {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .player-row {
    grid-template-columns: auto minmax(0, 1fr) 5.4rem 5.4rem;
  }

  .player-meta {
    grid-column: auto;
    justify-items: end;
  }

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

/* Final crisp typography pass */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: var(--font-ui);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

/* Live round mobile hardening: drawer corrections + compact in-play surfaces. */
.live-correction-trigger,
.live-correction-drawer-backdrop {
  display: none;
}

.live-correction-inline {
  display: grid;
  gap: 0.52rem;
}

.live-score-sheet-backdrop,
.live-correction-drawer-backdrop {
  overscroll-behavior: contain;
}

@media (max-width: 639px) {
  .app-shell.is-live-play {
    padding-bottom: 0;
  }

  .app-shell.is-live-play .workspace {
    min-height: 100dvh;
    background: #050908;
  }

  .app-shell.is-live-play .topbar,
  .app-shell.is-live-play .view-hero {
    display: none;
  }

  .app-shell.is-live-play .panel {
    min-height: 100dvh;
    overflow: visible;
    padding: 0;
  }

  .live-round-tracker,
  .live-round-tracker * {
    box-sizing: border-box;
    min-width: 0;
  }

  .live-round-tracker {
    gap: clamp(0.44rem, 1.8vw, 0.62rem);
    min-height: 100dvh;
    overflow: visible;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    padding: clamp(0.44rem, 1.8vw, 0.62rem);
  }

  .live-round-top {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.48rem;
    padding-bottom: 0.52rem;
  }

  .live-back-button {
    width: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    border-radius: 0.62rem;
    font-size: 0.86rem;
  }

  .live-round-top h3 {
    font-size: clamp(0.95rem, 4.6vw, 1.08rem);
    line-height: 1.08;
  }

  .live-round-top p:not(.eyebrow) {
    font-size: clamp(0.68rem, 3.2vw, 0.76rem);
    line-height: 1.2;
  }

  .live-round-top .eyebrow {
    font-size: 0.62rem;
  }

  .live-round-meter {
    min-height: 2.45rem;
    border-radius: 0.72rem;
    padding: 0.42rem 0.58rem;
  }

  .live-round-meter span {
    font-size: 0.66rem;
  }

  .live-round-meter strong {
    font-size: 0.92rem;
  }

  .live-round-top .ghost-button {
    min-height: 2.45rem;
    border-radius: 0.72rem;
    font-size: 0.9rem;
  }

  .live-score-board {
    gap: 0.36rem;
  }

  .live-player-row {
    grid-template-columns: minmax(0, 1fr) clamp(2.35rem, 11.4vw, 2.85rem) clamp(2.35rem, 11.4vw, 2.85rem);
    gap: 0.4rem;
    min-height: clamp(4.05rem, 13.6vw, 4.8rem);
    border-radius: 0.78rem;
    padding: 0.5rem;
  }

  .live-player-name strong {
    font-size: clamp(0.92rem, 4.2vw, 1.08rem);
  }

  .live-player-name small {
    font-size: clamp(0.64rem, 3vw, 0.74rem);
    line-height: 1.18;
  }

  .live-total,
  .live-current-score {
    width: clamp(2.28rem, 10.8vw, 2.72rem);
    height: clamp(2.28rem, 10.8vw, 2.72rem);
    font-size: clamp(0.86rem, 4.4vw, 1.08rem);
  }

  .live-current-term {
    max-width: 5.9rem;
    font-size: clamp(0.58rem, 2.9vw, 0.66rem);
  }

  .live-game-panel,
  .skins-panel {
    gap: 0.44rem;
    border-radius: 0.82rem;
    padding: 0.55rem;
  }

  .live-game-panel-head {
    gap: 0.45rem;
  }

  .live-game-panel-head h3,
  .skins-panel-head h3 {
    font-size: clamp(0.92rem, 4vw, 1rem);
  }

  .live-game-panel-head p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .live-game-panel-head > span,
  .skins-panel-head > span {
    font-size: 0.64rem;
    padding: 0.26rem 0.42rem;
  }

  .live-game-explainer {
    display: none;
  }

  .live-game-rank-list,
  .skins-hole-status-list,
  .skins-leaderboard {
    gap: 0.32rem;
  }

  .live-game-rank-list div,
  .skins-hole-status-list div,
  .skins-leaderboard div {
    min-height: 2.46rem;
    border-radius: 0.62rem;
    padding: 0.38rem 0.48rem;
  }

  .live-game-rank-list span,
  .skins-hole-status-list strong {
    width: 1.72rem;
    height: 1.72rem;
    font-size: 0.78rem;
  }

  .live-game-storage-note {
    border-radius: 0.68rem;
    padding: 0.48rem 0.54rem;
  }

  .live-game-storage-note strong {
    font-size: 0.78rem;
    line-height: 1.18;
  }

  .live-correction-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }

  .live-correction-inline {
    display: none;
  }

  .live-correction-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.58rem;
    align-items: center;
    width: 100%;
    min-height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    box-shadow: none;
    padding: 0.58rem 0.68rem;
    text-align: left;
  }

  .live-correction-trigger span {
    display: grid;
    gap: 0.06rem;
  }

  .live-correction-trigger strong {
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .live-correction-trigger small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.68rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .live-correction-trigger em {
    border: 1px solid rgba(41, 217, 116, 0.24);
    border-radius: 999px;
    background: rgba(41, 217, 116, 0.12);
    color: #8ff0ab;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 880;
    padding: 0.26rem 0.48rem;
  }

  .live-correction-panel.is-open .live-correction-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 78;
    display: grid;
    align-items: end;
    background: rgba(0, 0, 0, 0.48);
    padding: 0.48rem 0.48rem calc(4.6rem + env(safe-area-inset-bottom));
  }

  .app-shell.is-live-play .live-correction-panel.is-open .live-correction-drawer-backdrop {
    padding: 0.48rem 0.48rem calc(0.48rem + env(safe-area-inset-bottom));
  }

  .live-correction-drawer {
    display: grid;
    gap: 0.55rem;
    width: 100%;
    max-height: min(82dvh, 42rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    background: rgba(5, 9, 8, 0.98);
    box-shadow: 0 -1.2rem 3rem rgba(0, 0, 0, 0.38);
    padding: 0.62rem;
  }

  .live-correction-drawer-handle {
    justify-self: center;
    width: 3.2rem;
    height: 0.3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
  }

  .live-correction-drawer-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.58rem;
    align-items: center;
  }

  .live-correction-drawer-head div {
    display: grid;
    gap: 0.08rem;
  }

  .live-correction-drawer-head span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.68rem;
    font-weight: 830;
    text-transform: uppercase;
  }

  .live-correction-drawer-head strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .live-correction-drawer-head button {
    min-height: 2.28rem;
    border-color: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: none;
    font-size: 0.78rem;
    padding: 0.35rem 0.72rem;
  }

  .live-correction-drawer .live-score-matrix {
    max-height: calc(82dvh - 5.4rem);
    overflow: auto;
    padding-bottom: 0.18rem;
  }

  .live-score-matrix-row {
    grid-template-columns: minmax(4.75rem, 5.2rem);
    grid-auto-columns: 2.22rem;
    gap: 0.26rem;
  }

  .live-score-matrix-row > strong,
  .live-score-matrix-head > span {
    border-radius: 0.52rem;
    font-size: 0.72rem;
    padding: 0.48rem 0.46rem;
  }

  .live-score-matrix button {
    min-height: 2.28rem;
    border-radius: 0.52rem;
    font-size: 0.76rem;
  }

  .live-hole-bar {
    gap: 0.34rem;
    border-radius: 0.78rem;
    padding: 0.28rem;
  }

  .live-hole-bar button {
    min-width: 3.95rem;
    min-height: 2.48rem;
    border-radius: 0.68rem;
    font-size: 0.82rem;
    padding: 0.36rem 0.52rem;
  }

  .live-hole-bar span {
    font-size: 0.66rem;
  }

  .live-hole-bar strong {
    font-size: 1.08rem;
  }

  .live-hole-strip {
    grid-auto-columns: minmax(3.18rem, 1fr);
    gap: 0.32rem;
  }

  .live-hole-strip button {
    min-height: 3rem;
    border-radius: 0.72rem;
  }

  .live-hole-strip span {
    font-size: 0.92rem;
  }

  .live-hole-strip small {
    font-size: 0.62rem;
  }

  .live-open-score-sheet {
    min-height: 3rem;
    border-radius: 0.78rem;
    font-size: 0.88rem;
    padding: 0.62rem 0.72rem;
  }

  .live-open-score-sheet span {
    font-size: 0.72rem;
  }

  .live-score-sheet-backdrop {
    z-index: 82;
    align-items: end;
    background: rgba(0, 0, 0, 0.48);
    padding: 0.42rem 0.42rem calc(4.45rem + env(safe-area-inset-bottom));
  }

  .app-shell.is-live-play .live-score-sheet-backdrop {
    padding: 0.42rem 0.42rem calc(0.42rem + env(safe-area-inset-bottom));
  }

  .live-score-sheet {
    width: 100%;
    max-width: none;
  }

  .live-score-sheet .live-keypad-panel {
    max-height: min(88dvh, calc(100dvh - 5.2rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 1rem;
    padding: 0.52rem;
  }

  .app-shell.is-live-play .live-score-sheet .live-keypad-panel {
    max-height: calc(100dvh - 0.9rem);
  }

  .live-score-player-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.34rem;
  }

  .live-score-player-chip {
    min-height: 3rem;
    border-radius: 0.68rem;
    padding: 0.42rem;
  }

  .live-score-player-chip strong {
    font-size: 0.78rem;
  }

  .live-score-player-chip span {
    font-size: 0.62rem;
  }

  .live-keypad {
    gap: 0.34rem;
  }

  .live-keypad button {
    min-height: clamp(3.35rem, 12.2vh, 4.2rem);
    border-radius: 0.72rem;
  }

  .live-keypad button strong {
    font-size: clamp(1.32rem, 8vw, 1.7rem);
  }

  .live-keypad button span {
    font-size: 0.68rem;
  }

  .live-finish-note {
    border-radius: 0.78rem;
    font-size: 0.76rem;
    padding: 0.58rem;
  }
}

.topbar-title-short {
  display: none;
}

@media (max-width: 639px) {
  .topbar-title-long {
    display: none;
  }

  .topbar-title-short {
    display: inline;
  }
}

@media (max-width: 360px) {
  .live-round-top h3 {
    font-size: 0.94rem;
  }

  .live-player-row {
    min-height: 3.86rem;
    grid-template-columns: minmax(0, 1fr) 2.22rem 2.22rem;
    gap: 0.32rem;
    padding: 0.44rem;
  }

  .live-player-name strong {
    font-size: 0.86rem;
  }

  .live-player-name small {
    font-size: 0.6rem;
  }

  .live-total,
  .live-current-score {
    width: 2.22rem;
    height: 2.22rem;
    font-size: 0.82rem;
  }

  .live-current-term {
    max-width: 5rem;
    font-size: 0.56rem;
  }

  .live-score-player-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-score-player-chip {
    min-height: 2.72rem;
    padding: 0.34rem;
  }

  .live-score-player-chip strong {
    font-size: 0.7rem;
  }

  .live-score-player-chip span {
    font-size: 0.56rem;
  }

  .live-keypad button {
    min-height: 3.08rem;
  }

  .live-keypad button strong {
    font-size: 1.24rem;
  }

  .live-keypad button span {
    font-size: 0.6rem;
  }

  .live-hole-bar button {
    min-width: 3.35rem;
    font-size: 0.76rem;
  }

  .live-hole-strip {
    grid-auto-columns: minmax(2.9rem, 1fr);
  }
}

@media (max-width: 639px) and (max-height: 720px) {
  .live-round-tracker {
    gap: 0.38rem;
    padding: 0.42rem;
  }

  .live-round-meter,
  .live-round-top .ghost-button {
    min-height: 2.24rem;
  }

  .live-player-row {
    min-height: 3.78rem;
  }

  .live-game-storage-note {
    display: none;
  }

  .live-game-rank-list div,
  .skins-hole-status-list div,
  .skins-leaderboard div {
    min-height: 2.24rem;
  }

  .live-score-sheet .live-keypad-panel {
    max-height: calc(100dvh - 4.7rem);
  }

  .live-score-sheet-toolbar strong {
    font-size: 0.92rem;
  }

  .live-score-player-chip {
    min-height: 2.64rem;
  }

  .live-keypad button {
    min-height: 3.04rem;
  }
}

/* Keep the in-game scoreboard as the grey scoring shelf on top of the dark play surface. */
.live-game-panel.live-game-shelf,
.skins-panel.live-game-shelf {
  border-color: rgba(188, 196, 191, 0.9);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12)),
    #dfe3e1;
  color: #071316;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.live-game-panel.live-game-shelf .live-game-panel-head h3,
.skins-panel.live-game-shelf .skins-panel-head h3,
.live-game-panel.live-game-shelf .live-game-explainer strong,
.live-game-panel.live-game-shelf .live-game-storage-note strong,
.skins-panel.live-game-shelf .skins-current-hole strong,
.skins-panel.live-game-shelf .skins-leaderboard strong {
  color: #071316;
}

.live-game-panel.live-game-shelf .live-game-panel-head p,
.live-game-panel.live-game-shelf .live-game-explainer span,
.live-game-panel.live-game-shelf .live-game-storage-note span,
.skins-panel.live-game-shelf .skins-current-hole > span,
.skins-panel.live-game-shelf .skins-stat-row span,
.skins-panel.live-game-shelf .skins-leaderboard span {
  color: #56615c;
}

.live-game-panel.live-game-shelf .live-game-rank-list div,
.live-game-panel.live-game-shelf .live-game-explainer,
.live-game-panel.live-game-shelf .live-game-storage-note,
.live-game-panel.live-game-shelf .live-game-teams div,
.skins-panel.live-game-shelf .skins-current-hole,
.skins-panel.live-game-shelf .skins-stat-row div,
.skins-panel.live-game-shelf .skins-hole-status-list div,
.skins-panel.live-game-shelf .skins-leaderboard div {
  border-color: rgba(122, 132, 126, 0.24);
  background: rgba(255, 255, 255, 0.5);
}

/* Mobile setup picker redesign: remove duplicate radios and make game choice rows deliberate. */
.game-choice-radio {
  position: absolute !important;
  inset: auto !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.game-choice-radio input {
  position: absolute !important;
  width: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 639px) {
  .game-choice-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.42rem !important;
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
  }

  .game-choice-grid legend {
    color: #65716b;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    padding-bottom: 0.12rem;
    text-transform: uppercase;
  }

  .game-choice-card {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 0.52rem !important;
    align-items: center !important;
    min-height: 3.22rem !important;
    border: 1px solid #dfe9e2;
    border-radius: 0.74rem !important;
    background: #ffffff;
    box-shadow: 0 0.28rem 0.9rem rgba(7, 19, 22, 0.035);
    padding: 0.52rem 0.58rem !important;
  }

  .game-choice-card::before {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    place-items: center;
    width: 2.08rem;
    height: 2.08rem;
    border: 1px solid #dce9df;
    border-radius: 0.58rem;
    background: #f2f8f4;
    color: #0b7e3b;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
  }

  .game-choice-stroke_net::before {
    content: "ST";
  }

  .game-choice-stableford::before {
    content: "SF";
  }

  .game-choice-match_play::before {
    content: "MP";
  }

  .game-choice-skins::before {
    content: "SK";
  }

  .game-choice-scramble::before {
    content: "SC";
  }

  .game-choice-four_ball::before {
    content: "4B";
  }

  .game-choice-card > span:last-child {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    gap: 0.14rem;
    min-width: 0;
    order: initial !important;
  }

  .game-choice-card strong {
    max-width: 100% !important;
    overflow: hidden;
    color: #071316;
    font-size: 0.88rem !important;
    font-weight: 850;
    line-height: 1.08;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-choice-card small {
    display: none !important;
  }

  .game-card-meta {
    display: flex;
    gap: 0.32rem !important;
    align-items: center;
    margin: 0 !important;
    min-width: 0;
  }

  .game-card-meta em {
    display: inline-flex !important;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #dce9df;
    border-radius: 999px !important;
    background: #f6faf7;
    color: #0b7e3b;
    font-size: 0.62rem !important;
    font-weight: 850;
    line-height: 1;
    padding: 0.25rem 0.38rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-card-meta em:first-child {
    display: none !important;
  }

  .game-choice-card::after {
    content: "";
    display: grid !important;
    grid-column: 3;
    grid-row: 1;
    place-items: center;
    width: 1.18rem !important;
    height: 1.18rem !important;
    border: 1px solid #c9d8d0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 0.25rem #ffffff !important;
  }

  .game-choice-card:has(input:checked) {
    border-color: #8be0aa;
    background: linear-gradient(135deg, #f0fff4, #ffffff 72%);
    box-shadow: 0 0.7rem 1.5rem rgba(21, 153, 71, 0.09);
  }

  .game-choice-card:has(input:checked)::before {
    border-color: rgba(21, 153, 71, 0.3);
    background: #159947;
    color: #ffffff;
  }

  .game-choice-card:has(input:checked)::after {
    border-color: #159947;
    background: #159947;
    box-shadow: inset 0 0 0 0.28rem #ffffff !important;
  }

  .skins-choice-card:has(input:checked) {
    border-color: #8be0aa;
    background: linear-gradient(135deg, #f0fff4, #ffffff 72%);
  }
}

h1,
h2,
h3,
.brand-wordmark,
.hero-copy h2,
.topbar h2 {
  font-family: var(--font-display);
}

.brand-wordmark,
.hero-copy h2,
.topbar h2 {
  font-weight: 760;
}

h1,
h2,
h3,
.section-head h3,
.round-record-head h3,
.round-row h4,
.result-row h4,
.player-row h4,
.course-row-card h4 {
  font-weight: 690;
}

button,
.nav-item,
.mobile-tab,
.rail-action,
.hero-action,
.status-pill,
.pill,
.invite-code,
.row-badges span,
.key-status {
  font-weight: 650;
}

.eyebrow,
.sidebar-kicker,
.metric-copy span,
.metric-copy small,
.hero-stat-panel span,
.player-meta span,
.round-row-value span,
.course-row-card dt,
th {
  font-weight: 620;
}

.hero-copy p:not(.eyebrow),
.section-head p,
.round-record-head p,
.round-row p,
.result-row p,
.player-row p,
.course-row-card p,
td {
  font-weight: 430;
}

.metric-copy strong,
.hero-stat-panel strong,
.player-meta strong,
.round-row-value strong,
.definition-list dd,
.score-thumb,
.result-rank,
.player-avatar,
.profile-avatar-large,
.avatar-pill,
.course-row-card dd {
  font-weight: 720;
}

.weekly-report-box {
  font-family: var(--font-mono);
}

@media (min-width: 1024px) {
  .capture-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Absolute final mobile constraints: the phone UI is the primary surface. */
@media (max-width: 639px) {
  body,
  #app,
  .app-shell,
  .workspace,
  .panel,
  .play-workflow,
  .live-round-launcher {
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar,
  .view-hero-play,
  .play-workflow > .play-command-card,
  .game-logic-deck {
    display: none;
  }

  .app-shell {
    gap: 0;
    padding-bottom: 4.7rem;
  }

  .workspace {
    border: 0;
    border-radius: 0;
    background: #f6f8f3;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.62rem;
    padding: 0.7rem 0.78rem;
  }

  .topbar h2,
  .topbar .eyebrow {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar h2 {
    font-size: 1.08rem;
  }

  .topbar-actions .secondary-action,
  .topbar-actions .notification-pill {
    display: none;
  }

  .panel {
    padding: 0.72rem 0.72rem 1rem;
  }

  .live-round-launcher {
    gap: 0.68rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .live-round-launcher,
  .live-round-launcher * {
    box-sizing: border-box;
    min-width: 0;
  }

  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    border-radius: 0.82rem;
    padding: 0.9rem;
  }

  .live-launch-head h3 {
    max-width: 12rem;
    font-size: 1.24rem;
    line-height: 1.04;
  }

  .live-launch-head p {
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .game-recording-note {
    border-radius: 0.76rem;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
  }

  .game-recording-note span,
  .game-setup-step p,
  .game-choice-card small,
  .game-card-meta em:first-child {
    display: none;
  }

  .game-setup-step {
    gap: 0.52rem;
    border-top: 0;
    padding-top: 0.18rem;
  }

  .game-step-marker {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }

  .game-setup-step h4 {
    font-size: 0.9rem;
  }

  .live-start-grid,
  .live-start-grid .segmented,
  .play-scope-grid,
  .game-choice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    scroll-snap-type: none;
  }

  .live-start-grid .segmented {
    gap: 0.36rem;
  }

  .live-start-grid input,
  .live-start-grid select {
    min-height: 2.72rem;
    font-size: 0.86rem;
    padding: 0.64rem 0.7rem;
  }

  .live-start-grid .segmented label {
    justify-content: flex-start;
    min-height: 2.48rem;
    border-radius: 0.62rem;
    padding: 0.45rem 0.7rem;
  }

  .play-scope-card {
    min-height: 3.86rem;
    border-radius: 0.74rem;
    padding: 0.66rem;
    scroll-snap-align: none;
  }

  .play-scope-card small {
    font-size: 0.74rem;
  }

  .game-choice-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    min-height: 3.95rem;
    border-radius: 0.76rem;
    padding: 0.66rem;
  }

  .game-choice-radio {
    position: static;
    order: 2;
    justify-self: end;
    width: 1.08rem;
    height: 1.08rem;
  }

  .game-choice-card > span:last-child {
    order: 1;
  }

  .game-choice-card strong {
    max-width: 100%;
    font-size: 0.86rem;
    line-height: 1.08;
  }

  .game-card-meta {
    gap: 0.28rem;
    margin-top: 0.42rem;
  }

  .game-card-meta em {
    max-width: 100%;
    overflow: hidden;
    border-radius: 0.45rem;
    font-size: 0.62rem;
    padding: 0.26rem 0.34rem;
    text-overflow: ellipsis;
  }

  .team-player-assignment label {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-player-chips {
    gap: 0.34rem;
  }

  .live-player-chips span {
    font-size: 0.72rem;
    padding: 0.32rem 0.48rem;
  }

  .live-round-launcher .primary-action {
    position: static;
    width: 100%;
    min-height: 3.08rem;
    border-radius: 0.78rem;
    box-shadow: 0 0.85rem 1.7rem rgba(21, 153, 71, 0.22);
  }

  .game-preview-wall {
    gap: 0.62rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.1rem 0 0;
  }

  .game-preview-wall .section-head p {
    display: none;
  }

  .game-preview-grid {
    display: grid;
    grid-auto-columns: minmax(15.8rem, 82%);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 0.58rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.12rem;
    scroll-snap-type: x mandatory;
  }

  .game-preview-card {
    border-radius: 0.82rem;
    padding: 0.68rem;
    scroll-snap-align: start;
  }

  .game-preview-topline {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .game-preview-topline strong {
    display: none;
  }

  .game-preview-rows div {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.46rem;
  }

  .game-preview-rows small,
  .game-preview-rows em {
    display: none;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: 0.48rem;
    left: 0.48rem;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.12rem;
    overflow: visible;
    border-radius: 0.82rem;
    padding: 0.24rem;
  }

  .mobile-tab {
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.08rem;
    overflow: hidden;
    border-radius: 0.62rem;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0.3rem 0.08rem;
    text-overflow: ellipsis;
  }

  .mobile-tab .nav-icon {
    width: 1.02rem;
    height: 1.02rem;
  }
}

/* Live-round participant confirmation: explicit per-round players, not full group membership. */
.round-player-selector {
  display: grid;
  gap: 0.48rem;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.round-player-selector legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  padding: 0 0 0.1rem;
}

.round-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.7rem, 1fr));
  gap: 0.48rem;
}

.round-player-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.56rem;
  align-items: center;
  min-height: 3.25rem;
  border: 1px solid #dce8de;
  border-radius: 0.82rem;
  background: #ffffff;
  box-shadow: 0 0.5rem 1.25rem rgba(7, 19, 22, 0.04);
  cursor: pointer;
  padding: 0.62rem 0.66rem;
}

.round-player-card:has(input:checked) {
  border-color: #69d28d;
  background:
    linear-gradient(135deg, rgba(43, 191, 91, 0.13), rgba(43, 191, 91, 0.03)),
    #f7fff9;
  box-shadow:
    inset 0 0 0 1px rgba(43, 191, 91, 0.24),
    0 0.62rem 1.45rem rgba(43, 191, 91, 0.1);
}

.round-player-card input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.round-player-copy {
  display: grid;
  min-width: 0;
}

.round-player-copy strong,
.round-player-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-player-copy strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 820;
  line-height: 1.1;
}

.round-player-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.15;
  margin-top: 0.12rem;
}

.round-player-card:has(input:checked) .round-player-copy small {
  color: var(--green-dark);
}

.round-player-copy .is-selected-copy {
  display: none;
}

.round-player-card:has(input:checked) .is-selected-copy {
  display: block;
}

.round-player-card:has(input:checked) .is-unselected-copy {
  display: none;
}

.round-player-toggle {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid #dce8de;
  border-radius: 999px;
  background: #f7faf7;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 820;
}

.round-player-toggle::before {
  content: "+";
}

.round-player-card:has(input:checked) .round-player-toggle {
  border-color: rgba(7, 19, 22, 0.1);
  background: var(--ink);
  color: #ffffff;
}

.round-player-card:has(input:checked) .round-player-toggle::before {
  content: "×";
}

.round-player-actions {
  display: flex;
  justify-content: flex-start;
}

.live-onboarding-drawer {
  display: grid;
  gap: 0.8rem;
  border: 1px solid #bfe2c8;
  border-radius: var(--radius);
  background: #f5fbf6;
  box-shadow: 0 1rem 2.5rem rgba(7, 19, 22, 0.12);
  padding: 1rem;
}

.live-onboarding-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.live-onboarding-drawer-head h3,
.live-onboarding-drawer-head p {
  margin: 0;
}

.live-onboarding-drawer .player-onboarding {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

@media (max-width: 639px) {
  .live-onboarding-drawer {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f7faf7;
    box-shadow: none;
    padding: max(0.8rem, env(safe-area-inset-top)) 0.72rem max(1rem, env(safe-area-inset-bottom));
  }

  .live-onboarding-drawer-head {
    position: sticky;
    z-index: 2;
    top: calc(-1 * max(0.8rem, env(safe-area-inset-top)));
    margin: 0 -0.72rem 0.72rem;
    border-bottom: 1px solid #dbe7dd;
    background: rgba(247, 250, 247, 0.97);
    padding: 0.72rem;
    backdrop-filter: blur(16px);
  }

  .live-onboarding-drawer-head h3 {
    font-size: 1.05rem;
  }

  .live-onboarding-drawer .onboarding-head {
    display: none;
  }

  .live-onboarding-drawer .player-onboarding > button[type="submit"] {
    position: sticky;
    bottom: max(0.25rem, env(safe-area-inset-bottom));
    z-index: 2;
    min-height: 3.2rem;
    box-shadow: 0 0.65rem 1.6rem rgba(10, 156, 72, 0.24);
  }

  .round-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .round-player-card {
    min-height: 3rem;
    border-radius: 0.74rem;
    padding: 0.54rem 0.56rem;
  }

  .round-player-copy strong {
    font-size: 0.82rem;
  }

  .round-player-copy small {
    font-size: 0.64rem;
  }

  .round-player-toggle {
    width: 1.58rem;
    height: 1.58rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 359px) {
  .round-player-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.score-request-panel {
  display: grid;
  gap: 0.9rem;
  border-color: #cce8d4;
  background:
    linear-gradient(135deg, rgba(232, 247, 236, 0.92), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.score-request-head,
.score-request-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.score-request-head h3,
.score-request-card-head strong {
  color: var(--ink);
}

.score-request-head p,
.score-request-card-head span,
.score-request-actions span,
.submission-roster small {
  color: #68736d;
  font-weight: 760;
}

.score-request-form {
  display: grid;
  gap: 0.72rem;
}

.compact-segmented {
  margin: 0;
}

.score-request-list {
  display: grid;
  gap: 0.75rem;
}

.score-request-card {
  display: grid;
  gap: 0.82rem;
  border: 1px solid #dbe8de;
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.82rem;
}

.score-request-card-head em {
  display: grid;
  place-items: center;
  min-width: 3.25rem;
  min-height: 3.25rem;
  border-radius: 999px;
  background: #071316;
  color: #ffffff;
  font-style: normal;
  font-weight: 920;
}

.submission-roster {
  display: grid;
  gap: 0.45rem;
}

.submission-roster div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.6rem;
  align-items: center;
  border: 1px solid #e2e9e4;
  border-radius: 0.68rem;
  background: #ffffff;
  padding: 0.58rem 0.66rem;
}

.submission-roster div.is-submitted {
  border-color: rgba(21, 153, 71, 0.32);
  background: #edf9f0;
}

.submission-roster span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 890;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-roster strong {
  color: var(--action-dark);
  font-weight: 920;
}

.submission-roster small {
  grid-column: 1 / -1;
  font-size: 0.76rem;
}

.submission-form {
  display: grid;
  gap: 0.65rem;
  border: 1px solid #dce9e0;
  border-radius: 0.72rem;
  background: #fbfdfb;
  padding: 0.7rem;
}

.score-request-actions {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .score-request-form,
  .submission-form,
  .score-request-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .score-request-form button,
  .submission-form button,
  .score-request-actions button {
    align-self: end;
  }

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

/* New player onboarding: mobile-first card flow. */
.player-onboarding {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.72rem;
  border: 1px solid rgba(10, 30, 27, 0.12) !important;
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(236, 252, 241, 0.92), rgba(255, 255, 255, 0.96)),
    #ffffff;
  box-shadow: 0 1rem 2.4rem rgba(13, 34, 29, 0.08);
  padding: 0.78rem;
}

.onboarding-settings-card .player-onboarding {
  border: 0 !important;
  box-shadow: none;
  padding: 0;
}

.onboarding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.1rem;
}

.onboarding-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 950;
}

.onboarding-name {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-onboarding input,
.player-onboarding select {
  min-height: 3rem;
}

.onboarding-methods,
.onboarding-options {
  display: grid;
  gap: 0.48rem;
  border: 0;
  margin: 0;
  padding: 0;
}

.onboarding-methods legend,
.onboarding-options legend {
  margin-bottom: 0.24rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.onboarding-methods label,
.onboarding-options label {
  display: flex;
  align-items: center;
  gap: 0.64rem;
  min-height: 3rem;
  border: 1px solid rgba(13, 34, 29, 0.13);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 920;
  padding: 0.62rem 0.7rem;
}

.onboarding-methods label > span,
.onboarding-options label > span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.onboarding-methods strong,
.onboarding-options strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.1;
}

.onboarding-methods small,
.onboarding-options small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.22;
}

.onboarding-methods input,
.onboarding-options input {
  width: 1.05rem;
  min-width: 1.05rem;
  height: 1.05rem;
  min-height: 1.05rem;
  accent-color: var(--green);
}

.player-onboarding:has(input[name="onboarding_method"][value="known"]:checked) .onboarding-methods label:has(input[value="known"]),
.player-onboarding:has(input[name="onboarding_method"][value="estimate"]:checked) .onboarding-methods label:has(input[value="estimate"]),
.player-onboarding:has(input[name="onboarding_method"][value="workout"]:checked) .onboarding-methods label:has(input[value="workout"]),
.onboarding-options label:has(input:checked) {
  border-color: rgba(21, 185, 91, 0.55);
  background: rgba(229, 249, 234, 0.96);
  box-shadow: inset 0 0 0 1px rgba(21, 185, 91, 0.22);
}

.onboarding-panel {
  display: none;
  gap: 0.65rem;
  border-top: 1px solid rgba(13, 34, 29, 0.1);
  margin-top: 0.1rem;
  padding-top: 0.75rem;
}

.player-onboarding:has(input[name="onboarding_method"][value="known"]:checked) .method-known,
.player-onboarding:has(input[name="onboarding_method"][value="estimate"]:checked) .method-estimate,
.player-onboarding:has(input[name="onboarding_method"][value="workout"]:checked) .method-workout {
  display: grid;
}

.onboarding-note {
  margin: 0;
  border: 1px solid rgba(21, 185, 91, 0.18);
  border-radius: 0.72rem;
  background: rgba(237, 250, 240, 0.82);
  color: #526260;
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.28;
  padding: 0.68rem 0.74rem;
}

.estimate-override-field {
  display: none;
}

.player-onboarding:has(input[name="estimate_change"][value="yes"]:checked) .estimate-override-field {
  display: grid;
}

.two-up,
.usual-score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

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

.player-onboarding button[type="submit"] {
  min-height: 3rem;
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.player-admin-row .status-pill {
  align-self: center;
  justify-self: start;
}

.text-link {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(21, 153, 71, 0.2);
  border-radius: 999px;
  background: rgba(237, 250, 240, 0.88);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  padding: 0 0.78rem;
}

.form-error {
  margin: 0;
  border: 1px solid rgba(190, 42, 42, 0.22);
  border-radius: 0.78rem;
  background: rgba(255, 239, 239, 0.92);
  color: #9f2525;
  font-size: 0.88rem;
  font-weight: 820;
  line-height: 1.3;
  padding: 0.72rem 0.78rem;
}

.cloud-config-card {
  display: grid;
  gap: 0.86rem;
}

.cloud-config-form {
  display: grid;
  gap: 0.7rem;
}

.cloud-config-form label {
  display: grid;
  gap: 0.36rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cloud-config-form input {
  min-height: 3rem;
  text-transform: none;
}

.cloud-config-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.58rem;
}

.cloud-config-actions .secondary-action {
  border-color: rgba(13, 34, 29, 0.14);
  background: #ffffff;
  box-shadow: none;
  color: var(--muted);
}

.cloud-auth-panel {
  display: grid;
  gap: 0.76rem;
  border: 1px solid rgba(13, 34, 29, 0.1);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.78rem;
}

.cloud-sync-panel {
  display: grid;
  gap: 0.72rem;
  border: 1px solid rgba(21, 185, 91, 0.18);
  border-radius: 0.9rem;
  background: rgba(237, 250, 240, 0.78);
  padding: 0.78rem;
}

.cloud-auth-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.52rem;
}

.cloud-auth-head h4 {
  margin: 0.08rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.cloud-auth-head p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.28;
}

.cloud-auth-form {
  display: grid;
  gap: 0.58rem;
  border-top: 1px solid rgba(13, 34, 29, 0.08);
  padding-top: 0.72rem;
}

.cloud-auth-form label {
  display: grid;
  gap: 0.34rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cloud-auth-form input {
  min-height: 2.9rem;
  text-transform: none;
}

.cloud-sync-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
}

.cloud-sync-grid span {
  display: grid;
  min-height: 3rem;
  align-content: center;
  gap: 0.04rem;
  border: 1px solid rgba(13, 34, 29, 0.1);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 920;
  line-height: 1.05;
  padding: 0.5rem 0.58rem;
  text-transform: uppercase;
}

.cloud-sync-grid strong {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1;
}

.cloud-sync-error {
  margin: 0;
  border: 1px solid rgba(190, 42, 42, 0.2);
  border-radius: 0.72rem;
  background: rgba(255, 239, 239, 0.9);
  color: #9f2525;
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.25;
  padding: 0.62rem 0.66rem;
}

.cloud-sync-mode-form {
  display: grid;
  gap: 0.58rem;
  border-top: 1px solid rgba(13, 34, 29, 0.08);
  padding-top: 0.72rem;
}

.cloud-mode-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  min-height: 3.25rem;
  border: 1px solid rgba(13, 34, 29, 0.1);
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.68rem 0.72rem;
}

.cloud-mode-toggle input {
  width: 1.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.08rem;
  accent-color: var(--green);
}

.cloud-mode-toggle span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.cloud-mode-toggle strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.08;
}

.cloud-mode-toggle small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.22;
}

.historical-import-card {
  display: grid;
  gap: 0.86rem;
}

.import-form input[type="file"] {
  min-height: 3.2rem;
  border: 1px solid rgba(13, 34, 29, 0.12);
  border-radius: 0.78rem;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 820;
  padding: 0.44rem;
}

.import-form input[type="file"]::file-selector-button {
  min-height: 2.3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(237, 250, 240, 0.94);
  color: var(--green);
  font: inherit;
  font-weight: 920;
  margin-right: 0.7rem;
  padding: 0 0.84rem;
}

.historical-preview {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(13, 34, 29, 0.12);
  border-radius: 0.88rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.75rem;
}

.historical-preview.is-valid {
  border-color: rgba(21, 153, 71, 0.26);
  background: linear-gradient(180deg, rgba(237, 250, 240, 0.9), rgba(255, 255, 255, 0.92));
}

.historical-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.historical-preview-head div {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.historical-preview-head span:first-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historical-preview-head strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.12;
}

.historical-issues {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding-left: 1.05rem;
  color: #9f2525;
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.26;
}

.historical-table {
  display: grid;
  gap: 0.38rem;
}

.historical-table-row {
  display: grid;
  grid-template-columns: minmax(5.8rem, 1.2fr) minmax(3.4rem, 0.7fr) minmax(3rem, 0.55fr) minmax(3.4rem, 0.65fr);
  gap: 0.42rem;
  align-items: center;
  min-height: 2.55rem;
  border: 1px solid rgba(13, 34, 29, 0.08);
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0.42rem 0.5rem;
}

.historical-table-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historical-table-head {
  min-height: auto;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.historical-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.32;
}

@media (min-width: 640px) {
  .two-up,
  .usual-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .historical-preview-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .cloud-config-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .cloud-auth-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

/* Live finish flow and persistent hole context */
.post-round-result-card,
.live-finish-review,
.post-round-mini-board div,
.live-finish-summary div,
.live-final-hole-list button {
  box-sizing: border-box;
  min-width: 0;
}

.post-round-result-card {
  display: grid;
  gap: 0.86rem;
  border: 1px solid rgba(20, 153, 76, 0.24);
  border-radius: 0.92rem;
  background:
    radial-gradient(circle at 92% 0%, rgba(41, 217, 116, 0.16), transparent 14rem),
    linear-gradient(180deg, #ffffff, #f5faf6);
  box-shadow: 0 1rem 2.4rem rgba(7, 19, 22, 0.08);
  padding: 0.9rem;
}

.post-round-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.post-round-result-head h3 {
  margin: 0.1rem 0 0;
  color: #081317;
  font-size: clamp(1.2rem, 5.2vw, 1.55rem);
  line-height: 1.02;
}

.post-round-result-head span,
.post-round-report span {
  color: #657170;
  font-size: 0.78rem;
  font-weight: 780;
}

.post-round-winner {
  display: grid;
  gap: 0.18rem;
  border-radius: 0.82rem;
  background:
    linear-gradient(135deg, rgba(21, 153, 71, 0.98), rgba(14, 106, 58, 0.95)),
    #159947;
  color: #ffffff;
  padding: 0.86rem;
}

.post-round-winner span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 860;
  text-transform: uppercase;
}

.post-round-winner strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 7.5vw, 2.1rem);
  font-weight: 920;
  line-height: 1;
}

.post-round-winner small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 760;
}

.post-round-report {
  display: grid;
  gap: 0.42rem;
}

.post-round-report .whatsapp-box {
  min-height: min(42dvh, 22rem);
  border-radius: 0.78rem;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.45;
}

.post-round-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.post-round-actions .primary-action,
.post-round-actions .ghost-button {
  min-height: 2.7rem;
  border-radius: 0.74rem;
}

.post-round-mini-board {
  display: grid;
  gap: 0.38rem;
}

.post-round-mini-board div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid #dfe9e2;
  border-radius: 0.72rem;
  background: #ffffff;
  padding: 0.48rem;
}

.post-round-mini-board span {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #159947;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.post-round-mini-board strong,
.post-round-mini-board em {
  overflow: hidden;
  color: #081317;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-round-mini-board em {
  color: #657170;
  font-size: 0.76rem;
}

.tally-board-card {
  display: grid;
  gap: 0.86rem;
}

.tally-board-head {
  align-items: start;
}

.tally-hero {
  display: grid;
  gap: 0.55rem;
}

.tally-hero > div {
  display: grid;
  gap: 0.18rem;
  border: 1px solid rgba(21, 153, 71, 0.18);
  border-radius: 0.82rem;
  background:
    radial-gradient(circle at 94% 10%, rgba(41, 217, 116, 0.16), transparent 10rem),
    #f5fbf7;
  padding: 0.76rem;
}

.tally-hero span,
.tally-score-grid article > span,
.tally-detail-card summary,
.tally-table span,
.tally-register-meta span,
.tally-counting-list > span,
.tally-leaving-row span {
  color: #64716f;
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tally-hero strong {
  overflow-wrap: anywhere;
  color: #081317;
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 920;
  line-height: 1.02;
}

.tally-hero small {
  color: #657170;
  font-size: 0.8rem;
  font-weight: 740;
}

.tally-score-grid {
  display: grid;
  gap: 0.56rem;
}

.tally-score-grid article {
  display: grid;
  gap: 0.38rem;
  border: 1px solid #dce8e0;
  border-radius: 0.82rem;
  background: #ffffff;
  padding: 0.68rem;
}

.tally-score-grid article > div,
.tally-table > div,
.tally-counting-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.tally-score-grid strong,
.tally-table strong,
.tally-counting-list strong,
.tally-counting-list em,
.tally-counting-list b,
.tally-leaving-row strong {
  overflow: hidden;
  color: #081317;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tally-score-grid em,
.tally-table em {
  color: #11201c;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.tally-detail-card {
  overflow: hidden;
  border: 1px solid #dce8e0;
  border-radius: 0.82rem;
  background: #ffffff;
}

.tally-detail-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 2.9rem;
  cursor: pointer;
  list-style: none;
  padding: 0.72rem 0.78rem;
}

.tally-detail-card summary::-webkit-details-marker {
  display: none;
}

.tally-detail-card summary::after {
  content: "+";
  justify-self: end;
  grid-row: 1;
  color: #159947;
  font-size: 1rem;
  font-weight: 920;
}

.tally-detail-card[open] summary::after {
  content: "-";
}

.tally-table,
.tally-register,
.tally-engine-list,
.tally-course-grid {
  display: grid;
  gap: 0.48rem;
  padding: 0 0.72rem 0.72rem;
}

.tally-table {
  overflow-x: auto;
}

.tally-table > div {
  grid-template-columns: minmax(7.8rem, 1fr) repeat(3, minmax(3.2rem, auto));
  min-width: 23rem;
  border-top: 1px solid #edf2ef;
  padding: 0.46rem 0;
}

.tally-register-meta {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.28rem 0.7rem;
  border-radius: 0.72rem;
  background: #f5faf6;
  padding: 0.64rem;
}

.tally-register-meta strong {
  color: #081317;
  font-size: 0.84rem;
  font-weight: 850;
}

.tally-register article,
.tally-engine-list article,
.tally-course-grid article {
  display: grid;
  gap: 0.44rem;
  border: 1px solid #edf2ef;
  border-radius: 0.74rem;
  background: #fbfdfb;
  padding: 0.64rem;
}

.tally-register h4 {
  margin: 0;
  color: #081317;
  font-size: 0.96rem;
}

.tally-register dl {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}

.tally-register dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.tally-register dt,
.tally-register dd {
  margin: 0;
  color: #657170;
  font-size: 0.8rem;
  font-weight: 760;
}

.tally-register dd {
  color: #081317;
  font-weight: 900;
}

.tally-engine-head,
.tally-leaving-row {
  display: grid;
  gap: 0.18rem;
}

.tally-engine-head strong {
  color: #081317;
  font-size: 0.98rem;
  font-weight: 900;
}

.tally-engine-head span {
  color: #159947;
  font-size: 0.8rem;
  font-weight: 850;
}

.tally-counting-list {
  display: grid;
  gap: 0.28rem;
}

.tally-counting-list div {
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  border-top: 1px solid #edf2ef;
  padding-top: 0.3rem;
}

.tally-counting-list p {
  margin: 0;
  color: #657170;
  font-size: 0.82rem;
  font-weight: 740;
}

.tally-leaving-row strong {
  white-space: normal;
}

.tally-course-grid article strong,
.tally-course-grid article span,
.tally-course-grid article small {
  color: #081317;
  font-size: 0.84rem;
  font-weight: 850;
}

.tally-course-grid article span,
.tally-course-grid article small {
  color: #657170;
  font-weight: 720;
}

.tally-whatsapp-box {
  min-height: min(52dvh, 28rem);
  border: 0;
  border-top: 1px solid #edf2ef;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

@media (min-width: 760px) {
  .tally-hero,
  .tally-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.live-finish-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  background: rgba(1, 6, 5, 0.58);
  padding: 0.65rem;
}

.live-finish-review {
  display: grid;
  gap: 0.78rem;
  width: min(100%, 30rem);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background:
    linear-gradient(90deg, rgba(41, 217, 116, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(41, 217, 116, 0.06) 0 1px, transparent 1px 100%),
    #050908;
  background-size: 2.75rem 2.75rem;
  color: #ffffff;
  box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.36);
  padding: 0.8rem;
}

.live-missing-review {
  width: min(100%, 42rem);
}

.live-finish-review-head {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
}

.live-finish-review-head > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: #159947;
  color: #ffffff;
  font-weight: 920;
}

.live-finish-review-head h3 {
  margin: 0.08rem 0 0;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.1;
}

.live-final-hole-list,
.live-finish-summary {
  display: grid;
  gap: 0.42rem;
}

.live-final-hole-list button,
.live-finish-summary div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.22rem 0.5rem;
  align-items: center;
  min-height: 3.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  box-shadow: none;
  padding: 0.52rem 0.62rem;
  text-align: left;
}

.live-final-hole-list span,
.live-finish-summary span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 820;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-final-hole-list strong,
.live-finish-summary strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-final-hole-list button > strong {
  grid-row: 1 / 3;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: #f3f7f4;
  color: #071316;
}

.live-final-hole-list small,
.live-finish-summary small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-finish-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 0.48rem;
}

.live-finish-actions .ghost-button,
.live-finish-actions .primary-action {
  min-height: 2.85rem;
  border-radius: 0.72rem;
}

.live-finish-actions .danger-action {
  border-color: rgba(255, 111, 97, 0.28);
  background: #f8f4ed;
  color: #9f2d23;
}

.live-missing-callout {
  display: grid;
  gap: 0.22rem;
  border: 1px solid rgba(255, 195, 51, 0.26);
  border-radius: 0.78rem;
  background: rgba(255, 195, 51, 0.12);
  padding: 0.68rem 0.72rem;
}

.live-missing-callout strong {
  color: #ffc333;
  font-size: 0.92rem;
  font-weight: 900;
}

.live-missing-callout span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.28;
}

.live-missing-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.6rem, 1fr));
  gap: 0.42rem;
}

.live-missing-queue button,
.live-missing-more {
  display: grid;
  gap: 0.04rem;
  align-content: center;
  min-height: 3.15rem;
  border: 1px solid rgba(255, 195, 51, 0.42);
  border-radius: 0.7rem;
  background:
    linear-gradient(135deg, rgba(255, 195, 51, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.055);
  color: #ffffff;
  box-shadow: none;
  padding: 0.52rem 0.58rem;
  text-align: left;
}

.live-missing-queue button span,
.live-missing-more {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-missing-queue button strong {
  color: #ffc333;
  font-size: 0.92rem;
  line-height: 1.1;
}

.live-missing-queue button small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 780;
}

.live-missing-more {
  justify-content: center;
  border-style: dashed;
  color: rgba(255, 255, 255, 0.64);
  text-align: center;
}

.live-round-top .ghost-button.needs-review {
  border-color: rgba(255, 195, 51, 0.42);
  background: rgba(255, 195, 51, 0.12);
  color: #ffd675;
}

@media (max-width: 639px) {
  .app-shell.is-live-play .live-round-top {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: calc(clamp(0.44rem, 1.8vw, 0.62rem) * -1) calc(clamp(0.44rem, 1.8vw, 0.62rem) * -1) 0;
    border: 1px solid rgba(41, 217, 116, 0.14);
    border-top: 0;
    border-radius: 0 0 0.82rem 0.82rem;
    background:
      linear-gradient(90deg, rgba(41, 217, 116, 0.11) 0 1px, transparent 1px 100%),
      linear-gradient(0deg, rgba(41, 217, 116, 0.08) 0 1px, transparent 1px 100%),
      rgba(5, 9, 8, 0.96);
    background-size: 3rem 3rem;
    box-shadow: 0 0.85rem 1.8rem rgba(0, 0, 0, 0.28);
    padding: calc(0.46rem + env(safe-area-inset-top)) clamp(0.44rem, 1.8vw, 0.62rem) 0.5rem;
  }

  .app-shell.is-live-play .live-round-meter {
    min-height: 2.18rem;
    border-radius: 0.62rem;
  }

  .app-shell.is-live-play .live-round-meter span {
    color: #29d974;
    font-size: 0.76rem;
  }

  .app-shell.is-live-play .live-round-meter strong {
    font-size: 0.98rem;
  }

  .app-shell.is-live-play .live-round-top .ghost-button {
    min-height: 2.28rem;
    border-radius: 0.62rem;
    font-size: 0.84rem;
  }

  .live-finish-review-backdrop {
    padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  }

  .live-finish-review {
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    border-radius: 0.92rem;
  }

  .post-round-result-card {
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    margin: 0 -0.72rem;
    padding: 0.78rem;
  }

  .post-round-result-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-round-result-head .ghost-button {
    justify-self: start;
    min-height: 2.35rem;
    border-radius: 0.64rem;
  }

  .post-round-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-round-report .whatsapp-box {
    min-height: 18rem;
  }
}

@media (max-width: 359px) {
  .live-finish-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-round-mini-board div {
    grid-template-columns: 1.8rem minmax(0, 1fr);
  }

  .post-round-mini-board em {
    grid-column: 2;
  }
}

/* Live scoring polish: compact setup, custom controls, edit-any-score drawer. */
.setup-date-pill {
  display: inline-grid;
  width: fit-content;
  border: 1px solid #d9e7dc;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 780;
  margin-top: 0.3rem;
  padding: 0.28rem 0.52rem;
}

.course-choice-grid {
  display: grid;
  gap: 0.46rem;
  border: 0;
  margin: 0;
  padding: 0;
}

.course-choice-grid legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  padding-bottom: 0.12rem;
}

.course-choice-card,
.live-start-grid .segmented label,
.play-scope-card,
.score-track-card,
.game-choice-card {
  position: relative;
}

.course-choice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3.15rem;
  border: 1px solid #dfe9e2;
  border-radius: 0.72rem;
  background: #ffffff;
  cursor: pointer;
  padding: 0.58rem 0.68rem;
}

.course-choice-card::after,
.live-start-grid .segmented label::after,
.play-scope-card::after,
.score-track-card::after,
.game-choice-card::after {
  content: "";
  display: grid;
  place-items: center;
  width: 1.18rem;
  height: 1.18rem;
  border: 1px solid #cad7d0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 0.24rem #ffffff;
}

.course-choice-card:has(input:checked),
.live-start-grid .segmented label:has(input:checked),
.play-scope-card:has(input:checked),
.score-track-card:has(input:checked),
.game-choice-card:has(input:checked) {
  border-color: #8be0aa;
  background: linear-gradient(135deg, #effff4, #ffffff);
}

.course-choice-card:has(input:checked)::after,
.live-start-grid .segmented label:has(input:checked)::after,
.play-scope-card:has(input:checked)::after,
.score-track-card:has(input:checked)::after,
.game-choice-card:has(input:checked)::after {
  border-color: #159947;
  background: #159947;
  box-shadow: inset 0 0 0 0.28rem #ffffff;
}

.course-choice-card input,
.live-start-grid .segmented input,
.play-scope-card input,
.score-track-card input,
.game-choice-radio input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.course-choice-card span {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.course-choice-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-choice-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
}

.game-choice-radio {
  display: none;
}

.live-open-score-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-height: 3.05rem;
  border: 1px solid rgba(255, 195, 51, 0.6);
  border-radius: 0.82rem;
  background: var(--live-amber, #ffc333);
  color: #14160e;
  font-size: 0.96rem;
  font-weight: 850;
  box-shadow: 0 0.8rem 1.6rem rgba(255, 195, 51, 0.13);
  padding: 0.72rem 0.86rem;
}

.live-open-score-sheet span {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 780;
  opacity: 0.72;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-correction-panel {
  display: grid;
  gap: 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.62rem;
}

.live-correction-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: end;
}

.live-correction-head div {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.live-correction-head span,
.live-correction-head em {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 830;
  text-transform: uppercase;
}

.live-correction-head strong {
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.12;
}

.live-score-matrix {
  display: grid;
  gap: 0.32rem;
  overflow-x: auto;
  padding-bottom: 0.08rem;
}

.live-score-matrix-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 6.3rem);
  grid-auto-columns: 2.5rem;
  grid-auto-flow: column;
  gap: 0.28rem;
  align-items: center;
  min-width: max-content;
}

.live-score-matrix-row > strong,
.live-score-matrix-head > span {
  position: sticky;
  left: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 0.48rem;
  background: #08120f;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 820;
  padding: 0.52rem 0.5rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-score-matrix button {
  display: grid;
  place-items: center;
  min-height: 2.18rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.48rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 840;
  padding: 0.2rem;
}

.live-score-matrix button small {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.54rem;
  font-weight: 740;
  line-height: 1;
}

.live-score-matrix button.is-current {
  border-color: rgba(255, 195, 51, 0.72);
}

.live-score-matrix button.is-filled {
  border-color: rgba(41, 217, 116, 0.42);
  background: rgba(41, 217, 116, 0.18);
  color: #ffffff;
}

.live-score-matrix button.is-missing {
  border-color: rgba(255, 195, 51, 0.64);
  background: rgba(255, 195, 51, 0.14);
  color: #ffc333;
}

.live-score-matrix.is-missing-review {
  max-height: min(42dvh, 22rem);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.74rem;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.48rem;
}

.live-score-matrix.is-missing-review .live-score-matrix-row {
  grid-template-columns: minmax(5.8rem, 6.8rem);
  grid-auto-columns: minmax(2.55rem, 2.9rem);
}

.live-score-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.36);
  padding: 0.75rem;
}

.live-score-sheet {
  display: grid;
  gap: 0.45rem;
  width: min(100%, 30rem);
  justify-self: center;
}

.live-score-sheet-handle {
  justify-self: center;
  width: 3.2rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.live-score-sheet .live-keypad-panel {
  position: static;
  bottom: auto;
  z-index: auto;
  border-radius: 1rem;
  background: rgba(5, 9, 8, 0.98);
  box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.34);
}

.live-selected-player {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.live-selected-player button {
  min-height: 2.1rem;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
  font-size: 0.76rem;
  padding: 0.32rem 0.62rem;
}

@media (max-width: 639px) {
  .live-launch-head,
  .game-recording-note {
    display: none;
  }

  .game-setup-step {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    margin-top: 0.2rem;
  }

  .game-step-marker {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.78rem;
  }

  .setup-date-pill {
    font-size: 0.68rem;
    margin-top: 0.22rem;
    padding: 0.22rem 0.44rem;
  }

  .course-choice-grid,
  .live-start-grid .segmented,
  .play-scope-grid,
  .score-track-grid,
  .game-choice-grid {
    gap: 0.42rem;
  }

  .course-choice-card {
    min-height: 2.82rem;
    padding: 0.48rem 0.58rem;
  }

  .course-choice-card strong,
  .game-choice-card strong,
  .score-track-card strong,
  .play-scope-card strong {
    font-size: 0.82rem;
  }

  .course-choice-card small,
  .score-track-card small,
  .play-scope-card small {
    font-size: 0.7rem;
  }

  .live-start-grid .segmented label,
  .play-scope-card,
  .score-track-card,
  .game-choice-card {
    min-height: 2.8rem;
    padding: 0.52rem 0.58rem;
  }

  .live-score-sheet-backdrop {
    padding: 0.5rem 0.5rem 5.1rem;
  }

  .live-keypad button {
    min-height: 3.72rem;
  }

  .live-keypad button strong {
    font-size: 1.42rem;
  }

  .live-correction-panel {
    padding: 0.52rem;
  }

  .live-score-matrix-row {
    grid-template-columns: minmax(4.9rem, 5.7rem);
    grid-auto-columns: 2.26rem;
  }
}

.live-auto-date {
  display: grid;
  gap: 0.1rem;
  min-height: 2.72rem;
  border: 1px solid #dce7dd;
  border-radius: 0.72rem;
  background: #ffffff;
  padding: 0.62rem 0.72rem;
}

.live-auto-date span,
.live-auto-date small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
}

.live-auto-date strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 820;
}

.score-track-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.58rem;
  border: 0;
  margin: 0;
  padding: 0;
}

.score-track-grid legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  padding-bottom: 0.12rem;
}

.score-track-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
  min-height: 4.1rem;
  border: 1px solid #dde8df;
  border-radius: 0.82rem;
  background: #ffffff;
  cursor: pointer;
  padding: 0.76rem;
}

.score-track-card:has(input:checked) {
  border-color: #8be0aa;
  background: linear-gradient(135deg, #f1fff5, #ffffff);
  box-shadow: 0 0.75rem 1.7rem rgba(24, 153, 75, 0.08);
}

.score-track-card input {
  width: 1rem;
  min-height: 1rem;
  margin-top: 0.14rem;
  accent-color: var(--green);
}

.score-track-card span {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.score-track-card strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.1;
}

.score-track-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.live-game-shelf {
  border: 1px solid rgba(188, 196, 191, 0.9);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12)),
    #dfe3e1;
  color: #071316;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.live-game-shelf .eyebrow,
.live-game-shelf .live-game-panel-head .eyebrow,
.live-game-shelf .skins-panel-head .eyebrow {
  color: #0b8741;
}

.live-game-shelf .live-game-panel-head h3,
.live-game-shelf .skins-panel-head h3,
.live-game-shelf .live-game-explainer strong,
.live-game-shelf .live-game-storage-note strong,
.live-game-shelf .skins-current-hole strong,
.live-game-shelf .skins-leaderboard strong {
  color: #071316;
}

.live-game-shelf .live-game-panel-head p,
.live-game-shelf .live-game-explainer span,
.live-game-shelf .live-game-storage-note span,
.live-game-shelf .skins-current-hole > span,
.live-game-shelf .skins-stat-row span,
.live-game-shelf .skins-leaderboard span {
  color: #56615c;
}

.live-game-shelf .live-game-panel-head > span,
.live-game-shelf .skins-panel-head > span {
  border-color: rgba(10, 135, 65, 0.28);
  background: rgba(10, 135, 65, 0.1);
  color: #08783a;
}

.live-game-shelf .live-game-explainer,
.live-game-shelf .live-game-storage-note,
.live-game-shelf .live-game-rank-list div,
.live-game-shelf .live-game-teams div,
.live-game-shelf .skins-current-hole,
.live-game-shelf .skins-stat-row div,
.live-game-shelf .skins-hole-status-list div,
.live-game-shelf .skins-leaderboard div {
  border-color: rgba(122, 132, 126, 0.24);
  background: rgba(255, 255, 255, 0.5);
}

.live-game-shelf .live-game-rank-list span,
.live-game-shelf .skins-hole-status-list strong {
  background: #159947;
  color: #ffffff;
}

.live-game-shelf .live-game-rank-list strong,
.live-game-shelf .live-game-teams strong,
.live-game-shelf .skins-hole-status-list span {
  color: #071316;
}

.live-game-shelf .live-game-rank-list small,
.live-game-shelf .live-game-teams span,
.live-game-shelf .skins-hole-status-list small {
  color: #56615c;
}

.live-game-shelf .skins-pot-hero {
  border-color: rgba(10, 135, 65, 0.28);
  background:
    linear-gradient(135deg, rgba(21, 153, 71, 0.18), rgba(255, 255, 255, 0.62)),
    #edf3ef;
}

.live-game-shelf .skins-pot-hero > span,
.live-game-shelf .skins-pot-hero strong,
.live-game-shelf .skins-pot-hero small {
  color: #071316;
}

.live-game-shelf.player-count-4 .live-game-rank-list,
.live-game-shelf.player-count-4 .skins-leaderboard,
.live-game-shelf.player-count-4 .skins-hole-status-list {
  gap: 0.38rem;
}

.live-game-shelf.player-count-4 .live-game-rank-list div,
.live-game-shelf.player-count-4 .skins-leaderboard div,
.live-game-shelf.player-count-4 .skins-hole-status-list div {
  min-height: 2.78rem;
  padding-top: 0.46rem;
  padding-bottom: 0.46rem;
}

.game-phone-preview {
  overflow: hidden;
  border: 1px solid #071316;
  border-radius: 1.05rem;
  background: #f8faf7;
  color: #071316;
  box-shadow: 0 1rem 2.2rem rgba(7, 19, 22, 0.16);
}

.game-phone-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.52rem;
  align-items: center;
  background: #ffffff;
  padding: 0.58rem 0.7rem;
}

.game-phone-status span {
  font-size: 0.68rem;
  font-weight: 780;
}

.game-phone-status strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-phone-modebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.3rem 3.3rem;
  gap: 0.2rem;
  align-items: center;
  background: #129548;
  color: #ffffff;
  padding: 0.56rem 0.68rem;
}

.game-phone-modebar div {
  display: grid;
  min-width: 0;
}

.game-phone-modebar strong {
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-phone-modebar span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 760;
}

.game-phone-score-rows {
  display: grid;
  background:
    linear-gradient(90deg, transparent 0 62%, rgba(7, 19, 22, 0.08) 62% 100%),
    #ffffff;
}

.game-phone-score-rows div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2rem 2.9rem;
  gap: 0.46rem;
  align-items: center;
  min-height: 3.5rem;
  border-bottom: 1px solid #e9eeee;
  padding: 0.62rem 0.72rem;
}

.game-phone-score-rows div:first-child {
  background: rgba(21, 153, 71, 0.1);
}

.game-phone-score-rows span {
  display: grid;
  min-width: 0;
}

.game-phone-score-rows strong {
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-phone-score-rows small {
  color: #6a7670;
  font-size: 0.62rem;
  font-weight: 760;
}

.game-phone-score-rows em {
  color: #071316;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 840;
  text-align: right;
}

.game-phone-score-rows b {
  display: grid;
  place-items: center;
  width: 2.72rem;
  height: 2.72rem;
  border-radius: 999px;
  background: #19a953;
  color: #ffffff;
  font-size: 1rem;
}

.game-phone-score-rows .is-waiting b {
  background: #d7ddda;
  color: #64706b;
}

.game-phone-live-tray {
  display: grid;
  gap: 0.42rem;
  min-height: 8.4rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    #dfe2e1;
  padding: 0.74rem;
}

.game-phone-live-tray.player-count-4 {
  min-height: 10.3rem;
}

.game-phone-live-tray > div {
  display: grid;
  gap: 0.08rem;
}

.game-phone-live-tray span,
.game-phone-live-tray small {
  color: #61706a;
  font-size: 0.62rem;
  font-weight: 820;
  text-transform: uppercase;
}

.game-phone-live-tray strong {
  color: #071316;
  font-size: 0.92rem;
  line-height: 1.08;
}

.game-phone-live-tray p {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  gap: 0.38rem;
  align-items: center;
  border: 1px solid rgba(108, 119, 113, 0.2);
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.62);
  margin: 0;
  padding: 0.42rem 0.48rem;
}

.game-phone-live-tray.player-count-4 p {
  min-height: 2.55rem;
}

.game-phone-live-tray p span {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #159947;
  color: #ffffff;
}

.game-phone-live-tray p strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-phone-live-tray p em {
  color: #071316;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.game-phone-holebar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  background: #ffc928;
  color: #1b1b12;
  padding: 0.62rem 0.7rem;
}

.game-phone-holebar strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-phone-holebar span {
  font-size: 0.68rem;
  font-weight: 820;
}

.game-phone-keypad-hint {
  background: #ffffff;
  color: #61706a;
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1.25;
  padding: 0.58rem 0.7rem;
}

@media (min-width: 640px) {
  .score-track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* True final mobile play override. Keep below every other style block. */
@media (max-width: 639px) {
  .app-shell {
    gap: 0;
    padding: 0 0 4.7rem;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 4.7rem);
    border: 0;
    border-radius: 0;
    background: #f6f8f3;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.62rem;
    border-bottom: 1px solid rgba(207, 216, 209, 0.9);
    background: rgba(251, 252, 248, 0.96);
    padding: 0.7rem 0.78rem;
  }

  .topbar h2 {
    overflow: hidden;
    font-size: 1.08rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .eyebrow {
    overflow: hidden;
    font-size: 0.62rem;
    margin-bottom: 0.16rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 0.36rem;
    justify-content: end;
  }

  .topbar-actions .secondary-action,
  .topbar-actions .notification-pill {
    display: none;
  }

  .add-action {
    min-height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.82rem;
    padding: 0.48rem 0.72rem;
  }

  .avatar-pill {
    width: 2.34rem;
    height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.78rem;
  }

  .view-hero-play {
    display: none;
  }

  .panel {
    overflow: hidden;
    padding: 0.72rem 0.72rem 1rem;
  }

  .play-workflow > .play-command-card {
    display: none;
  }

  .live-round-launcher {
    gap: 0.68rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    overflow: hidden;
    border: 1px solid rgba(7, 19, 22, 0.9);
    border-radius: 0.82rem;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(135deg, #061113, #10251e 64%, #234615);
    background-size: 2rem 2rem, 2rem 2rem, auto;
    padding: 0.9rem;
  }

  .live-launch-head .eyebrow {
    color: #8af0a9;
  }

  .live-launch-head h3 {
    color: #ffffff;
    font-size: 1.24rem;
    line-height: 1.04;
    max-width: 11rem;
  }

  .live-launch-head p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    line-height: 1.28;
    margin-top: 0.38rem;
  }

  .live-launch-head .status-pill {
    border-color: rgba(139, 240, 169, 0.35);
    background: rgba(139, 240, 169, 0.14);
    color: #d7ffdf;
  }

  .game-recording-note {
    border-radius: 0.76rem;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
  }

  .game-recording-note span {
    font-size: 0.76rem;
  }

  .game-setup-step {
    gap: 0.52rem;
    border-top: 0;
    padding-top: 0.18rem;
  }

  .game-step-marker {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }

  .game-setup-step h4 {
    font-size: 0.9rem;
  }

  .game-setup-step p {
    display: none;
  }

  .live-start-grid {
    gap: 0.58rem;
  }

  .live-start-grid input,
  .live-start-grid select {
    min-height: 2.72rem;
    font-size: 0.86rem;
    padding: 0.64rem 0.7rem;
  }

  .live-start-grid .segmented {
    grid-template-columns: 1fr;
    gap: 0.36rem;
  }

  .live-start-grid .segmented label {
    justify-content: start;
    min-height: 2.48rem;
    border-radius: 0.62rem;
    font-size: 0.76rem;
    padding: 0.45rem 0.72rem;
  }

  .play-scope-grid {
    display: grid;
    gap: 0.5rem;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    overflow: visible;
    padding-bottom: 0;
  }

  .play-scope-card {
    min-height: 3.45rem;
    border-radius: 0.74rem;
    padding: 0.66rem;
  }

  .game-choice-grid {
    grid-template-columns: 1fr;
    gap: 0.48rem;
  }

  .game-choice-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    min-height: 4.7rem;
    border-radius: 0.76rem;
    padding: 0.66rem;
  }

  .game-choice-radio {
    position: static;
    order: 2;
    justify-self: end;
    width: 1.08rem;
    height: 1.08rem;
  }

  .game-choice-card > span:last-child {
    min-width: 0;
    order: 1;
  }

  .game-choice-card strong {
    max-width: 100%;
    font-size: 0.84rem;
    line-height: 1.08;
  }

  .game-choice-card small,
  .game-card-meta em:first-child {
    display: none;
  }

  .game-card-meta {
    gap: 0.28rem;
    margin-top: 0.5rem;
  }

  .game-card-meta em {
    border-radius: 0.45rem;
    font-size: 0.62rem;
    padding: 0.26rem 0.34rem;
  }

  .game-logic-deck {
    display: none;
  }

  .live-player-chips span {
    font-size: 0.72rem;
    padding: 0.32rem 0.48rem;
  }

  .live-round-launcher .primary-action {
    position: relative;
    bottom: auto;
    z-index: 1;
    min-height: 3.08rem;
    border-radius: 0.78rem;
    box-shadow: 0 0.85rem 1.7rem rgba(21, 153, 71, 0.22);
  }

  .game-preview-wall {
    gap: 0.62rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.1rem 0 0;
  }

  .game-preview-wall .section-head {
    margin: 0;
  }

  .game-preview-wall .section-head p {
    display: none;
  }

  .game-preview-grid {
    display: grid;
    grid-auto-columns: minmax(15.8rem, 82%);
    grid-auto-flow: column;
    gap: 0.58rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.12rem;
    scroll-snap-type: x mandatory;
  }

  .game-preview-card {
    border-radius: 0.82rem;
    padding: 0.68rem;
    scroll-snap-align: start;
  }

  .game-preview-rows div {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.46rem;
  }

  .game-preview-scorebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .game-preview-scorebar strong {
    display: none;
  }

  .game-preview-rows small,
  .game-preview-rows em {
    display: none;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: 0.48rem;
    left: 0.48rem;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.12rem;
    overflow: visible;
    border-radius: 0.82rem;
    padding: 0.24rem;
  }

  .mobile-tab {
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.08rem;
    border-radius: 0.62rem;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0.3rem 0.08rem;
  }

  .mobile-tab span:last-child {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-tab .nav-icon {
    width: 1.02rem;
    height: 1.02rem;
  }
}

/* Final mobile play override - keep this last so the phone layout wins. */
@media (max-width: 639px) {
  .app-shell {
    gap: 0;
    padding: 0 0 4.7rem;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 4.7rem);
    border: 0;
    border-radius: 0;
    background: #f6f8f3;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.62rem;
    align-items: center;
    border-bottom: 1px solid rgba(207, 216, 209, 0.9);
    background: rgba(251, 252, 248, 0.96);
    padding: 0.7rem 0.78rem;
  }

  .topbar h2 {
    overflow: hidden;
    font-size: 1.08rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .eyebrow {
    overflow: hidden;
    font-size: 0.62rem;
    margin-bottom: 0.16rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 0.36rem;
    justify-content: end;
  }

  .topbar-actions .secondary-action,
  .topbar-actions .notification-pill {
    display: none;
  }

  .add-action {
    min-height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.82rem;
    padding: 0.48rem 0.72rem;
  }

  .add-action span {
    width: 1.05rem;
    height: 1.05rem;
    font-size: 0.72rem;
  }

  .avatar-pill {
    width: 2.34rem;
    height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.78rem;
  }

  .view-hero-play {
    display: none;
  }

  .view-hero:not(.view-hero-play) {
    min-height: 0;
    margin: 0.72rem;
    padding: 0.86rem;
  }

  .view-hero:not(.view-hero-play) .hero-visual-shell {
    display: none;
  }

  .view-hero:not(.view-hero-play) .hero-copy {
    padding: 0;
  }

  .view-hero:not(.view-hero-play) .hero-copy h2 {
    max-width: none;
    font-size: 1.36rem;
  }

  .view-hero:not(.view-hero-play) .hero-copy p:not(.eyebrow),
  .view-hero:not(.view-hero-play) .hero-actions {
    display: none;
  }

  .panel {
    overflow-x: hidden;
    padding: 0.72rem 0.72rem 1rem;
  }

  .play-workflow {
    gap: 0.72rem;
  }

  .play-workflow > .play-command-card {
    display: none;
  }

  .live-round-launcher {
    gap: 0.68rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .live-round-launcher,
  .live-round-launcher * {
    box-sizing: border-box;
    min-width: 0;
  }

  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    overflow: hidden;
    border: 1px solid rgba(7, 19, 22, 0.9);
    border-radius: 0.82rem;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(135deg, #061113, #10251e 64%, #234615);
    background-size: 2rem 2rem, 2rem 2rem, auto;
    padding: 0.9rem;
  }

  .live-launch-head .eyebrow {
    color: #8af0a9;
  }

  .live-launch-head h3 {
    color: #ffffff;
    font-size: 1.24rem;
    line-height: 1.04;
    max-width: 11rem;
  }

  .live-launch-head p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    line-height: 1.28;
    margin-top: 0.38rem;
  }

  .live-launch-head .status-pill {
    border-color: rgba(139, 240, 169, 0.35);
    background: rgba(139, 240, 169, 0.14);
    color: #d7ffdf;
  }

  .game-recording-note {
    grid-template-columns: 1fr;
    border-radius: 0.76rem;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
  }

  .game-recording-note span {
    font-size: 0.76rem;
  }

  .game-setup-step {
    gap: 0.52rem;
    border-top: 0;
    padding-top: 0.18rem;
  }

  .game-step-marker {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }

  .game-setup-step h4 {
    font-size: 0.9rem;
  }

  .game-setup-step p {
    display: none;
  }

  .live-start-grid {
    gap: 0.58rem;
  }

  .live-start-grid label {
    font-size: 0.76rem;
  }

  .live-start-grid input,
  .live-start-grid select {
    min-height: 2.72rem;
    font-size: 0.86rem;
    padding: 0.64rem 0.7rem;
  }

  .live-start-grid .segmented {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.36rem;
    width: 100%;
    max-width: 100%;
  }

  .live-start-grid .segmented legend,
  .play-scope-grid legend,
  .game-choice-grid legend {
    font-size: 0.72rem;
    padding-bottom: 0.1rem;
  }

  .live-start-grid .segmented label {
    justify-content: center;
    min-height: 2.48rem;
    border-radius: 0.62rem;
    font-size: 0.76rem;
    padding: 0.45rem 0.34rem;
  }

  .play-scope-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 0.08rem;
  }

  .play-scope-card {
    min-height: 4.15rem;
    border-radius: 0.74rem;
    padding: 0.66rem;
  }

  .play-scope-card small {
    font-size: 0.74rem;
  }

  .game-choice-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.48rem;
    width: 100%;
    max-width: 100%;
  }

  .game-choice-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    min-height: 4.15rem;
    border-radius: 0.76rem;
    padding: 0.66rem;
  }

  .game-choice-radio {
    position: static;
    order: 2;
    justify-self: end;
    width: 1.08rem;
    height: 1.08rem;
  }

  .game-choice-card > span:last-child {
    order: 1;
  }

  .game-choice-radio input {
    width: 0.68rem;
    min-height: 0.68rem;
  }

  .game-choice-card strong {
    max-width: 100%;
    font-size: 0.84rem;
    line-height: 1.08;
  }

  .game-choice-card small {
    display: none;
  }

  .game-card-meta {
    gap: 0.28rem;
    margin-top: 0.5rem;
  }

  .game-card-meta em {
    max-width: 100%;
    overflow: hidden;
    border-radius: 0.45rem;
    font-size: 0.62rem;
    padding: 0.26rem 0.34rem;
    text-overflow: ellipsis;
  }

  .game-card-meta em:first-child {
    display: none;
  }

  .team-name-grid,
  .team-player-assignment {
    gap: 0.48rem;
  }

  .team-player-assignment label {
    grid-template-columns: minmax(0, 1fr) 6.4rem;
    border-radius: 0.64rem;
    padding: 0.54rem;
  }

  .game-logic-deck {
    display: none;
  }

  .live-player-chips {
    gap: 0.34rem;
  }

  .live-player-chips span {
    font-size: 0.72rem;
    padding: 0.32rem 0.48rem;
  }

  .live-round-launcher .primary-action {
    position: static;
    width: 100%;
    min-height: 3.08rem;
    border-radius: 0.78rem;
    box-shadow: 0 0.85rem 1.7rem rgba(21, 153, 71, 0.22);
  }

  .game-preview-wall {
    gap: 0.62rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.1rem 0 0;
  }

  .game-preview-wall .section-head {
    margin: 0;
  }

  .game-preview-wall .section-head h3 {
    font-size: 1rem;
  }

  .game-preview-wall .section-head p {
    display: none;
  }

  .game-preview-grid {
    display: grid;
    grid-auto-columns: minmax(15.8rem, 82%);
    grid-auto-flow: column;
    gap: 0.58rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.12rem;
    scroll-snap-type: x mandatory;
  }

  .game-preview-card {
    border-radius: 0.82rem;
    padding: 0.68rem;
    scroll-snap-align: start;
  }

  .game-preview-meta strong {
    font-size: 0.92rem;
  }

  .game-preview-screen {
    border-radius: 0.68rem;
    padding: 0.56rem;
  }

  .game-preview-topline {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .game-preview-topline strong {
    display: none;
    width: fit-content;
  }

  .game-preview-rows div {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.46rem;
  }

  .game-preview-rows small,
  .game-preview-rows em {
    display: none;
  }

  .game-preview-card p {
    font-size: 0.72rem;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: 0.48rem;
    left: 0.48rem;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.12rem;
    overflow: visible;
    border-radius: 0.82rem;
    padding: 0.24rem;
  }

  .mobile-tab {
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.08rem;
    border-radius: 0.62rem;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0.3rem 0.08rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-tab .nav-icon {
    width: 1.02rem;
    height: 1.02rem;
  }

  .mobile-tab.is-active {
    border-radius: 0.62rem;
  }

  .live-round-tracker {
    border-radius: 0.82rem;
    padding: 0.56rem;
  }

  .live-keypad-panel {
    bottom: 4.45rem;
    border-radius: 0.82rem;
  }
}

/* Mobile play redesign: app-like, less desktop chrome, faster to start a round. */
@media (max-width: 639px) {
  body {
    background: #f3f6f1;
  }

  .app-shell {
    gap: 0;
    padding: 0 0 4.7rem;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 4.7rem);
    border: 0;
    border-radius: 0;
    background: #f6f8f3;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.62rem;
    align-items: center;
    border-bottom: 1px solid rgba(207, 216, 209, 0.9);
    background: rgba(251, 252, 248, 0.96);
    padding: 0.7rem 0.78rem;
  }

  .topbar h2 {
    overflow: hidden;
    font-size: 1.08rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .eyebrow {
    overflow: hidden;
    font-size: 0.62rem;
    margin-bottom: 0.16rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 0.36rem;
    justify-content: end;
  }

  .topbar-actions .secondary-action,
  .topbar-actions .notification-pill {
    display: none;
  }

  .add-action {
    min-height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.82rem;
    padding: 0.48rem 0.72rem;
  }

  .add-action span {
    width: 1.05rem;
    height: 1.05rem;
    font-size: 0.72rem;
  }

  .avatar-pill {
    width: 2.34rem;
    height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.78rem;
  }

  .view-hero-play {
    display: none;
  }

  .view-hero:not(.view-hero-play) {
    min-height: 0;
    margin: 0.72rem;
    padding: 0.86rem;
  }

  .view-hero:not(.view-hero-play) .hero-visual-shell {
    display: none;
  }

  .view-hero:not(.view-hero-play) .hero-copy {
    padding: 0;
  }

  .view-hero:not(.view-hero-play) .hero-copy h2 {
    max-width: none;
    font-size: 1.36rem;
  }

  .view-hero:not(.view-hero-play) .hero-copy p:not(.eyebrow),
  .view-hero:not(.view-hero-play) .hero-actions {
    display: none;
  }

  .panel {
    padding: 0.72rem 0.72rem 1rem;
  }

  .play-workflow {
    gap: 0.72rem;
  }

  .play-workflow > .play-command-card {
    display: none;
  }

  .live-round-launcher {
    gap: 0.68rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    overflow: hidden;
    border: 1px solid rgba(7, 19, 22, 0.9);
    border-radius: 0.82rem;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(135deg, #061113, #10251e 64%, #234615);
    background-size: 2rem 2rem, 2rem 2rem, auto;
    padding: 0.9rem;
  }

  .live-launch-head .eyebrow {
    color: #8af0a9;
  }

  .live-launch-head h3 {
    color: #ffffff;
    font-size: 1.24rem;
    line-height: 1.04;
    max-width: 11rem;
  }

  .live-launch-head p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    line-height: 1.28;
    margin-top: 0.38rem;
  }

  .live-launch-head .status-pill {
    border-color: rgba(139, 240, 169, 0.35);
    background: rgba(139, 240, 169, 0.14);
    color: #d7ffdf;
  }

  .game-recording-note,
  .game-logic-deck,
  .team-setup-panel,
  .skins-setup-panel {
    border-radius: 0.76rem;
  }

  .game-recording-note {
    grid-template-columns: 1fr;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
  }

  .game-recording-note span {
    font-size: 0.76rem;
  }

  .game-setup-step {
    gap: 0.52rem;
    border-top: 0;
    padding-top: 0.18rem;
  }

  .game-step-marker {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }

  .game-setup-step h4 {
    font-size: 0.9rem;
  }

  .game-setup-step p {
    display: none;
  }

  .live-start-grid {
    gap: 0.58rem;
  }

  .live-start-grid label {
    font-size: 0.76rem;
  }

  .live-start-grid input,
  .live-start-grid select {
    min-height: 2.72rem;
    font-size: 0.86rem;
    padding: 0.64rem 0.7rem;
  }

  .live-start-grid .segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.36rem;
  }

  .live-start-grid .segmented legend,
  .play-scope-grid legend,
  .game-choice-grid legend {
    font-size: 0.72rem;
    padding-bottom: 0.1rem;
  }

  .live-start-grid .segmented label {
    justify-content: center;
    min-height: 2.48rem;
    border-radius: 0.62rem;
    font-size: 0.76rem;
    padding: 0.45rem 0.34rem;
  }

  .play-scope-grid {
    display: grid;
    grid-auto-columns: minmax(13.5rem, 86%);
    grid-auto-flow: column;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.08rem;
    scroll-snap-type: x proximity;
  }

  .play-scope-card {
    min-height: 4.15rem;
    border-radius: 0.74rem;
    padding: 0.66rem;
    scroll-snap-align: start;
  }

  .play-scope-card small {
    font-size: 0.74rem;
  }

  .game-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
  }

  .game-choice-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    min-height: 6.05rem;
    border-radius: 0.76rem;
    padding: 0.66rem;
  }

  .game-choice-radio {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 1.08rem;
    height: 1.08rem;
  }

  .game-choice-radio input {
    width: 0.68rem;
    min-height: 0.68rem;
  }

  .game-choice-card strong {
    max-width: calc(100% - 1.5rem);
    font-size: 0.84rem;
    line-height: 1.08;
  }

  .game-choice-card small {
    display: none;
  }

  .game-card-meta {
    gap: 0.28rem;
    margin-top: 0.5rem;
  }

  .game-card-meta em {
    max-width: 100%;
    overflow: hidden;
    border-radius: 0.45rem;
    font-size: 0.62rem;
    padding: 0.26rem 0.34rem;
    text-overflow: ellipsis;
  }

  .game-card-meta em:first-child {
    display: none;
  }

  .team-name-grid,
  .team-player-assignment {
    gap: 0.48rem;
  }

  .team-player-assignment label {
    grid-template-columns: minmax(0, 1fr) 6.4rem;
    border-radius: 0.64rem;
    padding: 0.54rem;
  }

  .game-logic-deck {
    display: none;
  }

  .live-player-chips {
    gap: 0.34rem;
  }

  .live-player-chips span {
    font-size: 0.72rem;
    padding: 0.32rem 0.48rem;
  }

  .live-round-launcher .primary-action {
    position: sticky;
    bottom: 4.55rem;
    z-index: 8;
    min-height: 3.08rem;
    border-radius: 0.78rem;
    box-shadow: 0 0.85rem 1.7rem rgba(21, 153, 71, 0.22);
  }

  .game-preview-wall {
    gap: 0.62rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.1rem 0 0;
  }

  .game-preview-wall .section-head {
    margin: 0;
  }

  .game-preview-wall .section-head h3 {
    font-size: 1rem;
  }

  .game-preview-wall .section-head p {
    display: none;
  }

  .game-preview-grid {
    display: grid;
    grid-auto-columns: minmax(17rem, 88%);
    grid-auto-flow: column;
    gap: 0.58rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.12rem;
    scroll-snap-type: x mandatory;
  }

  .game-preview-card {
    border-radius: 0.82rem;
    padding: 0.68rem;
    scroll-snap-align: start;
  }

  .game-preview-meta strong {
    font-size: 0.92rem;
  }

  .game-preview-screen {
    border-radius: 0.68rem;
    padding: 0.56rem;
  }

  .game-preview-topline {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .game-preview-topline strong {
    width: fit-content;
  }

  .game-preview-rows div {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.46rem;
  }

  .game-preview-rows small,
  .game-preview-rows em {
    display: none;
  }

  .game-preview-card p {
    font-size: 0.72rem;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: 0.48rem;
    left: 0.48rem;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.12rem;
    overflow: visible;
    border-radius: 0.82rem;
    padding: 0.24rem;
  }

  .mobile-tab {
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.08rem;
    border-radius: 0.62rem;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0.3rem 0.08rem;
  }

  .mobile-tab .nav-icon {
    width: 1.02rem;
    height: 1.02rem;
  }

  .mobile-tab.is-active {
    border-radius: 0.62rem;
  }

  .live-round-tracker {
    border-radius: 0.82rem;
    padding: 0.56rem;
  }

  .live-keypad-panel {
    bottom: 4.45rem;
    border-radius: 0.82rem;
  }
}

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

.live-round-launcher {
  display: grid;
  gap: 0.95rem;
  overflow: hidden;
  border: 1px solid #dce8de;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(43, 191, 91, 0.1), transparent 38%),
    #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.play-workflow {
  display: grid;
  gap: 0.95rem;
}

.play-command-card,
.play-in-progress-card {
  display: grid;
  gap: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(7, 19, 22, 0.92);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #071316 0%, #10251e 58%, #244b22 100%);
  background-size: 2.25rem 2.25rem, 2.25rem 2.25rem, auto;
  color: #ffffff;
  box-shadow: 0 1.1rem 2.55rem rgba(7, 19, 22, 0.18);
  padding: 1rem;
}

.play-command-card .eyebrow,
.play-in-progress-card .eyebrow {
  color: #7ce29c;
}

.play-command-card h3,
.play-in-progress-card h3 {
  color: #ffffff;
  font-size: 1.22rem;
  line-height: 1.1;
  margin: 0.1rem 0 0;
}

.play-command-card p,
.play-in-progress-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.play-command-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.play-command-card div,
.play-command-card dl div {
  min-width: 0;
}

.play-command-card dt {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.play-command-card dd {
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 840;
  line-height: 1.1;
  margin: 0.12rem 0 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-in-progress-card {
  align-items: center;
}

.play-in-progress-card .primary-action {
  width: 100%;
}

.live-launch-head {
  display: grid;
  gap: 0.68rem;
}

.live-launch-head h3 {
  color: var(--ink);
  font-size: 1.08rem;
  margin-top: 0.12rem;
}

.live-launch-head p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.28rem;
}

.live-player-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.live-player-chips span {
  border: 1px solid #dce8de;
  border-radius: 999px;
  background: #f5faf6;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 820;
  padding: 0.38rem 0.62rem;
}

.game-recording-note {
  display: grid;
  gap: 0.18rem;
  border: 1px solid #cfe8d5;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(43, 191, 91, 0.12), rgba(43, 191, 91, 0.03)),
    #fbfefb;
  padding: 0.78rem;
}

.game-recording-note strong {
  color: var(--green-dark);
  font-size: 0.9rem;
  line-height: 1.15;
}

.game-recording-note span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 620;
  line-height: 1.32;
}

.game-setup-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  border-top: 1px solid #edf3ee;
  padding-top: 0.82rem;
}

.game-setup-step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.game-step-marker {
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 860;
}

.game-setup-step h4 {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.16;
  margin: 0;
}

.game-setup-step p {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0.15rem 0 0;
}

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

.play-scope-grid {
  display: grid;
  gap: 0.55rem;
  border: 0;
  margin: 0;
  padding: 0;
}

.play-scope-grid legend {
  color: var(--muted);
  font-weight: 820;
  padding: 0 0 0.18rem;
}

.play-scope-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
  border: 1px solid #dde8e0;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 0.78rem;
}

.play-scope-card:has(input:checked) {
  border-color: #8fd4a1;
  background: #f6fcf8;
  box-shadow: inset 0 0 0 1px rgba(43, 191, 91, 0.14);
}

.play-scope-card input {
  width: 1rem;
  min-height: 1rem;
  margin-top: 0.1rem;
  accent-color: var(--green);
}

.play-scope-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.14;
}

.play-scope-card small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 560;
  line-height: 1.3;
  margin-top: 0.16rem;
}

.game-choice-grid {
  display: grid;
  gap: 0.58rem;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.game-choice-grid legend {
  color: var(--muted);
  font-weight: 820;
  padding: 0 0 0.18rem;
}

.game-choice-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
  min-height: 5.15rem;
  border: 1px solid #dfe9e2;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0.82rem;
}

.game-choice-card:has(input:checked) {
  border-color: #95d7a6;
  background:
    linear-gradient(135deg, rgba(43, 191, 91, 0.14), transparent 58%),
    #f8fdf9;
  box-shadow: inset 0 0 0 1px rgba(43, 191, 91, 0.18);
}

.skins-choice-card:has(input:checked) {
  border-color: #eccb72;
  background:
    linear-gradient(135deg, rgba(255, 195, 51, 0.22), rgba(43, 191, 91, 0.08)),
    #fffdf7;
}

.game-choice-radio {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid #cad6cf;
  border-radius: 999px;
  background: #ffffff;
}

.game-choice-radio input {
  width: 0.86rem;
  min-height: 0.86rem;
  accent-color: var(--green);
}

.game-choice-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.14;
}

.game-choice-card small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 520;
  line-height: 1.34;
  margin-top: 0.2rem;
}

.game-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.game-card-meta em {
  border: 1px solid #dce8de;
  border-radius: 999px;
  background: #f6faf7;
  color: var(--green-dark);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 840;
  line-height: 1;
  padding: 0.3rem 0.42rem;
  white-space: nowrap;
}

.skins-setup-panel {
  display: none;
  gap: 0.65rem;
  border: 1px solid #eadfbf;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 195, 51, 0.16), rgba(43, 191, 91, 0.06)),
    #fffdf7;
  padding: 0.78rem;
}

.live-round-launcher:has(input[name="game_mode"][value="skins"]:checked) .skins-setup-panel,
.live-round-launcher:has(input[name="game_mode"][value="skins"]:checked) .live-skins-value {
  display: grid;
}

.team-setup-panel {
  display: none;
  gap: 0.72rem;
  border: 1px solid #dbe5de;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(7, 19, 22, 0.05), rgba(43, 191, 91, 0.06)),
    #ffffff;
  padding: 0.82rem;
}

.live-round-launcher:has(input[name="game_mode"][value="match_play"]:checked) .team-setup-panel,
.live-round-launcher:has(input[name="game_mode"][value="scramble"]:checked) .team-setup-panel,
.live-round-launcher:has(input[name="game_mode"][value="four_ball"]:checked) .team-setup-panel {
  display: grid;
}

.team-setup-head {
  display: grid;
  gap: 0.4rem;
}

.team-setup-head h4 {
  color: var(--ink);
  font-size: 0.98rem;
  margin: 0.1rem 0 0;
}

.team-setup-head > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.team-name-grid,
.team-player-assignment {
  display: grid;
  gap: 0.55rem;
}

.team-player-assignment label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
  gap: 0.65rem;
  align-items: center;
  border: 1px solid #e5eee8;
  border-radius: var(--radius);
  background: #fbfdfb;
  padding: 0.62rem;
}

.team-player-assignment strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-player-assignment small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  margin-top: 0.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-logic-deck {
  display: grid;
  gap: 0.7rem;
  border: 1px solid #e1ece4;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 0.82rem;
}

.compact-head {
  margin: 0;
}

.game-logic-grid {
  display: grid;
  gap: 0.55rem;
}

.game-logic-card {
  display: grid;
  gap: 0.5rem;
  border: 1px solid #edf3ee;
  border-radius: var(--radius);
  background: #fbfdfb;
  padding: 0.68rem;
}

.game-logic-card > div {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}

.game-logic-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.game-logic-card strong {
  overflow: hidden;
  color: var(--green-dark);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-logic-card ol {
  display: grid;
  gap: 0.26rem;
  margin: 0;
  padding-left: 1.05rem;
}

.game-logic-card li {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 590;
  line-height: 1.28;
}

.skins-rule-preview {
  display: grid;
  gap: 0.45rem;
}

.skins-rule-preview div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.48rem;
  align-items: center;
}

.skins-rule-preview span {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--amber);
  color: #15170f;
  font-size: 0.78rem;
  font-weight: 860;
}

.skins-rule-preview strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-preview-wall {
  display: grid;
  gap: 0.85rem;
  border: 1px solid #dce8de;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.game-preview-grid {
  display: grid;
  gap: 0.72rem;
}

.game-preview-card {
  display: grid;
  gap: 0.62rem;
  min-width: 0;
  border: 1px solid #e1ebe4;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(43, 191, 91, 0.06), transparent 42%),
    #fbfdfc;
  padding: 0.78rem;
}

.game-preview-meta {
  display: grid;
  gap: 0.1rem;
}

.game-preview-meta span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.game-preview-meta strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.14;
}

.game-preview-screen {
  display: grid;
  gap: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(7, 19, 22, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(41, 217, 116, 0.07) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(41, 217, 116, 0.05) 0 1px, transparent 1px 100%),
    #071316;
  background-size: 2rem 2rem, 2rem 2rem, auto;
  color: #ffffff;
  padding: 0.68rem;
}

.game-preview-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.game-preview-topline span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-preview-topline strong {
  border-radius: 999px;
  background: rgba(41, 217, 116, 0.18);
  color: #8df0a9;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 0.28rem 0.46rem;
  white-space: nowrap;
}

.game-preview-rows {
  display: grid;
  gap: 0.34rem;
}

.game-preview-rows div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(3.2rem, auto) minmax(3.1rem, auto) minmax(3.2rem, auto);
  gap: 0.42rem;
  align-items: center;
  min-height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  padding: 0.45rem;
}

.game-preview-rows span,
.game-preview-rows small,
.game-preview-rows strong,
.game-preview-rows em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-preview-rows span {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.game-preview-rows small,
.game-preview-rows em {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 720;
}

.game-preview-rows strong {
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 850;
}

.game-preview-scorebar {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  border-radius: var(--radius);
  background: var(--live-green, #18b85d);
  color: #ffffff;
  padding: 0.5rem 0.58rem;
}

.game-preview-scorebar span,
.game-preview-scorebar strong {
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-preview-card p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 620;
  line-height: 1.3;
  margin: 0;
}

.live-round-tracker {
  --live-bg: #050908;
  --live-panel: #0c1511;
  --live-panel-2: #111c17;
  --live-green: #18b85d;
  --live-green-bright: #29d974;
  --live-amber: #ffc333;
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(5, 9, 8, 0.94);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(41, 217, 116, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(41, 217, 116, 0.06) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 86% 4%, rgba(41, 217, 116, 0.16), transparent 16rem),
    var(--live-bg);
  background-size: 3rem 3rem, 3rem 3rem, auto, auto;
  color: #ffffff;
  box-shadow: 0 1.2rem 3rem rgba(5, 9, 8, 0.22);
  padding: 0.75rem;
}

.live-round-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}

.live-round-top h3 {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-round-top p:not(.eyebrow) {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
  margin-top: 0.18rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-round-top .eyebrow {
  color: var(--live-green-bright);
}

.live-back-button,
.live-round-top .ghost-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.live-back-button {
  min-height: 2.45rem;
  padding: 0.45rem 0.68rem;
}

.live-round-top .ghost-button {
  grid-column: 1 / -1;
}

.live-round-meter {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(41, 217, 116, 0.22);
  border-radius: var(--radius);
  background: rgba(41, 217, 116, 0.08);
  padding: 0.55rem 0.7rem;
}

.live-round-meter span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.74rem;
  font-weight: 820;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-round-meter strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.live-hole-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  border-radius: var(--radius);
  background: var(--live-amber);
  color: #171a12;
  padding: 0.35rem;
}

.live-hole-bar button {
  min-height: 2.55rem;
  border-color: rgba(23, 26, 18, 0.1);
  background: rgba(255, 255, 255, 0.28);
  color: #171a12;
  box-shadow: none;
  padding: 0.45rem 0.65rem;
}

.live-hole-bar button:hover,
.live-hole-bar button:focus-visible,
.live-player-row:hover,
.live-player-row:focus-visible,
.live-keypad button:hover,
.live-keypad button:focus-visible {
  transform: none;
}

.live-hole-bar div {
  display: grid;
  justify-items: center;
  min-width: 0;
  line-height: 1.05;
}

.live-hole-bar span {
  color: rgba(23, 26, 18, 0.68);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.live-hole-bar strong {
  overflow: hidden;
  max-width: 100%;
  color: #0b0e0a;
  font-size: 1.18rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-hole-strip {
  display: grid;
  grid-auto-columns: minmax(3.55rem, 1fr);
  grid-auto-flow: column;
  gap: 0.38rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scroll-snap-type: x proximity;
}

.live-hole-strip button {
  display: grid;
  gap: 0.04rem;
  justify-items: center;
  min-height: 3.3rem;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  padding: 0.45rem 0.35rem;
  scroll-snap-align: start;
}

.live-hole-strip button.is-active {
  border-color: rgba(41, 217, 116, 0.78);
  background: var(--live-green);
  color: #ffffff;
}

.live-hole-strip span {
  font-size: 1rem;
  font-weight: 900;
}

.live-hole-strip small {
  font-size: 0.68rem;
  font-weight: 760;
}

.live-score-board {
  display: grid;
  gap: 0.46rem;
}

.live-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem 3.05rem;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  min-height: 4.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  box-shadow: none;
  padding: 0.62rem;
  text-align: left;
}

.live-player-row.is-active {
  border-color: rgba(41, 217, 116, 0.86);
  background:
    linear-gradient(90deg, rgba(41, 217, 116, 0.82), rgba(24, 184, 93, 0.64)),
    var(--live-panel-2);
}

.live-player-name {
  display: grid;
  min-width: 0;
}

.live-player-name strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 860;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-player-name small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 780;
  margin-top: 0.18rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-player-row.is-active .live-player-name small {
  color: rgba(255, 255, 255, 0.84);
}

.live-total,
.live-current-score {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 3.05rem;
  height: 3.05rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.live-total {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.live-total.is-under {
  background: var(--live-green);
  color: #ffffff;
}

.live-total.is-even {
  background: #ffffff;
  color: #0a120e;
}

.live-total.is-over {
  background: var(--live-amber);
  color: #161810;
}

.live-current-score {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.live-current-score.is-empty {
  color: rgba(255, 255, 255, 0.42);
}

.live-current-score.is-scored {
  background: rgba(255, 255, 255, 0.92);
  color: #0a120e;
}

.live-current-term {
  grid-column: 2 / 4;
  justify-self: end;
  overflow: hidden;
  max-width: 7rem;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.72rem;
  font-weight: 790;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-player-row.is-active .live-current-term {
  color: rgba(255, 255, 255, 0.82);
}

.live-keypad-panel {
  position: sticky;
  bottom: 5.35rem;
  z-index: 5;
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(5, 9, 8, 0.94);
  box-shadow: 0 -0.6rem 2rem rgba(0, 0, 0, 0.25);
  padding: 0.6rem;
  backdrop-filter: blur(16px);
}

.live-selected-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.live-selected-player span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 820;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-selected-player strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 860;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.live-keypad button {
  display: grid;
  gap: 0.06rem;
  justify-items: center;
  min-height: 4.35rem;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #4a504d;
  color: #ffffff;
  box-shadow: none;
  padding: 0.5rem 0.25rem;
}

.live-keypad button strong {
  font-size: 1.62rem;
  font-weight: 820;
  line-height: 1;
}

.live-keypad button span {
  overflow: hidden;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-keypad button.is-par {
  border-color: rgba(41, 217, 116, 0.8);
  background: var(--live-green);
}

.live-keypad button.is-clear {
  border-color: rgba(255, 195, 51, 0.92);
  background: var(--live-amber);
  color: #161810;
}

.live-keypad button.is-clear span {
  color: rgba(22, 24, 16, 0.72);
}

.live-finish-note {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 790;
  padding: 0.72rem;
  text-align: center;
}

.live-game-panel {
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(41, 217, 116, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(41, 217, 116, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 0.72rem;
}

.live-game-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.live-game-panel-head .eyebrow {
  color: var(--live-green-bright);
}

.live-game-panel-head h3 {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-game-panel-head p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 0.18rem;
}

.live-game-panel-head > span {
  border: 1px solid rgba(41, 217, 116, 0.34);
  border-radius: 999px;
  background: rgba(41, 217, 116, 0.12);
  color: #96f2ae;
  font-size: 0.72rem;
  font-weight: 860;
  padding: 0.32rem 0.5rem;
  white-space: nowrap;
}

.live-game-explainer,
.live-game-storage-note {
  display: grid;
  gap: 0.12rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.62rem;
}

.live-game-explainer strong,
.live-game-storage-note strong {
  color: #ffffff;
  font-size: 0.86rem;
  line-height: 1.2;
}

.live-game-explainer span,
.live-game-storage-note span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.live-game-rank-list,
.live-game-teams {
  display: grid;
  gap: 0.42rem;
}

.live-game-rank-list div,
.live-game-teams div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.48rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 0.52rem 0.58rem;
}

.live-game-rank-list span {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: rgba(41, 217, 116, 0.18);
  color: #96f2ae;
  font-size: 0.75rem;
  font-weight: 880;
}

.live-game-rank-list strong,
.live-game-teams strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-game-rank-list small,
.live-game-teams span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 780;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-game-teams div {
  grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr);
}

.live-game-teams strong {
  text-align: right;
}

.skins-panel {
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(255, 195, 51, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 195, 51, 0.14), rgba(41, 217, 116, 0.06)),
    rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 0.72rem;
}

.skins-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.skins-panel-head .eyebrow {
  color: var(--live-amber);
}

.skins-panel-head h3 {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skins-panel-head > span {
  border: 1px solid rgba(255, 195, 51, 0.34);
  border-radius: 999px;
  background: rgba(255, 195, 51, 0.12);
  color: #ffe3a0;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 0.34rem 0.55rem;
  white-space: nowrap;
}

.skins-pot-hero {
  display: grid;
  gap: 0.1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 195, 51, 0.44);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 195, 51, 0.32), rgba(41, 217, 116, 0.12)),
    rgba(255, 255, 255, 0.08);
  padding: 0.78rem;
}

.skins-pot-hero > span {
  color: #ffe3a0;
  font-size: 0.72rem;
  font-weight: 860;
  text-transform: uppercase;
}

.skins-pot-hero strong {
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1.02;
}

.skins-pot-hero small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 710;
}

.skins-current-hole {
  display: grid;
  gap: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
  padding: 0.72rem;
}

.skins-current-hole.is-won {
  border-color: rgba(41, 217, 116, 0.42);
  background: rgba(41, 217, 116, 0.14);
}

.skins-current-hole.is-carry {
  border-color: rgba(255, 195, 51, 0.45);
  background: rgba(255, 195, 51, 0.12);
}

.skins-current-hole > span,
.skins-stat-row span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.skins-current-hole strong {
  color: #ffffff;
  font-size: 0.94rem;
  line-height: 1.2;
}

.skins-current-hole small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 730;
}

.skins-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.skins-stat-row div {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 0.58rem;
}

.skins-stat-row strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skins-hole-status-list {
  display: grid;
  gap: 0.42rem;
}

.skins-hole-status-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.4rem minmax(4.6rem, auto);
  gap: 0.48rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 0.5rem 0.58rem;
}

.skins-hole-status-list div.is-live {
  border-color: rgba(41, 217, 116, 0.36);
  background: rgba(41, 217, 116, 0.12);
}

.skins-hole-status-list span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.83rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skins-hole-status-list strong {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 860;
}

.skins-hole-status-list small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 760;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.skins-leaderboard {
  display: grid;
  gap: 0.38rem;
}

.skins-leaderboard h4 {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  font-weight: 840;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.skins-leaderboard div,
.round-game-pills span {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.62rem;
}

.skins-leaderboard span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skins-leaderboard strong {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 870;
  white-space: nowrap;
}

.skins-hole-ledger {
  display: grid;
  grid-auto-columns: minmax(2.75rem, 1fr);
  grid-auto-flow: column;
  gap: 0.34rem;
  overflow-x: auto;
  padding-bottom: 0.08rem;
}

.skins-hole-ledger button {
  display: grid;
  gap: 0.05rem;
  justify-items: center;
  min-height: 2.85rem;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.24rem;
}

.skins-hole-ledger button.is-active {
  outline: 2px solid rgba(255, 255, 255, 0.26);
  outline-offset: 1px;
}

.skins-hole-ledger button.is-won {
  border-color: rgba(41, 217, 116, 0.42);
  background: rgba(41, 217, 116, 0.18);
  color: #ffffff;
}

.skins-hole-ledger button.is-carry {
  border-color: rgba(255, 195, 51, 0.5);
  background: rgba(255, 195, 51, 0.16);
  color: #ffe3a0;
}

.skins-hole-ledger span {
  font-size: 0.72rem;
  font-weight: 760;
}

.skins-hole-ledger strong {
  font-size: 0.86rem;
  font-weight: 880;
}

.round-game-summary {
  display: grid;
  gap: 0.68rem;
  border: 1px solid #e7d7a8;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 195, 51, 0.14), rgba(43, 191, 91, 0.06)),
    #fffefa;
  margin-top: 0.72rem;
  padding: 0.78rem;
}

.round-game-summary h4 {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.16;
  margin: 0;
}

.round-game-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.round-game-pills {
  display: grid;
  gap: 0.42rem;
}

.round-game-pills span {
  border-color: #eadfbf;
  background: #ffffff;
  color: var(--ink);
}

.round-game-pills strong {
  color: var(--green-dark);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

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

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

  .team-setup-head,
  .team-name-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

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

  .play-command-card,
  .play-in-progress-card {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.55fr);
    align-items: center;
  }

  .play-in-progress-card .primary-action {
    justify-self: end;
    width: auto;
  }

  .live-round-tracker {
    gap: 0.9rem;
    padding: 0.9rem;
  }

  .live-round-top {
    grid-template-columns: auto minmax(0, 1fr) minmax(7.8rem, auto) auto;
  }

  .live-round-meter,
  .live-round-top .ghost-button {
    grid-column: auto;
  }

  .live-player-row {
    grid-template-columns: minmax(0, 1fr) 3.5rem 3.4rem 6rem;
    min-height: 4.4rem;
  }

  .live-current-term {
    grid-column: auto;
    max-width: 6rem;
  }

  .live-keypad-panel {
    bottom: 1rem;
    grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .live-selected-player {
    align-content: center;
    grid-template-columns: 1fr;
  }

  .live-selected-player strong {
    text-align: left;
  }

  .skins-panel {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.46fr);
    align-items: start;
  }

  .skins-panel-head,
  .skins-pot-hero,
  .skins-current-hole,
  .skins-stat-row,
  .skins-hole-status-list,
  .skins-hole-ledger {
    grid-column: 1;
  }

  .skins-leaderboard {
    grid-column: 2;
    grid-row: 1 / span 6;
  }

  .round-game-summary {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr);
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .capture-route-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .game-choice-grid,
  .game-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-keypad button {
    min-height: 4rem;
  }
}

/* Final type tune: polished SaaS weight rather than prototype-bold. */
button {
  font-weight: 780;
}

h1,
h2,
h3,
.brand-wordmark,
.hero-copy h2,
.metric-copy strong,
.section-head h3,
.round-record-head h3,
.round-row h4,
.result-row h4,
.player-row h4 {
  font-weight: 820;
}

.sidebar-kicker,
.eyebrow,
.status-pill,
.pill,
.invite-code,
.key-status,
.hero-stat-panel span,
.metric-copy span,
.metric-copy small,
.row-badges span,
.player-meta span,
.round-row-value span,
th {
  font-weight: 760;
}

.hero-copy p:not(.eyebrow),
.section-head p,
.round-record-head p,
.round-row p,
.result-row p,
.player-row p,
td {
  font-weight: 560;
}

.hero-stat-panel strong,
.player-meta strong,
.round-row-value strong,
.definition-list dd,
.score-thumb,
.result-rank,
.player-avatar,
.profile-avatar-large,
.avatar-pill {
  font-weight: 820;
}

/* Crisp depth pass: layered product objects instead of flat dashboard panels. */
.workspace {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 247, 0.96)),
    var(--panel);
}

.topbar {
  box-shadow: inset 0 -1px 0 rgba(7, 19, 22, 0.02);
}

.view-hero {
  min-height: 23rem;
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #061113 0%, #0b231d 50%, #164128 100%);
  background-size: 2.6rem 2.6rem, 2.6rem 2.6rem, auto;
  box-shadow:
    0 1.2rem 2.5rem rgba(5, 17, 19, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.view-hero::before {
  left: 2rem;
  right: 2rem;
  bottom: 2.6rem;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(-5deg);
}

.hero-copy {
  align-content: end;
  padding-top: 4.4rem;
}

.hero-copy h2 {
  max-width: 12ch;
  font-size: 2rem;
  line-height: 1.02;
}

.hero-copy p:not(.eyebrow) {
  max-width: 34rem;
}

.hero-visual-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  min-height: 16rem;
}

.scorecard-art {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(7, 19, 22, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 19, 22, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #ffffff 0%, #f5faf3 100%);
  background-size: 1.65rem 1.65rem, 1.65rem 1.65rem, auto;
  color: var(--ink);
  box-shadow:
    0 1.2rem 2.3rem rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 0.88rem;
  transform: rotate(-1deg);
}

.scorecard-art::before {
  content: "";
  position: absolute;
  inset: auto -10% -18% 8%;
  height: 45%;
  background:
    linear-gradient(90deg, rgba(21, 153, 71, 0.18), rgba(36, 107, 254, 0.12)),
    #e7f5e7;
  border-radius: 999px 999px 0 0;
  transform: rotate(-7deg);
}

.scorecard-art-top,
.scorecard-art-grid,
.scorecard-art-lines {
  position: relative;
  z-index: 1;
}

.scorecard-art-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(7, 19, 22, 0.1);
  padding-bottom: 0.7rem;
}

.scorecard-art-top span {
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.scorecard-art-top strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 820;
}

.scorecard-art-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.24rem;
  margin-top: 0.86rem;
}

.scorecard-art-grid span {
  display: grid;
  place-items: center;
  min-height: 2rem;
  border: 1px solid rgba(7, 19, 22, 0.1);
  border-radius: 0.32rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 820;
}

.scorecard-art-grid span:nth-child(3),
.scorecard-art-grid span:nth-child(6) {
  background: var(--green);
  color: #ffffff;
}

.scorecard-art-lines {
  display: grid;
  gap: 0.42rem;
  margin-top: 1.1rem;
  max-width: 72%;
}

.scorecard-art-lines span {
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(7, 19, 22, 0.12);
}

.scorecard-art-lines span:nth-child(2) {
  width: 82%;
}

.scorecard-art-lines span:nth-child(3) {
  width: 56%;
}

.hero-stat-panel {
  box-shadow:
    0 0.9rem 1.8rem rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dashboard-card,
.metric,
.round-record,
.api-key-strip,
.confirmation-form,
.table-wrap {
  box-shadow:
    0 0.7rem 1.55rem rgba(7, 19, 22, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.dashboard-card,
.round-record,
.api-key-strip,
.confirmation-form {
  position: relative;
  overflow: hidden;
}

.dashboard-card::before,
.round-record::before,
.api-key-strip::before,
.confirmation-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green), rgba(36, 107, 254, 0.5), transparent);
  opacity: 0.72;
}

.metric {
  border-color: #e0e8e1;
  background:
    linear-gradient(180deg, #ffffff, #fbfcf8);
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--metric-accent, var(--green));
  opacity: 0.18;
}

.capture-panel {
  box-shadow:
    0 1.25rem 2.65rem rgba(5, 17, 19, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
  .view-hero {
    min-height: 18.5rem;
  }

  .hero-copy {
    padding-top: 1.4rem;
  }

  .hero-copy h2 {
    font-size: 2.18rem;
  }

  .hero-visual-shell {
    min-height: 16rem;
  }

  .scorecard-art {
    position: absolute;
    inset: 0.2rem 0.4rem 4.6rem 0;
    transform: rotate(-3deg);
  }

  .hero-stat-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 2.1rem;
  }
}

@media (min-width: 1024px) {
  .view-hero {
    min-height: 19.25rem;
  }

  .hero-copy h2 {
    font-size: 2.35rem;
  }
}

/* Mac-native crispness tune. */
:root {
  font-family: "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Avenir Next", sans-serif;
}

button,
.brand-wordmark,
h1,
h2,
h3,
.hero-copy h2,
.metric-copy strong,
.section-head h3,
.round-record-head h3,
.round-row h4,
.result-row h4,
.player-row h4,
.hero-stat-panel strong,
.player-meta strong,
.round-row-value strong,
.definition-list dd,
.score-thumb,
.result-rank,
.player-avatar,
.profile-avatar-large,
.avatar-pill {
  font-weight: 700;
}

.sidebar-kicker,
.eyebrow,
.status-pill,
.pill,
.invite-code,
.key-status,
.hero-stat-panel span,
.metric-copy span,
.metric-copy small,
.row-badges span,
.player-meta span,
.round-row-value span,
th {
  font-weight: 650;
}

.hero-copy p:not(.eyebrow),
.section-head p,
.round-record-head p,
.round-row p,
.result-row p,
.player-row p,
td {
  font-weight: 450;
}

.topbar h2 {
  font-weight: 720;
}

.course-admin-grid {
  display: grid;
  gap: 0.9rem;
}

.lookup-form,
.course-form,
.notification-actions,
.player-admin-list,
.player-admin-row form {
  display: grid;
  gap: 0.65rem;
}

.course-form {
  grid-template-columns: 1fr;
}

.course-table-card {
  min-width: 0;
}

.course-card-list {
  display: grid;
  gap: 0.7rem;
}

.course-row-card {
  display: grid;
  gap: 0.8rem;
  border: 1px solid #e2eae4;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #fbfcf8);
  padding: 0.85rem;
}

.course-row-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.course-row-card p {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.14rem;
}

.course-row-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.course-row-card dl div {
  border-radius: calc(var(--radius) - 0.12rem);
  background: #f5f8f5;
  padding: 0.58rem;
}

.course-row-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.course-row-card dd {
  overflow: hidden;
  margin: 0.12rem 0 0;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-card .definition-list dd {
  white-space: normal;
}

.notification-card {
  background:
    linear-gradient(135deg, rgba(21, 153, 71, 0.07), transparent 42%),
    #ffffff;
}

.notification-event-panel {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  border-top: 1px solid #e0e9e3;
  padding-top: 0.9rem;
}

.section-mini-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-mini-head small {
  color: #0f7a39;
  font: inherit;
  text-transform: none;
}

.notification-event-list {
  display: grid;
  gap: 0.5rem;
}

.notification-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  border: 1px solid #e0e9e3;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.75rem;
}

.notification-event-row span,
.notification-event-row em {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notification-event-row strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.15;
}

.notification-event-row p {
  margin: 0.25rem 0 0;
  color: #60706a;
  font-size: 0.82rem;
  line-height: 1.3;
}

.player-admin-row {
  border: 1px solid #e2eae4;
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 0.75rem;
}

.player-admin-row form {
  grid-template-columns: 1fr;
}

.player-admin-row button {
  width: 100%;
}

@media (min-width: 640px) {
  .lookup-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
  }

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

  .course-form button {
    grid-column: 1 / -1;
  }

  .notification-actions {
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: start;
  }

  .player-admin-row form {
    grid-template-columns: minmax(10rem, 1fr) 8rem auto auto;
    align-items: end;
  }
}

@media (min-width: 1024px) {
  .course-admin-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(19rem, 0.5fr);
  }

  .course-table-card {
    grid-column: 1 / -1;
  }

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

  .course-row-card {
    grid-template-columns: minmax(14rem, 0.45fr) minmax(0, 1fr);
    align-items: center;
  }

  .course-row-card dl {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Keep the hero crisp at the Codex side-browser/tablet width. */
.hero-action,
.hero-stat-panel,
.mobile-tabbar {
  backdrop-filter: none;
}

.hero-stat-panel {
  background: rgba(6, 17, 19, 0.86);
}

.hero-stat-panel div {
  background: rgba(255, 255, 255, 0.07);
}

@media (min-width: 640px) and (max-width: 899px) {
  .view-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding-top: 0.4rem;
  }

  .hero-copy h2 {
    max-width: none;
    font-size: 1.88rem;
  }

  .hero-visual-shell {
    min-height: 0;
  }

  .scorecard-art,
  .hero-stat-panel {
    position: relative;
    inset: auto;
    right: auto;
    bottom: auto;
    left: auto;
  }

  .scorecard-art {
    transform: rotate(-1deg);
  }

  .hero-stat-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  .view-hero {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.45fr);
  }
}

@media (min-width: 1024px) {
  .app-shell {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .topbar,
  .panel {
    padding: 1.35rem;
  }

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

  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.36fr);
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.68fr) minmax(15rem, 0.48fr);
  }
}

@media (max-width: 639px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar h2 {
    font-size: 1.45rem;
  }

  .round-row,
  .result-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .round-row-value {
    grid-column: 2;
    justify-items: start;
  }
}

/* Social Golf OS v2: mobile-first app polish */
:root {
  --ink: #071316;
  --ink-2: #102329;
  --text: #162023;
  --muted: #657273;
  --faint: #8b9897;
  --canvas: #f3f5f1;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --line: #dde5de;
  --line-strong: #c8d5cc;
  --green: #159947;
  --green-dark: #087a33;
  --green-soft: #e8f6ea;
  --blue: #246bfe;
  --blue-soft: #eaf1ff;
  --gold: #c98c16;
  --gold-soft: #fff5dd;
  --clay: #d8553d;
  --clay-soft: #fff0eb;
  --shadow: 0 1.25rem 2.75rem rgba(15, 31, 25, 0.1);
  --shadow-soft: 0 0.55rem 1.45rem rgba(15, 31, 25, 0.07);
  --radius: 0.5rem;
  font-family: "Satoshi", "Avenir Next", "Segoe UI", sans-serif;
}

html {
  background:
    linear-gradient(90deg, rgba(7, 19, 22, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcf8 0%, #eef3ec 100%);
  background-size: 3.25rem 3.25rem, auto;
}

body {
  min-width: 20rem;
  background: transparent;
  color: var(--text);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(243, 245, 241, 0.94)),
    linear-gradient(135deg, rgba(21, 153, 71, 0.08), transparent 36rem);
}

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

button,
select,
input {
  min-height: 2.95rem;
}

button {
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0.75rem 1rem;
  box-shadow: 0 0.55rem 1.15rem rgba(21, 153, 71, 0.16);
}

button:hover,
button:focus-visible {
  border-color: var(--green-dark);
  background: var(--green-dark);
  box-shadow: 0 0.75rem 1.45rem rgba(21, 153, 71, 0.18);
  transform: translateY(-1px);
}

button:disabled {
  border-color: #d8e0da;
  background: #edf1ee;
  color: #8a9691;
  box-shadow: none;
  transform: none;
}

button.danger {
  border-color: var(--clay);
  background: var(--clay);
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 0.78rem 0.88rem;
}

input::placeholder,
textarea::placeholder {
  color: #97a29e;
}

label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: 0;
}

h2 {
  font-size: 1.58rem;
}

h3 {
  font-size: 1.05rem;
}

.app-shell {
  display: grid;
  gap: 0.85rem;
  min-height: 100vh;
  padding: 0.75rem 0.75rem 6.1rem;
}

.sidebar,
.workspace,
.dashboard-card,
.metric,
.round-record,
.api-key-strip,
.capture-panel,
.confirmation-form,
.table-wrap {
  border-radius: var(--radius);
}

.sidebar {
  position: relative;
  display: grid;
  gap: 0.85rem;
  order: 1;
  border: 1px solid rgba(221, 229, 222, 0.88);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  padding: 0.85rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0;
}

.brand-mark {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 54%),
    var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #ffffff;
}

.brand-mark::before {
  left: 0.72rem;
  top: 0.58rem;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 999px;
  box-shadow: 0.58rem 0.58rem 0 var(--green);
}

.brand-mark::after {
  left: 0.62rem;
  bottom: 0.52rem;
  width: 1.12rem;
  height: 0.16rem;
  border-radius: 999px;
  transform: rotate(-24deg);
}

.brand-wordmark {
  display: flex;
  align-items: baseline;
  font-size: 1.24rem;
  font-weight: 950;
  line-height: 1;
}

.brand-wordmark span {
  color: var(--ink);
}

.brand-wordmark strong {
  color: var(--green);
}

.sidebar-nav,
.sidebar-divider {
  display: none;
}

.sidebar-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  border: 1px solid #e9eee9;
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 0.78rem;
}

.sidebar-account strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-kicker,
.eyebrow {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.sidebar input,
.sidebar select {
  min-height: 2.65rem;
  border-color: #dfe8e1;
  background: #ffffff;
  font-size: 0.92rem;
  padding: 0.66rem 0.72rem;
}

.invite-code {
  width: fit-content;
  border: 1px solid #cfe8d5;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0.35rem 0.62rem;
}

.workspace {
  order: 2;
  overflow: hidden;
  border: 1px solid rgba(221, 229, 222, 0.9);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  border-bottom: 1px solid #e9eee9;
  background: rgba(255, 255, 255, 0.86);
  padding: 1rem;
}

.topbar h2 {
  overflow-wrap: anywhere;
  font-size: 1.42rem;
  font-weight: 950;
}

.topbar .eyebrow {
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.add-action,
.hero-action.is-primary,
.rail-action-primary,
.primary-action {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.add-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  box-shadow: 0 0.55rem 1.25rem rgba(21, 153, 71, 0.18);
}

.add-action.secondary-action {
  border-color: #dce6df;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.add-action.secondary-action span {
  background: #eef5f0;
  color: var(--green-dark);
}

.add-action span {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.notification-pill,
.avatar-pill {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
}

.notification-pill {
  position: relative;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.notification-pill::before {
  content: "";
  width: 0.78rem;
  height: 0.92rem;
  border: 1.8px solid var(--muted);
  border-radius: 0.45rem 0.45rem 0.25rem 0.25rem;
}

.notification-pill::after {
  content: "";
  position: absolute;
  top: 0.64rem;
  right: 0.68rem;
  width: 0.46rem;
  height: 0.46rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--clay);
}

.avatar-pill {
  background: var(--ink);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  min-width: 44px;
  min-height: 44px;
  border: 0;
  padding: 0;
}

.view-hero {
  position: relative;
  display: grid;
  gap: 1rem;
  margin: 1rem;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #071316 0%, #0d2a23 58%, #143626 100%);
  background-size: 2.2rem 2.2rem, auto;
  color: #ffffff;
  padding: 1.05rem;
  box-shadow: 0 1.2rem 2.5rem rgba(7, 19, 22, 0.16);
}

.view-hero::before {
  content: "";
  position: absolute;
  left: -1rem;
  right: -1rem;
  bottom: 0.72rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-3deg);
}

.view-hero-capture {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #071316 0%, #10243a 58%, #12422a 100%);
  background-size: 2.2rem 2.2rem, auto;
}

.view-hero-play {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #050908 0%, #10251e 56%, #31550f 100%);
  background-size: 2.2rem 2.2rem, auto;
}

.view-hero-register {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #071316 0%, #26301d 58%, #3a2c11 100%);
  background-size: 2.2rem 2.2rem, auto;
}

.view-hero-settings,
.view-hero-courses {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #071316 0%, #18252b 58%, #23331e 100%);
  background-size: 2.2rem 2.2rem, auto;
}

.hero-copy,
.hero-stat-panel {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 0.55rem;
}

.hero-copy .eyebrow {
  color: #7ce29c;
}

.hero-copy h2 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 950;
}

.hero-copy p:not(.eyebrow) {
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.hero-action {
  min-height: 2.8rem;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.hero-action:hover,
.hero-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
}

.hero-action.is-primary:hover,
.hero-action.is-primary:focus-visible {
  border-color: #1aad50;
  background: #1aad50;
}

.hero-stat-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(10, 27, 20, 0.82);
  padding: 0.65rem;
  backdrop-filter: none;
}

.hero-stat-panel div {
  display: grid;
  gap: 0.14rem;
  border-radius: calc(var(--radius) - 0.12rem);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.7rem;
}

.hero-stat-panel span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-stat-panel strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  background: transparent;
  padding: 0 1rem 1rem;
}

.dashboard-grid,
.my-golf-grid,
.scorecard-workflow,
.settings-grid,
.round-form {
  gap: 0.9rem;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.72rem;
}

.metric {
  position: relative;
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  align-items: center;
  gap: 0.82rem;
  min-height: 5.75rem;
  border: 1px solid #e6eee7;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 0.92rem;
}

.metric::before {
  content: none;
}

.metric-icon {
  position: relative;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: var(--radius);
  background: var(--metric-bg, var(--green-soft));
  color: var(--metric-accent, var(--green));
}

.metric-icon::before {
  content: "";
  position: absolute;
  inset: 0.74rem;
  border: 2px solid currentColor;
  border-radius: 0.28rem;
}

.metric-copy {
  display: grid;
  min-width: 0;
}

.metric-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.34rem;
  font-weight: 950;
  line-height: 1.12;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-copy span {
  color: #41504d;
  font-size: 0.82rem;
  font-weight: 900;
  margin: 0;
}

.metric-copy small {
  overflow: hidden;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-green {
  --metric-accent: var(--green);
  --metric-bg: var(--green-soft);
}

.metric-violet {
  --metric-accent: #6f52d8;
  --metric-bg: #f1edff;
}

.metric-amber {
  --metric-accent: var(--gold);
  --metric-bg: var(--gold-soft);
}

.metric-blue {
  --metric-accent: var(--blue);
  --metric-bg: var(--blue-soft);
}

.dashboard-layout,
.dashboard-main,
.next-rail {
  display: grid;
  gap: 0.9rem;
}

.dashboard-card,
.round-record,
.api-key-strip,
.confirmation-form {
  border: 1px solid #e6eee7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  padding: 0.95rem;
}

.support-card {
  background: #fbfcf8;
}

.section-head,
.round-record-head {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.section-head h3,
.round-record-head h3 {
  font-size: 1.06rem;
  font-weight: 950;
}

.section-head p,
.round-record-head p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
  margin-top: 0.2rem;
}

.status-pill,
.pill {
  width: fit-content;
  border: 1px solid #cfe8d5;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0.35rem 0.62rem;
}

.ghost-button {
  border-color: #cfe8d5;
  background: #ffffff;
  color: var(--green-dark);
  box-shadow: none;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: #abd9b5;
  background: #f2fbf4;
  box-shadow: none;
}

.personal-summary {
  display: grid;
  gap: 0.9rem;
}

.profile-avatar-large {
  display: grid;
  place-items: center;
  width: 5.4rem;
  height: 5.4rem;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.65), transparent 48%),
    var(--green-soft);
  color: var(--green-dark);
  font-size: 1.55rem;
  font-weight: 950;
}

.definition-list {
  display: grid;
  gap: 0;
}

.definition-list div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.5fr) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  border-bottom: 1px solid #edf2ed;
  padding: 0.62rem 0;
}

.definition-list div:first-child {
  padding-top: 0;
}

.definition-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.definition-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.definition-list dd {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
}

.compact-list div {
  grid-template-columns: 1fr;
  gap: 0.12rem;
}

.player-list,
.round-row-list,
.result-row-list {
  display: grid;
}

.player-row,
.round-row,
.result-row {
  display: grid;
  align-items: center;
  gap: 0.72rem;
  border-top: 1px solid #edf2ed;
  padding: 0.9rem 0;
}

.player-row:first-child,
.round-row:first-child,
.result-row:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.player-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.round-row,
.result-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.score-thumb,
.result-rank,
.player-avatar {
  display: grid;
  place-items: center;
  width: 3.18rem;
  height: 3.18rem;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 950;
}

.result-rank {
  width: 2.45rem;
  height: 2.45rem;
  background: #f1f4f1;
  color: var(--muted);
}

.round-row h4,
.result-row h4,
.player-row h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 950;
}

.round-row p,
.result-row p,
.player-row p {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 760;
  margin-top: 0.12rem;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.row-badges span {
  border: 1px solid #e5ebe6;
  border-radius: 999px;
  background: #f5f7f4;
  color: #41504d;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
}

.player-meta,
.round-row-value {
  display: grid;
  grid-column: 2;
  justify-items: start;
  gap: 0.05rem;
}

.player-meta span,
.round-row-value span {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-meta strong,
.round-row-value strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.add-player {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-items: center;
  border-top: 1px solid #edf2ed;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
}

.rail-action {
  position: relative;
  width: 100%;
  min-height: 3.12rem;
  border-color: #e2eae4;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  padding: 0.75rem 2rem 0.75rem 0.85rem;
  text-align: left;
}

.rail-action::after {
  content: ">";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  color: #98a39f;
  transform: translateY(-50%);
}

.rail-action:hover,
.rail-action:focus-visible {
  border-color: #cfe8d5;
  background: #f7fbf8;
  color: var(--green-dark);
  box-shadow: none;
  transform: none;
}

.rail-action-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.rail-action-primary::after {
  color: rgba(255, 255, 255, 0.7);
}

.group-capture-flow {
  gap: 0.95rem;
}

.capture-command-card {
  display: grid;
  gap: 0.95rem;
  overflow: hidden;
  border: 1px solid #dfeae2;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, rgba(21, 153, 71, 0.1), rgba(59, 130, 246, 0.08));
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.capture-command-card h3 {
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.12;
  margin: 0.12rem 0 0;
}

.capture-command-card p {
  max-width: 48rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.35rem 0 0;
}

.capture-command-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #e2ece4;
  border-radius: var(--radius);
  background: #ffffff;
}

.capture-command-stats div {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
  border-left: 1px solid #e8efe9;
  padding: 0.72rem;
}

.capture-command-stats div:first-child {
  border-left: 0;
}

.capture-command-stats dt,
.capture-step-strip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.capture-command-stats dd {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 720;
  line-height: 1.1;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-step-strip {
  display: grid;
  gap: 0.62rem;
}

.capture-step-strip div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.12rem 0.68rem;
  align-items: center;
  border: 1px solid #e2ece4;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  padding: 0.72rem;
}

.capture-step-strip span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: var(--radius);
  background: #eef2ef;
  color: var(--muted);
  font-weight: 720;
}

.capture-step-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-step-strip .is-active {
  border-color: #c6e5cd;
  background: #f5fbf6;
}

.capture-step-strip .is-active span {
  background: var(--green);
  color: #ffffff;
}

.capture-route-grid {
  display: grid;
  gap: 0.95rem;
}

.capture-route-card {
  min-width: 0;
}

.manual-round-card {
  display: grid;
  gap: 1rem;
  border: 1px solid #e6eee7;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.manual-round-head {
  display: grid;
  gap: 0.72rem;
}

.manual-round-head h3 {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.14;
  margin: 0.12rem 0 0;
}

.manual-round-head p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.28rem 0 0;
}

.manual-setup-step {
  border-top: 0;
  padding-top: 0;
}

.api-key-strip {
  display: grid;
  gap: 0.65rem;
  background: #fbfcf8;
}

.key-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.capture-panel {
  overflow: hidden;
  border: 1px solid rgba(7, 19, 22, 0.92);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #071316 0%, #10243a 54%, #0d3522 100%);
  background-size: 2.2rem 2.2rem, auto;
  color: #ffffff;
  box-shadow: 0 1rem 2.4rem rgba(7, 19, 22, 0.16);
  padding: 1rem;
}

.capture-panel-head {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.capture-panel-head .eyebrow {
  color: #7ce29c;
}

.capture-panel h3 {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 950;
}

.capture-badge {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0.35rem 0.62rem;
}

.capture-grid {
  display: grid;
  gap: 0.75rem;
}

.capture-panel label,
.capture-panel .photo-picker span {
  color: #ffffff;
}

.photo-picker {
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.85rem;
}

.photo-picker input {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.photo-picker input::file-selector-button {
  min-height: 2.2rem;
  margin-right: 0.7rem;
  border: 0;
  border-radius: calc(var(--radius) - 0.12rem);
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  padding: 0.45rem 0.7rem;
}

.capture-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.capture-actions button:not(.primary-action) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.scorecard-drop,
.scorecard-empty {
  display: grid;
  place-items: center;
  min-height: 11rem;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.74);
  font-weight: 900;
  text-align: center;
  padding: 1rem;
}

.scorecard-empty {
  border-color: #dfe8e1;
  background: #fbfcf8;
  color: var(--muted);
}

.scorecard-preview-grid {
  display: grid;
  gap: 0.75rem;
}

.scorecard-preview-shell {
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.75rem;
}

.scorecard-preview {
  width: 100%;
  max-height: 24rem;
  border-radius: calc(var(--radius) - 0.12rem);
  background: rgba(255, 255, 255, 0.1);
  object-fit: contain;
}

.scorecard-file-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 800;
}

.scorecard-file-meta strong {
  color: #ffffff;
}

.ai-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 1px solid #cfe8d5;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
  padding: 0.75rem;
}

.ai-status.is-error {
  border-color: rgba(216, 85, 61, 0.4);
  background: var(--clay-soft);
  color: #a63d2b;
}

.attempt-pill,
.review-notes span,
.unmatched-list span {
  border: 1px solid #dfe8e1;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.35rem 0.62rem;
}

.attempt-pill.is-ok {
  border-color: #bfe5c7;
  color: var(--green-dark);
}

.attempt-pill.is-error,
.review-notes span {
  border-color: rgba(216, 85, 61, 0.34);
  color: #a63d2b;
}

.review-notes,
.unmatched-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-radius: var(--radius);
  padding: 0.75rem;
}

.review-notes {
  border: 1px solid rgba(216, 85, 61, 0.25);
  background: var(--clay-soft);
}

.unmatched-list {
  border: 1px dashed var(--line-strong);
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.segmented,
.handicap-mode-block {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.segmented legend,
.handicap-mode-block legend {
  color: var(--muted);
  font-weight: 900;
  padding: 0 0 0.2rem;
}

.segmented label,
.mode-option,
.handicap-entry,
.score-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
}

.segmented label,
.mode-option {
  align-items: center;
  min-height: 3rem;
  padding: 0.72rem 0.78rem;
}

.segmented label {
  display: flex;
  gap: 0.55rem;
}

.mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.72rem;
}

.mode-option:has(input:checked),
.segmented label:has(input:checked) {
  border-color: #abd9b5;
  background: var(--green-soft);
}

.segmented input,
.mode-option input {
  width: auto;
  min-height: 1rem;
}

.mode-option span,
.handicap-entry span,
.score-entry span {
  display: grid;
}

.mode-option small,
.handicap-entry small,
.score-entry small {
  color: var(--muted);
  font-size: 0.84rem;
}

.handicap-entry-list,
.score-entry-list {
  display: grid;
  gap: 0.65rem;
}

.handicap-mode-block .handicap-entry-list {
  display: none;
}

.handicap-mode-block:has(input[value="aus_social"]:checked) .handicap-entry-list {
  display: grid;
}

.handicap-entry,
.score-entry {
  display: grid;
  gap: 0.72rem;
  align-items: center;
  background: #fbfcf8;
  padding: 0.72rem;
}

.process-step {
  display: grid;
  gap: 0.82rem;
  border-top: 1px solid #edf2ed;
  padding-top: 1rem;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 950;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.settings-grid {
  display: grid;
  gap: 0.9rem;
}

.settings-form {
  display: grid;
  gap: 0.55rem;
  border-top: 1px solid #edf2ed;
  margin-top: 0.78rem;
  padding-top: 0.78rem;
}

.settings-actions {
  display: grid;
  gap: 0.65rem;
}

.inline-control {
  display: grid;
  gap: 0.55rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e6eee7;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

table {
  min-width: 42rem;
}

th,
td {
  border-bottom: 1px solid #edf2ed;
  padding: 0.82rem 0.76rem;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

td {
  color: var(--text);
  font-weight: 760;
}

.whatsapp-box {
  min-height: 13rem;
  border-color: #dfe8e1;
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
}

.weekly-report-box {
  min-height: 24rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  line-height: 1.45;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfcf8;
  color: var(--muted);
  font-weight: 900;
  padding: 1.35rem;
  text-align: center;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 5.9rem;
  z-index: 40;
  max-width: min(24rem, calc(100vw - 2rem));
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.nav-icon {
  position: relative;
  display: block;
  width: 1.3rem;
  height: 1.3rem;
  color: currentColor;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
}

.nav-item[data-tab="my"] .nav-icon::before,
.mobile-tab[data-tab="my"] .nav-icon::before {
  inset: 0.18rem;
  border: 1.8px solid currentColor;
  border-radius: 999px;
}

.nav-item[data-tab="my"] .nav-icon::after,
.mobile-tab[data-tab="my"] .nav-icon::after {
  left: 0.48rem;
  top: 0.47rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: currentColor;
}

.nav-item[data-tab="dashboard"] .nav-icon::before,
.mobile-tab[data-tab="dashboard"] .nav-icon::before {
  inset: 0.16rem;
  border: 1.8px solid currentColor;
  border-radius: 0.24rem;
}

.nav-item[data-tab="dashboard"] .nav-icon::after,
.mobile-tab[data-tab="dashboard"] .nav-icon::after {
  left: 0.4rem;
  top: 0.42rem;
  width: 0.5rem;
  height: 0.34rem;
  border-top: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
}

.nav-item[data-tab="play"] .nav-icon::before,
.mobile-tab[data-tab="play"] .nav-icon::before {
  left: 0.34rem;
  top: 0.18rem;
  width: 0;
  height: 0;
  border-top: 0.48rem solid transparent;
  border-bottom: 0.48rem solid transparent;
  border-left: 0.72rem solid currentColor;
}

.nav-item[data-tab="play"] .nav-icon::after,
.mobile-tab[data-tab="play"] .nav-icon::after {
  inset: 0.08rem;
  border: 1.8px solid currentColor;
  border-radius: 999px;
  opacity: 0.28;
}

.nav-item[data-tab="round"] .nav-icon::before,
.nav-item[data-tab="history"] .nav-icon::before,
.nav-item[data-tab="courses"] .nav-icon::before,
.nav-item[data-tab="settings"] .nav-icon::before,
.mobile-tab[data-tab="round"] .nav-icon::before,
.mobile-tab[data-tab="history"] .nav-icon::before,
.mobile-tab[data-tab="courses"] .nav-icon::before,
.mobile-tab[data-tab="settings"] .nav-icon::before {
  inset: 0.18rem 0.26rem;
  border: 1.8px solid currentColor;
  border-radius: 0.22rem;
}

.nav-item[data-tab="round"] .nav-icon::after,
.mobile-tab[data-tab="round"] .nav-icon::after {
  left: 0.42rem;
  top: 0.5rem;
  width: 0.46rem;
  border-top: 1.8px solid currentColor;
  box-shadow: 0 0.27rem 0 currentColor;
}

.nav-item[data-tab="history"] .nav-icon::after,
.mobile-tab[data-tab="history"] .nav-icon::after {
  left: 0.4rem;
  top: 0.43rem;
  width: 0.5rem;
  height: 0.34rem;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
}

.nav-item[data-tab="courses"] .nav-icon::after,
.mobile-tab[data-tab="courses"] .nav-icon::after {
  left: 0.4rem;
  top: 0.38rem;
  width: 0.48rem;
  border-top: 1.8px solid currentColor;
  box-shadow: 0 0.27rem 0 currentColor, 0 0.54rem 0 currentColor;
}

.nav-item[data-tab="settings"] .nav-icon::before,
.mobile-tab[data-tab="settings"] .nav-icon::before {
  border-radius: 999px;
}

.nav-item[data-tab="settings"] .nav-icon::after,
.mobile-tab[data-tab="settings"] .nav-icon::after {
  left: 0.52rem;
  top: 0.52rem;
  width: 0.24rem;
  height: 0.24rem;
  border-radius: 999px;
  background: currentColor;
}

.mobile-tabbar {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 30;
  display: grid;
  grid-auto-columns: minmax(3.9rem, 1fr);
  grid-auto-flow: column;
  gap: 0.28rem;
  overflow-x: auto;
  border: 1px solid rgba(221, 229, 222, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1rem 2.4rem rgba(7, 19, 22, 0.18);
  padding: 0.32rem;
  backdrop-filter: blur(16px);
}

.mobile-tab {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  min-width: 3.9rem;
  min-height: 3.55rem;
  border: 0;
  background: transparent;
  color: #657273;
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 950;
  padding: 0.42rem 0.28rem;
}

.mobile-tab:hover,
.mobile-tab:focus-visible {
  background: #f2f7f3;
  color: var(--green-dark);
  box-shadow: none;
  transform: none;
}

.mobile-tab.is-active {
  background: var(--ink);
  color: #ffffff;
}

@media (min-width: 640px) {
  .sidebar-account {
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 0.7fr) minmax(8rem, 0.7fr);
    align-items: end;
  }

  .sidebar-kicker,
  .sidebar-account > strong,
  .invite-code {
    grid-column: auto;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .view-hero {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.48fr);
    align-items: end;
    padding: 1.18rem;
  }

  .hero-stat-panel {
    grid-template-columns: 1fr;
  }

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

  .personal-summary {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .player-row {
    grid-template-columns: auto minmax(0, 1fr) 5.4rem 5.4rem;
  }

  .player-meta {
    grid-column: auto;
    justify-items: end;
  }

  .round-row,
  .result-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .round-row-value {
    grid-column: auto;
    justify-items: end;
  }

  .add-player {
    grid-template-columns: minmax(10rem, 1fr) 7rem auto;
  }

  .inline-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .capture-command-card {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
    align-items: center;
  }

  .capture-step-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .manual-round-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .api-key-strip {
    grid-template-columns: minmax(14rem, 1fr) auto auto;
    align-items: end;
  }

  .capture-panel-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .capture-grid {
    grid-template-columns: minmax(14rem, 1fr) auto;
    align-items: end;
  }

  .capture-actions {
    grid-template-columns: auto auto;
  }

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

  .handicap-entry,
  .score-entry {
    grid-template-columns: minmax(10rem, 1fr) 9rem;
  }

  .section-head,
  .round-record-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .hero-copy h2 {
    font-size: 2rem;
  }

  .form-grid {
    grid-template-columns: minmax(10rem, 0.6fr) minmax(14rem, 1fr) minmax(18rem, 1fr);
  }

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

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.7fr);
  }
}

@media (min-width: 1024px) {
  .app-shell {
    grid-template-columns: 14.75rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    align-content: start;
    overflow: auto;
    padding: 1rem;
  }

  .sidebar-nav {
    display: grid;
    gap: 0.28rem;
  }

  .sidebar-divider {
    display: block;
    height: 1px;
    background: #e9eee9;
  }

  .sidebar-account {
    grid-template-columns: 1fr;
  }

  .nav-item {
    display: grid;
    grid-template-columns: 1.55rem minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 2.82rem;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #53605d;
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 900;
    padding: 0.5rem 0.65rem;
    text-align: left;
  }

  .nav-item:hover,
  .nav-item:focus-visible {
    background: #f2f7f3;
    color: var(--ink);
    box-shadow: none;
    transform: none;
  }

  .nav-item.is-active,
  .sidebar .nav-item.is-active,
  .sidebar .nav-item.is-active:hover,
  .sidebar .nav-item.is-active:focus-visible {
    background: var(--ink);
    color: #ffffff;
  }

  .mobile-tabbar {
    display: none;
  }

  .topbar {
    padding: 1.15rem 1.25rem;
  }

  .view-hero {
    margin: 1.25rem;
    padding: 1.35rem;
  }

  .panel {
    padding: 0 1.25rem 1.25rem;
  }

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

  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 0.36fr);
  }

  .capture-route-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 0.75fr);
    align-items: start;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.7fr) minmax(15rem, 0.5fr);
  }

  .toast {
    bottom: 1rem;
  }
}

.hero-group-overview {
  display: grid;
  gap: 0.5rem;
  max-width: 42rem;
  margin: 0.1rem 0 0.15rem;
}

.hero-group-overview div {
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 0.5rem;
}

.hero-group-overview span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-group-overview strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.94rem;
  line-height: 1.16;
  margin-top: 0.12rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .hero-group-overview {
    grid-template-columns: minmax(0, 1.3fr) minmax(5.5rem, 0.65fr) minmax(6rem, 0.65fr);
    gap: 0.72rem;
  }
}

.home-group-card {
  overflow: hidden;
}

.home-group-head {
  align-items: start;
}

.home-group-head .ghost-button,
.group-latest-strip .ghost-button {
  min-height: 2.75rem;
}

.group-overview-panel {
  position: relative;
  display: grid;
  gap: 0.95rem;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), transparent 42%),
    linear-gradient(135deg, #07150f 0%, #11271d 58%, #183924 100%);
  color: #ffffff;
  padding: 1rem;
}

.group-overview-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 2.1rem 2.1rem;
  mask-image: linear-gradient(135deg, transparent 0%, #000000 22%, #000000 72%, transparent 100%);
  opacity: 0.54;
}

.group-overview-panel > * {
  position: relative;
}

.group-overview-panel span,
.group-invite-lockup span,
.group-latest-strip span,
.group-player-hcp span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.group-overview-panel h4 {
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1.12;
  margin: 0.16rem 0 0;
}

.group-overview-panel p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  margin: 0.38rem 0 0;
}

.group-invite-lockup {
  display: grid;
  gap: 0.16rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 0.85rem;
}

.group-invite-lockup strong {
  color: #d7ffdf;
  font-size: 1.18rem;
  line-height: 1;
}

.group-overview-stats {
  display: grid;
  gap: 0;
  margin: 0.95rem 0 0;
}

.group-overview-stats div {
  display: grid;
  min-width: 0;
  gap: 0.13rem;
  border-top: 1px solid #edf3ee;
  padding: 0.82rem 0;
}

.group-overview-stats div:last-child {
  border-bottom: 1px solid #edf3ee;
}

.group-overview-stats dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 820;
  text-transform: uppercase;
}

.group-overview-stats dd {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.12;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-overview-stats small {
  overflow: hidden;
  color: var(--faint);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-latest-strip {
  display: grid;
  gap: 0.8rem;
  align-items: center;
  border-bottom: 1px solid #edf3ee;
  padding: 0 0 0.9rem;
}

.group-latest-strip span {
  color: var(--muted);
}

.group-latest-strip strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
  margin-top: 0.12rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-latest-strip small {
  display: block;
  color: var(--faint);
  font-size: 0.82rem;
  margin-top: 0.22rem;
}

.group-latest-strip .ghost-button {
  width: 100%;
}

.group-player-ladder {
  display: grid;
}

.group-player-mini {
  display: grid;
  grid-template-columns: 2.45rem minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: center;
  border-top: 1px solid #edf3ee;
  padding: 0.86rem 0;
}

.group-player-mini:first-child {
  border-top: 0;
}

.group-player-rank {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: var(--radius);
  background: #eef8f0;
  color: var(--green-dark);
  font-size: 0.92rem;
}

.group-player-mini h4 {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.15;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-player-mini p {
  color: var(--muted);
  font-size: 0.83rem;
  margin: 0.16rem 0 0;
}

.group-player-hcp {
  display: grid;
  justify-items: end;
  gap: 0.04rem;
}

.group-player-hcp span {
  color: var(--muted);
}

.group-player-hcp strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.1;
}

.group-handicap-engine {
  display: grid;
  gap: 0.82rem;
  border-top: 1px solid #edf3ee;
  margin-top: 0.2rem;
  padding-top: 1rem;
}

.group-engine-head {
  display: grid;
  gap: 0.28rem;
}

.group-engine-head span,
.engine-label,
.engine-hcp span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.group-engine-head strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.14;
  margin-top: 0.1rem;
}

.group-engine-head p {
  max-width: 42rem;
  color: var(--faint);
  font-size: 0.84rem;
  margin: 0;
}

.group-engine-grid {
  display: grid;
  gap: 0.72rem;
}

.player-engine-card {
  display: grid;
  gap: 0.84rem;
  border: 1px solid #e4ede6;
  border-radius: var(--radius);
  background: #fbfdf9;
  padding: 0.82rem;
}

.player-engine-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.player-engine-card h4 {
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.16;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-engine-card header p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.18rem 0 0;
}

.engine-hcp {
  display: grid;
  justify-items: end;
  gap: 0.03rem;
}

.engine-hcp strong {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
}

.engine-columns {
  display: grid;
  gap: 0.78rem;
}

.engine-score-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
}

.engine-score-list li,
.engine-leaving-score {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) 2.6rem;
  gap: 0.5rem;
  align-items: center;
  border-top: 1px solid #ebf1ec;
  min-height: 2.18rem;
}

.engine-score-list li:first-child {
  border-top: 0;
}

.engine-score-list span,
.engine-leaving-score span {
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.engine-score-list strong,
.engine-leaving-score strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-score-list em,
.engine-leaving-score em {
  color: var(--ink);
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 720;
  text-align: right;
}

.engine-leaving {
  border-top: 1px solid #e8efe9;
  padding-top: 0.78rem;
}

.engine-leaving-score {
  border: 1px solid #d9eadc;
  border-radius: var(--radius);
  background: #f0faf2;
  margin-top: 0.45rem;
  min-height: 2.55rem;
  padding: 0 0.65rem;
}

.engine-empty {
  border: 1px dashed #d8e2da;
  border-radius: var(--radius);
  color: var(--faint);
  font-size: 0.84rem;
  margin: 0.45rem 0 0;
  padding: 0.72rem;
}

.engine-progress {
  height: 0.38rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eee8;
}

.engine-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.engine-provisional-grid {
  display: grid;
  gap: 0.62rem;
}

.engine-provisional-grid > div {
  display: grid;
  gap: 0.28rem;
  border: 1px solid #e1ebe3;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 0.72rem;
}

.engine-provisional-grid strong {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .engine-provisional-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-group-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .group-overview-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 1.06rem;
  }

  .group-invite-lockup {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 0;
    padding: 0 0 0 1rem;
  }

  .group-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .group-overview-stats div {
    border-bottom: 1px solid #edf3ee;
    padding: 0.86rem 0.85rem;
  }

  .group-overview-stats div:first-child {
    padding-left: 0;
  }

  .group-overview-stats div:not(:first-child) {
    border-left: 1px solid #edf3ee;
  }

  .group-latest-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .group-latest-strip .ghost-button {
    width: auto;
  }

  .group-player-mini {
    grid-template-columns: 2.45rem minmax(0, 1fr) 5.6rem;
  }

  .group-engine-head {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.7fr);
    align-items: end;
  }

  .group-engine-head p {
    text-align: right;
  }

  .engine-columns {
    grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 0.7fr);
    align-items: start;
  }

  .engine-leaving {
    border-left: 1px solid #e8efe9;
    border-top: 0;
    padding-left: 0.78rem;
    padding-top: 0;
  }
}

@media (min-width: 1536px) {
  .group-engine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final mobile-first play layout. Keep directly before typography so all layout rules above lose on phones. */
@media (max-width: 639px) {
  .app-shell {
    gap: 0;
    min-height: 100vh;
    padding: 0 0 4.7rem;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 4.7rem);
    border: 0;
    border-radius: 0;
    background: #f6f8f3;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.62rem;
    border-bottom: 1px solid rgba(207, 216, 209, 0.9);
    background: rgba(251, 252, 248, 0.96);
    padding: 0.7rem 0.78rem;
  }

  .topbar h2 {
    overflow: hidden;
    font-size: 1.08rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .eyebrow {
    overflow: hidden;
    font-size: 0.62rem;
    margin-bottom: 0.16rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 0.36rem;
    justify-content: end;
  }

  .topbar-actions .secondary-action,
  .topbar-actions .notification-pill {
    display: none;
  }

  .add-action {
    min-height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.82rem;
    padding: 0.48rem 0.72rem;
  }

  .add-action span {
    width: 1.05rem;
    height: 1.05rem;
    font-size: 0.72rem;
  }

  .avatar-pill {
    width: 2.34rem;
    height: 2.34rem;
    border-radius: 0.62rem;
    font-size: 0.78rem;
  }

  .view-hero-play {
    display: none;
  }

  .view-hero:not(.view-hero-play) {
    min-height: 0;
    margin: 0.72rem;
    padding: 0.86rem;
  }

  .view-hero:not(.view-hero-play) .hero-visual-shell {
    display: none;
  }

  .view-hero:not(.view-hero-play) .hero-copy {
    padding: 0;
  }

  .view-hero:not(.view-hero-play) .hero-copy h2 {
    max-width: none;
    font-size: 1.36rem;
  }

  .view-hero:not(.view-hero-play) .hero-copy p:not(.eyebrow),
  .view-hero:not(.view-hero-play) .hero-actions {
    display: none;
  }

  .panel {
    padding: 0.72rem 0.72rem 1rem;
  }

  .play-workflow {
    gap: 0.72rem;
  }

  .play-workflow > .play-command-card {
    display: none;
  }

  .live-round-launcher {
    gap: 0.68rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    overflow: hidden;
    border: 1px solid rgba(7, 19, 22, 0.9);
    border-radius: 0.82rem;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(135deg, #061113, #10251e 64%, #234615);
    background-size: 2rem 2rem, 2rem 2rem, auto;
    padding: 0.9rem;
  }

  .live-launch-head .eyebrow {
    color: #8af0a9;
  }

  .live-launch-head h3 {
    color: #ffffff;
    font-size: 1.24rem;
    line-height: 1.04;
    max-width: 11rem;
  }

  .live-launch-head p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    line-height: 1.28;
    margin-top: 0.38rem;
  }

  .live-launch-head .status-pill {
    border-color: rgba(139, 240, 169, 0.35);
    background: rgba(139, 240, 169, 0.14);
    color: #d7ffdf;
  }

  .game-recording-note,
  .team-setup-panel,
  .skins-setup-panel {
    border-radius: 0.76rem;
  }

  .game-recording-note {
    background: #ffffff;
    padding: 0.66rem 0.72rem;
  }

  .game-recording-note span {
    font-size: 0.76rem;
  }

  .game-setup-step {
    gap: 0.52rem;
    border-top: 0;
    padding-top: 0.18rem;
  }

  .game-step-marker {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }

  .game-setup-step h4 {
    font-size: 0.9rem;
  }

  .game-setup-step p {
    display: none;
  }

  .live-start-grid {
    gap: 0.58rem;
  }

  .live-start-grid label {
    font-size: 0.76rem;
  }

  .live-start-grid input,
  .live-start-grid select {
    min-height: 2.72rem;
    font-size: 0.86rem;
    padding: 0.64rem 0.7rem;
  }

  .live-start-grid .segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.36rem;
  }

  .live-start-grid .segmented legend,
  .play-scope-grid legend,
  .game-choice-grid legend {
    font-size: 0.72rem;
    padding-bottom: 0.1rem;
  }

  .live-start-grid .segmented label {
    justify-content: center;
    min-height: 2.48rem;
    border-radius: 0.62rem;
    font-size: 0.76rem;
    padding: 0.45rem 0.34rem;
  }

  .play-scope-grid {
    display: grid;
    grid-auto-columns: minmax(13.5rem, 86%);
    grid-auto-flow: column;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.08rem;
    scroll-snap-type: x proximity;
  }

  .play-scope-card {
    min-height: 4.15rem;
    border-radius: 0.74rem;
    padding: 0.66rem;
    scroll-snap-align: start;
  }

  .play-scope-card small {
    font-size: 0.74rem;
  }

  .game-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
  }

  .game-choice-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    min-height: 6.05rem;
    border-radius: 0.76rem;
    padding: 0.66rem;
  }

  .game-choice-radio {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 1.08rem;
    height: 1.08rem;
  }

  .game-choice-radio input {
    width: 0.68rem;
    min-height: 0.68rem;
  }

  .game-choice-card strong {
    max-width: calc(100% - 1.5rem);
    font-size: 0.84rem;
    line-height: 1.08;
  }

  .game-choice-card small,
  .game-card-meta em:first-child {
    display: none;
  }

  .game-card-meta {
    gap: 0.28rem;
    margin-top: 0.5rem;
  }

  .game-card-meta em {
    max-width: 100%;
    overflow: hidden;
    border-radius: 0.45rem;
    font-size: 0.62rem;
    padding: 0.26rem 0.34rem;
    text-overflow: ellipsis;
  }

  .team-name-grid,
  .team-player-assignment {
    gap: 0.48rem;
  }

  .team-player-assignment label {
    grid-template-columns: minmax(0, 1fr) 6.4rem;
    border-radius: 0.64rem;
    padding: 0.54rem;
  }

  .game-logic-deck {
    display: none;
  }

  .live-player-chips {
    gap: 0.34rem;
  }

  .live-player-chips span {
    font-size: 0.72rem;
    padding: 0.32rem 0.48rem;
  }

  .live-round-launcher .primary-action {
    position: sticky;
    bottom: 4.55rem;
    z-index: 8;
    min-height: 3.08rem;
    border-radius: 0.78rem;
    box-shadow: 0 0.85rem 1.7rem rgba(21, 153, 71, 0.22);
  }

  .game-preview-wall {
    gap: 0.62rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.1rem 0 0;
  }

  .game-preview-wall .section-head {
    margin: 0;
  }

  .game-preview-wall .section-head h3 {
    font-size: 1rem;
  }

  .game-preview-wall .section-head p {
    display: none;
  }

  .game-preview-grid {
    display: grid;
    grid-auto-columns: minmax(17rem, 88%);
    grid-auto-flow: column;
    gap: 0.58rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.12rem;
    scroll-snap-type: x mandatory;
  }

  .game-preview-card {
    border-radius: 0.82rem;
    padding: 0.68rem;
    scroll-snap-align: start;
  }

  .game-preview-meta strong {
    font-size: 0.92rem;
  }

  .game-preview-screen {
    border-radius: 0.68rem;
    padding: 0.56rem;
  }

  .game-preview-topline {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .game-preview-topline strong {
    width: fit-content;
  }

  .game-preview-rows div {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.46rem;
  }

  .game-preview-rows small,
  .game-preview-rows em {
    display: none;
  }

  .game-preview-card p {
    font-size: 0.72rem;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: 0.48rem;
    left: 0.48rem;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.12rem;
    overflow: visible;
    border-radius: 0.82rem;
    padding: 0.24rem;
  }

  .mobile-tab {
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.08rem;
    border-radius: 0.62rem;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0.3rem 0.08rem;
  }

  .mobile-tab .nav-icon {
    width: 1.02rem;
    height: 1.02rem;
  }

  .mobile-tab.is-active {
    border-radius: 0.62rem;
  }

  .live-round-tracker {
    border-radius: 0.82rem;
    padding: 0.56rem;
  }

  .live-keypad-panel {
    bottom: 4.45rem;
    border-radius: 0.82rem;
  }
}

/* Live play production polish: automatic course data, compact exit, clean track cards. */
.live-back-button {
  display: grid;
  place-items: center;
  width: 2.45rem;
  min-width: 2.45rem;
  min-height: 2.45rem;
  border-radius: 0.72rem;
  font-size: 0.98rem;
  font-weight: 920;
  padding: 0;
}

.score-track-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: auto;
  padding: 0.68rem 0.72rem;
}

.score-track-card input {
  position: absolute !important;
  width: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

.score-track-card strong {
  font-size: 0.92rem;
}

.score-track-card small {
  font-size: 0.75rem;
}

.live-score-sheet-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.live-score-sheet-toolbar div {
  display: grid;
  min-width: 0;
}

.live-score-sheet-toolbar span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  font-weight: 840;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-score-sheet-toolbar strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-score-sheet-toolbar button {
  min-height: 2.25rem;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
  font-size: 0.78rem;
  padding: 0.35rem 0.72rem;
}

.live-score-player-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.45rem, 1fr));
  gap: 0.42rem;
}

.live-score-player-chip {
  display: grid;
  gap: 0.08rem;
  align-content: center;
  min-height: 3.35rem;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.76rem;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.74);
  box-shadow: none;
  padding: 0.48rem 0.5rem;
  text-align: left;
}

.live-score-player-chip.is-scored {
  border-color: rgba(41, 217, 116, 0.38);
  background: rgba(41, 217, 116, 0.1);
}

.live-score-player-chip.is-active {
  border-color: rgba(41, 217, 116, 0.9);
  background: linear-gradient(135deg, rgba(41, 217, 116, 0.95), rgba(20, 153, 76, 0.78));
  color: #ffffff;
}

.live-score-player-chip strong,
.live-score-player-chip span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-score-player-chip strong {
  font-size: 0.84rem;
  font-weight: 880;
}

.live-score-player-chip span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  font-weight: 780;
}

.live-score-player-chip.is-active span {
  color: rgba(255, 255, 255, 0.86);
}

.live-score-sheet .live-selected-player {
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 0.12rem;
}

@media (max-width: 639px) {
  .live-round-top {
    grid-template-columns: 2.45rem minmax(0, 1fr);
  }

  .live-round-top .ghost-button {
    min-height: 2.45rem;
  }

  .score-track-grid {
    gap: 0.42rem;
  }

  .live-score-sheet-backdrop {
    align-items: end;
    padding: 0.42rem 0.42rem 4.35rem;
  }

  .live-score-sheet {
    width: 100%;
  }

  .live-score-sheet .live-keypad-panel {
    gap: 0.48rem;
    max-height: calc(100dvh - 5.35rem);
    overflow-y: auto;
    padding: 0.52rem;
  }

  .live-score-player-rail {
    grid-template-columns: repeat(auto-fit, minmax(5.1rem, 1fr));
    gap: 0.34rem;
  }

  .live-score-player-chip {
    min-height: 3rem;
    border-radius: 0.68rem;
    padding: 0.42rem;
  }

  .live-score-player-chip strong {
    font-size: 0.78rem;
  }

  .live-score-player-chip span {
    font-size: 0.63rem;
  }

  .live-score-sheet .live-selected-player strong {
    text-align: right;
  }
}

/* Score-entry player rail: phone portrait favors readable 2x2 cards for four players;
   wider surfaces graduate to four-across. */
.live-score-player-rail.player-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
}

.live-score-player-rail.player-count-4 .live-score-player-chip {
  min-height: 3.1rem;
}

@media (min-width: 640px) {
  .live-score-player-rail.player-count-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (orientation: landscape) and (min-width: 560px) {
  .live-score-player-rail.player-count-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .app-shell.is-live-play .live-score-sheet-backdrop {
    align-items: end;
    padding: 0.32rem 0.36rem calc(0.32rem + env(safe-area-inset-bottom));
  }

  .app-shell.is-live-play .live-score-sheet {
    width: 100%;
  }

  .app-shell.is-live-play .live-score-sheet .live-keypad-panel {
    gap: 0.5rem;
    max-height: calc(100dvh - 0.64rem);
    border-radius: 0.92rem;
    padding: 0.46rem;
  }

  .app-shell.is-live-play .live-score-player-rail.player-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .app-shell.is-live-play .live-score-player-rail.player-count-4 .live-score-player-chip {
    min-height: 2.9rem;
    padding: 0.42rem 0.48rem;
  }
}

@media (max-width: 359px) {
  .app-shell.is-live-play .live-score-player-rail.player-count-4 .live-score-player-chip {
    min-height: 2.72rem;
    padding: 0.36rem 0.4rem;
  }

  .app-shell.is-live-play .live-score-player-rail.player-count-4 .live-score-player-chip strong {
    font-size: 0.76rem;
  }

  .app-shell.is-live-play .live-score-player-rail.player-count-4 .live-score-player-chip span {
    font-size: 0.61rem;
  }
}

@media (max-width: 639px) {
  .live-round-top {
    gap: 0.5rem;
  }

  .live-round-top h3 {
    font-size: 0.96rem;
  }

  .live-round-top p:not(.eyebrow) {
    font-size: 0.76rem;
  }
}

/* Final crisp typography override - intentionally last */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: var(--font-ui);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
.brand-wordmark,
.hero-copy h2,
.topbar h2 {
  font-family: var(--font-display);
}

.brand-wordmark,
.hero-copy h2,
.topbar h2 {
  font-weight: 760;
}

h1,
h2,
h3,
.section-head h3,
.round-record-head h3,
.round-row h4,
.result-row h4,
.player-row h4,
.course-row-card h4 {
  font-weight: 690;
}

button,
.nav-item,
.mobile-tab,
.rail-action,
.hero-action,
.status-pill,
.pill,
.invite-code,
.row-badges span,
.key-status {
  font-weight: 650;
}

.eyebrow,
.sidebar-kicker,
.metric-copy span,
.metric-copy small,
.hero-stat-panel span,
.player-meta span,
.round-row-value span,
.course-row-card dt,
th {
  font-weight: 620;
}

.hero-copy p:not(.eyebrow),
.section-head p,
.round-record-head p,
.round-row p,
.result-row p,
.player-row p,
.course-row-card p,
td {
  font-weight: 430;
}

.metric-copy strong,
.hero-stat-panel strong,
.player-meta strong,
.round-row-value strong,
.definition-list dd,
.score-thumb,
.result-rank,
.player-avatar,
.profile-avatar-large,
.avatar-pill,
.course-row-card dd {
  font-weight: 720;
}

.weekly-report-box {
  font-family: var(--font-mono);
}

@media (min-width: 1024px) {
  .capture-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile-first final override - keep at EOF. */
@media (max-width: 639px) {
  body,
  #app,
  .app-shell,
  .workspace,
  .panel,
  .play-workflow,
  .live-round-launcher {
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar,
  .view-hero-play,
  .play-workflow > .play-command-card,
  .game-logic-deck {
    display: none;
  }

  .app-shell {
    gap: 0;
    padding-bottom: 4.7rem;
  }

  .workspace {
    border: 0;
    border-radius: 0;
    background: #f6f8f3;
    box-shadow: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.62rem;
    padding: 0.7rem 0.78rem;
  }

  .topbar h2,
  .topbar .eyebrow {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar h2 {
    font-size: 1.08rem;
  }

  .topbar-actions .secondary-action,
  .topbar-actions .notification-pill {
    display: none;
  }

  .panel {
    padding: 0.72rem 0.72rem 1rem;
  }

  .live-round-launcher {
    gap: 0.68rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .live-round-launcher,
  .live-round-launcher * {
    box-sizing: border-box;
    min-width: 0;
  }

  .live-launch-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    border-radius: 0.82rem;
    padding: 0.9rem;
  }

  .live-launch-head h3 {
    max-width: 12rem;
    font-size: 1.24rem;
    line-height: 1.04;
  }

  .live-launch-head p {
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .game-recording-note {
    border-radius: 0.76rem;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
  }

  .game-recording-note span,
  .game-setup-step p,
  .game-choice-card small,
  .game-card-meta em:first-child {
    display: none;
  }

  .game-setup-step {
    gap: 0.52rem;
    border-top: 0;
    padding-top: 0.18rem;
  }

  .game-step-marker {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
  }

  .game-setup-step h4 {
    font-size: 0.9rem;
  }

  .live-start-grid,
  .live-start-grid .segmented,
  .play-scope-grid,
  .game-choice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    scroll-snap-type: none;
  }

  .live-start-grid .segmented {
    gap: 0.36rem;
  }

  .live-start-grid input,
  .live-start-grid select {
    min-height: 2.72rem;
    font-size: 0.86rem;
    padding: 0.64rem 0.7rem;
  }

  .live-start-grid .segmented label {
    justify-content: flex-start;
    min-height: 2.48rem;
    border-radius: 0.62rem;
    padding: 0.45rem 0.7rem;
  }

  .play-scope-card {
    min-height: 3.86rem;
    border-radius: 0.74rem;
    padding: 0.66rem;
    scroll-snap-align: none;
  }

  .play-scope-card small {
    font-size: 0.74rem;
  }

  .game-choice-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    min-height: 3.95rem;
    border-radius: 0.76rem;
    padding: 0.66rem;
  }

  .game-choice-radio {
    position: static;
    order: 2;
    justify-self: end;
    width: 1.08rem;
    height: 1.08rem;
  }

  .game-choice-card > span:last-child {
    order: 1;
  }

  .game-choice-card strong {
    max-width: 100%;
    font-size: 0.86rem;
    line-height: 1.08;
  }

  .game-card-meta {
    gap: 0.28rem;
    margin-top: 0.42rem;
  }

  .game-card-meta em {
    max-width: 100%;
    overflow: hidden;
    border-radius: 0.45rem;
    font-size: 0.62rem;
    padding: 0.26rem 0.34rem;
    text-overflow: ellipsis;
  }

  .team-player-assignment label {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-player-chips {
    gap: 0.34rem;
  }

  .live-player-chips span {
    font-size: 0.72rem;
    padding: 0.32rem 0.48rem;
  }

  .live-round-launcher .primary-action {
    position: static;
    width: 100%;
    min-height: 3.08rem;
    border-radius: 0.78rem;
    box-shadow: 0 0.85rem 1.7rem rgba(21, 153, 71, 0.22);
  }

  .game-preview-wall {
    gap: 0.62rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.1rem 0 0;
  }

  .game-preview-wall .section-head p {
    display: none;
  }

  .game-preview-grid {
    display: grid;
    grid-auto-columns: minmax(15.8rem, 82%);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 0.58rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.12rem;
    scroll-snap-type: x mandatory;
  }

  .game-preview-card {
    border-radius: 0.82rem;
    padding: 0.68rem;
    scroll-snap-align: start;
  }

  .game-preview-topline {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .game-preview-topline strong {
    display: none;
  }

  .game-preview-rows div {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.46rem;
  }

  .game-preview-rows small,
  .game-preview-rows em {
    display: none;
  }

  .mobile-tabbar {
    right: 0.48rem;
    bottom: 0.48rem;
    left: 0.48rem;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.12rem;
    overflow: visible;
    border-radius: 0.82rem;
    padding: 0.24rem;
  }

  .mobile-tab {
    gap: 0.12rem;
    min-width: 0;
    min-height: 3.08rem;
    overflow: hidden;
    border-radius: 0.62rem;
    font-size: 0.58rem;
    line-height: 1;
    padding: 0.3rem 0.08rem;
    text-overflow: ellipsis;
  }

  .mobile-tab .nav-icon {
    width: 1.02rem;
    height: 1.02rem;
  }
}
