/* Light and minimal: warm white, near-black text, one deep green accent; dishes on white cards */
:root {
  --bg: #FAF9F6;
  --ink: #1C1C1C;
  --muted: #6E6E6A;
  --line: #ECEAE4;
  --card-line: #ECE9E2;
  --tile: #EFEDE6;
  --tile-ink: #8A877D;
  --accent: #18342A;
  --accent-soft: #E5EDE7;
  --field: #E3E0D8;
  --switch-off: #DEDBD2;
  --bad: #B42318;
}
* { box-sizing: border-box; }
/* manipulation: no double-tap zoom, so tapping "+" quickly adds dishes instead of zooming the page */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button, a, label, input, textarea { touch-action: manipulation; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.4 Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex: none; display: block; }
h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.loading { padding: 120px 16px; text-align: center; color: var(--muted); }
.page { padding-bottom: 112px; }

/* guest: header */
.top { display: flex; flex-direction: column; gap: 4px; padding: 14px 20px 16px; }
.top-row { display: flex; justify-content: space-between; align-items: center; margin-right: -8px; }
.date { font-size: 13px; color: var(--muted); }
.lang { display: flex; align-items: center; color: #CFCBC1; font-size: 13px; }
.lang button { height: 44px; min-width: 40px; padding: 0 6px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.sub { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.sub b { color: var(--ink); font-weight: 500; }
.manage { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 32px); height: 48px; margin: 0 16px 8px; padding: 0 14px 0 16px; border: 1px solid var(--card-line); border-radius: 16px; background: #FFFFFF; font-size: 15px; font-weight: 500; }

/* guest: tabs that follow the scroll */
.tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 22px; overflow-x: auto; padding: 0 20px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; height: 48px; color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tabs a[aria-current="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

/* guest: dish cards */
section { padding: 24px 16px 0; scroll-margin-top: 56px; }
h2 { margin: 0 4px 12px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
h2 span { font-weight: 400; color: var(--muted); }
.dish { display: flex; align-items: stretch; gap: 14px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--card-line); border-radius: 20px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(28, 28, 28, 0.04); }
.ph { position: relative; flex: none; width: 96px; min-height: 96px; border-radius: 14px; overflow: hidden; background: var(--tile); color: var(--tile-ink); display: flex; align-items: center; justify-content: center; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 500; }
.desc { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.price { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.left { display: block; font-size: 12px; color: var(--muted); }
.left.low { color: var(--bad); }
.ctl { flex: none; display: flex; }
.add { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 22px; background: var(--tile); }
.step { flex: none; display: flex; align-items: center; height: 44px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); }
.step button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: inherit; }
.step span { min-width: 14px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.note { margin: 0; padding: 24px 20px; font-size: 13px; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 96px 48px; text-align: center; }
.empty h2 { margin: 14px 0 0; font-size: 20px; line-height: 1.25; }
.empty p { margin: 0; font-size: 15px; color: var(--muted); }
.tile { width: 80px; height: 80px; border-radius: 24px; background: var(--tile); color: var(--tile-ink); display: flex; align-items: center; justify-content: center; }
.soft-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--tile); font-weight: 500; }

/* floating bar: cart for guests, "new dish" for staff */
.bar { position: fixed; left: 20px; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 3; }
.cartbar { width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 0 8px; border: 0; border-radius: 28px; background: var(--accent); color: #FFFFFF; box-shadow: 0 8px 24px rgba(24, 52, 42, 0.18); font-size: 15px; font-weight: 500; }
.cartbar.center { justify-content: center; gap: 8px; padding: 0 20px; }
.cb-left { display: flex; align-items: center; gap: 12px; }
.count { width: 40px; height: 40px; border-radius: 20px; background: rgba(255, 255, 255, 0.16); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.cartbar b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* cart shown at the counter */
.cart { min-height: 100vh; display: flex; flex-direction: column; padding: 12px 20px calc(32px + env(safe-area-inset-bottom)); }
.cart-top { display: flex; justify-content: space-between; align-items: center; margin: 0 -6px; }
.round { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 22px; background: var(--tile); }
.clear { height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 15px; }
.cart h1 { margin-top: 20px; font-size: 28px; }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.lines { flex: 1; margin-top: 12px; }
.line { display: flex; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .q { flex: none; min-width: 38px; font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.line .n { flex: 1; min-width: 0; font-size: 21px; line-height: 1.2; font-weight: 500; }
.line .s { flex: none; font-size: 17px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; border-top: 1px solid #D9D5CB; color: var(--muted); }
.total b { color: var(--ink); font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* staff: today's menu */
.back { height: 44px; display: inline-flex; align-items: center; gap: 4px; margin: 12px 0 0 12px; padding: 0 8px 0 2px; border: 0; background: transparent; font-size: 15px; font-weight: 500; }
.head { display: flex; flex-direction: column; gap: 4px; padding: 8px 20px 4px; }
.head h1 { font-size: 28px; }
.head .hint { margin: 0; font-size: 13px; }
.admin section { padding: 22px 20px 0; }
.admin h2 { margin: 0 0 4px; font-size: 17px; }
.item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; text-align: left; }
.thumb { position: relative; flex: none; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: var(--tile); color: var(--tile-ink); display: flex; align-items: center; justify-content: center; opacity: 0.5; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nm { font-weight: 500; line-height: 1.3; color: var(--muted); }
.pr { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item.on .thumb { opacity: 1; }
.item.on .nm { color: var(--ink); }
.portions { flex: none; width: 60px; height: 44px; padding: 0 6px; border: 1px solid var(--field); border-radius: 12px; background: #FFFFFF; font-size: 16px; /* under 16px iOS zooms in on focus */ text-align: center; font-variant-numeric: tabular-nums; }
.switch { flex: none; width: 52px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; }
.switch span { position: relative; display: block; width: 51px; height: 31px; border-radius: 16px; background: var(--switch-off); transition: background 0.2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); transition: left 0.2s; }
.switch[aria-checked="true"] span { background: var(--accent); }
.switch[aria-checked="true"] span::after { left: 22px; }

/* staff: dish form */
.form { display: flex; flex-direction: column; gap: 20px; padding: 2px 20px 40px; }
.form h1 { font-size: 28px; }
.photo { position: relative; height: 210px; border-radius: 24px; overflow: hidden; background: var(--tile); color: var(--tile-ink); display: flex; align-items: center; justify-content: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pill { position: absolute; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 14px; font-weight: 500; }
.photo input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sections { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--field); border-radius: 20px; background: #FFFFFF; font-size: 15px; font-weight: 500; cursor: pointer; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent); color: #FFFFFF; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field label i { font-style: normal; font-weight: 400; }
.field input, .field textarea { min-height: 52px; padding: 14px 16px; border: 1px solid var(--field); border-radius: 14px; background: #FFFFFF; font-size: 16px; }
.field textarea { resize: none; line-height: 1.4; }
.price-wrap { position: relative; width: 180px; }
.price-wrap input { width: 100%; padding-right: 40px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-wrap span { position: absolute; right: 16px; top: 15px; font-size: 17px; color: var(--muted); }
.small { margin: -12px 0 0; font-size: 13px; color: var(--muted); }
.save { height: 56px; margin-top: 8px; border: 0; border-radius: 28px; background: var(--accent); color: #FFFFFF; font-size: 15px; font-weight: 500; }
.save:disabled { opacity: 0.6; }
.danger { height: 44px; margin-top: -14px; border: 0; background: transparent; color: var(--bad); font-size: 15px; }

/* guest: "Беру" and the order screen */
.manage.mine { border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.min { font-weight: 400; color: var(--muted); }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.go { height: 56px; border: 0; border-radius: 28px; background: var(--accent); color: #FFFFFF; font-size: 16px; font-weight: 600; box-shadow: 0 8px 24px rgba(24, 52, 42, 0.18); }
.go:disabled { opacity: 0.5; box-shadow: none; }
.go.danger-fill { background: var(--bad); box-shadow: none; }
.ghost { height: 48px; border: 0; background: transparent; color: var(--muted); font-size: 15px; }
.clock { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.clock i { width: 8px; height: 8px; border-radius: 4px; background: #2F9E5B; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .clock i { animation: none; } }
.num { align-self: flex-start; margin: 18px 0 0; padding: 6px 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 600; }
.order h1 { margin-top: 14px; }
.pay { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; padding: 18px 20px; border-radius: 20px; background: var(--accent); color: #FFFFFF; }
.pay span { font-size: 16px; color: #CFE3D6; }
.pay b { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.edit-btn { margin-top: 14px; height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #D9D5CB; border-radius: 25px; background: #FFFFFF; font-size: 15px; font-weight: 500; }
.till { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* staff: tabs, orders, totals */
.admin-h1 { padding: 8px 20px 10px; font-size: 28px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.head { padding-top: 16px; }
.orows { padding: 0 20px; }
.orow { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.orow.off { color: var(--muted); }
.orow.off .onum { text-decoration: line-through; }
.onum { flex: none; width: 46px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.otext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oname { font-size: 15px; font-weight: 500; }
.ometa { font-size: 13px; color: var(--muted); }
.ostate { flex: none; padding-top: 8px; font-size: 13px; }
.cancel-btn { flex: none; height: 36px; padding: 0 12px; border: 1px solid var(--field); border-radius: 18px; background: #FFFFFF; color: var(--bad); font-size: 13px; }
.stats { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 40px; }
.stats h2 { margin: 12px 0 0; font-size: 17px; }
.seg { display: flex; padding: 3px; border-radius: 14px; background: var(--tile); }
.seg button { flex: 1; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.scards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 18px; background: #FFFFFF; }
.scard span { font-size: 13px; color: var(--muted); }
.scard b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trow { display: flex; align-items: center; gap: 12px; }
.trow div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 15px; }
.trow i { height: 6px; border-radius: 3px; background: var(--accent); }
.trow b, .hrow b { flex: none; min-width: 28px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.hrow { display: flex; align-items: center; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.hrow span { flex: none; width: 46px; color: var(--muted); }
.hrow i { flex: none; height: 14px; max-width: calc(100% - 100px); border-radius: 4px; background: #CFDCD3; }
.hrow i.peak { background: var(--accent); }
