:root {
  color-scheme: dark;
  --bg: #0F0F10;
  --bg-deep: #08090E;
  --card: #1B1B1D;
  --card-soft: rgba(27, 27, 29, .78);
  --card-strong: #222226;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .20);
  --text: #FFFFFF;
  --muted: #A0A0A0;
  --muted-dim: #73737C;
  --accent: #8B7CFF;
  --accent-deep: #6C4BFF;
  --accent-soft: rgba(139, 124, 255, .15);
  --success: #4ADE80;
  --danger: #FF6B6B;
  --shadow: 0 24px 68px rgba(0, 0, 0, .42);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, .28);
  --nav-height: 86px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(142deg, rgba(31, 133, 255, .10), transparent 28%),
    linear-gradient(36deg, rgba(139, 124, 255, .10), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 36%),
    var(--bg-deep);
  color: var(--text);
  font-family: Inter, SF Pro Display, SF Pro Text, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 13.5rem;
  font-size: 32px;
  font-weight: 780;
  line-height: 1.04;
}

h2 {
  font-size: 22px;
  font-weight: 760;
  line-height: 1.15;
}

h3 {
  color: rgba(255, 255, 255, .94);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.25;
}

p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .052), transparent 238px),
    linear-gradient(142deg, rgba(23, 124, 255, .07), transparent 35%),
    linear-gradient(145deg, rgba(139, 124, 255, .075), transparent 48%),
    var(--bg);
  box-shadow: var(--shadow);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: -20% -35% auto;
  height: 360px;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0%, rgba(255, 255, 255, .065) 40%, transparent 64%);
  opacity: .36;
  transform: translateX(-16%);
}

.viewport {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(var(--nav-height) + 24px + env(safe-area-inset-bottom));
}

.topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: #000000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 12px 28px rgba(0, 0, 0, .30), 0 0 30px rgba(139, 124, 255, .11);
  line-height: 0;
  contain: paint;
}

.brand-mark > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-text {
  display: block;
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: 19px;
  font-weight: 760;
  line-height: 1.08;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
}

.payment-badge {
  position: relative;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.status-pill.success {
  border-color: rgba(74, 222, 128, .28);
  background: rgba(74, 222, 128, .08);
  color: var(--success);
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
  animation: screenIn 280ms var(--ease);
}

.glass-surface {
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .035)),
    rgba(27, 27, 29, .72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .10);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.surface-panel {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  position: relative;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(128deg, transparent 0%, rgba(255, 255, 255, .125) 34%, transparent 56%),
    linear-gradient(180deg, rgba(139, 124, 255, .12), transparent 63%);
  opacity: .42;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.detail-row span {
  color: var(--muted);
  font-size: 12px;
}

.detail-row strong {
  font-size: 13px;
  font-weight: 680;
  text-align: right;
}

.home-link-row {
  align-items: flex-start;
  cursor: pointer;
  transition: background 160ms var(--ease), opacity 160ms var(--ease);
}

.home-link-row:hover,
.home-link-row:focus-visible {
  background: rgba(255, 255, 255, .035);
}

.home-link-row:active {
  opacity: .78;
}

.home-link-row code {
  max-width: 68%;
  display: block;
  color: #C3BCFF;
  font-family: inherit;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.35;
  text-align: right;
  word-break: break-all;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 22px;
}

.auth-widget {
  min-height: 46px;
  display: flex;
  align-items: center;
}

.auth-link {
  color: #C3BCFF;
  font-weight: 680;
}

.benefits-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
  padding: 18px;
  border-radius: 24px;
}

.section-heading {
  display: grid;
  gap: 5px;
}

.section-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.benefit-list {
  display: grid;
  gap: 0;
}

.benefit-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.benefit-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.benefit-item:last-child {
  padding-bottom: 0;
}

.benefit-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)),
    rgba(139, 124, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font-size: 15px;
  line-height: 1;
}

.benefit-item strong {
  display: block;
  font-size: 13px;
  font-weight: 720;
}

.benefit-item div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.benefit-item .benefit-icon {
  color: var(--text);
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.back-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: transform 120ms var(--ease), background 180ms var(--ease);
}

.purchase-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
  border-radius: 26px;
}

.flow-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
}

.step-number,
.setup-guide li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03)),
    var(--accent);
  box-shadow: 0 0 20px rgba(139, 124, 255, .30);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 760;
}

.flow-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.choice-button,
.device-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .052);
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
  transition:
    transform 160ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.choice-button {
  min-height: 74px;
  padding: 10px 7px;
  border-radius: 16px;
  text-align: center;
}

.choice-button span,
.choice-button strong {
  display: block;
}

.choice-button span {
  font-size: 19px;
  font-weight: 760;
}

.choice-button strong {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}

.device-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.device-button {
  min-height: 44px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 720;
}

.choice-button:hover,
.device-button:hover,
.payment-row:hover,
.button:hover {
  transform: translateY(-1px);
}

.choice-button.is-selected,
.device-button.is-selected {
  border-color: rgba(139, 124, 255, .78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025)),
    rgba(139, 124, 255, .20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 12px 26px rgba(139, 124, 255, .13);
}

.total-card {
  min-height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.total-card span {
  max-width: 15ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.total-card strong {
  font-size: 31px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.total-price-stack {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.total-price-stack small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.2;
}

.promo-panel {
  display: grid;
  gap: 8px;
}

.promo-panel label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.promo-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}

.promo-control input {
  min-width: 0;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 12px;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.promo-control input:focus {
  border-color: rgba(139, 124, 255, .70);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, .12);
}

.payment-card {
  margin-top: 14px;
  padding: 15px;
  border-radius: 24px;
}

.payment-card h3 {
  margin-bottom: 10px;
}

.payment-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms var(--ease), opacity 180ms var(--ease);
}

.payment-row:first-of-type {
  border-top: 0;
}

.payment-row:disabled {
  opacity: .45;
  cursor: default;
}

.payment-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.payment-hint {
  margin: 2px 0 8px 44px;
}

.payment-badge {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(139, 124, 255, .15);
  color: var(--accent);
}

.payment-badge::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.star-badge {
  color: #F7C948;
  background: rgba(247, 201, 72, .12);
}

.star-badge::before {
  width: 14px;
  height: 14px;
  border: 0;
  background: currentColor;
  clip-path: polygon(50% 0%, 62% 35%, 100% 35%, 69% 56%, 81% 92%, 50% 70%, 19% 92%, 31% 56%, 0% 35%, 38% 35%);
}

.row-arrow {
  color: var(--muted);
  font-size: 22px;
}

.access-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
}

.access-client-guide {
  width: 100%;
}

.access-guide {
  display: grid;
  gap: 12px;
}

.access-guide-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.access-guide-heading h3 {
  font-size: 18px;
}

.access-platform-picker {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.access-platform-picker > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.access-platform-toggle {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.access-platform-toggle:focus-visible,
.access-platform-option:focus-visible,
.access-client-choice:focus-visible,
.access-guide-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.access-platform-toggle-mark {
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms var(--ease);
}

.access-platform-toggle[aria-expanded="true"] .access-platform-toggle-mark {
  transform: rotate(225deg) translate(-2px, -2px);
}

.access-platform-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 4;
  width: max(100%, 156px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 4px;
  background: var(--card-strong);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.access-platform-option {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
  text-align: left;
}

.access-platform-option:hover,
.access-platform-option[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--text);
}

.access-client-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.access-client-choice {
  position: relative;
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  padding: 0 12px 0 18px;
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), transform 110ms ease;
}

.access-client-choice:active {
  transform: scale(.99);
}

.access-client-choice-mark {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(139, 124, 255, .45);
}

.access-client-choice strong {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 760;
}

.access-client-choice-logo {
  position: absolute;
  right: 8px;
  color: rgba(255, 255, 255, .10);
  font-size: 19px;
  font-weight: 900;
}

.access-client-choice.active {
  border-color: rgba(139, 124, 255, .58);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(139, 124, 255, .18), rgba(255, 255, 255, .035));
}

.access-client-instructions {
  display: grid;
  gap: 9px;
}

.access-client-details {
  display: grid;
  gap: 10px;
}

.access-setup-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: rgba(255, 255, 255, .035);
}

.access-setup-card h4 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.access-setup-card p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.48;
}

.access-setup-step {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 124, 255, .42);
  border-radius: 50%;
  background: rgba(139, 124, 255, .12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.access-setup-step.success {
  border-color: rgba(74, 222, 128, .34);
  background: rgba(74, 222, 128, .10);
  color: var(--success);
}

.access-guide-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  margin-top: 10px;
  padding: 0 13px;
  background: var(--accent-soft);
  color: #c3bcff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.access-guide-button.secondary {
  background: rgba(255, 255, 255, .07);
  color: var(--text);
}

.access-guide-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.access-guide-actions .access-guide-button {
  width: 100%;
}

.access-guide-actions.single {
  grid-template-columns: 1fr;
}

.access-client-store-warning {
  margin-top: 9px;
  border-left: 2px solid #ffc45c;
  padding-left: 9px;
  color: #ffd78c;
  font-size: 11px;
  line-height: 1.45;
}

.access-link-placeholder {
  text-align: center;
}

.copy-field {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.setup-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 22px;
}

.setup-guide {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-guide li {
  min-height: 66px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.setup-guide li:first-child {
  border-top: 0;
  padding-top: 2px;
}

.setup-guide li:last-child {
  padding-bottom: 0;
}

.integrated-guide li {
  align-items: flex-start;
}

.setup-guide strong,
.setup-guide small {
  display: block;
}

.setup-guide strong {
  font-size: 13px;
  font-weight: 700;
}

.setup-guide small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.setup-guide a {
  color: #C3BCFF;
  font-weight: 700;
}

.setup-link-field {
  margin-top: 10px;
}

.setup-actions {
  margin-top: 10px;
}

.list-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
}

button.list-row {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

button.list-row:disabled {
  opacity: .55;
  cursor: default;
}

.auto-renew-confirmation {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.auto-renew-confirmation strong {
  color: var(--text);
  font-size: 14px;
}

.auto-renew-confirmation > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auto-renew-confirmation > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.auto-renew-confirmation .button {
  min-height: 42px;
  padding: 0 10px;
  font-size: 12px;
}

.auto-renew-confirmation .button.danger {
  margin-top: 0;
}

.list-row:first-child {
  border-top: 0;
}

.list-row span {
  color: var(--muted);
  font-size: 13px;
}

.list-row strong {
  font-size: 14px;
  font-weight: 680;
  text-align: right;
}

.profile-head {
  min-height: 188px;
  display: grid;
  place-items: center;
  gap: 7px;
  text-align: center;
}

.avatar {
  width: 70px;
  height: 70px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .04)),
    rgba(139, 124, 255, .20);
  box-shadow: 0 14px 34px rgba(139, 124, 255, .18);
  font-size: 24px;
  font-weight: 760;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar.has-image {
  background: rgba(255, 255, 255, .05);
}

.section-title {
  margin: 22px 0 10px;
}

.list-panel {
  overflow: hidden;
  padding: 0 14px;
  border-radius: 22px;
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.referral-stats > div {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, .04);
}

.referral-stats span {
  color: var(--muted);
  font-size: 11px;
}

.referral-stats strong {
  font-size: 17px;
  font-weight: 760;
}

.referral-convert {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, .04);
}

.referral-convert span,
.hint-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .04);
}

.history-row span,
.history-row strong {
  display: grid;
  gap: 3px;
}

.history-row span {
  color: var(--text);
  font-size: 13px;
}

.history-row strong {
  text-align: right;
  font-size: 14px;
}

.history-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#profileActions {
  margin-top: 10px;
}

.button {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  padding: 0 16px;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 720;
  transition: transform 120ms var(--ease), opacity 180ms var(--ease), box-shadow 180ms var(--ease), filter 180ms var(--ease);
}

.button.primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03)),
    linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 16px 34px rgba(139, 124, 255, .24), inset 0 1px 0 rgba(255, 255, 255, .20);
}

.button.secondary,
.button.ghost {
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.button.danger {
  margin-top: 14px;
  background: rgba(255, 107, 107, .08);
  color: var(--danger);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.button:active,
.payment-row:active,
.nav-item:active,
.back-button:active {
  transform: scale(.98);
  filter: brightness(.94);
}

.button:disabled {
  opacity: .45;
  cursor: default;
}

.status-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.status-message.success {
  color: var(--success);
}

.status-message.danger {
  color: var(--danger);
}

.admin-body {
  min-height: 100vh;
  padding: 18px;
  background:
    linear-gradient(142deg, rgba(139, 124, 255, .10), transparent 34%),
    var(--bg-deep);
}

.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-bottom: 40px;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 28px;
}

.admin-header h1 {
  max-width: none;
  margin-top: 8px;
  font-size: 34px;
}

.admin-kicker,
.admin-section-head span,
.admin-account span,
.admin-muted,
.admin-empty {
  color: var(--muted);
  font-size: 13px;
}

.admin-account {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .05);
}

.admin-account strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.admin-message {
  margin-top: 14px;
  border: 1px solid rgba(74, 222, 128, .28);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(74, 222, 128, .08);
  color: var(--success);
  font-size: 14px;
}

.admin-section {
  margin-top: 22px;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-subhead {
  margin-top: 18px;
}

.admin-link-button,
.admin-card button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  background: rgba(139, 124, 255, .18);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  background: var(--card);
}

.admin-stat span {
  color: var(--muted);
  font-size: 12px;
}

.admin-stat strong {
  font-size: 21px;
}

.admin-xui-box {
  margin-top: 10px;
}

.admin-xui {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--card);
}

.admin-xui.success {
  border-color: rgba(74, 222, 128, .28);
  color: var(--success);
}

.admin-xui.danger {
  border-color: rgba(255, 107, 107, .30);
  color: var(--danger);
}

.admin-monitor-chart {
  display: block;
  width: 100%;
  height: auto;
}

.admin-monitor-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.admin-monitor-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-monitor-point {
  fill: var(--accent);
}

.admin-monitor-label {
  fill: var(--muted);
  font-size: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-settings-card {
  margin-bottom: 12px;
}

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: var(--card);
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-card-head strong,
.admin-card-head span {
  display: block;
}

.admin-card-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-state-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 8px;
}

.admin-toggle-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-client-settings {
  display: grid;
  gap: 10px;
}

.admin-client-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  background: rgba(255, 255, 255, .025);
}

.admin-client-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-client-row-head strong {
  font-size: 14px;
}

.admin-client-row-head span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.admin-client-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-client-fields .admin-client-url {
  grid-column: 1 / -1;
}

.admin-client-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.admin-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.admin-card .admin-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
}

.admin-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-toggle-track {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}

.admin-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
  transition: transform .18s var(--ease), background .18s var(--ease);
}

.admin-toggle input:checked + .admin-toggle-track {
  border-color: rgba(139, 124, 255, .58);
  background: rgba(139, 124, 255, .28);
}

.admin-toggle input:checked + .admin-toggle-track span {
  transform: translateX(20px);
  background: var(--accent);
}

.admin-card input,
.admin-card select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 10px;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
}

.admin-secondary {
  width: 100%;
  background: rgba(255, 255, 255, .06) !important;
}

.admin-danger {
  width: 100%;
  background: rgba(255, 107, 107, .09) !important;
  color: var(--danger) !important;
}

.admin-list {
  border-radius: 20px;
  overflow: hidden;
}

.admin-list-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
}

.admin-list-row:first-child {
  border-top: 0;
}

.admin-list-row span {
  color: var(--muted);
  font-size: 13px;
}

.admin-list-row strong {
  font-size: 13px;
  text-align: right;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  transform: translateX(-50%);
  border-radius: 28px 28px 0 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)),
    rgba(15, 15, 16, .78);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.nav-item {
  position: relative;
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: color 180ms var(--ease), background 180ms var(--ease), transform 120ms var(--ease);
}

.nav-item.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035)),
    rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  color: var(--text);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(139, 124, 255, .45);
}

.hidden {
  display: none !important;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 380px) {
  .viewport {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-card {
    min-height: 252px;
    padding: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .choice-button span {
    font-size: 17px;
  }
}

@media (max-width: 760px) {
  .admin-body {
    padding: 12px;
  }

  .admin-header,
  .admin-section-head,
  .admin-list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-account {
    min-width: 0;
  }

  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-inline-form {
    grid-template-columns: 1fr;
  }

  .admin-client-fields {
    grid-template-columns: 1fr;
  }

  .admin-client-fields .admin-client-url {
    grid-column: auto;
  }

  .admin-list-row strong {
    text-align: left;
  }
}

@media (min-width: 900px) {
  body {
    padding: 32px 0;
  }

  .app-shell {
    width: min(calc(100% - 32px), 1040px);
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 30px;
  }

  .viewport {
    grid-column: 2;
    min-height: auto;
    padding: 30px;
  }

  .bottom-nav {
    position: relative;
    left: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 1;
    width: auto;
    align-content: start;
    grid-template-columns: 1fr;
    gap: 8px;
    transform: none;
    border-radius: 0;
    border-right: 1px solid var(--line);
    padding: 82px 12px 18px;
    background: rgba(15, 15, 16, .58);
  }

  .nav-item {
    min-height: 44px;
    padding: 0 14px;
    text-align: left;
    font-size: 13px;
  }

  .nav-item.is-active::before {
    left: 8px;
    top: 50%;
    width: 2px;
    height: 18px;
    transform: translateY(-50%);
  }

  #screen-home .hero-card {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
