/* Sillage, Trail direction: charcoal ground, one teal accent for actions and states,
   family colors only inside bottles and the plume. */

:root {
  --ground: #0d1113;
  --surface: #141a1d;
  --raised: #1a2226;
  --line: rgb(255 255 255 / .08);
  --line-strong: rgb(255 255 255 / .15);
  --text: #eef6f5;
  --muted: #a3b4b2;
  --faint: #7f9290;
  --accent: #22e1c6;
  --accent-ink: #04241f;
  --ok: #8fd694;
  --danger: #ff8a8a;

  --body: "Sora", system-ui, -apple-system, sans-serif;

  /* shadows tinted toward the charcoal-teal ground, never neutral gray */
  --sh-1: 0 1px 2px rgb(2 8 8 / .5), 0 2px 8px rgb(2 8 8 / .3);
  --sh-2: 0 8px 22px rgb(2 8 8 / .5), 0 2px 5px rgb(2 8 8 / .35);
  --sh-3: 0 26px 60px rgb(2 8 8 / .65), 0 8px 18px rgb(2 8 8 / .45);
  --glow: 0 0 0 6px rgb(34 225 198 / .1), 0 14px 32px rgb(34 225 198 / .25);

  --r-md: 18px;
  --r-lg: 26px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);

  --z-canvas: 0;
  --z-content: 1;
  --z-sticky: 10;
  --z-nav: 20;
  --z-toast: 40;
  --z-grain: 50;

  --app-w: 440px;
  --tabbar-h: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  background: radial-gradient(100% 50% at 50% 0%, rgb(34 225 198 / .06), transparent 60%), var(--ground);
  background-attachment: fixed;
  color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgb(34 225 198 / .35); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, label { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: var(--z-grain);
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- the plume canvas sits behind everything on Today ---------- */
.trail-canvas {
  position: fixed; inset: 0; z-index: var(--z-canvas); pointer-events: none;
  opacity: 0; transition: opacity .6s var(--ease-out);
}
body[data-screen="today"] .trail-canvas { opacity: 1; }
.topbar, main, .tabbar { position: relative; z-index: var(--z-content); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 10px;
  max-width: var(--app-w); margin: 0 auto;
}
body:not([data-screen="today"]) .topbar { background: linear-gradient(var(--ground) 65%, transparent); }
.wordmark { font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; margin-right: auto; }
.weather-pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  background: rgb(255 255 255 / .06); border: 1px solid var(--line-strong); border-radius: 999px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: .82rem; font-weight: 500; color: var(--text);
  transition: transform .15s var(--ease-out), background-color .2s;
}
.weather-pill:active { transform: scale(.97); }
.icon-btn {
  min-width: 44px; min-height: 44px; display: inline-grid; place-items: center;
  background: transparent; border: 0; border-radius: 12px; color: var(--muted); font-weight: 600;
  transition: transform .15s var(--ease-out), color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.icon-btn:active { transform: scale(.95); }

main { max-width: var(--app-w); margin: 0 auto; padding: 0 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); }
.view { animation: viewIn .4s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.page-title { font-weight: 300; font-size: clamp(2.1rem, 9vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 10px 0 4px; text-wrap: balance; }
.page-sub { color: var(--muted); margin: 0 0 20px; font-size: .95rem; }

/* ---------- buttons ---------- */
.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: .95rem;
  transition: transform .15s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 0 8px rgb(34 225 198 / .14), 0 16px 36px rgb(34 225 198 / .32); }
.btn-ghost { background: rgb(255 255 255 / .05); color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgb(255 255 255 / .09); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .85rem; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgb(255 138 138 / .35); }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 14px 4px; min-height: 44px; font-weight: 500; }
.link-btn:hover { color: var(--text); }

/* ---------- plans ---------- */
.plans { margin: 2px 0 0; }
.plans-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.plans-label { font-weight: 500; margin: 0; color: var(--muted); font-size: .9rem; }
.chips { display: flex; gap: 8px; }
.plans .chips { overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px; scroll-snap-type: x proximity;
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.plans .chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  min-height: 38px; padding: 0 14px; border-radius: 999px;
  background: rgb(13 17 19 / .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); color: var(--text);
  font-size: .82rem; font-weight: 500;
  transition: transform .15s var(--ease-out), background-color .2s, border-color .2s, color .2s;
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: rgb(34 225 198 / .14); border-color: var(--accent); color: #bff7ee; }
.segment { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: rgb(13 17 19 / .55); border: 1px solid var(--line-strong); }
.segment button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 500; font-size: .8rem; transition: background-color .2s, color .2s; }
.segment button[aria-pressed="true"] { background: rgb(255 255 255 / .1); color: var(--text); }

/* ---------- Today: plume stage ---------- */
.today { display: flex; flex-direction: column; min-height: calc(100svh - 64px - env(safe-area-inset-top) - var(--tabbar-h) - env(safe-area-inset-bottom) - 28px); }
.stage { flex: 1; min-height: 200px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; touch-action: pan-y; }
.trail-bottle { filter: drop-shadow(0 0 28px rgb(34 225 198 / .22)) drop-shadow(0 18px 20px rgb(2 8 8 / .6)); transition: opacity .3s var(--ease-out), transform .45s var(--ease-out); }
.trail-bottle.swap { opacity: 0; transform: translateY(8px) scale(.96); }
.info { transition: opacity .3s var(--ease-out), transform .45s var(--ease-out); }
.info.swap { opacity: 0; transform: translateY(6px); }
.info-house { margin: 0; color: var(--muted); font-size: .9rem; display: flex; justify-content: space-between; gap: 12px; }
.info-name { font-weight: 300; font-size: clamp(2.6rem, 12vw, 3.3rem); line-height: 1; letter-spacing: -.035em; margin: 4px 0 12px; text-wrap: balance; }
.info-reason { margin: 0 0 14px; font-size: 1rem; line-height: 1.5; color: #d6e4e2; max-width: 34ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.tag { font-size: .75rem; font-weight: 500; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); }
.tag-fam { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.tag-fam::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fam); }
.actions { display: flex; gap: 10px; align-items: center; }
.actions .btn-primary { flex: 1; }
.round-btn {
  width: 50px; height: 50px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(255 255 255 / .05); border: 1px solid var(--line-strong); color: var(--text);
  transition: transform .15s var(--ease-out), background-color .2s;
}
.round-btn:hover { background: rgb(255 255 255 / .1); }
.round-btn:active { transform: scale(.94); }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.dots button::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .25); transition: width .3s var(--ease-out), background-color .3s; }
.dots button[aria-current="true"]::before { width: 18px; background: var(--text); }
.worn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 6px 18px; border-radius: 999px; min-height: 50px;
  background: rgb(143 214 148 / .1); border: 1px solid rgb(143 214 148 / .32); font-weight: 500; font-size: .92rem;
}
.unskip { text-align: center; }

/* ---------- empty state ---------- */
.empty { padding: 24px 0; }
.empty h2 { font-weight: 300; font-size: 2.2rem; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 10px; }
.empty p { color: var(--muted); margin: 0 0 22px; max-width: 36ch; }
.panel {
  padding: 26px 22px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--raised), var(--surface));
  box-shadow: var(--sh-3), inset 0 0 0 1px var(--line);
}
.panel h2 { font-weight: 300; font-size: 1.9rem; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 8px; }
.panel p { color: var(--muted); margin: 0 0 18px; }

/* ---------- shelf ---------- */
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px 8px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 20px 12px 14px; border-radius: var(--r-md); border: 0; width: 100%;
  background:
    radial-gradient(70% 55% at 50% 22%, color-mix(in oklab, var(--fam) 26%, transparent), transparent 72%),
    linear-gradient(180deg, var(--raised), var(--surface));
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
  transition: transform .22s var(--ease-out), box-shadow .25s var(--ease-out);
}
@media (hover: hover) { .card:hover { transform: translateY(-5px); box-shadow: var(--sh-3), inset 0 0 0 1px var(--line-strong); } }
.card:active { transform: scale(.97); }
.card .bottle { filter: drop-shadow(0 10px 14px rgb(2 8 8 / .6)); margin-bottom: 4px; }
.card-name { font-weight: 600; font-size: .9rem; line-height: 1.25; margin: 0; }
.card-house { color: var(--muted); font-size: .78rem; margin: 0; }
.card-fill { font-size: .72rem; font-weight: 500; color: var(--faint); }
.card-fill.low { color: #ffb3a8; }

/* ---------- lists ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row-name { font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { margin: 2px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.35; }

/* ---------- restock ---------- */
.stock { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.stock-item {
  display: grid; grid-template-columns: 50px 1fr; gap: 14px; align-items: start;
  padding: 16px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--raised), var(--surface));
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
}
.meter { height: 4px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; margin: 10px 0 14px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--fam); box-shadow: 0 0 12px var(--fam); transition: width .5s var(--ease-out); }
.buy-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: var(--z-nav);
  translate: -50% 0;
  display: flex; gap: 4px; padding: 6px;
  width: min(calc(var(--app-w) - 32px), calc(100% - 32px));
  background: rgb(20 26 29 / .78); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line-strong); border-radius: 24px;
  box-shadow: var(--sh-3);
}
.tab {
  position: relative; flex: 1; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: transparent; border: 0; border-radius: 18px; color: var(--faint);
  font-size: .7rem; font-weight: 500; letter-spacing: .02em;
  transition: color .2s, background-color .25s var(--ease-out), transform .15s var(--ease-out);
}
.tab:active { transform: scale(.95); }
.tab[aria-current="page"] { color: var(--text); background: rgb(255 255 255 / .07); }
.badge { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .66rem; font-weight: 700; display: grid; place-items: center; }

/* ---------- sheets ---------- */
.sheet {
  width: 100%; max-width: var(--app-w); max-height: 88svh;
  margin: auto auto 0; padding: 8px 20px calc(env(safe-area-inset-bottom) + 24px);
  border: 0; border-radius: 28px 28px 0 0;
  background: var(--raised); color: var(--text);
  box-shadow: 0 -20px 60px rgb(2 8 8 / .65), inset 0 1px 0 rgb(255 255 255 / .08);
  overflow-y: auto; overscroll-behavior: contain;
  transition: transform .4s var(--ease-out), opacity .3s, overlay .4s allow-discrete, display .4s allow-discrete;
  transform: translateY(0);
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 6px; touch-action: none; }
.sheet.dragging { transition: none; }
.sheet:not([open]) { transform: translateY(100%); }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::backdrop { background: rgb(2 8 8 / .62); backdrop-filter: blur(3px); transition: opacity .3s, overlay .3s allow-discrete, display .3s allow-discrete; opacity: 1; }
.sheet:not([open])::backdrop { opacity: 0; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: -8px; padding: 8px 0; background: var(--raised); z-index: 1; }
.sheet-head h2 { font-size: 1.2rem; margin: 0; font-weight: 600; letter-spacing: -.01em; }

.search { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 50px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line-strong); color: var(--muted); margin: 8px 0 12px; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; background: transparent; border: 0; outline: 0; font-size: 1rem; color: var(--text); min-width: 0; }
.search input::placeholder { color: var(--faint); }

.results { list-style: none; margin: 0; padding: 0; }
.result { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.result-name { font-weight: 600; margin: 0; }
.result-sub { color: var(--muted); font-size: .8rem; margin: 0; }
.add-btn { min-width: 64px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgb(255 255 255 / .04); font-weight: 600; font-size: .82rem; transition: transform .15s var(--ease-out), background-color .2s, color .2s; }
.add-btn:active { transform: scale(.94); }
.add-btn[data-added] { background: rgb(34 225 198 / .12); border-color: rgb(34 225 198 / .45); color: var(--accent); }

.field { display: grid; gap: 6px; margin: 14px 0; }
.field > span { font-weight: 500; font-size: .88rem; color: var(--muted); }
.input, .select { min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--ground); border: 1px solid var(--line-strong); color: var(--text); font-size: 1rem; width: 100%; }
.input:focus, .select:focus { outline: 0; border-color: var(--accent); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgb(255 255 255 / .14); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgb(255 255 255 / .14); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ground); box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgb(34 225 198 / .5); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ground); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row output { font-weight: 600; min-width: 3.5ch; text-align: right; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.loves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.scale button, .loves button { min-height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--ground); font-weight: 500; font-size: .88rem; transition: transform .15s var(--ease-out), background-color .2s, border-color .2s; }
.scale button:active, .loves button:active { transform: scale(.95); }
.scale button[aria-pressed="true"], .loves button[aria-pressed="true"] { background: rgb(34 225 198 / .12); border-color: var(--accent); }
.hint { color: var(--faint); font-size: .8rem; margin: 2px 0 0; }

.bottle-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 4px 0 6px; }
.bottle-hero h2 { font-size: 1.4rem; font-weight: 600; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.bottle-hero p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.history { color: var(--muted); font-size: .85rem; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; }

.place-list { list-style: none; padding: 0; margin: 0; }
.place-list button { width: 100%; text-align: left; min-height: 52px; padding: 8px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); }
.place-list small { color: var(--muted); display: block; }
.wx-big { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 2px; }
.wx-big strong { font-weight: 300; font-size: 3.6rem; line-height: 1; letter-spacing: -.04em; }
.wx-big span { color: var(--muted); }

/* ---------- install hint ---------- */
.install {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 6px 10px 12px; margin: 0 0 12px; border-radius: 20px;
  background: rgb(20 26 29 / .75); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong); font-size: .84rem; line-height: 1.4;
}
.install img { width: 34px; height: 34px; border-radius: 9px; }
.install p { margin: 0; }
.install strong { display: block; font-weight: 600; }
.install span { color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); z-index: var(--z-toast);
  translate: -50% 12px; opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--ground); font-weight: 600; font-size: .88rem;
  box-shadow: var(--sh-3); white-space: nowrap;
  transition: opacity .2s var(--ease-in), translate .2s var(--ease-in);
}
.toast.show { opacity: 1; translate: -50% 0; transition: opacity .3s var(--ease-out), translate .35s var(--ease-out); }

/* ---------- short phones (iPhone SE and similar): tighten Today so it fits ---------- */
@media (max-height: 720px) and (orientation: portrait) {
  .stage { min-height: 150px; padding-bottom: 12px; }
  .info-name { font-size: clamp(2.2rem, 10vw, 2.6rem); margin-bottom: 8px; }
  .info-reason { margin-bottom: 10px; font-size: .95rem; }
  .tags { margin-bottom: 12px; }
  .tags .tag:not(.tag-fam) { display: none; }
  .dots { margin-top: 8px; }
}

/* ---------- phone on its side: bottle and plume left, the pick right ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --app-w: 780px; }
  .topbar, main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .today { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; column-gap: 28px; min-height: 0; }
  .today > .plans, .today > .install { grid-column: 1 / -1; }
  .stage { min-height: 190px; padding-bottom: 8px; }
  .info { align-self: end; padding-bottom: 8px; }
  .info-name { font-size: 2.3rem; margin-bottom: 8px; }
  .info-reason { margin-bottom: 10px; font-size: .95rem; }
  .tags { margin-bottom: 12px; }
  .dots { margin-top: 8px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* only ~390px of height: one row of plans, slim tab bar, no note tags */
  :root { --tabbar-h: 50px; }
  .topbar { padding-top: calc(env(safe-area-inset-top) + 6px); padding-bottom: 4px; }
  .plans { display: flex; align-items: center; gap: 10px; }
  .plans-top { margin: 0; flex: none; }
  .plans-label { display: none; }
  .plans .chips { flex: 1; min-width: 0; margin: 0; padding: 2px 0 4px; }
  .stage { min-height: 150px; }
  .tags .tag:not(.tag-fam) { display: none; }
  .tabbar { width: min(380px, calc(100% - 32px)); bottom: calc(env(safe-area-inset-bottom) + 8px); padding: 4px; }
  .tab { min-height: 40px; flex-direction: row; gap: 6px; font-size: .75rem; }
  .tab svg { width: 18px; height: 18px; }
  .badge { top: 2px; right: 8px; }
}

/* ---------- larger screens: the app stays phone-width, framed as a column ---------- */
@media (min-width: 960px) {
  body:not([data-screen="today"])::after {
    content: ""; position: fixed; top: 0; bottom: 0; left: 50%; width: var(--app-w); translate: -50% 0; z-index: -1;
    background: var(--ground); box-shadow: 0 0 0 1px var(--line), 0 0 120px rgb(2 8 8 / .7);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
