/* ============================================
   LAZY LEARNERS — Components
   Shared building blocks: top bar, bottom nav, buttons, forms,
   cards, lists, tags, stats, bars, sheets and toasts.
   ============================================ */

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand-mark { width: 34px; height: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(var(--header-h) + var(--safe-t));
  padding: var(--safe-t) 8px 0 var(--gutter);
  padding-bottom: var(--hdr-slant);
  isolation: isolate;
  /* a pale band in the app colour (user's picture, 2026-10-16), set apart by a soft shadow underneath */
  background: linear-gradient(180deg, var(--hdr-top), var(--hdr-bot));
  box-shadow: 0 1px 0 hsl(var(--h) 55% 87%), 0 10px 18px -12px hsl(var(--h) 50% 30% / 0.4);
  color: var(--hdr-ink);
}
.topbar .topbar-title { color: var(--hdr-ink); }
.topbar .icon-btn { color: var(--hdr-ink); }
.topbar .icon-btn:active { background: var(--hdr-press); }
.topbar.has-back { padding-left: 4px; }
.topbar-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.icon-btn:active { background: var(--surface-2); }

/* ---------- Avatar ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  user-select: none;
}
.avatar.is-emoji { background: var(--surface-2); font-size: 19px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-lg.is-emoji { font-size: 24px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 100%;
  max-width: var(--app-w);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}
.nav-item .i { width: 22px; height: 22px; }
.nav-item.is-active { color: var(--brand); }
.nav-badge {
  position: absolute;
  top: 7px;
  left: calc(50% + 6px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 10.5px;
  line-height: 17px;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--brand-fill); background-color: var(--brand); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); }
.btn-primary:not(:disabled):active { filter: brightness(0.92); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:not(:disabled):active { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:not(:disabled):active { background: var(--brand-soft); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--bad-line); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.label { font-size: 14px; font-weight: 600; color: var(--text); }
.label .opt { font-weight: 400; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px; /* 16px stops iOS zooming on focus */
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { padding: 12px 14px; min-height: 96px; line-height: 1.45; resize: vertical; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder, .textarea::placeholder { color: #98A2B3; }
.help { font-size: 13px; color: var(--text-3); }
.field-error { font-size: 13px; color: var(--bad); }
.input-group { display: flex; gap: 10px; align-items: center; }
.input-pin { letter-spacing: 0.3em; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.input-pin::placeholder { letter-spacing: normal; font-weight: 400; }

/* Segmented control */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface-2);
}
.seg button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.seg button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1); }

/* Option chips (scrollable filter row) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }

/* Selectable cards (radio-like) */
.choice-list { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.choice.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.choice-dot { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--border-strong); border-radius: 50%; background: var(--surface); }
.choice.is-active .choice-dot { border: 5px solid var(--brand); }

/* ---------- Cards & lists ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card-flush { padding: 0; overflow: hidden; }

.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px 12px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.list-item + .list-item { border-top: 1px solid var(--border); }
.list-item:active { background: var(--surface-2); }
.list-item .chev { color: var(--border-strong); }
.list-title { font-weight: 600; font-size: 15px; }
.list-sub { font-size: 13px; color: var(--text-3); }
.list-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------- Ranked rows and small text buttons (leaderboards, results) ---------- */
.link-btn { padding: 6px 0; border: 0; background: none; color: var(--text-3); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link-btn .i { width: 14px; height: 14px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.rank-row + .rank-row { border-top: 1px solid var(--border); }
.rank-no { width: 22px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rank-row.is-me { background: var(--brand-soft); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-easy { background: var(--ok-soft); color: var(--ok); }
.tag-mild { background: var(--warn-soft); color: var(--warn); }
.tag-tough { background: var(--bad-soft); color: var(--bad); }
.tag-brand { background: var(--brand-soft); color: var(--brand-strong); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.stat { padding: 4px 8px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.metric-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-label { font-size: 13px; color: var(--text-3); }

/* ---------- Progress bars ---------- */
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-shade); }
.bar.is-ok > span { background: #12B76A; }
.bar.is-warn > span { background: #F79009; }
.bar.is-bad > span { background: #F04438; }
.bar-row + .bar-row { margin-top: 14px; }
.bar-row .row-between { margin-bottom: 6px; font-size: 14px; }

/* ---------- Collapsible (details) ---------- */
.fold { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.fold + .fold { margin-top: 8px; }
.fold > summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  list-style: none;
  cursor: pointer;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .chev { margin-top: 2px; color: var(--text-3); transition: transform .2s; }
.fold[open] > summary .chev { transform: rotate(180deg); }
.fold-body { padding: 0 16px 16px; }

/* ---------- Empty state ---------- */
.empty { padding: 32px 16px; text-align: center; color: var(--text-3); font-size: 14px; }
.empty strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; }

/* ---------- Tinted boxes (student home: Snap, Today's Mission, quote) ----------
   One shape, three light shades. --bh is the box's hue: the app colour for the first box and
   its two companion hues for the others, so the set changes together with the app colour. */
.tint-box {
  --bh: var(--h);
  --box-ink: hsl(var(--bh) 62% 32%);
  padding: 14px 14px 18px 18px;
  border: 1px solid hsl(var(--bh) 68% 86%);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, hsl(var(--bh) 85% 92%) 0%, hsl(var(--bh) 88% 96%) 55%, #FFFFFF 100%);
}
.tint-box.is-2 { --bh: var(--h-2); }
.tint-box.is-3 { --bh: var(--h-3); }
.box-head { display: flex; align-items: center; gap: 10px; }
.box-title { flex: 1; min-width: 0; font-family: var(--font-hand); font-size: 30px; font-weight: 700; line-height: 1; color: var(--box-ink); }
.box-label { margin-bottom: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--box-ink); }
.box-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin: -6px -4px -6px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--box-ink);
  cursor: pointer;
}
.box-btn:active { background: hsl(var(--bh) 70% 50% / 0.12); }
.box-btn:active .i { transform: rotate(90deg); }
.box-btn .i { transition: transform .2s; }
/* Thin two-tone icon in the box's own colour */
.box-icon { flex: none; color: var(--box-ink); }
.box-icon .i { width: 38px; height: 38px; }

/* Snap: one syllabus line, with a button for the next */
.fact-text { margin-top: 6px; padding-right: 6px; font-size: 18.5px; font-weight: 700; line-height: 1.4; color: var(--text); }
.fact-text.is-new { animation: fact-in .3s ease-out; }
@keyframes fact-in { from { opacity: 0; transform: translateY(6px); } }

/* App colour picker (admin) */
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 6px; justify-items: center; }
.swatch {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg,
    hsl(calc(var(--sw-h) - 8) var(--sw-s) calc(var(--sw-l) + 4%)) 0%,
    hsl(var(--sw-h) var(--sw-s) var(--sw-l)) 50%,
    hsl(calc(var(--sw-h) + 12) var(--sw-s) calc(var(--sw-l) - 11%)) 100%);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--border);
  color: #fff;
  cursor: pointer;
  transition: transform .15s;
}
.swatch:active { transform: scale(0.92); }
.swatch .i { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.swatch.is-active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px hsl(var(--sw-h) var(--sw-s) var(--sw-l)); }
.swatch.is-active .i { opacity: 1; }

/* Thin two-tone icons: a fine outline over a soft filled shape */
.duo { stroke-width: 1.4; }
.duo .tone { fill: currentColor; fill-opacity: 0.2; stroke: none; }

/* ---------- Join with a code: type it or scan the QR ---------- */
.join-or { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: 12.5px; color: var(--text-3); }
.join-or::before, .join-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.scan-box { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #101828; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute;
  inset: 16%;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(16, 24, 40, 0.38);
}

/* ---------- Quote of the day (student home) ---------- */
.quote-box { position: relative; padding: 16px 16px 16px 14px; overflow: hidden; transition: opacity .2s, transform .2s; }
.quote-box.is-opening { opacity: 0; transform: scale(0.98); }
.quote-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
button.quote-row { cursor: pointer; }
button.quote-row > .chev { flex: none; color: var(--box-ink); opacity: 0.7; }
.quote-box.is-sealed::after {
  /* slow shine so it invites a tap */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.7) 45%, transparent 60%);
  transform: translateX(-100%);
  animation: quote-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes quote-shine { 60%, 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .quote-box.is-sealed::after { animation: none; } }
.quote-box.is-open { animation: quote-in 0.4s ease-out; }
@keyframes quote-in { from { opacity: 0; transform: translateY(6px); } }
.quote-text { font-family: var(--font-hand); font-size: 25px; font-weight: 700; line-height: 1.15; color: hsl(var(--bh) 45% 22%); }

/* ---------- Note ---------- */
.note {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13.5px;
}
.note-brand { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- Sheet (bottom modal) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(16, 24, 40, 0.45);
  animation: fade-in .18s ease-out;
}
.sheet {
  width: 100%;
  max-width: var(--app-w);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 8px var(--gutter) calc(20px + var(--safe-b));
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: slide-up .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet-grip { width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 999px; background: var(--border-strong); }
.sheet-title { margin-bottom: 4px; font-size: 18px; font-weight: 650; }
.sheet-text { margin-bottom: 16px; color: var(--text-2); font-size: 14.5px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 16px; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 20px);
  transform: translateX(-50%);
  z-index: 80;
  width: calc(100% - 32px);
  max-width: calc(var(--app-w) - 32px);
  pointer-events: none;
}
body.has-nav .toast-host { bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #101828;
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slide-up .2s ease-out;
}
.toast + .toast { margin-top: 8px; }
.toast .i { width: 18px; height: 18px; }
.toast-ok .i { color: #6CE9A6; }
.toast-bad .i { color: #FDA29B; }
.toast-close { display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -6px -4px 0; border: 0; border-radius: 6px; background: transparent; color: #98A2B3; cursor: pointer; }
.toast-close .i { color: inherit; }
.toast-action { margin-left: auto; padding: 4px 8px; border: 0; border-radius: 6px; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; cursor: pointer; }

/* ---------- Emoji picker ---------- */
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emoji-grid button {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 22px;
  cursor: pointer;
}
.emoji-grid button.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }

/* ---------- Handwritten touches ----------
   A little personality on titles and short remarks; everything functional stays in the interface font. */
.topbar-title { display: flex; align-items: center; font-family: var(--font-hand); font-size: 31px; font-weight: 700; letter-spacing: 0.01em; line-height: 1; }
/* The heading (user's picture): bold handwriting on a soft highlight, with three little spark marks */
.hdr-pill {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 18px 8px;
  border-radius: 24px;
  background: linear-gradient(100deg, var(--hdr-pill), hsl(var(--h) 85% calc(86% + 3% * var(--day))));
  -webkit-text-stroke: 0.5px currentColor;
}
.hdr-spark { flex: none; width: 26px; height: 26px; margin: -14px 0 0 3px; fill: none; stroke: hsl(var(--h) 85% 58%); stroke-width: 2.4; stroke-linecap: round; }
.brand span { font-family: var(--font-hand); font-size: 27px; font-weight: 700; letter-spacing: 0; line-height: 1; }
.card h2, .page > h2 { font-family: var(--font-hand); font-size: 29px; font-weight: 700; letter-spacing: 0; line-height: 1.1; }
.empty strong { font-family: var(--font-hand); font-size: 24px; font-weight: 700; line-height: 1.15; }
.sheet-title { font-family: var(--font-hand); font-size: 27px; font-weight: 700; line-height: 1.1; }
.hand-note { font-family: var(--font-hand); font-size: 21px; font-weight: 700; line-height: 1.1; }

/* ---------- Join button beside the greeting (opens the code / QR pop-up) ---------- */
.join-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: none;
  width: 52px;
  height: 52px;
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.join-btn .i { width: 22px; height: 22px; }
.join-btn:active { background: var(--brand-tint); }


/* Big call-to-action: the app colour in its shade, and an arrow in a circle at the end */
.cta {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 7px 7px 7px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-fill);
  background-color: var(--brand);
  box-shadow: 0 6px 16px var(--brand-glow);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}
.cta:active { filter: brightness(0.93); }
.cta > span:first-child { flex: 1; min-width: 0; }
.cta-arrow { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }

/* Centred dialog variant of the sheet */
.sheet-backdrop.is-center { align-items: center; padding: var(--gutter); }
.sheet-backdrop.is-center .sheet { max-width: 420px; padding: 20px var(--gutter); border-radius: 18px; animation: pop-in .2s ease-out; }
.sheet-backdrop.is-center .sheet-grip { display: none; }
@keyframes pop-in { from { transform: scale(0.96); opacity: 0; } }

/* ---------- Whole-section fold (results page, statistics) ---------- */
.result-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 6px;
  list-style: none;
  cursor: pointer;
}
.result-group > summary::-webkit-details-marker { display: none; }
.result-group > summary .chev { color: var(--text-3); transition: transform .2s; }
.result-group[open] > summary .chev { transform: rotate(180deg); }
.result-group:not([open]) > summary [data-all] { display: none; }
.result-group .link-btn { padding: 6px 8px; color: var(--brand); }

/* ---------- Tick-list picker (Quick Quiz: groups, subjects, chapters) ---------- */
.picker { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pick-row { display: flex; align-items: stretch; }
.pick-row + .pick-row { border-top: 1px solid var(--border); }
.pick-row.d1 { padding-left: 16px; background: #FAFBFC; }
.pick-row.d2 { padding-left: 32px; background: var(--bg); }
.pick-row.d3 { padding-left: 48px; background: var(--bg); }
.pick-row.is-empty { opacity: 0.5; }
.pick-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 10px 12px 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.pick-main:disabled { cursor: default; }
.pick-row.d1 .pick-main, .pick-row.d2 .pick-main, .pick-row.d3 .pick-main { font-size: 14.5px; min-height: 46px; }
.pick-open { display: grid; place-items: center; flex: none; width: 48px; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--text-3); cursor: pointer; }
.pick-open .i { transition: transform .2s; }
.pick-open.is-open .i { transform: rotate(180deg); }
.tick { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: #fff; }
.tick .i { width: 15px; height: 15px; stroke-width: 3; }
.tick.is-on, .tick.is-part { border-color: var(--brand); background: var(--brand-shade); }

/* Results: section heading is a button that opens or closes all answers in the section */
.result-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin-bottom: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.result-group-head:disabled { cursor: default; }
/* "Wrong / skipped" in red, "Correct" in green (user's picture); the arrow points right when folded */
.result-group-head { justify-content: flex-start; gap: 8px; }
.result-group-head > .i { width: 20px; height: 20px; flex: none; }
.result-group-title { font-size: 13.5px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.result-group-head.is-wrong { color: var(--bad); }
.result-group-head.is-right { color: var(--ok); }
.result-group-head .chev { display: grid; color: currentColor; transition: transform .2s; }
.result-group-head .chev .i { width: 18px; height: 18px; }
.result-group-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }

/* Objection flag at the right of a question */
.obj-btn { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin: -6px -4px -6px 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); cursor: pointer; }
.obj-btn .i { width: 18px; height: 18px; }
.obj-btn:active { background: var(--warn-soft); color: var(--warn); }

/* ---------- Bytes: one read per screen, swipe up for the next ---------- */
body.shorts-open .page { padding: 0; }
.shorts {
  height: calc(100dvh - var(--header-h) - var(--safe-t) - var(--nav-h) - var(--safe-b));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.shorts::-webkit-scrollbar { display: none; }
.short {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px var(--gutter) 16px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: linear-gradient(180deg, hsl(var(--h) 70% 97.5%) 0, var(--surface) 130px); /* pale, so the header band stands apart */
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.short-top { display: flex; align-items: center; justify-content: space-between; }
.short-title { margin-top: 14px; font-family: var(--font-hand); font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: 0; }
.short-text { flex: 1; min-height: 0; margin-top: 12px; overflow-y: auto; font-size: 15px; line-height: 1.55; color: var(--text); }
.short-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; }
.short-next { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); }
.article p { font-size: 15.5px; line-height: 1.65; color: var(--text); }
.article p + p { margin-top: 12px; }

/* ---------- Chapter-wise lists (Learning Trees, admin content browser) ---------- */
.tree-subject > summary { align-items: center; }
.tree-chapters { border-top: 1px solid var(--border); }
.tree-part { padding: 10px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); }
.tree-row { min-height: 48px; padding: 10px 12px 10px 16px; font-size: 14.5px; }
.tree-row + .tree-row, .tree-part + .tree-row, .tree-row + .tree-part { border-top: 1px solid var(--border); }
.tree-row.is-empty { color: var(--text-3); cursor: default; }
.tree-row.is-empty:active { background: transparent; }
.tree-no { flex: none; width: 22px; font-size: 12.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Bytes: the leaf logo on a round white button in the middle of the bottom bar */
.nav-circle .bytes-logo {
  width: 50px;
  height: 50px;
  margin-top: -22px;
  padding: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--brand-line), 0 6px 14px var(--brand-glow);
}
.nav-circle.is-active .bytes-logo { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--brand), 0 6px 14px var(--brand-glow); }
.nav-item { font-size: 10.5px; }

/* ---------- Radar (statistics): a ring with one arc per item and a chip for each ---------- */
.tone-ok { --c: #16A34A; --c-soft: #DCFCE7; --c-ink: #15803D; }
.tone-info { --c: #3B82F6; --c-soft: #DBEAFE; --c-ink: #1D4ED8; }
.tone-warn { --c: #F59E0B; --c-soft: #FEF3C7; --c-ink: #B45309; }
.tone-bad { --c: #EF4444; --c-soft: #FEE2E2; --c-ink: #B91C1C; }
.tone-none { --c: #98A2B3; --c-soft: #E6E9EE; --c-ink: #667085; }

.radar-card { padding: 16px 14px 18px; }
.radar-head { display: flex; align-items: center; gap: 12px; }
.radar-badge { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--c-soft); color: var(--c-ink); }
.radar-badge .i { width: 26px; height: 26px; }
.radar-head h2 { font-size: 31px; }
.radar-info { display: grid; place-items: center; width: 32px; height: 32px; margin: -4px 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; }
.radar-info:active { background: var(--surface-2); }
.radar-info .i { width: 18px; height: 18px; }

.radar { position: relative; margin-top: 16px; }
.radar.is-n4 { padding: 34px 0; }
.radar.is-n3 { padding: 58px 0 34px; }
.radar.is-n6 { padding: 74px 0; }
.radar-ring { position: relative; width: 172px; height: 172px; margin: 0 auto; }
.radar.is-n6 .radar-ring { width: 146px; height: 146px; }
.radar-ring svg { width: 100%; height: 100%; overflow: visible; }
.radar-halo { fill: #F4F5F8; }
.radar-halo-2 { fill: #FAFBFC; stroke: #ECEEF2; stroke-width: 1; }
.radar-track { fill: none; stroke: var(--c-soft); stroke-width: 13; stroke-linecap: round; }
.radar-value { fill: none; stroke: var(--c); stroke-width: 13; stroke-linecap: round; }
.radar-hit { fill: none; stroke: transparent; stroke-width: 36; pointer-events: stroke; cursor: pointer; }
.radar-hub { fill: #fff; filter: drop-shadow(0 2px 5px rgba(16, 24, 40, 0.14)); }
.radar-centre { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; line-height: 1.15; text-align: center; pointer-events: none; }
.radar-centre span { font-size: 11.5px; color: var(--text-2); }
.radar-centre strong { margin: 1px 0; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.radar.is-n6 .radar-centre strong { font-size: 23px; }

.radar-chip { position: absolute; display: flex; align-items: flex-start; gap: 8px; max-width: 47%; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.radar-chip:active { opacity: 0.7; }
.radar-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--c-soft); color: var(--c-ink); }
.radar-icon .i { width: 21px; height: 21px; }
.radar-text { display: block; min-width: 0; }
.radar-name { display: block; font-size: 12px; font-weight: 700; line-height: 1.2; }
.radar-pct { display: inline-block; margin-top: 4px; padding: 3px 9px; border-radius: 999px; background: var(--c-soft); color: var(--c-ink); font-size: 12px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.radar-chip.at-tl { top: 0; left: 0; }
.radar-chip.at-tr { top: 0; right: 0; }
.radar-chip.at-bl { bottom: 0; left: 0; }
.radar-chip.at-br { bottom: 0; right: 0; }
.radar-chip.at-t { top: 0; left: 50%; max-width: 80%; transform: translateX(-50%); }
.radar-chip.at-ml { top: 50%; left: 0; transform: translateY(-50%); }
.radar-chip.at-mr { top: 50%; right: 0; transform: translateY(-50%); }
/* Six chips: stacked (icon above the name) so the two beside the ring fit a phone */
.radar.is-n6 .radar-chip { flex-direction: column; gap: 4px; }
.radar.is-n6 .radar-chip.at-ml, .radar.is-n6 .radar-chip.at-mr { max-width: calc(50% - 78px); }
.radar.is-n6 .radar-chip.at-tr, .radar.is-n6 .radar-chip.at-mr, .radar.is-n6 .radar-chip.at-br { align-items: flex-end; text-align: right; }
.radar.is-n6 .radar-icon { width: 32px; height: 32px; border-radius: 10px; }
.radar.is-n6 .radar-icon .i { width: 19px; height: 19px; }
.radar.is-n6 .radar-name { font-size: 11.5px; }
.radar.is-n6 .radar-pct { margin-top: 3px; padding: 2px 8px; font-size: 11.5px; }
/* Any other number of items: chips in two columns under the ring */
.radar-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin-top: 16px; }
.radar-list .radar-chip { position: static; max-width: none; }

.radar-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.radar-key { display: grid; gap: 10px; }
.radar-key div { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.radar-key i { flex: none; width: 26px; height: 10px; border-radius: 999px; background: var(--c); }

/* ---------- Bytes: the last card, and the pop-up after every five bytes ---------- */
.short-end { align-items: center; justify-content: center; gap: 12px; text-align: center; }
.short-end .short-title { margin-top: 0; }
.short-end-icon .bytes-logo { display: block; width: 72px; height: 72px; }
.short-end .btn { min-width: 230px; }

/* Pop-up card: a tinted band on top (same shades as the home boxes), the content below */
.extra { --bh: var(--h); --box-ink: hsl(var(--bh) 62% 32%); }
.extra.is-2 { --bh: var(--h-2); }
.extra.is-3 { --bh: var(--h-3); }
.extra-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -20px calc(var(--gutter) * -1) 16px;
  padding: 18px var(--gutter) 16px;
  border-bottom: 1px solid hsl(var(--bh) 68% 86%);
  border-radius: 18px 18px 0 0;
  background: linear-gradient(150deg, hsl(var(--bh) 85% 91%) 0%, hsl(var(--bh) 88% 96%) 60%, #FFFFFF 100%);
}
.extra-title { font-family: var(--font-hand); font-size: 27px; font-weight: 700; line-height: 1.08; color: var(--text); }
.extra-title em { font-style: normal; font-size: 0.8em; color: var(--box-ink); }
.extra-court { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.extra-text { font-size: 16px; line-height: 1.55; }
.vs-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.vs-row { display: grid; grid-template-columns: 1fr 1fr; }
.vs-row + .vs-row { border-top: 1px solid var(--border); }
.vs-row span { padding: 9px 11px; font-size: 13.5px; line-height: 1.4; }
.vs-row span + span { border-left: 1px solid var(--border); }
.vs-names span { background: hsl(var(--bh) 85% 96%); color: var(--box-ink); font-size: 13px; font-weight: 700; }
.extra-remember { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: hsl(var(--bh) 85% 96%); font-size: 14px; line-height: 1.45; }
.extra-remember strong { display: block; margin-bottom: 2px; font-family: var(--font-hand); font-size: 20px; line-height: 1; color: var(--box-ink); }
.extra-more { margin-top: 14px; border-top: 1px solid var(--border); }
.extra-more > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; list-style: none; font-size: 14.5px; font-weight: 600; color: var(--brand); cursor: pointer; }
.extra-more > summary::-webkit-details-marker { display: none; }
.extra-more > summary .chev { transition: transform .2s; }
.extra-more[open] > summary .chev { transform: rotate(180deg); }
.extra-more .article p { font-size: 14.5px; line-height: 1.6; }

/* Pale brand surfaces get a light shade too, so the app colour is never a flat block */
.avatar:not(.is-emoji), .list-icon, .join-btn, .tag-brand, .note-brand, .tree-part, .rank-row.is-me, .choice.is-active {
  background-image: linear-gradient(150deg, hsl(var(--h) 88% 93%) 0%, hsl(var(--h) 90% 97.5%) 100%);
}

/* ---------- Admin: PDF import and export ---------- */
.io-file { padding: 11px 12px; height: auto; font-size: 14px; }
.io-sample { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; color: var(--text); }
.io-result { display: grid; gap: 6px; }
.io-line { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--c-soft); font-size: 14px; }
.io-line strong { min-width: 34px; font-size: 19px; font-weight: 750; color: var(--c-ink); font-variant-numeric: tabular-nums; }

/* Avatar: one emoji typed from the phone's own emoji keyboard */
.emoji-input { width: 96px; height: 96px; margin: 0 auto; display: block; padding: 0; border-radius: 50%; font-size: 44px; line-height: 96px; text-align: center; }

/* Tall pop-ups scroll inside; the buttons stay in view at the bottom */
.sheet-backdrop.is-center .sheet-actions {
  position: sticky;
  bottom: -20px;
  margin: 16px calc(var(--gutter) * -1) -20px;
  padding: 12px var(--gutter) 20px;
  background: var(--surface);
  box-shadow: 0 -10px 12px -10px rgba(16, 24, 40, 0.14);
}

/* ---------- Pictures (js/core/scenes.js): soft hills and rounded objects ---------- */
.art { height: 100%; filter: brightness(calc(0.9 + 0.1 * var(--day))) saturate(calc(0.9 + 0.1 * var(--day))); }
.art svg { display: block; width: 100%; height: 100%; }

/* ---------- Today's Mission (user's picture): pale sky and misty hills, a subject row, a big start button ---------- */
.mission {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px 18px 18px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.07);
}
.mission > .art-mission { position: absolute; inset: 0; z-index: -1; }
.mission-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mission-title { font-family: var(--font-hand); font-size: 36px; font-weight: 700; line-height: 1; color: hsl(var(--h) 70% 24%); }
.mission-lead { max-width: 16em; margin-top: 8px; font-size: 14.5px; line-height: 1.4; color: #475467; }
.mission-done { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; font-weight: 700; }
.mission-done .i { width: 14px; height: 14px; stroke-width: 2.6; }
.mission-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 46px;
  padding: 14px 12px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.07);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .15s;
}
.mission-row:active { transform: scale(0.985); }
.mission-row-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: hsl(var(--h) 85% 93%); color: hsl(var(--h) 75% 45%); }
.mission-row-icon .i { width: 24px; height: 24px; }
.mission-row-title { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.mission-row-sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text-2); }
.mission-row .chev { flex: none; width: 20px; height: 20px; color: var(--text); }
.mission-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  margin-top: 18px;
  padding: 0 10px 0 22px;
  border-radius: 18px;
  background: linear-gradient(100deg, hsl(var(--h) 85% 58%) 0%, hsl(var(--h) 80% 44%) 100%);
  box-shadow: 0 8px 18px var(--brand-glow);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s;
}
.mission-cta:active { transform: scale(0.985); }
.mission-cta-arrow { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.mission-cta-arrow .i { width: 20px; height: 20px; }
.mission-cta.is-done { background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand-line); color: var(--brand-strong); }
.mission-cta.is-done .mission-cta-arrow { border-color: var(--brand-line); background: var(--brand-soft); }
.mission-stops { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mission-stops li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; line-height: 1.35; }
.mission-stops .n { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 12.5px; font-weight: 700; }

/* ---------- Bytes: a picture at the foot of every card ---------- */
/* The picture sits under the text. The text may use the picture's open sky, but stops above the
   object (the text scrolls if it is longer); the two buttons float over the picture's foot */
.short { position: relative; container-type: size; }
.short-art { --art-h: min(38cqh, 270px); position: relative; z-index: 0; flex: none; height: var(--art-h); margin: calc(var(--art-h) * -0.2) calc(var(--gutter) * -1) -16px; pointer-events: none; }
.short > :not(.short-art) { position: relative; z-index: 1; }
.short > .short-foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 16px; }
.short .short-next { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); }

/* ---------- Radars: hills behind the ring ---------- */
.radar-card { position: relative; overflow: hidden; }
.radar-art { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; height: 62%; pointer-events: none; }
.radar-card > :not(.radar-art) { position: relative; z-index: 1; }
.radar-halo { fill: rgba(255, 255, 255, 0.72); }
.radar-halo-2 { fill: rgba(255, 255, 255, 0.82); stroke: rgba(255, 255, 255, 0.9); }
.radar-chip { padding: 6px 10px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.88); box-shadow: 0 2px 8px rgba(16, 24, 40, 0.1); }
.radar-foot { padding: 9px 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.88); }

/* chips on the six-subject radar: a little smaller, so they sit clear of the ring */
.radar.is-n6 .radar-chip { padding: 5px 7px 6px; border-radius: 12px; }

/* One card for both radars, with a toggle at the top centre */
.radar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: min(270px, 100%);
  margin: 0 auto 16px;
  padding: 4px;
  border-radius: 999px;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}
.radar-tabs button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.radar-tabs button.is-active { background: var(--brand-fill); background-color: var(--brand); color: #fff; box-shadow: 0 2px 8px var(--brand-glow); }

/* ---------- Quick Quiz picker as "flaps": rounded cards that open, blue ticks, indented rows ---------- */
.picker { display: grid; gap: 10px; margin-top: 10px; border: 0; border-radius: 0; background: none; overflow: visible; }
.picker .pick-row { align-items: center; border-radius: 12px; background: transparent; }
.picker .pick-row + .pick-row { border-top: 0; }
.picker .pick-row.d1 { padding-left: 22px; background: transparent; }
.picker .pick-row.d2 { padding-left: 50px; background: transparent; }
.picker .pick-row.d3 { padding-left: 78px; background: transparent; }
.picker .pick-main { min-height: 44px; padding: 8px 10px; gap: 14px; font-size: 15px; }
.picker .pick-row.d1 .pick-main, .picker .pick-row.d2 .pick-main, .picker .pick-row.d3 .pick-main { min-height: 42px; font-size: 14.5px; }
.picker .pick-open { width: 46px; border-left: 0; background: transparent; color: var(--brand-strong); }
.picker .pick-open .i { transform: none; transition: transform .2s; }
.picker .pick-open.is-open .i { transform: rotate(-90deg); }
.picker .tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-strong); }
.pick-flap { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.pick-flap > .pick-row:first-child { min-height: 52px; border-radius: 0; }
.pick-flap.is-open { border-color: var(--brand-line); }
.pick-flap.is-open > .pick-row:first-child { background: linear-gradient(150deg, hsl(var(--h) 88% 93%) 0%, hsl(var(--h) 90% 96.5%) 100%); }
.pick-kids { padding: 6px 2px 8px; }

/* Picker rows: the tick box on the left ticks; the rest of the row opens or closes */
.picker .pick-row { gap: 0; }
.picker .pick-tick { display: grid; place-items: center; flex: none; width: 44px; min-height: 44px; margin-left: 2px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.picker .pick-tick:disabled { cursor: default; }
.picker .pick-main { padding-left: 2px; }
.picker .pick-main .chev { flex: none; width: 20px; height: 20px; margin-right: 12px; color: var(--brand-strong); transition: transform .2s; }
.picker .pick-row.is-open > .pick-main .chev { transform: rotate(-90deg); }
/* A tap shows no box: the words fade for a moment and the tick box gives a small press */
.picker .pick-main, .picker .pick-tick { border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.picker .pick-main .grow { transition: opacity .15s; }
.picker .pick-main:active .grow { opacity: 0.6; }
.picker .tick { transition: transform .15s; }
.picker .pick-tick:active .tick { transform: scale(0.88); }
