/* ===== StudioDevilDog: плоская графитовая тема с одним акцентом — как в приложении ===== */
:root {
  --bg: #111318;
  --bg2: #1f222a;
  --card: #1a1d24;
  --card-glass: rgba(26, 29, 36, 0.62);
  --line: #2a2e38;
  --text: #f2f3f5;
  --muted: #878c9a;
  --accent: #e8553f;
  --accent-hover: #f06852;
  --accent-rgb: 232, 85, 63;
  --on-accent: #fff;          /* текст на кнопках и плашках цвета акцента */
  --brand: #e8553f;           /* «DevilDog» на devildog.ru — всегда оранжевый */
  --glow-1: #c4371f;          /* свечение за псом на фоне */
  --glow-2: #9e2a1c;
  --eye: #ff6a3d;
  --video-filter: none;       /* ролики пса из images — перекрашиваются под палитру проекта */
  --fire-1: #e8553f; --fire-2: #ffb347; --fire-3: #ff3d6e;  /* переливы вкладки «Все приложения» */
  --secondary: #262a33;
  --secondary-hover: #30343f;
  --ok: #4cc38a;
  --err: #f0645a;
  --warn: #e9a23b;
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 10px;
  --page-width: 1360px; /* сайт широкий: скриншоты приложения видны крупно */
  --font: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, Roboto, sans-serif;
}

/* ===== Палитры проектов DevilDog (вместе с чёрным): <html data-theme="…"> ===== */
[data-theme="kora"] {
  --accent: #f5c518; --accent-hover: #ffd54a; --accent-rgb: 245, 197, 24; --on-accent: #17140a;
  --glow-1: #c99a0a; --glow-2: #8f6d06; --eye: #ffd54a;
  --video-filter: hue-rotate(40deg) saturate(1.25) brightness(1.08);
  --fire-1: #f5c518; --fire-2: #fff1a8; --fire-3: #e0a500;
}
[data-theme="volt"] {
  --accent: #f2f3f5; --accent-hover: #ffffff; --accent-rgb: 242, 243, 245; --on-accent: #111318;
  --glow-1: #ffffff; --glow-2: #d9dde6; --eye: #ffffff;   /* белая лампочка за псом */
  --video-filter: grayscale(1) brightness(1.9) contrast(1.15);
  --fire-1: #ffffff; --fire-2: #9aa0ac; --fire-3: #d7dae0;
}
[data-theme="tg"] {
  --accent: #2aabee; --accent-hover: #52bff5; --accent-rgb: 42, 171, 238; --on-accent: #ffffff;
  --glow-1: #1c7fc4; --glow-2: #135a8f; --eye: #5cc8ff;
  --video-filter: hue-rotate(200deg) saturate(1.35);
  --fire-1: #2aabee; --fire-2: #9fdcff; --fire-3: #1679c7;
}

/* Volt: белый свет за псом должен читаться как лампочка — фон ярче, чем у других палитр */
[data-theme="volt"] .dog-art { opacity: 0.55; }
[data-theme="volt"] .dog-glow { filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.35)); }

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

/* Подвал всегда внизу окна: страница — колонка, содержимое растягивается */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Текстовый курсор не мигает в обычном тексте (щелчок по таблице, режим каретки F7) — только в полях ввода */
  caret-color: transparent;
  /* Текст сайта не выделяется (логотип, меню, таблицы) — только поля ввода */
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select, [contenteditable="true"] { caret-color: var(--text); -webkit-user-select: text; user-select: text; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; font-weight: 600; }
h1 { font-size: 44px; letter-spacing: -0.5px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent { color: var(--accent); }

/* ===== Пёс на фоне: тот же рисунок и анимация, что DogBackdrop в приложении (_DogBackdrop.cshtml) ===== */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
/* Правый нижний угол, шея уходит за нижний край; 80% высоты окна, но не шире 85% ширины */
.dog-art {
  position: absolute;
  right: 0;
  bottom: 0;
  height: min(80vh, calc(85vw * 2 / 3));
  aspect-ratio: 3 / 2;
  opacity: 0.3;
  overflow: visible;
}
/* Повороты и масштаб — вокруг точек в координатах рисунка 600×400 */
.dog-art * { transform-box: view-box; }

.dog-glow { transform-origin: 380px 250px; animation: dog-glow 4.2s ease-in-out infinite alternate; }
.dog-look { transform-origin: 220px 400px; transform: rotate(var(--look, 0deg)); transition: transform 0.9s ease-out; }
.dog-sway { transform-origin: 220px 400px; animation: dog-sway 5.2s ease-in-out infinite alternate; }
.dog-breath { animation: dog-breath 3.4s ease-in-out infinite alternate; }
.dog-tuft { transform-origin: var(--ox) var(--oy); animation: dog-tuft var(--t) ease-in-out infinite alternate; }
.dog-jaw { transform-origin: 446px 124px; animation: dog-jaw 6s ease-in-out infinite; }
.dog-tongue { transform-origin: 504px 112px; animation: dog-tongue 0.45s ease-in-out infinite alternate; }
.dog-eye { animation: dog-eye 1.6s ease-in-out infinite alternate; }
.dog-eye__lid { transform-origin: 400px 90px; animation: dog-blink 5s linear infinite; }

@keyframes dog-glow { from { opacity: 0.75; transform: scale(1); } to { opacity: 1; transform: scale(1.05); } }
@keyframes dog-sway { from { transform: rotate(-1.2deg); } to { transform: rotate(0.6deg); } }
@keyframes dog-breath { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes dog-tuft { from { transform: rotate(calc(var(--swing) * -1deg)); } to { transform: rotate(calc(var(--swing) * 1deg)); } }
/* Пасть время от времени приоткрывается — тяжёлое дыхание, потом пауза */
@keyframes dog-jaw {
  0%, 24.2%, 100% { transform: rotate(0deg); }
  5.8% { transform: rotate(9deg); }
  11.7% { transform: rotate(3deg); }
  17.5% { transform: rotate(10deg); }
}
@keyframes dog-tongue { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes dog-eye { from { opacity: 0.7; } to { opacity: 1; } }
@keyframes dog-blink {
  0%, 92%, 97%, 100% { transform: scaleY(1); }
  94.4% { transform: scaleY(0.1); }
}

/* ===== Шапка ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 19, 24, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand b { color: var(--brand); font-weight: 600; }

/* Вкладки: текст, выбранная — плашка и оранжевое подчёркивание (как в приложении) */
.tabs { display: flex; gap: 2px; align-self: flex-end; }
.tabs a {
  white-space: nowrap;
  position: relative;
  padding: 11px 20px 13px;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--text); background: var(--card); }
.tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
  animation: underline-grow 0.25s ease-out;
}
@keyframes underline-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.topbar__user { margin-left: auto; color: var(--muted); font-size: 13px; display: flex; gap: 14px; align-items: center; }

/* Вкладка «Все приложения» (ссылка на devildog.ru): огненный текст переливается, снизу бежит светящаяся полоска */
.tabs a.tab-apps {
  font-weight: 600;
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2), var(--fire-3), var(--fire-2), var(--fire-1)) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.45));
  animation: apps-flow 3s linear infinite, apps-glow 2.4s ease-in-out infinite;
}
.tabs a.tab-apps span { display: inline-block; transition: transform 0.25s ease; }
.tabs a.tab-apps:hover span { transform: translate(3px, -3px); }
.tabs a.tab-apps::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 8px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--fire-2), var(--fire-1), transparent) 0 0 / 50% 100% no-repeat;
  animation: apps-run 2.2s ease-in-out infinite;
}
.tabs a.tab-apps:hover { filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.85)); }
.tabs a.tab-apps:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@keyframes apps-flow { to { background-position: -200% 0; } }
@keyframes apps-run { 0% { background-position: -100% 0; } 100% { background-position: 200% 0; } }
@keyframes apps-glow { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

/* ===== Раскладка ===== */
.page { flex: 1 0 auto; width: 100%; max-width: var(--page-width); margin: 0 auto; padding: 40px 24px 64px; }
.page--narrow { max-width: 760px; }
.footer {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.card {
  background: var(--card-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px 24px;
  backdrop-filter: blur(4px);
}
.card + .card { margin-top: 16px; }
/* В сетке и ряду промежутки задаёт gap — отступ сверху сдвигал соседние карточки вниз, и ряд «плясал» */
.grid > .card, .row > .card, .apps > .card, .soon-cards > .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
.grid-side-left { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ===== Кнопки: плоские, скругление 6, нажатие — «пружинка» ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--on-accent);
  font: 600 15px var(--font);
  cursor: pointer;
  transition: opacity 0.12s, background 0.12s, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover { color: var(--on-accent); opacity: 0.88; }
.btn:active { transform: scale(0.96); opacity: 0.72; transition-duration: 0.08s; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: 0.35; pointer-events: none; }
.btn--ghost { background: var(--secondary); color: var(--text); font-weight: 400; }
.btn--ghost:hover { background: var(--secondary-hover); color: var(--text); opacity: 1; }
.btn--danger { background: transparent; color: var(--err); border: 1px solid rgba(240, 100, 90, 0.4); font-weight: 400; }
.btn--danger:hover { background: rgba(240, 100, 90, 0.12); color: var(--err); opacity: 1; }
.btn--big { padding: 14px 26px; font-size: 17px; border-radius: var(--radius-m); }
.btn--small { padding: 6px 12px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--text); }

/* ===== Поля ===== */
label.field { display: block; margin-top: 14px; }
label.field > span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=search], select, textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font: 15px var(--font);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 96px; resize: vertical; }

/* Тёмные полосы прокрутки везде (поле «Что нового», таблицы, страница) — без светлых системных */
* { scrollbar-width: thin; scrollbar-color: var(--secondary-hover) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--secondary-hover); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3d4250; }
::-webkit-scrollbar-corner, ::-webkit-resizer { background: transparent; }

/* Админка → Обновления: форма загрузки наверху во всю ширину, большое поле «Что нового» */
.upload-card { margin-bottom: 20px; }
.upload-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.upload-form textarea { min-height: 260px; }
.upload-form .field:first-child { margin-top: 0; }
@media (max-width: 960px) { .upload-form { grid-template-columns: 1fr; } }
input[type=file] { color: var(--muted); font: 14px var(--font); max-width: 100%; }
/* Кнопка выбора файла — как вторичная кнопка .btn--ghost */
input[type=file]::file-selector-button {
  margin-right: 12px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--secondary);
  color: var(--text);
  font: 14px var(--font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
input[type=file]::file-selector-button:hover { background: var(--secondary-hover); border-color: var(--accent); }
input[type=file]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-s); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -2px; }

/* ===== Бейджи и сообщения ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--secondary);
  white-space: nowrap;
}
.badge--ok { background: #2e9e5b; }
.badge--accent { background: var(--accent); color: var(--on-accent); }
.badge--err { background: #b8453c; }
.badge--muted { color: var(--muted); }
.notice { padding: 12px 16px; border-radius: var(--radius-m); background: var(--card); border-left: 3px solid var(--accent); margin-bottom: 16px; }
.notice--ok { border-left-color: var(--ok); }
.notice--err { border-left-color: var(--err); color: var(--err); }
.secret { font-family: Consolas, monospace; font-size: 16px; background: var(--bg2); padding: 6px 10px; border-radius: var(--radius-s); user-select: all; }

/* ===== Таблицы ===== */
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid rgba(42, 46, 56, 0.6); vertical-align: middle; }
.table tr:hover td { background: rgba(38, 42, 51, 0.45); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stat { font-size: 32px; font-weight: 600; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 13px; }

/* ===== Главная: первый экран по центру ===== */
.hero { max-width: 860px; margin: 0 auto; padding: 24px 0 40px; text-align: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card-glass); color: var(--muted); font-size: 13px;
}
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(76, 195, 138, 0.6); animation: dot-ping 2.4s ease-out infinite; }
@keyframes dot-ping { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(76, 195, 138, 0); } }
.hero__title { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.1; letter-spacing: -1px; margin: 0 0 20px; }
.hero__title b { color: var(--accent); font-weight: 600; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.reveal { opacity: 0; transform: translateY(14px); animation: reveal 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal--2 { animation-delay: 0.12s; }
.reveal--3 { animation-delay: 0.24s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ===== Тур: вкладки экранов → окно приложения → описание ===== */
.tour { max-width: 1120px; margin: 0 auto; }
.tour__steps {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
  padding: 6px; margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--card-glass); backdrop-filter: blur(6px);
}
.tour__step {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 8px; border: 0; border-radius: var(--radius-m);
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tour__step:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.tour__step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tour__step.is-active { color: var(--text); background: var(--secondary); }
.tour__num {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--secondary); color: var(--muted); font-size: 12px; font-weight: 600; transition: background 0.2s, color 0.2s;
}
.tour__step.is-active .tour__num { background: var(--accent); color: var(--on-accent); }
.tour__progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.tour__step.is-active .tour__progress { animation: tour-progress var(--tour-duration, 6s) linear forwards; }
.tour.is-paused .tour__step.is-active .tour__progress { animation-play-state: paused; }
@keyframes tour-progress { to { transform: scaleX(1); } }

/* Окно наклоняется за курсором (--rx, --ry из site.js), блик бежит за ним (--gx, --gy) */
.tour__stage { perspective: 1600px; }
.tour__stage .appframe {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.tour__stage.is-idle .appframe { transition-duration: 0.8s; }
.appframe__glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.07), transparent 45%);
}
.tour__stage:hover .appframe__glare { opacity: 1; }
.appframe__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(17, 19, 24, 0.75); color: var(--text);
  font-size: 24px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity 0.2s, background 0.2s;
}
.appframe__nav--prev { left: 14px; }
.appframe__nav--next { right: 14px; }
.tour__stage:hover .appframe__nav, .appframe__nav:focus-visible { opacity: 1; }
.appframe__nav:hover { background: var(--accent); border-color: var(--accent); }

.tour__info { max-width: 720px; margin: 22px auto 0; text-align: center; min-height: 104px; }
.tour__info h3 { margin: 0 0 6px; }
.tour__info p { margin: 0; color: var(--muted); }
.tour__caption { margin-top: 6px !important; font-size: 13px; opacity: 0.8; }

/* Окно приложения с меняющимися скриншотами */
.appframe {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--accent-rgb), 0.06);
  aspect-ratio: 3 / 2;
}
.appframe__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 6.5s ease-out;
}
.appframe__shot.is-active { opacity: 1; transform: scale(1); }

/* Возможности: подсветка карточки следует за курсором (--mx, --my из site.js) */
.feature { position: relative; overflow: hidden; padding: 24px; transition: border-color 0.2s, transform 0.2s; }
.feature::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.14), transparent 60%);
}
.feature:hover { border-color: rgba(var(--accent-rgb), 0.45); transform: translateY(-3px); }
.feature:hover::before { opacity: 1; }
.feature > * { position: relative; }
.feature__icon { font-size: 22px; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.14); color: var(--accent); margin-bottom: 14px; }
.section { margin-top: 72px; }
.section__head { max-width: 640px; margin-bottom: 8px; }
.section__head--center { margin: 0 auto 24px; text-align: center; }
.cta { display: flex; align-items: center; gap: 24px; padding: 28px 32px; }
.cta > div { flex: 1; }
.cta p { margin: 0; }

/* Пёс-талисман: ролики лежат стопкой и плавно сменяют друг друга */
.mascot {
  position: relative; flex: 0 0 auto; width: 240px; aspect-ratio: 3 / 2;
  padding: 0; border: 0; border-radius: var(--radius-m); overflow: hidden;
  background: #0b0c0f; cursor: pointer;
  -webkit-mask-image: radial-gradient(ellipse at 60% 55%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at 60% 55%, #000 55%, transparent 100%);
}
.mascot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mascot__clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.mascot__clip.is-active { opacity: 1; }
.mascot__hint {
  position: absolute; left: 50%; bottom: 8px; translate: -50% 0;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(11, 12, 15, 0.7); color: var(--muted); font-size: 12px;
}

/* Шаги установки */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 46px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--secondary);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* ===== Админка ===== */
.admin-nav { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-nav a { padding: 7px 14px; border-radius: var(--radius-s); color: var(--muted); background: transparent; }
.admin-nav a:hover { color: var(--text); background: var(--secondary); }
.admin-nav a.is-active { color: var(--on-accent); background: var(--accent); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.login-card { max-width: 400px; margin: 60px auto; }

/* Админка: проекты — вкладки «Обновлений» и метки в истории пользователя (цвет проекта через data-theme) */
.project-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.project-tabs a {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: var(--radius-m);
  border: 1px solid var(--line); background: var(--card-glass); color: var(--text); transition: border-color 0.2s, background 0.2s;
}
.project-tabs a small { color: var(--muted); font-size: 11px; }
.project-tabs a:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--text); }
.project-tabs a.is-active { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25); }
.project-chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px; margin: 1px 4px 1px 0; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}
.stat--small { font-size: 20px; line-height: 1.6; }
.grid-side-left--wide { grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.6fr); }

/* ===== devildog.ru: список приложений ===== */
.hub-hero { text-align: center; padding: 70px 0 40px; }
.hub-hero h1 { font-size: 52px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.app-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; color: var(--text); transition: transform 0.2s ease, border-color 0.2s; }
.app-card:hover { color: var(--text); transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.45); }
.app-card img { width: 56px; height: 56px; border-radius: 12px; }
.app-card h3 { font-size: 20px; }
.app-card .row { margin-top: auto; }

/* Название проекта: на devildog.ru приставка — цветом проекта, «DevilDog» — фирменным оранжевым */
.pname b { color: var(--brand); font-weight: 600; }
.pname__prefix { color: var(--text); }
/* Карточка проекта на devildog.ru — рамка и значок в цвете проекта */
.app-card[data-theme] img { filter: var(--video-filter); }
.app-card[data-theme]:hover { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.15), 0 18px 50px rgba(var(--accent-rgb), 0.12); }
.app-card .badge--soon { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }

/* Шапка devildog.ru: значок и название крупнее — это главный сайт бренда */
.brand--hub img { width: 40px; height: 40px; border-radius: 9px; }
.brand--hub span { font-size: 24px; }
.brand--hub b { color: var(--brand); }
/* Значок пса на сайтах проектов — в палитре проекта */
.brand--themed img { filter: var(--video-filter); }

/* ===== Сайт проекта в разработке ===== */
.hero__dot--accent { background: var(--accent); animation: dot-ping-accent 2.4s ease-out infinite; }
@keyframes dot-ping-accent { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } }
.soon-hero { max-width: 760px; margin: 0 auto; padding: 32px 0 36px; text-align: center; }
.soon-hero__title { font-size: clamp(40px, 5vw, 68px); line-height: 1.05; letter-spacing: -1px; margin: 0 0 18px; }
.soon-hero__title b { color: var(--brand); font-weight: 600; text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.35); }
/* Полоса «собираем»: бегущие полосы цвета проекта */
.soon-progress {
  position: relative; height: 8px; max-width: 420px; margin: 0 auto; border-radius: 999px; overflow: hidden;
  background: var(--secondary);
}
.soon-progress span {
  position: absolute; inset: 0 auto 0 0; width: 62%; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, rgba(var(--accent-rgb), 0.55) 10px 20px);
  background-size: 28px 28px; animation: soon-stripes 0.9s linear infinite, soon-breathe 3.2s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55);
}
@keyframes soon-stripes { to { background-position: 28px 0; } }
@keyframes soon-breathe { 0%, 100% { transform: scaleX(0.94); } 50% { transform: scaleX(1.08); } }
.soon-progress span { transform-origin: left; }

.soon-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 24px; }
.soon-main__video { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius-l); overflow: hidden; background: #0b0c0f; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.18), 0 24px 60px rgba(var(--accent-rgb), 0.12); }
.soon-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease; filter: var(--video-filter); }
.soon-clip.is-active { opacity: 1; }
.soon-main__tag { position: absolute; left: 14px; bottom: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(11, 12, 15, 0.72); color: var(--text); font-size: 13px; }
.soon-main__text h2 { margin-top: 0; }
.soon-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 4px; }
.soon-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 0 8px 2px; color: var(--muted); }
.soon-steps li small { margin-left: auto; font-size: 12px; }
.soon-steps li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 30px; bottom: -10px; width: 2px; background: var(--line); }
.soon-steps__dot { position: relative; z-index: 1; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); }
.soon-steps li.is-done { color: var(--text); }
.soon-steps li.is-done .soon-steps__dot { background: var(--accent); border-color: var(--accent); }
.soon-steps li.is-done::after { background: var(--accent); }
.soon-steps li.is-active { color: var(--text); font-weight: 600; }
.soon-steps li.is-active small { color: var(--accent); }
.soon-steps li.is-active .soon-steps__dot { border-color: var(--accent); animation: soon-pulse 1.6s ease-in-out infinite; }
@keyframes soon-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); } 50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); } }

.soon-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1120px; margin: 24px auto 0; }
.soon-cards > .card { margin-top: 0; }
.soon-card { position: relative; overflow: hidden; padding: 0 0 20px; transition: transform 0.2s ease, border-color 0.2s; }
.soon-card > :not(.soon-card__video) { position: relative; z-index: 2; padding: 0 20px; }
.soon-card h3 { margin: 16px 0 6px; }
.soon-card p { margin: 0; }
.soon-card__video { aspect-ratio: 16 / 9; overflow: hidden; background: #0b0c0f; }
.soon-card__video video { width: 100%; height: 100%; object-fit: cover; filter: var(--video-filter); transform: scale(1.02); transition: transform 0.6s ease; }
.soon-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), 0.5); }
.soon-card:hover video { transform: scale(1.08); }
.soon-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.12), transparent 60%);
}
.soon-card:hover::before { opacity: 1; }
@media (max-width: 960px) { .soon-main, .soon-cards { grid-template-columns: 1fr; } }

@media (max-width: 960px) {
  h1 { font-size: 34px; }
  .grid-side, .grid-side-left { grid-template-columns: 1fr; }
  .tour__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar__inner { gap: 12px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar__inner { padding: 0 12px; gap: 8px; }
  .brand span { display: none; }
  .topbar__user span { display: none; }
  .tabs a { padding: 11px 10px 13px; }
  .tabs a.is-active::after { left: 10px; right: 10px; }
  .kv { grid-template-columns: 1fr; }
  .tour__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { flex-direction: column; align-items: flex-start; }
  .mascot { width: 100%; }
  .table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
