:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --bg-soft: #111319;
  --surface: rgba(29, 31, 39, 0.9);
  --surface-solid: #1c1e25;
  --surface-raised: #242731;
  --surface-muted: rgba(255, 255, 255, 0.055);
  --text: #f7f8fb;
  --text-secondary: #a3a8b5;
  --text-tertiary: #8b91a0;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #2a8cff;
  --accent-2: #39c6f4;
  --accent-action: #0d70c4;
  --accent-action-2: #075f9e;
  --accent-soft: rgba(42, 140, 255, 0.14);
  --green: #38d28b;
  --green-soft: rgba(56, 210, 139, 0.14);
  --yellow: #ffc75b;
  --red: #ff6b72;
  --red-soft: rgba(255, 107, 114, 0.14);
  --warning-text: #ffb448;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
  --chrome-bg: rgba(15, 15, 15, 0.72);
  --chrome-fallback-bg: rgba(15, 15, 15, 0.95);
  --header-height: calc(84px + env(safe-area-inset-top));
  --bottom-nav-height: calc(88px + env(safe-area-inset-bottom));
  --blur: blur(22px);
}

html.theme-light {
  color-scheme: light;
  --bg: #edf1f7;
  --bg-soft: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-raised: #f2f5fa;
  --surface-muted: rgba(19, 42, 74, 0.055);
  --text: #101520;
  --text-secondary: #5f687a;
  --text-tertiary: #646b78;
  --border: rgba(25, 50, 82, 0.09);
  --border-strong: rgba(25, 50, 82, 0.14);
  --accent: #0969da;
  --accent-2: #0b70c9;
  --accent-action: #0969da;
  --accent-action-2: #075f9e;
  --accent-soft: rgba(9, 105, 218, 0.11);
  --green: #147348;
  --green-soft: rgba(28, 184, 113, 0.11);
  --red: #b8323b;
  --red-soft: rgba(235, 79, 87, 0.1);
  --warning-text: #8a4b00;
  --shadow: 0 18px 46px rgba(34, 59, 90, 0.12);
  --chrome-bg: rgba(255, 255, 255, 0.72);
  --chrome-fallback-bg: rgba(255, 255, 255, 0.95);
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  background:
    radial-gradient(circle at 82% -8%, rgba(42, 140, 255, 0.18), transparent 28rem),
    radial-gradient(circle at -14% 28%, rgba(57, 198, 244, 0.08), transparent 23rem),
    var(--bg);
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active,
.warning-button:active,
.quick-action:active,
.icon-button:active,
.copy-button:active,
.nav-item:active,
.notification-item:active {
  transform: scale(0.98);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

main:focus {
  outline: 0;
}

.skip-link {
  position: fixed;
  z-index: 10001;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  font-weight: 740;
  opacity: 0;
  transform: translate(-50%, -140%);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.skip-link:focus {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button {
  color: inherit;
}

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

svg {
  display: block;
}

.app-shell {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 18px;
}

.app-shell > main {
  padding-top: var(--header-height);
  padding-bottom: var(--bottom-nav-height);
}

.app-shell::before {
  position: fixed;
  z-index: -1;
  top: -110px;
  left: 50%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(42, 140, 255, 0.08);
  filter: blur(74px);
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

.app-header {
  position: fixed;
  z-index: 300;
  top: calc(12px + env(safe-area-inset-top));
  right: 0;
  left: 0;
  display: flex;
  width: min(calc(100% - 24px), 456px);
  min-height: 64px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  background-color: var(--chrome-bg);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  backdrop-filter: blur(16px) saturate(145%);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 13px;
  background: linear-gradient(145deg, #2587ff, #44d6ef);
  box-shadow: 0 8px 22px rgba(42, 140, 255, 0.28);
}

.brand-mark::after {
  position: absolute;
  top: -15px;
  right: -12px;
  width: 30px;
  height: 30px;
  border: 7px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  content: "";
}

.brand-mark svg {
  position: relative;
  z-index: 1;
  color: #fff;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.brand-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.avatar-button {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.icon-button:hover,
.avatar-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.notification-button {
  position: relative;
}

.notification-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 107, 114, 0.1);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.notification-indicator.hidden {
  opacity: 0;
  transform: scale(0.5);
}

.avatar-button {
  border: 2px solid rgba(42, 140, 255, 0.28);
  background: linear-gradient(145deg, #364b72, #1f293c);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.theme-icon-sun {
  display: none;
}

html.theme-light .theme-icon-sun {
  display: block;
}

html.theme-light .theme-icon-moon {
  display: none;
}

.page-intro {
  margin: 17px 2px 18px;
  animation: rise-in 0.45s both;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: clamp(27px, 8vw, 34px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.page-subtitle {
  max-width: 370px;
  margin: 9px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 13px;
}

.section {
  margin-top: 25px;
  animation: rise-in 0.5s 0.08s both;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 11px;
}

.section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 730;
  letter-spacing: -0.02em;
}

.section-meta,
.text-link {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.text-link {
  color: var(--accent);
}

.card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.subscription-card {
  position: relative;
  min-height: 205px;
  padding: 21px;
  overflow: hidden;
  border-color: rgba(83, 164, 255, 0.22);
  background:
    radial-gradient(circle at 92% 7%, rgba(74, 204, 244, 0.2), transparent 9rem),
    linear-gradient(150deg, rgba(38, 76, 126, 0.92), rgba(25, 28, 37, 0.96) 61%);
  color: #fff;
  animation: rise-in 0.5s 0.03s both;
}

html.theme-light .subscription-card {
  background:
    radial-gradient(circle at 92% 7%, rgba(151, 231, 255, 0.56), transparent 10rem),
    linear-gradient(145deg, #1f75db, #1454a4 65%);
}

.subscription-card::before,
.subscription-card::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.subscription-card::before {
  top: -88px;
  right: -66px;
  width: 220px;
  height: 220px;
}

.subscription-card::after {
  top: -44px;
  right: -23px;
  width: 130px;
  height: 130px;
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.subscription-card .status-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.12);
}

.status-pill.success,
.badge.success {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.neutral,
.badge.neutral {
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.status-pill.trial {
  background: rgba(255, 180, 72, 0.14);
  color: var(--warning-text);
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 0 3px rgba(56, 210, 139, 0.12);
}

.plan-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
}

.subscription-date {
  position: relative;
  z-index: 1;
  margin: 30px 0 4px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 650;
}

.subscription-expiry {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 25px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.traffic-block {
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

.traffic-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 650;
}

.traffic-labels strong {
  color: #fff;
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54d8f4, #fff);
  box-shadow: 0 0 16px rgba(84, 216, 244, 0.45);
  animation: progress-in 0.9s 0.3s both ease-out;
}

.traffic-note {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 13px;
  animation: rise-in 0.5s 0.1s both;
}

.quick-action {
  display: flex;
  min-height: 92px;
  padding: 15px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-action:hover {
  border-color: rgba(42, 140, 255, 0.3);
  transform: translateY(-2px);
}

.quick-action.wide {
  min-height: 72px;
  align-items: center;
  grid-column: 1 / -1;
}

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

.quick-action-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.quick-action-copy span {
  color: var(--text-secondary);
  font-size: 11px;
}

.action-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.metric-card {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.metric-icon {
  display: flex;
  min-height: 24px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 18px;
}

.metric-value {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-label {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-highlight,
.server-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
}

.flag-box {
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-muted);
  font-size: 21px;
}

.server-copy,
.list-copy {
  min-width: 0;
  flex: 1;
}

.server-copy strong,
.list-copy strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-copy span,
.list-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ping {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.ping::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.bottom-nav {
  position: fixed;
  z-index: 300;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  width: min(calc(100% - 24px), 456px);
  min-height: 68px;
  margin: 0 auto;
  padding: 6px 8px;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  background-color: var(--chrome-bg);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  backdrop-filter: blur(16px) saturate(145%);
}

@supports not (backdrop-filter: blur(1px)) {
  @supports not (-webkit-backdrop-filter: blur(1px)) {
    .app-header,
    .bottom-nav {
      background-color: var(--chrome-fallback-bg);
    }
  }
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-radius: 24px;
  color: var(--text-tertiary);
  min-height: 56px;
  font-size: 10px;
  font-weight: 690;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.segmented {
  display: grid;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-muted);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.segment-button {
  min-height: 44px;
  padding: 7px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  transition: all 0.2s ease;
}

.segment-button.active {
  background: var(--surface-solid);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  color: var(--text);
}

.segmented.compact {
  width: 104px;
  padding: 3px;
  border-radius: 12px;
}

.segmented.compact .segment-button {
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: 11px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fade-in 0.25s both;
}

.current-tariff-section {
  scroll-margin-top: calc(var(--header-height) + 8px);
}

.current-tariff-section.tariff-focus .current-tariff-card {
  animation: current-tariff-focus 0.85s ease;
}

.current-tariff-section + .segmented {
  margin-top: 18px;
}

.current-tariff-card {
  padding: 18px;
  border-color: rgba(42, 140, 255, 0.34);
  background:
    radial-gradient(circle at 100% 0, rgba(57, 198, 244, 0.14), transparent 11rem),
    var(--surface);
  box-shadow: 0 16px 38px rgba(30, 114, 220, 0.11);
}

.current-tariff-top {
  display: grid;
  align-items: center;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
}

.current-tariff-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}

.current-tariff-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.current-tariff-copy small,
.current-tariff-expiry span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.current-tariff-copy strong {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.current-tariff-expiry {
  display: flex;
  min-height: 50px;
  margin: 14px 0 12px;
  padding: 10px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  background: var(--surface-muted);
}

.current-tariff-expiry strong {
  font-size: 13px;
  font-weight: 750;
}

.subscription-builder {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.subscription-options {
  display: grid;
  min-width: 0;
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.choice-card {
  padding: 17px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.choice-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
}

.choice-heading > span:last-child {
  display: flex;
  flex-direction: column;
}

.choice-heading strong {
  font-size: 14px;
  font-weight: 740;
}

.choice-heading small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.step-number {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.option-grid {
  display: grid;
  gap: 7px;
}

.period-options {
  grid-template-columns: repeat(4, 1fr);
}

.device-options {
  grid-template-columns: repeat(5, 1fr);
}

.option-chip {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 66px;
  padding: 8px 4px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transform-origin: center;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.option-chip:hover {
  transform: translateY(-1px);
}

.option-chip.active {
  border-color: rgba(42, 140, 255, 0.58);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(42, 140, 255, 0.12);
  color: var(--accent);
}

.option-chip.tariff-option-pulse {
  animation: tariff-option-press 0.17s ease-out;
}

.option-chip strong {
  font-size: 16px;
  font-weight: 780;
  line-height: 1;
}

.option-chip span {
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.option-chip.active span {
  color: color-mix(in srgb, var(--accent) 72%, var(--text-secondary));
}

.option-chip em {
  position: absolute;
  top: -6px;
  right: -4px;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--accent-action);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.price-summary-slot {
  display: contents;
}

.price-summary {
  position: relative;
  isolation: isolate;
  padding: 19px;
  overflow: hidden;
  border-color: rgba(42, 140, 255, 0.3);
  background:
    radial-gradient(circle at 100% 0, rgba(57, 198, 244, 0.14), transparent 10rem),
    var(--surface);
  background-color: var(--surface);
  transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.price-summary.current-tariff-selected {
  border-color: rgba(255, 180, 72, 0.52);
  background-color: color-mix(in srgb, var(--surface) 92%, #ffb448 8%);
  box-shadow: 0 16px 38px rgba(255, 160, 45, 0.1), inset 0 0 0 1px rgba(255, 180, 72, 0.05);
}

.price-summary::before,
.price-summary::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.price-summary::before {
  background-image: radial-gradient(circle, rgba(255, 180, 72, 0.27) 0 1px, transparent 1.4px);
  background-size: 25px 25px;
  mask-image: linear-gradient(115deg, transparent 12%, rgba(0, 0, 0, 0.8), transparent 82%);
  -webkit-mask-image: linear-gradient(115deg, transparent 12%, rgba(0, 0, 0, 0.8), transparent 82%);
}

.price-summary::after {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 180, 72, 0.16), transparent 11rem),
    linear-gradient(135deg, rgba(255, 180, 72, 0.075), transparent 62%);
}

.price-summary.current-tariff-selected::before {
  opacity: 0.32;
}

.price-summary.current-tariff-selected::after {
  opacity: 1;
}

.price-summary > * {
  position: relative;
  z-index: 1;
}

.price-summary.current-tariff-selected .price-summary-top > span:first-child > small {
  color: var(--warning-text);
}

.price-summary-top > span:first-child > small {
  transition: color 0.28s ease;
}

[data-plan-status][hidden] {
  display: none;
}

[data-plan-status] {
  transform-origin: center;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.11s ease, transform 0.11s ease;
}

[data-plan-status].tariff-status-swapping {
  opacity: 0;
  transform: scale(0.82);
}

.price-summary-top,
.price-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-summary-top > span:first-child {
  display: flex;
  flex-direction: column;
}

.price-summary-top small {
  color: var(--text-secondary);
  font-size: 11px;
}

.price-summary-top strong {
  margin-top: 2px;
  font-size: 27px;
  font-weight: 790;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.price-value-line {
  display: flex;
  min-height: 34px;
  align-items: baseline;
  gap: 8px;
}

.price-value-line del {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 650;
}

.price-value-line del[hidden] {
  display: none;
}

.price-details {
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.price-details [data-calculated-plan] {
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.price-details [data-calculated-plan].tariff-text-swapping {
  opacity: 0;
  transform: translateY(2px);
}

.price-details [data-monthly-price] {
  font-variant-numeric: tabular-nums;
}

@keyframes tariff-option-press {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.96);
  }
}

.promo-block {
  margin: 0 0 13px;
}

.promo-card {
  padding: 17px;
  transition: none;
}

.promo-card-heading {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  gap: 10px;
}

.promo-card-heading > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.promo-card-heading h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.promo-card-heading p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 10px;
}

.promo-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.promo-card .promo-block {
  margin: 0;
}

.promo-label {
  display: block;
  margin: 0 3px 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 690;
}

.promo-form {
  display: flex;
  min-height: 54px;
  padding: 5px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.promo-form:focus-within {
  border-color: rgba(42, 140, 255, 0.48);
  box-shadow: 0 0 0 3px rgba(42, 140, 255, 0.08);
}

.promo-block.applied .promo-form {
  border-color: rgba(56, 210, 139, 0.34);
  background: var(--green-soft);
}

.promo-block.invalid .promo-form {
  border-color: rgba(255, 107, 114, 0.4);
}

.promo-form input {
  min-width: 0;
  height: 44px;
  padding: 0 8px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 720;
  text-transform: uppercase;
}

.promo-form input::placeholder {
  color: var(--text-tertiary);
  font-weight: 620;
  text-transform: none;
}

.promo-apply {
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
}

.promo-remove {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(56, 210, 139, 0.12);
  color: var(--green);
  cursor: pointer;
}

.current-selection-note {
  --tariff-notice-expanded-padding: 13px;
  display: flex;
  max-height: 0;
  margin: 0;
  padding: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
  border: 0;
  border-top: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--warning-text) 72%, var(--text-secondary));
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-3px);
  visibility: hidden;
  pointer-events: none;
  transition:
    max-height 0.26s ease,
    padding-top 0.26s ease,
    border-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s linear 0.26s;
}

.current-selection-note.visible {
  max-height: 160px;
  padding-top: var(--tariff-notice-expanded-padding);
  border-top-color: rgba(255, 180, 72, 0.24);
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition:
    max-height 0.26s ease,
    padding-top 0.26s ease,
    border-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s;
}

.plan-action-block {
  display: grid;
  gap: 10px;
}

.current-selection-note a {
  display: inline-flex;
  min-height: 44px;
  padding: 7px 0;
  align-items: center;
  color: var(--warning-text);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(255, 180, 72, 0.42);
  text-underline-offset: 3px;
}

.promo-remove[hidden],
.promo-apply[hidden] {
  display: none;
}

.promo-message {
  min-height: 17px;
  margin: 5px 3px 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 680;
}

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

.promo-message.error {
  color: var(--red);
}

.plan-list {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

.plan-card {
  position: relative;
  display: grid;
  min-height: 137px;
  padding: 17px;
  overflow: hidden;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
}

.plan-card.active {
  border-color: rgba(42, 140, 255, 0.54);
  background:
    radial-gradient(circle at 103% -8%, rgba(57, 198, 244, 0.14), transparent 10rem),
    var(--surface);
  box-shadow: 0 16px 38px rgba(30, 114, 220, 0.15);
}

.plan-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 760;
}

.popular-label {
  display: inline-flex;
  min-height: 21px;
  padding: 3px 7px;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-action), var(--accent-action-2));
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.plan-price {
  text-align: right;
}

.plan-price strong {
  display: block;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.plan-price span {
  color: var(--text-secondary);
  font-size: 10px;
}

.plan-features {
  display: flex;
  align-items: center;
  align-self: end;
  flex-wrap: wrap;
  gap: 7px;
}

.feature-chip {
  display: inline-flex;
  padding: 5px 8px;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 680;
}

.plan-select {
  align-self: end;
  min-height: 44px;
  padding: 7px 13px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 740;
}

.plan-card.active .plan-select {
  background: var(--accent-action);
  color: #fff;
}

.payment-list,
.friend-list,
.settings-list,
.server-list,
.device-list,
.faq-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.payment-row,
.friend-row,
.setting-row {
  display: flex;
  min-height: 70px;
  padding: 13px 15px;
  align-items: center;
  gap: 12px;
}

.payment-row + .payment-row,
.friend-row + .friend-row,
.setting-row + .setting-row,
.server-row + .server-row,
.device-row + .device-row,
.faq-item + .faq-item {
  border-top: 1px solid var(--border);
}

.device-row {
  display: flex;
  min-height: 72px;
  padding: 14px 15px;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.device-section-heading {
  align-items: flex-start;
}

.device-section-heading .section-meta {
  max-width: 265px;
  line-height: 1.45;
  text-align: right;
}

.device-row.removing {
  opacity: 0;
  transform: translateX(12px);
}

.device-title {
  display: flex !important;
  min-width: 0;
  margin-top: 0 !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.device-title strong {
  min-width: 0;
}

.device-type-badge {
  display: inline-flex !important;
  min-height: 20px;
  margin-top: 0 !important;
  padding: 3px 6px;
  align-items: center;
  border-radius: 7px;
  font-size: 10px !important;
  font-weight: 760 !important;
  line-height: 1;
}

.device-type-badge.mobile {
  background: var(--accent-soft);
  color: var(--accent) !important;
}

.device-type-badge.personal {
  background: rgba(255, 180, 72, 0.14);
  color: var(--warning-text) !important;
}

.device-limit-message {
  margin-top: 8px !important;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-secondary) !important;
  font-size: 10px !important;
  line-height: 1.45;
  white-space: normal !important;
}

.device-limit-message[hidden] {
  display: none !important;
}

.device-limit-message a {
  color: var(--accent);
  font-weight: 740;
}

.remove-device {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--red-soft);
  color: var(--red);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.remove-device:hover {
  background: rgba(255, 107, 114, 0.2);
  transform: scale(1.04);
}

.remove-device:disabled {
  background: var(--surface-muted);
  color: var(--text-tertiary);
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.58;
  transform: none;
}

.reissue-section {
  margin-top: 13px;
}

.reissue-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 104px;
  padding: 19px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 180, 72, 0.42);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 24%, rgba(255, 199, 91, 0.34) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 18%, rgba(255, 180, 72, 0.25) 0 1px, transparent 1.5px),
    linear-gradient(145deg, rgba(57, 45, 31, 0.54), rgba(28, 29, 36, 0.94));
  background-size: 31px 31px, 37px 37px, 43px 43px, auto;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14), inset 0 0 34px rgba(255, 180, 72, 0.025);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

html.theme-light .reissue-card {
  background:
    radial-gradient(circle at 16% 24%, rgba(215, 132, 24, 0.25) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 68%, rgba(29, 42, 62, 0.12) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 18%, rgba(215, 132, 24, 0.2) 0 1px, transparent 1.5px),
    linear-gradient(145deg, rgba(255, 247, 233, 0.96), rgba(255, 255, 255, 0.94));
  background-size: 31px 31px, 37px 37px, 43px 43px, auto;
}

.reissue-card:hover {
  border-color: rgba(255, 180, 72, 0.78);
  box-shadow: 0 15px 38px rgba(255, 153, 33, 0.12), 0 0 0 1px rgba(255, 180, 72, 0.08);
  transform: translateY(-2px);
}

.reissue-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.reissue-copy strong {
  color: var(--warning-text);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

html.theme-light .reissue-copy strong {
  color: var(--warning-text);
}

.reissue-copy span {
  margin-top: 5px;
  color: #aaa4b5;
  font-size: 11px;
  font-weight: 620;
}

html.theme-light .reissue-copy span {
  color: #665f70;
}

.reissue-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 180, 72, 0.22);
  border-radius: 15px;
  background: rgba(255, 180, 72, 0.09);
  color: var(--warning-text);
}

.list-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.list-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.list-icon.orange {
  background: rgba(255, 180, 72, 0.14);
  color: var(--warning-text);
}

.list-value {
  flex: 0 0 auto;
  text-align: right;
}

.list-value strong {
  display: block;
  font-size: 13px;
}

.list-value span {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  min-height: 48px;
  padding: 11px 17px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-action), var(--accent-action-2));
  box-shadow: 0 11px 24px rgba(42, 140, 255, 0.24);
  color: #fff;
}

.primary-button:disabled {
  background: var(--surface-raised);
  box-shadow: none;
  color: var(--text-tertiary);
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.primary-button:not(:disabled):hover,
.secondary-button:not(:disabled):hover,
.danger-button:not(:disabled):hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.full-width {
  width: 100%;
}

.key-hero {
  position: relative;
  padding: 24px 20px 20px;
  overflow: hidden;
  text-align: center;
  animation: rise-in 0.5s both;
}

.key-hero::before {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 270px;
  height: 180px;
  border-radius: 50%;
  background: rgba(42, 140, 255, 0.16);
  content: "";
  filter: blur(40px);
  transform: translateX(-50%);
}

.qr-wrap {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  margin: 0 auto 20px;
  place-items: center;
  border: 8px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(42, 140, 255, 0.21);
}

.qr-wrap::after {
  position: absolute;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 13px;
  background: linear-gradient(145deg, #2587ff, #44d6ef);
  content: "V";
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.qr-code {
  width: 100%;
  height: 100%;
}

.qr-code [data-qr-pattern] {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.38s ease;
}

.qr-code.reissued [data-qr-pattern] {
  transform: rotate(90deg);
}

.key-title {
  position: relative;
  margin: 0;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.key-description {
  position: relative;
  max-width: 320px;
  margin: 7px auto 18px;
  color: var(--text-secondary);
  font-size: 12px;
}

.copy-field {
  display: flex;
  min-width: 0;
  min-height: 52px;
  padding: 7px 7px 7px 13px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
  text-align: left;
}

.copy-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text-secondary);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 11px;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.key-actions {
  display: grid;
  margin-top: 10px;
  grid-template-columns: 1fr;
}

.server-row {
  min-height: 70px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.server-row:hover {
  background: var(--surface-muted);
}

.server-row.active {
  background: var(--accent-soft);
}

.select-server {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-raised);
  color: transparent;
  cursor: pointer;
}

.server-row.active .select-server {
  border-color: var(--accent);
  background: var(--accent-action);
  color: #fff;
}

.referral-hero {
  position: relative;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 5%, rgba(57, 198, 244, 0.21), transparent 11rem),
    linear-gradient(145deg, rgba(34, 65, 107, 0.95), rgba(26, 28, 35, 0.97));
  color: #fff;
  animation: rise-in 0.5s both;
}

html.theme-light .referral-hero {
  background: linear-gradient(145deg, #2177dc, #1454a4);
}

.gift-icon {
  display: grid;
  width: 47px;
  height: 47px;
  margin-bottom: 21px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.referral-hero h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.referral-hero > p {
  max-width: 315px;
  margin: 7px 0 21px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 12px;
}

.referral-hero .copy-field {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}

.referral-hero .copy-value {
  color: rgba(255, 255, 255, 0.78);
}

.referral-hero .copy-button {
  background: #fff;
  color: #1367c8;
}

.referral-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 13px;
}

.referral-stat {
  padding: 17px;
}

.referral-stat-icon {
  display: grid;
  width: 35px;
  height: 35px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.referral-stat strong {
  display: block;
  font-size: 23px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.referral-stat span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.friend-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #344c71, #243047);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.friend-avatar.warm {
  background: linear-gradient(145deg, #f28a51, #ce5d47);
}

.friend-avatar.green {
  background: linear-gradient(145deg, #37bb8a, #237c66);
}

.profile-card {
  padding: 25px 20px 21px;
  text-align: center;
  animation: rise-in 0.5s both;
}

.profile-avatar {
  position: relative;
  display: grid;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  place-items: center;
  border: 4px solid var(--surface-solid);
  border-radius: 50%;
  background:
    radial-gradient(circle at 65% 20%, rgba(255, 255, 255, 0.25), transparent 20%),
    linear-gradient(145deg, #3f6ca9, #263752);
  box-shadow: 0 0 0 2px rgba(42, 140, 255, 0.34), 0 12px 30px rgba(22, 86, 163, 0.2);
  color: #fff;
  font-size: 23px;
  font-weight: 820;
}

.profile-avatar::after {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.profile-name {
  margin: 0;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.profile-handle {
  margin: 4px 0 13px;
  color: var(--text-secondary);
  font-size: 12px;
}

.telegram-badge {
  display: inline-flex;
  min-height: 28px;
  padding: 5px 10px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.setting-row {
  min-height: 68px;
}

.setting-label {
  min-width: 0;
  flex: 1;
}

.setting-label strong {
  display: block;
  font-size: 13px;
}

.setting-label span {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 44px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 7px 0;
  border-radius: 999px;
  background: var(--surface-raised);
  cursor: pointer;
  transition: background 0.22s ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22);
  content: "";
  transition: transform 0.22s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.switch input:checked + .switch-track::after {
  transform: translateX(24px);
}

.setting-arrow {
  color: var(--text-tertiary);
}

.support-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.login-methods-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-method-row {
  position: relative;
  display: flex;
  min-height: 82px;
  padding: 13px 15px;
  align-items: center;
  gap: 12px;
}

.login-method-row + .login-method-row {
  border-top: 1px solid var(--border);
}

.login-method-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.login-method-copy strong {
  font-size: 13px;
  font-weight: 740;
}

.login-method-copy > span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-method-copy > span.linked {
  color: var(--green);
}

.login-method-guard {
  margin-top: 4px;
  color: var(--warning-text);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.35;
}

.login-method-guard[hidden] {
  display: none;
}

.login-method-action-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.login-method-button {
  min-width: 86px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  font-weight: 740;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.login-method-button:hover:not(:disabled) {
  border-color: rgba(42, 140, 255, 0.42);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.login-method-button:disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.62;
}

.login-method-row.is-loading .login-method-button {
  border-color: rgba(42, 140, 255, 0.34);
  background: var(--accent-soft);
  color: var(--accent);
  opacity: 1;
}

.login-method-action-wrap.guarded::after {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: calc(100% + 9px);
  width: min(270px, 76vw);
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  color: var(--text-secondary);
  content: attr(data-tooltip);
  font-size: 9px;
  font-weight: 640;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.login-method-action-wrap.guarded:hover::after,
.login-method-action-wrap.guarded:focus-visible::after,
.login-method-action-wrap.guarded:focus-within::after {
  opacity: 1;
  transform: none;
}

.faq-question {
  display: flex;
  width: 100%;
  min-height: 64px;
  padding: 14px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 710;
}

.faq-chevron {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  transition: transform 0.22s ease;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.faq-answer > div {
  overflow: hidden;
}

.faq-answer p {
  margin: 0;
  padding: 0 15px 16px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.support-card {
  position: relative;
  padding: 21px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(57, 198, 244, 0.18), transparent 10rem),
    var(--surface);
  text-align: center;
}

.support-illustration {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}

.support-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.support-card p {
  margin: 7px auto 17px;
  color: var(--text-secondary);
  font-size: 11px;
}

.support-actions {
  display: grid;
  gap: 9px;
}

.support-actions .primary-button,
.support-actions .secondary-button {
  min-height: 52px;
  padding-right: 10px;
  padding-left: 10px;
  font-size: clamp(10.5px, 3vw, 12px);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.response-time {
  display: inline-flex;
  margin-top: 10px;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.response-time::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.modal-backdrop.chat-backdrop {
  bottom: auto;
  height: 100dvh;
  min-height: 0;
  padding:
    max(10dvh, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  align-items: flex-end;
}

.support-chat-panel {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background: var(--surface-solid);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(26px) scale(0.99);
  transition: opacity 0.22s ease, transform 0.25s ease;
}

.chat-backdrop.open .support-chat-panel {
  opacity: 1;
  transform: none;
}

.chat-header {
  display: flex;
  min-height: 76px;
  padding: 13px 14px 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.chat-operator {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.chat-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.chat-operator-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chat-operator-copy h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.chat-operator-copy small {
  display: inline-flex;
  margin-top: 3px;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.chat-operator-copy small::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.chat-thread {
  display: flex;
  min-height: 0;
  padding: 18px 15px 22px;
  overflow-y: auto;
  flex: 1;
  flex-direction: column;
  gap: 13px;
  background:
    radial-gradient(circle at 90% 0, rgba(42, 140, 255, 0.09), transparent 15rem),
    color-mix(in srgb, var(--bg-soft) 78%, var(--surface-solid));
  scroll-behavior: smooth;
}

.chat-day {
  align-self: center;
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 680;
}

.chat-message {
  display: flex;
  width: min(82%, 390px);
  flex-direction: column;
}

.chat-message.incoming {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-message.outgoing {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 5px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 12px;
  line-height: 1.48;
}

.chat-message.outgoing .chat-bubble {
  border-color: transparent;
  border-radius: 16px 16px 5px;
  background: var(--accent-action);
  color: #fff;
}

.chat-message > time {
  margin-top: 4px;
  padding: 0 4px;
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 650;
}

.chat-composer {
  display: flex;
  padding: 11px 12px;
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: var(--surface-solid);
}

.chat-input-row {
  display: grid;
  align-items: end;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 8px;
}

.chat-attachments {
  display: grid;
  max-height: min(18dvh, 138px);
  padding: 1px;
  overflow-y: auto;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.chat-attachments[hidden],
.chat-file-status[hidden] {
  display: none;
}

.chat-attachment-preview {
  position: relative;
  min-width: 0;
  min-height: 70px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-muted);
}

.chat-attachment-image {
  display: block;
  width: 100%;
  height: 78px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface-raised);
  cursor: zoom-in;
}

.chat-attachment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-attachment-file {
  display: grid;
  min-height: 70px;
  padding: 11px 30px 10px 10px;
  align-items: center;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}

.chat-file-badge {
  display: grid;
  width: 34px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.02em;
}

.chat-attachment-copy,
.chat-file-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chat-attachment-copy strong,
.chat-file-copy strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-copy small,
.chat-file-copy small {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 8px;
  font-weight: 650;
}

.chat-attachment-remove {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  cursor: pointer;
}

.chat-attachment-remove svg {
  width: 26px;
  height: 26px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-solid);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

.chat-file-status {
  margin: 0;
  padding: 0 3px;
  color: var(--warning-text);
  font-size: 10px;
  font-weight: 680;
}

.chat-composer textarea {
  width: 100%;
  min-height: 46px;
  max-height: min(18dvh, 118px);
  padding: 12px 14px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: 0;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.chat-composer textarea::placeholder {
  color: var(--text-tertiary);
}

.chat-composer textarea:focus {
  border-color: rgba(42, 140, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(42, 140, 255, 0.1);
}

.chat-attach-button,
.chat-send-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: var(--accent-action);
  box-shadow: 0 9px 20px rgba(42, 140, 255, 0.22);
  color: #fff;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.chat-attach-button {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: none;
  color: var(--text-secondary);
}

.chat-attach-button:hover,
.chat-send-button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.chat-attach-button:active,
.chat-send-button:active {
  transform: scale(0.98);
}

.chat-message.has-attachments {
  width: min(94%, 440px);
}

.chat-bubble-text {
  margin: 0 0 10px;
}

.chat-message-attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chat-inline-image {
  display: block;
  min-width: 0;
  height: 120px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: zoom-in;
}

.chat-inline-image:only-child {
  grid-column: 1 / -1;
}

.chat-inline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-file-card {
  display: grid;
  min-width: 0;
  min-height: 58px;
  padding: 9px;
  align-items: center;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.chat-file-card .chat-file-badge {
  width: 38px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.chat-file-card .chat-file-copy small {
  color: rgba(255, 255, 255, 0.68);
}

.chat-file-download {
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 730;
}

.chat-demo-note {
  margin: 0;
  padding: 0 14px 11px;
  background: var(--surface-solid);
  color: var(--text-tertiary);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.chat-lightbox {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: grid;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  place-items: center;
  background: rgba(4, 7, 12, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chat-lightbox[hidden] {
  display: none;
}

.chat-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

.chat-lightbox-close {
  position: absolute;
  z-index: 1;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(20, 24, 31, 0.82);
  color: #fff;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: flex;
  padding: 20px;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 7, 12, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(440px, 100%);
  padding: 21px;
  border: 1px solid var(--border-strong);
  border-radius: 25px;
  background: var(--surface-solid);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .modal {
  transform: none;
}

.modal-backdrop.notification-backdrop {
  bottom: auto;
  height: 100dvh;
  min-height: 0;
  padding:
    max(12dvh, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  align-items: flex-end;
}

.notification-panel {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--surface-solid);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.36);
  opacity: 0;
  transform: translateY(24px) scale(0.99);
  transition: opacity 0.22s ease, transform 0.24s ease;
}

.notification-backdrop.open .notification-panel {
  opacity: 1;
  transform: none;
}

.notification-header {
  display: flex;
  min-height: 74px;
  padding: 15px 16px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.notification-header > span {
  display: flex;
  flex-direction: column;
}

.notification-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.notification-header small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}

.notification-toolbar {
  display: flex;
  min-height: 44px;
  padding: 0 16px;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid var(--border);
}

.notification-toolbar button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 740;
}

.notification-toolbar button:disabled {
  color: var(--text-tertiary);
  cursor: default;
}

.notification-list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  flex: 1;
}

.notification-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 94px;
  padding: 14px 16px;
  align-items: flex-start;
  gap: 11px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}

.notification-item + .notification-item {
  border-top: 1px solid var(--border);
}

.notification-item:hover {
  background: var(--surface-muted);
}

.notification-item.unread {
  background: var(--accent-soft);
}

.notification-state {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.notification-item.unread .notification-state {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.notification-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.notification-title {
  font-size: 13px;
  font-weight: 740;
}

.notification-text {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.notification-copy time {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 650;
}

.modal-handle {
  width: 38px;
  height: 4px;
  margin: -9px auto 18px;
  border-radius: 99px;
  background: var(--border-strong);
}

.modal-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}

.modal-icon.warning {
  background: rgba(255, 180, 72, 0.14);
  color: var(--warning-text);
}

.modal h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.modal p {
  margin: 7px 0 19px;
  color: var(--text-secondary);
  font-size: 12px;
}

.modal-summary {
  display: flex;
  min-height: 55px;
  margin-bottom: 14px;
  padding: 11px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 15px;
  background: var(--surface-muted);
}

.modal-summary span {
  color: var(--text-secondary);
  font-size: 11px;
}

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

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.connect-device-modal {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.device-flow-header {
  display: grid;
  min-height: 54px;
  align-items: center;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
}

.device-flow-back[hidden] {
  display: grid;
  visibility: hidden;
  pointer-events: none;
}

.device-flow-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.device-flow-heading small {
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-flow-heading h2 {
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-flow-heading h2:focus {
  outline: 0;
}

.device-flow-progress {
  display: grid;
  margin: 12px 0 18px;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.device-flow-progress i {
  height: 3px;
  border-radius: 99px;
  background: var(--surface-raised);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.device-flow-progress i.active {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(42, 140, 255, 0.38);
}

.device-flow-step {
  animation: fade-in 0.18s both;
}

.device-flow-step[hidden] {
  display: none;
}

.device-flow-intro {
  margin: 0 0 15px !important;
  text-align: center;
  line-height: 1.5;
}

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

.platform-card {
  display: flex;
  min-height: 132px;
  padding: 15px 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.platform-card:hover {
  border-color: rgba(42, 140, 255, 0.48);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.platform-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 11px;
  place-items: center;
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--accent);
}

.platform-card strong {
  font-size: 14px;
  font-weight: 770;
}

.platform-card > span:last-child {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.device-app-list {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
}

.device-app-recommendation {
  margin: 0 0 11px !important;
  padding: 10px 12px;
  border: 1px solid rgba(42, 140, 255, 0.26);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 680;
  line-height: 1.45;
}

.device-app-recommendation[hidden] {
  display: none;
}

.device-app-card {
  position: relative;
  display: grid;
  min-height: 68px;
  padding: 10px 11px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) minmax(118px, 142px);
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
}

.device-app-card.recommended {
  border-color: rgba(42, 140, 255, 0.54);
  background:
    linear-gradient(135deg, rgba(42, 140, 255, 0.12), transparent 65%),
    var(--surface-muted);
  box-shadow: inset 0 0 0 1px rgba(42, 140, 255, 0.08);
}

.device-app-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-raised);
}

.device-app-icon svg,
.device-app-icon image {
  display: block;
  width: 100%;
  height: 100%;
}

.device-app-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.device-app-title {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.device-app-copy strong {
  font-size: 13px;
  font-weight: 750;
}

.device-app-copy > span:last-child {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.device-app-badge {
  display: inline-flex;
  min-height: 20px;
  padding: 3px 6px;
  align-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
}

.device-app-actions {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.device-app-download {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.device-app-download.deeplink {
  background: linear-gradient(135deg, var(--accent-action), var(--accent-action-2));
  box-shadow: 0 7px 17px rgba(42, 140, 255, 0.2);
  color: #fff;
}

.device-app-store-note {
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.device-app-store-note a {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 6px;
  align-items: center;
  color: var(--accent);
  font-weight: 720;
  text-decoration: underline;
  text-decoration-color: rgba(42, 140, 255, 0.35);
  text-underline-offset: 2px;
}

.device-flow-hint {
  display: flex;
  margin-bottom: 10px;
  padding: 11px 12px;
  align-items: flex-start;
  gap: 9px;
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.device-flow-hint svg {
  margin-top: 1px;
  flex: 0 0 auto;
  color: var(--accent);
}

.device-flow-done {
  margin-top: 9px;
}

.tv-code-form {
  margin-top: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
}

.tv-code-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 690;
}

.tv-code-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px;
}

.tv-code-controls input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  outline: 0;
}

.tv-code-controls input:focus {
  border-color: rgba(42, 140, 255, 0.62);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tv-submit {
  position: relative;
  min-width: 0;
  padding-right: 10px;
  padding-left: 10px;
}

.tv-submit:disabled {
  background: var(--surface-raised);
  box-shadow: none;
  color: var(--text-tertiary);
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.tv-submit i {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
}

.tv-submit.loading i {
  display: block;
  animation: device-spin 0.7s linear infinite;
}

.tv-code-result {
  margin: 10px 0 0 !important;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 11px !important;
  font-weight: 680;
  line-height: 1.45;
}

.tv-code-result[hidden],
[data-tv-done][hidden] {
  display: none;
}

.tv-code-result.success {
  background: var(--green-soft);
  color: var(--green);
}

.tv-code-result.error {
  background: var(--red-soft);
  color: var(--red);
}

.device-limit-state {
  padding: 20px 15px;
  text-align: center;
}

.device-limit-state > span {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 19px;
  background: var(--red-soft);
  color: var(--red);
}

.device-limit-state strong {
  display: block;
  font-size: 16px;
  font-weight: 760;
}

.device-limit-state p {
  margin: 7px auto 0;
  max-width: 300px;
  line-height: 1.5;
}

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

.tariff-change-modal,
.payment-modal {
  max-height: calc(100vh - 38px);
  overflow-y: auto;
}

.change-plan-target {
  display: grid;
  margin-bottom: 12px;
  padding: 12px 13px;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  border-radius: 15px;
  background: var(--surface-muted);
}

.change-plan-target > span {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.change-plan-target strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-plan-target small {
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
}

.transition-options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.transition-options[hidden],
.special-tariff-note[hidden] {
  display: none;
}

.transition-option {
  position: relative;
  display: flex;
  min-height: 86px;
  padding: 12px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.transition-option:hover {
  transform: translateY(-1px);
}

.transition-option.active {
  border-color: rgba(42, 140, 255, 0.5);
  background: var(--accent-soft);
}

.transition-option input,
.payment-method input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.transition-radio {
  position: relative;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex: 0 0 auto;
  border: 1.5px solid var(--text-tertiary);
  border-radius: 50%;
}

.transition-option.active .transition-radio {
  border-color: var(--accent);
}

.transition-option.active .transition-radio::after {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.transition-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.transition-copy strong {
  font-size: 12px;
  font-weight: 750;
}

.transition-copy > span {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.transition-copy small {
  margin-top: 7px;
  color: var(--text);
  font-size: 10px;
  font-weight: 690;
  line-height: 1.4;
}

.special-tariff-note {
  display: flex;
  margin-bottom: 14px;
  padding: 14px;
  flex-direction: column;
  border: 1px solid rgba(255, 180, 72, 0.3);
  border-radius: 15px;
  background: rgba(255, 180, 72, 0.09);
}

.special-tariff-note strong {
  color: var(--warning-text);
  font-size: 12px;
}

.special-tariff-note > span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.45;
}

.special-tariff-note small {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 10px;
}

.special-tariff-note b {
  color: var(--text);
  font-size: 13px;
}

.payment-overview {
  display: grid;
  margin-bottom: 15px;
  padding: 13px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-radius: 15px;
  background: var(--surface-muted);
}

.payment-overview > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.payment-overview small {
  color: var(--text-secondary);
  font-size: 10px;
}

.payment-overview strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-overview > span:last-child {
  text-align: right;
}

.payment-overview > span:last-child strong {
  color: var(--accent);
  font-size: 17px;
}

.payment-methods {
  display: grid;
  gap: 8px;
  margin-bottom: 15px;
}

.payment-method {
  position: relative;
  display: flex;
  min-height: 61px;
  padding: 10px 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  cursor: pointer;
}

.payment-method.active {
  border-color: rgba(42, 140, 255, 0.48);
  background: var(--accent-soft);
}

.transition-option:has(input:focus-visible),
.payment-method:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.payment-method > span:last-child {
  display: flex;
  flex-direction: column;
}

.payment-method strong {
  font-size: 11px;
}

.payment-method small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.warning-button {
  display: inline-flex;
  min-height: 48px;
  padding: 11px 17px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f39a2d, #ffc35a);
  box-shadow: 0 11px 24px rgba(243, 154, 45, 0.2);
  color: #231508;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.warning-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  z-index: 600;
  right: 18px;
  bottom: calc(87px + env(safe-area-inset-bottom));
  left: 18px;
  display: flex;
  width: fit-content;
  max-width: calc(100% - 36px);
  min-height: 44px;
  margin: 0 auto;
  padding: 10px 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast::before {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  content: "\2713";
  color: var(--green);
  font-size: 11px;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.empty-note {
  padding: 28px 18px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.login-page {
  min-height: 100dvh;
  padding: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(42, 140, 255, 0.2), transparent 24rem),
    radial-gradient(circle at 12% 82%, rgba(57, 198, 244, 0.08), transparent 19rem),
    var(--bg);
}

.login-page::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(99, 181, 255, 0.34) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 1px, transparent 1.4px);
  background-position: 0 0, 18px 22px;
  background-size: 39px 39px, 57px 57px;
  content: "";
  opacity: 0.34;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
}

html.theme-light .login-page::before {
  opacity: 0.2;
}

.login-language-switcher {
  position: fixed;
  z-index: 10;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  place-items: center;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 29px 22px 24px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0, rgba(57, 198, 244, 0.12), transparent 13rem),
    color-mix(in srgb, var(--surface-solid) 94%, transparent);
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
}

.login-brand-mark {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, #2587ff, #44d6ef);
  box-shadow: 0 15px 34px rgba(42, 140, 255, 0.3);
  color: #fff;
}

.login-brand-mark::after {
  position: absolute;
  top: -18px;
  right: -15px;
  width: 46px;
  height: 46px;
  border: 9px solid rgba(255, 255, 255, 0.19);
  border-radius: 50%;
  content: "";
}

.login-brand-mark svg {
  position: relative;
  z-index: 1;
}

.login-brand-name {
  margin: 0 0 13px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.login-card h1 {
  max-width: 340px;
  margin: 0 auto;
  font-size: clamp(25px, 7vw, 31px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.login-subtitle {
  max-width: 340px;
  margin: 10px auto 22px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.login-providers {
  display: grid;
  gap: 10px;
}

.login-provider-button {
  display: grid;
  width: 100%;
  min-height: 56px;
  padding: 7px 10px;
  align-items: center;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 17px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: border-color 0.18s ease, background 0.18s ease, filter 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.login-provider-button.telegram {
  background: linear-gradient(135deg, var(--accent-action), var(--accent-action-2));
  box-shadow: 0 12px 26px rgba(42, 140, 255, 0.24);
  color: #fff;
}

.login-provider-button.secondary {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.login-provider-button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-provider-button:active:not(:disabled) {
  transform: scale(0.985);
}

.login-provider-button:disabled:not(.is-loading) {
  cursor: wait;
  opacity: 0.48;
}

.login-provider-button.is-loading {
  cursor: wait;
}

.login-provider-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-raised);
  font-size: 17px;
  font-weight: 820;
}

.login-provider-mark svg {
  display: block;
  width: 22px;
  height: 22px;
}

.login-provider-mark.telegram svg {
  width: 27px;
  height: 27px;
}

.login-provider-mark.yandex svg {
  width: 24px;
  height: 24px;
}

.login-provider-mark.telegram {
  border-color: rgba(42, 140, 255, 0.18);
  background: var(--accent-soft);
  color: var(--accent);
}

.login-provider-button.telegram .login-provider-mark {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.login-provider-mark.google {
  background: #f7f8fb;
  color: #1769e0;
}

.login-provider-mark.yandex {
  background: #fff1f1;
  color: #d62f38;
}

.login-loading-dots {
  display: none;
  justify-self: end;
  gap: 3px;
}

.login-provider-button.is-loading .login-loading-dots {
  display: inline-flex;
}

.login-loading-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: login-dot 0.85s ease-in-out infinite;
}

.login-loading-dots i:nth-child(2) {
  animation-delay: 0.12s;
}

.login-loading-dots i:nth-child(3) {
  animation-delay: 0.24s;
}

.login-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 680;
}

.login-legal {
  max-width: 330px;
  margin: 7px auto 0;
  color: var(--text-tertiary);
  font-size: 9px;
  line-height: 1.55;
}

.login-legal a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 2px;
}

@keyframes login-dot {
  0%, 70%, 100% { opacity: 0.28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes current-tariff-focus {
  0%, 100% {
    border-color: rgba(42, 140, 255, 0.34);
    box-shadow: 0 16px 38px rgba(30, 114, 220, 0.11);
  }
  38% {
    border-color: rgba(42, 140, 255, 0.88);
    box-shadow: 0 0 0 4px rgba(42, 140, 255, 0.15), 0 18px 46px rgba(30, 114, 220, 0.24);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes progress-in {
  from { width: 0; }
}

@media (min-width: 560px) {
  body {
    padding: 20px 0;
  }

  .app-shell {
    min-height: calc(100vh - 40px);
    border: 1px solid var(--border);
    border-radius: 31px;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.22);
  }

  .app-header {
    top: 32px;
    width: 456px;
  }

  .bottom-nav {
    bottom: 32px;
    width: 456px;
  }
}

@media (max-width: 370px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .app-header {
    padding-right: 15px;
    padding-left: 15px;
  }

  .subscription-card {
    padding: 18px;
  }

  .metric-card {
    padding: 12px 9px;
  }

  .plan-card {
    padding: 14px;
  }

  .nav-item {
    font-size: 10px;
  }

  .qr-wrap {
    width: 174px;
    height: 174px;
  }

  .device-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .device-section-heading .section-meta {
    max-width: none;
    text-align: left;
  }

  .device-app-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .device-app-actions {
    align-items: stretch;
    grid-column: 1 / -1;
  }

  .device-app-store-note {
    text-align: left;
  }
}

.purchase-summary {
  display: grid;
  min-width: 0;
  align-self: start;
  gap: 16px;
}

@media (min-width: 1024px) {
  :root {
    --header-height: 112px;
    --bottom-nav-height: 0px;
  }

  body {
    padding: 0;
    overscroll-behavior-y: auto;
  }

  .login-shell {
    padding: 48px;
  }

  .login-shell::before,
  .login-shell::after {
    position: fixed;
    z-index: -1;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(83, 164, 255, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
  }

  .login-shell::before {
    top: 16%;
    left: max(5vw, calc(50% - 610px));
    box-shadow: inset 0 0 80px rgba(42, 140, 255, 0.04);
  }

  .login-shell::after {
    right: max(5vw, calc(50% - 610px));
    bottom: 10%;
    width: 220px;
    height: 220px;
  }

  .login-card {
    padding: 38px 36px 30px;
  }

  .app-shell {
    width: min(calc(100% - 48px), 1240px);
    max-width: 1240px;
    min-height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell > main {
    padding-top: var(--header-height);
    padding-bottom: 64px;
  }

  .app-shell::before {
    display: none;
  }

  .app-header {
    top: 18px;
    width: min(calc(100% - 48px), 1240px);
    min-height: 68px;
    padding: 8px 14px 8px 16px;
    border-radius: 22px;
    box-shadow:
      0 16px 42px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }

  .brand {
    position: relative;
    z-index: 2;
  }

  .header-actions {
    position: relative;
    z-index: 2;
  }

  .bottom-nav {
    top: 26px;
    bottom: auto;
    width: 470px;
    min-height: 52px;
    padding: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav-item {
    min-height: 52px;
    padding: 0 12px;
    flex-direction: row;
    gap: 8px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 720;
  }

  .nav-item:hover {
    background: var(--surface-muted);
    color: var(--text);
  }

  .nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .page-intro {
    margin: 10px 0 8px;
  }

  .page-title {
    font-size: clamp(36px, 4vw, 44px);
    letter-spacing: -0.05em;
  }

  .page-subtitle {
    max-width: 590px;
    margin-top: 11px;
    font-size: 15px;
  }

  .section {
    margin-top: 0;
  }

  .section-heading {
    min-height: 28px;
    margin: 0 2px 13px;
  }

  .section-title {
    font-size: 19px;
  }

  .section-meta {
    font-size: 12px;
  }

  .page-home {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px 22px;
  }

  .page-home > .page-intro {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .page-home > .subscription-card {
    min-height: 235px;
    padding: 27px;
    grid-column: 1 / 6;
    grid-row: 2;
  }

  .page-home > .quick-actions {
    margin-top: 0;
    grid-column: 1 / 6;
    grid-row: 3;
  }

  .page-home > #vpn-key {
    grid-column: 6 / -1;
    grid-row: 2 / span 2;
  }

  .page-home > #devices {
    grid-column: 6 / -1;
    grid-row: 4;
  }

  .page-home > .reissue-section {
    grid-column: 1 / 6;
    grid-row: 4;
  }

  .key-hero {
    display: grid;
    min-height: 394px;
    padding: 28px;
    align-items: center;
    grid-template-columns: 190px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 10px 24px;
    text-align: left;
  }

  .key-hero::before {
    top: 50%;
    left: 90px;
    width: 250px;
    height: 250px;
    transform: translateY(-50%);
  }

  .key-hero .qr-wrap {
    width: 190px;
    height: 190px;
    margin: 0;
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .key-title,
  .key-description,
  .key-hero .copy-field,
  .key-actions {
    grid-column: 2;
  }

  .key-title {
    align-self: end;
    font-size: 22px;
  }

  .key-description {
    max-width: 390px;
    margin: 0;
    align-self: start;
    font-size: 13px;
  }

  .key-hero .copy-field {
    width: 100%;
  }

  .key-actions {
    margin-top: 0;
  }

  .device-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device-row + .device-row {
    border-top: 0;
  }

  .device-row:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .device-row:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .device-row {
    min-width: 0;
    min-height: 86px;
    padding: 16px;
  }

  .page-subscription {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px;
  }

  .page-subscription > .page-intro {
    grid-column: 1 / 8;
    grid-row: 1;
    align-self: center;
  }

  .page-subscription > .current-tariff-section {
    margin: 10px 0 0;
    grid-column: 8 / -1;
    grid-row: 1;
  }

  .page-subscription > .segmented {
    width: 360px;
    margin-top: 2px;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .page-subscription > .tab-panel {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .current-tariff-card {
    padding: 20px;
  }

  .subscription-builder {
    margin-top: 0;
    align-items: start;
    grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
    gap: 18px 22px;
  }

  .subscription-options {
    align-self: start;
    grid-column: 1;
    grid-row: 1;
    gap: 18px;
  }

  .choice-card {
    padding: 22px;
  }

  .choice-heading {
    margin-bottom: 19px;
  }

  .choice-heading strong {
    font-size: 15px;
  }

  .option-grid {
    gap: 10px;
  }

  .option-chip {
    min-height: 84px;
    padding: 11px 8px;
  }

  .option-chip strong {
    font-size: 19px;
  }

  .option-chip span {
    font-size: 11px;
  }

  .purchase-summary {
    position: sticky;
    top: 104px;
    display: grid;
    align-self: start;
    grid-column: 2;
    grid-row: 1;
    gap: 16px;
  }

  .price-summary-slot {
    display: block;
    min-width: 0;
    height: var(--desktop-price-summary-slot-height, auto);
    align-self: start;
    transition: none;
  }

  .price-summary-slot > .price-summary {
    width: 100%;
  }

  .price-summary,
  .promo-card {
    padding: 21px;
  }

  .price-summary-top strong {
    font-size: 31px;
  }

  .plan-action-block .primary-button {
    min-height: 54px;
  }

  .page-referral {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px 22px;
  }

  .page-referral > .page-intro {
    grid-column: 1 / -1;
  }

  .page-referral > .referral-hero {
    display: flex;
    min-height: 320px;
    padding: 32px;
    flex-direction: column;
    justify-content: flex-end;
    grid-column: 1 / 9;
  }

  .page-referral > .referral-stats {
    margin-top: 0;
    grid-template-columns: 1fr;
    grid-column: 9 / -1;
    gap: 20px;
  }

  .referral-stat {
    display: flex;
    min-height: 150px;
    padding: 21px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
  }

  .referral-stat-icon {
    width: 44px;
    height: 44px;
    margin: 0 0 16px;
  }

  .referral-stat strong {
    font-size: 26px;
    line-height: 1.1;
  }

  .referral-stat span {
    font-size: 11px;
  }

  .page-referral > .section {
    margin-top: 5px;
    grid-column: 1 / -1;
  }

  .friend-row {
    min-height: 82px;
    padding: 15px 20px;
  }

  .friend-row .badge {
    min-width: 108px;
    justify-content: center;
  }

  .page-profile {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px 22px;
  }

  .page-profile > .page-intro {
    grid-column: 1 / -1;
  }

  .page-profile > .profile-card {
    position: sticky;
    top: 104px;
    min-height: 310px;
    padding: 34px 28px;
    align-content: center;
    grid-column: 1 / 5;
    grid-row: 2 / span 2;
  }

  .page-profile > .section {
    grid-column: 5 / -1;
  }

  .page-profile > .section:last-child {
    display: flex;
    justify-content: flex-end;
  }

  .page-profile > .section:last-child .danger-button {
    width: auto;
    min-width: 230px;
  }

  .settings-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setting-row + .setting-row {
    border-top: 0;
  }

  .setting-row:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .setting-row:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .setting-row:last-child {
    grid-column: 1 / -1;
  }

  .page-support {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px 22px;
  }

  .page-support > .page-intro {
    grid-column: 1 / -1;
  }

  .page-support > .support-card {
    position: sticky;
    top: 104px;
    padding: 30px;
    grid-column: 1 / 6;
  }

  .page-support > .section {
    grid-column: 6 / -1;
  }

  .support-actions .primary-button,
  .support-actions .secondary-button {
    white-space: nowrap;
  }

  .faq-question {
    min-height: 72px;
    padding: 16px 20px;
    font-size: 14px;
  }

  .faq-answer p {
    max-width: 72ch;
    padding: 0 20px 20px;
    font-size: 13px;
  }

  .modal-backdrop,
  .modal-backdrop.notification-backdrop,
  .modal-backdrop.chat-backdrop {
    padding: 32px;
    align-items: center;
  }

  .support-chat-panel {
    width: 560px;
    height: 640px;
    min-height: 0;
    max-height: calc(100dvh - 64px);
    border-radius: 24px;
    transform: translateY(8px) scale(0.98);
  }

  .chat-thread {
    padding: 24px 22px 28px;
  }

  .chat-bubble {
    padding: 12px 14px;
    font-size: 13px;
  }

  .modal {
    width: min(540px, 100%);
    max-height: calc(100dvh - 64px);
    padding: 26px;
    overflow-y: auto;
    transform: translateY(12px) scale(0.98);
  }

  .notification-panel {
    width: 520px;
    height: auto;
    max-height: min(650px, calc(100dvh - 64px));
    transform: translateY(-8px) scale(0.98);
  }

  .notification-list {
    max-height: calc(100dvh - 250px);
  }

  .modal-handle {
    display: none;
  }

  .toast {
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .current-selection-note {
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Runtime Cabinet API states. These extend existing components without
   changing their approved layout or breakpoint behaviour. */
.profile-avatar img,
.qr-code-generated img,
.qr-code-generated canvas,
.qr-code-generated svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-delivery-card.is-disabled,
.transition-option.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.gift-delivery-card.is-disabled input,
.transition-option.is-disabled input {
  pointer-events: none;
}

.payment-receipt-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.payment-receipt-field label,
.gift-activation-modes legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.payment-receipt-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.payment-receipt-field input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.payment-receipt-field > small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.gift-activation-modes {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.gift-activation-modes label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  cursor: pointer;
}

.gift-activation-modes input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.gift-activation-modes span {
  display: grid;
  gap: 3px;
}

.gift-activation-modes strong {
  color: var(--text);
  font-size: 14px;
}

.gift-activation-modes small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

[aria-busy="true"] {
  cursor: progress;
}

/* Gift subscriptions: isolated from the approved plan builder selectors. */
.action-icon.gift,
.modal-icon.gift,
.gift-summary-icon {
  color: #8cc6ff;
  background: rgba(42, 140, 255, 0.13);
}

.gift-builder,
.gift-options {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.gift-builder {
  margin-top: 15px;
}

.gift-delivery-options {
  display: grid;
  gap: 9px;
}

.gift-delivery-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 68px;
  padding: 12px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.gift-delivery-card:hover,
.gift-delivery-card.active {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.gift-delivery-card:active {
  transform: scale(0.98);
}

.gift-delivery-card:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.gift-delivery-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.gift-delivery-icon,
.gift-summary-icon,
.gift-result-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.gift-delivery-card > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.gift-delivery-card strong {
  font-size: 13px;
  line-height: 1.3;
}

.gift-delivery-card small,
.gift-recipient .field-help,
.gift-message-meta,
.gift-summary p,
.gift-summary-note,
.gift-expiry {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.gift-recipient {
  display: grid;
  min-width: 0;
  margin-top: 13px;
  gap: 7px;
}

.gift-recipient > label,
.gift-builder label.sr-only {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.gift-recipient input,
.gift-builder textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.gift-builder textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.gift-recipient input:focus,
.gift-builder textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.gift-recipient input[aria-invalid="true"] {
  border-color: var(--danger, #e36a72);
}

.gift-recipient .field-help,
.gift-builder .form-message,
.gift-activation-modal .form-message,
.gift-message-meta {
  margin: 0;
}

.gift-builder .form-message.error,
.gift-activation-modal .form-message.error {
  color: var(--danger-text, #ff8f8f);
  font-size: 12px;
  line-height: 1.4;
}

.gift-recent-contacts {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.gift-recent-contacts > span {
  width: 100%;
  color: var(--text-secondary);
  font-size: 11px;
}

.gift-recent-contacts button,
.history-filters button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.gift-recent-contacts button:hover,
.history-filters button:hover,
.history-filters button.active {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.gift-device-options {
  margin-top: 9px;
}

.gift-message-meta {
  display: flex;
  margin-top: 7px;
  justify-content: space-between;
  gap: 12px;
}

.gift-summary {
  display: grid;
  min-width: 0;
  padding: 18px;
  align-content: start;
  gap: 9px;
  text-align: center;
}

.gift-summary-icon,
.gift-result-icon {
  margin-inline: auto;
}

.gift-summary-kicker {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.gift-summary h2,
.gift-result h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.gift-summary-price {
  font-size: 29px;
  line-height: 1.1;
}

.gift-summary p,
.gift-result p {
  margin: 0;
}

.gift-summary .primary-button {
  margin-top: 5px;
}

.gift-result {
  display: grid;
  min-width: 0;
  padding: 20px;
  gap: 12px;
  text-align: center;
}

.gift-result[hidden],
.gift-recipient[hidden],
.gift-link-field[hidden],
.gift-expiry[hidden],
.gift-result [hidden] {
  display: none !important;
}

.gift-complete > .gift-options,
.gift-complete > .gift-summary {
  display: none;
}

.gift-link-field {
  min-width: 0;
  text-align: left;
}

.gift-link-field .copy-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gift-result-actions {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.history-filters {
  display: flex;
  margin: 0 0 12px;
  gap: 8px;
}

.gift-history {
  display: grid;
  gap: 16px;
}

.gift-history[hidden] {
  display: none;
}

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

.gift-history-group h3 {
  margin: 0 3px;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gift-history-row .list-icon {
  font-size: 18px;
  font-weight: 800;
}

.gift-history-row .list-value {
  min-width: 94px;
}

.gift-status.pending {
  color: #e4a34a;
}

.gift-status.activated {
  color: var(--success-text, #62c893);
}

.gift-status.expired {
  color: var(--danger-text, #ff8f8f);
}

html.theme-light .gift-status.pending {
  color: #8a4b00;
}

html.theme-light .gift-status.activated {
  color: #176c45;
}

html.theme-light .gift-status.expired,
html.theme-light .gift-builder .form-message.error,
html.theme-light .gift-activation-modal .form-message.error {
  color: #a51d2d;
}

.gift-history-row,
.gift-history-row .list-copy {
  min-width: 0;
}

.gift-history-row .list-copy strong,
.gift-history-row .list-copy span {
  overflow-wrap: anywhere;
}

.gift-history .empty-state {
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--text-secondary);
  text-align: center;
}

.gift-activation-summary {
  display: grid;
  gap: 6px;
}

.gift-activation-modal [hidden] {
  display: none !important;
}

.gift-activation-summary small {
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.45;
}

/* Onboarding coachmarks. Contrast uses the audited project theme tokens. */
[data-tour-target] {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.onboarding-tour {
  position: fixed;
  z-index: 700;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}

.onboarding-tour[hidden] {
  display: none;
}

.onboarding-scrim {
  position: absolute;
  inset: 0;
  background: transparent;
}

.onboarding-highlight {
  position: fixed;
  z-index: 1;
  border: 2px solid #6fb5ff;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(3, 6, 12, 0.7), 0 0 0 5px rgba(42, 140, 255, 0.22);
  pointer-events: none;
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease, opacity 0.18s ease;
}

.onboarding-coachmark {
  position: fixed;
  z-index: 2;
  display: grid;
  width: min(380px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 18px;
  gap: 10px;
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 19px;
  outline: none;
  background: var(--surface-solid);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  color: var(--text);
  transition: top 0.2s ease, left 0.2s ease, opacity 0.18s ease, transform 0.18s ease;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.onboarding-dots {
  display: flex;
  gap: 5px;
}

.onboarding-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong, var(--border));
}

.onboarding-dots i.active {
  background: var(--accent);
}

.onboarding-coachmark h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.onboarding-coachmark p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.onboarding-actions {
  display: grid;
  min-width: 0;
  margin-top: 3px;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.onboarding-actions button {
  min-width: 0;
  min-height: 44px;
  padding-inline: 10px;
}

.onboarding-back[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .onboarding-coachmark {
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px !important;
    top: auto !important;
    width: auto;
  }

  .onboarding-tour[data-target="navigation"] .onboarding-coachmark {
    top: calc(12px + env(safe-area-inset-top)) !important;
    bottom: auto;
  }
}

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

  .onboarding-back {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .gift-delivery-options,
  .gift-result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gift-builder {
    margin-top: 0;
    align-items: start;
    grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
    gap: 18px 22px;
  }

  .gift-options {
    grid-column: 1;
  }

  .gift-summary {
    position: sticky;
    top: calc(var(--header-height) + 16px);
    grid-column: 2;
  }

  .gift-result {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gift-delivery-card,
  .onboarding-highlight,
  .onboarding-coachmark {
    transition: none !important;
  }
}
