/* Evil VPN — production layer над Evil UI System 03 (style.css + web.css).
   Убирает демо-обвязку и добавляет состояния, которых не было в макете. */

/* ── Flags (все страны сети) ─────────────────────────────────────────── */
.flag.f-nl { background: linear-gradient(#bb4653 33.33%, #f3f0e8 33.33% 66.66%, #435a8a 66.66%); }
.flag.f-de { background: linear-gradient(#222 33.33%, #b74743 33.33% 66.66%, #dbbf64 66.66%); }
.flag.f-fi { background: linear-gradient(90deg, transparent 29%, #4a6592 29% 45%, transparent 45%), linear-gradient(#eee 38%, #4a6592 38% 59%, #eee 59%); }
.flag.f-fr { background: linear-gradient(90deg, #405b8e 33%, #eee 33% 66%, #bd5353 66%); }
.flag.f-us { background: linear-gradient(#405b8e, #405b8e) 0 0 / 45% 54% no-repeat, repeating-linear-gradient(#b35458 0 4px, #eeede6 4px 8px); }
.flag.f-jp { background: radial-gradient(circle, #b94e5d 0 26%, #eeede8 28%); }
.flag.f-ru { background: linear-gradient(#f3f0e8 33.33%, #435a8a 33.33% 66.66%, #bb4653 66.66%); }
.flag.f-at { background: linear-gradient(#bb4653 33.33%, #f3f0e8 33.33% 66.66%, #bb4653 66.66%); }
.flag.f-se { background: linear-gradient(90deg, transparent 29%, #dbbf64 29% 45%, transparent 45%), linear-gradient(#3f6a9a 38%, #dbbf64 38% 59%, #3f6a9a 59%); }
.flag.f-ch { background: linear-gradient(#f3f0e8, #f3f0e8) center / 16% 56% no-repeat, linear-gradient(#f3f0e8, #f3f0e8) center / 56% 20% no-repeat, #bb4653; }
.flag.f-ae { background: linear-gradient(90deg, #bb4653 26%, transparent 26%), linear-gradient(#4f8a5b 33.33%, #f3f0e8 33.33% 66.66%, #222 66.66%); }
.flag.f-gb { background: linear-gradient(#bb4653, #bb4653) center / 14% 100% no-repeat, linear-gradient(#bb4653, #bb4653) center / 100% 18% no-repeat, linear-gradient(#f3f0e8, #f3f0e8) center / 26% 100% no-repeat, linear-gradient(#f3f0e8, #f3f0e8) center / 100% 32% no-repeat, #35508a; }
.flag.f-pl { background: linear-gradient(#f3f0e8 50%, #bb4653 50%); }
.flag.f-tr { background: radial-gradient(circle at 44% 50%, #bb4653 0 17%, transparent 18%), radial-gradient(circle at 40% 50%, #f3f0e8 0 24%, transparent 25%), #bb4653; }
.flag.f-kz { background: radial-gradient(circle, #dbbf64 0 20%, transparent 22%), #4aa3c9; }
.flag.f-ee { background: linear-gradient(#3f6a9a 33.33%, #222 33.33% 66.66%, #f3f0e8 66.66%); }
.flag.f-lv { background: linear-gradient(#8e3441 40%, #f3f0e8 40% 60%, #8e3441 60%); }
.flag.f-lt { background: linear-gradient(#dbbf64 33.33%, #4f8a5b 33.33% 66.66%, #bb4653 66.66%); }
.flag.f-es { background: linear-gradient(#b74743 25%, #dbbf64 25% 75%, #b74743 75%); }
.flag.f-it { background: linear-gradient(90deg, #4f8a5b 33%, #eee 33% 66%, #bd5353 66%); }
.flag.f-ca { background: radial-gradient(circle, #bb4653 0 16%, transparent 17%), linear-gradient(90deg, #bb4653 25%, #f3f0e8 25% 75%, #bb4653 75%); }
.flag.f-sg { background: linear-gradient(#bb4653 50%, #f3f0e8 50%); }
.flag.f-hk { background: radial-gradient(circle, #f3f0e8 0 20%, transparent 22%), #bb4653; }
.flag.f-ua { background: linear-gradient(#3f6a9a 50%, #dbbf64 50%); }
.flag.f-kr { background: radial-gradient(circle, #bb4653 0 18%, #3f6a9a 18% 24%, #f3f0e8 26%); }

/* ── Production shell ───────────────────────────────────────────────── */
body { min-height: 100vh; min-height: 100dvh; }
.boot { min-height: 60vh; display: grid; place-items: center; gap: 18px; color: var(--muted); }
.boot svg { width: 40px; height: 40px; color: var(--accent); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
#nav a { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 13px 15px; border-radius: 18px; font-size: 15px; }
#nav a:hover { background: var(--surface); }
.web-links a { color: var(--muted); font-size: 15px; padding: 10px 14px; border-radius: 14px; }
.web-links a:hover { color: var(--text); background: var(--surface); }
.muted-stat strong { opacity: 0.5; }
.stepper { display: flex; align-items: center; gap: 18px; background: var(--surface); border-radius: 18px; padding: 8px; width: fit-content; }
.stepper b { min-width: 34px; text-align: center; font-size: 22px; }
.stepper .iconbtn { background: var(--raised); font-size: 22px; line-height: 1; }
.app-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pair-wait { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 18px 0; }
.small-qr { max-width: 180px; margin: 18px auto 6px; }
.bubble small { display: block; margin-top: 6px; font-size: 11px; opacity: 0.6; }
.bubble { overflow-wrap: anywhere; }
.inline-notice .link { margin-left: auto; white-space: nowrap; }
.inline-notice { align-items: center; }
details summary { cursor: pointer; }
s { opacity: 0.6; }
.onboarding { min-height: calc(100vh - 120px); }

/* Web cabinet: карточка как в макете, без демо-панели */
body[data-surface="account"] .app { margin: 24px auto; }
body[data-surface="account"][data-auth="out"] #sidebar,
body[data-surface="account"][data-auth="out"] #bottomnav { display: none; }
body[data-surface="account"][data-auth="out"] .appbody { display: block; min-height: 0; }
body[data-surface="account"][data-auth="out"] #content { padding: 0; }
body[data-surface="account"] #nav button span,
body[data-surface="account"] #nav a span { line-height: 1.3; }
.web-head-actions .btn.secondary { min-height: 44px; padding: 10px 18px; font-size: 14px; border-radius: 14px; }

/* Telegram Mini App и нативные приложения: весь экран */
body[data-surface="telegram"],
body[data-surface="app"] { background: var(--bg); overflow: hidden; }
body[data-surface="telegram"] .app,
body[data-surface="app"] .app.android {
  width: 100%;
  max-width: none;
  height: var(--tg-viewport-stable-height, 100vh);
  height: var(--tg-viewport-stable-height, 100dvh);
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
body[data-surface="telegram"] .phonebar,
body[data-surface="app"] .phonebar { display: none !important; }
body[data-surface="telegram"] #content { padding: 18px 20px 28px; padding-top: calc(18px + var(--tg-content-safe-area-inset-top, 0px)); }
body[data-surface="telegram"] #bottomnav,
body[data-surface="app"] .android #bottomnav { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-inset-bottom, 0px)); }
body[data-surface="app"] .android #content { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
body[data-surface="app"] .app.mac { margin: 0; max-width: none; height: 100vh; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
body[data-surface="app"] .app.mac .appbody { flex: 1; min-height: 0; }
body[data-surface="app"] .app.mac .workspace { overflow: auto; }
body[data-surface="app"] .app.mac .macbar { -webkit-app-region: drag; padding-left: 86px; }
body[data-surface="app"] .app.mac .macbar .lights { display: none; }
body[data-surface="app"] .app.mac aside { padding-top: 22px; }
body[data-surface="app"] .is-guest .appbody,
body[data-surface="telegram"] .is-guest .appbody { display: block; }
body[data-surface="app"] .is-guest aside,
body[data-surface="app"] .is-guest #bottomnav { display: none !important; }
body[data-surface="app"] .is-guest #scroll { height: 100%; overflow: auto; }
body[data-surface="app"] .is-guest .auth-layout { min-height: 100%; }
@media (max-width: 700px) {
  body[data-surface="app"] .auth-layout .auth-art { display: none; }
}

/* На узком экране кабинет занимает всю ширину */
@media (max-width: 600px) {
  body[data-surface="account"] .app { margin: 0; width: 100%; border-radius: 0; }
  body[data-surface="account"] .app.mac #content { padding-bottom: 110px; }
}
@media (max-width: 850px) {
  body[data-surface="account"] .app.mac #bottomnav { position: fixed; left: 0; bottom: 0; width: 100%; z-index: 6; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Public site (index.php) ────────────────────────────────────────── */
body[data-surface="site"] .app { margin: 24px auto; }
body[data-surface="site"] .appbody { min-height: 0; }
.site-main { display: block; }
.web-header .btn { text-decoration: none; }
a.btn { text-decoration: none; }
.legal-body { max-width: 860px; line-height: 1.8; color: var(--muted); font-size: 16px; }
.legal-body h2 { color: var(--text); font-size: 26px; margin: 42px 0 14px; letter-spacing: -0.03em; }
.legal-body h3 { color: var(--text); font-size: 19px; margin: 26px 0 10px; }
.legal-body p, .legal-body li { margin: 0 0 12px; }
.legal-body ul, .legal-body ol { padding-left: 22px; }
.legal-body a { color: var(--accent); }
.download-card .meta { color: var(--subtle); font-size: 13px; margin-top: 10px; }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.review-grid article p { color: var(--muted); line-height: 1.7; margin: 14px 0 18px; }
.review-grid .stars { color: var(--accent); letter-spacing: 3px; }
.install-steps { counter-reset: s; display: grid; gap: 14px; margin-top: 18px; }
.install-steps li { list-style: none; background: var(--surface); border-radius: 22px; padding: 20px 22px 20px 64px; position: relative; line-height: 1.6; color: var(--muted); }
.install-steps li b { color: var(--text); display: block; margin-bottom: 4px; }
.install-steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--raised); color: var(--text); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.os-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.os-panel { display: none; }
.os-panel.on { display: block; }
.theme-toggle { display: grid; place-items: center; }
@media (max-width: 1000px) {
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body[data-surface="site"] .app { margin: 0; width: 100%; border-radius: 0; }
}
.mosaic { stroke: none; }
.web-art .mosaic { opacity: 0.22; }
.web-footer a { display: block; color: var(--muted); font-size: 14px; margin-top: 12px; }
.web-footer a:hover { color: var(--text); }
.web-footer .web-logo { margin: 0; color: var(--text); font-size: 34px; }
.lang-switch { font-size: 12px; font-weight: 600; color: var(--muted); }
@media (min-width: 1181px) { .price-grid.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .price-grid.n4 .web-price { font-size: 52px; } }
@media (min-width: 701px) and (max-width: 1180px) { .price-grid.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.web-art img { height: auto; }
.web-links .mobile-only { display: none; }
@media (max-width: 700px) {
  .web-head-actions .lang-switch, .web-head-actions .theme-toggle { display: none; }
  .web-links .mobile-only { display: block; }
}
@media (max-width: 480px) {
  .web-head-actions .btn.secondary { display: none; }
}
.is-welcome #bottomnav, .is-welcome aside { display: none !important; } .is-welcome .appbody { display: block; }
div.mosaic { background: var(--accent); -webkit-mask: url(assets/mosaic.svg) center / contain no-repeat; mask: url(assets/mosaic.svg) center / contain no-repeat; }
.web-final div.mosaic { position: absolute; }

/* ── 24.09 · правки владельца ───────────────────────────────────────── */
/* Орбита убрана везде */
.light-orbit { display: none !important; }

/* Логотип: персонаж Evil — белый на тёмной теме, чёрный на светлой */
.evil-mark {
  display: inline-block;
  flex: none;
  width: 1.05em;
  height: 1.05em;
  background: var(--text);
  -webkit-mask: url(assets/evil-mark.svg) center / contain no-repeat;
  mask: url(assets/evil-mark.svg) center / contain no-repeat;
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.web-logo { align-items: center; gap: 0; }
.web-logo i.evil-mark { width: 1em; height: 1em; margin: 0 0.24em 0 0; border-radius: 0; background: var(--text); align-self: center; transform: translateY(-0.04em); }
.web-logo span { margin-left: 0.12em; }
.web-logo:hover .evil-mark, .brand:hover .evil-mark { transform: translateY(-0.04em) rotate(-8deg) scale(1.06); }
.brand .evil-mark { width: 36px; height: 36px; margin-right: 10px; }
.brand span { margin-left: 4px; }

/* Mosaic (полутоновый растр) — во всех версиях */
.web-art .mosaic { opacity: 0.32; }
.hero-art, .onboarding, .auth-layout, .account-banner { position: relative; isolation: isolate; }
.hero-art .mosaic { position: absolute; width: 150%; height: 132%; left: -25%; top: -16%; z-index: -1; opacity: 0.3; }
.onboarding > .mosaic { position: absolute; width: min(560px, 120%); aspect-ratio: 520 / 440; left: 50%; top: 0; transform: translateX(-50%); z-index: -1; opacity: 0.26; }
.auth-layout > .mosaic,
.account-banner > .mosaic { position: absolute; z-index: -1; display: none; }
.account-banner > .mosaic { width: 360px; height: 310px; right: -110px; top: -60px; opacity: 0.2; }
.account-banner > div:first-of-type { position: relative; z-index: 1; }
@media (max-width: 1000px) {
  .auth-layout > .mosaic { display: block; width: 420px; height: 360px; right: -140px; top: -40px; opacity: 0.2; }
  .account-banner > .mosaic { display: block; }
}
@media (max-width: 700px) {
  .account-banner > .mosaic { width: 300px; height: 260px; right: -90px; top: -30px; }
}
.android .hero-art .mosaic, .telegram .hero-art .mosaic { width: 190%; height: 150%; left: -45%; top: -22%; opacity: 0.28; }
.web-hero .web-art .mosaic { opacity: 0.34; }

/* Локации на главной */
.home-locations .network-grid { margin-top: 0; }
.home-locations .network-grid .benefit { display: flex; flex-direction: column; gap: 0; }
.home-locations .network-grid h3 { margin: 18px 0 8px; }
.home-locations .network-grid .pill { margin-top: 16px; align-self: flex-start; }
.network-grid .benefit p { overflow-wrap: anywhere; }
.home-locations-more { display: flex; justify-content: center; margin-top: 32px; }
@media (min-width: 1181px) { .home-locations .network-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } }

/* Воздух: блоки и иконки с текстом не слипаются */
.hero-facts { flex-wrap: wrap; row-gap: 12px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts svg { flex: none; }
.btn svg, .link svg, .chip svg, .pill svg { flex: none; }
.btn { gap: 10px; }
.web-strip { flex-wrap: wrap; gap: 14px 32px; }
.web-footer a { line-height: 1.4; }
.plan-note, .inline-notice { gap: 12px; }
.plan-note svg, .inline-notice svg { flex: none; }
.row, .choice, .onboard-row { gap: 14px; }
.sectionhead { gap: 14px; flex-wrap: wrap; }
.surface + .surface, .columns + .surface, .surface + .columns { margin-top: 16px; }
.web-section-head { margin-bottom: 36px; }
.download-grid, .review-grid, .network-grid, .benefit-grid, .price-grid { row-gap: 16px; }
@media (max-width: 700px) {
  .web-strip { justify-content: flex-start; }
  .web-strip small { flex-basis: 100%; }
  .web-section-head { margin-bottom: 24px; }
  .web-steps > div { gap: 18px; }
}

/* ── Анимации появления ─────────────────────────────────────────────── */
@keyframes ev-up { from { opacity: 0; transform: translate3d(0, 28px, 0); } }
@keyframes ev-left { from { opacity: 0; transform: translate3d(-44px, 0, 0); } }
@keyframes ev-right { from { opacity: 0; transform: translate3d(44px, 0, 0); } }
@keyframes ev-zoom { from { opacity: 0; transform: scale(0.94); } }
@keyframes ev-blur { from { opacity: 0; filter: blur(10px); transform: translate3d(0, 12px, 0); } }

/* Сайт: элементы появляются при прокрутке (site.js ставит data-reveal) */
.js-reveal [data-reveal] { opacity: 0; transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16, 0.84, 0.24, 1), filter 0.9s ease; transition-delay: var(--rd, 0s); will-change: opacity, transform; }
.js-reveal [data-reveal="up"] { transform: translate3d(0, 34px, 0); }
.js-reveal [data-reveal="left"] { transform: translate3d(-56px, 0, 0); }
.js-reveal [data-reveal="right"] { transform: translate3d(56px, 0, 0); }
.js-reveal [data-reveal="zoom"] { transform: scale(0.93); }
.js-reveal [data-reveal="blur"] { filter: blur(12px); transform: translate3d(0, 14px, 0); }
.js-reveal [data-reveal].in { opacity: 1; transform: none; filter: none; }
.js-reveal .benefit-art { transition-delay: calc(var(--rd, 0s) + 0.15s); }
.js-reveal [data-reveal]:not(.in) .benefit-art { transform: rotate(8deg) translate3d(30px, 30px, 0) scale(0.9); }

/* Приложение (кабинет, Mini App, Android, macOS): вход при смене раздела */
#content.enter > * { animation: ev-up 0.6s cubic-bezier(0.16, 0.84, 0.24, 1) both; }
#content.enter > :nth-child(2) { animation-delay: 0.06s; }
#content.enter > :nth-child(3) { animation-delay: 0.12s; }
#content.enter > :nth-child(4) { animation-delay: 0.18s; }
#content.enter > :nth-child(5) { animation-delay: 0.24s; }
#content.enter > :nth-child(n + 6) { animation-delay: 0.3s; }
#content.enter .hero-copy > * { animation: ev-left 0.7s cubic-bezier(0.16, 0.84, 0.24, 1) both; }
#content.enter .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
#content.enter .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
#content.enter .hero-copy > :nth-child(n + 4) { animation-delay: 0.24s; }
#content.enter .hero-art, #content.enter .account-banner .web-art { animation: ev-right 0.9s cubic-bezier(0.16, 0.84, 0.24, 1) 0.1s both; }
#content.enter .auth-art > * { animation: ev-left 0.8s cubic-bezier(0.16, 0.84, 0.24, 1) both; }
#content.enter .auth-art > :nth-child(2) { animation-delay: 0.08s; }
#content.enter .auth-card { animation: ev-right 0.8s cubic-bezier(0.16, 0.84, 0.24, 1) 0.12s both; }
#content.enter .onboarding > :not(.mosaic) { animation: ev-blur 0.8s ease both; }
#content.enter .onboarding > h1 { animation-delay: 0.08s; }
#content.enter .onboarding > p { animation-delay: 0.16s; }
#content.enter .onboarding > :nth-child(n + 6) { animation-delay: 0.24s; }
#content.enter .onboarding > .mosaic { animation: ev-zoom 1.2s ease both; }
#content.enter .actions > *, #content.enter .account-stats > * { animation: ev-zoom 0.6s cubic-bezier(0.16, 0.84, 0.24, 1) both; }
#content.enter .actions > :nth-child(2), #content.enter .account-stats > :nth-child(2) { animation-delay: 0.2s; }
#content.enter .actions > :nth-child(3), #content.enter .account-stats > :nth-child(3) { animation-delay: 0.26s; }
#content.enter .actions > :nth-child(4) { animation-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
}
/* Установка macOS из Терминала */
.mac-cmd { margin-top: 18px; padding: 18px; border-radius: 20px; background: var(--bg); }
.mac-cmd b { display: block; font-size: 14px; }
.mac-cmd p { font-size: 12px; margin: 6px 0 12px; color: var(--muted); }
.mac-cmd-row { display: flex; align-items: center; gap: 10px; background: var(--raised); border-radius: 14px; padding: 6px 6px 6px 14px; }
.mac-cmd-row code { flex: 1; min-width: 0; font-size: 12px; line-height: 1.5; white-space: nowrap; overflow-x: auto; scrollbar-width: none; user-select: all; color: var(--text); padding: 8px 0; }
.mac-cmd-row .iconbtn { flex: none; width: 40px; height: 40px; }
.mac-cmd-row .iconbtn svg { width: 18px; height: 18px; }

/* ── 24.09 · ровные сетки карточек (приложения, тарифы) ─────────────── */
.even-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.even-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.web-top .even-grid { margin-top: 50px; }
.app-card { display: flex; flex-direction: column; min-width: 0; }
.app-card > .tile-icon { flex: none; }
.app-card h2 { font-size: 32px; letter-spacing: -1px; line-height: 1.1; margin: 24px 0 12px; }
.app-card h3 { margin: 24px 0 12px; }
.app-card > p:not(.meta) { margin: 0; }
.app-card-actions { margin-top: auto; padding-top: 26px; display: grid; gap: 10px; }
.app-card-actions .btn { margin: 0; min-width: 0; white-space: normal; text-align: center; }
.dl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-card .meta { margin: 14px 0 0; font-size: 12px; color: var(--muted); min-height: 1.5em; }
.app-card.mint .meta, .app-card.mint > p { color: inherit; }
.price-card { display: flex; flex-direction: column; min-width: 0; }
.price-card > .btn { margin-top: auto; }
.price-card ul { margin-bottom: 30px; }
.price-card .surface-header { gap: 10px; min-height: 48px; }
.price-card .surface-header .tile-icon { width: 44px; height: 44px; flex: none; }
.price-grid.price-extra { margin-top: 16px; }
.price-extra .price-card > p { margin-bottom: 26px; }
.price-extra .web-price { margin-top: 26px; }
.pay-card ul { margin: 26px 0 16px; }
.pay-card > p { margin-top: auto; }
@media (min-width: 1181px) { .price-grid.n4 .web-price { font-size: 48px; } }
@media (max-width: 900px) {
  .even-grid, .even-grid.two { grid-template-columns: minmax(0, 1fr); }
}

/* Установка на macOS */
.mac-install { scroll-margin-top: 90px; }
.mac-way { display: flex; flex-direction: column; min-width: 0; }
.mac-way > .pill { align-self: flex-start; }
.mac-way h3 { margin: 18px 0 6px; }
.mac-way .install-steps { margin: 12px 0 22px; }
.mac-way .install-steps li { background: var(--bg); font-size: 14px; }
.mac-way .mac-cmd-row { margin-top: auto; background: var(--bg); }
.mac-cmd-row code { direction: ltr; text-align: left; }

/* Переключатель языка (12 языков) */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-list { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; width: 330px; max-width: calc(100vw - 32px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 8px; border-radius: 20px; background: var(--raised); box-shadow: var(--shadow); }
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--text); margin: 0; line-height: 1.3; }
.lang-list a b { flex: none; width: 22px; font-size: 10px; letter-spacing: 0.5px; color: var(--muted); }
.lang-list a:hover, .lang-list a.on { background: var(--surface); }
.lang-list a.on b { color: var(--accent); }
.lang-menu-inline > summary { display: flex; align-items: center; gap: 10px; }
.lang-menu-inline > summary svg { width: 18px; height: 18px; }
.lang-menu-inline .lang-list { position: static; width: auto; max-width: none; margin-top: 10px; box-shadow: none; background: var(--surface); }
@media (max-width: 700px) { .web-head-actions .lang-menu { display: none; } }

/* RTL (العربية, فارسی) */
[dir="rtl"] .install-steps li { padding: 20px 64px 20px 22px; }
[dir="rtl"] .install-steps li::before { left: auto; right: 20px; }
[dir="rtl"] .btn svg, [dir="rtl"] .selectlike svg { transform: scaleX(-1); }
[dir="rtl"] .web-price, [dir="rtl"] .mac-cmd-row, [dir="rtl"] code { unicode-bidi: plaintext; }
.price-card > .btn { width: 100%; }
.mac-way .install-steps, .install-steps { padding: 0; }
.dl-pair { grid-template-columns: minmax(0, 1fr); }
.apps-other { padding-bottom: 40px; }
@media (max-width: 700px) {
  .mac-way, .app-card { padding: 24px 20px; }
  .mac-way .install-steps li { padding: 16px 16px 16px 52px; font-size: 13px; }
  .mac-way .install-steps li::before { left: 14px; top: 16px; width: 26px; height: 26px; }
  [dir="rtl"] .mac-way .install-steps li { padding: 16px 52px 16px 16px; }
  [dir="rtl"] .mac-way .install-steps li::before { left: auto; right: 14px; }
  .app-card h2 { font-size: 28px; }
}
[dir="rtl"] .web-logo { direction: ltr; unicode-bidi: isolate; }
.price-card .web-price { margin-top: 24px; }

/* 24.09 · «Просто работает»: три равные карточки, иллюстрация — фоном справа, текст поверх */
.benefit-grid.even { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.benefit-grid.even .benefit.large { display: flex; grid-column: auto; }
.benefit-grid.even .benefit.large > .tile-icon { display: inline-grid; }
.benefit.has-art { display: flex; flex-direction: column; align-items: flex-start; min-height: 300px; isolation: isolate; }
.benefit.has-art > :not(.benefit-art) { position: relative; z-index: 1; }
.benefit.has-art h3 { margin-top: 20px; }
.benefit.has-art p { max-width: 30ch; }
.benefit.has-art > .btn { margin-top: auto; padding-top: 18px; padding-inline-start: 0; align-self: flex-start; }
.benefit-art {
  position: absolute; inset-inline-end: -34px; bottom: -44px; z-index: 0;
  width: 66%; max-width: 250px; height: auto; aspect-ratio: 1; object-fit: contain;
  opacity: 0.5; pointer-events: none; user-select: none;
  transform: rotate(-8deg);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease;
  -webkit-mask-image: radial-gradient(circle at 70% 70%, #000 45%, transparent 80%);
  mask-image: radial-gradient(circle at 70% 70%, #000 45%, transparent 80%);
}
.benefit.has-art:hover .benefit-art { transform: rotate(-3deg) translateY(-6px) scale(1.04); opacity: 0.68; }
.benefit.mint .benefit-art { opacity: 0.42; }
[data-mode="light"] .benefit-art { opacity: 0.38; }
@media (max-width: 1000px) {
  .benefit-grid.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefit-grid.even > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .benefit-grid.even { grid-template-columns: 1fr; }
  .benefit-grid.even > :last-child { grid-column: auto; }
  .benefit-grid .benefit.has-art { min-height: 250px; }
  .benefit-art { width: 58%; max-width: 210px; }
}

/* 24.09 · Мобильное меню сайта: аккуратная выезжающая панель */
@media (max-width: 1000px) {
  #webHeader { position: relative; z-index: 70; }
  #webHeader.menu-open::before { content: ""; position: fixed; inset: 0; background: rgb(0 0 0 / 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: ev-fade 0.25s ease both; }
  #webHeader.menu-open .web-header { position: relative; z-index: 2; }
  .menu-open .web-links, #webHeader.menu-open .web-links {
    display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px;
    position: fixed; top: 84px; left: 12px; right: 12px; z-index: 3;
    max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px; border-radius: 26px; background: var(--raised); box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
    animation: ev-menu 0.32s cubic-bezier(0.16, 0.84, 0.24, 1) both;
  }
  #webHeader.menu-open .web-links > a { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-size: 18px; font-weight: 500; color: var(--text); border-radius: 16px; }
  #webHeader.menu-open .web-links > a::after { content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); flex: none; }
  [dir="rtl"] #webHeader.menu-open .web-links > a::after { transform: rotate(135deg); }
  #webHeader.menu-open .web-links > a.active { background: var(--surface); }
  #webHeader.menu-open .web-links > a.active::after { border-color: var(--accent); }
  #webHeader.menu-open .web-links > a.mobile-only { justify-content: center; gap: 10px; margin-top: 8px; background: var(--accent); color: var(--accentInk); font-weight: 600; font-size: 16px; }
  #webHeader.menu-open .web-links > a.mobile-only::after { border-color: var(--accentInk); }
  #webHeader.menu-open .lang-menu-inline { display: block; margin-top: 4px; }
  #webHeader.menu-open .lang-menu-inline > summary { padding: 14px 18px; font-size: 15px; color: var(--muted); border-radius: 16px; }
  #webHeader.menu-open .lang-menu-inline[open] > summary { color: var(--text); }
  #webHeader.menu-open .lang-menu-inline .lang-list { margin: 4px 0 0; }
  .web-menu svg { transition: transform 0.25s ease; }
  #webHeader.menu-open .web-menu { background: var(--accent); color: var(--accentInk); }
  html.menu-lock, html.menu-lock body { overflow: hidden; }
}
@media (max-width: 700px) { #webHeader.menu-open .web-links { top: 72px; } }
@keyframes ev-menu { from { opacity: 0; transform: translate3d(0, -14px, 0) scale(0.98); } }
@keyframes ev-fade { from { opacity: 0; } }

/* 24.09 · Герой Evil на страницах сайта: эмоция под смысл раздела */
.web-top.has-mascot, .web-final.has-mascot { position: relative; }
.top-mascot { position: absolute; top: 20px; inset-inline-end: 0; width: 230px; height: 230px; object-fit: contain; pointer-events: none; animation: ev-float 6s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.35)); }
.web-top.has-mascot > h1, .web-top.has-mascot > .web-lead { max-width: calc(100% - 250px); }
.web-final .top-mascot { top: auto; bottom: -26px; inset-inline-end: 40px; width: 210px; height: 210px; z-index: 1; }
.mascot-404 { display: block; width: 220px; height: 220px; margin: 0 auto 10px; object-fit: contain; animation: ev-float 6s ease-in-out infinite; }
@keyframes ev-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (max-width: 1000px) {
  .top-mascot { width: 150px; height: 150px; top: 36px; }
  .web-top.has-mascot > h1, .web-top.has-mascot > .web-lead { max-width: calc(100% - 150px); }
  .web-final .top-mascot { width: 140px; height: 140px; inset-inline-end: 12px; bottom: -14px; }
}
@media (max-width: 700px) {
  .top-mascot { width: 104px; height: 104px; top: 30px; inset-inline-end: -6px; }
  .web-top.has-mascot > h1 { max-width: none; padding-inline-end: 84px; }
  .web-top.has-mascot > .web-lead { max-width: none; }
  .web-final .top-mascot { width: 96px; height: 96px; bottom: auto; top: 16px; inset-inline-end: 8px; }
}
@media (prefers-reduced-motion: reduce) { .top-mascot, .mascot-404 { animation: none; } }

/* 24.09 · Кабинет на телефоне: герой Evil сверху в баннере и на входе */
@media (max-width: 700px) {
  .account-banner { padding-top: 24px; }
  .account-banner .web-art, body[data-surface="account"] .account-banner .web-art { display: grid; position: absolute; top: -6px; inset-inline-end: -8px; width: 132px; margin: 0; z-index: 1; }
  .account-banner .web-art .mosaic { display: none; }
  .account-banner > div:first-of-type .eyebrow, .account-banner h2 { padding-inline-end: 104px; }
  .auth-art { position: relative; }
  .auth-art .web-art { display: grid; position: absolute; top: -18px; inset-inline-end: -10px; width: 128px; margin: 0; }
  .auth-art .web-art .mosaic, .auth-art .web-art .ambient { display: none; }
  .auth-art h1 { padding-inline-end: 110px; }
}

/* 24.09 · Mini App: «Установка и настройка» и пошаговый мастер */
.setup-hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; overflow: hidden; }
.setup-hero h2 { font-size: 40px; margin: 12px 0 10px; }
.setup-hero p { font-size: 14px; line-height: 1.6; margin-bottom: 20px; opacity: 0.8; max-width: 34ch; }
.setup-hero img { width: 170px; height: 170px; object-fit: contain; margin: -10px -10px -24px 0; animation: ev-float 6s ease-in-out infinite; }
@media (max-width: 520px) {
  .setup-hero { grid-template-columns: 1fr; position: relative; }
  .setup-hero img { position: absolute; top: 6px; inset-inline-end: -6px; width: 118px; height: 118px; margin: 0; }
  .setup-hero h2, .setup-hero .eyebrow { padding-inline-end: 100px; }
}
.app-list { display: grid; gap: 4px; }
.surface.app-list { padding-block: 12px; }
.app-row { padding: 12px 0; border-radius: 0; }
.app-row .grow small { display: block; margin-top: 3px; line-height: 1.4; }
.app-row .btn { flex: none; }
.row-icon.own { background: var(--accent); }
.row-icon.own .evil-mark { width: 22px; height: 22px; margin: 0; background: var(--accentInk); }
.wizard { position: relative; max-width: 540px; margin: 0 auto; text-align: center; padding: 6px 0 20px; }
.wizard > h1 { font-size: 36px; line-height: 1.08; letter-spacing: -1.5px; margin: 6px 0 12px; }
.wizard > p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 auto 22px; max-width: 40ch; }
.wizard .app-list, .wizard .inline-notice, .wizard .wiz-list, .wizard .key-data { text-align: start; margin-bottom: 14px; }
.wiz-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0; }
.wiz-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--raised); transition: width 0.3s ease, background 0.3s ease; }
.wiz-dots i.on { width: 28px; background: var(--accent); }
.wiz-dots i.done { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.wiz-back { position: absolute; top: 0; inset-inline-start: 0; }
.wiz-back svg { transform: scaleX(-1); }
[dir="rtl"] .wiz-back svg { transform: none; }
.wiz-art { position: relative; width: 230px; height: 230px; margin: 4px auto 8px; display: grid; place-items: center; }
.wiz-art img { position: relative; z-index: 1; width: 176px; height: 176px; object-fit: contain; animation: ev-float 6s ease-in-out infinite; }
.wiz-art span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); animation: ev-pulse 2.6s ease-out infinite; opacity: 0; }
.wiz-art span:nth-child(2) { animation-delay: 0.85s; }
.wiz-art span:nth-child(3) { animation-delay: 1.7s; }
.wiz-art.done span { border-color: var(--accent); }
@keyframes ev-pulse { 0% { transform: scale(0.55); opacity: 0.8; } 100% { transform: scale(1.12); opacity: 0; } }
.wiz-list { display: grid; gap: 10px; }
.wiz-actions { display: grid; gap: 10px; margin-top: 8px; }
.wiz-actions .btn { width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .wiz-art span, .wiz-art img, .setup-hero img { animation: none; } }
@media (max-width: 520px) {
  .app-row { display: grid; grid-template-columns: auto 1fr; row-gap: 10px; }
  .app-row .btn { grid-column: 2; justify-self: start; }
  .setup-hero img { top: 12px; inset-inline-end: 6px; width: 104px; height: 104px; }
}
.wiz-list .step { padding-block: 10px; }
body .account-banner > .mosaic { position: absolute; z-index: 0; pointer-events: none; }
@media (max-width: 700px) {
  body .account-banner .web-art { top: 14px; inset-inline-end: 10px; width: 112px; }
  body .account-banner .web-art img { width: 100%; transform: none; }
}
@media (min-width: 701px) { .account-banner .web-art img { width: 82%; transform: translateY(4px); } }

/* 24.09 · Тексты по аудиту: выбор устройств в тарифах, подсказки, помощь, отзывы */
.dev-pick { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin: 34px 0 18px; padding: 18px 22px; border-radius: 24px; background: var(--surface); }
.dev-pick > div:first-child { display: grid; gap: 6px; max-width: 620px; }
.dev-pick b { font-size: 17px; }
.dev-pick small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.dev-pick .stepper { background: var(--raised); }
.dev-pick .stepper .iconbtn { background: var(--surface); }
.dev-pick .stepper .iconbtn:disabled { opacity: 0.35; cursor: default; }
.dev-pick + .price-grid { margin-top: 0; }
.price-card li b { font-weight: 600; margin-inline-start: 4px; }
.hero-note { margin-top: 14px !important; font-size: 13px !important; color: var(--muted); }
.steps-section .web-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.web-final > p { position: relative; color: var(--muted); max-width: 520px; margin: 14px auto 0; }
.web-final .web-cta { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.web-final .web-cta .btn { margin: 0; }
.help-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; position: relative; z-index: 1; }
.help-quick .chip { text-decoration: none; }
.help-hours { font-size: 13px; line-height: 1.5; margin-top: 16px; max-width: 320px; }
#trouble .install-steps { margin: 0; }
.help-key-note { padding-top: 0 !important; padding-bottom: 0 !important; }
.mac-way > p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.mac-more summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 12px; list-style: none; }
.mac-more summary::-webkit-details-marker { display: none; }
.mac-more summary::after { content: " +"; }
.mac-more[open] summary::after { content: " −"; }
.app-card .meta .link { display: inline; }
.review-invite { margin-top: 34px; }
.web-section > .plan-note { margin-top: 22px; }
.legal-cases { display: grid; gap: 14px; margin: 0; }
.legal-cases dt { color: var(--text); font-weight: 600; font-size: 17px; }
.legal-cases dd { margin: 4px 0 0; padding-inline-start: 16px; border-inline-start: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.web-top:has(> .help-quick) { min-height: 0; padding-bottom: 20px; }

/* 24.09 · Тёмные вторичные кнопки, герой с увеличением при прокрутке, Mini App во весь экран */
.btn.ghost { background: #1c1c1c; color: #f4f6f2; }
.btn.ghost:hover:not(:disabled) { background: #242424; filter: none; }
.btn.ghost:active { background: #181818; }

/* Герой главной: чуть меньше; site.js задаёт --hp (0…1) по прокрутке — Evil растёт поверх соседних блоков и уменьшается обратно */
.web-hero { overflow: visible; z-index: 5; }
.web-hero .web-art { width: 84%; justify-self: end; margin-inline-end: 2%; --hp: 0; }
.web-hero .web-art img {
  width: 100%;
  transform: translate3d(0, -10px, 0) scale(calc(1 + var(--hp) * var(--hz, 0.55)));
  transform-origin: 62% 18%;
  will-change: transform;
}
.web-hero .web-art .ambient { opacity: calc(0.18 + var(--hp) * 0.14); transform: translateY(20px) scale(calc(1 + var(--hp) * 0.6)); }
.web-hero .web-art .mosaic { opacity: calc(0.34 * (1 - var(--hp))); }
.web-hero .web-art .art-caption { opacity: calc(0.7 * (1 - var(--hp) * 2)); }
@media (max-width: 1000px) {
  .web-hero { overflow-x: clip; overflow-y: visible; }
  .web-hero .web-art { width: 100%; max-width: 360px; margin-inline: auto; --hz: 0.28; }
  .web-hero .web-art img { transform-origin: 50% 20%; }
}
@media (prefers-reduced-motion: reduce) { .web-hero .web-art { --hp: 0 !important; } }

/* Поля ввода не меньше 16px — iOS и Telegram не увеличивают экран при фокусе */
@media (pointer: coarse), (max-width: 1000px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { font-size: max(16px, 1em); }
}

/* Telegram Mini App: без горизонтальной прокрутки, без выделения текста и масштабирования */
body[data-surface="telegram"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; overscroll-behavior: none; }
html:has(body[data-surface="telegram"]) { overflow: hidden; overscroll-behavior: none; }
body[data-surface="telegram"] input, body[data-surface="telegram"] textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
body[data-surface="telegram"] img { -webkit-user-drag: none; }
body[data-surface="telegram"] .app, body[data-surface="telegram"] #scroll, body[data-surface="telegram"] .workspace { overflow-x: hidden; max-width: 100vw; }
body[data-surface="telegram"] #scroll { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body[data-surface="telegram"] #content { min-width: 0; padding-inline: calc(20px + var(--tg-safe-area-inset-left, 0px)) calc(20px + var(--tg-safe-area-inset-right, 0px)); }
body[data-surface="telegram"] .hero, body[data-surface="telegram"] .hero-art { max-width: 100%; }
/* Во весь экран (мобильный Telegram): контент ниже системной строки и кнопок Telegram */
body[data-surface="telegram"] #content { padding-top: calc(18px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
body[data-surface="telegram"] #bottomnav { padding-bottom: calc(14px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px))); }
body[data-surface="telegram"] .hero, body[data-surface="app"] .android .hero { overflow-x: clip; overflow-y: visible; }

/* 24.09 · Модальные окна — нижняя шторка на всю ширину, 80% высоты экрана, выезжает снизу */
dialog#dialog {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%;
  height: 80vh; height: 80dvh; max-height: 80dvh; padding: 0; overflow: hidden;
  border-radius: 28px 28px 0 0; box-shadow: 0 -24px 90px #0007;
  flex-direction: column; transition: transform 0.2s ease;
}
dialog#dialog[open] { display: flex; animation: ev-sheet-up 0.38s cubic-bezier(0.2, 0.85, 0.25, 1); }
dialog#dialog.closing { animation: ev-sheet-down 0.26s cubic-bezier(0.4, 0, 1, 1) forwards; }
dialog#dialog.dragging { transition: none; }
dialog#dialog[open]::backdrop { animation: ev-fade 0.3s ease; }
dialog#dialog.closing::backdrop { opacity: 0; transition: opacity 0.26s ease; }
dialog#dialog::before { content: ""; flex: none; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: var(--subtle); opacity: 0.55; }
#dialogBody {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 18px max(20px, calc((100% - 720px) / 2)) calc(28px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)));
}
#dialogBody .modalhead { margin-bottom: 20px; }
@keyframes ev-sheet-up { from { transform: translateY(100%); } }
@keyframes ev-sheet-down { to { transform: translateY(100%); } }
@media (max-width: 760px) { #dialogBody .modalhead h2 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { dialog#dialog, dialog#dialog[open] { animation: none; } }

/* 24.09 · Единые боковые отступы: строки и пункты выбора внутри карточки не добавляют свой отступ */
.surface > .choice-list { display: grid; gap: 4px; }
.surface .choice { width: 100%; padding: 12px 0; background: transparent; border-radius: 0; }
#dialogBody:focus { outline: none; }

/* 24.09 · Windows: своя строка заголовка (кнопки окна рисует система справа — titleBarOverlay) */
body[data-surface="app"] .app.win .macbar { padding-left: 20px; padding-right: 150px; background: var(--side); }
body[data-surface="app"] .app.win .macbar > span { font-weight: 600; color: var(--muted); }
body[data-surface="app"] .app.win .macbar small { margin-left: auto; margin-right: 16px; }
body[data-surface="app"] .app.win aside { padding-top: 14px; }
body[data-surface="app"] .app.win button, body[data-surface="app"] .app.win a, body[data-surface="app"] .app.win input { -webkit-app-region: no-drag; }

/* 24.09 · Страница приложений: четыре карточки загрузки (Android, macOS, Windows, Telegram) */
.even-grid.download-cards.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .even-grid.download-cards.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .even-grid.download-cards.n4 { grid-template-columns: minmax(0, 1fr); } }
.download-cards.n4 .app-card h2 { font-size: 26px; letter-spacing: -0.6px; }
#windows-install .mac-way .mac-cmd-row { margin-top: 4px; }
#windows-install .mac-way .app-card-actions { margin-top: auto; padding-top: 22px; }
.web-strip a { color: inherit; text-decoration: none; transition: color .2s; }
.web-strip a:hover, .web-strip a:focus-visible { color: var(--accent); }
.download-cards .app-card { scroll-margin-top: 90px; }

/* 25.09 · Веб-приложение (PWA): весь экран, как у нативного приложения; вырезы и жесты системы учтены */
body[data-surface="pwa"] { background: var(--bg); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body[data-surface="pwa"] .app.android { width: 100%; max-width: none; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
body[data-surface="pwa"] .phonebar, body[data-surface="pwa"] .macbar { display: none !important; }
body[data-surface="pwa"] .android #scroll { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body[data-surface="pwa"] .android #content { min-width: 0; padding: calc(18px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) 28px calc(20px + env(safe-area-inset-left, 0px)); }
body[data-surface="pwa"] .android #bottomnav { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
body[data-surface="pwa"] .android .hero { overflow-x: clip; overflow-y: visible; }
body[data-surface="pwa"] .app.mac { margin: 0; max-width: none; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
body[data-surface="pwa"] .app.mac .appbody { flex: 1; min-height: 0; }
body[data-surface="pwa"] .app.mac .workspace { overflow: auto; }
body[data-surface="pwa"] .app.mac aside { padding-top: calc(22px + env(safe-area-inset-top, 0px)); }
body[data-surface="pwa"] .is-guest .appbody { display: block; }
body[data-surface="pwa"] .is-guest aside, body[data-surface="pwa"] .is-guest #bottomnav { display: none !important; }
body[data-surface="pwa"] .is-guest #scroll { height: 100%; overflow: auto; }
body[data-surface="pwa"] .is-guest .auth-layout { min-height: 100%; }
@media (max-width: 700px) { body[data-surface="pwa"] .auth-layout .auth-art { display: none; } }

/* Статус соединения (проверка по адресу запроса) */
.pwa-status { display: flex; align-items: center; gap: 14px; padding: 4px 0 16px; margin-bottom: 4px; border-bottom: 1px solid var(--raised); }
.pwa-status .grow { min-width: 0; }
.pwa-status b { display: block; font-size: 17px; }
.pwa-status small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pwa-status.on .row-icon { background: var(--accent); color: var(--accentInk); }
.pwa-status.off .row-icon { background: var(--errorSoft); color: var(--error); }
.inline-notice .iconbtn.small { min-width: 32px; height: 32px; flex: none; font-size: 20px; line-height: 1; background: transparent; color: var(--muted); }

/* Карточка «Evil VPN на экране телефона» */
.surface.install-card { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.install-card .row-icon.own { background: none; width: 52px; height: 52px; flex: none; }
.install-card .row-icon img { width: 52px; height: 52px; border-radius: 14px; display: block; }
.install-card .grow { min-width: 0; flex: 1; }
.install-card b { display: block; font-size: 16px; }
.install-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; }
.install-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.install-actions .iconbtn.small { min-width: 36px; height: 36px; font-size: 20px; background: transparent; color: var(--muted); }
html.pwa-standalone [data-pwa-install], html.pwa-standalone .install-card { display: none !important; }
@media (max-width: 560px) {
  .surface.install-card { flex-wrap: wrap; }
  .install-card .grow { flex-basis: calc(100% - 70px); }
  .install-actions { width: 100%; }
  .install-actions .btn { flex: 1; justify-content: center; }
}

/* Окно установки (сайт, кабинет, PWA) — нижняя шторка, как остальные модальные окна */
html.ev-install-lock { overflow: hidden; }
.ev-install { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: #000a; opacity: 0; transition: opacity 0.25s ease; font-family: Inter, Arial, sans-serif; color: var(--text); }
.ev-install.on { opacity: 1; }
.ev-i-card { position: relative; width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 28px 28px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -24px 90px #0007; transform: translateY(100%); transition: transform 0.36s cubic-bezier(0.2, 0.85, 0.25, 1); }
.ev-install.on .ev-i-card { transform: none; }
@media (min-width: 760px) { .ev-install { align-items: center; } .ev-i-card { border-radius: 28px; padding-bottom: 28px; } }
.ev-i-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface); color: var(--muted); cursor: pointer; }
.ev-install svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ev-install svg circle[r="1.6"] { fill: currentColor; stroke: none; }
.ev-i-app { display: flex; align-items: center; gap: 14px; margin: 0 52px 20px 0; }
.ev-i-app img { width: 56px; height: 56px; border-radius: 15px; flex: none; }
.ev-i-app b { display: block; font-size: 18px; }
.ev-i-app small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.ev-i-card h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.8px; margin: 0 0 10px; }
.ev-i-card > p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 20px; }
.ev-i-card .btn { width: 100%; margin-top: 10px; justify-content: center; gap: 8px; text-decoration: none; }
.ev-i-steps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.ev-i-steps li { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 18px; padding: 14px 16px; }
.ev-i-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accentInk); font-weight: 700; font-size: 14px; flex: none; }
.ev-i-txt { flex: 1; min-width: 0; }
.ev-i-txt b { display: block; font-size: 15px; }
.ev-i-txt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.ev-i-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--raised); color: #4c9dff; flex: none; }
.ev-i-done { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accentInk); margin-bottom: 16px; }
.ev-i-done svg { width: 30px; height: 30px; stroke-width: 2.4; }
/* iPhone: стрелка к кнопке «Поделиться» на панели Safari */
.ev-i-arrow { display: none; }
@media (max-width: 759px) and (pointer: coarse) {
  .ev-i-card.ios { margin-bottom: 64px; border-radius: 28px; }
  .ev-i-card.ios + .ev-i-arrow, .ev-i-card.ios .ev-i-arrow { display: block; position: absolute; left: 50%; bottom: -54px; width: 24px; height: 44px; margin-left: -12px; }
  .ev-i-card.ios { overflow: visible; }
  .ev-i-arrow::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 8px; width: 2px; background: var(--accent); }
  .ev-i-arrow::after { content: ""; position: absolute; left: 4px; bottom: 2px; width: 12px; height: 12px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
  .ev-i-arrow { animation: ev-bob 1.2s ease-in-out infinite; }
}
@keyframes ev-bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .ev-i-card, .ev-install { transition: none; } .ev-i-arrow { animation: none; } }

/* 25.09 · Сайт: блок веб-приложения на странице «Приложения» */
.pwa-block { scroll-margin-top: 90px; }
.pwa-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 44px; position: relative; overflow: hidden; }
.pwa-copy h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -1.5px; margin: 14px 0 16px; }
.pwa-copy > p { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0 0 20px; max-width: 60ch; }
.pwa-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.pwa-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.pwa-list svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.pwa-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pwa-actions .btn { min-height: 52px; }
.pwa-card .meta { color: var(--subtle); font-size: 13px; margin: 16px 0 0; }
.pwa-qr { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 210px; }
.pwa-qr img { width: 180px; height: 180px; border-radius: 20px; background: #fff; padding: 10px; }
.pwa-qr span { color: var(--muted); font-size: 13px; line-height: 1.5; }
@media (max-width: 900px) {
  .pwa-card { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; gap: 24px; }
  .pwa-qr { display: none; }
  .pwa-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* 25.09 · Узкие экраны: нижняя строка карточки на странице «Подписка» — текст и кнопка друг под другом */
@media (max-width: 480px) {
  .surface.highlight h2[style*="40px"] ~ .subscription-bottom { flex-wrap: wrap; }
  .surface.highlight h2[style*="40px"] ~ .subscription-bottom > p, .surface.highlight h2[style*="40px"] ~ .subscription-bottom > span { flex: 1 1 100%; margin: 0; }
  .surface.highlight h2[style*="40px"] ~ .subscription-bottom > .btn { flex: 1 1 100%; justify-content: center; }
  .hero .hero-copy .eyebrow { max-width: calc(100% - 120px); line-height: 1.5; }
}
.pwa-actions .btn { gap: 10px; white-space: nowrap; padding-inline: 22px; }
.pwa-actions .btn svg { flex: none; }

/* 27.09 · PWA на телефоне: нижняя панель как у системных приложений (без двойного отступа над полосой жестов),
   без горизонтальной прокрутки от декоративных слоёв, шаги установки Evil VPN */
body[data-surface="pwa"] { position: fixed; inset: 0; width: 100%; }
body[data-surface="pwa"] .app { overflow: hidden; }
body[data-surface="pwa"] .android #scroll { overflow-x: hidden; overflow-y: auto; }
body[data-surface="pwa"] .android #bottomnav {
  padding: 8px calc(12px + env(safe-area-inset-right, 0px)) max(10px, calc(env(safe-area-inset-bottom, 0px) - 8px)) calc(12px + env(safe-area-inset-left, 0px));
  gap: 4px; border-radius: 22px 22px 0 0;
}
body[data-surface="pwa"] .android .bottom-item { flex: 1; max-width: 76px; height: 44px; border-radius: 15px; }
body[data-surface="pwa"] .android #content { padding-bottom: 24px; }
@media (max-width: 360px) {
  body[data-surface="pwa"] .android #content { padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
}
.pwa-steps { list-style: none; counter-reset: pwa; margin: 4px 0 22px; padding: 0; display: grid; gap: 14px; }
.pwa-steps li { counter-increment: pwa; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.pwa-steps li::before { content: counter(pwa); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--text); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.pwa-steps b { font-size: 15px; line-height: 1.35; }
.pwa-steps small { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
.pwa-alt { display: grid; gap: 14px; justify-items: center; margin-top: 12px; }

/* 27.09 · Узкие телефоны (PWA, Mini App, Android): строки настроек не сжимают заголовок в столбик,
   герой не наезжает на надзаголовок */
.row .grow { min-width: 0; }
.row .grow b { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.row .grow small { overflow-wrap: anywhere; }
@media (max-width: 440px) {
  .android .row, .telegram .row, .mac .row { gap: 12px; }
  .android .selectlike, .telegram .selectlike, .mac .row .selectlike { gap: 6px; padding: 9px 10px; max-width: 128px; }
  .android .selectlike svg, .telegram .selectlike svg, .mac .row .selectlike svg { width: 12px; flex: none; }
  .android .row .link, .telegram .row .link, .mac .row .link { font-size: 14px; gap: 6px; white-space: nowrap; }
  .android .row .link svg, .telegram .row .link svg, .mac .row .link svg { width: 13px; }
  .android .hero .eyebrow, .telegram .hero .eyebrow { display: block; max-width: calc(100% - 180px); line-height: 1.5; }
  .android .hero-art, .telegram .hero-art { width: 158px; height: 166px; right: -6px; }
  .android .hero-art img, .telegram .hero-art img { width: 164px; height: 164px; }
}
@media (max-width: 370px) {
  .android .hero h2, .telegram .hero h2 { font-size: 36px; }
  .android .surface, .telegram .surface { padding-left: 20px; padding-right: 20px; }
}
.help-pill { justify-content: flex-start; text-align: left; }
.help-pill span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 440px) {
  .mac .row-icon { width: 40px; height: 40px; border-radius: 13px; }
  .android .hero-cta .btn, .telegram .hero-cta .btn { padding-left: 16px; padding-right: 16px; }
  .android .hero-cta .btn, .telegram .hero-cta .btn, .subscription-bottom .btn { white-space: nowrap; }
  .subscription-bottom .btn.small { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 440px) {
  .subscription-bottom { flex-wrap: wrap; gap: 10px; }
  .server-line + .subscription-bottom .btn { flex: 1 1 auto; justify-content: center; }
}

/* 27.09 · PWA на iPhone: приложение ровно на весь экран (высоту задаёт core.js → --app-h), панель у нижнего края */
html:has(body[data-surface="pwa"]) { height: 100%; background: var(--bg); }
body[data-surface="pwa"] .app.android, body[data-surface="pwa"] .app.mac { position: fixed; top: 0; left: 0; right: 0; height: var(--app-h, 100dvh); }
body[data-surface="pwa"] .android #content { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
body[data-surface="pwa"] .android #bottomnav { padding-bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 12px)); }
.app-row.compact { display: flex; } .app-row.compact .btn { white-space: nowrap; }

/* 04.10 · Единый вид: карточки быстрых действий — содержимое от верхнего края, одинаковая высота в ряду;
   кнопки в строках («Открыть», «Управлять») — такие же «пилюли», как «Изменить» */
.android .action, .telegram .action { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; height: 100%; }
.android .actions, .telegram .actions { align-items: stretch; }
.app .row > .link { flex: none; white-space: nowrap; background: var(--raised); padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 500; gap: 8px; }
.app .row > .link svg { width: 14px; }
@media (max-width: 440px) {
  .app .row > .link { padding: 9px 10px; font-size: 12px; gap: 6px; }
  .app .row > .link svg { width: 12px; }
}

/* 04.10 · Планшеты (600–899 px) в телефонной раскладке: PWA, Mini App, Android */
@media (min-width: 600px) {
  .android #content, .telegram #content { padding-left: max(32px, calc((100% - 760px) / 2)); padding-right: max(32px, calc((100% - 760px) / 2)); }
  .android .hero h2, .telegram .hero h2 { font-size: 54px; letter-spacing: -2.4px; }
  .android .hero p, .telegram .hero p { font-size: 16px; max-width: 420px; }
  .android .hero .eyebrow, .telegram .hero .eyebrow { max-width: none; }
  .android .hero-art, .telegram .hero-art { width: 250px; height: 260px; right: 0; top: 10px; }
  .android .hero-art img, .telegram .hero-art img { width: 250px; height: 250px; }
  .android .hero-cta, .telegram .hero-cta { grid-template-columns: auto auto; justify-content: start; gap: 18px; }
  .android .hero-cta .btn, .telegram .hero-cta .btn { padding-left: 28px; padding-right: 28px; }
  .android .home-panels, .telegram .home-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
  .android .home-panels > .surface, .telegram .home-panels > .surface { margin: 0; }
  .android .actions, .telegram .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .android #bottomnav, .telegram #bottomnav { justify-content: center; gap: 28px; }
  .android .bottom-item, .telegram .bottom-item { flex: 0 0 76px; }
}

/* 04.10 · Кабинет на телефоне: компактнее поля, заголовки разделов в одну строку, ровные карточки действий */
.sectionhead { flex-wrap: nowrap; }
.sectionhead h2 { min-width: 0; }
.sectionhead > .link, .sectionhead > .btn { flex: none; white-space: nowrap; }
.app.mac .action { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
@media (max-width: 700px) {
  .app.mac .action { height: 100%; }
  .app.mac .actions { align-items: stretch; }
}
@media (max-width: 440px) {
  .app.mac #content { padding-left: 18px; padding-right: 18px; }
  .app.mac .surface { padding-left: 18px; padding-right: 18px; }
  .app.mac .row { gap: 10px; }
  .app.mac .row-icon { width: 36px; height: 36px; border-radius: 12px; }
  .app.mac .row .grow b { font-size: 15px; }
  .app.mac .row .grow small { font-size: 12px; }
  .app.mac .row .selectlike svg, .app.mac .row > .link svg, .android .row .selectlike svg, .telegram .row .selectlike svg, .android .row > .link svg, .telegram .row > .link svg { display: none; }
  .account-banner .web-art, body[data-surface="account"] .account-banner .web-art { width: 104px; top: -4px; }
  .account-banner h2 { font-size: 30px; line-height: 1.12; letter-spacing: -1.2px; }
  .account-banner > div:first-of-type .eyebrow, .account-banner h2 { padding-inline-end: 72px; }
  .sectionhead h2 { font-size: 20px; }
}

/* 04.10 · Сайт на телефоне: герой Evil рядом с надзаголовком, заголовок страницы целиком в ширину без наложений */
@media (max-width: 480px) {
  .web-top h1 { font-size: 36px; line-height: 1.06; letter-spacing: -1.4px; overflow-wrap: break-word; }
  .web-top.has-mascot > h1 { padding-inline-end: 0; }
  .web-top .top-mascot { width: 84px; height: 84px; top: 0; inset-inline-end: 0; }
  .app-card-actions .btn { width: 100%; justify-content: center; font-size: 14px; padding-left: 14px; padding-right: 14px; }
  .site-main > .web-section, .site-main > section, .site-main > .web-strip, .site-main > .web-footer { margin-left: 2px; margin-right: 2px; }
  .site-main > .web-hero { padding-left: 0; padding-right: 0; }
  .install-steps li { padding: 18px 16px 18px 58px; font-size: 14px; }
  .install-steps li::before { left: 16px; top: 18px; }
}
@media (max-width: 360px) {
  .web-top h1 { font-size: 32px; }
}

/* 04.10 · Экран входа на телефоне (PWA, приложение): без матрёшки отступов, кнопки в одну строку */
@media (max-width: 480px) {
  .is-guest #content, .is-guest main.enter { padding-left: 14px; padding-right: 14px; }
  .is-guest .auth-layout { padding: 24px 0 40px; background: none; box-shadow: none; }
  .is-guest .auth-card { padding: 24px 20px; }
  .is-guest .auth-card .btn { font-size: 15px; white-space: nowrap; }
  .is-guest .auth-card h2 { font-size: 32px; }
}
/* Шторка выбора приложения: метка «Рекомендуем» в подписи, текст не сжимается */
.choice .grow { min-width: 0; }
.rec-mark { color: var(--accent); font-weight: 600; }
@media (max-width: 350px) {
  .android .hero-art, .telegram .hero-art { width: 122px; height: 130px; right: -6px; top: 18px; }
  .android .hero-art img, .telegram .hero-art img { width: 126px; height: 126px; }
  .android .hero .eyebrow, .telegram .hero .eyebrow { max-width: calc(100% - 130px); }
  .android .hero h2, .telegram .hero h2 { font-size: 34px; }
}
@media (max-width: 440px) { .android .hero h2, .telegram .hero h2 { max-width: calc(100% - 118px); } }
