/* Clearance. Brand colour comes from /brand.css (--accent, --accent-ink). */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --ink: #0F1A14; --muted: #56645B; --line: #DCE2DC; --soft: #E9EDE8; --ground: #F8F9F7; --card: #FFFFFF;
  --dark: #0F1A14; --dark-2: #1D2B23; --on-dark: #E6ECE7; --on-dark-muted: #B9C4BC;
  --link: #1B5E3F; --link-hover: #0F3D28;
  --ok-bg: #DDEFE4; --ok-ink: #14532D; --warn-bg: #FFF0D6; --warn-ink: #7A3E06;
  --bad-bg: #FBE2DF; --bad-ink: #8B1C13; --info-bg: #DCEBFA; --info-ink: #0B3D6E;
  --radius: 10px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --accent: #3CAC7A; --accent-ink: #0F1A14;
}
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid #2F6FDB; outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .45em; letter-spacing: .01em; }
h1 { font-size: clamp(34px, 6vw, 48px); }
h2 { font-size: 24px; }
h3 { font-size: 18px; margin-top: 1em; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.pre { white-space: pre-line; }
.lead { font-size: 18px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.eyebrow a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 6px; }
.plain { list-style: none; margin: 0; padding: 0; }
.js .js-hide { display: none; }

/* ---------- top bar */
.topbar { background: var(--dark); color: var(--on-dark); }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.brand { color: inherit; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { height: 28px; width: auto; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .1em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { color: var(--on-dark-muted); text-decoration: none; padding: 12px 12px; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; border-bottom-color: var(--accent); }
.signout { margin: 0; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.topbar .linkbtn { color: var(--on-dark-muted); font-size: 14px; }
.banner { padding: 10px 24px; font-size: 14px; text-align: center; }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
.flash { max-width: 1320px; margin: 16px auto 0; padding: 12px 16px; border-radius: var(--radius); font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }
.flash.bad { background: var(--bad-bg); color: var(--bad-ink); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 24px 24px 48px; }
.wrap > .flash, main > .flash { margin: 0 0 16px; }
.foot { max-width: 1320px; margin: 0 auto; padding: 0 24px 32px; color: var(--muted); font-size: 13px; }

/* ---------- layout */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin-bottom: .15em; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
section.card.col-main { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card.locked { border-color: #F0C98E; background: #FFFBF3; }
.card.dark { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.card.dark h2 { color: #fff; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 32px 20px 56px; display: flex; flex-direction: column; gap: 18px; }
.narrow > h1, .narrow > p { margin-bottom: 0; }
.auth { max-width: 460px; padding-top: 10vh; }
.msg { margin-top: 24px; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 8px; border: 1px solid #B7C1B9; background: #fff; color: var(--ink); font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--bad-ink); border-color: #E3B4AE; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.btn-row form { margin: 0; }

/* ---------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: 12.5px; line-height: 1.4; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 500; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.info { background: var(--info-bg); color: var(--info-ink); }
.chip.on-dark { background: var(--dark-2); color: var(--on-dark); border: 1px solid #3C4E43; }
.pos { font-family: var(--display); font-weight: 700; font-size: 16px; background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 8px; height: fit-content; }
.pos.big { font-size: 20px; background: var(--accent); color: var(--accent-ink); padding: 3px 12px; }

/* ---------- forms */
fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
fieldset[disabled] { opacity: .75; }
legend { font-family: var(--display); font-weight: 700; font-size: 22px; padding: 0; margin-bottom: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 14px; }
input, select, textarea { font: 16px/1.4 var(--body); color: var(--ink); background: #fff; border: 1px solid #A9B4AC; border-radius: 8px; padding: 10px 12px; width: 100%; min-height: 44px; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--link); }
.card.dark input, .card.dark textarea { border-color: #3C4E43; }
.card.dark label { color: var(--on-dark); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 10px 0; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.errors { background: var(--bad-bg); color: var(--bad-ink); border-radius: var(--radius); padding: 12px 16px 12px 34px; margin: 0 0 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card fieldset + fieldset { border-top: 1px solid var(--soft); padding-top: 18px; }
#board-search { width: 260px; max-width: 100%; }
.stage-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.stage-form select { width: auto; min-width: 170px; }
details.sub { margin-top: 14px; border-top: 1px solid var(--soft); padding-top: 12px; }
details > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--link); }
details[open] > summary { margin-bottom: 10px; }
form.sub { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.danger-zone { border-color: #E3B4AE; }
.danger-zone > summary { color: var(--bad-ink); }

/* ---------- stats and feed */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
a.stat:hover { border-color: var(--ink); color: var(--ink); }
.stat-n { font-size: 30px; font-weight: 500; line-height: 1.1; }
.stat-l { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat.warn { background: var(--warn-bg); border-color: #F0C98E; }
.stat.warn .stat-l, .stat.warn .stat-n { color: var(--warn-ink); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); }
.feed li:first-child { border-top: 0; }
.feed li p { margin: 0; }
.feed-dot { flex: 0 0 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: #B7C1B9; }
.feed-view .feed-dot, .feed-video .feed-dot { background: var(--link); }
.feed-request .feed-dot { background: #D97706; }
.feed-request p:first-child { font-weight: 600; }
.feed-consent .feed-dot { background: #16A34A; }
.feed-withdrawn .feed-dot, .feed-declined .feed-dot, .feed-blocked .feed-dot { background: #B42318; }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; flex-direction: column; padding: 10px 0 10px 12px; border-left: 3px solid var(--line); margin-bottom: 6px; }
.attn li.warn { border-left-color: #D97706; }
.attn li.info { border-left-color: #2F6FDB; }

/* ---------- board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.col { background: var(--soft); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; min-height: 120px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px; }
.col-head h2 { font-family: var(--body); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.col-empty { padding: 4px 6px; margin: 0; }
.pcard { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.pcard:hover { border-color: var(--ink); color: var(--ink); }
.pcard-top { display: flex; justify-content: space-between; gap: 8px; }
.pname { font-weight: 600; }
.pmeta { color: var(--muted); }
.pfoot { border-top: 1px solid var(--soft); padding-top: 8px; }

/* ---------- player page */
.facts { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px 8px 0; border-top: 1px solid var(--soft); vertical-align: top; }
.tbl thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.hist { padding-left: 18px; margin: 0; }
.hist li { margin-bottom: 4px; }
.team li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--soft); }
.team li:first-child { border-top: 0; }
.team form { margin: 0; }

/* ---------- share items */
.share { border-top: 1px solid var(--soft); padding: 16px 0; }
.share:first-of-type { border-top: 0; }
.card-head + .share { border-top: 0; }
.share-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.share-club { font-size: 17px; }
.share-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px; font-size: 15px; }
.share-stats .hot { color: #B45309; font-weight: 600; }
.share-meta { margin: 0 0 8px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.share-actions form { margin: 0; }
.share.s-expired, .share.s-revoked { opacity: .78; }
.note { padding: 8px 12px; border-radius: 8px; background: var(--soft); margin: 8px 0; }
.note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.note.ok { background: var(--ok-bg); color: var(--ok-ink); }
.note.notice { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.note.notice form { margin: 0; }
.req { background: #FFF7EB; border: 1px solid #F3D19C; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.req p { margin: 0 0 4px; }

/* ---------- scouting workflow */
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 18px; }
.steps a { font-size: 13px; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.steps a:hover { border-color: var(--ink); }
.logitem { border-top: 1px solid var(--soft); padding: 12px 0; }
.card-head + .logitem, h2 + .logitem { border-top: 0; padding-top: 4px; }
.logitem p { margin: 0 0 4px; }
.strong { font-weight: 600; }
.warn-text { color: var(--warn-ink); font-weight: 500; }
.games { margin: 0; }
.game { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--soft); }
.game:first-child { border-top: 0; }
.game-when { display: flex; flex-direction: column; }
.game-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.game-actions form { margin: 0; }
.game.past { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.scout-form select { width: auto; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.scout-form select.unassigned { border-color: #D97706; background: var(--warn-bg); color: var(--warn-ink); }
.pos.sm { font-size: 13px; padding: 1px 6px; }
.mini-games li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--soft); }
.mini-games li:first-child { border-top: 0; }
.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.score { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; }
.score-v { font-size: 22px; }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--link); width: 0; }
.bar-1 { width: 20%; } .bar-2 { width: 40%; } .bar-3 { width: 60%; } .bar-4 { width: 80%; } .bar-5 { width: 100%; }
fieldset.inline { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; margin: 0; }
fieldset.inline .check { margin: 4px 0; }
.small-legend { font-family: var(--body); font-size: 14px; font-weight: 600; margin: 0 12px 0 0; float: left; }
input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--link); }
.rating-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.decide { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; }
.decide form { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.card.passed { background: #F7F7F5; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
.h2-summary { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--ink) !important; cursor: pointer; }
.h2-summary::after { content: ' +'; color: var(--muted); font-size: 20px; }
details[open] > .h2-summary::after { content: ''; }
.form-grid.compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 12px; }
.game-input { border: 1px solid var(--soft); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.game-input p { margin-bottom: 6px; }
.listed-games li { padding: 4px 0; }
.reports { border-color: #F0C98E; }

/* ---------- tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- public pages */
.pub-head { background: var(--dark); color: var(--on-dark); }
.pub-head-in { max-width: 760px; margin: 0 auto; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pub-head-in a { color: var(--on-dark-muted); }
.wide-form { max-width: 920px; }
.embed .narrow { padding-top: 16px; }
.ticks { margin: 0 0 12px; padding-left: 20px; }
.ticks li { margin-bottom: 6px; }
.statement { margin: 14px 0; padding: 14px 16px; background: var(--ground); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 15px; }
.clubs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--soft); }
.clubs li:first-child { border-top: 0; }

/* ---------- family-facing progress dashboard */
.family-page {
  width: min(100%, 430px);
  padding: 0 max(16px, env(safe-area-inset-left, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
  margin: 0 auto;
  gap: 0;
}
.family-page > .flash { width: 100%; margin: 14px 0; }
.family-hero {
  background: var(--dark); color: var(--on-dark); border-radius: 0 0 14px 14px;
  margin: 0 calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 16px calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 15px 20px 21px;
}
.family-hero .brandmark { margin-bottom: 24px; }
.family-hero .brand-name { font-size: 17px; letter-spacing: .13em; }
.family-kicker { color: #8FD6B3; font-size: 10px; line-height: 1.4; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 7px; }
.family-hero h1 { font-size: 35px; line-height: .98; letter-spacing: -.015em; color: #F7FAF7; margin: 0 0 7px; }
.family-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; color: #C0CBC3; font-size: 12px; line-height: 1.45; margin: 0; }
.family-meta .family-divider { color: #708077; }
.family-consent { display: flex; align-items: center; gap: 7px; margin: 13px 0 0; color: #D7E1D9; font-size: 11px; }
.family-consent::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.family-consent.withdrawn::before { background: #E7A99F; }
.family-page .family-section { margin: 0 0 13px; }
.family-page .family-section h2 { font-size: 19px; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 8px; }
.family-subtitle { color: var(--muted); font-size: 11px; line-height: 1.45; margin: -3px 0 7px; }
.family-message {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px;
  font-size: 11.5px; line-height: 1.48; white-space: pre-line; margin: 0;
}
.family-message-byline { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.family-stats { display: grid; grid-template-columns: 1fr; gap: 5px; margin: 0; }
.family-stat {
  display: flex; align-items: baseline; gap: 8px; min-height: 33px; padding: 5px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 7px;
}
.family-stat-value { font: 700 19px/.95 var(--display); min-width: 18px; }
.family-stat-label { color: #59675E; font-size: 8.5px; line-height: 1.15; font-weight: 600; letter-spacing: .055em; text-transform: uppercase; }
.family-stat.trial { background: #FFF6E9; border-color: #F0D6AE; color: #78521D; }
.family-stat.trial .family-stat-label { color: #8A6027; }
.family-ratings { background: transparent; border: 0; padding: 0; }
.family-rating-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; color: var(--muted); font-size: 9px; margin: -1px 0 3px; }
.family-rating-row { display: grid; grid-template-columns: minmax(0, 1fr) 1.05fr 40px; align-items: center; gap: 7px; min-height: 31px; border-top: 1px solid var(--line); font-size: 10px; }
.family-rating-row:first-of-type { border-top: 0; }
.family-rating-label { font-weight: 600; }
.family-rating-track { height: 4px; background: #E3E9E4; border-radius: 8px; position: relative; overflow: hidden; }
.family-rating-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.family-rating-values { text-align: right; font: 600 10px var(--mono); white-space: nowrap; }
.family-clubs { padding: 0; overflow: hidden; }
.family-club { padding: 9px 11px; border-top: 1px solid var(--soft); }
.family-club:first-child { border-top: 0; }
.family-club-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.family-club-name { font-size: 11px; line-height: 1.35; font-weight: 700; }
.family-club-country { color: var(--muted); font-weight: 400; }
.family-club-meta { color: var(--muted); font-size: 9px; line-height: 1.45; margin: 2px 0 0; }
.family-club-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.family-club-tags .chip { font-size: 8px; line-height: 1.35; padding: 2px 6px; }
.family-timeline { list-style: none; margin: 0; padding: 0; }
.family-timeline li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 7px; padding: 8px 9px; margin-top: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; }
.family-timeline li:first-child { margin-top: 0; }
.family-step-number { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #DDF1E6; color: #19734C; font: 700 9px var(--mono); margin-top: 1px; }
.family-step-content { min-width: 0; }
.family-step-title { font-size: 10.5px; font-weight: 700; line-height: 1.35; margin: 0; }
.family-step-detail { color: #4F5F55; font-size: 10px; line-height: 1.4; margin: 2px 0 0; white-space: pre-line; }
.family-step-date { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.family-timeline li.upcoming { background: #FFF6E9; border-color: #F0D6AE; }
.family-timeline li.upcoming .family-step-number { background: #F5E2C4; color: #835923; }
.family-milestone { background: var(--dark); color: var(--on-dark); border-radius: 9px; padding: 12px 13px; }
.family-milestone h2 { color: #F7FAF7; margin-bottom: 5px !important; font-size: 16px !important; }
.family-milestone-date { color: #8FD6B3; font: 500 13px var(--mono); margin: 0 0 4px; }
.family-milestone-message { color: #D3DDD5; font-size: 10px; line-height: 1.45; margin: 0; white-space: pre-line; }
.family-bottom { padding-top: 2px; }
.family-open { width: 100%; min-height: 39px; border-radius: 7px; background: var(--accent); border-color: var(--accent); font-size: 11px; font-weight: 700; }
.family-open:hover { background: #32996C; border-color: #32996C; }
.family-help { font-size: 9px; color: var(--muted); line-height: 1.45; margin: 6px 0 0; }
.family-page .danger-zone { margin-top: 3px; }
.family-page .statement { font-size: 12px; }
.family-empty { color: var(--muted); font-size: 11px; margin: 0; padding: 10px 11px; }
@media (min-width: 520px) {
  .family-page { padding-top: 16px; }
  .family-hero { border-radius: 14px; }
}
@media (min-width: 640px) {
  .family-page {
    width: min(calc(100% - 48px), 900px);
    max-width: 900px;
    padding: 24px max(24px, env(safe-area-inset-left, 0px)) 40px max(24px, env(safe-area-inset-right, 0px));
  }
  .family-page > .flash { margin: 0 0 6px; }
  .family-hero { margin: 0; padding: 25px 30px 28px; border-radius: 14px; }
  .family-hero .brandmark { margin-bottom: 18px; }
  .family-hero .brand-name { font-size: 20px; }
  .family-kicker { font-size: 12px; }
  .family-hero h1 { font-size: clamp(40px, 5vw, 54px); }
  .family-meta { gap: 6px 10px; font-size: 14px; }
  .family-consent { margin-top: 15px; font-size: 13px; }
  .family-page .family-section { margin: 0 0 18px; }
  .family-page .family-section h2 { font-size: 22px; margin-bottom: 10px; }
  .family-message { padding: 16px 18px; font-size: 14px; line-height: 1.6; }
  .family-message-byline { font-size: 12px; }
  .family-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .family-stat { min-height: 46px; padding: 9px 12px; gap: 10px; }
  .family-stat-value { font-size: 24px; }
  .family-stat-label { font-size: 10px; }
  .family-rating-row { min-height: 40px; font-size: 12px; }
  .family-rating-values { font-size: 12px; }
  .family-club { padding: 12px 14px; }
  .family-club-name { font-size: 13px; }
  .family-club-meta { font-size: 11px; }
  .family-club-tags .chip { font-size: 10px; }
  .family-timeline li { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
  .family-step-number { width: 20px; height: 20px; font-size: 10px; }
  .family-step-title { font-size: 13px; }
  .family-step-detail { font-size: 12px; }
  .family-step-date { font-size: 11px; }
  .family-milestone { padding: 17px 19px; }
  .family-milestone h2 { font-size: 19px !important; }
  .family-milestone-date { font-size: 15px; }
  .family-milestone-message { font-size: 12px; }
  .family-open { width: auto; min-width: 210px; padding-inline: 22px; font-size: 13px; }
  .family-help { font-size: 11px; }
  .family-page .statement { font-size: 14px; }
}
@media (min-width: 960px) {
  .family-page {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-content: start;
    gap: 20px 24px;
    width: 100%;
    max-width: none;
    padding: 32px max(clamp(24px, 3vw, 56px), env(safe-area-inset-left, 0px)) 48px max(clamp(24px, 3vw, 56px), env(safe-area-inset-right, 0px));
  }
  .family-page > .flash,
  .family-page > .family-hero,
  .family-page > .family-bottom { grid-column: 1 / -1; }
  .family-page > .flash { margin: 0; }
  .family-page > .family-hero { margin: 0 0 2px; }
  .family-page > .family-section { margin: 0; min-width: 0; }
  .family-page > .family-team-section,
  .family-page > .family-next-section { grid-column: span 7; }
  .family-page > .family-summary-section,
  .family-page > .family-milestone { grid-column: span 5; }
  .family-page > .family-development-section,
  .family-page > .family-clubs-section,
  .family-page > .family-withdraw-section,
  .family-page > .family-agreement-section { grid-column: span 6; }
  .family-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-page > .family-bottom { display: flex; align-items: center; gap: 18px; }
  .family-bottom .family-open { flex: 0 0 auto; }
  .family-bottom .family-help { margin: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .family-page .family-section { animation: family-arrive .38s ease-out both; }
  .family-page .family-section:nth-of-type(2) { animation-delay: 35ms; }
  .family-page .family-section:nth-of-type(3) { animation-delay: 70ms; }
  .family-page .family-section:nth-of-type(4) { animation-delay: 105ms; }
}
@keyframes family-arrive { from { opacity: .72; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- club profile */
.club .preview-bar { background: #2F6FDB; color: #fff; padding: 10px 20px; text-align: center; font-size: 14px; }
.club .preview-bar a { color: #fff; }
.club-hero { background: var(--dark); color: var(--on-dark); }
.club-top { max-width: 1080px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; color: var(--on-dark-muted); }
.club-top .brand-name { color: var(--on-dark); }
.club-hero-in { max-width: 1080px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 12px; }
.club-name { font-size: clamp(48px, 10vw, 84px); line-height: .92; color: #fff; margin: 0; }
.club-sub { font-size: 18px; color: #D3DCD5; margin: 0; }
.club-main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 40px; display: flex; flex-direction: column; gap: 24px; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.fact-k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fact-v { font-size: 17px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.video-btn { display: flex; align-items: center; gap: 12px; background: var(--dark); color: #fff; border-radius: 10px; padding: 16px 18px; text-decoration: none; min-height: 72px; }
.video-btn:hover { color: #fff; background: var(--dark-2); }
.video-btn svg { color: var(--accent); flex: 0 0 auto; }
.video-l { display: block; font-weight: 600; font-size: 17px; }
.video-btn .muted { color: var(--on-dark-muted); display: block; }
.club-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.club-cols:empty { display: none; }
.club-foot { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- consent record (print) */
.record-page { max-width: 860px; margin: 0 auto; padding: 24px; background: #fff; }
.record-tools { font-size: 14px; margin-bottom: 16px; }
.record-head { border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 20px; }
.record-head .brand-name { font-size: 18px; }
.record-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; break-inside: avoid; }
.record .tbl th[scope="row"] { width: 170px; color: var(--muted); font-weight: 500; }
.csv-tools { margin: 18px 0; }
.csv-tools summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.csv-tools > p { margin-top: 12px; }
.csv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.csv-upload { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 16px 0 12px; }
.csv-upload label { flex-basis: 100%; color: var(--ink); font-weight: 600; }
.csv-upload input[type="file"] { max-width: 100%; }
.csv-results { max-width: 780px; }
.csv-results h2 { margin-bottom: 14px; }
.csv-issues { max-height: 420px; overflow: auto; padding-left: 24px; }
.csv-issues li { margin: 6px 0; overflow-wrap: anywhere; }
@media print {
  body { background: #fff; }
  .record-tools, .topbar, .foot { display: none; }
  .record-page { padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- small screens */
@media (max-width: 640px) {
  .topbar-in, .wrap, .foot, .club-top, .club-hero-in, .club-main { padding-left: 16px; padding-right: 16px; }
  .nav a { padding: 10px 6px; font-size: 15px; }
  .card { padding: 16px; }
  .page-head { align-items: flex-start; }
  .stage-form select { min-width: 0; }
  .share-head { flex-direction: column; gap: 6px; }
  .board { grid-auto-columns: 84%; }
  .game { grid-template-columns: 1fr; }
  .game-when { flex-direction: row; gap: 10px; }
  .game-actions { justify-content: flex-start; }
}

/* ---------- full-width responsive containers */
:root { --gutter: clamp(16px, 2.5vw, 40px); }
.topbar-in, .flash, .wrap, .foot, .club-top, .club-hero-in, .club-main, .club-foot { max-width: none; }
.topbar-in, .wrap, .foot, .club-top, .club-hero-in, .club-main, .club-foot {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.flash { margin-left: var(--gutter); margin-right: var(--gutter); }
.wrap > .flash, main > .flash { margin-left: 0; margin-right: 0; }
.narrow:not(.family-page), .wide-form:not(.family-page) { max-width: none; width: 100%; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.narrow > p, .narrow .lead { max-width: 75ch; }
.auth { max-width: none; }
.auth > .card { width: min(100%, 460px); }
.narrow:not(.family-page) > .card, .narrow:not(.family-page) > form { min-width: 0; }
.pub-head-in { max-width: none; padding-left: var(--gutter); padding-right: var(--gutter); }
.record-page { max-width: none; }
.csv-results { max-width: none; }
.tbl-wrap, .board { max-width: 100%; }
.card, .cols > * , .stats > * { min-width: 0; }
.tbl-wrap:focus-visible { outline: 3px solid #2F6FDB; }
.page-head h1, .card h2 { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .wrap { padding-top: 14px; padding-bottom: 32px; }
  .narrow:not(.family-page) { padding-top: 16px; gap: 14px; }
  .auth { padding-top: 6vh; }
  .btn-row .btn, .head-actions .btn { flex: 1 1 auto; }
}
@media print {
  .record-page { max-width: 860px; }
}

.form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.club-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.videos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.facts-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.col-main { flex-basis: min(100%, 560px); }
.col-side { flex-basis: min(100%, 320px); }
.record .tbl, .record-item { overflow-wrap: anywhere; }
.share, .logitem, .req, .note, .statement { overflow-wrap: anywhere; }
.share-actions .btn, .game-actions .btn { max-width: 100%; }
.stage-form { flex-wrap: wrap; }
@media (min-width: 960px) { .auth > .card { width: min(100%, 520px); } }
@media print { .record .tbl, .record-item { overflow-wrap: normal; } }

/* Shrink nested content instead of clipping the document on smaller screens. */
@media screen {
  h1, h2, h3, .brand-name, .chip, .pre, .errors, .hint { overflow-wrap: anywhere; }
  .facts { grid-template-columns: minmax(0, 96px) minmax(0, 1fr); }
  .game > *, .card-head > *, .share-head > *, .feed li > div,
  .team li > div, .video-btn > span { min-width: 0; overflow-wrap: anywhere; }
  .btn, .linkbtn, input, select, textarea { min-width: 0; max-width: 100%; }
  .linkbtn { overflow-wrap: anywhere; }
  .tbl-wrap, .board { width: 100%; overscroll-behavior-x: contain; }
  .topbar-in, .pub-head-in { flex-wrap: wrap; }
  .record-page { padding-inline: var(--gutter); }
  .scout-form { max-width: 100%; }
}
@media (max-width: 640px) {
  .team li, .card-head, .share-head { flex-wrap: wrap; }
  .stage-form { width: 100%; }
  .stage-form select { flex: 1 1 160px; }
  .game { grid-template-columns: minmax(0, 1fr); }
  .game-actions { min-width: 0; }
  .form-grid.compact, .rating-grid, .scores {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  }
  .btn.small, .tabs a, .steps a, .linkbtn { min-height: 44px; }
  .tabs a, .steps a { display: inline-flex; align-items: center; }
  .family-page .family-open { min-height: 44px; }
}
@media (max-width: 639px) {
  .family-page .family-section h2 { font-size: 22px; }
  .family-message, .family-empty { font-size: 13px; }
  .family-stat-label, .family-club-meta, .family-help { font-size: 11px; }
  .family-step-title, .family-step-detail, .family-club-name { font-size: 13px; }
  .family-rating-row, .family-rating-values { font-size: 12px; }
}
