:root {
  --bg: #6A2A1A; --salmon: #F0B3A2; --on-muted: #F2C6B9; --ink: #2A1712; --in-muted: #76605A;
  --line: #E3E3E3; --teal: #0B7F6F; --orange: #F08A12; --plus: #2E7D32; --minus: #B3261E; --brick: #8A3A26;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; background: var(--bg); -webkit-font-smoothing: antialiased; }
.bg { position: fixed; inset: 0; z-index: -1; background-color: var(--bg);
  background-image: radial-gradient(circle at 50% 35%, rgba(176, 82, 55, .95) 0%, rgba(106, 42, 26, 0) 70%), radial-gradient(circle, rgba(255, 255, 255, .025) 2.2px, transparent 2.6px);
  background-size: 100% 100%, 18px 18px; }
.app { max-width: 520px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
.screen { display: flex; flex-direction: column; gap: 16px; }
.center-screen { min-height: 70vh; align-items: center; justify-content: center; }
p, h2 { margin: 0; }
.center { align-self: center; text-align: center; }
.brand { display: flex; justify-content: center; padding: 26px 0 0; }
.logo { display: block; width: 220px; aspect-ratio: 8 / 1; background: #fff; -webkit-mask: url("/logo.svg") center / contain no-repeat; mask: url("/logo.svg") center / contain no-repeat; }
.screen-title { flex: 1; text-align: center; font-size: 19px; font-weight: 600; color: var(--salmon); }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.who-small { width: 110px; font-size: 13px; color: var(--on-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 48px; height: 48px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.on-bg-h { font-size: 18px; font-weight: 700; margin-top: 8px; }
.on-bg-muted { color: var(--on-muted); font-size: 15px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; color: var(--ink); }
.panel-h { font-size: 20px; font-weight: 700; }
.panel-muted { color: var(--in-muted); font-size: 15px; line-height: 1.45; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: var(--on-muted); }
.field-label.in, .error.in { color: var(--in-muted); }
.error.in { color: var(--minus); }
.input { width: 100%; min-height: 52px; padding: 0 16px; font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 1px solid #D9D2CE; border-radius: 14px; outline: none; }
.input:focus { border-color: var(--brick); box-shadow: 0 0 0 3px rgba(240, 179, 162, .45); }
.input.code { letter-spacing: .4em; text-align: center; font-size: 24px; font-weight: 700; }
.big-input { font-size: 30px; font-weight: 700; min-height: 64px; }
.with-btn { display: flex; gap: 8px; }
.with-btn .input { flex: 1; }
.phone-box { display: flex; min-height: 52px; border-radius: 14px; overflow: hidden; background: #fff; color: var(--ink); }
.phone-box.bordered { border: 1px solid #D9D2CE; }
.phone-box .prefix { display: flex; align-items: center; padding: 0 12px; background: #F3E6E0; font-weight: 600; font-size: 17px; }
.phone-box input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 17px; padding: 0 12px; color: var(--ink); }
.pill { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; border-radius: 999px; border: 0; cursor: pointer; font: 600 17px Inter, sans-serif; text-decoration: none; }
.pill.light { background: #fff; color: var(--brick); }
.pill.dark { background: #2B2523; color: #fff; }
.pill.big { min-height: 64px; font-size: 19px; }
.pill.small-pill { width: auto; min-height: 52px; padding: 0 18px; background: #2B2523; color: #fff; border-radius: 14px; font-size: 15px; }
.pill:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link.on-bg { color: #fff; }
.error { color: #FFD7CF; font-size: 15px; }
.error:empty { display: none; }
.warn { margin-top: 8px; color: var(--minus); font-weight: 600; }
.qr-small { align-self: center; width: 210px; aspect-ratio: 1; }
.qr-small svg { width: 100%; height: 100%; display: block; }
.secret summary { cursor: pointer; color: var(--brick); font-size: 14px; }
.secret code { display: block; margin-top: 8px; padding: 10px; background: #F5F0EE; border-radius: 10px; font-size: 15px; word-break: break-all; color: var(--ink); }
.scanner { position: relative; border-radius: 22px; overflow: hidden; background: #000; display: flex; flex-direction: column; }
.scanner video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 15%; top: 0; width: 70%; aspect-ratio: 1; margin-top: 7.5%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; pointer-events: none; }
.scanner .pill { border-radius: 0; }
.guest-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.guest-name { font-size: 22px; font-weight: 700; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--teal); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.summary { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.summary:empty { display: none; }
.summary .line { display: flex; justify-content: space-between; }
.summary .total { font-weight: 700; font-size: 19px; padding-top: 6px; border-top: 1px solid var(--line); }
.summary .plus { color: var(--plus); font-weight: 600; }
.done { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ops li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.ops .o-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ops .o-title { font-size: 15px; font-weight: 600; }
.ops .o-sub { font-size: 13px; color: var(--in-muted); }
.ops .o-amt { font-weight: 700; white-space: nowrap; }
.ops .o-amt.plus { color: var(--plus); } .ops .o-amt.minus { color: var(--minus); }
.ops .o-undo { border: 1px solid #D9D2CE; background: #fff; color: var(--brick); border-radius: 10px; min-height: 40px; padding: 0 10px; font: 600 13px Inter, sans-serif; cursor: pointer; }
.ops li.reversed { opacity: .55; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
