/* Главная — по higgsfield.ai (Explore, снято 07.10.2026 на 1920):
   лента новинок 512×288 (16:9) через 20, скр. 8, подпись 16/24 700 капсом + 14/20 серым;
   плитки 390×120 через 18, скр. 12, #23262a, поля 14, заголовок 14/24 600, подпись 12/18;
   галерея модели — заголовок 28/36 700 капсом салатовым, кладка 4 колонки, окно с затуханием и кнопкой 242×48.
   Своё: карточка расхода вместо их промо-баннера, полоса «Деньги — честно» (наше отличие от них). */

body.is-home .toolbar, body.is-home .feed, body.is-home .dock, body.is-home .vl { display: none !important; }
.home {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 16px 48px;
  --car-w: clamp(260px, calc((100vw - 16px) / 3.6 - 20px), 512px);
}
.home[hidden] { display: none; }
.h-sec { margin-top: 48px; }
.h-sec:first-child { margin-top: 0; }

/* лента новинок */
.h-car { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
.h-car::-webkit-scrollbar { display: none; }
.h-card { flex: none; width: var(--car-w); scroll-snap-align: start; text-align: left; color: inherit; text-decoration: none; }
.h-card-media { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #1c1e20; }
.h-card-media img, .h-card-media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease-out; }
@media (hover: hover) { .h-card:hover .h-card-media img, .h-card:hover .h-card-media video { transform: scale(1.03); } }
.h-card-media .h-badge { position: absolute; left: 8px; top: 8px; }
.h-card-title { display: block; margin: 12px 0 0; font-size: 16px; line-height: 24px; font-weight: 700; text-transform: uppercase; color: var(--text); }
.h-card-sub { display: block; margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* у озвучки картинки нет — волна на градиенте */
.h-audio-art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; background: radial-gradient(80% 90% at 30% 20%, rgba(209, 254, 23, .22), transparent 60%), linear-gradient(135deg, #1c1e20, #0f1113); }
.h-audio-art i { width: 4px; border-radius: 2px; background: var(--primary); opacity: .85; }

/* значок-метка на карточке и плитке */
.h-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text); }
.h-badge .ico { width: 12px; height: 12px; }
.h-badge--new { background: var(--primary); color: var(--on-primary); backdrop-filter: none; }

/* расход + плитки */
.h-row { display: grid; grid-template-columns: minmax(0, 645fr) repeat(3, minmax(0, 390fr)); grid-template-rows: repeat(2, minmax(120px, auto)); gap: 18px; }
.h-spend { grid-row: span 2; border-radius: 12px; padding: 20px; background: radial-gradient(90% 120% at 100% 0%, rgba(209, 254, 23, .10), transparent 55%), #1c1e20; border: 1px solid rgba(255, 255, 255, .04); display: flex; flex-direction: column; }
.h-spend-label { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
.h-spend-sum { margin: 4px 0 0; font-size: 40px; line-height: 48px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.h-spend-sum small { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.h-spend-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin-top: 16px; overflow: hidden; }
.h-spend-bar i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.h-spend-bar.is-warn i { background: #ffb020; } .h-spend-bar.is-over i { background: var(--danger); }
.h-spend-eq { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.h-spend-acts { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.h-btn { height: 36px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .06); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.h-btn .ico { width: 16px; height: 16px; }
@media (hover: hover) { .h-btn:hover { background: rgba(255, 255, 255, .1); } }

.h-tile { min-height: 120px; border-radius: 12px; padding: 14px; background: #23262a; display: flex; flex-direction: column; text-align: left; color: inherit; position: relative; transition: background .15s ease-out; }
@media (hover: hover) { .h-tile:hover { background: #2b2e33; } }
.h-tile > .ico { width: 20px; height: 20px; color: var(--text); }
.h-tile .h-badge { position: absolute; right: 14px; top: 14px; background: rgba(255, 255, 255, .06); backdrop-filter: none; }
.h-tile-title { display: block; margin-top: auto; font-size: 14px; line-height: 24px; font-weight: 600; color: var(--white); }
.h-tile-sub { display: block; font-size: 12px; line-height: 18px; color: var(--muted); }

/* «Деньги — честно» */
/* «Деньги — честно»: заголовок крупно слева, справа 2×2 карточки с числом — читается за секунду, как их промо-баннеры */
.h-promise {
  position: relative; overflow: hidden; border-radius: 24px; padding: 48px 40px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center;
  background: radial-gradient(60% 90% at 0% 100%, rgba(209, 254, 23, .16), transparent 60%), radial-gradient(50% 70% at 100% 0%, rgba(209, 254, 23, .07), transparent 60%), #131517;
  border: 1px solid rgba(209, 254, 23, .12);
}
.hp-eyebrow { margin: 0 0 12px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); }
.hp-title { margin: 0; font-size: 56px; line-height: 60px; font-weight: 700; text-transform: uppercase; color: var(--text); }
.hp-title em { font-style: normal; color: var(--primary); }
.hp-text { margin: 20px 0 0; max-width: 420px; font-size: 16px; line-height: 24px; color: var(--muted); }
.hp-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp-grid li { border-radius: 16px; padding: 24px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); display: flex; flex-direction: column; min-height: 196px; }
.hp-num { font-size: 44px; line-height: 52px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-name { margin-top: auto; padding-top: 16px; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); }
.hp-desc { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* заголовок раздела — как их «SEEDANCE 2.5» */
.h-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.h-title { margin: 0; font-size: 28px; line-height: 36px; font-weight: 700; text-transform: uppercase; color: var(--primary); }
.h-sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }

/* галерея модели: кладка, окно с затуханием и кнопкой */
.h-gal { position: relative; max-height: 720px; overflow: hidden; }
.h-gal.is-short { max-height: none; }
.h-masonry { columns: 4; column-gap: 12px; }
.h-item { position: relative; display: block; width: 100%; margin: 0 0 12px; break-inside: avoid; border-radius: 8px; overflow: hidden; background: #1c1e20; cursor: pointer; }
.h-item img, .h-item video { width: 100%; height: auto; display: block; }
.h-item-ov { position: absolute; inset: auto 0 0 0; padding: 32px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); display: flex; align-items: end; gap: 8px; opacity: 0; transition: opacity .15s ease-out; }
@media (hover: hover) { .h-item:hover .h-item-ov, .h-item:focus-within .h-item-ov { opacity: 1; } }
@media (hover: none) { .h-item-ov { opacity: 1; } }
.h-item-text { flex: 1; min-width: 0; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .9); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-item .h-btn { height: 28px; padding: 0 10px; font-size: 12px; line-height: 16px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); flex: none; }
.h-gal-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; background: linear-gradient(rgba(15, 17, 19, 0), var(--bg) 85%); display: flex; align-items: end; justify-content: center; padding-bottom: 16px; pointer-events: none; }
.h-gal.is-short .h-gal-fade { display: none; }
.h-more { pointer-events: auto; height: 48px; min-width: 242px; padding: 0 12px; border-radius: 12px; border: 2px solid rgba(0, 0, 0, .09); background: rgba(209, 254, 23, .24); color: var(--primary); font-size: 16px; line-height: 24px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; backdrop-filter: blur(8px); }
.h-more .ico { width: 18px; height: 18px; }
@media (hover: hover) { .h-more:hover { background: rgba(209, 254, 23, .32); } }

/* подвал — по higgsfield.ai (снято 07.10.2026): #d1fe17 во всю ширину, отступ 36, надпись 40/48 капсом #131517,
   колонки с шагом ~298 от x=448, заголовок колонки 16/24 #131517 на 48%, ссылки 16/24 через 36, внизу полоса 14 px на тёмном */
.h-footer { margin: 64px -16px -48px; background: var(--primary); color: #131517; }
.hf-top { display: grid; grid-template-columns: minmax(0, 432fr) minmax(0, 1457fr); gap: 0; padding: 36px 16px 0; }
.hf-title { margin: 0; font-size: 40px; line-height: 48px; font-weight: 700; text-transform: uppercase; }
.hf-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 48px; }
.hf-head { margin: 0 0 12px; font-size: 16px; line-height: 24px; font-weight: 500; color: rgba(19, 21, 23, .62); }  /* у них .48 = контраст ~4.0, у нас ~4.8 */
.hf-head:not(:first-child) { margin-top: 32px; }
.hf-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.hf-col button, .hf-col a { padding: 0; font-size: 16px; line-height: 24px; font-weight: 500; color: #131517; text-decoration: none; text-align: left; }
@media (hover: hover) { .hf-col button:hover, .hf-col a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.hf-col button:focus-visible, .hf-col a:focus-visible { outline: 2px solid #131517; outline-offset: 2px; border-radius: 4px; }
.hf-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 96px 16px 24px; font-size: 16px; line-height: 24px; font-weight: 500; }
.hf-strip { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px; background: var(--bg); font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .6); }

/* лента моделей — слайдер: стрелки 40×40 по краям (как у них — проявляются при наведении), мышью можно тащить */
.h-car-wrap { position: relative; }
.h-car.is-drag { scroll-snap-type: none; cursor: grabbing; }
.h-car.is-drag * { pointer-events: none; }
.h-car-nav {
  position: absolute; top: calc(var(--car-w) * 9 / 16 / 2 - 20px); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(15, 17, 19, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .1); color: var(--white);
  opacity: 0; transition: opacity .15s ease-out, background .15s ease-out;
}
.h-car-nav .ico { width: 20px; height: 20px; }
.h-car-prev { left: 8px; } .h-car-next { right: 8px; }
.h-car-nav:disabled { display: none; }
@media (hover: hover) { .h-car-wrap:hover .h-car-nav { opacity: 1; } .h-car-nav:hover { background: rgba(15, 17, 19, .9); } }
.h-car-nav:focus-visible { opacity: 1; outline: 2px solid var(--primary); outline-offset: 2px; }
@media (hover: none) { .h-car-nav { display: none; } }

@media (max-width: 1199px) {
  .h-row { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; }
  .h-spend { grid-row: auto; grid-column: 1 / -1; }
  .h-masonry { columns: 3; }
  .h-promise { grid-template-columns: 1fr; padding: 40px 32px; }
  .hf-top { grid-template-columns: 1fr; gap: 32px; }
  .hf-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .home { padding: 12px 12px 40px; --car-w: 78vw; }
  .h-car { margin: 0 -12px; padding: 0 12px; scroll-padding: 0 12px; gap: 12px; }
  .h-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .h-sec { margin-top: 32px; }
  .h-spend-sum { font-size: 32px; line-height: 40px; }
  .h-masonry { columns: 2; column-gap: 8px; }
  .h-item { margin-bottom: 8px; }
  .h-title { font-size: 22px; line-height: 28px; }
  .h-gal { max-height: 560px; }
  .h-promise { padding: 28px 16px; gap: 24px; border-radius: 16px; }
  .hp-title { font-size: 36px; line-height: 40px; }
  .hp-grid { grid-template-columns: 1fr; gap: 12px; }
  .hp-grid li { min-height: 0; padding: 20px; }
  .hp-num { font-size: 36px; line-height: 44px; }
  .h-footer { margin: 48px -12px -40px; }
  .hf-top { padding: 32px 16px 0; }
  .hf-title { font-size: 30px; line-height: 36px; }
  .hf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .hf-bottom { padding-top: 48px; font-size: 14px; line-height: 20px; flex-direction: column; gap: 4px; }
  .h-head { flex-direction: column; align-items: start; gap: 4px; }
}

/* шапка на телефоне: с пунктом «Главная» она была шире экрана (394 при 375, 352 при 320) — ужимаем поля */
@media (max-width: 400px) {
  .nav { padding: 0 12px; }
  .nav-links a { padding: 4px 5px; }
}
@media (max-width: 340px) { .nav-links a { padding: 4px 3px; } }

/* карточка модели без своей работы: знак модели на градиенте */
.h-empty-art .ico { width: 48px; height: 48px; color: var(--primary); opacity: .85; }
/* подвал на 1200–1599: «ИИ‑платформа» в колонку не влезала при 40 px */
@media (max-width: 1599px) and (min-width: 1200px) { .hf-title { font-size: 34px; line-height: 40px; } }
