/* Барбари Mini App — печатное меню в телефоне. Токены из DESIGN.md */
:root {
  --paper: #FAF7F1; --paper-2: #FFFFFF; --paper-3: #F3EDE2;
  --ink: #1F1B17; --ink-2: #6B6259; --ink-3: #9A9087;
  --rule: rgba(172, 113, 45, 0.26); --rule-strong: rgba(172, 113, 45, 0.6);
  --bronze: #AC712D; --bronze-text: #8F5C22; --bronze-tint: #F1E6D6;
  --gold: #C3AD84; --gold-tint: rgba(195, 173, 132, 0.18);
  --red: #EC2A28; --red-fill: #E02522; --red-hover: #C9201E; --red-ink: #FFFFFF; --red-tint: rgba(236, 42, 40, 0.08);
  --blue: #676EA4; --blue-deep: #5B609A;
  --success: #3E7C4A; --success-tint: #E6F0E7;
  --danger: #A8321F; --danger-tint: #F8E6E2;
  --shadow: 0 10px 30px -12px rgba(60, 40, 20, 0.35);
  --sheet-shadow: 0 -12px 40px -16px rgba(60, 40, 20, 0.45);
  --f-display: "Tenor Sans", Georgia, "Times New Roman", serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-script: "Caveat", "Segoe Script", cursive;
  --r-card: 12px; --r-sheet: 20px; --r-pill: 999px; --r-arch: 999px 999px 12px 12px;
  --gutter: 16px;
  --safe-top: calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)));
  --safe-bottom: calc(var(--tg-content-safe-area-inset-bottom, 0px) + var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  --bottom-bar: 0px;
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #1C1815; --paper-2: #26211C; --paper-3: #2F2822;
  --ink: #F3EBDD; --ink-2: #B8AC9C; --ink-3: #8A7F72;
  --rule: rgba(201, 138, 68, 0.28); --rule-strong: rgba(201, 138, 68, 0.6);
  --bronze: #C98A44; --bronze-text: #D69A55; --bronze-tint: rgba(201, 138, 68, 0.14);
  --gold: #C3AD84; --gold-tint: rgba(195, 173, 132, 0.14);
  --red-tint: rgba(236, 42, 40, 0.16);
  --blue: #9AA1D6; --blue-deep: #AEB4E0;
  --success: #7DBA88; --success-tint: rgba(62, 124, 74, 0.22);
  --danger: #F08A78; --danger-tint: rgba(168, 50, 31, 0.22);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --sheet-shadow: 0 -12px 40px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15px/1.45 var(--f-body);
  font-feature-settings: "tnum" 1, "kern" 1;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none; min-height: 100vh;
  padding-bottom: calc(var(--bottom-bar) + var(--safe-bottom));
  caret-color: var(--bronze);
}
::selection { background: rgba(172, 113, 45, 0.22); color: var(--ink); }
::-webkit-scrollbar { width: 0; height: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; border-radius: 6px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
img { display: block; max-width: 100%; }
a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.app { min-height: 100vh; padding-bottom: 24px; }
.view { animation: none; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  padding: calc(var(--safe-top) + 8px) var(--gutter) 8px;
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.is-stuck { border-bottom-color: var(--rule); }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.brand-logo { color: var(--bronze); height: 20px; width: auto; display: block; }
.brand-logo svg { height: 20px; width: auto; }
.mode-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; flex: 0 1 auto;
  padding: 7px 12px 7px 10px; border: 1px solid var(--rule-strong); border-radius: var(--r-pill);
  color: var(--ink); font-size: 13px; line-height: 1.2; background: var(--paper-2);
}
.mode-chip svg { width: 16px; height: 16px; color: var(--bronze); flex: none; }
.mode-chip .mode-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-chip b { font-weight: 500; }
.mode-chip .eta { color: var(--ink-2); }
.mode-chip .chev { width: 14px; height: 14px; color: var(--ink-2); }
.profile-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; color: var(--bronze); background: var(--paper-2); flex: none; }
.profile-btn svg { width: 20px; height: 20px; }

.search { position: relative; margin-top: 10px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 36px 0 38px; border: 1px solid var(--rule); border-radius: var(--r-pill);
  background: var(--paper-2); color: var(--ink);
}
.search input::placeholder { color: var(--ink-2); }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.search .clear svg { position: static; transform: none; width: 16px; height: 16px; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 10px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 2px; scrollbar-width: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: var(--r-pill); border: 1px solid var(--rule); color: var(--ink-2);
  font-size: 13px; line-height: 1.2; background: transparent; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
[data-theme="dark"] .chip.is-active { background: var(--ink); color: var(--paper); }

/* ---------- лист меню ---------- */
.sheet-paper { padding: 0 var(--gutter); }
.repeat-strip {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: var(--r-card); background: var(--paper-2);
}
.repeat-strip svg { width: 22px; height: 22px; color: var(--bronze); flex: none; }
.repeat-strip .t { flex: 1; min-width: 0; }
.repeat-strip .t b { display: block; font-weight: 500; }
.repeat-strip .t span { display: block; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repeat-strip .p { font-weight: 600; white-space: nowrap; }

.section { padding-top: 26px; scroll-margin-top: 150px; }
.section-title {
  display: flex; align-items: center; gap: 12px; color: var(--bronze-text);
  font: 400 15px/1.2 var(--f-display); letter-spacing: .14em; text-transform: uppercase; text-align: center;
}
.section-title::before, .section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }
.section-head { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: end; margin-bottom: 4px; }
.section-head .arch { width: 96px; height: 128px; object-fit: cover; border-radius: var(--r-arch); border: 1px solid var(--rule); background: var(--paper-3); }
.section-head .section-title { justify-content: flex-start; text-align: left; margin-bottom: 8px; }
.section-head .section-title::before { display: none; }
.section-head .section-title::after { flex: 1; }
.section-head .hint { color: var(--ink-2); font-size: 13px; padding-bottom: 6px; }

.row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: flex-start; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; text-align: left; }
.row-name { font-weight: 500; font-size: 16px; line-height: 1.3; }
.row-name .warn { display: inline-block; width: 15px; height: 15px; margin-left: 6px; color: var(--danger); vertical-align: -2px; }
.row-desc { color: var(--ink-2); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.row-meta { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.price { font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price.from::before { content: "от "; font-weight: 400; color: var(--ink-2); font-size: 13px; }
.row.is-off .row-name, .row.is-off .price { color: var(--ink-3); }
.row.is-off .row-desc { color: var(--ink-3); }
.off-label { font-size: 13px; color: var(--danger); }

/* «+» → степпер: одна авторская анимация */
.stepper {
  --w: 34px; --h: 34px; position: relative; height: var(--h); width: var(--w); border-radius: var(--r-pill); flex: none;
  border: 1px solid var(--rule-strong); background: var(--paper-2); color: var(--bronze); overflow: hidden;
  transition: width .26s cubic-bezier(.2,.8,.2,1), background-color .26s cubic-bezier(.2,.8,.2,1), border-color .26s;
}
.stepper.is-active { --w: 100px; background: var(--red-fill); border-color: var(--red-fill); color: var(--red-ink); }
.stepper.is-off { opacity: .4; pointer-events: none; }
.stepper button { position: absolute; top: 0; bottom: 0; width: calc(var(--h) - 2px); display: grid; place-items: center; color: inherit; }
.stepper button svg { width: 18px; height: 18px; }
.stepper .minus { left: 0; opacity: 0; transition: opacity .18s .06s; }
.stepper .plus { right: 0; }
.stepper .cnt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .18s .06s; pointer-events: none; }
.stepper.is-active .cnt, .stepper.is-active .minus { opacity: 1; }
.stepper.lg { --h: 44px; --w: 44px; }
.stepper.lg.is-active { --w: 132px; }
.stepper.lg .cnt { font-size: 17px; }
.stepper.quiet.is-active { background: var(--paper-2); border-color: var(--rule-strong); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .stepper, .stepper .cnt, .stepper .minus { transition: none; } }

.mark { font: 600 18px/1 var(--f-script); color: var(--blue); margin-left: 8px; white-space: nowrap; vertical-align: -1px; }
/* Пометки состава живут в строке факта рядом с весом: цвет в кремовом меню дорог, держим его тихо */
.diet { white-space: nowrap; filter: saturate(0.85); }
.kbzhu { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.kbzhu span { color: var(--ink-3); font-size: 12px; }
h2 .mark { font-size: 22px; }

.empty { text-align: center; padding: 56px var(--gutter) 24px; color: var(--ink-2); }
.empty svg { width: 40px; height: 40px; color: var(--bronze); margin: 0 auto 14px; }
.empty h2 { font: 400 22px/1.2 var(--f-display); color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill); font-weight: 500; font-size: 15px; border: 1px solid transparent; transition: background .15s, transform .12s;
}
.btn:active { transform: scale(.985); }
.btn-red { background: var(--red-fill); color: var(--red-ink); }
.btn-red:hover { background: var(--red-hover); }
.btn-ghost { border-color: var(--rule-strong); color: var(--bronze-text); background: var(--paper-2); }
.btn-text { color: var(--bronze-text); padding: 0 6px; min-height: 36px; }
.btn-danger { color: var(--danger); border-color: var(--rule); background: var(--paper-2); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }

/* ---------- страницы ---------- */
.page { padding: 0 var(--gutter); }
.page-head { padding: calc(var(--safe-top) + 14px) 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.page-head h1 { font: 400 28px/1.1 var(--f-display); letter-spacing: .01em; }
.page-head .sub { color: var(--ink-2); font-size: 13px; }
.card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px; }
.card + .card { margin-top: 12px; }
.card-title { font: 400 15px/1.2 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-text); margin-bottom: 10px; }
.label { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-2); }
.field input:focus, .field textarea:focus { border-color: var(--bronze); }
.field-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--rule-strong); border-radius: var(--r-pill); background: var(--paper-2); }
.seg button { min-height: 38px; border-radius: var(--r-pill); font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.seg button.is-active { background: var(--ink); color: var(--paper); }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); width: 100%; text-align: left; }
.opt:last-child { border-bottom: 0; }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong); flex: none; display: grid; place-items: center; transition: border-color .15s; }
.opt .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red-fill); transform: scale(0); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.opt.is-on .radio { border-color: var(--red-fill); }
.opt.is-on .radio::after { transform: scale(1); }
.opt .box { border-radius: 5px; }
.opt .box::after { border-radius: 2px; }
.opt .t { flex: 1; min-width: 0; }
.opt .t b { font-weight: 500; display: block; }
.opt .t span { display: block; color: var(--ink-2); font-size: 13px; }
.opt .d { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.addr-list .opt { padding: 12px; border: 1px solid var(--rule); border-radius: var(--r-card); margin-bottom: 8px; background: var(--paper-2); }
.addr-list .opt.is-on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.addr-list .opt .icon-btn { margin-left: auto; }
.addr-choice { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
.order-open { width: 100%; text-align: left; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn svg { width: 18px; height: 18px; }
.link-btn { color: var(--bronze-text); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.link-btn svg { width: 18px; height: 18px; }
.totals { margin-top: 12px; }
.totals .tr { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--ink-2); }
.totals .tr b { color: var(--ink); font-weight: 500; }
.totals .tr.total { border-top: 1px solid var(--rule-strong); margin-top: 6px; padding-top: 12px; color: var(--ink); font-size: 17px; }
.totals .tr.total b { font-weight: 600; }
.totals .kbzhu { margin-top: 12px; }
.progress { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; margin: 4px 0 6px; }
.progress i { display: block; height: 100%; background: var(--bronze); width: 0; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.note { font-size: 13px; color: var(--ink-2); }
.warn-box { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--danger-tint); color: var(--danger); font-size: 14px; margin-top: 12px; }
.warn-box svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ok-box { background: var(--success-tint); color: var(--success); }
.rest-card { display: grid; gap: 6px; }
.rest-card .line { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.rest-card .line svg { width: 18px; height: 18px; color: var(--bronze); flex: none; }
.rest-card .actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ink-2); font-size: 13px; }
.summary b { color: var(--ink); font-weight: 500; }

/* корзина */
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: flex-start; }
.cart-line:last-child { border-bottom: 0; }
.cart-line .t { flex: 1; min-width: 0; }
.cart-line .t b { font-weight: 500; display: block; }
.cart-line .t .mods, .cart-line .t .nt { color: var(--ink-2); font-size: 13px; display: block; }
.cart-line .t .nt::before { content: "«"; } .cart-line .t .nt::after { content: "»"; }
.cart-line .t .unit { color: var(--ink-2); font-size: 13px; margin-top: 2px; display: block; }
.cart-line .s { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.cart-line.is-off .t b { color: var(--ink-3); text-decoration: line-through; }
.upsell { display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 6px; scrollbar-width: none; }
.upsell .u { flex: none; width: 150px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--paper-2); text-align: left; display: flex; flex-direction: column; gap: 4px; }
.upsell .u b { font-weight: 500; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upsell .u .bot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.upsell .u .plus { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--rule-strong); color: var(--bronze); display: grid; place-items: center; }
.upsell .u .plus svg { width: 16px; height: 16px; }
.inline-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.inline-row:last-child { border-bottom: 0; }
.promo { display: flex; gap: 8px; margin-top: 8px; }
.promo input { flex: 1; min-height: 42px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--paper); color: var(--ink); text-transform: uppercase; }
.promo .btn { min-height: 42px; }

/* заказ */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 4px; }
.timeline .st { text-align: center; font-size: 13px; color: var(--ink-2); position: relative; padding-top: 18px; }
.timeline .st::before { content: ""; position: absolute; left: 50%; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--rule-strong); }
.timeline .st::after { content: ""; position: absolute; left: calc(50% + 7px); right: calc(-50% + 7px); top: 8.5px; height: 1px; background: var(--rule-strong); }
.timeline .st:last-child::after { display: none; }
.timeline .st.done::before { background: var(--success); }
.timeline .st.done::after { background: var(--success); }
.timeline .st.done { color: var(--success); }
.timeline .st.cur::before { background: var(--red-fill); box-shadow: 0 0 0 4px var(--red-tint); }
.timeline .st.cur { color: var(--ink); font-weight: 500; }
.status-big { font: 400 22px/1.2 var(--f-display); margin-bottom: 4px; }
.status-sub { color: var(--ink-2); font-size: 13px; }
.order-items .li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.order-items .li:last-child { border-bottom: 0; }
.order-items .li span { color: var(--ink-2); font-size: 13px; display: block; }
.stars { display: flex; gap: 6px; }
.stars button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--rule-strong); transition: color .15s, transform .12s; }
.stars button svg { width: 26px; height: 26px; }
.stars button.on { color: var(--bronze); }
.stars button:active { transform: scale(.9); }
.actions-col { display: grid; gap: 8px; margin-top: 12px; }
.olist .o { display: block; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.olist .o:last-child { border-bottom: 0; }
.olist .o .top { display: flex; justify-content: space-between; gap: 12px; }
.olist .o .top b { font-weight: 500; }
.olist .o .desc { color: var(--ink-2); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olist .o .bot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.pill { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); font-size: 13px; background: var(--bronze-tint); color: var(--bronze-text); }
.pill.ok { background: var(--success-tint); color: var(--success); }
.pill.bad { background: var(--danger-tint); color: var(--danger); }
.pill.gold { background: var(--gold-tint); color: var(--bronze-text); border: 1px solid var(--gold); }

/* ---------- шторки ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(31, 27, 23, 0); transition: background .22s; }
.overlay.is-in { background: rgba(31, 27, 23, 0.45); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100vh - var(--safe-top) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--sheet-shadow);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  padding: 8px var(--gutter) calc(20px + var(--safe-bottom) + var(--bottom-bar));
}
.overlay.is-in .sheet { transform: translateY(0); }
.sheet .handle { width: 36px; height: 4px; border-radius: 2px; background: var(--rule-strong); margin: 4px auto 14px; }
.sheet-close { position: absolute; top: 12px; right: 12px; background: var(--paper); }
.sheet h2 { padding-right: 32px; }
.sheet h2 { font: 400 22px/1.2 var(--f-display); }
.sheet .arch-wrap { display: flex; justify-content: center; margin: 4px 0 14px; }
.sheet .arch-wrap img { width: 168px; height: 216px; object-fit: cover; border-radius: var(--r-arch); border: 1px solid var(--rule); }
.sheet .meta { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.sheet .desc { margin-top: 8px; color: var(--ink); }
.sheet .group { margin-top: 18px; }
.sheet .group .gh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.sheet .group .gh b { font-weight: 500; }
.sheet .group .gh span { font-size: 13px; color: var(--ink-2); }
.sheet .group.is-err .gh span { color: var(--danger); }
.details { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 14px; }
.details summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; cursor: pointer; font-weight: 500; }
.details summary::-webkit-details-marker { display: none; }
.details summary svg { width: 18px; height: 18px; color: var(--ink-2); transition: transform .2s; }
.details[open] summary svg { transform: rotate(180deg); }
.details .body { padding: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.details .body .al { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.details .body .al span { padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--rule); font-size: 13px; color: var(--ink); }
.sheet .qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.sheet .qty-row .price { font-size: 22px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 16px; }

/* ---------- скелет ---------- */
.sk { background: var(--paper-3); border-radius: 8px; height: 14px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: sk 1.2s infinite; }
[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes sk { to { transform: translateX(100%); } }
.sk-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sk-row .l { flex: 1; display: grid; gap: 8px; }
.sk-row .r { width: 64px; display: grid; gap: 8px; justify-items: end; }

/* ---------- тост и dev-бар ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-bar) + var(--safe-bottom) + 16px); transform: translate(-50%, 8px); z-index: 60;
  max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }
.toast.ok { background: var(--success); color: #fff; }
/* в тёмной теме danger/success светлые: белый текст на них ниже 3:1 */
[data-theme="dark"] .toast.bad, [data-theme="dark"] .toast.ok { color: var(--paper); }
.devbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px var(--gutter) calc(8px + var(--safe-bottom)); background: var(--paper); border-top: 1px solid var(--rule);
}
.devbar button { width: 100%; min-height: 48px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 600; font-size: 16px; }
.devbar button[disabled] { opacity: .55; }
.devbar button.is-busy { opacity: .8; }

/* гостевой режим (обычный браузер без Telegram) */
.guest #devbar { display: none !important; }
.guest .row .stepper, .guest .row .add, .guest [data-profile], .guest .mode-chip .chev { display: none !important; }
.guest-banner { display: flex; align-items: center; gap: 12px; margin: 12px var(--gutter, 16px) 4px; padding: 12px 14px; border: 1px solid var(--gold, #C3AD84); border-radius: var(--r-card, 12px); background: var(--paper-2, #fff); color: var(--ink); text-decoration: none; }
.guest-banner svg { flex: none; width: 22px; height: 22px; color: var(--bronze, #AC712D); }
.guest-banner .t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.3; }
.guest-banner .t span { color: var(--bronze, #AC712D); }

/* заказ обновился: мягкая вспышка рамки карточки статуса */
.card.just-updated { animation: just-updated 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 1; }
@keyframes just-updated { 0% { box-shadow: 0 0 0 0 rgba(195, 173, 132, 0.9); border-color: var(--gold, #C3AD84); } 100% { box-shadow: 0 0 0 10px rgba(195, 173, 132, 0); } }
@media (prefers-reduced-motion: reduce) { .card.just-updated { animation: none; } }
