/* Kinvy concepts. Each one swaps tokens plus a few signature details.
   Switch with ?theme=wild|classic|traditional|modern or the Prototype panel. */

.title, .section-head h2, .big, .hero-title, .display, .brand, .sheet h2, .stepper output, .counts b, .item-count .num, .date-chip b {
  font-family: var(--font-display, var(--font));
}

/* =====================================================================
   1. SUPER WILD · "Arcade" (built on learn.circlesco.com)
   Bricolage Grotesque + Figtree + JetBrains Mono, dot-grid canvas,
   black-outlined panels with hard offset shadows, one color at a time.
   Two color options: Night (black + blue) and Day (white + yellow).
   ===================================================================== */
[data-theme="wild"] {
  --font: "Figtree", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r-card: 18px; --r-input: 14px; --r-sheet: 24px;
  --canvas: #0A0A0A; --surface: #141414; --surface-2: #1A1A1A; --surface-3: #262626;
  --border: #2E2E2E; --border-strong: #3A3A3A; --edge: #3A3A3A; --line: #000; --dot: #262626;
  --ink: #FAFAFA; --muted: #A3A3A3;
  --primary: #FAFAFA; --primary-press: #D4D4D4; --primary-tint: #1F1F1F;
  --hue: #1264FF; --on: #FFFFFF; --hue-text: #8DB2FF;
  --action: var(--hue); --action-press: #0B4FD6; --action-tint: #10213F;
  --danger: #FF7477; --danger-press: #FF5A5E; --danger-tint: #3A1416;
  --success: var(--hue-text); --success-tint: #10213F; --focus: #262626;
  --hatch: repeating-linear-gradient(-45deg, #333 0 1.5px, transparent 1.5px 7px);
  --pop: 5px 5px 0 var(--line);
}
[data-theme="wild"][data-palette="day"] {
  --canvas: #F4F4F1; --surface: #FFFFFF; --surface-2: #FAFAF8; --surface-3: #EAEAE5;
  --border: #0A0A0A; --border-strong: #0A0A0A; --edge: #0A0A0A; --line: #0A0A0A; --dot: #D4D4CF;
  --ink: #0A0A0A; --muted: #52525B;
  --primary: #0A0A0A; --primary-press: #333; --primary-tint: #EDEDE8;
  --hue: #FFC21A; --on: #0A0A0A; --hue-text: #0A0A0A;
  --action-press: #F0B000; --action-tint: #FFF3CC;
  --danger: #C8232A; --danger-press: #A51C22; --danger-tint: #FDE8E8;
  --success: #0A0A0A; --success-tint: #FFF3CC; --focus: #EDEDE8;
  --hatch: repeating-linear-gradient(-45deg, #0A0A0A 0 1.5px, transparent 1.5px 8px);
}
[data-theme="wild"] body { background-color: var(--canvas); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px); background-size: 22px 22px; }
[data-theme="wild"] .title { font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-size: min(2.5rem, 12vw); }
[data-theme="wild"] .stk-kicker, [data-theme="wild"] .eyebrow-light, [data-theme="wild"] .steps, [data-theme="wild"] .sub, [data-theme="wild"] .date-chip span { font-family: var(--mono); letter-spacing: .02em; }
[data-theme="wild"] .stk-kicker { text-transform: none; font-weight: 600; }
[data-theme="wild"] .card, [data-theme="wild"] .option, [data-theme="wild"] .notice, [data-theme="wild"] .empty, [data-theme="wild"] .error-state, [data-theme="wild"] .stk {
  border: 2px solid var(--line); box-shadow: var(--pop); background-color: var(--surface); color: var(--ink);
}
[data-theme="wild"] .empty, [data-theme="wild"] .error-state { background: var(--hatch), var(--surface); }
[data-theme="wild"] .row:hover, [data-theme="wild"] .item:hover { background: var(--surface-2); }
[data-theme="wild"] .input { background: var(--surface-2); border: 2px solid var(--edge); color: var(--ink); }
[data-theme="wild"] .btn { border-radius: 14px; border: 2px solid var(--line); box-shadow: var(--pop); }
[data-theme="wild"] .btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }
[data-theme="wild"] .btn-primary { background: var(--hue); color: var(--on); }
[data-theme="wild"] .btn-primary:hover, [data-theme="wild"] .btn-primary:focus-visible { background: var(--action-press); }
[data-theme="wild"] .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--edge); }
[data-theme="wild"] .btn-green, [data-theme="wild"] .btn-light { background: var(--ink); color: var(--canvas); }
[data-theme="wild"] .btn-quiet { background: var(--surface-3); color: var(--ink); }
[data-theme="wild"] .btn-danger { color: #0A0A0A; }
[data-theme="wild"][data-palette="day"] .btn-danger { color: #fff; }
[data-theme="wild"] .btn-danger-text { background: transparent; }
[data-theme="wild"] .btn[disabled] { background: var(--surface-3); color: var(--muted); box-shadow: none; border-color: var(--edge); }
[data-theme="wild"] .rsvp button { border-radius: 14px; border: 2px solid var(--edge); background: var(--surface); color: var(--ink); box-shadow: var(--pop); }
[data-theme="wild"] .rsvp button[aria-pressed="true"] { background: var(--hue); border-color: var(--line); color: var(--on); }
[data-theme="wild"] .seg { background: var(--surface-3); border-radius: 14px; }
[data-theme="wild"] .seg button, [data-theme="wild"] .seg a { border-radius: 10px; color: var(--muted); }
[data-theme="wild"] .seg [aria-selected="true"], [data-theme="wild"] .seg [aria-pressed="true"] { background: var(--hue); color: var(--on); }
[data-theme="wild"] .date-chip { background: var(--surface-3); color: var(--ink); border: 2px solid var(--edge); border-radius: 12px; }
[data-theme="wild"] .status.todo { color: var(--on); background: var(--hue); border-radius: 999px; padding: 2px 12px; }
[data-theme="wild"] .status.yes { color: var(--hue-text); }
[data-theme="wild"] .badge { background: var(--hue); color: var(--on); }
[data-theme="wild"] .row-end .ic { background: var(--surface-3); color: var(--ink); }
[data-theme="wild"] .row-icon, [data-theme="wild"] .row-icon.green { background: var(--surface-3); color: var(--hue-text); }
[data-theme="wild"] .back, [data-theme="wild"] .btn-text { color: var(--ink); }
[data-theme="wild"] .back .ic, [data-theme="wild"] .btn-text .ic { background: var(--surface); border: 2px solid var(--edge); }
[data-theme="wild"] .see-all, [data-theme="wild"] a { color: var(--hue-text); }
[data-theme="wild"] .stk, [data-theme="wild"] .row, [data-theme="wild"] .tab, [data-theme="wild"] .btn, [data-theme="wild"] .chip, [data-theme="wild"] .avatar-btn { color: var(--ink); }
[data-theme="wild"] .btn-primary, [data-theme="wild"] .stk-gum { color: var(--on); }
[data-theme="wild"] .avatar { border: 2px solid var(--line); }
[data-theme="wild"] .card-dark { background: var(--surface); color: var(--ink); }
[data-theme="wild"] .card-dark .counts { background: var(--border); }
[data-theme="wild"] .card-dark .counts div { background: var(--surface); color: var(--muted); }
[data-theme="wild"] .card-dark .counts b { color: var(--ink); }
[data-theme="wild"] .card-dark .counts div:first-child b { color: var(--hue-text); }
[data-theme="wild"][data-palette="day"] .card-dark .counts div:first-child b { background: var(--hue); padding: 0 6px; border-radius: 8px; display: inline-block; }
[data-theme="wild"] .faint { color: var(--muted); }
[data-theme="wild"] .bar { background: var(--hatch), var(--surface-3); border: 2px solid var(--line); height: 16px; }
[data-theme="wild"] .bar span { background: var(--hue); border-radius: 0; }
[data-theme="wild"] .item-count.done, [data-theme="wild"] .winner { color: var(--hue-text); }
[data-theme="wild"] .option[aria-checked="true"] { border-color: var(--hue); background: var(--action-tint); }
[data-theme="wild"] .option .mark { background: var(--surface); border-color: var(--edge); }
[data-theme="wild"] .option[aria-checked="true"] .mark { background: var(--hue); border-color: var(--hue); color: var(--on); }
[data-theme="wild"] .notice { background: var(--action-tint); }
[data-theme="wild"] .notice > .ic { color: var(--hue-text); }
[data-theme="wild"] .notice.danger { background: var(--danger-tint); color: var(--ink); }
[data-theme="wild"] .notice.info { background: var(--surface-3); }
[data-theme="wild"] .role { background: var(--surface-3); color: var(--ink); }
[data-theme="wild"] .role.admin { background: var(--ink); color: var(--canvas); }
[data-theme="wild"] .role.organizer { background: var(--hue); color: var(--on); }
[data-theme="wild"] .empty-ic { background: var(--surface-3); color: var(--ink); }
[data-theme="wild"] .brand-mark, [data-theme="wild"] .done-ic { background: var(--hue); color: var(--on); }
[data-theme="wild"] .switch[aria-checked="true"]::before { background: var(--hue); }
[data-theme="wild"] .stepper button { background: var(--hue); color: var(--on); border: 2px solid var(--line); }
[data-theme="wild"] .toast { background: var(--surface-3); color: var(--ink); border: 2px solid var(--edge); border-radius: 14px; }
[data-theme="wild"] .toast .ic { color: var(--hue-text); }
[data-theme="wild"] .offline-banner { background: var(--hue); color: var(--on); }
[data-theme="wild"] .avatar.more { background: var(--hue) !important; color: var(--on); }
[data-theme="wild"] .tabs { background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); border-radius: 22px; }
[data-theme="wild"] .tabs .tab { color: var(--muted); }
[data-theme="wild"] .tabs .tab[aria-current="page"] { color: var(--ink); }
[data-theme="wild"] .tabs .tab[aria-current="page"] .tab-ic { background: var(--hue); color: var(--on); }
[data-theme="wild"] .tabs .rail-brand { color: var(--ink); }
[data-theme="wild"] .sticky-bar { background: var(--canvas); }
/* Stickers: one is the color, one carries it as a shadow, the rest are plain panels */
[data-theme="wild"] .stk-sky, [data-theme="wild"] .stk-tomato, [data-theme="wild"] .stk-grass, [data-theme="wild"] .stk-note { background: var(--surface); color: var(--ink); }
[data-theme="wild"] .stk-sun { background: var(--surface); color: var(--ink); box-shadow: 8px 8px 0 var(--hue); border-color: var(--line); }
[data-theme="wild"] .stk-sun .big { color: var(--hue-text); }
[data-theme="wild"][data-palette="day"] .stk-sun .big { color: var(--ink); text-decoration: underline 8px var(--hue); text-underline-offset: -2px; text-decoration-skip-ink: none; }
[data-theme="wild"] .stk-gum { background: var(--hue); }
[data-theme="wild"] .stk-note { border-radius: 18px; }
[data-theme="wild"] .note-line { color: var(--ink); border-bottom: 2px dashed var(--edge); font-family: var(--font); }
[data-theme="wild"] .stk:nth-child(odd) { transform: rotate(-1.2deg); }
[data-theme="wild"] .stk:nth-child(even) { transform: rotate(1.2deg); }
[data-theme="wild"] .stk-big { transform: rotate(-0.8deg); }
@media (min-width: 1024px) {
  [data-theme="wild"] .tabs .tab[aria-current="page"] { background: var(--hue); color: var(--on); }
  [data-theme="wild"] .tabs .tab[aria-current="page"] .tab-ic { background: none; }
}

/* =====================================================================
   2. CLASSIC · "Picnic"
   A timeless, friendly app: cherry red and navy on warm white,
   gingham on the big cards, soft shadows, rounded friendly type,
   a regular full-width tab bar.
   ===================================================================== */
[data-theme="classic"] {
  --canvas: #F7F3EC;
  --surface: #FFFFFF;
  --surface-2: #FBF8F3;
  --surface-3: #EDE6DA;
  --border: #EAE3D7;
  --border-strong: #CFC5B5;
  --ink: #1D2A44;
  --muted: #5A6273;
  --primary: #1D3557;         /* navy */
  --primary-press: #14263F;
  --primary-tint: #E4ECF5;
  --action: #D62839;          /* cherry, 5:1 with white */
  --action-press: #B01F2E;
  --action-tint: #FCE7E9;
  --mustard: #F4B942; --sky: #A8DADC;
  --success: #1D3557; --success-tint: #E4ECF5;
  --r-card: 20px; --r-input: 14px;
  --font: "Nunito", system-ui, sans-serif;
  --font-display: "Nunito", system-ui, sans-serif;
  --hatch: repeating-linear-gradient(0deg, rgba(29,53,87,.08) 0 8px, transparent 8px 16px), repeating-linear-gradient(90deg, rgba(29,53,87,.08) 0 8px, transparent 8px 16px);
  --soft: 0 1px 2px rgba(29,53,87,.06), 0 10px 28px rgba(29,53,87,.08);
}
[data-theme="classic"] .title { font-weight: 900; letter-spacing: -0.02em; }
[data-theme="classic"] .card, [data-theme="classic"] .option { box-shadow: var(--soft); }
[data-theme="classic"] .btn { border-radius: 14px; }
[data-theme="classic"] .btn-secondary { border: 2px solid var(--primary); color: var(--primary); }
[data-theme="classic"] .btn-green { background: var(--primary); }
[data-theme="classic"] .hero-card { border-radius: 24px; box-shadow: var(--soft); }
[data-theme="classic"] .hero-card.blue {
  background-color: var(--action);
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 14px, transparent 14px 28px), repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 14px, transparent 14px 28px);
}
[data-theme="classic"] .hero-card.dark { background: var(--primary); }
[data-theme="classic"] .notch { -webkit-mask: none; mask: none; }
[data-theme="classic"] .overlap { margin-top: 12px; padding-top: 22px; }
[data-theme="classic"] .round-btn { background: var(--mustard); color: var(--ink); bottom: auto; top: 22px; right: 22px; box-shadow: var(--soft); }
[data-theme="classic"] .pill-blue { background: var(--mustard); color: var(--ink); }
[data-theme="classic"] .pill-outline { border-color: rgba(255,255,255,.5); }
[data-theme="classic"] .card-dark { background: var(--primary); }
[data-theme="classic"] .card-dark .counts { background: #2B4770; }
[data-theme="classic"] .card-dark .counts div { background: var(--primary); color: #C9D6E8; }
[data-theme="classic"] .card-dark .counts div:first-child b { color: var(--mustard); }
[data-theme="classic"] .hero-card .avatar, [data-theme="classic"] .card-dark .avatar { border-color: #fff; }
[data-theme="classic"] .date-chip { background: var(--action-tint); color: var(--action); border-radius: 14px; }
[data-theme="classic"] .badge { background: var(--mustard); color: var(--ink); }
[data-theme="classic"] .seg [aria-selected="true"], [data-theme="classic"] .seg [aria-pressed="true"] { background: #fff; color: var(--primary); box-shadow: var(--soft); }
[data-theme="classic"] .seg { border-radius: 14px; }
[data-theme="classic"] .seg button, [data-theme="classic"] .seg a { border-radius: 10px; }
[data-theme="classic"] .rsvp button { border-radius: 14px; border: 2px solid var(--border-strong); }
[data-theme="classic"] .rsvp button[aria-pressed="true"] { background: var(--action); border-color: var(--action); }
[data-theme="classic"] .bar { background: var(--surface-3); }
[data-theme="classic"] .bar span { background: var(--action); }
[data-theme="classic"] .row-end .ic { background: none; color: var(--border-strong); }
[data-theme="classic"] .row-icon { background: var(--action-tint); color: var(--action); border-radius: 14px; }
[data-theme="classic"] .row-icon.green { background: var(--primary-tint); color: var(--primary); }
[data-theme="classic"] .back .ic, [data-theme="classic"] .btn-text .ic { background: none; padding: 0; }
[data-theme="classic"] .back, [data-theme="classic"] .btn-text { color: var(--action); }
[data-theme="classic"] .option[aria-checked="true"] { border-color: var(--primary); background: var(--primary-tint); }
[data-theme="classic"] .option[aria-checked="true"] .mark { background: var(--primary); border-color: var(--primary); }
[data-theme="classic"] .notice { background: var(--primary-tint); border-radius: 16px; }
[data-theme="classic"] .notice > .ic { color: var(--primary); }
[data-theme="classic"] .role.admin { background: var(--primary); }
[data-theme="classic"] .role.organizer { background: var(--action); }
[data-theme="classic"] .brand-mark { background: var(--action); border-radius: 12px; }
[data-theme="classic"] .done-ic { background: var(--action); }
[data-theme="classic"] .toast .ic { color: var(--mustard); }
[data-theme="classic"] .tabs { left: 0; right: 0; bottom: 0; border-radius: 0; background: #fff; border-top: 1px solid var(--border); padding: 0 0 env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgba(29,53,87,.05); }
[data-theme="classic"] .tabs .tab { color: var(--muted); border-radius: 0; }
[data-theme="classic"] .tabs .tab[aria-current="page"] { color: var(--action); }
[data-theme="classic"] .tabs .tab[aria-current="page"] .tab-ic { background: var(--action-tint); }
[data-theme="classic"] .tabs .rail-brand { color: var(--ink); }
[data-theme="classic"] .switch[aria-checked="true"]::before { background: var(--primary); }
[data-theme="classic"] .stepper button { background: var(--primary); }
@media (min-width: 1024px) {
  [data-theme="classic"] .tabs { margin: 0; top: 0; height: 100vh; border-right: 1px solid var(--border); border-top: 0; padding: var(--s3) 12px; }
  [data-theme="classic"] .tabs .tab { border-radius: 12px; }
  [data-theme="classic"] .tabs .tab[aria-current="page"] { background: var(--action-tint); }
}

/* =====================================================================
   3. TRADITIONAL · "Heirloom"
   The family recipe box and photo album: cream paper, serif headings,
   evergreen and brick with mustard, double-ruled cards, postmark dates,
   photo-print faces, ruled lines instead of hatching.
   ===================================================================== */
[data-theme="traditional"] {
  --canvas: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --surface-3: #F0EBE1;
  --border: #E7E0D2;
  --border-strong: #CDBFA5;
  --ink: #2A2118;
  --muted: #64574A;
  --primary: #2F5D50;         /* evergreen */
  --primary-press: #234A3F;
  --primary-tint: #E2ECE5;
  --action: #A9472F;          /* brick, 5.7:1 with white */
  --action-press: #8C3A26;
  --action-tint: #F6E3DA;
  --mustard: #D9A441;
  --success: #2F5D50; --success-tint: #E2ECE5;
  --r-card: 8px; --r-input: 8px; --r-sheet: 16px;
  --font: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --hatch: repeating-linear-gradient(180deg, transparent 0 22px, rgba(169,71,47,.18) 22px 23px);
  --rule: inset 0 0 0 5px var(--surface), inset 0 0 0 6px var(--border);
}
[data-theme="traditional"] body { font-size: 1.125rem; }
[data-theme="traditional"] .title { font-weight: 600; letter-spacing: -0.01em; font-variation-settings: "SOFT" 100, "WONK" 1; }
[data-theme="traditional"] .section-head h2 { font-weight: 600; font-style: italic; letter-spacing: 0; border-bottom: 1px solid var(--border-strong); padding-bottom: 6px; flex: 1; }
[data-theme="traditional"] .card { border: 1px solid var(--border-strong); box-shadow: var(--rule); }
[data-theme="traditional"] .list > * + * { border-top: 1px dashed var(--border-strong); }
[data-theme="traditional"] .btn { border-radius: 8px; font-family: var(--font); letter-spacing: .02em; }
[data-theme="traditional"] .btn-secondary { border: 1.5px solid var(--primary); color: var(--primary); background: var(--surface); }
[data-theme="traditional"] .btn-green { background: var(--primary); }
[data-theme="traditional"] .hero-card { border-radius: 8px; box-shadow: inset 0 0 0 6px var(--hc), inset 0 0 0 7.5px rgba(255,255,255,.45); }
[data-theme="traditional"] .hero-card.blue { --hc: var(--primary); background: var(--primary); }
[data-theme="traditional"] .hero-card.dark { --hc: var(--action); background: var(--action); }
[data-theme="traditional"] .notch { -webkit-mask: none; mask: none; }
[data-theme="traditional"] .overlap { margin-top: 12px; padding-top: 22px; }
[data-theme="traditional"] .round-btn { background: var(--mustard); color: var(--ink); top: 22px; bottom: auto; right: 22px; border-radius: 50%; box-shadow: 0 0 0 3px var(--primary), 0 0 0 4.5px var(--mustard); }
[data-theme="traditional"] .big { font-weight: 500; font-style: italic; letter-spacing: -0.03em; font-size: 4.25rem; }
[data-theme="traditional"] .big small { font-family: var(--font); font-style: normal; }
[data-theme="traditional"] .hero-title { font-weight: 600; font-size: 1.625rem; }
[data-theme="traditional"] .eyebrow-light { text-transform: uppercase; letter-spacing: .14em; font-size: .9375rem; opacity: .85; }
[data-theme="traditional"] .pill { border-radius: 8px; }
[data-theme="traditional"] .pill-blue { background: var(--mustard); color: var(--ink); }
[data-theme="traditional"] .pill-light { background: var(--surface); }
[data-theme="traditional"] .pill-outline { border-color: rgba(255,255,255,.6); }
[data-theme="traditional"] .date-chip { width: 3.75rem; height: 3.75rem; padding-top: 9px; border-radius: 50%; background: var(--surface); color: var(--action); border: 2px dashed var(--action); }
[data-theme="traditional"] .date-chip span { font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; }
[data-theme="traditional"] .date-chip b { font-size: 1.375rem; }
[data-theme="traditional"] .avatar { border-radius: 4px; border: 3px solid #fff; box-shadow: 0 1px 3px rgba(42,33,24,.3); }
[data-theme="traditional"] .face-stack .avatar:nth-child(odd) { transform: rotate(-4deg); }
[data-theme="traditional"] .face-stack .avatar:nth-child(even) { transform: rotate(3deg); }
[data-theme="traditional"] .hero-card .avatar, [data-theme="traditional"] .card-dark .avatar { border-color: #fff; }
[data-theme="traditional"] .badge { background: var(--action); border-radius: 4px; font-family: var(--font); }
[data-theme="traditional"] .card-dark { background: var(--primary); }
[data-theme="traditional"] .card-dark .counts { background: #47766A; }
[data-theme="traditional"] .card-dark .counts div { background: var(--primary); color: #D5E3DB; }
[data-theme="traditional"] .card-dark .counts b { font-style: italic; font-weight: 500; }
[data-theme="traditional"] .card-dark .counts div:first-child b { color: #F2C66D; }
[data-theme="traditional"] .seg { border-radius: 8px; background: var(--surface-3); }
[data-theme="traditional"] .seg button, [data-theme="traditional"] .seg a { border-radius: 6px; }
[data-theme="traditional"] .seg [aria-selected="true"], [data-theme="traditional"] .seg [aria-pressed="true"] { background: var(--primary); color: #fff; }
[data-theme="traditional"] .rsvp button { border-radius: 8px; border: 1.5px solid var(--primary); background: var(--surface); }
[data-theme="traditional"] .rsvp button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }
[data-theme="traditional"] .bar { border-radius: 2px; height: 12px; background: var(--surface-3); }
[data-theme="traditional"] .bar span { background: var(--primary); border-radius: 2px; }
[data-theme="traditional"] .item-count .num { font-style: italic; font-weight: 500; }
[data-theme="traditional"] .row-end .ic { background: none; color: var(--border-strong); }
[data-theme="traditional"] .row-icon { border-radius: 8px; background: var(--action-tint); color: var(--action); }
[data-theme="traditional"] .row-icon.green { background: var(--primary-tint); color: var(--primary); }
[data-theme="traditional"] .back .ic, [data-theme="traditional"] .btn-text .ic { background: none; padding: 0; }
[data-theme="traditional"] .back, [data-theme="traditional"] .btn-text, [data-theme="traditional"] .see-all { color: var(--primary); }
[data-theme="traditional"] .option { border-radius: 8px; border: 1.5px solid var(--border); }
[data-theme="traditional"] .option[aria-checked="true"] { border-color: var(--primary); background: var(--primary-tint); }
[data-theme="traditional"] .option[aria-checked="true"] .mark { background: var(--primary); border-color: var(--primary); }
[data-theme="traditional"] .notice { background: var(--primary-tint); border-radius: 8px; border-left: 4px solid var(--primary); }
[data-theme="traditional"] .notice > .ic { color: var(--primary); }
[data-theme="traditional"] .role { border-radius: 4px; }
[data-theme="traditional"] .role.admin { background: var(--primary); }
[data-theme="traditional"] .role.organizer { background: var(--action); }
[data-theme="traditional"] .brand-mark { background: var(--primary); border-radius: 8px; }
[data-theme="traditional"] .done-ic { background: var(--primary); }
[data-theme="traditional"] .toast { border-radius: 8px; background: var(--ink); }
[data-theme="traditional"] .toast .ic { color: #F2C66D; }
[data-theme="traditional"] .input { border-radius: 8px; border-color: var(--border-strong); background: #fff; }
[data-theme="traditional"] .tabs { left: 0; right: 0; bottom: 0; border-radius: 0; background: #fff; padding: 0 0 env(safe-area-inset-bottom); border-top: 3px double var(--border-strong); }
[data-theme="traditional"] .tabs .tab { color: var(--muted); border-radius: 0; }
[data-theme="traditional"] .tabs .tab[aria-current="page"] { color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
[data-theme="traditional"] .tabs .tab[aria-current="page"] .tab-ic { background: none; }
[data-theme="traditional"] .tabs .rail-brand { color: var(--ink); }
[data-theme="traditional"] .tab-label { font-family: var(--font); letter-spacing: 0; }
[data-theme="traditional"] .switch[aria-checked="true"]::before { background: var(--primary); }
[data-theme="traditional"] .stepper button { background: var(--primary); }
@media (min-width: 1024px) {
  [data-theme="traditional"] .tabs { margin: 0; top: 0; height: 100vh; border-top: 0; border-right: 3px double var(--border-strong); padding: var(--s3) 12px; }
  [data-theme="traditional"] .tabs .tab[aria-current="page"] { background: var(--primary-tint); box-shadow: inset 3px 0 0 var(--primary); border-radius: 4px; }
}

/* =====================================================================
   4. MODERN · "Bento"
   Our studio direction, re-colored for family: grape, tangerine and
   mint tiles on cool grey. Huge numbers, notched cards, pills,
   hatching, a floating white tab bar.
   ===================================================================== */
[data-theme="modern"] {
  --canvas: #F1F0F6;
  --surface: #FFFFFF;
  --surface-2: #F7F6FB;
  --surface-3: #E6E4F0;
  --border: #E6E4F0;
  --border-strong: #C4C0D6;
  --ink: #15121F;
  --muted: #625D73;
  --primary: #15121F;
  --primary-press: #2C2838;
  --primary-tint: #E6E4F0;
  --action: #5B3DF5;          /* grape, 6:1 with white */
  --action-press: #4528D9;
  --action-tint: #ECE8FF;
  --tangerine: #FF8A3D; --mint: #3DDC97; --lemon: #FFE45C;
  --success: #5B3DF5; --success-tint: #ECE8FF;
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --hatch: repeating-linear-gradient(-45deg, #CFCBE0 0 1.5px, transparent 1.5px 7px);
}
[data-theme="modern"] .title { letter-spacing: -0.04em; font-weight: 700; }
[data-theme="modern"] .big { font-weight: 700; letter-spacing: -0.06em; }
[data-theme="modern"] .hero-card.blue { background: var(--action); }
[data-theme="modern"] .hero-card.dark { background: var(--tangerine); color: var(--ink); }
[data-theme="modern"] .hero-card.dark .avatar { border-color: var(--tangerine); }
[data-theme="modern"] .hero-card.dark .pill-outline { border-color: var(--ink); color: var(--ink); }
[data-theme="modern"] .hero-card.dark .pill-light { background: var(--ink); color: #fff; }
[data-theme="modern"] .pill-blue { background: var(--mint); color: var(--ink); }
[data-theme="modern"] .round-btn { background: var(--lemon); color: var(--ink); }
[data-theme="modern"] .round-btn:hover { background: var(--mint); }
[data-theme="modern"] .date-hero .hero-card.dark { background: var(--mint); }
[data-theme="modern"] .date-chip { background: var(--action-tint); color: var(--action); }
[data-theme="modern"] .row:nth-child(2n) .date-chip { background: #FFEBDD; color: #8A3A08; }
[data-theme="modern"] .row:nth-child(3n) .date-chip { background: #DBF7EA; color: #10603E; }
[data-theme="modern"] .card-dark { background: var(--ink); }
[data-theme="modern"] .card-dark .counts div:first-child b { color: var(--mint); }
[data-theme="modern"] .card-dark .counts div:nth-child(2) b { color: var(--lemon); }
[data-theme="modern"] .badge { background: var(--tangerine); color: var(--ink); }
[data-theme="modern"] .seg [aria-selected="true"], [data-theme="modern"] .seg [aria-pressed="true"] { background: var(--action); }
[data-theme="modern"] .bar span { background: var(--action); }
[data-theme="modern"] .result.win .bar span { background: var(--tangerine); }
[data-theme="modern"] .role.organizer { background: var(--tangerine); color: var(--ink); }
[data-theme="modern"] .brand-mark { background: var(--action); }
[data-theme="modern"] .toast .ic { color: var(--mint); }
[data-theme="modern"] .row-icon { background: var(--lemon); color: var(--ink); }
[data-theme="modern"] .tabs { background: #fff; box-shadow: 0 10px 30px rgba(21,18,31,.14); }
[data-theme="modern"] .tabs .tab { color: var(--muted); }
[data-theme="modern"] .tabs .tab[aria-current="page"] { color: var(--action); }
[data-theme="modern"] .tabs .tab[aria-current="page"] .tab-ic { background: var(--action-tint); }
[data-theme="modern"] .tabs .rail-brand { color: var(--ink); }
@media (min-width: 1024px) {
  [data-theme="modern"] .tabs .tab[aria-current="page"] { background: var(--action-tint); }
}

/* ===================== Concept layout pieces ===================== */

/* Modern · bento tiles */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 44px; }
.tile { display: block; border-radius: 26px; padding: 18px; text-decoration: none; color: var(--ink); background: #fff; }
.tile.wide { grid-column: span 2; }
.tile-label { font-weight: 700; }
.tile .big { font-size: 3.25rem; margin: 10px 0 0; }
.t-grape { background: var(--action, #5B3DF5); color: #fff; }
.t-mint { background: var(--mint, #3DDC97); }
.t-hatch { background: var(--hatch), #fff; }

/* Super wild · fridge door */
.fridge { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; margin-top: var(--s2); align-items: start; }
.stk { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 2.5px solid #111; border-radius: 20px; box-shadow: 4px 4px 0 #111; color: #111; text-decoration: none; background: #fff; }
.stk:nth-child(odd) { transform: rotate(-2deg); }
.stk:nth-child(even) { transform: rotate(2.5deg); }
.stk:hover { transform: rotate(0) scale(1.02); }
.stk-big { grid-column: span 2; transform: rotate(-1.5deg); }
.stk-kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.stk-q { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.15; overflow-wrap: anywhere; }
.stk-meta { font-weight: 600; }
.stk .big { margin: 4px 0; }
.stk-sun { background: #FFD23F; } .stk-sky { background: #3DA5FF; } .stk-gum { background: #FF8FC7; }
.stk-tomato { background: #FF5A3C; } .stk-grass { background: #2BB673; }
.stk-faces .face-stack { margin-top: 6px; }
.stk-faces .big { font-size: 3.25rem; }
.stk-note { background: #FFF27A; border-radius: 4px; transform: rotate(1.5deg); box-shadow: 4px 4px 0 #111; }
.note-line { display: flex; justify-content: space-between; gap: 8px; min-height: 48px; align-items: center; border: 0; border-bottom: 2px dashed #111; background: none; font-weight: 700; text-align: left; padding: 0; }
.note-line b { font-family: var(--font-display); font-size: 1.375rem; }
.wild-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin: 8px 0 20px; }
.wh-date { grid-row: span 2; }
.wh-date .big { font-size: 5rem; }
.wh-time b { font-family: var(--font-display); font-size: 1.75rem; }
.wh-in { justify-content: center; font-weight: 700; }
.wh-in b { font-family: var(--font-display); font-size: 2rem; }

/* Classic · shelf of cards + to-do list */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px; }
.gcard { scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--soft, 0 8px 24px rgba(0,0,0,.08)); text-decoration: none; color: var(--ink); }
.gc-top { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 10px; padding: 18px; color: #fff;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.14) 0 12px, transparent 12px 24px), repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 12px, transparent 12px 24px); }
.gc-0 .gc-top { background-color: #D62839; } .gc-1 .gc-top { background-color: #1D3557; } .gc-2 .gc-top { background-color: #B5651D; }
.gc-mon { grid-column: 1 / -1; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.gc-day { font-family: var(--font-display); font-weight: 900; font-size: 3.5rem; line-height: 1; }
.gc-in { font-weight: 700; padding-bottom: 6px; }
.gc-body { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 18px; }
.gc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.gc-foot .avatar { width: 2.25rem; height: 2.25rem; }
.todo-row { align-items: flex-start; }
.todo-check { flex: none; width: 1.75rem; height: 1.75rem; margin-top: 2px; border-radius: 8px; border: 2.5px solid var(--border-strong); }
.todo-verb { display: inline-block; font-weight: 800; color: var(--action); }

/* Traditional · almanac, ledger, recipe card, invitation */
.almanac { padding: 20px 18px 18px; margin-top: var(--s2); }
.alm-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double var(--border-strong); padding-bottom: 8px; margin-bottom: 10px; }
.alm-month { font-family: var(--font-display); font-style: italic; font-size: 2.25rem; font-weight: 500; }
.alm-year { font-family: var(--font-display); font-size: 1.25rem; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day { display: grid; place-items: center; min-height: 44px; font-family: var(--font-display); font-size: 1.125rem; border-radius: 50%; color: var(--ink); text-decoration: none; }
.cal-day.marked { min-height: 48px; background: var(--action); color: #fff; font-weight: 700; }
.ledger .led-date { flex: none; width: 3.75rem; text-align: center; border-right: 1px solid var(--border-strong); padding-right: 12px; color: var(--muted); font-weight: 600; }
.ledger .led-date b { display: block; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2.25rem; line-height: 1; color: var(--action); }
.recipe { background: #FFFDF7; border: 1px solid var(--border-strong); border-top: 6px solid var(--action); border-radius: 6px; padding: 8px 16px; box-shadow: 0 2px 6px rgba(42,33,24,.12);
  background-image: repeating-linear-gradient(180deg, transparent 0 55px, rgba(169,71,47,.22) 55px 56px); }
.recipe-line { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 56px; padding: 14px 0 0; border: 0; background: none; text-align: left; font-size: 1.125rem; }
.recipe-line span:first-child { font-weight: 700; }
.recipe-line .dots { flex: 1; border-bottom: 2px dotted var(--border-strong); transform: translateY(-4px); }
.recipe-line span:last-child { color: var(--muted); }
.invitation { text-align: center; padding: 28px 20px 22px; margin-bottom: 14px; }
.inv-kicker { font-family: var(--font-display); font-style: italic; font-size: 1.375rem; color: var(--action); margin-bottom: 10px; }
.inv-line { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.3; }
.inv-orn { display: block; color: var(--mustard, #D9A441); font-size: 1.25rem; margin: 12px 0 8px; }
.inv-small { color: var(--muted); font-weight: 600; }

/* Classic · gathering banner */
.banner { display: flex; flex-direction: column; gap: 4px; padding: 22px; margin-bottom: 14px; border-radius: 24px; color: #fff; background-color: var(--action);
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.13) 0 14px, transparent 14px 28px), repeating-linear-gradient(90deg, rgba(255,255,255,.13) 0 14px, transparent 14px 28px); }
.banner-date { font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; line-height: 1.15; }
.banner-time { font-weight: 700; font-size: 1.25rem; }
.banner-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.banner .pill-light { color: var(--action); }

@media (min-width: 768px) {
  .shelf { grid-auto-columns: 46%; }
  .fridge { grid-template-columns: repeat(3, 1fr); }
  .stk-big { grid-column: span 2; grid-row: span 2; }
}
html.large-text .fridge, html.large-text .bento, html.large-text .wild-head { grid-template-columns: 1fr; }
html.large-text .stk-big, html.large-text .tile.wide { grid-column: auto; }
html.large-text .shelf { grid-auto-columns: 92%; }
@media (prefers-reduced-motion: reduce) { .stk:hover { transform: none; } }
.alm-head { flex-wrap: wrap; gap: 0 12px; }
.recipe-line { flex-wrap: wrap; }


/* Traditional: white page, color lives in the type and the rules */
[data-theme="traditional"] .card { box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px var(--border); }
[data-theme="traditional"] .recipe { background-color: #fff; }
[data-theme="traditional"] .hero-card.blue, [data-theme="traditional"] .card-dark { background: var(--primary); }

/* Classic: fewer badges. Counts and roles read as plain text. */
[data-theme="classic"] .badge { display: none; }
[data-theme="classic"] .role, [data-theme="classic"] .role.admin, [data-theme="classic"] .role.organizer { background: none; color: var(--muted); padding: 0; font-weight: 600; }
[data-theme="classic"] .status.todo { font-weight: 800; }

/* Modern: three color combos */
[data-theme="modern"][data-palette="lagoon"] { --action: #0B7A75; --action-press: #08605C; --action-tint: #DDF1EF; --tangerine: #FF7A6B; --mint: #9BE564; --lemon: #FFE45C; --success: #0B7A75; --success-tint: #DDF1EF; }
[data-theme="modern"][data-palette="berry"] { --action: #C2185B; --action-press: #9E1249; --action-tint: #FCE4EE; --tangerine: #FFB4D2; --mint: #7DD3FC; --lemon: #FFD166; --success: #C2185B; --success-tint: #FCE4EE; }
[data-theme="modern"][data-palette="lagoon"] .row:nth-child(2n) .date-chip { background: #FFE4E0; color: #8A2B20; }
[data-theme="modern"][data-palette="berry"] .row:nth-child(2n) .date-chip { background: #FFE6F0; color: #8C1243; }
[data-theme="modern"][data-palette="berry"] .row:nth-child(3n) .date-chip { background: #E0F4FD; color: #0B5A7F; }

/* "Your look" picker */
.looks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.look-card { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 16px; min-height: 9rem; border-radius: 20px; border: 2px solid var(--border); background: var(--surface); color: var(--ink); }
.look-card[aria-checked="true"] { border-color: var(--action); background: var(--action-tint); }
.look-aa { font-size: 2rem; font-weight: 800; line-height: 1; }
.look-sw, .pal-dots { display: flex; }
.look-sw i, .pal-dots i { width: 1.375rem; height: 1.375rem; border-radius: 50%; border: 2px solid var(--surface); margin-right: -6px; }
.pal-dots { margin-right: 12px; }
.look-sw { margin: 6px 0; }
.look-name { font-weight: 800; font-size: var(--t-label); }
.look-kind { color: var(--muted); }
.seg .pal-dots + * { display: inline; }
.seg button:has(.pal-dots) { display: inline-flex; align-items: center; justify-content: center; gap: 0; }
html.large-text .looks { grid-template-columns: 1fr; }
.seg:has(.pal-dots) { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); border-radius: 22px; }
.seg button:has(.pal-dots) { min-width: 0; }

/* =====================================================================
   Traditional v2: a familiar, everyday app. Plain sans-serif type,
   grouped lists with icon tiles, a scrolling week strip, white page.
   ===================================================================== */
[data-theme="traditional"] { --font-display: "Source Sans 3", system-ui, sans-serif; --r-card: 14px; --r-input: 10px; }
[data-theme="traditional"] body { font-size: var(--t-body); }
[data-theme="traditional"] .title { font-weight: 700; letter-spacing: -0.015em; font-variation-settings: normal; }
[data-theme="traditional"] .section-head h2 { font-style: normal; font-weight: 700; font-size: 1.0625rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 0; padding: 0; }
[data-theme="traditional"] .card { box-shadow: none; border: 1px solid var(--border); border-radius: 14px; }
[data-theme="traditional"] .list > * + * { border-top: 1px solid var(--surface-3); }
[data-theme="traditional"] .big, [data-theme="traditional"] .item-count .num, [data-theme="traditional"] .card-dark .counts b { font-style: normal; font-weight: 700; }
[data-theme="traditional"] .card-dark { background: var(--primary); }
[data-theme="traditional"] .avatar { border-radius: 50%; border: 2px solid #fff; box-shadow: none; }
[data-theme="traditional"] .face-stack .avatar { transform: none !important; }
[data-theme="traditional"] .date-chip { width: 3.5rem; height: auto; padding: 6px 0; border-radius: 12px; border: 0; background: var(--primary-tint); color: var(--primary); }
[data-theme="traditional"] .date-chip span { font-size: var(--t-body); text-transform: none; letter-spacing: 0; }
[data-theme="traditional"] .tabs { border-top: 1px solid var(--border); }
[data-theme="traditional"] .tabs .tab[aria-current="page"] { box-shadow: none; }
[data-theme="traditional"] .tabs .tab[aria-current="page"] .tab-ic { background: var(--primary-tint); }
[data-theme="traditional"] .notice { border-left: 0; border-radius: 12px; }
.tr-ic { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.tr-ic.green { background: #2F5D50; } .tr-ic.brick { background: #A9472F; } .tr-ic.gold { background: #D9A441; color: #2A2118; }
.tr-when { margin-bottom: 12px; }
.tr-when .info-row { align-items: center; }
.tr-count { text-align: center; font-weight: 600; color: var(--muted); line-height: 1.1; }
.tr-count b { display: block; font-size: 2rem; font-weight: 700; color: var(--action); }
.weekstrip { margin-top: var(--s2); padding: 14px 0 12px; overflow: hidden; }
.ws-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 16px 10px; flex-wrap: wrap; }
.ws-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 7); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.ws-track::-webkit-scrollbar { display: none; }
.ws-day { scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; min-height: 4.5rem; padding: 8px 0; border-radius: 12px; text-decoration: none; color: var(--ink); }
.ws-dow { font-size: .9375rem; color: var(--muted); font-weight: 600; }
.ws-num { font-size: 1.25rem; font-weight: 700; }
.ws-dot { width: 6px; height: 6px; border-radius: 50%; }
.ws-day.today { background: var(--surface-3); }
.ws-day.has { background: var(--primary); color: #fff; }
.ws-day.has .ws-dow { color: #D5E3DB; }
.ws-day.has .ws-dot { background: #F2C66D; }
html.large-text .ws-track { grid-auto-columns: calc((100% - 32px) / 4); }

/* =====================================================================
   Bento v2: two pop colors per combo; everything else white, greys, black.
   ===================================================================== */
[data-theme="modern"][data-palette="grape"] { --pop2: #FF8A3D; }
[data-theme="modern"][data-palette="lagoon"] { --pop2: #FF7A6B; }
[data-theme="modern"][data-palette="berry"] { --pop2: #7DD3FC; }
[data-theme="modern"][data-palette] { --tangerine: var(--pop2); --mint: var(--pop2); --lemon: var(--pop2); }
[data-theme="modern"] .hero-card.dark, [data-theme="modern"] .date-hero .hero-card.dark { background: var(--ink); color: #fff; }
[data-theme="modern"] .hero-card.dark .avatar { border-color: var(--ink); }
[data-theme="modern"] .hero-card.dark .pill-outline { border-color: #4A4658; color: #fff; }
[data-theme="modern"] .hero-card.dark .pill-light { background: #fff; color: var(--ink); }
[data-theme="modern"] .pill-blue { background: var(--pop2); color: var(--ink); }
[data-theme="modern"] .round-btn { background: var(--pop2); color: var(--ink); }
[data-theme="modern"] .round-btn:hover { background: #fff; }
[data-theme="modern"] .t-mint { background: var(--pop2); }
[data-theme="modern"] .card-dark .counts div:first-child b { color: var(--pop2); }
[data-theme="modern"] .card-dark .counts div:nth-child(2) b { color: #fff; }
[data-theme="modern"][data-palette] .row:nth-child(n) .date-chip { background: var(--ink); color: #fff; }
[data-theme="modern"] .row-icon, [data-theme="modern"] .row-icon.green { background: var(--surface-3); color: var(--ink); }
[data-theme="modern"] .badge, [data-theme="modern"] .role.organizer { background: var(--pop2); color: var(--ink); }
[data-theme="modern"] .toast .ic { color: var(--pop2); }

/* ===================== Per-look layouts: votes, results, family ===================== */
.opt-letter { display: none; }

/* Arcade: options are stickers in two columns; the family is a deck of trading cards */
[data-theme="wild"] .options { grid-template-columns: 1fr 1fr; gap: 14px; }
[data-theme="wild"] .option { flex-direction: column; align-items: flex-start; min-height: 7.5rem; font-family: var(--font-display); font-size: 1.25rem; }
[data-theme="wild"] .option:nth-child(odd) { transform: rotate(-1deg); }
[data-theme="wild"] .option:nth-child(even) { transform: rotate(1deg); }
[data-theme="wild"] .dh .big { font-size: 3.25rem; }
[data-theme="wild"] .dh-n { font-family: var(--font-display); font-size: 3rem; line-height: 1; }
[data-theme="wild"] .result { border-bottom: 2px dashed var(--edge); }
[data-theme="wild"] .result-top span:last-child { font-family: var(--font-display); font-size: 1.75rem; }
.crew { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.crew-card { align-items: flex-start; padding: 14px; }
.crew-name { font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; line-height: 1.1; margin-top: 8px; }
.crew-role { margin-top: 6px; }
.crew-look { font-family: var(--mono, monospace); color: var(--muted); font-size: .9375rem; }
.avatar.xl { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; font-size: 2.5rem; }

/* Bento: options carry big letters; the family is a grid of photo tiles */
[data-theme="modern"] .option .mark { display: none; }
[data-theme="modern"] .option .opt-letter { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--surface-3); font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; }
[data-theme="modern"] .option[aria-checked="true"] .opt-letter { background: var(--action); color: #fff; }
[data-theme="modern"] .option { border-radius: 999px; min-height: 4.75rem; padding: 10px 22px 10px 12px; }
[data-theme="modern"] .result-top span:last-child { font-family: var(--font-display); font-size: 2.25rem; letter-spacing: -0.04em; line-height: 1; }
[data-theme="modern"] .result .bar { height: 18px; }
.face-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.face-tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; text-decoration: none; color: #fff; background: var(--ink); }
.avatar.fill { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; font-size: 3rem; }
.face-cap { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; gap: 0; padding: 10px 12px; border-radius: 18px; background: rgba(21, 18, 31, .82); }
.face-cap b { font-size: 1.125rem; }
.face-cap span { font-size: .9375rem; color: #D9D6E4; }

/* Heirloom: options are one grouped list with radio rows */
[data-theme="traditional"] .options { gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
[data-theme="traditional"] .option { border: 0; border-radius: 0; min-height: 3.75rem; }
[data-theme="traditional"] .option + .option { border-top: 1px solid var(--surface-3); }
[data-theme="traditional"] .option[aria-checked="true"] { background: var(--primary-tint); }
[data-theme="traditional"] .option .mark { order: 2; margin-left: auto; border-radius: 50%; }

/* Picnic: results as tidy cards with cherry bars */
[data-theme="classic"] .result-top span:last-child { color: var(--action); }

html.large-text .options, html.large-text .crew, html.large-text .face-grid { grid-template-columns: 1fr !important; }
html.large-text .face-tile { aspect-ratio: auto; min-height: 16rem; }

/* =====================================================================
   Desktop sidebar (1024px+). One set of rail rules for every look, written
   last so the phone tab bar's tight spacing never leaks into the rail.
   ===================================================================== */
.rail-me { display: none; }
@media (min-width: 1024px) {
  .app:not(.no-tabs) { grid-template-columns: 272px minmax(0, 1fr); }
  html[data-theme] .app .tabs {
    position: sticky; top: 0; left: auto; right: auto; bottom: auto;
    display: flex; flex-direction: column; gap: 4px;
    height: 100vh; margin: 0; padding: 24px 16px 20px;
    border-radius: 0; box-shadow: none;
  }
  html[data-theme] .app .tabs .rail-brand {
    display: flex; align-items: center; gap: 12px; height: 48px;
    padding: 0 12px; margin: 0 0 28px; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em;
  }
  html[data-theme] .app .tabs .rail-brand .brand-mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; }
  html[data-theme] .app .tabs .tab {
    flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px;
    min-height: 52px; padding: 0 16px; margin: 0; border-radius: 14px; box-shadow: none;
    font-size: 1.0625rem; font-weight: 600; text-decoration: none;
  }
  html[data-theme] .app .tabs .tab .tab-ic { width: 26px; height: 26px; background: none; border: 0; border-radius: 0; color: inherit; }
  html[data-theme] .app .tabs .tab .tab-label { font-size: 1.0625rem; letter-spacing: 0; }
  html[data-theme] .app .tabs .tab:hover { background: var(--rail-hover, rgba(0, 0, 0, .05)); }
  html[data-theme] .app .tabs .tab[aria-current="page"] .tab-ic { background: none; border: 0; }
  .rail-me {
    display: flex; align-items: center; gap: 12px; margin-top: auto;
    padding: 12px; border-radius: 16px; text-decoration: none; color: inherit;
  }
  .rail-me:hover { background: var(--rail-hover, rgba(0, 0, 0, .05)); }
  .rail-me .avatar { width: 2.75rem; height: 2.75rem; }
  .rail-me-text { display: grid; line-height: 1.25; min-width: 0; }
  .rail-me-text b { font-size: 1.0625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-me-text small { font-size: .9375rem; opacity: .7; }

  /* Bento: a floating white panel inset from the page edge */
  html[data-theme="modern"] .app .tabs { margin: 12px 0 12px 12px; height: calc(100vh - 24px); top: 12px; border-radius: 28px; background: #fff; box-shadow: 0 10px 30px rgba(21, 18, 31, .08); --rail-hover: var(--surface-2); }
  html[data-theme="modern"] .app .tabs .tab { color: var(--muted); }
  html[data-theme="modern"] .app .tabs .tab[aria-current="page"] { background: var(--action); color: #fff; }
  html[data-theme="modern"] .app .tabs .rail-brand .brand-mark { background: var(--action); border-radius: 50%; }

  /* Arcade: an outlined panel with the hard shadow */
  html[data-theme="wild"] .app .tabs { margin: 12px 0 12px 12px; height: calc(100vh - 24px); top: 12px; border-radius: 22px; background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--pop); --rail-hover: var(--surface-3); }
  html[data-theme="wild"] .app .tabs .tab { color: var(--muted); }
  html[data-theme="wild"] .app .tabs .tab[aria-current="page"] { background: var(--hue); color: var(--on); }
  html[data-theme="wild"] .app .tabs .rail-brand .brand-mark { background: var(--hue); color: var(--on); border-radius: 12px; }
  html[data-theme="wild"] .rail-me { border: 2px solid var(--edge); }

  /* Picnic: a classic full-height white sidebar */
  html[data-theme="classic"] .app .tabs { background: #fff; border-right: 1px solid var(--border); --rail-hover: var(--surface-2); }
  html[data-theme="classic"] .app .tabs .tab { color: var(--muted); }
  html[data-theme="classic"] .app .tabs .tab[aria-current="page"] { background: var(--action-tint); color: var(--action); }
  html[data-theme="classic"] .app .tabs .rail-brand .brand-mark { background: var(--action); border-radius: 12px; }

  /* Heirloom: plain white sidebar with a quiet green highlight */
  html[data-theme="traditional"] .app .tabs { background: #fff; border-right: 1px solid var(--border); --rail-hover: var(--surface-2); }
  html[data-theme="traditional"] .app .tabs .tab { color: var(--muted); }
  html[data-theme="traditional"] .app .tabs .tab[aria-current="page"] { background: var(--primary-tint); color: var(--primary); }
  html[data-theme="traditional"] .app .tabs .rail-brand .brand-mark { background: var(--primary); border-radius: 10px; }
}
@media (min-width: 1024px) { html[data-theme="wild"] .rail-me { color: var(--ink); } }

@media (min-width: 1024px) {
  .fridge { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .stk-big { grid-column: auto; grid-row: auto; }
}
