:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e7ebe9;
  --accent: #0fa77a;
  --accent-dark: #0a8a65;
  --accent-soft: #e9f8f2;
  --warning: #a45b00;
  --warning-bg: #fff6e5;
  --danger: #c73d3d;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
.shell { width: min(100%, 560px); margin: 0 auto; min-height: 100vh; background: var(--surface); }
.topbar { padding: 18px 20px 10px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; }
.logo { width: 27px; height: 31px; border-radius: 5px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 16px; }
.content { padding: 12px 20px 34px; }
h1 { font-size: 28px; line-height: 1.08; margin: 14px 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 20px; margin: 22px 0 10px; }
p { color: var(--muted); line-height: 1.45; margin: 0 0 16px; }
.card { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.name-card { padding: 18px; margin-top: 22px; }
.label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.input { width: 100%; min-height: 48px; border: 1px solid #d4d9d7; border-radius: 12px; padding: 12px 14px; color: var(--text); background: #fff; font-size: 16px; }
.input:focus { outline: 3px solid rgba(15, 167, 122, .14); border-color: var(--accent); }
.btn { width: 100%; min-height: 50px; border: 0; border-radius: 13px; padding: 13px 16px; font-weight: 800; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
.item-list { border-top: 1px solid var(--line); margin-top: 8px; }
.item { min-height: 64px; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check { width: 24px; height: 24px; border-radius: 7px; border: 1.7px solid #c7cecb; display: grid; place-items: center; color: transparent; font-weight: 900; }
.item.selected .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.item-name { font-weight: 700; }
.item-note { margin-top: 3px; color: var(--muted); font-size: 12px; }
.item-price { font-weight: 750; white-space: nowrap; }
.sticky { position: sticky; bottom: 0; padding: 12px 20px 18px; background: linear-gradient(rgba(255,255,255,0), #fff 18%, #fff); }
.total-strip { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; font-weight: 700; }
.money { font-variant-numeric: tabular-nums; }
.hero-total { font-size: 42px; font-weight: 850; letter-spacing: -0.03em; margin: 8px 0 20px; }
.breakdown { padding: 6px 0; }
.row { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; color: var(--muted); }
.row strong { color: var(--text); }
.success { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: white; display: grid; place-items: center; font-size: 30px; font-weight: 800; margin: 28px auto 16px; }
.notice { border-radius: 13px; padding: 13px 14px; margin: 14px 0; background: var(--warning-bg); color: var(--warning); font-size: 14px; }
.error { background: #fff0f0; color: var(--danger); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.progress { height: 8px; background: #edf0ef; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.progress > div { height: 100%; background: var(--accent); }
.person { padding: 13px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; }
.person:last-child { border-bottom: 0; }
.pill { border-radius: 999px; padding: 7px 10px; font-weight: 750; font-size: 12px; border: 1px solid var(--line); background: #fff; }
.pill.paid { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }
.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }
.center { text-align: center; }
@media (min-width: 700px) { body { padding: 30px 0; } .shell { min-height: 720px; border-radius: 24px; box-shadow: 0 18px 50px rgba(16,24,40,.08); overflow: hidden; } }
