/* ============================================================
   PrizmWG — premium dark design system
   ============================================================ */

:root {
  --bg-0: #08090B;
  --bg-1: #0C0E11;
  --bg-2: #111419;
  --bg-3: #16191E;
  --line: #1E242E;
  --line-soft: #171C24;
  --text: #F2F5F9;
  --text-2: #8A94A6;
  --text-3: #5B6676;
  --accent: #38BDF8;
  --accent-soft: #7DD3FC;
  --accent-dim: rgba(56, 189, 248, .14);
  --ok: #34D399;
  --err: #F87171;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* атрибут hidden всегда сильнее любых display-правил */
[hidden] { display: none !important; }
.section { padding: 88px 24px; }
.dim { color: var(--text-3); }

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
p { color: var(--text-2); }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--text); }

.tech-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: .9;
}
.tech-label.center { display: block; text-align: center; }

/* ---------- navbar ---------- */

#siteNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
#siteNav.scrolled {
  background: rgba(8, 9, 11, .78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner { display: flex; align-items: center; height: 64px; gap: 32px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 1.02rem; letter-spacing: .02em;
}
.brand:hover { color: var(--text); }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--text-2); font-size: .88rem; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }

.btn-ghost {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--text-2);
  transition: border-color .15s ease, color .15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.nav-burger { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }

/* ---------- hero ---------- */

.hero { padding: 168px 24px 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr;
  align-items: center; gap: 48px; min-height: 420px;
}
.hero-copy .tech-label { margin-bottom: 22px; }
.hero-sub { margin-top: 18px; font-size: 1.06rem; max-width: 46ch; }

.hero-visual { position: relative; display: grid; place-items: center; }
.prism { width: min(100%, 380px); height: auto; }

.cursor-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(56, 189, 248, .10), transparent 65%);
  transition: opacity .3s ease;
}

.prism .orbit { animation: spin 60s linear infinite; transform-origin: 180px 180px; }
@keyframes spin { to { transform: rotate(360deg); } }

.prism .flow {
  stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round;
  stroke-dasharray: 10 160; stroke-opacity: .75;
  animation: dashflow 4.5s linear infinite;
}
.prism .f2 { animation-delay: -1.5s; }
.prism .f3 { animation-delay: -3s; }
@keyframes dashflow { from { stroke-dashoffset: 170; } to { stroke-dashoffset: -170; } }

.prism .node { fill: var(--accent); animation: nodepulse 2.6s ease-in-out infinite; }
.prism .n2 { animation-delay: .8s; }
.prism .n3 { animation-delay: 1.6s; }
@keyframes nodepulse { 0%,100% { opacity:.45; } 50% { opacity:1; } }

.prism .core { transform-origin: 180px 180px; animation: corepulse 2.2s ease-in-out infinite; }
@keyframes corepulse { 0%,100% { opacity:.7; } 50% { opacity:1; } }

/* ---------- generator card ---------- */

.generator-section { padding-top: 40px; }

.gen-card {
  position: relative;
  max-width: 860px; margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 34px 34px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.02),
    0 30px 80px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.gen-glow {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(480px 160px at 50% -40px, rgba(56,189,248,.08), transparent 70%);
}

.gen-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.proto-toggle { display: inline-flex; background: var(--bg-0); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.proto-btn {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  padding: 7px 16px; border-radius: 999px; border: none;
  background: transparent; color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.proto-btn.active { background: var(--bg-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.proto-btn.is-soon { cursor: default; }
.soon-badge {
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(56,189,248,.35);
  border-radius: 999px; padding: 1px 7px;
}

.gen-run { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.gen-status { flex: 1; min-width: 220px; }

.btn-primary {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: .8rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: #EAF6FF;
  background: linear-gradient(180deg, #14202C, #0E1620);
  border: 1px solid rgba(56,189,248,.4);
  border-radius: 999px; padding: 17px 38px; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(125,211,252,.15);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,.65);
  box-shadow: 0 14px 36px rgba(0,0,0,.55), 0 0 24px rgba(56,189,248,.12), inset 0 1px 0 rgba(125,211,252,.25);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(186,230,253,.10), transparent);
  transition: left .6s ease;
}
.btn-primary:hover::after { left: 120%; }
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(.99); }
.btn-primary:disabled { opacity: .6; cursor: wait; }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(125,211,252,.3); border-top-color: var(--accent-soft);
  animation: spin .7s linear infinite;
}

/* route loading animation */
.route { display: block; width: min(240px, 100%); height: 40px; margin-bottom: 6px; }
.ra-line { stroke: #232c3a; stroke-width: 1.5; }
.ra-node { fill: var(--accent); opacity: .8; }
.ra-end { animation: nodepulse 1.4s ease-in-out infinite; }
.ra-packet { fill: none; stroke: var(--accent-soft); stroke-width: 1.4; animation: packetrun 1.15s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes packetrun {
  from { transform: translateX(12px); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  to   { transform: translateX(206px); opacity: 0; }
}

#genStatus { min-height: 22px; font-family: var(--mono); font-size: .78rem; letter-spacing: .05em; color: var(--ok); }
#genStatus.error { color: var(--err); }

/* result head */
.result-head {
  display: grid; grid-template-columns: auto auto 1fr; gap: 36px;
  align-items: end;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  opacity: .35;
  transition: opacity .5s ease, filter .5s ease;
  filter: saturate(.4);
}
.gen-card.is-ready .result-head { opacity: 1; filter: none; }
.rh-cell strong { display: block; font-size: .95rem; letter-spacing: .01em; }
.tech-label { margin-bottom: 2px; display: inline-block; }
.rh-status { color: var(--ok); }
.rh-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  font-family: var(--mono); font-size: .7rem;
  padding: 4px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-0); color: var(--text-2);
}
.chip b { color: var(--text); font-weight: 500; }

#cfgOut {
  width: 100%; resize: vertical;
  background: var(--bg-0); color: #A8D8F0;
  border: 1px solid var(--line); border-radius: var(--r-md);
  margin-top: 22px; padding: 18px;
  font-family: var(--mono); font-size: .82rem; line-height: 1.6;
  white-space: pre; outline: none;
  transition: border-color .2s ease;
}
#cfgOut:focus { border-color: #24303f; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn-tool {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s ease, transform .15s ease, opacity .15s ease;
}
.btn-tool:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.btn-tool:disabled { opacity: .38; cursor: not-allowed; }
.btn-tool.accent { border-color: rgba(56,189,248,.45); color: var(--accent-soft); }

/* advanced settings */
.advanced { margin-top: 24px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.advanced summary {
  list-style: none; cursor: pointer;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2);
  display: flex; align-items: center; gap: 8px; width: fit-content;
  transition: color .15s ease;
}
.advanced summary:hover { color: var(--text); }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary svg { transition: transform .2s ease; }
.advanced[open] summary svg { transform: rotate(180deg); }

.settings {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin-top: 18px;
}
.field label {
  display: block; font-family: var(--mono); font-size: .64rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 6px;
}
.field select,
.field input[type="text"] {
  width: 100%; padding: 10px 12px;
  background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--text); font-size: .88rem; font-family: var(--font);
  outline: none; transition: border-color .15s ease;
}
.field select:focus,
.field input[type="text"]:focus { border-color: rgba(56,189,248,.55); }
#endpointCustom { margin-top: 8px; font-family: var(--mono); }
.field-toggles { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.switch-row {
  display: flex !important; align-items: center; gap: 9px; cursor: pointer;
  font-size: .88rem !important; text-transform: none !important;
  letter-spacing: 0 !important; font-family: var(--font) !important;
  color: var(--text) !important; margin-bottom: 0 !important;
}
.switch-row input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* ---------- QR modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; place-items: center;
  background: rgba(4, 6, 8, .72);
  backdrop-filter: blur(14px);
}
.modal.open { display: grid; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-panel {
  position: relative;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 34px 38px 30px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  animation: rise .28s cubic-bezier(.22,.8,.36,1);
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer;
  display: grid; place-items: center;
  transition: color .15s ease, border-color .15s ease;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); }
#qrModalImg {
  display: block; margin: 18px auto 16px;
  background: #fff; padding: 10px; border-radius: 10px;
  image-rendering: pixelated;
  box-shadow: 0 0 40px rgba(56,189,248,.15);
}
.modal-sub { text-align: center; color: var(--text); font-weight: 600; font-size: .92rem; }
.modal-sub span { color: var(--text-2); font-weight: 400; font-size: .84rem; }

/* ---------- sections ---------- */

.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.split-body p { font-size: 1rem; margin-bottom: 14px; max-width: 60ch; }
.dim-note { color: var(--text-3); font-size: .86rem; }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.step {
  background: var(--bg-1); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 26px 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.step:hover { border-color: #263140; transform: translateY(-3px); }
.step svg { width: 40px; height: 40px; margin-bottom: 18px; }
.step-num { font-family: var(--mono); font-size: .68rem; color: var(--text-3); letter-spacing: .2em; float: right; }
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: .88rem; }

.privacy-card {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 42px 46px;
}
.privacy-copy h2 { margin-bottom: 10px; }
.pv-flow { stroke-dasharray: 5 9; animation: dashflow 3s linear infinite; opacity: .8; }
.pv-flow.d2 { animation-delay: -1.5s; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  padding: 30px 28px;
  background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
}
.feature:nth-child(2) { background: var(--bg-2); border-color: var(--line); }
.feat-big {
  display: block;
  font-family: var(--mono); font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: .12em; color: var(--text); margin-bottom: 10px;
}
.feat-big::after { content: ''; display: block; width: 34px; height: 1px; background: var(--accent); margin-top: 12px; opacity: .7; }
.feature p { font-size: .9rem; }

.app-card {
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(56,189,248,.05), transparent 55%), var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 40px 46px;
}
.app-card h2 { margin-bottom: 8px; }
.app-card p { max-width: 52ch; }

.timeline { list-style: none; margin-top: 34px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--line));
  opacity: .5;
}
.timeline li { display: flex; gap: 22px; padding: 16px 0; align-items: baseline; }
.timeline li span {
  font-family: var(--mono); font-size: .72rem; color: var(--accent);
  background: var(--bg-0); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 11px; flex-shrink: 0; z-index: 1;
}
.timeline b { color: var(--text); font-weight: 600; }

.faq-list { max-width: 780px; margin-top: 26px; }
.faq-list details { border-bottom: 1px solid var(--line-soft); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  font-weight: 600; font-size: .98rem; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color .15s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details[open] summary { color: var(--accent-soft); }
.faq-list details p { padding: 0 0 22px; font-size: .92rem; max-width: 64ch; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 40px; padding: 46px 0 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 12px; }
.footer-brand strong { color: var(--text); }
.footer-brand span { color: var(--text-3); font-size: .85rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: .87rem; }
.footer-base {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line-soft);
  color: var(--text-3); font-size: .8rem;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .prism .flow, .pv-flow { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero { padding-top: 130px; }
  .hero-visual { order: -1; }
  .prism { width: min(70vw, 300px); }
  .split, .privacy-card { grid-template-columns: 1fr; gap: 24px; }
  .steps3 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .result-head { grid-template-columns: 1fr 1fr; gap: 18px; }
  .rh-chips { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(8,9,11,.97); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-burger { display: block; margin-left: auto; }
  .nav-actions { display: none; }
  .section { padding: 60px 24px; }
  .gen-card { padding: 22px 20px 26px; }
  .gen-run { flex-direction: column; align-items: stretch; text-align: center; }
  .btn-primary { width: 100%; }
  .actions { flex-direction: column; }
  .btn-tool { justify-content: center; }
  #cfgOut { font-size: .74rem; }
  .privacy-card, .app-card { padding: 28px 24px; }
}

/* ============================================================
   Кнопка и окно настроек + мобильная адаптация
   ============================================================ */

.btn-gear {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-2);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 20px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-gear:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.btn-gear svg { transition: transform .5s ease; }
.btn-gear:hover svg { transform: rotate(60deg); }

.modal-panel.modal-wide {
  width: min(640px, calc(100vw - 28px));
  max-height: min(86vh, 780px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#settingsModal .settings { margin-top: 24px; }
.btn-done { width: 100%; margin-top: 26px; padding: 14px; }

@media (max-width: 720px) {
  .modal-panel { padding: 26px 18px 22px; }
  .btn-gear { width: 100%; justify-content: center; }
  .gen-run { gap: 12px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 16px; }
  .hero { padding: 118px 16px 32px; }
  .hero-sub { font-size: 1rem; }
  .prism { width: min(80vw, 260px); }
  .gen-card { padding: 20px 16px 24px; border-radius: 14px; }
  .gen-head { padding-bottom: 18px; margin-bottom: 20px; }
  .proto-toggle { width: 100%; justify-content: center; }
  .btn-primary { padding: 15px 26px; font-size: .74rem; letter-spacing: .1em; }
  #cfgOut { margin-top: 18px; padding: 12px; font-size: .68rem; }
  .result-head { grid-template-columns: auto auto; gap: 16px; margin-top: 20px; }
  .rh-chips { grid-column: 1 / -1; justify-content: flex-start; }
  .actions { gap: 10px; }
  .btn-tool { width: 100%; justify-content: center; padding: 13px 18px; }
  .timeline li span { padding: 5px 9px; }
  .footer-inner { flex-direction: column; }
  .footer-base { font-size: .74rem; }
}

/* ============================================================
   v4: компактная страница — Android-блок, плашка, мобильная версия
   ============================================================ */

.privacy-note {
  margin-top: 18px;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .04em; color: var(--text-3);
}

.android-strip {
  display: flex; align-items: center; gap: 6px;
  max-width: 860px; margin: 16px auto 0;
  background: linear-gradient(120deg, rgba(56,189,248,.10), rgba(56,189,248,.03));
  border: 1px solid rgba(56,189,248,.35); border-radius: var(--r-md);
  padding: 6px 6px 6px 14px;
}
.strip-link {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: .86rem;
}
.strip-link:hover { color: var(--text); }
.strip-link svg { flex-shrink: 0; stroke: var(--accent-soft); }
.strip-link b { color: var(--accent-soft); white-space: nowrap; }
.strip-close {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-2); font-size: 1.15rem; line-height: 1;
}
.strip-close:hover { color: var(--text); }

.app-card {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 28px;
}
.app-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid rgba(56,189,248,.4);
}
.app-copy h2 { margin-bottom: 6px; }
.app-actions { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.apk-note {
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
}

/* ---------- инструкция: выбор устройства ---------- */

.instr-sub { margin-top: 2px; max-width: 52ch; }

.dev-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 26px 0 6px;
}
.dev-tab {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  cursor: pointer; transition: all .15s ease;
}
.dev-tab:hover { border-color: var(--accent); color: var(--text); }
.dev-tab.active {
  background: var(--accent-dim); border-color: rgba(56,189,248,.5);
  color: var(--accent-soft);
}

.dev-panel { display: none; }
.dev-panel.active { display: block; animation: devFade .25s ease; }
@keyframes devFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- мобильная версия (перебивает всё выше) ---------- */
@media (max-width: 720px) {
  /* шапку на мобилках убираем: название слева и переключатель разделов справа не нужны */
  #siteNav { display: none !important; }
  .hero { padding-top: 56px; }

  /* большую анимацию-призму рядом с заголовком тоже убираем */
  .hero-visual { display: none !important; }
  /* герой: компактно, по центру */
  .hero { padding: 100px 16px 4px; min-height: 0; }
  .hero-grid { gap: 14px; }
  .hero-copy { text-align: center; }
  .hero-copy .tech-label { margin-bottom: 12px; }
  .hero-sub { margin: 10px auto 0; font-size: .95rem; max-width: 32ch; }
  .hero-visual { order: -1; margin-top: 6px; }
  .prism { width: min(56vw, 210px); }

  /* секции плотнее */
  .section { padding: 40px 16px; }
  .section h2 { font-size: 1.3rem; }

  /* карточка генератора */
  .gen-card { padding: 18px 14px 20px; border-radius: 14px; }
  .gen-head { flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; }
  .gen-head .tech-label { text-align: center; display: block; }
  .proto-toggle { justify-content: center; width: 100%; }
  .gen-run { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn-primary, .btn-gear { width: 100%; padding-left: 18px; padding-right: 18px; }
  .gen-status { min-width: 0; }
.gen-counter {
  margin-top: 8px;
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
}
  .route { margin: 0 auto 4px; }
  #genStatus { text-align: center; }

  /* результат */
  .result-head { grid-template-columns: auto auto; gap: 12px 18px; margin-top: 18px; padding-top: 14px; }
  .rh-chips { grid-column: 1 / -1; justify-content: flex-start; }
  #cfgOut { margin-top: 16px; padding: 12px; font-size: .7rem; min-height: 190px; white-space: pre-wrap; word-break: break-all; }
  .actions { gap: 9px; margin-top: 14px; }
  .btn-tool { width: 100%; justify-content: center; padding: 13px 16px; }
  .privacy-note { margin-top: 14px; font-size: .62rem; }

  /* модалки: во всю ширину, скролл, без зума полей на iOS */
  .modal-panel { width: calc(100vw - 16px); max-height: 90dvh; overflow-y: auto; padding: 24px 16px 20px; }
  .modal-panel.modal-wide { width: calc(100vw - 16px); }
  .field select, .field input[type="text"] { font-size: 16px; }
  .switch-row input { width: 17px; height: 17px; }
  .btn-done { margin-top: 20px; }
  #qrModalImg { width: 200px; height: 200px; }

  /* Android-блок и плашка */
  .app-card { grid-template-columns: 1fr; text-align: center; gap: 16px; padding: 26px 18px; }
  .app-icon { margin: 0 auto; }
  .app-actions { align-items: stretch; width: 100%; }
  .android-strip { margin-top: 12px; padding: 8px; }
  .strip-link span { font-size: .78rem; line-height: 1.35; }
  .strip-link b { white-space: normal; }

  /* контент и футер */
  .timeline li { gap: 14px; padding: 13px 0; }
  .faq-list summary { padding: 15px 0; font-size: .94rem; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .footer-links { justify-content: center; gap: 18px; }
  .footer-base { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}

/* очень узкие экраны */
@media (max-width: 360px) {
  body { font-size: 15px; }
  .btn-primary { font-size: .7rem; letter-spacing: .08em; }
}
