/* © 2026 Liam Griffiths. All rights reserved. Private pilot: not for copying or redistribution. */
/* VYLO v1.6 styles — "Matchday daylight" */
:root {
  /* surfaces */
  --bg: #F3F0EA; --surface: #FFFFFF; --surface2: #FAF8F4; --surface3: #F6F2EA;
  --ink: #14181F; --ink2: #232A35; --on-ink: #F3F0EA; --on-ink-muted: #AEB5C0;
  --line: #E2DCD1; --line2: #CFC7B8;
  /* text */
  --text: #14181F; --muted: #4F5765; --muted2: #5E6674;
  /* accent: amber. Fill for buttons/bars, -text for amber words and lines on light */
  --accent: #F2A531; --accent-ink: #14181F; --accent-text: #8A4F00;
  --accent-soft: #FCEBC8; --accent-soft-ink: #6B3E00;
  /* status */
  --good: #1F7A45; --good-soft: #DDF2E4; --warn: #8A5A00; --warn-soft: #FBEFD2; --red: #B3261E; --red-soft: #FBE3E0;
  /* kept for older code paths */
  --lime: var(--accent-text); --lime-ink: var(--accent-ink); --gold: var(--warn); --green: var(--good);
  --radius: 16px; --side-w: 248px;
  --display: 'Saira Condensed', system-ui, sans-serif;
}
* { box-sizing: border-box }
html { scroll-padding-top: 80px }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased }
body.locked > aside, body.locked > main, body.locked > #bottomnav, body.locked > .mobilebar { visibility: hidden }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px }
a { color: var(--accent-text) }
h1, h2, h3 { line-height: 1.15 }
h2 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; margin: 0 0 12px }
h3 { font-size: 16px; margin: 0 0 8px }
p { margin: 4px 0 0; color: var(--muted) }
.display { font-family: var(--display); letter-spacing: .3px }
.small { font-size: 12.5px; color: var(--muted) }
.muted { color: var(--muted) }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100000 }
.skip:focus { left: 8px }
[hidden] { display: none !important }

/* layout helpers */
.row { display: flex; align-items: center }
.row.between { justify-content: space-between } .row.end { justify-content: flex-end }
.row.gap { gap: 10px } .row.wrap { flex-wrap: wrap }
.grid { display: grid; gap: 16px }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.hero { grid-template-columns: 1.15fr .85fr }
.divider { height: 1px; background: var(--line); margin: 16px 0 }

/* brand */
/* PitchGrown lockup: rising-pitch icon + rounded lower-case wordmark */
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1 }
.brandmark { flex: none; width: 40px; height: 40px; display: block }
.brandmark svg { width: 100%; height: 100%; display: block }
.brandword { font-family: 'Inter', system-ui, sans-serif; font-weight: 800; font-size: 30px; letter-spacing: -1.2px; text-transform: none }
.brandword span { color: var(--accent) }
.gate-card .brandword span { color: var(--accent-text) }
.tag { font-size: 10px; letter-spacing: 2px; color: var(--on-ink-muted); margin-top: 6px }
.eyebrow { color: var(--accent-text); font-size: 11px; letter-spacing: 2px; font-weight: 800; text-transform: uppercase }

/* sidebar (dark chrome) */
aside { width: var(--side-w); position: fixed; inset: 0 auto 0 0; background: var(--ink); color: var(--on-ink); padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 18px; z-index: 30; overflow-y: auto }
.sidebrand { padding: 0 10px }
.navgroup { margin-bottom: 12px }
.navlabel { font-size: 10.5px; font-weight: 800; letter-spacing: 1.6px; color: var(--on-ink-muted); text-transform: uppercase; padding: 0 12px 4px }
#nav a { display: flex; align-items: center; gap: 10px; color: #D5DAE1; text-decoration: none; border-radius: 9px; padding: 8px 12px; font-weight: 600; font-size: 13.5px }
#nav a:hover { background: var(--ink2); color: #fff }
#nav a.active { background: var(--accent); color: var(--accent-ink) }
.navicon { width: 18px; text-align: center; opacity: .9 }
.sidefoot { margin-top: auto; border-top: 1px solid #2E3541; padding: 14px 10px 0; display: grid; gap: 8px }
.sidefoot .small, aside .small, aside .muted { color: var(--on-ink-muted) }
.sidefoot .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
aside .btn.ghost { color: var(--on-ink); border-color: #3A414D }
.syncline { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--on-ink-muted) }
.syncline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-ink-muted) }
.syncline:has([data-kind="ok"]) .dot { background: #5CCB72 }
.syncline:has([data-kind="warn"]) .dot { background: var(--accent) }
[data-sync-status][data-kind="warn"] { color: var(--accent) }

main { margin-left: var(--side-w); max-width: 1480px; padding: 30px 36px 90px }
.pagehead { margin-bottom: 22px }
.pagehead h1 { font-family: var(--display); font-size: 42px; font-weight: 800; text-transform: uppercase; margin: 4px 0 2px; letter-spacing: .5px; line-height: 1.05; outline: none }
#view { outline: none }
.mobilebar, #bottomnav { display: none }
#scrim { display: none }

/* cards & controls */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0 }
.btn { border: 0; background: var(--ink); color: var(--on-ink); border-radius: 10px; padding: 11px 16px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center }
.btn:hover { background: var(--ink2) }
.btn.alt { background: var(--accent-soft); color: var(--accent-soft-ink) }
.btn.alt:hover { background: #F8DFA8 }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2) }
.btn.ghost:hover { background: var(--surface3) }
.btn.danger { background: var(--red); color: #fff }
.btn.ghost.danger { background: transparent; border-color: #E3A9A3; color: var(--red) }
.btn.small { padding: 7px 11px; font-size: 12.5px; border-radius: 8px }
.btn.wide { width: 100% }
.btn:disabled { opacity: .45; cursor: not-allowed }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface3); color: var(--muted); border: 1px solid var(--line); white-space: nowrap }
.chip.lime { background: var(--accent-soft); border-color: #F1D49A; color: var(--accent-soft-ink) }
.chip.gold { background: var(--warn-soft); border-color: #EBD49B; color: var(--warn) }
.note { background: var(--good-soft); border: 1px solid #BCE3C8; color: #17462A; border-radius: 11px; padding: 12px 14px; font-size: 13px }
.note p { color: inherit }
.note.gold { background: var(--warn-soft); border-color: #EBD49B; color: #5C3D00 }
.empty { padding: 16px; color: var(--muted); border: 1px dashed var(--line2); border-radius: 12px; font-size: 13.5px }
.bar { height: 8px; background: #ECEAE5; border-radius: 20px; overflow: hidden; margin-top: 7px }
.fill { height: 100%; background: var(--accent); border-radius: 20px; transition: width .4s }
.fill.gold { background: #C9973E }
.rowline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line) }
.rowline:last-child { border-bottom: 0 }
.objective { padding: 12px 0; border-bottom: 1px solid var(--line) }
.objective:last-child { border-bottom: 0 }
.score { font-size: 64px; font-weight: 800; line-height: 1; color: var(--text); margin-bottom: 8px }

/* forms */
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; border: 0; padding: 0; margin: 0; min-width: 0 }
.formgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.matchform { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.field { display: grid; align-content: start; gap: 6px; font-weight: 600; font-size: 13px }
.field input, .field select, .field textarea, select { width: 100%; border: 1px solid var(--line2); border-radius: 9px; padding: 10px; background: var(--surface); color: var(--text) }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px #14181F1a }
.field textarea { min-height: 84px; resize: vertical }
fieldset:disabled .field input, fieldset:disabled .field select, .field input:disabled, .field select:disabled, .field textarea:disabled { opacity: .7; cursor: not-allowed }
.check { display: flex; gap: 9px; align-items: center; font-weight: 600 }
.check input { width: 18px; height: 18px; accent-color: var(--ink) }
.scorebox { display: flex; align-items: center; gap: 8px }
.scorebox input { width: 64px; text-align: center; border: 1px solid var(--line2); border-radius: 9px; padding: 10px; background: var(--surface); color: var(--text) }
.segmented { display: inline-flex; background: var(--surface3); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px }
.segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 13px; font-weight: 700; font-size: 13px }
.segmented button.on { background: var(--ink); color: var(--on-ink) }
.segmented button:disabled { cursor: not-allowed; opacity: .55 }
.segmented button.on:disabled { opacity: 1 }
.segmented.small button { padding: 6px 10px; font-size: 12px }

/* dashboard: player card */
.cardstage { display: flex; gap: 24px; align-items: center; flex-wrap: wrap }
.cardside { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px }
.cardside h2 { margin: 0 }
.cardside .topstrength { font-size: 14px; color: var(--muted) }
.cardside .topstrength strong { color: var(--text) }
.pcard { --t1: #F8DE98; --t2: #D9A84C; --t3: #F3D27F; --t4: #B9862F; --tink: #1E1606;
  flex: none; width: 260px; min-height: 364px; padding: 16px; color: var(--tink);
  clip-path: polygon(0 0, 82% 0, 100% 13%, 100% 100%, 0 100%);
  background: var(--pat, linear-gradient(transparent, transparent)), linear-gradient(155deg, var(--t1) 0%, var(--t2) 38%, var(--t3) 62%, var(--t4) 100%);
  display: flex; flex-direction: column; justify-content: space-between; position: relative }
/* flip + tilt */
.pcard-scene { flex: none; perspective: 1100px; cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent }
.pcard-inner { display: grid; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--flip, 0deg) + var(--ry, 0deg))); transition: transform .6s cubic-bezier(.2, .7, .2, 1) }
.pcard-inner.tilting { transition: transform .08s linear }
.pcard-inner.flipped { --flip: 180deg }
.pcard-inner > .pcard { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden }
/* foil: none on Starter/Bronze, a soft static sheen on Silver, a moving shimmer on Gold */
.pcard::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: overlay;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.85) 48%, transparent 60%) var(--sx, 85%) 0 / 260% 100% no-repeat }
.pcard.tier-silver::after { opacity: .55 }
.pcard.tier-gold::after { opacity: .8; animation: foil 5s ease-in-out infinite;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.9) 48%, transparent 60%) var(--sx, 130%) 0 / 260% 100% no-repeat,
              linear-gradient(125deg, rgba(255,120,200,.18), rgba(120,220,255,.18) 50%, rgba(255,240,140,.18)) 0 0 / 100% 100% }
.pcard-inner.tilting .pcard::after { animation: none }
@keyframes foil { 0%, 55% { background-position: 130% 0, 0 0 } 85%, 100% { background-position: -30% 0, 0 0 } }
@media (prefers-reduced-motion: reduce) { .pcard-inner { transition: none } .pcard::after { animation: none !important } }
/* card back */
.pcard-back { transform: rotateY(180deg); justify-content: flex-start; gap: 10px; clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%, 0 13%) }
.pb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-left: 34px }
.pb-name { font-family: var(--display); font-weight: 800; font-size: 20px; text-transform: uppercase; line-height: 1 }
.pb-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px }
.pb-totals div { background: rgba(255,255,255,.38); padding: 5px 4px; display: flex; flex-direction: column; align-items: center }
.pb-totals strong { font-family: var(--display); font-size: 19px; line-height: 1 }
.pb-figure { height: 120px; display: flex; justify-content: center; margin: -4px 0 -2px }
.pb-figure svg { height: 120px; width: auto }
.pb-totals span { font-size: 8px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase }
.pb-sec ol { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; font-weight: 600; line-height: 1.35 }
.pb-sec p { margin: 4px 0 0; font-size: 12px; color: inherit; opacity: .8 }
.pb-foot { margin-top: auto; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; text-align: center; opacity: .7 }
.pcard.tier-starter { --t1: #EDEAE4; --t2: #BDB6AB; --t3: #DCD6CC; --t4: #9C958A; --tink: #1D1B17 }
.pcard.tier-bronze { --t1: #F1C3A0; --t2: #B9764C; --t3: #E2A57D; --t4: #8C5333; --tink: #1F1108 }
.pcard.tier-silver { --t1: #F6F8FA; --t2: #B9C2CC; --t3: #E6EBF0; --t4: #8E99A6; --tink: #151A20 }
.pcard-top { display: flex; justify-content: space-between; align-items: flex-start }
.pcard-level { font-family: var(--display); font-weight: 800; font-size: 52px; line-height: .9; display: block }
.pcard-label, .pcard-tier { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase }
.pcard-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-right: 30px }
.pcard-tier { border: 1.5px solid var(--tink); padding: 4px 8px; white-space: nowrap }
.pcard-up { display: inline-flex; align-items: center; gap: 5px; background: var(--ink); color: var(--accent); padding: 4px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap }
.pcard-figure { position: relative }
.pcard-crest { position: absolute; right: 0; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.55); border: 1.5px solid color-mix(in srgb, var(--tink), transparent 55%); display: grid; place-items: center; overflow: hidden }
.pcard-crest .badgeimg { width: 34px; height: 34px; object-fit: contain }
.pcard-figure { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 0 }
.pcard-figure svg { height: 150px; width: auto }
.pcard-name { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: 1px; text-transform: uppercase; text-align: center; overflow-wrap: anywhere }
.pcard-meta { font-size: 11.5px; font-weight: 600; text-align: center; margin-top: 3px; line-height: 1.35 }
.pcard-meta strong { font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: .5px }
.pcard-meta .badgeimg { height: 16px; width: 16px; object-fit: contain }
.pcard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid color-mix(in srgb, var(--tink), transparent 45%); padding-top: 7px; margin-top: 9px; text-align: center }
.pcard-stats strong { font-family: var(--display); font-size: 22px; line-height: 1; display: block }
.pcard-stats span { font-size: 9.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase }
.badgeimg { height: 24px; width: 24px; object-fit: contain }
.missionlist { margin: 8px 0 6px; padding: 0; list-style: none; counter-reset: m; display: grid; gap: 10px; font-weight: 500 }
.missionlist li { counter-increment: m; display: flex; gap: 12px; align-items: center }
.missionlist li::before { content: counter(m); flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 800; font-size: 18px; display: grid; place-items: center }
.nextmatch .btn { margin-top: 12px }
.taglist { display: flex; flex-wrap: wrap; gap: 8px }
.ptag { border: 0; background: #ECEAE5; color: #2B313B; border-radius: 99px; padding: 7px 13px; font-size: 13.5px; font-weight: 600 }
.ptag b { color: var(--muted); font-weight: 700; margin-left: 4px }
.ptag.good { background: var(--accent-soft); color: var(--accent-soft-ink) }
.ptag.good b { color: var(--accent-text) }
.ptag:hover { box-shadow: inset 0 0 0 1.5px var(--ink) }
.chart { width: 100%; height: auto; max-height: 220px }
.chart text { font-size: 11px; fill: var(--muted) }
.spark { flex: none }

/* reflect */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px }
.step { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: #ECEAE5; color: var(--muted) }
.step.on { background: var(--ink); color: var(--on-ink) }
.assessment-progress { position: sticky; top: 0; z-index: 5; background: #FFFFFFF0; backdrop-filter: blur(6px); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-top: 16px }
.scalehelp { margin-top: 10px }
.dimension-section { margin-top: 22px }
.dimension-section h3 { font-family: var(--display); font-size: 22px; font-weight: 800; text-transform: uppercase; color: var(--text); letter-spacing: .4px; border-bottom: 2px solid var(--accent); padding-bottom: 6px }
.question { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 15px; margin: 10px 0; min-width: 0 }
.question:focus-within { border-color: var(--ink) }
.question:has(input:checked) { border-color: #F1D49A; background: #FFFBF2 }
.qtitle { font-weight: 700; font-size: 15px; padding: 0 }
.qex { margin-top: 6px }
.qfocus { margin-top: 4px }
.qmeta { font-size: 11px; color: var(--muted2); margin-top: 10px }
.choices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 12px }
.choices.choices-f { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.choices.choices-f span i { font-size: 13px; font-weight: 700; color: inherit }
.choices label { cursor: pointer; position: relative }
.choices input { position: absolute; opacity: 0; pointer-events: none }
.choices span { display: grid; place-items: center; border: 1px solid var(--line2); background: var(--surface); border-radius: 9px; padding: 7px 4px; text-align: center; min-height: 52px }
.choices span b { font-size: 16px }
.choices span i { font-style: normal; font-size: 10.5px; color: var(--muted); line-height: 1.2 }
.choices input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.choices input:checked + span i { color: #3D2600 }
.choices input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px }
fieldset:disabled .choices label { cursor: default }
.mission-review { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap }

/* history */
.statgrid .stat { text-align: center; padding: 16px }
.stat strong { font-family: var(--display); font-size: 36px; display: block; line-height: 1 }
.stat small { color: var(--muted) }
.matchlist { display: grid; gap: 8px; margin-top: 14px }
.matchrow { display: grid; grid-template-columns: 110px 1fr 64px 1.1fr auto; gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text) }
.matchrow:hover, .matchrow.selected { border-color: var(--ink) }
.mr-date { font-size: 13px; color: var(--muted) }
.mr-opp { font-weight: 700 }
.mr-score { font-family: var(--display); font-size: 22px; font-weight: 800; text-align: center; border-radius: 8px; padding: 0 6px }
.mr-score.win { color: var(--good) } .mr-score.loss { color: var(--red) } .mr-score.draw { color: var(--warn) }
.mr-meta { font-size: 12.5px; color: var(--muted) }
.mr-status { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap }
.report { background: var(--surface); border-color: var(--line2) }
.dimdetail { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; margin: 8px 0 }
.dimdetail summary { cursor: pointer; display: flex; justify-content: space-between; padding: 8px 0; font-weight: 700 }
.tablewrap { overflow-x: auto }
.compare { width: 100%; border-collapse: collapse; margin-top: 8px }
.compare th, .compare td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left }
.compare th { font-size: 12px; color: var(--muted) }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 80px }
.compare tr.flag td { background: var(--warn-soft) } .compare tr.flag td:first-child:after { content: ' · worth a chat'; color: var(--warn); font-size: 12px }

/* progress */
.dim { padding: 10px 0; border-bottom: 1px solid var(--line) } .dim:last-child { border: 0 }
.trendlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px }
.trendrow { display: flex; align-items: center; gap: 12px; justify-content: space-between; text-align: left; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text) }
.trendrow:hover { border-color: var(--ink) }
.trendrow small { display: block; color: var(--muted); font-size: 11.5px }
.trendval { font-family: var(--display); font-size: 24px; font-weight: 800; min-width: 52px; text-align: right }
.trendval em { font-style: normal; font-size: 12px; display: block; font-family: 'Inter', system-ui }
.up { color: var(--good) } .down { color: var(--warn) }
.mindtile { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 14px }
.printhead { display: none }

/* library */
.hub-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.4fr); gap: 16px; margin-top: 14px }
.library-list { max-height: 640px; overflow-y: auto; display: grid; align-content: start; gap: 7px; padding-right: 4px }
.library-entry { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 11px 12px; text-align: left; color: var(--text) }
.library-entry:hover { border-color: var(--ink) }
.library-entry.selected { border-color: var(--ink); background: var(--accent-soft) }
.library-entry small { display: block; color: var(--muted); font-size: 11px }
.library-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 320px }
.lead { font-size: 16px; color: var(--text); font-weight: 600 }
.mini-lesson { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px }
.mini-lesson h3 { color: var(--accent-text); margin: 0 0 6px }

/* footballer (dark stage so the illustrated kit reads well) */
.avatar-stage { background: radial-gradient(ellipse at 50% 36%, #3A4352 0%, #1E242E 56%, #14181F 100%); border-radius: 19px; min-height: 360px; display: grid; place-items: center; position: relative; overflow: hidden }
.avatar-stage:before { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 1px solid #F2A53144; box-shadow: 0 0 0 40px #F2A5310a, 0 0 0 80px #F2A53106 }
.avatar-stage svg { width: min(100%, 280px); max-height: 350px; position: relative; z-index: 1; filter: drop-shadow(0 15px 15px #0007) }
.locker-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 20px }
.locker-item { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; min-height: 84px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center }
.locker-item strong { font-size: 13px } .locker-item small { color: var(--muted); font-size: 11px }
.locker-item.selected { border: 2px solid var(--ink); background: var(--accent-soft) }
.locker-item:disabled { opacity: .5; cursor: not-allowed }
.avatar-colors { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 20px }
.avatar-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line2) }
.avatar-swatch.selected { outline: 3px solid var(--ink); outline-offset: 2px }
@media (min-width: 801px) { .avatar-col { position: sticky; top: 20px; align-self: start } }
.kitpicker { border: 1px solid var(--line); background: var(--surface2); border-radius: 12px; padding: 14px; margin: -8px 0 20px }
.kitfields { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px }
.kitfield { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; cursor: pointer }
.kitfield input { width: 48px; height: 48px; padding: 0; border: 2px solid var(--line2); border-radius: 12px; background: none; cursor: pointer }
.kitfield input::-webkit-color-swatch-wrapper { padding: 3px } .kitfield input::-webkit-color-swatch { border: 0; border-radius: 8px }
.achievement { border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 16px; display: flex; gap: 14px; align-items: center }
.achievement.locked { opacity: .6 }
.achievement .symbol { font-size: 28px }
.markerid { background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 11px; padding: 5px 7px; border-radius: 6px; font-weight: 800 }

/* my cards (collectibles stay dark, like real cards) */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px }
.tabs button { border: 1px solid var(--line2); background: var(--surface); color: var(--text); border-radius: 9px; padding: 9px 12px; font-weight: 600 }
.tabs button.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink) }
.collection { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px }
.collectible { min-height: 240px; border: 1px solid var(--tier); border-radius: 19px; background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--tier), transparent 75%), transparent 60%), var(--ink); color: var(--on-ink); padding: 17px; position: relative; display: flex; flex-direction: column; gap: 10px; overflow: hidden }
.collectible:before { content: ''; position: absolute; right: -35px; bottom: -65px; width: 165px; height: 165px; border-radius: 50%; border: 10px solid color-mix(in srgb, var(--tier), transparent 80%) }
.collectible.locked { filter: saturate(.35); opacity: .68 }
.collectible .tier { color: var(--tier); letter-spacing: 1.8px; font-size: 11px; font-weight: 900 }
.collectible .monogram { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--tier); display: grid; place-items: center; font-size: 27px; font-weight: 900; overflow: hidden }
.collectible strong { font-family: var(--display); font-size: 28px; font-weight: 800; text-transform: uppercase; overflow-wrap: anywhere; line-height: 1 }
.collectible .badgeimg { height: 18px; width: 18px; vertical-align: middle }
.collectible .foot { margin-top: auto; font-size: 12px; color: var(--on-ink-muted) }
.collectible p, .collectible .small { color: var(--on-ink-muted) }
.collectible .btn.ghost { color: var(--on-ink); border-color: #4A5260 }
.collectible button { position: relative; z-index: 1; align-self: flex-start }

/* journey */
.chapters { display: grid; gap: 8px; margin-top: 18px }
.chapter { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; opacity: .65 }
.chapter.open { opacity: 1; border-color: #F1D49A; background: #FFFBF2 }
.chapter div { flex: 1 }
.chnum { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); font-family: var(--display); font-weight: 800; color: var(--accent-ink) }

/* hub & story */
.hub-banner { background: var(--ink); color: var(--on-ink); padding: 18px; border-radius: 13px; display: grid; gap: 6px }
.hub-banner strong { color: var(--accent); font-size: 17px } .hub-banner span { color: var(--on-ink-muted) }
.hub-tile { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); display: flex; flex-direction: column; gap: 9px; align-items: flex-start }
.hub-tile h3 { margin: 0; font-size: 17px }
.hub-tile p { margin: 0; color: var(--muted); font-size: 13px }
.hub-tile .icon { font-size: 27px }
.hub-tile .btn { margin-top: auto }
.hub-tile summary, details summary { cursor: pointer; color: var(--text); font-weight: 600 }
.hub-steps { padding-left: 20px; margin: 8px 0 } .hub-steps li { margin: 6px 0 }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px }
.photo-card { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface) }
.photo-card img { width: 100%; height: 160px; object-fit: cover; display: block; background: #ECEAE5 }
.photo-card figcaption { padding: 10px; display: grid; gap: 4px; justify-items: start }

/* profile */
.profilehead, .clubpreview { display: flex; align-items: center; gap: 16px; margin-top: 12px }
.avatar.big { width: 96px; height: 96px; border-radius: 22px; font-size: 38px; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--accent); border: 0; font-family: var(--display); font-weight: 800; overflow: hidden }
.profileimg { width: 100%; height: 100%; object-fit: cover; display: block }
.clubbadge { width: 72px; height: 72px; border-radius: 16px; background: var(--surface3); border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; overflow: hidden; font-size: 28px; flex: none }
.clubbadge .badgeimg { width: 62px; height: 62px }

/* gate + modal */
.gate { position: fixed; inset: 0; background: #14181Ff2; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: auto }
#modal { z-index: 10001; background: #14181Fb3 }
.gate-card { background: var(--surface); color: var(--text); max-width: 470px; width: 100%; padding: 28px; border-radius: 18px; box-shadow: 0 20px 60px #0006 }
.gate-card .tag { color: var(--muted) }
.gate-card h1 { font-family: var(--display); font-size: 32px; font-weight: 800; text-transform: uppercase; margin: 14px 0 4px }

/* toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 20000; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 36px)) }
.toast { background: var(--ink); border-left: 4px solid #5CCB72; color: var(--on-ink); padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px #0003; font-size: 14px; font-weight: 600; animation: tin .25s ease-out; transition: opacity .4s, transform .4s }
.toast.error { border-left-color: #FF7A6B }
.toast.out { opacity: 0; transform: translateY(8px) }
@keyframes tin { from { opacity: 0; transform: translateY(8px) } }

/* responsive */
@media (max-width: 1150px) { .collection { grid-template-columns: repeat(2, minmax(0, 1fr)) } .hero { grid-template-columns: 1fr } .matchform { grid-template-columns: repeat(2, minmax(0, 1fr)) } .four { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 900px) { .hub-layout { grid-template-columns: 1fr } .library-list { max-height: 300px } .trendlist { grid-template-columns: 1fr } .matchrow { grid-template-columns: 1fr auto; grid-template-areas: 'opp score' 'date score' 'meta status' } .mr-opp { grid-area: opp } .mr-date { grid-area: date } .mr-score { grid-area: score } .mr-meta { grid-area: meta } .mr-status { grid-area: status } }
@media (max-width: 800px) {
  aside { transform: translateX(-100%); transition: transform .25s; width: min(300px, 86vw); padding-bottom: 90px }
  body.drawer-open aside { transform: none; box-shadow: 10px 0 40px #0006 }
  body.drawer-open #scrim { display: block; position: fixed; inset: 0; background: #14181F99; z-index: 25 }
  .mobilebar { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--on-ink); padding: 12px 16px }
  .small-brand .brandmark { width: 32px; height: 32px } .small-brand .brandword { font-size: 24px }
  main { margin: 0; padding: 18px 14px 110px }
  .pagehead h1 { font-size: 34px }
  .two, .three { grid-template-columns: 1fr }
  .formgrid.three { grid-template-columns: 1fr }
  .cardstage { justify-content: center }
  #bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #FFFFFFF5; backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) }
  #bottomnav a, #bottomnav button { display: grid; justify-items: center; gap: 1px; background: none; border: 0; color: var(--muted2); text-decoration: none; font-size: 11px; font-weight: 600; padding: 6px 2px; border-radius: 10px }
  #bottomnav span { font-size: 19px; line-height: 1.1 }
  #bottomnav a.active { color: var(--text); font-weight: 800; background: linear-gradient(var(--accent), var(--accent)) top center / 28px 3px no-repeat }
  #toasts { bottom: 86px; right: 12px; left: 12px; max-width: none }
  .assessment-progress { top: 56px }
}
@media (max-width: 560px) {
  .formgrid, .matchform { grid-template-columns: 1fr }
  .card { padding: 16px }
  .pcard { width: min(260px, 100%) }
  .collection { grid-template-columns: 1fr 1fr } .collectible { min-height: 210px; padding: 13px } .collectible strong { font-size: 22px }
  .locker-group { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .choices span { min-height: 46px } .choices span i { font-size: 9.5px }
  .score { font-size: 52px }
}

/* print: summaries for coaches and reports */
@media print {
  :root { --text: #111; --muted: #444; --line: #ccc; --accent-text: #6B3E00; --good: #1d6b3a; --warn: #8a6100 }
  body { background: #fff !important; color: #111; font-size: 12px }
  aside, #bottomnav, .mobilebar, #toasts, .noprint, .pagehead, .skip, #scrim { display: none !important }
  main { margin: 0; padding: 0; max-width: none }
  .card, .library-detail, .trendrow, .mindtile, .report { background: #fff !important; border: 1px solid #ccc; box-shadow: none; break-inside: avoid }
  .printhead { display: block; margin-bottom: 12px } .printhead h2 { font-size: 20px }
  .note { background: #f6f6f2; color: #222; border-color: #bbb }
  .chip { background: #fff; color: #111; border-color: #999 }
  .bar { background: #ddd } .fill { background: #C9973E !important }
  .compare tr.flag td { background: #fff3d6 !important }
  .grid.two { grid-template-columns: 1fr 1fr }
  body.print-report #view > :not(.report) { display: none !important }
  details { display: block } details > * { display: block }
}

/* day banner (dashboard) */
.daybanner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--line) }
.daybanner strong { font-family: var(--display); font-size: 24px; font-weight: 800; text-transform: uppercase; line-height: 1.1; display: block; margin-top: 2px }
.daybanner p { margin: 4px 0 0; color: inherit; opacity: .9; font-size: 14px }
.daybanner .eyebrow { color: inherit; opacity: .85 }
.daybanner.day-match { background: var(--accent); color: var(--accent-ink); border-color: var(--accent) }
.daybanner.day-train { background: var(--ink); color: var(--on-ink); border-color: var(--ink) }
.daybanner.day-train .btn { background: var(--accent); color: var(--accent-ink) }
.daybanner.day-rest, .daybanner.day-none { background: var(--surface) }
.daybanner.day-rest .eyebrow, .daybanner.day-none .eyebrow { color: var(--accent-text) }

/* my teams (profile) */
.teamgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 14px }
.teamblock { border: 1px solid var(--line); background: var(--surface2); border-radius: 14px; padding: 16px; min-width: 0 }
.clubbadge.small { width: 48px; height: 48px; border-radius: 12px; font-size: 20px }
.clubbadge.small .badgeimg { width: 40px; height: 40px }
.days { border: 0; padding: 0; margin: 12px 0 0; min-width: 0 }
.days legend { font-weight: 600; font-size: 13px; padding: 0; margin-bottom: 6px }
.daypills { display: flex; flex-wrap: wrap; gap: 6px }
.daypill { position: relative; cursor: pointer }
.daypill input { position: absolute; opacity: 0; pointer-events: none }
.daypill span { display: inline-grid; place-items: center; min-width: 44px; min-height: 36px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 9px; background: var(--surface); font-size: 12.5px; font-weight: 700 }
.daypill input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink) }
.daypill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px }
.pb-teams { display: grid; gap: 2px; font-size: 11px; font-weight: 600 }

/* card styles (bought with credits): a pattern layered over the tier finish */
.pat-stripes { --pat: repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 18px, transparent 18px 36px) }
.pat-dots { --pat: radial-gradient(rgba(0,0,0,.13) 1.6px, transparent 1.8px) 0 0 / 11px 11px }
.pat-pitch { --pat: radial-gradient(circle at 50% 50%, transparent 52px, rgba(0,0,0,.13) 53px 55px, transparent 56px), linear-gradient(transparent calc(50% - 1px), rgba(0,0,0,.13) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) }
.pat-diamonds { --pat: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 2px, transparent 2px 16px), repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 2px, transparent 2px 16px) }

/* credits */
.creditpill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600 }
.creditpill strong { font-size: 15px }
.coin { flex: none; vertical-align: middle }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 700; text-decoration: underline; font-size: inherit }

/* daily tasks */
.tasklist { display: grid; gap: 10px; margin: 14px 0 10px }
.taskrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--line); background: var(--surface2); border-radius: 12px; padding: 12px 14px }
.taskrow.done { background: var(--good-soft); border-color: #BCE3C8 }
.taskmain { display: grid; gap: 3px; min-width: 0 }
.taskmain p { margin: 0 }
.taskkind { font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-text) }
.taskrow .linkbtn { justify-self: start; font-size: 12.5px }
.taskrow > .btn, .taskrow > .chip { flex: none }
.quizopts { display: grid; gap: 6px; margin-top: 6px }
.quizopts .btn { justify-content: flex-start; text-align: left; white-space: normal; font-weight: 600 }

/* store */
.storegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px }
.storetile { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px; display: grid; gap: 4px; align-content: start; justify-items: start }
.storetile.locked .storeprev { opacity: .75 }
.storeprev { width: 100%; height: 140px; border-radius: 9px; background: radial-gradient(ellipse at 50% 40%, #3A4352, #14181F); display: grid; place-items: center; overflow: hidden; margin-bottom: 6px }
.storeprev svg { height: 132px; width: auto }
.storetile .btn { margin-top: 4px }
.pcard.swatchcard { width: 88px; min-height: 0; height: 122px; padding: 0 }
@media (max-width: 560px) { .storegrid { grid-template-columns: repeat(2, minmax(0, 1fr)) } .taskrow { flex-direction: column; align-items: stretch } }

/* team + milestone cards (My Cards) */
.collectible.teamcard .monogram { background: rgba(255,255,255,.92) }
.collectible.teamcard .monogram .badgeimg { width: 44px; height: 44px }
.collectible.milestonecard { border: 2px solid transparent; background: linear-gradient(var(--ink), var(--ink)) padding-box, linear-gradient(135deg, #FF9AD9, #8FD9FF, #FFE58F, #B9A8FF) border-box }
.collectible.milestonecard .mark { font-family: var(--display); font-size: 28px; color: var(--tier) }
.collectible .chip { position: relative; z-index: 1; align-self: flex-start }
.terms { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--muted) }
.terms strong { color: var(--text) }
.gate-card .terms { max-height: 46vh; overflow-y: auto }

/* unlock celebrations (dashboard) */
.unlockbox { background: var(--ink); color: var(--on-ink); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; border: 2px solid transparent; background: linear-gradient(var(--ink), var(--ink)) padding-box, linear-gradient(135deg, #FF9AD9, #8FD9FF, #FFE58F, #F2A531) border-box }
.unlockbox h2 { font-size: 26px }
.unlockbox p { color: var(--on-ink-muted) }
.unlockbox .eyebrow { color: var(--accent) }
.unlockbox .btn.ghost { color: var(--on-ink); border-color: #4A5260 }
.unlockgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 12px }
.unlockitem { display: flex; gap: 12px; align-items: center; background: var(--ink2); border-radius: 12px; padding: 10px }
.unlockprev { flex: none; width: 64px; height: 76px; border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, #3A4352, #14181F); display: grid; place-items: center; overflow: hidden }
.unlockprev svg { height: 74px; width: auto }
.unlockprev .pcard.swatchcard { width: 44px; height: 60px }
.unlocklevel { font-family: var(--display); font-weight: 800; font-size: 32px; color: var(--accent) }
.unlocktext { display: grid; gap: 3px; justify-items: start; min-width: 0 }
.unlocktext .small { color: var(--on-ink-muted) }
.unlocktext .btn { margin-top: 4px }
