:root {
  color-scheme: dark;
  --bg: #101411;
  --surface: #161c18;
  --surface-raised: #1b231e;
  --surface-soft: #202923;
  --line: #2b342e;
  --line-strong: #3a463d;
  --text: #eff2ed;
  --muted: #9ca79e;
  --quiet: #707b72;
  --mint: #9be0b2;
  --mint-strong: #72c98e;
  --gold: #e9c778;
  --cyan: #82d2cf;
  --coral: #e8a1a0;
  --danger: #ed8582;
  --radius: 4px;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
a { color: inherit; text-decoration: none; }

.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.boot-screen p { margin: 0; }
.boot-screen small { color: var(--quiet); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #101711;
  background: var(--mint);
  font-weight: 900;
  font-size: 19px;
  line-height: 1;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 750; }
.button-symbol { font-size: 16px; line-height: 1; }
.muted { color: var(--muted); }
.small-copy { font-size: 12px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: 0;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint-strong);
  box-shadow: 0 0 0 3px rgb(114 201 142 / 12%);
}
.status-gold { background: var(--gold); box-shadow: 0 0 0 3px rgb(233 199 120 / 12%); }

.gate-layout, .auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(20px, 6vw, 92px);
  background:
    linear-gradient(90deg, transparent 49.95%, rgb(255 255 255 / 2.2%) 50%, transparent 50.05%),
    var(--bg);
}
.gate-header {
  width: 100%;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
}
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .62; cursor: wait; }
.button-primary { color: #102016; background: var(--mint); }
.button-primary:hover:not(:disabled) { background: #b2ecc3; }
.button-gold { color: #1c170a; background: var(--gold); }
.button-gold:hover:not(:disabled) { background: #f2d792; }
.button-quiet { min-height: 38px; color: var(--muted); background: transparent; border-color: var(--line); }
.button-quiet:hover { color: var(--text); border-color: var(--line-strong); background: #ffffff06; }
.button-outline { color: var(--text); background: transparent; border-color: var(--line-strong); }
.button-outline:hover { background: #ffffff08; border-color: #617064; }
.button-wide { width: 100%; min-height: 48px; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.text-button {
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.text-button:hover { color: var(--mint); }

.gate-content {
  width: min(100%, 1120px);
  flex: 1;
  display: grid;
  grid-template-columns: minmax(330px, .85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: 8%;
  margin: 0 auto;
  padding: 68px 0;
}
.gate-copy { width: min(100%, 430px); }
.gate-copy .eyebrow { color: var(--mint); }
.gate-copy h1, .auth-intro h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 680;
}
.gate-description { margin: 18px 0 36px; font-size: 14px; line-height: 1.8; }
.gate-rule {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.gate-rule strong { color: var(--text); font-size: 15px; font-weight: 650; }
.gate-rule strong small { color: var(--quiet); font-size: 11px; }
.gate-result.is-pass { color: var(--mint); }
.gate-result.is-fail { color: var(--coral); }
#speed-test { margin-top: 20px; }
.form-error { min-height: 18px; margin: 8px 0 0; color: var(--danger); font-size: 12px; line-height: 1.5; }
.microcopy { margin: 17px 0 0; color: var(--quiet); font-size: 11px; line-height: 1.6; }
.gate-aside { height: min(60vh, 450px); min-height: 340px; position: relative; overflow: hidden; border-left: 1px solid var(--line); }
.gate-aside::before {
  content: "";
  position: absolute;
  inset: 9% 6% 9% 17%;
  border: 1px solid #58655b55;
  background:
    linear-gradient(135deg, transparent 49.85%, #68756b2c 50%, transparent 50.15%),
    linear-gradient(45deg, transparent 49.85%, #68756b2c 50%, transparent 50.15%),
    repeating-linear-gradient(0deg, transparent 0 53px, #ffffff08 54px 55px),
    repeating-linear-gradient(90deg, transparent 0 53px, #ffffff08 54px 55px);
}
.gate-aside::after {
  content: "";
  position: absolute;
  width: 40%;
  aspect-ratio: 1;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border: 1px solid #9be0b255;
  border-radius: 50%;
  box-shadow: 0 0 0 28px #9be0b20a, 0 0 0 58px #9be0b207;
}
.orbit { position: absolute; z-index: 1; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.orbit-one { top: 24%; left: 31%; }
.orbit-two { right: 18%; bottom: 25%; width: 5px; height: 5px; background: var(--gold); }
.gate-emblem {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 52%;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, -50%);
}
.gate-emblem > span { width: 76px; height: 76px; display: grid; place-items: center; background: var(--mint); color: #102016; font-size: 42px; font-weight: 900; }
.gate-emblem small { color: var(--muted); font-size: 9px; line-height: 1.7; letter-spacing: 0; }
.gate-coordinate { position: absolute; z-index: 2; bottom: 18%; left: 23%; color: var(--quiet); font-family: ui-monospace, Consolas, monospace; font-size: 9px; line-height: 1.8; letter-spacing: 0; }
.gate-footer {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgb(255 255 255 / 7%);
  color: var(--quiet);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}
.network-verified { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }

.auth-content {
  width: min(100%, 980px);
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 390px;
  align-items: center;
  gap: clamp(48px, 9vw, 130px);
  margin: 0 auto;
  padding: 70px 0;
}
.auth-intro { max-width: 410px; }
.auth-intro .eyebrow { color: var(--mint); }
.auth-intro h1 { font-size: 42px; }
.auth-intro > .muted { margin: 17px 0 0; font-size: 13px; line-height: 1.8; }
.auth-lines { display: flex; gap: 8px; margin: 40px 0 24px; }
.auth-lines span { width: 52px; height: 2px; background: var(--mint); }
.auth-lines span:nth-child(2) { opacity: .42; }
.auth-lines span:nth-child(3) { opacity: .15; }
.auth-lines-gold span { background: var(--gold); }
.auth-panel {
  padding: 24px;
  border: 1px solid var(--line);
  background: #151a17;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: #0f1310; }
.auth-tabs button { min-height: 36px; border: 0; background: transparent; color: var(--quiet); font-size: 12px; cursor: pointer; }
.auth-tabs button.active { color: var(--text); background: #29322b; }
.form-stack { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.form-stack label, .password-change-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #bec7bf;
  font-size: 11px;
  font-weight: 600;
}
input, select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111612;
  color: var(--text);
  font-size: 12px;
}
input::placeholder { color: #626c64; }
input:disabled { color: var(--quiet); background: #111411; }
.form-stack .form-error { margin: -7px 0 -3px; }
.panel-footnote { margin: 17px 0 0; color: var(--quiet); font-size: 10px; line-height: 1.6; }
.admin-auth-layout .auth-intro .eyebrow { color: var(--gold); }
.admin-panel { border-top: 2px solid var(--gold); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-kicker, .secure-label {
  color: var(--gold);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
}
.secure-label { padding: 6px 8px; border: 1px solid #e9c7784a; }
.admin-panel .form-stack { margin-top: 16px; }

.member-shell { min-height: 100vh; background: #111612; }
.app-header {
  position: sticky;
  z-index: 5;
  top: 0;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(16 20 17 / 94%);
  backdrop-filter: blur(12px);
}
.app-header .brand-mark { width: 30px; height: 30px; font-size: 17px; }
.app-header .brand { font-size: 15px; }
.main-nav { display: flex; align-self: stretch; gap: 22px; }
.nav-link { position: relative; padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--mint); }
.account-menu { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.account-tier { color: var(--mint); font-size: 9px; font-weight: 750; }
.account-name { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; border: 0; background: none; color: var(--text); font-size: 12px; cursor: pointer; }
.logout-button { width: 31px; height: 31px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.logout-button:hover { border-color: var(--coral); color: var(--coral); }
.member-main { width: min(100% - 48px, 1240px); margin: 0 auto; }
.member-hero {
  min-height: 218px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.member-hero .eyebrow { color: var(--mint); }
.member-hero h1 { margin: 0; font-size: 38px; line-height: 1.2; font-weight: 690; }
.hero-period { color: var(--mint); }
.member-hero .muted { margin: 12px 0 0; font-size: 12px; }
.login-counter { min-width: 164px; padding-left: 24px; border-left: 1px solid var(--line); }
.counter-label, .counter-note { display: block; color: var(--quiet); font-size: 10px; }
.login-counter strong { display: block; margin: 6px 0; font-size: 30px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.counter-note { font-size: 8px; letter-spacing: 0; }
.member-overview {
  min-height: 125px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.overview-heading { display: flex; align-items: center; gap: 17px; }
.overview-heading h2, .section-heading h2 { margin: 0; font-size: 18px; font-weight: 630; }
.overview-heading .eyebrow, .section-heading .eyebrow { margin-bottom: 7px; }
.tier-seal {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--mint);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
}
.overview-details { display: flex; gap: clamp(20px, 4vw, 62px); }
.overview-details > div { display: flex; flex-direction: column; gap: 7px; }
.overview-details span { color: var(--quiet); font-size: 10px; }
.overview-details strong { font-size: 12px; font-weight: 580; }
.download-section { padding: 27px 0 31px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.download-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.download-row { min-width: 0; min-height: 78px; display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-right: 1px solid var(--line); }
.download-row:first-child { border-left: 1px solid var(--line); }
.download-row:hover:not(.download-disabled) { background: #ffffff06; }
.download-disabled { color: var(--quiet); cursor: not-allowed; }
.download-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--mint); font-size: 17px; }
.download-row > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.download-row strong { font-size: 11px; font-weight: 650; }
.download-row small { color: var(--quiet); font-size: 9px; }
.download-arrow { align-self: flex-start; color: var(--quiet); font-size: 12px; }
.download-disabled .download-icon { color: var(--quiet); }
.directory-section { padding: 31px 0 56px; }
.directory-heading { align-items: flex-end; margin-bottom: 20px; }
.heading-count { margin-left: 6px; color: var(--quiet); font-size: 11px; font-weight: 500; }
.search-box, .admin-search {
  width: min(100%, 228px);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--quiet);
}
.search-box input, .admin-search input { height: 32px; padding: 0; border: 0; background: transparent; font-size: 11px; }
.search-box input:focus, .admin-search input:focus { outline: 0; }
.search-box kbd { padding: 1px 5px; border: 1px solid var(--line); color: var(--quiet); font-family: inherit; font-size: 9px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 17px; }
.filter-bar button { min-height: 32px; display: inline-flex; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.filter-bar button span { color: var(--quiet); font-size: 9px; }
.filter-bar button:hover { color: var(--text); }
.filter-bar button.active { border-color: var(--line-strong); background: #ffffff08; color: var(--text); }
.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.profile-card {
  min-height: 192px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tier) 8%, transparent), transparent 45%),
    #171d19;
}
.profile-card::after { content: ""; position: absolute; top: -42px; right: -42px; width: 94px; height: 94px; border: 1px solid color-mix(in srgb, var(--tier) 21%, transparent); transform: rotate(45deg); }
.profile-card-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.profile-index { color: #657168; font-family: ui-monospace, Consolas, monospace; font-size: 9px; }
.profile-state { color: var(--quiet); font-size: 8px; white-space: nowrap; }
.profile-state::first-letter { color: var(--tier); }
.profile-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 16px 0 11px;
  border: 1px solid color-mix(in srgb, var(--tier) 45%, var(--line));
  color: var(--tier);
  background: color-mix(in srgb, var(--tier) 8%, #161c18);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 16px;
}
.profile-name { max-width: 100%; overflow: hidden; color: #e0e7df; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.profile-meta { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: 9px; }
.tier-mark, .tier-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--tier); }
.profile-card-bottom { width: 100%; display: flex; justify-content: space-between; gap: 4px; margin-top: auto; padding-top: 14px; color: var(--quiet); font-family: ui-monospace, Consolas, monospace; font-size: 7px; letter-spacing: 0; }
.is-hidden .profile-avatar { border-style: dashed; color: #778178; background: #ffffff04; }
.tier-ordinary { --tier: #91d7a8; }
.tier-ordinary_lifetime { --tier: #e9c778; }
.tier-custom { --tier: #82d2cf; }
.tier-custom_lifetime { --tier: #e8a1a0; }
.account-tier.tier-ordinary { color: #91d7a8; }
.account-tier.tier-ordinary_lifetime { color: #e9c778; }
.account-tier.tier-custom { color: #82d2cf; }
.account-tier.tier-custom_lifetime { color: #e8a1a0; }
.tier-seal.tier-ordinary, .tier-text.tier-ordinary { color: #91d7a8; }
.tier-seal.tier-ordinary_lifetime, .tier-text.tier-ordinary_lifetime { color: #e9c778; }
.tier-seal.tier-custom, .tier-text.tier-custom { color: #82d2cf; }
.tier-seal.tier-custom_lifetime, .tier-text.tier-custom_lifetime { color: #e8a1a0; }
.empty-state { grid-column: 1 / -1; padding: 35px 0; color: var(--quiet); font-size: 12px; }
.member-footer { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); border-top: 1px solid var(--line); color: var(--quiet); font-size: 9px; }

.center-main { width: min(100% - 48px, 1000px); margin: 0 auto; padding: 56px 0 80px; }
.center-heading { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.center-heading .eyebrow { color: var(--mint); }
.center-heading h1 { margin: 0; font-size: 34px; font-weight: 680; }
.center-heading .muted { margin: 10px 0 0; font-size: 12px; }
.center-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; padding: 33px 0; border-bottom: 1px solid var(--line); }
.center-section { min-width: 0; }
.center-section .section-heading { align-items: center; margin-bottom: 22px; }
.identity-list { margin: 0; }
.identity-list > div { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.identity-list dt { color: var(--muted); font-size: 11px; }
.identity-list dd { margin: 0; font-size: 11px; font-weight: 600; text-align: right; }
.toggle-row { position: relative; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 12px; border: 1px solid var(--line); cursor: pointer; }
.toggle-row > span:first-child { display: flex; flex-direction: column; gap: 6px; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { color: var(--quiet); font-size: 9px; }
.toggle-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-ui { width: 38px; height: 21px; position: relative; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 15px; background: #111612; transition: background .16s ease; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #737d74; transition: transform .16s ease, background .16s ease; }
.toggle-row input:checked + .toggle-ui { border-color: var(--mint-strong); background: #42744e; }
.toggle-row input:checked + .toggle-ui::after { transform: translateX(17px); background: #e9f7ed; }
.toggle-row input:focus-visible + .toggle-ui { outline: 2px solid var(--mint); outline-offset: 3px; }
.password-section .form-stack { margin-top: 0; }
.password-section .form-stack .button { align-self: flex-start; }
.return-link { margin-top: 20px; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); background: #121612; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 21px 16px; border-right: 1px solid var(--line); background: #141915; }
.admin-sidebar .brand { gap: 9px; padding: 0 4px; font-size: 14px; }
.admin-sidebar .brand-mark { width: 29px; height: 29px; font-size: 16px; }
.admin-side-label { margin: 47px 9px 12px; color: #727c72; font-size: 8px; font-weight: 750; letter-spacing: 0; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav button { min-height: 40px; display: flex; align-items: center; gap: 11px; padding: 0 10px; border: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; font-size: 11px; cursor: pointer; }
.admin-nav button:hover { background: #ffffff05; color: var(--text); }
.admin-nav button.active { border-color: #6d6041; background: #e9c7780c; color: #f1d58f; }
.side-nav-mark { width: 16px; color: var(--quiet); text-align: center; font-size: 14px; }
.admin-nav button.active .side-nav-mark { color: var(--gold); }
.sidebar-bottom { display: flex; flex-direction: column; gap: 18px; margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.admin-status { display: flex; align-items: center; gap: 8px; color: var(--quiet); font-size: 8px; letter-spacing: 0; }
.sidebar-logout { display: flex; justify-content: space-between; padding: 0; border: 0; background: none; color: var(--muted); text-align: left; font-size: 10px; cursor: pointer; }
.sidebar-logout:hover { color: var(--coral); }
.admin-main { min-width: 0; }
.admin-topbar { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.admin-crumb { color: var(--quiet); font-family: ui-monospace, Consolas, monospace; font-size: 8px; letter-spacing: 0; }
.admin-topbar h1 { margin: 5px 0 0; font-size: 18px; font-weight: 640; }
.admin-top-user { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.admin-top-logout { display: none; }
.admin-avatar { width: 27px; height: 27px; display: grid; place-items: center; color: #1a170e; background: var(--gold); font-size: 13px; font-weight: 900; }
.admin-avatar-large { width: 42px; height: 42px; font-size: 19px; }
.admin-content { width: min(100%, 1380px); padding: 24px clamp(20px, 4vw, 56px) 50px; }
.admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 19px; border: 1px solid var(--line); }
.admin-metrics > div { min-height: 76px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px 15px; border-right: 1px solid var(--line); }
.admin-metrics > div:last-child { border-right: 0; }
.admin-metrics span { color: var(--quiet); font-size: 9px; }
.admin-metrics strong { font-size: 20px; line-height: 1; font-weight: 630; font-variant-numeric: tabular-nums; }
.admin-section { padding: 19px; border: 1px solid var(--line); background: #151a16; }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.admin-section-head h2 { margin: 0; font-size: 14px; font-weight: 640; }
.admin-section-head p { margin: 6px 0 0; color: var(--quiet); font-size: 10px; line-height: 1.6; }
.admin-head-actions { display: flex; gap: 8px; }
.bulk-rename { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(180px, 240px); align-items: end; gap: 8px; margin-bottom: 13px; }
.bulk-rename > label { display: flex; flex-direction: column; gap: 6px; color: var(--quiet); font-size: 9px; }
.bulk-rename input { height: 35px; font-size: 10px; }
.admin-search { height: 35px; width: 100%; }
.admin-search input { height: 31px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.admin-table th { height: 34px; padding: 0 10px; background: #1b211c; color: var(--quiet); font-size: 8px; font-weight: 650; }
.admin-table td { height: 56px; padding: 7px 10px; border-top: 1px solid var(--line); color: #c9d0c9; font-size: 9px; }
.admin-table tbody tr:hover { background: #ffffff03; }
.admin-table td:first-child { min-width: 155px; }
.admin-table td:first-child > small { display: block; margin-top: 4px; color: var(--quiet); font-size: 8px; }
.admin-table code { color: var(--gold); font-size: 10px; }
.table-name { width: 142px; height: 30px; padding: 0 7px; font-size: 10px; }
.table-tier { width: 128px; height: 30px; padding: 0 5px; font-size: 9px; }
.table-password { width: 130px; height: 30px; padding: 0 7px; font-size: 9px; }
.mini-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.mini-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mini-toggle > span { width: 27px; height: 15px; position: relative; border: 1px solid var(--line-strong); border-radius: 10px; background: #101411; }
.mini-toggle > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: #7a837b; transition: transform .14s ease; }
.mini-toggle input:checked + span { border-color: #75977c; background: #344e39; }
.mini-toggle input:checked + span::after { transform: translateX(11px); background: var(--mint); }
.mini-toggle small { color: var(--muted); font-size: 8px; }
.table-save { padding: 5px 8px; border: 1px solid #536b58; background: #9be0b20b; color: var(--mint); font-size: 9px; cursor: pointer; }
.table-save:hover { background: #9be0b21b; }
.table-footer { min-height: 44px; display: flex; align-items: center; justify-content: space-between; color: var(--quiet); font-size: 9px; }
.table-footer > div { display: flex; align-items: center; gap: 10px; }
.page-button { width: 26px; height: 25px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.page-button:disabled { opacity: .35; cursor: default; }
.empty-cell { height: 74px !important; color: var(--quiet) !important; text-align: center; }
.admin-subline { display: flex; align-items: center; gap: 9px; margin: 13px 3px 0; color: var(--quiet); font-size: 9px; }
.admin-subline .status-dot { width: 5px; height: 5px; color: var(--gold); background: var(--gold); }
.voucher-list-head { margin: 27px 0 14px; }
.voucher-list-head .admin-search { max-width: 230px; }
.copy-code { margin-left: 9px; border: 0; background: none; color: var(--quiet); cursor: pointer; }
.copy-code:hover { color: var(--gold); }
.voucher-state { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; }
.voucher-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.voucher-state.available { color: var(--mint); }
.voucher-state.redeemed { color: var(--quiet); }
.tier-text { font-size: 9px; }
.admin-form-grid { display: grid; grid-template-columns: 1.25fr 1fr .7fr auto; align-items: end; gap: 10px; padding: 16px; border: 1px solid var(--line); background: #111612; }
.admin-form-grid label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 9px; }
.admin-form-grid input, .admin-form-grid select { height: 37px; }
.admin-form-grid .button { min-height: 37px; white-space: nowrap; }
.settings-panel { max-width: 900px; }
.settings-panel > .admin-section-head { margin-bottom: 22px; }
.settings-form { display: flex; flex-direction: column; gap: 25px; }
.speed-setting { width: min(100%, 330px); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 10px; }
.speed-setting input { grid-column: 1; grid-row: 2; }
.speed-setting > span { grid-column: 2; grid-row: 2; color: var(--quiet); font-size: 10px; }
.download-settings { border-top: 1px solid var(--line); }
.settings-subhead { padding: 16px 0 8px; }
.settings-subhead h3, .password-change-form h3, .rollover-note h3 { margin: 0; font-size: 12px; font-weight: 630; }
.settings-subhead p { margin: 6px 0 0; color: var(--quiet); font-size: 9px; }
.download-setting { min-height: 48px; display: grid; grid-template-columns: 8px 140px minmax(0, 1fr); align-items: center; gap: 12px; border-top: 1px solid #263029; color: var(--muted); font-size: 10px; }
.download-setting input { height: 33px; font-size: 10px; }
.settings-form > .button { align-self: flex-start; }
.rollover-note { max-width: 900px; display: flex; align-items: center; gap: 15px; margin-top: 13px; padding: 15px 19px; }
.note-mark { width: 38px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #e9c7784d; color: var(--gold); font-family: ui-monospace, Consolas, monospace; font-size: 9px; }
.rollover-note p { margin: 5px 0 0; color: var(--quiet); font-size: 9px; line-height: 1.5; }
.security-panel { max-width: 720px; }
.admin-identity { min-height: 80px; display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-identity > div { display: flex; flex-direction: column; gap: 5px; }
.admin-identity small { color: var(--quiet); font-size: 9px; }
.admin-identity strong { font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 6px 8px; border: 1px solid #e9c77836; color: var(--gold); font-size: 9px; }
.password-change-form { width: min(100%, 380px); display: flex; flex-direction: column; gap: 13px; padding-top: 21px; }
.password-change-form h3 { margin-bottom: 3px; }
.password-change-form .button { align-self: flex-start; }
.security-footnote { max-width: 720px; display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 14px 17px; border: 1px solid var(--line); color: var(--quiet); }
.security-footnote .status-dot { width: 5px; height: 5px; margin-top: 4px; }
.security-footnote p { margin: 0; font-size: 9px; line-height: 1.6; }

.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: #080b09c9; }
.dialog { width: min(100%, 430px); position: relative; padding: 25px; border: 1px solid var(--line-strong); border-top: 2px solid var(--mint); background: #171d19; box-shadow: 0 22px 80px #0009; }
.dialog h2 { margin: 0; font-size: 20px; font-weight: 650; }
.dialog .form-stack { margin-top: 20px; }
.dialog-close { position: absolute; top: 12px; right: 13px; width: 29px; height: 29px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; }
.toast-region { position: fixed; z-index: 50; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { max-width: min(370px, calc(100vw - 40px)); padding: 12px 15px; border: 1px solid #63836a; background: #1b2820; color: #d7f0dd; box-shadow: 0 8px 30px #0005; font-size: 11px; animation: toast-in .2s ease-out; }
.toast-error { border-color: #895754; background: #2a1b1a; color: #f4c5c2; }
.spinner { width: 14px; height: 14px; border: 2px solid #10201655; border-top-color: #102016; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .member-main { width: min(100% - 80px, 1320px); }
  .profile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .gate-content { grid-template-columns: minmax(280px, .9fr) minmax(250px, 1.1fr); gap: 4%; }
  .auth-content { grid-template-columns: minmax(250px, 1fr) minmax(310px, 370px); gap: 40px; }
  .member-overview { grid-template-columns: minmax(180px, 1fr) 1.7fr auto; gap: 13px; }
  .overview-details { gap: 20px; }
  .profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .admin-content { padding-right: 20px; padding-left: 20px; }
}
@media (max-width: 720px) {
  .gate-layout, .auth-layout { padding: 0 20px; background: var(--bg); }
  .gate-header { height: 66px; }
  .gate-content { display: block; padding: 54px 0 38px; }
  .gate-copy { width: 100%; max-width: 460px; margin: 0 auto; }
  .gate-copy h1, .auth-intro h1 { font-size: 34px; }
  .gate-description { margin: 14px 0 27px; }
  .gate-aside { display: none; }
  .gate-footer { min-height: 50px; font-size: 8px; }
  .gate-footer span:last-child { text-align: right; }
  .auth-content { display: flex; flex-direction: column; align-items: stretch; gap: 28px; padding: 37px 0; }
  .auth-intro { max-width: none; }
  .auth-intro h1 { font-size: 31px; }
  .auth-intro > .muted { margin-top: 10px; }
  .auth-lines { margin: 20px 0 9px; }
  .auth-panel { padding: 18px; }
  .network-verified { font-size: 9px; }
  .app-header { height: 59px; gap: 17px; padding: 0 16px; }
  .app-header .brand { gap: 7px; font-size: 13px; }
  .app-header .brand-mark { width: 27px; height: 27px; }
  .main-nav { gap: 13px; }
  .nav-link { font-size: 10px; }
  .account-menu { gap: 7px; }
  .account-tier { display: none; }
  .account-name { max-width: 102px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .logout-button { width: 27px; height: 27px; }
  .member-main { width: calc(100% - 32px); }
  .member-hero { min-height: 170px; }
  .member-hero h1 { font-size: 31px; }
  .member-hero .muted { max-width: 220px; font-size: 10px; }
  .login-counter { min-width: 100px; padding-left: 13px; }
  .login-counter strong { font-size: 25px; }
  .counter-note { font-size: 7px; }
  .member-overview { grid-template-columns: 1fr auto; gap: 15px 10px; padding: 18px 0; }
  .overview-heading { gap: 10px; }
  .overview-heading h2, .section-heading h2 { font-size: 16px; }
  .tier-seal { width: 49px; height: 49px; font-size: 7px; }
  .overview-details { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 10px; }
  .overview-details span { font-size: 9px; }
  .overview-details strong { font-size: 10px; }
  .overview-heading + .overview-details + .button { grid-column: 2; grid-row: 1; min-height: 34px; padding: 0 9px; font-size: 10px; }
  .download-section { padding: 23px 0; }
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-row { min-height: 66px; padding: 10px; }
  .download-row:nth-child(2) { border-right: 0; }
  .download-row:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .download-row:nth-child(3) { border-left: 1px solid var(--line); }
  .download-icon { width: 27px; height: 27px; }
  .download-row strong { font-size: 10px; }
  .download-row small { font-size: 8px; }
  .directory-section { padding-top: 24px; }
  .directory-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .search-box { width: 100%; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-bar button { flex: 0 0 auto; font-size: 9px; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .profile-card { min-height: 177px; padding: 11px; }
  .profile-state { font-size: 7px; }
  .profile-name { font-size: 10px; }
  .profile-meta { font-size: 8px; }
  .member-footer { min-height: 52px; padding: 0 16px; font-size: 8px; }
  .center-main { width: calc(100% - 34px); padding: 36px 0 55px; }
  .center-heading h1 { font-size: 29px; }
  .center-grid { grid-template-columns: 1fr; gap: 30px; padding: 24px 0; }
  .admin-shell { display: block; }
  .admin-sidebar { position: sticky; z-index: 8; top: 0; width: 100%; height: 58px; flex-direction: row; align-items: center; gap: 15px; padding: 0 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-sidebar .brand { flex: 0 0 auto; font-size: 12px; }
  .admin-sidebar .brand-mark { width: 25px; height: 25px; font-size: 14px; }
  .admin-side-label, .sidebar-bottom { display: none; }
  .admin-nav { min-width: 0; flex: 1; flex-direction: row; justify-content: flex-end; gap: 3px; }
  .admin-nav button { min-height: 34px; gap: 4px; padding: 0 6px; font-size: 8px; }
  .side-nav-mark { width: 11px; font-size: 11px; }
  .admin-topbar { min-height: 68px; padding: 11px 15px; }
  .admin-topbar h1 { font-size: 16px; }
  .admin-top-user { font-size: 9px; }
  .admin-top-logout { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
  .admin-top-logout:hover { border-color: var(--coral); color: var(--coral); }
  .admin-content { padding: 14px 12px 35px; }
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metrics > div { min-height: 62px; padding: 9px 12px; }
  .admin-metrics > div:nth-child(2) { border-right: 0; }
  .admin-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .admin-metrics strong { font-size: 17px; }
  .admin-section { padding: 14px 11px; }
  .admin-section-head { align-items: flex-start; flex-direction: column; gap: 11px; }
  .admin-head-actions { width: 100%; }
  .admin-head-actions .button { flex: 1; }
  .bulk-rename { grid-template-columns: minmax(0, 1fr) auto; }
  .bulk-rename .admin-search { grid-column: 1 / -1; }
  .bulk-rename > .button { min-height: 35px; }
  .admin-form-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 11px; }
  .admin-form-grid label:first-child { grid-column: 1 / -1; }
  .admin-form-grid .button { width: 100%; }
  .voucher-list-head { margin-top: 23px; }
  .voucher-list-head .admin-search { max-width: none; }
  .download-setting { grid-template-columns: 8px 105px minmax(0, 1fr); gap: 8px; font-size: 9px; }
  .download-setting input { padding: 0 6px; font-size: 8px; }
  .rollover-note { align-items: flex-start; }
}
@media (max-width: 390px) {
  .app-header { gap: 10px; padding: 0 10px; }
  .main-nav { gap: 8px; }
  .account-name { max-width: 76px; }
  .admin-sidebar { gap: 8px; padding: 0 8px; }
  .admin-nav button { flex-direction: column; gap: 0; padding: 2px 4px; font-size: 7px; }
  .side-nav-mark { width: auto; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
