/* Заглушка Машины на время первой отрисовки (modules/boot-skeleton.js).
   Слой непрозрачный и лежит поверх страницы: Машина под ним рисуется на
   своем месте, а человек видит спокойные серые блоки той же раскладки.
   Цвета — переменные Машины (:root и body.dark в index.html), поэтому
   светлая и темная тема получаются сами. Размеры сняты с живой страницы
   на 1280 и 375 px; без color-mix и :has() — бабушкин Chromium 99. */
.boot-skel{
  position:fixed;inset:0;z-index:1300; /* выше кнопок-шаров (1200–1251), ниже окон (9000+) */
  overflow:hidden;overscroll-behavior:contain;
  background:var(--bg);color:var(--ink);
  opacity:1;transition:opacity .18s ease;
  --bs-base:var(--line);
  --bs-hi:rgba(255,255,255,.65);
}
body.dark .boot-skel{--bs-hi:rgba(154,139,232,.16)}
.boot-skel.is-leaving{opacity:0;pointer-events:none}

.boot-skel .bs-b{
  display:block;flex:none;border-radius:6px;
  background-color:var(--bs-base);
  background-image:linear-gradient(100deg,rgba(255,255,255,0) 20%,var(--bs-hi) 45%,var(--bs-hi) 55%,rgba(255,255,255,0) 80%);
  background-size:220% 100%;background-repeat:no-repeat;
  animation:bs-shimmer 1.3s ease-in-out infinite;
}
@keyframes bs-shimmer{0%{background-position:160% 0}100%{background-position:-100% 0}}

.boot-skel .bs-wrap{max-width:1080px;margin:0 auto;padding:0 20px}

/* шапка: как header.top */
.boot-skel .bs-top{display:flex;align-items:center;gap:14px;padding:22px 0 16px;border-bottom:1px solid var(--line)}
.boot-skel .bs-logo{width:46px;height:46px;border-radius:50%}
.boot-skel .bs-brand{min-width:0}
.boot-skel .bs-title{width:170px;height:25px}
.boot-skel .bs-sub{width:150px;height:11px;margin-top:9px}
.boot-skel .bs-space{flex:1}
.boot-skel .bs-theme{width:38px;height:37px;border-radius:10px}

/* полоса модулей: как .modbar */
.boot-skel .bs-mods{display:flex;gap:6px;margin:2px 0 14px}
.boot-skel .bs-mod{width:108px;height:39px;border-radius:11px}
.boot-skel .bs-mod-end{margin-left:auto}

/* «Сводка каталога»: как .workspace-overview и .stats */
.boot-skel .bs-overview{margin:16px 0 0;padding:12px;border:1px solid var(--line);border-radius:14px;
  background:linear-gradient(145deg,var(--surface),var(--surface2))}
.boot-skel .bs-kicker{width:96px;height:11px;border-radius:4px}
.boot-skel .bs-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin:8px 0 0}
.boot-skel .bs-stat{min-width:0;height:62px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.boot-skel .bs-n{width:30px;height:26px}
.boot-skel .bs-l{width:70%;height:10px;margin-top:7px;border-radius:4px}

/* вкладки: как .workspace-primary и .tabgroup */
.boot-skel .bs-nav{margin:14px 0 0}
.boot-skel .bs-select{display:none}
.boot-skel .bs-primary{display:flex;align-items:center;gap:4px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.boot-skel .bs-sec{height:42px;border-radius:9px}
.boot-skel .bs-subnav{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin-top:8px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
.boot-skel .bs-tab{height:38px;border-radius:8px}
.boot-skel .bs-on{background-color:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.boot-skel .bs-add{width:139px;height:38px;margin-left:auto;border-radius:10px;background-color:var(--accent-soft)}

/* раздел «Треки»: заголовок, поиск, строки альбомов (.folder) */
.boot-skel .bs-panel{padding:22px 0 0}
.boot-skel .bs-h2{width:210px;height:24px;margin:4px 0 18px}
.boot-skel .bs-search{height:44px;margin-bottom:8px;border-radius:10px}
.boot-skel .bs-hint{width:110px;height:11px;margin:19px 0 60px;border-radius:4px} /* 60 = строка подсказки + шапка колонок .relhead */
.boot-skel .bs-row{display:flex;align-items:center;gap:14px;min-height:79px;padding:16px;margin-bottom:10px;
  border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.boot-skel .bs-ico{width:42px;height:42px;border-radius:10px}
.boot-skel .bs-rowtext{flex:1;min-width:0}
.boot-skel .bs-ti{width:42%;height:14px}
.boot-skel .bs-meta{width:26%;height:10px;margin-top:9px;border-radius:4px}
.boot-skel .bs-dates{width:110px}
.boot-skel .bs-d{width:80px;height:10px;margin-left:auto;border-radius:4px}
.boot-skel .bs-d+.bs-d{width:60px;margin-top:6px}
.boot-skel .bs-cnt{width:44px;height:14px}

@media(max-width:900px){
  .boot-skel .bs-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:720px){
  .boot-skel .bs-wrap{padding:0 14px}
  .boot-skel .bs-top{gap:10px;padding:14px 0 10px;align-items:flex-start}
  .boot-skel .bs-logo{width:40px;height:40px}
  .boot-skel .bs-brand{flex:1 1 190px}
  .boot-skel .bs-title{width:150px;height:23px}
  .boot-skel .bs-space{display:none}
  .boot-skel .bs-theme{width:36px}
  .boot-skel .bs-mods{margin:8px 0 14px;gap:8px}
  .boot-skel .bs-mod{flex:1 1 0;width:auto;height:48px}
  .boot-skel .bs-mod-end{margin-left:0}
  .boot-skel .bs-overview{padding:8px;margin-top:10px}
  .boot-skel .bs-stats{gap:6px}
  .boot-skel .bs-stat{padding:7px 6px;border-radius:9px}
  .boot-skel .bs-n{height:22px}
  .boot-skel .bs-select{display:grid;gap:5px}
  .boot-skel .bs-select .bs-kicker{width:60px;height:15px}
  .boot-skel .bs-selbox{height:44px;border-radius:10px}
  .boot-skel .bs-primary{display:none}
  .boot-skel .bs-subnav{padding:8px}
  .boot-skel .bs-tab{height:44px}
  .boot-skel .bs-row{gap:10px;min-height:72px;padding:14px 12px}
  .boot-skel .bs-dates{display:none}
}

/* «Уменьшить движение»: блоки стоят ровно, без мерцания */
@media(prefers-reduced-motion:reduce){
  .boot-skel .bs-b{animation:none;background-image:none}
  .boot-skel{transition-duration:.12s}
}

/* Полоса ошибки, если Машина не загрузилась */
.boot-skel-error{position:fixed;left:16px;right:16px;top:16px;z-index:1310;max-width:640px;margin:0 auto;
  display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--bad);border-radius:12px;
  background:var(--bad-soft);color:var(--ink);font-size:13.5px;line-height:1.4;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.boot-skel-error-text{flex:1;min-width:0;overflow-wrap:anywhere}
.boot-skel-error-btn{flex:none;min-height:44px;padding:8px 14px;border:1px solid var(--bad);border-radius:10px;
  background:var(--surface);color:var(--ink);font-weight:600}
.boot-skel-error-x{flex:none;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:none;color:var(--muted);font-size:16px}

/* Мягкая надпись: облако не ответило, но Машина работает на данных устройства */
.boot-skel-note{border-color:var(--line2);background:var(--surface);color:var(--muted)}
