:root {
  --bg: #070a0d;
  --surface: #11191e;
  --surface-2: #192329;
  --line: #2b3941;
  --text: #eef5f2;
  --muted: #a1b7ba;
  --accent: #46e1d4;
  --accent-dark: #0c3538;
  --copper: #db9b70;
  --copper-line: #77523f;
  --red: #ffb1a3;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 95% 0%, #ad60330b 0, transparent 42%),
    radial-gradient(ellipse at 0 25%, #29333e1a 0, transparent 58%),
    var(--bg);
}
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:disabled, a.button:not([href]) { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
[hidden] { display: none !important; }
.shell { max-width: 1040px; margin: auto; padding: calc(28px + env(safe-area-inset-top)) 32px 120px; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 38px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 15px; font-weight: 750; letter-spacing: 2.5px; }
.brand small { display: block; margin-top: 5px; font-size: 8px; letter-spacing: 2.7px; color: var(--muted); font-weight: 500; }
.brand-mark {
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 42px;
  border: 1px solid var(--copper-line);
  background: linear-gradient(135deg, #202a31, #0d171d);
  clip-path: polygon(0 0, 76% 0, 100% 24%, 100% 100%, 0 100%, 0 68%, 12% 60%, 12% 40%, 0 32%);
  color: var(--copper);
  font: 32px/1 Georgia, serif;
}
.brand-mark::after { content: ''; position: absolute; bottom: 4px; right: 0; width: 22px; height: 6px; border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); }
.member-pill { border: 1px solid var(--copper-line); border-radius: 5px; padding: 8px 11px; font-size: 9px; letter-spacing: 1.1px; color: var(--copper); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { font-size: 10px; letter-spacing: 2.1px; font-weight: 650; color: var(--copper); text-transform: uppercase; margin: 0 0 12px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -1.5px; line-height: 1.15; margin: 0; font-weight: 550; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.5px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.subtitle { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.grid > * { min-width: 0; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 26px; }
.access-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-color: #75604d;
  background: radial-gradient(ellipse at 50% 28%, #15616b30, transparent 65%), linear-gradient(145deg, #121f26, #0c141a);
  box-shadow: inset 0 1px 0 #e0a57a18, 0 16px 50px #0002;
}
.access-label { align-items: flex-start; flex-wrap: wrap; }
.access-label > span:first-child { font-size: 9px; letter-spacing: 1.4px; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 11px; }
.status::before { content: ''; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px #46e1d455; }
.status.warning { color: var(--red); }
.membership-stage { display: grid; place-items: center; padding: 16px 0 9px; }
.membership-art { display: block; width: 100%; max-width: 440px; height: auto; filter: drop-shadow(0 12px 15px #0007); }
.membership-details { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.membership-details .eyebrow { font-size: 8px; letter-spacing: 1.8px; margin-bottom: 5px; }
.plan-name { font: 38px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.8px; margin: 0; }
.material-label { color: var(--copper); font-size: 10px; letter-spacing: 1.2px; padding-bottom: 4px; text-transform: uppercase; }
[data-tier="caporegime"] .material-label { color: #c5d2d8; }
[data-tier="underboss"] .material-label { color: #f0c771; }
[data-tier="boss"] .material-label { color: #e0e8eb; }
.plan-tag { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.access-expiry { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.access-actions { margin-top: 22px; }
.access-actions > .text-button { display: block; margin: 8px auto 0; }
.button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, #63eee0, #34c8c0);
  color: #072a2e;
  font-size: 14px;
  font-weight: 650;
  min-height: 48px;
  padding: 13px 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, border-color .2s, transform .2s;
}
.button:hover:not(:disabled) { background: #86f3e8; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.secondary { background: var(--surface-2); border-color: #665342; color: var(--text); }
.button.secondary:hover:not(:disabled) { background: #24343b; border-color: var(--copper); }
.button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.button.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.button.danger { background: #432b29; border-color: #74473c; color: var(--red); }
.button.full { width: 100%; }
.button svg { width: 18px; height: 18px; flex-shrink: 0; }
.text-button { border: 0; background: none; color: var(--accent); font-size: 12px; padding: 8px 0; text-decoration: none; }
.text-button:disabled { color: var(--muted); }
.stats-card { display: flex; flex-direction: column; justify-content: space-between; gap: 26px; background: linear-gradient(160deg, #131e24, #0e161c); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.stat-number { font-size: clamp(28px, 3.2vw, 36px); letter-spacing: -1.3px; font-weight: 500; margin: 18px 0; font-variant-numeric: tabular-nums; }
.stat-number small { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.meter { width: 100%; height: 5px; background: #25434b; border-radius: 2px; overflow: hidden; }
.meter span { display: block; background: linear-gradient(90deg, #1c979d, var(--accent)); box-shadow: 0 0 12px #46e1d455; height: 100%; border-radius: 2px; }
.stat-bottom { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 13px 0 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.device-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.device-summary strong { font-size: 15px; font-weight: 550; }
.row-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; }
.row-card p { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.row-card h3 { margin: 0; }
.row-leading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.icon-box { height: 42px; width: 42px; display: grid; place-items: center; border: 1px solid #386068; background: #17383f; border-radius: 8px; color: var(--accent); flex-shrink: 0; }
.icon-box svg { width: 20px; height: 20px; }
.arrow { font-size: 22px; color: var(--copper); }
a.row-card { text-decoration: none; transition: border-color .2s; }
a.row-card:hover { border-color: #6e6955; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 16px; }
.section-label h2 { font-size: 17px; margin: 0; }
.section-label span { color: var(--muted); font-size: 11px; }
.section-label > .text-button { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.section-label > .text-button svg { width: 15px; height: 15px; }
.notice { border: 1px solid #366068; background: #12343a; border-radius: 9px; padding: 15px 18px; font-size: 12px; line-height: 1.7; color: #c2dbda; margin-top: 18px; }
.notice.error { border-color: #785042; background: #332829; color: var(--red); }
.footnote { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 15px; }
.footnote span { font-size: 8px; letter-spacing: 2px; color: var(--copper); }
.bottom-nav {
  position: fixed;
  z-index: 5;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: #0b1016f5;
  border: 1px solid #36454c;
  border-top-color: #967052;
  box-shadow: 0 12px 40px #0008, inset 0 1px 0 #d9a07412;
  border-radius: 13px;
  padding: 6px;
  max-width: calc(100% - 28px);
  backdrop-filter: blur(16px);
}
.nav-item { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; color: var(--muted); background: none; border-radius: 8px; padding: 12px 19px; font-size: 12px; white-space: nowrap; text-decoration: none; }
.nav-item.active { background: #16434a; color: var(--accent); box-shadow: inset 0 -2px 0 #46e1d4; }
.nav-item:hover { color: var(--text); }
.nav-item svg { width: 18px; height: 18px; }
.loading, .gate { text-align: center; padding: 60px 20px; max-width: 540px; margin: 0 auto; }
.gate h1 { margin: 28px 0 18px; font-size: 36px; }
.gate .icon-box { margin: auto; width: 70px; height: 70px; border-radius: 13px; }
.gate .icon-box svg { width: 30px; height: 30px; }
.gate p { color: var(--muted); font-size: 14px; }
.gate .button { margin-top: 18px; }
.spinner { display: block; margin: 10px auto; width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { font-size: 13px; color: var(--muted); }
.list { display: grid; gap: 12px; }
.list-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 15px 0; }
.list-item:last-child { border: 0; }
.list-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.5; }
.list-item .button { min-height: 36px; font-size: 11px; padding: 8px 12px; }
.list-item h3, .person h3 { overflow-wrap: anywhere; }
.empty { padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 15px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border: 0; }
.step-number { font-size: 12px; color: var(--copper); border: 1px solid var(--copper-line); border-radius: 6px; width: 28px; height: 28px; display: grid; place-items: center; }
.step p { font-size: 13px; color: var(--muted); margin: 6px 0 14px; }
.step .button { font-size: 12px; min-height: 40px; }
label { display: block; color: var(--muted); font-size: 12px; margin: 18px 0 7px; }
select, input { width: 100%; color: var(--text); background: var(--bg); border: 1px solid #42616a; min-height: 46px; border-radius: 7px; padding: 10px 12px; max-width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan-tile { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 17px; background: linear-gradient(160deg, #132027, #0d151b); }
.plan-tile.current { border-color: #3d9c9c; background: linear-gradient(160deg, #163039, #101e25); }
.plan-artwork { display: grid; place-items: center; margin: -3px -7px 16px; aspect-ratio: 960/582; }
.plan-art { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 7px #0005); }
.plan-title { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 40px; }
.plan-tile h3 { overflow-wrap: anywhere; font-size: 18px; margin: 0; font-family: Georgia, serif; font-weight: 400; }
.plan-tile small { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; }
.badge { display: inline-block; font-size: 9px; letter-spacing: .6px; color: var(--accent); margin-bottom: 12px; }
.plan-title .badge { margin: 0; font-size: 8px; }
.plan-price { font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; letter-spacing: -.7px; line-height: 1.4; margin: 15px 0; color: var(--text); }
.price-amount { white-space: nowrap; }
.plan-price .price-amount { display: block; }
.plan-price small { font-weight: 400; letter-spacing: 0; margin-top: 4px; font-size: 10px; }
.plan-buy { margin-top: auto; position: relative; top: 0; font-size: 12px; padding: 10px 8px; min-height: 44px; }
.plan-tile > small { margin-bottom: 18px; }
.button-row { display: flex; gap: 10px; margin-top: 20px; }
.button-row > * { flex: 1; }
.invite-result { margin-top: 18px; overflow-wrap: anywhere; background: var(--bg); border: 1px dashed #428c8f; padding: 18px; border-radius: 8px; font-size: 12px; line-height: 1.6; }
.invite-result a { color: var(--accent); }
.person { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--surface); margin-bottom: 12px; }
.person-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.person h3 { margin: 0; }
.person small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.person summary { cursor: pointer; color: var(--accent); font-size: 12px; }
.person details { margin-top: 20px; }
.person .button-row { flex-wrap: wrap; }
.toast { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(104px + env(safe-area-inset-bottom)); max-width: calc(100% - 40px); width: max-content; padding: 14px 20px; background: #d7f5ed; color: #09292c; border: 1px solid var(--accent); border-radius: 9px; box-shadow: 0 5px 30px #0007; font-size: 13px; text-align: center; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--copper-line); border-radius: var(--radius); padding: 26px; max-width: calc(100% - 36px); width: 400px; }
dialog::backdrop { background: #020b10cc; backdrop-filter: blur(4px); }
dialog p { font-size: 13px; color: var(--muted); }
#confirm-text { white-space: pre-line; max-height: 50vh; overflow: auto; }
.link-note { font-size: 11px; color: var(--muted); margin-top: 16px; line-height: 1.7; }
.admin-pagination { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; color: var(--muted); font-size: 12px; }
.support-message { border-bottom: 1px solid var(--line); padding: 15px 0; overflow-wrap: anywhere; }
.support-message p { font-size: 13px; white-space: pre-wrap; }
.support-message small { font-size: 11px; color: var(--muted); }
.connect-shell { max-width: 580px; padding-bottom: 36px; }
.connect-card { margin: 26px 0 18px; }
.connect-icon { height: 58px; width: 58px; border-radius: 10px; margin-bottom: 24px; }
.connect-icon svg { width: 28px; height: 28px; }
.connect-card > #open-happ { margin-top: 26px; }
.manual-import { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.manual-import summary { cursor: pointer; color: var(--accent); font-size: 13px; line-height: 1.5; }
.manual-import .button { margin-top: 18px; }
.manual-import input { font-size: 12px; }
.connect-card .link-note { margin-bottom: 0; }
.payment-methods { display: grid; gap: 12px; margin-top: 20px; }
.payment-method { width: 100%; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.trial-card { margin-bottom: 22px; border-color: var(--copper-line); background: linear-gradient(120deg, #262a2d, #122026); }
.trial-card > .button { margin-top: 20px; }
.traffic-remaining { font-size: 25px; margin: 10px 0 0; color: var(--accent); }
.invitation-code { max-width: 280px; margin: 0 auto 18px; padding: 12px; background: white; border-radius: 8px; }
.invite-qr { display: block; width: 100%; height: auto; }
.guide-selector > label { margin-top: 0; }
.field-label { font-size: 12px; color: var(--muted); margin: 22px 0 10px; }
.client-selector { display: flex; flex-wrap: wrap; gap: 10px; }
.client-selector .button { flex: 1 1 110px; font-size: 12px; min-height: 44px; padding: 11px 13px; }
.guide-steps { margin-top: 18px; }
.guide-steps > h2 { color: var(--copper); margin-bottom: 0; }
.guide-sources { margin-top: 24px; color: var(--muted); font-size: 11px; }
.guide-sources summary { cursor: pointer; padding: 8px 0; }
.guide-sources a { display: block; width: fit-content; max-width: 100%; margin-top: 12px; color: var(--accent); line-height: 1.6; overflow-wrap: anywhere; }
.field-hint { font-size: 11px; line-height: 1.6; color: var(--muted); margin: 12px 0; }
.paid-floor { padding: 12px 14px; color: #c7e0dc; border: 1px solid #37646a; background: #12343a; border-radius: 8px; font-size: 12px; line-height: 1.7; }
.admin-access-form > .button { margin-top: 20px; }
.admin-grant-form { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.admin-grant-form h3 { margin: 0; font-size: 15px; }
.admin-grant-form > .button { margin-top: 20px; }
.purchase-ban { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.purchase-ban p { font-size: 12px; color: var(--muted); }
@media (max-width: 800px) {
  .plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { padding: calc(20px + env(safe-area-inset-top)) 20px 112px; }
  .masthead { margin-bottom: 28px; padding-bottom: 18px; }
  .brand { font-size: 13px; letter-spacing: 1.8px; gap: 9px; }
  .brand small { font-size: 7px; letter-spacing: 2px; }
  .brand-mark { width: 36px; height: 36px; font-size: 28px; }
  .member-pill { padding: 7px 8px; font-size: 8px; max-width: 128px; }
  .page-heading { margin-bottom: 24px; }
  h1 { font-size: 30px; letter-spacing: -1px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.5px; }
  .subtitle { font-size: 12px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 20px; border-radius: 13px; }
  .access-label { gap: 8px; }
  .membership-stage { padding: 15px 0 10px; margin: 0 -5px; }
  .plan-name { font-size: 34px; }
  .stats-card { gap: 22px; }
  .stat-number { font-size: 32px; }
  .row-card { padding: 18px; gap: 10px; margin-top: 14px; }
  .row-leading { gap: 12px; }
  .row-card h3 { font-size: 14px; }
  .row-card p { font-size: 11px; }
  .nav-item { flex-direction: column; gap: 5px; padding: 9px 8px; font-size: 10px; flex: 1; }
  .nav-item svg { width: 19px; height: 19px; }
  .bottom-nav { width: calc(100% - 28px); justify-content: space-around; border-radius: 12px; }
  .footnote { font-size: 10px; }
  .footnote span { display: none; }
  .plan-list { gap: 12px; }
  .plan-tile { padding: 14px; }
  .plan-tile h3 { font-size: 19px; }
  .plan-artwork { margin-bottom: 12px; }
  .plan-tile small { font-size: 11px; }
  .plan-price { font-size: 20px; margin: 12px 0; }
  .plan-price small { font-size: 10px; }
  .plan-buy { font-size: 11px; }
  .gate { padding: 40px 0; }
  .gate h1 { font-size: 31px; }
  .field-row { gap: 10px; }
  .person { padding: 17px; }
  .button-row { gap: 8px; }
  .connect-shell { padding-bottom: 36px; }
}
@media (max-width: 360px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .member-pill { font-size: 7px; max-width: 108px; }
  .brand { font-size: 12px; letter-spacing: 1.2px; }
  .plan-tile { padding: 12px; }
  .plan-tile h3 { font-size: 17px; }
  .plan-price { font-size: 18px; }
  .nav-item { font-size: 9px; padding-left: 3px; padding-right: 3px; }
  .access-label { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
