:root,
body[data-theme="telegram"] {
  --bg-0: #101621;
  --bg-1: #1a2735;
  --bg-2: #243748;
  --surface: rgba(24, 34, 48, 0.62);
  --surface-strong: rgba(17, 24, 36, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(214, 229, 245, 0.15);
  --panel-border: var(--border);
  --text: var(--tg-text, #f5fbff);
  --text-soft: color-mix(in srgb, var(--tg-hint, #a8b7c8) 84%, #ffffff 16%);
  --accent: color-mix(in srgb, var(--tg-button, #55cfff) 70%, #79d8ff 30%);
  --accent-strong: color-mix(in srgb, var(--tg-button, #55cfff) 78%, #0b92d2 22%);
  --accent-faint: rgba(116, 214, 255, 0.16);
  --ok: #86efc6;
  --danger: #ff9ebb;
  --shadow: 0 22px 60px rgba(2, 10, 25, 0.42);
}


:root,
body[data-theme="ghost"] {
  --bg-0: #071326;
  --bg-1: #0b2f58;
  --bg-2: #3daee9;
  --surface: rgba(10, 30, 64, 0.56);
  --surface-strong: rgba(8, 23, 50, 0.84);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(165, 224, 255, 0.22);
  --text: #f5fbff;
  --text-soft: #b6d0e9;
  --accent: #55cfff;
  --accent-strong: #15b4ff;
  --accent-faint: rgba(85, 207, 255, 0.22);
  --ok: #86efc6;
  --danger: #ff9ebb;
  --shadow: 0 22px 60px rgba(2, 10, 25, 0.42);
}

body[data-theme="dark"] {
  --bg-0: #07090d;
  --bg-1: #151a24;
  --bg-2: #2a3342;
  --surface: rgba(18, 23, 32, 0.74);
  --surface-strong: rgba(12, 15, 21, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --border: rgba(202, 214, 233, 0.13);
  --panel-border: var(--border);
  --text: #f7f9fc;
  --text-soft: #9aa8bd;
  --accent: #dbe7f7;
  --accent-strong: #aab7cb;
  --accent-faint: rgba(219, 231, 247, 0.18);
  --ok: #8be3c5;
  --danger: #ff9cb3;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

body[data-theme="pink"] {
  --bg-0: #45102a;
  --bg-1: #9a3a68;
  --bg-2: #f2a4c9;
  --surface: rgba(137, 25, 82, 0.32);
  --surface-strong: rgba(104, 22, 68, 0.55);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 231, 241, 0.3);
  --panel-border: var(--border);
  --text: #fff8fc;
  --text-soft: #ffd7e9;
  --accent: #ffd7ea;
  --accent-strong: #ffaed1;
  --accent-faint: rgba(255, 174, 209, 0.2);
  --ok: #98f1cc;
  --danger: #fff0f7;
  --shadow: 0 22px 60px rgba(79, 13, 47, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 720px at 0% 0%, rgba(100, 213, 255, 0.28), transparent 60%),
    radial-gradient(900px 700px at 100% 20%, rgba(255, 170, 208, 0.18), transparent 62%),
    linear-gradient(150deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.48;
  z-index: 0;
  pointer-events: none;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: -90px;
  left: -80px;
  background: rgba(113, 219, 255, 0.82);
}

.orb-b {
  width: 320px;
  height: 320px;
  right: -120px;
  top: 22%;
  background: rgba(120, 160, 255, 0.45);
}

.orb-c {
  width: 280px;
  height: 280px;
  left: 32%;
  bottom: -120px;
  background: rgba(255, 162, 213, 0.26);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 14px 120px;
}

.liquid-glass-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.panel {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.026), var(--surface));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.12);
}

.panel-subtle {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--surface-strong);
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 68px 16px 18px;
}

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

.brand-mark {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(6, 15, 31, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
}

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

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
}

.brand p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.theme-switcher {
  display: inline-flex;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  position: absolute;
  left: 50%;
  top: calc(50% + 18px);
  transform: translate(-50%, -50%);
  justify-self: center;
  align-self: center;
}

.theme-button,
.icon-action,
.ghost-button,
.primary-button,
.secondary-button,
.nav-button,
.chip-button,
.action-tile {
  font: inherit;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.theme-button,
.icon-action {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: transparent;
  color: var(--text-soft);
}

.theme-button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.theme-button.active {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
}

.icon-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.support-link {
  position: absolute;
  top: 16px;
  right: 18px;
  justify-self: end;
  align-self: start;
  transform: none;
}

.theme-button:hover,
.icon-action:hover,
.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover,
.nav-button:hover,
.chip-button:hover,
.action-tile:hover,
.danger-button:hover {
  transform: translateY(-2px);
}

.theme-button:active,
.icon-action:active,
.ghost-button:active,
.primary-button:active,
.secondary-button:active,
.nav-button:active,
.chip-button:active,
.action-tile:active,
.danger-button:active {
  transform: scale(0.97);
  filter: saturate(1.06);
}

.empty-state {
  margin-top: 16px;
  padding: 28px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.access-denied-meta {
  margin-top: 18px;
  text-align: left;
}

.centered-actions {
  justify-content: center;
  margin-top: 18px;
}

.trial-description {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.giveaway-state {
  margin-top: 16px;
  padding: clamp(18px, 4vw, 28px);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  background:
    radial-gradient(circle at top left, rgba(109, 221, 255, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 170, 214, 0.12), transparent 30%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
}

.giveaway-hero {
  margin-bottom: 16px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.giveaway-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.06);
}

.giveaway-hero h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4.8vw, 2.2rem);
  line-height: 1.12;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.giveaway-hero p,
.giveaway-result-text {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.giveaway-status-card {
  margin: 0 0 14px;
  padding: clamp(16px, 4vw, 22px);
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(7, 15, 30, 0.5), rgba(19, 33, 64, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.giveaway-status-head {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 14px;
  align-items: start;
}

.giveaway-status-dot {
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.04);
}

.giveaway-status-card.is-active .giveaway-status-dot {
  background: #6cd9ff;
  box-shadow: 0 0 0 6px rgba(108, 217, 255, 0.16);
}

.giveaway-status-card.is-success .giveaway-status-dot {
  background: #7ff7ba;
  box-shadow: 0 0 0 6px rgba(127, 247, 186, 0.14);
}

.giveaway-status-card.is-error .giveaway-status-dot {
  background: #ff7aa9;
  box-shadow: 0 0 0 6px rgba(255, 122, 169, 0.14);
}

.giveaway-status-card.is-done .giveaway-status-dot {
  background: #ffe08a;
  box-shadow: 0 0 0 6px rgba(255, 224, 138, 0.14);
}

.giveaway-status-head strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.15;
}

.giveaway-status-text {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: clamp(0.96rem, 1.7vw, 1.08rem);
  line-height: 1.55;
}

.giveaway-meta {
  margin-bottom: 16px;
}

.giveaway-turnstile {
  display: grid;
  place-items: center;
  margin: 0 0 14px;
  padding: 16px 10px 18px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(7, 15, 30, 0.38), rgba(17, 31, 58, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.giveaway-turnstile-widget {
  min-height: 66px;
  display: grid;
  place-items: center;
  width: 300px;
  max-width: 100%;
  margin-inline: auto;
  overflow: visible;
  transform: translate(-8px, 6px);
  transform-origin: center center;
}

.giveaway-turnstile-widget > div,
.giveaway-turnstile-widget iframe {
  width: 300px !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.giveaway-turnstile-widget iframe {
  display: block !important;
}

.giveaway-footer {
  display: grid;
  gap: 14px;
}

.giveaway-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 900px) {
  .giveaway-state {
    padding: 28px;
  }

  .giveaway-hero {
    text-align: center;
    justify-items: center;
  }

}

@media (max-width: 560px) {
  .giveaway-state {
    padding: 18px;
  }

  .giveaway-status-card {
    padding: 16px;
  }

  .giveaway-turnstile {
    padding: 14px 8px 16px;
    border-radius: 18px;
  }

  .giveaway-turnstile-widget {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .giveaway-turnstile-widget {
    transform: translate(-8px, 6px) scale(0.94);
  }

  .giveaway-actions {
    grid-template-columns: 1fr;
  }
}

.dashboard {
  margin-top: 16px;
}

.hero-card {
  padding: 20px;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(116, 214, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 2rem;
  font-weight: 800;
}

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

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hero-heading h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.02;
}

.hero-username,
.hero-subtitle {
  margin: 8px 0 0;
}

.hero-username {
  color: var(--text-soft);
  font-weight: 700;
}

.hero-subtitle {
  color: var(--text);
  opacity: 0.94;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
  font-weight: 800;
  flex-shrink: 0;
}

.status-pill[data-status="active"],
.status-pill[data-status="trial"] {
  background: linear-gradient(145deg, var(--ok), #ddfff1);
  color: #062f27;
  border-color: transparent;
}

.status-pill[data-status="none"],
.status-pill[data-status="missing"] {
  background: linear-gradient(145deg, #ffc5d5, #ff96b0);
  color: #5a1227;
  border-color: transparent;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.stat-card {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card span {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 1.06rem;
  line-height: 1.24;
}

.tab-screen {
  margin-top: 16px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    filter 260ms ease;
}

.tab-screen.hidden {
  display: block !important;
  opacity: 0;
  transform: translateY(22px) scale(0.986);
  filter: blur(8px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}

.home-stack {
  display: grid;
  gap: 16px;
  position: relative;
}

.trial-highlight-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(112, 229, 255, 0.2), transparent 38%),
    radial-gradient(circle at bottom right, rgba(255, 188, 222, 0.18), transparent 36%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), var(--surface));
}

.trial-highlight-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trial-highlight-copy h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.trial-highlight-copy p {
  margin: 0;
}

.trial-highlight-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.trial-activate-button {
  min-width: 220px;
  position: relative;
  overflow: hidden;
}

.trial-activate-button.is-loading {
  pointer-events: none;
  animation: trialPulse 1.15s ease-in-out infinite;
}

.trial-activate-button.is-success {
  background: linear-gradient(145deg, var(--ok), #ddfff1);
  color: #062f27;
  animation: trialSuccessPop 520ms ease;
}

.trial-highlight-card.is-activating {
  animation: trialCardGlow 1.2s ease-in-out infinite;
}

.trial-highlight-card.is-success,
#trialCard.is-success {
  box-shadow:
    0 20px 50px rgba(9, 22, 40, 0.3),
    0 0 0 1px rgba(132, 245, 193, 0.24),
    0 0 40px rgba(132, 245, 193, 0.18);
  animation: trialCardSuccess 640ms ease;
}

@keyframes trialPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 28px rgba(4, 12, 28, 0.16);
  }
  50% {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 18px 34px rgba(21, 180, 255, 0.26);
  }
}

@keyframes trialSuccessPop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes trialCardGlow {
  0%,
  100% {
    box-shadow: var(--shadow);
  }
  50% {
    box-shadow:
      0 22px 60px rgba(2, 10, 25, 0.42),
      0 0 36px rgba(85, 207, 255, 0.2);
  }
}

@keyframes trialCardSuccess {
  0% {
    transform: scale(0.985);
  }
  55% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

.section-stack {
  display: grid;
  gap: 14px;
}

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

.actions-grid-home {
  order: -1;
}

.action-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  text-align: left;
  box-shadow: 0 16px 38px rgba(4, 12, 28, 0.14);
}

.action-primary {
  background: linear-gradient(145deg, rgba(83, 209, 255, 0.22), rgba(15, 180, 255, 0.18));
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--accent-faint);
  flex-shrink: 0;
}

.action-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-copy strong {
  font-size: 1rem;
}

.action-copy span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.device-list,
.referral-list,
.server-options {
  display: grid;
  gap: 12px;
}

.device-card,
.referral-item,
.server-option {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.device-card-head,
.referral-item-head,
.server-option-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.device-card-title,
.referral-item-title,
.server-option-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.device-card-meta,
.referral-item-meta,
.server-option-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.device-card-line,
.referral-item-line,
.server-option-line {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.danger-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 158, 187, 0.24);
  background: rgba(255, 158, 187, 0.14);
  color: var(--danger);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.server-option {
  cursor: pointer;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.server-option.active {
  border-color: rgba(85, 207, 255, 0.45);
  background: linear-gradient(145deg, rgba(83, 209, 255, 0.16), rgba(15, 180, 255, 0.1));
  transform: translateY(-1px);
}

.server-option-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
  flex-shrink: 0;
}

.server-option.active .server-option-check {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
  border-color: transparent;
}

.discount-note {
  margin-top: 8px;
  color: var(--ok);
  font-size: 0.82rem;
  line-height: 1.4;
}

.info-card,
.link-card {
  padding: 18px;
}

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

.card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

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

.data-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-row span:first-child {
  color: var(--text-soft);
}

.data-row span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.link-text {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  overflow-wrap: anywhere;
}

.link-actions,
.buy-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.buy-actions {
  justify-content: center;
}

.buy-block + .buy-block {
  margin-top: 16px;
}

.purchase-fixed-card {
  margin-top: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.purchase-fixed-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-soft);
}

.purchase-fixed-line strong {
  color: var(--text);
  font-size: 1rem;
}

.buy-label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
}

.chip-button.active {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #04192d;
}

.purchase-preview {
  margin-top: 18px;
  padding: 16px;
}

.preview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
}

.preview-line + .preview-line {
  margin-top: 10px;
}

.preview-line strong {
  color: var(--text);
}

.preview-status {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
}

.preview-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.preview-breakdown .preview-line {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ghost-button,
.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.buy-actions .ghost-button,
.buy-actions .primary-button {
  min-width: 220px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(5, 12, 30, 0.12);
}

.secondary-button {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 26px rgba(5, 12, 30, 0.14);
}

.primary-button {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
  box-shadow: 0 14px 30px rgba(8, 184, 255, 0.24);
}

.ghost-button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(880px, calc(100% - 28px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.008));
  -webkit-backdrop-filter: url("#liquidGlassNav") blur(1.8px) saturate(1.05);
  backdrop-filter: url("#liquidGlassNav") blur(1.8px) saturate(1.05);
  border-radius: 30px;
  z-index: 10;
  isolation: isolate;
  overflow: hidden;
  box-shadow:
    0 10px 24px rgba(3, 11, 24, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.bottom-nav::before,
.bottom-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.bottom-nav::before {
  background:
    radial-gradient(140% 92% at 50% -18%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 34%, transparent 64%),
    radial-gradient(95% 125% at 100% 100%, rgba(115, 214, 255, 0.024), transparent 44%);
  opacity: 0.42;
}

.bottom-nav::after {
  inset: 1px;
  border-radius: 29px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.72;
}

.nav-button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 62px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.004);
  color: color-mix(in srgb, var(--text-soft) 88%, white 12%);
  overflow: hidden;
}

.nav-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01) 32%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.nav-button span {
  font-size: 1.15rem;
}

.nav-button small {
  font-size: 0.74rem;
  font-weight: 800;
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -4px 8px rgba(255, 255, 255, 0.025),
    0 4px 10px rgba(2, 12, 31, 0.03);
}

.nav-button.active::before,
.nav-button:hover::before {
  opacity: 1;
}

.nav-button.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 7px;
  height: 17px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.012));
  opacity: 0.26;
  filter: blur(0.5px);
}

@supports not (hanging-punctuation: first) {
  .bottom-nav {
    -webkit-backdrop-filter: url("#liquidGlassNav") blur(1.8px) saturate(1.05);
    backdrop-filter: url("#liquidGlassNav") blur(1.8px) saturate(1.05);
  }

}

@media (min-width: 721px) {
  .bottom-nav {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.006));
    -webkit-backdrop-filter: url("#liquidGlassNav") blur(1.15px) saturate(1.03);
    backdrop-filter: url("#liquidGlassNav") blur(1.15px) saturate(1.03);
    box-shadow:
      0 8px 18px rgba(3, 11, 24, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.24),
      inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  }

  .bottom-nav::before {
    opacity: 0.34;
    filter: url("#liquidGlassNav") blur(0.7px);
    transform: scale(1.018);
    mix-blend-mode: normal;
  }

  .bottom-nav::after {
    border-color: rgba(255, 255, 255, 0.16);
    opacity: 0.82;
  }

  .nav-button {
    background: rgba(255, 255, 255, 0.002);
  }

  .nav-button.active {
    background: rgba(255, 255, 255, 0.014);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -3px 7px rgba(255, 255, 255, 0.02),
      0 3px 8px rgba(2, 12, 31, 0.02);
  }

  .nav-button.active::after {
    opacity: 0.22;
    filter: blur(0.6px);
  }
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 50;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.purchase-success {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(152, 255, 196, 0.18);
  background:
    radial-gradient(circle at top left, rgba(130, 255, 187, 0.18), transparent 55%),
    rgba(10, 24, 25, 0.72);
}

.purchase-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: rgba(120, 255, 170, 0.14);
  box-shadow: inset 0 0 0 1px rgba(164, 255, 198, 0.18);
}

.purchase-success-copy {
  display: grid;
  gap: 4px;
}

.purchase-success-copy strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.purchase-success-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.purchase-success .primary-button {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding-right: 62px;
  }

  .brand {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .support-link {
    top: 14px;
    right: 14px;
  }

  .trial-highlight-card {
    grid-template-columns: 1fr;
  }

  .trial-highlight-actions {
    justify-content: stretch;
  }

  .trial-activate-button {
    width: 100%;
    min-width: 0;
  }

  .hero-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-heading {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 560px) {
  .app-shell {
    padding: 14px 12px 118px;
  }

  .topbar {
    padding-bottom: 44px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .theme-switcher {
    gap: 6px;
    top: calc(50% + 42px);
  }

  .support-link {
    top: 12px;
    right: 12px;
  }

  .theme-button,
  .icon-action {
    width: 38px;
    height: 38px;
  }

  .theme-button img {
    width: 21px;
    height: 21px;
  }

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

  .data-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .data-row span:last-child {
    text-align: left;
  }

  .bottom-nav {
    bottom: 12px;
    width: calc(100% - 20px);
    gap: 8px;
    padding: 10px;
  }

  .nav-button small {
    font-size: 0.7rem;
  }
}

.auth-state {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px;
}

.auth-hero {
  text-align: center;
  margin-bottom: 22px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(0, 202, 101, 0.28);
  border-radius: 999px;
  color: #00ca65;
  background: rgba(0, 202, 101, 0.08);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.auth-hero h2 {
  margin: 14px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.auth-hero p,
.muted-card-text {
  margin: 0;
  color: var(--muted-text);
  font-size: 14px;
  line-height: 1.55;
}

.auth-form,
.email-link-form {
  display: grid;
  gap: 14px;
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 800;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  outline: none;
}

.auth-input:focus {
  border-color: rgba(0, 202, 101, 0.65);
  box-shadow: 0 0 0 3px rgba(0, 202, 101, 0.14);
}

.code-input {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 6px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-links,
.link-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #00ca65;
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.is-error {
  color: #ff6b7a;
}

.email-link-card {
  display: grid;
  gap: 14px;
}

.link-code-wrap {
  margin-top: 2px;
}


.email-account-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.email-account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.email-account-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.email-account-copy span {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 800;
}

.email-account-copy strong {
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.email-account-copy small {
  color: var(--muted-text);
  font-size: 12px;
  line-height: 1.35;
}

.email-account-action {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 14px;
}

.email-account-card .email-link-form {
  margin-top: 14px;
}

@media (max-width: 420px) {
  .email-account-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .email-account-action {
    width: 100%;
  }
}


.password-field {
  position: relative;
  display: block;
}

.password-field .auth-input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 72px;
  min-height: 34px;
  transform: translateY(-50%);
  border: 1px solid rgba(116, 214, 255, 0.22);
  border-radius: 8px;
  background: rgba(116, 214, 255, 0.10);
  color: color-mix(in srgb, var(--text) 82%, #74d6ff 18%);
  font-size: 12px;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.password-toggle.is-active,
.password-toggle:active {
  border-color: rgba(116, 214, 255, 0.42);
  background: rgba(116, 214, 255, 0.18);
  color: var(--text);
}

.email-account-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(116, 214, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(116, 214, 255, 0.13), rgba(90, 124, 255, 0.07) 46%, rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 12px 28px rgba(6, 20, 44, 0.12);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.email-account-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 140% at 100% 0%, rgba(116, 214, 255, 0.16), transparent 48%);
  opacity: 0.72;
}

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

.email-account-card.is-open {
  border-color: rgba(116, 214, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 40px rgba(6, 20, 44, 0.18);
}

.email-account-card .email-link-form {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 260ms ease, opacity 180ms ease, transform 220ms ease, margin-top 220ms ease;
}

.email-account-card.is-open .email-link-form {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
}

.email-account-card .email-link-form.hidden {
  display: grid !important;
  margin-top: 0;
  pointer-events: none;
}

.email-account-card.is-open .email-link-form.hidden {
  margin-top: 14px;
  pointer-events: auto;
}

.email-account-card .auth-message {
  transition: color 180ms ease, opacity 180ms ease;
}


.link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.link-actions .primary-button,
.link-actions .secondary-button {
  min-height: 44px;
  white-space: normal;
  line-height: 1.18;
}

.link-actions .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  filter: saturate(0.8);
}

.email-account-card:not(.is-open) .auth-message:empty {
  display: none;
}

@media (max-width: 420px) {
  .link-actions {
    grid-template-columns: 1fr;
  }
}


body[data-active-tab="profile"] .topbar {
  display: none;
}

.profile-screen {
  display: grid;
  gap: 22px;
  padding: 6px 2px 0;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 2px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(116, 214, 255, 0.42));
  box-shadow: 0 14px 30px rgba(6, 15, 31, 0.22);
  font-size: 1.8rem;
  font-weight: 900;
}

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

.profile-identity-copy {
  min-width: 0;
}

.profile-identity-copy h2 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.profile-identity-copy p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-weight: 700;
}

.profile-section {
  display: grid;
  gap: 10px;
}

.profile-section > h3 {
  margin: 0;
  padding: 0 8px;
  font-size: 1.02rem;
  line-height: 1.2;
}

.profile-settings-card {
  border-radius: 24px;
  overflow: hidden;
  padding: 4px;
}

.profile-setting-row {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 19px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.profile-setting-row + .profile-setting-row,
.profile-theme-switcher {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-setting-row:hover,
.profile-setting-row:active {
  background: rgba(255, 255, 255, 0.055);
}

.profile-setting-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 1.22rem;
}

.profile-setting-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-setting-copy strong {
  font-size: 1rem;
  line-height: 1.15;
}

.profile-setting-copy small {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.profile-setting-chevron {
  color: color-mix(in srgb, var(--text-soft) 70%, white 30%);
  font-size: 1.7rem;
  line-height: 1;
}

.profile-theme-row {
  cursor: default;
}

.profile-theme-row:hover,
.profile-theme-row:active {
  background: transparent;
}

.profile-theme-row .profile-setting-chevron {
  display: none;
}

.profile-theme-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.profile-theme-button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-theme-button.active {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(8, 184, 255, 0.20);
}

.profile-manage-button {
  width: 100%;
  min-height: 58px;
  font-size: 1rem;
}

@media (max-width: 420px) {
  .profile-theme-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
  }

  .nav-button {
    min-height: 58px;
    border-radius: 18px;
  }

  .nav-button small {
    font-size: 0.64rem;
  }
}



/* Subscription polish */
.topbar {
  display: none;
}

.app-shell {
  padding-top: max(14px, env(safe-area-inset-top));
}

.subscription-screen {
  gap: 20px;
}

.subscription-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 2px 2px;
}

.subscription-summary-item {
  min-width: 0;
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
}

.subscription-summary-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.075)),
    color-mix(in srgb, var(--accent-faint) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 18px 34px rgba(0, 0, 0, 0.18);
  font-size: 21px;
}

.subscription-summary-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.subscription-summary-item strong {
  width: 100%;
  min-height: 28px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.14;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.subscription-link-copy {
  width: 100%;
  min-height: 138px;
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 78%, white 22%);
  border-radius: 28px;
  padding: 20px;
  text-align: left;
  color: var(--text);
  background:
    radial-gradient(160px 120px at 12% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 72%),
    radial-gradient(180px 120px at 100% 100%, rgba(255, 154, 200, 0.18), transparent 76%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  display: grid;
  align-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.subscription-link-copy::after {
  content: '';
  position: absolute;
  inset: -60% auto auto -35%;
  width: 130px;
  height: 240%;
  transform: rotate(22deg) translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  opacity: 0;
}

.subscription-link-copy:active {
  transform: scale(0.985);
}

.subscription-link-copy.is-copied {
  border-color: color-mix(in srgb, var(--ok) 72%, white 28%);
}

.subscription-link-copy.is-copied::after {
  opacity: 1;
  animation: subscription-copy-shine 900ms ease forwards;
}

@keyframes subscription-copy-shine {
  to {
    transform: rotate(22deg) translateX(360%);
  }
}

.subscription-link-copy:disabled,
.subscription-link-copy.is-disabled {
  cursor: default;
  opacity: 0.72;
}

.subscription-link-kicker,
.subscription-link-action {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.subscription-link-action {
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent-strong) 86%, white 14%);
  background: rgba(255, 255, 255, 0.09);
  transition: color 180ms ease, background 180ms ease;
}

.subscription-link-copy.is-copied .subscription-link-action {
  color: #082218;
  background: var(--ok);
}

.subscription-link-value {
  color: var(--text);
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 900;
  line-height: 1.32;
  word-break: break-all;
}

.subscription-actions-card {
  display: grid;
  gap: 0;
  padding: 4px;
  border-radius: 24px;
  overflow: hidden;
}

.subscription-action-row {
  border-radius: 19px;
}

.subscription-action-row + .subscription-action-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.subscription-action-row:disabled,
.subscription-action-row.is-disabled {
  cursor: default;
  opacity: 0.56;
}

.subscription-action-row .profile-setting-icon {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.065)),
    color-mix(in srgb, var(--accent-faint) 72%, transparent);
}

.profile-theme-switcher {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-theme-button {
  min-height: 68px;
  padding: 10px 6px 8px;
  border: 0;
  border-radius: 18px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  color: var(--text-soft);
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.profile-theme-button::before {
  content: '';
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 10px 18px rgba(0, 0, 0, 0.18);
}

.profile-theme-button[data-theme='telegram']::before {
  background: linear-gradient(145deg, #101621 0 32%, #1a2735 32% 66%, #55cfff 66% 100%);
}

.profile-theme-button[data-theme='ghost']::before {
  background: linear-gradient(145deg, #071326 0 30%, #0b2f58 30% 66%, #3daee9 66% 100%);
}

.profile-theme-button[data-theme='dark']::before {
  background: linear-gradient(145deg, #07090d 0 34%, #151a24 34% 68%, #dbe7f7 68% 100%);
}

.profile-theme-button[data-theme='pink']::before {
  background: linear-gradient(145deg, #45102a 0 32%, #9a3a68 32% 66%, #f2a4c9 66% 100%);
}

.profile-theme-button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.profile-theme-button.active::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-faint) 85%, transparent);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  padding: 16px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: opacity 220ms ease, background 220ms ease, backdrop-filter 220ms ease, visibility 0s linear 240ms;
}

.sheet-backdrop.hidden {
  display: grid;
}

.sheet-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition-delay: 0s;
}

.devices-sheet {
  width: min(100%, 420px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 14px 18px 18px;
  color: var(--text);
  background:
    radial-gradient(180px 130px at 50% 0%, color-mix(in srgb, var(--accent-faint) 80%, transparent), transparent 80%),
    rgba(23, 24, 31, 0.94);
  box-shadow: 0 -28px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(34px) scale(0.985);
  opacity: 0;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
}

.sheet-backdrop.is-open .devices-sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  margin: 0 auto 16px;
  background: rgba(255, 255, 255, 0.22);
}

.devices-sheet-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 36px rgba(0, 0, 0, 0.22);
  font-size: 25px;
}

.devices-sheet h2 {
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.devices-sheet p {
  margin: 8px 0 18px;
  color: var(--text-soft);
  text-align: center;
  font-weight: 800;
}

.devices-sheet-list {
  display: grid;
  gap: 10px;
  max-height: min(46vh, 360px);
  overflow: auto;
  padding-right: 2px;
}

.devices-sheet-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.devices-sheet-device-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.22);
  font-size: 18px;
}

.devices-sheet-device-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.devices-sheet-device-body strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.devices-sheet-device-body small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.devices-sheet-remove {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.075);
  font-size: 20px;
  cursor: pointer;
}

.devices-sheet-remove:disabled {
  opacity: 0.45;
  cursor: default;
}

.devices-sheet-empty {
  padding: 22px 12px;
  color: var(--text-soft);
  text-align: center;
  font-weight: 900;
}

.devices-sheet-close {
  width: 100%;
  margin-top: 16px;
}

@media (max-width: 430px) {
  .subscription-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }

  .subscription-summary-icon {
    width: 46px;
    height: 46px;
  }

  .subscription-summary-item strong {
    font-size: 14px;
  }
}


/* Home and polish pass */
.home-modern {
  gap: 18px;
}

.home-overview-card {
  padding: 20px;
  border-radius: 28px;
  background:
    radial-gradient(220px 160px at 0% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 76%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
}

.home-overview-head {
  display: flex;
  align-items: center;
  gap: 15px;
}

.home-avatar {
  width: 70px;
  height: 70px;
  border-radius: 23px;
}

.home-overview-copy {
  min-width: 0;
  flex: 1;
}

.home-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.home-title-row h2 {
  margin: 0;
  font-size: clamp(1.45rem, 7vw, 2rem);
  line-height: 1.04;
}

.home-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.home-main-action {
  min-height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  padding: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.16);
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.home-main-action-primary {
  background:
    radial-gradient(130px 90px at 0% 0%, color-mix(in srgb, var(--accent) 36%, transparent), transparent 72%),
    rgba(255, 255, 255, 0.11);
}

.home-main-action span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
}

.home-main-action strong {
  font-size: 1rem;
  line-height: 1.1;
}

.home-main-action small {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.28;
}

.home-benefits {
  display: grid;
  gap: 10px;
}

.home-benefit {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas: 'icon title' 'icon text';
  gap: 3px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.home-benefit span {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 20px;
}

.home-benefit strong {
  grid-area: title;
  font-size: 0.98rem;
  line-height: 1.12;
}

.home-benefit p {
  grid-area: text;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.subscription-link-copy::after {
  inset: -110% auto auto -85%;
  width: 220px;
  height: 340%;
}

@keyframes subscription-copy-shine {
  to {
    transform: rotate(22deg) translateX(640%);
  }
}

@media (max-width: 430px) {
  .home-overview-head {
    align-items: flex-start;
  }

  .home-avatar {
    width: 58px;
    height: 58px;
    border-radius: 19px;
  }

  .home-title-row {
    display: grid;
    gap: 8px;
  }

  .home-primary-actions {
    grid-template-columns: 1fr;
  }

  .home-main-action {
    min-height: 92px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas: 'icon title' 'icon text';
    align-items: center;
  }

  .home-main-action span {
    grid-area: icon;
  }

  .home-main-action strong {
    grid-area: title;
  }

  .home-main-action small {
    grid-area: text;
  }
}


/* Final home/status polish */
.home-status-hero {
  padding: 16px 4px 4px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.home-status-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #072218;
  background: linear-gradient(145deg, var(--ok), #ddfff1);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-status-kicker[data-status='none'],
.home-status-kicker[data-status='missing'],
.home-status-kicker[data-status='disabled'],
.home-status-kicker[data-status='expired'] {
  color: #461225;
  background: linear-gradient(145deg, #ffc5d5, #ff96b0);
}

.home-days-left {
  color: var(--text);
  font-size: clamp(4.4rem, 21vw, 7.2rem);
  line-height: 0.88;
  font-weight: 1000;
  letter-spacing: -0.05em;
  text-shadow: 0 24px 54px rgba(0, 0, 0, 0.26);
}

.home-status-subtitle {
  max-width: 330px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.32;
}

.home-primary-actions-free {
  margin-top: 6px;
}

.home-main-action {
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07));
}

.home-main-action-primary {
  background:
    radial-gradient(160px 100px at 0% 0%, color-mix(in srgb, var(--accent) 44%, transparent), transparent 74%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
}

.home-benefits {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.home-benefit {
  min-height: 128px;
  grid-template-columns: 1fr;
  grid-template-areas: 'icon' 'title' 'text';
  align-content: start;
  padding: 15px;
}

.home-benefit-wide {
  grid-column: 1 / -1;
  min-height: auto;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas: 'icon title' 'icon text';
  align-items: center;
}

.profile-email-card {
  padding: 6px;
  border-radius: 24px;
  overflow: hidden;
}

.profile-email-card .email-account-summary {
  padding: 12px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.055);
}

.profile-email-card .email-account-copy span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-email-card .email-account-copy strong {
  display: block;
  margin: 4px 0 3px;
  color: var(--text);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.profile-email-card .email-account-action {
  min-width: 92px;
  border-radius: 15px;
}

.profile-email-card .email-link-form {
  padding: 12px;
}

.subscription-actions-card .profile-setting-copy,
.subscription-action-row > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.subscription-action-row small {
  display: block;
  margin-top: 4px;
}

.subscription-link-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, transparent 0%, transparent 24%, rgba(255, 255, 255, 0.38) 44%, transparent 64%, transparent 100%);
  transform: translateX(-130%);
}

.subscription-link-copy.is-copied::before {
  opacity: 1;
  animation: subscription-copy-wipe 900ms ease forwards;
}

.subscription-link-copy.is-copied::after {
  animation: none;
}

@keyframes subscription-copy-wipe {
  to {
    transform: translateX(130%);
  }
}

@media (max-width: 430px) {
  .home-benefits {
    grid-template-columns: 1fr;
  }

  .home-benefit,
  .home-benefit-wide {
    min-height: auto;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas: 'icon title' 'icon text';
    align-items: center;
  }
}


/* Buy and referrals modern pass */
.buy-modern-screen,
.referrals-modern-screen { gap: 18px; }
.buy-hero,
.referral-hero { display: grid; gap: 8px; padding: 10px 4px 4px; text-align: center; justify-items: center; }
.buy-hero span,
.referral-hero span { min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; color: var(--text-soft); background: rgba(255,255,255,.08); font-weight: 900; font-size: .8rem; }
.buy-hero h2,
.referral-hero h2 { margin: 0; font-size: clamp(2rem, 10vw, 3.2rem); line-height: .96; letter-spacing: -.04em; }
.buy-hero p,
.referral-hero p { max-width: 340px; margin: 0; color: var(--text-soft); font-weight: 800; line-height: 1.34; }
.period-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.period-card { min-height: 112px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; padding: 16px; color: var(--text); background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 34px rgba(0,0,0,.14); display: grid; align-content: end; justify-items: start; gap: 6px; text-align: left; font: inherit; }
.period-card.active { border-color: color-mix(in srgb, var(--accent) 60%, white 20%); background: radial-gradient(150px 100px at 0% 0%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 76%), linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.08)); transform: translateY(-1px); }
.period-card strong { font-size: 1.22rem; line-height: 1.05; }
.period-card small { color: var(--text-soft); font-size: .78rem; font-weight: 850; }
.period-discount-badge,
.period-popular-badge { position: absolute; top: 10px; display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 1000; }
.period-discount-badge { right: 10px; color: #082218; background: var(--ok); }
.period-popular-badge { left: 10px; color: #03182d; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); }
.payment-info-block,
.buy-total-card,
.referral-link-card { border: 1px solid rgba(255,255,255,.1); border-radius: 28px; padding: 16px; background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 34px rgba(0,0,0,.14); }
.payment-info-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.payment-info-head span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.1); }
.payment-info-head strong { font-size: 1.05rem; }
.payment-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.payment-info-grid span { min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 15px; color: var(--text); background: rgba(255,255,255,.075); font-weight: 900; font-size: .86rem; }
.buy-total-card { margin-top: 0; }
.buy-total-card .preview-line strong { font-size: 1.65rem; line-height: 1; }
.buy-actions-modern { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 0; }
.buy-actions-modern .primary-button,
.buy-actions-modern .ghost-button { width: 100%; min-width: 0; min-height: 56px; border-radius: 20px; }
.referral-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.referral-stat-card { min-height: 104px; display: grid; align-content: space-between; gap: 6px; padding: 14px; border-radius: 22px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.08); }
.referral-stat-card span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.1); }
.referral-stat-card small { color: var(--text-soft); font-weight: 850; }
.referral-stat-card strong { font-size: 1.18rem; overflow-wrap: anywhere; }
.referral-link-card { width: 100%; display: grid; gap: 10px; color: var(--text); text-align: left; font: inherit; }
.referral-link-card strong { font-size: .98rem; line-height: 1.35; overflow-wrap: anywhere; }
.referral-link-kicker,
.referral-link-action { color: var(--text-soft); font-size: .78rem; font-weight: 900; }
.referral-link-action { color: var(--accent-strong); }
.referral-link-card.is-copied { border-color: color-mix(in srgb, var(--ok) 70%, white 20%); }
.referral-list-card,
.referral-terms-card { padding: 16px; border-radius: 26px; }
@media (max-width: 430px) { .period-card-grid, .payment-info-grid, .referral-stats-grid { grid-template-columns: 1fr; } }


/* Compact buy/referrals polish */
.buy-hero {
  gap: 7px;
  padding-top: 4px;
}

.buy-hero h2 {
  font-size: clamp(1.75rem, 8vw, 2.7rem);
}

.buy-hero p {
  max-width: 300px;
  font-size: 0.88rem;
}

.period-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.period-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 12px;
  border-radius: 22px;
  align-content: end;
}

.period-card strong {
  font-size: clamp(1rem, 4.4vw, 1.18rem);
}

.period-card small {
  font-size: 0.72rem;
  line-height: 1.22;
}

.period-discount-badge,
.period-popular-badge {
  top: 8px;
  min-height: 22px;
  padding: 0 7px;
  font-size: 0.64rem;
}

.period-discount-badge {
  right: 8px;
}

.period-popular-badge {
  left: 8px;
}

.payment-info-block {
  padding: 12px;
  border-radius: 22px;
}

.payment-info-head {
  margin-bottom: 9px;
}

.payment-info-head span {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.payment-info-head strong {
  font-size: 0.98rem;
}

.payment-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.payment-info-grid span {
  min-height: 34px;
  padding: 0 6px;
  border-radius: 13px;
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.1;
}

.referral-hero {
  padding-top: 4px;
}

.referral-hero h2 {
  font-size: clamp(1.8rem, 8.4vw, 2.7rem);
}

.referral-hero p {
  max-width: 320px;
  font-size: 0.88rem;
}

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

.referral-stat-card {
  min-height: 86px;
  padding: 10px;
  border-radius: 18px;
  align-content: start;
  justify-items: center;
  text-align: center;
  gap: 5px;
}

.referral-stat-card span {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-size: 0.92rem;
}

.referral-stat-card small {
  font-size: 0.66rem;
  line-height: 1.1;
}

.referral-stat-card strong {
  font-size: clamp(0.88rem, 3.5vw, 1.04rem);
  line-height: 1.08;
}

.referral-link-card {
  padding: 14px;
  border-radius: 22px;
}

@media (max-width: 430px) {
  .period-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 360px) {
  .payment-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .referral-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Referral copy and period price polish */
.period-card {
  background:
    radial-gradient(120px 86px at 12% 8%, color-mix(in srgb, var(--accent-faint) 90%, transparent), transparent 78%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}
.period-card.active::after { content: ''; position: absolute; inset: auto 12px 12px 12px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--ok)); }
.period-price { margin-top: 2px; color: var(--text); font-size: clamp(1.08rem, 4.4vw, 1.3rem); line-height: 1; font-weight: 1000; }
.referral-link-card { position: relative; overflow: hidden; transition: border-color 180ms ease, transform 180ms ease; }
.referral-link-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 0%, transparent 24%, rgba(255,255,255,.34) 44%, transparent 64%, transparent 100%); transform: translateX(-130%); }
.referral-link-card:active { transform: scale(.985); }
.referral-link-card.is-copied::before { opacity: 1; animation: referral-copy-wipe 900ms ease forwards; }
.referral-link-card.is-copied .referral-link-action { color: var(--ok); }
@keyframes referral-copy-wipe { to { transform: translateX(130%); } }
.referral-empty-state { display: grid; justify-items: center; gap: 7px; padding: 22px 16px; border-radius: 22px; text-align: center; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); }
.referral-empty-state span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: rgba(255,255,255,.1); }
.referral-empty-state strong { font-size: 1rem; }
.referral-empty-state small { max-width: 260px; color: var(--text-soft); font-weight: 800; line-height: 1.32; }
.referral-terms-card .data-list { grid-template-columns: 1fr; }
.referral-term-card { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); }
.referral-term-card small { color: var(--text-soft); font-weight: 900; }
.referral-term-card strong { color: var(--text); font-size: .96rem; line-height: 1.35; }


/* Period center and quiet referral copy */
.period-card {
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.period-card small {
  max-width: 100%;
  min-height: 1.2em;
}

.period-price {
  margin-top: 0;
}


/* Email sheet, ghost mail and state polish */
.sheet-backdrop.is-open {
  background: color-mix(in srgb, var(--bg-0) 58%, rgba(0, 0, 0, 0.42));
}

.devices-sheet,
.email-sheet {
  background:
    radial-gradient(220px 150px at 50% 0%, color-mix(in srgb, var(--accent-faint) 85%, transparent), transparent 82%),
    linear-gradient(165deg, color-mix(in srgb, var(--surface-strong) 92%, var(--bg-1) 8%), color-mix(in srgb, var(--bg-0) 72%, var(--surface) 28%));
  border-color: color-mix(in srgb, var(--border) 76%, white 10%);
}

.email-sheet .email-link-form {
  display: grid;
  gap: 13px;
}

.email-sheet .email-link-form.hidden {
  display: none;
}

.email-sheet-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2px;
}

.email-sheet .auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  text-align: center;
}

.empty-state,
.auth-state,
.channelRequiredState,
.writeAccessState {
  border-radius: 30px;
}

.empty-state {
  max-width: 500px;
  margin: 16px auto 0;
  padding: 34px 24px;
  text-align: center;
  background:
    radial-gradient(190px 140px at 50% 0%, color-mix(in srgb, var(--accent-faint) 80%, transparent), transparent 78%),
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
}

.empty-state::before {
  content: '◌';
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 22px;
  color: var(--accent);
  background: rgba(255,255,255,.09);
  font-size: 34px;
  font-weight: 900;
}

#loadingState::before {
  content: '';
  border: 4px solid rgba(255,255,255,.12);
  border-top-color: var(--accent);
  animation: miniapp-spin 1s linear infinite;
}

#errorState::before { content: '!'; color: var(--danger); }
#channelRequiredState::before { content: '↗'; }
#writeAccessState::before { content: '✉'; }

@keyframes miniapp-spin { to { transform: rotate(360deg); } }

.trial-highlight-card,
#trialCard {
  border-radius: 28px;
  background:
    radial-gradient(180px 120px at 0% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 75%),
    radial-gradient(180px 120px at 100% 100%, rgba(255,154,200,.14), transparent 75%),
    linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.065));
}

.trial-highlight-kicker {
  background: color-mix(in srgb, var(--accent-faint) 80%, rgba(255,255,255,.08));
  color: var(--accent-strong);
}

.trial-activate-button,
#activateTrialButton {
  min-height: 54px;
  border-radius: 18px;
}

.giveaway-state {
  border-radius: 30px;
  background:
    radial-gradient(240px 170px at 15% 0%, color-mix(in srgb, var(--accent-faint) 85%, transparent), transparent 78%),
    radial-gradient(220px 160px at 100% 10%, rgba(255,154,200,.13), transparent 78%),
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  border: 1px solid color-mix(in srgb, var(--border) 76%, white 10%);
  box-shadow: var(--shadow);
}

.giveaway-hero {
  text-align: center;
  justify-items: center;
}

.giveaway-kicker {
  min-height: 32px;
  padding: 0 12px;
  background: rgba(255,255,255,.08);
  color: var(--text-soft);
}

.giveaway-status-card,
.giveaway-turnstile,
.giveaway-meta .data-row {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.09);
  border-radius: 22px;
}

.profile-setting-row[aria-expanded='true'] {
  background: rgba(255,255,255,.075);
}

/* Cross-platform liquid glass fallback */
.bottom-nav {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 42%, rgba(255, 255, 255, 0.075)),
    radial-gradient(130% 120% at 50% -28%, rgba(255, 255, 255, 0.28), transparent 46%),
    radial-gradient(100% 120% at 12% 116%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 50%),
    rgba(255, 255, 255, 0.075);
  -webkit-backdrop-filter: blur(26px) saturate(1.75) contrast(1.07) brightness(1.04);
  backdrop-filter: blur(26px) saturate(1.75) contrast(1.07) brightness(1.04);
  box-shadow:
    0 18px 44px rgba(3, 11, 24, 0.18),
    0 4px 14px rgba(3, 11, 24, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -18px 34px rgba(255, 255, 255, 0.035);
}

.bottom-nav::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 18%, transparent 46%),
    radial-gradient(80% 96% at 50% -18%, rgba(255, 255, 255, 0.36), transparent 58%),
    radial-gradient(92% 110% at 96% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 54%),
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.15) 42%, transparent 62%);
  opacity: 0.88;
  filter: blur(0.25px);
  mix-blend-mode: screen;
}

.bottom-nav::after {
  border-color: rgba(255, 255, 255, 0.28);
  opacity: 0.92;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

.nav-button {
  background: rgba(255, 255, 255, 0.018);
  z-index: 1;
}

.nav-button.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.055)),
    color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -10px 22px rgba(255, 255, 255, 0.045),
    0 8px 18px rgba(2, 12, 31, 0.08);
}

@supports ((-webkit-backdrop-filter: url("#liquidGlassNav") blur(1px)) or (backdrop-filter: url("#liquidGlassNav") blur(1px))) {
  .bottom-nav {
    -webkit-backdrop-filter: url("#liquidGlassNav") blur(1.8px) saturate(1.05);
    backdrop-filter: url("#liquidGlassNav") blur(1.8px) saturate(1.05);
  }
}

@media (min-width: 721px) {
  .bottom-nav {
    -webkit-backdrop-filter: blur(22px) saturate(1.55) contrast(1.05) brightness(1.03);
    backdrop-filter: blur(22px) saturate(1.55) contrast(1.05) brightness(1.03);
  }

  @supports ((-webkit-backdrop-filter: url("#liquidGlassNav") blur(1px)) or (backdrop-filter: url("#liquidGlassNav") blur(1px))) {
    .bottom-nav {
      -webkit-backdrop-filter: url("#liquidGlassNav") blur(1.15px) saturate(1.03);
      backdrop-filter: url("#liquidGlassNav") blur(1.15px) saturate(1.03);
    }
  }
}

/* Compact rectangular period cards */
.period-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.period-card {
  aspect-ratio: auto;
  min-height: 86px;
  padding: 13px 12px 12px;
  border-radius: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  align-items: center;
  justify-items: stretch;
  gap: 3px;
  text-align: left;
  background:
    radial-gradient(110px 74px at 100% -18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(96px 68px at -12% 112%, rgba(255, 255, 255, 0.11), transparent 72%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.048));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(255, 255, 255, 0.045),
    0 10px 22px rgba(0, 0, 0, 0.10);
}

.period-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 42%);
  opacity: 0.55;
}

.period-card.active {
  border-color: color-mix(in srgb, var(--accent) 68%, white 14%);
  background:
    radial-gradient(126px 84px at 100% -18%, color-mix(in srgb, var(--accent) 36%, transparent), transparent 74%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 26px rgba(0, 0, 0, 0.13),
    0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}

.period-card.active::after {
  inset: auto 12px 9px 12px;
  height: 2px;
  opacity: 0.82;
}

.period-card strong,
.period-card small,
.period-price,
.period-discount-badge,
.period-popular-badge {
  position: relative;
  z-index: 1;
}

.period-card strong {
  max-width: calc(100% - 48px);
  font-size: clamp(0.92rem, 3.6vw, 1.05rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.period-card small {
  align-self: start;
  max-width: 100%;
  color: color-mix(in srgb, var(--text-soft) 88%, white 8%);
  font-size: 0.64rem;
  line-height: 1.16;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.period-price {
  align-self: end;
  margin-top: 1px;
  padding-top: 2px;
  font-size: clamp(1rem, 4.1vw, 1.18rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.period-discount-badge,
.period-popular-badge {
  top: 8px;
  min-height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.56rem;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.period-discount-badge {
  right: 8px;
}

.period-popular-badge {
  left: auto;
  right: 8px;
  top: 31px;
  max-width: calc(100% - 16px);
}

.period-card:has(.period-discount-badge) .period-popular-badge {
  top: 31px;
}

@media (max-width: 360px) {
  .period-card-grid {
    gap: 7px;
  }

  .period-card {
    min-height: 82px;
    padding: 12px 10px 11px;
    border-radius: 18px;
  }

  .period-card::before {
    border-radius: 17px;
  }

  .period-card strong {
    font-size: 0.88rem;
  }

  .period-card small {
    font-size: 0.6rem;
  }

  .period-price {
    font-size: 0.98rem;
  }
}

/* Giveaway premium redesign */
.giveaway-state {
  position: relative;
  width: min(620px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 26px) clamp(14px, 4vw, 22px) calc(112px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible;
}

.giveaway-state::before {
  content: '';
  position: absolute;
  inset: 8px 22px auto;
  height: 230px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 58%),
    radial-gradient(circle at 72% 28%, rgba(255, 154, 200, 0.24), transparent 54%);
  filter: blur(30px);
  opacity: 0.62;
  transform: translateZ(0);
}

.giveaway-hero,
.giveaway-status-card,
.giveaway-turnstile,
.giveaway-meta,
.giveaway-footer {
  position: relative;
  z-index: 1;
}

.giveaway-hero {
  min-height: 238px;
  padding: 18px 10px 10px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
}

.giveaway-kicker {
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 86%, white 10%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055)),
    color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 26px rgba(0, 0, 0, 0.09);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.giveaway-hero h2 {
  margin: 0;
  max-width: 100%;
  color: var(--text);
  font-size: clamp(3rem, 16vw, 5.4rem);
  line-height: 0.92;
  font-weight: 1000;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}

.giveaway-hero p {
  max-width: 330px;
  margin: 0;
  color: color-mix(in srgb, var(--text-soft) 88%, white 8%);
  font-size: clamp(0.98rem, 4vw, 1.12rem);
  line-height: 1.34;
  font-weight: 850;
}

.giveaway-status-card {
  margin: 0;
  padding: 13px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.052)),
    color-mix(in srgb, var(--accent) 5%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.115);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 30px rgba(0, 0, 0, 0.11);
  overflow: hidden;
}

.giveaway-status-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.13) 44%, transparent 68%);
  transform: translateX(-120%);
  animation: giveaway-status-sheen 3.4s ease-in-out infinite;
}

@keyframes giveaway-status-sheen {
  0%, 46% { transform: translateX(-120%); opacity: 0; }
  62% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

.giveaway-status-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.giveaway-status-dot {
  width: 42px;
  height: 42px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.giveaway-status-dot::before {
  content: '';
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 16%, transparent), 0 0 24px currentColor;
}

.giveaway-status-card.is-active .giveaway-status-dot { color: var(--accent); }
.giveaway-status-card.is-success .giveaway-status-dot { color: var(--ok); }
.giveaway-status-card.is-error .giveaway-status-dot { color: var(--danger); }
.giveaway-status-card.is-done .giveaway-status-dot { color: #ffe08a; }

.giveaway-status-head strong {
  display: block;
  font-size: clamp(1rem, 4vw, 1.16rem);
  line-height: 1.12;
  font-weight: 1000;
}

.giveaway-status-text {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.34;
  font-weight: 800;
}

.giveaway-turnstile {
  margin: 0;
  padding: 0;
  min-height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.giveaway-turnstile-widget {
  width: 300px;
  max-width: 100%;
  min-height: 72px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  transform: none;
  transform-origin: center;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.14));
}

.giveaway-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.giveaway-meta .data-row {
  min-height: 74px;
  padding: 13px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-radius: 20px;
  background:
    radial-gradient(88px 58px at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.105);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.08);
}

.giveaway-meta .data-row span:first-child {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.giveaway-meta .data-row span:last-child {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 1000;
  text-align: left;
}

.giveaway-footer {
  margin-top: 2px;
  display: grid;
  gap: 12px;
}

.giveaway-result-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.36;
}

.giveaway-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.giveaway-actions .primary-button,
.giveaway-actions .secondary-button,
#giveawayRetry {
  min-height: 54px;
  border-radius: 18px;
}

@media (min-width: 721px) {
  .giveaway-state {
    padding-top: 28px;
  }

  .giveaway-hero {
    min-height: 250px;
  }
}

@media (max-width: 380px) {
  .giveaway-state {
    padding-left: 12px;
    padding-right: 12px;
  }

  .giveaway-hero {
    min-height: 218px;
  }

  .giveaway-actions,
  .giveaway-meta {
    grid-template-columns: 1fr;
  }

  .giveaway-turnstile-widget {
    transform: scale(0.94);
  }
}

/* Giveaway winners pill polish */
.giveaway-meta {
  width: 100%;
  margin: -2px 0 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.giveaway-meta.hidden {
  display: none !important;
}

.giveaway-meta .data-row {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 9px 13px 9px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.058)),
    color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.08);
}

.giveaway-meta .data-row::before {
  content: ''; /* trophy svg mask */
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
  line-height: 1;
}

.giveaway-meta .data-row span:first-child {
  order: 2;
  color: color-mix(in srgb, var(--text-soft) 88%, white 10%);
  font-size: 0.84rem;
  line-height: 1;
  font-weight: 950;
}

.giveaway-meta .data-row span:last-child {
  order: 1;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 1000;
  text-align: left;
}

.giveaway-meta .data-row span:last-child::after {
  content: '';
}

.giveaway-status-card {
  margin-top: 4px;
}

.giveaway-result-text {
  text-align: center;
  font-size: 0.86rem;
}

@media (max-width: 380px) {
  .giveaway-meta {
    display: flex;
  }

  .giveaway-meta .data-row {
    max-width: 100%;
  }
}

/* Giveaway and period final cleanup */
.giveaway-hero {
  min-height: 224px;
  gap: 9px;
}

.giveaway-hero .giveaway-meta {
  width: auto;
  margin: 4px 0 0;
  display: inline-flex;
  justify-content: center;
}

.giveaway-hero .giveaway-meta.hidden {
  display: none !important;
}

.giveaway-hero .giveaway-meta .data-row {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.giveaway-hero .giveaway-meta .data-row::before {
  content: ''; /* trophy svg mask */
  width: auto;
  height: auto;
  display: inline;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.9rem;
}

.giveaway-hero .giveaway-meta .data-row span:first-child {
  order: 2;
  color: color-mix(in srgb, var(--text-soft) 88%, white 8%);
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 900;
}

.giveaway-hero .giveaway-meta .data-row span:last-child {
  order: 1;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1;
  font-weight: 1000;
}

.giveaway-state > .giveaway-meta {
  display: none !important;
}

.giveaway-turnstile {
  min-height: 78px;
}

.giveaway-result-text {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.82rem;
  line-height: 1.28;
}

.period-card-grid {
  gap: 10px;
}

.period-card {
  min-height: 104px;
  padding: 14px;
  border-radius: 22px;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(100px 70px at 92% 0%, rgba(255, 255, 255, 0.12), transparent 72%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045));
  border-color: rgba(255, 255, 255, 0.1);
}

.period-card.active {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    radial-gradient(120px 88px at 100% -12%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 76%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  transform: translateY(-1px);
}

.period-card.active::after {
  display: none !important;
  content: none !important;
}

.period-card.active::before {
  opacity: 0.75;
}

.period-card strong {
  max-width: calc(100% - 54px);
  font-size: clamp(0.98rem, 3.8vw, 1.12rem);
}

.period-card small {
  display: none;
}

.period-price {
  align-self: end;
  margin: 0;
  padding: 0;
  font-size: clamp(1.32rem, 5.2vw, 1.64rem);
  letter-spacing: -0.025em;
}

.period-discount-badge,
.period-popular-badge {
  position: absolute;
  z-index: 3;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  width: auto !important;
  max-width: calc(100% - 16px);
}

.period-discount-badge {
  top: 9px;
  right: 9px;
  left: auto !important;
  color: #10221b;
  background: linear-gradient(145deg, #a7f5ce, #79e6b1);
  box-shadow: 0 8px 18px rgba(18, 190, 120, 0.12), inset 0 1px 0 rgba(255,255,255,0.32);
}

.period-popular-badge {
  left: 9px;
  right: auto;
  top: auto;
  bottom: 9px;
  color: #03182d;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 1px 0 rgba(255,255,255,0.3);
}

.period-card:has(.period-popular-badge) .period-price {
  padding-bottom: 24px;
}

@media (max-width: 380px) {
  .period-card {
    min-height: 96px;
    padding: 12px;
  }

  .period-price {
    font-size: 1.22rem;
  }
}

/* Giveaway winners line and tariff badges */
.giveaway-hero .giveaway-meta {
  width: auto;
  margin: 2px 0 0;
  display: block;
}

.giveaway-hero .giveaway-meta.hidden {
  display: none !important;
}

.giveaway-winners-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: color-mix(in srgb, var(--text-soft) 82%, white 8%);
  font-size: 0.84rem;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}

.giveaway-winners-line::before,
.giveaway-winners-line::after {
  content: '';
  width: 18px;
  height: 1px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-soft) 28%, transparent);
}

.giveaway-winners-prefix {
  order: 2;
}

.giveaway-winners-line strong {
  order: 1;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 1000;
}

.giveaway-hero .giveaway-meta .data-row,
.giveaway-meta .data-row {
  display: none !important;
}

.period-card {
  min-height: 100px;
  padding: 13px;
  border-radius: 20px;
  overflow: hidden;
}

.period-card strong {
  max-width: calc(100% - 62px);
}

.period-card.active {
  border-color: color-mix(in srgb, var(--accent) 42%, rgba(255,255,255,0.24));
}

.period-discount-badge,
.period-popular-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 18px) !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 8px !important;
  border-radius: 10px !important;
  font-size: 0.62rem !important;
  line-height: 1 !important;
  white-space: nowrap;
  transform: none !important;
}

.period-discount-badge::before,
.period-discount-badge::after,
.period-popular-badge::before,
.period-popular-badge::after {
  display: none !important;
  content: none !important;
}

.period-discount-badge {
  top: 9px !important;
  right: 9px !important;
  left: auto !important;
  bottom: auto !important;
  color: #0c2419 !important;
  background: linear-gradient(145deg, rgba(173, 246, 207, 0.96), rgba(112, 225, 169, 0.94)) !important;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.period-popular-badge {
  top: 9px !important;
  left: 9px !important;
  right: auto !important;
  bottom: auto !important;
  color: var(--text) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    color-mix(in srgb, var(--accent) 18%, transparent) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 18px rgba(0,0,0,0.08) !important;
}

.period-card:has(.period-popular-badge) .period-price {
  padding-bottom: 0;
}

.period-card:has(.period-popular-badge) strong {
  padding-top: 24px;
}

@media (max-width: 380px) {
  .giveaway-winners-line {
    font-size: 0.8rem;
  }

  .giveaway-winners-line::before,
  .giveaway-winners-line::after {
    width: 14px;
  }

  .period-card {
    min-height: 94px;
  }
}

/* Giveaway winners clean and popular ribbon */
.giveaway-winners-line::before,
.giveaway-winners-line::after {
  display: none !important;
  content: none !important;
}

.giveaway-winners-line {
  gap: 6px;
  color: color-mix(in srgb, var(--text-soft) 86%, white 8%);
}

.period-card:has(.period-popular-badge) strong {
  padding-top: 0;
  max-width: calc(100% - 46px);
}

.period-card:has(.period-popular-badge) .period-price {
  padding-bottom: 0;
}

.period-popular-badge {
  top: auto !important;
  left: auto !important;
  right: -35px !important;
  bottom: 15px !important;
  width: 116px !important;
  max-width: none !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  transform: rotate(-35deg) !important;
  transform-origin: center !important;
  color: #03182d !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
  border: 0 !important;
  box-shadow:
    0 8px 16px color-mix(in srgb, var(--accent) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
  font-size: 0.58rem !important;
  font-weight: 1000 !important;
  letter-spacing: 0.01em !important;
  text-transform: uppercase;
}

.period-popular-badge::before,
.period-popular-badge::after {
  display: none !important;
  content: none !important;
}

.period-discount-badge {
  z-index: 4;
}

/* Popular ribbon alignment */
.period-popular-badge {
  right: -27px !important;
  bottom: 16px !important;
  width: 104px !important;
  height: 21px !important;
  min-height: 21px !important;
  padding: 0 !important;
  transform: rotate(-35deg) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden;
  clip-path: inset(0 round 0);
}

.period-popular-badge {
  text-indent: 0;
}

/* Popular ribbon true corner */
.period-popular-badge {
  top: auto !important;
  left: auto !important;
  right: -47px !important;
  bottom: 26px !important;
  width: 150px !important;
  max-width: none !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  transform: rotate(-45deg) !important;
  transform-origin: center center !important;
  clip-path: none !important;
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  color: #05172a !important;
  background: linear-gradient(135deg, #ffd5ea, #ffafd4 48%, #ffc7df) !important;
  box-shadow:
    0 8px 16px rgba(95, 18, 63, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.48) !important;
  font-size: 0.56rem !important;
  font-weight: 1000 !important;
  letter-spacing: 0.055em !important;
  text-transform: uppercase;
}

.period-popular-badge::before,
.period-popular-badge::after {
  display: none !important;
  content: none !important;
}

.period-card:has(.period-popular-badge) {
  overflow: hidden;
}

/* Popular ribbon text optical center */
.period-popular-badge {
  text-indent: -22px !important;
  justify-content: center !important;
}


/* Browser auth refresh */
.auth-state {
  position: relative;
  overflow: hidden;
  max-width: 430px;
  margin: clamp(28px, 8vh, 72px) auto 0;
  padding: 28px;
  border-radius: 34px;
  background:
    radial-gradient(190px 160px at 12% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 72%),
    radial-gradient(260px 220px at 92% 100%, rgba(255,154,200,.18), transparent 76%),
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.065));
  box-shadow: 0 24px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.2);
}

.auth-orb {
  position: absolute;
  inset: -80px -80px auto auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  filter: blur(32px);
  opacity: .8;
  pointer-events: none;
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.auth-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

.auth-logo img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.auth-kicker {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.auth-brand h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

.auth-subtitle {
  position: relative;
  margin: 0 0 20px;
  color: var(--text-soft);
  font-weight: 800;
  line-height: 1.42;
}

.auth-form {
  position: relative;
}

.auth-input {
  min-height: 54px;
  border-radius: 18px;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.105);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13);
  font-weight: 800;
}

.auth-input::placeholder {
  color: color-mix(in srgb, var(--text-soft) 74%, transparent);
}

.auth-input:focus {
  border-color: color-mix(in srgb, var(--accent) 70%, rgba(255,255,255,.3));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
}

.auth-submit {
  min-height: 56px;
  border-radius: 999px;
  font-size: 1rem;
}

.auth-links {
  justify-content: center;
}

.auth-message {
  min-height: 24px;
  text-align: center;
  font-weight: 900;
  color: var(--accent);
}

.auth-message.is-error {
  color: var(--danger);
}

.auth-footnote {
  margin-top: 12px;
  text-align: center;
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 800;
}

.password-toggle {
  border-radius: 999px;
}

/* Browser auth desktop polish */
@media (min-width: 860px) {
  .auth-state {
    max-width: 470px !important;
    margin: clamp(110px, 18vh, 190px) auto 0 !important;
    padding: 34px 34px 30px !important;
    border-radius: 38px !important;
    background:
      radial-gradient(320px 240px at 0% 0%, color-mix(in srgb, var(--accent) 33%, transparent), transparent 72%),
      radial-gradient(340px 260px at 100% 100%, rgba(255,154,200,.24), transparent 74%),
      linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.07)) !important;
    box-shadow:
      0 34px 90px rgba(0,0,0,.34),
      0 0 0 1px rgba(255,255,255,.08),
      inset 0 1px 0 rgba(255,255,255,.24) !important;
  }

  .auth-state::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background:
      linear-gradient(120deg, rgba(255,255,255,.22), transparent 28%, transparent 72%, rgba(255,255,255,.12)),
      radial-gradient(180px 26px at 50% 0%, rgba(255,255,255,.22), transparent 70%);
    opacity: .9;
  }

  .auth-state::after {
    content: "Быстрый доступ к подписке • управление устройствами • продление в пару кликов";
    position: absolute;
    left: 50%;
    top: calc(100% + 22px);
    transform: translateX(-50%);
    width: min(720px, 92vw);
    padding: 18px 24px;
    border-radius: 28px;
    color: rgba(255,255,255,.72);
    text-align: center;
    font-weight: 900;
    line-height: 1.35;
    background:
      linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.045)),
      radial-gradient(220px 70px at 18% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 72%);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 20px 52px rgba(0,0,0,.18);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  .auth-brand {
    gap: 16px !important;
    margin-bottom: 20px !important;
  }

  .auth-logo {
    width: 64px !important;
    height: 64px !important;
    border-radius: 23px !important;
  }

  .auth-logo img {
    width: 50px !important;
    height: 50px !important;
  }

  .auth-brand h2 {
    font-size: 2.25rem !important;
  }

  .auth-subtitle {
    margin-bottom: 24px !important;
    font-size: 1rem !important;
  }

  .auth-field label {
    margin-bottom: 8px !important;
    color: rgba(255,255,255,.78) !important;
  }

  .auth-input {
    min-height: 60px !important;
    border-radius: 21px !important;
    padding-inline: 18px !important;
  }

  .auth-submit {
    min-height: 62px !important;
    margin-top: 8px !important;
    box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 28%, rgba(0,0,0,.24)) !important;
  }

  .auth-links {
    margin-top: 14px !important;
  }

  .auth-footnote {
    margin-top: 34px !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(255,255,255,.11);
  }
}

@media (max-width: 859px) {
  .auth-state {
    margin-top: clamp(48px, 14vh, 108px) !important;
  }
}

/* Browser auth must own the whole viewport, including desktop bottom area */
html:has(#authState:not(.hidden)),
body:has(#authState:not(.hidden)) {
  min-height: 100%;
  background:
    radial-gradient(760px 520px at 7% 4%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 64%),
    radial-gradient(820px 580px at 93% 12%, rgba(255,154,200,.18), transparent 68%),
    radial-gradient(560px 320px at 50% 98%, rgba(255,92,185,.14), transparent 70%),
    linear-gradient(135deg, #0d151d 0%, #101b26 46%, #171d28 100%) !important;
  background-attachment: fixed !important;
}

body:has(#authState:not(.hidden)) {
  overflow-x: hidden;
}

body:has(#authState:not(.hidden)) .app-shell {
  min-height: 100vh !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 1px 24px 140px !important;
  background:
    radial-gradient(780px 520px at 7% 4%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 64%),
    radial-gradient(820px 580px at 93% 12%, rgba(255,154,200,.18), transparent 68%),
    radial-gradient(560px 320px at 50% 98%, rgba(255,92,185,.14), transparent 70%),
    linear-gradient(135deg, #0d151d 0%, #101b26 46%, #171d28 100%) !important;
}

body:has(#authState:not(.hidden)) .backdrop {
  position: fixed !important;
}

@media (min-width: 860px) {
  body:has(#authState:not(.hidden)) .topbar,
  body:has(#authState:not(.hidden)) #unsupportedState,
  body:has(#authState:not(.hidden)) #loadingState,
  body:has(#authState:not(.hidden)) #errorState,
  body:has(#authState:not(.hidden)) .bottom-nav {
    display: none !important;
  }

  body:has(#authState:not(.hidden)) .app-shell {
    display: grid !important;
    align-items: center !important;
    justify-items: center !important;
    padding: 8vh 24px 18vh !important;
  }

  body:has(#authState:not(.hidden)) .auth-state {
    margin: 0 auto !important;
    transform: translateY(7vh);
  }
}

/* Full viewport app background: prevents gray canvas below short desktop pages */
html,
body {
  min-height: 100vh !important;
  background-color: #0d151d !important;
}

body {
  background-attachment: fixed !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1000px 720px at 0% 0%, rgba(100, 213, 255, 0.28), transparent 60%),
    radial-gradient(900px 700px at 100% 20%, rgba(255, 170, 208, 0.18), transparent 62%),
    radial-gradient(520px 320px at 50% 100%, rgba(255, 92, 185, 0.12), transparent 72%),
    linear-gradient(150deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
}

.app-shell {
  min-height: 100vh !important;
}

@media (min-width: 860px) {
  body:not(:has(#authState:not(.hidden))) .app-shell {
    min-height: 100vh !important;
    padding-top: clamp(82px, 13vh, 150px) !important;
    padding-bottom: 168px !important;
  }

  body[data-active-tab="profile"] .tab-screen:not(.hidden),
  body[data-active-tab="subscription"] .tab-screen:not(.hidden),
  body[data-active-tab="home"] .tab-screen:not(.hidden) {
    margin-top: 0 !important;
  }

  body[data-active-tab="profile"] .profile-screen,
  body[data-active-tab="subscription"] .subscription-screen,
  body[data-active-tab="home"] .home-stack {
    transform: translateY(clamp(18px, 4vh, 56px));
  }

  body[data-active-tab="buy"] .buy-modern-screen,
  body[data-active-tab="referrals"] .referrals-modern-screen {
    transform: translateY(clamp(10px, 2.4vh, 34px));
  }
}


/* SVG icon set replacing temporary emoji placeholders */
.svg-emoji,
.nav-icon,
.profile-setting-icon,
.subscription-summary-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.svg-emoji-svg {
  display: block;
  width: 1.2em;
  height: 1.2em;
}

.home-main-action .svg-emoji-svg,
.home-benefit .svg-emoji-svg,
.payment-info-head .svg-emoji-svg,
.referral-hero .svg-emoji-svg {
  width: 1.35em;
  height: 1.35em;
}

.nav-icon .svg-emoji-svg {
  width: 24px;
  height: 24px;
}

.profile-setting-icon .svg-emoji-svg,
.subscription-summary-icon .svg-emoji-svg {
  width: 20px;
  height: 20px;
}

.devices-sheet-icon .svg-emoji-svg,
.purchase-success-icon .svg-emoji-svg {
  width: 28px;
  height: 28px;
}

.giveaway-meta .data-row::before,
.giveaway-hero .giveaway-meta .data-row::before {
  content: '' !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M12 17v4'/%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0Z'/%3E%3Cpath d='M7 6H4a2 2 0 0 0 2 5h1'/%3E%3Cpath d='M17 6h3a2 2 0 0 1-2 5h-1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M12 17v4'/%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0Z'/%3E%3Cpath d='M7 6H4a2 2 0 0 0 2 5h1'/%3E%3Cpath d='M17 6h3a2 2 0 0 1-2 5h-1'/%3E%3C/svg%3E") center / contain no-repeat;
  border-radius: 0 !important;
  box-shadow: none !important;
}
