:root {
  --accent: #fe6219; --accent-dark: #e04f0b; --graphite: #1d191a; --bg: #f2f2f4; --card: #fff;
  --text: #1d191a; --muted: #8a8590; --line: #e4e2e7; --ok: #19a463; --warn: #e8a317; --bad: #e0393e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.top { background: var(--graphite); color: #fff; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
.logo { font-weight: 900; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: inline-flex;
             align-items: center; justify-content: center; }
main { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font-size: 22px; margin: 4px 0; }
h2 { font-size: 17px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.card { background: var(--card); border-radius: 20px; padding: 16px; margin-bottom: 12px;
        box-shadow: 0 4px 16px rgba(29, 25, 26, .06); }
.dark { background: var(--graphite); color: #fff; }
.dark .muted { color: #b9b3bd; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px;
        border-radius: 20px; background: rgba(255,255,255,.12); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); }
.dot.free { background: var(--ok); } .dot.busy { background: var(--warn); } .dot.offline { background: var(--bad); }
.mode { display: block; border: 2px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px;
        background: var(--card); cursor: pointer; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode.on { border-color: var(--accent); }
.mode .price { font-weight: 900; font-size: 18px; }
.mode .old { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-right: 6px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.step { font-size: 12px; background: var(--bg); border-radius: 10px; padding: 3px 8px; }
.addon { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0;
         border-top: 1px solid var(--line); }
.addon:first-of-type { border-top: 0; }
.addon input { width: 22px; height: 22px; accent-color: var(--accent); }
.btn { display: block; width: 100%; border: 0; border-radius: 16px; padding: 16px; font-size: 17px; font-weight: 800;
       text-align: center; text-decoration: none; cursor: pointer; background: var(--card); color: var(--text);
       border: 1px solid var(--line); margin-top: 10px; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:active { background: var(--accent-dark); }
.btn[disabled] { opacity: .5; cursor: default; }
.bar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 max(10px, env(safe-area-inset-bottom)); }
.total { font-size: 22px; font-weight: 900; }
.err { color: var(--bad); font-weight: 600; }
.status-icon { width: 64px; height: 64px; border-radius: 32px; margin: 0 auto 8px; display: flex; align-items: center;
               justify-content: center; font-size: 30px; color: #fff; }
.stores { display: grid; grid-template-columns: 1fr; gap: 0; }
.note { background: #fff4ee; border-radius: 14px; padding: 12px; font-size: 14px; }
.input { display: block; width: 100%; border: 2px solid var(--line); border-radius: 16px; padding: 14px; font-size: 16px;
         background: var(--card); color: var(--text); }
.input:focus { outline: none; border-color: var(--accent); }
.guide summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 4px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.guide[open] summary::after { transform: rotate(180deg); }
.guide ol { padding-left: 20px; margin: 12px 0; } .guide li { margin-bottom: 8px; }
.guide .rules { background: #fdecec; border-left: 4px solid var(--bad); border-radius: 12px; padding: 10px 12px; }
.guide .rules strong { color: var(--bad); } .guide .rules ul { margin: 6px 0 0; padding-left: 18px; }
.guide[open] ol li { animation: rise .3s ease both; }
.note .tight { margin: 6px 0 0; padding-left: 20px; } .note li { margin-bottom: 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .guide[open] ol li { animation: none; } .guide summary::after { transition: none; } }

/* 0.18.0: приглашение друга */
.ref-code { font-size: 2rem; font-weight: 900; letter-spacing: .4em; padding: .6rem 1rem; margin: .8rem auto; background: #fff; color: var(--text, #1d2329); border-radius: 12px; display: inline-block; }

/* 0.19.0: товары со стойки */
.product { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.product:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; }
.stepper { display: flex; align-items: center; gap: 10px; }
.step { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 22px; font-weight: 800; color: var(--text); }
.step:active { background: var(--accent); color: #fff; border-color: var(--accent); }
.qty { min-width: 1.5em; text-align: center; font-weight: 800; font-size: 18px; }
.scan-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.scan-overlay .card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.scan-video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 1; object-fit: cover; }

/* 0.21.0: подарочный сертификат */
.cert { text-align: center; border: 2px dashed var(--accent, #2563eb); }
.cert-sum { font-size: 44px; font-weight: 900; margin: 8px 0 2px; }
.cert-msg { font-style: italic; margin: 10px 0; }
.cert-code { font-size: 26px; letter-spacing: 2px; margin: 14px auto; }
@media print {
  .card:not(.cert), .no-print, header, footer { display: none !important; }
  body { background: #fff !important; }
  .cert { box-shadow: none !important; }
}
