:root {
  --p: #A314A3; --p2: #C557C8; --bg: #F6E9F6; --line: #E8CFE8; --ink: #3B1340; --muted: #6B3F70;
  --white: #FFFFFF; --ok-bg: #E4F4E8; --ok: #14532D; --warn: #9A3412;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Nunito Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.35; }
button, input { font-family: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--p2); outline-offset: 2px; }
h1 { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 4px 0 6px; }
h2 { margin: 0; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .block { display: block; } .grow { flex: 1; min-width: 0; }
.center-text { text-align: center; } .left { text-align: left; }

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; background: var(--bg); }
.hdr { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.logo { width: 44px; height: 46px; object-fit: contain; }
.hdr-text { flex: 1; display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--p); }
.hdr-sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: none; background: var(--bg); color: var(--p); display: flex; align-items: center; justify-content: center; flex: none; }

.page { flex: 1; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.page.with-bar { padding-bottom: 110px; }
.page.center { align-items: center; text-align: center; }
.page.done { align-items: center; justify-content: center; text-align: center; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.center-note { text-align: center; padding: 28px 16px; font-weight: 700; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 124px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--white); color: var(--ink); box-shadow: 0 2px 0 var(--line); text-align: center; }
.tiles.compact { gap: 10px; }
.tile.small-tile { min-height: 76px; align-items: flex-start; text-align: left; border-radius: 18px; gap: 2px; padding: 12px 14px; }
.tile-icon, .avatar { width: 56px; height: 56px; border-radius: 28px; background: var(--bg); color: var(--p); display: flex; align-items: center; justify-content: center; }
.avatar { background: var(--p); color: var(--white); font-size: 22px; font-weight: 800; width: 52px; height: 52px; }
.tile-name { font-size: 16px; font-weight: 800; }

.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); min-height: 56px; color: var(--ink); }
.row.pick { width: 100%; border: 2px solid var(--line); }
.row.pick.on { border-color: var(--p); }
.row-name { font-size: 16px; font-weight: 800; }
.round { width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--p); background: var(--p); color: var(--white); font-size: 24px; font-weight: 800; line-height: 1; flex: none; padding: 0; }
.round.ghost { background: var(--white); color: var(--p); }
.qty { display: flex; align-items: center; gap: 8px; }
.qty-n { min-width: 20px; text-align: center; font-size: 18px; font-weight: 800; }

.btn { min-height: 52px; padding: 0 24px; border-radius: 26px; border: 2px solid var(--p); background: var(--p); color: var(--white); font-size: 17px; font-weight: 800; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--muted); }
.btn.outline { background: var(--white); color: var(--p); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--p); }
.btn.light { background: var(--white); color: var(--p); border-color: var(--white); }
.btn.dark { background: var(--muted); border-color: var(--muted); }
.btn.wide { width: 100%; }
.btn.small-btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
.link { background: none; border: none; color: var(--p); font-weight: 800; padding: 8px 0; min-height: 44px; text-decoration: underline; }

.bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); z-index: 6; margin-top: auto; }
.bar-info { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.bar-total { font-size: 24px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.hl { border: 2px solid var(--p); } .card.dashed { border: 2px dashed var(--p2); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.line { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.line.total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-size: 17px; font-weight: 800; }
.line.total strong { color: var(--p); font-size: 19px; }
.amt { min-width: 64px; text-align: right; }
.lines { display: flex; flex-direction: column; gap: 4px; }
.welcome { font-size: 18px; margin: 0; }
.x { width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--warn); background: var(--white); color: var(--warn); font-size: 22px; font-weight: 800; line-height: 1; flex: none; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label, .pay-label { font-size: 14px; font-weight: 800; }
.text, .amount { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--white); font-size: 17px; font-weight: 600; color: var(--ink); }
.amount { text-align: center; font-size: 18px; font-weight: 800; min-width: 0; }
.amount.narrow { width: 96px; min-height: 44px; flex: none; }
.phone-box { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--p); background: var(--white); }
.phone-num { font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.phone-num.empty { color: #7A5C7E; font-size: 16px; font-weight: 600; letter-spacing: 0; }
.numpad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 320px; margin: 8px auto 0; }
.key { min-height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 22px; font-weight: 800; }
.key:active { background: var(--bg); }
.dots { display: flex; gap: 16px; justify-content: center; margin: 8px 0; }
.dot { width: 18px; height: 18px; border-radius: 9px; border: 2px solid var(--p); background: var(--white); }
.dot.on { background: var(--p); }

.note { padding: 10px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.note.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bg); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; width: calc(100% - 40px); max-width: 420px; padding: 12px 16px; border-radius: 14px; font-weight: 800; z-index: 50; text-align: center; box-shadow: 0 6px 20px rgba(59,19,64,.25); }
.toast.error { background: var(--warn); color: var(--white); } .toast.ok { background: var(--ok); color: var(--white); }

.offer { background: var(--p); color: var(--white); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 12px; background: var(--white); color: var(--p); }
.offer-title { font-family: var(--serif); font-size: 27px; font-weight: 700; line-height: 1.1; }
.offer-items { margin: 0; font-weight: 600; }
.offer-price { display: flex; align-items: baseline; gap: 10px; }
.offer-price strong { font-size: 28px; } .offer-price s { opacity: .85; }
.offer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .offer-price strong { color: var(--p); font-size: 24px; }

.big-check { width: 88px; height: 88px; border-radius: 44px; background: var(--p); color: var(--white); display: flex; align-items: center; justify-content: center; }
.overlay { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; background: var(--bg); z-index: 20; overflow-y: auto; display: flex; flex-direction: column; }

.strip { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.strip-text { font-size: 16px; font-weight: 800; }
.tabs { display: flex; gap: 8px; padding: 12px 20px 0; }
.tabs.scroll, .chips.scroll { overflow-x: auto; flex-wrap: nowrap; }
.tabs.top { padding-bottom: 0; }
.tab { flex: 1; min-height: 48px; padding: 0 14px; border-radius: 24px; border: 2px solid var(--p); background: var(--white); color: var(--p); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.tabs:not(.scroll) .tab { flex-shrink: 1; }
.tab.on { background: var(--p); color: var(--white); }
.badge { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--p); color: var(--white); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.tab.on .badge { background: var(--white); color: var(--p); }

.order { gap: 10px; }
.order-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.order-name { flex: 1; font-size: 19px; font-weight: 800; }
.checkout { display: flex; flex-direction: column; gap: 10px; }
.pay-row { display: flex; flex-direction: column; gap: 4px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .amount { flex: 1; min-height: 44px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--p); background: var(--bg); color: var(--p); font-size: 14px; font-weight: 800; flex: none; }
.chip.on { background: var(--p); color: var(--white); } .chip:disabled { opacity: .45; }
.chip.danger { border-color: var(--warn); color: var(--warn); background: var(--white); } .chip.danger.on { background: var(--warn); color: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 48px; border-radius: 24px; border: 2px solid var(--p); background: var(--white); color: var(--p); font-size: 15px; font-weight: 800; }
.seg button.on { background: var(--p); color: var(--white); }
.status { font-size: 14px; font-weight: 800; margin: 0; } .status.ok { color: var(--ok); } .status.warn { color: var(--warn); }
.tip { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.two { display: flex; gap: 8px; } .two .btn { flex: 1; }
.pill { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 12px; background: #ECE3EC; color: var(--muted); } .pill.ok { background: var(--ok-bg); color: var(--ok); }
.hero { background: var(--p); color: var(--white); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; }
.hero strong { font-size: 36px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 22px; }
.pin-edit { display: flex; flex-direction: column; align-items: center; gap: 8px; }
