/* ============ как настоящее приложение ============
   Подсказка установки, заставка запуска, поведение касаний. Внешний вид разделов не меняется. */

/* ---------- касания: без выделения текста, увеличения и вспышек ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
img,svg,a{-webkit-user-drag:none;-webkit-touch-callout:none}
button{touch-action:manipulation}

/* ---------- подсказка установки ---------- */
.ih{position:fixed;inset:0;z-index:85;display:flex;align-items:flex-end;justify-content:center;background:rgba(6,7,9,0);transition:background-color .3s ease;padding:0 12px calc(12px + env(safe-area-inset-bottom,0px))}
.ih.on{background:rgba(6,7,9,.55)}
.ih-card{width:100%;max-width:420px;background:var(--surface);border-radius:24px;padding:22px 20px 18px;text-align:center;box-shadow:0 0 0 1px var(--line2),0 20px 60px rgba(0,0,0,.5);
  transform:translateY(110%);transition:transform .38s cubic-bezier(.16,1,.3,1)}
.ih.on .ih-card{transform:none}
.ih-icon{width:64px;height:64px;border-radius:15px;display:block;margin:0 auto 12px;box-shadow:0 6px 20px rgba(0,0,0,.45)}
.ih-card>b{font-family:var(--display);font-size:18px;font-weight:600;display:block}
.ih-card p{margin:6px 0 14px;font-size:14px;color:var(--muted);line-height:1.45}
.ih-card ol{text-align:left;margin:0 0 6px;padding-left:22px;display:flex;flex-direction:column;gap:9px;font-size:14.5px;color:var(--text)}
.ih-k{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:8px;background:var(--raise);vertical-align:middle}
.ih-k svg{width:16px;height:16px;fill:none;stroke:#5EA3FF;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ---------- заставка запуска (совпадает с картинкой запуска iPhone) ---------- */
.boot{flex-direction:column;gap:18px;background:radial-gradient(120% 90% at 50% 0%,#232650 0%,#141833 55%,#0E1124 100%)}
.boot .boot-orb{width:120px;height:120px;--bg:#13151B;--c1:#C46A86;--c2:#4F86C6;--c3:#8C6FE0;--dot-size:.9px;--mask-radius:18%;box-shadow:0 0 0 1.5px rgba(246,235,210,.45)}
.boot b{font-family:var(--display);font-weight:700;font-size:22px;color:var(--text);letter-spacing:.01em}

@media (prefers-reduced-motion:reduce){.ih,.ih-card{transition:none}}

/* ---------- iOS 26: приложение с иконки ----------
   Страница там короче экрана и первые секунды меняет высоту (WebKit bug 301108/301994).
   js/platform/screen.js ставит html.vgap и --apph = высота самого экрана, --st/--sb0 — самые большие
   отступы под часами и полоской «Домой», которые показала iOS. Всё считаем от этих постоянных чисел:
   полноэкранные слои — высотой во весь экран, нижние кнопки и шторки — от низа экрана
   (bottom: 100% − --apph; 100% — текущая высота страницы, CSS пересчитывает сам, без скриптов).
   Во всех остальных случаях (Safari, Android, компьютер) правила не действуют. */
html.vgap{--sb:max(var(--sb0,0px),34px);--stop:var(--st,env(safe-area-inset-top,0px));--lift:calc(100% - var(--apph))}
html.vgap,html.vgap body{min-height:var(--apph)}
html.vgap :is(#home,.view,.view>.veil,.shade,.boot,.ih,#auth,#cfg){top:0;bottom:auto;height:var(--apph)}
html.vgap canvas.scene{top:0;bottom:auto;height:var(--apph)}
html.vgap #home{padding-top:var(--stop);padding-bottom:var(--sb)}
html.vgap .view .in{padding-top:calc(12px + var(--stop));padding-bottom:calc(110px + var(--sb))}
html.vgap .fab{bottom:calc(var(--lift) + 22px + var(--sb))}
html.vgap .toast{bottom:calc(var(--lift) + 90px + var(--sb))}
html.vgap .sheet{bottom:var(--lift);max-height:calc(var(--apph) * .88)}
html.vgap .sheet .in{padding-bottom:calc(24px + var(--sb))}
html.vgap .ih{padding-bottom:calc(12px + var(--sb))}
html.vgap #auth{padding-top:calc(24px + var(--stop));padding-bottom:calc(24px + var(--sb))}
