/* ============================================================
   MAISON — Essensplaner
   Mobile-first, editorial luxury. Light "Atelier" + dark "Nocturne".
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Hanken+Grotesk:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;

  --accent: oklch(0.62 0.085 71);
  --accent-ink: oklch(0.40 0.07 66);
  --accent-soft: oklch(0.62 0.085 71 / 0.12);

  --special: oklch(0.605 0.13 42);
  --special-soft: oklch(0.605 0.13 42 / 0.10);
  --veg: oklch(0.52 0.06 142);

  --ok: oklch(0.60 0.10 150);
  --warn: oklch(0.66 0.13 60);
  --err: oklch(0.58 0.15 25);

  --radius: 18px;
  --radius-sm: 11px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Atelier — light editorial paper */
:root,
[data-theme="atelier"] {
  --paper: oklch(0.972 0.006 84);
  --paper-2: oklch(0.987 0.005 84);
  --paper-sunk: oklch(0.948 0.008 82);
  --ink: oklch(0.245 0.012 60);
  --ink-2: oklch(0.45 0.012 62);
  --ink-3: oklch(0.60 0.010 64);
  --line: oklch(0.885 0.008 78);
  --line-strong: oklch(0.82 0.010 76);
  --shadow-card: 0 1px 2px oklch(0.3 0.02 60 / 0.04), 0 12px 30px -18px oklch(0.3 0.02 60 / 0.30);
  --shadow-float: 0 30px 80px -40px oklch(0.25 0.03 60 / 0.55);
  --backdrop: oklch(0.30 0.018 64);
}

/* Nocturne — deep warm dark */
[data-theme="nocturne"] {
  --paper: oklch(0.205 0.010 62);
  --paper-2: oklch(0.245 0.012 64);
  --paper-sunk: oklch(0.185 0.010 62);
  --ink: oklch(0.945 0.010 82);
  --ink-2: oklch(0.76 0.012 80);
  --ink-3: oklch(0.60 0.012 78);
  --line: oklch(0.32 0.012 66);
  --line-strong: oklch(0.40 0.014 68);
  --accent: oklch(0.74 0.085 76);
  --accent-ink: oklch(0.80 0.085 78);
  --accent-soft: oklch(0.74 0.085 76 / 0.16);
  --special: oklch(0.68 0.13 46);
  --special-soft: oklch(0.68 0.13 46 / 0.16);
  --veg: oklch(0.66 0.07 146);
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.30), 0 16px 36px -22px oklch(0 0 0 / 0.65);
  --shadow-float: 0 40px 90px -45px oklch(0 0 0 / 0.85);
  --backdrop: oklch(0.13 0.010 62);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--backdrop);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---------- App frame (phone column on desktop) ---------- */
.stage {
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}
.app {
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 520px) {
  .stage { padding: 36px 20px; align-items: flex-start; }
  .app {
    height: 100%;
    max-height: 940px;
    border-radius: 30px;
    box-shadow: var(--shadow-float);
    overflow: hidden;
  }
}

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 28px;
}
.scroll::-webkit-scrollbar { display: none; }

/* ---------- Header ---------- */
.topbar {
  padding: 22px 22px 16px;
  background: var(--paper);
  position: relative;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.brand-mark .glyph {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--accent-ink);
  transform: translateY(-2px);
}
.brand-tools { display: flex; align-items: center; gap: 9px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: 0.2s var(--ease);
  flex: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* sync dot inside settings button */
.sync-dot {
  position: absolute;
  top: 22px; right: 20px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-3);
  border: 2px solid var(--paper);
  transition: 0.3s var(--ease);
  z-index: 6;
}
.sync-dot.synced { background: var(--ok); }
.sync-dot.syncing { background: var(--warn); animation: pulse 1s infinite; }
.sync-dot.error { background: var(--err); }
.sync-dot.offline { background: var(--ink-3); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Week navigator ---------- */
.weeknav {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.weeknav .arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: 0.2s var(--ease);
  flex: none;
}
.weeknav .arrow:hover { background: var(--paper-sunk); color: var(--ink); }
.weeknav .arrow svg { width: 15px; height: 15px; }
.weeknav-label { text-align: center; line-height: 1.15; cursor: pointer; }
.weeknav-eyebrow {
  font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.weeknav-range {
  font-family: var(--serif);
  font-size: 22px; font-weight: 600;
  margin-top: 6px;
  white-space: nowrap;
  line-height: 1.1;
}

/* ---------- Budget strip ---------- */
.budget {
  margin: 18px 22px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  overflow: hidden;
}
.budget .cell { padding: 14px 8px; text-align: center; }
.budget .divider { background: var(--line); align-self: stretch; }
.budget .k {
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.budget .v {
  font-family: var(--mono);
  font-size: 18px; font-weight: 500; margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.budget .v .cur { font-size: 11px; color: var(--ink-3); margin-right: 4px; letter-spacing: 0.04em; }

/* ---------- Segmented tabs ---------- */
.segmented {
  margin: 20px 22px 4px;
  display: flex;
  gap: 4px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 4px;
}
.seg {
  flex: 1;
  border: none; background: transparent;
  padding: 9px 8px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  transition: 0.22s var(--ease);
}
.seg.active {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.06), 0 4px 12px -8px oklch(0 0 0 / 0.3);
}

/* ---------- Views ---------- */
.view { display: none; padding: 8px 22px 0; }
.view.active { display: block; animation: rise 0.4s var(--ease); }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Day card ---------- */
.day {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-top: 14px;
  overflow: hidden;
  transition: 0.25s var(--ease);
}
.day.is-today { border-color: var(--accent); }
.day.is-past { opacity: 0.55; }

.day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.day-when { display: flex; align-items: baseline; gap: 10px; }
.day-name {
  font-family: var(--serif);
  font-size: 21px; font-weight: 600;
  line-height: 1;
}
.day-date {
  font-family: var(--mono);
  font-size: 11px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.day-head-right { display: flex; align-items: center; gap: 8px; }
.tag {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 100px;
  white-space: nowrap;
}
.tag.today { background: var(--accent-soft); color: var(--accent-ink); }
.tag.special { background: var(--special-soft); color: var(--special); }

/* small swap button */
.swap {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.swap:hover { color: var(--accent-ink); border-color: var(--accent); transform: rotate(-30deg); }
.swap svg { width: 14px; height: 14px; }

.day-body { padding: 11px 18px 16px; }
.eyebrow {
  font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.eyebrow .dot.veg { background: var(--veg); }
.eyebrow .dot.special { background: var(--special); }

.dish {
  font-family: var(--serif);
  font-size: 27px; font-weight: 600;
  line-height: 1.08;
  margin-top: 7px;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.dish-sub { font-style: italic; color: var(--ink-2); font-size: 21px; }

.meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 100px;
}
.chip svg { width: 13px; height: 13px; opacity: 0.7; }
.chip .num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.chip.price .num { color: var(--accent-ink); font-weight: 500; }

/* variation selector */
.variation {
  margin-top: 13px;
  display: flex; align-items: center; gap: 10px;
}
.variation .vlbl {
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; flex: none;
}
.variation select {
  flex: 1;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.variation select:focus { outline: none; border-color: var(--accent); }

/* kids lunch line */
.subline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: baseline; gap: 9px;
}
.subline .lbl {
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; flex: none;
}
.subline .val { font-family: var(--serif); font-size: 17px; font-weight: 500; }

/* recipe steps accordion */
.steps-toggle {
  margin-top: 14px;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: none;
  border-top: 1px solid var(--line);
  padding: 13px 0 0;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--sans);
}
.steps-toggle .lbl {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600;
}
.steps-toggle .chev { transition: transform 0.3s var(--ease); display: grid; place-items: center; }
.steps-toggle .chev svg { width: 14px; height: 14px; }
.day.open .steps-toggle .chev { transform: rotate(180deg); }

.steps-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s var(--ease);
}
.day.open .steps-wrap { grid-template-rows: 1fr; }
.steps-inner { overflow: hidden; }
.steps {
  list-style: none;
  counter-reset: step;
  padding-top: 14px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 14px 38px;
  font-size: 14px; line-height: 1.55;
  color: var(--ink-2);
}
.steps li:last-child { padding-bottom: 4px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -1px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  color: var(--accent-ink);
  letter-spacing: 0.02em;
}
.steps li::after {
  content: '';
  position: absolute; left: 4px; top: 19px; bottom: 4px;
  width: 1px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps li .sub-h { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }

.ingredients {
  margin-top: 6px;
  padding: 13px 15px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.ingredients .ing-h {
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 9px;
}
.ing-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.ing-row:last-child { border-bottom: none; }
.ing-row .nm { color: var(--ink-2); }
.ing-row .qt { font-family: var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Shopping list ---------- */
.shop-days {
  margin-top: 14px; padding: 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.shop-days-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.shop-days-h .lbl {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
}
.link-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--accent-ink); padding: 4px 8px; border-radius: 6px;
  transition: 0.18s var(--ease);
}
.link-btn:hover { background: var(--accent-soft); }
.shop-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 16px 2px 4px;
}
.shop-head .t { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.shop-sub {
  font-size: 12px; color: var(--ink-3); margin-top: 2px;
  letter-spacing: 0.04em;
}
.progress-ring { display: flex; align-items: center; gap: 9px; }
.progress-ring .pct {
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.bar { width: 64px; height: 5px; border-radius: 100px; background: var(--paper-sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 100px; transition: width 0.4s var(--ease); }

.cat { margin-top: 22px; }
.cat-h {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
  margin-bottom: 4px;
}
.cat-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cat-h .ct { font-family: var(--mono); letter-spacing: 0; }

.shop-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}
.shop-item:last-child { border-bottom: none; }
.check {
  width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--line-strong);
  flex: none; display: grid; place-items: center;
  transition: 0.18s var(--ease);
}
.check svg { width: 13px; height: 13px; opacity: 0; transform: scale(0.5); transition: 0.18s var(--ease); color: var(--paper); }
.shop-item.done .check { background: var(--accent); border-color: var(--accent); }
.shop-item.done .check svg { opacity: 1; transform: scale(1); }
.shop-item .nm { flex: 1; font-size: 15px; transition: 0.2s var(--ease); }
.shop-item .qt {
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.shop-item.done .nm { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.shop-item.done .qt { color: var(--ink-3); }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .e-t { font-family: var(--serif); font-size: 22px; color: var(--ink-2); margin-bottom: 6px; }
.empty .e-s { font-size: 14px; }

/* ---------- Footer note ---------- */
.foot {
  text-align: center;
  padding: 26px 22px 30px;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.04em;
}
.foot .sep { color: var(--accent); margin: 0 7px; }

.regen { margin: 18px 22px 0; display: flex; gap: 10px; }
.btn-ghost {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 12px;
  padding: 12px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--line-strong); }
.btn-ghost svg { width: 14px; height: 14px; }

/* ---------- Settings sheet ---------- */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: oklch(0.2 0.02 60 / 0.45);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: 0.3s var(--ease);
  z-index: 40;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-float);
  transform: translateY(100%);
  transition: transform 0.36s var(--ease);
  z-index: 41;
  max-height: 88%;
  display: flex; flex-direction: column;
}
.sheet.open { transform: translateY(0); }
.sheet-grab { width: 38px; height: 4px; border-radius: 100px; background: var(--line-strong); margin: 11px auto 0; flex: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px 8px;
}
.sheet-head .st { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.sheet-body { overflow-y: auto; padding: 6px 22px 28px; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }

.set-sec { margin-top: 22px; }
.set-sec:first-child { margin-top: 8px; }
.set-h {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.set-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.member-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.member-row input.nm-in {
  flex: 1; min-width: 0;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px;
}
.member-row input.pt-in {
  width: 74px; flex: none; text-align: right;
  font-family: var(--mono); font-size: 14px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px;
}
.member-row input:focus { outline: none; border-color: var(--accent); }
.member-row .rm {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  cursor: pointer; display: grid; place-items: center; transition: 0.2s var(--ease);
}
.member-row .rm:hover { color: var(--err); border-color: var(--err); }
.member-row .rm svg { width: 14px; height: 14px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.add-line {
  margin-top: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent-ink); background: none; border: none; cursor: pointer;
  padding: 6px 0;
}

.daypills { display: flex; flex-wrap: wrap; gap: 7px; }
.daypill {
  font-size: 12px; font-weight: 600;
  padding: 8px 13px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--paper-2);
  color: var(--ink-2); cursor: pointer; transition: 0.18s var(--ease);
}
.daypill.on { background: var(--special-soft); color: var(--special); border-color: var(--special); }

.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.field label { font-size: 14px; color: var(--ink-2); }
.field input[type="number"], .field input[type="text"], .field select {
  width: 130px; text-align: right;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field.range input[type="range"] { width: 150px; accent-color: var(--accent); }

.toggle-row { display: flex; gap: 6px; background: var(--paper-sunk); border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.toggle-row button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 9px; border-radius: 8px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
  transition: 0.2s var(--ease);
}
.toggle-row button.on { background: var(--paper-2); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / 0.06); }

.swatches { display: flex; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: 0.18s var(--ease);
  display: grid; place-items: center;
}
.swatch.on { border-color: var(--ink); }
.swatch i { width: 22px; height: 22px; border-radius: 50%; }

.sync-line { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.sync-line b { color: var(--ink); font-weight: 600; }
.btn-solid {
  margin-top: 12px; width: 100%;
  border: none; background: var(--accent); color: var(--paper);
  border-radius: 12px; padding: 12px;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  transition: 0.2s var(--ease);
}
[data-theme="nocturne"] .btn-solid { color: oklch(0.2 0.01 62); }
.btn-solid:hover { filter: brightness(1.05); }

/* ---------- Toast ---------- */
.toast-wrap {
  position: absolute; left: 0; right: 0; bottom: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 60; pointer-events: none; padding: 0 22px;
}
.toast {
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 500;
  padding: 11px 18px; border-radius: 100px;
  box-shadow: var(--shadow-float);
  animation: toastin 0.3s var(--ease);
  max-width: 100%;
}
.toast.err { background: var(--err); color: white; }
@keyframes toastin { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.loading-screen {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--paper); z-index: 80; transition: opacity 0.4s var(--ease);
}
.loading-screen.hide { opacity: 0; pointer-events: none; }
.loading-screen .lw { font-family: var(--serif); font-size: 26px; color: var(--ink-2); }
.loading-screen .lw span { color: var(--accent-ink); }
