/* 2026-10-02: re-issued (new file hash) so browsers drop a copy the external
   proxy delivered brotli-mangled -- see config/storage.py. */
/* MyGolfStory, formerly eScorecard (apps.scoring) — kept in its own stylesheet, loaded only by
   templates/scoring/base.html, so this app stays cheap to re-parent or
   lift out later (see apps/scoring's own commit messages). */

/* MyGolfStory's colours (user, 2026-10-22; PLAN.md): its pages (body.sc-body)
   re-colour base.css's --gc-* tokens, so the members' portal keeps its own.
   Fairway #126B45 (buttons, brand), Pine #0C3324 (text), Flag Gold #E8A317. */
body.sc-body {
  --gc-green: #126b45;
  --gc-green-dark: #0c3324;
  --gc-green-mid: #1e7a4c;  /* text on white: 5.3:1 */
  --gc-fairway: #2e8f5c;
  --gc-blue: #1f6fb0;
  --gc-bg: #f7f8f5;
  --gc-text: #0c3324;
  --gc-border: #dde3de;
  --gc-muted: #5b6b62;
  --gc-gold: #e8a317;
  --gc-mint: #e6f2ec;
}
/* the header: a club's logo or MyGolfStory's mark, then the MyGolfStory name
   (user, 2026-10-22); a plain Fairway rule under it instead of the club
   crest's four waves */
.sc-body .sc-site-header { border-image: none; border-bottom: 4px solid var(--gc-green); }
.sc-brand-mark { width: 36px; height: 36px; flex: none; }
.sc-site-header .sc-brand-name { font-weight: 800; letter-spacing: -0.01em; color: var(--gc-green-dark); }
.sc-brand-story { color: var(--gc-green); }
/* a small screen: the player's name gives a little room to the brand */
@media (max-width: 400px) {
  .sc-body .sc-site-header .gc-welcome { max-width: 40vw; }
}
@media (max-width: 360px) {
  .sc-body .sc-site-header .gc-welcome { max-width: 36vw; }
  .sc-site-header .sc-brand-name { font-size: 0.95rem; }
}

.sc-app { max-width: 720px; margin: 0 auto; padding: 0 12px; }
/* hidden means hidden, whatever display a component gives itself */
.sc-app [hidden] { display: none !important; }

.sc-round-list li { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid #e5e5e0; }

.sc-conflict {
  background: #fff3b0; border: 1px solid #d9b800; border-radius: 6px;
  padding: 8px 10px; margin: 8px 0; font-size: 0.9rem;
}

/* Scrollable, mobile-first grid (same pattern as .gc-grid-scroll / .gc-tee-grid in base.css) */
.sc-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sc-card-grid { border-collapse: collapse; width: 100%; }
/* Only the hole-by-hole grids need room (they scroll inside .sc-grid-scroll);
   summary tables (Special Challenges net, System 36, ...) must fit a 320px phone. */
.sc-grid-scroll > .sc-card-grid { min-width: 480px; }
.sc-card-grid th, .sc-card-grid td { border: 1px solid #ddd; padding: 4px 6px; text-align: center; font-size: 0.85rem; }
.sc-card-grid th.sc-player-col, .sc-card-grid td.sc-player-col { text-align: left; position: sticky; left: 0; background: #fff; min-width: 90px; }


/* Score-shape badges (par-relative), mirroring the iOS scorecard convention
   (PLAN-escorecard.md §3.1): eagle+ = filled circle, birdie = ring, par =
   plain text, bogey = square outline, double = double square, triple+ =
   thick square. */
.sc-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.sc-badge-eagle { border-radius: 50%; background: var(--gc-green-mid, #2f7a2a); color: #fff; }
.sc-badge-birdie { border-radius: 50%; border: 2px solid var(--gc-green-mid, #2f7a2a); }
.sc-badge-par { }
.sc-badge-bogey { border: 1px solid #b33; }
.sc-badge-double { border: 2px double #b33; }
.sc-badge-triple { border: 3px solid #7a0000; }


.sc-toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0; }

/* ---- Hole-by-hole layout (iOS ScorecardView look, eScorecard00.png) ---- */
.sc-app { --sc-blue: var(--gc-blue, #1f6fb0); --sc-blue-soft: #d2e4f4; --sc-panel: #f2f2f2; --sc-muted: #8a8a8e; --sc-line: #e2e2e2; }

.sc-topbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.sc-title { flex: 1; min-width: 0; margin: 0; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-round-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--sc-line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); font-size: 1.5rem; line-height: 1; color: inherit; text-decoration: none; cursor: pointer;
}
.sc-more { position: relative; }
.sc-more-menu {
  position: absolute; right: 0; top: 46px; z-index: 20; width: min(240px, calc(100vw - 32px));
  flex-direction: column; gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--sc-line);
  border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.sc-more-menu a, .sc-more-menu button { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; text-align: left; width: 100%; }
.sc-more-menu a:hover { background: var(--sc-panel); }
.sc-more-menu p { margin: 0 10px 4px; }

.sc-pills {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 0; margin: 0 -12px; padding-inline: 12px; background: var(--gc-bg, #f7f7f5); border-bottom: 1px solid var(--sc-line);
  scrollbar-width: none;
}
.sc-pills::-webkit-scrollbar { display: none; }
.sc-pill {
  flex: none; display: flex; flex-direction: column; align-items: center; min-width: 40px; padding: 4px 6px;
  border-radius: 8px; background: #ececec; color: var(--sc-blue); text-decoration: none; line-height: 1.15;
}
.sc-pill-no { font-weight: 700; font-size: 0.95rem; }
.sc-pill-par { font-size: 0.7rem; }
.sc-pill-idx { font-size: 0.6rem; opacity: 0.7; }
/* A club's notices (user, 2026-10-20): above the pill bar, both pinned at the top while scrolling.
   Urgent: red, pulsing about once a second (steady when motion is reduced); notice: amber, steady. */
.sc-top { position: sticky; top: 0; z-index: 10; }
.sc-top .sc-pills { position: static; }
.sc-notices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0 -12px; padding: 8px 12px 0; background: var(--gc-bg, #f7f7f5); }
.sc-notices:empty { display: none; }  /* none to show (the strip stays, for its refresh) */
.sc-notice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 6px 10px 12px; border-radius: 10px; }
.sc-notice[hidden] { display: none; }
.sc-notice-urgent { background: #c62828; color: #fff; animation: sc-notice-pulse 0.5s ease-in-out infinite alternate; }
.sc-notice-notice { background: #fff4d1; color: #4d3800; border: 2px solid #e8a800; }
@keyframes sc-notice-pulse {
  from { background: #b71c1c; box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
  to { background: #e53935; box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.45); }
}
@media (prefers-reduced-motion: reduce) { .sc-notice-urgent { animation: none; } }
.sc-notice-icon { flex: none; font-size: 1.4rem; line-height: 1.2; }
.sc-notice-body { flex: 1; min-width: 0; }
.sc-notice-text { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-line; }  /* the admin's line breaks */
.sc-notice-meta { margin: 3px 0 0; font-size: 0.8rem; opacity: 0.92; }
.sc-notice-toggle {
  flex: none; min-width: 36px; min-height: 36px; margin: -6px 0; padding: 0; border: none; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-size: 1.1rem; cursor: pointer;
}
.sc-notice-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
/* shrunk by the player: one line, tap to open again */
.sc-notice-shrunk { align-items: center; padding-block: 4px; cursor: pointer; }
.sc-notice-shrunk .sc-notice-icon { font-size: 1.05rem; }
.sc-notice-shrunk .sc-notice-meta { display: none; }
.sc-notice-shrunk .sc-notice-text { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-pill-selected { background: var(--sc-blue); color: #fff; }

.sc-date { margin: 10px 0 8px; font-size: 0.9rem; font-weight: 600; }
/* a viewer's card (the game shared with them, read-only) */
.sc-view-only { margin: 10px 0 0; padding: 6px 10px; border-radius: 8px; background: #eef4fb; color: #1f6fb0; font-size: 0.85rem; }
.sc-date-link { color: inherit; text-decoration: none; }
.sc-date-link:hover, .sc-date-link:focus-visible { text-decoration: underline; }
.sc-inline-form { display: inline; }
.sc-date span, .sc-muted { color: var(--sc-muted); font-size: 0.8rem; }

.sc-panel { background: var(--sc-panel); border-radius: 16px; padding: 10px; margin-bottom: 10px; }

/* Nine grids: fixed layout so 9 holes + totals fit a 320px phone */
.sc-nine { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.75rem; }
.sc-nine th, .sc-nine td { padding: 3px 1px; text-align: center; }
.sc-nine thead th { background: #e3e3e3; color: #777; font-weight: 600; }
.sc-nine .sc-nine-name { width: 30%; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.sc-nine tbody td { color: #999; }
.sc-nine tbody td.sc-nine-name { color: var(--gc-text, #1a1a1a); }
.sc-nine tbody tr:first-child td { border-top: 1px solid #d5d5d5; }
.sc-nine .sc-nine-total { color: var(--gc-text, #1a1a1a); font-weight: 700; }
.sc-nine .sc-nine-label { white-space: nowrap; }  /* "前九" on one line (zh) */
.sc-nine-hole { display: inline-block; min-width: 18px; border-radius: 5px; color: inherit; text-decoration: none; }
.sc-nine-selected { background: var(--sc-blue); color: #fff; }
.sc-nine td.sc-nine-current { background: var(--sc-blue-soft); border-radius: 5px; color: var(--gc-text, #1a1a1a); }
.sc-nine .sc-badge { width: 16px; height: 16px; }
.sc-nine thead tr.sc-nine-idx th { font-size: 0.66rem; font-weight: 500; color: #8a8a8e; padding-top: 0; }
/* a yardage row per tee the players play from: 3-4 digits in a narrow column */
.sc-nine thead tr.sc-nine-yds th { font-size: 0.6rem; font-weight: 500; color: #6e6e73; padding-top: 0; letter-spacing: -0.03em; overflow: hidden; }
.sc-nine thead tr.sc-nine-yds th.sc-nine-name { font-size: 0.66rem; letter-spacing: 0; }
.sc-nine thead tr.sc-nine-yds th.sc-yds-total { font-size: 0.5rem; letter-spacing: -0.06em; padding-left: 0; padding-right: 0; }
.sc-nine-yds .sc-dot { width: 8px; height: 8px; margin-right: 3px; }
/* blank cell under the back nine's Tot: the nines' columns line up */
.sc-nine th.sc-nine-pad, .sc-nine td.sc-nine-pad, .sc-nine tbody tr:first-child td.sc-nine-pad { background: none; border: 0; }

.sc-dot {
  display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px;
  border: 1px solid #999; background: #fff; vertical-align: -1px;
}

.sc-hole-card h2 { margin: 0; font-size: 1.6rem; }
.sc-hole-yards { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 0.8rem; color: var(--sc-muted); }
.sc-hole-yards > span { white-space: nowrap; }
.sc-hole-yards b { color: var(--gc-text, #1a1a1a); font-weight: 600; }
.sc-hole-yards .sc-dot { width: 9px; height: 9px; margin-right: 4px; }
.sc-hole-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 4px 6px 8px; }
.sc-hole-head p { margin: 0; }
.sc-hole-date { text-align: right; color: inherit; text-decoration: none; }
.sc-hole-date:hover, .sc-hole-date:focus-visible { text-decoration: underline; }
.sc-game-panel { border-radius: 12px; padding: 8px 10px; font-size: 0.85rem; }
.sc-game-panel p { margin: 0 0 6px; }
.sc-game-saddam { background: #f7e4e4; border: 1px solid #e8b4b4; }
.sc-game-title { font-weight: 700; }
.sc-game-title span { color: #d33; }
.sc-game-hole { display: inline-block; background: rgba(0, 0, 0, 0.06); border-radius: 6px; padding: 2px 10px; color: #777; }
.sc-game-total { display: flex; flex-wrap: wrap; gap: 4px 10px; border-top: 1px solid #e8c9c9; padding-top: 6px; color: #666; }
.sc-game-total b { color: #999; }
.sc-crown { color: #d33; margin-right: 2px; }

.sc-player-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-received { display: inline-flex; gap: 3px; padding: 3px 6px; border-radius: 999px; background: rgba(139, 94, 60, 0.12); }
.sc-received i { width: 7px; height: 7px; border-radius: 50%; background: #8b5e3c; }
.sc-chip { padding: 1px 8px; border-radius: 999px; background: #8e8e93; color: #fff; font-size: 0.75rem; white-space: nowrap; }
.sc-chip-up { background: #34a853; }
.sc-chip-down { background: #d93025; }
/* Pts by the player's name: tap for the points against each other player */
.sc-pts { position: relative; }
.sc-pts > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: 4px; }
.sc-pts > summary::-webkit-details-marker { display: none; }
.sc-pts > summary small { font-size: 0.65rem; }
.sc-pts-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; max-width: min(280px, calc(100vw - 32px));
  background: #fff; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); padding: 4px 0; }
.sc-pts-row { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 14px; font-size: 0.9rem; }
.sc-pts-row + .sc-pts-row { border-top: 1px solid #eee; }
.sc-pts-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-pts-title { padding-bottom: 8px; }
.sc-pts-row b:not(.sc-up):not(.sc-down) { color: #8e8e93; }
.sc-strokes-label { text-align: center; margin: 8px 0 2px; }
.sc-stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
/* a quick second tap beside + / − (or on the score between them) mustn't zoom the page (iOS: double-tap zoom) */
.sc-player-card { touch-action: manipulation; }
.sc-stepper form { margin: 0; }
.sc-step {
  width: 44px; height: 44px; border-radius: 50%; border: none; color: #fff; font-size: 1.7rem; line-height: 1;
  background: var(--sc-blue); cursor: pointer; touch-action: manipulation;
}
.sc-step:disabled { background: #c7c7cc; cursor: default; }
.sc-stroke-value {
  min-width: 56px; border: none; background: none; font-size: 2rem; font-weight: 700; font-family: ui-rounded, system-ui, sans-serif;
  color: var(--gc-text, #1a1a1a); cursor: pointer; padding: 0;
}
.sc-hole-points { text-align: center; margin: 4px 0 8px; }

/* The hole bar: fixed to the screen's foot, not sticky inside the card --
   the card is swapped every few seconds (and after each tap), and iPhone
   Safari could leave a sticky bar drawn mid-page, over the next player's
   name, until the next scroll (user, 2026-10-05). The page keeps room
   for it at the bottom. */
.sc-footer {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 720px; margin: 0 auto; z-index: 10;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--gc-bg, #f7f7f5); border-top: 1px solid var(--sc-line);
  text-align: center; color: var(--sc-muted); font-size: 0.9rem;
}
.sc-app:has(.sc-footer) { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.sc-footer a { font-size: 1.8rem; line-height: 1; color: var(--sc-blue); text-decoration: none; }
/* every hole scored: Finish game takes the next-hole slot */
.sc-footer:has(.sc-footer-finish) { grid-template-columns: 44px 1fr auto; }
.sc-footer-finish { margin: 0; }
.sc-footer-finish button { padding: 8px 14px; border: none; border-radius: 10px; background: var(--gc-green, #005030); color: #fff; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.sc-footer-finish button:hover, .sc-footer-finish button:focus-visible { background: var(--gc-green-dark, #003a22); }
.sc-nine tbody td.sc-nine-scored { color: var(--gc-text, #1a1a1a); }

/* Narrow phones: 9 two-digit holes + In + Tot need every pixel */
@media (max-width: 400px) {
  .sc-app { padding: 0; }
  .sc-pills { margin-inline: 0; }
  .sc-notices { margin-inline: 0; padding-inline: 6px; }
  .sc-panel { padding: 8px 6px; }
  .sc-nine { font-size: 0.68rem; }
  .sc-nine .sc-nine-name { width: 25%; }
  .sc-nine th, .sc-nine td { padding: 3px 0; letter-spacing: -0.02em; }
}

/* Tee-colour picker on the player card's dot */
.sc-tee { position: relative; flex: none; }
.sc-tee-btn { display: flex; align-items: center; padding: 4px; margin: -4px; border: none; background: none; cursor: pointer; }
.sc-dot-lg { width: 16px; height: 16px; margin-right: 0; }
.sc-tee-menu {
  position: absolute; left: 0; top: 26px; z-index: 15; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  width: 200px; padding: 8px; background: #fff; border: 1px solid var(--sc-line); border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.sc-tee-menu form { margin: 0; }
.sc-tee-menu button {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px; border: 1px solid transparent;
  border-radius: 8px; background: none; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.sc-tee-menu button.sc-on { border-color: var(--sc-blue); background: #e6f0f9; }
.sc-tee-menu .sc-dot { width: 14px; height: 14px; margin: 0; }

.sc-tee-menu[hidden], .sc-more-menu[hidden] { display: none; }

/* Saddam per-hole grid: W / T / L under the hole's Saddam */
.sc-saddam-grid tbody td { font-weight: 700; }
.sc-nine tbody td.sc-saddam-win { color: var(--gc-green-mid, #2f7a2a); background: #e3f4e8; border-radius: 5px; }
.sc-nine tbody td.sc-saddam-lose { color: #d93025; background: #fbe6e4; border-radius: 5px; }
.sc-nine tbody td.sc-saddam-tie { color: #555; background: #ececec; border-radius: 5px; }
.sc-nine tbody td.sc-saddam-pending { color: #aaa; font-weight: 400; }

/* Stroke Discount editor (_stroke_discount.html) */
.sc-sd { display: grid; gap: 8px; }
.sc-sd-toggles { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sc-sd-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.sc-sd-part input[type="number"] { width: 5.5em; }
.sc-sd-part select { width: auto; }
.sc-sd-label { margin: 4px 0; font-weight: 600; font-size: 0.85rem; }
.sc-hole-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sc-hole-picker .sc-hole-tile {
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; padding: 4px 0; border: 1px solid var(--gc-border, #ddd);
  border-radius: 8px; background: #fff; font-size: 0.8rem; line-height: 1.2; cursor: pointer; margin: 0 !important;
}
.sc-hole-tile small { color: #888; font-size: 0.68rem; }
.sc-hole-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc-hole-tile:has(input:checked) { background: var(--sc-blue); border-color: var(--sc-blue); color: #fff; }
.sc-hole-tile:has(input:checked) small { color: #d6e6f5; }
.sc-hole-tile:has(input:focus-visible) { outline: 2px solid var(--sc-blue); outline-offset: 1px; }
button.sc-sd-open {
  display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: none !important;
  padding: 8px 10px; border: 1px solid var(--gc-border, #ddd); border-radius: 8px; background: #fff;
  font: inherit; text-align: left; cursor: pointer; color: inherit;
}
button.sc-sd-open span { color: #555; }
.sc-sd-panel { padding: 8px 0 4px; }
.gc-card button.sc-sd-open, .gc-card button.sc-sd-open:hover { background: #fff; color: inherit; }

/* Edit Players */
.sc-players-form { display: grid; gap: 12px; }
.sc-edit-player { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--gc-border, #ddd); border-radius: 12px; background: #fafafa; }
.sc-edit-head { display: flex; gap: 6px; align-items: center; }
.sc-edit-head input[type="text"] { flex: 1; min-width: 0; max-width: none; font-weight: 600; }
.gc-card button.sc-edit-move { width: 38px; height: 38px; padding: 0; flex: none; background: #fff; color: inherit; border: 1px solid var(--gc-border, #ddd); }
/* Tee / Gender / HCP side by side, each label over its box */
.sc-edit-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5em, 1fr)); gap: 8px 10px; align-items: start; }
.sc-auth-form .sc-edit-row label { display: grid; gap: 3px; font-size: 0.9rem; }
.sc-auth-form .sc-edit-row select, .sc-auth-form .sc-edit-row input { width: 100%; }
.sc-edit-basis { display: grid; gap: 6px; }
.sc-edit-basis p { margin: 0; }

/* Side-game "Stroke Discounts" */
.sc-sgd { display: grid; gap: 6px; }
.sc-sgd-rows { display: grid; gap: 6px; }

/* Putts (iOS putt tracking) */
.sc-putts { border-top: 1px solid #ddd; margin-top: 4px; padding-top: 2px; }
.sc-nine tr.sc-nine-putts td { font-size: 0.66rem; color: #8a8a8e; padding-top: 0; }
.sc-nine tr.sc-nine-putts td.sc-nine-name { padding-left: 18px; color: #8a8a8e; }
.sc-nine tr.sc-nine-putts td.sc-nine-total { color: #555; }
.sc-putting td { white-space: nowrap; }
.sc-putting td.sc-putt-0.sc-nine-scored { color: #6a3ea1; }
.sc-putting td.sc-putt-1.sc-nine-scored { color: #0f8a83; }
.sc-putting td.sc-putt-3.sc-nine-scored { color: #c0600a; }
.sc-putting td.sc-putt-4.sc-nine-scored { color: var(--gc-red, #d80030); }

/* Penalty / Bunker counters (iOS: orange / sand, smaller, side by side) */
.sc-counters { display: flex; border-top: 1px solid #ddd; margin-top: 4px; padding-top: 4px; }
.sc-counter { flex: 1; text-align: center; }
.sc-counter + .sc-counter { border-left: 1px solid #ddd; }
.sc-counter-label { margin: 4px 0 2px; }
.sc-counter-value { min-width: 32px; font-size: 1.5rem; font-weight: 700; font-family: ui-rounded, system-ui, sans-serif; }
.sc-counter-penalty .sc-step:not(:disabled) { background: #e8860c; }
.sc-counter-penalty .sc-counter-label span { color: #e8860c; }
.sc-counter-bunker .sc-step:not(:disabled) { background: #b38a4f; }
.sc-edit-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.sc-auth-form .sc-edit-track label { display: flex; align-items: center; gap: 6px; }
.sc-auth-form .sc-edit-track input { width: auto; }

/* Per-hole GIR / Putts / Penalty / Bunker tables */
.sc-hole-stats { margin-bottom: 6px; }
.sc-hole-stats .sc-panel { margin-top: 4px; }
.sc-hole-stats-table td, .sc-hole-stats-table th { font-size: 0.8rem; }
.sc-hole-stats-table tr.sc-unplayed td { color: #c7c7cc; }
.sc-gir { color: var(--gc-green-mid, #2f7a2a); font-weight: 700; }
.sc-hole-stats-table td.sc-putt-good { color: var(--gc-green-mid, #2f7a2a); font-weight: 600; }
.sc-hole-stats-table td.sc-putt-bad { color: var(--gc-red, #d80030); font-weight: 600; }
.sc-hole-stats-table td.sc-pen { color: #e8860c; }
.sc-hole-stats-table td.sc-bkr { color: #b38a4f; }

/* Mulligan toggle (iOS: purple "M" / grey "–") */
.sc-counter-mulligan .sc-counter-label span { color: #7b3fbf; }
.sc-counter-mulligan form { margin: 0; }
.sc-mulligan {
  display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 36px; border: none;
  border-radius: 8px; background: rgba(120, 120, 128, 0.1); color: #c7c7cc; font: 700 1.35rem ui-rounded, system-ui, sans-serif;
  cursor: pointer; touch-action: manipulation;
}
.sc-mulligan.sc-on { background: rgba(123, 63, 191, 0.15); color: #7b3fbf; }
/* Sandy toggle: the same button, sand-coloured when on */
.sc-counter-sandy .sc-counter-label span { color: #b8901f; }
.sc-counter-sandy form { margin: 0; }
.sc-sandy.sc-on { background: rgba(201, 162, 39, 0.2); color: #9a7714; }
.sc-sandies-result td.sc-sandy-holes { white-space: normal; text-align: left; }
.sc-nine tr.sc-nine-mulligans td b { color: #7b3fbf; }
.sc-hole-stats-table td.sc-mlg { color: #7b3fbf; font-weight: 700; }

/* Three trackers (Penalty + Bunker + Mulligan) must fit a 320px phone:
   compact controls, and wrap rather than overflow as a last resort. */
.sc-counters { flex-wrap: wrap; }
.sc-counter { min-width: 0; }
@media (max-width: 400px) {
  .sc-counter-value { min-width: 22px; font-size: 1.3rem; }
  .sc-mulligan { width: 56px; height: 30px; font-size: 1.15rem; }
  .sc-counter-label { font-size: 0.7rem; }
}

/* Round Stats (finished game) */
.sc-round-stats h4 { margin: 14px 0 6px; font-size: 0.95rem; }
.sc-rs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; }
.sc-rs-head h3 { margin: 0; }
.sc-seg { display: inline-flex; border: 1px solid var(--sc-line); border-radius: 8px; overflow: hidden; background: #fff; }
.sc-seg button { border: none; background: none; padding: 5px 14px; font: inherit; font-size: 0.85rem; color: #555; cursor: pointer; }
.sc-seg button[aria-pressed="true"] { background: var(--gc-green, #005030); color: #fff; font-weight: 600; }
.sc-basis { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.sc-basis .sc-muted { font-size: 0.85rem; }
.sc-basis-note { margin: -4px 0 10px; }
.sc-hcp { font-size: 0.75rem; color: var(--sc-muted); white-space: nowrap; }
.sc-rs-table td, .sc-rs-table th { font-size: 0.8rem; }
.sc-rs-table tbody td { color: var(--gc-text, #1a1a1a); }
.sc-rs-table .sc-nine-name { width: 36%; }
.sc-dnf { color: var(--gc-red, #d80030) !important; }
.sc-under { color: var(--gc-blue, #1f6fb0) !important; font-weight: 700; }
.sc-even { color: var(--gc-green-mid, #2f7a2a) !important; font-weight: 700; }
.sc-over { color: var(--gc-red, #d80030) !important; font-weight: 700; }
.sc-up { color: var(--gc-green-mid, #2f7a2a) !important; font-weight: 600; }
.sc-down { color: var(--gc-red, #d80030) !important; font-weight: 600; }
.sc-mid { color: #c0600a !important; font-weight: 600; }
.sc-rs-eagle { color: #6a3ea1 !important; font-weight: 700; }
.sc-rs-birdie { color: var(--gc-blue, #1f6fb0) !important; font-weight: 700; }
.sc-rs-bogey { color: #c0600a !important; }
.sc-rs-other { color: var(--gc-red, #d80030) !important; }
.sc-h2h td.sc-h2h-self { color: #ccc !important; }
.sc-short { display: none; }
@media (max-width: 400px) {
  .sc-long { display: none; }
  .sc-short { display: inline; }
  .sc-rs-table .sc-nine-name { width: 30%; }
}

/* Strokes | Putts side by side (iOS GolferScoreCard) */
.sc-entry { display: flex; align-items: flex-start; }
.sc-entry-col { flex: 1; min-width: 0; }
.sc-entry .sc-putts { border-top: none; margin-top: 0; padding-top: 0; border-left: 1px solid #ddd; }
.sc-entry .sc-stepper { gap: 10px; }
@media (max-width: 400px) {
  .sc-entry .sc-stepper { gap: 4px; }
  .sc-entry .sc-step { width: 38px; height: 38px; font-size: 1.45rem; }
  .sc-entry .sc-stroke-value { min-width: 36px; font-size: 1.7rem; }
}

/* Stroke Discount indicator (iOS: brown diagonal slashes, bottom-right of
   a grid cell, one per stroke received on that hole) */
.sc-nine td.sc-nine-cell { position: relative; }
.sc-disc { position: absolute; right: 2px; bottom: 1px; display: flex; gap: 2px; pointer-events: none; line-height: 0; }
.sc-disc i { display: block; width: 1.5px; height: 7px; background: #8b5e3c; border-radius: 1px; transform: skewX(-30deg); }

/* eScorecard's own layout and sign-in */
/* The header: one row at every width (PLAN-layout E-1). On a phone the
   player's name (to My account) is all that's on the right -- Admin and
   Sign out are on My account. */
.sc-site-header { flex-wrap: nowrap; }
.sc-site-header .gc-brand { flex: 0 1 auto; }
.sc-site-header .gc-header-right { flex: 0 1 auto; min-width: 0; }
.sc-site-header .gc-welcome { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 479px) {
  .sc-site-header .sc-hdr-wide { display: none; }
  .sc-site-header .gc-welcome { max-width: 45vw; font-weight: 600; }
}
.sc-site-header .sc-hdr-right { flex-direction: column; align-items: flex-end; gap: 4px; }
.sc-site-header .sc-hdr-top { display: flex; align-items: center; gap: 12px; }
.sc-site-header .sc-hdr-who { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.sc-site-header .gc-lang-switch select { padding: 2px 4px; font-size: .85rem; }
.sc-auth-form { display: grid; gap: 10px; max-width: 420px; }
.sc-auth-form label { display: grid; gap: 4px; }
.sc-auth-form .sc-forgot { justify-self: start; font-size: 0.9rem; }  /* Sign in: Forgot password? (user, 2026-10-21) */
/* Buttons (PLAN-layout §2.2): one primary (green), one secondary (white),
   one destructive (red outline, always with data-confirm). */
.sc-btn-primary, .gc-card .sc-btn-primary { display: inline-block; padding: 10px 18px; background: var(--gc-green, #005030); color: #fff; border: none; border-radius: 10px; text-decoration: none; font: inherit; font-weight: 600; text-align: center; cursor: pointer; }
.sc-btn-primary:hover, .sc-btn-primary:focus-visible { background: var(--gc-green-dark, #003a22); }
.sc-btn-secondary, .gc-card button.sc-btn-secondary { display: inline-block; padding: 9px 16px; background: #fff; color: var(--gc-text, #1a1a1a); border: 1px solid var(--gc-border, #ddd); border-radius: 10px; text-decoration: none; font: inherit; cursor: pointer; }
.sc-btn-secondary:hover, .sc-btn-secondary:focus-visible { border-color: var(--gc-text, #1a1a1a); }
.sc-btn-danger, .gc-card button.sc-btn-danger { display: inline-block; padding: 6px 12px; background: #fff; color: #c5221f; border: 1px solid #f0c4c0; border-radius: 8px; font: inherit; font-size: 0.9rem; cursor: pointer; }
.sc-btn-danger:hover, .sc-btn-danger:focus-visible { background: #fdecea; border-color: #c5221f; }
.sc-btn-small, .gc-card button.sc-btn-small { padding: 3px 8px; font-size: 0.8rem; }
.sc-btn-block { display: block; width: 100%; }
/* Continue with Google / Apple (each provider's own button look) */
.sc-oidc { display: grid; gap: 8px; }
.sc-wrap { overflow-wrap: anywhere; } /* a long email address on a phone */
.sc-auth-form > * { min-width: 0; }
.sc-oidc-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.sc-oidc-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.sc-oidc-google:hover, .sc-oidc-google:focus-visible { background: #f2f2f2; }
.sc-oidc-apple { background: #000; color: #fff; border: 1px solid #000; }
.sc-oidc-apple:hover, .sc-oidc-apple:focus-visible { background: #333; }
.sc-oidc-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--gc-muted, #666); font-size: 0.85rem; }
.sc-oidc-or::before, .sc-oidc-or::after { content: ""; flex: 1; border-top: 1px solid var(--gc-border, #ddd); }
.sc-account-end { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.sc-account-end form { margin: 0; }
.sc-guest-note { background: #fff8e1; border: 1px solid #f0d98a; border-radius: 10px; padding: 8px 12px; margin: 10px 0; font-size: 0.9rem; }
.sc-guest-note p { margin: 4px 0; }
.sc-auth-form input, .sc-auth-form select, .sc-auth-form textarea { width: 100%; max-width: none; min-width: 0; }
.sc-auth-form textarea { resize: vertical; }

/* New game: Format (iOS segmented pickers) */
.sc-format { display: grid; gap: 8px; border: none; padding: 0; margin: 0; }
.sc-format legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.sc-closure-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #7a4a00; font-size: 0.85rem; line-height: 1.35; }
.sc-segmented { display: flex; padding: 2px; border-radius: 9px; background: #e7e7ea; }
.sc-segmented label { flex: 1; display: block !important; margin: 0 !important; }
.sc-segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc-segmented span { display: block; padding: 7px 4px; border-radius: 7px; text-align: center; font-size: 0.9rem; cursor: pointer; }
.sc-segmented input:checked + span { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.sc-segmented input:focus-visible + span { outline: 2px solid var(--gc-blue, #1f6fb0); }
.sc-new-form .sc-check { display: flex !important; gap: 8px; align-items: center; }
.sc-new-form .sc-check input { width: auto; }
.sc-multi { display: grid; gap: 8px; }
.sc-segment { margin: 2px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--gc-blue, #1f6fb0); }

/* Games list (iOS GameHistoryView) */
.sc-games-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-games-head .sc-btn-primary { padding: 8px 14px; font-size: 0.9rem; }
.sc-games-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
/* the home page's Share button: the app's QR code (views.app_qr) */
.sc-appqr-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--sc-line, #d0d0d0);
  border-radius: 999px; background: #fff; color: var(--gc-green, #1f6f43); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.sc-appqr-btn:hover, .sc-appqr-btn:focus-visible { border-color: var(--gc-green, #1f6f43); }
@media (max-width: 399px) {  /* a narrow screen: the icon alone, so My games + New game keep one line */
  .sc-appqr-btn { width: 40px; padding: 0; justify-content: center; }
  .sc-appqr-btn span { display: none; }
  .sc-games-head-actions { gap: 6px; }
  .sc-games-head .sc-btn-primary { padding: 8px 10px; }
}
.sc-appqr { text-align: center; }
.sc-appqr h2 { margin: 0 0 6px; font-size: 1.1rem; }
.sc-appqr > p.sc-muted { margin: 0 0 10px; line-height: 1.45; }
.sc-appqr .sc-qr-link { margin: 8px 0 12px; }
.sc-games-section { font-size: 0.95rem; color: #6d6d72; text-transform: uppercase; letter-spacing: 0.03em; margin: 18px 0 6px; }
.sc-game-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--sc-line, #e2e2e2); border-radius: 12px; overflow: hidden; }
.sc-game-row + .sc-game-row { border-top: 1px solid var(--sc-line, #e2e2e2); }
.sc-game-row { display: flex; align-items: stretch; }
.sc-game-row a.sc-game-open { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px; color: inherit; text-decoration: none; }
.sc-game-row a.sc-game-open:hover { background: #f7f7f5; }
.sc-game-delete { display: flex; margin: 0; border-left: 1px solid var(--sc-line, #e2e2e2); }
.sc-game-delete button { width: 44px; border: none; background: none; font-size: 1.05rem; cursor: pointer; color: var(--gc-red, #d80030); opacity: 0.7; }
.sc-game-delete button:hover, .sc-game-delete button:focus-visible { opacity: 1; background: #fdecea; }
.sc-game-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sc-game-top > div { min-width: 0; }  /* lets a long tournament name shorten (…) instead of widening the row */
.sc-game-date { display: block; font-size: 1rem; }
.sc-game-course { color: #6d6d72; font-size: 0.88rem; }
.sc-9h, .sc-start-hole { font-size: 0.68rem; font-weight: 700; color: var(--gc-blue, #1f6fb0); background: rgba(31, 111, 176, 0.15); border-radius: 999px; padding: 1px 6px; }
.sc-start-hole { white-space: nowrap; }
/* a tournament flight's game (My games): which tournament it belongs to */
.sc-tourney-tag { display: flex; align-items: center; gap: 4px; min-width: 0; margin-top: -4px; font-size: 0.74rem; font-weight: 600; color: #8a5a00; }
.sc-tourney-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255, 179, 0, 0.18); border-radius: 999px; padding: 1px 8px; }
.sc-game-state { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.sc-state-upcoming { color: #6a3ea1; }
.sc-state-in_progress { color: #e8860c; }
.sc-state-completed { color: var(--gc-green-mid, #2f7a2a); }
.sc-state-washed_out { color: #0f8aa8; }
.sc-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sc-chips::-webkit-scrollbar { display: none; }
.sc-player-chip { flex: none; display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(120, 120, 128, 0.12); font-size: 0.8rem; white-space: nowrap; }
.sc-chip-name { font-weight: 500; }
.sc-chip-strokes { color: var(--gc-blue, #1f6fb0); }
.sc-leader { margin: 0; font-size: 0.8rem; color: #6d6d72; }
.sc-empty { text-align: center; padding: 30px 10px; }
.sc-empty-icon { font-size: 3rem; margin: 0; }
.sc-empty-mark { width: 56px; height: 56px; }
.sc-empty h2 { margin: 6px 0; }

/* Hole photo: icon on the hole card, full-screen viewer (tap to close) */
.sc-hole-head > div:first-child { flex: 1; min-width: 0; }
.sc-hole-photo-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -4px -4px 0 0; padding: 0; border: none; background: none; color: var(--gc-blue, #1f6fb0); cursor: pointer; border-radius: 8px; }
.sc-hole-photo-btn:focus-visible { outline: 2px solid var(--gc-blue, #1f6fb0); }
/* buggies on the fairway, or cart path only (user, 2026-10-16) */
.sc-hole-head p.sc-buggy { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 2px 10px 2px 6px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.sc-buggy-ok { color: #1e7b34; background: #e6f4ea; }
.sc-buggy-no { color: #b3261e; background: #fdecea; }
.sc-buggy svg { flex: none; }
/* the hole card's Best / Last, the viewer's own from the same tee (user, 2026-10-21) */
.sc-hole-record { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 2px; font-size: 0.8rem; color: var(--sc-muted); }
.sc-hole-head .sc-hole-record p { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.sc-hole-record .sc-dot { width: 9px; height: 9px; }
.sc-hole-record b { min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--gc-text, #1a1a1a); font-size: 0.95rem; font-weight: 600; }
/* the hole card's right-hand side: Best / Last and the photo button; a traffic light sits in the middle
   of the card between it and the hole's details (user, 2026-10-21) */
.sc-hole-side { flex: none; display: flex; align-items: flex-start; gap: 8px; }
.sc-hole-head:has(> .sc-light) { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.sc-hole-head:has(> .sc-light) > .sc-hole-side { justify-self: end; }
/* a blind hole's traffic light (user, 2026-10-16): two lamps in a dark housing; the lit one glows */
.sc-light { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: -2px; }
.sc-light-box { display: flex; flex-direction: column; gap: 5px; padding: 5px; margin: 0; border-radius: 12px; background: #2b2f33; }
.sc-lamp { display: block; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; opacity: 0.28; }
span.sc-lamp { cursor: default; }
.sc-lamp-red, .gc-card button.sc-lamp-red, .gc-card button.sc-lamp-red:hover { background: #e53935; }
.sc-lamp-green, .gc-card button.sc-lamp-green, .gc-card button.sc-lamp-green:hover { background: #2ecc40; }
.gc-card button.sc-lamp { padding: 0; border-radius: 50%; }
.sc-light-red .sc-lamp-red, .sc-light-green .sc-lamp-green { opacity: 1; box-shadow: 0 0 10px 2px currentColor; }
.sc-light-red .sc-lamp-red { color: rgba(229, 57, 53, 0.75); }
.sc-light-green .sc-lamp-green { color: rgba(46, 204, 64, 0.75); }
.sc-lamp:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.sc-light-note { max-width: 76px; font-size: 0.68rem; line-height: 1.2; color: var(--sc-muted); text-align: center; overflow-wrap: anywhere; }
.sc-photo-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: #000; cursor: zoom-out; }
.sc-photo-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sc-photo-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 18px; line-height: 36px; text-align: center; }

/* Finished game: print a player's scorecard */
.sc-print h3 { margin: 0 0 8px; }
.sc-print-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-print-btn { display: inline-block; max-width: 100%; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid #d5d5d5; color: var(--gc-blue, #1f6fb0); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-print-btn:hover, .sc-print-btn:focus-visible { background: var(--sc-blue-soft, #e6f0fa); }

/* A game's Date & time: date picker + hour / minute / AM-PM wheels (iOS) */
.sc-dt-field { display: grid; gap: 4px; }
.sc-dt { display: grid; gap: 8px; }
.sc-dt .sc-dt-date { width: 100%; }
.sc-wheels { position: relative; display: flex; justify-content: center; align-items: stretch; gap: 4px; height: 180px; padding: 0 8px; border-radius: 12px; background: #fff; border: 1px solid #d5d5d5; overflow: hidden; }
/* the selection band across the middle row */
.sc-wheels::before { content: ""; position: absolute; left: 6px; right: 6px; top: 72px; height: 36px; border-radius: 8px; background: #eef1f4; pointer-events: none; }
.sc-wheels::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#fff, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 62%, #fff); }
.sc-wheel { position: relative; flex: 0 1 4.5em; height: 180px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; outline: none; }
.sc-wheel::-webkit-scrollbar { display: none; }
.sc-wheel:focus-visible { box-shadow: inset 0 0 0 2px var(--gc-blue, #1f6fb0); border-radius: 8px; }
.sc-wheel-list { padding: 72px 0; }
.sc-wheel-item { height: 36px; line-height: 36px; text-align: center; font-size: 1.25rem; font-variant-numeric: tabular-nums; scroll-snap-align: center; cursor: pointer; user-select: none; color: #8a8a8e; }
.sc-wheel-item[aria-selected="true"] { color: var(--gc-text, #1a1a1a); font-weight: 600; }
.sc-wheel-colon { position: relative; z-index: 1; align-self: center; font-size: 1.25rem; font-weight: 600; }

/* Edit Game: Date & Time, Course, Players -- one Save */
.sc-edit-game { gap: 14px; }
.sc-edit-section { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--gc-border, #ddd); }
.sc-edit-section h2 { margin: 0; font-size: 1.1rem; }
.sc-edit-remove-check { display: flex !important; align-items: center; gap: 6px; color: #d93025; font-size: 0.9rem; }
.sc-edit-remove-check input { width: auto !important; }
.sc-edit-player.sc-removing { opacity: 0.55; border-style: dashed; }
.sc-edit-player.sc-removing .sc-edit-remove-check { opacity: 1; }

/* Penalty / Bunker: a dropdown (– , 0-9) -- no arrows to crowd each other */
.sc-counter form { margin: 0; }
.sc-count-select { -webkit-appearance: none; appearance: none; min-width: 64px; height: 36px; padding: 0 26px 0 12px; border-radius: 9px; border: 1px solid #d5d5d5; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center; font: inherit; font-size: 1.15rem; font-weight: 700; text-align: center; text-align-last: center; color: var(--gc-text, #1a1a1a); cursor: pointer; }
.sc-count-select:focus-visible { outline: 2px solid var(--gc-blue, #1f6fb0); outline-offset: 1px; }
.sc-counter-penalty .sc-count-select { border-color: #f0c38a; }
.sc-counter-bunker .sc-count-select { border-color: #dcc7a3; }

/* My clubs (sign-up, My clubs page): tick boxes */
.sc-clubs { border: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sc-clubs legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.sc-clubs ul, .sc-clubs div { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sc-clubs label { display: flex !important; align-items: center; gap: 8px; }
.sc-clubs input[type=checkbox] { width: auto !important; }
/* clubs grouped by country: the country names are headings */
.sc-clubs label:not(:has(input)) { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gc-muted, #666); margin-top: 6px; }
a.gc-welcome { color: inherit; text-decoration: none; }
a.gc-welcome:hover .sc-account-name, a.gc-welcome:focus-visible .sc-account-name { text-decoration: underline; }
/* the header's way to My account: a person icon, then the name (cut short on a phone; the icon stays) */
.sc-site-header .sc-me-link { display: inline-flex; align-items: center; gap: 6px; }
.sc-account-icon { flex: none; width: 24px; height: 24px; color: var(--gc-green, #1f6f43); }
.sc-account-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* beside the name: the profile lacks HCP, gender or membership number */
.sc-profile-flag { flex: none; display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; margin-left: -6px;
  border-radius: 50%; background: #d97706; color: #fff; font-size: 0.8rem; font-weight: 700; line-height: 1; text-decoration: none; }
a.sc-profile-flag:hover, a.sc-profile-flag:focus-visible { background: #b45309; }
.sc-profile-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 6px; background: #fef3c7; color: #78350f; }
.sc-profile-note .sc-profile-flag { margin-left: 0; }
/* Help (apps/scoring/help.py): a round "?" -- in the header beside the account
   icon, and beside a page's title (_page_bar.html's help). 28px to see, 44px to tap. */
.sc-help-link { position: relative; flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid currentColor; color: var(--gc-green, #1f6f43); font-weight: 700; font-size: .95rem;
  line-height: 1; text-decoration: none; box-sizing: border-box; }
.sc-help-link::after { content: ""; position: absolute; inset: -8px; }
.sc-share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
a.sc-help-link:hover, a.sc-help-link:focus-visible { background: var(--gc-green, #1f6f43); border-color: var(--gc-green, #1f6f43); color: #fff; }
/* The sign-in tip (_tips_popup.html): a centred card, 16px from the edges on a phone */
.sc-tips { width: min(420px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; padding: 18px 18px 14px;
  border: none; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.sc-tips::backdrop { background: rgba(0, 0, 0, .45); }
/* MyGolfStory's mark and name (scoring/_mgs_brand.html): the help pages, the sign-in tip */
.sc-mgs-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.01em; color: var(--gc-green-dark, #0c3324); }
.sc-mgs-mark { width: 28px; height: 28px; flex: none; }
.sc-mgs-brand-lg { gap: 12px; font-size: 1.5rem; }
.sc-mgs-brand-lg .sc-mgs-mark { width: 48px; height: 48px; }
.sc-mgs-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-mgs-slogan { font-size: .82rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; color: var(--gc-muted, #5b6b62); }
.sc-mgs-slogan > span { display: block; text-wrap: balance; }
/* MyGolfStory's slogan (scoring/_mgs_slogan.html; user, 2026-10-22): sign in / sign up, the Share pop-up */
.sc-slogan { margin: 0; line-height: 1.4; }
.sc-slogan-lead { display: block; font-size: 1.15rem; font-weight: 800; color: var(--gc-green-dark, #0c3324); }
.sc-slogan-more { display: block; font-weight: 500; color: var(--gc-muted, #5b6b62); text-wrap: balance; }
.sc-slogan-name { font-weight: 800; color: var(--gc-green, #126b45); }
.sc-slogan-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 16px; text-align: center; }
.sc-slogan-mark { width: 64px; height: 64px; }
.sc-appqr > .sc-mgs-brand { margin-bottom: 6px; }
.sc-appqr > .sc-slogan { margin-bottom: 10px; }
.sc-appqr .sc-slogan-lead { color: var(--gc-green, #126b45); }
.sc-tips-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--gc-border, #dde3de); }
.sc-tips-head .sc-tips-kicker { margin: 0; }
.sc-tips-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--gc-green, #1f6f43); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.sc-tips-icon { font-size: 2rem; line-height: 1; letter-spacing: 0; }
.sc-tip h2 { margin: 0 0 6px; font-size: 1.1rem; }
.sc-tip p { margin: 0 0 8px; line-height: 1.45; }
.sc-tip a { font-weight: 600; }
.sc-tips-off { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; }
.sc-tips-off input { width: 20px; height: 20px; }
.sc-tips-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
/* The club's game start message (_start_messages.html): the tip's card, its text scrolls when long */
.sc-startmsg-club { margin: 0 0 6px; font-size: 1.1rem; }
.sc-startmsg-text { max-height: 50vh; overflow-y: auto; overflow-wrap: anywhere; line-height: 1.45; }
.sc-startmsg-text p { margin: 0 0 8px; }
.sc-tips-actions > * { flex: 1 1 auto; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }

/* My account / My kakis */
.sc-account-links { display: grid; gap: 8px; }
.sc-account-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--gc-border, #ddd); color: inherit; text-decoration: none; }
.sc-account-link:hover, .sc-account-link:focus-visible { border-color: var(--gc-blue, #1f6fb0); }
.sc-profile-edit { margin-bottom: 12px; }
.sc-profile-edit[open] > summary { margin-bottom: 10px; }
.sc-profile-edit > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.sc-profile-edit > summary::-webkit-details-marker { display: none; }
.sc-profile-edit > summary:hover, .sc-profile-edit > summary:focus-visible { border-color: var(--gc-blue, #1f6fb0); }
.sc-kaki-form h2, .sc-kakis h2 { margin: 0; font-size: 1.1rem; }
.sc-kaki-form { grid-template-columns: minmax(0, 1fr); }  /* the Unregistered gender/HCP row never widens the card */
@media (max-width: 359px) {  /* narrowest phones: "Unregistered" above the gender and HCP, so "Gender…" reads in full */
  .sc-kaki-form .sc-guest-details { flex-wrap: wrap; }
  .sc-kaki-form .sc-guest-details small { flex-basis: 100%; }
}
.sc-kaki-hint { color: #b06000; }
.sc-kaki-added { background: #e3f4e8; border: 1px solid #b7dfc2; border-radius: 10px; padding: 8px 12px; }
.sc-kakis { display: grid; gap: 8px; margin-top: 18px; }
.sc-kaki { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--gc-border, #ddd); }
.sc-kaki-who { display: grid; gap: 2px; min-width: 0; }
.sc-kaki-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-kaki-badge { justify-self: start; font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: #eee; color: #666; }
.sc-kaki-badge.sc-kaki-on { background: #e3f4e8; color: #1e6b36; }
.sc-kaki form { margin: 0; }
.sc-kaki { flex-wrap: wrap; }
.sc-kaki-edit { flex-basis: 100%; min-width: 0; }
.sc-kaki-edit summary { cursor: pointer; color: var(--gc-blue, #1f6fb0); font-weight: 600; font-size: 0.9rem; }
.sc-kaki-edit form { margin-top: 8px; }
.sc-kaki-edit .gc-card { max-width: none; padding: 0; border: 0; background: none; }  /* the card's field styles, not its box */
.sc-kaki-edit .sc-phone label { font-size: 0.9rem; }
.sc-kaki-who { flex: 1 1 0; }

/* A player's name box + the Kakis picker beside it */
.sc-player-name { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.sc-player-name input[type=text] { flex: 1; min-width: 0; max-width: none; width: auto !important; }
.sc-auth-form .sc-player-name select.sc-kaki-pick, .sc-kaki-pick { flex: none; width: 5.6em !important; min-width: 0; -webkit-appearance: none; appearance: none; padding: 0 20px 0 8px; height: 38px; border-radius: 9px; border: 1px solid #b9cde4; color: var(--gc-blue, #1f6fb0); font-weight: 600; font-size: 0.85rem; background: #f3f8fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231f6fb0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 7px center; cursor: pointer; }
.sc-players-in { border: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sc-players-in legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
/* a guest player's gender and HCP, under their name */
.sc-guest-details { display: flex; gap: 6px; align-items: center; margin: -2px 0 4px; padding-left: 10px; border-left: 3px solid var(--sc-blue-soft, #d2e4f4); }
.sc-guest-details small { flex: none; }
.sc-auth-form .sc-guest-details select, .sc-guest-details select { flex: 1 1 8em; width: auto; min-width: 0; }
.sc-auth-form .sc-guest-details input, .sc-guest-details input { flex: 0 1 6em; width: 6em; min-width: 0; }
.sc-add-title { margin: 6px 0 0; font-weight: 600; }
.sc-edit-head input[type="text"] { font-weight: 600; }
/* grids holding name boxes may shrink to the phone's width */
.sc-edit-section, .sc-edit-player, .sc-players-in { grid-template-columns: minmax(0, 1fr); }
.sc-edit-head { min-width: 0; }
@media (max-width: 400px) {
  .sc-auth-form .sc-player-name select.sc-kaki-pick, .sc-kaki-pick { width: 4.9em !important; padding: 0 18px 0 6px; background-position: right 6px center; }
  .sc-edit-head { gap: 4px; }
  .gc-card .sc-edit-head button.sc-edit-move { width: 32px; }
}
@media (max-width: 359px) {
  .sc-edit-head { flex-wrap: wrap; justify-content: flex-end; }
  .sc-edit-head .sc-player-name { flex-basis: 100%; }
}

/* a game you were added to as someone's kaki */
.sc-organiser { margin: 4px 0 0; font-size: 0.8rem; color: var(--gc-blue, #1f6fb0); }

/* Print scorecard: tick players, print them on one sheet */
.sc-print-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sc-print-pick { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; box-sizing: border-box; min-width: 0; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1px solid #d5d5d5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-print-pick input { width: auto; margin: 0; }
.sc-print-card { border: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.sc-print-card legend { font-size: 0.85rem; color: #777; padding: 0; margin-bottom: 6px; width: 100%; }
button.sc-print-btn { justify-self: start; cursor: pointer; font: inherit; }
.sc-print p.sc-muted { margin: 8px 0 0; font-size: 0.8rem; }

/* Signatories: signing page (camera + signature pad) and the section on a finished game */
.sc-sign-or { text-align: center; color: #888; margin: 12px 0; }
.sc-sign-step { border: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sc-sign-step legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.sc-sign-note { font-size: 0.8rem; margin: 0; }
/* The preview shows the whole camera picture (never cropped), so what you
   see is exactly what the photo will be; the box takes the camera's shape
   (tall on a phone held upright), capped to fit the screen. */
.sc-cam { position: relative; background: #111; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto; width: 100%; display: grid; place-items: center; }
.sc-cam video, .sc-cam img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sc-cam video.sc-mirror { transform: scaleX(-1); }  /* front camera: like a mirror, as the phone's camera app */
.sc-cam-msg { color: #fff; padding: 12px; text-align: center; margin: 0; }
.sc-cam-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.sc-auth-form .sc-cam-buttons button { width: auto; }
.sc-sign-pad { width: 100%; height: 170px; border: 1px dashed #aaa; border-radius: 12px; background: #fff; touch-action: none; display: block; }
.sc-signatories { display: grid; gap: 10px; }
.sc-signatories h3 { margin: 0; }
.sc-sig-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.sc-sig-slot { background: #fff; border: 1px solid #d5d5d5; border-radius: 12px; padding: 10px; display: grid; gap: 6px; align-content: start; }
.sc-sig-role { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .03em; color: #777; }
.sc-sig-imgs { display: flex; gap: 8px; align-items: center; }
.sc-sig-imgs .sc-sig-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.sc-sig-imgs .sc-sig-ink { max-width: 60%; max-height: 64px; }
.sc-sig-slot .sc-btn-primary { justify-self: start; padding: 8px 14px; }
.sc-sig-slot form { margin: 0; }
.sc-sig-slot .sc-btn-danger { justify-self: start; }
.sc-sign-form [hidden], .sc-cam [hidden], .sc-cam-buttons [hidden] { display: none !important; }
/* each card's two boxes (Player, Marker) and who marks whom (user, 2026-10-19) */
.sc-sig-boxes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.85rem; }
.sc-sig-boxes li.sc-on { color: var(--gc-green, #005030); font-weight: 600; }
.sc-sig-complete { border-color: var(--gc-green, #005030); }
.sc-sig-done { color: var(--gc-green, #005030); }
.sc-markers { display: grid; gap: 8px; }
.sc-markers h3 { margin: 0; }
.sc-marker-lines { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.sc-marker-lines ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.sc-markers-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.sc-markers-row .sc-markers-name { grid-column: 1 / -1; font-weight: 600; overflow-wrap: break-word; }
.sc-markers-row .sc-markers-by { color: #777; font-size: 0.85rem; }
.sc-markers-row select { min-width: 0; width: 100%; }
.sc-markers-row small { grid-column: 1 / -1; }
.sc-sign-who { margin: 0 0 12px; }
.sc-sign-review { display: grid; gap: 12px; }
.sc-sign-review-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.sc-sign-review-who dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .03em; color: #777; }
.sc-sign-review-who dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.sc-sign-review-ink { max-width: 100%; max-height: 160px; justify-self: center; border: 1px dashed #aaa; border-radius: 12px; padding: 8px; background: #fff; }
.sc-sign-review-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.sc-sign-review-actions p { flex-basis: 100%; margin: 0; }

/* the header logo of a club (the game's course's club, or yours): any shape,
   kept small; on a small screen a wide one gives way, so the MyGolfStory name
   beside it stays whole */
.gc-brand-crest.gc-brand-club { height: 40px; width: auto; max-width: 72px; object-fit: contain; }
@media (max-width: 400px) { .gc-brand-crest.gc-brand-club { max-width: 56px; } }
@media (max-width: 360px) { .gc-brand-crest.gc-brand-club { max-width: 40px; } }


/* My courses: a paid subscriber's course form (the admin's hole table) */
.sc-course-form { max-width: 560px; }
.sc-course-form .sc-hole-table select { width: auto; min-width: 3.4em; }
.sc-course-form .sc-hole-table label { display: inline-flex; gap: 6px; align-items: center; }
.sc-course-form .sc-hole-table table { width: 100%; }
.sc-course-form .sc-hole-table th { font-size: 0.8rem; text-align: left; }
.sc-course-form .sc-hole-table .button { display: inline-block; border: 1px solid var(--gc-border, #ddd); border-radius: 8px; background: #fff; font-size: 0.85rem; }
.sc-course-form .sc-hole-table .help { color: var(--sc-muted); font-size: 0.8rem; }
.sc-course-form .sc-tee-list input[type=text] { width: 9em; flex: 0 1 9em; padding: 6px 8px; }
.sc-course-form .sc-tee-list input[type=color] { width: 40px; flex: none; }
.sc-course-form .sc-tee-list .button { display: inline-flex; align-items: center; border: 1px solid var(--gc-border, #ddd); border-radius: 8px; background: #fff; color: var(--gc-text, #222); font-size: 0.85rem; width: auto; }
.sc-course-form .sc-tee-list .button[hidden] { display: none; }
.sc-course-form .sc-tee-list .help { color: var(--sc-muted); font-size: 0.8rem; margin: 4px 0 0; }
.sc-course-form .sc-hole-table input[data-yards] { width: 3.6em; padding: 5px 3px; }
.sc-course-form .sc-course-active { display: flex; gap: 8px; align-items: center; }
.sc-course-form .sc-course-active input { width: auto; }
.sc-course-form .sc-course-unit { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; font-size: 0.9rem; }
.sc-course-form .sc-course-unit select { width: auto; }
.sc-course-delete { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--gc-border, #ddd); }
.sc-course-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; }
.sc-course-place { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }  /* country, city / area */
.sc-course-card .sc-course-form { max-width: none; }
.sc-course-form > * { min-width: 0; }
.sc-course-holes { overflow-x: auto; }  /* never wider than the phone */
@media (max-width: 400px) {
  .sc-course-head, .sc-course-place { grid-template-columns: minmax(0, 1fr); }  /* the name gets the whole width */
  .sc-course-card { padding-left: 10px; padding-right: 10px; }
  .sc-course-form .sc-hole-table td, .sc-course-form .sc-hole-table th { padding: 3px 2px; }
  .sc-course-form .sc-hole-table select { min-width: 0; padding: 5px 0 5px 2px; font-size: 0.9rem; }
  .sc-course-form .sc-hole-table th .sc-optional { display: none; }  /* "(optional)" */
  .sc-course-form .sc-hole-table .button { padding: 5px 5px; }
}

/* New Game: registered-player search under a player's name box */
.sc-player-name[data-player-search] { position: relative; flex-wrap: wrap; overflow: visible; white-space: normal; }
.sc-player-hits { position: absolute; top: 42px; left: 0; right: 0; z-index: 20; margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--gc-border, #ddd); border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); max-height: 18rem; overflow-y: auto; }
.sc-player-hits li { display: grid; gap: 1px; padding: 8px 12px; cursor: pointer; }
.sc-player-hits li:hover, .sc-player-hits li:focus { background: #eef4fb; outline: none; }
.sc-player-hits li small { color: var(--sc-muted); font-size: 0.8rem; }
.sc-player-hits li.sc-player-keep { border-top: 1px solid var(--sc-line); color: var(--gc-blue, #1f6fb0); font-size: 0.9rem; }
.sc-player-hits .sc-player-none { cursor: default; color: var(--sc-muted); font-size: 0.85rem; }
.sc-player-linked { flex-basis: 100%; display: block; color: #1e6b36; font-size: 0.8rem; line-height: 1.6; }
.sc-player-linked span { white-space: nowrap; }
.gc-card button.sc-player-unlink { background: none; color: var(--sc-muted); border: none; padding: 0 6px; font-size: 0.9rem; width: auto; cursor: pointer; }

/* A player entering their own score: their switch, and the line others see instead of their card */
.sc-own-switch { display: grid; gap: 2px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--sc-line); }
.sc-own-switch button { display: inline-flex; align-items: center; gap: 8px; justify-self: start; background: none; border: none; padding: 4px 0; color: inherit; font: inherit; font-size: 0.9rem; cursor: pointer; }
.sc-own-knob { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #c9c9ce; transition: background .15s; flex: none; }
.sc-own-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.sc-own-switch button[aria-checked="true"] .sc-own-knob { background: var(--gc-green, #005030); }
.sc-own-switch button[aria-checked="true"] .sc-own-knob::after { left: 18px; }
.sc-own-switch small { font-size: 0.78rem; }
.sc-own-entry { color: var(--sc-muted); font-size: 0.9rem; padding: 10px 14px; }
/* My course: the Course Rating / Slope rows (one per gender and tee) */
.sc-course-form .sc-rating-list select { padding: 6px 4px; }
.sc-course-form .sc-rating-list .button { display: inline-flex; align-items: center; border: 1px solid var(--gc-border, #ddd); border-radius: 8px; background: #fff; color: var(--gc-text, #222); font-size: 0.85rem; width: auto; }
.sc-course-ratings-help { margin: 4px 0 0; font-size: 0.8rem; }


/* Side-game set-up pages: one skeleton (PLAN-layout E-4) -- on/off, players,
   scoring, Game Points, stroke discounts, Save. */
.sc-setup { display: grid; gap: 16px; }
.sc-setup-intro { margin: 0 0 10px; }
.sc-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.sc-fieldset > legend { padding: 0; margin-bottom: 6px; font-weight: 700; }
.sc-fieldset > p.sc-muted { margin: 0; }
.sc-setup-part > legend { font-size: 1.05rem; color: var(--gc-green-dark, #003a22); }
.sc-setup-part + .sc-setup-part { margin-top: 6px; }
.sc-sub { font-weight: 600; font-size: 0.9rem; margin-top: 4px; }
.gc-card label.sc-switch-row { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.gc-card label.sc-field { display: grid; gap: 4px; margin: 0; }
.gc-card .sc-field input[type="number"] { max-width: 8em; }
.gc-card .sc-field select { max-width: 100%; }
.sc-field .sc-muted { font-size: 0.8rem; }
/* tick boxes: each player a chip, wrapping */
.sc-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.gc-card .sc-checks label { margin: 0; }
/* one row per player: name, then the choices in columns -- never wrapping mid-row */
.sc-pick-grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, auto); gap: 6px 14px; align-items: center; }
.sc-pick-grid.sc-pick-3 { grid-template-columns: minmax(0, 1fr) repeat(3, auto); }
.sc-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-card .sc-pick-grid label { margin: 0; white-space: nowrap; }
@media (max-width: 400px) { .sc-pick-grid { gap: 6px 8px; } .sc-pick-grid label { font-size: 0.9rem; } }
/* three choices don't leave room for the name on a small phone: the name on its own line */
@media (max-width: 420px) {
  .sc-pick-grid.sc-pick-3 { grid-template-columns: repeat(3, auto); justify-content: start; gap: 2px 14px; }
  .sc-pick-3 .sc-pick-name { grid-column: 1 / -1; margin-top: 6px; font-weight: 600; }
}
/* small numbers side by side */
.sc-num-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.sc-num-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.gc-card .sc-num-grid input[type="number"], .gc-card .sc-num-row input[type="number"] { max-width: 6em; }
.sc-setup-holes select { width: 100%; }
/* Saddam: under each hole, a chip per player -- tapped (struck through) = left out of that hole */
.sc-out-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gc-card .sc-out-chips label.sc-out-chip { margin: 0; position: relative; }  /* (beats base.css's checkbox-label margin) */
.sc-out-chip[hidden] { display: none; }
.sc-out-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc-out-chip span { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #ececf0; color: #555; font-size: 0.75rem; font-weight: 400; cursor: pointer; }
.sc-out-chip input:checked + span { background: rgba(217, 48, 37, 0.15); color: #d93025; text-decoration: line-through; }
.sc-out-chip input:focus-visible + span { outline: 2px solid var(--gc-blue, #1f6fb0); }

/* "How … works": longer help folded away */
.sc-help { font-size: 0.85rem; color: var(--sc-muted, #8a8a8e); }
.sc-help summary { cursor: pointer; color: var(--gc-blue, #1f6fb0); font-weight: 600; }
.sc-help p { margin: 6px 0 0; }
/* Edit game's "Strokes by": the scorecard's green pressed state */
.sc-edit-basis .sc-segmented { background: #fff; border: 1px solid var(--sc-line, #e2e2e2); padding: 0; border-radius: 8px; overflow: hidden; }
.sc-edit-basis .sc-segmented span { border-radius: 0; }
.sc-edit-basis .sc-segmented input:checked + span { background: var(--gc-green, #005030); color: #fff; box-shadow: none; }

/* My account: who you are (read-only), then one form */
.sc-account-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; max-width: none; border-radius: 12px; } /* as wide as the links below (gc-card caps at 640px) */
.sc-who-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.sc-who-edit { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 44px; padding: 0 4px; color: var(--gc-blue, #1f6fb0); font-weight: 600; font-size: 0.9rem; }
.sc-profile-edit[open] .sc-who-edit { color: var(--sc-muted); }
.sc-my-account { margin-bottom: 14px; max-width: none; border-radius: 12px; }
.sc-saved { margin: 0; padding: 6px 10px; border-radius: 8px; background: #e3f4e8; color: #1e6b36; font-weight: 600; }
.sc-my-account .sc-num-row .sc-field { flex: 1 1 8em; }
@media (max-width: 360px) { .sc-edit-track { grid-template-columns: minmax(0, 1fr); } }

/* Saddam: proposed Game HCP for a tie (finished games) */
.sc-proposed-hcp { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sc-proposed-hcp td { padding: 4px 6px; border-bottom: 1px solid var(--sc-line, #e2e2e2); }
.sc-proposed-hcp tr:last-child td { border-bottom: 0; }
.sc-proposed-hcp td:nth-child(2), .sc-proposed-hcp td:nth-child(3) { text-align: right; white-space: nowrap; }
.sc-proposed-hcp td:nth-child(3) { width: 3em; }
.sc-delta-up { color: #e8710a; font-weight: 600; }
.sc-delta-down { color: #1f6fb0; font-weight: 600; }
.sc-delta-even { color: #34a853; font-weight: 600; }

/* Edit Game: the game's viewers (read-only watchers) */
.sc-edit-viewers { display: grid; gap: 8px; margin-top: 8px; }
.sc-viewer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sc-viewer-name { min-width: 0; overflow-wrap: anywhere; }
.gc-card .sc-viewer-row label { margin: 0; white-space: nowrap; }

/* the organiser's scoring QR code */
.sc-qr { display: grid; gap: 10px; text-align: center; }
.sc-qr-game { margin: 0; }
.sc-qr-code { margin: 0 auto; width: min(100%, 280px); background: #fff; padding: 8px; border-radius: 12px; }
.sc-qr-code svg { display: block; width: 100%; height: auto; }
.sc-qr-help { margin: 0; }
.sc-qr-link { margin: 0; font-size: 0.8rem; overflow-wrap: anywhere; }
.sc-qr-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* after scanning the QR code: whose scores this phone enters */
.sc-scoring-for-list { display: grid; gap: 4px; }
.gc-card .sc-scoring-for-list label { margin: 0; padding: 8px 4px; border-bottom: 1px solid var(--sc-line, #e2e2e2); }
.sc-scoring-for-line a { font-weight: 600; }
.sc-stop-sharing-list { margin: 0 0 12px; padding-left: 20px; }
.sc-stop-sharing-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Past / Shared Games: folded until tapped (round_list.html) */
.sc-games-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.sc-games-fold > summary::-webkit-details-marker { display: none; }
.sc-games-fold > summary::before { content: "▸"; font-size: 0.8em; transition: transform 0.15s; }
.sc-games-fold[open] > summary::before { transform: rotate(90deg); }
.sc-fold-year { margin-left: 4px; }
.sc-fold-month { margin-left: 8px; }
.sc-fold-head { font-weight: 600; padding: 8px 0; }
.sc-fold-month > .sc-fold-head { font-weight: 500; color: #6d6d72; }
.sc-fold-count { font-weight: 400; color: #6d6d72; }
.sc-fold-more { display: flex; gap: 10px; justify-content: center; margin: 10px 0 4px; }
.sc-fold-more button { padding: 8px 18px; border: 1px solid var(--sc-line, #d8d8dc); border-radius: 999px; background: #fff; color: #1f6fb0; font: inherit; font-weight: 600; cursor: pointer; }

/* a shared game's chat (round_detail.html) */
.sc-chat { margin-top: 14px; }
.sc-chat h3 { margin: 0 0 8px; }
#sc-chat-list { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.sc-chat-msg { max-width: 85%; padding: 6px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--sc-line, #e2e2e2); justify-self: start; }
.sc-chat-mine { justify-self: end; background: #e3f0e6; border-color: #cfe5d4; }
.sc-chat-meta { margin: 0; font-size: 0.75rem; }
.sc-chat-text { margin: 2px 0 0; overflow-wrap: anywhere; }
.sc-chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.sc-chat-form textarea { flex: 1; min-width: 0; font: inherit; padding: 8px; border: 1px solid var(--sc-line, #d8d8dc); border-radius: 10px; resize: vertical; }
.sc-chat-delete { border: none; background: none; padding: 0 0 0 6px; font-size: 0.8rem; cursor: pointer; opacity: 0.7; }
.sc-chat-delete:hover, .sc-chat-delete:focus-visible { opacity: 1; }

/* entering your own score: switch on Putts / Penalties / Bunkers for yourself */
.sc-own-trackers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.85rem; }
.sc-own-trackers form { margin: 0; }
.sc-own-tracker { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--sc-line, #d8d8dc); background: #fff; color: #1f6fb0; font: inherit; cursor: pointer; }
.sc-own-tracker.sc-on { background: #e3f0e6; border-color: #cfe5d4; color: #1e6b36; }
span.sc-own-tracker { cursor: default; }
.sc-flight-tracking summary { cursor: pointer; font-weight: 600; }
.sc-flight-track-row { padding: 8px 0; border-top: 1px solid #eee; min-width: 0; }
.sc-flight-track-row:first-of-type { border-top: 0; }
.sc-flight-track-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.sc-flight-track-row .sc-own-trackers { margin-top: 4px; }
/* the DEV / UAT badge sits above the hole bar, clear of the › arrow */
body:has(.sc-footer) .gc-env-badge { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

/* a finished game's stats picture to share (round_detail.html) */
.sc-share { margin-top: 14px; display: grid; gap: 10px; }
.sc-share h3, .sc-share p { margin: 0; }
.sc-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-share-actions .gc-btn-secondary, .sc-share-photo .gc-btn-secondary { display: inline-block; padding: 8px 14px; border: 1px solid var(--sc-line, #d8d8dc); border-radius: 10px; background: #fff; color: #1f6fb0; text-decoration: none; font-weight: 600; cursor: pointer; }
.sc-share-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-share-photo img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.sc-share-photo form { margin: 0; }
.sc-share-photo-pick { position: relative; margin: 0; }
.sc-share-photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc-share-photo-pick input:focus-visible + span { outline: 2px solid var(--gc-blue, #1f6fb0); }

/* the stats picture, opened on the page: scrolls; ✕ and Share stay at the top */
.sc-stats-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #111; }
.sc-stats-bar { display: flex; justify-content: flex-end; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
.sc-stats-bar button { border: none; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sc-stats-share { padding: 8px 16px; }
.sc-stats-close { width: 40px; height: 40px; font-size: 18px; }
.sc-stats-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 0 env(safe-area-inset-bottom); }
.sc-stats-scroll img { display: block; width: 100%; max-width: 720px; margin: 0 auto; }

/* Course set-up from a scorecard photo (course_scan) */
.sc-spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid var(--gc-border, #ddd); border-top-color: var(--gc-green, #005030); border-radius: 50%; animation: sc-spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sc-spinner { animation-duration: 2.4s; } }
.sc-scan-reading { font-weight: 600; }
.sc-scan-tips { margin: 0 0 8px; padding-left: 1.2em; font-size: 0.9rem; }
.sc-scan-photos input[type=file] { padding: 8px 0; }
.sc-scan-link { display: inline-block; margin: 0 0 12px; }
.sc-scan-notice { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #f0c36d; border-left: 4px solid #d48806; border-radius: 8px; background: #fff8e6; font-size: 0.9rem; }
.sc-scan-notice p { margin: 0 0 6px; }
.sc-scan-notice ul { margin: 4px 0 6px; padding-left: 1.2em; }
.sc-scan-notice .sc-scan-legend { display: inline-block; width: 1em; height: 1em; border: 2px solid #d48806; background: #fff8e6; border-radius: 3px; vertical-align: -2px; }
.sc-scan-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.sc-scan-thumbs img { display: block; height: 72px; max-width: 140px; object-fit: cover; border-radius: 6px; border: 1px solid var(--gc-border, #ddd); }
/* My games (my_games.html): by month, a game a row, phone first */
.sc-game-search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.sc-game-search label { font-weight: 600; }
.sc-game-search input { flex: 1 1 180px; min-width: 0; }
.sc-game-month { border-top: 1px solid var(--sc-line); }
.sc-game-month > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.sc-game-month .count { font-weight: 400; }
.sc-my-game-list { list-style: none; margin: 0; padding: 0; }
.sc-my-game-list li { padding: 10px 0; border-top: 1px solid var(--sc-line); }
.sc-my-game-list li[hidden] { display: none; }
.sc-my-game-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.sc-my-game-course { display: block; font-weight: 600; margin: 2px 0; overflow-wrap: anywhere; }
.sc-my-game-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.85rem; }
.sc-my-game-cards { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 0.85rem; }
.sc-game-state { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: var(--sc-panel); white-space: nowrap; }
.sc-state-in_progress { background: var(--sc-blue-soft); }
/* My game performance (my_performance.html): the graph and the list */
.sc-perf-range { display: flex; gap: 6px; margin: 0 0 10px; }
.sc-perf-range a { flex: 1; text-align: center; padding: 8px 4px; border: 1px solid var(--sc-line); border-radius: 8px; text-decoration: none; color: inherit; font-size: 0.9rem; }
.sc-perf-range a[aria-current] { background: var(--sc-blue); border-color: var(--sc-blue); color: #fff; font-weight: 600; }
.sc-perf-title { font-size: 1rem; margin: 0 0 6px; }
.sc-perf-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; font-size: 0.85rem; color: var(--sc-muted); }
.sc-perf-stats b { color: var(--gc-text, #222); }
.sc-perf-svg { display: block; width: 100%; max-width: 520px; height: auto; overflow: visible; }
.sc-perf-svg .grid { stroke: var(--sc-line); stroke-width: 1; }
.sc-perf-svg .axis { font-size: 11.5px; fill: var(--sc-muted); }
.sc-perf-svg .line { fill: none; stroke: var(--sc-blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sc-perf-svg .dot { cursor: pointer; outline: none; }
.sc-perf-svg .hit { fill: transparent; }
.sc-perf-svg .mark { fill: var(--sc-blue); stroke: #fff; stroke-width: 2; }
.sc-perf-svg .dot.on .mark, .sc-perf-svg .dot:focus-visible .mark { r: 6; }
.sc-perf-readout { margin: 6px 0 0; min-height: 1.4em; font-size: 0.85rem; }
/* My last game performance (user, 2026-10-22): the last game against the dream game (gold, dashed), hole by
   hole -- red where the last game took more strokes, green where the same or better; a row of pars under the holes */
.sc-last-chart { margin-bottom: 14px; }
.sc-last-game { align-items: center; overflow-wrap: anywhere; }
.sc-last-key { display: inline-flex; align-items: center; gap: 5px; }
.sc-last-swatch { display: inline-block; width: 16px; height: 3px; background: linear-gradient(90deg, #2e9b4f 50%, #d33 50%); }
.sc-last-swatch.dream { height: 0; background: none; border-top: 3px dashed #d4a017; }
.sc-perf-stats b.sc-last-over { color: #d33; }
.sc-perf-stats b.sc-last-even { color: #2e9b4f; }
.sc-last-svg { display: block; width: 100%; max-width: 520px; height: auto; overflow: visible; }
.sc-last-svg .grid { stroke: var(--sc-line); stroke-width: 1; }
.sc-last-svg .axis { font-size: 11.5px; fill: var(--sc-muted); }
.sc-last-svg .axis.hole { font-size: 10px; }
.sc-last-svg .axis.par { font-style: italic; }
.sc-last-svg .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sc-last-svg .line.even { stroke: #2e9b4f; }
.sc-last-svg .line.over { stroke: #d33; }
.sc-last-svg .line.dream { stroke: #d4a017; stroke-width: 2; stroke-dasharray: 5 4; }
.sc-last-svg .sc-last-hole { cursor: pointer; outline: none; }
.sc-last-svg .hit { fill: transparent; }
.sc-last-svg .sc-last-hole.on .hit, .sc-last-svg .sc-last-hole:focus-visible .hit { fill: var(--sc-blue-soft); fill-opacity: 0.5; }
.sc-last-svg .mark { stroke: #fff; stroke-width: 1.5; }
.sc-last-svg .mark.even { fill: #2e9b4f; }
.sc-last-svg .mark.over { fill: #d33; }
.sc-last-svg .mark.dream { fill: #d4a017; }
.sc-last-svg .diff { font-size: 9px; font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 2px; }  /* 1 smaller than the holes' */
.sc-last-svg .diff.even { fill: #2e9b4f; }
.sc-last-svg .diff.over { fill: #d33; }
.sc-last-svg .sc-last-hole.on .mark, .sc-last-svg .sc-last-hole:focus-visible .mark { r: 5; }
.sc-perf-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sc-perf-table th { text-align: left; font-size: 0.75rem; color: var(--sc-muted); font-weight: 600; padding: 4px 6px 6px 0; }
.sc-perf-table td { padding: 8px 6px 8px 0; border-top: 1px solid var(--sc-line); vertical-align: top; overflow-wrap: anywhere; }
.sc-perf-table .num { text-align: right; white-space: nowrap; padding-right: 0; }
.sc-perf-table .date { white-space: nowrap; }

/* My dream game (user, 2026-10-21): a folding card per course, a nine per table */
.sc-dream-intro { margin: 0 0 10px; font-size: 0.9rem; }
.sc-dream-card { margin-bottom: 10px; }
.sc-dream-head { justify-content: space-between; gap: 10px; }
.sc-dream-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sc-dream-score { white-space: nowrap; font-size: 1.1rem; }
.sc-dream-tee { white-space: nowrap; font-weight: 600; color: var(--gc-text, #222); }
.sc-dream-table { margin-top: 10px; }
.sc-dream-table td { padding: 5px 6px 5px 0; vertical-align: middle; }
.sc-dream-table .sc-badge { margin-left: auto; }
.sc-dream-table tfoot th { border-top: 2px solid var(--sc-line); padding-top: 6px; color: var(--gc-text, #222); font-size: 0.85rem; }
.sc-dream-table tfoot th.num { text-align: right; }

/* Tournament admin screens (apps/tournament) */
.tn-item { display: grid; gap: 2px; text-decoration: none; color: inherit; }
.tn-form { max-width: 520px; }
.tn-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }
.tn-row-div { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.tn-row-div .sc-field input { width: 100%; max-width: none; }
.tn-row input, .tn-row select { width: 100%; max-width: none; box-sizing: border-box; }
.tn-round { display: grid; gap: 8px; }
.tn-round-line { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }  /* two lines at every width: date + start, course + tee */
.tn-round-line input, .tn-round-line select { width: 100%; max-width: none; box-sizing: border-box; }
.tn-round [hidden] { display: none !important; }
.tn-fromgames .tn-fromgame { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--sc-line, #eee); cursor: pointer; overflow-wrap: anywhere; min-width: 0; }
.tn-fromgames .tn-fromgame input { width: 22px; height: 22px; min-width: 22px; margin: 2px 0 0; flex: none; align-self: flex-start; }
.tn-fromgames .tn-fromgames-yearbox { border-top: 1px solid var(--sc-line, #eee); }
.tn-fromgames .tn-fromgames-year { padding: 12px 0; font-size: 1rem; font-weight: 700; cursor: pointer; }
.tn-fromgames .tn-fromgames-year .sc-muted { font-weight: 400; }
.tn-fromgames-new { margin: 4px 0 12px; }
.tn-fromgames-new > summary { list-style: none; cursor: pointer; display: inline-flex; margin-bottom: 8px; }
.tn-fromgames-new > summary::-webkit-details-marker { display: none; }
.tn-fromgame-state { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--sc-line, #eee); color: var(--sc-muted); }
.tn-state-in_progress { background: #e0f2fe; color: #075985; }
.tn-state-upcoming { background: #fef3c7; color: #92400e; }
.tn-div { display: grid; gap: 4px; margin-bottom: 8px; min-width: 0; }
.tn-div [hidden] { display: none !important; }
.tn-del-line { display: flex; justify-content: flex-end; }
.tn-del { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--sc-muted); font-size: 0.9rem; cursor: pointer; }
.tn-del input { width: 20px; height: 20px; margin: 0; }
.tn-del-btn { min-height: 44px; }
.tn-deleting .sc-field, .tn-deleting .tn-round-line { opacity: 0.45; text-decoration: line-through; }
.tn-deleting .tn-del { color: #b42318; font-weight: 600; }
.tn-round-nine { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tn-round-nine > :first-child { grid-column: 1 / -1; }  /* Holes on its own line, then Second 9 + Third 9 */
/* the format groups (Individual / Group / Match play): a tick box per format, its allowance beside it
   (wrapped under its name on a phone), the Order strip of the ticked ones */
.tn-fgroups { display: grid; gap: 10px; }
.tn-fgroup-h, .tn-forder-h { margin: 6px 0 2px; font-weight: 600; }
.tn-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 4px 0; }
.tn-form .tn-fpick { flex: 1 1 13em; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.tn-form .tn-fallow { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.tn-form .tn-fallow input { width: 5em; max-width: none; box-sizing: border-box; }
.tn-form .tn-fpick input { width: auto; flex: none; margin: 0; }
.tn-fnote { flex-basis: 100%; font-size: 0.85rem; }
.tn-frow-off .tn-fpick { opacity: 0.55; }
.tn-form .tn-fallow[hidden], .tn-fnote[hidden] { display: none; }
.tn-forder-list { margin: 0 0 4px; padding-left: 1.6em; display: grid; gap: 4px; }
.tn-forder-item { display: list-item; }
.tn-forder-name { margin-right: 8px; overflow-wrap: anywhere; }
.tn-forder-move { padding: 2px 10px; margin-right: 4px; }
.tn-summary { display: grid; gap: 8px; }
.tn-h { margin: 0; font-size: 1rem; }
.tn-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.tn-dl dt { color: #5f6368; } .tn-dl dd { margin: 0; overflow-wrap: anywhere; }
.tn-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tn-director { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; margin-left: -18px; }
.tn-director form { margin: 0; }
@media (max-width: 380px) { .tn-row-div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tn-row-div > :first-of-type { grid-column: 1 / -1; } }
@media (max-width: 380px) { .tn-row:not(.tn-row-div) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .tn-dl { grid-template-columns: minmax(0, 1fr); gap: 0; } .tn-dl dd { margin-bottom: 8px; } }

/* Tournament player import preview */
.tn-imp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tn-imp { border: 1px solid var(--sc-line, #ddd); border-left-width: 4px; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.tn-imp-new { border-left-color: #1e8e3e; } .tn-imp-update { border-left-color: #1f6fb0; }
.tn-imp-unchanged { border-left-color: #9aa0a6; } .tn-imp-error { border-left-color: #c5221f; background: #fdf3f2; }
.tn-imp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tn-imp-row { font-size: 0.75rem; color: #5f6368; }
.tn-imp-name { overflow-wrap: anywhere; min-width: 0; }
.tn-imp-tag { margin-left: auto; font-size: 0.75rem; font-weight: 600; }
.tn-imp-detail { font-size: 0.85rem; overflow-wrap: anywhere; }
.tn-imp-msg { margin: 4px 0 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.tn-imp-warn { color: #8a5a00; }
.tn-check { display: flex; align-items: center; gap: 8px; }

/* --- tournament flight board (TD) --- */
.tn-wrap { display: grid; gap: 10px; min-width: 0; }
.tn-sub { margin: 0 0 6px; }
.tn-messages { display: grid; gap: 6px; }
.tn-msg { margin: 0; padding: 8px 10px; border-radius: 8px; font-size: 0.9rem; border: 1px solid #ddd; background: #fff; overflow-wrap: anywhere; }
.tn-msg-error { border-color: #f0c4c0; background: #fdecea; color: #8a1f1b; }
.tn-msg-warn { border-color: #f0dca0; background: #fff8e1; color: #6b5200; }
.tn-confirm-list { margin: 4px 0 8px; padding-left: 1.2em; display: grid; gap: 4px; }
.tn-msg-ok { border-color: #bfe0c8; background: #eef8f0; color: #1d5a30; }
.tn-tools { display: grid; gap: 8px; }
.tn-toolrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tn-toolrow button[disabled] { opacity: 0.5; cursor: default; }
/* Flight board: an existing game as a flight */
.tn-attach { margin-top: 8px; }
.tn-attachform { display: grid; gap: 8px; margin-top: 8px; }
.tn-attachform label { display: grid; gap: 4px; min-width: 0; }
.tn-attachform select { width: 100%; max-width: 100%; min-width: 0; }
/* Delete tournament: keep or delete its games */
.tn-delete-games { display: grid; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--gc-border, #ddd); border-radius: 8px; min-width: 0; }
.tn-delete-games > p { margin: 0; }
a.sc-btn-danger { text-decoration: none; }
.sc-auth-form label.tn-delete-choice { display: flex; align-items: flex-start; gap: 8px; }
.tn-delete-choice input { width: auto; flex: none; margin: 3px 0 0; }
.tn-delete p { overflow-wrap: anywhere; }
.tn-undo-label { font-size: 0.85rem; min-width: 0; overflow-wrap: anywhere; }
.tn-auto summary, .tn-attach summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.tn-autoform { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: end; }
.tn-autoform label { display: grid; gap: 2px; font-size: 0.85rem; min-width: 0; }
.tn-autoform input, .tn-autoform select { width: 100%; max-width: none; box-sizing: border-box; min-height: 40px; }
.tn-autoform .tn-note, .tn-autoform button { grid-column: 1 / -1; }
.tn-note { margin: 0; font-size: 0.8rem; }
.tn-warn { color: #8a5a00; }
.tn-selbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; background: #fff8e1; border: 1px solid #f0dca0; border-radius: 10px; font-size: 0.9rem; }
.tn-selbar[hidden] { display: none; }
.tn-selbar:has(.tn-selbtns) { flex-wrap: wrap; }
.tn-selbtns { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.tn-selbtns button { white-space: nowrap; }
.tn-selbtns button[hidden] { display: none; }
/* the board's group pick: each picked player's order, as they will be seated */
.tn-chip-name[data-pick]::before { content: attr(data-pick); display: inline-grid; place-items: center; min-width: 1.3em; height: 1.3em; margin-right: 6px; vertical-align: 1px; border-radius: 50%; background: #1b5e20; color: #fff; font-size: 0.75rem; font-weight: 700; }
.tn-board { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.tn-right { display: grid; gap: 10px; min-width: 0; }
.tn-pool { display: grid; gap: 8px; min-width: 0; }
.tn-count { color: #5f6368; font-weight: 400; font-size: 0.9rem; }
.tn-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.tn-filters input { grid-column: 1 / -1; }
.tn-filters input, .tn-filters select { width: 100%; max-width: none; box-sizing: border-box; min-height: 40px; }
.tn-pool-list { display: grid; gap: 6px; max-height: 38vh; overflow-y: auto; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tn-chip, .tn-fgrab, .tn-fchip { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; padding: 4px 10px; background: #fff; border: 1px solid var(--gc-border, #ccc); border-radius: 10px; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; min-width: 0; box-sizing: border-box; }
.tn-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-chip-hcp { font-size: 0.8rem; color: #5f6368; flex: none; }
.tn-chip-out { opacity: 0.6; text-decoration: line-through; }
/* team tournaments: a team chip moves the whole team */
.tn-chip.tn-team { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; padding: 6px 10px; }
.tn-team-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; font-weight: 600; }
.tn-team .tn-chip-name { white-space: normal; overflow-wrap: anywhere; }
.tn-team-head { flex-wrap: wrap; }
.tn-team-head .tn-chip-hcp { margin-left: auto; }
.tn-team .tn-chip-name { flex: 1 1 8em; }
.tn-team-members { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 0.8rem; color: #3c4043; min-width: 0; }
.tn-member { min-width: 0; overflow-wrap: anywhere; }
.tn-member small, .tn-cap { color: #5f6368; text-decoration: none; }
.tn-team-split { border-style: dashed; border-color: #c9a227; }
.tn-units { display: grid; gap: 6px; }
.tn-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.tn-unit-empty { display: flex; align-items: center; padding: 0 10px; border-radius: 10px; }
.tn-unteamed { display: grid; gap: 4px; border-top: 1px solid #eee; padding-top: 6px; min-width: 0; }
.tn-unteamed a { overflow-wrap: anywhere; }
.tn-loose-list { margin: 0; padding-left: 18px; font-size: 0.85rem; display: grid; gap: 2px; overflow-wrap: anywhere; }
.tn-selected { outline: 3px solid #1f6fb0; background: #eaf3fb; }
.tn-dragging { opacity: 0.4; }
.tn-over { outline: 2px dashed #1f6fb0; background: #f2f8fd; }
.tn-placing .tn-seat, .tn-placing .tn-pool, .tn-placing .tn-hslot { cursor: pointer; }
.tn-flights { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tn-flight { display: grid; gap: 6px; min-width: 0; align-content: start; }
.tn-locked { border-left: 4px solid #8a5a00; }
.tn-scored { border-left: 4px solid #1f6fb0; }
.tn-fhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tn-fgrab { flex: 1 1 auto; font-weight: 600; justify-content: flex-start; background: #f4f6f4; }
.tn-avg { font-size: 0.8rem; color: #5f6368; }
.tn-icon, .gc-card button.tn-icon { min-height: 40px; min-width: 52px; padding: 2px 8px; font: inherit; font-size: 0.8rem; background: #fff; color: var(--gc-text, #1a1a1a); border: 1px solid var(--gc-border, #ccc); border-radius: 10px; cursor: pointer; }
.tn-icon.tn-on, .gc-card button.tn-icon.tn-on { background: #fff8e1; border-color: #c9a227; font-weight: 600; }
.tn-tee { display: flex; gap: 6px; align-items: center; }
.tn-tee input { min-height: 40px; max-width: 140px; box-sizing: border-box; }
.tn-seats { display: grid; gap: 4px; }
.tn-seat { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 2px; border-radius: 10px; }
.tn-seat-empty { border: 1px dashed var(--gc-border, #ccc); min-height: 44px; }
.tn-seatno { color: #5f6368; font-size: 0.8rem; text-align: center; }
.tn-empty { color: #5f6368; font-size: 0.85rem; grid-column: 2 / -1; }
.tn-warns { margin: 0; padding-left: 18px; font-size: 0.8rem; color: #8a5a00; display: grid; gap: 2px; overflow-wrap: anywhere; }
.tn-holes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tn-hole { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid #eee; }
.tn-hole-closed { opacity: 0.7; }
.tn-holeno small { color: #5f6368; display: block; }
.tn-hslots { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tn-hslot { display: flex; align-items: center; gap: 4px; min-width: 84px; min-height: 44px; padding: 2px 6px; border: 1px dashed var(--gc-border, #bbb); border-radius: 10px; box-sizing: border-box; }
.tn-hslot small { color: #5f6368; }
.tn-hslot-full { border-style: solid; background: #f4f6f4; }
.tn-fchip { min-height: 36px; padding: 2px 8px; font-weight: 600; }
.tn-hctl { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.tn-closed { font-size: 0.85rem; }
@media (min-width: 900px) {
  .tn-board { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .tn-pool { position: sticky; top: 8px; }
  .tn-pool-list { grid-template-columns: minmax(0, 1fr); max-height: 70vh; }
  .tn-hole { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .tn-hctl { grid-column: auto; }
}
.tn-publish { justify-content: flex-start; }
.tn-pubcount { font-size: 0.85rem; }
.tn-unpub { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fff8e1; border: 1px solid #c9a227; color: #6b5200; font-size: 0.8rem; font-weight: 600; overflow-wrap: anywhere; }

/* --- tournament: the player's screens (QR landing, flight page, pairs, signing) --- */
.tn-fpage, .tn-pick, .tn-closed-card { display: grid; gap: 10px; min-width: 0; margin-bottom: 12px; }
.tn-flight-line { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.tn-pick-list { display: grid; gap: 8px; }
.tn-pick-btn, .gc-card button.tn-pick-btn { display: block; width: 100%; min-height: 48px; padding: 10px 14px; text-align: left; font: inherit; font-weight: 600; background: #fff; color: var(--gc-text, #1a1a1a); border: 1px solid var(--gc-border, #ccc); border-radius: 12px; cursor: pointer; overflow-wrap: anywhere; }
.tn-pick-btn[hidden] { display: none; }
.tn-pick-note { font-weight: 400; color: var(--gc-muted, #666); }
.tn-pick-btn.tn-pick-signs_in, .tn-pick-btn.tn-pick-taken { background: #f6f6f4; }
.tn-pick-filter { width: 100%; box-sizing: border-box; min-height: 44px; }
.tn-members, .tn-pairs, .tn-signlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-members li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--sc-line, #eee); border-radius: 10px; min-width: 0; }
.tn-members .tn-me { border-color: var(--gc-green, #005030); background: #eef8f0; }
.tn-mname { min-width: 0; overflow-wrap: anywhere; } .tn-mhcp { flex: none; color: #5f6368; font-size: 0.85rem; }
.tn-big, .gc-card .tn-big { display: block; width: 100%; box-sizing: border-box; padding: 14px 18px; font-size: 1.1rem; }
.tn-pair { padding: 6px 0; border-bottom: 1px solid #eee; overflow-wrap: anywhere; }
.tn-signrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid #eee; }
.tn-signwho { display: grid; min-width: 0; overflow-wrap: anywhere; }
.tn-signed { color: #1d5a30; font-weight: 600; }
.tn-inline { display: inline; margin: 0; }
.tn-linkbtn, .gc-card button.tn-linkbtn { background: none; border: none; padding: 0; color: var(--gc-blue, #1f6fb0); text-decoration: underline; font: inherit; cursor: pointer; }
.tn-qr summary { cursor: pointer; font-weight: 600; }
.tn-qr-img svg { width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto; }
.tn-pairform { display: grid; gap: 10px; }
.tn-pairrow { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.tn-pairrow select { width: 100%; max-width: none; box-sizing: border-box; min-height: 44px; }
.tn-mround { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid #eee; }
.tn-participants { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.tn-mine-item .tn-mine-name { font-size: 1.15rem; }
.tn-mine-new { margin: 4px 0 12px; }
.tn-mine-role { justify-self: start; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sc-line, #eee); color: var(--sc-muted); }
.tn-mine-item { min-width: 0; margin-bottom: 10px; }
.tn-mine-item strong, .tn-mine-item span { overflow-wrap: anywhere; }
div.tn-mine-item { display: grid; gap: 8px; }
.tn-mine-round { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--sc-line, #eee); min-width: 0; }
.tn-mine-rhead { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.tn-mine-rhead a { color: inherit; }
.tn-mine-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.tn-mine-links .sc-btn-secondary { min-height: 44px; display: inline-flex; align-items: center; }
.tn-mine-course { margin: 0; font-size: 0.85rem; color: var(--sc-muted); overflow-wrap: anywhere; }
.tn-mine-flights { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tn-mine-flights li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 0.9rem; min-width: 0; }
.tn-mine-fstatus { color: var(--sc-muted); }
.tn-mine-unsigned { flex: 1 1 100%; min-width: 0; }
.tn-mine-unsigned > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: #b45309; font-weight: 600; }
.tn-mine-unsigned > summary::-webkit-details-marker { display: none; }
.tn-mine-unsigned > summary span { display: inline-block; transition: transform 0.15s; }
.tn-mine-unsigned[open] > summary span { transform: rotate(90deg); }
.tn-mine-unsigned-box { padding: 8px 10px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; }
.tn-mine-unsigned-head { margin: 0 0 4px; }
.tn-mine-unsigned-box ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.tn-names { margin: 0; overflow-wrap: anywhere; }
.tn-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.tn-cell { display: grid; justify-items: center; padding: 4px 2px; border: 1px solid #eee; border-radius: 8px; }
.tn-cell-h { font-size: 0.75rem; color: #5f6368; } .tn-cell-p { font-size: 0.7rem; color: #5f6368; } .tn-cell-s { font-size: 1.05rem; }
.tn-total { margin: 0; text-align: right; }
.sc-tn-links { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tn-you { overflow-wrap: anywhere; } .tn-you .tn-inline { margin-left: 6px; }
.tn-team { display: grid; gap: 6px; min-width: 0; padding-top: 8px; border-top: 1px solid #eee; }
.tn-team:first-of-type { border-top: none; padding-top: 0; }
.tn-team-name, .tn-ballname { margin: 0; overflow-wrap: anywhere; }

/* Tournament: TD flights list, leaderboard, results (Task 13) */
.tn-lbnav { margin: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.tn-complete { margin: 0; }
.tn-filterbar { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-filter { display: inline-flex; align-items: center; min-height: 36px; padding: 2px 12px; border: 1px solid var(--gc-border, #ccc); border-radius: 999px; background: #fff; color: inherit; text-decoration: none; font-size: 0.85rem; }
.tn-filter-on { background: #eaf3fb; border-color: #1f6fb0; font-weight: 600; }
.tn-fl { display: grid; gap: 6px; min-width: 0; }
.tn-fl-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tn-fl-start { color: #5f6368; font-size: 0.9rem; }
.tn-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-cardrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-top: 1px solid #eee; min-width: 0; }
.tn-cardname { flex: 1 1 100%; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.tn-cardname .tn-cardmembers { display: block; font-weight: 400; }
.tn-thru { font-size: 0.85rem; color: #5f6368; }
.tn-status { padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; background: #e8eaed; color: #3c4043; white-space: nowrap; }
.tn-status-in_progress { background: #e8f0fe; color: #174ea6; }
.tn-status-awaiting_signatures, .tn-status-player_signed, .tn-status-marker_signed { background: #fff8e1; color: #6b5200; }
.tn-status-complete { background: #e6f4ea; color: #137333; }
.tn-sigs { font-size: 0.85rem; white-space: nowrap; }
.tn-sig { color: #5f6368; } .tn-sig-on { color: #137333; font-weight: 600; }
.tn-marker { flex: 1 1 100%; font-size: 0.8rem; overflow-wrap: anywhere; }
.tn-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tn-lb { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tn-lb th, .tn-lb td { padding: 6px 4px; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
.tn-lb th { font-size: 0.75rem; color: #5f6368; font-weight: 600; white-space: nowrap; }
.tn-lb .tn-n { text-align: right; white-space: nowrap; }
.tn-lb .tn-total { font-weight: 700; }
.tn-lbname { min-width: 7.5em; overflow-wrap: anywhere; }
@media (max-width: 400px) { .tn-lb .tn-opt { display: none; } }
@media (max-width: 340px) { .tn-lbname { min-width: 6em; } }
.tn-lbname small { display: block; font-size: 0.75rem; }
.tn-cb { color: #5f6368; }
.tn-lbname .tn-lbmembers { color: #3c4043; }
.tn-out td { color: #80868b; }
.tn-genform { display: grid; gap: 8px; }
.tn-genfield { display: grid; gap: 2px; font-size: 0.85rem; }
.tn-genfield select { min-height: 40px; max-width: 100%; }
.tn-resmeta { margin: 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.tn-locked-tag { color: #8a5a00; }
.tn-inline { display: inline; margin: 0; }
@media (max-width: 380px) { .tn-lb { font-size: 0.8rem; } .tn-lb th, .tn-lb td { padding: 5px 2px; } }
/* tournament: entries (withdraw / edit / add), round state, card view (final fixes) */
.tn-entry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tn-entry { padding: 10px 12px; }
.tn-entry-out { opacity: 0.7; }
.tn-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tn-entry-name { font-weight: 600; overflow-wrap: anywhere; flex: 1 1 140px; min-width: 0; }
.tn-entry-meta { font-size: 0.85rem; }
.tn-entry details summary, .tn-entry-add summary { cursor: pointer; padding: 6px 0; }
.tn-entry-add { padding: 10px 12px; margin-bottom: 10px; }
.tn-entry-form { display: grid; gap: 8px; margin-top: 6px; }
.tn-paste textarea { width: 100%; box-sizing: border-box; min-width: 0; font: inherit; }
.tn-paste-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-paste-list { margin: 8px 0; }
.tn-entry-field { display: grid; gap: 2px; }
.tn-entry-field input, .tn-entry-field select { min-height: 40px; max-width: 100%; box-sizing: border-box; width: 100%; }
.tn-roundstate { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 6px 0; }
.tn-reissue { margin-left: auto; }
.tn-card-sheet { overflow-x: auto; }
.tn-card-holes { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.tn-card-holes th, .tn-card-holes td { border-bottom: 1px solid #e3e3e3; padding: 4px 6px; text-align: center; }
.tn-card-course { display: block; font-size: 0.72rem; color: #666; font-weight: 400; overflow-wrap: anywhere; }
.tn-card-balls { table-layout: fixed; }
.tn-card-balls th:nth-child(-n+2) { width: 2.6em; }
.tn-card-balls .tn-ballname { font-size: 0.75rem; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.tn-card-extra th, .tn-card-extra td { padding: 4px 2px; }
.tn-card-extra thead th { font-size: 0.8rem; overflow-wrap: anywhere; }
.tn-card-sigs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tn-card-sig img { max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 6px; background: #fff; }

/* tournament Teams page (Phase 2) */
.tn-team-members { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.tn-team-member { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.tn-team-pname { overflow-wrap: anywhere; min-width: 0; }
.tn-team-acts { margin-left: auto; display: inline-flex; gap: 10px; }
.tn-team-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tn-team-add select, .tn-team-add input[type=text] { flex: 1 1 160px; min-width: 0; max-width: 100%; min-height: 36px; box-sizing: border-box; }
.tn-team-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 0; }
.tn-team-pick .tn-check { min-width: 0; }
.tn-team .tn-entry-head .tn-imp-tag { margin-left: 0; }
.tn-help { margin: -4px 0 4px; font-size: 0.8rem; }

/* Threeties sets table: team names wrap, the hole cells stay narrow for a 320px phone */
.sc-tt-sets .sc-tt-teams { text-align: left; font-size: 0.78rem; overflow-wrap: anywhere; }
.sc-tt-sets td small { font-size: 0.7rem; }
.sc-tt-sets th, .sc-tt-sets td { padding: 3px 4px; }
.sc-tt-sets .sc-tt-hole { min-width: 28px; line-height: 1.2; }
.sc-tt-sets .sc-tt-don { background: #fff4d6; }

/* pro crowns (spec 2026-10-13): a crowned feature's golden crown; a locked
   one (the player hasn't it) is greyed out, and its crown opens a pop-up */
.sc-crown-icon { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.15em; }
.sc-pro-crown { display: inline-flex; align-items: center; margin-left: 4px; padding: 0; border: 0; background: none; font: inherit; line-height: 1; }
button.sc-pro-crown { cursor: pointer; min-width: 32px; min-height: 32px; justify-content: center; border-radius: 50%; }
/* a locked crown in a card: just the golden crown, not .gc-card button's green pill (user, 2026-10-16) */
.gc-card button.sc-pro-crown, .gc-card button.sc-pro-crown:hover { background: none; padding: 0; border: 0; color: inherit; }
button.sc-pro-crown:focus-visible { outline: 2px solid #d4a017; outline-offset: 1px; }
.sc-locked { opacity: .5; cursor: not-allowed; }
/* a pro feature's own button wearing the crown (the Kakis button, user 2026-10-16): greyed text, the
   crown in full colour on its corner; it opens the "upgrade to Pro" pop-up */
.sc-pro-feature { position: relative; overflow: visible; }
.sc-auth-form .sc-player-name .sc-kaki-pro, .gc-card button.sc-kaki-pro, .sc-kaki-pro { color: #8aa6c4; background: #f3f8fd; border: 1px solid #b9cde4; border-radius: 9px; padding: 0 8px; text-align: center; font: inherit; font-weight: 600; font-size: 0.85rem; line-height: 1; }
.gc-card button.sc-kaki-pro:hover { background-color: #eaf2fb; }
.sc-pro-feature-crown { position: absolute; top: -9px; right: -7px; font-size: 1.05rem; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); }
.sc-locked .sc-pro-crown { opacity: 1; }
.sc-locked-row { display: flex; align-items: center; gap: 6px; }
.sc-locked-row > .sc-locked { flex: 1 1 auto; min-width: 0; }
.sc-pro-pop { max-width: min(340px, calc(100vw - 32px)); padding: 16px; border: 1px solid #d4a017; border-radius: 12px; background: #fff; color: #222; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.sc-pro-pop::backdrop { background: rgba(0,0,0,.25); }
.sc-pro-pop p { margin: 0 0 10px; }
.sc-pro-pop .sc-pro-pop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sc-more-menu .sc-pro-crown, .sc-more-menu button.sc-pro-crown { display: inline-flex; width: auto; padding: 0; }
.sc-more-menu .sc-locked-row > .sc-locked { padding: 8px 10px; }
.sc-more-menu .sc-locked-row .sc-pro-pop-actions a, .sc-more-menu .sc-pro-pop button { display: inline-block; width: auto; }
.sc-account-locked { background: var(--sc-panel, #f6f6f6); }
.sc-pro-pop a.sc-btn-primary, .sc-more-menu .sc-pro-pop a.sc-btn-primary { color: #fff; }

/* Format tabs (several formats): one scrolling strip, the page never does */
.tn-fmttabs { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin: 0 0 10px; border-bottom: 1px solid var(--gc-border, #ccc); }
.tn-fmttab { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 2px 14px; color: inherit; text-decoration: none; font-size: 0.9rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.tn-fmttab-on { font-weight: 600; border-bottom-color: #1f6fb0; }

/* The course picker of New game / Edit game (user, 2026-10-21): the field is a button showing the course
   chosen; it opens a sheet -- whole screen on a phone-sized screen, a panel on a wider one. */
.sc-course-pick {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; box-sizing: border-box; padding: 8px 12px;
  border: 1px solid var(--gc-border, #ccc); border-radius: 6px; background: #fff; text-align: left; cursor: pointer; font: inherit;
}
.sc-course-pick-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sc-course-pick-text b { font-weight: 600; overflow-wrap: anywhere; }
.sc-course-pick-text small { color: var(--sc-muted); font-size: 0.8rem; }
.sc-course-pick-text small:empty { display: none; }
.sc-course-pick-empty .sc-course-pick-text b { font-weight: 400; color: var(--sc-muted); }
.sc-course-pick-go { flex: none; font-size: 1.4rem; line-height: 1; color: var(--sc-muted); }
.sc-picker {
  width: min(560px, 100vw); max-width: none; height: min(720px, 100dvh); max-height: none; box-sizing: border-box;
  padding: 0; border: none; border-radius: 12px; display: none; flex-direction: column; overflow: hidden;
}
.sc-picker[open] { display: flex; }
.sc-picker::backdrop { background: rgba(0, 0, 0, .45); }
.sc-picker-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px 16px; }
.sc-picker-head h2 { flex: 1; margin: 0; font-size: 1.1rem; }
.sc-picker-close { width: 44px; height: 44px; border: none; background: none; font-size: 1.2rem; cursor: pointer; }
.sc-picker-find { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 11em); gap: 8px; padding: 4px 16px 10px; border-bottom: 1px solid var(--sc-line); }
.sc-picker-find input, .sc-picker-find select { width: 100%; max-width: none; min-width: 0; min-height: 44px; box-sizing: border-box; font-size: 1rem; }
.sc-picker-list { flex: 1; overflow-y: auto; padding: 0 16px 16px; -webkit-overflow-scrolling: touch; }
.sc-pick-group h3 { margin: 14px 0 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--sc-muted); }
.sc-pick-group ul { list-style: none; margin: 0; padding: 0; }
.sc-pick-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 4px; box-sizing: border-box;
  border: none; border-bottom: 1px solid var(--sc-line); background: none; text-align: left; font: inherit; cursor: pointer;
}
.sc-pick-row:hover, .sc-pick-row:focus-visible { background: var(--sc-panel); }
.sc-pick-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sc-pick-text b { font-weight: 600; overflow-wrap: anywhere; }
.sc-pick-text small { color: var(--sc-muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.sc-pick-tags { flex: none; display: grid; justify-items: end; gap: 3px; }
.sc-pick-tagline { display: flex; align-items: center; gap: 2px; }  /* the tag, and its crown beside it */
.sc-pick-tagline .sc-pro-crown { margin-left: 2px; }
.sc-pick-tag { padding: 1px 6px; border-radius: 4px; background: var(--sc-panel); color: #555; font-size: 0.7rem; font-weight: 600; }
.sc-pick-club { background: #e3f0e8; color: var(--gc-green, #1f6f43); }
.sc-pick-yours { background: var(--sc-blue-soft); color: var(--sc-blue); }
.sc-pick-holes { color: var(--sc-muted); font-size: 0.75rem; white-space: nowrap; }
.sc-pick-none, .sc-pick-more { margin: 16px 0; }
/* My courses: folded to start, with the pro crown; a player no longer pro sees them, greyed, not to be picked */
.sc-pick-fold summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.sc-pick-fold summary::-webkit-details-marker { display: none; }
.sc-pick-fold summary::after { content: "▸"; margin-left: auto; color: var(--sc-muted); }
.sc-pick-fold[open] summary::after { content: "▾"; }
.sc-pick-fold summary h3 { display: flex; align-items: center; gap: 6px; margin: 0; }
.sc-pick-count { padding: 0 6px; border-radius: 999px; background: var(--sc-panel); font-size: 0.7rem; letter-spacing: 0; }
.sc-pick-row.is-locked { opacity: 0.55; cursor: not-allowed; }
/* a player who isn't pro: a country's active clubs' courses, this divider, then the pro users' (user, 2026-10-21) */
.sc-pick-divider { display: flex; align-items: center; gap: 8px; margin: 12px 0 2px; color: var(--sc-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sc-pick-divider::before, .sc-pick-divider::after { content: ""; flex: 1; border-top: 1px dashed var(--sc-muted); }
.sc-pick-pro summary { min-height: 44px; margin: 4px 0 0; cursor: pointer; list-style: none; }  /* folded to start; tap to open */
.sc-pick-pro summary::-webkit-details-marker { display: none; }
.sc-pick-chev::before { content: "▸"; }
.sc-pick-pro[open] .sc-pick-chev::before { content: "▾"; }
.sc-pick-locked-note { margin: 0 0 6px; font-size: 0.85rem; }
.gc-card button.sc-pick-all, .gc-card button.sc-pick-all:hover { display: block; margin-top: 10px; background: #fff; color: var(--sc-blue); border: 1px solid var(--sc-line); border-radius: 999px; padding: 8px 16px; font-weight: 600; }
/* (inside a .gc-card: not its solid green buttons) */
.gc-card button.sc-course-pick, .gc-card button.sc-course-pick:hover { display: flex; background: #fff; color: var(--gc-text, #222); border: 1px solid var(--gc-border, #ccc); border-radius: 6px; padding: 8px 12px; }
.gc-card button.sc-pick-row { display: flex; background: none; color: var(--gc-text, #222); border: none; border-bottom: 1px solid var(--sc-line); border-radius: 0; padding: 8px 4px; }
.gc-card button.sc-pick-row:hover, .gc-card button.sc-pick-row:focus-visible { background: var(--sc-panel); }
.gc-card button.sc-picker-close, .gc-card button.sc-picker-close:hover { display: inline-flex; align-items: center; justify-content: center; background: none; color: var(--gc-text, #222); padding: 0; }
@media (max-width: 600px) {
  .sc-picker { width: 100vw; height: 100dvh; border-radius: 0; }  /* the whole screen */
  .sc-picker-find { grid-template-columns: minmax(0, 1fr); }
}
