/* Шрифт Golos Text (SIL OFL 1.1, fonts/OFL.txt) — переменный 400–900, свои файлы от Fontsource 5.3.0.
   Два подмножества: кириллица и латиница; остальные символы — системным шрифтом. */
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/golos-text-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/golos-text-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Пока шрифт грузится — Arial, подогнанный под метрики Golos (ширина русского текста ×1,054,
   латиницы ×1,070; ascent 980 / descent 220 из 1000), чтобы строки не прыгали при подмене. */
@font-face {
  font-family: "Golos Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans");
  size-adjust: 106%; ascent-override: 92.5%; descent-override: 20.8%; line-gap-override: 0%;
}

/* Цвета. Устройство как у Диска, краски свои (решения 45, 49): главный акцент — синий,
   жёлтый — второстепенный (папки, мелкие отметки) и не фирменный. Тёмная — по системе (53). */
:root {
  color-scheme: light dark;
  --bg: #f2f3f5; --card: #fff; --raised: #fff;
  /* серый — темнее, чем у Диска (#9799A3): вторичный текст ≥ 4,5:1 и на фоне, и на карточке (шаг 9д) */
  --ink: #2e3038; --ink-2: #4a4d57; --muted: #6c6f79; --faint: #b4b7bf;
  --line: #e6e7eb; --line-2: #d6d8de; --fill: #eef0f3; --fill-2: #e4e6ea; --hover: #f6f7f9;
  --accent: #2b6cf0; --accent-hover: #1f5bd8; --accent-ink: #fff; --accent-soft: #e9f0fe; --accent-mid: #c7d8fc;
  --gold: #f1bb2a; --gold-soft: #fff4d1; --gold-ink: #7a5600;
  --ok: #178548; --ok-bg: #e5f5ec;
  --wait: #9a5c00; --wait-bg: #fff2dc; --wait-line: #ecc98c;
  --bad: #c43a2f; --bad-bg: #fdecea; --bad-ink: #8e2a20;
  --run: var(--accent); --run-bg: var(--accent-soft); --run-fill: var(--accent-mid);
  --shadow-1: 0 1px 2px rgba(20, 22, 30, .06), 0 1px 1px rgba(20, 22, 30, .04);
  --shadow-2: 0 12px 40px rgba(20, 22, 30, .16), 0 2px 8px rgba(20, 22, 30, .08);
  --backdrop: rgba(20, 22, 30, .42);
  /* типы файлов */
  --t-folder: var(--gold); --t-image: #16a088; --t-video: #8b5cf6; --t-audio: #d9468f; --t-doc: #2b6cf0;
  --t-text: #6b7280; --t-sheet: #1f9a55; --t-slides: #e0702a; --t-pdf: #d93f33; --t-archive: #9a7148;
  --t-code: #4b5f86; --t-file: #8b8e98;

  --r-sm: 8px; --radius: 12px; --r-lg: 20px; --row: 52px;
  /* движение (решение 50): 150–300 мс, мягкий выход */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dim: rgba(14, 16, 22, .5);
  --font: "Golos Text", "Golos Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font: 15px/1.5 var(--font);
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181b; --card: #222327; --raised: #2a2b30;
    --ink: #e7e8eb; --ink-2: #c3c5cb; --muted: #8f929b; --faint: #5f626b;
    --line: #313238; --line-2: #3d3f46; --fill: #2c2d32; --fill-2: #36373d; --hover: #28292e;
    --accent: #5b8cff; --accent-hover: #7aa1ff; --accent-ink: #0e1426; --accent-soft: #1f2a44; --accent-mid: #2e4170;
    --gold: #e2b33a; --gold-soft: #3a3120; --gold-ink: #f0cd76;
    --ok: #4cc584; --ok-bg: #19342a;
    --wait: #f0aa4a; --wait-bg: #3a2c17; --wait-line: #6b5126;
    --bad: #ff7a6e; --bad-bg: #3d1f1d; --bad-ink: #ffb1a9;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 16px 48px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
    --backdrop: rgba(0, 0, 0, .6);
    --t-image: #3cc4aa; --t-video: #a78bfa; --t-audio: #f0719f; --t-doc: #6e9bff; --t-text: #9ca3af;
    --t-sheet: #4cc584; --t-slides: #f2914f; --t-pdf: #ff7468; --t-archive: #c39a6c; --t-code: #8ea2c8; --t-file: #8f929b;
  }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
b, strong { font-weight: 600; }
code { font-size: .92em; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
::selection { background: var(--accent-mid); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
/* только для читалок с экрана: полный статус рядом со значком */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* иконки из спрайта icons.svg */
.ic { flex: none; width: 22px; height: 22px; color: var(--t-file); }
.ic--folder { color: var(--t-folder); } .ic--image { color: var(--t-image); } .ic--video { color: var(--t-video); }
.ic--audio { color: var(--t-audio); } .ic--doc { color: var(--t-doc); } .ic--text { color: var(--t-text); }
.ic--sheet { color: var(--t-sheet); } .ic--slides { color: var(--t-slides); } .ic--pdf { color: var(--t-pdf); }
.ic--archive { color: var(--t-archive); } .ic--code { color: var(--t-code); }

/* каркас */
.shell { max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; flex-wrap: wrap; }
.top__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.top__logo:hover { color: var(--ink); }
.top__mark { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.top__mark svg { width: 18px; height: 18px; stroke: var(--accent-ink); }
.top__sub { font-weight: 400; color: var(--muted); font-size: 14px; letter-spacing: 0; }
.top__acc { color: var(--muted); font-size: 14px; background: var(--card); border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow-1); }
.top__acc:empty { display: none; }

/* первый экран */
.hero { padding: 30px 0 12px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; margin: 0 auto 14px; max-width: 820px; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 680px; margin: 0 auto 26px; }
.linkform { display: flex; gap: 10px; max-width: 760px; margin: 0 auto; padding: 8px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-2); }
.linkform__field { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 10px; }
.linkform__disk { flex: none; width: 28px; height: 28px; }
.linkform .linkform__input { flex: 1 1 auto; border: 0; background: transparent; padding: 10px 4px; font-size: 16px; box-shadow: none; }
.linkform .linkform__input:focus { outline: none; box-shadow: none; }
.linkform:focus-within { box-shadow: var(--shadow-2), 0 0 0 2px var(--accent); }
.linkform .btn--primary { padding: 12px 22px; font-size: 15.5px; }
.linkform__works { display: inline-flex; align-items: center; gap: 6px; }
.quiet { color: var(--muted); font-size: 13.5px; }
.hero .quiet { margin: 14px 0 0; }
.hero .msg { max-width: 760px; margin: 14px auto 0; text-align: left; }

/* поля и кнопки */
.input { font: inherit; color: var(--ink); padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--faint); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { font: inherit; font-weight: 500; padding: 10px 18px; border-radius: var(--radius); border: 0; background: var(--fill); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(43, 108, 240, .25); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--sm { padding: 6px 12px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--fill); }

.msg { padding: 12px 16px; border-radius: var(--radius); margin: 12px 0; }
.msg--bad { background: var(--bad-bg); color: var(--bad-ink); }
.msg--warn { background: var(--wait-bg); color: var(--gold-ink); }
@media (prefers-color-scheme: dark) { .msg--warn { color: var(--wait); } }

/* недавние ссылки — карточками (решение 51) */
.recent { max-width: 760px; margin: 24px auto 0; text-align: left; }
.recent h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px 4px; }
.recent__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rc { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: box-shadow .15s, translate .15s var(--ease); }
.rc:hover { color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 2px var(--accent-mid); translate: 0 -2px; }
.rc .ic { width: 30px; height: 30px; }
.rc__t { flex: 1 1 auto; min-width: 0; display: grid; line-height: 1.35; }
.rc__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc__ring { width: 22px; height: 22px; }
.rc__ring.is-done .ring__bar { stroke: var(--ok); }

/* карточка с файлами */
.panel { background: var(--card); border-radius: var(--r-lg); padding: 22px; margin: 22px 0; box-shadow: var(--shadow-1); }
.panel__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel__title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 0; word-break: break-word; }

.sum { margin: 14px 0 6px; }
.sum__big { font-size: 17px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.sum__big b { font-size: 24px; font-weight: 700; }
.bar { position: relative; height: 6px; background: var(--fill); border-radius: 3px; overflow: hidden; }
/* scaleX, а не width: двигается видеокартой; светлая — с начатыми, тёмная поверх — готовое */
.bar__done, .bar__part { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); transition: transform .45s var(--ease); }
.bar__done { background: var(--accent); z-index: 1; }
.bar__part { background: var(--accent-mid); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.chip { font: inherit; font-size: 13.5px; padding: 6px 13px; border-radius: 999px; border: 0; background: var(--fill); color: var(--ink); cursor: pointer; transition: background-color .15s; }
.chip:hover { background: var(--fill-2); }
.chip span { color: var(--muted); margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--ink); color: var(--card); }
.chip.is-on span { color: var(--faint); }

.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 6px; }

/* папка: строка пути, сводка текущей папки, переключатель вида */
.fbar { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 14px; }
.crumbs { flex: 1 1 auto; min-width: 0; }
.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.crumbs__list li { display: flex; align-items: center; min-width: 0; max-width: 100%; }
.crumbs__list li + li::before { content: ""; flex: none; width: 6px; height: 6px; margin: 0 7px 0 3px; border: solid var(--faint); border-width: 1.6px 1.6px 0 0; transform: rotate(45deg); }
.crumbs__b { font: inherit; border: 0; background: none; color: var(--muted); padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color .15s, color .15s; }
.crumbs__b:hover { background: var(--fill); color: var(--ink); }
.crumbs__list [aria-current] { font-weight: 600; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs__gap { color: var(--muted); padding: 4px 2px; cursor: default; }
.fbar__sum { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.vt { display: flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 10px; }
.vt__b { width: 34px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: background-color .15s, color .15s; }
.vt__b svg { width: 18px; height: 18px; fill: currentColor; }
.vt__b:hover { color: var(--ink); }
.vt__b.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }

/* окно папки: список или плитки, в DOM только видимое */
.list { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tv { position: relative; overflow: auto; overscroll-behavior: contain; }
.tv--empty::after { content: attr(data-empty); position: absolute; top: 14px; left: 16px; right: 16px; color: var(--muted); }
.tv__rows { position: absolute; top: 0; left: 0; right: 0; }
/* превью поверх иконки типа: пока грузится или не пришло — видна иконка */
.th { flex: none; position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; overflow: hidden; }
.th .ic { width: 26px; height: 26px; }
.th__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; background: var(--fill); }
.th__img.is-on { opacity: 1; }
.tv__row { position: absolute; left: 0; right: 0; height: var(--row); display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tv__row:hover { background: var(--hover); }
.tv__row.is-dir { cursor: pointer; }
.tv__ck { flex: none; margin: 0; width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.tv__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv__name--dir { font-weight: 600; }
.tv__size { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.tv__st { flex: none; width: 250px; display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; overflow: hidden; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.st__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv__now { flex: none; font: inherit; font-size: 12.5px; padding: 1px 9px; border-radius: 6px; border: 1px solid var(--wait-line); background: transparent; color: var(--wait); cursor: pointer; }
.tv__now:hover { background: var(--wait-bg); }
.tile { position: absolute; left: 0; top: 0; box-sizing: border-box; padding: 8px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 5px; transition: background-color .15s; }
.tile:hover { background: var(--hover); }
.tile__pic { position: relative; flex: none; height: var(--pic, 128px); border-radius: 10px; background: var(--fill); overflow: hidden; }
.tile .th { position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; }
.tile .th .ic { width: 52px; height: 52px; }
.tile.is-dir { cursor: pointer; }
.tile.is-dir .tile__pic { background: none; }
.tile.is-dir .th .ic { width: min(104px, 80%); height: min(104px, 80%); }
.tile .tv__ck { position: absolute; top: 15px; left: 15px; width: 18px; height: 18px; opacity: 0; transition: opacity .15s; }
.tile:hover .tv__ck, .tile.is-off .tv__ck, .tile .tv__ck[data-mixed], .tile .tv__ck:focus-visible { opacity: 1; }
@media (hover: none) { .tile .tv__ck { opacity: 1; } }
.tile .tv__name { flex: none; font-size: 14px; line-height: 1.35; text-align: center; padding: 0 2px; }
.tile.is-dir .tv__name { font-weight: 600; }
.tile__foot { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.tile .tv__st { width: auto; flex: 0 1 auto; min-width: 0; gap: 5px; font-size: 12.5px; }
.tile .tv__now { padding: 0 6px; }
.tile.is-off .tile__pic { opacity: .5; }
/* статусы (шаг 9в) — значком, полосой и кольцом; полный текст — в подсказке */
.sti { flex: none; width: 18px; height: 18px; color: var(--muted); }
.sti--done, .sti--ok { color: var(--ok); }
.sti--wait, .sti--warn, .sti--pay { color: var(--gold); }
.sti--queued { color: var(--faint); }
.sti--fail { color: var(--bad); }
.sti--server, .sti--info { color: var(--accent); }
.st--wait .st__t { color: var(--wait); }
.st--server .st__t { color: var(--run); }
.st--pay .tv__st { color: var(--gold-ink); cursor: pointer; }
.st--pay .tv__st:hover .st__t { text-decoration: underline; text-underline-offset: 2px; }
.st--fail .tv__st { color: var(--bad); }
.st--done .tv__st { color: var(--ok); }
.tile.st--done .tv__st { color: var(--muted); }
.st--off .tv__name, .st--off .tv__size, .st--off .tv__st { color: var(--faint); }
.st--off .ic { opacity: .45; }
@media (prefers-color-scheme: dark) { .st--pay .tv__st { color: var(--gold); } }
/* ждёт повтора — пауза тихо «дышит», чтобы было видно: живое, не зависло */
.st--wait .sti--wait, .ring--wait .sti { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

/* полоса качающегося файла: scaleX + бегущий блик */
.pb { position: relative; flex: 1 1 auto; max-width: 168px; height: 6px; border-radius: 3px; background: var(--run-bg); overflow: hidden; }
.pb > i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .4s linear; overflow: hidden; }
.pb > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transform: translateX(-100%); animation: shine 1.6s ease-in-out infinite; }
@keyframes shine { to { transform: translateX(100%); } }
.pb__n { flex: none; min-width: 40px; text-align: right; color: var(--run); font-weight: 600; }

/* кольцо прогресса: SVG, pathLength=100, начало сверху */
.ring { position: relative; flex: none; display: inline-grid; place-items: center; width: 58px; height: 58px; }
.ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring__track { stroke: rgba(255, 255, 255, .26); }
.ring__bar { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .45s var(--ease); }
.ring--wait .ring__bar { stroke: var(--gold); }
.ring__n { position: relative; color: #fff; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring__n:not(:empty)::after { content: "%"; font-size: 10px; font-weight: 600; margin-left: 1px; }
.ring > .sti { position: relative; width: 26px; height: 26px; }
.ring--spin .ring__svg { animation: spin 1.1s linear infinite; }
@keyframes spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
/* маленькое — у папки: сколько из выбранного скачано */
.ring--sm { width: 18px; height: 18px; }
.ring--sm circle { stroke-width: 5; }
.ring--sm .ring__track { stroke: var(--fill-2); }
.ring--sm .ring__bar { stroke: var(--accent); }
.ring--sm.ring--wait .ring__bar { stroke: var(--gold); }

/* поверх картинки плитки: притемнение и кольцо, значок в углу */
.ov { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ov--dim { background: var(--dim); animation: fade-in .25s ease-out backwards; }
.ov--soft { background: rgba(14, 16, 22, .2); }
.ov--soft .sti { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3)); }
.st--done .ov, .st--queued .ov, .st--fail .ov { place-items: end; padding: 7px; }
.st--done .ov .sti, .st--fail .ov .sti, .st--queued .ov .sti { width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--card), 0 1px 4px rgba(0, 0, 0, .25); }
.st--queued .ov .sti { color: var(--muted); }
.st--fail .th { opacity: .55; }
@keyframes fade-in { from { opacity: 0; } }

/* вспышка: файл докачался на глазах — зелёный отсвет и галочка с отскоком */
.is-flash .sti--done { animation: check-pop .6s var(--ease) backwards; }
.tile.is-flash .ov::before { content: ""; position: absolute; inset: 0; background: var(--ok); animation: flash .8s ease-out both; }
@keyframes check-pop { 0% { transform: scale(.2); opacity: 0; } 55% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); } }
@keyframes flash { from { opacity: .4; } to { opacity: 0; } }

/* заход в папку, фильтр, смена вида — ячейки въезжают каскадом (translate не мешает
   transform, которым ячейка поставлена на место) */
.tv__cell.is-in { animation: cell-in .26s var(--ease) backwards; animation-delay: calc(var(--k, 0) * 16ms); }
@keyframes cell-in { from { opacity: 0; translate: 0 10px; } }
.tile { transition: background-color .15s, translate .2s var(--ease); }
@media (hover: hover) { .tile:hover { translate: 0 -2px; } }

.explain { margin-top: 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--wait-bg); }
.explain p { margin: 4px 0; }

/* ── первый экран (шаг 9г, решение 51): живая витрина и «Как это работает» сценами ──
   Сцены рисует ui/showcase.js по часам (кадр — функция времени), здесь — только вид.
   Движется transform/opacity; кольца — штрих SVG, их единицы. */

/* «фото» в примерах — градиенты, своих картинок не грузим */
.pic { background-color: #9cc7f2; }
.pic--sea { background: radial-gradient(circle at 74% 26%, #fff6d8 0 7%, transparent 8%), linear-gradient(#8ec5ff 0 46%, #2f7fd1 46% 68%, #1f5fa8 68% 74%, #e8d3a2 74%); }
.pic--hills { background: radial-gradient(130% 85% at 22% 112%, #3f8f5a 50%, transparent 51%), radial-gradient(120% 95% at 84% 122%, #2c6e45 50%, transparent 51%), radial-gradient(90% 70% at 60% 100%, #8fb5c9 50%, transparent 51%), linear-gradient(#a9d6ff, #e6f3ff); }
.pic--dusk { background: radial-gradient(circle at 30% 70%, #f7c873 0 10%, transparent 11%), linear-gradient(160deg, #3b2a6b, #b34f7c 58%, #f2a65a); }
.pic--sunset { background: radial-gradient(circle at 50% 62%, #ffe08a 0 11%, transparent 12%), linear-gradient(#f0845a, #f6c26b 62%, #5a4a7a 62%, #2e2a4f); }
.pic--city { background: linear-gradient(to top, #273049 0 26%, transparent 26%), repeating-linear-gradient(90deg, #3d4b6e 0 9%, #56669a 9% 15%, #2f3a58 15% 22%) bottom / 100% 58% no-repeat, linear-gradient(#f5b98a, #c9d8f2); }
.pic--meadow { background: radial-gradient(circle at 78% 24%, #fff3c4 0 8%, transparent 9%), radial-gradient(140% 60% at 50% 100%, #4f9e48 55%, transparent 56%), linear-gradient(#bfe6ff 0 58%, #7cc46b 58%); }

/* статусы в примерах — те же, что в настоящей папке */
.sc-ov { position: absolute; inset: 0; display: grid; place-items: center; background: var(--dim); opacity: 0; transition: opacity .25s; }
.st--run .sc-ov, .st--wait .sc-ov { opacity: 1; }
.sc-ov .ring { width: 46px; height: 46px; }
.sc-ov .ring__n { font-size: 13px; }
.sc-ov .ring > .sti { display: none; width: 22px; height: 22px; }
.st--wait .sc-ov .ring > .sti { display: block; }
.st--wait .sc-ov .ring__n { display: none; }
.sc-ok, .sc-q { position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--card), 0 1px 4px rgba(0, 0, 0, .25); opacity: 0; }
.st--done .sc-ok, .st--q .sc-q { opacity: 1; }
.st--q .sc-pic { opacity: .6; }
.sc-play { position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: rgba(14, 16, 22, .45); }
.sc-play::after { content: ""; position: absolute; left: 7.5px; top: 5.5px; border: 4.5px solid transparent; border-left: 7px solid #fff; border-right: 0; }
.is-flash .sc-pic::after, .is-flash .hs-pic::after { content: ""; position: absolute; inset: 0; background: var(--ok); animation: flash .8s ease-out both; }

/* пауза показа (цикл длиннее 5 с — WCAG 2.2.2) */
.sc-pause { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fill); color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.sc-pause:hover { background: var(--fill-2); color: var(--ink); }
.sc-pause svg { width: 16px; height: 16px; }
.sc-pause__p { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.sc-pause__g { fill: currentColor; display: none; }
.is-paused .sc-pause__p { display: none; }
.is-paused .sc-pause__g { display: inline; }

/* витрина под полем: папка забирается на глазах */
.sc { max-width: 760px; margin: 20px auto 0; text-align: left; }
.sc-win { background: var(--card); border-radius: var(--r-lg); padding: 12px 14px 10px; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.sc-bar { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.sc-from, .sc-to { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 12px 4px 6px; border-radius: 999px; white-space: nowrap; }
.sc-from { background: var(--fill); color: var(--ink-2); flex: 0 1 auto; overflow: hidden; }
.sc-from img { flex: none; width: 20px; height: 20px; }
.sc-url { overflow: hidden; text-overflow: ellipsis; }
.sc-to { background: var(--accent-soft); color: var(--ink); font-weight: 600; flex: none; }
.sc-to .ic { width: 20px; height: 20px; }
.sc-path { color: var(--muted); font-weight: 400; }
.sc-arrow { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.sc-bar .sc-pause { margin-left: auto; }
.sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; padding: 12px 0 10px; transition: opacity .5s; }
.sc-tile { min-width: 0; display: grid; gap: 3px; }
.sc-win.is-in .sc-tile { animation: cell-in .3s var(--ease) backwards; animation-delay: calc(var(--k, 0) * 45ms); }
.sc-pic { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; transition: opacity .25s; }
.sc-pic--doc { display: grid; place-items: center; background: var(--fill); }
.sc-pic--doc .ic { width: 38px; height: 38px; }
.sc-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-st { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st--run .sc-st { color: var(--accent); }
.st--wait .sc-st { color: var(--wait); }
.st--done .sc-st { color: var(--ok); }
.sc-foot { display: flex; align-items: center; gap: 12px; padding: 10px 0 0; border-top: 1px solid var(--line); transition: opacity .5s; }
.sc-win.is-fade .sc-grid, .sc-win.is-fade .sc-foot { opacity: 0; }
.sc-ring { width: 38px; height: 38px; }
.sc-ring .ring__track { stroke: var(--run-bg); }
.sc-ring .ring__bar { stroke: var(--accent); }
.sc-ring.is-done .ring__bar { stroke: var(--ok); }
.sc-t { display: grid; min-width: 0; line-height: 1.35; }
.sc-t b { font-variant-numeric: tabular-nums; }
.sc-sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-sub.is-wait { color: var(--wait); }

/* как это работает: четыре сцены по очереди, активная — с полосой времени */
.how { padding: 22px 0 8px; }
.how__head { display: flex; align-items: center; gap: 12px; }
.how h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 16px 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { position: relative; overflow: hidden; padding: 10px 10px 16px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-1); cursor: pointer; transition: box-shadow .25s, translate .25s var(--ease); }
.step.is-on { box-shadow: var(--shadow-1), 0 0 0 2px var(--accent); translate: 0 -3px; }
.step h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 650; margin: 12px 4px 4px; }
.step p { margin: 0 4px; font-size: 14px; color: var(--ink-2); }
.step__n { flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; transition: background-color .25s, color .25s; }
.step.is-on .step__n { background: var(--accent); color: var(--accent-ink); }
.step__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); opacity: 0; }
.step.is-on .step__bar { opacity: 1; }
.step__scene { position: relative; height: 150px; border-radius: 14px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 12.5px; }

/* 1 — ссылка печатается, кнопка нажимается, найдено */
.hs-field { display: flex; align-items: center; gap: 7px; width: 90%; padding: 5px 5px 5px 9px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-1); }
.hs-field img { flex: none; width: 20px; height: 20px; }
.hs-url { min-width: 0; overflow: hidden; white-space: nowrap; color: var(--ink); display: flex; justify-content: flex-end; } /* длинная — видно конец, как в поле */
.hs-caret { flex: none; width: 1.5px; height: 15px; margin-left: -6px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.is-typed .hs-caret { opacity: 0; animation: none; }
@keyframes blink { 50% { opacity: 0; } }
.hs-btn { flex: none; margin-left: auto; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: transform .15s; }
.is-press .hs-btn { transform: scale(.9); }
.hs-found { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-1); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s var(--ease); }
.hs-found .sti { width: 16px; height: 16px; }
.is-found .hs-found { opacity: 1; transform: none; }

/* 2 — папка с превью, лишнее снято */
.hs-head { display: flex; align-items: center; gap: 6px; width: min(86%, 230px); }
.hs-head .ic { width: 18px; height: 18px; }
.hs-head span { margin-left: auto; color: var(--muted); }
.hs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(86%, 230px); }
.hs-t { position: relative; aspect-ratio: 4 / 3; border-radius: 7px; opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s var(--ease); }
.hs-t.is-on { opacity: 1; transform: none; }
.hs-t.is-on.is-off { opacity: .4; }
.hs-ck { position: absolute; left: 4px; top: 4px; width: 13px; height: 13px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 1.5px #fff; transition: background-color .2s; }
.hs-ck::after { content: ""; position: absolute; left: 3.5px; top: 2px; width: 3.5px; height: 6px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: opacity .2s; }
.is-off .hs-ck { background: #fff; }
.is-off .hs-ck::after { opacity: 0; }

/* 3 — файлы летят из Диска в вашу папку (траектория — в единицах контейнера cqw/cqh) */
.step__scene:has(.hs-fly) { display: block; }
.hs-cloud { position: absolute; left: 12%; top: 16px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-1); }
.hs-fly { position: absolute; left: calc(12% + 11px); right: calc(8% + 15px); top: 27px; bottom: 62px; container-type: size; pointer-events: none; }
.hs-f { position: absolute; left: 0; top: 0; width: 22px; height: 22px; opacity: 0; }
.hs-f .ic { width: 22px; height: 22px; }
.hs-f.is-go { animation: fly 1.1s cubic-bezier(.45, 0, .35, 1) both; }
@keyframes fly {
  0% { opacity: 0; transform: translate(0, 0) scale(.7); }
  15% { opacity: 1; }
  50% { transform: translate(55cqw, -2cqh) scale(1.15); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(100cqw - 22px), calc(100cqh - 10px)) scale(.5); }
}
.hs-dir { position: absolute; right: 8%; bottom: 22px; display: grid; justify-items: center; }
.hs-dir .ic { width: 52px; height: 52px; }
.hs-cnt { font-variant-numeric: tabular-nums; }
.hs-w { position: absolute; top: 100%; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 4px; color: var(--wait); font-size: 11.5px; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.hs-w .sti { width: 13px; height: 13px; }
.is-wait .hs-w { opacity: 1; }

/* 4 — застрявший файл: ждёт, докачивается с места обрыва, галочка */
.hs-one { display: flex; align-items: center; gap: 10px; width: 90%; padding: 8px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-1); }
.hs-pic { position: relative; flex: none; width: 84px; height: 58px; border-radius: 9px; overflow: hidden; }
.hs-pic .ring { width: 40px; height: 40px; }
.hs-say { display: grid; min-width: 0; line-height: 1.35; }
.hs-why { color: var(--muted); font-variant-numeric: tabular-nums; }
.hs-why.is-wait { color: var(--wait); }
.st--run .hs-why { color: var(--accent); }
.st--done .hs-why { color: var(--ok); }
.hs-total { color: var(--muted); font-variant-numeric: tabular-nums; }
.hs-total b { color: var(--ink); }

/* подробности — под раскрывашкой, а не стеной текста */
.more { margin: 18px 0 6px; padding: 12px 18px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-1); }
.more summary { cursor: pointer; font-weight: 600; }
.more ul { padding-left: 20px; margin: 10px 0 4px; }
.more li { margin: 6px 0; color: var(--ink-2); }
.more li::marker { color: var(--accent); }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .sc { margin-top: 20px; }
  .sc-win { padding: 10px 10px 8px; }
  .sc-url, .sc-path { display: none; }
  .sc-from { padding-right: 6px; }
  .sc-grid { gap: 8px; }
  .sc-name, .sc-st { display: none; }
  .sc-ov .ring { width: 34px; height: 34px; }
  .sc-ov .ring__n { font-size: 10px; }
  .sc-ov .ring__n:not(:empty)::after { content: none; }
  .sc-pic--doc .ic { width: 26px; height: 26px; }
  .sc-ok, .sc-q { width: 16px; height: 16px; right: 4px; bottom: 4px; }
  .sc-play { transform: scale(.8); left: 3px; top: 3px; }
  .steps { grid-template-columns: 1fr; }
}

.foot { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); margin-top: 28px; font-size: 14px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }

/* оплата */
.dialog { border: 0; border-radius: var(--r-lg); padding: 0; max-width: 540px; width: calc(100% - 24px); background: var(--raised); color: var(--ink); box-shadow: var(--shadow-2); }
.dialog::backdrop { background: var(--backdrop); }
/* окно выезжает снизу, фон затемняется плавно */
.dialog[open] { animation: dlg-in .28s var(--ease); }
.dialog[open]::backdrop { animation: fade-in .28s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.pay { padding: 24px; position: relative; }
.pay__close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--fill); font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.pay__close:hover { background: var(--fill-2); color: var(--ink); }
.pay__title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 0 40px 14px 0; }
.pay__note, .pay__hint { margin: 8px 0; }
.pay__hint { color: var(--gold-ink); }
@media (prefers-color-scheme: dark) { .pay__hint { color: var(--wait); } }
.pay__small { font-size: 13px; color: var(--muted); margin: 8px 0; }
.pay__unl-terms { display: none; }
.pay__unl-terms.is-on { display: block; }
.pay__err { color: var(--bad); }
.pay__go { width: 100%; margin-top: 10px; padding: 14px; font-size: 16px; }
.ladder { display: grid; gap: 8px; margin: 6px 0; }
.ladder__row { display: grid; grid-template-columns: 22px 70px 1fr auto; gap: 8px; align-items: center; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ladder__row:hover { border-color: var(--line-2); }
.ladder__row input { accent-color: var(--accent); }
.ladder__row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ladder__row.is-off { opacity: .5; cursor: default; }
.ladder__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.ladder__mark { font-size: 12.5px; color: var(--muted); }
.ladder__row--main:not(.is-off) .ladder__mark { color: var(--accent); font-weight: 600; }
/* два экрана окна оплаты (шаг 11): экран 1 — одно предложение под остаток папки */
.offer { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 18px; margin: 4px 0 12px; border: 1.5px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.offer__head { font-size: 17px; font-weight: 700; }
.offer__sub { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.offer__price { grid-column: 2; grid-row: 1 / 3; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.linkbtn { border: 0; background: none; padding: 6px 2px; font: inherit; font-size: 14px; color: var(--accent); cursor: pointer; text-underline-offset: 3px; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:disabled { opacity: .5; cursor: default; }
.pay__more { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 6px; }
.pay__more .pay__alt { color: var(--ink-2); }
.pay__back { margin: -6px 0 6px -2px; color: var(--muted); }
.pay__title:focus { outline: none; }
.field { display: grid; gap: 6px; margin: 14px 0 6px; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 10px 0; }
.check input { margin-top: 4px; accent-color: var(--accent); }

/* всплывающие окна справа внизу: сообщения, «бесплатные кончились», панель загрузок */
.pops { position: fixed; right: 16px; bottom: 16px; z-index: 20; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.pops > * { pointer-events: auto; }
body:has(#consent:not([hidden])) .pops { bottom: 84px; }
body:has(#dock:not([hidden])) .shell { padding-bottom: 150px; }
.pop { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--raised); color: var(--ink); box-shadow: var(--shadow-2); font-size: 14px; animation: pop-in .3s var(--ease) backwards; }
.pop.is-out { animation: pop-out .22s ease-in forwards; }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
.pop > .sti { width: 22px; height: 22px; margin-top: 1px; }
.pop__body, .toast__body { flex: 1 1 auto; min-width: 0; }
.pop__go { display: inline-block; margin: 8px 8px 4px 0; text-decoration: none; }
.pop__go:hover { color: var(--accent-ink); }
.pop__x { flex: none; width: 26px; height: 26px; margin: -3px -5px 0 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.pop__x:hover { background: var(--fill); color: var(--ink); }
.pop--warn { box-shadow: var(--shadow-2), inset 3px 0 0 var(--gold); }
.pop--bad { box-shadow: var(--shadow-2), inset 3px 0 0 var(--bad); color: var(--bad-ink); }
.toast--ok { box-shadow: var(--shadow-2), inset 3px 0 0 var(--ok); }

.dock { display: block; padding: 0; overflow: hidden; }
.dock__head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 16px; }
.dock__head:hover { background: var(--hover); }
.dock__ring { width: 46px; height: 46px; }
.dock__ring .ring__track { stroke: var(--run-bg); }
.dock__ring .ring__bar { stroke: var(--accent); }
.dock__ring .ring__n { color: var(--ink); font-size: 13px; }
.dock__ring.is-done .ring__bar { stroke: var(--ok); }
.dock__ring.is-done .ring__n { color: var(--ok); font-size: 17px; }
.dock__ring.is-done .ring__n::after { content: none; }
.dock__t { flex: 1 1 auto; min-width: 0; display: grid; }
.dock__big { font-weight: 600; font-variant-numeric: tabular-nums; }
.dock__sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dock__chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s var(--ease); }
.dock.is-folded .dock__chev { transform: rotate(180deg); }
.dock__body { display: grid; gap: 8px; padding: 0 14px 12px; }
.dock.is-folded .dock__body { display: none; }
.dock__files { display: grid; gap: 8px; }
.dock__files:empty { display: none; }
.dock__f { display: flex; align-items: center; gap: 8px; height: 22px; font-size: 13px; animation: cell-in .24s var(--ease) backwards; }
.dock__f .ic { width: 18px; height: 18px; }
.dock__fn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock__f .pb { flex: 0 0 76px; }
.dock__more { color: var(--muted); font-size: 12.5px; }
.dock__wait { display: flex; gap: 8px; align-items: center; height: 22px; font-size: 13px; color: var(--wait); }
.dock__body:has(.dock__files:empty):has(.dock__wait[hidden]) { display: none; }
.dock__wait .sti { width: 18px; height: 18px; animation: breathe 2.2s ease-in-out infinite; }
.dock.is-idle .dock__body { display: none; }

/* перекатывающиеся числа: столбик 0–9 у каждой цифры */
.roll { display: inline-flex; overflow: hidden; height: 1.2em; line-height: 1.2em; vertical-align: -.22em; }
.roll__c { display: inline-block; height: 1.2em; overflow: hidden; }
.roll__s { display: block; transition: transform .55s var(--ease); }
.roll__s::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9"; white-space: pre; }

/* подсказка: у статусов, кнопок, цены */
.tip { position: fixed; left: 0; top: 0; z-index: 60; max-width: min(320px, calc(100vw - 16px)); padding: 8px 11px; border-radius: 10px; background: var(--ink); color: var(--card); font-size: 13px; line-height: 1.4; box-shadow: var(--shadow-2); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s var(--ease); }
.tip--below { transform: translateY(-4px); }
.tip.is-on { opacity: 1; transform: none; }

/* карточка с файлами появляется мягко */
.panel:not([hidden]) { animation: rise .32s var(--ease) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 580px; margin: 0 auto; background: var(--raised); color: var(--ink); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-2); font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* узкий экран: размер прячем, статус короче */
@media (max-width: 640px) {
  .shell { padding: 0 14px 32px; }
  .hero { padding-top: 24px; }
  .linkform { flex-direction: column; padding: 8px; }
  .linkform__field { padding: 2px 6px; }
  .linkform .btn--primary { width: 100%; }
  .top__sub { display: none; }
  .tv__size { display: none; }
  .fbar__sum { order: 3; flex-basis: 100%; padding-left: 6px; }
  .tv__st { width: 116px; }
  .panel { padding: 14px; }
  .ladder__row { grid-template-columns: 22px 60px 1fr; }
  .ladder__mark { grid-column: 2 / -1; }
  .pb { max-width: 60px; }
  .tile__dsz { display: none; } /* под папкой — «3 файла», размер — в сводке папки и в списке */
  .tile .tv__now { display: none; } /* на узкой плитке не влезает; «Попробовать все сейчас» — над папкой */
  .pops { left: 10px; right: 10px; bottom: 10px; width: auto; }
  body:has(#consent:not([hidden])) .pops { bottom: 120px; }
  .dialog[open] { animation-name: sheet-in; }

  /* Телефон как мобильный Диск (решение 52, шаг 9д). Чёлка и полоска жестов: viewport-fit=cover
     в index.html, отступы — env(safe-area-inset-*). */
  .shell { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  /* Папка открыта — заголовок и подводка уходят, поле ссылки — одной строкой: папка видна сразу. */
  body:has(#panel:not([hidden])) .hero { padding-top: 0; }
  body:has(#panel:not([hidden])) .hero :is(h1, .lead, #terms-line) { display: none; }
  body:has(#panel:not([hidden])) .linkform { flex-direction: row; padding: 5px; border-radius: 16px; box-shadow: var(--shadow-1); }
  body:has(#panel:not([hidden])) .linkform__disk { width: 22px; height: 22px; }
  body:has(#panel:not([hidden])) .linkform .linkform__input { font-size: 16px; padding: 6px 2px; } /* 16 px: меньше — iOS приближает страницу при вводе */
  body:has(#panel:not([hidden])) .linkform .btn--primary { width: auto; padding: 8px 14px; font-size: 14px; }
  body:has(#panel:not([hidden])) .panel { margin-top: 12px; }
  /* «Скачать» закреплена внизу: кнопки — в конце карточки и прилипают к низу экрана над шторкой
     загрузок (её высота — --pops-h, считает app.js); карточка кончилась — встают на своё место. */
  .panel { display: flex; flex-direction: column; }
  .panel > #pre { order: 8; }
  .actions { order: 9; position: sticky; bottom: var(--pops-h, 0px); z-index: 5;
    margin: 12px -14px -14px; padding: 10px 14px calc(12px + var(--pops-safe, env(safe-area-inset-bottom))); background: var(--card); border-radius: 0 0 var(--r-lg) var(--r-lg);
    box-shadow: 0 -1px 0 var(--line), 0 -10px 18px -14px rgba(20, 22, 30, .25); }
  .actions .btn { flex: 1 1 auto; padding: 12px 14px; }
  .actions #mode { flex-basis: 100%; font-size: 13px; line-height: 1.35; }
  .actions #mode:empty { display: none; }
  /* Шторка загрузок снизу во всю ширину: свёрнута — одна строка с кольцом; тянуть за ручку
     или нажать — развернуть (dock.js). Остальные окна — карточками над ней. */
  .pops { left: 0; right: 0; bottom: 0; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  body:has(#dock:not([hidden])) .pops { padding-bottom: 0; }
  .dock { order: 9; margin: 0 -10px; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 30px rgba(20, 22, 30, .16), 0 -1px 0 var(--line); animation-name: sheet-in; }
  .dock__head { position: relative; padding-top: 18px; border-radius: 20px 20px 0 0; touch-action: none; user-select: none; -webkit-user-select: none; }
  .dock__grip { position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line-2); }
  .dock__body { max-height: 40vh; max-height: 40dvh; overflow: auto; overscroll-behavior: contain; }
  .dock__ring { width: 40px; height: 40px; }
  body:has(#dock:not([hidden])) .shell { padding-bottom: 24px; }
  .pop:not(.dock) { font-size: 13.5px; padding: 11px 13px; }
}
.dock__grip { display: none; }
@media (max-width: 640px) { .dock__grip { display: block; } }
@media (prefers-color-scheme: dark) and (max-width: 640px) {
  .dock { box-shadow: 0 -8px 30px rgba(0, 0, 0, .5), 0 -1px 0 var(--line-2); }
  .actions { box-shadow: 0 -1px 0 var(--line-2), 0 -10px 18px -14px rgba(0, 0, 0, .6); }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(60px); } }

/* «уменьшить движение» в системе — смена состояний без движения */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* документы */
.doc { max-width: 800px; }
.doc h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 18px 0 8px; }
.doc h2 { font-size: 19px; font-weight: 600; margin-top: 30px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .todo { background: var(--gold-soft); color: var(--gold-ink); padding: 0 4px; border-radius: 4px; }
