/* FourballHQ Group pages (club look), ported from the demo: dev/public/styles.css + themes.css, desk section.
   Tokens match design-ref/tour-01..08 and the /try/ sample desk. Loaded only on Group pages (src/clubpages.js);
   Free pages keep /free/assets/app.css. fg2: Onest (self-hosted) and the fb41 look come from club/wk.css, loaded after this file. */
:root { /* fg1: the light look (club-dev fb35+ themes.css tokens: mockup A board) */
  --bg: #fbfaf7; --paper: #ffffff; --ink: #1b1d22; --muted: #63656a; --line: #e6e2d8;
  --navy: #1d3557; --navy-press: #142742; --navy-soft: #e8edf4; --navy-ink: #c9d3e2;
  --in: #1f7a4d; --in-press: #17603c; --in-soft: #e5f2ea; --clump: #f1efe9; --clump-line: #e6e2d8; --gcard: #ffffff;
  --guest: #63656a; --warn: #a35700; --ok: #1f7a4d; --danger: #b42318; --danger-line: #efc4bf;
  --focus: #1d3557; --radius: 16px; --shadow: 0 1px 2px rgba(20, 20, 10, .05);
  --sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.35; min-height: 100dvh; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--in); }
.wrap { max-width: 440px; margin: 0 auto; padding: 16px 14px 96px; }
.wrap.wide { max-width: 1280px; }

/* Desk head */
.desk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; flex-wrap: wrap; }
.crest { width: 44px; height: 44px; border-radius: 50%; background: var(--in); display: grid; place-items: center; font-size: 22px; flex: none; }
.desk-head h1 { font-family: var(--serif); color: var(--in); font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere; }
.desk-head .thin { font-weight: 400; }
.desk-head-right { display: flex; gap: 14px; align-items: center; font-size: 14px; flex: none; }
.plan { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--in-soft); color: var(--in); border: 1px solid #6aa57a; }
.badge { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.closed { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sub { color: var(--muted); margin: 0 0 12px; font-size: 16px; }

/* Headcount */
.count { background: var(--paper); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.count .heads { font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.count .heads span { font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.need { margin-top: 8px; font-size: 16px; }
.need.short { color: var(--warn); font-weight: 600; }
.need.clean { color: var(--in); font-weight: 600; }

/* Columns */
.desk-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.desk-col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.col-title { font-size: 19px; margin: 0 0 10px; font-weight: 600; }
.desk-col h3 { margin: 22px 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.desk-col h3:first-of-type { margin-top: 8px; }
@media (min-width: 960px) {
  .desk-grid { grid-template-columns: minmax(340px, 5fr) 7fr; }
  .desk-pairs { position: sticky; top: 12px; }
  .pane-body { max-height: calc(100vh - 260px); overflow-y: auto; padding-right: 4px; }
}

/* Fields and buttons */
label.field, .field { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
input[type="text"], input[type="search"], input:not([type]) { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 17px; }
input::placeholder { color: #9a9a90; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; width: 100%; margin-top: 8px; background: transparent; line-height: 1.2; }
.btn-in { background: var(--in); color: #fff; }
.btn-in:active { background: var(--in-press); }
.btn-ghost { background: var(--paper); border-color: var(--line); font-weight: 500; color: var(--ink); }
.btn-ghost:active { background: #efe8d8; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger-ghost { background: var(--paper); color: var(--danger); border-color: var(--danger-line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.done, .btn.done:disabled { background: var(--in); color: #fff; opacity: 1; }
.btn.copied { outline: 2px solid var(--in); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2 .btn { margin-top: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg.four { grid-template-columns: repeat(4, 1fr); }
.seg .btn { margin: 0; }
.seg .btn[aria-checked="true"] { background: var(--in); color: #fff; border-color: var(--in); font-weight: 600; }
.addrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.addrow .btn { width: auto; margin: 0; min-width: 72px; }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.hint.pick { color: var(--in); font-weight: 600; }
.link-text { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; margin: 6px 0 0; }
.empty { padding: 12px; color: var(--muted); font-size: 14px; margin: 0; }
.alert { background: #fff6e3; border: 1px solid #efc56b; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: #6b4a00; margin: 8px 0; }
.alert p { margin: 0 0 8px; }
.okline { background: var(--in-soft); border: 1px solid #b9d3bf; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--in); font-weight: 600; margin: 8px 0; }
.msg:empty { display: none; }
.msg { font-size: 14px; margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--in-soft); color: var(--in); font-weight: 600; overflow-wrap: anywhere; }
.msg.error { background: #fdecec; color: #9b1c1c; }
.spin { display: inline-block; width: 1.1em; height: 1.1em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.2em; margin-right: .35em; animation: fhqspin .7s linear infinite; }
@keyframes fhqspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; border-right-color: currentColor; opacity: .6; } }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--in); text-decoration: underline; min-height: 44px; font-size: 14px; }
.copybox { width: 100%; font-size: 16px; margin: .4em 0; }

/* Lists: who's in, roster */
.ins { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.ins > li { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ins > li:last-child { border-bottom: 0; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; }
.prow .nm { flex: 1; min-width: 0; font-size: 17px; overflow-wrap: anywhere; }
.acts { display: flex; gap: 2px; align-items: center; flex: none; }
.tbtn { background: none; border: 0; color: var(--in); min-height: 44px; padding: 0 8px; font-size: 14px; font-weight: 600; }
.tbtn.del { color: var(--danger); }
.gline { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--guest); font-size: 15px; padding-left: 14px; }
.gtag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #ecebe4; color: var(--muted); margin-left: 4px; }
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.rgrid li { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px 6px 10px; display: flex; align-items: center; gap: 4px; min-width: 0; box-shadow: 0 1px 2px rgba(29,42,34,.04); }
.rgrid .nm { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #ecebe4; color: var(--muted); flex: none; }
.pill.in { background: var(--in); color: #fff; }
.rgrid li.editing { grid-column: 1 / -1; flex-wrap: wrap; padding: 8px; }
.rgrid li.editing input { flex: 1 1 40%; min-height: 44px; }
@media (max-width: 380px) { .rgrid { grid-template-columns: 1fr; } }

/* Pairing board */
.board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 8px; }
.pane h3 { margin-top: 0 !important; }
.clumps { display: flex; flex-direction: column; gap: 8px; }
.clump { display: block; width: 100%; text-align: left; background: var(--clump); border: 1px solid var(--clump-line); border-radius: 8px; padding: 10px 12px; min-height: 48px; font-size: 17px; }
.clump .g, .cart-seat .g { display: block; color: var(--guest); font-size: 14px; padding-left: 8px; margin-top: 2px; }
.clump.sel, .cart-seat.sel { border-color: var(--in); box-shadow: inset 0 0 0 2px var(--in); }
.gcard { background: var(--gcard); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.gcard.drop { border-style: dashed; border-color: var(--in); box-shadow: inset 0 0 0 1px var(--in); }
.gcard.full { opacity: .9; }
.gtitle { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.gtitle strong { color: var(--ink); letter-spacing: 0; text-transform: none; font-size: 16px; }
.gtitle .here { background: none; border: 1px solid var(--in); color: var(--in); border-radius: 999px; padding: 4px 10px; min-height: 32px; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.carts { display: flex; flex-direction: column; gap: 8px; }
.cart { background: var(--clump); border: 1px solid var(--clump-line); border-left: 4px solid var(--in); border-radius: 8px; padding: 6px 10px 8px; }
.cart-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.cart-seat { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 6px; padding: 6px 4px; min-height: 40px; font-size: 17px; color: var(--ink); }
.cart-seat.mate { padding-left: 20px; position: relative; }
.cart-seat.mate::before { content: "\21B3"; position: absolute; left: 3px; color: var(--muted); }
.cart-seat.is-guest { color: var(--guest); font-size: 15px; }
.seat-tag { font-size: 12px; color: var(--muted); }
.seat-open { display: block; padding: 4px 4px 0 20px; font-size: 13px; color: var(--muted); font-style: italic; }
.publine { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.publine.on { color: var(--in); font-weight: 600; }
@media (max-width: 600px) {
  .desk-head { flex-wrap: wrap; }
  .desk-head h1 { font-size: 22px; }
  .board { grid-template-columns: 1fr; }
}

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px); text-align: center; }
.toast:empty { display: none; }
.toast { pointer-events: none; }
/* Phones: the toast sits at the top so it never covers a seat on the board. */
@media (max-width: 600px) { .toast { top: calc(env(safe-area-inset-top, 0px) + 10px); bottom: auto; } }

/* Modal (Copy for the shop) */
.gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; background: rgba(20, 20, 18, .55); }
.gate-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: min(100%, 420px); max-height: 92dvh; overflow: auto; }
.gate-card h2 { margin: 0 0 4px; font-size: 20px; }
/* fg7 S1009 (L341): small x in the Copy for the shop pop-up's top-right corner (same rule as Club sk1c) */
#copyGate .gate-card { position: relative; }
#copyGate h2 { padding-right: 48px; }
#copyGate .copy-x { position: absolute; top: 8px; right: 8px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 24px; line-height: 1; border-radius: 999px; }
.copy-preview { white-space: pre-wrap; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 12px 0 0; }
body.modal-open { overflow: hidden; }

/* Footer */
.club-f { max-width: 1280px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 13px; text-align: center; }
.club-f a { color: var(--muted); }

/* Group start form */
.seg.three { grid-template-columns: repeat(3, 1fr); }
form.desk-col input[type="email"] { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 17px; }
.cf-turnstile { width: 100%; margin: 12px 0 0; display: flex; justify-content: center; }
.cf-turnstile iframe { max-width: 100%; }
button.waiting { opacity: .6; }
@media (max-width: 380px) { .seg.four { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- Group players' page (step 7), from the demo player: base/v2 index.html + themes.css ---------------- */
body.player-page { --hero-a: #a9cfa5; --hero-b: var(--bg); --hero-ink: #ffffff; --accent: #6aa57a; --out-ink: var(--muted); }
.player-page .hero { background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); padding: 22px 16px 8px; }
.player-page .hero-in { max-width: 560px; margin: 0 auto; }
.player-page .hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.player-page .crest { background: rgba(255, 255, 255, .55); }
.player-page .hero h1 { color: var(--hero-ink); font-family: var(--sans); font-weight: 700; font-size: 30px; line-height: 1.12; margin: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .14); overflow-wrap: anywhere; }
.player-page .club-sub { color: var(--ink); font-size: 14px; margin-top: 2px; }
.player-page .club-sub:empty { display: none; }
.player-page .hero-line { color: var(--ink); font-size: 17px; margin: 12px 0 6px; overflow-wrap: anywhere; }
.player-page .hero-line:empty { display: none; }
.player-page .hero .badge { flex: none; margin: 4px 0 0; font-size: 14px; letter-spacing: .02em; text-transform: none; font-weight: 600; padding: 6px 14px; background: var(--paper); color: var(--in); border-color: transparent; box-shadow: var(--shadow); }
.player-page .hero .badge::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #1f9d55; margin-left: 8px; vertical-align: 1px; }
.player-page .hero .badge.closed { background: var(--ink); color: var(--paper); }
.player-page .hero .badge.closed::after { background: #c0392b; }
.player-page .hero .count { background: transparent; box-shadow: none; padding: 4px 0 8px; margin: 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.player-page .hero .count .heads { font-size: 24px; }
.player-page .hero .need { margin: 0; font-size: 16px; }
.need.clean { color: var(--in); font-weight: 600; }
.player-page .wrap { max-width: 560px; padding-top: 8px; }
.player-page .closed-note { margin: 8px 0 12px; font-size: 15px; }
.me { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 8px 0 16px; }
.me h2 { font-size: 22px; margin: 0 0 4px; overflow-wrap: anywhere; }
.me p { margin: 0; }
.me-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--in-soft); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.me-status { font-size: 14px; color: var(--muted); }
.me-status.is-in { color: var(--in); font-weight: 600; }
.inout { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn-big { min-height: 64px; font-size: 22px; border-radius: 14px; }
.inout .btn-big { margin: 0; }
.inout .btn-in { background: var(--paper); color: var(--in); border: 2px solid var(--in); }
.inout .btn-out { background: var(--paper); color: var(--out-ink); border: 2px solid var(--line); }
.inout .btn-in.active { background: var(--in); color: #fff; }
.inout .btn-out.active { background: var(--muted); color: var(--paper); border-color: var(--muted); }
.inout .btn:disabled { opacity: 1; cursor: default; }
.inout .btn-in:disabled:not(.active) { opacity: .5; }
.me .btn-ghost { border: 1.5px solid var(--accent); color: var(--in); font-weight: 600; border-radius: 12px; }
.me input[type="text"] { border-radius: 10px; }
.guest-box { border-top: 1px solid var(--line); margin-top: 14px; }
.guest-box h3 { margin-top: 12px; }
.guest-list { margin: 0; padding: 0; list-style: none; }
.guest-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.guest-list .gname { min-width: 0; overflow-wrap: anywhere; }
.guest-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; }
.guest-row .btn { width: auto; margin: 0; min-width: 72px; }
@media (max-width: 380px) { .guest-row { grid-template-columns: 1fr 1fr; } .guest-row .btn { grid-column: 1 / -1; } }
.who h3 { display: flex; align-items: center; gap: 10px; }
.who h3::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.player-page .ins { background: transparent; border: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 520px) { .player-page .ins { grid-template-columns: 1fr 1fr; } }
.player-page .ins > li { background: var(--paper); border-radius: 10px; box-shadow: var(--shadow); border: 0; padding: 10px 14px; }
.player-page .ins > li.empty { grid-column: 1 / -1; }
.host { font-size: 17px; overflow-wrap: anywhere; }
.host::before { content: "● "; color: var(--accent); font-size: 12px; vertical-align: 2px; }
.host.you { font-weight: 700; }
.player-page .g { display: block; color: var(--guest); font-size: 15px; padding-left: 14px; margin-top: 2px; }
.player-page .gcard.mine { border-color: var(--in); box-shadow: inset 0 0 0 1px var(--in); }
.gnames { margin: 0; font-size: 16px; }
.player-page .cart-seat { cursor: default; min-height: 0; }
.player-page .linkbtn { padding: 8px 0; }


/* Group welcome screens (step 8) */
.welcome-page .desk-col { margin-bottom: 14px; }
.welcome-page .desk-col h3:first-child { margin-top: 0; }
.welcome-page .desk-col p { margin: 6px 0 0; font-size: 16px; }
.welcome-lead { font-size: 17px !important; margin: 0 !important; }
.welcome-help { text-align: center; margin: 4px 0 0; }
a.btn { text-decoration: none; }
.steps { margin: 6px 0 0; padding-left: 22px; font-size: 16px; }
.steps li { margin: 0 0 10px; padding-left: 2px; }
.steps li::marker { color: var(--in); font-weight: 700; }
.start-what { margin: 0 0 14px; }
.start-what ul { margin: 6px 0 0; padding-left: 20px; font-size: 15px; }
.start-what li { margin: 0 0 4px; }
#timeOtherWrap input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 17px; margin-top: 8px; }
/* Round 3: This week's game free text, Close sign-up pop-up, duplicate-start card. */
textarea { font: inherit; color: inherit; width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 17px; line-height: 1.4; resize: vertical; }
textarea::placeholder { color: #9a9a90; }
.count-note { text-align: right; margin-top: 4px; }
.gtime { font-weight: 600; }
.dup-note { margin-top: 12px; font-size: 16px; }
.dup-note p:last-child { margin-bottom: 0; }
.remembered { margin: 4px 0 12px; }
/* Copy for the shop: with No skins picked, Individual or Team and the skins buy-in stay visible but greyed out. */
.skins-more.is-off { opacity: .45; }
.skins-more.is-off .btn, .skins-more.is-off input { cursor: not-allowed; }
/* fg1: navy app bar on the desk (mockup A), roster import box */
.desk-head { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 12px 16px; border-bottom: 0; }
.desk-head h1 { color: #fff; font-weight: 700; }
.desk-head a, .desk-head .desk-head-right { color: var(--navy-ink); }
#importText { display: block; width: 100%; font: inherit; font-size: 15px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); margin: 6px 0; }
