/* EasyKeep ADHD Planner. Two looks from the shop's brand: Night (Midnight navy, cream text, gold)
   and Day (warm cream, navy text). Color lives on the tracker squares and one gold accent; cards
   stay plain. */
/* One variable font file covers every weight we use (tools/fonts.py). */
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/lexend.woff2) format('woff2'); }

:root {
  --gold: #E0B357; --coral: #FF8A5B; --mint: #5BD1B0; --lilac: #B9A6FF; --blue: #5B84F5; --pink: #F7A6C4;
  --navy: #14161F;
  --r-card: 18px; --r-btn: 13px; --r-sq: 9px;
  --pad: 16px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #14161F; --bg-2: #181B26; --card: #1E2232; --card-2: #272C40; --line: rgba(243, 235, 221, 0.10);
  --ink: #F3EBDD; --muted: #B9B2A6; --faint: #948E9F;
  --accent: #E0B357; --accent-text: #E8C273; --on-accent: #14161F;
  --open: rgba(243, 235, 221, 0.42); --danger: #FF9C7A;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); --backdrop: rgba(8, 9, 14, 0.62);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #FBF6EC; --bg-2: #F4ECDD; --card: #FFFFFF; --card-2: #F6EFE3; --line: rgba(30, 34, 48, 0.10);
  --ink: #1E2230; --muted: #4F5566; --faint: #646A7A;
  --accent: #E0B357; --accent-text: #8A6514; --on-accent: #14161F;
  --open: rgba(30, 34, 48, 0.55); --danger: #B3402A;
  --shadow: 0 8px 24px rgba(30, 34, 48, 0.08); --backdrop: rgba(20, 22, 31, 0.45);
}
.c-gold { --c: var(--gold); } .c-coral { --c: var(--coral); } .c-mint { --c: var(--mint); }
.c-lilac { --c: var(--lilac); } .c-blue { --c: var(--blue); } .c-pink { --c: var(--pink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent-text); outline-offset: 2px; }
.ic { width: 22px; height: 22px; flex: none; display: block; }
.ic-s { width: 17px; height: 17px; display: inline-block; vertical-align: -3px; }
.ic.gold { color: var(--accent-text); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.link { color: var(--accent-text); text-decoration: none; font-weight: 500; }
.sep { margin: 0 7px; color: var(--faint); }
/* Anything that can hold the user's own words wraps, even a run-on word with no spaces. */
.linkish, .one-title, .steps li > span, .habit-name, .routine-name, .after, .chip, .toast span, .focus-task { overflow-wrap: anywhere; }
.steps li > span, .habit-name, .routine-name { min-width: 0; }
.chip { max-width: 100%; }
.struck { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }

/* ---------- frame ---------- */
.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--safe-t) + 4px) var(--pad) calc(var(--tabs-h) + var(--safe-b) + 88px); }
.top { display: flex; align-items: center; gap: 12px; height: 56px; position: sticky; top: 0; z-index: 5;
  background: var(--bg); margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); padding-top: var(--safe-t); box-sizing: content-box; }
.top h1 { flex: 1; margin: 0; font-size: 19px; font-weight: 600; letter-spacing: 0.01em; }
.logo { display: grid; grid-template-columns: repeat(2, 9px); gap: 3px; }
.logo i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.logo i.open { background: none; box-shadow: inset 0 0 0 1.6px var(--open); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--card); color: var(--ink); }
.icon-btn.small { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn:disabled { opacity: 0.3; cursor: default; background: none; }
.screen { outline: none; }
.loading { padding: 80px 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; margin: 0 0 14px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hint { font-size: 13.5px; color: var(--faint); white-space: nowrap; }
.eyebrow { margin: 0 0 6px; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }

/* ---------- Today ---------- */
.hello { padding: 6px 2px 14px; }
.hello .date { margin: 0; color: var(--muted); font-size: 14.5px; }
.hello h2 { margin: 2px 0 14px; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.squares { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.squares .sq { width: 20px; height: 20px; border-radius: 6px; background: var(--c); }
.squares .sq.open { background: none; box-shadow: inset 0 0 0 2px var(--open); }
.squares .more { font-size: 13px; color: var(--muted); margin-left: 2px; }
.squares .sq.pop { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { from { transform: scale(0.3); opacity: 0.2; } to { transform: none; opacity: 1; } }
.squares-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg.presets { grid-template-columns: repeat(4, 1fr); margin: 6px 0 16px; }
.seg-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; border-radius: var(--r-btn);
  border: 1.5px solid var(--line); background: var(--card-2); font-weight: 500; font-size: 15px; padding: 0 6px; }
.seg-btn[aria-pressed='true'] { background: var(--c); border-color: var(--c); color: var(--navy); }
.seg-note { margin: 10px 0 0; }

.one { padding: 20px 18px 18px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.one-title { margin: 0 0 4px; font-size: 22px; line-height: 1.25; font-weight: 600; }
.linkish { border: 0; background: none; padding: 0; text-align: left; font-weight: inherit; font-size: inherit; line-height: inherit; }
.one .row-meta { display: block; margin-bottom: 6px; }
.one.empty h3 { font-size: 19px; margin-bottom: 4px; }
.after { margin: 6px 0 0; font-size: 14px; color: var(--faint); }
.actions.one-actions { display: grid; grid-template-columns: 1fr 1fr; }
.actions.one-actions .btn { padding: 0 10px; }
.text-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 6px; padding: 0; border: 0; background: none;
  color: var(--accent-text); font-weight: 500; font-size: 15px; }
.steps { list-style: none; margin: 12px 0 2px; padding: 0; display: grid; gap: 2px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 7px 0; }
.steps li > span { padding-top: 3px; } /* lines up with its check box, even when it wraps */

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 18px; border-radius: var(--r-btn);
  border: 1.5px solid var(--line); background: var(--card-2); font-weight: 500; font-size: 15.5px; text-decoration: none; }
.btn:hover { border-color: var(--open); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 0 13px; font-size: 14.5px; border-radius: 11px; }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
:root[data-theme='dark'] .btn.danger-fill { color: var(--navy); }

/* Tracker-square check boxes, like the shop icon: open outline, or color with a navy check. */
.sq-check { position: relative; flex: none; width: 30px; height: 30px; border-radius: var(--r-sq); border: 0; padding: 0;
  background: transparent; box-shadow: inset 0 0 0 2.2px var(--open); transition: background 0.15s, box-shadow 0.15s; }
.sq-check::before { content: ''; position: absolute; inset: -7px; } /* 44px touch target */
.sq-check:hover { box-shadow: inset 0 0 0 2.2px var(--c); }
.sq-check[aria-pressed='true'] { background: var(--c); box-shadow: none; }
.sq-check[aria-pressed='true']::after { content: ''; position: absolute; left: 10.5px; top: 5.5px; width: 7px; height: 13px;
  border: solid var(--navy); border-width: 0 3px 3px 0; border-radius: 1px; transform: rotate(42deg); }
.sq-check[aria-pressed='true'] { animation: fill 0.35s ease-out; }
@keyframes fill { 0% { transform: scale(0.8); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.sq-ghost { flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: var(--faint); }

.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.rows .row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none;
  padding: 6px 0; text-align: left; }
.row-title { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.row-meta { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; }
.row-meta .ic-s { margin-right: 4px; }
.row.is-done .row-title { text-decoration: line-through; color: var(--muted); }
.row.is-faded { opacity: 0.62; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--c); margin-right: 5px; }
.star { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--faint); border-radius: 10px; }
.star.on { color: var(--accent-text); }
.star.on .ic { fill: currentColor; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--card-2); font-size: 14.5px; font-weight: 500; }
.chip.on, .chip[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip.quiet { background: transparent; color: var(--muted); }
.date-chip input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.wait-list, .dump-list { list-style: none; margin: 8px 0 0; padding: 0; }
.wait-list li, .dump-list li { padding: 8px 0 12px; border-top: 1px solid var(--line); }
.wait-list li:first-child, .dump-list li:first-child { border-top: 0; }
.wait-list .row-main { padding-top: 2px; }
.dump-list p { margin: 4px 0 10px; overflow-wrap: anywhere; }

details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
.chev { transition: transform 0.2s; color: var(--faint); }
details[open] > summary .chev { transform: rotate(90deg); }
.routine { border-top: 1px solid var(--line); }
.routine:first-of-type { border-top: 0; }
.routine summary { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.routine-name { font-weight: 500; flex: 1; }
.mini-squares { display: flex; gap: 3px; }
.mini-squares i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.mini-squares i.open { background: none; box-shadow: inset 0 0 0 1.5px var(--open); }
.routine .steps { margin: 0 0 8px; }

.habit-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.habit-mini li { display: flex; align-items: center; gap: 12px; min-height: 46px; }
.habit-name { flex: 1; }
.habit-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; }

.nudge { display: flex; gap: 14px; align-items: flex-start; }
.nudge-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); color: var(--accent-text); }
.nudge h3 { font-size: 16px; }
.nudge p { margin: 4px 0 0; }
.nudge .actions { margin-top: 10px; }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin: 0 0 14px; font-size: 14.5px; }
.banner.demo { background: color-mix(in srgb, var(--lilac) 22%, var(--card)); }
.banner.warn { background: color-mix(in srgb, var(--coral) 22%, var(--card)); }

/* ---------- Tasks ---------- */
.toolbar { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.done-box summary { display: flex; align-items: center; gap: 10px; }
.done-box summary h3 { flex: 1; }
.done-box .rows { margin-top: 8px; }

/* ---------- Habits ---------- */
.habit-list { list-style: none; margin: 0; padding: 0; }
.habit-list > li { padding: 6px 0 12px; border-top: 1px solid var(--line); }
.habit-list > li:first-child { border-top: 0; }
.week-squares { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wlabel { font-size: 12px; color: var(--faint); }
.wlabel.now { color: var(--accent-text); font-weight: 600; }
/* In a few-days-a-week habit's row, a thin line where this week starts (Monday). */
.wday { position: relative; }
.wday.wk-start::before { content: ''; position: absolute; left: -2.75px; top: 0; height: 30px; width: 1.5px; border-radius: 1px; background: var(--open); }

/* ---------- a habit's month ---------- */
.habit-cal { max-width: 440px; margin: 0 auto; } /* keeps the days a comfortable size on a laptop */
.cal-title { display: flex; align-items: center; gap: 4px; }
.cal-goal { margin: -10px 0 14px; }
.cal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.cal-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.cal-stats b { display: block; font-size: 21px; font-weight: 600; line-height: 1.25; }
.cal-stats span { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; }
.cal-nav h3 { margin: 0; font-size: 17px; font-weight: 600; }
.ic.flip { transform: rotate(180deg); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal.weekly { grid-template-columns: repeat(7, minmax(0, 1fr)) 30px; }
.cal-head { text-align: center; font-size: 12px; color: var(--faint); }
.cal-day { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: var(--r-sq);
  background: var(--card-2); color: var(--ink); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-day.on { background: var(--c); color: var(--navy); }
.cal-day.on.old { background: color-mix(in srgb, var(--c) 45%, transparent); color: var(--ink); }
.cal-day.rest { background: none; outline: 2px dashed var(--c); outline-offset: -3px; }
.cal-day.today { font-weight: 700; }
.cal-day.today:not(.on) { background: none; box-shadow: inset 0 0 0 2.2px var(--accent-text); color: var(--accent-text); }
.cal-day.future { background: none; color: var(--faint); }
/* Days from the next-door months: a faint number, and a small dot if ticked (so they can't pass for "Earlier"). */
.cal-day.out { position: relative; background: none; outline: none; color: var(--faint); font-weight: 400; }
.cal-day.out.on::after { content: ''; position: absolute; left: 50%; bottom: 12%; width: 6px; height: 6px; margin-left: -3px; border-radius: 2px; background: var(--c); }
/* A week that reached its goal: a small tracker square with a navy check, like the app's squares. */
.cal-week { display: grid; place-items: center; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cal-week.met { place-self: center; width: 24px; height: 24px; border-radius: 7px; background: var(--c); color: var(--navy); }
.cal-week.met.old { opacity: 0.5; }
.cal-week.met .ic-s, .key-sq.met .ic-s { width: 16px; height: 16px; stroke-width: 3; vertical-align: 0; }
.cal-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.cal-key span { display: inline-flex; align-items: center; gap: 7px; }
.key-sq { width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.key-sq.old { background: color-mix(in srgb, var(--c) 45%, transparent); }
.key-sq.rest { background: none; outline: 1.5px dashed var(--c); outline-offset: -1.5px; }
.key-sq.met { display: grid; place-items: center; width: 16px; height: 16px; color: var(--navy); }
.key-sq.met .ic-s { width: 12px; height: 12px; stroke-width: 3.2; }
.edit-list { list-style: none; margin: 0 0 10px; padding: 0; }
.edit-list li { display: flex; align-items: center; gap: 8px; min-height: 46px; border-top: 1px solid var(--line); }
.edit-list li:first-child { border-top: 0; }
.edit-list .num { width: 22px; text-align: center; font-size: 13px; color: var(--faint); }
.grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.add-line { display: flex; gap: 8px; }
.add-line input { flex: 1; min-width: 0; }

/* ---------- Week ---------- */
.day-block .card-head { margin-bottom: 4px; }
.day-date { font-weight: 400; color: var(--faint); font-size: 14px; margin-left: 8px; }

/* ---------- Focus ---------- */
.focus { padding-top: 8px; }
.focus-task { margin: 0 0 8px; font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ring-wrap { position: relative; width: min(78vw, 280px); aspect-ratio: 1; margin: 18px auto 18px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--card-2); stroke-width: 14; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.ring-time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-time .time { font-size: 52px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ring-sub { color: var(--muted); font-size: 15px; }

/* ---------- nav and quick capture ---------- */
.tabs { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--bg-2); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
  color: var(--faint); font-size: 12px; font-weight: 500; position: relative; }
.tab.active { color: var(--accent-text); }
.tab.active::before { content: ''; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 2px; background: var(--accent); }
.tab.running .ic { color: var(--mint); }
.fab { position: fixed; z-index: 11; right: max(var(--pad), calc(50% - 280px + var(--pad))); bottom: calc(var(--tabs-h) + var(--safe-b) + 14px);
  width: 58px; height: 58px; border-radius: 18px; border: 0; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); }
.fab .ic { width: 26px; height: 26px; }
.fab[hidden] { display: none; }
/* Typing in a box on a screen: the tab bar and + step aside, so the box and keyboard have room. */
@media (max-width: 639px) { body.typing .tabs, body.typing .fab { display: none; } }

/* ---------- sheet ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--backdrop); }
/* bottom and max-height follow the on-screen keyboard (--kb, --vvh: see 06-main.js); with no keyboard,
   92% of .sheet-root = 92% of the screen. scroll-padding keeps a box being typed in clear of the Save bar. */
.sheet { position: absolute; left: 50%; bottom: var(--kb, 0px); transform: translate(-50%, 100%); width: 100%; max-width: 560px;
  max-height: 92%; max-height: calc(var(--vvh, 100%) * 0.92); scroll-padding: 12px 0 84px;
  overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  padding: 8px var(--pad) calc(18px + var(--safe-b)); transition: transform 0.22s ease-out; }
.sheet-root.show .sheet { transform: translate(-50%, 0); }
.sheet-x { position: sticky; top: 4px; float: right; z-index: 2; }
.sheet-body { padding-top: 6px; }
@media (min-width: 640px) {
  .sheet { bottom: auto; top: 50%; transform: translate(-50%, -46%); opacity: 0; border-radius: 22px; max-height: 86vh; transition: transform 0.2s, opacity 0.2s; }
  .sheet-root.show .sheet { transform: translate(-50%, -50%); opacity: 1; }
}
.form h2 { margin: 6px 0 16px; font-size: 22px; font-weight: 600; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field em { font-style: normal; color: var(--faint); font-weight: 400; }
.field-note { display: block; margin-top: 7px; font-size: 13.5px; color: var(--muted); }
input:not([type='checkbox']):not([type='date']), textarea, select {
  width: 100%; min-height: 48px; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-text); outline: none; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0 0 14px; font-size: 15.5px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--gold); }
.actions.sticky { position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--bg); padding: 12px 0 4px; margin-top: 8px; }
.swatches { gap: 10px; }
.swatch { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--c); }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--c); }
.settings .field { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.about { margin-top: 10px; line-height: 1.6; }
.how { padding-left: 22px; }
.how li { margin: 0 0 10px; }
.inline { color: var(--accent-text); }
.faq { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; font-weight: 500; }
.faq p { margin: 0 0 14px; color: var(--muted); }

/* ---------- toast ---------- */
.toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--kb, 0px) + var(--tabs-h) + var(--safe-b) + 86px); z-index: 60;
  width: calc(100% - 32px); max-width: 528px; pointer-events: none; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
.toast-root.show { opacity: 1; pointer-events: auto; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 15px; }
.toast-btn { border: 0; background: none; color: var(--bg); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; padding: 0 6px; }
.noscript { padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
