:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f5f7fa;
  --surface-strong: #e9edf3;
  --text: #121927;
  --text-soft: #667085;
  --text-faint: #8b95a7;
  --border: #dfe4eb;
  --border-strong: #c9d0da;
  --primary: #145cf5;
  --primary-hover: #0b4fdc;
  --primary-soft: #eaf1ff;
  --success: #087a46;
  --success-soft: #e9f8f0;
  --danger: #c73737;
  --danger-soft: #fff0f0;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 5%), 0 8px 28px rgb(15 23 42 / 5%);
  --shadow-lg: 0 20px 60px rgb(15 23 42 / 15%);
  --radius: 8px;
  --header-h: 68px;
  --container: 1180px;
  --content: 780px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1119;
  --surface: #141a24;
  --surface-muted: #1a2230;
  --surface-strong: #242e3d;
  --text: #f7f9fc;
  --text-soft: #aab4c4;
  --text-faint: #7e899b;
  --border: #293446;
  --border-strong: #3b4759;
  --primary: #2563eb;
  --primary-hover: #3b74f2;
  --primary-soft: #172b55;
  --success: #38c783;
  --success-soft: #123925;
  --danger: #ff7777;
  --danger-soft: #431f25;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 20%), 0 8px 28px rgb(0 0 0 / 18%);
  --shadow-lg: 0 20px 60px rgb(0 0 0 / 45%);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-150%); padding: 10px 14px; border-radius: var(--radius); background: var(--text); color: var(--bg); text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 75%, transparent); outline-offset: 3px; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); }
.site-header:has(.preview-banner) { height: auto; }
.preview-banner { min-height: 32px; display: grid; place-items: center; padding: 6px 16px; border-top: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 680; text-align: center; }
.header-inner { width: min(var(--container), calc(100% - 40px)); height: 100%; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.header-inner:has(.back-button) { grid-template-columns: 44px minmax(0, 1fr) auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; width: max-content; color: var(--text); font-size: 20px; font-weight: 730; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; background: var(--primary); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%); }
.brand-mark::before { content: ""; width: 17px; height: 21px; border: 2px solid #fff; border-radius: 3px; }
.brand-mark span { position: absolute; width: 7px; height: 2px; margin-top: 15px; border-radius: 2px; background: #fff; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 650; text-decoration: none; }
.recovery-destination { margin: -4px 0 18px; font-size: 14px; }
.compact-selects { display: flex; align-items: center; border-left: 1px solid var(--border); padding-left: 12px; }
.header-select { min-height: 44px; appearance: none; border: 0; background: transparent; color: var(--text); padding: 0 22px 0 10px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%), linear-gradient(135deg, var(--text-soft) 50%, transparent 50%); background-position: calc(100% - 10px) 19px, calc(100% - 5px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--surface-muted); }
.back-button { margin-left: -10px; }
.icon { flex: 0 0 auto; }

.network-status { position: fixed; z-index: 80; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 14px; border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 650; }
.network-status--online { background: var(--success); color: #fff; }
.main { flex: 1 0 auto; width: 100%; }
.page { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; padding: 52px 0 72px; }
.page h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: 0; }
.page h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.page p { color: var(--text-soft); }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.compatibility-link { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--primary); display: inline-flex; align-items: center; gap: 8px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.search-field { min-height: 58px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 40px; align-items: center; gap: 12px; padding: 0 10px 0 18px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-soft); box-shadow: var(--shadow-sm); }
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.search-field input { min-width: 0; height: 54px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 18px; }
.search-field input::placeholder { color: var(--text-faint); }
.clear-search { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-soft); cursor: pointer; }
.catalog-content { margin-top: 42px; }
.catalog-section + .catalog-section { margin-top: 42px; }
.catalog-section h2 { margin-bottom: 12px; color: var(--text-soft); font-size: 14px; font-weight: 720; text-transform: uppercase; }
.country-list { border-top: 1px solid var(--border); }
.country-row { min-height: 72px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 24px; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; transition: background 160ms ease, padding 160ms ease; }
.country-row:hover { margin-inline: -10px; padding-inline: 10px; background: var(--surface-muted); }
.country-name { min-width: 0; font-size: 18px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-price { color: var(--text-soft); font-size: 14px; white-space: nowrap; }
.flag { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: var(--surface-muted); box-shadow: 0 0 0 1px var(--border), 0 4px 12px rgb(15 23 42 / 10%); }
.flag img { width: 100%; height: 100%; object-fit: cover; }
.flag--sm { width: 32px; height: 32px; }
.flag--md { width: 44px; height: 44px; }
.flag--lg { width: 64px; height: 64px; }
.flag--xl { width: 78px; height: 78px; }
.load-more { margin: 20px auto 0; }
.load-sentinel { display: block; height: 1px; }
.stale-note { display: inline-flex; margin-bottom: 14px; padding: 6px 9px; border-radius: 6px; background: var(--surface-muted); color: var(--text-soft); font-size: 13px; }
.empty-inline { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; border-top: 1px solid var(--border); }
.empty-inline p { margin: 0; }

.country-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.country-heading h1 { font-size: 36px; }
.country-heading p { max-width: 580px; margin: 5px 0 0; }
.page--plans > .compatibility-link { margin-left: 82px; }
.plans-list { margin-top: 34px; border-top: 1px solid var(--border); }
.plan-row { min-height: 94px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); }
.plan-main { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 5px 18px; min-width: 0; }
.plan-main strong { grid-row: 1 / span 2; font-size: 21px; }
.plan-main span { color: var(--text-soft); }
.plan-main em { color: var(--success); font-size: 13px; font-style: normal; font-weight: 680; }
.plan-choose { min-height: 52px; min-width: 150px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border: 0; background: transparent; color: var(--primary); font-size: 18px; font-weight: 720; cursor: pointer; }
.plan-choose.is-loading { opacity: .6; }
.factual-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; font-size: 14px; }

.button { min-height: 48px; min-width: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius); font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button--primary { background: var(--primary); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--primary-hover); }
.button--secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.button--quiet { border-color: transparent; background: transparent; color: var(--primary); }
.text-button { min-height: 44px; border: 0; padding: 0; background: transparent; color: var(--primary); font-weight: 650; cursor: pointer; }
.text-button--center { display: block; margin: 6px auto 0; }

.page--checkout { width: min(var(--container), calc(100% - 40px)); padding-top: 34px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 48px; align-items: start; }
.checkout-content { min-width: 0; }
.checkout-heading { margin-bottom: 18px; }
.checkout-heading > h1 { margin: 0; font-size: 32px; font-weight: 760; }
.checkout-plan-mobile { display: none; }
.form-row { width: 100%; min-height: 56px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 20px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; }
.form-row-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.form-row-icon--success { background: var(--success-soft); color: var(--success); }
.form-section { margin-top: 28px; }
.section-label { margin-bottom: 10px; }
.section-label h2 { font-size: 16px; }
.section-label p { margin: 2px 0 0; font-size: 13px; }
.field-group { position: relative; }
.field-group label { position: absolute; top: 8px; left: 14px; color: var(--text-soft); font-size: 12px; }
.field-group input { width: 100%; height: 58px; padding: 22px 14px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); outline: 0; }
.field-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.field-action { position: absolute; top: 7px; right: 7px; height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 700; cursor: pointer; }
.verified-row { min-height: 60px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--success) 40%, var(--border)); border-radius: var(--radius); background: var(--success-soft); color: var(--success); }
.verified-row > div { display: flex; flex-direction: column; }
.verified-row small { color: var(--text-soft); }
.otp-form { margin-top: 14px; }
.otp-form > label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 650; }
.otp-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.otp-line input { min-width: 0; height: 50px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 20px; font-weight: 700; letter-spacing: 7px; }
.inline-error { margin: 8px 0 0; color: var(--danger) !important; font-size: 13px; }
.inline-success { margin: 8px 0 0; color: var(--success) !important; font-size: 13px; }
.inline-note, .locked-note { min-height: 52px; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-muted); color: var(--text-soft); }
.promo-disclosure { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--radius); }
.promo-disclosure summary { min-height: 54px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 20px; align-items: center; gap: 10px; padding: 0 14px; cursor: pointer; list-style: none; }
.promo-disclosure summary::-webkit-details-marker { display: none; }
.promo-disclosure[open] summary .icon:last-child { transform: rotate(90deg); }
.promo-disclosure form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 0 14px 14px; }
.promo-disclosure input { min-width: 0; height: 48px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); text-transform: uppercase; }
.promo-disclosure > p { padding: 0 14px 12px; }
.promo-applied { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 14px; }
.promo-applied > span { display: inline-flex; align-items: center; gap: 8px; color: var(--success); }
.payment-methods { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.payment-method { min-height: 68px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 24px; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.payment-method:last-child { border-bottom: 0; }
.payment-method:hover, .payment-method.is-selected { background: var(--surface-muted); }
.payment-method:has(input:focus-visible), .topup-plan:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent); outline-offset: -3px; }
.payment-method input { position: absolute; opacity: 0; pointer-events: none; }
.payment-method > span:nth-of-type(2) { display: flex; flex-direction: column; }
.payment-method small { color: var(--text-soft); }
.payment-method i { width: 22px; height: 22px; border: 2px solid var(--border-strong); border-radius: 50%; }
.payment-method.is-selected i { border: 6px solid var(--primary); }
.payment-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 800; }
.payment-logo img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: inherit; }
.checkout-trust { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; color: var(--success); }
.checkout-trust p { margin: 0; color: var(--text-soft); font-size: 14px; }
.checkout-summary { position: sticky; top: calc(var(--header-h) + 24px); padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.summary-plan { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.summary-plan > div { display: flex; flex-direction: column; gap: 3px; }
.summary-plan span { color: var(--text-soft); }
.summary-plan strong { font-size: 19px; }
.price-breakdown { margin: 20px 0; }
.price-breakdown > div { display: flex; justify-content: space-between; gap: 18px; margin-top: 10px; }
.price-breakdown dt { color: var(--text-soft); }
.price-breakdown dd { margin: 0; font-weight: 650; text-align: right; }
.discount-line dd { color: var(--success); }
.price-breakdown .price-total { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.price-total dt, .price-total dd { color: var(--text); font-size: 20px; font-weight: 760; }
.checkout-summary > .button { width: 100%; }
.legal-line { margin: 12px 0 0; color: var(--text-faint) !important; font-size: 12px; text-align: center; }
.summary-links { display: flex; justify-content: space-between; margin-top: 14px; }
.summary-links a { color: var(--primary); font-size: 13px; }
.mobile-summary, .mobile-sticky { display: none; }

.page--status { max-width: 620px; }
.status-plan { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.status-plan > div { display: flex; flex-direction: column; }
.status-plan span { color: var(--text-soft); }
.status-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.status-card h1 { font-size: 30px; }
.timeline { position: relative; margin: 30px 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 1px; background: var(--border-strong); }
.timeline li { position: relative; min-height: 76px; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 15px; }
.timeline li > span { z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--text-soft); font-weight: 650; }
.timeline li.is-complete > span { border-color: var(--success); background: var(--success); color: #fff; }
.timeline li.is-active > span { border: 8px solid var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline li > div { padding-top: 6px; display: flex; flex-direction: column; }
.timeline small { color: var(--text-soft); }
.status-safe { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--surface-muted); font-size: 14px; }
.status-safe > span { display: flex; flex-direction: column; gap: 2px; }
.status-safe small { color: var(--text-soft); }
.last-check { display: flex; align-items: center; gap: 7px; margin: 18px 0; font-size: 13px; }
.status-actions { display: grid; gap: 10px; }

.orders-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.filter-tabs { display: flex; gap: 4px; margin-bottom: 22px; padding: 4px; overflow-x: auto; border-radius: var(--radius); background: var(--surface-muted); }
.filter-tabs button { min-height: 42px; flex: 1 0 auto; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--text-soft); cursor: pointer; }
.filter-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 700; }
.orders-list { border-top: 1px solid var(--border); }
.order-row { min-height: 112px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 24px; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.order-row-main { min-width: 0; }
.order-row-main > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-row-main strong { font-size: 18px; }
.order-row-main p { margin: 5px 0 1px; color: var(--text); }
.order-row-main small { color: var(--text-soft); }
.status-label { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 9px; border-radius: 6px; background: var(--surface-muted); color: var(--text-soft); font-size: 13px; font-weight: 680; white-space: nowrap; }
.status-label--success { background: var(--success-soft); color: var(--success); }
.status-label--ready { background: var(--primary-soft); color: var(--primary); }

.page--order { max-width: 720px; }
.order-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.order-hero h1 { font-size: 36px; }
.order-hero p { margin: 8px 0 0; color: var(--text); font-size: 20px; font-weight: 650; }
.order-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); }
.order-facts > div { padding: 16px; display: flex; flex-direction: column; background: var(--surface); }
.order-facts span, .usage-grid span { color: var(--text-soft); font-size: 13px; }
.order-facts strong { margin-top: 3px; word-break: break-word; }
.usage-section, .install-section, .order-support, .topup-promo, .telegram-link-card { margin-top: 20px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin-top: 3px; font-size: 26px; }
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.usage-grid > div { padding: 14px 0; display: flex; flex-direction: column; }
.usage-section > small { display: block; margin-top: 12px; color: var(--text-soft); }
.install-section { display: grid; gap: 10px; }
.install-section h2 { margin-bottom: 6px; }
.activation-panel { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.activation-panel h3 { margin: 0 0 14px; }
.transfer-panel { display: grid; justify-items: center; gap: 12px; text-align: center; }
.transfer-panel p { margin: 0; color: var(--text-soft); }
.transfer-panel .activation-qr { width: min(100%, 280px); }
.transfer-panel .button { width: min(100%, 360px); }
.activation-qr { width: min(300px, 100%); aspect-ratio: 1; margin: 0 auto 16px; border: 12px solid #fff; border-radius: 6px; }
.secret-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 10px 10px 10px 13px; border-radius: var(--radius); background: var(--surface-muted); }
.secret-row code { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-size: 13px; }
.order-support { display: flex; align-items: center; justify-content: space-between; }
.order-support > div { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.topup-promo { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topup-promo > div { display: flex; align-items: center; gap: 12px; }
.topup-promo span { display: flex; flex-direction: column; }
.topup-promo small { margin-top: 3px; color: var(--text-soft); }
.telegram-link-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.telegram-link-card > div { display: flex; align-items: center; gap: 12px; }
.telegram-link-card span { display: flex; flex-direction: column; }
.telegram-link-card small { margin-top: 3px; color: var(--text-soft); }
.telegram-link-card > .inline-error { grid-column: 1 / -1; }
.topup-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.topup-heading h1 { margin: 0; font-size: 38px; }
.topup-heading p { margin: 4px 0 0; color: var(--text-soft); }
.topup-stage, .topup-history { margin-top: 20px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.topup-stage > h2, .topup-history > h2 { margin: 0 0 16px; font-size: 20px; }
.topup-stage > .button { width: 100%; margin-top: 18px; }
.topup-plans { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.topup-plan { min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.topup-plan:last-child { border-bottom: 0; }
.topup-plan:hover, .topup-plan.is-selected { background: var(--surface-muted); }
.topup-plan input { position: absolute; opacity: 0; pointer-events: none; }
.topup-plan span { display: flex; flex-direction: column; }
.topup-plan strong { font-size: 18px; }
.topup-plan small, .topup-history-row small { color: var(--text-soft); }
.topup-plan b { color: var(--primary); white-space: nowrap; }
.topup-plan i { width: 22px; height: 22px; border: 2px solid var(--border-strong); border-radius: 50%; }
.topup-plan.is-selected i { border: 6px solid var(--primary); }
.topup-history-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); }
.topup-history-row > span { display: flex; flex-direction: column; }
.topup-history-row > span:last-child { align-items: end; text-align: right; }

.page--recover { max-width: 520px; }
.recover-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.recover-card h1 { margin-top: 16px; font-size: 34px; }
.recover-card form { display: grid; gap: 10px; margin-top: 24px; }
.recover-card label, .support-form label { font-size: 14px; font-weight: 680; }
.recover-card input, .support-form select, .support-form textarea { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.support-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.support-heading h1 { font-size: 38px; }
.support-heading p { margin: 2px 0 0; }
.support-form { max-width: 640px; display: grid; gap: 10px; }
.support-form textarea { resize: vertical; }
.support-create, .support-history { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.support-create h2, .support-history h2 { margin: 0 0 18px; font-size: 21px; }
.state-inline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border-radius: var(--radius); background: var(--danger-soft); }
.state-inline p { margin: 0; color: var(--danger); }
.support-history { margin-top: 20px; }
.support-ticket { border-top: 1px solid var(--border); }
.support-ticket.is-selected { margin-inline: -12px; padding-inline: 12px; border-radius: var(--radius); background: var(--primary-soft); }
.support-ticket:last-child { border-bottom: 1px solid var(--border); }
.support-ticket > summary { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.support-ticket > summary::-webkit-details-marker { display: none; }
.support-ticket > summary span { display: flex; flex-direction: column; min-width: 0; }
.support-ticket > summary small { color: var(--text-soft); }
.support-ticket > summary em { color: var(--text-soft); font-size: 13px; font-style: normal; white-space: nowrap; }
.support-ticket[open] > summary .icon { transform: rotate(90deg); }
.support-thread { display: grid; gap: 10px; padding: 6px 0 16px; }
.support-message { max-width: 82%; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-muted); }
.support-message.is-user { margin-left: auto; background: var(--primary-soft); }
.support-message header { display: flex; justify-content: space-between; gap: 16px; color: var(--text-soft); font-size: 12px; }
.support-message p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-reply { display: grid; gap: 8px; padding: 16px 0 20px; border-top: 1px solid var(--border); }
.support-reply textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); resize: vertical; }
.support-reply > div { display: flex; gap: 8px; }
.form-help { margin: -2px 0 10px; font-size: 13px; }
.success-state { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--success); }
.success-state h2 { color: var(--text); font-size: 28px; }

.legal-page { max-width: 760px; }
.legal-page > h1 { margin-bottom: 38px; }
.legal-page section { padding: 24px 0; border-top: 1px solid var(--border); }
.legal-page section h2 { font-size: 21px; }
.legal-page section p { max-width: 680px; margin: 9px 0 0; line-height: 1.7; }
.legal-updated { margin: 0 0 10px; font-size: 13px; }

.state-panel { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 16px; padding: 32px; text-align: center; }
.state-panel h1, .state-panel h2 { max-width: 500px; font-size: 28px; }
.state-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.skeleton-list { width: 100%; }
.skeleton-row { min-height: 76px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 90px; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); }
.skeleton-circle, .skeleton-lines i, .skeleton-short { display: block; background: linear-gradient(90deg, var(--surface-muted), var(--surface-strong), var(--surface-muted)); background-size: 220% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton-circle { width: 44px; height: 44px; border-radius: 50%; }
.skeleton-lines { display: grid; gap: 8px; }
.skeleton-lines i { width: min(260px, 75%); height: 14px; border-radius: 4px; }
.skeleton-lines i:last-child { width: min(160px, 45%); height: 10px; }
.skeleton-short { width: 80px; height: 14px; border-radius: 4px; }
@keyframes shimmer { to { background-position: -220% 0; } }

.overlay { position: fixed; inset: 0; z-index: 100; display: grid; align-items: end; justify-items: center; padding: 16px; }
.overlay-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(7 12 21 / 58%); backdrop-filter: blur(5px); }
.sheet { position: relative; z-index: 1; width: min(620px, 100%); max-height: min(760px, calc(100vh - 32px)); overflow: auto; padding: 14px 22px calc(24px + var(--safe-bottom)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); animation: sheet-in 220ms ease-out; }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 4px; background: var(--border-strong); }
.sheet-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.sheet-header h2 { margin: 0; font-size: 26px; }
.sheet-header p { margin: 4px 0 0; }
.search-field--compact { min-height: 50px; margin: 20px 0; grid-template-columns: 22px minmax(0, 1fr); }
.search-field--compact input { height: 46px; font-size: 16px; }
.device-groups { border-top: 1px solid var(--border); }
.device-groups details { border-bottom: 1px solid var(--border); }
.device-groups summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-weight: 700; }
.device-groups summary > span { display: inline-flex; align-items: center; gap: 8px; }
.device-groups summary small { min-width: 28px; padding: 3px 7px; border-radius: 999px; background: var(--surface-muted); color: var(--text-faint); font-size: 11px; line-height: 1; text-align: center; }
.device-groups summary::-webkit-details-marker { display: none; }
.device-groups details[open] summary .icon { transform: rotate(90deg); }
.device-group-note { margin: -2px 0 10px; color: var(--text-faint); font-size: 12px; line-height: 1.45; }
.device-groups ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin: 0; padding: 0 0 16px; color: var(--text-soft); list-style: none; }
.device-groups li { position: relative; padding: 5px 0 5px 18px; line-height: 1.35; }
.device-groups li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.device-empty { margin: 16px 0; padding: 16px; border-radius: var(--radius); background: var(--surface-muted); color: var(--text-soft); text-align: center; }
.compatibility-check { margin-top: 18px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); border-radius: var(--radius); background: var(--primary-soft); }
.compatibility-check strong { display: block; margin-bottom: 5px; }
.compatibility-check p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.sheet-note { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-muted); font-size: 13px; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }

.site-footer { border-top: 1px solid var(--border); background: var(--surface-muted); }
.footer-inner { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; padding: 36px 0; display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 28px; }
.footer-brand p { margin: 9px 0 0; font-size: 14px; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 26px; }
.footer-links a { color: var(--text-soft); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-meta { grid-column: 1 / -1; margin: 0; color: var(--text-faint); font-size: 13px; }
.toast-root { position: fixed; z-index: 140; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); text-align: center; font-weight: 650; }
.noscript { max-width: 560px; margin: 80px auto; padding: 24px; }

@media (max-width: 880px) {
  .checkout-layout { grid-template-columns: 1fr; gap: 0; }
  .checkout-summary { display: none; }
  .checkout-plan-mobile { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 2px; margin-top: 14px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .checkout-plan-mobile .flag { grid-column: 1; grid-row: 1 / span 2; }
  .checkout-plan-mobile strong { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .checkout-plan-mobile span { grid-column: 2; grid-row: 2; min-width: 0; color: var(--text-soft); font-size: 13px; white-space: nowrap; }
  .checkout-plan-mobile b { grid-column: 3; grid-row: 1 / span 2; color: var(--primary); }
  .mobile-summary { display: block; margin-top: 24px; }
  .mobile-sticky { display: block; margin-top: 18px; }
  .mobile-sticky .button { width: 100%; }
}

@media (max-width: 660px) {
  :root { --header-h: 62px; }
  .header-inner { width: calc(100% - 24px); gap: 8px; }
  .header-inner:has(.back-button) { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .brand { gap: 8px; font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-link span { display: none; }
  .header-link { width: 38px; justify-content: center; }
  .compact-selects { gap: 0; padding-left: 4px; }
  .header-select { width: 54px; padding-left: 5px; padding-right: 17px; font-size: 13px; }
  .back-button { width: 40px; height: 40px; margin-left: -8px; }
  .page, .page--checkout { width: calc(100% - 32px); padding: 34px 0 56px; }
  .page h1 { font-size: 34px; }
  .page-heading { display: block; margin-bottom: 20px; }
  .page-heading .compatibility-link { margin-top: 12px; }
  .search-field { min-height: 54px; padding-left: 14px; }
  .search-field input { height: 50px; font-size: 16px; }
  .catalog-content { margin-top: 30px; }
  .catalog-section + .catalog-section { margin-top: 34px; }
  .country-row { min-height: 68px; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 12px; }
  .country-row .flag { width: 40px; height: 40px; }
  .country-row .country-price { grid-column: 2; font-size: 12px; margin-top: -18px; }
  .country-row > .icon { grid-column: 3; grid-row: 1 / span 2; }
  .country-name { font-size: 17px; }
  .country-heading { align-items: start; }
  .country-heading .flag { width: 54px; height: 54px; }
  .country-heading h1 { font-size: 31px; }
  .country-heading p { font-size: 14px; }
  .page--plans > .compatibility-link { margin-left: 72px; }
  .plan-row { min-height: 88px; gap: 6px; }
  .plan-main { grid-template-columns: 1fr; gap: 1px; }
  .plan-main strong { grid-row: auto; font-size: 19px; }
  .plan-main span { font-size: 13px; }
  .plan-main em { font-size: 12px; }
  .plan-choose { min-width: 122px; font-size: 16px; gap: 3px; }
  .checkout-heading > h1 { font-size: 28px; }
  .mobile-sticky { margin-inline: 0; padding-inline: 0; }
  .field-group input { padding-right: 14px; }
  .field-action { display: none; }
  .otp-line { grid-template-columns: 1fr; }
  .otp-line .button { display: none; }
  .promo-disclosure form { grid-template-columns: 1fr; }
  .status-card { padding: 22px 18px; }
  .status-card h1 { font-size: 27px; }
  .orders-heading { align-items: start; }
  .orders-heading .button { min-width: 0; padding-inline: 12px; }
  .order-row { grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; }
  .order-row-main > div { display: block; }
  .order-row-main .status-label { margin-top: 4px; }
  .order-hero { align-items: start; }
  .order-hero .flag { width: 62px; height: 62px; }
  .order-hero h1 { font-size: 30px; }
  .order-facts, .usage-grid { grid-template-columns: 1fr; }
  .order-facts > div + div { border-top: 1px solid var(--border); }
  .usage-grid > div + div { border-top: 1px solid var(--border); }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading .button { width: 100%; }
  .usage-section, .install-section, .order-support, .topup-promo, .telegram-link-card, .topup-stage, .topup-history { padding: 18px; }
  .order-support { align-items: stretch; flex-direction: column; }
  .topup-promo { align-items: stretch; flex-direction: column; }
  .telegram-link-card { grid-template-columns: 1fr; }
  .topup-heading h1 { font-size: 31px; }
  .support-heading h1 { font-size: 32px; }
  .support-create, .support-history { padding: 18px; }
  .support-ticket > summary { grid-template-columns: minmax(0, 1fr) 20px; }
  .support-ticket > summary em { grid-column: 1 / -1; margin-top: -12px; }
  .support-message { max-width: 94%; }
  .footer-inner { width: calc(100% - 32px); grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-meta { grid-column: auto; }
  .sheet { padding-inline: 18px; }
  .sheet-header h2 { font-size: 23px; }
  .device-groups ul { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .brand > span:last-child { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
  .header-inner:has(.back-button) .brand > span:last-child { display: none; }
  .header-select { width: 48px; font-size: 12px; }
  .compact-selects { margin-right: -5px; }
  .page, .page--checkout { width: calc(100% - 24px); }
  .country-heading { gap: 12px; }
  .page--plans > .compatibility-link { margin-left: 0; }
  .plan-choose { min-width: 105px; font-size: 14px; }
  .payment-method { grid-template-columns: 38px minmax(0, 1fr) 22px; padding-inline: 10px; }
  .mobile-sticky { margin-inline: 0; padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .brand-mark, .payment-logo, .state-icon, .form-row-icon { forced-color-adjust: none; }
  .button, .search-field, input, select, textarea { border: 1px solid ButtonText; }
}
