/* Design tokens + the page shell + the shared "sticker book" pieces.
   From Claude Design option A · Sticker book, extended for Wishbook v2 (Claude
   Design file Wishbook.dc.html, screens 1–7) — see the "Wishbook v2" band below. Slices bring their own slice.css
   for layout and style only what they own; the visual vocabulary (stickers,
   chunky buttons, inputs, tag pill, bottom sheet) lives here so every screen
   speaks it the same way. Mobile-first: one ~480px column. */
:root {
  /* palette */
  --paper: oklch(0.97 0.018 85);        /* cream page */
  --paper-dot: oklch(0.88 0.03 80);     /* the dotted pattern */
  --paper-dim: oklch(0.94 0.02 85);     /* a sticker that's done / taken */
  --ink: #2a2118;
  --ink-soft: #5b4f44;
  --muted: #6b5f54;
  --placeholder: #a2958a;
  --card: #fff;

  --coral: oklch(0.72 0.15 35);
  --sky: oklch(0.72 0.15 235);
  --green: oklch(0.72 0.15 140);
  --purple: oklch(0.72 0.15 300);
  --butter: oklch(0.9 0.08 95);         /* the share card, the wisher's hello */
  --sky-wash: oklch(0.92 0.06 235);     /* public link card */
  --coral-wash: oklch(0.93 0.05 35);    /* secret link card */
  --green-wash: oklch(0.9 0.08 140);    /* "who promised" chip */
  --hero-a: oklch(0.86 0.06 35);        /* hero placeholder stripes */
  --hero-b: oklch(0.9 0.05 35);
  --photo-a: oklch(0.93 0.03 85);       /* photo drop-zone stripes */
  --photo-b: oklch(0.96 0.02 85);
  --rule: #e6ddd0;                      /* dashed row separators */

  /* role accents: organizer purple, wisher coral, guest sky.
     Each screen sets --role (see [data-screen] below); .role pills pick their own. */
  --role-org: var(--purple);
  --role-wish: var(--coral);
  --role-guest: var(--sky);
  --role: var(--coral);
  --link: oklch(0.5 0.15 235);
  --link-hover: oklch(0.4 0.15 235);
  --taken: oklch(0.48 0.13 140);
  --blob-done: #e6ddd0;
  --on-accent: #1e1712;                 /* text on any accent fill */
  --edge: var(--ink);                   /* outlines of small chips/inputs (border colour apart from text) */
  --inv-bg: var(--ink);                 /* inverted chip: tag, selected tab, toast */
  --inv-fg: #fff6e8;
  --danger: oklch(0.5 0.17 30);
  --scrim: rgba(30, 25, 21, .45);
  --sheet-bg: var(--paper);
  --radius-card: 20px;                  /* .card */
  --radius-field: 16px;                 /* inputs, tabs, link cards */

  /* aliases the standard whats-new slice reads */
  --jam: var(--coral);
  --line-2: var(--ink);
  --hair: rgba(42, 33, 24, .14);

  /* type */
  --display: "Fredoka", system-ui, sans-serif;
  --sans: "Nunito", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, Menlo, monospace;

  /* the sticker look */
  --border: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-pressed: 1px 1px 0 var(--ink);
  --radius: 18px;
  --radius-sm: 14px;

  --shell: 480px;
  --gutter: 24px;
  --gap: 18px;

  color-scheme: only light;          /* never force-darkened by the browser */
}

/* ── page shell ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--paper-dot) 1.4px, transparent 1.5px);
  background-size: 22px 22px;
  background-attachment: fixed;
}
[hidden] { display: none !important; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
a.btn, a.btn:hover { color: var(--on-accent); }
button, input, textarea { font: inherit; color: inherit; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) var(--gutter) calc(112px + env(safe-area-inset-bottom));
}
/* long single words: hyphenate where possible, break mid-word only as a last resort */
.wt, .ik, .iv, .h1, .h2, .sub, .hint, .yl-title { overflow-wrap: break-word; hyphens: auto; }
.screen { display: flex; flex-direction: column; gap: var(--gap); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }

/* ── type ────────────────────────────────────────────────────────────────── */
.h1 { font: 700 40px/1.02 var(--display); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.h1.sm { font-size: 32px; }
.h2 { font: 600 22px/1.1 var(--display); margin: 0; }
.h2.sm { font-size: 18px; }
.sub { font-size: 16px; line-height: 1.45; color: var(--ink-soft); margin: 0; text-wrap: pretty; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }

/* ── tag pill ────────────────────────────────────────────────────────────── */
.tag {
  align-self: flex-start;
  width: fit-content; max-width: 100%;  /* stays a pill in block parents too (#public-header) */
  background: var(--inv-bg); color: var(--inv-fg);
  font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
}
.tag.sky { background: var(--sky); color: var(--on-accent); border: 2px solid var(--edge); }

/* ── form fields ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.input {
  width: 100%;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius-field);
  padding: 14px 16px;
  font-size: 17px;
  min-height: 52px;
  outline: none;
}
.input::placeholder { color: var(--placeholder); }
.input:focus-visible { box-shadow: 0 0 0 3px var(--sky); }
textarea.input { min-height: 96px; resize: vertical; }
.input.sm { min-height: 44px; padding: 10px 14px; font-size: 15px; border-radius: var(--radius-sm); }
.error { color: var(--danger); font-weight: 800; font-size: 14px; margin: 0; }

/* ── chunky buttons ──────────────────────────────────────────────────────── */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--coral); color: var(--on-accent);
  border: var(--border); border-radius: var(--radius);
  padding: 16px; min-height: 56px;
  font: 600 19px var(--display);
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translate(3px, 3px); box-shadow: var(--shadow-pressed); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: var(--shadow-sm); filter: grayscale(.85); }
.btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.btn.sky { background: var(--sky); }
.btn.green { background: var(--green); }
.btn.purple { background: var(--purple); }
.btn.small { padding: 10px 14px; font-size: 16px; min-height: 44px; box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); flex: none; }
.btn.block { width: 100%; }
.btn-quiet {
  appearance: none; background: none; border: 0; cursor: pointer;
  text-align: center; font-weight: 800; color: var(--ink-soft);
  padding: 10px; min-height: 44px;
}

/* ── cards ───────────────────────────────────────────────────────────────── */
/* A plain white card (the "add a wish" box). */
.card {
  background: var(--card); border: var(--border); border-radius: var(--radius-card);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
/* The dashed butter card (share link). */
.card.dashed { background: var(--butter); border-style: dashed; }
.url {
  font: 700 15px var(--mono);
  background: var(--card); border: 2px solid var(--edge); border-radius: 12px;
  padding: 10px 12px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── stickers: one per wish ──────────────────────────────────────────────── */
/* <li class="sticker r{i%4}"><span class="blob c{i%4}">{n}</span> … </li>
   UI.stickerClass(i) / UI.blobClass(i) build these, so every list tilts alike. */
.stickers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sticker {
  background: var(--card); border: var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: center;
}
.sticker.r0 { transform: rotate(-1.2deg); }
.sticker.r1 { transform: rotate(1deg); }
.sticker.r2 { transform: rotate(-.4deg); }
.sticker.r3 { transform: rotate(1.4deg); }
.sticker.done { background: var(--paper-dim); box-shadow: 2px 2px 0 var(--ink); }
.sticker.done .wt { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.sticker-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

.blob {
  width: 44px; height: 44px; border-radius: 50%; border: var(--border); flex: none;
  display: flex; align-items: center; justify-content: center;
  font: 700 18px var(--display);
}
.blob.lg { width: 56px; height: 56px; font-size: 22px; }
.c0 { background: var(--coral); }
.c1 { background: var(--sky); }
.c2 { background: var(--green); }
.c3 { background: var(--purple); }
.blob.done { background: var(--blob-done); color: var(--muted); }

.wt { font: 600 18px/1.2 var(--display); overflow-wrap: break-word; hyphens: auto; }
.wl { font-size: 14px; color: var(--link); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taken { font-size: 13px; font-weight: 800; color: var(--taken); }
.check {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--green); border: var(--border);
  display: flex; align-items: center; justify-content: center;
  font: 700 18px var(--display);
}
/* shop-link preview on a wish card (lib/preview.js): a fixed-size thumb with the
   number badge on its corner, the shop's own title, and "Shop · price" */
.pv-lead { position: relative; flex: none; width: 56px; height: 56px; }
.pv-thumb {
  display: block; width: 56px; height: 56px; flex: none; overflow: hidden;
  border: var(--border); border-radius: 12px; background: #fff;
}
.pv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-lead > .blob, .pv-lead > .wp-n {
  position: absolute; left: -9px; top: -9px; width: 26px; height: 26px; border-width: 2px;
  font-size: 12px; line-height: 22px; text-align: center;
}
.pv-lead > .wp-n { background: var(--card); border: 2px solid var(--edge); border-radius: 50%; color: var(--ink); }
.sticker.done .pv-thumb { filter: grayscale(1); opacity: .6; }
.pv-t {
  font-size: 13px; line-height: 1.3; color: var(--ink-soft); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pv-s { font-size: 12.5px; font-weight: 800; color: var(--muted); overflow-wrap: anywhere; }
/* "Fingers crossed" row under a wish's title (UI.fingersRow) */
.fc-row { font-size: 14px; line-height: 1.3; letter-spacing: 1px; white-space: nowrap; overflow: hidden; }
/* "Grown-ups only" tag (UI.privateTag): a small dashed pill under the title; currentColor so every look reads it */
.priv-tag {
  align-self: flex-start; margin: 2px 0; padding: 1px 9px; border: 2px dashed currentColor; border-radius: 999px;
  font-size: 12px; font-weight: 800; line-height: 1.5; color: var(--ink-soft); white-space: nowrap;
}
.sticker.done .fc-row { filter: grayscale(1); opacity: .6; }
.empty { text-align: center; color: var(--muted); font-weight: 700; padding: 18px 0; }

/* ── bottom sheet + scrim ────────────────────────────────────────────────── */
/* <div class="sheet-layer" hidden>
     <div class="scrim"></div>
     <div class="sheet" role="dialog" aria-modal="true"><div class="grab"></div> … </div>
   </div>
   Remove [hidden] and add .open on the next frame to slide it up. */
.sheet-layer { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .18s ease; }
.sheet {
  position: absolute; left: 50%; bottom: 0;
  width: 100%; max-width: var(--shell); max-height: 88vh; overflow-y: auto;
  transform: translate(-50%, 100%);
  background: var(--sheet-bg); border-top: var(--border); border-radius: 28px 28px 0 0;
  padding: 14px var(--gutter) max(34px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet-layer.open .scrim { opacity: 1; }
.sheet-layer.open .sheet { transform: translate(-50%, 0); }
.grab { width: 48px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .3; align-self: center; }

/* ── toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 72px; z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--inv-bg); color: var(--inv-fg); font-weight: 800;
  border-radius: 999px; padding: 10px 16px; transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff6e8; }

/* ══ Wishbook v2 ═══════════════════════════════════════════════════════════
   Shared pieces from the Wishbook design (screens 1–7). Slices reuse these;
   a slice.css styles only its own layout glue. */

/* role accent per screen (lib/router.js sets <html data-screen>) */
[data-screen="org"] { --role: var(--role-org); }
[data-screen="wish"], [data-screen="nopeek"] { --role: var(--role-wish); }
[data-screen="guest"] { --role: var(--role-guest); }

/* <span class="role org|wish|guest">Organizer</span> — a small role pill */
.role {
  display: inline-block; width: fit-content;
  font: 800 11px var(--sans); letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 2px solid var(--edge);
  background: var(--role); color: var(--on-accent);
}
.role.org { background: var(--role-org); }
.role.wish { background: var(--role-wish); }
.role.guest { background: var(--role-guest); }

/* two fields side by side (kid + age, date + time) */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > * { min-width: 0; }
/* date + (from/to): at phone width the nested time pair is too narrow for
   type=time, so the date takes its own row and the times pair up below it */
.two:has(> .two) { grid-template-columns: 1fr; }

/* a white button (secondary choice: "Can't make it", "Edit", …) */
.btn.ghost { background: var(--card); }

/* ── tabs: Invite | Wishlist ─────────────────────────────────────────────── */
/* <div class="tabs" role="tablist"><button class="tab" role="tab" aria-selected="true">…</button>…</div> */
.tabs {
  display: flex; gap: 4px;
  background: var(--card); border: var(--border); border-radius: var(--radius-field); padding: 4px;
}
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex: 1 1 0; min-width: max-content; white-space: nowrap;
  min-height: 44px; padding: 9px 6px; border-radius: 11px;
  font: 600 16px var(--display); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.tab[aria-selected="true"], .tab.on { background: var(--inv-bg); color: var(--inv-fg); }
.tab:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.badge {
  background: var(--coral); color: var(--on-accent); border-radius: 999px;
  font: 800 12px var(--sans); padding: 1px 7px; line-height: 1.5;
}

/* ── info card: icon + key/value rows (date, place) ──────────────────────── */
/* <div class="info"><div class="irow"><span class="ico c0">📅</span><div><div class="ik">…</div><div class="iv">…</div></div></div>…</div> */
.info {
  background: var(--card); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px 16px;
}
.irow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--rule); }
.irow:last-child { border-bottom: none; }
.irow > div:not(.ico) { min-width: 0; flex: 1; }
.ico {
  width: 38px; height: 38px; border-radius: 50%; border: var(--border); flex: none;
  display: flex; align-items: center; justify-content: center; font: 700 16px var(--display);
}
.ik { font-weight: 800; font-size: 16px; overflow-wrap: break-word; hyphens: auto; }
.iv { font-size: 14px; color: var(--ink-soft); overflow-wrap: break-word; hyphens: auto; }
.maplink { font-weight: 800; font-size: 14px; color: var(--link); text-decoration: none; }
.maplink:hover { text-decoration: underline; }

/* ── link cards: public (sky) / secret (coral) ───────────────────────────── */
/* <div class="linkcard public"><div class="lk"><div class="h2 sm">…</div><span class="hint">…</span></div>
     <div class="row"><div class="url">…</div><button class="btn small sky">Share</button></div></div> */
.linkcard {
  background: var(--card); border: var(--border); border-radius: var(--radius-field);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.linkcard.public { background: var(--sky-wash); }
.linkcard.secret { background: var(--coral-wash); }
.lk { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.linkcard .url { font-size: 13px; padding: 8px 10px; border-radius: 10px; }

/* ── stat tiles: 9 coming · 2 can't · 2/5 promised ───────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: var(--border); border-radius: 14px; padding: 8px; text-align: center; }
.sn { font: 700 26px/1 var(--display); }
.sl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ── wish row extras (organizer view) ────────────────────────────────────── */
.who {
  font-size: 12.5px; font-weight: 800; flex: none; max-width: 40%;
  background: var(--green-wash); border: 2px solid var(--edge); border-radius: 999px; padding: 2px 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.open-mark { font-size: 12.5px; font-weight: 800; color: var(--muted); flex: none; }
.x-btn {
  appearance: none; flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--edge); background: var(--card); cursor: pointer;
  font: 700 16px var(--display); display: flex; align-items: center; justify-content: center;
}

/* ── RSVP: the two answers ─────────────────────────────────────────────────── */
.rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* the organizer's guest list */
.guests { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.g { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px dashed var(--rule); padding: 4px 0; }
.g.cant { color: var(--muted); }

/* ── hero photo (guest page top, full-bleed) ─────────────────────────────── */
/* <div class="hero"><img alt=""></div> — without an <img>, the striped placeholder.
   First thing in #screen-guest; the negative margins undo the shell padding. */
.hero {
  margin: calc(-1 * max(40px, env(safe-area-inset-top))) calc(-1 * var(--gutter)) 0;
  height: 230px; flex: none; overflow: hidden;
  border-bottom: var(--border);
  background: repeating-linear-gradient(135deg, var(--hero-a) 0 14px, var(--hero-b) 14px 28px);
}
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 481px) {
  .hero { margin-left: 0; margin-right: 0; border: var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
}
/* the organizer's photo picker: a dashed, striped drop zone */
.photo-drop {
  border: 2.5px dashed var(--edge); border-radius: var(--radius-field); min-height: 72px; padding: 12px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--photo-a) 0 10px, var(--photo-b) 10px 20px);
  font: 700 13px var(--mono); color: var(--muted); cursor: pointer;
}
.photo-drop img { max-width: 100%; max-height: 160px; border-radius: 10px; border: 2px solid var(--edge); }

/* ── the wisher's hello card ─────────────────────────────────────────────── */
.hello {
  background: var(--butter); border: 2.5px dashed var(--edge); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}

/* ── No peeking emblem ───────────────────────────────────────────────────── */
.peek-screen { display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; justify-content: center; min-height: 70vh; }
.peek-screen .btn { align-self: stretch; }
.peek {
  width: 120px; height: 120px; border-radius: 50%; flex: none;
  background: var(--butter); border: var(--border); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; transform: rotate(-6deg);
}

/* ── start chooser: two big choice cards ─────────────────────────────────── */
.choice {
  appearance: none; text-align: left; cursor: pointer; width: 100%;
  background: var(--card); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: flex; gap: 14px; align-items: center; color: var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.choice:active { transform: translate(3px, 3px); box-shadow: var(--shadow-pressed); }
.choice:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.choice .blob { width: 52px; height: 52px; font-size: 24px; }

/* a slice that isn't built yet (Foundation placeholders) */
.placeholder { opacity: .7; font: 700 13px var(--mono); }

@media (prefers-reduced-motion: reduce) {
  .sticker, .peek { transform: none !important; }
  .btn, .sheet, .scrim, .toast, .choice { transition: none; }
}

/* ══ Arcade theme ══════════════════════════════════════════════════════════
   <html data-theme="arcade"> (lib/theme.js). Dark navy page with a faint grid,
   flat neon tiles, Archivo Black caps. Re-skins by overriding the tokens above;
   the rules below only change shape (no tilt, no hard shadows, radii, fonts).
   Palette = Claude Design "C · Arcade": lime 130, cyan 210, pink 350, amber 80. */
:root[data-theme="arcade"] {
  --paper: oklch(0.2 0.03 275);
  --paper-dot: oklch(0.26 0.03 275 / .6);   /* grid lines */
  --paper-dim: oklch(0.28 0.03 275);        /* a taken tile */
  --ink: #f2f1f6;
  --ink-soft: #c4c3d0;
  --muted: #b3b2c0;
  --placeholder: #9a99a9;
  --card: oklch(0.26 0.03 275);             /* panels */

  --coral: oklch(0.86 0.17 130);            /* lime  (primary) */
  --sky: oklch(0.86 0.17 210);              /* cyan  */
  --green: oklch(0.86 0.17 350);            /* pink  */
  --purple: oklch(0.86 0.17 80);            /* amber */
  --butter: oklch(0.26 0.03 275);
  --sky-wash: oklch(0.3 0.06 210);
  --coral-wash: oklch(0.3 0.08 350);
  --green-wash: oklch(0.34 0.08 130);
  --hero-a: oklch(0.26 0.03 275);
  --hero-b: oklch(0.3 0.04 275);
  --photo-a: oklch(0.24 0.03 275);
  --photo-b: oklch(0.27 0.03 275);
  --rule: oklch(0.4 0.03 275);

  --link: oklch(0.86 0.17 210);
  --link-hover: oklch(0.93 0.12 210);
  --taken: oklch(0.86 0.17 130);
  --blob-done: oklch(0.36 0.03 275);
  --on-accent: #14141c;
  --edge: oklch(0.4 0.03 275);
  --inv-bg: oklch(0.86 0.17 130);
  --inv-fg: #14141c;
  --danger: oklch(0.8 0.15 25);
  --scrim: rgba(5, 5, 12, .6);
  --sheet-bg: oklch(0.86 0.17 350);
  --hair: rgba(255, 255, 255, .16);

  --display: "Archivo Black", "Space Grotesk", system-ui, sans-serif;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;

  --border: 2px solid var(--edge);
  --shadow: none;
  --shadow-sm: none;
  --shadow-pressed: none;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-card: 14px;
  --radius-field: 10px;

  color-scheme: only dark;
  font-synthesis: none;                     /* Archivo Black has one weight: no faux bold */
}
:root[data-theme="arcade"] body { background-size: 30px 30px; background-image:
  linear-gradient(var(--paper-dot) 1px, transparent 1px), linear-gradient(90deg, var(--paper-dot) 1px, transparent 1px); }
/* type */
[data-theme="arcade"] .h1 { font: 400 38px/.98 var(--display); text-transform: uppercase; overflow-wrap: break-word; hyphens: auto; }
[data-theme="arcade"] .h1.sm { font-size: 28px; }
[data-theme="arcade"] .h2 { font: 400 20px/1.1 var(--display); text-transform: uppercase; }
[data-theme="arcade"] .h2.sm { font-size: 15px; }
[data-theme="arcade"] .field > label,
[data-theme="arcade"] .sl { letter-spacing: .16em; color: var(--muted); }
[data-theme="arcade"] .btn { font: 400 18px var(--display); text-transform: uppercase; letter-spacing: .02em; border-color: transparent; }
[data-theme="arcade"] .btn.small { font-size: 14px; }
[data-theme="arcade"] .btn.ghost { border-color: var(--edge); }
[data-theme="arcade"] .btn:active { transform: translateY(2px); }
[data-theme="arcade"] .btn:disabled { opacity: .5; transform: none; }
[data-theme="arcade"] .btn-quiet { text-transform: uppercase; letter-spacing: .12em; font-size: 14px; }
[data-theme="arcade"] .tab { font: 700 14px var(--sans); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 400px) { [data-theme="arcade"] .tab { font-size: 13px; letter-spacing: .03em; } }
[data-theme="arcade"] .wt { font: 700 18px/1.2 var(--sans); letter-spacing: -.01em; }
[data-theme="arcade"] .tag { letter-spacing: .16em; }
[data-theme="arcade"] .tag.sky { border-color: transparent; }
[data-theme="arcade"] .input:focus-visible { box-shadow: none; border-color: var(--coral); }
/* flat: no tilt, no sticker outlines on accent fills */
[data-theme="arcade"] .sticker.r0, [data-theme="arcade"] .sticker.r1,
[data-theme="arcade"] .sticker.r2, [data-theme="arcade"] .sticker.r3,
[data-theme="arcade"] .peek { transform: none; }
[data-theme="arcade"] .blob, [data-theme="arcade"] .check, [data-theme="arcade"] .ico,
[data-theme="arcade"] .role, [data-theme="arcade"] .badge { border-color: transparent; }
[data-theme="arcade"] .role { letter-spacing: .14em; }
[data-theme="arcade"] .sticker.done { box-shadow: none; border-style: dashed; border-color: oklch(0.45 0.03 275); }
[data-theme="arcade"] .sticker.done .wt { color: var(--muted); }
[data-theme="arcade"] .card.dashed, [data-theme="arcade"] .hello { border: 2px dashed var(--green); }
[data-theme="arcade"] .linkcard.public { border-color: var(--sky); }
[data-theme="arcade"] .linkcard.secret { border-color: var(--green); }
[data-theme="arcade"] .peek { border-color: var(--green); }
[data-theme="arcade"] .sn { color: var(--coral); }
/* wish stickers = flat neon tiles (r0..r3 follow the blob colours) */
[data-theme="arcade"] .sticker.r0 { --tile: var(--coral); }
[data-theme="arcade"] .sticker.r1 { --tile: var(--sky); }
[data-theme="arcade"] .sticker.r2 { --tile: var(--green); }
[data-theme="arcade"] .sticker.r3 { --tile: var(--purple); }
[data-theme="arcade"] .sticker:not(.done) {
  background: var(--tile, var(--card)); border-color: transparent;
  --ink: #14141c; --ink-soft: #2a2936; --muted: #2f2e3b; --taken: #14141c;
  --link: #14141c; --link-hover: #000; --card: rgba(20, 20, 28, .14); --edge: #14141c;
}
[data-theme="arcade"] .sticker:not(.done) .blob,
[data-theme="arcade"] .sticker:not(.done) .check { background: #14141c; color: var(--tile, var(--coral)); }
[data-theme="arcade"] .sticker:not(.done) .wl { text-decoration: underline; text-underline-offset: 3px; }
[data-theme="arcade"] .sticker:not(.done) .who { background: #14141c; color: #f2f1f6; border-color: transparent; }
/* bottom sheet = pink slab with dark ink (design: sheet on pink) */
[data-theme="arcade"] .sheet {
  border-top: 0; color: #14141c;
  --ink: #14141c; --ink-soft: #2a2936; --muted: #33323f; --placeholder: #5d5c6c;
  --card: #fff; --edge: #14141c; --border: 2px solid #14141c;
  --link: #14141c; --link-hover: #000; --taken: #14141c; --rule: rgba(20, 20, 28, .4);
  --danger: oklch(0.45 0.18 25);
}
[data-theme="arcade"] .sheet .btn:not(.ghost) { background: #14141c; color: #f2f1f6; }
[data-theme="arcade"] .sheet .btn:focus-visible { outline-color: #14141c; }
[data-theme="arcade"] .sheet .input:focus-visible { border-color: #14141c; box-shadow: 0 0 0 3px rgba(20,20,28,.35); }
[data-theme="arcade"] .grab { background: #14141c; opacity: .35; }
[data-theme="arcade"] .blob, [data-theme="arcade"] .check, [data-theme="arcade"] .ico { color: var(--on-accent); }
[data-theme="arcade"] .blob.done { color: var(--muted); }
[data-theme="arcade"] .btn.ghost { color: var(--ink); }
[data-theme="arcade"] .sticker:not(.done) { color: var(--ink); }
/* link previews: the badge on a thumb keeps its own dark chip on a neon tile */
[data-theme="arcade"] .pv-thumb { border-color: var(--edge); border-radius: 8px; }
[data-theme="arcade"] .pv-lead > .wp-n { border-color: var(--edge); }

/* ══ Bakery theme ══════════════════════════════════════════════════════════
   <html data-theme="bakery"> (lib/theme.js). Cream paper with pink gingham,
   chocolate ink, pill buttons with hard chocolate shadows, wishes as ruled
   recipe cards, frosting drips on the hero photo and on bottom sheets. Same
   approach as Arcade: override the tokens, then only change shapes.
   Design: Claude Design "Bakery" (Marilyn's baking party). Contrast notes: muted
   #7d6253 (5.3:1 on cream, 4.6 on gingham), link #b03a5e and taken #1f7a58 are
   slightly deeper than the mock so they pass 4.5:1; --purple (cocoa tile fill) is
   a lighter cocoa than the #a8735a swatch so dark ink on it passes. */
:root[data-theme="bakery"] {
  --paper: #fff7ec;
  --paper-dot: rgba(236, 112, 140, .13);    /* gingham stripes */
  --paper-dim: #fbf5f0;                     /* a taken recipe card */
  --ink: #3b2418;
  --ink-soft: #6b4c3d;
  --muted: #7d6253;
  --placeholder: #8a6f60;
  --card: #fff;

  --coral: #f48aa5;                         /* pink: the primary */
  --sky: #9fdcc3;                           /* mint */
  --green: #ffd98a;                         /* butter */
  --purple: #c4937a;                        /* cocoa (lightened for ink-on-fill) */
  --butter: #ffeab8;
  --sky-wash: #dff3ea;
  --coral-wash: #fde0e8;
  --green-wash: #9fdcc3;
  --hero-a: #f6c9b0;
  --hero-b: #f9d9c6;
  --photo-a: #fbeee5;
  --photo-b: #f3dccd;
  --rule: #e9cdbb;

  --link: #b03a5e;
  --link-hover: #8f2a49;
  --taken: #1f7a58;
  --blob-done: #e9dcd2;
  --on-accent: #3b2418;
  --edge: #3b2418;
  --inv-bg: #3b2418;
  --inv-fg: #fff7ec;
  --danger: #b3261e;
  --scrim: rgba(59, 36, 24, .45);
  --sheet-bg: #fff7ec;
  --hair: rgba(59, 36, 24, .14);

  --display: "Gluten", "Fredoka", system-ui, sans-serif;
  --sans: "Quicksand", "Nunito", system-ui, -apple-system, sans-serif;

  --border: 2.5px solid var(--ink);
  --shadow: 0 5px 0 #c9a690;                /* cards: soft */
  --shadow-sm: 0 3px 0 var(--ink);          /* small buttons: hard */
  --shadow-pressed: 0 1px 0 var(--ink);
  --radius: 18px;
  --radius-sm: 14px;
  --radius-card: 18px;
  --radius-field: 14px;
}
:root[data-theme="bakery"] body {
  font-weight: 600;
  background-image:
    linear-gradient(90deg, var(--paper-dot) 50%, transparent 0),
    linear-gradient(var(--paper-dot) 50%, transparent 0);
  background-size: 30px 30px;
}
/* type: Gluten 600 for display, Quicksand 600 for body (800 is too wide) */
[data-theme="bakery"] .h1 { font: 600 34px/1.05 var(--display); letter-spacing: .005em; }
[data-theme="bakery"] .h1.sm { font-size: 28px; }
[data-theme="bakery"] .h2 { font: 600 20px/1.1 var(--display); }
[data-theme="bakery"] .h2.sm { font-size: 17px; }
[data-theme="bakery"] .sub { font-weight: 600; }
[data-theme="bakery"] .field > label { font-weight: 700; font-size: 12px; letter-spacing: .06em; }
[data-theme="bakery"] .input { font-weight: 600; border-radius: 14px; min-height: 48px; padding: 11px 14px; }
[data-theme="bakery"] .input:focus-visible { box-shadow: 0 0 0 3px #f48aa5; border-color: var(--ink); }
[data-theme="bakery"] .error, [data-theme="bakery"] .taken, [data-theme="bakery"] .ik,
[data-theme="bakery"] .maplink, [data-theme="bakery"] .wl, [data-theme="bakery"] .pv-s,
[data-theme="bakery"] .open-mark, [data-theme="bakery"] .sl, [data-theme="bakery"] .who,
[data-theme="bakery"] .btn-quiet, [data-theme="bakery"] .empty { font-weight: 700; }
[data-theme="bakery"] .tag, [data-theme="bakery"] .role { font-weight: 700; }
[data-theme="bakery"] .badge { font-weight: 800; background: #f48aa5; color: var(--ink); }
[data-theme="bakery"] .sn { font: 600 28px/1 var(--display); }
[data-theme="bakery"] .wt { font: 600 16px/1.2 var(--display); }
[data-theme="bakery"] .blob, [data-theme="bakery"] .check { font-family: var(--display); font-weight: 600; }
/* pill buttons with a hard chocolate shadow */
[data-theme="bakery"] .btn {
  border-radius: 999px; font: 600 17px var(--display); padding: 13px 18px; min-height: 52px;
  box-shadow: 0 5px 0 var(--ink); text-align: center;
}
[data-theme="bakery"] .btn.small { border-radius: 999px; font-size: 14px; padding: 7px 14px; min-height: 44px; box-shadow: 0 3px 0 var(--ink); }
[data-theme="bakery"] .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
[data-theme="bakery"] .btn:disabled { box-shadow: 0 3px 0 var(--ink); transform: none; }
[data-theme="bakery"] .btn.sky { background: #9fdcc3; }
[data-theme="bakery"] .btn.ghost { background: #fff; }
[data-theme="bakery"] .btn:focus-visible, [data-theme="bakery"] .tab:focus-visible,
[data-theme="bakery"] .choice:focus-visible { outline-color: var(--link); }
[data-theme="bakery"] .btn-quiet { color: var(--ink-soft); }
/* cards */
[data-theme="bakery"] .card, [data-theme="bakery"] .info, [data-theme="bakery"] .choice { box-shadow: 0 5px 0 #c9a690; }
[data-theme="bakery"] .stat { border-radius: 14px; }
[data-theme="bakery"] .stats { gap: 10px; }
[data-theme="bakery"] .irow { border-bottom-style: dotted; padding: 11px 0; }
[data-theme="bakery"] .g { border-bottom-style: dotted; }
[data-theme="bakery"] .irow:last-child { border-bottom: none; }
[data-theme="bakery"] .btn.green { background: #9fdcc3; }
[data-theme="bakery"] .ico { width: 40px; height: 40px; font-size: 18px; }
[data-theme="bakery"] .card.dashed, [data-theme="bakery"] .hello { border-style: dashed; border-color: #a8735a; }
[data-theme="bakery"] .peek { box-shadow: 0 5px 0 #c9a690; }
[data-theme="bakery"] .linkcard { box-shadow: 0 3px 0 #c9a690; }
/* tabs: a pill segmented control */
[data-theme="bakery"] .tabs { border-radius: 999px; }
[data-theme="bakery"] .tab { border-radius: 999px; font: 600 15px var(--display); }
[data-theme="bakery"] .lang-switch button { font-weight: 700; }
/* wish stickers -> recipe cards: white card, pink strip on top, faint blue ruled lines */
[data-theme="bakery"] .sticker {
  position: relative; border-radius: 14px; padding: 12px 14px 12px 16px; gap: 12px;
  background-color: #fff;
  background-image: linear-gradient(#f48aa5, #f48aa5), repeating-linear-gradient(#fff 0 25px, #dbe8f3 25px 27px);
  background-size: 100% 4px, 100% 100%;
  background-repeat: no-repeat, repeat;
  background-position: 0 0, 0 6px;
  box-shadow: 0 4px 0 #c9a690;
}
[data-theme="bakery"] .sticker.r0 { transform: rotate(-.8deg); }
[data-theme="bakery"] .sticker.r1 { transform: rotate(.6deg); }
[data-theme="bakery"] .sticker.r2 { transform: rotate(-.3deg); }
[data-theme="bakery"] .sticker.r3 { transform: rotate(.9deg); }
[data-theme="bakery"] .sticker.done {
  background-color: #fbf5f0;
  background-image: linear-gradient(#cdb8aa, #cdb8aa), repeating-linear-gradient(#fbf5f0 0 25px, #ece4dd 25px 27px);
  box-shadow: 0 2px 0 #c9a690;
}
[data-theme="bakery"] .sticker.done .wt { color: #7a6254; text-decoration-thickness: 2px; }
[data-theme="bakery"] .check { background: #9fdcc3; width: 36px; height: 36px; font-size: 16px; }
[data-theme="bakery"] .sticker .blob { width: 40px; height: 40px; font-size: 16px; }
[data-theme="bakery"] .pv-thumb { border-width: 2px; border-radius: 10px; }
[data-theme="bakery"] .who { background: #9fdcc3; }
/* hero photo: scalloped pink frosting drip along the bottom edge */
[data-theme="bakery"] .hero { border-bottom: 0; position: relative; margin-bottom: 14px; }
[data-theme="bakery"] .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 36px; pointer-events: none;
  background: radial-gradient(circle at 18px 0, #f48aa5 18px, transparent 19px) 0 0 / 36px 36px repeat-x;
  filter: drop-shadow(0 3px 0 rgba(59, 36, 24, .12));
}
@media (min-width: 481px) { [data-theme="bakery"] .hero { border: 0; border-radius: 0 0 18px 18px; } }
/* bottom sheets: cream with a pink frosting band; sprinkles only near the top, behind content */
[data-theme="bakery"] .sheet { border-radius: 30px 30px 0 0; padding-top: 58px; }  /* content starts below the sprinkle band */
[data-theme="bakery"] .sheet > * { position: relative; z-index: 1; }
[data-theme="bakery"] .sheet::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: #f48aa5; z-index: 2; pointer-events: none;
}
[data-theme="bakery"] .sheet::after {
  content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 36px; z-index: 0; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(4px 2px at 20% 30%, #f48aa5 99%, transparent), radial-gradient(4px 2px at 70% 20%, #9fdcc3 99%, transparent),
    radial-gradient(4px 2px at 40% 70%, #ffd98a 99%, transparent), radial-gradient(4px 2px at 85% 60%, #a8735a 99%, transparent),
    radial-gradient(4px 2px at 10% 85%, #9fdcc3 99%, transparent), radial-gradient(4px 2px at 55% 45%, #f48aa5 99%, transparent);
  background-size: 120px 36px;
}
[data-theme="bakery"] .grab { display: none; }
[data-theme="bakery"] .sheet .h1 { font-size: 27px; }
[data-theme="bakery"] .wt, [data-theme="bakery"] .h1, [data-theme="bakery"] .h2 { hyphens: manual; }
[data-theme="bakery"] .toast { font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  [data-theme="bakery"] .sticker.r0, [data-theme="bakery"] .sticker.r1,
  [data-theme="bakery"] .sticker.r2, [data-theme="bakery"] .sticker.r3 { transform: none !important; }
}

/* ══ Christmas theme ═══════════════════════════════════════════════════════
   <html data-theme="christmas"> (lib/theme.js). A DARK page: deep pine with snow dots, a
   string of fairy lights across the top, slow falling snow (both off under
   prefers-reduced-motion). Surfaces (cards, sheets, inputs, tags) stay cream with dark
   green text: the root tokens below are the LIGHT-on-pine ones, and :is(<surfaces>)
   re-declares the dark-on-cream ones, so every slice that uses tokens is readable on both.
   Wishes are gift tags (punched hole, ribbon + bow on the left), a candy-cane stripe sits
   under the hero photo and on the top of bottom sheets. Tokens + shapes only; markup unchanged.
   Design: Claude Design "Christmas". Contrast (checked): cream #fff6e3 / #cfe3d7 / #b5d0c2
   on pine #123426 and #0d281d >= 7:1; #173a2c on cream #fff9ee 10:1, #4a5c52 6.7, #56665d 5.7;
   link #b0242f on cream 6.3; taken #1f6b46 on cream 6.3 / on a taken tag 5.4; white on
   cranberry #c8323f 5.5 and on green #2f7d55 5.0; gold #f2c95b on pine 9:1. */
:root[data-theme="christmas"] {
  --paper: #123426;
  --paper-dot: rgba(255, 255, 255, .5);
  --paper-dim: #e9e4d7;                     /* a taken gift tag */
  --ink: #fff6e3;                           /* headings on the page */
  --ink-soft: #cfe3d7;                      /* body text on the page */
  --muted: #b5d0c2;
  --placeholder: #5f6f66;                   /* inputs are cream */
  --card: #fff9ee;

  --coral: #c8323f;                         /* cranberry: the primary */
  --sky: #2f7d55;                           /* green */
  --green: #2f7d55;
  --purple: #c8323f;
  --butter: #f6e2ae;
  --sky-wash: #dcebe2;
  --coral-wash: #f6d8db;
  --green-wash: #cfe6d9;
  --hero-a: #1d4a37;
  --hero-b: #225540;
  --photo-a: #efe5cf;
  --photo-b: #fbf4e6;
  --rule: #e2d6bd;

  --role-org: #2f7d55;
  --role-wish: #c8323f;
  --role-guest: #2f7d55;
  --link: #f2c95b;
  --link-hover: #ffe08a;
  --taken: #8fe0b2;
  --blob-done: #cfd6cf;
  --on-accent: #fff;
  --edge: #0b2219;
  --inv-bg: #c8323f;
  --inv-fg: #fff;
  --danger: #ffb4ae;
  --scrim: rgba(5, 15, 10, .6);
  --sheet-bg: #fff9ee;
  --hair: rgba(255, 246, 227, .2);
  --focus: #f2c95b;

  --display: "Yeseva One", "Fredoka", Georgia, serif;

  --border: 2px solid #0b2219;
  --shadow: 0 5px 0 #0b2219;
  --shadow-sm: 0 4px 0 #0b2219;
  --shadow-pressed: 0 1px 0 #0b2219;
  --radius: 18px;
  --radius-sm: 14px;
  --radius-card: 18px;
  --radius-field: 14px;

  color-scheme: only dark;
  font-synthesis: none;                     /* Yeseva One has one weight: no faux bold */
}
/* cream surfaces: dark green text and red links on cream */
[data-theme="christmas"] :is(.card:not(.dashed), .info, .linkcard, .stat, .choice, .sticker, .sheet, .peek,
    .input, .url, .lang-switch, .look-card, .gw-soon, .inv-chip, .x-btn, .photo-drop, .we-warn, .btn.ghost) {
  --ink: #173a2c; --ink-soft: #3f5147; --muted: #56665d; --placeholder: #5f6f66;
  --link: #b0242f; --link-hover: #8a1c25; --taken: #1f6b46; --danger: #b3261e;
  --edge: #0b2219; --rule: #e2d6bd; --focus: #173a2c; --blob-done: #cfd6cf;
  color: var(--ink);
}
[data-theme="christmas"] :is(.input, .url) { --card: #fff; }
/* the dark share / hello cards sit on the page: light text again (also inside a sheet) */
[data-theme="christmas"] :is(.card.dashed, .hello) {
  background: #0d281d; border: 2px dashed #f2c95b; box-shadow: none; color: #fff6e3;
  --ink: #fff6e3; --ink-soft: #cfe3d7; --muted: #b5d0c2; --link: #f2c95b; --link-hover: #ffe08a;
  --taken: #8fe0b2; --danger: #ffb4ae; --focus: #f2c95b;
}
[data-theme="christmas"] body {
  background-color: #123426;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 70%, rgba(232,243,236,.5) 0 1.2px, transparent 1.8px);
  background-size: 60px 60px, 90px 90px;
  background-attachment: fixed;
}
[data-theme="christmas"] .shell { position: relative; z-index: 1; }

/* snow drifting slowly down (a fixed layer behind the content) + a string of fairy lights */
[data-theme="christmas"] body::after {
  content: ""; position: fixed; left: 0; right: 0; top: -150px; height: calc(100% + 150px); z-index: 0; pointer-events: none; opacity: .85;
  background-image:
    radial-gradient(circle at 15% 20%, #fff 0 1.6px, transparent 2px), radial-gradient(circle at 60% 35%, #fff 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 82% 75%, #fff 0 2px, transparent 2.4px), radial-gradient(circle at 35% 65%, #e8f3ec 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 90% 8%, #fff 0 1px, transparent 1.4px), radial-gradient(circle at 48% 92%, #fff 0 1.5px, transparent 2px);
  background-size: 150px 150px;
  animation: xmas-snow 26s linear infinite;
}
@keyframes xmas-snow { from { transform: translateY(0); } to { transform: translateY(150px); } }
[data-theme="christmas"] body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 40px; z-index: 40; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='40'%3E%3Cpath d='M-10 4 Q20 22 40 12 T100 14 T170 4' fill='none' stroke='%230b2219' stroke-width='2'/%3E%3Cg%3E%3Ccircle cx='20' cy='19' r='13' fill='%23ff4d5e' fill-opacity='.3'/%3E%3Ccircle cx='60' cy='24' r='13' fill='%23ffd35a' fill-opacity='.3'/%3E%3Ccircle cx='100' cy='20' r='13' fill='%234fd18b' fill-opacity='.3'/%3E%3Ccircle cx='140' cy='24' r='13' fill='%235ab8ff' fill-opacity='.3'/%3E%3Cellipse cx='20' cy='19' rx='5' ry='7' fill='%23ff4d5e'/%3E%3Cellipse cx='60' cy='24' rx='5' ry='7' fill='%23ffd35a'/%3E%3Cellipse cx='100' cy='20' rx='5' ry='7' fill='%234fd18b'/%3E%3Cellipse cx='140' cy='24' rx='5' ry='7' fill='%235ab8ff'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 160px 40px repeat-x;
  animation: xmas-twinkle 2.6s ease-in-out infinite;
}
@keyframes xmas-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
/* the shell already pads 40px at the top, so the lights never cover content */

/* type */
[data-theme="christmas"] .h1 { font: 400 34px/1.05 var(--display); text-wrap: pretty; hyphens: manual; }
[data-theme="christmas"] .h1.sm { font-size: 28px; }
[data-theme="christmas"] .h2 { font: 400 20px/1.1 var(--display); hyphens: manual; }
[data-theme="christmas"] .h2.sm { font-size: 17px; }
[data-theme="christmas"] .sub { font-weight: 600; }
[data-theme="christmas"] .field > label { font-size: 12px; letter-spacing: .06em; }
[data-theme="christmas"] .input { font-weight: 600; min-height: 48px; padding: 11px 14px; }
[data-theme="christmas"] .input:focus-visible { box-shadow: 0 0 0 3px #f2c95b; border-color: #0b2219; }
[data-theme="christmas"] :is(.sheet, .card) .input:focus-visible { box-shadow: 0 0 0 3px #2f7d55; }
[data-theme="christmas"] :is(.ik, .maplink, .wl, .pv-s, .sl, .who, .btn-quiet, .empty, .taken, .error, .open-mark) { font-weight: 800; }
[data-theme="christmas"] .sn { font: 400 28px/1 var(--display); }
[data-theme="christmas"] .wt { font: 400 16px/1.2 var(--display); hyphens: manual; }
[data-theme="christmas"] :is(.tag, .role) { background: #c8323f; color: #fff; border: 2px solid #f2c95b; letter-spacing: .08em; }
[data-theme="christmas"] .tag.sky { background: #2f7d55; }
[data-theme="christmas"] .role.org { background: var(--role-org); }
[data-theme="christmas"] .badge { background: #c8323f; color: #fff; border: 0; font-weight: 800; }

/* buttons: cranberry, white text, a gold ring inside */
[data-theme="christmas"] .btn {
  border-radius: 999px; font: 400 17px var(--display); padding: 13px 18px; min-height: 52px; color: #fff;
  border: 2px solid #0b2219; box-shadow: 0 4px 0 #0b2219, inset 0 0 0 2px #f2c95b; text-align: center;
}
[data-theme="christmas"] .btn.small { font-size: 14px; padding: 7px 12px; min-height: 44px; box-shadow: 0 3px 0 #0b2219, inset 0 0 0 2px #f2c95b; }
[data-theme="christmas"] .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b2219, inset 0 0 0 2px #f2c95b; }
[data-theme="christmas"] .btn:disabled { box-shadow: 0 3px 0 #0b2219; transform: none; }
[data-theme="christmas"] :is(.btn.green, .btn.sky) { background: #2f7d55; }
[data-theme="christmas"] .btn.ghost { background: #fff9ee; color: #173a2c; box-shadow: 0 4px 0 #0b2219; }
[data-theme="christmas"] a.btn, [data-theme="christmas"] a.btn:hover { color: #fff; }
[data-theme="christmas"] a.btn.ghost, [data-theme="christmas"] a.btn.ghost:hover { color: #173a2c; }
[data-theme="christmas"] :is(.btn, .tab, .choice, .about-link, .btn-quiet):focus-visible { outline-color: var(--focus); }
[data-theme="christmas"] .btn-quiet { color: var(--ink-soft); }
[data-theme="christmas"] .sheet .btn.danger { color: #fff; }
[data-theme="christmas"] .x-btn { background: #fff; color: #173a2c; }
[data-theme="christmas"] .toast { font-weight: 800; border: 2px solid #f2c95b; }

/* cards */
[data-theme="christmas"] :is(.card, .info, .choice, .peek) { box-shadow: 0 5px 0 #0b2219; }
[data-theme="christmas"] .linkcard { box-shadow: 0 3px 0 #0b2219; }
[data-theme="christmas"] .stat { border-radius: 14px; }
[data-theme="christmas"] .irow { border-bottom-style: dotted; padding: 11px 0; }
[data-theme="christmas"] :is(.g, .inv-row) { border-bottom-style: dotted; }
[data-theme="christmas"] .irow:last-child { border-bottom: none; }
[data-theme="christmas"] .ico { width: 40px; height: 40px; font-size: 18px; border: 2px solid #0b2219; color: #173a2c; }
[data-theme="christmas"] .ico.c0 { background: #f6cdd1; }
[data-theme="christmas"] :is(.ico.c1, .ico.c3) { background: #cfe6d9; }
[data-theme="christmas"] .ico.c2 { background: #f6e2ae; }
[data-theme="christmas"] .who { background: #cfe6d9; color: #173a2c; }
[data-theme="christmas"] .inv-chip.waiting { background: #e9e4d7; }
[data-theme="christmas"] .gw-soon { border-color: #0b2219; }
/* number badges: white on cranberry / green */
[data-theme="christmas"] :is(.blob, .check) { font-family: var(--display); font-weight: 400; color: #fff; border: 2px solid #0b2219; }
[data-theme="christmas"] .blob.done { color: #173a2c; }

/* tabs: a dark pill with a gold rim, the active tab gold */
[data-theme="christmas"] .tabs { background: #0d281d; border: 2px solid #f2c95b; border-radius: 999px; }
[data-theme="christmas"] .tab { border-radius: 999px; font: 400 15px var(--display); color: #fff6e3; }
[data-theme="christmas"] :is(.tab[aria-selected="true"], .tab.on) { background: #f2c95b; color: #173a2c; }
[data-theme="christmas"] .lang-switch button { font-weight: 800; }

/* wishes = gift tags: punched hole + a red ribbon and bow on the LEFT, a slight tilt */
[data-theme="christmas"] .stickers { padding-top: 14px; }
[data-theme="christmas"] .sticker {
  position: relative; background-color: #fff9ee; border: 2px solid #0b2219; border-radius: 8px 18px 18px 8px;
  padding: 12px 14px 12px 50px; gap: 12px; box-shadow: 0 4px 0 #0b2219;
  background-image: radial-gradient(circle at 15px 50%, #123426 0 5px, #0b2219 5.5px 7px, transparent 7.5px);
  background-repeat: no-repeat;
}
[data-theme="christmas"] .sticker::after {      /* the ribbon */
  content: ""; position: absolute; left: 30px; top: -2px; bottom: -2px; width: 9px; z-index: 0; pointer-events: none;
  background: #c8323f; border-left: 2px solid #0b2219; border-right: 2px solid #0b2219;
}
[data-theme="christmas"] .sticker::before {     /* the bow */
  content: ""; position: absolute; left: 18px; top: -15px; width: 34px; height: 20px; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 9px 7px at 9px 10px, #c8323f 96%, transparent), radial-gradient(ellipse 9px 7px at 25px 10px, #c8323f 96%, transparent),
    radial-gradient(circle 4px at 17px 10px, #8f1d27 96%, transparent);
}
[data-theme="christmas"] .sticker > * { position: relative; z-index: 1; }
[data-theme="christmas"] .sticker.r0 { transform: rotate(-1deg); }
[data-theme="christmas"] .sticker.r1 { transform: rotate(.8deg); }
[data-theme="christmas"] .sticker.r2 { transform: rotate(-.4deg); }
[data-theme="christmas"] .sticker.r3 { transform: rotate(1deg); }
[data-theme="christmas"] .sticker .blob { width: 40px; height: 40px; font-size: 16px; }
[data-theme="christmas"] .pv-thumb { border-width: 2px; border-radius: 10px; }
/* taken: a greyed tag, struck title, grey ribbon + bow, a gold star instead of the check */
[data-theme="christmas"] .sticker.done { background-color: #e9e4d7; box-shadow: 0 3px 0 #0b2219; }
[data-theme="christmas"] .sticker.done::after { background: #9aa79f; }
[data-theme="christmas"] .sticker.done::before { filter: grayscale(1) opacity(.6); }
[data-theme="christmas"] .sticker.done .wt { color: #55625a; text-decoration-thickness: 2px; }
[data-theme="christmas"] .sticker .check {
  position: relative; background: none; border: 0; width: 34px; height: 34px; font-size: 0; color: transparent;
}
[data-theme="christmas"] .sticker .check::after {
  content: "\2605"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 400 26px var(--sans); color: #b07d0a;
}

/* hero photo: a candy-cane stripe along its bottom edge */
[data-theme="christmas"] .hero { border-bottom: 0; position: relative; margin-bottom: 4px; }
[data-theme="christmas"] .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; pointer-events: none;
  background: repeating-linear-gradient(135deg, #c8323f 0 12px, #fff 12px 24px); border-top: 2px solid #0b2219; border-bottom: 2px solid #0b2219;
}
@media (min-width: 481px) { [data-theme="christmas"] .hero { border: 0; border-radius: 0 0 18px 18px; } }
/* bottom sheets: cream, a candy-cane band across the top */
[data-theme="christmas"] .sheet { border-radius: 30px 30px 0 0; border-top: 2px solid #0b2219; padding-top: 44px; color: #173a2c; }
[data-theme="christmas"] .sheet > * { position: relative; z-index: 1; }
[data-theme="christmas"] .sheet::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px; z-index: 2; pointer-events: none; border-radius: 30px 30px 0 0;
  background: repeating-linear-gradient(135deg, #c8323f 0 12px, #fff 12px 24px); border-bottom: 2px solid #0b2219;
}
[data-theme="christmas"] .grab { display: none; }
[data-theme="christmas"] .sheet .h1 { font-size: 27px; }
[data-theme="christmas"] .look-card:has(input:checked) { outline: 3px solid #f2c95b; outline-offset: 0; }
@media (prefers-reduced-motion: reduce) {
  [data-theme="christmas"] body::before, [data-theme="christmas"] body::after { animation: none; }
  [data-theme="christmas"] .sticker.r0, [data-theme="christmas"] .sticker.r1,
  [data-theme="christmas"] .sticker.r2, [data-theme="christmas"] .sticker.r3 { transform: none !important; }
}

/* ── language switch (lib/i18n.js I18N.switcher): EN | SV, per device ─────── */
.lang-switch {
  display: inline-flex; flex: none;
  border: 2px solid var(--edge); border-radius: 999px; overflow: hidden;
  background: var(--card);
}
.lang-switch button {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: 800 13px var(--sans); letter-spacing: .08em; color: var(--ink-soft);
  min-width: 44px; min-height: 36px; padding: 0 12px;
}
.lang-switch button + button { border-left: 2px solid var(--edge); }
.lang-switch button[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-fg); }
.lang-switch button:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }
.lang-bar { display: flex; justify-content: flex-end; margin-bottom: -8px; }
