@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/material-symbols.woff2) format('woff2');
}
/* Цвета из печатного меню и Android-приложения: красные ценники, тёмное дерево, золото. */
:root {
  --primary: #D32F2F; --on-primary: #fff; --primary-c: #FFDAD6; --tonal: #F6DFD7; --on-tonal: #3B1F17;
  --bg: #FFF8F4; --surface: #FCF2EC; --surface-c: #F3E6DE; --text: #231917; --muted: #6F5B55; --outline: #CDB8B1;
  --error: #BA1A1A; --gold: #9A6B1F; --gold-c: #FFE3B8; --wood: #1F1511; --wood2: #3A281E; --brand-gold: #E2B878; --coral: #F08A6C;
  --radius: 16px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { opacity: .5; cursor: default; }
input, textarea { font: inherit; color: inherit; width: 100%; padding: 12px 14px; border: 1px solid var(--outline); border-radius: 10px; background: #fff; }
input:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
textarea { resize: vertical; }
hr { border: 0; border-top: 1px solid var(--outline); margin: 4px 0; width: 100%; }
.h2 { font-size: 22px; margin: 18px 0 8px; line-height: 1.25; }
.h3 { font-size: 17px; margin: 10px 0 0; font-weight: 600; }

.ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; vertical-align: middle; }
.small-ic { font-size: 16px; }
.accent { color: var(--primary); }
.quiet { color: var(--muted); }
.small { font-size: 13px; }
.gold { color: var(--gold); margin: 0; }
.error { color: var(--error); margin: 0; }

/* ---------- каркас ---------- */
#splash { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  background: var(--wood); color: var(--brand-gold); z-index: 100; transition: opacity .35s; }
#splash.hide { opacity: 0; pointer-events: none; }
#splash img { width: 120px; height: 120px; border-radius: 28px; animation: pulse 1.2s ease-in-out infinite; }
#splash b { font-size: 22px; }
@keyframes pulse { 50% { transform: scale(.92); } }

.app { max-width: 640px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
.app.has-tabs { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 4px; min-height: 60px;
  padding: calc(6px + var(--safe-t)) 8px 6px 16px; background: var(--bg); }
.topbar h1 { font-size: 22px; font-weight: 500; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .icon-btn:first-child { margin-left: -8px; }
.topbar .actions { display: flex; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn:active { background: rgba(0,0,0,.08); }
.content { padding: 4px 16px 24px; }
.content.with-bottom { padding-bottom: 110px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.gap { gap: 8px; }
.grow { flex: 1; min-width: 0; }
.left { text-align: left; }
.center { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 12px; }
.message p { color: var(--muted); max-width: 360px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--primary-c); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; z-index: 20;
  display: flex; background: var(--surface-c); padding-bottom: var(--safe-b); height: calc(var(--tab-h) + var(--safe-b)); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--muted); }
.tabbar .tab-ic { width: 60px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; position: relative; }
.tabbar .on { color: var(--text); font-weight: 600; }
.tabbar .on .tab-ic { background: var(--tonal); }
.tab-badge { position: absolute; top: -2px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--primary); color: #fff; font: 600 11px/18px system-ui, sans-serif; font-style: normal; }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 22px; background: var(--primary); color: var(--on-primary); font-weight: 600; text-align: center; }
.btn.big { min-height: 56px; border-radius: 18px; font-size: 17px; }
.btn.wide { width: 100%; }
.btn.tonal { background: var(--tonal); color: var(--on-tonal); }
.btn.outline { background: none; color: var(--primary); border: 1px solid var(--outline); }
.btn.text { background: none; color: var(--primary); padding: 0 12px; }
.btn.text.quiet { color: var(--muted); font-weight: 500; }
.btn.danger, .danger { color: var(--error); }
.btn.add { min-height: 38px; padding: 0 14px 0 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.field input, .field textarea { font-size: 16px; color: var(--text); }
.field.bad input, .field.bad textarea { border-color: var(--error); outline-color: var(--error); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips.sticky { position: sticky; top: calc(60px + var(--safe-t)); z-index: 9; background: var(--bg); padding: 4px 16px 8px; }
.chip { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 10px; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--tonal); border-color: transparent; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper b { min-width: 28px; text-align: center; }
.step { width: 34px; height: 34px; border-radius: 50%; background: var(--tonal); display: inline-flex; align-items: center; justify-content: center; }
.step .ms { font-size: 20px; }
.switch { position: relative; display: inline-block; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--surface-c); border: 2px solid var(--outline); transition: .2s; }
.switch span::after { content: ''; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--outline); transition: .2s; }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { left: 24px; background: #fff; }

/* ---------- карточки ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.card.hot { background: var(--surface-c); }
.card.promo { flex-direction: row; align-items: center; gap: 12px; background: var(--gold-c); color: #2A1800; }
.card.note { flex-direction: row; gap: 12px; background: var(--tonal); font-size: 14px; margin-top: 16px; }
.label { font-size: 13px; color: var(--muted); }
.photo { width: 128px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--wood); flex: none; }
.photo.small { width: 72px; height: 40px; border-radius: 10px; }
.photo.ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gold-c), var(--primary-c)); color: var(--primary); }
.cat { scroll-margin-top: calc(110px + var(--safe-t)); }
.btn.grow { white-space: nowrap; }
.product { margin: 10px 0 0; }
.product-top { display: flex; gap: 12px; }
.product .name { font-size: 17px; }
.desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.size { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.size .row { gap: 6px; }
.cartbar { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + var(--safe-b));
  background: #FBEBE6; box-shadow: 0 -4px 12px rgba(0,0,0,.08); }
.has-tabs .cartbar { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 12px; }
.cartbar .sum { font-size: 22px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--outline); }
.sumrow { display: flex; justify-content: space-between; font-size: 14px; }
.sumrow.total { font-size: 17px; color: var(--text); padding-top: 4px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.consent input { width: 22px; height: 22px; padding: 0; margin-top: 1px; accent-color: var(--primary); flex: none; }
.consent.bad input { outline: 2px solid var(--error); }
.consent a { text-decoration: underline; }
.badge { flex: none; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.st-new { background: var(--primary); color: #fff; }
.st-cooking { background: var(--gold-c); color: #2A1800; }
.st-on_way { background: var(--primary-c); color: #410001; }
.st-done { background: #F3DED3; color: #2B160D; }
.st-cancelled { background: var(--surface-c); color: var(--muted); }
.admin-row { flex-direction: row; }
.admin-row.off > button { opacity: .5; }
.fab { position: fixed; right: max(16px, calc(50% - 304px)); bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 12;
  display: inline-flex; align-items: center; gap: 6px; height: 56px; padding: 0 20px; border-radius: 16px;
  background: var(--tonal); color: var(--on-tonal); font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.18); }

/* ---------- главная ---------- */
.hero { background: linear-gradient(var(--wood), var(--wood2)); color: #fff; border-radius: 0 0 32px 32px;
  padding: calc(24px + var(--safe-t)) 24px 26px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.hero-logo { width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--brand-gold); display: flex; align-items: center; justify-content: center; }
.hero-logo .ms { font-size: 34px; }
.hero-sub { color: var(--coral); letter-spacing: 3px; font-size: 15px; }
.hero-name { color: var(--brand-gold); font-size: 30px; font-weight: 900; letter-spacing: 2px; line-height: 1.1; }
.hero-title { grid-column: 1 / -1; font-size: 21px; margin: 18px 0 8px; }
.hero-hours { grid-column: 1 / -1; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: rgba(255,255,255,.9); font-size: 15px; }
.hero-hours .quiet { color: rgba(255,255,255,.7); margin-left: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.dot.on { background: #7BD88F; }
.home .content { padding-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--surface); border-radius: var(--radius); min-height: 92px; padding: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 500; line-height: 1.15; }
.tile .ms { font-size: 30px; }
.hint { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }
.seller { font-size: 12px; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }

/* ---------- прочее ---------- */
.done-ic { width: 96px; height: 96px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.done-ic .ms { font-size: 56px; }
.done { max-width: 420px; margin: 0 auto; }
.doc p, .doc li { font-size: 15px; }
.doc ul { padding-left: 20px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 84px); z-index: 50;
  background: #322825; color: #fff; padding: 12px 18px; border-radius: 10px; max-width: calc(100% - 32px); font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.dialog-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: var(--bg); border-radius: 24px; padding: 22px; width: 100%; max-width: 380px; max-height: 90dvh; overflow: auto; }
.dialog.wide { max-width: 520px; }
.dialog h3 { margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 12px; }
