/* admin-themes.css — стили разделов «Темы» и «Хоррор» и предпросмотра приложения.
 * Префиксы: pv- (предпросмотр телефона), th- (темы), hr- (хоррор). Цвета панели берутся из переменных panel.css,
 * поэтому разделы автоматически подстраиваются под выбранную тему самой админки. Внутри телефона (.pv-screen) панельные
 * переменные не используются — там только цвета, которые считает предпросмотр. */

/* ═════════ Предпросмотр: общее ═════════ */
.pv-root { display:flex; flex-direction:column; gap:.75rem; position:relative; min-width:0; }
.pv-toolbar { overflow-x:auto; scrollbar-width:thin; padding-bottom:2px; }
.pv-scenes { display:flex; gap:.375rem; flex-wrap:wrap; }
.pv-scene-btn { display:inline-flex; align-items:center; gap:.375rem; padding:.4375rem .75rem; border-radius:6.25rem; border:1px solid var(--border);
  background:var(--bg-card); color:var(--text-secondary); font:600 .75rem var(--font-body); cursor:pointer; white-space:nowrap; transition:background .15s,color .15s,border-color .15s; }
.pv-scene-btn:hover { color:var(--text-primary); border-color:var(--accent); }
.pv-scene-btn.is-active { background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 .125rem .75rem var(--accent-glow); }
.pv-scene-btn .pv-i { opacity:.95; }
.pv-options { display:flex; gap:.875rem; align-items:center; flex-wrap:wrap; font-size:.75rem; color:var(--text-secondary); }
.pv-opt { display:inline-flex; align-items:center; gap:.375rem; cursor:pointer; user-select:none; }
.pv-opt input { accent-color:var(--accent); }
.pv-zoom { margin-left:auto; background:var(--bg-input); color:var(--text-primary); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.25rem .5rem; font:inherit; font-size:.75rem; }
.pv-stage { position:relative; overflow:hidden; border-radius:var(--radius); border:1px solid var(--border);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb),.10), transparent 60%),
    repeating-conic-gradient(rgba(127,127,160,.06) 0 25%, transparent 0 50%) 0 0/20px 20px,
    var(--bg-surface);
  padding:12px 0; box-sizing:content-box; }
.pv-phones { display:flex; gap:16px; transform-origin:top left; align-items:flex-start; }
.pv-device { flex:none; }
.pv-device-cap { text-align:center; font-size:.75rem; font-weight:700; color:var(--text-secondary); margin-bottom:6px; text-transform:uppercase; letter-spacing:.06em; }
.pv-bezel { padding:13px; border-radius:42px; background:#0a0a10; box-shadow:0 0 0 2px #2a2a3d, 0 18px 44px rgba(0,0,0,.55); }

/* Экран телефона. Размер 360×740 — в «dp» приложения; масштабируется целиком через transform на .pv-phones. */
.pv-screen { position:relative; overflow:hidden; border-radius:30px; font-family:Roboto,'Segoe UI',system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased; text-align:left; line-height:1.25; letter-spacing:0; text-transform:none; }
.pv-screen *, .pv-screen *::before, .pv-screen *::after { box-sizing:border-box; }
.pv-screen span, .pv-screen div { font-family:inherit; }
.pv-status { position:absolute; top:0; left:0; right:0; z-index:3; display:flex; justify-content:space-between; align-items:center; padding:0 16px; font-size:11px; font-weight:500; pointer-events:none; }
.pv-status-i { display:inline-flex; gap:5px; align-items:center; }
.pv-body { position:absolute; left:0; right:0; overflow:hidden; }
.pv-navbar { position:absolute; left:0; right:0; bottom:0; z-index:3; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.pv-navbar i { display:block; width:108px; height:4px; border-radius:2px; opacity:.55; }
.pv-scroll { overflow-y:auto; overflow-x:hidden; scrollbar-width:none; min-height:0; display:flex; flex-direction:column; }
.pv-scroll::-webkit-scrollbar, .pv-hs::-webkit-scrollbar { display:none; }
.pv-scroll > * { flex-shrink:0; }   /* карточки не сжимаются под высоту экрана — экран прокручивается, как RecyclerView/ScrollView */
.pv-hs { overflow-x:auto; overflow-y:hidden; scrollbar-width:none; flex:none; }
.pv-hs > div { width:max-content; }
.pv-rel { position:relative; }
.pv-i { display:block; flex:none; }
.pv-img { background-size:cover; background-position:center; }
.pv-screen [data-go] { cursor:pointer; }

/* Инспектор */
.pv-inspecting .pv-device:last-child [data-tok],
.pv-inspecting .pv-device:last-child [data-lit] { cursor:crosshair; }
.pv-hover { outline:2px solid #ffffff !important; outline-offset:-2px; box-shadow:0 0 0 1px rgba(0,0,0,.6) inset; }
.pv-hl { outline:2px dashed #ffd400 !important; outline-offset:-2px; animation:pv-pulse 1.1s ease-in-out infinite; }
@keyframes pv-pulse { 50% { outline-color:rgba(255,212,0,.25); } }
.pv-tip { position:absolute; z-index:30; pointer-events:none; max-width:240px; display:flex; flex-direction:column; gap:4px; padding:.5rem .625rem;
  background:var(--bg-card); border:1px solid var(--border-accent); border-radius:var(--radius-sm); box-shadow:var(--shadow); font-size:.72rem; color:var(--text-primary); }
.pv-tip[hidden] { display:none; }
.pv-chip { display:inline-block; padding:.125rem .4rem; border-radius:6.25rem; background:rgba(var(--accent-rgb),.16); color:var(--accent); font-weight:700; font-size:.66rem; margin-right:3px; }
.pv-chip-lit { background:rgba(251,191,36,.15); color:var(--yellow); }

/* Ассеты-заглушки и фоновая анимация */
.pv-missing-asset { display:flex; align-items:center; justify-content:center; text-align:center; font-size:9px; line-height:1.1; color:#ff8a8a;
  border:1px dashed #ff6b6b; background:rgba(255,80,80,.1); border-radius:6px; }
.pv-ambient { position:absolute; left:0; right:0; top:24px; bottom:18px; z-index:2; pointer-events:none; overflow:hidden; }
.pv-ambient svg { width:100% !important; height:100% !important; }
.pv-ambient-missing { position:absolute; left:50%; top:34px; transform:translateX(-50%); z-index:2; padding:3px 8px; pointer-events:none; }
.pv-lottie-fallback { position:absolute; inset:0; }
.pv-lottie-fallback i { position:absolute; top:-10px; width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.75); animation:pv-fall 5s linear infinite; }
.pv-lottie-fallback i:nth-child(1) { left:10%; animation-delay:0s; } .pv-lottie-fallback i:nth-child(2) { left:28%; animation-delay:1.2s; }
.pv-lottie-fallback i:nth-child(3) { left:46%; animation-delay:2.4s; } .pv-lottie-fallback i:nth-child(4) { left:63%; animation-delay:.6s; }
.pv-lottie-fallback i:nth-child(5) { left:80%; animation-delay:1.9s; } .pv-lottie-fallback i:nth-child(6) { left:92%; animation-delay:3.1s; }
.pv-lottie-fallback span { position:absolute; left:8px; bottom:6px; font-size:9px; color:rgba(255,255,255,.55); }
@keyframes pv-fall { to { transform:translateY(720px); } }
.pv-thumb { display:block; position:relative; overflow:hidden; pointer-events:none; border-radius:10px; flex:none; }
.pv-thumb-inner { transform-origin:top left; width:360px; height:740px; }
.pv-thumb .pv-status, .pv-thumb .pv-navbar { display:none; }
.pv-thumb .pv-screen { border-radius:0; }

/* Покрытие темой */
.pv-cov { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); font-size:.78rem; }
.pv-cov summary { display:flex; align-items:center; gap:.625rem; padding:.5rem .75rem; cursor:pointer; list-style:none; flex-wrap:wrap; }
.pv-cov summary::-webkit-details-marker { display:none; }
.pv-cov-bar { width:80px; height:6px; border-radius:3px; background:var(--bg-hover); overflow:hidden; flex:none; }
.pv-cov-bar i { display:block; height:100%; background:var(--green); }
.pv-cov-mid .pv-cov-bar i { background:var(--yellow); } .pv-cov-low .pv-cov-bar i { background:var(--red); }
.pv-cov-sub { color:var(--text-muted); font-size:.72rem; }
.pv-cov-body { padding:0 .75rem .75rem; color:var(--text-secondary); line-height:1.5; }
.pv-cov-body p { margin:.25rem 0; } .pv-cov-note { color:var(--text-muted); }
.pv-cov-body ul { list-style:none; padding:0; margin:.25rem 0; display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:.25rem .75rem; }
.pv-cov-body li { display:flex; align-items:center; gap:.375rem; font-size:.72rem; }
.pv-cov-body code { font-family:var(--font-mono); font-size:.7rem; color:var(--text-primary); }
.pv-sw { width:14px; height:14px; border-radius:4px; border:1px solid var(--border); flex:none; }

/* ═════════ Темы: общие элементы ═════════ */
.th-tabs { display:flex; gap:.375rem; margin-bottom:1rem; flex-wrap:wrap; padding:.25rem; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); width:fit-content; max-width:100%; }
.th-tab { display:inline-flex; align-items:center; gap:.5rem; padding:.5rem .875rem; border:none; border-radius:var(--radius-sm); background:transparent; color:var(--text-secondary); font:600 .8125rem var(--font-body); cursor:pointer; transition:background .15s,color .15s; }
.th-tab:hover { color:var(--text-primary); background:var(--bg-hover); }
.th-tab.is-active { background:var(--accent); color:#fff; box-shadow:0 .125rem .75rem var(--accent-glow); }
.th-hint { font-size:.75rem; color:var(--text-muted); line-height:1.5; }
.th-muted { color:var(--text-muted); }
.th-row { display:flex; align-items:center; gap:.625rem; flex-wrap:wrap; }
.th-spacer { flex:1; }
.th-mono { font-family:var(--font-mono); font-size:.75rem; }
.th-stack { display:flex; flex-direction:column; gap:.75rem; }
.th-h { font-size:.9375rem; font-weight:700; margin:0 0 .25rem; display:flex; align-items:center; gap:.5rem; }
.th-h i { color:var(--accent); }
.th-section { margin-bottom:1rem; }

/* Список тем */
.th-toolbar { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; margin-bottom:1rem; }
.th-toolbar input[type=search] { flex:1; min-width:180px; max-width:340px; background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.5rem .75rem; color:var(--text-primary); font:inherit; font-size:.8125rem; }
.th-filter { display:inline-flex; gap:.25rem; }
.th-chip { padding:.375rem .75rem; border-radius:6.25rem; border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); font:600 .75rem var(--font-body); cursor:pointer; }
.th-chip.is-active { background:rgba(var(--accent-rgb),.18); border-color:var(--border-accent); color:var(--accent); }
.th-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:1rem; }
.th-card { display:flex; flex-direction:column; padding:0; cursor:pointer; transition:transform .15s,border-color .15s,box-shadow .15s; }
.th-card:hover { transform:translateY(-2px); border-color:var(--border-accent); box-shadow:0 .5rem 1.5rem rgba(0,0,0,.35); }
.th-card-view { display:flex; justify-content:center; gap:10px; padding:14px 14px 0; background:linear-gradient(180deg,rgba(var(--accent-rgb),.07),transparent); height:268px; overflow:hidden; }
.th-card-body { padding:.875rem 1rem 1rem; display:flex; flex-direction:column; gap:.5rem; flex:1; }
.th-card-title { font-weight:700; font-size:.9375rem; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.th-card-desc { font-size:.75rem; color:var(--text-muted); min-height:2.1em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.th-card-meta { display:flex; gap:.75rem; font-size:.72rem; color:var(--text-secondary); flex-wrap:wrap; }
.th-card-meta span { display:inline-flex; align-items:center; gap:.3rem; }
.th-card-actions { display:flex; gap:.375rem; margin-top:auto; padding-top:.5rem; }
.th-card-actions .btn { flex:1; justify-content:center; }
.th-swatches { display:flex; gap:3px; }
.th-swatches i { width:14px; height:14px; border-radius:50%; border:1px solid rgba(255,255,255,.18); display:block; }
.th-empty-hero { text-align:center; padding:3rem 1rem; }
.th-empty-hero .btn { margin-top:1rem; }

/* Мастер создания */
.th-wiz { display:flex; flex-direction:column; gap:1rem; }
.th-wiz-steps { display:flex; gap:.5rem; font-size:.72rem; color:var(--text-muted); }
.th-wiz-steps b { color:var(--accent); }
.th-presets { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.75rem; }
.th-preset { border:2px solid var(--border); border-radius:var(--radius); background:var(--bg-card); padding:.625rem; cursor:pointer; text-align:left; color:var(--text-primary); display:flex; flex-direction:column; gap:.5rem; align-items:center; transition:border-color .15s,transform .15s; font:inherit; }
.th-preset:hover { border-color:var(--border-accent); transform:translateY(-2px); }
.th-preset.is-active { border-color:var(--accent); box-shadow:0 0 0 .1875rem var(--accent-glow); }
.th-preset-name { font-weight:700; font-size:.8125rem; align-self:flex-start; }
.th-preset-desc { font-size:.68rem; color:var(--text-muted); align-self:flex-start; line-height:1.35; }

/* ═════════ Редактор ═════════ */
.th-ed-bar { position:sticky; top:0; z-index:25; display:flex; align-items:center; gap:.625rem; flex-wrap:wrap; padding:.625rem .875rem; margin:0 0 1rem;
  background:color-mix(in srgb, var(--bg-surface) 92%, transparent); backdrop-filter:blur(8px); border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 .25rem 1rem rgba(0,0,0,.25); }
.th-ed-title { font-weight:700; font-size:1rem; min-width:0; max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.th-dirty { display:none; align-items:center; gap:.375rem; font-size:.72rem; color:var(--yellow); font-weight:600; }
.th-dirty.on { display:inline-flex; }
.th-dirty::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--yellow); box-shadow:0 0 .5rem var(--yellow); }
.th-ed-actions { display:flex; gap:.375rem; align-items:center; flex-wrap:wrap; margin-left:auto; }
.th-ed-body { display:grid; grid-template-columns:minmax(330px,430px) minmax(0,1fr); gap:1rem; align-items:start; }
.th-ed-side { display:flex; flex-direction:column; gap:.75rem; min-width:0; }
.th-ed-preview { position:sticky; top:4.75rem; min-width:0; }
@media (max-width: 1100px) {
  .th-ed-body { grid-template-columns:minmax(0,1fr); }
  .th-ed-preview { position:static; order:-1; }
}
.th-panel-tabs { display:flex; gap:.25rem; flex-wrap:wrap; }
.th-ptab { display:inline-flex; align-items:center; gap:.4rem; padding:.5rem .75rem; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-card); color:var(--text-secondary); font:600 .75rem var(--font-body); cursor:pointer; white-space:nowrap; }
.th-ptab:hover { color:var(--text-primary); }
.th-ptab.is-active { background:rgba(var(--accent-rgb),.16); border-color:var(--border-accent); color:var(--accent); }
.th-ptab .badge { margin-left:2px; padding:.05rem .4rem; }
.th-pane { display:none; flex-direction:column; gap:.75rem; }
.th-pane.is-active { display:flex; }
.th-box { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:.875rem 1rem; }
.th-box-title { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary); margin-bottom:.625rem; display:flex; align-items:center; gap:.5rem; }

/* Цвета */
.th-tok { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.625rem; align-items:center; padding:.4375rem .5rem; border-radius:var(--radius-sm); border:1px solid transparent; transition:background .15s,border-color .15s; }
.th-tok:hover { background:var(--bg-hover); }
.th-tok.is-flash { animation:th-flash 1.4s ease; }
@keyframes th-flash { 0%,60% { background:rgba(255,212,0,.22); border-color:rgba(255,212,0,.7); } 100% { background:transparent; } }
.th-tok.is-changed .th-tok-name::after { content:' •'; color:var(--accent); }
.th-sw-btn { position:relative; width:34px; height:34px; border-radius:9px; border:1px solid rgba(255,255,255,.2); cursor:pointer; overflow:hidden; flex:none;
  background:repeating-conic-gradient(#8884 0 25%, #0000 0 50%) 0 0/10px 10px; }
.th-sw-btn i { position:absolute; inset:0; display:block; }
.th-sw-btn input { position:absolute; inset:-6px; width:calc(100% + 12px); height:calc(100% + 12px); opacity:0; cursor:pointer; border:0; padding:0; }
.th-tok-name { font-size:.8125rem; font-weight:600; color:var(--text-primary); }
.th-tok-use { font-size:.68rem; color:var(--text-muted); line-height:1.3; }
.th-tok-input { width:92px; background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.375rem .5rem; color:var(--text-primary); font:500 .75rem var(--font-mono); text-transform:uppercase; }
.th-tok-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 .1875rem var(--accent-glow); }
.th-tok-input.is-bad { border-color:var(--red); }
.th-tok-reset { opacity:0; padding:.25rem; }
.th-tok:hover .th-tok-reset, .th-tok.is-changed .th-tok-reset { opacity:1; }
.th-group-title { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--accent); margin:.25rem 0 .125rem; }
.th-gen { display:grid; grid-template-columns:auto 1fr auto; gap:.625rem; align-items:center; }

/* Контраст */
.th-contrast { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.625rem; align-items:center; padding:.375rem 0; border-top:1px solid var(--border); font-size:.75rem; }
.th-contrast:first-of-type { border-top:0; }
.th-contrast-sample { width:46px; height:30px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:.9rem; border:1px solid rgba(255,255,255,.12); }
.th-ratio { font-family:var(--font-mono); font-weight:700; }
.th-ratio.ok { color:var(--green); } .th-ratio.bad { color:var(--red); }

/* Форма */
.th-range { display:grid; grid-template-columns:minmax(0,1fr) 62px; gap:.75rem; align-items:center; }
.th-range input[type=range] { width:100%; accent-color:var(--accent); }
.th-range input[type=number] { background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.375rem .5rem; color:var(--text-primary); font:inherit; font-size:.8125rem; width:100%; }
.th-radius-demo { width:54px; height:54px; background:var(--accent); flex:none; opacity:.9; }
.th-radius-note { font-size:.68rem; color:var(--text-muted); }

/* Варианты и ассеты */
.th-radio-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.5rem; }
.th-radio { border:2px solid var(--border); border-radius:var(--radius-sm); padding:.625rem .75rem; background:var(--bg-input); cursor:pointer; display:flex; flex-direction:column; gap:.25rem; text-align:left; color:var(--text-primary); font:inherit; transition:border-color .15s; }
.th-radio:hover { border-color:var(--border-accent); }
.th-radio.is-active { border-color:var(--accent); background:rgba(var(--accent-rgb),.12); }
.th-radio b { font-size:.8125rem; } .th-radio small { font-size:.68rem; color:var(--text-muted); }
.th-radio.is-blocked { opacity:.9; border-style:dashed; }
.th-asset { display:grid; grid-template-columns:96px minmax(0,1fr); gap:.875rem; align-items:center; }
.th-asset-prev { width:96px; height:96px; border-radius:var(--radius-sm); border:1px dashed var(--border-accent); background:repeating-conic-gradient(#8883 0 25%, #0000 0 50%) 0 0/12px 12px; display:flex; align-items:center; justify-content:center; overflow:hidden; color:var(--text-muted); font-size:.68rem; text-align:center; }
.th-asset-prev img { max-width:100%; max-height:100%; object-fit:contain; }
.th-asset-prev .th-lottie { width:100%; height:100%; }
.th-drop { border:2px dashed var(--border-accent); border-radius:var(--radius-sm); padding:.75rem; text-align:center; font-size:.75rem; color:var(--text-secondary); cursor:pointer; transition:background .15s; }
.th-drop:hover, .th-drop.is-over { background:rgba(var(--accent-rgb),.1); }

/* Проверка и история */
.th-problem { display:flex; gap:.5rem; align-items:flex-start; font-size:.78rem; padding:.375rem .5rem; border-radius:var(--radius-sm); background:rgba(248,113,113,.1); color:var(--red); }
.th-problem.warn { background:rgba(251,191,36,.1); color:var(--yellow); }
.th-problem.ok { background:rgba(52,211,153,.1); color:var(--green); }
.th-hist { display:flex; flex-direction:column; gap:.375rem; }
.th-hist-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.625rem; align-items:center; padding:.5rem .625rem; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-input); cursor:pointer; }
.th-hist-item:hover, .th-hist-item.is-active { border-color:var(--accent); }
.th-hist-ver { font:700 .8125rem var(--font-mono); color:var(--accent); }
.th-diff { display:flex; flex-wrap:wrap; gap:.375rem; }
.th-diff span { display:inline-flex; align-items:center; gap:.375rem; padding:.2rem .5rem; border-radius:6.25rem; background:var(--bg-input); border:1px solid var(--border); font-size:.7rem; }
.th-banner { display:flex; align-items:center; gap:.625rem; flex-wrap:wrap; padding:.625rem .875rem; border-radius:var(--radius-sm); font-size:.78rem; background:rgba(var(--accent-rgb),.12); border:1px solid var(--border-accent); }
.th-banner.warn { background:rgba(251,191,36,.1); border-color:rgba(251,191,36,.35); color:var(--yellow); }

/* Назначения */
.th-ladder { display:flex; flex-wrap:wrap; gap:.375rem; align-items:center; font-size:.72rem; }
.th-ladder span { padding:.25rem .625rem; border-radius:6.25rem; background:var(--bg-input); border:1px solid var(--border); color:var(--text-secondary); font-weight:600; }
.th-ladder span.first { border-color:var(--red); color:var(--red); }
.th-ladder i { color:var(--text-muted); font-size:.6rem; }
.th-two { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:1rem; margin-bottom:1rem; }
.th-picker { display:flex; gap:.75rem; align-items:flex-start; }
.th-picker .pv-thumb { box-shadow:0 0 0 2px var(--border); }
.th-user-chip { display:inline-flex; align-items:center; gap:.375rem; padding:.25rem .625rem; border-radius:6.25rem; font-size:.75rem; background:var(--bg-input); border:1px solid var(--border); }
.th-user-chip.bad { color:var(--red); border-color:rgba(248,113,113,.4); }
.th-user-chip.good { color:var(--green); border-color:rgba(52,211,153,.4); }
.th-theme-cell { display:inline-flex; align-items:center; gap:.5rem; }

/* Установки */
.th-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:.75rem; margin-bottom:1rem; }
.th-stat { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:.875rem 1rem; }
.th-stat b { display:block; font-size:1.5rem; line-height:1.1; }
.th-stat span { font-size:.72rem; color:var(--text-muted); }
.th-bars { display:flex; flex-direction:column; gap:.4375rem; }
.th-bar { display:grid; grid-template-columns:110px minmax(0,1fr) 44px; gap:.5rem; align-items:center; font-size:.75rem; }
.th-bar-track { height:8px; border-radius:4px; background:var(--bg-hover); overflow:hidden; }
.th-bar-track i { display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:4px; }
.th-pager { display:flex; gap:.5rem; align-items:center; justify-content:flex-end; margin-top:.75rem; font-size:.78rem; color:var(--text-secondary); }

/* ═════════ Хоррор ═════════ */
.hr-mode { margin-bottom:1rem; padding:0; }
.hr-head { display:flex; align-items:center; gap:.875rem; padding:1rem 1.25rem; flex-wrap:wrap; border-bottom:1px solid var(--border);
  background:linear-gradient(90deg,rgba(220,38,38,.10),transparent 60%); }
.hr-ghost { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:#0b0006; color:#ff4d5e; font-size:1.25rem; box-shadow:0 0 1.5rem rgba(255,50,70,.25); flex:none; }
.hr-title { font-weight:800; font-size:1.0625rem; display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.hr-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,380px); gap:1.25rem; padding:1.25rem; align-items:start; }
@media (max-width: 1000px) { .hr-body { grid-template-columns:minmax(0,1fr); } }
.hr-groups { display:flex; flex-direction:column; gap:1rem; min-width:0; }
.hr-group { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--radius); padding:.875rem 1rem; }
.hr-group-title { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary); margin-bottom:.75rem; display:flex; gap:.5rem; align-items:center; }
.hr-group-title i { color:#ff4d5e; }
.hr-fields { display:grid; grid-template-columns:1fr 1fr; gap:.625rem 1rem; }
.hr-fields .field { margin-bottom:0; }
.hr-fields .wide { grid-column:span 2; }
@media (max-width: 640px) { .hr-fields { grid-template-columns:minmax(0,1fr); } .hr-fields .wide { grid-column:auto; } }
.hr-toggle-row { display:flex; align-items:center; gap:.75rem; }
.hr-side { display:flex; flex-direction:column; gap:1rem; min-width:0; }
.hr-chart { width:100%; height:150px; display:block; }
.hr-chart-wrap { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--radius); padding:.75rem; }
.hr-chart-bar { fill:rgba(255,77,94,.45); } .hr-chart-bar.in { fill:#ff4d5e; }
.hr-chart-axis { fill:var(--text-muted); font-size:9px; font-family:var(--font-mono); }
.hr-chart-line { stroke:var(--text-muted); stroke-dasharray:3 3; opacity:.5; }
.hr-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; margin-top:.625rem; }
.hr-kpis div { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.5rem .625rem; }
.hr-kpis b { display:block; font-size:1rem; } .hr-kpis span { font-size:.66rem; color:var(--text-muted); }

/* Сценарий запуска: чёрный экран → звук → падение приложения */
.hr-scn { background:#000; border:1px solid #2a0a10; border-radius:var(--radius); padding:.75rem; display:flex; flex-direction:column; gap:.625rem; }
.hr-scn-screen { position:relative; height:150px; border-radius:10px; background:#000; border:1px solid #1d1d1d; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.hr-scn-screen.is-normal::before { content:'Live Arcade'; color:#fff; font:900 1.25rem var(--font-body); letter-spacing:.06em; background:linear-gradient(90deg,#E91E63,#7B1FA2); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.hr-scn-wave { display:none; align-items:center; gap:3px; height:60px; }
.hr-scn-screen.is-sound .hr-scn-wave { display:flex; }
.hr-scn-wave i { width:4px; border-radius:2px; background:#ff4d5e; animation:hr-wave .6s ease-in-out infinite alternate; height:10px; }
.hr-scn-wave i:nth-child(2n) { animation-duration:.45s; } .hr-scn-wave i:nth-child(3n) { animation-duration:.8s; }
@keyframes hr-wave { to { height:56px; } }
.hr-scn-screen.is-crash::after { content:'Приложение закрылось'; color:#cfcfcf; font:500 .8rem sans-serif; background:#303030; border-radius:14px; padding:.75rem 1rem; }
.hr-scn-steps { display:flex; gap:.375rem; flex-wrap:wrap; }
.hr-scn-steps span { font-size:.68rem; padding:.2rem .5rem; border-radius:6.25rem; background:#14080a; color:#8a6a6e; border:1px solid #2a0a10; }
.hr-scn-steps span.on { background:#ff4d5e; color:#fff; border-color:#ff4d5e; }
.hr-tester { display:flex; flex-direction:column; gap:.5rem; }
.hr-tester-chips { display:flex; flex-wrap:wrap; gap:.375rem; }
.hr-save { position:sticky; bottom:0; display:flex; justify-content:flex-end; gap:.5rem; padding:.75rem 1.25rem; border-top:1px solid var(--border); background:color-mix(in srgb, var(--bg-card) 94%, transparent); backdrop-filter:blur(6px); }

/* Всплывающее меню «⋯» */
.th-menu { position:fixed; z-index:700; min-width:210px; padding:.25rem; background:var(--bg-card); border:1px solid var(--border-accent); border-radius:var(--radius-sm); box-shadow:var(--shadow); }
.th-menu button { display:flex; align-items:center; gap:.625rem; width:100%; padding:.5rem .625rem; background:none; border:0; border-radius:6px; color:var(--text-primary); font:600 .78rem var(--font-body); cursor:pointer; text-align:left; }
.th-menu button i { width:1rem; text-align:center; color:var(--text-secondary); }
.th-menu button:hover:not(:disabled), .th-menu button:focus-visible { background:var(--bg-hover); outline:none; }
.th-menu button:disabled { opacity:.45; cursor:default; }
.th-menu button.danger, .th-menu button.danger i { color:var(--red); }
.th-menu hr { border:0; border-top:1px solid var(--border); margin:.25rem 0; }
.th-preset-thumb { display:flex; align-items:center; justify-content:center; min-height:80px; }
.th-copy-ico { width:80px; height:80px; border-radius:10px; border:2px dashed var(--border-accent); display:flex; align-items:center; justify-content:center; font-size:1.75rem; color:var(--text-muted); }
.th-dialog .modal { max-height:92dvh; }
.th-lottie { width:100%; height:100%; position:relative; }
.th-lottie.pv-lottie-live .th-lottie-ph { display:none; }
.th-asset-prev .th-lottie-ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.th-ed-body .th-box select, .th-box .th-row select { background:var(--bg-input); color:var(--text-primary); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.4375rem .625rem; font:inherit; font-size:.78rem; }

/* Поля даты в карточках назначений: без min-width:0 второй datetime-local вылезает за край карточки */
#page-themes .field-row.cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
#page-themes .field-row.cols-2 > .field { min-width:0; }
#page-themes .field input[type="datetime-local"] { width:100%; min-width:0; box-sizing:border-box; }

/* Таблицы раздела: общий стиль панели обрезает ячейки в одну строку — названия тем и источники должны переноситься */
#page-themes td, #page-themes td > * { white-space:normal; overflow:visible; text-overflow:clip; }
#page-themes .th-theme-cell { flex-wrap:wrap; row-gap:.25rem; }
#page-themes .th-theme-cell > b { overflow-wrap:anywhere; }
