@font-face {
  font-family: 'Golos Text';
  src: url('/fonts/golos-text-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Golos Text';
  src: url('/fonts/golos-text-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-cyrillic-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #f5f5ed;
  --paper: #fffefa;
  --ink: #193c32;
  --on-ink: #f9fff0;
  --muted: #5f6b60;
  --line: #e1e5d9;
  --line-strong: #cfd7c4;
  --soft: #e9eddf;
  --lime: #d4ee94;
  --on-lime: #193c32;
  --lime-muted: #4c5e3b;
  --warn: #b24a24;
  --warn-bg: #fbe9dd;
  --accent: #557a2c;
  --fat: #d49a65;
  --carb: #a3aa6f;
  --protein: #69835f;
  --shadow: 0 10px 22px -16px rgba(38, 60, 37, 0.45);
  --sans: 'Golos Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --nav-h: 72px;
  --rail: 216px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1e19;
    --paper: #182b24;
    --ink: #eaf3de;
    --on-ink: #12241e;
    --muted: #a3b5a8;
    --line: #2a4036;
    --line-strong: #3b5448;
    --soft: #223a31;
    --warn: #f0a07c;
    --warn-bg: #3a2a20;
    --accent: #c3e283;
    --shadow: 0 10px 22px -16px rgba(0, 0, 0, 0.8);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

:focus-visible { outline: 3px solid #8ba951; outline-offset: 3px; }

#app {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Icons and brand */

.ico {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

.ico-camera { --i: url('/icons/camera.svg'); }
.ico-spark { --i: url('/icons/spark.svg'); }
.ico-text { --i: url('/icons/text.svg'); }
.ico-today { --i: url('/icons/today.svg'); }
.ico-progress { --i: url('/icons/progress.svg'); }
.ico-user { --i: url('/icons/user.svg'); }
.ico-up { --i: url('/icons/up.svg'); }
.ico-check { --i: url('/icons/check.svg'); }
.ico-receipt { --i: url('/icons/receipt.svg'); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 25px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.045em;
}

.brand-mark {
  flex: none;
  width: 23px;
  height: 29px;
  background: currentColor;
  -webkit-mask: url('/img/mark.svg') center / contain no-repeat;
  mask: url('/img/mark.svg') center / contain no-repeat;
}

.brand.global { font-size: 20px; letter-spacing: -0.03em; }

.nav-brand { display: none; }

/* Page furniture */

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }

.pill {
  font: 12px/1 var(--mono);
  color: var(--muted);
  background: var(--soft);
  border-radius: 8px;
  padding: 7px 9px;
  white-space: nowrap;
}

.eyebrow, .section-title {
  font: 11px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.notice { font-size: 14px; background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; }

.page { display: flex; flex-direction: column; gap: 18px; }

.footer-line {
  margin-top: 6px;
  text-align: center;
  font: 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }

.small-text { font-size: 14px; }

.center { text-align: center; }

/* Buttons */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: transform 0.08s ease, opacity 0.2s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled { opacity: 0.45; cursor: default; }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }

.btn.small { min-height: 46px; padding: 9px 12px; font-size: 15px; }

.btn .grow { flex: 1; text-align: left; }

.link {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link.danger { color: var(--warn); }

.row { display: flex; gap: 10px; }

.row > * { flex: 1; min-width: 0; }

.actions { display: flex; flex-direction: column; gap: 10px; }

/* Scan card */

.scan-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 216px;
  padding: 20px;
  border-radius: 4px 22px 22px 22px;
  background: var(--lime);
  color: var(--on-lime);
}

.scan-card .eyebrow { position: relative; z-index: 1; color: var(--lime-muted); max-width: 62%; font-size: 10px; }

.scan-card h1, .scan-card h2 {
  position: relative;
  z-index: 1;
  max-width: 62%;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.scan-card .btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: var(--on-lime);
  border-color: var(--on-lime);
  color: #f9fff0;
}

.plate {
  position: absolute;
  top: 6px;
  right: -26px;
  width: 162px;
  height: 162px;
  transform: rotate(-13deg);
}

/* First visit */

.hero { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }

.hero-title { font-size: clamp(38px, 11.5vw, 48px); line-height: 1.22; letter-spacing: -0.035em; font-weight: 600; }

.hero-title em {
  font-style: normal;
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 8px;
  padding: 0 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero p { color: var(--muted); }

.hero .fine { font-size: 13px; text-align: center; }

/* Receipt */

.receipt {
  position: relative;
  background: var(--paper);
  padding: 20px 20px 24px;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  filter: drop-shadow(0 8px 10px rgba(38, 60, 37, 0.08));
}

.receipt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 10px;
  background:
    linear-gradient(135deg, var(--paper) 7px, transparent 0) 0 0 / 14px 14px repeat-x,
    linear-gradient(225deg, var(--paper) 7px, transparent 0) 0 0 / 14px 14px repeat-x;
}

.receipt .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt .head .ico { width: 16px; height: 16px; }

.receipt h2, .receipt h3 { font: 600 20px/1.25 var(--sans); letter-spacing: -0.02em; margin: 10px 0 2px; }

.rule { border: 0; border-top: 1px dashed var(--line-strong); margin: 14px 0; }

.line { display: flex; align-items: baseline; gap: 6px; }

.name { overflow-wrap: anywhere; }

.dots { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }

.val { white-space: nowrap; font-variant-numeric: tabular-nums; }

.total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 16px; font-weight: 600; }

.total b { font: 500 34px/1.05 var(--sans); letter-spacing: -0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }

.range { text-align: right; color: var(--muted); font-size: 13px; }

.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.macro-label { display: flex; align-items: center; gap: 6px; font: 13px/1.3 var(--sans); color: var(--muted); }

.macro-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--protein); }

.macro.fat .macro-label i { background: var(--fat); }

.macro.carbs .macro-label i { background: var(--carb); }

.macro b { display: block; margin-top: 6px; font: 600 15px/1.2 var(--mono); white-space: nowrap; }

.macro small { font-size: 12px; font-weight: 400; color: var(--muted); }

.mark {
  display: inline-block;
  transform: rotate(-2deg);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  padding: 3px 8px;
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Today */

.summary { padding-bottom: 22px; }

.big {
  margin-top: 12px;
  font: 500 clamp(64px, 21vw, 84px)/1 var(--sans);
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.big small { margin-left: 7px; font-size: 16px; font-weight: 450; letter-spacing: -0.01em; }

.big.over { color: var(--warn); }

.summary .cap { margin-top: 6px; font: 15px/1.3 var(--sans); color: var(--muted); }

.meter { height: 7px; margin: 16px 0 9px; border-radius: 3px; background: var(--soft); overflow: hidden; }

.meter i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.4s ease; }

.meter.over i { background: var(--warn); }

.summary .setup { margin-top: 12px; font-family: var(--sans); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.quick button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
}

.quick .ico { width: 20px; height: 20px; }

.quick small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }

.section-head { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }

.list { display: flex; flex-direction: column; gap: 8px; }

.meal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  text-align: left;
}

.meal-text { flex: 1; min-width: 0; }

.meal-title { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }

.meal-sub { display: block; margin-top: 3px; font: 12px/1.3 var(--mono); color: var(--muted); }

.meal-kcal { flex: none; text-align: right; font: 600 18px/1.1 var(--mono); }

.meal-kcal small { display: block; margin-top: 3px; font: 12px/1 var(--sans); color: var(--muted); }

.empty { color: var(--muted); font-size: 15px; }

/* Bottom navigation */

nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 5;
  transform: translateX(-50%);
  width: min(100%, 480px);
  display: flex;
  gap: 6px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}

nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 12px;
}

nav button[aria-current='page'] { background: var(--soft); color: var(--ink); font-weight: 600; }

/* Sheets */

dialog {
  width: min(100%, 480px);
  max-width: 100%;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  color: var(--ink);
  overflow: auto;
}

dialog[open] { animation: rise 0.22s ease-out; }

dialog::backdrop { background: rgba(20, 44, 35, 0.5); }

@keyframes rise { from { transform: translateY(36px); opacity: 0.6; } }

.sheet-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.sheet-head h2 { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }

.close {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border: 0;
  border-radius: 10px;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
}

.photo-preview { display: block; width: 100%; max-height: 38dvh; object-fit: cover; border-radius: 12px; }

/* Forms */

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }

input[type='number'], input[type='email'], input[type='text'], input[type='password'], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

textarea { min-height: 96px; resize: vertical; }

::placeholder { color: var(--muted); opacity: 0.8; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); }

.seg button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: 600 15px/1 var(--mono);
}

.seg button[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  font-size: 15px;
  text-align: left;
}

.chips button[aria-pressed='true'] { border-color: var(--ink); background: var(--lime); color: var(--on-lime); font-weight: 600; }

.plans { display: flex; flex-direction: column; gap: 10px; }

.plan {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  text-align: left;
}

.plan[aria-pressed='true'] { border: 2px solid var(--ink); padding: 11.5px 13.5px; }

.plan b { display: block; font-size: 17px; font-weight: 600; }

.plan small { color: var(--muted); font-size: 13px; }

.plan .price { font: 600 18px/1.1 var(--mono); white-space: nowrap; text-align: right; }

.badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 5px;
  padding: 2px 7px;
  font: 600 11px/1.4 var(--mono);
  text-transform: uppercase;
}

.perks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }

.perks li { display: flex; align-items: center; gap: 8px; }

.perks .ico { width: 16px; height: 16px; color: var(--accent); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }

.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }

/* Printing state */

.printing { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 34px 20px 44px; }

.printer { width: 150px; height: 112px; overflow: hidden; position: relative; border-top: 6px solid var(--ink); border-radius: 3px; }

.printer div {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 200px;
  background: repeating-linear-gradient(var(--paper) 0 12px, var(--line-strong) 12px 14px);
  animation: print 1.6s linear infinite;
}

@keyframes print { from { transform: translateY(-200px); } to { transform: translateY(0); } }

/* Progress and profile */

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.card h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }

.card.plan-card { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }

.card.plan-card .muted { color: var(--lime-muted); }

.card.plan-card .btn { background: var(--on-lime); border-color: var(--on-lime); color: #f9fff0; }

.card.plan-card .btn.ghost { background: transparent; color: var(--on-lime); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.stats div { padding: 14px 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }

.stats div:first-child { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }

.stats b { display: block; font: 500 26px/1.1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.stats span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.25; color: var(--muted); }

.stats div:first-child span { color: var(--lime-muted); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 150px; }

.week .col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }

.week .bar-v { width: 100%; max-width: 26px; min-height: 2px; background: var(--ink); border-radius: 5px 5px 1px 1px; }

.week .bar-v.over { background: var(--warn); }

.week .bar-v.none { background: var(--line-strong); }

.week span { font: 11px/1 var(--mono); color: var(--muted); }

.weights { display: flex; flex-direction: column; font-family: var(--mono); font-size: 14px; }

/* Demo payment page */

.demo-pay { display: grid; place-items: center; min-height: 100dvh; padding: 16px; }

.demo-pay main { width: min(100%, 380px); display: flex; flex-direction: column; gap: 12px; font-family: var(--sans); }

.demo-sum { font: 600 32px/1.2 var(--mono); text-align: center; }

/* Toast */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  z-index: 10;
  transform: translateX(-50%);
  width: min(calc(100% - 40px), 440px);
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 15px;
  box-shadow: var(--shadow);
}

/* Legal and admin pages */

.doc { max-width: 680px; margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 12px; }

.doc h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }

.doc h2 { font-size: 18px; font-weight: 600; margin-top: 10px; }

.table-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font: 14px/1.4 var(--mono); }

th, td { padding: 8px 10px; border-bottom: 1px dashed var(--line-strong); text-align: right; white-space: nowrap; }

th:first-child, td:first-child { text-align: left; }

/* Installed app */

html { overscroll-behavior-y: none; }

button, a { touch-action: manipulation; }

nav, .btn, .quick, .seg, .chips, .meal-row { -webkit-user-select: none; user-select: none; }

.boot { flex: 1; display: grid; place-items: center; min-height: 70dvh; color: var(--ink); }

.boot .brand-mark { width: 46px; height: 58px; animation: breathe 1.2s ease-in-out infinite alternate; }

@keyframes breathe { from { opacity: 0.35; } to { opacity: 1; } }

.view-enter { animation: enter 0.22s ease-out; }

@keyframes enter { from { opacity: 0.2; transform: translateY(6px); } }

.install-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.install-card img { border-radius: 11px; }

.install-card h2 { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

.install-card p { margin-top: 3px; font-size: 14px; line-height: 1.3; color: var(--muted); }

.install-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }

.install-actions .btn { flex: 1; }

.install-actions .link { flex: none; padding: 8px 4px; }

.steps { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0 0 0 22px; }

.steps li { padding-left: 4px; }

.steps li::marker { font: 600 15px var(--mono); color: var(--accent); }

@media (display-mode: standalone) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

  input, textarea, .receipt { -webkit-user-select: text; user-select: text; }
}

/* Larger screens */

@media (min-width: 640px) {
  dialog { margin: auto; border-radius: 22px; }
}

@media (min-width: 960px) {
  #app {
    max-width: calc(var(--rail) + 960px);
    margin: 0;
    padding: 32px 44px 40px calc(var(--rail) + 44px);
  }

  nav {
    top: 0;
    left: 0;
    bottom: 0;
    transform: none;
    width: var(--rail);
    height: auto;
    flex-direction: column;
    gap: 8px;
    padding: 30px 18px;
    background: #193c32;
    border: 0;
  }

  .nav-brand { display: flex; margin: 0 8px 34px; color: #f5f5e9; }

  .top .brand { display: none; }

  .top { justify-content: flex-end; }

  nav button {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 50px;
    padding: 12px 14px;
    color: #b9cbbd;
    font-size: 15px;
  }

  nav button[aria-current='page'] { background: #d4ee94; color: #193c32; }

  .page-today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

  .page-today > .span { grid-column: 1 / -1; }

  .page-today > .scan-card { min-height: 100%; }

  .scan-card { min-height: 282px; padding: 24px; }

  .scan-card h1, .scan-card h2 { font-size: 30px; max-width: 58%; }

  .plate { top: 16px; width: 192px; height: 192px; right: -22px; }

  .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 36px; align-items: start; }

  .hero > * { grid-column: 1; }

  .hero > .receipt { grid-column: 2; grid-row: 1 / span 6; margin-top: 8px; }

  .page-narrow { max-width: 640px; }

  #toast { left: calc(50% + var(--rail) / 2); bottom: 24px; }
}

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