/* SPOE Calendar. Phone first: one column and a floating bar of five tabs; wider, the month and its day sit side by
   side. Two looks, dark and light, each drawn from the names below: glass cards over a soft glow, SPOE's gold for
   the one thing that matters on a screen. The look is on <html data-theme>, put there by theme.js before the first
   paint and kept right by lib/look.js; with no script at all, the phone's own setting picks it. */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('./fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('./fonts/plus-jakarta-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --radius: 24px; --tap: 44px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* the gold that fills the one main thing on a screen: the same in both looks, with dark writing on it */
  --fill: linear-gradient(135deg, #f9e8b4 0%, #e6bb5e 46%, #bf8e2f 100%);
  --fill-ink: #1a1206;

  /* dark */
  --bg: #06080b; --glow-a: rgba(230, 192, 106, .17); --glow-b: rgba(96, 132, 255, .09);
  --card: rgba(255, 255, 255, .045); --card-hi: rgba(255, 255, 255, .085); --tile: rgba(255, 255, 255, .04); --field: rgba(255, 255, 255, .055); --field-line: rgba(255, 255, 255, .1); --track: rgba(255, 255, 255, .055);
  --seg-on: rgba(255, 255, 255, .13); --sheet: #0f1318; --dock: rgba(15, 19, 25, .86); --scrim: rgba(3, 5, 8, .62);
  --line: rgba(255, 255, 255, .085); --line-2: rgba(255, 255, 255, .17);
  --text: #f4f6f8; --quiet: #98a2af; --faint: #66707d;
  --accent: #e9c672; --warn: #ff7b7b; --ok: #3fd69b;
  --fill-glow: 0 10px 28px -10px rgba(230, 187, 94, .6);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 30px 60px -40px rgba(0, 0, 0, .95);
  --lift: 0 24px 70px -20px rgba(0, 0, 0, .85);
  --toast-bg: #f4f6f8; --toast-ink: #0b0e12;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #f4f2ed; --glow-a: rgba(216, 172, 72, .24); --glow-b: rgba(120, 150, 255, .11);
    --card: rgba(255, 255, 255, .84); --card-hi: #ffffff; --tile: rgba(18, 22, 28, .04); --field: #ffffff; --field-line: rgba(18, 22, 28, .15); --track: rgba(18, 22, 28, .065);
    --seg-on: #ffffff; --sheet: #fbfaf7; --dock: rgba(255, 255, 255, .9); --scrim: rgba(24, 20, 10, .36);
    --line: rgba(18, 22, 28, .085); --line-2: rgba(18, 22, 28, .18);
    --text: #11151a; --quiet: #596371; --faint: #99a1ac;
    --accent: #8a620a; --warn: #cf3838; --ok: #0d9467;
    --fill-glow: 0 10px 24px -12px rgba(150, 108, 18, .6);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 26px 50px -36px rgba(44, 32, 6, .38), 0 2px 6px -3px rgba(44, 32, 6, .08);
    --lift: 0 24px 60px -24px rgba(44, 32, 6, .4);
    --toast-bg: #11151a; --toast-ink: #f4f6f8;
    color-scheme: light;
  }
}
:root[data-theme='light'] {
  --bg: #f4f2ed; --glow-a: rgba(216, 172, 72, .24); --glow-b: rgba(120, 150, 255, .11);
  --card: rgba(255, 255, 255, .84); --card-hi: #ffffff; --tile: rgba(18, 22, 28, .04); --field: #ffffff; --field-line: rgba(18, 22, 28, .15); --track: rgba(18, 22, 28, .065);
  --seg-on: #ffffff; --sheet: #fbfaf7; --dock: rgba(255, 255, 255, .9); --scrim: rgba(24, 20, 10, .36);
  --line: rgba(18, 22, 28, .085); --line-2: rgba(18, 22, 28, .18);
  --text: #11151a; --quiet: #596371; --faint: #99a1ac;
  --accent: #8a620a; --warn: #cf3838; --ok: #0d9467;
  --fill-glow: 0 10px 24px -12px rgba(150, 108, 18, .6);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 26px 50px -36px rgba(44, 32, 6, .38), 0 2px 6px -3px rgba(44, 32, 6, .08);
  --lift: 0 24px 60px -24px rgba(44, 32, 6, .4);
  --toast-bg: #11151a; --toast-ink: #f4f6f8;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html, body { margin: 0; color: var(--text); font: 500 16px/1.45 var(--font); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { min-height: 100dvh; overflow-x: hidden; }
/* The glow behind everything: gold from the top, a cool blue from the far corner. It stays put while the page moves. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(95% 52% at 50% -6%, var(--glow-a), transparent 64%), radial-gradient(70% 44% at 104% 104%, var(--glow-b), transparent 62%); }
/* The page fades out under the floating tabs, so nothing is half-read through them. */
body::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; height: calc(104px + env(safe-area-inset-bottom)); pointer-events: none; background: linear-gradient(to top, var(--bg) 26%, transparent); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.4rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.12; }
h2 { font-size: 1.04rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
h3 { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-top: 18px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .4; cursor: default; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the top */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; margin-right: auto; font-weight: 700; letter-spacing: -.02em; }
.brand img { flex: none; border-radius: 8px; display: block; box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(0, 0, 0, .7); }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { flex: none; font-size: .74rem; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent); white-space: nowrap; }
.pill-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 32%, transparent); color: var(--warn); }
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--quiet); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); transition: color .15s, background .15s, transform .12s var(--ease); }
.icon-btn:hover { color: var(--text); background: var(--card-hi); }
.icon-btn:active:not(:disabled) { transform: scale(.92); }
.icon-btn.live { color: var(--fill-ink); background: var(--fill); box-shadow: var(--fill-glow); }
/* On a narrow phone with the days-left pill showing, the name gives way: the mark alone says whose it is. */
@media (max-width: 400px) { .top.trying .brand span { display: none; } .pill .wide { display: none; } }

.page { max-width: 1120px; margin: 0 auto; padding: 16px 14px calc(112px + env(safe-area-inset-bottom)); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 720px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head .month-head { flex: 1; padding: 0; }
.quiet { color: var(--quiet); font-size: .92rem; }
.hint { color: var(--quiet); font-size: .8rem; line-height: 1.5; margin-top: 6px; }
.eyebrow { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin-bottom: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap); padding: 0 18px; border-radius: 999px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 650; font-size: .92rem; letter-spacing: -.005em; text-decoration: none; color: var(--text); white-space: nowrap; transition: background .15s, box-shadow .15s, transform .12s var(--ease); }
.btn:hover:not(:disabled) { background: var(--card-hi); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--fill); color: var(--fill-ink); font-weight: 700; box-shadow: var(--fill-glow), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.primary:hover:not(:disabled) { background: var(--fill); filter: brightness(1.06); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--quiet); }
.btn.ghost:hover:not(:disabled) { color: var(--text); }
.btn.danger { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 38%, transparent); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .84rem; }
.input { width: 100%; min-width: 0; max-width: 100%; min-height: var(--tap); padding: 9px 13px; border-radius: 14px; border: 1px solid var(--field-line); background: var(--field); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input::placeholder { color: var(--faint); }
textarea.input { resize: vertical; }
.input.time { width: 7.6rem; flex: none; }
.quick { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.quick.col { flex-direction: column; align-items: stretch; }
.quick .input { min-width: 0; }

/* the month */
.month-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .month-wrap { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } .day-panel { position: sticky; top: 78px; } }
.month { padding: 16px 12px 12px; }
.month-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 0 6px; }
.month-head h1 { flex: 1; min-width: 0; font-size: clamp(1.3rem, 5.5vw, 1.95rem); font-weight: 750; letter-spacing: -.04em; line-height: 1.05; }
.month-head h1 .yr { font-weight: 300; letter-spacing: -.02em; color: var(--quiet); }
/* back, today, forward: one small capsule */
.stepper { flex: none; display: inline-flex; align-items: center; padding: 3px; border-radius: 999px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.stepper .icon-btn { background: none; box-shadow: none; }
.stepper .icon-btn:hover { background: var(--card-hi); }
.stepper .mid { min-height: 40px; padding: 0 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--quiet); transition: color .15s, background .15s; }
.stepper .mid:hover { color: var(--text); background: var(--card-hi); }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays { margin: 16px 0 6px; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); text-align: center; }
.grid { gap: 2px; }
.cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; padding: 6px 2px 6px; border-radius: 16px; border: 1px solid transparent; overflow: hidden; transition: background .15s, border-color .15s; }
.cell:hover { background: var(--tile); }
.cell.out { opacity: .3; }
.cell.picked { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.cell .num { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cell.now .num { background: var(--fill); color: var(--fill-ink); font-weight: 750; box-shadow: var(--fill-glow); }
.chips { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 6px; }
.chip { display: block; }
.chip i { display: block; width: 5px; height: 5px; border-radius: 999px; background: var(--kind); }
.chip b { display: none; }
.more { font-size: .58rem; font-weight: 700; color: var(--quiet); line-height: 5px; }
/* the smallest phones: a busy day's three dots and its "+2" still fit under the number */
@media (max-width: 359px) { .chips { gap: 2px; } .chip i { width: 4px; height: 4px; } .more { font-size: .52rem; letter-spacing: -.03em; } }
@media (min-width: 640px) {
  .month { padding: 20px 16px 16px; }
  .grid { gap: 6px; }
  .cell { align-items: stretch; gap: 5px; min-height: 104px; padding: 7px; background: var(--tile); text-align: left; }
  .cell:hover { background: var(--card-hi); }
  .cell.picked { background: color-mix(in srgb, var(--accent) 9%, var(--tile)); }
  .cell .num { width: 26px; height: 26px; font-size: .82rem; }
  .chips { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; }
  .chip { display: flex; align-items: center; gap: 5px; min-width: 0; padding-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--kind) 14%, transparent); }
  .chip i { flex: none; width: 3px; height: 16px; border-radius: 2px; }
  .chip b { display: block; font-size: .68rem; font-weight: 600; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .more { line-height: 1.2; padding-left: 2px; }
}

/* a day's rows */
.rows { display: grid; gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 11px 12px; min-height: 58px; border-radius: 16px; border-left: 3px solid var(--kind); background: linear-gradient(90deg, color-mix(in srgb, var(--kind) 14%, transparent), transparent 72%), var(--tile); transition: box-shadow .15s, transform .12s var(--ease); }
.row:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.row:active { transform: scale(.985); }
.row-time { flex: none; width: 4.5rem; font-size: .84rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; display: flex; flex-direction: column; }
.row-time small { font-weight: 500; color: var(--quiet); font-size: .7rem; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-weight: 650; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .74rem; color: var(--quiet); }
.row-meta span { display: inline-flex; align-items: center; gap: 3px; }
/* the kind's own colour, pulled toward the writing so it reads on dark and on light */
.row-meta .kind { color: color-mix(in srgb, var(--kind) 68%, var(--text)); font-weight: 700; }
.day-meals { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 9px 12px; border-radius: 14px; background: var(--tile); font-size: .84rem; color: var(--quiet); }
.day-meals svg { flex: none; color: var(--accent); }
.next { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 17%, transparent), transparent 58%), var(--card); }
.next h1 { font-size: clamp(1.5rem, 6.4vw, 2rem); letter-spacing: -.04em; margin-bottom: 4px; }
.first { margin-bottom: 14px; display: grid; gap: 12px; padding: 22px 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%), var(--card); border-color: color-mix(in srgb, var(--accent) 36%, transparent); }
.first h1 { font-size: clamp(1.7rem, 7.4vw, 2.4rem); letter-spacing: -.045em; line-height: 1.04; }
.first p { color: var(--quiet); max-width: 46ch; }

/* the assistant */
.said { position: relative; overflow: hidden; }
.said::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .85; }
.said .lines { display: grid; gap: 8px; }
.said .lines p { padding: 3px 0 3px 12px; border-left: 2px solid var(--line-2); transition: color .2s, border-color .2s; }
.said .lines p.saying { border-left-color: var(--accent); color: var(--accent); font-weight: 650; }
.said.big .lines p { font-size: 1.28rem; line-height: 1.35; letter-spacing: -.015em; }
.asks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line-2); font-size: .86rem; font-weight: 650; transition: background .15s, color .15s, transform .12s var(--ease); }
.chip-btn:hover { background: var(--card-hi); color: var(--accent); }
.chip-btn:active { transform: scale(.96); }
.offer { padding: 14px; border-radius: 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--tile); margin-top: 10px; border-left: 3px solid var(--accent); }
.offer.warn { border-left-color: var(--warn); background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 12%, transparent), transparent 70%), var(--tile); }
.offer-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* a long button ("Remind me on Friday to get a card or gift") goes onto two lines before it runs off a small phone */
.offer-btns .btn, .quick.col .btn, .sheet-btns .btn { white-space: normal; line-height: 1.25; padding-top: 7px; padding-bottom: 7px; }
.offer-btns .btn { text-align: left; }
.quick.col .btn { text-align: center; }

/* a choice of two or three, side by side */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 15px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line); margin-top: 4px; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 6px; border-radius: 12px; font-size: .84rem; font-weight: 650; color: var(--quiet); transition: color .15s, background .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .22), inset 0 0 0 1px var(--line); }
.seg-btn.on svg { color: var(--accent); }

/* meals */
.meal-grid { display: grid; gap: 10px; margin: 14px 0; }
.meal-day { display: grid; gap: 6px; grid-template-columns: 6.5rem repeat(3, minmax(0, 1fr)); align-items: center; }
.meal-day h3 { margin: 0; display: flex; flex-direction: column; font-size: .82rem; font-weight: 700; text-transform: none; letter-spacing: -.01em; color: var(--text); }
.meal-day h3 small { color: var(--quiet); font-weight: 500; }
.meal-day.now h3 { color: var(--accent); }
.input.meal { font-size: .86rem; padding: 8px 10px; }
.input.meal.set { border-style: dashed; border-color: var(--line-2); }
@media (max-width: 560px) { .meal-day { grid-template-columns: 1fr; padding: 12px; border-radius: 18px; background: var(--tile); } .meal-day.now { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); } .meal-day h3 { flex-direction: row; gap: 8px; align-items: baseline; } }
.shop { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.shop li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tile); }
.shop small, .dish small { color: var(--quiet); }
.dish { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dish div { display: flex; flex-direction: column; min-width: 0; }

/* drive: big, and far apart */
.drive { display: grid; gap: 12px; max-width: 720px; margin: 0 auto; }
.drive-note { color: var(--quiet); font-size: .84rem; text-align: center; padding: 0 8px; }
.drive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drive-btn { min-height: 108px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; text-align: left; transition: transform .12s var(--ease); }
.drive-btn svg { color: var(--accent); }
.drive-btn:active { transform: scale(.97); background: var(--fill); color: var(--fill-ink); }
.drive-btn:active svg, .drive-btn.live svg, .drive-btn.main svg { color: inherit; }
.drive-btn.wide { grid-column: 1 / -1; min-height: 76px; flex-direction: row; align-items: center; justify-content: flex-start; }
.drive-btn.main { min-height: 100px; font-size: 1.45rem; letter-spacing: -.03em; background: var(--fill); color: var(--fill-ink); border-color: transparent; box-shadow: var(--fill-glow), inset 0 1px 0 rgba(255, 255, 255, .5); }
.drive-btn.live { background: var(--fill); color: var(--fill-ink); border-color: transparent; }
.drive-stop { min-height: 72px; border-radius: 26px; background: color-mix(in srgb, var(--warn) 15%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 34%, transparent); color: var(--warn); font-size: 1.12rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* sheets */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: var(--scrim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; grid-template-columns: minmax(0, 1fr); background: var(--sheet); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 12px; box-shadow: var(--lift); }
/* the small bar that says "this slides": on a phone only */
.sheet::before { content: ''; justify-self: center; width: 40px; height: 4px; border-radius: 999px; background: var(--line-2); }
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 28px; border-bottom: 1px solid var(--line); padding-top: 20px; } .sheet::before { display: none; } }
.field { display: grid; gap: 5px; min-width: 0; }
.field-name { font-size: .74rem; font-weight: 650; color: var(--quiet); }
/* two boxes side by side: each keeps to its half (a date box would push wider), and its own height (a hint under one must not stretch the other) */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
/* a tick box, drawn as a switch */
.check { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: .92rem; }
.check input { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background .18s; }
.check input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--quiet); transition: transform .2s var(--ease), background .18s; }
.check input:checked { background: var(--fill); box-shadow: none; }
.check input:checked::after { transform: translateX(18px); background: var(--fill-ink); }
.sheet-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* the tabs, floating, and the toast above them */
.tabs { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10; transform: translateX(-50%); width: min(calc(100% - 20px), 470px); display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px; border-radius: 26px; background: var(--dock); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line); box-shadow: var(--lift), inset 0 1px 0 rgba(255, 255, 255, .06); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; border-radius: 20px; color: var(--quiet); font-size: .62rem; font-weight: 650; letter-spacing: -.005em; white-space: nowrap; transition: color .15s, background .15s, transform .12s var(--ease); }
.tab:hover { color: var(--text); }
.tab:active { transform: scale(.94); }
.tab.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 30; margin: 0 auto; max-width: 520px; display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 13px 16px; border-radius: 18px; background: var(--toast-bg); color: var(--toast-ink); font-weight: 600; font-size: .92rem; box-shadow: var(--lift); }
.toast .btn { flex: none; background: var(--fill); color: var(--fill-ink); box-shadow: none; }

/* Things arrive: a screen when its tab is tapped, a sheet when it opens, a notice when it is new. Never on a plain
   redraw (views.js adds .enter only on arrival), and not at all for someone who asked their phone for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .page.enter > * { animation: settle .26s var(--ease) both; }
  .sheet-back.enter { animation: fade .2s ease-out both; }
  .sheet-back.enter .sheet { animation: rise .3s var(--ease) both; }
  .toast.enter { animation: rise .24s var(--ease) both; }
}
@keyframes settle { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
