/* FNF Track Notes — driver development platform
   Light-first ("Open Air"), dark "Pit Lane" theme.
   Type: Archivo (display, wdth 115–125) · Figtree (UI/body) · IBM Plex Mono (timing data only). */

:root {
  --bg: #f8f7f5;
  --surface: #ffffff;
  --surface-2: #f3f2ef;
  --border: #e8e6e1;
  --border-strong: #d9d6d0;
  --text: #16151a;
  --text-2: #46434d;
  --text-3: #807c88;
  --pink: #f10094;
  --pink-deep: #c30077;
  --pink-tint: #fdeef7;
  --pink-soft: #ff79c2;
  --gold: #e8b23a;
  --gold-deep: #9a7110;
  --gold-tint: #fdf6e7;
  --green: #1d9e56;
  --green-tint: #e9f7ef;
  --red: #d8303f;
  --shadow: 0 1px 2px rgba(22, 21, 26, 0.05);
  --shadow-up: 0 4px 16px rgba(22, 21, 26, 0.08);
  --dg-track: #e9e8ee;
  --dg-asphalt: #e7e5ed;
  --dg-asphalt-edge: #d3d0dc;
  --dg-center: #b4b1c0;
  --disp: "Archivo", "Figtree", sans-serif;
  --sans: "Figtree", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --r-card: 16px;
  --r-ui: 10px;
}
[data-theme="dark"] {
  --bg: #121116;
  --surface: #1a191f;
  --surface-2: #232229;
  --border: #2c2b33;
  --border-strong: #3a3942;
  --text: #f5f4f7;
  --text-2: #b8b5c0;
  --text-3: #8a8794;
  --pink: #ff2ea6;
  --pink-deep: #ff5cb8;
  --pink-tint: rgba(241, 0, 148, 0.13);
  --gold: #ecbd54;
  --gold-deep: #ecbd54;
  --gold-tint: rgba(232, 178, 58, 0.12);
  --green: #3fcd83;
  --green-tint: rgba(56, 217, 124, 0.12);
  --red: #ff5d6b;
  --shadow: none;
  --shadow-up: none;
  --dg-track: #232229;
  --dg-asphalt: #26252e;
  --dg-asphalt-edge: #34323d;
  --dg-center: #4d4b57;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; max-width: 100%; /* backstop: the page never scrolls sideways on a phone */
}
/* never let long unbreakable words (URLs, emails) push the layout wider than the screen */
.note, .tm-addr, .lvl-b, .rc-d, .earn-l, .cmt p, .sub { overflow-wrap: anywhere; }
a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--text); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

h1, h2, h3 { font-family: var(--disp); font-variation-settings: "wdth" 115; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; }
h2 { font-size: 1.375rem; line-height: 1.3; font-weight: 700; }
h3 { font-size: 1.125rem; line-height: 1.4; font-weight: 600; font-family: var(--sans); }
.mono { font-family: var(--mono); }
.sub { color: var(--text-2); font-size: 0.9375rem; margin: 0; }
.meta { color: var(--text-3); font-size: 0.8125rem; }
.sess-acts { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.linkbtn.danger { color: var(--red); }
.yt-note { margin-top: 6px; color: var(--pink); font-weight: 600; line-height: 1.35; }
/* share-card preview + customise modal */
.share-modal { background: var(--surface); border-radius: 20px; padding: 18px; width: 92%; max-width: 440px; max-height: 92vh; overflow-y: auto; text-align: left; }
.share-modal-h { display: flex; align-items: center; justify-content: space-between; }
.share-modal-h h2 { margin: 0; font-size: 1.3rem; }
.share-x { border: 0; background: transparent; color: var(--text-3); font-size: 1.1rem; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.share-x:hover { background: var(--border); color: var(--text-1); }
.share-preview { display: flex; justify-content: center; margin: 4px 0 14px; }
.share-canvas { width: auto; height: 44vh; max-height: 400px; border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,0.32); }
.share-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.share-opt { border: 1px solid var(--border); background: transparent; color: var(--text-2); border-radius: 999px; padding: 7px 13px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.share-opt.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.share-actions { display: flex; gap: 10px; }
.share-actions .btn { flex: 1; }
/* advanced mode: corner-by-corner table + reference points */
.adv-track { margin-bottom: 12px; }
.corner-tbl { display: flex; flex-direction: column; gap: 12px; }
.corner-row { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.corner-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.corner-label { flex: 1; min-width: 0; font-family: var(--disp); font-weight: 700; font-size: 1rem; color: var(--text-1); border: 0; border-bottom: 2px solid var(--border); background: transparent; padding: 4px 2px; }
.corner-label:focus { outline: none; border-bottom-color: var(--pink); }
.corner-del { flex: none; border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 6px 8px; border-radius: 8px; }
.corner-del:hover { color: var(--red); background: var(--pink-tint); }
.corner-fields { display: grid; gap: 9px; }
.cf { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 600; color: var(--text-3); }
.cf input, .cf textarea { width: 100%; font: inherit; font-size: 0.9rem; font-weight: 400; color: var(--text-1); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: var(--surface); }
.cf input:focus, .cf textarea:focus { outline: none; border-color: var(--pink); }
.cf-notes textarea { min-height: 60px; resize: vertical; }
.corner-notes { margin-top: 10px; }
.corner-notes > summary { cursor: pointer; font-weight: 600; color: var(--pink); font-size: 0.85rem; list-style: none; }
.corner-notes > summary::-webkit-details-marker { display: none; }
.corner-notes .note { margin-top: 8px; }
.yt-note b { font-weight: 800; }
.section-h { margin: 32px 0 4px; }
.section-h + .sub { margin-bottom: 16px; }

/* ---------- top navbar (desktop) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topnav-in { max-width: 1560px; margin: 0 auto; padding: 0 40px; height: 64px; display: flex; align-items: center; gap: 24px; }
.wordmark { font-family: var(--disp); font-variation-settings: "wdth" 125; font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.wordmark em { font-style: normal; color: var(--pink); }
.wordmark:hover { text-decoration: none; }
.navlinks { display: flex; gap: 4px; flex: 1; justify-content: center; }
.navlink {
  display: flex; align-items: center; gap: 8px; background: none; border: 0; white-space: nowrap;
  font-weight: 600; font-size: 15px; color: var(--text-3); padding: 0 14px; height: 64px;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.navlink:hover { color: var(--text); }
.navlink.active { color: var(--text); border-bottom-color: var(--pink); }
.navlink .ic { width: 18px; height: 18px; }
.navright { display: flex; align-items: center; gap: 12px; }

.delta-chip {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--green-tint); color: var(--green);
}
.delta-chip.zero { background: var(--surface-2); color: var(--text-3); }
.delta-chip.gold { background: var(--gold-tint); color: var(--gold-deep); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; overflow: hidden;
  font-family: var(--disp); font-weight: 700; font-size: 15px; color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.av-g0 { background: linear-gradient(135deg, #f10094, #8b005a); }
.av-g1 { background: linear-gradient(135deg, #2d6cdf, #173a78); }
.av-g2 { background: linear-gradient(135deg, #e8901a, #9a5408); }
.av-g3 { background: linear-gradient(135deg, #1d9e56, #0d5a2f); }
.av-g4 { background: linear-gradient(135deg, #7a3df0, #41208a); }
.av-g5 { background: linear-gradient(135deg, #d8303f, #7c1320); }
.av-g6 { background: linear-gradient(135deg, #0fa3a3, #075c5c); }
.av-g7 { background: linear-gradient(135deg, #5b6472, #262b33); }

/* ---------- layout ---------- */
#app { max-width: 1560px; margin: 0 auto; padding: 20px 16px calc(96px + var(--safe-b)); }
.layout { display: block; }
.rail { margin-top: 24px; }
@media (min-width: 900px) {
  #app { padding: 34px 40px 64px; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
  .rail { margin-top: 0; position: sticky; top: 88px; }
  .tabbar { display: none !important; }
  .mobile-top { display: none !important; }
}
/* large desktops: roomier padding, more columns, slightly larger base type */
@media (min-width: 1280px) {
  #app { padding: 40px 56px 72px; }
  .layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; }
  body { font-size: 17px; }
  .course-grid, .res-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1700px) {
  .course-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 899px) {
  .topnav { display: none !important; }
}

/* slim mobile top bar */
.mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 14px; max-width: 100%; }
.mobile-top .wordmark { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mobile-top .navright { gap: 8px; flex: none; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
@media (min-width: 900px) { .card { padding: 24px; } }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-h h3 { font-size: 1.0625rem; }
.gold-top { border-top: 3px solid var(--gold); }

/* ---------- chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); color: var(--text-3);
}
.chip .ic { width: 13px; height: 13px; }
.chip.pink { background: var(--pink-tint); color: var(--pink-deep); }
.chip.gold { background: var(--gold-tint); color: var(--gold-deep); }
.chip.green { background: var(--green-tint); color: var(--green); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pink); color: #fff; border: 0; border-radius: var(--r-ui);
  font-weight: 600; font-size: 15px; padding: 11px 20px; min-height: 44px;
  transition: filter 0.12s, transform 0.06s;
}
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.btn.ghost { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.gold { background: var(--gold); color: #3a2c08; }
.btn.sm { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.linkbtn { background: none; border: 0; color: var(--pink-deep); font-weight: 600; font-size: 14px; padding: 4px 0; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui);
  padding: 11px 14px; outline: none; transition: border-color 0.12s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--pink); }
.field textarea { min-height: 88px; resize: vertical; }
.form-err { color: var(--red); font-size: 14px; margin: 8px 0; min-height: 20px; }
.pw-hint { font-size: 12px; margin: 4px 2px 0; min-height: 16px; color: var(--muted, #888); }
.pw-hint.weak { color: var(--red, #c0392b); }
.pw-hint.ok { color: #b8860b; }
.pw-hint.strong { color: #1a8f4c; }
.pw-forgot { background: none; border: none; color: #f10094; font: inherit; font-size: 13px; cursor: pointer; padding: 2px; margin: -2px 0 6px; align-self: flex-start; }
#verify-banner { display: flex; align-items: center; gap: 10px; background: #fff3d6; color: #5a4500; border-bottom: 1px solid #e8b23a; padding: 9px 16px; font-size: 14px; }
#verify-banner .vb-btn { margin-left: auto; background: #16151a; color: #fff; border: none; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
#verify-banner .vb-btn:disabled { opacity: .6; }
#verify-banner .vb-x { background: none; border: none; color: inherit; font-size: 16px; cursor: pointer; padding: 2px 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- searchable combobox (tracks) ---------- */
.combo { position: relative; }
.combo-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui);
  padding: 11px 14px; outline: none; transition: border-color 0.12s;
}
.combo-input:focus { border-color: var(--pink); }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow-up); max-height: 264px; overflow-y: auto; padding: 4px;
}
.combo-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px 12px; font-size: 14.5px; }
.combo-opt:hover, .combo-opt.on { background: var(--surface-2); }
.combo-opt.add { color: var(--pink-deep); font-weight: 600; }
.combo-state { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.combo-empty { padding: 10px 12px; color: var(--text-3); font-size: 13.5px; }

/* ---------- progress ---------- */
.pbar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: var(--pink); transition: width 0.4s ease; }
.pbar.gold i { background: var(--gold); }
.pct { font-weight: 700; font-size: 14px; color: var(--pink-deep); }
.sectors { display: flex; gap: 3px; margin: 10px 0 4px; }
.sectors span { flex: 1; height: 8px; border-radius: 3px; background: var(--surface-2); }
.sectors span.done { background: var(--pink); }
.sectors span.part { background: linear-gradient(90deg, var(--pink) 50%, var(--surface-2) 50%); }
.sectors span.gold { background: var(--gold); }

/* ---------- stat blocks ---------- */
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat .v { font-family: var(--mono); font-weight: 600; font-size: 1.5rem; line-height: 1.2; }
.stat .v.pink { color: var(--pink-deep); }
.stat .v.gold { color: var(--gold-deep); }
.stat .v.green { color: var(--green); }
.stat .k { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-top: 2px; }

/* ---------- course cards (classroom) ---------- */
.course-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .course-grid { grid-template-columns: 1fr 1fr; } }
.course-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden; text-align: left; padding: 0; box-shadow: var(--shadow);
  transition: transform 0.08s, box-shadow 0.12s; display: flex; flex-direction: column;
}
button.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.cc-cover { aspect-ratio: 16/7.5; display: block; width: 100%; position: relative; overflow: hidden; background: #15141a; }
.cc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-grad { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10,9,13,0.82) 0%, rgba(10,9,13,0.32) 55%, rgba(10,9,13,0.12) 100%); }
.cc-grad.accent-pink { box-shadow: inset 0 -4px 0 var(--pink); }
.cc-grad.accent-gold { box-shadow: inset 0 -4px 0 var(--gold); }
.cc-grad.accent-green { box-shadow: inset 0 -4px 0 var(--green); }
.cc-code { position: absolute; left: 16px; bottom: 12px; font-family: var(--disp); font-variation-settings: "wdth" 125; font-weight: 800; font-size: 30px; color: #fff; letter-spacing: -0.01em; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.cc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-title { font-family: var(--disp); font-variation-settings: "wdth" 115; font-weight: 700; font-size: 1.125rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-blurb { color: var(--text-2); font-size: 14px; line-height: 1.5; flex: 1; }
.cc-meta { color: var(--text-3); font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.course-card.is-locked .cc-cover { filter: saturate(0.25) opacity(0.75); }
.unlock-reveal { display: flex; gap: 8px; margin-top: 4px; }
.unlock-reveal input {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui);
  padding: 9px 12px; outline: none; font-family: var(--mono); font-size: 14px; letter-spacing: 1px;
}
.unlock-reveal input:focus { border-color: var(--pink); }

/* ---------- module rows (course detail) ---------- */
.group-h { font-size: 13px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-3); margin: 24px 0 10px; }
.mrow {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
  transition: transform 0.08s;
}
.mrow:hover { transform: translateX(2px); }
.mrow .num {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 700; font-size: 15px;
  background: var(--surface-2); color: var(--text-3);
}
.mrow.is-progress .num { background: var(--pink-tint); color: var(--pink-deep); }
.mrow.is-done .num { background: var(--gold-tint); color: var(--gold-deep); }
.mrow .ti { flex: 1; min-width: 0; }
.mrow .ti .t { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.mrow .ti .s { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.mrow .ic.chev { color: var(--text-3); width: 18px; }

/* ---------- lesson page ---------- */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; flex-wrap: wrap; }
.crumb button { background: none; border: 0; color: var(--text-3); font-size: 13.5px; font-weight: 600; padding: 2px 0; }
.crumb button:hover { color: var(--pink-deep); }
.crumb .sep { opacity: 0.5; }
.crumb .here { color: var(--text-2); font-weight: 600; }

.vid-frame {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 16px; background: #000;
}
.vid-frame.ratio { padding-top: 56.25%; }
.vid-frame.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-frame .voomly-embed { display: block; }
.lv-n { width: 28px; height: 28px; border-radius: 8px; background: var(--pink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; font-family: var(--disp); }
.lesson-seg button { min-width: max-content; }
.lesson-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.lesson-head h2 { font-size: 1.3rem; }

.seg { display: flex; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 5px; margin: 16px 0; overflow-x: auto; }
.seg button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: none; border: 0; border-radius: 9px; padding: 9px 12px;
  font-weight: 600; font-size: 14px; color: var(--text-3); white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button .done-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

.idea { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.idea:last-child { border-bottom: 0; }
.idea .dot {
  width: 28px; height: 28px; border-radius: 8px; flex: none; margin-top: 1px;
  background: var(--pink-tint); color: var(--pink-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 700; font-size: 13px;
}
.idea p { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--text-2); }

.dg-card { padding: 12px 12px 6px; }
.dg { width: 100%; height: auto; display: block; }

/* ---------- quiz ---------- */
.q-segs { display: flex; gap: 4px; margin-bottom: 16px; }
.q-segs span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-2); }
.q-segs span.ok { background: var(--green); }
.q-segs span.bad { background: var(--red); }
.q-segs span.now { background: var(--pink); }
.q-text { font-size: 1.125rem; font-weight: 600; line-height: 1.45; margin: 0 0 16px; }
.q-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 12px;
  font-size: 15px; padding: 13px 16px; margin-bottom: 10px; min-height: 52px; color: var(--text-2);
  transition: border-color 0.1s;
}
.q-opt .ltr {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--surface-2); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.q-opt:hover { border-color: var(--pink); }
.q-opt.correct { border-color: var(--green); background: var(--green-tint); color: var(--text); }
.q-opt.correct .ltr { background: var(--green); color: #fff; }
.q-opt.wrong { border-color: var(--red); background: rgba(216, 48, 63, 0.07); }
.q-opt.wrong .ltr { background: var(--red); color: #fff; }
.q-opt.dim { opacity: 0.45; }
.q-explain {
  background: var(--surface-2); border-left: 3px solid var(--pink); border-radius: 0 10px 10px 0;
  padding: 12px 16px; font-size: 14.5px; color: var(--text-2); margin: 4px 0 16px; animation: rise 0.25s ease;
}
.q-result { text-align: center; padding: 28px 10px; }
.q-result .ring {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: 2rem;
}
.q-result .ring.pass { background: var(--gold-tint); color: var(--gold-deep); border: 4px solid var(--gold); }
.q-result .ring.fail { background: var(--pink-tint); color: var(--pink-deep); border: 4px solid var(--pink); }

/* ---------- checklist & homework ---------- */
.ck {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.ck .box {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-strong); flex: none;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
  color: #3a2c08; transition: all 0.15s;
}
.ck .box .ic { width: 16px; height: 16px; stroke-width: 2.5; }
.ck.on { border-color: var(--gold); background: var(--gold-tint); }
.ck.on .box { background: var(--gold); border-color: var(--gold); }
.ck .tx .t { font-weight: 600; font-size: 15px; display: block; }
.ck .tx .d { color: var(--text-3); font-size: 13.5px; margin-top: 2px; display: block; }

.hw { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border-left: 4px solid var(--border-strong); }
.hw.bronze { border-left-color: #c1814a; } .hw.silver { border-left-color: #9aa3ad; } .hw.gold { border-left-color: var(--gold); }
.hw.cleared { background: var(--gold-tint); }
.hw-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.hw-medal { font-size: 26px; line-height: 1; }
.hw-title { flex: 1; display: flex; flex-direction: column; font-weight: 800; font-size: 15px; text-transform: capitalize; font-family: var(--disp); letter-spacing: 0.2px; }
.hw.bronze .hw-title { color: #ad6a32; } .hw.silver .hw-title { color: #6e7a87; } .hw.gold .hw-title { color: var(--gold-deep); }
.hw-blurb { font-family: var(--sans); font-weight: 500; font-size: 12px; text-transform: none; color: var(--text-3); margin-top: 1px; letter-spacing: 0; }
.hw .ck { border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: 0; box-shadow: none; background: transparent; }
.hw .ck.on { background: rgba(232,178,58,0.12); }

/* ---------- logbook ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; row-gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head > div { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 460px) { .page-head > div { width: 100%; } .page-head > div .btn { flex: 1 1 0; min-width: 0; justify-content: center; } }
.bars { display: flex; gap: 10px; align-items: flex-end; height: 90px; margin-top: 16px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.bar b { font-family: var(--mono); font-size: 11px; color: var(--text-2); font-weight: 600; }
.bar i { width: 100%; max-width: 44px; display: block; border-radius: 6px 6px 2px 2px; background: var(--surface-2); }
.bar i.on { background: var(--pink); opacity: 0.85; }
.bar span { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.tbest { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.tbest:last-child { border-bottom: 0; }
.tbest .tname { font-weight: 600; font-size: 14.5px; flex: 1; line-height: 1.3; }
.tbest .tmeta { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.tbest .tlap { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--text); }

.sess { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.sess .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sess .d { font-size: 13px; color: var(--text-3); font-weight: 600; }
.sess .lap { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; }
.sess .tr { font-weight: 700; font-size: 16px; margin: 2px 0 6px; }
.sess .note { font-size: 14px; color: var(--text-2); margin-top: 8px; white-space: pre-wrap; line-height: 1.5; }
.sess .note b { color: var(--text-3); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; display: block; }
.rate { display: flex; gap: 6px; margin: 6px 0 2px; }
.rate button { flex: 1; min-height: 44px; border-radius: 9px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text-3); font-family: var(--mono); font-size: 15px; }
.rate button.on { border-color: var(--pink); background: var(--pink-tint); color: var(--pink-deep); font-weight: 600; }
.rate-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 10px; }

/* ---------- club / leaderboard ---------- */
.member-strip { display: flex; align-items: center; margin-top: 12px; }
.member-strip .avatar { margin-right: -9px; border: 2px solid var(--surface); }
.member-strip .more { margin-left: 16px; font-size: 13.5px; font-weight: 600; color: var(--text-3); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--border); border-radius: 10px; }
.lb-row:last-child { border-bottom: 0; }
.lb-row.me { background: var(--pink-tint); border-bottom-color: transparent; }
.lb-pos { font-family: var(--disp); font-weight: 800; font-size: 16px; color: var(--text-3); min-width: 26px; text-align: center; }
.lb-pos.p1 { color: var(--gold-deep); } .lb-pos.p2 { color: #6e7a87; } .lb-pos.p3 { color: #ad6a32; }
.lb-nm { flex: 1; font-weight: 600; font-size: 15px; min-width: 0; }
.lb-nm .lvl { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); }
.lb-meta { font-size: 12.5px; color: var(--text-3); text-align: right; white-space: nowrap; }
.accordion summary { font-weight: 600; cursor: pointer; padding: 6px 0; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.accordion summary::before { content: "+"; font-weight: 700; color: var(--pink-deep); width: 16px; }
.accordion[open] summary::before { content: "–"; }

/* ---------- events ---------- */
.ev { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.ev:last-child { border-bottom: 0; }
.ev-date { min-width: 56px; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 8px 6px; }
.ev-date .dd { display: block; font-family: var(--disp); font-weight: 800; font-size: 19px; line-height: 1.1; }
.ev-date .mm { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--pink-deep); letter-spacing: 0.5px; }
.ev-body { flex: 1; min-width: 0; }
.ev-body .t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.ev-body .m { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.ev-del { background: none; border: 0; color: var(--text-3); font-size: 15px; padding: 6px 8px; }
.ev-del:hover { color: var(--red); }
.ev-admin { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.ev-pin, .ev-edit { background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 5px 8px; border-radius: 8px; font-size: 14px; }
.ev-pin svg { width: 15px; height: 15px; }
.ev-pin:hover, .ev-edit:hover { background: var(--border); color: var(--text-1); }
.ev-pin.on { color: var(--gold); }
/* events month calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cal-nav b { font-family: var(--disp); font-size: 1.05rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--text-3); padding: 2px 0; }
.cal-cell { min-height: 66px; border: 1px solid var(--border); border-radius: 9px; padding: 4px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-cell.out { border-color: transparent; background: transparent; }
.cal-cell.today { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink) inset; }
.cal-cell.has { background: var(--surface-2, rgba(241,0,148,0.04)); }
.cal-d { font-size: 0.72rem; font-weight: 700; color: var(--text-3); }
.cal-cell.today .cal-d { color: var(--pink); }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; padding: 2px 5px; font-size: 0.66rem; line-height: 1.25; cursor: pointer; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--text-3); }
.cal-ev.kind-coaching { background: var(--pink); } .cal-ev.kind-sim { background: var(--gold); color: var(--near-black, #16151a); } .cal-ev.kind-meetup { background: #2e9e6b; } .cal-ev.kind-other { background: var(--text-2, #555); }
.cal-ev.pinned { outline: 1.5px solid var(--gold); }
.cal-more { font-size: 0.62rem; color: var(--text-3); padding-left: 4px; }
@media (max-width: 420px) { .cal-cell { min-height: 54px; } .cal-ev { font-size: 0; padding: 3px; } .cal-ev::before { content: '•'; font-size: 0.8rem; } }
/* calendar agenda — a readable list under the grid (the grid is dots-only on mobile, so titles live here) */
.cal-agenda { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.cal-ag { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; cursor: pointer; color: inherit; }
.cal-ag:hover { border-color: var(--pink); }
.cal-ag-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--text-3); }
.cal-ag-dot.kind-coaching { background: var(--pink); } .cal-ag-dot.kind-sim { background: var(--gold); } .cal-ag-dot.kind-meetup { background: #2e9e6b; } .cal-ag-dot.kind-other { background: var(--text-2, #555); }
.cal-ag-d { font-size: 0.78rem; font-weight: 700; color: var(--text-3); flex: 0 0 auto; min-width: 96px; }
.cal-ag-t { font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* leaderboard sub-tabs + share-period row — natural-width buttons that scroll on narrow screens */
.lb-subtabs { overflow-x: auto; }
.lb-subtabs button { flex: 0 0 auto; white-space: nowrap; }
.share-period { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- onboarding / start here ---------- */
.ob-step { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14.5px; font-weight: 500; color: var(--text-2); }
.ob-step .box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.ob-step.done { color: var(--text-3); text-decoration: line-through; }
.ob-step.done .box { background: var(--green); border-color: var(--green); }
.ob-step .box .ic { width: 13px; height: 13px; stroke-width: 3; }

/* ---------- auth ---------- */
.auth-view { min-height: 100vh; }
.auth-bg { position: fixed; inset: 0; z-index: 0; background: #0a0a0d url('img/hero.jpg') center/cover no-repeat; }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,13,0.55) 0%, rgba(10,9,13,0.75) 55%, rgba(10,9,13,0.92) 100%); }
.auth-wrap { position: relative; z-index: 1; max-width: 430px; margin: 0 auto; padding: 9vh 20px 40px; }
.auth-hero { text-align: center; padding: 12px 0 18px; }
.auth-hero .kick { font-size: 13px; font-weight: 700; letter-spacing: 3px; color: var(--pink-soft); text-transform: uppercase; }
.auth-hero h1 { font-size: clamp(2rem, 8vw, 3rem); font-variation-settings: "wdth" 115; font-weight: 800; margin: 8px 0; color: #fff; line-height: 1; overflow-wrap: break-word; }
.auth-hero p { color: rgba(255,255,255,0.82); font-size: 15.5px; margin: 0 auto; max-width: 360px; line-height: 1.5; }
.auth-toggle { display: flex; gap: 8px; margin: 24px 0 16px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 5px; backdrop-filter: blur(8px); }
.auth-toggle button { flex: 1; min-height: 42px; border-radius: 9px; border: 0; background: none; color: rgba(255,255,255,0.7); font-weight: 600; font-size: 15px; }
.auth-toggle button.on { background: #fff; color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.auth-view .card { box-shadow: 0 12px 40px rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.5); }
.auth-view .consent { color: var(--text-2); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--pink); }

/* ---------- race control ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.drv { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.drv:hover { transform: translateX(2px); }
.drv .nm { font-weight: 600; font-size: 15px; }
.drv .dmeta { font-size: 12.5px; color: var(--text-3); }
.minisec { display: flex; gap: 2px; margin-top: 5px; }
.minisec span { width: 11px; height: 5px; border-radius: 2px; background: var(--surface-2); }
.minisec span.done { background: var(--pink); }
.minisec span.gold { background: var(--gold); }

/* embed config rows */
.vrow { padding: 12px 0; border-bottom: 1px solid var(--border); }
.vrow:last-child { border-bottom: 0; }
.vrow .vr-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14.5px; }
.vrow textarea { width: 100%; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; font-family: var(--mono); font-size: 12.5px; padding: 10px; min-height: 64px; }

/* ---------- tab bar (mobile) ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(8px + var(--safe-b));
}
.tab {
  flex: 1; min-width: 0; max-width: 130px; background: none; border: 0; color: var(--text-3);
  font-weight: 600; font-size: 10px; line-height: 1.1;
  display: flex; flex-direction: column; gap: 3px; align-items: center; padding: 5px 1px;
}
.tab .ic { width: 21px; height: 21px; }
@media (max-width: 380px) { .tab { font-size: 9px; } .tab .ic { width: 20px; height: 20px; } }
.tab.active { color: var(--pink-deep); }

/* ---------- toast & overlay ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); z-index: 99;
  background: var(--text); color: var(--bg);
  border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 500; max-width: 88vw;
  box-shadow: var(--shadow-up); animation: rise 0.25s ease;
}
@media (min-width: 900px) { .toast { bottom: 32px; } }
.toast.gold { background: var(--gold); color: #3a2c08; }

#overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 9, 13, 0.78); backdrop-filter: blur(3px); animation: fadein 0.2s ease; padding: 24px;
}
.celebrate { text-align: center; color: #fff; max-width: 420px; animation: rise 0.35s ease; }
.celebrate .checkers { height: 14px; background: repeating-conic-gradient(#fff 0% 25%, transparent 0% 50%) 0 0 / 14px 14px; opacity: 0.9; border-radius: 4px; margin: 18px 0; animation: sweep 1.2s ease; }
.celebrate .big-lap { font-family: var(--mono); font-weight: 600; font-size: clamp(3rem, 14vw, 4.5rem); line-height: 1; }
.celebrate .what { font-size: 15px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: #f7c95e; }
.celebrate h2 { color: #fff; font-size: 1.75rem; margin: 8px 0; }
.celebrate .sub { color: rgba(255, 255, 255, 0.75); }
.celebrate .btn { margin-top: 20px; }
@keyframes sweep { from { background-position: -200px 0; } to { background-position: 0 0; } }

/* offline pill */
.offline-pill { font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px; color: var(--gold-deep); background: var(--gold-tint); padding: 4px 10px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }

/* skeletons */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; height: 48px; margin-bottom: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* empty states */
.empty { text-align: center; padding: 28px 16px; color: var(--text-3); }
.empty .ic { width: 36px; height: 36px; margin: 0 auto 10px; display: block; opacity: 0.6; }

/* ---------- home hero ---------- */
.home-hero { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 18px; min-height: 280px; display: flex; align-items: flex-end; box-shadow: var(--shadow-up); }
.hh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hh-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,13,0.15) 0%, rgba(10,9,13,0.45) 45%, rgba(10,9,13,0.9) 100%); }
.hh-content { position: relative; width: 100%; padding: 20px; }
.hh-top { margin-bottom: 16px; }
.hh-kick { font-family: var(--disp); font-variation-settings: "wdth" 115; font-weight: 800; font-size: 1.9rem; color: #fff; line-height: 1; text-shadow: 0 2px 14px rgba(0,0,0,0.5); }
.hh-delta { display: inline-flex; align-items: baseline; gap: 7px; margin-top: 8px; font-family: var(--mono); font-weight: 600; font-size: 1.3rem; color: #fff; }
.hh-delta.pos { color: #4ade80; }
.hh-delta span { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,0.75); }
.hh-card { background: rgba(255,255,255,0.97); border-radius: 14px; padding: 16px; backdrop-filter: blur(6px); }
[data-theme="dark"] .hh-card { background: rgba(26,25,31,0.97); }
.hh-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hh-mod { font-family: var(--disp); font-variation-settings: "wdth" 115; font-weight: 700; font-size: 1.3rem; line-height: 1.1; margin-bottom: 10px; }
@media (min-width: 640px) { .home-hero { min-height: 320px; } .hh-content { padding: 28px; } .hh-kick { font-size: 2.4rem; } .hh-card { max-width: 440px; } }

/* ---------- home community feed ---------- */
.home-post { display: flex; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow); align-items: flex-start; }
.home-post:hover { box-shadow: var(--shadow-up); }
.hp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.hp-top b { font-weight: 700; }
.hp-text { font-size: 14.5px; color: var(--text-2); line-height: 1.4; }
.hp-meta { font-size: 12px; color: var(--text-3); }

/* ---------- free resources ---------- */
.res-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .res-grid { grid-template-columns: 1fr 1fr; } }
.res-card { display: flex; gap: 14px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); align-items: center; transition: transform 0.08s, box-shadow 0.12s; }
button.res-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.res-cover { width: 88px; height: 88px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.res-cover img { width: 100%; height: 100%; object-fit: cover; }
.res-cover-fb .ic { width: 30px; height: 30px; color: var(--text-3); }
.res-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.res-title { font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.res-blurb { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.res-pages { display: flex; flex-direction: column; gap: 14px; }
.res-page { width: 100%; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); display: block; }

/* ---------- coach tip ---------- */
.coach { border-left: 3px solid var(--pink); }
.carry-card { border-left: 3px solid var(--gold); }
.carry-card .coach-h { color: var(--gold-deep); }
.carry-card p { margin: 0 0 2px; font-size: 15px; color: var(--text); font-weight: 500; line-height: 1.5; }
.coach-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--pink-deep); margin-bottom: 8px; }
.coach-h .ic { width: 18px; height: 18px; }
.coach p { margin: 0 0 8px; font-size: 15px; color: var(--text-2); line-height: 1.55; }

/* ---------- disclosure (collapsible debrief) ---------- */
.disclosure { border-top: 1px solid var(--border); margin-top: 8px; }
.disclosure summary { font-weight: 600; color: var(--pink-deep); cursor: pointer; list-style: none; padding: 12px 0 4px; font-size: 14.5px; }
.disclosure summary::-webkit-details-marker { display: none; }

/* ---------- track card + lap chart ---------- */
.track-card .ch-wrap { margin: 4px -4px 12px; }
.ch { width: 100%; height: auto; display: block; }
.ch .ch-area { fill: var(--pink); opacity: 0.08; }
.ch .ch-line { fill: none; stroke: var(--pink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch .ch-pt { fill: var(--pink); }
.ch .ch-pt-best { fill: var(--gold); stroke: var(--surface); stroke-width: 1.5; }
.ch .ch-ref { stroke-width: 1.2; stroke-dasharray: 4 4; }
.ch .ch-ref.goal { stroke: var(--gold); } .ch .ch-ref.rec { stroke: var(--text-3); opacity: 0.7; }
.ch-t { font-family: var(--mono); font-size: 9px; fill: var(--text-3); }
.ch-t.goal { fill: var(--gold-deep); } .ch-t.rec { fill: var(--text-3); }
/* interactive hover points: instant ripple + growing dot + tooltip pill */
.ch .ch-hot { fill: transparent; pointer-events: all; cursor: pointer; }
.ch .ch-dot { transform-box: fill-box; transform-origin: center; transition: transform .12s ease; }
.ch .ch-hit:hover .ch-dot, .ch .ch-hit:focus-within .ch-dot { transform: scale(1.8); }
.ch .ch-ring { fill: none; stroke: var(--pink); stroke-width: 1.5; opacity: 0; }
.ch .ch-ring.best { stroke: var(--gold); }
.ch .ch-hit:hover .ch-ring { animation: ch-ripple .5s ease-out; }
@keyframes ch-ripple { from { r: 4; opacity: .55; } to { r: 13; opacity: 0; } }
.ch .ch-tip { opacity: 0; transform: translateY(3px); transition: opacity .12s ease, transform .12s ease; pointer-events: none; }
.ch .ch-hit:hover .ch-tip, .ch .ch-hit:focus-within .ch-tip { opacity: 1; transform: translateY(0); }
.ch .ch-tip-bg { fill: var(--text-1); opacity: .96; }
.ch .ch-tip-tx { font-family: var(--mono); font-size: 9px; font-weight: 600; fill: var(--surface); }
@media (prefers-reduced-motion: reduce) { .ch .ch-dot, .ch .ch-tip { transition: none; } .ch .ch-hit:hover .ch-ring { animation: none; } }

/* ---------- goals ---------- */
.goal-row .goal-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; }
.goal-row .goal-top b { color: var(--text); }
.goal-hit { color: var(--gold-deep); font-weight: 700; }
.goal-row .linkbtn { margin-top: 6px; }
.goal-edit { display: flex; gap: 8px; }
.goal-edit input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 9px 12px; font-family: var(--mono); }
.goal-edit input:focus { border-color: var(--pink); outline: none; }

/* ---------- stats page ---------- */
.bigstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .bigstats { grid-template-columns: repeat(4, 1fr); } }
.bigstat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.bigstat .bv { font-family: var(--mono); font-weight: 600; font-size: 1.85rem; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.bigstat .bv.pos { color: var(--green); }
.bigstat .bv-sub { font-size: 1rem; color: var(--text-3); font-weight: 500; }
.bigstat .bk { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-top: 8px; }

.barchart { display: flex; gap: 10px; align-items: flex-end; height: 150px; margin-top: 14px; padding-top: 18px; }
.barcol { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.barval { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-2); height: 16px; }
.bartrack { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; background: linear-gradient(180deg, var(--surface-2) 0%, transparent 100%); border-radius: 8px 8px 0 0; }
.barfill { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--pink) 0%, var(--pink-deep) 100%); box-shadow: 0 2px 8px rgba(241,0,148,0.25); transition: height 0.5s cubic-bezier(.2,.7,.2,1); }
.barchart.gold .barfill { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%); box-shadow: 0 2px 8px rgba(232,178,58,0.25); }
.barlabel { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 8px; }

.trackstat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.ts-cell { background: var(--surface-2); border-radius: 10px; padding: 10px 8px; text-align: center; }
.ts-v { font-family: var(--mono); font-weight: 600; font-size: 17px; color: var(--text); }
.ts-v.pos { color: var(--green); }
.ts-k { font-size: 10.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px; }

/* ---------- gamification: badges & streak ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; margin-top: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 6px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); opacity: 0.45; filter: grayscale(0.9); transition: transform 0.1s; }
.badge.on { opacity: 1; filter: none; background: var(--gold-tint); border-color: rgba(232,178,58,0.4); }
.badge.on:hover { transform: translateY(-2px); }
.badge .be { font-size: 26px; line-height: 1; }
.badge .bn { font-size: 11px; font-weight: 700; color: var(--text-2); line-height: 1.2; }
.badge.on .bn { color: var(--gold-deep); }
.streak { display: inline-flex; align-items: center; gap: 8px; background: var(--gold-tint); color: var(--gold-deep); font-weight: 600; font-size: 14.5px; padding: 10px 16px; border-radius: 12px; margin-bottom: 14px; }
.streak b { font-family: var(--mono); font-size: 17px; }
.badge-big { font-size: 64px; line-height: 1; margin: 6px 0; }
.badge-big .ic { width: 60px; height: 60px; stroke: var(--gold); }

/* ---------- community ---------- */
.composer textarea { width: 100%; min-height: 70px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 12px 14px; resize: vertical; }
.composer textarea:focus { border-color: var(--pink); outline: none; }
.composer .seg { margin: 0 0 12px; }
/* collapse the composer behind a Skool-style "write something" bar; tap to expand the full thing (all viewports) */
.composer { position: relative; }
.composer-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 18px; line-height: 1; color: var(--text-3); cursor: pointer; padding: 4px 6px; }
.composer-wrap .composer { display: none; }
.composer-trigger { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 14px;
  background: var(--card); border: 1.5px solid var(--pink); border-radius: var(--r-ui);
  padding: 12px 14px; cursor: pointer; text-align: left; font: inherit;
  box-shadow: 0 1px 7px rgba(241, 0, 148, .13); transition: box-shadow .15s ease, transform .05s ease; }
.composer-trigger:hover { box-shadow: 0 4px 14px rgba(241, 0, 148, .24); }
.composer-trigger:active { transform: translateY(1px); }
.composer-trigger span { color: var(--text-2); font-size: 15px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-trigger::after { content: "Post"; margin-left: auto; align-self: center; flex: none;
  background: var(--pink); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .2px;
  padding: 8px 18px; border-radius: 999px; white-space: nowrap; }
.composer-wrap.open .composer-trigger { display: none; }
.composer-wrap.open .composer { display: block; }
/* ---------- kart-quality tracker ---------- */
.kart-add { background: var(--surface-2); border-radius: 12px; padding: 12px; margin: 4px 0 12px; }
.kart-add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kn-no { flex: 0 0 130px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 10px 12px; font: inherit; color: var(--text); }
.kn-rate { margin: 0; flex: 1 1 auto; }
.kart-add textarea { width: 100%; min-height: 52px; margin-top: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 10px 12px; resize: vertical; font: inherit; color: var(--text); }
.kart-table { width: 100%; border-collapse: collapse; }
.kart-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; padding: 0 8px 8px; }
.kart-table td { padding: 11px 8px; border-bottom: 1px solid var(--border-strong); vertical-align: middle; font-size: 14px; }
.kart-main { cursor: pointer; }
.kart-main td { background: var(--surface); }
.kart-main.kr-alt td { background: var(--surface-2); }
.kart-main:hover td { background: var(--pink-tint, rgba(241,0,148,0.07)); }
.kart-main td:first-child { border-left: 4px solid transparent; }
.kart-main.kr-good td:first-child { border-left-color: #1a8f4c; }
.kart-main.kr-bad td:first-child { border-left-color: var(--red, #c0392b); }
.kart-main.kr-mixed td:first-child { border-left-color: var(--gold); }
.kart-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 34px; padding: 0 9px; border-radius: 9px; font-weight: 800; font-size: 16px; color: #fff; vertical-align: middle; }
.kb-good { background: #1a8f4c; } .kb-bad { background: var(--red, #c0392b); } .kb-mixed { background: var(--gold-deep, #b8860b); }
.ktn { white-space: nowrap; }
.kt-count { display: block; color: var(--text-3); font-size: 11px; margin-top: 4px; }
.verdict { display: inline-block; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; margin-right: 8px; white-space: nowrap; }
.v-good { background: rgba(26,143,76,0.16); color: #1a8f4c; }
.v-bad { background: rgba(192,57,43,0.16); color: var(--red, #c0392b); }
.ktl { white-space: nowrap; }
.kts { width: 99%; }
.kt-vibe-txt { font-weight: 600; font-size: 12px; }
.vt-good { color: #1a8f4c; } .vt-bad { color: var(--red, #c0392b); } .vt-mixed { color: var(--gold-deep, #b8860b); }
.kt-note { color: var(--text-3); display: block; margin-top: 3px; font-size: 13px; }
.kt-chev { float: right; color: var(--text-3); font-weight: 700; font-size: 18px; padding-left: 8px; }
.kart-main.open .kt-chev { color: var(--pink); }
.kart-history { padding: 6px 0 8px; }
.kh-h { font-weight: 600; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.kart-entry { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; padding: 4px 0; }
.kart-banner { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.kb-grab, .kb-avoid { font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.kb-grab { background: rgba(26,143,76,0.16); color: #1a8f4c; }
.kb-avoid { background: rgba(192,57,43,0.16); color: var(--red, #c0392b); }
.trev-stars { display: flex; gap: 2px; margin-bottom: 8px; }
.trev-star { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--gold, #e8b23a); cursor: pointer; padding: 0 2px; }
.trev-form textarea { width: 100%; min-height: 52px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 10px 12px; resize: vertical; font: inherit; color: var(--text); }
.trev-item { border-bottom: 1px solid var(--border); padding: 8px 0; }
.trev-item:last-child { border-bottom: 0; }
.trev-top { display: flex; align-items: center; gap: 8px; }
.trev-rating { color: var(--gold, #e8b23a); font-size: 15px; letter-spacing: 1px; }
.trev-off { color: var(--border-strong); }
.trev-body { margin: 4px 0 0; line-height: 1.4; }
.trev-top .ke-x { margin-left: auto; }
.track-list { display: flex; flex-direction: column; gap: 2px; }
.ke-rate { flex: 0 0 auto; }
.ke-body { flex: 1 1 auto; line-height: 1.35; }
.ke-x { flex: 0 0 auto; background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.kart-empty { color: var(--text-3); padding: 10px 4px; }
.filter-chips { display: flex; gap: 8px; margin: 16px 0; overflow-x: auto; }
.fchip { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: 14px; color: var(--text-3); white-space: nowrap; }
.fchip.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); cursor: pointer; }
.post:hover { box-shadow: var(--shadow-up); }
.post-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-who { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.post-who .nm { font-weight: 700; font-size: 14.5px; }
.post-body { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.pb-attach { display: flex; align-items: center; gap: 8px; background: var(--gold-tint); color: var(--gold-deep); border-radius: 10px; padding: 10px 14px; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.pb-attach .ic { width: 18px; height: 18px; }
.post-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.post-act { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--text-3); font-weight: 600; font-size: 13.5px; padding: 6px 10px; border-radius: 8px; }
.post-act .ic { width: 17px; height: 17px; }
.post-act:hover { background: var(--surface-2); color: var(--text); }
.post-act.on { color: var(--pink-deep); }
.post-act.on .ic { fill: var(--pink); stroke: var(--pink); }
.post-act.del:hover { color: var(--red); }
.cmt { padding: 12px 0; border-top: 1px solid var(--border); }
.cmt-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cmt-top .nm { font-weight: 700; font-size: 13.5px; }
.cmt p { margin: 0 0 0 40px; font-size: 14.5px; color: var(--text-2); line-height: 1.5; white-space: pre-wrap; }

/* ---------- insights ---------- */
.missed { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.missed:last-child { border-bottom: 0; }
.missed-bar { width: 54px; height: 54px; border-radius: 10px; background: var(--surface-2); position: relative; overflow: hidden; flex: none; display: flex; align-items: flex-end; }
.missed-bar i { display: block; width: 100%; background: linear-gradient(180deg, var(--red), rgba(216,48,63,0.5)); }
.missed-tx { flex: 1; min-width: 0; }
.missed-tx .mq { font-weight: 600; font-size: 14.5px; line-height: 1.35; }

.pb-shortcut { margin: 4px 0 16px; }
.yt-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--pink-deep); }
.yt-link .ic { width: 16px; height: 16px; }

/* ---------- module diagrams — premium theme-aware schematics ---------- */
.dg .dg-s-pink0 { stop-color: var(--pink); } .dg .dg-s-pink1 { stop-color: var(--pink-deep); }
.dg .dg-s-gold0 { stop-color: var(--gold); } .dg .dg-s-gold1 { stop-color: var(--gold-deep); }
/* asphalt ribbon */
.dg .dg-edge { stroke: var(--dg-asphalt-edge); stroke-width: 46; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dg .dg-asphalt { stroke: var(--dg-asphalt); stroke-width: 40; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dg .dg-center { stroke: var(--dg-center); stroke-width: 1.6; fill: none; stroke-dasharray: 7 9; stroke-linecap: round; }
.dg .dg-loop { stroke: var(--dg-asphalt); stroke-width: 22; fill: none; }
/* red/white kerbs */
.dg .dg-kerb-base { stroke: var(--red); stroke-width: 6; fill: none; stroke-linecap: butt; }
.dg .dg-kerb-stripe { stroke: #fff; stroke-width: 6; fill: none; stroke-dasharray: 5 5; stroke-linecap: butt; opacity: 0.92; }
/* racing lines */
.dg .dg-line-pink { stroke: url(#g-pink); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; filter: url(#glow); }
.dg .dg-line-gold { stroke: url(#g-gold); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 9 6; }
.dg .dg-line-muted { stroke: var(--text-3); stroke-width: 2.4; fill: none; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.6; }
.dg .dg-line-slick { stroke: var(--text-3); stroke-width: 7; fill: none; opacity: 0.22; stroke-linecap: round; }
.dg .dg-sight { stroke: var(--text-3); stroke-width: 1.8; fill: none; stroke-dasharray: 1 6; stroke-linecap: round; opacity: 0.8; }
.dg .dg-skid, .dg .dg-skid-over { stroke: var(--text-3); stroke-width: 3; fill: none; opacity: 0.45; stroke-dasharray: 7 4; stroke-linecap: round; }
.dg .dg-angle { stroke: var(--pink-deep); stroke-width: 1.5; fill: none; }
.dg .dg-axis, .dg .dg-axis-h { stroke: var(--border-strong); stroke-width: 1.2; fill: none; }
.dg .dg-sf { stroke: var(--text); stroke-width: 3; stroke-dasharray: 3 3; }
/* arrowheads + markers */
.dg .dg-ah-pink { fill: var(--pink-deep); } .dg .dg-ah-gold { fill: var(--gold-deep); } .dg .dg-ah-muted { fill: var(--text-3); }
.dg .dg-ring-pink { fill: var(--pink); opacity: 0.22; } .dg .dg-dot-pink { fill: var(--pink); }
.dg .dg-ring-gold { fill: var(--gold); opacity: 0.28; } .dg .dg-dot-gold { fill: var(--gold-deep); }
.dg .dg-dot-muted { fill: var(--text-3); }
/* kart */
.dg .dg-k-body { fill: var(--text); } .dg .dg-k-tyre { fill: var(--text-2); }
.dg .dg-k-seat { fill: var(--surface); } .dg .dg-k-nose { fill: var(--pink); }
.dg .dg-kart-rival .dg-k-body { fill: var(--text-3); } .dg .dg-kart-rival .dg-k-nose { fill: var(--text-3); } .dg .dg-kart-rival .dg-k-seat { fill: var(--surface-2); }
.dg .dg-kart-slide .dg-k-nose { fill: var(--gold); }
/* label pill */
.dg .dg-pill { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
/* intro sectors */
.dg .dg-seg-seg { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1; }
.dg .dg-seg-done { fill: var(--pink); } .dg .dg-seg-now { fill: var(--gold); stroke: var(--gold-deep); stroke-width: 1.5; }
/* heat bars */
.dg .dg-heat { fill: url(#g-heat); } .dg .dg-heat-heavy { fill: url(#g-pink); }
/* traction circle + band */
.dg .dg-circle-fill { fill: var(--surface-2); } .dg .dg-band { stroke: var(--pink); stroke-width: 7; opacity: 0.4; fill: none; }
.dg .dg-circle-dash { fill: none; stroke: var(--border-strong); stroke-width: 1.2; stroke-dasharray: 4 5; }
.dg .dg-band-fill { fill: var(--gold-tint); stroke: var(--gold); stroke-width: 1; stroke-dasharray: 5 4; }
/* weight transfer */
.dg .dg-chassis { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.dg .dg-wheel { fill: var(--text-3); } .dg .dg-wheel-hot { fill: var(--pink); } .dg .dg-wheel-gold { fill: var(--gold); }
.dg .dg-load-hot { fill: var(--pink); opacity: 0.3; } .dg .dg-load-gold { fill: var(--gold); opacity: 0.3; }
/* race start */
.dg .dg-gantry { fill: var(--text); } .dg .dg-light-on { fill: var(--red); } .dg .dg-light-off { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.dg .dg-grid rect { fill: none; stroke: var(--border-strong); stroke-width: 1.2; stroke-dasharray: 4 4; }
.dg .dg-rain line { stroke: var(--text-3); stroke-width: 1.4; opacity: 0.5; stroke-linecap: round; }
/* type */
.dg-t { font-family: var(--mono); font-size: 9px; fill: var(--text); letter-spacing: 0.2px; }
.dg-t.dg-cap { fill: var(--text-3); font-size: 8.5px; }
.dg-t.dg-pink { fill: var(--pink-deep); font-weight: 600; }
.dg-t.dg-gold { fill: var(--gold-deep); font-weight: 600; }
.dg-t.dg-big { font-family: var(--disp); font-size: 13px; font-weight: 700; letter-spacing: 1px; fill: var(--text); text-transform: uppercase; }

/* ---------- misc ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.view { animation: fadein 0.18s ease; }
@media (prefers-reduced-motion: reduce) { .view, .toast, .q-explain, #overlay, .celebrate, .celebrate .checkers, .skel { animation: none; } }
.center { text-align: center; }
.spacer { height: 12px; }

/* ---------- sales button on locked course cards ---------- */
.cc-get { display: block; text-align: center; margin: 6px 0 8px; }

/* ---------- guided lessons + progress bars ---------- */
.course-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ui); padding: 11px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.course-bar .cb-row, .lesson-prog .lp-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.course-bar .cb-row .pct, .lesson-prog .lp-row .pct { color: var(--gold-deep); font-family: var(--mono); font-size: 13px; }
.lesson-prog { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ui); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.lesson-prog .lp-row { color: var(--text); font-size: 14.5px; }
.lesson-prog .lp-row .pct { color: var(--pink-deep); }
.lesson-dots { display: flex; gap: 5px; margin-top: 9px; }
.lesson-dots span { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-2); }
.lesson-dots span.done { background: var(--pink); }
.lesson-dots span.now { background: var(--gold); box-shadow: 0 0 0 2px var(--gold-tint); }
.lesson-nav { display: flex; gap: 10px; margin: 14px 0; }
.lesson-nav .btn { flex: 1; }
.lesson-nav .btn.ghost { flex: 0 0 auto; min-width: 110px; }
.lessons-done { border: 1px solid var(--gold); background: var(--gold-tint); }
.lessons-done .ld-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-family: var(--disp); font-size: 1.05rem; }
.lessons-done .ld-h span { color: var(--gold-deep); }
.ck.numbered .ck-num { font-family: var(--disp); font-weight: 700; font-size: 14px; color: var(--text-3); }
.ck.numbered.on .ck-num { color: #3a2c08; }

/* ---------- Race Control menu ---------- */
.rc-alert { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 4px 0 18px;
  background: var(--gold-tint); border: 1px solid var(--gold); border-radius: var(--r-ui); padding: 13px 16px; font-weight: 600; color: var(--text); cursor: pointer; }
.rc-alert .ic { width: 20px; height: 20px; color: var(--gold-deep); flex: none; }
.rc-alert span { flex: 1; }
.rc-alert .chev { color: var(--text-3); }
.rc-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rc-tile { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s, transform .1s; }
.rc-tile:hover { border-color: var(--pink); transform: translateY(-1px); }
.rc-ic { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--pink-tint); display: flex; align-items: center; justify-content: center; }
.rc-ic .ic { width: 22px; height: 22px; color: var(--pink-deep); }
.rc-tx { flex: 1; min-width: 0; }
.rc-t { display: block; font-weight: 700; font-size: 15.5px; font-family: var(--disp); }
.rc-d { display: block; color: var(--text-3); font-size: 13px; margin-top: 3px; line-height: 1.35; }
.rc-tile .chev { color: var(--text-3); flex: none; }
@media (max-width: 640px) { .rc-menu { grid-template-columns: 1fr; } .rc-tile .rc-d { display: none; } }

/* ---------- integrations / payments ---------- */
.webhook-box { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 11px 13px; overflow-x: auto; }
.webhook-box code { font-family: var(--mono); font-size: 12.5px; color: var(--pink-deep); white-space: nowrap; }
.pm-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pm-row .pm-needle { flex: 1; min-width: 0; }
.pm-row .pm-course { flex: 0 0 auto; width: 130px; }
.pm-row input, .pm-row select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 9px 11px; font: inherit; color: var(--text); }

/* ---------- track metadata editor ---------- */
.track-edit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ---------- World Track Map ---------- */
.map-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.map-search { flex: 1; min-width: 180px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 10px 13px; font: inherit; color: var(--text); }
.track-map { height: 380px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow); }
.track-map .leaflet-container { height: 100%; width: 100%; background: var(--surface-2); font-family: var(--sans); }
.map-load { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 14px; text-align: center; padding: 20px; }
.trackm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 15px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.trackm-card.driven { border-left: 3px solid var(--pink); }
.tm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tm-name { font-weight: 700; font-size: 16px; font-family: var(--disp); }
.tm-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; color: var(--text-3); font-size: 13.5px; }
.tm-meta .chip { font-size: 12px; }
.tm-pb { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.tm-addr { margin-top: 8px; color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.tm-addr .ic { width: 14px; height: 14px; }
.tm-notes { margin-top: 10px; background: var(--gold-tint); border-radius: var(--r-ui); padding: 10px 12px; }
.tm-coach { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--gold-deep); text-transform: uppercase; letter-spacing: .04em; }
.tm-coach .ic { width: 15px; height: 15px; }
.tm-notes p { margin: 5px 0 0; font-size: 14px; color: var(--text-2); }
.tm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* embedded Australian track map (the Oz Tour map) */
.oztour-map { display: block; width: 100%; height: 74vh; min-height: 480px; max-height: 780px; border: 0; border-radius: var(--r-card); overflow: hidden; background: #121116; box-shadow: var(--shadow); margin-bottom: 6px; }
/* branded map marker */
.fnf-pin span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--pink); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* ---------- confetti + flash celebration ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i { position: absolute; top: 22%; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: confetti-fall 1.4s ease-in forwards; }
@keyframes confetti-fall { 0% { opacity: 1; transform: translateY(-30px) rotate(0); } 100% { opacity: 0; transform: translateY(70vh) rotate(var(--rot, 360deg)); } }
.celebrate.flash { padding: 26px 30px; }
.celebrate.flash h2 { margin: 6px 0 0; }

/* ---------- module completion ---------- */
.mod-prog { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ui); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.mod-prog .mp-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.mod-prog .mp-row .pct { font-family: var(--mono); color: var(--gold-deep); }
.mp-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mp-parts span { font-size: 11.5px; font-weight: 600; color: var(--text-3); background: var(--surface-2); border-radius: 999px; padding: 3px 9px; }
.mp-parts span.part { color: var(--pink-deep); background: var(--pink-tint); }
.mp-parts span.done { color: #fff; background: var(--gold); }
.mrow-bar { display: block; height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.mrow-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.mrow-pct { font-family: var(--mono); font-size: 12px; color: var(--text-3); align-self: center; margin-right: 4px; }

/* ---------- levels & points ---------- */
.level-hero .lh-top { display: flex; justify-content: space-between; align-items: center; }
.level-hero .lh-pts { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; color: var(--gold-deep); }
.level-row { display: flex; align-items: center; gap: 13px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ui); margin-bottom: 9px; box-shadow: var(--shadow); opacity: 0.62; }
.level-row.reached { opacity: 1; }
.level-row.current { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink-tint); opacity: 1; }
.lvl-badge { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--disp); color: var(--text-3); }
.level-row.reached .lvl-badge { background: var(--gold); color: #3a2c08; }
.level-row.reached .lvl-badge .ic { width: 16px; height: 16px; stroke-width: 2.5; }
.lvl-tx { flex: 1; min-width: 0; }
.lvl-n { display: block; font-weight: 700; font-family: var(--disp); font-size: 15.5px; }
.lvl-b { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.lvl-min { font-family: var(--mono); font-weight: 600; color: var(--gold-deep); white-space: nowrap; }
.lvl-min small { color: var(--text-3); font-size: 10px; }
.earn-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.earn-row:last-of-type { border-bottom: 0; }
.earn-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--pink-tint); display: flex; align-items: center; justify-content: center; }
.earn-ic .ic { width: 18px; height: 18px; color: var(--pink-deep); }
.earn-tx { flex: 1; }
.earn-l { display: block; font-weight: 600; font-size: 14.5px; }
.earn-c { display: block; color: var(--text-3); font-size: 12px; margin-top: 1px; }
.earn-pts { font-family: var(--mono); font-weight: 600; color: var(--gold-deep); white-space: nowrap; }
.earn-pts small { color: var(--text-3); font-size: 10px; }
.earn-total { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--border-strong); font-weight: 700; font-family: var(--disp); }
.earn-total span:last-child { color: var(--gold-deep); font-family: var(--mono); }

/* ---------- dictate session ---------- */
.dictate-card { padding: 14px 16px; }
.dictate-card > summary { font-weight: 700; font-family: var(--disp); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.dictate-card > summary::-webkit-details-marker { display: none; }
.dict-mic-ic { font-size: 1.1rem; }
.dictate-card textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 11px 13px; font: inherit; color: var(--text); resize: vertical; }
#dict-mic.listening { background: var(--pink); color: #fff; border-color: var(--pink); }
.dict-prompts { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.dict-prompts .dp-h { font-weight: 700; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.dict-prompts ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.7; }
.dict-prompts li::marker { color: var(--pink); }

/* home nudge + star rating */
.nudge { border-color: var(--gold); background: var(--gold-tint); }
.nudge p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.star-row { display: flex; gap: 6px; }
.star-row button { font-size: 30px; line-height: 1; background: none; border: 0; color: var(--border-strong); padding: 0 2px; transition: color .12s; }
.star-row button.on { color: var(--gold); }

/* meetups */
.pink-top { border-top: 3px solid var(--pink); }
.file-input { font: inherit; color: var(--text-2); width: 100%; }
.meetup .mu-top { display: flex; align-items: center; gap: 10px; }
.meetup .mu-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.meetup .mu-who .nm { font-weight: 600; }
.mu-when { margin-top: 10px; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mu-when .ic { width: 16px; height: 16px; color: var(--pink-deep); }
.mu-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.meetup-banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--pink-tint); border: 1px solid var(--pink); border-radius: var(--r-ui); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: var(--text); cursor: pointer; }
.meetup-banner > .ic { width: 20px; height: 20px; color: var(--pink-deep); flex: none; }
.meetup-banner span { flex: 1; }
.meetup-banner .chev { color: var(--pink-deep); }
.feed-meetups { background: var(--surface-2); border-radius: var(--r-card); padding: 12px; margin-bottom: 16px; }
.feed-meetups .fm-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.feed-meetups .fm-h .ic { width: 16px; height: 16px; color: var(--pink-deep); }
.feed-meetups .meetup { margin-bottom: 10px; }
/* avatars + profile */
.avatar.img { overflow: hidden; padding: 0; background: var(--surface-2); }
.avatar.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit { position: relative; background: none; border: 0; padding: 0; cursor: pointer; }
.ae-cam { position: absolute; bottom: -2px; right: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--pink); border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; }
.ae-cam .ic { width: 13px; height: 13px; color: #fff; }
.nm-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.nm-link:hover { color: var(--pink-deep); text-decoration: underline; }
.log-filter { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 8px 10px; font: inherit; font-size: 14px; color: var(--text); max-width: 220px; }

/* appearance controls (theme + sound) */
.theme-toggle { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 5px; }
.theme-toggle button { flex: 1; min-height: 44px; border-radius: 9px; border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 15px; cursor: pointer; transition: all .15s; }
.theme-toggle button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
[data-theme="dark"] .theme-toggle button.on { background: var(--pink); color: #fff; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 14.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.switch-row input { display: none; }
.switch-row .switch { width: 46px; height: 27px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch-row .switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch-row input:checked + .switch { background: var(--pink); }
.switch-row input:checked + .switch::after { transform: translateX(19px); }

/* leaderboard summary */
.featured-track { background: linear-gradient(135deg, var(--pink-tint), var(--gold-tint)); border-color: var(--gold); }
.featured-track .ft-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-deep); }
.featured-track .ft-tag .ic { width: 15px; height: 15px; }
.featured-track .ft-name { font-family: var(--disp); font-weight: 800; font-size: 1.5rem; margin: 6px 0 2px; }
.featured-track .ft-meta { color: var(--text-3); font-size: 13.5px; }
.featured-track .ft-top { margin-top: 8px; font-size: 14.5px; }
.recent-lap { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.recent-lap:last-child { border-bottom: 0; }
.recent-lap .rl-name { font-weight: 600; font-size: 14px; }
.recent-lap .rl-track { flex: 1; min-width: 0; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-lap .rl-lap { color: var(--gold-deep); font-weight: 600; }
.recent-lap .rl-time { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* full-bleed track map on desktop */
@media (min-width: 900px) {
  .oztour-map { width: 100vw; max-width: 100vw; margin-left: calc(-50vw + 50%); border-radius: 0; height: 80vh; max-height: 920px; }
}

/* rich event cards */
.ev-card { padding: 16px; }
.ev-head { display: flex; align-items: flex-start; gap: 12px; }
.ev-date.big { min-width: 54px; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 8px 6px; flex: none; display: block; }
.ev-date.big .dd { display: block; font-family: var(--disp); font-weight: 800; font-size: 22px; line-height: 1; }
.ev-date.big .mm { display: block; font-size: 11px; text-transform: uppercase; color: var(--text-3); letter-spacing: .04em; }
.ev-title { font-weight: 700; font-family: var(--disp); font-size: 16px; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip.ev-members { background: var(--gold-tint); color: var(--gold-deep); border: 1px solid var(--gold); }
.chip.ev-open { background: var(--green-tint); color: var(--green); }
.ev-tz { color: var(--text-3); font-weight: 500; font-size: 12px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 8px; color: var(--text-2); font-size: 14px; }
.ev-meta .ic { width: 15px; height: 15px; vertical-align: -2px; }
.ev-detail { color: var(--text-2); font-size: 14px; margin: 6px 0 10px; line-height: 1.5; overflow-wrap: anywhere; }
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* ---------- onboarding tour ---------- */
.tour-card { position: relative; width: 92%; max-width: 360px; background: var(--surface); color: var(--text); border-radius: 22px; padding: 30px 26px 22px; text-align: center; box-shadow: var(--shadow-up); animation: rise 0.35s ease; }
.tour-skip { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--text-3); font-weight: 600; font-size: 13px; cursor: pointer; }
.tour-step { position: absolute; top: 15px; left: 18px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.tour-ic { width: 66px; height: 66px; margin: 6px auto 16px; border-radius: 19px; background: var(--pink-tint); display: flex; align-items: center; justify-content: center; }
.tour-ic .ic { width: 32px; height: 32px; color: var(--pink-deep); }
.tour-card.accent-gold .tour-ic { background: var(--gold-tint); }
.tour-card.accent-gold .tour-ic .ic { color: var(--gold-deep); }
.tour-card h2 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.2; }
.tour-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.5; margin: 0 0 18px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--border-strong); transition: all 0.2s; }
.tour-dots span.on { background: var(--pink); width: 22px; }
.tour-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-nav .btn { min-width: 104px; }

/* guided spotlight tour */
#tour-layer { position: fixed; inset: 0; z-index: 250; }
.tour-catch { position: fixed; inset: 0; z-index: 1; }
.tour-dim { position: fixed; inset: 0; z-index: 1; background: rgba(10, 9, 13, 0.74); }
.tour-hole { position: fixed; z-index: 2; border-radius: 12px; pointer-events: none; outline: 2.5px solid var(--pink); box-shadow: 0 0 0 9999px rgba(10, 9, 13, 0.74), 0 0 0 4px rgba(241, 0, 148, 0.35); transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
.tour-tip { position: fixed; z-index: 3; max-width: 420px; margin: 0 auto; background: var(--surface); color: var(--text); border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--shadow-up); animation: rise 0.25s ease; }
.tour-tip h3 { margin: 0 0 6px; font-family: var(--disp); font-size: 1.12rem; }
.tour-tip p { margin: 0 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }

/* ---------- google sign-in ---------- */
.auth-or { display: flex; align-items: center; text-align: center; gap: 10px; color: var(--text-3); font-size: 12px; letter-spacing: .04em; margin: 16px 0 14px; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.g-signin { display: flex; justify-content: center; min-height: 42px; }

/* ---------- notification bell ---------- */
.nav-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; background: transparent; color: var(--text-2); border-radius: 10px; cursor: pointer; }
.nav-bell:hover { background: var(--surface-2); color: var(--text); }
.nav-bell .ic { width: 21px; height: 21px; }
.bell-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }

/* ---------- people directory ---------- */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-ui); background: var(--card); margin-bottom: 8px; cursor: pointer; transition: border-color .12s, transform .12s; }
.person:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.person-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person-tx .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.person .btn.sm { flex: none; }

/* ---------- notifications ---------- */
.notif { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-ui); background: var(--card); margin-bottom: 8px; cursor: pointer; }
.notif:hover { border-color: var(--border-strong); }
.notif.unread { background: color-mix(in srgb, var(--pink) 7%, var(--card)); border-color: color-mix(in srgb, var(--pink) 30%, var(--border)); }
.notif-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }

/* ---------- quick links (community) ---------- */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 16px; }
.qlink { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px; border: 1px solid var(--border); border-radius: var(--r-ui); background: var(--card); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s, transform .12s; }
.qlink:hover { border-color: var(--pink); transform: translateY(-1px); }
.qlink .ic { width: 20px; height: 20px; color: var(--pink); }
@media (max-width: 540px) { .quick-links { grid-template-columns: repeat(2, 1fr); } }

/* ---------- achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ach { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px 12px; border: 1px solid var(--border); border-radius: var(--r-ui); background: var(--card); opacity: .55; filter: grayscale(.5); }
.ach.on { opacity: 1; filter: none; border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); background: color-mix(in srgb, var(--gold) 6%, var(--card)); }
.ach-e { font-size: 26px; line-height: 1; }
.ach-n { font-weight: 700; font-size: 13px; }
.ach-d { font-size: 11px; color: var(--text-3); line-height: 1.35; }
.ach-pts { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; color: var(--gold); }
.ach-pts .ic { width: 13px; height: 13px; color: var(--text-3); }
.ach-pts.gold { color: var(--gold); } .ach-pts.silver { color: #9aa0a8; } .ach-pts.bronze { color: #c08457; } .ach-pts.platinum { color: var(--pink); }

/* ---------- testimonial actions ---------- */
.ti-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- community channels ---------- */
.composer-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.pc-chan { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.pc-chan select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 8px 10px; font: inherit; color: var(--text); }
.channel-bar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin: 0 -2px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.channel-bar::-webkit-scrollbar { height: 5px; }
.channel-bar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.chan { flex: none; white-space: nowrap; border: 1px solid var(--border); background: var(--card); color: var(--text-2); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s; }
.chan:hover { border-color: var(--border-strong); color: var(--text); }
.chan.on { background: var(--pink); border-color: var(--pink); color: #fff; }

/* ---------- safety / moderation ---------- */
.safety-banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-ui); background: color-mix(in srgb, var(--gold) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border)); font-size: 13px; line-height: 1.45; }
.safety-banner .ic { flex: none; width: 22px; height: 22px; color: var(--gold-deep); margin-top: 1px; }
.guardian-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r-ui); background: color-mix(in srgb, var(--pink) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--pink) 25%, var(--border)); font-size: 13px; line-height: 1.4; }
.guardian-note .ic { flex: none; width: 20px; height: 20px; color: var(--pink); }
.cmt-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.cmt-act { border: 0; background: none; color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.cmt-act:hover { background: var(--surface-2); color: var(--text); }
.cmt-act.del:hover { color: var(--red); }
.cmt-act.clike svg { width: 13px; height: 13px; vertical-align: -2px; }
.cmt-act.clike.on { color: var(--pink); }
.cmt-replies { margin-left: 26px; border-left: 2px solid var(--border); padding-left: 12px; margin-top: 4px; }
.cmt-reply { padding: 10px 0; border-top: 1px solid var(--border); }
.cmt-reply-box { margin: 8px 0 2px; }
.cmt-reply-box textarea { min-height: 52px; }
/* challenges */
.challenge-card { border: 1px solid var(--gold); box-shadow: 0 0 0 1px rgba(232,178,58,0.15); }
.challenge-card .ch-flag { font-size: 1.3rem; }
.challenge-detail { text-align: center; }
.challenge-detail .ch-flag-lg { font-size: 2.6rem; line-height: 1; }
.challenge-detail .post-body { text-align: left; }
.ch-admin-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ch-admin-row .ch-rank { width: 56px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 4px 8px; }
/* admin access codes */
.ac-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-code { display: inline-flex; align-items: center; gap: 8px; background: var(--gold-soft, rgba(232,178,58,0.18)); color: var(--text-1); border: 1px solid var(--gold); border-radius: 999px; padding: 6px 8px 6px 13px; font-weight: 700; font-size: 0.9rem; }
.ac-code button { border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 0.85rem; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.ac-code button:hover { color: var(--red); }
.sess.done { opacity: .6; }

/* ---------- avatar cropper ---------- */
.crop-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: 20px; backdrop-filter: blur(3px); }
.crop-box { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px; max-width: 360px; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.crop-box h3 { margin: 0; }
.crop-stage { position: relative; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #0c0c0f; touch-action: none; }
.crop-stage canvas { display: block; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; pointer-events: none; box-shadow: 0 0 0 2px rgba(255,255,255,.5) inset; border-radius: 50%; }
.crop-ring::after { content: ''; position: absolute; inset: 0; box-shadow: 0 0 0 600px rgba(0,0,0,.45); border-radius: 50%; }
.crop-zoom { width: 100%; margin: 16px 0 4px; accent-color: var(--pink); }
.crop-actions { display: flex; gap: 10px; margin-top: 12px; }
.crop-actions .btn { flex: 1; }

/* ---------- bonus bundles ---------- */
.mrow.is-bonus { opacity: .92; border-style: dashed; }
.mrow.is-bonus .num { background: color-mix(in srgb, var(--gold) 16%, var(--card)); color: var(--gold); }
.mrow.is-bonus .num .ic { width: 18px; height: 18px; }
.mrow.is-bonus[disabled] { cursor: default; opacity: .6; }
.group-h.locked { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; padding: 0; }
.group-h.locked:hover { color: var(--pink); }
.group-h .chip { font-size: 10px; vertical-align: middle; }
.group-h .chip .ic { width: 12px; height: 12px; }
.bonus-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 28px 24px; margin-bottom: 18px; color: #fff; background: linear-gradient(135deg, var(--pink-deep), #16151a); }
.bonus-hero.accent-gold { background: linear-gradient(135deg, var(--gold), #16151a); }
.bonus-hero .bh-emoji { font-size: 40px; line-height: 1; display: block; margin-bottom: 8px; }
.bonus-hero h1 { margin: 0 0 6px; color: #fff; }
.bonus-hero p { margin: 0 0 12px; color: rgba(255,255,255,.85); max-width: 60ch; line-height: 1.5; }
.bonus-hero .chip { background: rgba(0,0,0,.28); color: #fff; }
.bonus-hero .chip .ic { width: 13px; height: 13px; }

/* ===== FNF simplify (2026-06): Community/Events segment tabs, Logbook CTA, More hub ===== */
/* prominent full-width segment tabs (Community: Discussions/Q&A/Meetups; Events: All/Scheduled/Meetups) */
.cm-seg { margin: 4px 0 16px; }
.cm-seg button { flex: 1 1 0; padding: 10px 8px; gap: 7px; }
.cm-seg button .ic { width: 17px; height: 17px; }
@media (max-width: 420px) { .cm-seg button { font-size: 12px; padding: 9px 3px; } .cm-seg button .ic { width: 15px; height: 15px; } }
.section-sub { font-family: var(--disp); font-weight: 700; font-size: 1rem; color: var(--text-3); margin: 14px 0 8px; }

/* unified feed search box (Community + Events) */
.cm-search { width: 100%; box-sizing: border-box; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 11px 14px; font: inherit; color: var(--text); }
.cm-search:focus { border-color: var(--pink); outline: none; }
.cm-search::placeholder { color: var(--text-3); }

/* Logbook: the one obvious action — log a session */
.log-cta { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  border: 0; border-radius: 16px; padding: 18px 18px; margin: 2px 0 6px; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep)); box-shadow: var(--shadow); }
.log-cta:hover { transform: translateY(-1px); }
.log-cta-ic { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; background: rgba(255,255,255,.18); }
.log-cta-ic .ic { width: 24px; height: 24px; color: #fff; }
.log-cta-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.log-cta-tx b { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.log-cta-tx span { font-size: 13px; color: rgba(255,255,255,.88); }
.log-cta > .chev { color: rgba(255,255,255,.9); flex: none; }

/* More tab — quick-access tiles */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 18px; }
.more-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  border: 1px solid var(--border); background: var(--card); border-radius: var(--r-ui); padding: 15px 14px; cursor: pointer; transition: border-color .12s, transform .12s; }
.more-tile:hover { border-color: var(--pink); transform: translateY(-1px); }
.more-tile .ic { width: 22px; height: 22px; color: var(--pink); margin-bottom: 4px; }
.more-tile .mt-t { font-family: var(--disp); font-weight: 700; font-size: 1.02rem; color: var(--text); }
.more-tile .mt-s { font-size: 12px; color: var(--text-3); line-height: 1.35; }

/* thread titles (Discord-forum style) */
.post-title { font-family: var(--disp); font-weight: 700; font-size: 1.12rem; line-height: 1.25; color: var(--text); margin: 4px 0 2px; }
.pc-title { width: 100%; box-sizing: border-box; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 10px 12px; font: inherit; font-weight: 600; color: var(--text); }
.pc-title:focus { border-color: var(--pink); outline: none; }
.pc-title::placeholder { color: var(--text-3); font-weight: 400; }

/* logbook first-visit explainer — sits on the dark overlay, so all text is light for contrast */
.intro-card .intro-emoji { font-size: 44px; line-height: 1; margin: 2px 0 8px; }
.intro-card h2 { font-size: 1.6rem; }
.intro-card .sub { color: rgba(255,255,255,0.9); }
.intro-list { list-style: none; padding: 0; margin: 12px auto; max-width: 330px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.intro-list li { font-size: 14.5px; line-height: 1.35; color: #fff; background: rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 13px; }
.intro-list li b { color: #fff; font-weight: 700; }

/* clickable event title + event detail page */
.ev-title[data-evopen] { cursor: pointer; }
.ev-title[data-evopen]:hover { color: var(--pink); }
.ev-detail-rows { display: flex; flex-direction: column; gap: 2px; }
.edr { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.edr:last-child { border-bottom: 0; }
.edr-k { flex: none; width: 96px; color: var(--text-3); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.edr-k .ic { width: 15px; height: 15px; }
.edr-v { flex: 1; color: var(--text); font-size: 14px; }

/* sessions with friends — mate picker chips, invites, comparison table */
.mate-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mate-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--pink-tint); border: 1px solid var(--pink); color: var(--text); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.mate-chip button { background: none; border: 0; color: var(--pink-deep); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.mate-invite { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.mate-invite:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.mi-top { font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.mi-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mi-lap { flex: 1; min-width: 120px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 9px 12px; font: inherit; color: var(--text); }
.mate-table { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.mate-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-ui); background: var(--surface); }
.mate-row.me { background: var(--pink-tint); border: 1px solid var(--pink); }
.mate-row .mr-pos { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--text-2); }
.mate-row:first-child .mr-pos { background: var(--gold); color: #1a1206; }
.mate-row .mr-nm { flex: 1; min-width: 0; font-weight: 600; color: var(--text); }
.mate-row .mr-lap { flex: none; color: var(--gold-deep); font-weight: 600; }

/* logbook: named highlight stats, tappable track rows, home action buttons */
.statline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.statline .sl-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); }
.statline .sl-v { font-family: var(--disp); font-weight: 800; font-size: 1.2rem; color: var(--text); margin-top: 2px; line-height: 1.15; }
.statline .sl-sub { flex: none; color: var(--gold-deep); font-weight: 700; font-size: 14px; text-align: right; }
.track-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-ui); padding: 13px 14px; margin-bottom: 8px; transition: border-color .12s, transform .12s; }
.track-row:hover { border-color: var(--pink); transform: translateY(-1px); }
.track-row .tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-row .tr-name { font-family: var(--disp); font-weight: 700; font-size: 1.02rem; color: var(--text); }
.track-row .tr-meta { font-size: 12.5px; color: var(--text-3); }
.track-row .tr-lap { flex: none; color: var(--gold-deep); font-weight: 700; font-size: 1.05rem; }
.track-row .chev { color: var(--text-3); width: 18px; height: 18px; flex: none; }
.lb-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.period-bar { margin: 2px 0 14px; }

/* admin insights: funnel, module rows, driver list */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fn-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.fn-row > span:first-child { flex: none; width: 108px; color: var(--text-2); }
.fn-row .pbar { flex: 1; }
.fn-row > b { flex: none; width: 86px; text-align: right; font-size: 13px; color: var(--text); }
.ins-mod { padding: 9px 0; border-bottom: 1px solid var(--border); }
.ins-mod:last-child { border-bottom: 0; }
.ins-mod .im-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; align-items: baseline; flex-wrap: wrap; }
.ins-mod .im-name { font-weight: 600; color: var(--text); font-size: 14px; }
.ins-drv { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ui); padding: 10px 12px; margin-bottom: 6px; }
.ins-drv:hover { border-color: var(--pink); }
.ins-drv .id-nm { font-weight: 700; color: var(--text); }
.ins-drv .id-meta { font-size: 12.5px; color: var(--text-3); }

/* refer & earn — invite link row */
.ref-link { display: flex; gap: 8px; }
.ref-link input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 9px 12px; font: inherit; font-size: 13px; color: var(--text-2); }

/* admin: channel editor */
.chan-edit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.chan-edit-row .chan-emoji { width: 52px; flex: none; text-align: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 9px 6px; font-size: 18px; }
.chan-edit-row .chan-label { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ui); padding: 9px 12px; font: inherit; color: var(--text); }
.chan-edit-row .chan-emoji:focus, .chan-edit-row .chan-label:focus { border-color: var(--pink); outline: none; }
