:root {
  color-scheme: light;
  --bg: #dfe4dc;
  --surface: #ffffff;
  --surface-raised: #fbfcfa;
  --surface-2: #edf1eb;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #152016;
  --muted: #64705f;
  --line: #c8d2c0;
  --line-strong: #aab8a0;
  --primary: #1e714d;
  --primary-dark: #155238;
  --primary-soft: #dceee3;
  --accent: #1e714d;
  --accent-dark: #155238;
  --accent-soft: #dceee3;
  --home-current-bg: #f8fbf7;
  --selection-soft: #edf7ef;
  --stroke: #fff2c2;
  --stroke-strong: #dfb43c;
  --stroke-text: #7a5b00;
  --danger: #a13737;
  --danger-soft: #fff5f5;
  --danger-line: #c98b8b;
  --danger-hover: #f7dddd;
  --score-under: #11623d;
  --score-under-strong: #11623d;
  --score-under-deep: #0f5f3a;
  --score-under-line: #1d8b5a;
  --score-under-soft: #f1fbf4;
  --score-under-glow: rgba(17, 98, 61, 0.24);
  --score-bogey: #7a5b00;
  --score-bogey-strong: #8a6500;
  --score-bogey-line: #c99424;
  --score-bogey-soft: #fff6de;
  --score-double: #8f2d2a;
  --score-double-strong: #8f2d2a;
  --score-double-line: #bd5148;
  --score-double-soft: #fff7f5;
  --picker-under-line: #8ec9aa;
  --picker-bogey-line: #dfc06f;
  --picker-double-line: #dfa19b;
  --progress-under-line: #9fcaac;
  --progress-under-bg: #edf7ef;
  --progress-over-line: #e0bd68;
  --progress-over-bg: #fff6de;
  --progress-over-text: #75540c;
  --saving-ring: rgba(30, 113, 77, 0.22);
  --topbar-bg: rgba(223, 228, 220, 0.94);
  --tabbar-bg: rgba(255, 255, 255, 0.94);
  --overlay: rgba(21, 32, 22, 0.34);
  --shadow: 0 10px 26px rgba(21, 32, 22, 0.13);
  --sheet-shadow: 0 -18px 40px rgba(21, 32, 22, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.35;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 78px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
}

.brand {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand:hover strong {
  color: var(--accent-dark);
}

.brand strong {
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 12px 10px 38px;
}

.login-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 16px;
}

.login-panel,
.panel,
.home-hero,
.home-current-card,
.active-hole-card,
.live-header,
.wolf-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel {
  width: min(420px, 100%);
  padding: 22px;
}

.login-panel h1,
.panel h2,
.section-title h2,
.live-header h1 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

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

.small {
  font-size: 0.82rem;
}

.stack {
  display: grid;
  gap: 12px;
}

.layout,
.play-shell,
.home-screen,
.create-screen,
.tab-screen {
  display: grid;
  gap: 12px;
}

.home-screen,
.create-screen,
.tab-screen {
  width: min(820px, 100%);
  margin: 0 auto;
}

.bottom-tabs {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  max-width: 560px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--tabbar-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.bottom-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 50px;
  padding: 6px 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.bottom-tab strong {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-tab.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.bottom-tab.ready:not(.active) strong::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -7px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.tab-icon {
  width: 18px;
  height: 18px;
  opacity: 0.72;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-hero,
.home-current-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.home-hero h1,
.home-current-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.home-hero p,
.home-current-card p {
  margin: 2px 0 0;
}

.home-current-card {
  background: var(--home-current-bg);
}

.empty-tab {
  max-width: 620px;
  margin: 0 auto;
}

.empty-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 980px) {
  .setup-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: start;
  }

  .play-shell {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
    align-items: start;
  }
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.compact-panel-header {
  padding-bottom: 10px;
}

.panel-body {
  padding: 14px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.field input:disabled,
.field select:disabled {
  color: var(--muted);
  background: var(--surface-2);
  cursor: not-allowed;
}

.form-row {
  display: grid;
  gap: 10px;
}

.setup-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.setup-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.setup-card-head h3,
.player-editor-head h3 {
  margin: 0;
  font-size: 1rem;
}

.setup-card-head p:not(.eyebrow) {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.setup-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.setup-choice {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.setup-choice strong {
  font-size: 0.94rem;
}

.setup-choice span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

.setup-choice.selected {
  border-color: var(--accent);
  background: var(--selection-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.golfer-list {
  display: grid;
  gap: 7px;
}

.team-name-row {
  grid-template-columns: 1fr 1fr;
}

.team-rosters {
  display: grid;
  gap: 8px;
}

.team-roster {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.team-roster div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.team-roster span,
.team-roster small {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.golfer-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.golfer-summary-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.golfer-summary-main strong,
.golfer-summary-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.golfer-summary-main span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.golfer-summary-main:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@media (min-width: 760px) {
  .setup-row {
    grid-template-columns: 1.2fr 1fr 0.68fr 0.72fr 0.7fr;
  }

  .player-row {
    grid-template-columns: 1fr 1.2fr 0.8fr 0.8fr 1fr;
    align-items: end;
  }

  .team-player-row {
    grid-template-columns: 0.9fr 1.1fr 0.72fr 0.7fr 1fr 0.8fr;
  }

  .team-rosters {
    grid-template-columns: 1fr 1fr;
  }

  .golfer-default-row {
    grid-template-columns: 1.2fr 0.75fr 0.8fr 1fr;
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-actions {
  flex-wrap: nowrap;
}

.btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.btn:hover {
  background: var(--accent-dark);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn:disabled:hover {
  background: var(--accent);
}

.btn.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn.secondary:hover {
  background: var(--surface-2);
}

.btn.secondary:disabled:hover {
  background: var(--surface);
}

.btn.danger {
  border: 1px solid var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-hover);
}

.small-btn {
  min-height: 36px;
  padding: 7px 10px;
}

.primary-action {
  width: 100%;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.3rem;
}

.compact-icon {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.player-editor,
.mini-card,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.player-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
}

.player-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.notice {
  padding: 11px;
  background: var(--surface-2);
  color: var(--muted);
}

.compact-notice {
  min-width: min(100%, 280px);
}

.empty-golfers {
  text-align: center;
}

.error {
  color: var(--danger);
  font-weight: 800;
}

.game-help {
  display: grid;
  gap: 6px;
  padding: 11px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.game-help summary {
  cursor: pointer;
  font-weight: 900;
}

.game-help summary::marker {
  color: var(--accent);
}

.setup-card .game-help {
  padding: 9px;
}

.create-ready {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.create-ready span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.game-help ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.roster-list,
.tee-list {
  display: grid;
  gap: 8px;
}

.roster-row,
.tee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.roster-row.editing {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.roster-row div,
.tee-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.roster-row strong,
.roster-row span,
.tee-row strong,
.tee-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-row div span,
.tee-row div span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.roster-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

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

.club-stats div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.club-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.club-stats strong {
  font-size: 1.15rem;
}

.list-heading {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-list {
  display: grid;
  gap: 8px;
}

.game-list-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.game-list-open {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.game-list-open strong,
.game-list-open span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-list-open span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.game-list-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.live-header {
  position: static;
  z-index: 20;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.live-header h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.wolf-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.game-danger-zone {
  display: flex;
  justify-content: center;
  padding: 8px 12px 18px;
}

.game-danger-zone .btn {
  width: 100%;
  max-width: 360px;
}

.wolf-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wolf-panel-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.wolf-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.wolf-status.pending {
  border-color: var(--stroke-strong);
  background: var(--stroke);
  color: var(--stroke-text);
}

.wolf-order {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wolf-order-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.wolf-order-pill.wolf {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.wolf-actions {
  display: grid;
  gap: 12px;
}

@media (min-width: 680px) {
  .wolf-actions {
    grid-template-columns: 1.4fr 0.8fr;
  }
}

.wolf-actions p {
  margin: 0 0 6px;
}

.wolf-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

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

.wolf-choice {
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.wolf-choice.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 2px var(--accent);
}

@media (min-width: 760px) {
  .live-header {
    position: sticky;
    top: 58px;
  }

  .live-header {
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
    align-items: start;
  }
}

.leaderboard {
  display: grid;
  gap: 6px;
}

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

.leader-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.leader-row.score-leader {
  grid-template-columns: 26px minmax(0, 1fr);
}

.leader-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.leader-scores span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.leader-scores strong {
  color: var(--ink);
}

.nassau-live {
  display: grid;
  gap: 7px;
}

.nassau-segments {
  display: grid;
  gap: 6px;
}

.nassau-segment {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.nassau-segment div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.nassau-segment strong,
.nassau-segment p,
.nassau-segment small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nassau-segment p {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.nassau-segment span,
.nassau-segment small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.hole-nav {
  display: grid;
  grid-auto-columns: 48px;
  grid-auto-flow: column;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scroll-snap-type: x proximity;
}

.hole-nav-btn {
  display: grid;
  min-height: 52px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  scroll-snap-align: start;
}

.hole-nav-btn span {
  color: var(--ink);
  font-weight: 900;
}

.hole-nav-btn small {
  font-size: 0.72rem;
}

.hole-nav-btn.started {
  border-color: var(--stroke-strong);
  background: var(--stroke);
}

.hole-nav-btn.complete {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hole-nav-btn.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.active-hole-card {
  display: grid;
  gap: 14px;
  padding: 12px;
}

.hole-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-round {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
}

.score-entry-list {
  display: grid;
  gap: 8px;
}

.player-score-row {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.player-score-row.stroke-hole,
.hole-cell.stroke-hole {
  border-color: var(--stroke-strong);
  background: var(--stroke);
}

.score-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.score-open h3 {
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-open p {
  margin: 3px 0 0;
}

.score-badge {
  display: grid;
  min-height: 62px;
  place-items: center;
  padding: 6px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
}

.score-badge strong {
  font-size: 1.55rem;
  line-height: 1;
}

.score-badge span {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-badge.under {
  border-color: var(--score-under-line);
  color: var(--score-under);
}

.score-badge.par {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.score-badge.bogey {
  border-color: var(--score-bogey-line);
  color: var(--score-bogey);
}

.score-badge.double {
  border-color: var(--score-double-line);
  color: var(--score-double);
}

.score-badge.empty {
  color: var(--muted);
}

.player-score-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.score-clear {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-glass);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--overlay);
}

.score-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: grid;
  gap: 12px;
  max-height: min(82vh, 640px);
  padding: 8px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  box-shadow: var(--sheet-shadow);
}

@media (min-width: 720px) {
  .score-sheet {
    right: 50%;
    left: 50%;
    width: min(540px, calc(100vw - 28px));
    transform: translateX(-50%);
    border-radius: 14px;
    bottom: 18px;
  }
}

.sheet-grip {
  justify-self: center;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}

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

.sheet-header h2 {
  margin: 0;
  overflow: hidden;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-header p {
  margin: 2px 0 0;
}

.picker-current {
  display: grid;
  grid-template-columns: auto 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.picker-current strong {
  color: var(--ink);
  font-size: 1.4rem;
  text-align: center;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.picker-score {
  display: grid;
  gap: 2px;
  min-height: 64px;
  place-items: center;
  padding: 8px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.picker-score strong {
  font-size: 1.35rem;
  line-height: 1;
}

.picker-score span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.picker-score.par-choice {
  border-width: 3px;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.picker-score.selected {
  border-color: var(--accent-dark);
  background: var(--accent);
  color: white;
}

.picker-score.selected span {
  color: white;
}

.picker-score.under:not(.selected) {
  border-color: var(--picker-under-line);
}

.picker-score.bogey:not(.selected) {
  border-color: var(--picker-bogey-line);
}

.picker-score.double:not(.selected) {
  border-color: var(--picker-double-line);
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.round-overview {
  display: grid;
  gap: 10px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.mini-card {
  padding: 10px;
  background: var(--surface);
}

.round-card-head {
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
}

.round-card-title {
  display: grid;
  gap: 7px;
}

.mini-card h3 {
  margin: 0;
  font-size: 1rem;
}

.round-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.progress-pill,
.progress-thru {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 900;
}

.progress-pill {
  justify-content: space-between;
  gap: 6px;
  background: var(--surface);
}

.progress-pill small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.progress-pill strong {
  font-size: 0.92rem;
  line-height: 1;
}

.progress-pill.under {
  border-color: var(--progress-under-line);
  background: var(--progress-under-bg);
  color: var(--accent-dark);
}

.progress-pill.even {
  border-color: var(--line-strong);
  color: var(--ink);
}

.progress-pill.over {
  border-color: var(--progress-over-line);
  background: var(--progress-over-bg);
  color: var(--progress-over-text);
}

.progress-pill.empty,
.progress-pill.empty small {
  color: var(--muted);
}

.progress-thru {
  grid-column: 1 / -1;
  justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.hole-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

@media (min-width: 430px) {
  .round-card-title {
    grid-template-columns: minmax(0, 1fr) minmax(215px, auto);
    align-items: center;
  }

  .round-progress {
    grid-template-columns: repeat(2, minmax(72px, 1fr)) auto;
  }

  .progress-thru {
    grid-column: auto;
  }

  .hole-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .hole-strip {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}

.hole-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "hole par"
    "score score"
    "net net";
  align-items: center;
  min-height: 76px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.hole-cell.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.hole-cell.saving {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--saving-ring);
}

.hole-cell.saving .hole-net {
  color: var(--accent-dark);
}

.hole-num {
  grid-area: hole;
  font-size: 0.76rem;
  font-weight: 900;
}

.hole-par {
  grid-area: par;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.score-mark {
  grid-area: score;
  justify-self: center;
  box-sizing: border-box;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
}

.score-mark.under {
  color: var(--score-under-strong);
}

.score-mark.par {
  color: var(--ink);
}

.score-mark.bogey {
  color: var(--score-bogey);
}

.score-mark.double {
  color: var(--score-double-strong);
}

.score-mark.score-birdie {
  border-color: var(--score-under-strong);
  border-radius: 999px;
  background: var(--surface);
}

.score-mark.score-eagle {
  border: 4px double var(--score-under-strong);
  border-radius: 999px;
  background: var(--score-under-soft);
}

.score-mark.score-albatross {
  border-color: var(--score-under-deep);
  border-radius: 999px;
  background: var(--score-under-strong);
  color: var(--surface);
  box-shadow: 0 0 0 2px var(--score-under-glow);
}

.score-mark.score-bogey {
  border-color: var(--score-bogey-strong);
  border-radius: 5px;
  background: var(--surface);
}

.score-mark.score-double {
  border: 4px double var(--score-double-strong);
  border-radius: 5px;
  background: var(--score-double-soft);
}

.score-mark.score-triple {
  border-color: var(--score-double-strong);
  border-radius: 5px;
  background: var(--score-double-strong);
  color: var(--surface);
}

.hole-net {
  grid-area: net;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
