
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

@font-face {
  font-family: "Coven";
  src: url("assets/coven-font.ttf") format("truetype");
  font-display: swap;
}

:root {
  --red: #FF3C34;
  --red-dark: #d8281f;
  --cream: #FFEDD4;
  --cream-dim: #FFEDD4;
  --ink: #1F191A;
  --ink-soft: #2a2122;
  --shadow: 0 12px 30px rgba(0,0,0,0.25);
  --r-pill: 999px;
  --r-card: 28px;

  --f-display: "Coven", "Comic Neue", system-ui, sans-serif;
}

html:not([lang="ru"]):not([lang="en"]) {
  --f-display: "Comic Neue", "Coven", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--f-display);
  background: var(--red);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-weight: 400;
  word-spacing: -0.32em;
  letter-spacing: 0;
}
html:not([lang="ru"]):not([lang="en"]) body {
  word-spacing: normal;
  letter-spacing: normal;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
img {
  display: block;
  max-width: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.wrap { width: min(1320px, 92vw); margin: 0 auto; }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--red);
  padding: 20px 0;
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
}
.brand {
  font-family: var(--f-display);
  font-size: 32px;
  color: var(--cream);
  letter-spacing: 0;
}
.nav-spacer { flex: 1; }
.nav-menu-panel {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  color: var(--cream);
  font-size: 22px;
  padding: 6px 4px;
  transition: opacity 0.18s;
}
.nav-links a:hover { opacity: 0.75; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.auth-checking #authNavBtn,
.auth-checking #accountBtn {
  visibility: hidden;
}
.nav-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  box-shadow: 0 8px 18px rgba(0,0,0,0.16);
}
.nav-menu-toggle span {
  width: 19px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.18s, opacity 0.18s;
}
.nav.menu-open .nav-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.menu-open .nav-menu-toggle span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 400;
  border: 0;
  cursor: pointer;
  letter-spacing: 0;
  transition: transform 0.15s ease, background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-dark {
  background: var(--ink);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-size: 20px;
}
.btn-dark:hover { background: var(--ink-soft); transform: translateY(-1px); }
.btn-dark:active { transform: translateY(1px); }

.btn-red {
  background: var(--red);
  color: var(--cream);
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 22px;
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-red:active { transform: translateY(1px); }

.account-btn {
  width: auto;
  padding: 12px 22px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.account-btn.is-visible { display: inline-flex; }
.account-btn svg {
  order: 2;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
}
.account-label {
  display: inline;
  order: 1;
}

.lang { position: relative; }
.lang-btn {
  background: var(--ink);
  color: var(--cream);
  border: 0;
  font-family: var(--f-display);
  font-size: 20px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.15s;
}
.lang-btn:hover { background: var(--ink-soft); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--ink);
  border-radius: 18px;
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 70;
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%; text-align: left;
  background: transparent; border: 0;
  color: var(--cream);
  font-family: var(--f-display); font-size: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer;
}
.lang-menu button:hover, .lang-menu button.active {
  background: var(--red);
  color: var(--cream);
}
.lang-menu button .name { opacity: 0.65; font-size: 16px; }

.hero {
  background: var(--red);
  padding: 40px 0 100px;
  position: relative;
  overflow: hidden;
  transition: background 900ms ease;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(46px, 5vw, 80px);
  line-height: 1.05;
  margin: 0 0 36px;
  color: var(--cream);
  text-wrap: balance;
  letter-spacing: 0;
}
.hero p.lede {
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 32px);
  color: var(--cream);
  margin: 0 0 40px;
  max-width: 540px;
  line-height: 1.3;
}
.hero-illustration {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(-34px);
}
.hero-illustration .witch {
  width: 100%;
  max-width: 480px;
  height: auto;
  position: relative;
  z-index: 2;
  display: block;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25));
  animation: float 6s ease-in-out infinite;
  transition: opacity 650ms ease, filter 900ms ease, width 650ms ease, margin 650ms ease;
}
.hero-illustration .witch.is-fading { opacity: 0; }
.lofi-mode .hero-illustration .witch {
  width: min(150%, 720px);
  max-width: 720px;
  margin-top: 22px;
  filter: drop-shadow(0 18px 38px rgba(0,0,0,0.36));
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero-illustration .candle {
  position: absolute;
  width: 90px;
  height: auto;
  z-index: 1;
  bottom: -4%;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.2));
  cursor: default;
  user-select: none;
}
.hero-illustration .candle.left  { left: -14%; transform: scaleX(-1); }
.hero-illustration .candle.right { right: -14%; }

.ash-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.ash {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cream);
  opacity: 0;
  animation: ash-rise linear infinite;
}
@keyframes ash-rise {
  0%   { transform: translateY(20px) translateX(0)   scale(1);   opacity: 0; }
  10%  { opacity: 0.6; }
  50%  { transform: translateY(-40vh) translateX(20px) scale(0.7); opacity: 0.5; }
  100% { transform: translateY(-110vh) translateX(-10px) scale(0.2); opacity: 0; }
}

.lofi-rain-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1000ms ease;
}
.lofi-rain-layer.is-visible { opacity: 1; }
.lofi-rain-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,237,212,0.12), transparent 46%);
}
.lofi-rain-drop {
  position: absolute;
  top: -18vh;
  width: 1.5px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,237,212,0), rgba(255,237,212,0.62));
  opacity: 0.72;
  transform: rotate(10deg);
  animation: lofi-rain-fall linear infinite;
}
@keyframes lofi-rain-fall {
  from { transform: translate3d(0, -18vh, 0) rotate(10deg); }
  to   { transform: translate3d(-16vw, 124vh, 0) rotate(10deg); }
}

.lofi-volume {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(31,25,26,0.86);
  color: var(--cream);
  border: 1px solid rgba(255,237,212,0.18);
  border-radius: 999px;
  padding: 12px 15px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 350ms ease, transform 350ms ease;
}
.lofi-volume.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.lofi-volume span {
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1;
}
.lofi-volume input {
  width: 128px;
  accent-color: var(--red);
}

.features {
  background: var(--ink);
  padding: 90px 0;
  position: relative;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: start;
}
.feature {
  text-align: center;
  color: var(--cream);
}
.feature-ico {
  width: 180px;
  height: 180px;
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature:hover .feature-ico {
  transform: rotate(-6deg) scale(1.08);
}
.feature-ico img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.feature p {
  font-family: var(--f-display);
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.25;
  margin: 0;
  color: var(--cream);
  max-width: 240px;
  margin-inline: auto;
}

.pricing {
  background: var(--red);
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}
.pricing-head {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-bottom: 50px;
}
.pricing-head h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 4.5vw, 64px);
  margin: 0;
  text-align: center;
  color: var(--cream);
  letter-spacing: 0;
}
.pricing-head .peek {
  position: absolute;
  right: 4%;
  top: -130px;
  width: 200px;
  height: auto;
  pointer-events: none;
  animation: peek-sway 4s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes peek-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.plan {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-card);
  padding: 34px 22px 26px;
  display: flex; flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.plan > * {
  position: relative;
  z-index: 2;
}
.plan:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.plan h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 2.4vw, 40px);
  margin: 0 0 14px;
  color: var(--cream);
}
.plan .badge {
  display: inline-block;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 18px;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  white-space: nowrap;
}
.plan .price {
  font-family: var(--f-display);
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.1;
  margin: 14px 0 18px;
  color: var(--cream);
  width: 100%;
}
.plan .price span {
  display: block;
  overflow-wrap: anywhere;
}
.plan .btn { width: 100%; }
.plan-features {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}
.plan-features span {
  display: block;
  background: rgba(255,237,212,0.08);
  border-radius: 14px;
  padding: 9px 12px;
  color: var(--cream);
  font-size: 16px;
}
.faq-section {
  background: var(--ink);
  padding: 90px 0;
  position: relative;
}
.faq-section h2 {
  font-family: var(--f-display);
  font-weight: 400;
  text-align: center;
  font-size: clamp(40px, 4vw, 56px);
  margin: 0 0 36px;
  color: var(--cream);
}
.faq-list { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--ink-soft);
  border-radius: 18px;
  overflow: hidden;
  transition: background 0.2s ease;
}
.faq-item:hover { background: var(--ink-soft); }

.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 22px;
  padding: 22px 24px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  cursor: pointer;
}
.faq-q .plus {
  color: var(--red);
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
  min-width: 24px;
  text-align: center;
}
.faq-item.open .plus {
  font-size: 0;
}
.faq-item.open .plus::before {
  content: "-";
  font-size: 32px;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-a-inner {
  padding: 0 24px 24px;
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.45;
}
.faq-a-inner p { margin: 0 0 12px; }
.faq-a-inner p:last-child { margin: 0; }
.faq-a-inner a { color: var(--cream); border-bottom: 1px dashed var(--cream); }
.faq-a-inner a:hover { color: var(--red); border-color: var(--red); }
.faq-item.open .faq-a { max-height: 600px; }

.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 36px 0;
  font-family: var(--f-display);
  border-top: 1px solid #2a2122;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 30px;
  flex-wrap: wrap;
}
.footer-copy-inline {
  font-size: 18px; color: var(--cream);
}
.footer-links {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.footer-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px;
  color: var(--cream);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: #2a2122;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.footer-link:hover {
  background: var(--red);
  color: var(--cream);
  transform: translateY(-1px);
}
.footer-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.auth-page {
  min-height: 100vh;
  background: var(--red);
  display: flex; flex-direction: column;
}
.auth-body {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px 60px;
}
.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--ink);
  border-radius: var(--r-card);
  padding: 44px 40px;
  color: var(--cream);
  box-shadow: var(--shadow);
  position: relative;
}
.auth-card h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(38px, 4vw, 52px);
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: 0;
}
.auth-card .auth-sub {
  font-family: var(--f-display);
  text-align: center;
  font-size: 20px;
  color: var(--cream-dim);
  margin: 0 0 28px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--cream-dim);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: var(--ink-soft);
  border: 2px solid transparent;
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  transition: border-color 0.18s;
}
.field input:focus { outline: none; border-color: var(--red); }
.field input::placeholder { color: rgba(255,237,212,0.45); }
.field input.masked-password {
  -webkit-text-security: disc;
  text-security: disc;
}

.auth-options {
  display: flex; justify-content: space-between; align-items: center;
  margin: 4px 0 22px;
  font-family: var(--f-display);
  font-size: 16px;
}
.auth-options a { color: var(--cream); border-bottom: 1px dashed currentColor; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--cream-dim); cursor: pointer; }
.checkbox input { accent-color: var(--red); width: 16px; height: 16px; }

.auth-submit { width: 100%; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  font-family: var(--f-display);
  font-size: 16px;
  color: var(--cream-dim);
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px;
  background: rgba(255,237,212,0.18);
}

.telegram-btn {
  width: 100%;
  background: #229ED9;
  color: white;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-display);
  font-size: 20px;
  padding: 14px;
  border: 0; border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.telegram-btn:hover { transform: translateY(-1px); background: #2aa9e3; }
.telegram-btn.is-disabled,
.telegram-btn:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.auth-telegram-wait {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: var(--cream);
}
.auth-wait-telegram-icon {
  width: 78px;
  height: 78px;
  object-fit: contain;
  display: block;
  margin: 0 auto 22px;
  animation: auth-wait-float 1.9s ease-in-out infinite;
}
.auth-telegram-wait h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.08;
  margin: 0 0 12px;
  letter-spacing: 0;
}
.auth-telegram-wait p {
  font-family: var(--f-display);
  font-size: 19px;
  line-height: 1.42;
  color: var(--cream-dim);
  margin: 0 auto 26px;
  max-width: 360px;
}
.auth-wait-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-wait-back {
  width: 100%;
  padding: 13px 18px;
  font-size: 18px;
}
@keyframes auth-wait-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.96;
  }
  50% {
    transform: translateY(-4px) scale(1.03);
    opacity: 1;
  }
}

.auth-foot {
  text-align: center;
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--cream-dim);
  margin-top: 22px;
}
.auth-foot a { color: var(--cream); border-bottom: 1px dashed currentColor; }

.dash-page { background: var(--red); min-height: 100vh; }
.dash-main { padding: 40px 0 80px; }
.dash-loading .dash-main {
  opacity: 0;
  pointer-events: none;
}
.dash-loading::after {
  content: "Загрузка...";
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 120;
  transform: translate(-50%, -50%);
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-card);
  padding: 22px 34px;
  box-shadow: var(--shadow);
  font-family: var(--f-display);
  font-size: 24px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.dash-card {
  background: var(--ink);
  border-radius: var(--r-card);
  padding: 32px 32px;
  color: var(--cream);
  box-shadow: var(--shadow);
  position: relative;
}
.subscription-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.dash-card.full { grid-column: 1 / -1; }
.dash-card h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 22px;
  display: flex; align-items: center; gap: 12px;
}
.dash-card h2 .pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(31,138,91,0.18); color: #6ee2a4;
  font-size: 14px;
  padding: 4px 12px; border-radius: 999px;
}
.dash-card h2 .pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #6ee2a4; box-shadow: 0 0 8px #6ee2a4;
  animation: status-pulse-active 1.8s ease-in-out infinite;
}
.dash-card h2 .pill.off {
  background: rgba(255,60,52,0.18); color: var(--red);
}
.dash-card h2 .pill.off::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation-name: status-pulse-off;
}
@keyframes status-pulse-active {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(110,226,164,0.95), 0 0 0 0 rgba(110,226,164,0.26);
  }
  50% {
    transform: scale(1.35);
    box-shadow: 0 0 14px rgba(110,226,164,1), 0 0 0 7px rgba(110,226,164,0);
  }
}
@keyframes status-pulse-off {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(255,60,52,0.95), 0 0 0 0 rgba(255,60,52,0.28);
  }
  50% {
    transform: scale(1.35);
    box-shadow: 0 0 14px rgba(255,60,52,1), 0 0 0 7px rgba(255,60,52,0);
  }
}

.sub-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(255,237,212,0.12);
  font-size: 18px;
}
.sub-row:last-of-type { border-bottom: 0; margin-bottom: 14px; }
.sub-row .label { color: var(--cream-dim); }
.sub-row .value { color: var(--cream); }

.sub-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  margin-top: auto;
  padding-top: 18px;
}
.sub-actions .btn,
.sub-actions .btn-outline { width: 100%; font-size: 16px; padding: 12px 16px; }
.sub-actions .sub-connect-btn { margin-top: auto; }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(255,237,212,0.25);
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.15s;
}
.btn-outline:hover { border-color: var(--red); color: var(--red); transform: translateY(-1px); }

.info-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255,237,212,0.12);
  font-size: 18px;
}
.info-row:last-of-type { border-bottom: 0; }
.info-row .label { color: var(--cream-dim); flex-shrink: 0; }
.info-row .value { color: var(--cream); margin-left: auto; margin-right: 12px; word-break: break-word; }
.info-row .mini-btn {
  background: transparent;
  border: 1.5px solid rgba(255,237,212,0.25);
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s;
}
.info-row .mini-btn:hover { border-color: var(--red); color: var(--red); }

.traffic-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 20px;
}
@media (max-width: 720px) { .traffic-grid { grid-template-columns: 1fr; } }
.traffic-block {
  background: var(--ink-soft);
  border-radius: 18px;
  padding: 22px 24px;
}
.traffic-block h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--cream);
}
.traffic-note { color: var(--cream-dim); font-size: 14px; margin: 0 0 14px; }
.traffic-big {
  font-family: var(--f-display);
  font-size: 30px;
  color: var(--cream);
}
.traffic-big .infinity { color: var(--red); font-size: 36px; }
.traffic-dot {
  display: inline-block;
  font-size: 1.45em;
  line-height: 0;
  transform: translateY(0.08em);
}
.bar {
  width: 100%; height: 14px;
  background: rgba(255,237,212,0.10);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--red), #ff7a76);
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(255,60,52,0.5);
  transition: width 0.6s ease;
}
.traffic-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; color: var(--cream-dim);
  margin-top: 10px;
}
.traffic-meta strong { color: var(--cream); font-size: 16px; }

.dev-summary {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: transparent; border: 0;
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 20px;
  cursor: pointer;
  padding: 12px 0;
}
.dev-summary .count { color: var(--cream-dim); margin-left: 10px; font-size: 16px; }
.dev-summary .chev {
  color: var(--red); font-size: 28px;
  line-height: 1;
  min-width: 20px;
  text-align: center;
}
.dev-summary .chev::before { content: "+"; }
.dev-section.open .dev-summary .chev::before { content: "-"; }
.dev-list {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
}
.dev-section.open .dev-list { max-height: 1200px; }
.dev-list-inner { padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.dev-actions {
  margin-top: 18px;
}
.dev-actions .btn {
  font-size: 16px;
  padding: 12px 16px;
}

.dev-row {
  background: var(--ink-soft);
  border-radius: 14px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 16px;
}
.dev-icon {
  width: 38px; height: 38px;
  background: rgba(255,60,52,0.16);
  color: var(--red);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.dev-icon svg { width: 20px; height: 20px; }
.dev-meta { display: flex; flex-direction: column; gap: 2px; }
.dev-name { font-size: 17px; color: var(--cream); }
.dev-sub  { font-size: 13px; color: var(--cream-dim); }
.dev-remove {
  background: transparent;
  border: 1.5px solid rgba(255,237,212,0.25);
  cursor: pointer;
  color: var(--cream); font-family: var(--f-display);
  font-size: 14px;
  padding: 6px 14px; border-radius: 999px;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.dev-remove:hover { border-color: var(--red); color: var(--red); }

@media (max-width: 820px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 8, 7, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in 0.18s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--ink);
  border-radius: var(--r-card);
  padding: 32px 32px 28px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  color: var(--cream);
  position: relative;
  box-shadow: var(--shadow);
  display: none;
  animation: pop-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-wide { max-width: 720px; }
.modal.show { display: block; }

/* Compact tariff popups: header + actions stay fixed, only the option list scrolls. */
.modal-list {
  max-height: min(80vh, 600px);
  overflow: hidden;
}
.modal-list.show { display: flex; flex-direction: column; }
.modal-list > h3,
.modal-list > .modal-sub,
.modal-list > .plan-picked,
.modal-list > .modal-actions { flex: 0 0 auto; }
.modal-list > .opt-list,
.modal-list > .download-groups {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: 0;
}
.modal-list > .modal-actions { margin-top: 16px; }

/* Lock the page behind any open modal so scrolling the list doesn't move the page. */
body.modal-open { overflow: hidden; }
.modal { overscroll-behavior: contain; }
@keyframes pop-in {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: 0;
  color: var(--cream-dim);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--ink-soft); color: var(--red); }
.modal-close svg { width: 16px; height: 16px; }

.modal h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 8px;
  padding-right: 36px;
}
.modal p.modal-sub {
  color: var(--cream-dim);
  font-size: 16px;
  margin: 0 0 22px;
  line-height: 1.4;
}

.modal .field input,
.modal .field select {
  width: 100%;
  background: var(--ink-soft);
  border: 2px solid transparent;
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  transition: border-color 0.18s;
}
.modal .field input:focus { outline: none; border-color: var(--red); }

.modal-actions {
  display: flex; gap: 10px; margin-top: 22px;
}
.modal-actions .btn,
.modal-actions .btn-outline { flex: 1; font-size: 16px; padding: 12px 18px; }

.opt-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.opt {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: var(--ink-soft);
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.opt:hover { border-color: rgba(255,237,212,0.18); }
.opt.selected { border-color: var(--red); background: rgba(255,60,52,0.08); }
.opt .opt-title { font-size: 17px; }
.opt .opt-title small {
  display: block;
  color: var(--cream-dim);
  font-size: 13px;
  margin-top: 4px;
}
.opt .opt-title .badge-mini {
  display: inline-block;
  background: var(--cream); color: var(--ink);
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  margin-left: 8px;
}
.opt .opt-price { font-size: 17px; color: var(--cream); }

.plan-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 16px;
}
.plan-picked span {
  background: rgba(255,60,52,0.16);
  color: var(--cream);
  border: 1px solid rgba(255,60,52,0.28);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
}
.plan-duration-list .opt {
  align-items: flex-start;
}
.plan-modal,
.plan-modal h3,
.plan-modal .modal-sub,
.plan-modal .opt-title,
.plan-modal .opt-title small,
.plan-modal .opt-price {
  color: var(--cream);
}
.plan-modal .modal-sub,
.plan-modal .opt-title small {
  opacity: 0.82;
}
.payment-box {
  background: var(--ink-soft);
  border-radius: 18px;
  padding: 16px;
  margin: 4px 0 16px;
  text-align: center;
}
.payment-qr {
  width: min(260px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  background: var(--cream);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payment-qr img,
.payment-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}
.payment-note,
.payment-status {
  color: var(--cream);
  font-size: 15px;
  line-height: 1.35;
}
.payment-status {
  margin: 14px 0 0;
  text-align: center;
}
.payment-actions {
  display: block;
}
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.payment-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,60,52,0.12);
  color: var(--cream);
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}
.payment-actions .btn,
.payment-actions .btn-outline {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.payment-method-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
}
.payment-method-icon-sber {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
  margin-right: -2px;
}
.payment-method-icon svg {
  width: 22px;
  height: 22px;
}
.payment-sber-icon {
  width: 76px;
  height: 34px;
  object-fit: contain;
  display: block;
}
.payment-method-primary {
  min-height: 54px;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(255,60,52,0.28);
}

.connect-grid {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#modal-connect {
  background: var(--ink-soft);
}
.connect-key-block {
  display: grid;
  gap: 12px;
}
.download-disclosure {
  width: 100%;
}
.download-disclosure summary {
  list-style: none;
  cursor: pointer;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 50px;
  font-size: 18px;
}
.download-disclosure summary::-webkit-details-marker {
  display: none;
}
.download-disclosure .download-groups {
  margin-top: 10px;
}
.download-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.download-group {
  background: var(--ink-soft);
  border: 1px solid rgba(255,237,212,0.1);
  border-radius: 14px;
  padding: 12px;
}
.download-group h4 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 9px;
  color: var(--cream);
}
.download-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.download-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  background: rgba(255,237,212,0.05);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 9px 11px;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
}
.download-link:hover {
  border-color: var(--red);
  background: rgba(255,60,52,0.1);
  transform: translateY(-1px);
}
.download-link .dl-name {
  color: var(--cream);
  font-size: 14px;
}
.dl-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background-color: var(--red);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.download-link strong {
  color: var(--cream);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  margin-left: auto;
  background: rgba(255,237,212,0.08);
  border-radius: 999px;
  padding: 6px 10px;
}
.connect-qr {
  width: min(230px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(255,60,52,0.22);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 24px;
}
.connect-qr img {
  width: 100%;
  height: 100%;
  display: block;
}
.connect-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
}
.connect-link-row input {
  min-width: 0;
  background: var(--ink);
  border: 2px solid transparent;
  color: var(--cream);
  font-family: var(--f-display);
  font-size: 25px;
  padding: 13px 15px;
  border-radius: 14px;
  text-overflow: ellipsis;
}
@media (max-width: 540px) {
  .connect-link-row input { font-size: 14px; }
}
.connect-link-row input:focus {
  outline: none;
  border-color: var(--red);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(255,237,212,0.25);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.15s;
}
.icon-btn:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}
.copy-connect-btn {
  width: 58px;
  height: 58px;
  padding: 0;
}
.copy-connect-btn svg {
  width: 24px;
  height: 24px;
}

.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--cream);
  border-radius: 14px;
  padding: 14px 18px;
  font-family: var(--f-display);
  font-size: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.4);
  border-left: 4px solid var(--red);
  min-width: 220px; max-width: 360px;
  animation: toast-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}
.toast.ok    { border-left-color: #6ee2a4; }
.toast.error { border-left-color: var(--red); }
.toast.fade-out { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { to { transform: translateX(120%); opacity: 0; } }

.spark {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  background: var(--red);
  mix-blend-mode: screen;
  box-shadow: 0 0 14px var(--red);
  animation: spark-fade 800ms ease-out forwards;
  transform: translate(-50%, -50%);
}
.spark.cream {
  background: var(--cream);
  box-shadow: 0 0 14px var(--cream);
}
.spark.star {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: var(--red);
  font-size: 14px;
  line-height: 1;
  width: auto; height: auto;
  font-family: var(--f-display);
}
@keyframes spark-fade {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(0.2) translateY(14px); }
}

@media (max-width: 980px) {
  .nav { padding: 14px 0; }
  .nav-inner { gap: 12px; position: relative; }
  .brand { font-size: 26px; }
  .nav-menu-toggle { display: inline-flex; }
  .nav-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: var(--ink);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
    z-index: 80;
  }
  .nav.menu-open .nav-menu-panel { display: flex !important; }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav-links a,
  .nav-menu-panel > .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    background: var(--ink-soft);
    border-radius: var(--r-pill);
    padding: 12px 18px;
  }
  .nav-links a:hover,
  .nav-menu-panel > .btn:hover {
    background: rgba(255,60,52,0.18);
    color: var(--cream);
    opacity: 1;
  }
  .nav-menu-panel .account-btn {
    width: 100%;
    height: 46px;
  }
  .nav-menu-panel .account-label { display: inline; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero-illustration { transform: none; }
  .hero p.lede { margin-inline: auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .pricing-head .peek { width: 110px; top: -60px; right: 2%; }
  .hero-illustration .candle { display: none; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 720px) {
  .download-groups { grid-template-columns: 1fr; }
  .modal { padding: 28px 22px 24px; }
}
@media (max-width: 540px) {
  .plans { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .download-link { flex-wrap: wrap; }
  .download-link strong { white-space: normal; }
}
