:root {
  --bg: #0d0d12;
  --bg-2: #15151d;
  --card: #1a1a24;
  --card-2: #22222e;
  --line: #2e2e3c;
  --text: #f1f1f5;
  --muted: #9a9aae;
  --accent: #7c5cff;
  --accent-2: #9b82ff;
  --in: #1fbf75;
  --in-dark: #12814f;
  --out: #ff6b57;
  --gold: #f5c542;
  --gold-bg: rgba(245, 197, 66, 0.1);
  --danger: #ff4d5e;
  --radius: 12px;
  --tap: 48px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent-2); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center-text { text-align: center; }

/* ---------- layout ---------- */

.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.page { max-width: 1100px; margin: 0 auto; padding: 16px 16px 80px; display: flex; flex-direction: column; gap: 16px; }
.narrow { width: 100%; max-width: 420px; }
.narrow-block { max-width: 640px; width: 100%; }
.page.narrow-block { margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .btn { margin-top: 12px; }

.brand { display: flex; align-items: center; gap: 10px; }
.logo { color: var(--gold); font-size: 1.4rem; }
.logo.big { font-size: 2rem; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(13, 13, 18, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--in); box-shadow: 0 0 0 3px rgba(31, 191, 117, 0.2); flex: none; }
.live-dot.offline { background: var(--out); box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.2); }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, transform 0.05s;
}
.btn:hover { background: #2b2b3a; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-accent { border-color: var(--accent); color: var(--accent-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost-danger { background: transparent; color: var(--danger); }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 0.85rem; }
.btn-block { width: 100%; min-height: var(--tap); }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  font-size: 1.1rem; cursor: pointer;
}

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-size: 0.9rem; cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--accent); border-color: var(--accent); }
.chip-user { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }

input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; /* stops iOS zoom */
}
textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25); }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--gold); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.vip-check { padding: 12px; border: 1px solid rgba(245, 197, 66, 0.35); border-radius: 10px; background: var(--gold-bg); color: var(--gold); }

/* ---------- badges & status ---------- */

.badge {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
  vertical-align: middle;
}
.badge-vip { background: var(--gold); color: #1a1400; border-color: var(--gold); }
.badge-live { background: var(--out); color: #fff; border-color: var(--out); margin-right: 6px; }
.t-artist { color: #ff9cf0; border-color: #6b3a64; }
.t-crew { color: #7fd6ff; border-color: #2d5566; }
.t-industry { color: #b7a6ff; border-color: #4a3f7a; }
.t-media { color: #ffc28a; border-color: #6b4b2c; }
.t-venue { color: #9fe8b7; border-color: #2d5b3c; }
.t-door { color: #ffd166; border-color: #6b5a2a; }

.plus { margin-left: 6px; color: var(--accent-2); font-weight: 700; }
.status { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.status-in { color: var(--in); }
.status-out { color: var(--out); }

/* ---------- events ---------- */

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.event-card { display: flex; flex-direction: column; gap: 12px; }
.event-card.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.event-card.past { opacity: 0.7; }
.event-card-main { color: inherit; display: flex; flex-direction: column; gap: 6px; }
.event-date { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 0.85rem; }
.event-card-actions { display: flex; gap: 8px; }
.event-card-actions .btn { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.portal .stats { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.stat-sub { color: var(--muted); font-size: 0.75rem; }
.stat-accent .stat-value { color: var(--in); }
.stat-vip .stat-value { color: var(--gold); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--accent); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input[type="search"] { flex: 1 1 220px; width: auto; }
.toolbar select { flex: 0 1 220px; width: auto; }
.toolbar > p { flex: 1 1 300px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--bg-2); }
.table tr:last-child td { border-bottom: none; }
.table td.actions { text-align: right; white-space: nowrap; }
.vip-row { background: var(--gold-bg); }
.guest-name { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.contributor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.contributor { display: flex; flex-direction: column; gap: 10px; }
.contributor.disabled { opacity: 0.6; }
.contributor-head { display: flex; justify-content: space-between; gap: 10px; }
.contributor-head h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.alloc { text-align: right; display: flex; flex-direction: column; }
.alloc strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.alloc small { color: var(--muted); font-size: 0.75rem; }
.bar { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 13px; min-height: 36px; font-family: ui-monospace, Menlo, monospace; }

.activity { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.activity li { display: grid; grid-template-columns: 130px 180px 1fr; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.activity li:last-child { border-bottom: none; }
.activity .time { color: var(--muted); font-variant-numeric: tabular-nums; }
.activity .who { font-weight: 700; }
.activity .who small { color: var(--muted); font-weight: 400; }
.act-guest-checkin { color: var(--in); }
.act-guest-checkout { color: var(--out); }
.act-guest-remove { color: var(--danger); }
@media (max-width: 640px) {
  .activity li { grid-template-columns: 1fr; gap: 2px; }
}

.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; white-space: pre-wrap; }

/* ---------- door mode ---------- */

.door { max-width: 760px; margin: 0 auto; padding: 12px 12px 100px; display: flex; flex-direction: column; gap: 12px; }
.door-notes { background: var(--card-2); border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; }
.door-counters { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.counter { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; align-items: center; }
.counter b { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.counter span { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.counter-main b { color: var(--in); font-size: 2rem; }
.counter-vip b { color: var(--gold); }

.door-controls { display: flex; gap: 8px; position: sticky; top: 64px; z-index: 10; background: var(--bg); padding: 4px 0; }
.door-search { font-size: 20px !important; min-height: 56px; border-radius: 14px; }
.door-controls .btn { min-height: 56px; }

.door-list { display: flex; flex-direction: column; gap: 8px; }
.door-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; border-left: 4px solid var(--line);
}
.door-row.is-in { border-left-color: var(--in); }
.door-row.has-left { border-left-color: var(--out); }
.door-row.vip { background: linear-gradient(90deg, var(--gold-bg), var(--card) 60%); border-color: rgba(245, 197, 66, 0.4); border-left-color: var(--gold); }
.door-row.vip.is-in { border-left-color: var(--in); }
.door-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.door-name { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.door-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; }
.door-note { color: var(--gold); font-size: 0.85rem; }
.door-actions { display: flex; gap: 8px; flex: none; }
.btn-in, .btn-out { min-width: 72px; min-height: 56px; font-size: 1rem; font-weight: 800; letter-spacing: 0.03em; border: none; }
.btn-in { background: var(--in); color: #04140c; }
.btn-in:hover { background: #35d68a; }
.btn-in:disabled { background: var(--in-dark); color: #d7ffe9; opacity: 0.55; }
.btn-out { background: transparent; color: var(--out); border: 2px solid var(--out); }
.btn-out:hover { background: rgba(255, 107, 87, 0.12); }
@media (max-width: 420px) {
  .btn-in, .btn-out { min-width: 60px; }
  .door-name { font-size: 1.05rem; }
}

.count-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.btn-count { min-height: 64px; font-size: 1.3rem; }

/* ---------- contributor portal ---------- */

.portal { max-width: 640px; }
.portal-head { display: flex; flex-direction: column; gap: 10px; }
.portal-list { list-style: none; margin: 12px 0 0; padding: 0; }
.portal-guest { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.notice { background: var(--card-2); border: 1px solid var(--line); border-left: 3px solid var(--out); padding: 14px; border-radius: 10px; }

/* ---------- modal & toast ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  animation: fade 0.12s ease-out;
}
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 20px; } }
.modal {
  width: 100%; max-width: 520px; max-height: 92vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: rise 0.16s ease-out;
}
@media (min-width: 640px) { .modal { border-radius: 16px; } }
.modal-wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

#toasts { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); transition: opacity 0.3s, transform 0.3s; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-ok { border-color: var(--in); }
.toast-error { border-color: var(--danger); background: #2a1418; }
.toast-vip { border-color: var(--gold); background: #2a2410; color: var(--gold); font-size: 1.05rem; }

/* ---------- multi-venue pages ---------- */

.hidden { display: none !important; }
.grow { flex: 1 1 220px; }
hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
a.brand { color: inherit; }
.venue-pill { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.venue-pill strong { font-size: 1.05rem; }
.admin h2 { font-size: 1.15rem; }
.venue-card { display: flex; flex-direction: column; gap: 10px; }
.venue-card.status-disabled { opacity: 0.6; }
.venue-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.badge-status { font-size: 0.75rem; padding: 3px 8px; white-space: nowrap; align-self: flex-start; }
.s-active { color: var(--in); border-color: rgba(31, 191, 117, 0.5); }
.s-pending { color: var(--gold); border-color: rgba(245, 197, 66, 0.5); }
.s-disabled { color: var(--out); border-color: rgba(255, 107, 87, 0.5); }
textarea.message { font-family: inherit; font-size: 15px; }

/* ---------- landing ---------- */

.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1040px; width: 100%; margin: 0 auto; padding: 16px; }
.landing-nav .brand { display: flex; align-items: center; gap: 8px; }
.hero { padding: 56px 0 40px; max-width: 720px; }
.eyebrow { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 16px; }
.lede { font-size: 1.15rem; color: #c9c9d6; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 12px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 1.05rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 48px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); }
.how { background: linear-gradient(135deg, rgba(124, 92, 255, 0.14), rgba(245, 197, 66, 0.08)); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.how h2 { margin-bottom: 12px; }
.how ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.landing-foot { display: flex; justify-content: space-between; max-width: 1040px; width: 100%; margin: 0 auto; padding: 20px 16px 28px; border-top: 1px solid var(--line); }
@media (max-width: 480px) {
  .hero { padding-top: 28px; }
  .hero-actions .btn { width: 100%; }
}
.requests .request { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.requests .request.done { opacity: 0.55; }
.request-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.request-msg { white-space: pre-wrap; }

/* ---------- pitch landing ---------- */

.landing { background: radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.18), transparent 60%), radial-gradient(900px 500px at -10% 20%, rgba(245, 197, 66, 0.07), transparent 60%), var(--bg); }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links > a:not(.btn) { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.nav-links > a:not(.btn):hover { color: var(--text); }
@media (max-width: 640px) { .hide-sm { display: none; } .nav-links { gap: 8px; } }
.grad { background: linear-gradient(90deg, var(--accent-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; padding: 40px 0 56px; }
.hero-grid .hero { padding: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding-top: 16px; } }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 8px 0 0; color: var(--muted); }
.ticks li::before { content: '✓ '; color: var(--in); font-weight: 800; }
.section-title { font-size: clamp(1.5rem, 3.6vw, 2.2rem); letter-spacing: -0.01em; text-align: center; margin: 4px 0 28px; }
.section-title.left { text-align: left; margin-bottom: 16px; }
section { scroll-margin-top: 20px; }

/* phone mockups */
.hero-visual { position: relative; min-height: 520px; }
.phone { position: absolute; width: 272px; background: var(--bg); border: 9px solid #25252f; border-radius: 34px; padding: 14px 10px 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.phone-back { right: 150px; top: 0; transform: rotate(-4deg); }
.phone-front { right: 0; top: 70px; transform: rotate(3deg); }
@media (max-width: 900px) {
  .hero-visual { min-height: 480px; max-width: 460px; margin: 0 auto; width: 100%; }
  .phone-back { right: auto; left: 0; }
}
@media (max-width: 480px) {
  .hero-visual { min-height: 430px; }
  .phone { width: 230px; font-size: 11px; }
  .phone-back { left: -6px; }
  .phone-front { right: -6px; top: 90px; }
}
.ph-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 700; padding: 0 4px 4px; border-bottom: 1px solid var(--line); }
.ph-top .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--in); box-shadow: 0 0 0 3px rgba(31, 191, 117, 0.2); }
.ph-counters { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 5px; }
.ph-counters > div { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; }
.ph-counters b { font-size: 1.25em; font-variant-numeric: tabular-nums; }
.ph-counters > div > span { color: var(--muted); font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.ph-counters.wide b { font-size: 1.7em; }
.ph-counters.wide > div > span { font-size: 0.8em; }
.ph-search { border: 1.5px solid var(--accent); border-radius: 10px; padding: 7px 10px; font-size: 1.15em; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2); }
.ph-search::after { content: '|'; color: var(--accent-2); margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ph-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 7px 8px; }
.ph-row.is-in { border-left-color: var(--in); }
.ph-row.has-left { border-left-color: var(--out); }
.ph-row.vip { background: linear-gradient(90deg, var(--gold-bg), var(--card) 65%); border-color: rgba(245, 197, 66, 0.4); border-left-color: var(--gold); }
.ph-row strong { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ph-row em, .mini em { color: var(--accent-2); font-style: normal; font-weight: 800; }
.ph-row small { display: flex; gap: 5px; align-items: center; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.ph-row small.note { color: var(--gold); }
.ph-btns { display: flex; gap: 4px; flex: none; }
.ph-btns span { display: grid; place-items: center; min-width: 38px; height: 32px; border-radius: 8px; font-weight: 800; font-size: 0.85em; }
.b-in { background: var(--in); color: #04140c; }
.b-in.done { background: var(--in-dark); color: #d7ffe9; }
.b-out { border: 1.5px solid var(--out); color: var(--out); }
.b-out.off { opacity: 0.3; }
.tag { font-style: normal; display: inline-block; padding: 1px 5px; border-radius: 5px; font-size: 0.78em; font-weight: 700; border: 1px solid var(--line); color: var(--muted); background: var(--card-2); }
.t-vipb { background: var(--gold); color: #1a1400; border-color: var(--gold); }
.c-in { color: var(--in); }
.c-out { color: var(--out); }
.c-vip { color: var(--gold); }
.ph-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.ph-title { font-size: 1.35em; }
.ph-alloc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.ph-alloc > div { border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; display: flex; flex-direction: column; }
.ph-alloc b { font-size: 1.5em; }
.ph-alloc span { color: var(--muted); font-size: 0.8em; }
.ph-label { color: var(--muted); font-weight: 700; font-size: 0.85em; }
.ph-input { border: 1px solid var(--line); background: var(--bg-2); border-radius: 8px; padding: 7px 9px; }
.ph-input.short { width: 50%; }
.ph-cta { margin-top: 4px; background: var(--accent); color: #fff; text-align: center; border-radius: 9px; padding: 8px; font-weight: 800; }
.float-toast { position: absolute; left: 10px; bottom: 6px; max-width: 290px; background: #2a2410; border: 1px solid var(--gold); color: var(--gold); border-radius: 12px; padding: 10px 12px; font-weight: 700; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); animation: floaty 4s ease-in-out infinite; }
.float-toast small { display: block; color: #d9c07a; font-weight: 500; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
@media (max-width: 480px) { .float-toast { bottom: 0; left: 0; max-width: 250px; font-size: 0.9rem; } }
@media (prefers-reduced-motion: reduce) { .float-toast, .ph-search::after { animation: none; } }

/* steps */
.how-steps { padding: 32px 0 56px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.step p { color: var(--muted); }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.mini { margin-top: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 7px; font-size: 0.9rem; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mini-bar { height: 5px; background: var(--card-2); border-radius: 9px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); }
.mini-bar i.w60 { width: 60%; }
.mini-bar i.w30 { width: 30%; }
.mini-link { color: var(--accent-2); font-weight: 700; }
.mini-lock { color: var(--gold); border-top: 1px solid var(--line); padding-top: 7px; }
.mini-picks { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; }
.mini-picks span { text-align: center; padding: 8px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); font-weight: 800; }
.mini-picks .pick-all { background: var(--in); color: #04140c; border-color: var(--in); }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 56px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.feature em { font-style: normal; color: var(--accent-2); }

/* door band */
.door-band { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 28px; margin-bottom: 56px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, rgba(31, 191, 117, 0.08), rgba(124, 92, 255, 0.08)); }
@media (max-width: 900px) { .door-band { grid-template-columns: 1fr; padding: 18px; } }
.bullets { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: #c9c9d6; }
.door-demo { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.door-demo .ph-btns span { min-width: 56px; height: 44px; }

/* request */
.request-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; padding-bottom: 56px; }
@media (max-width: 900px) { .request-band { grid-template-columns: 1fr; } }
.request-copy p { margin-bottom: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error-text { color: var(--danger); }
.request-done h3 { margin-bottom: 6px; color: var(--in); }

/* faq */
.faq { max-width: 760px; margin: 0 auto; padding-bottom: 48px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 4px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent-2); font-weight: 800; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin-top: 8px; }
.foot-links { display: flex; gap: 16px; }

/* ---------- guide ---------- */

.guide { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; padding-top: 16px; }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; gap: 16px; } }
.toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.toc a { color: var(--muted); padding: 5px 6px; border-radius: 6px; font-size: 0.92rem; }
.toc a:hover { color: var(--text); background: var(--card-2); }
@media (max-width: 860px) { .toc { position: static; } }
.guide-body { max-width: 740px; min-width: 0; }
.guide-body h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin-bottom: 10px; }
.guide-body section { padding: 26px 0 8px; border-top: 1px solid var(--line); margin-top: 24px; scroll-margin-top: 16px; }
.guide-body h2 { font-size: 1.4rem; margin-bottom: 12px; }
.guide-body h3 { margin: 18px 0 6px; }
.guide-body p, .guide-body li { color: #d4d4de; }
.guide-body p + p { margin-top: 10px; }
.guide-body ul, .guide-body ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.guide-body ul ul { margin-top: 8px; }
.guide-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 6px; }
@media (max-width: 640px) { .guide-roles { grid-template-columns: 1fr; } }
.guide-roles > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.guide-roles span { color: var(--muted); font-size: 0.9rem; }
.callout { margin-top: 16px; background: var(--gold-bg); border: 1px solid rgba(245, 197, 66, 0.35); border-radius: 12px; padding: 14px; }
.callout strong { color: var(--gold); }
.callout p { margin-top: 6px; }
.tip { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--accent); }
.kbd { background: var(--card-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; white-space: nowrap; }
code, pre.code { font-family: ui-monospace, Menlo, monospace; font-size: 0.88em; background: var(--card-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; word-break: break-all; }
pre.code { padding: 12px; white-space: pre-wrap; margin: 8px 0; }
.guide-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.93rem; }
.guide-table th, .guide-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.guide-table td:first-child { font-weight: 700; white-space: nowrap; }
.guide-visual { max-width: 420px; display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; font-size: 13px; }
.guide-body details { border-top: 1px solid var(--line); padding: 12px 2px; }
.guide-body summary { cursor: pointer; font-weight: 700; }
.guide-body details p { margin-top: 6px; color: var(--muted); }
.cheat { background: linear-gradient(135deg, rgba(31, 191, 117, 0.1), rgba(124, 92, 255, 0.1)); border: 1px solid var(--line) !important; border-radius: 16px; padding: 22px !important; }
.cheat ol { font-size: 1.05rem; }
.guide-foot { margin: 28px 0 40px; }
.request-form textarea { font-family: inherit; font-size: 16px; }
@media (max-width: 400px) {
  .landing-nav { padding: 12px; }
  .landing-nav .brand strong { font-size: 0.92rem; }
  .nav-links .btn-small { padding: 0 9px; }
}

/* =================== product landing (v3) =================== */

.lp { overflow-x: hidden; background: var(--bg); }
.lp main { max-width: 1180px; position: relative; z-index: 1; }
.glow { position: absolute; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.glow-a { width: 620px; height: 620px; top: -220px; right: -160px; background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 70%); animation: drift 14s ease-in-out infinite alternate; }
.glow-b { width: 520px; height: 520px; top: 380px; left: -220px; background: radial-gradient(circle, rgba(245, 197, 66, 0.25), transparent 70%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }

.lp-nav { position: sticky; top: 0; z-index: 30; background: rgba(13, 13, 18, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.lp-nav-inner { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-nav .brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.muted-strong { color: var(--muted); font-weight: 600; }
@media (max-width: 420px) { .muted-strong { display: none; } }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); color: #d4d4de; font-size: 0.85rem; font-weight: 600; margin-bottom: 18px; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--in); box-shadow: 0 0 0 0 rgba(31, 191, 117, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(31, 191, 117, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 191, 117, 0); } }

.lp-hero { display: grid; grid-template-columns: 0.95fr 1.15fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.lp-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 18px; }
.lp .lede { font-size: 1.18rem; color: #c9c9d6; max-width: 560px; }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.hero-actions.center { justify-content: center; }
@media (max-width: 960px) { .lp-hero { grid-template-columns: 1fr; padding-top: 28px; } }

/* stage: real screenshot in a browser + animated phone */
.lp-stage { position: relative; padding: 10px 0 60px; min-height: 420px; }
.browser { margin: 0; border-radius: 14px; overflow: hidden; background: #15151d; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 92, 255, 0.08); }
.browser img { display: block; width: 100%; height: auto; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1c1c26; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a48; }
.browser-bar i:nth-child(1) { background: #ff5f57; } .browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 10px; flex: 1; max-width: 320px; font-size: 0.75rem; color: var(--muted); background: #13131a; border-radius: 6px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-stage .browser { transform: perspective(1600px) rotateY(-8deg) rotateX(3deg); transform-origin: left center; }

.demo-phone { position: absolute !important; right: -8px; bottom: -6px; width: 258px; min-height: 470px; transform: rotate(2.5deg); z-index: 2; }
@media (max-width: 960px) { .lp-stage .browser { transform: none; } .demo-phone { right: 8px; bottom: -30px; } .lp-stage { padding-bottom: 150px; } }
@media (max-width: 560px) { .demo-phone { width: 230px; min-height: 430px; right: 50%; transform: translateX(50%) rotate(0); bottom: -40px; } .lp-stage { padding-bottom: 330px; } }
.ph-search.empty::before { content: 'Search name…'; color: var(--muted); }
.demo-list { display: flex; flex-direction: column; gap: 6px; min-height: 250px; }
.ph-row { transition: border-color 0.3s, background 0.3s; }
.ph-row.flash { animation: flash 0.9s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(31, 191, 117, 0.7); } 100% { box-shadow: 0 0 0 14px rgba(31, 191, 117, 0); } }
.b-in.press { transform: scale(0.88); filter: brightness(1.25); transition: transform 0.12s; }
.ph-counters b { display: inline-block; }
.ph-counters .bump { animation: bump 0.45s ease-out; }
@keyframes bump { 40% { transform: scale(1.12); } }
.demo-toast { position: absolute; left: 10px; right: 10px; bottom: 12px; background: #2a2410; border: 1px solid var(--gold); color: var(--gold); border-radius: 12px; padding: 9px 11px; font-weight: 800; font-size: 0.92em; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); transform: translateY(20px); opacity: 0; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3), opacity 0.25s; pointer-events: none; }
.demo-toast small { display: block; color: #d9c07a; font-weight: 500; }
.demo-toast.show { transform: translateY(0); opacity: 1; }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid rgba(255, 255, 255, 0.06); padding: 14px 0; margin: 30px 0 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 38px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { color: var(--muted); font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.marquee-track span:nth-child(3n) { color: #d4d4de; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 36px 0 70px; }
@media (max-width: 760px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-big { text-align: center; padding: 18px 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)); border: 1px solid rgba(255, 255, 255, 0.07); }
.stat-big b { display: block; font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -0.02em; background: linear-gradient(90deg, #fff, #c9bfff); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat-big > span { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

/* showcase sections */
.showcase { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; padding: 50px 0 90px; }
.showcase.reverse .showcase-copy { order: 2; }
@media (max-width: 960px) { .showcase { grid-template-columns: 1fr; gap: 28px; padding: 30px 0 60px; } .showcase.reverse .showcase-copy { order: 0; } }
.showcase h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 14px; }
.lede-sm { color: #c9c9d6; font-size: 1.06rem; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { padding-left: 30px; position: relative; color: #d4d4de; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #04140c; background: var(--in); }
.showcase-media { position: relative; }
.tilt-l { transform: perspective(1600px) rotateY(6deg); }
.tilt-r { transform: perspective(1600px) rotateY(-6deg); }
@media (max-width: 960px) { .tilt-l, .tilt-r { transform: none; } }
.device { margin: 0; width: 240px; border-radius: 34px; padding: 8px; background: #25252f; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05) inset; }
.device img { display: block; width: 100%; height: auto; border-radius: 27px; }
.device-float { position: absolute; right: -10px; bottom: -70px; width: 210px; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (max-width: 560px) { .device-float { width: 150px; right: -4px; bottom: -40px; } }
.showcase-media.duo { display: flex; justify-content: center; gap: 22px; }
.device-offset { margin-top: 70px; }
@media (max-width: 560px) { .showcase-media.duo .device { width: 46%; border-radius: 24px; padding: 5px; } .showcase-media.duo .device img { border-radius: 20px; } .device-offset { margin-top: 40px; } }

/* bars grow when revealed */
.grow-bar { transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s; }
.in .grow-bar { transform: scaleX(1); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

.signup-band { padding-top: 30px; }
.cta-band { text-align: center; margin: 20px 0 70px; padding: 54px 20px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08); background: radial-gradient(600px 240px at 50% 0%, rgba(124, 92, 255, 0.35), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)); }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  .glow, .marquee-track, .device-float, .pill-dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .grow-bar { transform: none; transition: none; }
}
.reset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .reset-grid { grid-template-columns: 1fr; } }
.reset-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; }
.reset-title { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.override-reason { background: rgba(255, 107, 87, 0.1); border: 1px solid rgba(255, 107, 87, 0.4); color: #ffb3a8; border-radius: 10px; padding: 10px 12px; font-weight: 700; }
.pin-box { border: 1px solid rgba(245, 197, 66, 0.35); background: var(--gold-bg); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- door counter ---------- */

.capbar { display: grid; grid-template-columns: 72px 1fr 96px; gap: 8px; align-items: stretch; }
.cap-btn { border: none; border-radius: 14px; font-size: 2.2rem; font-weight: 800; cursor: pointer; min-height: 76px; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform 0.06s, filter 0.1s; }
.cap-btn:active { transform: scale(0.94); filter: brightness(1.2); }
.cap-minus { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.cap-plus { background: var(--accent); color: #fff; font-size: 2.6rem; }
.cap-mid { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 6px; text-align: center; font: inherit; }
.cap-num b { font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.cap-num span { color: var(--muted); font-weight: 700; font-size: 1.1rem; }
.cap-track { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.cap-fill { height: 100%; background: var(--in); transition: width 0.25s, background 0.25s; }
.cap-label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.lvl-ok .cap-label { color: var(--in); }
.lvl-warn .cap-fill { background: var(--gold); } .lvl-warn .cap-label { color: var(--gold); }
.lvl-full .cap-fill, .lvl-over .cap-fill { background: var(--out); }
.lvl-full .cap-label, .lvl-over .cap-label { color: var(--out); }
.lvl-full .cap-mid, .lvl-over .cap-mid { border-color: var(--out); box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.18); }
.lvl-over .cap-mid { animation: overpulse 1.2s ease-in-out infinite; }
@keyframes overpulse { 50% { box-shadow: 0 0 0 7px rgba(255, 107, 87, 0.28); } }
.cap-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 2px 0; flex-wrap: wrap; }
.linklike { background: none; border: none; color: var(--accent-2); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.door-section-label { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; margin-bottom: -6px; }
.cap-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cap-stats > div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.cap-stats b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.cap-stats span { color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }

/* full-screen clicker */
.clicker { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
.clicker-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; }
.clicker-body { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.capbar-big { flex: 1; grid-template-columns: 1fr; grid-template-rows: 1fr auto; gap: 12px; }
.capbar-big .cap-mid { grid-row: 1; grid-column: 1; gap: 14px; }
.capbar-big .cap-num b { font-size: clamp(4.5rem, 22vw, 9rem); }
.capbar-big .cap-num span { font-size: clamp(1.4rem, 6vw, 2.4rem); }
.capbar-big .cap-track { height: 14px; }
.capbar-big .cap-label { font-size: 1rem; }
.capbar-big .cap-minus, .capbar-big .cap-plus { grid-row: 2; min-height: 22vh; font-size: 4rem; }
.capbar-big { grid-template-columns: 1fr 1.6fr; }
.capbar-big .cap-mid { grid-column: 1 / -1; }
.capbar-big .cap-minus { grid-column: 1; }
.capbar-big .cap-plus { grid-column: 2; font-size: 5rem; }
.clicker-stats { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.clicker-stats b { color: var(--text); }

.pin-banner { display: block; background: var(--gold-bg); border: 1px solid rgba(245, 197, 66, 0.4); color: #e9d9a8; border-radius: 12px; padding: 12px 14px; }
.pin-banner strong { color: var(--gold); }
.check-top { align-items: flex-start; padding-top: 22px; }
.block { display: block; }
.grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }
.code-list { display: flex; flex-direction: column; }
.code-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.code-row.revoked { opacity: 0.55; }
.code-row strong { display: flex; gap: 8px; align-items: center; }
.add-code { border-top: 1px solid var(--line); padding-top: 12px; }
