/* Fairway rollout P6: Players, Player, Courses, Course, Settings.
   Moves into components.css when the fix/design-cleanup-m split lands.
   Every rule is scoped to body.p6 (set by route() for P6 routes only) so Home and Scoring don't change. */
body.p6 header.top{background:var(--fw-bg,#F6EEDA);color:var(--fw-ink,#16201A);border-bottom:1px solid var(--fw-line,#E2D7BF);box-shadow:none}
body.p6 header.top button{background:var(--fw-card,#FFFDF7);color:var(--fw-ink,#16201A);border:1px solid #8C8576}
body.p6 header.top h1{font-family:var(--fw-serif,Georgia,serif);font-weight:600;font-size:28px;color:var(--fw-ink,#16201A);letter-spacing:0}
body.p6 main h2{font-family:var(--fw-sans,system-ui,sans-serif);font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--fw-muted,#4C4A42)}
body.p6 main .card{background:var(--fw-card,#FFFDF7);border:1px solid var(--fw-line,#E2D7BF);border-radius:14px;box-shadow:none}
body.p6 main .list{background:var(--fw-card,#FFFDF7);border:1px solid var(--fw-line,#E2D7BF);border-radius:14px;box-shadow:none;overflow:hidden}
body.p6 main .list .item{min-height:56px;box-sizing:border-box;border:0;border-radius:0;box-shadow:none;margin:0;background:transparent;border-bottom:1px solid var(--fw-line,#E2D7BF)}
body.p6 main .list .item:last-child{border-bottom:0}
body.p6 main .list .item .muted,body.p6 main .list .item>:last-child{font-family:var(--fw-sans,system-ui,sans-serif);font-variant-numeric:tabular-nums}
body.p6 main :not(td)>input:not([type=checkbox]):not([type=radio]):not([type=file]),body.p6 main :not(td)>select{min-height:52px;box-sizing:border-box;font-size:max(17px,1em);background:var(--fw-card,#FFFDF7);border:1px solid #8C8576;border-radius:12px;color:var(--fw-ink,#16201A)}
body.p6 main input:focus-visible,body.p6 main select:focus-visible{outline:3px solid var(--fw-green,#1F3D2B);outline-offset:1px}
body.p6 main .btn{min-height:52px;box-sizing:border-box;border-radius:14px;background:var(--fw-card,#FFFDF7);border:1px solid #8C8576;color:var(--fw-ink,#16201A);box-shadow:none}
body.p6 main .btn.primary{background:var(--fw-green,#1F3D2B);border-color:var(--fw-green,#1F3D2B);color:#fff;width:100%;display:flex;align-items:center;justify-content:center}
body.p6 main .btn.small{min-height:44px}
body.sun.p6 main .card,body.sun.p6 main .list{border:3px solid #000}
body.sun.p6 main .list .item{border:0;border-bottom:3px solid #000}
body.sun.p6 main .list .item:last-child{border-bottom:0}
body.sun.p6 header.top{background:#fff;border-bottom:3px solid #000}
body.sun.p6 header.top button{border:3px solid #000;color:#000;background:#fff}
body.sun.p6 main :not(td)>input:not([type=checkbox]):not([type=radio]):not([type=file]),body.sun.p6 main :not(td)>select,body.sun.p6 main .btn{border:3px solid #000;background:#fff;color:#000}
body.sun.p6 main .btn.primary{background:#000;border-color:#000;color:#fff}
body.sun.p6 main h2,body.sun.p6 header.top h1{color:#000}
html:has(body.sun.p6){background:#fff}
body.p6 main .usga-foot{font-family:var(--fw-sans,system-ui,sans-serif);font-size:13px;color:var(--fw-muted,#4C4A42);text-align:center;margin:24px 0 8px}
/* Fairway P5: Card (full scorecard grid). Markup is built in scoring.js (owned), so CSS only, scoped to body.p5 (#/round/:id/card). */
body.p5 .card.scroll table.sc td,body.p5 .card.scroll table.sc th{overflow:visible;text-overflow:clip}
body.p5 .card.scroll table.sc td:first-child,body.p5 .card.scroll table.sc th:first-child{white-space:normal!important;overflow-wrap:break-word;min-width:72px;max-width:132px}
body.p5:not(.sun) .card table.sc th.cur,body.p5:not(.sun) .card table.sc td.cur{background:#EFE3BF}
body.p5 .card table.sc .tot,body.p5 .card table.sc th.tot{font-family:var(--fw-sans,system-ui,sans-serif);font-variant-numeric:tabular-nums;font-weight:700}
/* Fairway P4a: Finished round + Settle up (stakes ledger) on #/round/:id/card. Markup and money text come from
   scoring.js (owned), so CSS only: hairline card, sans tabular figures. Sign/colour of ledger amounts can't be set from CSS. */
body.p5 .card{border:1px solid var(--fw-line,#E2D7BF);border-radius:14px;box-shadow:none}
body.p5 .card>div,body.p5 .card>p{font-family:var(--fw-sans,system-ui,sans-serif);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;word-break:normal;min-width:0}
body.p5 .card hr{border:0;border-top:1px solid var(--fw-line,#E2D7BF)}
body.sun.p5 .card{border:3px solid #000}
/* Fairway P4b: History (player page #hist; the #/history screen itself is off, HISTORY_ENABLED=false). */
body.p6 #hist h3{font-family:var(--fw-sans,system-ui,sans-serif);font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--fw-muted,#4C4A42)}
body.p6 #hist .item{min-height:56px;box-sizing:border-box;background:var(--fw-card,#FFFDF7);border:0;border-bottom:1px solid var(--fw-line,#E2D7BF);border-radius:0;box-shadow:none;margin:0}
body.p6 #hist .card{background:var(--fw-card,#FFFDF7);border:1px solid var(--fw-line,#E2D7BF);border-radius:14px;box-shadow:none}
body.p6 #hist b,body.p6 #hist .fw-amt{font-family:var(--fw-sans,system-ui,sans-serif);font-variant-numeric:tabular-nums}
body.p6 #hist .fw-plus,body.p6 #hist .fw-zero{color:var(--fw-ink,#16201A)}
body.p6 #hist .fw-new.fw-plus{color:#17502F} /* #482, new rounds only (.fw-new): plus money in the settle-up green, as Home; black in sun (below) */
body.p6 #hist .fw-minus{color:#921A1A}
body.sun.p6 #hist .fw-plus,body.sun.p6 #hist .fw-zero{color:#000}
body.sun.p6 #hist .fw-minus{color:#921A1A}
/* P6 carry-over (Designer, 2026-10-28): never truncate names at 320. CSS only, no header.top layout change. */
body.p6 header.top h1{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;word-break:normal;hyphens:none;min-width:0}
body.p6 .item .grow{min-width:0;overflow-wrap:anywhere;word-break:normal;hyphens:none}
/* P6 gate fixes (Design review fairway-p6-3227a75): Fairway tokens on the page, danger red, empty lists, nits. */
body.p6 header.top h1{line-height:1.2}
/* Finished-round hero rule (finished-data.js:154): names over 20 chars step down to 22px. */
body.p6 header.top h1.long{font-size:22px;line-height:1.15;text-wrap:balance}
html:has(body.p6:not(.sun)),body.p6:not(.sun){background:var(--fw-bg,#F6EEDA);color:var(--fw-ink,#16201A)}
body.p6 main .btn,body.p6 header.top button{font-family:var(--fw-sans,system-ui,sans-serif)}
body.p6 main .btn.danger,body.sun.p6 main .btn.danger{color:#921A1A;border-color:#921A1A}
body.p6 main .list:empty,body.sun.p6 main .list:empty,body.p6 main .list:not(:has(*)),body.sun.p6 main .list:not(:has(*)){border:0;background:transparent}
body.p6 main input[type=search]::placeholder{font-size:15px}
@media (max-width:359px){body.p6 main input[type=search]::placeholder{font-size:14px}}
body.p6 main input[type=search]{text-overflow:clip}
body.p6 main label:has(>input[type=checkbox]){display:inline-flex!important;align-items:center;gap:10px;min-height:44px;box-sizing:border-box}
body.p6 main input[type=checkbox]{min-width:26px;min-height:26px}
body.p6 main :not(td)>input:disabled,body.p6 main :not(td)>select:disabled{opacity:1;color:#4C4A42;-webkit-text-fill-color:#4C4A42;background:var(--fw-card,#FFFDF7);border:1px solid #E2D7BF}
body.sun.p6 main :not(td)>input:disabled,body.sun.p6 main :not(td)>select:disabled{color:#000;-webkit-text-fill-color:#000;background:#fff;border:1.5px dashed #000}
/* P5 sun current column (Design review fairway-p5-49ffaa3): keep #EFE3BF fill, #000 text and lines, no gold bar / #FFE9A8. */
body.sun.p5 .card table.sc th.cur,body.sun.p5 .card table.sc td.cur{background:#EFE3BF;color:#000;box-shadow:inset 1px 0 0 #000,inset -1px 0 0 #000}
body.sun.p5 .card table.sc th.cur{box-shadow:inset 1px 0 0 #000,inset -1px 0 0 #000}
/* Double-digit scores: give score cells room so 10–12 clear the bogey/dbl box lines. */
body.p5 .card table.sc td.bogey,body.p5 .card table.sc td.birdie{min-width:34px;padding-left:4px;padding-right:4px}
/* Re-gate 154ea38: empty-state <p> inside .list gets no box; hole-number header tabular. */
body.p6 main .list:has(>p.muted:only-child),body.sun.p6 main .list:has(>p.muted:only-child){border:0;background:transparent}
body.p6 main .list>p.muted:only-child{margin:0;padding:8px 0}
body.p5 .card table.sc th{font-variant-numeric:tabular-nums}
/* r4 fast-follow: rating placeholders 15px; tee-name field never clips; read-only reason line. */
body.p6 main td>input::placeholder{font-size:15px}
body.p6 main table.holes td{min-width:0}
body.p6 main table.holes td>input{width:100%;min-width:0;box-sizing:border-box}
body.p6 main .grid2:has(>div>input[data-k$=".name"]){grid-template-columns:1fr}
body.p6 main .grid2>div:has(>input[data-k$=".name"]){min-width:9ch}
body.p6 main input[data-k$=".name"]{width:100%;min-width:0;box-sizing:border-box}
body.p6 main .ro-reason{font-family:var(--fw-sans,system-ui,sans-serif);font-size:15px;color:var(--fw-muted,#4C4A42);margin:6px 0 12px}
body.sun.p6 main .ro-reason{color:#000}
/* #371 read-only (demo) course: fields read as not editable (no fill, dashed edge, the sun look in normal mode too);
   the rating and hole tables are plain text. Editable course tables: 44px inputs. */
body.p6 main.course-ro input:disabled:not([type=checkbox]):not([type=radio]):not([type=file]),body.p6 main.course-ro select:disabled{background:transparent;border:1.5px dashed #B9AC8C;box-shadow:none;-webkit-appearance:none;appearance:none}
body.sun.p6 main.course-ro input:disabled:not([type=checkbox]):not([type=radio]):not([type=file]),body.sun.p6 main.course-ro select:disabled{background:transparent;border:1.5px dashed #000}
main.course-ro .ro-val{display:block;padding:8px 2px;font-size:16px;font-variant-numeric:tabular-nums;color:var(--fw-ink,#16201A)}
body.sun main.course-ro .ro-val{color:#000}
main table.holes td>input{min-height:44px}
/* FF-1 (Design review b3-bundle-59c474d): birdie/eagle rings stay circular on wrapped-name (tall) rows. The ring moves from the td's inset shadow (which follows the cell's shape) to a fixed 28px circle centred in the cell. Colours follow the existing sfw (normal) and clean.css (sun) marks. */
body.p5 .card table.sc td.birdie,body.p5 .card table.sc td.birdie.eagle{position:relative;border-radius:0;box-shadow:none;--ring:var(--fw-under,var(--red));--ring-gap:var(--fw-card,var(--card))}
body.p5.sun .card table.sc td.birdie,body.p5.sun .card table.sc td.birdie.eagle{--ring:#000;--ring-gap:#fff}
body.p5 .card table.sc td.birdie::before{content:'';position:absolute;left:50%;top:50%;width:28px;height:28px;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;box-shadow:inset 0 0 0 2px var(--ring);pointer-events:none}
body.p5 .card table.sc td.birdie.eagle::before{box-shadow:inset 0 0 0 2px var(--ring),inset 0 0 0 4px var(--ring-gap),inset 0 0 0 6px var(--ring)}
body.p5.sun .card table.sc td.birdie::before{box-shadow:inset 0 0 0 3px var(--ring)}
body.p5.sun .card table.sc td.birdie.eagle::before{box-shadow:inset 0 0 0 3px var(--ring),inset 0 0 0 5px var(--ring-gap),inset 0 0 0 7px var(--ring)}
/* B3.1: player history rows align — #hist items aren't in a .list, so they were block and the score/record dropped under the
   text. Same row as the lists: text grows, the right column (gross + to-par + money, or W–L–T) stays right and on one line. */
#hist .item{display:flex;align-items:center;gap:12px;padding:10px 12px}
#hist .item>div:last-child:not(.grow),#hist .item>b:last-child{flex:none;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
/* Paper epic: one shared cotton-paper token (the Scorecard's texture over its #FAF5E8 fallback) for the other round-result surfaces. */
:root{--cr-paper:#FAF5E8 url(/img/paper/cotton-laid.webp) 0 0/256px 256px repeat}
/* #373: the settle-up view (shown on #/round/:id/card, so the same body.p5.cotton / COTTON_PAPER switch as the Scorecard) puts its
   payment rows, not-final / not-settled lines and By bet card on that paper, for NEW rounds only (Ben "new rounds only", #182
   03:14Z): main.settle.nu is set when engine/rules.js newDisplay(round) is true, so a round finished before NEW_DISPLAY_FROM
   keeps exactly the look it always had. Ink, money colours (fw-plus / fw-minus) and buttons are unchanged. Contrast on the
   darkest texture pixel (L 0.832): ink #16201A 14.0:1, plus #17502F 7.9:1, minus #921A1A 7.4:1, muted #4C4A42 7.5:1.
   Sunlight keeps its plain white cards (:not(.sun)). Background only, nothing animates. */
body.p5.cotton:not(.sun) main.settle.nu .settle-list .item,body.p5.cotton:not(.sun) main.settle.nu .notice.info,body.p5.cotton:not(.sun) main.settle.nu .card{background:var(--cr-paper)}
/* #374: the hole recap banner (flag holeRecap; #holerecap lives outside #app on the scoring screen) on the same paper, its digits in the
   Scorecard's pencil face ("CR Pencil" covers 0-9 only, so letters stay in the sans). Position, size, shadow and the Next hole button
   are unchanged. Contrast on the darkest texture pixel: ink #16201A 14.0:1. Sunlight: plain card, digits #000 like the Scorecard.
   Static: no entrance animation or transition (scoring-screen rule). */
body:not(.sun) #holerecap .notice.info{background:var(--cr-paper)}
#holerecap .notice.info>div:first-child{font-family:"CR Pencil",var(--fw-sans,system-ui,sans-serif);font-variant-numeric:tabular-nums}
/* Task 81 (#118): cotton-paper scorecard, pencil-style score numbers. ON for everyone: every rule is scoped to body.p5.cotton,
   and only COTTON_PAPER (public/js/labs/cotton-paper.js, true) adds .cotton, on the Scorecard page only (app.js route()). Grid card only; names, totals and money keep their
   fonts and colours. Texture: public/img/paper/cotton-laid.webp (29 KB) over a plain #FAF5E8 fallback. Digits: Kalam (OFL,
   public/fonts/OFL-Kalam.txt), subset to 0-9 (3.5 KB); the unicode-range keeps PU / C / dots in the sans. Static, no motion.
   Sunlight drops the texture and grain (its own plain white sun look stays); digits switch to #000. Contrast: #4A4A48 on #FAF5E8 8.1:1. */
@font-face{font-family:"CR Pencil";src:url(/fonts/cardroom-pencil-digits.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap;unicode-range:U+30-39}
body.p5.cotton:not(.sun) .card.scroll{background:#FAF5E8 url(/img/paper/cotton-laid.webp) repeat;background-size:256px 256px}
body.p5.cotton:not(.sun) .card.scroll table.sc th,body.p5.cotton:not(.sun) .card.scroll table.sc td{background-color:transparent}
body.p5.cotton:not(.sun) .card.scroll table.sc td:first-child,body.p5.cotton:not(.sun) .card.scroll table.sc th:first-child{background:#FAF5E8 url(/img/paper/cotton-laid.webp) repeat;background-size:256px 256px}
body.p5.cotton:not(.sun) .card.scroll table.sc .tot{background-color:rgba(140,120,80,.07)}
body.p5.cotton:not(.sun) .card.scroll table.sc th.cur,body.p5.cotton:not(.sun) .card.scroll table.sc td.cur{background-color:#EFE3BF}
body.p5.cotton:not(.sun) .card.scroll table.sc .gt{background:var(--fw-green,#1F3D2B);color:#fff}
body.p5.cotton .card.scroll table.sc td[data-cell]{font-family:"CR Pencil",var(--fw-sans,system-ui,sans-serif);font-size:19px;font-weight:400;line-height:1.1;font-variant-numeric:tabular-nums;color:#4A4A48;text-shadow:0 0 .6px rgba(74,74,72,.45)}
body.p5.cotton .card.scroll table.sc td[data-cell] .cdot{font-family:var(--fw-sans,system-ui,sans-serif);text-shadow:none}
body.p5.cotton.sun .card.scroll table.sc td[data-cell]{color:#000;text-shadow:none}
/* #283 (Ben's ask): the same paper on the hole-by-hole scoring screen. Same COTTON_PAPER flag; the router puts body.cotton-s on
   #/round/:id only (cottonScoring() in labs/cotton-paper.js), so none of the Scorecard's .cotton rules above reach it and the
   Scorecard is unchanged. Texture and #FAF5E8 fallback on the page, the sticky hole bar (it must stay opaque over scrolled cards)
   and the player / team cards. The score buttons keep their own #FFFDF7 card fill and green selected state, so their text and
   size don't change. Contrast against the darkest texture pixel (L 0.832): ink 14.0:1, label #4E4B42 7.3:1, red 7.4:1, button border 3.1:1.
   Sunlight keeps its plain white look (:not(.sun)). Background only: no transition, no motion.
   Ben's "new rounds only" (#182 03:14Z): only on a new round's screen (newDisplay: scoring.js puts .nu on .holebar.one), as #557
   did for settle-up and Home; a round finished before NEW_DISPLAY_FROM keeps main's plain screen exactly. */
html:has(>body.sfw.cotton-s:not(.sun) .holebar.one.nu),body.sfw.cotton-s:not(.sun):has(.holebar.one.nu),body.sfw.cotton-s:not(.sun) .holebar.one.nu,body.sfw.cotton-s:not(.sun):has(.holebar.one.nu) main .prow,body.sfw.cotton-s:not(.sun):has(.holebar.one.nu) main .card{background:#FAF5E8 url(/img/paper/cotton-laid.webp) repeat;background-size:256px 256px}
