/* Dimples — dimples.css
   Single source of truth for product styling. See docs/dimples-design-system.md
   for the full palette/type/spacing rationale — values below are copied
   exactly from there, not re-derived.

   Extraction is intentionally partial: only the tokens and component classes
   the built screens actually use are here. Add more as screens are built —
   do not extract components ahead of need (see dimples-component-library-plan.md).
*/

:root {
  /* Navy — brand primary */
  --navy-950: #0C1A2E;
  --navy-900: #122238;
  --navy-800: #1A3352;
  --navy-700: #1E4068;
  --navy-600: #235080;
  --navy-500: #2E6BAA;
  --navy-400: #4A87C2;
  --navy-300: #7AAFD8;
  --navy-200: #B0CFEA;
  --navy-100: #D8E8F5;
  --navy-50:  #EEF4FB;

  /* Sage — success / course green */
  --sage-700: #2A4A35;
  --sage-500: #3D7050;
  --sage-400: #5C9C70;
  --sage-300: #85BA96;
  --sage-100: #D6EBD9;
  --sage-50:  #EEF6F0;

  /* Gold — skins / wins only */
  --gold-600: #8A6A1A;
  --gold-500: #B8890F;
  --gold-400: #D4A520;
  --gold-300: #E8C45A;
  --gold-100: #F7ECC8;
  --gold-50:  #FCF7E8;

  /* Slate — neutral UI */
  --slate-900: #1C1E24;
  --slate-700: #3A3D47;
  --slate-500: #6B6E7A;
  --slate-300: #A8AABB;
  --slate-100: #E4E6EE;
  --slate-50:  #F4F5F8;

  /* Penalty — error */
  --penalty-700: #7A2E28;
  --penalty-600: #9C362D;
  --penalty-500: #B8433A;
  --penalty-400: #CC6259;
  --penalty-300: #E0968D;
  --penalty-100: #F7DBD7;
  --penalty-50:  #FCEFED;

  /* Hazard — warning */
  --hazard-700: #7A3B12;
  --hazard-600: #9C4B16;
  --hazard-500: #C1621B;
  --hazard-400: #D68143;
  --hazard-300: #E8AC7F;
  --hazard-100: #F9E3D2;
  --hazard-50:  #FDF3EA;

  /* Relief — success / status */
  --relief-700: #1A615E;
  --relief-600: #278683;
  --relief-500: #53C6C2;
  --relief-400: #7ECECB;
  --relief-300: #ADDCDA;
  --relief-100: #DAF1F0;
  --relief-50:  #F0FAFA;

  --radius-control: 8px;
  --radius-card: 12px;

  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  12px;
  --sp-lg:  16px;
  --sp-xl:  24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;
}

/* ---------- base ---------- */

* {
  box-sizing: border-box;
}

/* Inter/Sora are self-hosted per docs/dimples-design-system.md §Typography,
   but the woff2 files aren't in the repo yet — these stacks fall back to
   the closest system font until they land, rather than 404ing against a
   missing @font-face. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
}

::selection {
  background: var(--navy-100);
}

/* ---------- card ---------- */

.card {
  background: #FFFFFF;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-card);
  padding: var(--sp-lg) var(--sp-xl);
}

/* ---------- form fields ---------- */

.field {
  margin-bottom: var(--sp-md);
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-500);
  margin-bottom: 4px;
}

.field input,
.field select {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-control);
  width: 100%;
  color: var(--slate-900);
  background: #FFFFFF;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px var(--navy-50);
}

.field .hint {
  font-size: 11px;
  color: var(--slate-300);
  margin-top: 4px;
}

.field.error input {
  border-color: var(--penalty-500);
}

.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--penalty-500);
  margin-top: 5px;
}

/* ---------- buttons ---------- */

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-control);
  padding: 9px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--navy-900);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--navy-800);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- wordmark ---------- */

.wordmark {
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-900);
}

/* ---------- input-affix ---------- */
/* Wraps an input with a trailing icon (e.g. show/hide password). Reserves
   right padding on the input so text never runs under the icon. */

.input-affix {
  position: relative;
}

.input-affix input {
  padding-right: 36px;
}

.input-affix-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--slate-300);
}

/* ---------- auth screens ---------- */

.auth-card {
  max-width: 340px;
  width: 100%;
  padding: var(--sp-2xl);
  margin: 0 auto;
}

.auth-card .btn-block {
  margin-top: var(--sp-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--sp-xl);
}

.auth-brand .wordmark {
  font-size: 15px;
}

.auth-heading {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 var(--sp-xl);
}

/* ---------- layout shells ---------- */
/* display:flex is shell-specific, not global — _AuthLayout has no sidebar
   and would misbehave if flex applied to every body via the base rule. */

body.app-shell {
  display: flex;
}

.app-main {
  flex: 1;
  padding: var(--sp-2xl);
  max-width: 980px;
}

body.auth-shell {
  display: flex;
}

.auth-main {
  margin: auto;
  padding: var(--sp-xl);
  width: 100%;
}

/* ---------- sidebar and nav ---------- */

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--navy-900);
  color: #FFFFFF;
  padding: var(--sp-xl) var(--sp-lg);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-2xl);
}

.sidebar-logo .wordmark {
  font-size: 15px;
  color: #FFFFFF;
}

/* Extracted from the prototype (docs/Prototypes/tournament-dashboard.html)
   — section header above a nav group, e.g. "Tournament". */
.sidebar h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-400);
  margin: var(--sp-lg) 0 var(--sp-sm);
  padding: 0 10px;
}

.sidebar nav {
  flex: 1;
}

.sidebar nav a {
  display: block;
  color: var(--navy-200);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-control);
  margin-bottom: 2px;
}

.sidebar nav a:hover {
  background: var(--navy-800);
  color: #FFFFFF;
}

/* Extracted from the prototype — the current page's nav link. */
.sidebar nav a.active {
  background: var(--navy-800);
  color: #FFFFFF;
  font-weight: 500;
}

/* Not in the prototype (its nav mockup has no disabled state) — same
   geometry as .sidebar nav a so the group lines up, muted and inert for nav
   items with no page yet (see CLAUDE.md MVP scope). No href, no hover
   feedback, so it never reads as clickable. */
.sidebar nav .nav-disabled {
  display: block;
  color: var(--navy-600);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-control);
  margin-bottom: 2px;
  cursor: default;
}

.sidebar-footer {
  border-top: 1px solid var(--navy-800);
  padding-top: var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}

.sidebar-user {
  font-size: 12px;
  color: var(--navy-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  font-family: inherit;
  font-size: 12px;
  background: none;
  border: none;
  color: var(--navy-200);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-control);
  flex-shrink: 0;
}

.logout-btn:hover {
  background: var(--navy-800);
  color: #FFFFFF;
}

/* ---------- buttons (Teams screen additions) ---------- */
/* .btn, .btn-primary, .btn-block already defined above (auth screens). */

.btn-secondary {
  background: #FFFFFF;
  color: var(--slate-700);
  border-color: var(--slate-100);
}

.btn-secondary:hover {
  background: var(--slate-50);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

/* Larger tap target for once-per-round actions (Submit Card) — see
   dimples-mobile-score-entry-addendum.md "Stat Boxes & Running Total".
   Next/Prev on the hole screen deliberately stay the smaller .nav-btn size
   instead, since those are tapped ~18 times a round. */
.btn-lg {
  padding: 13px 26px;
  font-size: 14px;
}

.btn:disabled {
  background: var(--slate-300);
  color: #FFFFFF;
  cursor: not-allowed;
  border-color: transparent;
}

/* Extracted from the prototype (docs/Prototypes/tournament-dashboard.html)
   — used by the confirm-remove dialog's "Remove team" button. */
.btn-danger {
  background: var(--penalty-500);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: var(--penalty-600);
}

/* Extracted from the prototype — the modal's delete trigger. */
.icon-danger {
  background: none;
  border: 1px solid var(--slate-100);
  cursor: pointer;
  color: var(--slate-300);
  padding: 8px;
  border-radius: var(--radius-control);
  display: inline-flex;
  line-height: 0;
}

.icon-danger:hover {
  color: var(--penalty-500);
  border-color: var(--penalty-100);
  background: var(--penalty-50);
}

/* Disabled state — not in the prototype (its mockup has no per-team
   "blocked" data), but needed since the Teams screen disables this button
   for teams that already have scores rather than always opening the
   confirm dialog. */
.icon-danger:disabled {
  color: var(--slate-100);
  cursor: not-allowed;
}

.icon-danger:disabled:hover {
  color: var(--slate-100);
  border-color: var(--slate-100);
  background: none;
}

/* ---------- badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 14px;
}

.badge-neutral {
  background: var(--slate-100);
  color: var(--slate-700);
}

.badge-scheduled {
  background: var(--navy-100);
  color: var(--navy-700);
}

.badge-live {
  background: var(--sage-100);
  color: var(--sage-700);
}

.badge-done {
  background: var(--relief-100);
  color: var(--relief-700);
}

.badge-gold {
  background: var(--gold-300);
  color: var(--navy-900);
}

/* ---------- panel ---------- */

.panel {
  background: #FFFFFF;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-xl) var(--sp-md);
}

.panel-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0;
}

.panel-head .ph-note {
  font-size: 12px;
  color: var(--slate-500);
}

.panel-body {
  padding: 0 var(--sp-xl) var(--sp-lg);
}

/* ---------- stat cards ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-card);
  padding: var(--sp-lg);
}

.stat-card .lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}

.stat-card .val {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
  line-height: 1;
}

/* Secondary "of N" suffix inside a stat value, e.g. "14 of 17" — values
   copied from the prototype's inline style on that span, promoted to a
   class per architecture.md Deviation 4 (no inline styles). */
.stat-card .val .of {
  font-size: 15px;
  color: var(--slate-300);
  font-weight: 500;
}

.stat-card .sub {
  font-size: 12px;
  color: var(--slate-500);
  margin: 6px 0 0;
}

.stat-card .sub.warn {
  color: var(--hazard-600);
}

/* ---------- teams table ---------- */

table.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.dt th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--slate-100);
  white-space: nowrap;
}

table.dt td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--slate-50);
  vertical-align: middle;
}

table.dt tr:last-child td {
  border-bottom: none;
}

table.dt td.team {
  font-weight: 500;
  color: var(--navy-900);
}

table.dt td.num {
  font-variant-numeric: tabular-nums;
}

table.dt td.muted {
  color: var(--slate-300);
}

table.dt tbody tr {
  cursor: pointer;
}

table.dt tbody tr:hover {
  background: var(--slate-50);
}

.cell-unset {
  color: var(--slate-300);
}

.hole-pill {
  display: inline-block;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--slate-700);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
  flex-wrap: wrap;
}

.table-toolbar .tt-count {
  font-size: 12px;
  color: var(--slate-500);
}

.seg {
  display: inline-flex;
  gap: 4px;
  background: var(--slate-50);
  border-radius: 9px;
  padding: 3px;
}

.seg button {
  font-family: inherit;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-500);
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
}

.seg button.on {
  background: #FFFFFF;
  color: var(--navy-900);
  box-shadow: 0 1px 2px rgba(18, 34, 56, 0.10);
  border: 1px solid var(--slate-100);
}

.seg button:hover:not(.on) {
  color: var(--slate-700);
}

/* Extracted from the prototype — the table's inline skins-status <select>. */
.skins-inline {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  appearance: none;
  background-image: none;
  text-align: center;
}

.skins-inline.v-in {
  background: var(--relief-100);
  color: var(--relief-700);
}

.skins-inline.v-out {
  background: var(--slate-100);
  color: var(--slate-700);
}

.skins-inline.v-none {
  background: transparent;
  color: var(--slate-300);
  border-color: var(--slate-100);
}

.skins-inline:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--navy-50);
}

/* ---------- hover tooltip ---------- */
/* Extracted from the prototype. Pure-CSS (:hover) rather than JS — the
   Start tournament button is disabled when not ready, and disabled elements
   don't fire JS mouse events, so the trigger is a wrapping .tip span rather
   than the control itself. */

.tip {
  position: relative;
  display: inline-flex;
}

.tip .tip-body {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-950);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 60;
  box-shadow: 0 4px 12px rgba(12, 26, 46, 0.25);
}

.tip .tip-body::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--navy-950);
}

.tip:hover .tip-body {
  opacity: 1;
}

.tip-right .tip-body {
  left: 0;
  transform: none;
}

.tip-right .tip-body::after {
  left: 18px;
  transform: none;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 34, 56, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--sp-lg);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(18, 34, 56, 0.18);
}

.modal-head {
  padding: var(--sp-xl) var(--sp-xl) var(--sp-md);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
}

.modal-head h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0;
}

.modal-head .mh-sub {
  font-size: 12px;
  color: var(--slate-500);
  margin: 3px 0 0;
}

/* Icon-only dismiss button, for modals (like the leaderboard's rules modal)
   whose only trigger is the header icon rather than a button pair in
   .modal-actions. */
.modal-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--slate-500);
  display: flex;
  border-radius: var(--radius-control);
  line-height: 0;
}

.modal-close:hover {
  background: var(--slate-50);
}

.modal-close:focus-visible {
  outline: 2px solid var(--navy-400);
  outline-offset: 2px;
}

.modal-body {
  padding: 0 var(--sp-xl);
}

/* Definition-list content (first used by the leaderboard's rules modal) —
   a short label plus explanatory copy, repeated. */
.modal-body dl {
  margin: 0 0 var(--sp-xl);
}

.modal-body dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 3px;
}

.modal-body dd {
  margin: 0 0 var(--sp-md);
  font-size: 13px;
  line-height: 1.55;
  color: var(--slate-700);
}

.modal-body dd:last-child {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-lg) var(--sp-xl);
  margin-top: var(--sp-md);
  border-top: 1px solid var(--slate-50);
}

.modal-actions .ma-right {
  display: flex;
  gap: 8px;
}

.modal-section {
  font-size: 10px;
  font-weight: 500;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--sp-lg) 0 var(--sp-sm);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}

.field-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 92px;
  gap: var(--sp-sm);
}

.player-block {
  background: var(--slate-50);
  border-radius: var(--radius-control);
  padding: var(--sp-md);
  margin-bottom: var(--sp-sm);
}

.player-block .pb-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-500);
  margin: 0 0 var(--sp-sm);
}

/* Extracted from the prototype — a field-row-3's three fields (First/Last/
   Tees) sit inside a .player-block, which already carries the row's bottom
   margin, so the fields themselves don't need their own. */
.field-row-3 .field {
  margin-bottom: 0;
}

/* Extracted from the prototype — three-way segmented control (skins: In /
   Out / Not asked) in the modal. Same button-toggle pattern as .seg. */
.seg-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--slate-50);
  border-radius: 9px;
  padding: 3px;
}

.seg-3 button {
  font-family: inherit;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-500);
  padding: 7px 0;
  border-radius: 7px;
  cursor: pointer;
}

.seg-3 button.on {
  background: #FFFFFF;
  color: var(--navy-900);
  box-shadow: 0 1px 2px rgba(18, 34, 56, 0.10);
  border: 1px solid var(--slate-100);
}

.seg-3 button:hover:not(.on) {
  color: var(--slate-700);
}

/* ---------- confirm dialogs ---------- */
/* Extracted from the prototype. .confirm-icon's base (penalty) coloring is
   the confirm-remove dialog's default; .neutral below is promoted from the
   prototype's inline style on the blocked variant's icon
   (docs/Prototypes/tournament-dashboard.html), per architecture.md
   Deviation 4 (no inline styles). */

.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 34, 56, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
  padding: var(--sp-lg);
}

.confirm-backdrop.open {
  display: flex;
}

.confirm {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  width: 380px;
  box-shadow: 0 8px 24px rgba(18, 34, 56, 0.22);
  padding: var(--sp-xl);
}

.confirm-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--penalty-50);
  color: var(--penalty-500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-md);
}

.confirm-icon.neutral {
  background: var(--slate-50);
  color: var(--slate-500);
}

.confirm h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0 0 6px;
}

.confirm p {
  font-size: 13px;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.6;
}

.confirm .impact {
  background: var(--penalty-50);
  border: 1px solid var(--penalty-100);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: var(--sp-md);
  font-size: 12px;
  color: var(--penalty-700);
  line-height: 1.6;
}

.confirm .notice {
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: var(--sp-md);
  font-size: 12px;
  color: var(--slate-700);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: var(--sp-lg);
}

/* ---------- empty state ---------- */

.empty-state {
  padding: var(--sp-2xl) var(--sp-lg);
  text-align: center;
}

.empty-state .es-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-700);
  margin: 0 0 4px;
}

.empty-state .es-body {
  font-size: 12px;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.6;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- team access (score entry gate) ---------- */
/* /card and /card/scores — see CLAUDE.md "Golfers — derived team access
   code". Composes .card, .confirm-icon, and .empty-state's title/body
   typography rather than duplicating them. */

.team-access-card {
  max-width: 360px;
  width: 100%;
  padding: var(--sp-2xl);
  margin: 0 auto;
  text-align: center;
}

.team-access-card .confirm-icon {
  margin: 0 auto var(--sp-md);
}

.team-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 var(--sp-sm);
}

.team-players {
  font-size: 15px;
  color: var(--slate-700);
  margin: 0 0 var(--sp-lg);
}

.team-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--slate-500);
  margin: 0 0 var(--sp-xl);
}

.team-access-switch {
  margin-top: var(--sp-lg);
  font-size: 12px;
  color: var(--slate-500);
}

.team-access-switch a {
  color: var(--navy-500);
  font-weight: 500;
  text-decoration: none;
}

.team-access-switch a:hover {
  text-decoration: underline;
}

/* ---------- dashboard header ---------- */

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.dash-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.2;
}

.dash-meta {
  font-size: 13px;
  color: var(--slate-500);
  margin: 6px 0 0;
}

.dash-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------- mobile score entry (/card/scores) ---------- */
/* Extracted from docs/Prototypes/mobile-score-entry.html — see
   docs/dimples-mobile-score-entry-addendum.md for the interaction model
   these rules support. Offline/localStorage styling (conn-banner,
   debug-toggle) is intentionally not ported — see CLAUDE.md task spec §3. */

.is-hidden {
  display: none;
}

.score-shell {
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-card);
  padding: var(--sp-lg);
}

.lock-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-50);
  color: var(--navy-700);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-control);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--sp-lg);
}

.lock-banner svg {
  flex-shrink: 0;
  color: var(--navy-500);
}

/* screen switcher — one of these is visible at a time, toggled by
   score-entry.js. Not display:none on the shell itself, since the shell
   (and the lock banner above it) is always visible. */
.screen {
  display: none;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* ---------- progress dots ---------- */

.dots {
  display: flex;
  gap: 8px;
  margin: 0 calc(-1 * var(--sp-lg)) var(--sp-xl);
  padding: 4px var(--sp-lg) 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.dots::-webkit-scrollbar {
  display: none;
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--slate-300);
  position: relative;
  transition: background .15s ease, color .15s ease;
  flex-shrink: 0;
  cursor: pointer;
  scroll-snap-align: center;
}

.dot.st-done {
  background: var(--relief-500);
  color: var(--navy-900);
}

.dot.st-start {
  background: var(--relief-500);
  color: var(--navy-900);
}

.dot.st-start-played {
  background: var(--relief-700);
  color: #FFFFFF;
}

.dot.sh-bogey,
.dot.sh-dbogey {
  border-radius: 8px;
}

.dot.sh-birdie {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--gold-500);
}

.dot.sh-eagle {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--gold-500), 0 0 0 6px #FFFFFF, 0 0 0 8px var(--gold-500);
}

.dot.sh-dbogey {
  box-shadow: 0 0 0 2.5px var(--navy-700);
}

.dot.current {
  color: var(--navy-900);
  border: 2.5px solid var(--navy-900);
  width: 29px;
  height: 29px;
}

.dot.locked {
  cursor: default;
  opacity: 0.55;
}

/* ---------- stat boxes ---------- */

.stat-row {
  display: flex;
  gap: 10px;
  margin: var(--sp-sm) 0 var(--sp-lg);
}

.stat-box {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-card);
  padding: 10px 8px;
  text-align: center;
}

/* Fixed height so the "Starting Hole" badge toggling in/out doesn't move
   the score below it — see the addendum's "layout-shift discipline" note. */
.stat-label-row {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-300);
}

.stat-main {
  font-size: 34px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.1;
  margin-top: 3px;
}

.stat-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-500);
  margin-top: 3px;
}

.stat-sub.good {
  color: var(--sage-500);
}

/* ---------- stepper ---------- */

.stepper-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
  padding: var(--sp-xl) 0;
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

.step-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: var(--navy-900);
  color: #FFFFFF;
  font-size: 30px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(18, 34, 56, 0.18);
  user-select: none;
}

.step-btn:active {
  background: var(--navy-700);
  transform: scale(0.96);
}

.step-btn:disabled {
  background: var(--slate-100);
  color: var(--slate-300);
  box-shadow: none;
  cursor: not-allowed;
}

.score-display {
  font-size: 104px;
  font-weight: 800;
  line-height: 1;
  color: var(--navy-900);
  min-width: 140px;
  text-align: center;
  letter-spacing: -0.02em;
}

.score-display.ghost {
  color: var(--slate-300);
}

.score-swipe-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  touch-action: none;
  padding: 8px 18px;
  cursor: pointer;
}

.swipe-chev {
  color: var(--slate-300);
}

.score-hint {
  font-size: 12px;
  color: var(--slate-300);
  text-align: center;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  height: 20px;
}

.save-status.saved {
  color: var(--relief-600);
}

.save-status.saving {
  color: var(--slate-300);
}

.save-status.error {
  color: var(--penalty-600);
}

/* ---------- hole-screen nav ---------- */

.nav-row {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-xl);
}

.nav-btn {
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-control);
  padding: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-btn.primary {
  background: var(--navy-900);
  color: #FFFFFF;
}

.nav-btn.primary:disabled {
  background: var(--slate-100);
  color: var(--slate-300);
  cursor: not-allowed;
}

.nav-btn.secondary {
  background: #FFFFFF;
  color: var(--slate-700);
  border-color: var(--slate-100);
  flex: 0 0 96px;
}

.nav-btn.secondary:disabled {
  color: var(--slate-300);
  cursor: not-allowed;
}

/* ---------- review card ---------- */

.review-head {
  text-align: center;
  margin-bottom: var(--sp-lg);
}

.review-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 4px;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--relief-50);
  color: var(--relief-700);
  border: 1px solid var(--relief-100);
}

.review-badge.incomplete {
  background: var(--hazard-50);
  color: var(--hazard-700);
  border-color: var(--hazard-100);
}

.review-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--sp-lg);
}

.review-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: var(--slate-50);
  cursor: pointer;
  border: 1px solid transparent;
}

.review-row:active {
  background: var(--navy-50);
}

.review-row .rh-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  width: 20px;
}

.review-row .rh-par {
  font-size: 11px;
  color: var(--slate-300);
  width: 66px;
}

.hcp-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 5px;
  vertical-align: middle;
}

.hcp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--navy-400);
  display: inline-block;
}

.review-row .rh-flag {
  color: var(--navy-400);
  width: 16px;
  display: inline-flex;
}

.review-row .rh-score {
  margin-left: auto;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-900);
}

.review-row .rh-topar {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-500);
  min-width: 26px;
  text-align: right;
}

.review-row .rh-topar.good {
  color: var(--sage-500);
}

.review-row .rh-chevron {
  color: var(--slate-300);
  display: inline-flex;
}

.submitted-note {
  text-align: center;
  font-size: 12px;
  color: var(--slate-500);
  margin: 0;
}

/* ---------- tabs ---------- */
/* Same component used for Front9/Back9 elsewhere and Gross/Net on the
   Leaderboard, with one scoped exception on this screen — see
   dimples-mobile-score-entry-addendum.md "Stat Boxes & Running Total":
   the active tab here is a Navy 200 tint, not solid Navy 900, so it doesn't
   visually compete with Submit Card's solid navy fill. */

.tabs {
  display: flex;
  gap: 4px;
  background: var(--slate-50);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: var(--sp-md);
}

.tab-btn {
  flex: 1;
  font-family: inherit;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-500);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--navy-200);
  color: var(--navy-900);
}

/* ---------- submitted (done) ---------- */

.done-wrap {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--sp-2xl) 0;
}

.done-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--relief-50);
  border: 2px solid var(--relief-300);
  color: var(--relief-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-lg);
}

.done-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 6px;
}

.done-sub {
  font-size: 13px;
  color: var(--slate-500);
  margin: 0 0 var(--sp-2xl);
}

.done-total {
  font-size: 15px;
  color: var(--slate-700);
  margin-bottom: var(--sp-2xl);
}

.done-total b {
  color: var(--navy-900);
  font-size: 20px;
}

.btn-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-500);
  cursor: pointer;
  padding: 10px;
}

/* ---------- alerts ---------- */
/* Page-level messages. Hazard for genuine problems needing action —
   never for normal in-between states. */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-control);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: var(--sp-lg);
}

.alert-warning {
  background: var(--hazard-50);
  color: var(--hazard-700);
  border: 1px solid var(--hazard-100);
}

.alert ul {
  margin: 0;
  padding-left: 18px;
}

.alert ul li {
  list-style: none;
  margin-left: -18px;
}

/* ---------- results shell ---------- */
/* /tournaments/{id}/results — the single URL handed to teams. Ported from
   docs/Prototypes/results-shell.html's marked "promote to dimples.css"
   block; class prefix renamed rs- -> results- to match this file's
   multi-word naming convention (e.g. .team-access-card, .dash-header)
   rather than an opaque abbreviation. Tokens are unchanged from the
   prototype — every value below already resolves to a variable defined at
   the top of this file. */

.results-shell {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

/* Full lockup, Default size: 32px mark, 22px wordmark, 14px gap
   (dimples-design-system.md §Logo §Lockup). This is the front door, so the
   mark earns its place here in a way it would not on a child page. */
.results-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--sp-2xl);
}

.results-logo svg {
  flex-shrink: 0;
}

.results-wordmark {
  font-size: 22px;
}

.results-event {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 6px;
  line-height: 1.2;
}

.results-where {
  font-size: 13px;
  color: var(--slate-500);
  margin: 0 0 var(--sp-lg);
}

/* Status line — deliberately NOT a pill. A filled, bordered capsule reads
   as a control, and this sits directly above two real tap targets. The dot
   carries the state; the text stays plain. */
.results-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: var(--sp-2xl);
}

.results-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.results-status.is-final .results-dot {
  background: var(--relief-600);
}

.results-status.is-waiting .results-dot {
  background: var(--gold-400);
}

.results-status.is-draft {
  color: var(--slate-500);
}

.results-status.is-draft .results-dot {
  background: var(--slate-300);
}

/* big tap targets */
.results-tiles {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  text-align: left;
}

.results-tile {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: #fff;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-card);
  padding: 18px var(--sp-lg);
  min-height: 84px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .results-tile:hover {
    border-color: var(--navy-200);
    background: var(--navy-50);
  }
}

.results-tile:focus-visible {
  outline: 2px solid var(--navy-400);
  outline-offset: 2px;
}

.results-chip {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-chip.is-board {
  background: var(--navy-50);
  color: var(--navy-700);
}

.results-chip.is-skins {
  background: var(--gold-50);
  color: var(--gold-600);
}

.results-tile-body {
  flex: 1;
  min-width: 0;
}

.results-tile-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0;
}

.results-tile-sub {
  font-size: 12px;
  color: var(--slate-500);
  margin: 3px 0 0;
}

.results-chev {
  color: var(--slate-300);
  flex-shrink: 0;
}

/* Not closed yet: tiles stay visible but inert. Hiding them would leave the
   page empty and tell a waiting team nothing about what is coming. */
.results-tile.is-locked {
  cursor: default;
  background: var(--slate-50);
  border-style: dashed;
  border-color: var(--slate-100);
}

.results-tile.is-locked .results-tile-title {
  color: var(--slate-500);
}

.results-tile.is-locked .results-chip {
  background: var(--slate-100);
  color: var(--slate-300);
}

.results-tile.is-locked .results-chev {
  visibility: hidden;
}

.results-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--slate-500);
  margin: var(--sp-xl) 0 0;
}

.results-url {
  display: block;
  margin-top: var(--sp-sm);
  font-size: 12px;
  color: var(--navy-500);
  word-break: break-all;
}

/* ---------- results footer nav ---------- */
/* Shared by all three results screens (leaderboard, skins, scoring details)
   — score-detail.md "Sibling Navigation": each page links to its two
   siblings, same pattern. Generic (not leaderboard-prefixed) so the skins
   and scoring-details pages reuse it without renaming. */

.results-footer-nav {
  max-width: 520px;
  margin: var(--sp-lg) auto 0;
  display: flex;
  justify-content: center;
  gap: var(--sp-lg);
}

.results-footer-nav a {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-500);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .results-footer-nav a:hover {
    color: var(--navy-500);
    text-decoration: underline;
  }
}

.results-footer-nav a:focus-visible {
  outline: 2px solid var(--navy-400);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- leaderboard ---------- */
/* /tournaments/{id}/results/leaderboard — see docs/leaderboard.md. Ported
   from docs/Prototypes/leaderboard.html's marked "promote to dimples.css"
   block; class prefix renamed lb- -> leaderboard-, matching this file's
   multi-word naming convention (see the results-shell section above for the
   same rename). Tabs reuse the existing .tabs/.tab-btn component (already
   shared with Front9/Back9 — see that component's comment) rather than
   duplicating tab styling here. Tokens are unchanged from the prototype.
*/

.leaderboard-card {
  max-width: 520px;
  margin: 0 auto;
}

.leaderboard-card .confirm-icon {
  margin: 0 auto var(--sp-md);
}

.leaderboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.leaderboard-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0;
}

.leaderboard-sub {
  font-size: 12px;
  color: var(--slate-500);
  margin: 4px 0 0;
}

.leaderboard-help {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--slate-300);
  display: flex;
  border-radius: var(--radius-control);
  line-height: 0;
}

.leaderboard-help:hover {
  color: var(--slate-500);
  background: var(--slate-50);
}

.leaderboard-help:focus-visible {
  outline: 2px solid var(--navy-400);
  outline-offset: 2px;
}

/* rows */

.leaderboard-row {
  display: grid;
  align-items: center;
  grid-template-columns: 40px 1fr 60px;
  padding: 12px var(--sp-xs);
  border-bottom: 1px solid var(--slate-50);
  font-size: 14px;
}

.leaderboard-head-row {
  padding: 0 var(--sp-xs) var(--sp-sm);
  border-bottom: 1px solid var(--slate-100);
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leaderboard-body[data-tab="net"] .leaderboard-row {
  grid-template-columns: 40px 1fr 44px 50px 60px;
}

.leaderboard-pos {
  font-weight: 600;
  color: var(--navy-900);
}

.leaderboard-team {
  font-weight: 500;
  color: var(--navy-900);
}

.leaderboard-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
}

.leaderboard-sec {
  text-align: right;
  font-size: 13px;
  color: var(--slate-500);
}

.leaderboard-grs {
  text-align: right;
  font-size: 13px;
  color: var(--slate-300);
}

.leaderboard-head-row span:not(:nth-child(2)):not(:first-child) {
  text-align: right;
}

/* ranked and DNF rows are both links to the score details page */

.leaderboard-row[role="link"] {
  cursor: pointer;
  border-radius: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .leaderboard-row[role="link"]:hover {
    background: var(--slate-50);
  }

  .leaderboard-row.is-dnf[role="link"]:hover {
    background: var(--hazard-100);
  }
}

.leaderboard-row[role="link"]:focus-visible {
  outline: 2px solid var(--navy-400);
  outline-offset: -2px;
  border-radius: var(--radius-control);
}

/* DNF */

.leaderboard-row.is-dnf {
  background: var(--hazard-50);
  border-radius: var(--radius-control);
}

.leaderboard-row.is-dnf .leaderboard-pos {
  color: var(--hazard-600);
  font-size: 12px;
}

.leaderboard-row.is-dnf .leaderboard-num,
.leaderboard-row.is-dnf .leaderboard-sec,
.leaderboard-row.is-dnf .leaderboard-grs {
  color: var(--hazard-600);
  font-size: 13px;
  font-weight: 400;
}

.leaderboard-thru {
  font-weight: 400;
  color: var(--hazard-600);
  font-size: 12px;
}

/* tie glyph + tooltip */

.leaderboard-tie {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.leaderboard-tie-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  color: var(--slate-300);
  display: flex;
  border-radius: 50%;
}

.leaderboard-tie-btn:hover {
  color: var(--navy-400);
}

.leaderboard-tie-btn:focus-visible {
  outline: 2px solid var(--navy-400);
  outline-offset: 2px;
}

.leaderboard-tip {
  position: absolute;
  left: 0;
  top: 24px;
  z-index: 20;
  width: 230px;
  background: var(--navy-900);
  color: #FFFFFF;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  box-shadow: 0 4px 12px rgba(18, 34, 56, 0.25);
}

/* responsive: net tab drops Grs below 640px. Hcp stays — it explains Net. */

@media (max-width: 639px) {
  .leaderboard-body[data-tab="net"] .leaderboard-row {
    grid-template-columns: 40px 1fr 44px 60px;
  }

  .leaderboard-body[data-tab="net"] .leaderboard-grs {
    display: none;
  }

  .leaderboard-card {
    padding: var(--sp-lg);
  }
}