:root {
  --bg: #F6F2EC;
  --surface: #FFFFFF;
  --surface-2: #F1ECE5;
  --text: #1F1B17;
  --muted: #80776E;
  --border: #EAE3DA;
  --accent: #EE5D2F;
  --accent-ink: #FFFFFF;
  --accent-soft: #FFE6DB;
  --ok: #2B9A66;
  --warn: #D99A00;
  --over: #E0453F;
  --protein: #5677F0;
  --carbs: #E9A72C;
  --fat: #DD5E93;
  --water: #3A9FE0;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 6px 20px rgba(60, 40, 20, .06);
  --radius: 20px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0E0D;
    --surface: #1B1917;
    --surface-2: #26231F;
    --text: #F5F0EA;
    --muted: #A0978D;
    --border: #2D2925;
    --accent: #FF7449;
    --accent-soft: #3A2318;
    --ok: #3CC584;
    --over: #FF6A62;
    --protein: #7B95FF;
    --carbs: #F4BD4D;
    --fat: #F07DAE;
    --water: #5CB6F2;
    --shadow: none;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
input, textarea, select { font-size: 16px; } /* ≥16px stops iOS from zooming on focus */
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.ico { width: 22px; height: 22px; flex: none; }
.ico.inline { width: 16px; height: 16px; vertical-align: -3px; }

#app { max-width: 560px; margin: 0 auto; }
.screen { padding: calc(var(--safe-t) + 8px) 16px calc(var(--tabbar-h) + var(--safe-b) + 28px); display: flex; flex-direction: column; gap: 12px; }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
@media (prefers-color-scheme: light) { .card { border-color: transparent; } }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title-row .card-title { margin: 0; }

.screen-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-top: 4px; }
.screen-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 15px; font-weight: 650; background: var(--surface-2); transition: transform .12s, opacity .12s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger-ghost { background: transparent; color: var(--over); }
.btn.small { min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: 14px; }
.btn.small .ico { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.link { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }
.link.strong { font-weight: 750; }
.block-center { display: block; margin: 8px auto 0; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--text); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small .ico { width: 16px; height: 16px; }
.icon-btn.danger { color: var(--muted); }

/* fields */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 13px; }
.field input, .field select, .filter, .compose textarea, .chat-input textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2); outline: none; appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, textarea:focus, .filter:focus { border-color: var(--accent); }
.field input[type=date] { min-height: 48px; }
.big-input { font-size: 28px !important; font-weight: 700; text-align: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* segmented */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; }
.seg label, .seg button { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg button { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border-radius: 11px; font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; }
.seg input:checked + span, .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg-sm button { min-height: 32px; font-size: 14px; }
.seg-scroll { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll button { flex: none; }

/* tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 8px var(--safe-b);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--border);
}
@media (min-width: 600px) { .tabbar { max-width: 560px; margin: 0 auto; border-radius: 24px 24px 0 0; } }
body.typing .tabbar { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; padding-top: 4px; }
.tab.active { color: var(--accent); }
.fab { justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .12s; }
.fab:active { transform: scale(.94); }
.fab .ico { width: 28px; height: 28px; stroke-width: 2.6; }

/* day bar */
.daybar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.day-title { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 2px 16px; }
.day-title span { font-size: 20px; font-weight: 800; text-transform: capitalize; }
.day-title small { color: var(--muted); font-size: 13px; }
.day-title input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }

/* summary */
.summary-main { display: flex; align-items: center; gap: 18px; }
.ring-wrap { position: relative; width: 138px; height: 138px; flex: none; }
.ring { width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 12; }
.ring-track { stroke: var(--surface-2); }
.ring-fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.ring.over .ring-fill { stroke: var(--over); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center b { font: 800 30px/1 ui-rounded, -apple-system, system-ui, sans-serif; letter-spacing: -.02em; }
.ring-center span { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 3px; }
.summary-stats { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.summary-stats div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 7px; }
.summary-stats div:last-child { border: 0; padding: 0; }
.summary-stats span { color: var(--muted); font-size: 14px; }
.summary-stats b { font-size: 17px; }
.summary.loading .ring-center b, .summary.loading .summary-stats b { opacity: .35; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.macro-top { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.macro-top span { font-size: 12px; font-weight: 650; color: var(--muted); }
.macro-top b { font-size: 15px; }
.macro-top small { color: var(--muted); font-weight: 500; font-size: 12px; }
.bar { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; transition: width .5s; }
.macro-protein .bar i { background: var(--protein); }
.macro-carbs .bar i { background: var(--carbs); }
.macro-fat .bar i { background: var(--fat); }

/* water */
.water-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-weight: 650; }
.water-head b { font-size: 14px; color: var(--muted); font-weight: 600; }
.glasses { display: flex; gap: 6px; }
.glass { flex: 1; max-width: 44px; height: 40px; border-radius: 6px 6px 10px 10px; border: 2px solid color-mix(in srgb, var(--water) 45%, transparent); position: relative; overflow: hidden; }
.glass i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--water); transition: height .25s; }
.glass.full i { height: 100%; }

/* meals */
.meal { padding: 14px 14px 8px; }
.meal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.meal-ico { font-size: 22px; }
.meal-head h3 { font-size: 17px; font-weight: 700; flex: 1; }
.meal-kcal { color: var(--muted); font-weight: 600; font-size: 14px; }
.add-mini { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.add-mini .ico { width: 18px; height: 18px; stroke-width: 2.6; }
.add-mini.done { background: var(--ok); color: #fff; }
.meal-empty { color: var(--muted); font-size: 14px; padding: 4px 0 8px 32px; }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 0; text-align: left; border-top: 1px solid var(--border); }
.entries li:first-child .entry { border-top: 0; }
.thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.thumb.ph { display: grid; place-items: center; font-size: 20px; }
.entry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-text small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-kcal { font-weight: 700; font-size: 15px; }
.meal-empty-ex { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; text-align: left; padding: 14px 16px; }
.meal-empty-ex span { flex: 1; }
.meal-empty-ex .ico { color: var(--accent); }

.install { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-color: transparent; }
.install > div { flex: 1; }
.install p { font-size: 14px; margin-top: 2px; }

/* bottom sheet */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .38); animation: fade .2s; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  max-height: calc(100dvh - var(--safe-t) - 24px); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 40px rgba(0, 0, 0, .2);
}
.sheet.opening { animation: up .28s cubic-bezier(.2, .8, .2, 1); }
.sheet.closing { animation: down .22s ease-in forwards; }
.backdrop.closing { animation: fade .22s reverse forwards; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 16px 4px; position: relative; }
.sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--border); }
.sheet-head h2 { font-size: 17px; font-weight: 700; text-align: center; padding-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head > :last-child { justify-self: end; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px calc(var(--safe-b) + 20px); display: flex; flex-direction: column; gap: 12px; }
.sheet-body > * { flex-shrink: 0; }
.sheet-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(var(--safe-b) + 12px); border-top: 1px solid var(--border); background: var(--surface); }
.sheet-foot .btn { flex: none; }
.foot-total { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.foot-total b { font-size: 20px; font-weight: 800; }
.foot-total small { color: var(--muted); font-size: 13px; }

.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); font-weight: 650; overflow: hidden; }
.pick-tile.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pick-tile .ico { width: 30px; height: 30px; }
.pick-tile input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.compose { display: flex; flex-direction: column; gap: 10px; }
.compose textarea { resize: none; min-height: 92px; line-height: 1.4; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.recent { list-style: none; margin: 0; padding: 0 14px; background: var(--surface); border-radius: 18px; border: 1px solid var(--border); }
.recent li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.recent li:first-child { border-top: 0; }
.callout { background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; }

.analyzing { align-items: center; justify-content: center; min-height: 340px; text-align: center; font-weight: 600; }
.scan { position: relative; width: 220px; height: 220px; border-radius: 24px; overflow: hidden; }
.scan img { width: 100%; height: 100%; object-fit: cover; }
.scan i { position: absolute; left: 0; right: 0; height: 60px; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 55%, transparent), transparent); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: -60px; } to { top: 100%; } }
.big-emoji { font-size: 56px; }
.pulse { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.15); opacity: .7; } }

.review-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 18px; }
.item-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.item-top, .item-row { display: flex; align-items: center; gap: 8px; }
.item-card input { min-width: 0; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 6px 8px; outline: none; }
.item-card input:focus { border-color: var(--accent); background: var(--surface-2); }
.item-name { flex: 1; font-weight: 700; font-size: 17px !important; }
.item-portion { flex: 1; color: var(--muted); font-size: 15px; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 12px; flex: none; }
.stepper button { width: 36px; height: 36px; font-size: 20px; font-weight: 600; color: var(--accent); }
.stepper span { min-width: 44px; text-align: center; font-weight: 700; font-size: 15px; }
.nutri { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 6px; }
.nutri-ex { grid-template-columns: 1fr; }
.nutri label { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 12px; padding: 6px 4px 2px; text-align: center; min-width: 0; }
.nutri label span { font-size: 11px; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nutri input { text-align: center; font-weight: 700; padding: 4px 2px !important; width: 100%; }
.n-p span { color: var(--protein) !important; }
.n-c span { color: var(--carbs) !important; }
.n-f span { color: var(--fat) !important; }
.conf { align-self: flex-start; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.conf-low { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpis.two { grid-template-columns: 1fr 1fr; }
.kpis div { display: flex; flex-direction: column; }
.kpis span { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpis b { font: 800 24px/1.15 ui-rounded, -apple-system, system-ui, sans-serif; }
.kpis b small { font-size: 15px; color: var(--muted); }
.kpis > div > small { color: var(--muted); font-size: 12px; }
.kpis b.up { color: var(--over); }
.kpis b.down { color: var(--ok); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 10px; font-weight: 600; }
.chart .b.ok { fill: var(--ok); }
.chart .b.over { fill: var(--over); }
.chart .target-line { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .45; }
.weight-chart polyline { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.weight-chart circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.split i.p { background: var(--protein); } .split i.c { background: var(--carbs); } .split i.f { background: var(--fat); }
.split-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 14px; }
.split-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.split-legend .p::before { background: var(--protein); } .split-legend .c::before { background: var(--carbs); } .split-legend .f::before { background: var(--fat); }
.split-legend small { color: var(--muted); }
.weigh-ins { list-style: none; margin: 12px 0 0; padding: 0; }
.weigh-ins li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 15px; }
.weigh-ins span { flex: 1; color: var(--muted); }
.skeleton { height: 180px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* coach */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.45; }
.bubble p + p, .bubble ul + p, .bubble p + ul { margin-top: 6px; }
.bubble ul { margin: 4px 0; padding-left: 20px; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.typing { display: flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; text-align: left; }
.chat-input { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); display: flex; gap: 8px; align-items: flex-end; padding: 8px; margin: 0 -8px; background: var(--bg); border-radius: 22px; }
body.typing .chat-input { bottom: 8px; }
.chat-input textarea { flex: 1; resize: none; min-height: 46px; max-height: 140px; border-radius: 23px; padding: 12px 16px; background: var(--surface); }
.send { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.screen-coach { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); min-height: 100dvh; }
.screen-coach .chat { flex: 1; }

/* profile */
.sticky-save { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); z-index: 5; }
body.typing .sticky-save { bottom: 10px; }

/* auth & onboarding */
.auth, .onboarding { max-width: 420px; margin: 0 auto; padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; gap: 16px; min-height: 100dvh; }
.auth { justify-content: center; }
.auth-lang { display: flex; justify-content: flex-end; }
.auth-lang .seg { width: auto; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.auth-logo img { border-radius: 22px; box-shadow: 0 8px 24px rgba(238, 93, 47, .3); }
.auth-logo h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.auth-logo p { color: var(--muted); }
.auth-logo.small img { border-radius: 16px; }
.auth-card .field:last-of-type { margin-bottom: 18px; }
.auth-switch { text-align: center; color: var(--muted); }
.onboarding h1 { font-size: 26px; font-weight: 800; text-align: center; }
.onboarding > p { text-align: center; }

.center-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }

#toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); z-index: 60; transform: translate(-50%, -150%);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 15px; box-shadow: 0 8px 30px rgba(0, 0, 0, .2); transition: transform .3s cubic-bezier(.2, .8, .2, 1); pointer-events: none;
}
#toast.show { transform: translate(-50%, 0); }

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