/* =========================================================
   1) BASE / LAYOUT
   ========================================================= */
:root{
  --bg: #f0f0f0;
  --panel: #111;
  --panel2: #0f1620;

  --ink: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --line: rgba(255,255,255,0.12);

  --green: #8CC63F;
  --shadow: 0 20px 70px rgba(0,0,0,0.55);

  --radius: 16px;
  --radius-sm: 12px;
}

body{ background:var(--bg); color:var(--ink); }
body.modal-open-custom{ overflow:hidden; }

/* =========================================================
   PRELOADER (v2) — full-screen white with progress dial + %
   ========================================================= */
.preloader-cover{
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility .25s ease;
}

.preloader-cover.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner{
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
}

/* Bigger dial */
.preloader-ring{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 10px solid rgba(0,0,0,.08);   /* light track */
  border-top-color: #8CC63F;            /* GCL green */
  animation: preloaderSpin 0.9s linear infinite;
  box-sizing: border-box;
}

/* % perfectly centered */
.preloader-pct{
  font-family: 'Oswald', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 32px;
  color: #333;
  line-height: 1;
  user-select: none;
}

@keyframes preloaderSpin{
  to { transform: rotate(360deg); }
}

/* =========================================================
   GLOBAL UTILS
   ========================================================= */
.hidden{ display:none !important; }

/* =========================================================
   MOBILE WELCOME SCREEN (replaces course overview on load)
   ========================================================= */
.welcome-screen{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;                 /* enabled on mobile via JS */
  background: #f0f0f0;           /* ✅ same as page BG */
  padding: 24px 18px;
}

.welcome-screen.is-on{ display:flex; }

.welcome-screen__inner{
  width: 100%;
  max-width: 520px;
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.welcome-screen__logo{
  display:block;
  max-width: min(70vw, 260px);
  height: auto;
}

.welcome-screen__title{
  margin: 10px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .2px;
  font-family: "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; /* ✅ Oswald */
  color: rgba(0,0,0,0.88);
  text-transform: uppercase;
}

.welcome-screen__sub{
  margin: 0;
  color: rgba(0,0,0,0.62);
  font-size: 16px;
  line-height: 1.4;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; /* ✅ Open Sans */
}

.welcome-screen__btn{
  margin-top: 10px;
  width: 200px;
  height: 46px;
  border-radius: 8px;
  border: 0;
  background: #8cc63f;
  color: rgba(0,0,0,0.88);
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase; /* ✅ uppercase */
  font-family: "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; /* ✅ Oswald */
  font-size: 18px;
}

.welcome-screen__btn:active{ transform: translateY(1px); }

/* =========================================================
   COURSE OVERVIEW
   ========================================================= */
.course-overview{
  display: flex;
  align-items: center;            /* vertical centre */
  justify-content: center;        /* horizontal centre */
  min-height: calc(100vh - 64px); /* allow for topbar height */
}

/* Stage just centres the map panel */
.course-stage{
  display: flex;
  justify-content: center;
  width: 100%;
}

/*
  KEY CHANGE:
  Let the IMAGE define the height (keeps perfect proportions at any size).
  The wrapper becomes the exact same box as the rendered image, so markers
  (positioned in %) stay correct and never drift.
*/
.course-map-wrap{
  position: relative;
  width: min(900px, 100%);
}

/* Image scales proportionally (no stretching) */
.course-map{
  display: block;
  width: 100%;
  height: auto;                 /* ✅ preserves image ratio */
}

/* Markers sit on top of the image box */
.course-markers{
  position: absolute;
  inset: 0;
}

/* Marker button styling */
.course-marker{
  position:absolute;
  transform: translate(-50%,-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.55);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  user-select: none;

  /* nicer mobile tapping */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover:hover){
  .course-marker:hover{
    transform: translate(-50%,-50%) scale(1.05);
    background: rgba(0,0,0,0.70);
  }
}

/* =========================================================
   DESKTOP LAYOUT (do NOT affect mobile)
   ========================================================= */
@media (min-width: 980px){

  .wrap{
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hole-layout{
    display: grid;
    gap: 18px;
    align-items: start;

    /* LEFT = capped/controlled width, RIGHT = fills remaining space */
    grid-template-columns: clamp(360px, 56vw, 400px) 1fr;
  }

  .notes{ min-width: 320px; }

  /* Notes in a “panel” vibe like v1 */
  /*.notes{
    margin-top: 0;
    background: rgba(0,0,0,0.72);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    position: sticky;
    top: 74px;
  }*/
}

/* =========================================================
   WRAP + HEADER
   (keep order and duplicate .wrap rules exactly as current)
   ========================================================= */
.wrap{ max-width:900px; margin:0 auto; padding:10px 12px 15px; }
.wrap{ padding-top:64px; }

.header{
  margin:0;
  color:#000;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:800;
  font-size: 24px;
  text-transform: uppercase;
}

/* =========================================================
   2) TOP BAR
   ========================================================= */
.topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:1000;

  /* Slightly darker than page bg */
  background: #d2d2d2;

  /* subtle shadow line */
  /*border-bottom: 1px solid rgba(0,0,0,0.10);*/
  /*box-shadow: 0 2px 10px rgba(0,0,0,0.08);*/
}

.topbar__inner{
  max-width:900px;          /* matches .wrap max-width */
  margin:0 auto;
  padding:10px 20px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.topbar .header{
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Make cog bigger and remove “Settings” text (handled in HTML) */
.topbar .settings{
  padding:6px 10px;
  line-height:1;
}

.topbar .settings i{
  font-size:22px;
}

/* Hide Pace of Play on desktop, show on mobile */
@media (min-width: 980px){
  #paceBtn{
    display: none !important;
  }
}

/* =========================================================
   SETTINGS COG — ICON ONLY
   ========================================================= */

/* Remove all button visuals */
.topbar .settings{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 6px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* Force icon color across all devices (incl. iOS) */
.topbar .settings i{
  color: #000 !important;
  font-size: 30px;
  line-height: 1;
}

/* Prevent iOS tap highlight / blue tint */
.topbar .settings:focus,
.topbar .settings:active{
  outline: none;
  box-shadow: none;
}

.topbar .settings i:focus,
.topbar .settings i:active{
  color: #000 !important;
}

/* Optional: subtle hover feedback (desktop only) */
@media (hover:hover){
  .topbar .settings:hover{
    opacity: 0.75;
  }
}

/* =========================================================
   3) HOLE NAV
   ========================================================= */
.hole-nav{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:10px 0;
  -webkit-overflow-scrolling:touch;
  justify-content:flex-start;
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.hole-nav a{
  display:inline-flex;
  min-width:36px;
  height:32px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  color:#fff;
  text-decoration:none;
  font-weight:800;
}
.hole-nav a.active{ background:var(--green); color:#111; }

/* =========================================================
   4) HOLE INFO HEADER
   ========================================================= */
.hole-info{
  display:flex;
  gap:12px;
  align-items:stretch;
  margin-top:12px;
}
.hole-no{
  /*width:30px;
  min-height:60px;*/
  display:flex;
  align-items:center;
  /*justify-content:center;*/
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:700;
  font-size:50px;
  color:#000;
}
.hole-info__right{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:1px;
}
.tee-row{ display:flex; gap:5px; }
.tee{
  flex:1;
  text-align:center;
  padding:4px;
  border-radius:8px;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:700;
  font-size:18px;
  color:#000;
}
.tee--yellow{ background:yellow; }
.tee--white{ background:white; }
.tee--red{ background:#c00; color:#fff; }
.par-stroke{
  text-align:right;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:18px;
  font-weight:700;
  text-transform: uppercase;
  color:#000;
}

/* =========================================================
   5) HOLE STAGE / MAP / PINS
   ========================================================= */
.hole-stage{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
}
.hole-map{ width:100%; display:block; }
#pinsLayer{ position:absolute; inset:0; }

.pin{
  position:absolute;
  transform:translate(-50%,-100%);
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,140,0,.92);
  color:#111;
  font-weight:900;
  font-size:12px;
  pointer-events:none;
  box-shadow:0 10px 24px rgba(0,0,0,.45);
}

/* =========================================================
   6) PREV/NEXT BUTTONS + NOTES
   ========================================================= */
.hole-arrows{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.hole-arrows button{
  flex:1;
  border:0;
  border-radius:8px;
  padding:8px;
  background:#ccc;
  color:#000;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:800;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
}
.hole-arrows button:active{ transform:scale(.99); }

@media (hover:hover){
  .hole-arrows button:hover{
    background: rgba(0,0,0,0.25);
  }
}

.pro-tip{
  margin:15px 0 20px;
  border:0px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:rgba(255,255,255,.92);
  overflow:hidden;
}

.pro-tip summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 18px;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:18px;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#111;
  background:rgba(246,246,246,.96);
}

.pro-tip summary::-webkit-details-marker{
  display:none;
}

.pro-tip summary::after{
  content:'+';
  width:28px;
  height:28px;
  flex:0 0 28px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#f2f5eb;
  border:1px solid rgba(140,198,63,.28);
  color:#5e8f1d;
  font-family:inherit;
  font-size:22px;
  font-weight:700;
  line-height:1;
}

.pro-tip[open] summary{
  border-bottom:1px solid rgba(0,0,0,.08);
}

.pro-tip[open] summary::after{
  content:'−';
}

.pro-tip__body{
  padding:10px 18px 10px;
}

.pro-tip__body p{
  margin:0;
  font-family:"Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:15px;
  line-height:1.6;
  color:#2a2a2a;
}

/* =========================================================
   7) SHOT LABELS (per-leg) — SINGLE DEFINITION (deduped)
   ========================================================= */
.shot-label{
  position:absolute;
  z-index:20;
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:8px;
  background:#000;
  color:#fff;
  border-radius:14px;
  padding:8px;
  box-shadow:0 10px 30px rgba(0,0,0,0.35);
  transform: translate(-50%, -50%);
}
.shot-label.hidden{ display:none; }

.shot-label__distances{
  display:flex;
  flex-direction:column;
  gap:0;
}
.distance-row{
  display:flex;
  align-items:center;
  gap:5px;
  line-height:1;
}
.distance-row .value{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:14px;
  font-weight:800;
  letter-spacing:0.01em;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.distance-row.sub .value{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:16px;
  color: var(--green);
}
.distance-row .unit{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:0.7em;
  margin-left:1px;
}
.club-badge{
  width:32px;
  height:32px;
  border-radius:999px;
  background:#fff;
  color:#000;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:600;
  font-size:18px;
  line-height:1;
  letter-spacing:0.02em;
}

/* =========================================================
   8) CUSTOM GCL MODAL SYSTEM (shared by Bag + Settings Hub etc.)
   ========================================================= */
.gcl-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  justify-content: center;
  align-items: flex-end;   /* mobile bottom sheet */
  z-index: 2000;
  padding: 12px;
}
.gcl-modal.hidden{
  display:none !important;
  pointer-events:none !important;
}
.gcl-sheet{
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  background: var(--panel);
  color: #fff;
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  overflow: hidden;

  /* make body scroll nicely when content is tall */
  display:flex;
  flex-direction:column;
  min-height:0;
}
@media (min-width: 768px){
  .gcl-modal{ align-items:center; }
  .gcl-sheet{ border-radius:16px; }
}

.gcl-head{
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.gcl-title{
  margin:0;
  text-align:center;
  flex:1;
  font-size:28px;
  font-weight:900;
  letter-spacing:.02em;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
}
.gcl-close{
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.9);
  font-size: 24px;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
}

.gcl-body{
  padding: 14px 16px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  flex: 1 1 auto;
  min-height: 0; /* critical for flex scroll */
}
.gcl-foot{
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  display:flex;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
}

#settingsHubModal .gcl-foot .gcl-btn{
  margin: 0 auto;
}

/* =========================================================
   9) BUTTONS + INPUTS (shared) — works with your existing classes too
   ========================================================= */

/* Pill button system (preferred) */
.gcl-btn{
  appearance:none;
  border:0;
  border-radius:8px;
  padding:12px 18px;
  font-weight:800;
  letter-spacing:.2px;
  text-transform:uppercase;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height:1;
  cursor:pointer;
  user-select:none;
  transition: transform .08s ease, background .15s ease, opacity .15s ease;
}
.gcl-btn:active{ transform: translateY(1px); }

.gcl-btn--primary{ background: var(--green); color:#111; }
.gcl-btn--ghost{
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.10);
}
.gcl-btn--ghost:hover{ background: rgba(255,255,255,0.16); }

/* Back-compat: if some modals still use .btn etc. */
.gcl-modal .btn{
  border-radius:8px;
  padding:12px 18px;
  font-weight:800;
  text-transform:uppercase;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height:1;
  border:0;
  text-decoration: none;
  margin-bottom: 10px;
}
.gcl-modal .btn:active{ transform: translateY(1px); }
.gcl-modal .btn.btn-primary{ background: var(--green); color:#111; }
.gcl-modal .btn.btn-default,
.gcl-modal .btn.btn-secondary{
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.10);
}

/* Inputs in modals */
.gcl-modal label,
.gcl-modal label.small{
  color: rgba(255,255,255,0.72);
  font-weight:700;
}
.gcl-modal .form-control{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: none;
}
.gcl-modal .form-control:focus{
  border-color: rgba(140,198,63,0.70);
  box-shadow: 0 0 0 3px rgba(140,198,63,0.18);
  outline: none;
}

/* Report button */
.btn.btn-danger{
  background:#d93025;
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
}
.btn.btn-danger:hover{ filter:brightness(.95); }
.btn.btn-danger:active{ filter:brightness(.9); }

/* Optional: ensure setup actions row lays out nicely as 2 buttons */
.pace-actions--setup{
  display:flex;
  gap:12px;
  justify-content:center;
}

/* =========================================================
   10) SETTINGS HUB (General Settings) — custom (non-bootstrap)
   ========================================================= */
#settingsHubModal .gcl-sheet{ max-width: 420px; }

#settingsHubModal .gcl-title{
  font-size: 22px;
  letter-spacing: .4px;
}

#settingsHubModal .settings-list{
  display:grid;
  gap:10px;
  margin:0;
  padding:0;
}

#settingsHubModal .settings-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  text-decoration:none;
  font-weight:800;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing:.2px;
  text-transform:uppercase;
}
#settingsHubModal .settings-item i{
  width:18px;
  text-align:center;
  opacity:.95;
}
#settingsHubModal .settings-item:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
  color:#fff;
}
#settingsHubModal .settings-item:active{ transform: translateY(1px); }

/* Settings completion status */
.settings-status{
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
}

.settings-status.ok{
  color: #8CC63F; /* green tick */
}

.settings-status.missing{
  color: #ff5252; /* red cross */
}

/* =========================================================
   11) BAG MODAL — viewport fit + sticky head/foot + scroll body
   Includes: iOS Safari safe-area footer fix, bigger inputs,
   right-aligned carry fields, and no number steppers.
   ========================================================= */

/* ---- Modal overlay ---- */
#bagModal.gcl-modal{
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,0.55);

  /* iOS safe-area support (so overlay padding respects bottom UI) */
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* ---- Sheet layout (header + scroll body + footer) ---- */
#bagModal .gcl-sheet{
  width: 100%;
  max-width: 520px;

  display: flex;
  flex-direction: column;
  min-height: 0;

  background: #111;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;

  /* Fit inside viewport (dynamic viewport for mobile browsers) */
  max-height: calc(100dvh - (24px + env(safe-area-inset-bottom, 0px)));
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}

#bagModal .gcl-head,
#bagModal .gcl-foot{
  flex: 0 0 auto;
}

#bagModal .gcl-body{
  flex: 1 1 auto;
  min-height: 0;                 /* critical for flex scrolling */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---- Mobile full-screen (keeps footer visible above Safari UI) ---- */
@media (max-width: 767px){
  #bagModal.gcl-modal{
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: stretch;
  }

  #bagModal .gcl-sheet{
    max-width: none;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* ---- Typography ---- */
#bagModal{
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#bagModal .gcl-title{
  font-family: "Oswald", "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: .3px;
}

/* ---- Header ---- */
#bagModal .gcl-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

#bagModal .gcl-title{
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 24px;
}

#bagModal .gcl-head-spacer{
  width: 28px;
  flex: 0 0 28px;
}

#bagModal .gcl-close{
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.92);
  font-size: 26px;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
}

/* ---- Footer (safe-area padding so buttons are not behind Safari UI) ---- */
#bagModal .gcl-foot{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;            /* ✅ center buttons */
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.10);

  /* lift above Safari bottom bar */
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Optional: keep buttons visually balanced */
#bagModal .gcl-foot .gcl-btn{
  min-width: 96px;
}

/* ---- Body spacing ---- */
#bagModal .gcl-body{
  padding: 14px 16px 18px;
}

#bagModal .bag-intro{
  color: rgba(255,255,255,0.72);
  font-size: 16px;
  line-height: 1.45;
}

#bagModal .bag-note,
#bagModal #bagSettingsNote{
  color: #8CC63F;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  margin: 16px 0;
  letter-spacing: 1px;
}

#bagModal .bag-generated-hint{
  color: #8CC63F;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  margin: -8px 0 16px;
  line-height: 1.4;
}

/* ---- Quick Bag Setup card ---- */
#bagModal .bag-card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0 24px;
}

#bagModal .bag-card__title{
  text-align: center;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  margin: 0 0 12px;
}

#bagModal .bag-quick-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
}

@media (max-width: 420px){
  #bagModal .bag-quick-row{
    grid-template-columns: 1fr;
  }
}

#bagModal .bag-field{
  text-align:center;
}

#bagModal .bag-field label.small{
  text-align:center;
}

#bagModal #bagAnchorKey,
#bagModal #bagAnchorCarry{
  text-align:center;
}

#bagModal #bagAnchorCarry::placeholder{
  text-align:center;
}

#bagModal .bag-field label.small{
  display:block;
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.78);
}

#bagModal .unit-muted{
  opacity: .75;
  font-weight: 600;
}

/* ---- Inputs / selects (bigger + no iOS zoom) ---- */
#bagModal .form-control{
  width: 100%;
  box-sizing: border-box;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;

  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;              /* prevents iOS zoom */
  line-height: 24px;
  padding: 12px 14px;
  height: 48px;
  border-radius: 12px;

  box-shadow: none;
}

/* Explicitly force select to respect height */
#bagModal select.form-control{
  height: 48px;
  line-height: 24px;
  padding-right: 36px;   /* room for dropdown arrow */
}

/* iOS Safari needs this to behave */
#bagModal select.form-control{
  -webkit-appearance: none;
  appearance: none;
}

#bagModal .form-control:focus{
  outline: none;
  border-color: rgba(140,198,63,0.75);
  box-shadow: 0 0 0 3px rgba(140,198,63,0.18);
}

/* Right-align number fields (carry) */
#bagModal input[type="number"]{
  text-align: right;
}

/* Remove number steppers (Chrome/Safari/Edge) */
#bagModal input[type="number"]::-webkit-outer-spin-button,
#bagModal input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
/* Remove number steppers (Firefox) */
#bagModal input[type="number"]{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ---- Quick setup buttons row (centered) ---- */
#bagModal .bag-quick-buttons{
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

/* ---- Buttons (your custom gcl-btn system) ---- */
#bagModal .gcl-btn{
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

#bagModal .gcl-btn--primary{
  background: #8CC63F;
  color: #111;
}

#bagModal .gcl-btn--primary:active{ transform: scale(.99); }

#bagModal .gcl-btn--ghost{
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}

#bagModal .gcl-btn--ghost:active{ transform: scale(.99); }

/* ---- Table wrapper ---- */
#bagModal .table-responsive{
  width: 100%;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}

/* Table base */
#bagModal table{
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  color: #fff;
}

#bagModal thead th{
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 16px;
  padding: 10px 12px;
}

#bagModal tbody td{
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Column sizing */
#bagModal td:nth-child(1),
#bagModal th:nth-child(1){ width: 34%; }

#bagModal td:nth-child(2),
#bagModal th:nth-child(2){ width: 50%; text-align: right; }

#bagModal td:nth-child(3),
#bagModal th:nth-child(3){
  width: 16%;
  text-align: right;
}

#bagModal .bag-vis-cell{
  text-align:right;
}

#bagModal .bag-toggle-btn{
  width:36px;
  height:36px;
  border:0;
  border-radius:10px;
  background:rgba(255,255,255,0.08);
  color:rgba(255,255,255,0.88);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .15s ease, opacity .15s ease, transform .08s ease;
}

#bagModal .bag-toggle-btn:active{
  transform:scale(.97);
}

#bagModal .bag-toggle-btn.is-off{
  background:rgba(255,255,255,0.04);
  color:rgba(255,255,255,0.36);
}

#bagModal .bag-toggle-btn .fa{
  font-size:16px;
  line-height:1;
}

#bagModal .bag-club.is-disabled{
  color:rgba(255,255,255,0.42);
}

#bagModal .bag-row.is-disabled .bag-carry-input{
  opacity:.45;
}

/* Make carry inputs fill the cell and align right */
#bagModal .bag-carry-input{
  width: 100%;
  text-align: right;
}

/* Optional: subtle zebra */
#bagModal tbody tr:nth-child(odd){
  background: rgba(255,255,255,0.03);
}

/* =========================================================
   12) FORM MODALS — Preferences + Ground Condition
   Match Bag inputs/labels + centered footer buttons
   Paste AFTER section 11) BAG MODAL
   ========================================================= */

/* Use Open Sans in these modals (title stays Oswald via .gcl-title) */
#prefsModal,
#groundModal{
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Body spacing */
#prefsModal .gcl-body,
#groundModal .gcl-body{
  padding: 16px 16px 18px;
}

/* Labels match Bag */
#prefsModal .gcl-body label,
#groundModal .gcl-body label{
  display:block;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.78);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Form-group spacing (Bootstrap-ish markup, but no bootstrap needed) */
#prefsModal .form-group,
#groundModal .form-group{
  margin: 0 0 14px;
}

/* Inputs/selects match Bag (bigger + prevents iOS zoom) */
#prefsModal .form-control,
#groundModal .form-control{
  width: 100%;
  box-sizing: border-box;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;

  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;              /* prevents iOS zoom */
  line-height: 24px;
  padding: 12px 14px;
  height: 48px;
  border-radius: 12px;

  box-shadow: none;
}

/* Selects: same height + better tap target */
#prefsModal select.form-control,
#groundModal select.form-control{
  height: 48px;
  line-height: 24px;
  padding-right: 36px;
  -webkit-appearance: none;
  appearance: none;
}

/* Focus match Bag */
#prefsModal .form-control:focus,
#groundModal .form-control:focus{
  outline: none;
  border-color: rgba(140,198,63,0.75);
  box-shadow: 0 0 0 3px rgba(140,198,63,0.18);
}

/* Footer: center buttons + safe-area padding like Bag */
#prefsModal .gcl-foot,
#groundModal .gcl-foot{
  justify-content: center;
  gap: 12px;

  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Ensure .btn buttons look like Bag buttons */
#prefsModal .gcl-foot .btn,
#groundModal .gcl-foot .btn{
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  text-transform: uppercase;
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1;
  border: 0;
  /*min-width: 110px;*/
}

/* Optional: make cancel slightly smaller presence (still consistent) */
#prefsModal .gcl-foot .btn.btn-default,
#groundModal .gcl-foot .btn.btn-default{
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.10);
}

/* Primary stays green */
#prefsModal .gcl-foot .btn.btn-primary,
#groundModal .gcl-foot .btn.btn-primary{
  background: var(--green);
  color: #111;
}

/* =========================================================
   WIND MODAL
   (Overlay + sheet + header/body/footer + modal copy + slider)
   ========================================================= */
.wind-modal.hidden{ display:none; }

.wind-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.60);
  padding: 16px;

  /* safe-area support */
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Sheet becomes flex column so only body scrolls */
.wind-modal-inner{
  width: min(520px, 92vw);
  background: var(--panel2);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
  overflow: hidden;

  display: flex;
  flex-direction: column;
  min-height: 0;

  /* keep inside viewport */
  max-height: calc(100dvh - (32px + env(safe-area-inset-bottom, 0px)));
  text-align: left;

  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Mobile full-screen like Bag (footer stays visible above Safari UI) */
@media (max-width: 767px){
  .wind-modal{
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: stretch;
  }
  .wind-modal-inner{
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* ---------- Header / Body / Footer ---------- */
.wind-head,
.wind-foot{
  flex: 0 0 auto;
}

.wind-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 18px;
}

/* Header matches others */
.wind-head{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.wind-title{
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wind-head-spacer{
  width: 28px;
  flex: 0 0 28px;
}

/* Header X */
.wind-close-x{
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 0;
  color: rgba(255,255,255,.92);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* Footer centered like Bag + safe-area padding */
.wind-foot{
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;

  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Text tweaks ---------- */
.wind-modal-intro{
  color: rgba(255,255,255,0.90);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  margin: 0 0 12px;
  opacity: 0.95;
  text-align: center;
}
.wind-modal-intro strong{ font-weight: 700; }

.wind-live-label{
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  margin: 10px 0 0;
  text-align: center;
}

/* Center the update-live button row */
.wind-live-btn-row{
  display: flex;
  justify-content: center;
  margin: 10px 0 0;
}

.wind-modal-inner hr{
  margin: 14px 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.gcl-modal,
.wind-modal{
  overscroll-behavior: contain;
}

/* Keep labels consistent with Bag */
.wind-speed-label{
  color: rgba(255,255,255,.92);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  display: block;
  margin-bottom: 14px;
  text-align: center;
}

/* Wind speed slider */
.wind-speed-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:6px;
}

.wind-speed-slider{
  flex:1 1 auto;
  -webkit-appearance:none;
  appearance:none;
  height:18px;
  background:transparent;
  outline:none;
  --windFillColor:#4dd0e1;
  --windFillPercent:0%;
  --windThumbColor:#4dd0e1;
}

.wind-speed-slider::-webkit-slider-runnable-track{
  height:6px;
  border-radius:8px;
  background:linear-gradient(
    to right,
    var(--windFillColor) 0%,
    var(--windFillColor) var(--windFillPercent),
    #263238 var(--windFillPercent),
    #263238 100%
  );
}

.wind-speed-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--windThumbColor);
  border:3px solid var(--panel2);
  margin-top:-8px;
  cursor:pointer;
}

.wind-speed-slider::-moz-range-track{
  height:6px;
  border-radius:8px;
  background:#263238;
}

.wind-speed-slider::-moz-range-progress{
  height:6px;
  border-radius:999px;
  background:var(--windFillColor);
}

.wind-speed-slider::-moz-range-thumb{
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--windThumbColor);
  border:3px solid var(--panel2);
  cursor:pointer;
}

.wind-speed-below{
  margin-top:16px;
  display:flex;
  justify-content:center;
}

.wind-speed-number{
  color:#ffffff;
  font-size:20px;
  font-weight:600;
  letter-spacing:0.02em;
  font-variant-numeric:tabular-nums;
}

/* Wind direction section heading + layout (NOT the dial visuals) */
.wind-dir-heading{
  display:block;
  font-size:14px;
  text-align:center;
  margin-bottom:10px;
  color:#fff;
  font-weight:700;
}

.wind-dir-layout{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
}

/* =========================================================
   WIND DIAL (COMPASS VISUALS ONLY)
   ========================================================= */
.wind-dial{
  width:140px;
  height:140px;
  margin:0 auto;
}

.wind-dial-circle{
  width:100%;
  height:100%;
  border-radius:50%;
  position:relative;
  background:#495059;
  border: none;
}

.wind-dial-arrow{
  position:absolute;
  inset:0;
  transform-origin:center;
  z-index:2;
  pointer-events:none;
  --windArrowColor:#4dd0e1;
}

.wind-dial-arrow::before{
  content:"";
  position:absolute;
  left:50%;
  top:20%;
  width:3px;
  height:30%;
  transform:translateX(-50%);
  background:var(--windArrowColor);
  border-radius:999px;
}

.wind-dial-arrow::after{
  content:"";
  position:absolute;
  left:50%;
  top:12%;
  transform:translateX(-50%);
  width:0;
  height:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-bottom:14px solid var(--windArrowColor);
}

/* =========================================================
   SHOT SETTINGS MODAL — uses .gcl-modal system
   ========================================================= */
#shotSettingsModal .gcl-title{
  font-size: 22px;
}

/* Center the description */
#shotSettingsModal .shot-note{
  margin: 0 0 14px;
  color: rgba(255,255,255,0.72);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

/* Section layout */
#shotSettingsModal .shot-section{
  display: grid;
  gap: 10px;
}

/* Center the headers (Shape / Strength) */
#shotSettingsModal .shot-section__title{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: .25px;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  text-align: center;
}

#shotSettingsModal .shot-divider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 14px 0;
}

/* --- FORCE 3 OPTIONS SIDE-BY-SIDE (even on iPhone 7) --- */
#shotSettingsModal .shot-grid{
  display: grid;
  gap: 10px;
}

#shotSettingsModal .shot-grid--3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* IMPORTANT: remove/override any mobile rule that changes to 1fr */
}

/* Option button styling */
#shotSettingsModal .shot-pill{
  appearance:none;
  border:0;
  border-radius:8px;
  padding:12px 14px;
  background:rgba(255,255,255,0.12);
  color:rgba(255,255,255,0.95);

  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:800;
  letter-spacing:.2px;
  text-transform:uppercase;
  font-size:16px;
  line-height:1;

  cursor:pointer;
  user-select:none;
  transition:transform .08s ease, background .15s ease, opacity .15s ease;
}

#shotSettingsModal .shot-pill:active{
  transform:translateY(1px);
}

#shotSettingsModal .shot-pill:hover{
  background:rgba(255,255,255,0.16);
}

#shotSettingsModal .shot-pill.is-active{
  background:#8CC63F;
  color:#111;
}

/* Optional: slightly improve focus (keyboard) without the green border look */
#shotSettingsModal .shot-pill:focus-visible{
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 2px;
}

/* Footer buttons centred like Bag */
#shotSettingsModal .shot-foot{
  justify-content: center;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* =========================================================
   PACE OF PLAY (modal)
   - Updated to match Bag "quick setup" field look/feel
   ========================================================= */
#paceModal .gcl-title{
  font-size: 22px;
  letter-spacing: .4px;
}

/* Wrapper inside .gcl-body */
.pace-body{ margin-top: 6px; }

/* ---------------------------------------------------------
   PRE-START vs RUNNING visibility (JS toggles display)
   --------------------------------------------------------- */
.pace-setup{ display:block; }
.pace-running{ display:none; }
.pace-done{ display:none; }

/* ✅ anchor overlay inside the running panel */
#paceModal #paceRunning{
  position: relative;
}

/* Intro paragraph (Open Sans) */
.pace-intro{
  margin: 0 0 14px;
  color: rgba(255,255,255,0.72);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

/* Field blocks (label + control) — align with Bag quick row vibe */
.pace-field{
  margin: 0 0 14px;
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
}

.pace-field__label{
  display:block;
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.78);
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  text-align: center; /* your spec: centred headers */
  text-transform: uppercase;
}

.pace-field__control{
  display:flex;
  justify-content:center;
}

/* --- Match Bag input/select styling, but scoped to #paceModal --- */
#paceModal .form-control{
  width: min(320px, 100%);
  box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;          /* prevents iOS zoom */
  line-height: 24px;
  padding: 12px 14px;
  height: 40px;
  border-radius: 12px;
  box-shadow: none;
}

#paceModal .form-control:focus{
  outline: none;
  border-color: rgba(140,198,63,0.75);
  box-shadow: 0 0 0 3px rgba(140,198,63,0.18);
}

/* Explicit select sizing + native arrow suppression (Bag style) */
#paceModal select.form-control{
  height: 40px;
  line-height: 24px;
  padding-right: 36px;
  -webkit-appearance: none;
  appearance: none;
}

/* Slightly nicer time input alignment on iOS */
#paceModal input[type="time"].form-control{
  -webkit-appearance: none;
  appearance: none;
}

.pace-done__msg{
  text-align: center;
  padding: 0px 0px 20px;
}

.pace-done__title{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.pace-done__text{
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

/* Allow 2–3 buttons (Review optional) without breaking on small widths */
.pace-actions.pace-actions--done{
  flex-wrap: wrap;
}

/* =========================================================
   PACE RESET CONFIRM — OVERLAY (RUNNING)
   ========================================================= */
#paceModal .pace-confirm{
  position: absolute;
  inset: 0;
  z-index: 50; /* above dial/buttons */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#paceModal .pace-confirm.hidden{
  display: none;
}

#paceModal .pace-confirm__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}

#paceModal .pace-confirm__card{
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
  background: rgba(30,30,30,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  text-align: center;
}

#paceModal .pace-confirm__title{
  margin: 0 0 12px;
  color: rgba(255,255,255,0.88);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

#paceModal .pace-confirm__msg{
  margin: 0 0 12px;
  color: rgba(255,255,255,0.88);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

#paceModal .pace-confirm__actions{
  display:flex;
  gap:10px;
  justify-content:center;
}

/* ---- End Round confirm (scorecard modal) ---- */
#scorecardModal .pace-confirm{
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#scorecardModal .pace-confirm.hidden{ display: none; }
#scorecardModal .pace-confirm__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}
#scorecardModal .pace-confirm__card{
  position: relative;
  z-index: 2;
  width: min(320px, 100%);
  background: rgba(30,30,30,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  text-align: center;
}
#scorecardModal .pace-confirm__title{
  margin: 0 0 8px;
  color: rgba(255,255,255,0.92);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}
#scorecardModal .pace-confirm__msg{
  margin: 0 0 16px;
  color: rgba(255,255,255,0.55);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
}
#scorecardModal .pace-confirm__actions{
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* =========================================================
   GPS NOTICE
   ========================================================= */

#gpsNotice{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#gpsNotice.hidden{
  display:none;
}

/* No dark backdrop */
#gpsNotice .pace-confirm__backdrop{
  display:none;
}

#gpsNotice .pace-confirm__card{
  width: min(340px, 92%);
  background: rgba(40,40,40,0.95);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  text-align: center;
}

#gpsNotice .pace-confirm__title{
  margin: 0 0 14px;
  color: rgba(255,255,255,0.9);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

#gpsNotice .pace-confirm__actions{
  display:flex;
  gap:10px;
  justify-content:center;
}

#gpsNotice .pace-confirm__actions .btn{
  background:#8CC63F;
  border:none;
  color:#0b1220;
  font-weight:700;
  padding:8px 18px;
  border-radius:8px;
}

#gpsNotice .pace-confirm__actions .btn:hover{
  background:#9fd94b;
}

#gpsNotice.is-locked .pace-confirm__actions{
  display:none !important;
}

#gpsNotice #gpsNoticeActionBtn:not([data-gps-action]){
  display:none !important;
}

/* =========================================================
   SVG DIAL (track + progress)
   ========================================================= */
.pace-dial-wrap{
  display:flex;
  justify-content:center;
  margin: 6px 0 14px;
}

.pace-dial-svg{
  position: relative;   /* needed for .pace-dial__inner absolute inset */
  display:flex;
  align-items:center;
  justify-content:center;

  /* IMPORTANT: remove any visual layer */
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pace-ring{
  width: 300px;
  height: 300px;
  display:block;
}

.pace-ring__track{
  fill: none;
  stroke: rgba(255,255,255,0.16);
  stroke-width: 5;
}

.pace-ring__progress{
  fill: none;
  stroke: rgba(124,214,60,0.95);
  stroke-width: 5;
  stroke-linecap: round;

  /* glow only on the green stroke */
  filter:
    drop-shadow(0 0 8px rgba(124,214,60,0.30))
    drop-shadow(0 0 16px rgba(124,214,60,0.18));
}

/* Center content (inner cutout) */
.pace-dial__inner{
  position:absolute;
  /*inset: 18px;*/
  border-radius: 999px;
  background: rgba(17,17,17,0.96);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap: 2px;
}

/* INSIDE THE TIMER */
.pace-dial__hole{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 80px;
  line-height: 0.8;
  text-transform: none;
}

.pace-dial__time{
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

/* Allocated time removed */
.pace-dial__meta{ display:none; }

/* Buttons */
.pace-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top: 6px;
}

/* Call row */
.pace-call-row{
  margin-top: 14px;
  display:flex;
  justify-content:center;
}

.pace-call-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,82,82,0.14);
  border: 1px solid rgba(255,82,82,0.45);
  color: rgba(255,255,255,0.95);
  text-decoration:none;
  font-weight: 800;
  text-transform: uppercase;
  font-family:"Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .3px;
}
.pace-call-btn:active{ transform: translateY(1px); }

.pace-stop-icon{
  width: 80px;
  height: 80px;
  display: block;
  opacity: 0.9;
}

/* =========================================================
   PACE SETUP UI — segmented 1ST/10TH + time icon
   (ADD ONLY)
   ========================================================= */

/* Hide the legacy select but keep it in DOM for JS/state */
#paceModal .pace-hidden-select{
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Segmented control container */
#paceModal .pace-field__control--seg{
  justify-content: center;
}

#paceModal .pace-seg{
  width: min(320px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  height: 40px;
}

/* Segmented buttons */
/* Segmented buttons (FIX centring) */
#paceModal .pace-seg__btn{
  appearance: none;
  border: 0;
  margin: 0;
  height: 40px;

  /* ✅ perfect centring */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;      /* no vertical padding */
  line-height: 1;

  background: transparent;
  color: rgba(255,255,255,0.88);
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

#paceModal .pace-seg__btn + .pace-seg__btn{
  border-left: 1px solid rgba(255,255,255,0.14);
}

#paceModal .pace-seg__btn:active{
  transform: translateY(1px);
}

/* Active segment = green fill (match your primary) */
#paceModal .pace-seg__btn.is-active{
  background: #8CC63F;
  color: rgba(0,0,0,0.88);
}

/* Time field wrapper + icon */
#paceModal .pace-timewrap{
  width: min(320px, 100%);
  position: relative;
}

#paceModal .pace-timeinput{
  width: 100%;
  padding-right: 44px; /* make room for icon */
}

#paceModal .pace-timeicon{
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.70);
  pointer-events: none;
}

/* 2) Remove Chrome's native time picker icon + any extra UI affordances */
#paceModal input[type="time"]{
  background-image: none !important;  /* kills any inherited bg icons */
}

/* Chrome / Safari (WebKit) */
#paceModal input[type="time"]::-webkit-calendar-picker-indicator{
  opacity: 0;                   /* hides native clock */
  display: none;                /* and removes its box */
  -webkit-appearance: none;
}
#paceModal input[type="time"]::-webkit-clear-button{
  display: none;
}
#paceModal input[type="time"]::-webkit-inner-spin-button{
  display: none;
}

/* If any icon/font library is injecting extra icons inside the wrapper, hide them.
   (Keeps ONLY your .pace-timeicon visible.) */
#paceModal .pace-timewrap i:not(.pace-timeicon),
#paceModal .pace-timewrap svg:not(.pace-timeicon){
  display: none !important;
}

/* Make sure the input has room for your single icon on the right */
#paceModal .pace-timeinput{
  padding-right: 44px !important;
}

#paceModal input[type="time"].form-control{
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px !important;
  background-image: none !important;
}

/* =========================================================
   14) (TEMP) Bootstrap remnants (won’t hurt; safe to keep for now)
   Remove later once you delete bootstrap modals entirely.
   ========================================================= */
.dark-modal .modal-content{
  background:#111; color:#fff; border:0; border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,0.6);
}
.dark-modal .modal-header{ border:0; }
.dark-modal .modal-title{ text-align:center; font-weight:900; }
.dark-modal label{ color:rgba(255,255,255,.75); font-weight:700; }
.dark-modal .form-control{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
}
.dark-modal .btn-primary{ background:var(--green); border:0; color:#111; font-weight:900; border-radius:12px; }
.dark-modal .btn-default{ background:rgba(255,255,255,.10); border:0; color:#fff; font-weight:900; border-radius:12px; }

.gcl-footer {
  display: flex;
  justify-content: center;
  padding: 12px 0 env(safe-area-inset-bottom);
  /*opacity: 0.6;*/
  pointer-events: none; /* important: never block interaction */
}

.gcl-footer img {
  max-width: 90%;
  height: auto;
}

/* Pace icon states (force override of btn-default/settings styles) */
#paceBtn i.fa{
  transition: color 0.25s ease;
}

#paceBtn.pacebtn-idle i.fa{
  color:#000 !important;
}

#paceBtn.pacebtn-running i.fa{
  color:#8CC63F !important;
}

/* =========================================================
   BUTTON NORMALISER (paste at VERY END of styles.css)
   ========================================================= */

:root{
  --gcl-btn-h: 44px;
  --gcl-btn-radius: 10px;
  --gcl-btn-pad-x: 16px;
  --gcl-btn-fs: 16px;
  --gcl-btn-ls: 0em;
}

/* Universal “action button” sizing */
button.btn:not(.settings):not(.gcl-close):not(.wind-close-x),
a.btn:not(.settings),
.gcl-btn,
.hole-arrows button,
.welcome-screen__btn,
.pace-call-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: var(--gcl-btn-h) !important;
  min-height: var(--gcl-btn-h) !important;

  padding: 0 var(--gcl-btn-pad-x) !important;
  border-radius: var(--gcl-btn-radius) !important;

  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 800 !important;
  font-size: var(--gcl-btn-fs) !important;
  letter-spacing: var(--gcl-btn-ls) !important;
  text-transform: uppercase !important;
  line-height: 1 !important;

  white-space: nowrap !important;
}

/* Explicit exclusions */
#paceModal .pace-seg__btn,
.course-marker{
  height: auto !important;
  min-height: 0 !important;
  padding: initial !important;
  border-radius: initial !important;
  font-size: initial !important;
  letter-spacing: initial !important;
  text-transform: none !important;
}

/* Modal footers */
.gcl-foot .gcl-btn,
.gcl-foot button.btn,
.gcl-foot a.btn,
.wind-foot .gcl-btn{
  /*min-width: 110px !important;*/
}

#bagModal .gcl-foot .gcl-btn{
  min-width: 96px !important;
}

.hole-arrows button{
  width: 100% !important;
}

button.btn:not(.settings):not(.gcl-close):not(.wind-close-x):active,
a.btn:not(.settings):active,
.gcl-btn:active,
.hole-arrows button:active,
.welcome-screen__btn:active,
.pace-call-btn:active{
  transform: translateY(1px);
}

/* =========================================================
   ICON-ONLY BUTTONS — RESTORE
   ========================================================= */

.topbar .btn.settings{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: auto !important;
  min-height: 0 !important;
  padding: 6px !important;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  font-size: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1 !important;
}

.topbar .btn.settings i{
  font-size: 30px !important;
  line-height: 1 !important;
  color: #000 !important;
}

#scorecardBtn svg{
  width: 26px !important;
  height: 26px !important;
  display: block;
  color: #000 !important;
}
#scorecardBtn.sc-active svg{
  color: var(--green) !important;
}

.gcl-close,
.wind-close-x{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: auto !important;
  min-height: 0 !important;
  padding: 0 6px !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;

  font-size: 26px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1 !important;
}

/* =========================================================
   QUICK START MODAL
   ========================================================= */
#quickStartModal .quickstart-sheet{
  max-width: 440px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - (24px + env(safe-area-inset-bottom, 0px)));
}

#quickStartModal .gcl-title{
  font-size: 22px;
  letter-spacing: .4px;
}

#quickStartModal .quickstart-body{
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#quickStartModal .quickstart-intro{
  margin: 0 0 16px;
  text-align: center;
  color: rgba(255,255,255,0.76);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

#quickStartModal .quickstart-list{
  display: grid;
  gap: 10px;
}

#quickStartModal .quickstart-step{
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}

#quickStartModal .quickstart-step__num{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #8CC63F;
  color: #111;
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

#quickStartModal .quickstart-step__content{
  min-width: 0;
}

#quickStartModal .quickstart-step__title{
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  color: rgba(255,255,255,0.94);
  margin-bottom: 4px;
}

#quickStartModal .quickstart-step__text{
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.76);
}

#quickStartModal .quickstart-foot{
  justify-content: center;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* =========================================================
   BUG REPORT MODAL
   ========================================================= */

#bugModal{
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#bugModal .gcl-sheet{
  max-width: 420px;
}

#bugModal .gcl-title{
  font-size: 22px;
  letter-spacing: .4px;
}

#bugModal .gcl-body{
  padding: 16px 16px 18px;
}

#bugModal .bug-intro{
  margin: 0 0 16px;
  text-align: center;
  color: rgba(255,255,255,0.76);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

#bugModal .form-group{
  margin: 0 0 14px;
}

#bugModal .gcl-body label{
  display: block;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.78);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Inputs / select / textarea aligned with your other modals */
#bugModal .form-control{
  width: 100%;
  box-sizing: border-box;
  display: block;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;

  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  padding: 12px 14px;
  height: 48px;
  border-radius: 12px;
  box-shadow: none;
}

#bugModal .form-control:focus{
  outline: none;
  border-color: rgba(140,198,63,0.75);
  box-shadow: 0 0 0 3px rgba(140,198,63,0.18);
}

/* Select */
#bugModal select.form-control{
  height: 48px;
  line-height: 24px;
  padding-right: 36px;
  -webkit-appearance: none;
  appearance: none;
}

/* Textarea */
#bugModal textarea.form-control{
  min-height: 120px;
  height: 120px;
  resize: vertical;
  line-height: 1.45;
  padding-top: 12px;
}

/* Email field placeholder */
#bugModal .form-control::placeholder{
  color: rgba(255,255,255,0.42);
}

/* Footer buttons centred like your other modals */
#bugModal .gcl-foot{
  justify-content: center;
  gap: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Status message */
#bugModal .bug-status{
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#bugModal .bug-status.is-loading{
  color: rgba(255,255,255,0.7);
}

#bugModal .bug-status.is-success{
  color: #8CC63F;
  font-weight: 600;
}

#bugModal .bug-status.is-error{
  color: #ff5252;
  font-weight: 600;
}

/* Make modal fit viewport and allow body scrolling */
#bugModal.gcl-modal{
  align-items: center;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

#bugModal .gcl-sheet{
  display: flex;
  flex-direction: column;
  min-height: 0;

  max-height: calc(100dvh - (24px + env(safe-area-inset-bottom, 0px)));
}

#bugModal .gcl-head,
#bugModal .gcl-foot{
  flex: 0 0 auto;
}

#bugModal .gcl-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px){
  #bugModal.gcl-modal{
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: stretch;
  }

  #bugModal .gcl-sheet{
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* =========================================================
   SCORE CAPTURE
   ========================================================= */

/* ---- Topbar indicator dot (active round) ---- */
#scorecardBtn.sc-active{
  color: var(--green);
}

/* ---- Score strip ---- */
.score-strip{
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 12px 10px;
  width: fit-content;
  min-width: 240px;
  max-width: 100%;
  margin: 8px auto;
}

.score-strip__players{
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: nowrap;
  justify-content: center;
}

.score-strip__player-tab{
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-strip__player-tab.is-active{
  background: var(--green);
  border-color: var(--green);
  color: #111;
}

.score-strip__controls{
  display: flex;
  align-items: center;
  gap: 0;
}

.score-strip__adj{
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Oswald", system-ui, sans-serif;
  transition: background .12s;
  flex-shrink: 0;
}
.score-strip__adj:active{ background: rgba(255,255,255,0.12); transform: scale(.95); }

.score-strip__display{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin: 0 6px;
  padding: 6px 0;
}

.score-strip__num{
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.score-strip__rel{
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  color: #111;
  display: inline-block;
}
.score-strip__rel:empty{ display: none; }
.score-strip__rel.sc-eagle  { background: #FFD700; }
.score-strip__rel.sc-birdie { background: var(--green); }
.score-strip__rel.sc-par    { background: rgba(255,255,255,0.18); color: var(--ink); }
.score-strip__rel.sc-bogey  { background: #FF9800; }
.score-strip__rel.sc-double { background: #F44336; color: #fff; }

.score-strip__open{
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid rgba(140,198,63,.5);
  background: rgba(140,198,63,0.08);
  color: var(--green);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s;
}
.score-strip__open:active{ background: rgba(140,198,63,0.2); }

/* ---- Round setup modal ---- */
.round-setup-sheet{
  max-width: 480px;
}

.round-setup-body{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.round-section__label{
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.round-section__label--format{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--ink);
  text-align: center;
}

.round-section__label--players{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.round-count-ctrl{
  display: flex;
  align-items: center;
  gap: 12px;
}

.round-count-btn{
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: "Oswald", system-ui, sans-serif;
}
.round-count-btn:active{ background: rgba(255,255,255,0.14); }

.round-count-num{
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--ink);
}

.round-format-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.round-format-pill{
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.round-format-pill.is-active{
  background: var(--green);
  border-color: var(--green);
  color: #111;
}

.round-player-rows{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.round-player-row{
  display: grid;
  grid-template-columns: 30px 1fr 80px 36px;
  gap: 10px;
  align-items: center;
}

.round-player-action{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s, border-color .12s;
}
.round-player-action--add{
  border-color: var(--green);
  color: var(--green);
}
.round-player-action--add:active{ background: rgba(140,198,63,0.15); }
.round-player-action--rem:active{ background: rgba(255,255,255,0.14); }

.round-player-badge{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #111;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.round-player-row__name{
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  padding: 8px 8px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}
.round-player-row__name:focus{
  border-color: var(--green);
}

.round-player-row__hcp{
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  padding: 8px 8px;
  width: 80px;
  box-sizing: border-box;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.round-player-row__hcp::placeholder{
  color: var(--muted);
}
.round-player-row__hcp:focus{
  border-color: var(--green);
}
.round-player-row__hcp::-webkit-outer-spin-button,
.round-player-row__hcp::-webkit-inner-spin-button{
  -webkit-appearance: none;
}

/* ---- Round setup footer ---- */
#roundSetupModal .gcl-foot{
  justify-content: center;
  gap: 16px;
}

/* ---- Danger button ---- */
.gcl-btn--danger{
  background: #c62828;
  color: #fff;
}
.gcl-btn--danger:hover{ background: #b71c1c; }

/* ---- Scorecard modal ---- */
.scorecard-sheet{
  max-width: 640px;
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
  position: relative;
}

.scorecard-body{
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.scorecard-meta{
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.scorecard-meta__course{
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: .3px;
}

.scorecard-meta__detail{
  font-size: 14px;
  color: var(--muted);
  font-family: "Oswald", system-ui, sans-serif;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.scorecard-meta__format{
  font-size: 20px;
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(140,198,63,0.1);
  padding: 3px 10px;
  border-radius: 999px;
}

.scorecard-table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.scorecard-table{
  width: 100%;
  border-collapse: collapse;
  font-family: "Oswald", system-ui, sans-serif;
}

.scorecard-table th{
  position: sticky;
  top: 0;
  background: #0b0f1a;
  z-index: 2;
  padding: 8px 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.scorecard-table th.sc-th-hole{ text-align: left; padding-left: 14px; }

.scorecard-table td{
  padding: 6px 6px;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--ink);
  min-width: 36px;
}
.scorecard-table td.sc-td-hole{
  text-align: left;
  padding-left: 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.scorecard-table td.sc-td-meta{
  font-size: 18px;
  color: var(--muted);
}

/* Subtotal / total rows */
.sc-row-subtotal td{
  background: rgba(255,255,255,0.04);
  font-weight: 700;
  font-size: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.sc-row-total td{
  background: rgba(140,198,63,0.07);
  font-weight: 700;
  font-size: 20px;
  border-top: 2px solid var(--green);
  color: var(--green);
}

/* Score cells */
.sc-cell{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sc-cell__gross{
  font-size: 20px;
  font-weight: 700;
  width: 34px; height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.sc-cell__sub{
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--muted);
}

/* Score colours */
.sc-eagle  .sc-cell__gross{ background: #FFD700; color: #111; border-radius: 50%; }
.sc-birdie .sc-cell__gross{ background: var(--green); color: #111; border-radius: 50%; }
.sc-par    .sc-cell__gross{ background: rgba(255,255,255,0.08); color: var(--ink); }
.sc-bogey  .sc-cell__gross{ border: 1px solid #FF9800; color: #FF9800; }
.sc-double .sc-cell__gross{ border: 1px solid #F44336; color: #F44336; }
.sc-empty  .sc-cell__gross{ background: transparent; color: var(--muted); font-size: 14px; }

/* Match play result tokens */
.sc-mp-won  { color: var(--green); font-weight:700; }
.sc-mp-lost { color: #F44336; font-weight:700; }
.sc-mp-half { color: var(--muted); }

/* Scorecard foot */
.scorecard-foot{
  border-top: 1px solid var(--line);
  padding-top: 12px;
  justify-content: center;
}

/* Responsive: full-height on mobile */
@media (max-width: 640px){
  .scorecard-sheet{
    max-height: 100dvh;
    border-radius: 0;
  }
  #scorecardModal.gcl-modal{
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: stretch;
  }
  .round-setup-sheet{
    border-radius: 16px 16px 0 0;
  }
}