/* Telegram WebApp: высота viewport */
:root {
  color-scheme: light dark;
  --app-height: 100vh;
  --sheet-max-height: min(88dvh, var(--checkout-height, var(--app-height, 100dvh)));
  --content-inset-x: 16px;
  --app-fill-1: rgba(0, 0, 0, 0.06);
  --app-fill-2: rgba(0, 0, 0, 0.05);
  --app-fill-3: rgba(0, 0, 0, 0.04);
  --app-fill-4: rgba(0, 0, 0, 0.08);
  --app-fill-5: rgba(0, 0, 0, 0.1);
  --app-divider: rgba(0, 0, 0, 0.08);
  --app-sheet-footer-bg: rgba(255, 255, 255, 0.82);
  --app-grabber: rgba(0, 0, 0, 0.18);
  --app-gradient-end: rgba(0, 0, 0, 0.04);
  --skeleton-color: rgba(0, 0, 0, 0.08);
  --skeleton-icon-color: rgba(0, 0, 0, 0.12);
}

html.dark {
  --app-fill-1: rgba(255, 255, 255, 0.06);
  --app-fill-2: rgba(255, 255, 255, 0.05);
  --app-fill-3: rgba(255, 255, 255, 0.04);
  --app-fill-4: rgba(255, 255, 255, 0.08);
  --app-fill-5: rgba(255, 255, 255, 0.1);
  --app-divider: rgba(255, 255, 255, 0.08);
  --app-sheet-footer-bg: rgba(0, 0, 0, 0.22);
  --app-grabber: rgba(255, 255, 255, 0.28);
  --app-gradient-end: rgba(255, 255, 255, 0.05);
  --skeleton-color: rgba(255, 255, 255, 0.12);
  --skeleton-icon-color: rgba(255, 255, 255, 0.2);
}

html, body, #app, .views.tabs {
  height: var(--app-height);
}

/* В Telegram «Назад» — в шапке клиента, не дублируем в navbar */
html.telegram-webapp .navbar .left {
  display: none;
}

/* ===== Tabbar: плавное «liquid glass» ===== */
.ios .toolbar.tabbar .toolbar-pane {
  position: relative;
  isolation: isolate;
}

.ios .toolbar.tabbar .tab-link-highlight {
  transition-property: transform, width;
  transition-duration: 0.42s;
  transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.ios .toolbar.tabbar .tab-link-highlight::before,
.ios .toolbar.tabbar .tab-link-highlight::after {
  transition-property: opacity, scale, background-color, box-shadow;
  transition-duration: 0.38s;
  transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ===== Servers status card ===== */
.servers-card {
  margin: 0 !important;
  overflow: hidden;
}

.servers-card .card-content {
  padding: 16px;
}

.servers-card--ok .servers-head-icon {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}

.servers-card--warn .servers-head-icon {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

.servers-card--bad .servers-head-icon {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

.servers-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.servers-head-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.servers-head-icon .icon {
  font-size: 22px;
}

.servers-head-info {
  flex: 1;
  min-width: 0;
}

.servers-head-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.servers-head-sub {
  margin-top: 3px;
  font-size: 13px;
  opacity: 0.65;
}

.servers-head-pct {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}

.servers-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--app-fill-4);
  overflow: hidden;
  margin-bottom: 14px;
}

.servers-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.servers-progress-bar--ok { background: linear-gradient(90deg, #30d158, #34c759); }
.servers-progress-bar--warn { background: linear-gradient(90deg, #ff9f0a, #ffb340); }
.servers-progress-bar--bad { background: linear-gradient(90deg, #ff453a, #ff6961); }

.servers-grid {
  display: grid;
  gap: 8px;
}

.servers-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.servers-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--app-fill-2);
  min-width: 0;
}

.servers-item.is-online {
  background: rgba(48, 209, 88, 0.08);
}

.servers-item.is-offline {
  background: rgba(255, 69, 58, 0.08);
}

.servers-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.servers-item.is-online .servers-dot {
  background: #30d158;
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.25);
  animation: servers-pulse 2s ease-in-out infinite;
}

.servers-item.is-offline .servers-dot {
  background: #ff453a;
}

@keyframes servers-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.servers-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.servers-state {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.servers-item.is-online .servers-state { color: #30d158; opacity: 1; }
.servers-item.is-offline .servers-state { color: #ff453a; opacity: 1; }

.servers-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  color: #ff453a;
  font-size: 14px;
}

.servers-empty .icon {
  font-size: 20px;
}

/* ===== Subscription card ===== */
.sub-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-card {
  margin: 0 !important;
  overflow: hidden;
}

.sub-card .card-content {
  padding: 16px;
}

.sub-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-top: 0;
}

.sub-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.15);
  color: var(--f7-theme-color, #0a84ff);
}

.sub-card-icon .icon {
  font-size: 22px;
}

.sub-card-main {
  flex: 1;
  min-width: 0;
}

.sub-card-email {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-card-date {
  margin-top: 3px;
  font-size: 13px;
  opacity: 0.65;
  line-height: 1.3;
}

.sub-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.sub-card-stats--top {
  margin-top: 0;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--app-divider);
}

.sub-card-stat {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--app-fill-2);
  min-width: 0;
}

.sub-card-stat-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.12);
  color: var(--f7-theme-color, #0a84ff);
}

.sub-card-stat-icon .icon {
  font-size: 16px;
}

.sub-card-stat-body {
  flex: 1;
  min-width: 0;
}

.sub-card-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.55;
  line-height: 1.2;
}

.sub-card-stat-value {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}

.sub-card-stat-hint {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
  line-height: 1.3;
}

.sub-card-stat-hint--warn {
  color: #ff9f0a;
  opacity: 1;
}

.sub-devices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-devices-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--app-fill-3);
  font-size: 13px;
  opacity: 0.65;
  line-height: 1.35;
}

.sub-devices-empty .icon {
  font-size: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}

.sub-device-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--app-fill-2);
}

.sub-device-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--app-fill-4);
  color: var(--f7-theme-color, #0a84ff);
}

.sub-device-icon .icon {
  font-size: 18px;
}

.sub-device-body {
  flex: 1;
  min-width: 0;
}

.sub-device-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.sub-device-meta {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.6;
  line-height: 1.3;
}

.sub-traffic-bar {
  margin-top: 8px;
  height: 4px;
  border-radius: 2px;
  background: var(--app-fill-5);
  overflow: hidden;
}

.sub-traffic-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--f7-theme-color, #0a84ff);
  transition: width 0.3s ease;
}

.sub-card-status {
  flex-shrink: 0;
}

.sub-card-status .badge {
  font-size: 11px;
  padding: 4px 8px;
}

.sub-card-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--app-divider);
}

.sub-card-section--compact {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.sub-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 8px;
}

.sub-card-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--app-fill-1);
  min-width: 0;
}

.sub-url-text {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-card-url .link.icon-only {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.15);
  color: var(--f7-theme-color, #0a84ff);
}

.sub-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.sub-card-actions .button {
  margin: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
}

.sub-card-actions .button .icon {
  font-size: 17px;
}

.happ-import-btn {
  --f7-button-border-color: rgba(48, 209, 88, 0.45);
  color: #30d158;
}

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

.sub-card-empty {
  font-size: 14px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--app-divider);
  text-align: center;
}

.sub-card-footer .link {
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sub-card-footer .icon {
  font-size: 14px;
}

.ref-link-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
}

.price-old {
  text-decoration: line-through;
  opacity: 0.6;
  margin-right: 6px;
}

/* ===== Prices ===== */
.prices-wrap {
  padding-bottom: 8px;
}

.prices-discount {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.25);
}

.prices-discount-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
}

.prices-discount-icon .icon {
  font-size: 20px;
}

.prices-discount-title {
  font-size: 16px;
  font-weight: 600;
  color: #30d158;
  line-height: 1.2;
}

.prices-discount-sub {
  font-size: 13px;
  opacity: 0.65;
  margin-top: 2px;
}

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

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px 14px;
  border-radius: 16px;
  background: var(--app-fill-1);
  border: 1px solid var(--app-divider);
  overflow: hidden;
}

.price-card--clickable {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.price-card--clickable:active {
  transform: scale(0.98);
  background: var(--app-fill-5);
}

.price-card-action {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--f7-theme-color, #0a84ff);
}

.price-card--best .price-card-action {
  position: static;
  margin-top: 0;
  margin-left: auto;
}

.price-card--best {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 16px 18px;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.12);
  border-color: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.35);
}

.price-card-ribbon {
  position: absolute;
  top: 10px;
  right: -28px;
  transform: rotate(45deg);
  background: var(--f7-theme-color, #0a84ff);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 32px;
}

.price-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.price-card--best .price-card-top {
  flex-direction: row;
  align-items: center;
  margin-bottom: 0;
  gap: 10px;
}

.price-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-fill-4);
  color: var(--f7-theme-color, #0a84ff);
}

.price-card--best .price-card-icon {
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.2);
}

.price-card-icon .icon {
  font-size: 18px;
}

.price-card-period {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.price-card--best .price-card-period {
  font-size: 16px;
}

.price-card-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.price-card--best .price-card-price {
  align-items: flex-end;
}

.price-card-old {
  font-size: 13px;
  text-decoration: line-through;
  opacity: 0.5;
}

.price-card-amount {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--f7-theme-color, #0a84ff);
}

.price-card--best .price-card-amount {
  font-size: 32px;
}

.price-card-currency {
  font-size: 16px;
  font-weight: 600;
  margin-left: 2px;
}

.price-card-per {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.6;
}

.price-card--best .price-card-per {
  margin-top: 4px;
  text-align: right;
}

.price-card-save {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
}

.price-card--best .price-card-save {
  margin-top: 0;
  position: absolute;
  bottom: 14px;
  left: 18px;
}

.prices-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.55;
  text-align: center;
}

.prices-note .icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== Checkout sheet ===== */
.checkout-sheet {
  --f7-sheet-height: auto;
  max-height: var(--sheet-max-height);
}

.checkout-sheet .sheet-modal-inner {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: var(--sheet-max-height);
  overflow: hidden;
  background: var(--f7-sheet-bg-color);
}

.checkout-sheet.input-focused,
.checkout-sheet.keyboard-open {
  transform: none !important;
  max-height: var(--checkout-height, 88dvh);
}

.checkout-sheet.input-focused .sheet-modal-inner,
.checkout-sheet.keyboard-open .sheet-modal-inner {
  max-height: var(--checkout-height, 88dvh);
}

.checkout-sheet.input-focused .checkout-sheet-footer,
.checkout-sheet.keyboard-open .checkout-sheet-footer {
  display: none;
}

.checkout-sheet.input-focused .checkout-sheet-body,
.checkout-sheet.keyboard-open .checkout-sheet-body {
  max-height: calc(var(--checkout-height, 100dvh) - 56px);
  padding-bottom: 16px;
}

.checkout-sheet input,
.trial-sheet input {
  font-size: 16px;
}

/* Desktop / мышь: не ломаем layout шторки при фокусе на input */
@media (pointer: fine) {
  .checkout-sheet.input-focused,
  .checkout-sheet.keyboard-open,
  .trial-sheet.input-focused,
  .trial-sheet.keyboard-open {
    transform: translate3d(0, 0, 0) !important;
    max-height: var(--sheet-max-height);
  }

  .checkout-sheet.input-focused .sheet-modal-inner,
  .checkout-sheet.keyboard-open .sheet-modal-inner,
  .trial-sheet.input-focused .sheet-modal-inner,
  .trial-sheet.keyboard-open .sheet-modal-inner {
    max-height: var(--sheet-max-height);
  }

  .checkout-sheet.input-focused .checkout-sheet-footer,
  .checkout-sheet.keyboard-open .checkout-sheet-footer,
  .trial-sheet.input-focused .checkout-sheet-footer,
  .trial-sheet.keyboard-open .checkout-sheet-footer {
    display: block !important;
  }

  .checkout-sheet.input-focused .checkout-sheet-body,
  .checkout-sheet.keyboard-open .checkout-sheet-body {
    max-height: none;
    padding-bottom: 8px;
  }

  .checkout-sheet .item-input-wrap input,
  .trial-sheet .item-input-wrap input {
    pointer-events: auto;
    position: relative;
    z-index: 2;
  }
}

html.desktop-pointer .checkout-sheet.input-focused .checkout-sheet-footer,
html.desktop-pointer .checkout-sheet.keyboard-open .checkout-sheet-footer {
  display: block !important;
}

.checkout-sheet-header {
  flex-shrink: 0;
  padding: 8px 16px 12px;
  text-align: center;
}

.checkout-grabber {
  width: 36px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: var(--app-grabber);
}

.checkout-sheet-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.checkout-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 0 16px;
}

.checkout-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.checkout-card-actions .checkout-pay-btn {
  margin-bottom: 0;
}

.checkout-sheet-footer {
  flex-shrink: 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + var(--checkout-safe-bottom, 0px) + 12px);
  border-top: 1px solid var(--app-divider);
  background: var(--app-sheet-footer-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.checkout-sheet-footer .checkout-pay-btn:last-child {
  margin-bottom: 0;
}

.checkout-sheet-footer .checkout-hint {
  margin-bottom: 0;
}

.checkout-check-block {
  margin-top: 8px;
}

.checkout-summary {
  background: var(--app-fill-1);
  border-radius: 14px;
  padding: 14px 16px;
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.checkout-row--amount {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--app-divider);
}

.checkout-label {
  font-size: 14px;
  opacity: 0.65;
}

.checkout-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.checkout-amount {
  font-size: 22px;
  color: var(--f7-theme-color, #0a84ff);
}

.checkout-discount {
  margin-top: 8px;
  font-size: 12px;
  color: #30d158;
}

.checkout-stars-btn {
  --f7-button-bg-color: #ffd60a;
  --f7-button-text-color: #1c1c1e;
  --f7-button-pressed-bg-color: #e6c009;
}

html.dark .checkout-stars-btn {
  --f7-button-text-color: #1c1c1e;
}

.price-card-stars {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.checkout-pay-btn {
  margin-bottom: 10px;
}

.checkout-pay-btn .icon {
  margin-right: 6px;
}

.checkout-hint {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.55;
  text-align: center;
  line-height: 1.4;
}

.checkout-status-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.12);
  font-size: 13px;
  line-height: 1.45;
}

.checkout-status-box .icon {
  font-size: 22px;
  color: var(--f7-theme-color, #0a84ff);
  flex-shrink: 0;
}

.checkout-status-box p {
  margin: 0;
}

/* ===== Onboarding ===== */
.onboarding-card {
  text-align: center;
  padding: 20px 16px 18px;
  background: linear-gradient(180deg, rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.14) 0%, var(--app-gradient-end) 100%);
  border: 1px solid rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.22);
  border-radius: 18px;
}

.onboarding-card--compact {
  text-align: left;
  padding: 16px;
}

.onboarding-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.18);
  color: var(--f7-theme-color, #0a84ff);
}

.onboarding-card--compact .onboarding-icon {
  display: none;
}

.onboarding-icon .icon {
  font-size: 26px;
}

.onboarding-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.onboarding-subtitle {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.45;
  margin-bottom: 16px;
}

.onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding-actions--row {
  flex-direction: row;
}

.onboarding-actions--row .button {
  flex: 1;
}

.onboarding-btn .icon {
  margin-right: 6px;
}

.trial-sheet {
  --f7-sheet-height: auto;
  max-height: min(72vh, var(--sheet-max-height));
}

.trial-sheet.input-focused,
.trial-sheet.keyboard-open {
  transform: none !important;
  max-height: var(--checkout-height, 72vh);
}

.trial-sheet.input-focused .checkout-sheet-footer,
.trial-sheet.keyboard-open .checkout-sheet-footer {
  display: none;
}

.trial-question {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0;
}

.trial-attempts {
  font-size: 13px;
  opacity: 0.55;
}

.trial-intro p {
  margin: 0;
  line-height: 1.45;
  opacity: 0.8;
}

/* ===== Instructions ===== */
.instruction-intro p {
  margin: 0;
  line-height: 1.45;
  opacity: 0.75;
}

.instruction-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.instruction-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-fill-4);
  flex-shrink: 0;
}

.instruction-detail-icon .icon {
  font-size: 24px;
}

.instruction-detail-title {
  font-size: 20px;
  font-weight: 700;
}

.instruction-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.instruction-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.instruction-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--f7-theme-color-rgb, 10, 132, 255), 0.18);
  color: var(--f7-theme-color, #0a84ff);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.instruction-step-body {
  flex: 1;
  min-width: 0;
}

.instruction-step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.instruction-step-text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.78;
}

.instruction-step-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--app-fill-3);
}

.instruction-step-action {
  margin-top: 4px;
}

.instruction-footer-hint {
  text-align: center;
  padding-bottom: 16px;
}

/* ===== FAQ ===== */
.faq-intro p {
  margin: 0;
  line-height: 1.45;
  opacity: 0.75;
}

.faq-list .item-title {
  font-size: 15px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.35;
}

.faq-answer {
  padding-top: 4px;
  padding-bottom: 12px;
}

.faq-answer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.85;
}

.faq-footer-hint {
  text-align: center;
  padding: 8px 16px 20px;
  font-size: 13px;
  opacity: 0.7;
}

.faq-footer-hint .link {
  font-size: 13px;
}

/* ===== Skeleton Elements ===== */
.skeleton-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-head-body {
  flex: 1;
  min-width: 0;
}

.skeleton-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.skeleton-prices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.skeleton-card .card-content {
  pointer-events: none;
}

.skeleton-list .item-content {
  pointer-events: none;
}

.skeleton-greeting .skeleton-block:last-child {
  margin-bottom: 0;
}

.skeleton-intro .skeleton-block:last-child {
  margin-bottom: 0;
}

.block-title-large .skeleton-text {
  font-size: 28px;
  line-height: 1.15;
}

.color-teal { color: #64d2ff; }
.color-gray { color: #8e8e93; }

/* ===== Small screens (iPhone mini, SE, Telegram WebView) ===== */
html.compact-screen {
  --content-inset-x: 12px;
  --sheet-max-height: min(94dvh, var(--checkout-height, var(--app-height, 100dvh)));
  --f7-tabbar-icons-height: 72px;
  --f7-tabbar-icon-size: 24px;
  --f7-tabbar-label-font-size: 11px;
  --f7-block-title-large-font-size: 20px;
  --f7-button-large-height: 44px;
  --f7-button-large-font-size: 15px;
  --f7-navbar-title-font-size: 16px;
  --f7-block-margin-vertical: 12px;
  --f7-list-margin-vertical: 12px;
}

html.compact-screen .block.inset,
html.compact-screen .list.inset,
html.compact-screen .card.inset {
  margin-left: var(--content-inset-x);
  margin-right: var(--content-inset-x);
}

html.compact-screen .block-title {
  padding-left: calc(var(--content-inset-x) + 4px);
  padding-right: calc(var(--content-inset-x) + 4px);
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 14px;
}

html.compact-screen .block.block-strong.inset {
  padding: 12px;
}

html.compact-screen .block.block-strong.inset > p {
  margin: 0;
  font-size: 14px;
}

html.compact-screen .sub-card .card-content,
html.compact-screen .servers-card .card-content {
  padding: 12px;
}

html.compact-screen .sub-card-stats {
  gap: 8px;
}

html.compact-screen .sub-card-stat {
  padding: 8px 10px;
}

html.compact-screen .sub-card-head {
  gap: 10px;
}

html.compact-screen .sub-card-icon,
html.compact-screen .servers-head-icon {
  width: 40px;
  height: 40px;
}

html.compact-screen .sub-card-email {
  font-size: 15px;
}

html.compact-screen .sub-card-actions .button {
  min-height: 38px;
  font-size: 13px;
}

html.compact-screen .prices-discount {
  padding: 12px;
  gap: 10px;
}

html.compact-screen .price-card {
  padding: 14px 10px 12px;
}

html.compact-screen .price-card-amount {
  font-size: 24px;
}

html.compact-screen .price-card--best .price-card-amount {
  font-size: 28px;
}

html.compact-screen .price-card--best {
  padding: 14px;
}

html.compact-screen .onboarding-card {
  padding: 14px 12px 12px;
}

html.compact-screen .onboarding-title {
  font-size: 16px;
}

html.compact-screen .onboarding-subtitle {
  font-size: 13px;
  margin-bottom: 12px;
}

html.compact-width .onboarding-actions--row {
  flex-direction: column;
}

html.compact-width .row .col-50 {
  width: 100%;
}

html.compact-screen .checkout-sheet-header {
  padding: 6px 12px 8px;
}

html.compact-screen .checkout-grabber {
  margin-bottom: 8px;
}

html.compact-screen .checkout-sheet-title {
  font-size: 16px;
}

html.compact-screen .checkout-sheet-footer {
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + var(--checkout-safe-bottom, 0px) + 10px);
}

html.compact-screen .checkout-summary {
  padding: 12px;
}

html.compact-screen .checkout-amount {
  font-size: 20px;
}

html.compact-screen .checkout-pay-btn {
  margin-bottom: 8px;
}

html.compact-screen .checkout-hint {
  font-size: 11px;
}

html.compact-screen .trial-question {
  font-size: 28px;
}

html.compact-screen .instruction-detail-head {
  padding: 12px;
  gap: 10px;
}

html.compact-screen .instruction-detail-icon {
  width: 42px;
  height: 42px;
}

html.compact-screen .instruction-detail-title {
  font-size: 18px;
}

html.compact-screen .instruction-steps {
  gap: 12px;
}

html.compact-screen .instruction-step-title {
  font-size: 15px;
}

html.compact-screen .instruction-step-text {
  font-size: 13px;
}

html.compact-width .prices-grid,
html.compact-width .sub-card-stats,
html.compact-width .sub-card-actions,
html.compact-width .servers-grid-2 {
  grid-template-columns: 1fr;
}

html.compact-width .price-card--best {
  flex-direction: column;
  text-align: center;
}

html.compact-width .price-card--best .price-card-top,
html.compact-width .price-card--best .price-card-price {
  align-items: center;
}

html.compact-width .price-card--best .price-card-save {
  position: static;
  margin-top: 8px;
}

@media (max-width: 390px) {
  html:not(.compact-width) .prices-grid,
  html:not(.compact-width) .sub-card-stats,
  html:not(.compact-width) .sub-card-actions,
  html:not(.compact-width) .servers-grid-2 {
    grid-template-columns: 1fr;
  }
}

.push-settings-wrap {
  margin-top: 8px;
}

.push-settings-block {
  margin: 8px 16px 12px;
}

.push-settings-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.push-settings-title .icon {
  font-size: 20px;
  color: var(--f7-theme-color, #0a84ff);
}

.push-settings-hint {
  margin: 0 0 14px;
  font-size: 14px;
  opacity: 0.65;
  line-height: 1.45;
}

.push-settings-actions {
  display: flex;
  gap: 10px;
}

.push-settings-actions .button {
  flex: 1;
  margin: 0;
}

.push-settings-list-item .item-content {
  align-items: center;
}

.push-settings-list-actions .button {
  margin: 0;
}
