:root {
  --bg: #0b0b0c; --panel: #151517; --panel2: #1c1c1f; --line: #2a2a2e; --text: #f4f4f5; --muted: #a1a1aa;
  --dim: #71717a; --brand: #aa7655; --brand2: #e3b48e; --ok: #34d399; --okbg: rgba(52, 211, 153, .14);
  --up: #7dd3fc; --upbg: rgba(125, 211, 252, .13); --bad: #fca5a5; --badbg: rgba(248, 113, 113, .13);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
img { display: block; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

/* hero */
.hero { position: relative; min-height: 220px; display: flex; align-items: flex-end; overflow: hidden; background: linear-gradient(135deg, #3a2a1f, #0b0b0c 70%); }
.hero.tall { min-height: 46vh; }
.hero .slides, .hero .slide { position: absolute; inset: 0; }
.hero .slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; transform: scale(1.04); }
.hero .slide.on { opacity: 1; animation: kb 9s ease-out forwards; }
@keyframes kb { to { transform: scale(1.0); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 11, 12, 1) 2%, rgba(11, 11, 12, .55) 45%, rgba(11, 11, 12, .1)); }
.hero .in { position: relative; z-index: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px; display: flex; gap: 14px; align-items: flex-end; }
.hero .logo { width: 58px; height: 58px; border-radius: 14px; background: rgba(0, 0, 0, .45); object-fit: contain; padding: 6px; border: 1px solid rgba(255, 255, 255, .12); }
.hero h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.hero p { margin: 2px 0 0; color: #d4d4d8; font-size: 13px; }
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand2); font-weight: 600; }
.topbar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.chip { font-size: 12px; color: #e4e4e7; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 5px 11px; }
.linkbtn { background: none; border: 0; color: #e4e4e7; font-size: 13px; cursor: pointer; padding: 6px; }

/* panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stack > * + * { margin-top: 12px; }
h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.input { width: 100%; background: #0f0f11; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; outline: none; }
.input:focus { border-color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 13px 18px; cursor: pointer; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.main { background: var(--brand); color: #fff; }
.btn.main:active { background: #8d5f42; }
.btn.ghost { background: var(--panel2); color: var(--text); border-color: var(--line); }
.btn.ok { background: #059669; color: #fff; }
.btn.block { width: 100%; }
.btn.big { padding: 18px; font-size: 17px; border-radius: 16px; }
.row { display: flex; gap: 10px; }
.row > .grow { flex: 1; min-width: 0; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 12px; }

/* scanner */
.scan { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.scan video { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
.scan .frame { position: absolute; left: 50%; top: 45%; width: min(68vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); border: 3px solid var(--brand2); }
.scan .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #000, transparent); text-align: center; }

/* member */
.member { display: flex; gap: 14px; align-items: center; }
.member img, .member .ph { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: var(--panel2); border: 2px solid var(--brand); flex: none; }
.member .ph { display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--brand2); }
.member .name { font-size: 20px; font-weight: 700; line-height: 1.2; }
.tag { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgba(170, 118, 85, .2); color: #f0c9a8; margin: 4px 4px 0 0; }
.banner { border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.banner.bad { background: var(--badbg); color: var(--bad); }
.banner.ok { background: var(--okbg); color: var(--ok); }

/* benefits */
.ben { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ben.available { border-color: rgba(52, 211, 153, .5); }
.ben .img { aspect-ratio: 16 / 7; background: linear-gradient(135deg, #3a2a1f, #151517) center / cover; }
.ben .body { padding: 14px; }
.ben .t { font-size: 17px; font-weight: 700; }
.ben .d { color: var(--muted); font-size: 13px; margin-top: 4px; white-space: pre-line; }
.ben .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ben .meta span { background: var(--panel2); border-radius: 6px; padding: 3px 8px; }
.ben .act { margin-top: 12px; }
.ben.unavailable, .ben.claimed { opacity: .72; }
.st { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: 3px 8px; margin-bottom: 6px; }
.st.available { background: var(--okbg); color: var(--ok); }
.st.upcoming { background: var(--upbg); color: var(--up); }
.st.claimed { background: #27272a; color: #d4d4d8; }
.st.unavailable { background: #1f1f22; color: var(--dim); }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* claims list */
.cl { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cl:first-child { border-top: 0; }
.cl .grow { flex: 1; min-width: 0; }
.cl .x { font-size: 12px; }
.void { text-decoration: line-through; color: var(--dim); }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; transition: all .25s; z-index: 80; background: #18181b; border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 32px); pointer-events: none; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { border-color: rgba(52, 211, 153, .6); }
#toast.bad { border-color: rgba(248, 113, 113, .6); }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.center { text-align: center; }
.foot { text-align: center; color: var(--dim); font-size: 11px; margin-top: 36px; }
.lift { margin-top: -8px; position: relative; z-index: 2; }
.mt { margin-top: 14px; } .mt8 { margin-top: 8px; } .mb12 { margin-bottom: 12px; } .tm { width: 44px; flex: none; }
