:root {
  color-scheme: dark;
  --bg: #031a3d;
  --surface: rgba(8, 46, 91, .8);
  --surface-strong: rgba(5, 35, 75, .96);
  --line: rgba(49, 169, 255, .55);
  --line-soft: rgba(91, 179, 255, .22);
  --text: #f7fbff;
  --muted: #b7cae8;
  --cyan: #05eaff;
  --blue: #087bff;
  --green: #46dc7d;
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); }

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 8%, rgba(16, 104, 255, .23), transparent 34%),
    radial-gradient(circle at 5% 43%, rgba(0, 221, 255, .11), transparent 28%),
    linear-gradient(155deg, #03142f, #042653 56%, #021631);
  background-attachment: fixed;
}

button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(112px + env(safe-area-inset-bottom));
  overflow-x: clip;
}

.splash {
  min-height: 80dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.logo-mark, .profile-logo {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #08dff1, #0068ff 70%);
  box-shadow: 0 12px 32px rgba(0, 127, 255, .32);
  font-weight: 900;
}

.logo-mark { width: 46px; height: 46px; border-radius: 15px; font-size: 24px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: none;
  text-align: left;
  cursor: pointer;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 19px; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.avatar {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(2, 25, 58, .72);
  font-weight: 800;
  cursor: pointer;
}

.page { display: block; }

.home-hero { text-align: center; }

.mascot-stage {
  width: 100%;
  min-height: 285px;
  display: grid;
  place-items: center;
  margin: -14px 0 -4px;
  overflow: visible;
}

.mascot {
  width: min(100%, 390px);
  height: auto;
  max-height: 320px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  opacity: 1;
  visibility: visible;
  filter: drop-shadow(0 15px 30px rgba(1, 111, 255, .48));
}

.home-hero h1, .page-title h1 {
  margin: 0;
  font-size: clamp(29px, 8vw, 38px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.home-hero p, .page-title p {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 15px;
}

.primary {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid #20f4ff;
  border-radius: 17px;
  color: white;
  background: linear-gradient(180deg, #14c8ff, #0872fa);
  box-shadow: 0 0 24px rgba(0, 213, 255, .24), inset 0 1px rgba(255, 255, 255, .26);
  font-weight: 850;
  font-size: 15px;
  cursor: pointer;
}

.primary .icon:last-child { margin-left: auto; }
.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(11, 58, 108, .9), rgba(4, 33, 73, .88));
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 14px 35px rgba(0, 7, 28, .15);
}

.status-card { margin-top: 12px; padding: 12px 14px; }
.status-head { display: flex; align-items: center; gap: 12px; text-align: left; }

.status-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--cyan);
  background: rgba(14, 150, 255, .2);
}

.status-title { flex: 1; min-width: 0; }
.status-title strong, .status-title span { display: block; }
.status-title strong { font-size: 14px; }
.status-title span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.pill {
  padding: 5px 8px;
  border: 1px solid rgba(66, 244, 126, .3);
  border-radius: 99px;
  color: #8fffb6;
  background: rgba(38, 190, 90, .3);
  font-size: 10px;
  font-weight: 800;
}

.progress {
  height: 9px;
  margin: 9px 0 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(171, 207, 255, .27);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18dfff, #09a9ff);
  box-shadow: 0 0 14px rgba(0, 234, 255, .65);
}

.status-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }

.renew-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  background: none;
  font-weight: 750;
  font-size: 11px;
  cursor: pointer;
}

.renew-link .icon { width: 20px; }
.link-card { margin-top: 12px; padding: 11px 13px; }

.link-card h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  font-size: 13px;
}

.link-card h2 .icon { color: var(--muted); }

.link-box {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 7px 6px 10px;
  border: 1px solid rgba(132, 198, 255, .38);
  border-radius: 13px;
  background: rgba(107, 171, 231, .16);
}

.link-box span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.icon-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
}

.icon-button:disabled { opacity: .35; cursor: default; }
.page-title { margin: 2px 0 14px; }
.page-title p { margin-bottom: 0; }
.plans { display: grid; gap: 10px; }

.plan {
  width: 100%;
  position: relative;
  padding: 16px 12px 11px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.plan.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 230, 255, .38), inset 0 0 18px rgba(0, 119, 255, .12);
}

.badge {
  position: absolute;
  top: -13px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  color: white;
  font-size: 9px;
  font-weight: 850;
}

.badge.popular { background: linear-gradient(180deg, #c653ff, #7838ea); box-shadow: 0 0 16px rgba(178, 52, 255, .55); }
.badge.saving { background: linear-gradient(180deg, #3dcc66, #13883a); }
.plan-head { display: flex; align-items: center; gap: 8px; }

.radio {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #a9c6eb;
  border-radius: 50%;
  color: white;
}

.selected .radio { border-color: var(--cyan); background: linear-gradient(145deg, #10e5ff, #0675ff); }
.radio .icon { width: 17px; height: 17px; }
.plan-copy { flex: 1; min-width: 0; }
.plan-copy strong, .plan-copy small { display: block; }
.plan-copy strong { font-size: 14px; }
.plan-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.price { text-align: right; white-space: nowrap; }
.price strong, .price small { display: block; }
.price strong { font-size: 19px; }
.price small { color: var(--muted); text-decoration: line-through; font-size: 10px; }

.benefits {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  margin: 10px 0 0 31px;
}

.benefits span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1 1 auto;
  padding: 4px 5px;
  border-radius: 99px;
  color: #d8e8ff;
  background: rgba(30, 120, 207, .4);
  font-size: 7px;
  white-space: nowrap;
}
.benefits .icon { width: 11px; height: 11px; flex: 0 0 auto; }

.section { margin-top: 16px; }
.section-title { margin: 0 0 9px; font-size: 18px; letter-spacing: -.03em; }
.device-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.device-option {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: white;
  background: rgba(5, 36, 78, .86);
  text-align: left;
  cursor: pointer;
}

.device-option.selected { border-color: var(--cyan); box-shadow: 0 0 15px rgba(0, 229, 255, .32); }
.device-option > .icon { width: 25px; color: #d8ecff; }
.device-option strong, .device-option small { display: block; }
.device-option strong { font-size: 11px; }
.device-option small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.device-option i { width: 16px; height: 16px; border: 2px solid #a9c6eb; border-radius: 50%; }
.device-option.selected i { border: 5px solid var(--cyan); }
.checkout { margin-top: 16px; }
.checkout { position: relative; text-align: center; }
.checkout > .icon { position: absolute; left: 16px; }
.secure-note { margin: 9px 0 0; color: #d9e8fa; text-align: center; font-size: 10px; }
.connect-title h1 { font-size: clamp(27px, 7.4vw, 34px); }
.connect-title p { font-size: 13px; }
.steps { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }

.step {
  min-height: 50px;
  display: grid;
  grid-template-columns: 34px 1fr 22px;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.3;
}

.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 11px;
  background: linear-gradient(145deg, #0ad8ef, #075bdb);
  box-shadow: 0 0 17px rgba(0, 229, 255, .38);
  font-size: 15px;
  font-weight: 900;
}

.step-icon { display: grid; place-items: center; color: white; }
.step-icon .icon { width: 18px; height: 18px; }
.copy-primary .icon { flex: 0 0 auto; }
.profile-head { display: flex; align-items: center; gap: 18px; margin: 10px 6px 24px; }
.profile-logo { width: 82px; height: 82px; flex: 0 0 auto; border-radius: 24px; font-size: 43px; }
.profile-head h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.profile-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.profile-card { padding: 13px 15px; }
.profile-card-title { display: flex; align-items: center; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.profile-card-title h2 { margin: 0; font-size: 19px; }
.profile-grid { display: grid; gap: 9px; margin-top: 10px; }
.profile-line { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 7px; white-space: nowrap; }
.profile-line .icon { color: #bddaff; }
.profile-line .icon { width: 19px; height: 19px; }
.profile-line span { color: var(--muted); font-size: 10px; }
.profile-line strong { text-align: right; font-size: 10px; }
.menu { display: grid; gap: 8px; margin-top: 13px; }

.menu-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr 20px;
  align-items: center;
  gap: 13px;
  min-height: 50px;
  padding: 6px 12px;
  color: white;
  text-align: left;
  cursor: pointer;
}

.menu-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: white; background: rgba(0, 117, 239, .5); }
.menu-icon .icon { width: 22px; height: 22px; }
.menu-row > .icon { color: white; }
.menu-row strong { font-size: 12px; }

.nav {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 22px), 458px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  border: 1px solid rgba(46, 160, 255, .62);
  border-radius: 24px;
  background: rgba(3, 26, 61, .92);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(0, 4, 24, .45);
}

.nav button {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 9px 2px;
  border: 0;
  border-radius: 17px;
  color: #dce9fa;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.nav button.active { color: var(--cyan); background: rgba(6, 96, 184, .25); box-shadow: inset 0 0 0 1px rgba(30, 158, 255, .3); }
.nav-icon { width: 25px; height: 25px; }

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(100px + env(safe-area-inset-bottom));
  transform: translate(-50%, 18px);
  width: min(calc(100% - 36px), 430px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #073469;
  box-shadow: 0 18px 45px rgba(0, 5, 25, .5);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .22s;
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 370px) {
  .app-shell { padding-inline: 12px; }
  .brand small { display: none; }
  .mascot-stage { min-height: 240px; }
  .mascot { max-height: 270px; }
  .plan { padding-inline: 12px; }
  .plan-copy strong { font-size: 15px; }
  .price strong { font-size: 20px; }
  .device-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
}

@media (min-width: 700px) {
  .app-shell { padding-top: 30px; }
}
/* Компактный главный экран */
.app-shell:has(.home-hero) .topbar {
  display: none;
}

.home-hero .mascot-stage {
  min-height: 0;
  margin: 0 auto 4px;
}

.home-hero .mascot {
  width: 68%;
  max-width: 280px;
  max-height: 29dvh;
  object-fit: contain;
}

.home-hero h1 {
  font-size: clamp(17px, 4.6vw, 23px);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.home-hero p {
  font-size: 13px;
  margin: 6px 0 14px;
}

.app-shell:has(.home-hero) .status-card {
  margin-top: 8px;
}

.app-shell:has(.home-hero) .link-card {
  margin-top: 10px;
}/* Компактный экран тарифов */
.app-shell:has(.plan) .topbar {
  margin-bottom: 14px;
}

.app-shell:has(.plan) .logo-mark {
  width: 34px;
  height: 34px;
  font-size: 19px;
}

.app-shell:has(.plan) .avatar {
  width: 34px;
  height: 34px;
}

.app-shell:has(.plan) .page-title h1 {
  font-size: 25px;
  line-height: 1.15;
}

.plan {
  padding: 12px 10px 9px;
}

.plan .benefits {
  margin-top: 7px;
}

.device-option {
  min-height: 46px;
}

.app-shell:has(.plan) .page-title {
  margin-bottom: 14px;
}/* Компактный экран подключения */
.app-shell:has(.connect-title) .topbar {
  margin-bottom: 14px;
}

.app-shell:has(.connect-title) .logo-mark {
  width: 34px;
  height: 34px;
  font-size: 19px;
}

.app-shell:has(.connect-title) .avatar {
  width: 34px;
  height: 34px;
}

.connect-title h1 {
  font-size: 23px;
  line-height: 1.15;
}

.connect-title p {
  font-size: 12px;
  line-height: 1.4;
}

.steps {
  gap: 10px;
  margin-bottom: 18px;
}

.step {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
  padding: 4px 0;
  grid-template-columns: 24px 1fr;
  font-size: 12px;
  line-height: 1.4;
}

.step > :first-child {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #05eaff;
  width: 24px;
  height: auto;
  font-size: 16px;
}

.step > :last-child:not(:nth-child(2)) {
  display: none;
}/* Компактный профиль */
.topbar .avatar {
  display: none;
}

.app-shell:has(.profile-head) .topbar {
  display: none;
}

.profile-head {
  gap: 12px;
  margin: 8px 4px 16px;
}

.profile-head .logo-mark {
  width: 56px;
  height: 56px;
  font-size: 28px;
}

.profile-head h1 {
  font-size: 22px;
}

.profile-head p {
  font-size: 12px;
}

.profile-card {
  border: none;
  border-radius: 12px;
  background: rgba(25, 75, 130, 0.18);
  box-shadow: none;
  padding: 10px 12px;
}

.profile-card h2 {
  font-size: 16px;
}

.profile-line {
  padding-top: 5px;
  padding-bottom: 5px;
}

.menu-row {
  min-height: 44px;
}/* Частые вопросы */
.faq-back {
  background: none;
  border: none;
  color: #05eaff;
  font-size: 13px;
  padding: 8px 0;
  margin-bottom: 14px;
  cursor: pointer;
}

.faq-page h1 {
  font-size: 24px;
  margin-bottom: 16px;
}

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

.faq-item {
  background: rgba(25, 75, 130, 0.18);
  border: 1px solid rgba(70, 150, 230, 0.25);
  border-radius: 12px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: #05eaff;
  font-size: 19px;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 12px 12px;
  color: #b7cae8;
  font-size: 12px;
  line-height: 1.5;
}
.legal-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-bottom: 12px;
}

.legal-links a,
.legal-links a:visited {
  color: #8daacb;
  font-size: 12px;
  text-decoration: none;
}

.legal-links small {
  color: #8daacb;
  font-size: 10px;
  margin-top: 4px;
}


/* Subscription status colors */
.pill-none {
  color: #b7cae8;
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.4);
}
.pill-expired, .pill-disabled {
  color: #ffaaaa;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
}
.pill-limited, .pill-on_hold {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
}
.copy-primary:disabled {
  background: #334761;
  color: #a9b9cc;
  border-color: #526781;
  box-shadow: none;
  cursor: not-allowed;
}

/* Device selector alignment */
.device-option {
  gap: 5px;
  padding-inline: 7px;
}

.device-option > .icon {
  width: 21px;
}

.device-option strong {
  white-space: nowrap;
  font-size: 11px;
}

.device-option i {
  width: 14px;
  height: 14px;
}

@media (max-width: 370px) {
  .device-option {
    gap: 4px;
    padding-inline: 5px;
  }

  .device-option > .icon {
    width: 18px;
  }
}
