:root {
  color-scheme: light dark;
  --mint: #08bda9;
  --mint-dark: #007d72;
  --ink: #13201f;
  --muted: #687674;
  --paper: #f3f5f4;
  --card: #ffffff;
  --line: #dce5e3;
  --danger: #d9364f;
  --shadow: 0 18px 45px rgba(8, 56, 50, .10);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 95% 0, #c9fff5 0, transparent 34%), var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100%, 820px); min-height: 100vh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px max(26px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 50px; height: 50px; border-radius: 13px; box-shadow: var(--shadow); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 2px; font-size: clamp(1.65rem, 5vw, 2.35rem); letter-spacing: -.045em; }
.eyebrow, .muted { color: var(--muted); }
.eyebrow { margin: 0; font-size: .88rem; }
.card { background: color-mix(in srgb, var(--card) 94%, transparent); border: 1px solid rgba(255,255,255,.7); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.auth { max-width: 470px; margin: 8vh auto 0; }
.tabs, .nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; background: rgba(93,119,115,.12); border-radius: 14px; margin-bottom: 20px; }
.tabs button, .nav button { border: 0; border-radius: 10px; background: transparent; padding: 10px 8px; color: var(--muted); font-weight: 700; }
.tabs button.active, .nav button.active { background: var(--card); color: var(--mint-dark); box-shadow: 0 3px 12px rgba(0,0,0,.08); }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .88rem; font-weight: 650; }
input { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: var(--card); color: var(--ink); outline: none; }
input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 18%, transparent); }
.btn { border: 0; border-radius: 13px; padding: 12px 16px; font-weight: 750; background: var(--mint); color: #fff; }
.btn:hover { filter: brightness(.96); }
.btn.secondary { background: rgba(7,142,128,.11); color: var(--mint-dark); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { background: rgba(217,54,79,.12); color: var(--danger); }
.btn.small { padding: 8px 11px; font-size: .86rem; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0; color: var(--muted); font-size: .92rem; }
.countdown { font-variant-numeric: tabular-nums; color: var(--mint-dark); font-weight: 750; }
.store-list, .item-list { display: grid; gap: 10px; }
.store { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px; color: var(--ink); }
.store-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(145deg, var(--mint), #007f72); color: #fff; font-size: 1.35rem; }
.store strong, .store small { display: block; }
.store small { color: var(--muted); margin-top: 3px; }
.arrow { color: var(--muted); font-size: 1.4rem; }
.empty { text-align: center; padding: 48px 22px; color: var(--muted); }
.empty .big { display: block; font-size: 3rem; margin-bottom: 12px; }
.back { border: 0; background: transparent; color: var(--mint-dark); font-weight: 750; padding: 8px 0; }
.shared { padding: 12px 15px; border-radius: 15px; background: rgba(8,189,169,.10); color: var(--mint-dark); margin-bottom: 14px; }
.item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding: 11px 12px; }
.check { width: 29px; height: 29px; padding: 0; border: 2px solid #9ba8a6; border-radius: 50%; background: transparent; color: white; font-weight: 900; }
.check.checked { border-color: var(--mint); background: var(--mint); }
.item-name { font-weight: 720; }
.item.purchased .item-name { text-decoration: line-through; color: var(--muted); }
.meta { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.item-tools { display: flex; align-items: center; gap: 4px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 7px; border-radius: 9px; font-size: 1rem; }
.icon-btn:hover { background: rgba(99,120,117,.10); }
.section-title { color: var(--muted); font-size: .94rem; margin: 22px 0 10px; }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(9,25,23,.5); backdrop-filter: blur(8px); }
.modal .card { width: min(100%, 470px); max-height: 90vh; overflow: auto; }
.photo-preview { width: 100%; max-height: 65vh; object-fit: contain; border-radius: 16px; background: #111; }
.code { font: 800 1.35rem ui-monospace, monospace; letter-spacing: .08em; text-align: center; padding: 16px; border-radius: 14px; background: rgba(8,189,169,.10); color: var(--mint-dark); user-select: all; }
#toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translate(-50%, 130px); opacity: 0; z-index: 30; padding: 11px 16px; border-radius: 999px; background: #152522; color: white; transition: .25s; box-shadow: var(--shadow); max-width: calc(100% - 28px); text-align: center; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
.loading { opacity: .58; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  :root { --ink: #eff8f6; --muted: #9eaeab; --paper: #101715; --card: #1b2422; --line: #303d3a; --shadow: 0 18px 45px rgba(0,0,0,.25); }
  body { background: radial-gradient(circle at 95% 0, #06473f 0, transparent 34%), var(--paper); }
  .card { border-color: rgba(255,255,255,.04); }
}
@media (min-width: 700px) { .shell { padding-inline: 28px; } .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } }
