/* New round v3 restyle: display only. Every rule is scoped to main.nr3 (setup.js <main class="nr3">) or header.top:has(+main.nr3). No class/id renamed. */
header.top:has(+main.nr3){background:var(--fw-bg);color:var(--fw-ink);box-shadow:none}
header.top:has(+main.nr3) button{color:var(--fw-green);border:1.5px solid var(--fw-line-strong);background:var(--fw-card);min-height:44px}
header.top:has(+main.nr3) h1{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
main.nr3{background:var(--fw-bg);color:var(--fw-ink);padding:0 14px 0;font-family:var(--fw-sans)}
.nr3 .nr3-hero{text-align:center;padding:2px 0 14px}
.nr3 .nr3-flag{display:block;margin:0 auto 2px;width:28px;height:28px;color:var(--fw-gold)}
.nr3 .nr3-title{margin:0;font:600 34px/1.1 var(--fw-serif);color:var(--fw-green)}
.nr3 .nr3-sub{margin:6px 0 0;font:400 16px/1.35 var(--fw-sans);color:var(--fw-muted)}
/* sections: <details class="nr3-sec" open><summary> */
.nr3 .nr3-sec{background:var(--fw-card);border:1px solid var(--fw-line);border-radius:16px;margin:0 0 12px;padding:0 14px;box-shadow:var(--fw-sh-1)}
.nr3 .nr3-sec>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:64px;cursor:pointer}
.nr3 .nr3-sec>summary::-webkit-details-marker{display:none}
.nr3 .nr3-num{flex:none;width:36px;height:36px;border-radius:50%;background:#EFE3BF;color:var(--fw-ink);display:grid;place-items:center;font:700 14px var(--fw-sans);font-variant-numeric:tabular-nums}
.nr3 .nr3-sec>summary h2{margin:0;flex:1 1 auto;min-width:0;font:600 24px/1.15 var(--fw-serif);color:var(--fw-ink);text-transform:none;letter-spacing:0}
.nr3 .nr3-count{flex:none;padding:4px 10px;border-radius:999px;background:#E3EDE4;color:var(--fw-green);font:600 14px var(--fw-sans);font-variant-numeric:tabular-nums;white-space:nowrap}
.nr3 .nr3-car{flex:none;width:20px;height:20px;color:var(--fw-ink);transition:transform .15s}
.nr3 .nr3-sec[open]>summary .nr3-car{transform:rotate(180deg)}
.nr3 .nr3-body{padding:0 0 14px}
/* 01 course */
.nr3 #chosen{display:flex;align-items:center;gap:12px;border:1px solid var(--fw-line);border-radius:12px;padding:12px;background:var(--fw-card);margin:0}
.nr3 #chosen b{font:700 18px/1.25 var(--fw-sans);color:var(--fw-ink)}
.nr3 #chosen .muted{font-size:15px;color:var(--fw-muted)}
.nr3 #changeCourse{min-height:44px;border:0;box-shadow:none;background:transparent;color:var(--fw-green);font:700 16px var(--fw-sans);padding:8px 4px;text-decoration:underline;text-underline-offset:3px}
.nr3 .grid2{gap:12px;margin-top:12px}
.nr3 label{font:600 15px var(--fw-sans);color:var(--fw-muted);display:block;margin:0 0 4px}
.nr3 select,.nr3 input[type=date]{min-height:52px;font-size:17px;border:1.5px solid var(--fw-line-strong);border-radius:12px;background-color:var(--fw-card);color:var(--fw-ink);font-variant-numeric:tabular-nums}
.nr3 .nr3-sg{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:52px;margin:0;font:600 17px var(--fw-sans);color:var(--fw-ink)}
/* shotgun checkbox as a switch: same #shotgun input, appearance only */
.nr3 #shotgun{appearance:none;-webkit-appearance:none;flex:none;width:52px;height:32px;margin:6px 0;border-radius:999px;background:#fff;border:2px solid var(--fw-line-strong);position:relative;cursor:pointer}
.nr3 #shotgun::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:var(--fw-muted);transition:left .15s}
.nr3 #shotgun:checked{background:var(--fw-green);border-color:var(--fw-green)}
.nr3 #shotgun:checked::after{left:23px;background:#fff}
.nr3 #shotgun:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
/* 02 players */
.nr3 .nr3-list>.item{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:4px 12px;align-items:start;padding:12px 0;border:0;border-top:1px solid var(--fw-line);border-radius:0;background:none;box-shadow:none;margin:0}
.nr3 .nr3-list>.item:first-child{border-top:0}
.nr3 .nr3-av{width:40px;height:40px;border-radius:50%;background:#EFE3BF;color:var(--fw-ink);display:grid;place-items:center;font:700 14px var(--fw-sans);overflow:hidden}
.nr3 .item .grow{min-width:0;overflow-wrap:anywhere}
.nr3 .item .grow b{font:700 17px/1.3 var(--fw-sans)}
.nr3 .item .muted{font-size:15px;color:var(--fw-muted)}
.nr3 .teerow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:8px}
.nr3 .teerow select{flex:1 1 150px;min-width:0}
/* #288: the tee select spans the full player row (avatar column 40px + 12px gap on the left, the 44px ✕ column + 12px gap on the right), like the
   Holes/Date fields above it. Its outer size stays 100% of .teerow so the CH line always wraps under it. Same 52px height. */
.nr3 .teerow select{flex:0 0 calc(100% + 108px);width:calc(100% + 108px);margin:0 -56px 0 -52px}
.nr3 .chbox{font-variant-numeric:tabular-nums;color:var(--fw-ink)}.nr3 .chbox small{display:block;color:var(--fw-muted);font-size:14px}
.nr3 .btn.small{min-height:44px;min-width:44px;padding:8px 12px;font-size:16px}
.nr3 .btn.danger{color:var(--fw-minus);border-color:var(--fw-line-strong);background:var(--fw-card)}
.nr3 .nr3-saved{margin-top:10px;padding-top:6px;border-top:1px solid var(--fw-line)}
.nr3 .nr3-lab{font:600 14px var(--fw-sans);color:var(--fw-muted);margin:6px 0 2px}
.nr3 .chip{min-height:44px;font:600 16px var(--fw-sans);border:1px solid var(--fw-line-strong);background:var(--fw-card);color:var(--fw-ink)}
.nr3 .chip.on{background:var(--fw-green);color:#fff;border-color:var(--fw-green)}
.nr3 #guest{display:flex;width:100%;justify-content:flex-start;border-radius:12px;margin-top:10px;color:var(--fw-green);border-style:dashed}
/* 03 games */
.nr3 .nr3-games>.item{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--fw-line);border-radius:12px;background:var(--fw-card);margin:0 0 8px;box-shadow:none}
.nr3 .nr3-ic{flex:none;width:36px;height:36px;border-radius:50%;background:#EFE3BF;display:grid;place-items:center;color:var(--fw-ink)}
.nr3 [data-edit]{border:0;box-shadow:none;background:transparent;color:var(--fw-green);font-weight:700;gap:4px}
.nr3 .nr3-add{border:1.5px solid var(--fw-green);border-radius:12px;padding:0 12px;background:var(--fw-card)}
.nr3 .nr3-add>summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;font:700 17px var(--fw-sans);color:var(--fw-green);cursor:pointer}
.nr3 .nr3-add>summary::-webkit-details-marker{display:none}
.nr3 .nr3-add[open]>summary{border-bottom:1px solid var(--fw-line)}
.nr3 .nr3-add>div{padding:6px 0 10px}
.nr3 .nr3-cap{text-align:center;margin:10px 0 0;font-size:15px;color:var(--fw-muted)}
/* sticky summary bar: wraps the existing button#start */
.nr3 .nr3-bar{position:sticky;bottom:0;z-index:6;margin:16px -14px 0;display:flex;align-items:center;gap:12px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:var(--fw-card);border-top:1px solid var(--fw-line);box-shadow:0 -4px 14px rgba(40,32,10,.08)}
.nr3 .nr3-sum{flex:1 1 auto;min-width:0;font:600 15px/1.3 var(--fw-sans);color:var(--fw-ink);font-variant-numeric:tabular-nums}
.nr3 .nr3-bar button#start{flex:0 0 auto;width:auto;min-height:56px;margin:0;padding:0 22px;border:0;border-radius:14px;background:var(--fw-green);color:#fff;font:700 17px var(--fw-sans);box-shadow:var(--fw-sh-btn)}
.nr3 .nr3-bar button#start[aria-disabled=true],.nr3 .nr3-bar button#start:disabled{background:transparent;color:var(--fw-muted);border:1px solid var(--fw-line);box-shadow:none}
body.sun .nr3 .nr3-bar button#start{background:#000;color:#fff}
/* sun */
body.sun main.nr3,body.sun header.top:has(+main.nr3){background:#fff;color:#000}
body.sun .nr3 .nr3-sec,body.sun .nr3 #chosen,body.sun .nr3 .nr3-games>.item{background:#fff;border:2px solid #000;box-shadow:none}
body.sun .nr3 .nr3-num,body.sun .nr3 .nr3-av,body.sun .nr3 .nr3-ic{background:#fff;border:2px solid #000;color:#000}
body.sun .nr3 .nr3-count{background:#000;color:#fff}
body.sun .nr3 .nr3-title,body.sun .nr3 .nr3-sub,body.sun .nr3 label,body.sun .nr3 .muted,body.sun .nr3 .nr3-cap,body.sun .nr3 .nr3-sum,body.sun .nr3 .nr3-flag,body.sun .nr3 #changeCourse,body.sun .nr3 [data-edit],body.sun .nr3 .nr3-add>summary,body.sun .nr3 #guest,body.sun .nr3 .chbox small,body.sun header.top:has(+main.nr3) button{color:#000}
body.sun .nr3 select,body.sun .nr3 input[type=date],body.sun .nr3 .chip,body.sun .nr3 .nr3-add,body.sun .nr3 #guest,body.sun .nr3 .btn.danger{background:#fff;color:#000;border:2px solid #000}
body.sun .nr3 #shotgun{border-color:#000}body.sun .nr3 #shotgun::after{background:#000}
body.sun .nr3 .nr3-bar{background:#fff;border-top:2px solid #000;box-shadow:none}
.nr3 .grid2{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
body.sun .nr3 .nr3-list,body.sun .nr3 .nr3-games{border:0;background:none;box-shadow:none}
body.sun .nr3 .nr3-list>.item{border:0;border-top:2px solid #000;box-shadow:none;background:none}body.sun .nr3 .nr3-list>.item:first-child{border-top:0}
/* Builder · Live Round, 320 fix (not in the proto): with a long player list the game text was squeezed to ~60px beside Edit + ✕; under 360px the buttons drop to a second line */
/* #363: at 390/430 the text column was still ~110-150px beside Edit + ✕ (6 lines, one name per line), so the 320 rule now applies at every width:
   the text takes the full card width next to the trophy and Edit + ✕ sit on their own line, right-aligned (both stay 44px). */
.nr3 .nr3-games>.item{flex-wrap:wrap}.nr3 .nr3-games>.item>.grow{flex:1 1 calc(100% - 46px)}.nr3 .nr3-games>.item>[data-edit]{margin-left:auto}
/* Style pass v2 (Designer, reports/design/showcase/v2/STYLE-PASS.md), New round part: normal mode only, sun untouched.
   Token-free rules only. Held until Builder · Screens lands the shared tokens (--fw-radius-card, --fw-shadow-card,
   --fw-space-7, --fw-thumb, --fw-muted/--fw-label #4C4A42): the .nr3-sec card (border 0 / radius / shadow / #FFFDF7),
   .nr3-sec margin-bottom 28, the #chosen::before thumbnail and the muted-colour change. */
body:not(.sun) .nr3 .nr3-title{font-size:32px}
body:not(.sun) .nr3 .nr3-sec{padding:4px 20px 8px}
body:not(.sun) .nr3 #chosen{border:0;background:#F8F2E4;border-radius:14px;padding:12px}
body:not(.sun) .nr3 .nr3-list>.item{border-top:0;padding:14px 0}
body:not(.sun) .nr3 .nr3-games>.item{border:0;background:#F8F2E4}
body:not(.sun) .nr3 .grid2{gap:10px}
body:not(.sun) .nr3 input[type=date]{padding-left:10px;padding-right:8px;min-width:0}
/* Designer rulings r2 (New round only). Notes: informational = plain line with an info icon, no box;
   actionable warnings (#nines-warn, #missing-box) = pale gold box. Sun: warnings #fff + 1px #000, notes #000. */
main.nr3 .notice.nr3-note{display:flex;align-items:flex-start;gap:8px;margin:10px 0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#4C4A42;font:400 15px/1.4 var(--fw-sans)}
main.nr3 .notice.nr3-note>.nr3-info{flex:none;width:18px;height:18px;margin-top:1px}
main.nr3 .notice#nines-warn,main.nr3 .notice#missing-box{margin:10px 0;padding:12px 14px;border:0;border-radius:12px;background:#EFE3BF;box-shadow:none;color:var(--fw-ink);font:400 15px/1.4 var(--fw-sans)}
main.nr3 .notice#nines-warn b,main.nr3 .notice#missing-box b{font-weight:700}
body.sun main.nr3 .notice.nr3-note{background:none;border:0;color:#000}
body.sun main.nr3 .notice#nines-warn,body.sun main.nr3 .notice#missing-box{background:#fff;border:1px solid #000;color:#000}
/* count chip tightened so "Players & tees" fits on one line at 390 (tap area is the 64px summary, unchanged) */
main.nr3 .nr3-sec>summary .nr3-count{font-size:13px;padding:4px 10px}
main.nr3 .nr3-sec>summary .nr3-car{width:20px;height:20px}
/* Designer · 2 r2 (sun): selected chips go black (.nr3 .chip.on outranked the sun chip rule); a disabled Start is an
   outline, not the live black fill (the sun Start rule outranked the disabled rule) */
body.sun .nr3 .chip.on{background:#000;color:#fff;border-color:#000}
body.sun .nr3 .nr3-bar button#start:disabled,body.sun .nr3 .nr3-bar button#start[aria-disabled=true]{background:#fff;color:#000;border:2px solid #000;box-shadow:none}
/* r2 parked item 1: the "Fill in missing tees" link (app.css .notice a: inline-block, padding 12/4, margin -12) rode up over the bold lead. Own line, 44px, no negative margin. */
main.nr3 .notice#missing-box a{display:flex;width:fit-content;align-items:center;min-height:44px;margin:8px 0 0}
/* r2 parked item 2: disabled-Start hint (Designer spec): 15px muted, centred under Start, #000 in sun. Grid only while a hint shows. */
.nr3 .nr3-bar:has(.nr3-hint){display:grid;grid-template-columns:minmax(0,1fr) auto;row-gap:4px}
.nr3 .nr3-bar .nr3-hint{grid-column:2;margin:0;text-align:center;font:400 15px/1.3 var(--fw-sans);color:var(--fw-muted)}
body.sun .nr3 .nr3-bar .nr3-hint{color:#000}
.nr3 .nr3-bar .nr3-hint.nr3-hint-wide{grid-column:1/-1} /* #465: the longer "game lists a missing player" reason spans the bar */
/* Fairway look (Boss, ben-ref-profile-v2.jpg): the chosen course is a deep-green card with a gold rim, ivory serif name, gold Change. Normal mode only; sun untouched. */
body:not(.sun) .nr3 #chosen{background:#1F3D2B;border:2px solid #C9A24B;box-shadow:inset 0 0 0 1px rgba(201,162,75,.35),var(--fw-sh-1);padding:14px}
body:not(.sun) .nr3 #chosen b{font:600 22px/1.2 var(--fw-serif);color:#FBF6EA}
body:not(.sun) .nr3 #chosen .muted{color:#E6DCC4}
body:not(.sun) .nr3 #chosen .tag.demo{background:transparent;color:#F1DDA4;box-shadow:inset 0 0 0 1px #C9A24B}
body:not(.sun) .nr3 #changeCourse{color:#F1DDA4}
/* #430: focused selects / date / course search used app.css's 35%-alpha green ring (~1.6:1). Solid --focus-ring (forest #1F3D2B), black in sun
   (set here too, so this does not wait on #352's body.sun --focus-ring). The Shotgun switch keeps its own :focus-visible ring. */
main.nr3 select:focus,main.nr3 input[type=date]:focus,main.nr3 input[type=search]:focus{outline:3px solid var(--focus-ring);outline-offset:2px}
body.sun main.nr3 select:focus,body.sun main.nr3 input[type=date]:focus,body.sun main.nr3 input[type=search]:focus{outline-color:#000}
/* Task 29 (#64) "Same as last time" button, flag off by default (Designer review on #319, fix 2): muted, regular-weight second line */
.nr3 .nr3-same{flex-direction:column;align-items:center;gap:2px;text-decoration:none;margin-bottom:12px}
.nr3 .nr3-same small{font-size:15px;font-weight:400;color:var(--fw-muted,#4C4A42)}
body.sun .nr3 .nr3-same small{color:#000}

/* #573 item 4: a long game name ends in an ellipsis on the New round row (full name in its title); the row never scrolls sideways */
.nr3 .nr3-games>.item>.grow{min-width:0}.nr3 .nr3-games .nr3-gname{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* #681 (Designer's spec on the issue): Saved players and Games are inline comboboxes. Closed: a 52px field like the tee
   select (card, 1px input border, radius 12, search icon, chevron, 17px text). Open: the list sits under the field and pushes
   the page down (no popover), at most min(264px, 40dvh) tall; rows at least 48px with hairline dividers; the keyboard row is
   #EFE3BF; Done (44px) bottom right. The sticky Start bar hides while a list or the keyboard is open (main[data-kb]), and the
   page gets room below so the field can scroll to the top, above the keyboard. Sun: white, black 2px borders, black outline row. */
.nr3 .nr3-cb{margin-top:8px}
.nr3 .nr3-field{position:relative;display:flex;align-items:center}
.nr3 .nr3-field input{box-sizing:border-box;width:100%;min-height:52px;margin:0;padding:0 88px 0 44px;font:400 17px/1.2 var(--fw-sans);color:var(--fw-ink);background:var(--fw-card);border:1px solid var(--fw-line-strong);border-radius:12px;box-shadow:none;-webkit-appearance:none;appearance:none}
.nr3 .nr3-field input::placeholder{color:var(--fw-muted);opacity:1}
.nr3 .nr3-field input:focus{outline:2px solid var(--fw-green);outline-offset:2px}
.nr3 .nr3-field .nr3-srch{position:absolute;left:14px;top:50%;width:20px;height:20px;margin-top:-10px;color:var(--fw-muted);pointer-events:none}
.nr3 .nr3-field .nr3-car{position:absolute;right:14px;top:50%;width:20px;height:20px;margin-top:-10px;color:var(--fw-ink);pointer-events:none;transition:transform .15s}
.nr3 .nr3-field input[aria-expanded=true]~.nr3-car{transform:rotate(180deg)}
.nr3 .nr3-clear{position:absolute;right:38px;top:50%;width:44px;height:44px;min-height:44px;min-width:44px;margin:-22px 0 0;padding:0;display:grid;place-items:center;border:0;border-radius:10px;background:none;box-shadow:none;color:var(--fw-ink)}
.nr3 .nr3-clear[hidden],.nr3 .nr3-pop[hidden],.nr3 .nr3-opt[hidden],.nr3 .nr3-pop [role=group][hidden]{display:none}
.nr3 .nr3-pop{margin-top:6px;border:1px solid var(--fw-line);border-radius:12px;background:var(--fw-card);overflow:hidden}
.nr3 .nr3-pop [role=listbox]{position:relative;max-height:264px;max-height:min(264px,40dvh);overflow-y:auto;overscroll-behavior:contain}
.nr3 .nr3-opt,.nr3 .nr3-empty{box-sizing:border-box;display:flex;align-items:center;gap:12px;min-height:48px;margin:0;padding:10px 14px;border-bottom:1px solid var(--fw-line);font:400 17px/1.3 var(--fw-sans);color:var(--fw-ink);cursor:pointer;-webkit-tap-highlight-color:transparent}
.nr3 .nr3-opt .nr3-on{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.nr3 .nr3-opt .nr3-rule{flex:none;max-width:45%;text-align:right;font-size:15px;color:var(--fw-muted)}
.nr3 .nr3-opt.nr3-act{background:#EFE3BF}
.nr3 .nr3-empty{font-size:15px;color:var(--fw-muted);cursor:default}
.nr3 .nr3-ck{flex:none;box-sizing:border-box;width:24px;height:24px;border-radius:50%;border:1.5px solid var(--fw-line-strong);display:grid;place-items:center;color:#fff}
.nr3 .nr3-opt.on .nr3-ck{background:var(--fw-green);border-color:var(--fw-green)}
.nr3 .nr3-pop .nr3-lab{margin:0;padding:12px 14px 4px;border-bottom:1px solid var(--fw-line)}
.nr3 .nr3-done-row{display:flex;justify-content:flex-end}
.nr3 .nr3-done{min-height:44px;min-width:44px;margin:0;padding:0 16px;border:0;background:none;box-shadow:none;color:var(--fw-green);font:700 17px var(--fw-sans)}
.nr3 .nr3-help{margin:6px 0 0;font:400 15px/1.3 var(--fw-sans);color:var(--fw-muted)}
main.nr3[data-kb] .nr3-bar{display:none}
main.nr3[data-kb]{padding-bottom:45vh}
@media (hover:hover){.nr3 .nr3-opt:hover{background:#F8F2E4}.nr3 .nr3-opt.nr3-act:hover{background:#EFE3BF}body.sun .nr3 .nr3-opt:hover{background:#fff;outline:3px solid #000;outline-offset:-3px}}
body.sun .nr3 .nr3-field input,body.sun .nr3 .nr3-pop{background:#fff;color:#000;border:2px solid #000}
body.sun .nr3 .nr3-field input::placeholder,body.sun .nr3 .nr3-srch,body.sun .nr3 .nr3-clear,body.sun .nr3 .nr3-opt .nr3-rule,body.sun .nr3 .nr3-empty,body.sun .nr3 .nr3-done,body.sun .nr3 .nr3-help{color:#000}
body.sun .nr3 .nr3-field input:focus{outline:3px solid #000}
body.sun .nr3 .nr3-opt,body.sun .nr3 .nr3-empty,body.sun .nr3 .nr3-pop .nr3-lab{border-bottom-color:#000}
body.sun .nr3 .nr3-opt.nr3-act{background:#fff;outline:3px solid #000;outline-offset:-3px}
body.sun .nr3 .nr3-ck{border:2px solid #000}
body.sun .nr3 .nr3-opt.on .nr3-ck{background:#000;border-color:#000}
