@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/manrope-latin.woff2") format("woff2");
}
:root {
  color-scheme: dark;
  --page: #0c1716;
  --surface: #162421;
  --ink: #eef7f3;
  --muted: #afc5bc;
  --accent: #8de4c6;
  --accent-deep: #acefd7;
  --on-accent: #09382b;
  --mint: #203d34;
  --line: #2c443b;
  --danger: #ffa6b3;
  --danger-surface: #43242b;
  --access: #0e5b49;
  --on-access: #f0fff8;
  --access-pill: #247563;
  --access-mark: #60a491;
  --status-success: #acf5d7;
  --status-warning: #ffe5b0;
  --hover-mint: #2d4f43;
  --hover-ink: #a7ebd2;
  --copy-background: #c2f0dc;
  --copy-ink: #123a2b;
  --option-hover: #203a31;
  --limit-mark: #acefd7;
  --icon-detail-opacity: 0.12;
  --focus: #86ebc9;
  --selection: #81dcb9;
  --selection-ink: #10392b;
  --scrollbar: #44695b;
  --backdrop: #040b09b3;
  --option-shadow-color: #00000033;
  --modal-shadow-color: #00000080;
  --nav-shadow-color: #00000055;
  --shadow: 0 12px 32px -14px #00000066;
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    calc(
      var(--tg-safe-area-inset-top, 0px) +
        var(--tg-content-safe-area-inset-top, 0px)
    )
  );
  --safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    calc(
      var(--tg-safe-area-inset-bottom, 0px) +
        var(--tg-content-safe-area-inset-bottom, 0px)
    )
  );
  --safe-left: max(
    env(safe-area-inset-left, 0px),
    calc(
      var(--tg-safe-area-inset-left, 0px) +
        var(--tg-content-safe-area-inset-left, 0px)
    )
  );
  --safe-right: max(
    env(safe-area-inset-right, 0px),
    calc(
      var(--tg-safe-area-inset-right, 0px) +
        var(--tg-content-safe-area-inset-right, 0px)
    )
  );
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-inline: max(var(--safe-left), var(--safe-right));
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f6f9f7;
  --surface: #ffffff;
  --ink: #133a31;
  --muted: #586e65;
  --accent: #07735d;
  --accent-deep: #09604e;
  --on-accent: #ffffff;
  --mint: #e6f2ed;
  --line: #dce7e1;
  --danger: #b73240;
  --danger-surface: #fbe5e7;
  --access: #07735d;
  --on-access: #ffffff;
  --access-pill: #20836e;
  --access-mark: #55a38f;
  --status-success: #bcebd3;
  --status-warning: #ffe5b0;
  --hover-mint: #cde5db;
  --hover-ink: #205346;
  --copy-background: #133a31;
  --copy-ink: #ffffff;
  --option-hover: #edf5f0;
  --limit-mark: #09604e;
  --focus: #08765e;
  --selection: #b5ead7;
  --selection-ink: #123c30;
  --scrollbar: #88aa9c;
  --backdrop: #09251f80;
  --option-shadow-color: #0000001a;
  --modal-shadow-color: #00000040;
  --nav-shadow-color: #00000026;
  --shadow: 0 12px 32px -14px #00000020;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
  scrollbar-color: var(--scrollbar) var(--page);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
input {
  caret-color: var(--accent);
}
::selection {
  background: var(--selection);
  color: var(--selection-ink);
}
[hidden] {
  display: none !important;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-tint {
  fill: currentColor;
  stroke: none;
  opacity: var(--icon-detail-opacity);
}
.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(32px + var(--safe-top)) calc(40px + var(--safe-inline))
    calc(24px + var(--safe-bottom)) calc(40px + var(--safe-inline));
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  column-gap: 44px;
  min-height: 100vh;
}
.app-header {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  row-gap: 24px;
  margin-bottom: 36px;
  min-height: 40px;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand > span {
  color: var(--accent);
  margin-left: -8px;
}
.brand img {
  object-fit: contain;
}
.identity {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 650;
  justify-self: end;
}
.avatar {
  height: 38px;
  width: 38px;
  background: var(--mint);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.navigation {
  position: sticky;
  top: calc(24px + var(--safe-top));
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.nav-item {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  font-weight: 700;
  text-align: left;
  transition:
    background-color 220ms var(--ease),
    color 180ms var(--ease);
}
.nav-item[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}
.nav-item .icon {
  width: 24px;
  height: 24px;
}
.nav-item:not([aria-current="page"]) .icon {
  color: var(--accent-deep);
}
.main-content {
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.035em;
  line-height: 1.18;
  font-weight: 800;
}
h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.015em;
}
.icon-button {
  height: 46px;
  width: 46px;
  background: var(--mint);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 160ms,
    transform 160ms;
}
.icon-button:hover {
  background: var(--hover-mint);
}
.icon-button:active {
  transform: scale(0.96);
}
.icon-button.ink {
  background: var(--copy-background);
  color: var(--copy-ink);
}
.icon-button.ink:hover {
  background: var(--hover-ink);
}
.icon-button.subtle {
  background: transparent;
}
.icon-button.subtle:hover {
  background: var(--mint);
}
.section-status {
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
  margin: -8px 0 14px;
}
.section-status:empty {
  display: none;
}
.section-status.error,
.notice {
  background: var(--danger-surface);
  color: var(--danger);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.section-status .text-button {
  margin-top: 8px;
  display: block;
}
.home-layout {
  display: grid;
  gap: 24px;
}
.access-card {
  background: var(--access);
  color: var(--on-access);
  border-radius: 16px;
  min-height: 226px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}
.status-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  background: var(--access-pill);
  padding: 6px 10px;
  border-radius: 999px;
}
.status-dot {
  background: var(--status-success);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.inactive {
  background: var(--status-warning);
}
.access-card h2 {
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.18;
  margin: 27px 0 20px;
  max-width: 72%;
  text-wrap: balance;
}
.expiry-line {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.expiry-line strong {
  font-size: 14px;
  font-weight: 650;
}
.access-mark {
  position: absolute;
  width: 138px;
  height: 156px;
  right: 16px;
  bottom: 21px;
  fill: none;
  stroke: var(--access-mark);
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-linecap: round;
  transform: rotate(10deg);
  pointer-events: none;
}
.primary,
.secondary {
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 750;
  transition:
    background 180ms,
    transform 180ms;
  text-decoration: none;
}
.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.primary:hover {
  background: var(--accent-deep);
}
.secondary {
  background: var(--mint);
  color: var(--accent-deep);
}
.secondary:hover {
  background: var(--hover-mint);
}
.primary:active,
.secondary:active {
  transform: scale(0.985);
}
.quick-connect {
  width: 100%;
  min-height: 68px;
  padding: 10px 12px 10px 24px;
  justify-content: space-between;
  font-size: 16px;
}
.button-end {
  width: 46px;
  height: 46px;
  background: var(--surface);
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.subscription-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 2px 0;
  min-width: 0;
}
.subscription-link > div {
  min-width: 0;
  flex: 1;
}
.subscription-link label,
.referral-link-block label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
  font-weight: 550;
}
.subscription-link input,
.referral-input input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 0;
  line-height: 1.8;
  font-size: 13px;
  text-overflow: ellipsis;
  outline-offset: 3px;
}
.subscription-link .icon-button {
  width: 44px;
  height: 44px;
}
.privacy-note {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
}
.privacy-note .icon {
  width: 14px;
  height: 14px;
}
.account-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
dt {
  font-size: 12px;
  color: var(--muted);
}
dd {
  margin: 7px 0 0;
  font-size: 19px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.home-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}
.home-footer p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.text-button {
  font-size: 12px;
  color: var(--accent-deep);
  font-weight: 750;
  padding: 0;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
}
.text-button .icon {
  width: 17px;
  height: 17px;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.subscription-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}
select {
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  background: var(--surface);
}
.balance-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--mint);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 30px;
}
.balance-strip > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.balance-strip span {
  font-size: 12px;
  color: var(--accent-deep);
}
.balance-strip strong {
  font-size: 25px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.balance-strip .secondary {
  background: var(--surface);
  font-size: 12px;
  min-height: 42px;
  padding: 10px 14px;
}
.balance-strip .icon {
  width: 18px;
  height: 18px;
}
.subheading {
  margin: 26px 0 18px;
}
.subheading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.store-options {
  display: grid;
  gap: 12px;
}
.period-option {
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 16px -8px var(--option-shadow-color);
  width: 100%;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition:
    transform 180ms,
    background 180ms;
}
.period-option:hover {
  background: var(--option-hover);
  transform: translateY(-2px);
}
.period-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.period-title {
  font-weight: 750;
  font-size: 16px;
}
.period-caption {
  font-size: 12px;
  color: var(--muted);
}
.period-price {
  font-size: 21px;
  letter-spacing: -0.02em;
  font-weight: 750;
  white-space: nowrap;
}
.period-option .icon {
  margin-left: 6px;
  color: var(--accent);
}
.period-price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.discount {
  display: inline-flex;
  padding: 3px 7px;
  margin-left: 7px;
  background: var(--mint);
  color: var(--accent-deep);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  vertical-align: middle;
}
.quiet-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 24px;
  max-width: 65ch;
}
.device-limit {
  background: var(--mint);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  column-gap: 20px;
  overflow: hidden;
  margin-bottom: 26px;
}
.device-limit > div {
  min-width: 0;
}
.device-limit p {
  font-size: 12px;
  color: var(--accent-deep);
}
.device-limit strong {
  display: block;
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.device-limit span {
  font-size: 12px;
  color: var(--accent-deep);
}
.limit-mark {
  width: 84px;
  height: 84px;
  color: var(--limit-mark);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  justify-self: end;
}
.list-heading {
  margin: 30px 0 14px;
  font-size: 18px;
}
.device-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.device-icon {
  background: var(--mint);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex-shrink: 0;
}
.device-info {
  flex: 1;
  min-width: 0;
}
.device-info strong {
  display: block;
  font-size: 14px;
  word-break: break-word;
}
.device-info p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.device-row .icon-button {
  background: var(--danger-surface);
  color: var(--danger);
  width: 40px;
  height: 40px;
}
.empty-state {
  color: var(--muted);
  font-size: 13px;
  padding: 22px 0;
  line-height: 1.7;
}
.intro-copy {
  color: var(--muted);
  margin: -10px 0 28px;
  font-size: 13px;
}
.referral-link-block {
  padding: 24px;
  border-radius: 16px;
  background: var(--mint);
}
.referral-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 5px 0 18px;
}
.referral-link-block .primary {
  width: 100%;
  justify-content: space-between;
}
.referral-stats {
  margin: 28px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 32px;
  padding: 0;
}
.referral-stats > div {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.referral-stats dd {
  font-size: 29px;
}
.terms {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.earning-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.earning-row strong {
  font-size: 13px;
  display: block;
}
.earning-row small {
  font-size: 12px;
  color: var(--muted);
}
.earning-amount {
  font-weight: 750;
  color: var(--accent-deep);
  white-space: nowrap;
}
.app-footer {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-top: 38px;
  margin-top: auto;
}
.app-footer > a {
  display: flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
}
.app-footer .icon {
  width: 14px;
  height: 14px;
}
.sheet {
  max-width: 460px;
  width: calc(100% - 32px);
  border: none;
  border-radius: 20px;
  padding: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px -20px var(--modal-shadow-color);
  max-height: calc(100dvh - 48px);
  overflow: auto;
}
.sheet::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(3px);
}
.sheet[open] {
  animation: sheet-in 220ms var(--ease);
}
@keyframes sheet-in {
  from {
    opacity: 0.6;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.sheet-header h2 {
  font-size: 21px;
}
.sheet-header .icon-button {
  width: 36px;
  height: 36px;
}
.sheet p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.sheet-actions > * {
  flex: 1;
}
.sheet .primary.full {
  width: 100%;
  margin-top: 20px;
}
.qr-image {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 8px auto 20px;
  border-radius: 8px;
  image-rendering: pixelated;
}
.qr-caption {
  text-align: center;
  word-break: break-all;
}
.client-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.client-row img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
}
.client-row > div {
  flex: 1;
}
.client-row strong {
  font-size: 15px;
}
.client-row p {
  font-size: 12px;
}
.client-row .secondary {
  min-height: 38px;
  font-size: 12px;
  padding: 9px 12px;
}
.client-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.client-actions .primary,
.client-actions .secondary {
  min-height: 46px;
  padding: 10px 14px;
  font-size: 13px;
}
.sheet {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.platform-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.platform-select button {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--mint);
  font-size: 12px;
}
.platform-select button[aria-pressed="true"] {
  background: var(--copy-background);
  color: var(--copy-ink);
}
.form-field {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}
.form-field label {
  font-size: 12px;
  font-weight: 700;
}
.form-field input,
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}
.form-field small {
  font-size: 12px;
  color: var(--muted);
}
.form-error {
  color: var(--danger) !important;
  margin-top: 12px;
}
.confirm-price {
  font-size: 36px;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin: 14px 0;
  color: var(--ink);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: var(--copy-background);
  color: var(--copy-ink);
  padding: 13px 20px;
  font-size: 12px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: calc(100% - 32px);
  text-align: center;
}
.noscript {
  position: fixed;
  inset: 0;
  background: var(--page);
  display: grid;
  place-content: center;
  padding: 32px;
}
.muted {
  color: var(--muted);
}
@media (min-width: 1000px) {
  .home-layout {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  .access-card {
    min-height: 246px;
  }
  .access-card h2 {
    font-size: 32px;
    max-width: 95%;
    position: relative;
    z-index: 1;
  }
  .access-mark {
    width: 112px;
    height: 124px;
    bottom: 25px;
    right: 7px;
    opacity: 0.8;
  }
  .expiry-line {
    max-width: 75%;
  }
  .connection-block {
    padding: 0 0 0 2px;
  }
  .subscription-link {
    gap: 7px;
  }
  .subscription-link .icon-button {
    width: 38px;
    height: 38px;
  }
  .privacy-note {
    font-size: 12px;
  }
  .quick-connect {
    font-size: 14px;
    min-height: 62px;
  }
  .button-end {
    width: 40px;
    height: 40px;
  }
  .store-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .period-option {
    padding: 18px;
  }
  .period-price {
    font-size: 18px;
  }
  .period-price-wrap {
    gap: 0;
  }
  .period-option .icon {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
    max-width: 520px;
    padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right))
      calc(108px + var(--safe-bottom)) calc(24px + var(--safe-left));
    min-height: 100dvh;
  }
  .app-header {
    margin-bottom: 30px;
  }
  .brand {
    font-size: 18px;
  }
  .brand img {
    width: 27px;
    height: 27px;
  }
  .identity {
    gap: 8px;
    font-size: 12px;
  }
  .identity > span:first-child {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .avatar {
    height: 32px;
    width: 32px;
  }
  .section-heading {
    margin-bottom: 22px;
  }
  h1 {
    font-size: 26px;
  }
  .navigation {
    position: fixed;
    top: auto;
    bottom: calc(14px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px - var(--safe-left) - var(--safe-right));
    max-width: 440px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 6px;
    border-radius: 999px;
    z-index: 20;
    box-shadow: 0 9px 36px -10px var(--nav-shadow-color);
  }
  .nav-item {
    height: 60px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 4px 2px;
    text-align: center;
    font-size: 11px;
    border-radius: 999px;
  }
  .nav-item .icon {
    width: 23px;
    height: 23px;
  }
  .access-card {
    padding: 23px 24px;
    min-height: 217px;
  }
  .access-card h2 {
    font-size: 32px;
    margin: 27px 0 20px;
  }
  .access-mark {
    right: 9px;
    width: 120px;
    height: 140px;
  }
  .home-layout {
    gap: 26px;
  }
  .account-summary {
    margin-top: 26px;
    padding: 20px 0;
    gap: 8px;
  }
  dd {
    font-size: 16px;
  }
  .home-footer {
    display: block;
    margin-top: 20px;
  }
  .home-footer .text-button {
    margin-top: 13px;
  }
  .app-footer {
    padding-top: 32px;
    font-size: 12px;
  }
  .balance-strip {
    padding: 20px;
    margin-bottom: 26px;
  }
  .balance-strip strong {
    font-size: 24px;
  }
  .balance-strip .secondary {
    padding: 10px 12px;
  }
  .balance-strip .secondary .icon {
    display: none;
  }
  .toast {
    bottom: calc(103px + var(--safe-bottom));
    width: max-content;
  }
  .sheet {
    max-height: calc(100dvh - 48px);
    padding: 22px;
    position: fixed;
    margin: auto;
  }
  .intro-copy {
    font-size: 12px;
  }
  .referral-stats {
    column-gap: 18px;
  }
  .referral-stats dd {
    font-size: 24px;
  }
  .referral-link-block {
    padding: 20px;
  }
  .device-limit {
    padding: 22px;
  }
  .period-option {
    padding: 19px;
  }
  .period-price {
    font-size: 22px;
  }
}
@media (max-width: 360px) {
  .app-shell {
    padding: calc(20px + var(--safe-top)) calc(18px + var(--safe-right))
      calc(108px + var(--safe-bottom)) calc(18px + var(--safe-left));
  }
  .identity > span:first-child {
    max-width: 85px;
  }
  .brand {
    font-size: 16px;
  }
  .section-heading h1 {
    font-size: 24px;
  }
  .access-card {
    padding: 20px;
  }
  .access-card h2 {
    font-size: 28px;
  }
  .access-mark {
    width: 103px;
  }
  .quick-connect {
    padding-left: 20px;
    font-size: 14px;
  }
  .subscription-link {
    gap: 7px;
  }
  .subscription-link .icon-button {
    width: 39px;
    height: 39px;
  }
  .nav-item {
    font-size: 11px;
  }
  .period-option {
    padding: 16px;
  }
  .period-price {
    font-size: 20px;
  }
  .period-title {
    font-size: 14px;
  }
  .homeDeviceLimit {
    font-size: 14px;
  }
  .sheet {
    padding: 20px;
  }
  .referral-stats dd {
    font-size: 21px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* A single content rail keeps navigation, cards and headings on the same axis. */
html,
body,
.access-card,
.device-limit,
.balance-strip,
.referral-link-block,
.sheet,
.period-option,
input,
select,
.device-icon,
.icon-button,
.primary,
.secondary,
.theme-toggle,
.language-switch,
.language-switch button,
.payment-method,
.method-mark {
  transition:
    background-color 240ms var(--ease),
    color 240ms var(--ease),
    border-color 240ms var(--ease),
    transform 180ms var(--ease);
}
.preferences-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
}
.navigation {
  transition: background-color 240ms var(--ease);
}
.theme-toggle,
.language-switch {
  border-radius: 999px;
  background: var(--surface);
}
.theme-toggle {
  width: 96px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  isolation: isolate;
  position: relative;
}
.theme-toggle .icon {
  width: 20px;
  height: 20px;
  transition:
    transform 280ms var(--ease),
    color 200ms;
}
.theme-track {
  position: absolute;
  width: 36px;
  height: 36px;
  top: 4px;
  left: 6px;
  background: var(--mint);
  border-radius: 50%;
  z-index: -1;
  transition: transform 260ms var(--ease);
}
:root[data-theme="light"] .theme-track {
  transform: translateX(48px);
}
:root[data-theme="dark"] .sun-icon,
:root[data-theme="light"] .moon-icon {
  color: var(--muted);
}
:root[data-theme="dark"] .moon-icon,
:root[data-theme="light"] .sun-icon {
  color: var(--accent-deep);
  transform: rotate(-12deg);
}
.language-switch {
  display: flex;
  gap: 2px;
  padding: 4px;
}
.language-switch button {
  min-height: 36px;
  min-width: 42px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}
.language-switch button[aria-pressed="true"] {
  background: var(--mint);
  color: var(--ink);
}
.sheet-header {
  margin-bottom: 18px;
}
.field-label {
  font-size: 14px;
  font-weight: 700;
}
.payment-methods {
  display: grid;
  gap: 10px;
}
.payment-method {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--page);
  color: var(--ink);
  text-align: left;
  min-height: 80px;
}
.payment-method[aria-checked="true"] {
  background: var(--mint);
}
.payment-method:hover {
  background: var(--option-hover);
}
.method-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent-deep);
  flex-shrink: 0;
}
.payment-method[aria-checked="true"] .method-mark {
  transform: translateY(-2px);
}
.method-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.method-copy strong {
  font-size: 15px;
}
.method-copy small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.method-check {
  height: 24px;
  width: 24px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.65) rotate(-20deg);
  transition:
    opacity 180ms,
    transform 240ms var(--ease);
  flex-shrink: 0;
}
.method-check .icon {
  width: 16px;
  height: 16px;
}
.payment-method[aria-checked="true"] .method-check {
  opacity: 1;
  transform: scale(1) rotate(0);
}
.device-row {
  gap: 12px;
}
.device-info strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.device-info p {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 5px;
}
.device-row .icon-button {
  min-width: 44px;
  min-height: 44px;
}
.form-field input {
  font-size: 16px;
}
.qr-image {
  background: #ffffff;
  padding: 8px;
}
.launch-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: calc(100dvh - 100px - var(--safe-top));
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}
.launch-header {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-inline)) 24px;
}
.launch-header .preferences-bar {
  margin: 0;
}
.launch-card {
  width: 100%;
  text-align: center;
}
.launch-card h1 {
  margin-bottom: 20px;
}
.launch-card p {
  color: var(--muted);
  line-height: 1.8;
  margin: 16px 0;
}
.launch-actions {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}
.launch-card .text-button {
  margin-top: 18px;
}
@media (max-width: 760px) {
  .app-shell {
    padding-inline: calc(24px + var(--safe-inline));
  }
  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
    margin-bottom: 24px;
  }
  .app-header .brand,
  .app-header .identity {
    justify-self: center;
  }
  .identity > span:first-child {
    max-width: 240px;
  }
  .preferences-bar {
    justify-content: space-between;
    margin: 0 0 10px;
  }
  .section-heading {
    position: relative;
    justify-content: center;
    min-height: 46px;
  }
  .section-heading h1 {
    width: 100%;
    text-align: center;
    font-size: 25px;
  }
  .navigation {
    width: calc(100% - 48px - 2 * var(--safe-inline));
    max-width: 472px;
  }
  .access-card {
    text-align: center;
  }
  .access-card h2 {
    max-width: 100%;
    position: relative;
    z-index: 1;
  }
  .access-mark {
    opacity: 0.35;
  }
  .expiry-line {
    align-items: center;
  }
  .quick-connect > span:first-child {
    flex: 1;
    padding-left: 46px;
  }
  .account-summary {
    text-align: center;
  }
  .privacy-note {
    justify-content: center;
    text-align: center;
  }
  .home-footer {
    text-align: center;
  }
  .intro-copy {
    text-align: center;
  }
  .device-limit {
    text-align: center;
  }
  .referral-stats {
    text-align: center;
  }
  .list-heading {
    text-align: center;
  }
  .quiet-note {
    text-align: center;
  }
}
@media (max-width: 360px) {
  .app-shell {
    padding-inline: calc(18px + var(--safe-inline));
  }
  .navigation {
    width: calc(100% - 36px - 2 * var(--safe-inline));
  }
  .section-heading h1 {
    font-size: 23px;
  }
  .identity > span:first-child {
    max-width: 220px;
  }
  .payment-method {
    padding: 13px;
    gap: 10px;
  }
  .device-limit {
    column-gap: 10px;
    padding: 20px 18px;
  }
  .method-copy strong {
    font-size: 14px;
  }
}
