:root {
  --bg: #FBF6EF; --card: #FFFFFF; --ink: #2B2118; --muted: #7A6B5D; --line: #EADFD2;
  --accent: #C8553D; --accent-ink: #FFFFFF; --accent-soft: #F6E1D9; --olive: #5F7A3E; --olive-soft: #E7EEDC;
  --shadow: 0 6px 24px rgba(74, 46, 25, .08); --r: 20px;
  --serif: 'Lora', Georgia, serif; --sans: 'Manrope', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); min-height: 100vh; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; }
.wrap { max-width: 720px; margin: 0 auto; padding: 8px 16px 120px; }

.demo-bar { background: var(--ink); color: #F3E9DD; font-size: 12px; text-align: center; padding: 6px 12px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(251, 246, 239, .92); backdrop-filter: blur(10px); max-width: 720px; margin: 0 auto; }
.top__back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 18px; }
.top__brand { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.top__user { margin-left: auto; font-size: 13px; color: var(--muted); max-width: 45%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { max-width: 688px; margin: 0 auto 8px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; width: calc(100% - 32px); }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .35s ease; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 16px 0 8px; }
.h1 { font-size: clamp(30px, 7vw, 46px); margin-bottom: 12px; }
.h2 { font-size: clamp(24px, 5.5vw, 32px); margin-bottom: 6px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 20px rgba(200, 85, 61, .25); transition: transform .15s; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn--ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: .45; box-shadow: none; }

/* Старт */
.hero { padding: 20px 0 8px; }
.hero__plate { font-size: 64px; line-height: 1; margin-bottom: 12px; }
.steps-mini { display: grid; gap: 10px; margin: 24px 0; padding: 0; list-style: none; }
.steps-mini li { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.steps-mini b { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

/* Доступ */
.paycard { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); margin: 16px 0; }
.paycard__price { font-family: var(--serif); font-size: 40px; font-weight: 700; }
.paycard ul { padding-left: 20px; margin: 12px 0 18px; }
.paycard li { margin: 4px 0; }
.field { display: block; margin: 12px 0; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 0 16px; font: inherit; font-size: 16px; }
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.note { font-size: 13px; color: var(--muted); background: var(--olive-soft); border-radius: 14px; padding: 12px 14px; margin-top: 14px; }

/* Сетки выбора */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid--ev { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; background: var(--card);
  border: 2px solid transparent; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-height: 112px; transition: border-color .15s, transform .15s; }
.tile:active { transform: scale(.98); }
.tile.is-on { border-color: var(--accent); }
.tile__ic { font-size: 32px; line-height: 1; }
.tile__name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.tile__big { font-family: var(--serif); font-size: 32px; font-weight: 700; }
.tile__sub { font-size: 13px; color: var(--muted); }
.exact { margin-top: 16px; display: flex; gap: 10px; align-items: flex-end; }
.exact .field { flex: 1; margin: 0; }

/* Меню */
.cat { margin: 22px 0 10px; font-family: var(--serif); font-size: 20px; }
.dish { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 18px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow); margin-bottom: 10px; }
.dish__ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--accent-soft); }
.dish__body { flex: 1; min-width: 0; }
.dish__name { font-weight: 700; line-height: 1.25; }
.dish__meta { font-size: 13px; color: var(--muted); }
.dish__acts { display: flex; gap: 6px; flex: none; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.chip--accent { border-color: var(--accent); color: var(--accent); }
.chip--x { width: 36px; padding: 0; font-size: 18px; color: var(--muted); }
.dish__ic.has-photo { background: none; overflow: hidden; }
.dish__ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish__ic--sm { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; }
.dish.is-off { opacity: .55; box-shadow: none; background: transparent; border: 1px dashed var(--line); }
.dish.is-changed .dish__ic { background: var(--olive-soft); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--olive); background: var(--olive-soft); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(251, 246, 239, 0)); }
.bar__in { max-width: 688px; margin: 0 auto; }

/* Bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet__bg { position: absolute; inset: 0; background: rgba(43, 33, 24, .45); }
.sheet__box { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85vh; overflow: auto; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet__head h3 { font-size: 20px; flex: 1; }
.sheet__x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; }
.opt { width: 100%; text-align: left; border: 2px solid transparent; }
.opt.is-on { border-color: var(--accent); }

/* Результат */
.summary { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin: 12px 0 16px; }
.summary__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--bg); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; background: var(--line); padding: 4px; border-radius: 999px; position: sticky; top: 64px; z-index: 10; }
.tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 14px; }
.tabs button.is-on { background: var(--card); box-shadow: var(--shadow); }
.panel { margin-top: 16px; }
.dept { margin: 18px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.buy { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 6px; cursor: pointer; }
.buy input { width: 22px; height: 22px; accent-color: var(--olive); flex: none; }
.buy__name { flex: 1; }
.buy__qty { font-weight: 700; white-space: nowrap; }
.buy.is-done .buy__name, .buy.is-done .buy__qty { text-decoration: line-through; color: var(--muted); }
.time-set { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.time-set input { font: inherit; font-size: 18px; font-weight: 700; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; }
.day { margin: 20px 0 8px; font-family: var(--serif); font-size: 20px; }
.day small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.tl { position: relative; padding-left: 92px; margin-bottom: 8px; }
.tl__t { position: absolute; left: 0; top: 12px; width: 80px; font-weight: 700; font-size: 14px; color: var(--accent); }
.tl__c { background: var(--card); border-radius: 14px; padding: 12px 14px; }
.tl__d { font-size: 12px; font-weight: 700; color: var(--olive); text-transform: uppercase; letter-spacing: .04em; }
.tl__dur { font-size: 12px; color: var(--muted); }
.recipe { background: var(--card); border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.recipe summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; font-weight: 700; }
.recipe summary::-webkit-details-marker { display: none; }
.recipe summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--muted); }
.recipe[open] summary::after { content: '−'; }
.recipe__in { padding: 0 16px 16px; }
.recipe__in ul, .recipe__in ol { padding-left: 20px; margin: 8px 0; }
.recipe__in li { margin: 4px 0; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.actions .btn { min-height: 48px; font-size: 14px; padding: 0 12px; }
.watermark { margin-top: 24px; font-size: 12px; color: var(--muted); text-align: center; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; }
.toast.is-on { opacity: 1; transform: translateX(-50%); }
.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

@media print {
  .demo-bar, .top, .progress, .tabs, .actions, .bar, .time-set input, .sheet, .toast, .no-print { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; }
  .panel { display: block !important; }
  .panel h2.print-only { display: block !important; margin: 18px 0 6px; }
  .summary, .buy, .tl__c, .recipe { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .recipe .recipe__in { display: block !important; }
  .watermark { position: fixed; bottom: 0; left: 0; right: 0; }
}
.print-only { display: none; }
