
    /* ═══════════════════════════════════════════════════════════════════════
       EDIT v7.0.4 — ADD SCORE AS A PORTRAIT MODAL OVER THE HOLE PAGE
       Base redesign (v7.0.2/v7.0.3): six round golf-ball shot/lie buttons on a
       clean white surface, per the approved visual reference. The old
       .v3sc2-header, .v3sc2-shotrow*, and .v3chip* rules were removed outright
       in earlier passes (confirmed unused anywhere else in the app) rather
       than left in place as a dead/duplicate layer.
       v7.0.4 changes: (1) #screen-v3-scoring is no longer a full-page .screen
       shown via showScreen() (which hides screen-hole underneath it) — it is
       now a fixed, dimmed-backdrop overlay with a centered portrait modal
       card, the exact same pattern the app already uses for
       #hole-edit-overlay/#penalty-relief-popup/#edit-manage-popup, so
       screen-hole stays visible (dimmed) behind it — see
       js/add-score.js v3OpenScoringPage()/v3CloseScoringPage(). (2) The ball
       grid is now 2 columns x 3 rows (Frwy/Play, Grn/Bnkr, Rx/Hz) instead of
       3x2, with Strokes/Putts/Score stacked vertically beside it, each stat
       block row-aligned with its corresponding ball row. (3) Balls sized
       slightly larger than the prior 3-column layout. (4) The old horizontal
       Strokes/Putts/Score row and its .v3sc2-section-gap spacer are retired —
       superseded by this side-by-side layout, per the new reference.

       EDIT v7.0.5 — SPACING/SIZING PASS. (1) .v3sc2-modal-card height changed
       from a fixed height:100% (up to max-height:780px) — which forced the
       card to fill nearly all available vertical space regardless of how
       much content it actually held, leaving a large empty gap below the
       buttons — to height:auto, so the card now shrinks to fit its content
       and the overlay's existing align-items:center then centers the
       shorter card vertically in the viewport. A max-height safety cap
       remains so very long content still scrolls internally
       (.v3sc2-scroll) rather than overflowing the viewport. (2) Close
       control reverted from an X to the "‹" back chevron (app-wide back
       convention) — .v3sc2-close-btn renamed .v3sc2-back-btn. (3) More
       vertical space added below the header divider before the ball grid,
       and between the abbreviation legend and Undo/Save Hole. Ball sizing
       and the 2-column grid are unchanged.
       ═══════════════════════════════════════════════════════════════════════ */

    /* ── Overlay backdrop + modal card ── */
    .v3sc2-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 9200;
      background: rgba(10,18,32,0.55);
      align-items: center;
      justify-content: center;
      padding: 22px 14px;
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }
    .v3sc2-overlay.open { display: flex; }
    .v3sc2-modal-card {
      width: 100%;
      max-width: 400px;
      height: auto;
      max-height: calc(100vh - 44px);
      background: #ffffff;
      border-radius: 24px;
      box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 6px 18px rgba(0,0,0,0.28);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    /* ── Top area: back button, flag glyph, Hole/Par/Yards/Hcp — no dark bar ── */
    .v3sc2-top { width:100%; display:flex; align-items:center; gap:12px; padding:22px 20px 8px; flex-shrink:0; box-sizing:border-box; }
    /* v7.0.10 — use the app-standard small white golf-ball back control. */
    .v3sc2-back-btn { position:relative; width:44px; height:44px; flex-shrink:0; border:none; background:transparent; padding:0; display:flex; align-items:center; justify-content:center; cursor:pointer; -webkit-tap-highlight-color:transparent; overflow:visible; }
    .v3sc2-back-ball-img { width:40px; height:40px; display:block; object-fit:contain; pointer-events:none; filter:drop-shadow(0 3px 6px rgba(0,0,0,0.45)); }
    .v3sc2-back-ball-label { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:30px; font-weight:900; color:#10263f; pointer-events:none; text-shadow:0 1px 0 rgba(255,255,255,0.55); white-space:nowrap; line-height:1; }
    .v3sc2-back-btn:active { transform:scale(0.93); opacity:0.7; }
    .v3sc2-flag-icon { flex-shrink:0; display:flex; align-items:center; }
    .v3sc2-top-text { min-width:0; }
    .v3sc2-hole-title { font-family:'Playfair Display',serif; font-size:24px; font-weight:800; color:var(--green-deep); line-height:1.15; }
    .v3sc2-hole-info { font-size:13px; font-weight:700; color:#3a3a3c; margin-top:2px; white-space:nowrap; }
    .v3sc2-hole-info .v3hi-par { color:#2f6b46; }
    .v3sc2-hole-info .v3hi-sep { color:var(--gold); font-weight:800; }
    .v3sc2-hole-info .v3hi-val { color:var(--green-deep); }
    .v3sc2-topline { height:1.5px; background:rgba(28,28,30,0.14); margin:8px 20px 0; flex-shrink:0; }

    /* v7.5.48 — Tappable personal scoring-detail control atop the Solo Score screen
       (directive "Solo Score scoring-detail override" §4). */
    .v3sc2-scoring-mode-row { display:flex; align-items:center; gap:6px; padding:8px 20px 0; cursor:pointer; font-size:13px; font-weight:700; color:#3a3a3c; -webkit-tap-highlight-color:transparent; }
    .v3sc2-scoring-mode-label { opacity:0.65; font-weight:600; }
    .v3sc2-scoring-mode-val { font-weight:800; color:var(--green-deep); }
    .v3sc2-scoring-mode-chevron { margin-left:auto; opacity:0.45; }

    .v3sc2-scroll { width:100%; flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; padding-bottom:6px; box-sizing:border-box; }

    /* Legacy calculated-score text readout — kept functional (still computed/updated) but
       hidden — superseded visually by the big Score number in the stat stack. */
    .v3sc2-calc-row { display:none !important; }

    /* ── Main body: ball grid (left) + divider + Strokes/Putts/Score stack (right) ──
       v7.0.5 — top padding increased (was 14px) for noticeably more breathing room
       below the header divider before the first ball row. */
    .v3sc2-modal-body { display:flex; align-items:stretch; padding:34px 18px 4px; box-sizing:border-box; }

    /* Wraps the ball grid + divider together so both hide as one unit in Score Only
       mode (see .v3sc-detail-section below); flex-basis shared with the stat stack at
       roughly 65/35 so the balls stay the dominant visual element. */
    .v3sc2-ballside { display:flex; align-items:stretch; flex:13; min-width:0; }

    /* Six golf balls, 2 columns x 3 rows, actual yellow-ball.png asset, text-only label.
       grid-template-rows:1fr stretches every row to the same height (matched by
       align-items:stretch on the parent .v3sc2-modal-body), so each ball row lines up
       exactly with its corresponding Strokes/Putts/Score stat block; align-items:center
       keeps each (still perfectly square, via aspect-ratio) ball centered within its
       possibly-taller row cell. */
    .v3ball-grid { flex:1; display:grid; grid-template-columns:repeat(2,1fr); grid-template-rows:repeat(3,1fr); align-items:center; justify-items:center; gap:14px 16px; min-width:0; }
    /* v7.0.3 CORRECTION 2/3 (kept in v7.0.4) — real assets/balls/yellow-ball.png image
       (same asset/pattern used elsewhere in the app, e.g. .nsf-ball-pick-btn), not a
       CSS-simulated ball and not an SVG icon. The <img> fills the round button; the
       label span is the only overlay — no icon graphic of any kind.
       v7.0.4 — sized slightly larger than the prior 3-column layout via max-width. */
    .v3ball { position:relative; width:100%; max-width:118px; aspect-ratio:1/1; border-radius:50%; border:none; padding:0; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:transform 0.08s; filter:drop-shadow(0 4px 3px rgba(16,38,63,0.30)) drop-shadow(0 1px 1px rgba(16,38,63,0.24)); }
    .v3ball:active { transform:scale(0.95); }
    .v3ball-img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; pointer-events:none; border-radius:50%; image-rendering:auto; box-shadow:0 0 0 1px rgba(16,38,63,0.22); }
    .v3ball-selected {
      filter:drop-shadow(0 10px 16px rgba(27,77,46,0.4)) drop-shadow(0 3px 6px rgba(27,77,46,0.28));
    }
    .v3ball-selected .v3ball-img { box-shadow:0 0 0 4px #ffffff, 0 0 0 8px #1b4d2e; border-radius:50%; }
    .v3ball-face { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; }
    .v3ball-label { font-family:'DM Sans', sans-serif; font-size:16px; font-weight:900; letter-spacing:-0.01em; color:#10263f; -webkit-text-stroke:0; text-shadow:0 1px 0 rgba(255,255,255,0.95), 1px 0 0 rgba(255,255,255,0.9), -1px 0 0 rgba(255,255,255,0.9); }
    .v3ball-badge { position:absolute; top:-5px; left:-3px; min-width:26px; height:26px; padding:0 5px; border-radius:13px; background:var(--green-deep); color:#fff; font-size:12.5px; font-weight:800; display:flex; align-items:center; justify-content:center; border:2.5px solid #fff; box-shadow:0 2px 5px rgba(0,0,0,0.35); z-index:3; white-space:nowrap; }

    .v3sc2-modal-divider { width:1.5px; background:rgba(28,28,30,0.14); margin:2px 16px; flex-shrink:0; align-self:stretch; }

    /* Strokes / Putts / Score, stacked vertically; flex:1 on each block divides the
       stack's stretched height (matched to the ball grid's height via
       align-items:stretch on .v3sc2-modal-body) into three equal thirds, so each block
       lines up with its corresponding ball row. */
    .v3sc2-stat-stack { flex:7; display:flex; flex-direction:column; min-width:0; }
    .v3sc2-stat-block { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:0; }
    .v3sc2-stat-label { font-size:12px; font-weight:800; letter-spacing:0.02em; color:rgba(28,28,30,0.6); margin-bottom:2px; }
    .v3sc2-stat-label-score { color:rgba(28,28,30,0.55); }
    .v3sc2-stat-val { font-size:36px; font-weight:900; color:var(--green-deep); line-height:1; }
    .v3sc2-score-big { font-size:44px; font-weight:900; color:var(--gold); line-height:1; }

    /* v7.0.3 CORRECTION (kept in v7.0.4) — clean standalone +/- glyphs: no circle/round
       outline, no background fill or border. Real <button> elements with generous
       tap-friendly padding. */
    .v3sc2-stat-steppers { display:flex; align-items:center; justify-content:center; gap:4px; margin-top:2px; }
    .v3sc2-step-sep { width:1px; height:20px; background:rgba(28,28,30,0.18); }
    .v3sc2-step-btn { width:44px; height:44px; min-width:44px; min-height:44px; border-radius:0; border:none; background:transparent; box-shadow:none; color:var(--green-deep); font-size:30px; font-weight:900; line-height:1; padding:0; cursor:pointer; -webkit-tap-highlight-color:transparent; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
    .v3sc2-step-btn:active { transform:scale(0.88); }
    .v3sc2-step-btn-disabled { opacity:0.3; pointer-events:none; }

    /* ── Instruction line + abbreviation legend ── */
    .v3sc2-modal-body + .v3sc-detail-section { padding-top:24px; padding-bottom:8px; }
    .v3ball-instructions { text-align:center; font-size:13px; font-weight:600; color:#1c1c1e; padding:0 20px 2px; }
    .v3ball-instructions-icon { color:#2f6b46; margin-right:3px; }
    .v3ball-legend { padding:6px 20px 2px; }
    .v3ball-legend-row { display:flex; align-items:center; justify-content:space-between; font-size:11px; color:#555e6a; padding:3px 0; }
    .v3ball-legend-row b { color:var(--green-deep); font-weight:800; }

    /* ── Bottom controls: Undo + Save Hole, equal size ──
       v7.0.5 — margin-top increased (was 6px) for noticeably more breathing room
       between the abbreviation legend and these buttons; bottom padding trimmed
       slightly since the card no longer forces extra height below the buttons. */
    .v3sc2-bottom-row { display:flex; gap:12px; padding:10px 20px 16px; margin-top:0; }
    .v3sc2-undo-btn2, .v3sc2-enter-btn2 { flex:1; height:58px; border-radius:12px; font-size:18px; font-weight:900; letter-spacing:0.01em; cursor:pointer; -webkit-tap-highlight-color:transparent; display:flex; align-items:center; justify-content:center; }
    /* v7.5.57 — Undo contrast fix: the prior light gray-on-white-text combo
       (#b9c3cf/#aeb9c6 background with #fff text) fell well short of
       readable contrast, especially outdoors. Same size/shape/weight/position
       as before — only the surface is darkened to a deep slate so the white
       label and the ↶ glyph stay crisp at arm's length, matching the
       contrast standard the neighboring Enter/Save button already meets. */
    .v3sc2-undo-btn2 { background:linear-gradient(135deg,#4a5568,#333d4d); border:2px solid #2a323f; color:#ffffff; box-shadow:0 3px 9px rgba(20,26,36,0.35); }
    .v3sc2-undo-btn2:disabled { opacity:0.42; cursor:default; }
    .v3sc2-undo-btn2:active:not(:disabled), .v3sc2-enter-btn2:active { transform:scale(0.97); }
    .v3sc2-enter-btn2 { background:linear-gradient(135deg,var(--teal),#067a95); border:2px solid #05657b; color:#fff; box-shadow:0 3px 9px rgba(6,122,149,0.24); }


/* v7.0.11 — Hazard / Penalty / Relief popup: larger, clearly tappable options.
   Scoped here so other shared .emp-row popups keep their existing treatment. */
#penalty-relief-popup .emp-card {
  padding: 0 12px 14px;
}
#penalty-relief-popup .emp-title {
  font-size: 20px;
  padding: 18px 10px 14px;
  margin: 0 -12px 10px;
}
#penalty-relief-popup .emp-row {
  min-height: 54px;
  margin: 8px 0;
  padding: 13px 15px;
  border: 2px solid rgba(210,83,38,0.9);
  border-radius: 11px;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
#penalty-relief-popup .emp-row:last-child {
  border-bottom: 2px solid rgba(210,83,38,0.9);
}
#penalty-relief-popup .emp-row:active {
  background: rgba(210,83,38,0.24);
  transform: scale(0.98);
}
#penalty-relief-popup .v3pr-note {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.9;
}
