/* ============================================================================
   YAZME | НОВАЯ ГЛАВНАЯ «ТИХИЙ ПОИСК» · стили                       21.10.2026
   Файл: persona/assets/home4.css · подключает persona/inc/home4.php и search.php
   Цвета — только токены раздела (persona/assets/tokens.css), поэтому все три
   темы сайта (Янтарь, Cloud Dancer, Полночь) работают сами.
   ========================================================================== */

/* PWA и телефоны: фон под системными полосами того же цвета, что страница */
html:has(> body.h4-body){ background: var(--s0); }
.h4-body{ min-height: 100dvh; }

/* Шапка: без логотипа и без аватара — профиль живёт в доке */
.h4-body .yzt-logo, .h4-body .yzt-me{ display: none !important; }
.h4-pill{
  display: none; flex: 1 1 auto; min-width: 0; height: 40px; margin: 0 6px;
  border: 0; border-radius: var(--r-full, 999px); background: var(--s2); color: var(--t3);
  font: 500 14px/1 var(--f-ui); align-items: center; gap: 8px; padding: 0 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; text-align: left;
}
.h4-pill svg{ color: var(--hero); flex: none; }
.h4-body.h4-min .h4-pill{ display: flex; animation: h4drop .4s var(--e-out, cubic-bezier(.22,1,.36,1)); }
/* Кнопка «Установить приложение» остаётся в шапке всегда, пока приложение
   не стоит, — и наверху, и при прокрутке (правило шапки прятало её на
   ширине 700–860, пока поле поиска «развёрнуто», а поля в шапке тут нет). */
@media (max-width: 860px){
  html:not(.yz-standalone):not(.yz-pwa-installed) .h4-body .yzt .yzt-app{ display: inline-grid !important; }
}
/* Пилюля поиска в шапке: на телефоне коротко «Поиск», чтобы слово не обрывалось. */
.h4-pill .h4-pl-s{ display: none; }
.h4-pill span{ overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px){
  .h4-pill{ margin: 0 4px; padding: 0 12px; gap: 6px; }
  .h4-pill .h4-pl-l{ display: none; } .h4-pill .h4-pl-s{ display: inline; }
  .h4-body.h4-min .yzt .yzt-tar{ display: none !important; }
}
@keyframes h4drop{ from{ opacity: 0; transform: translateY(22px) scale(.92); } to{ opacity: 1; transform: none; } }

/* ── Поиск ─────────────────────────────────────────────────────────────── */
.h4-askw{ position: relative; margin: 18px 16px 0; z-index: 20; }
.h4-ask{
  position: relative; display: flex; align-items: center; gap: 10px; height: 58px; margin: 0;
  padding: 0 8px 0 16px; border-radius: 22px; background: var(--s1);
  box-shadow: 0 18px 46px -26px var(--hero);
}
.h4-ask::before{
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, var(--hero), color-mix(in srgb, var(--mark) 40%, transparent) 40%, var(--hair) 70%, var(--hero));
  background-size: 240% 240%; animation: h4flow 7s ease infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes h4flow{ 0%,100%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } }
.h4-star{ color: var(--hero); display: grid; place-items: center; flex: none; }
.h4-fld{ position: relative; flex: 1 1 auto; min-width: 0; height: 58px; display: block; }
.h4-fld input{
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--t1); font: 500 16px var(--f-ui); padding: 0; -webkit-appearance: none; appearance: none;
}
.h4-fld input::-webkit-search-cancel-button{ display: none; }
.h4-js .h4-fld input::placeholder{ color: transparent; }
.h4-fld input::placeholder{ color: var(--t3); }
.h4-ph{
  position: absolute; left: 0; right: 0; top: 0; height: 58px; display: flex; align-items: center;
  color: var(--t3); font: 500 16px var(--f-ui); pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s, transform .3s;
}
.h4-ph.out{ opacity: 0; transform: translateY(-8px); }
/* Пример в поле прячется с первой буквы (раньше display:flex перебивал hidden) */
.h4-ph[hidden], .h4-ask.has .h4-ph{ display: none !important; }
.h4-go{
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--hero); color: var(--on-hero);
}
.h4-mic{ background: var(--s3); color: var(--t2); }
.h4-ask:not(.has) #h4Send{ display: none; }
.h4-ask.has #h4Mic{ display: none; }

.h4-res{
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
  margin-top: 0; border-radius: var(--r-md, 22px); background: var(--s2); padding: 6px;
  box-shadow: var(--sh-lg); max-height: min(62vh, 520px); overflow-y: auto;
}
.h4-gh{ display: flex; align-items: center; padding: 10px 12px 4px; font: 700 11.5px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.h4-clr{ margin-left: auto; border: 0; background: transparent; color: var(--hero); font: 600 12.5px var(--f-ui); text-transform: none; letter-spacing: 0; cursor: pointer; padding: 4px; }
.h4-qi{
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; background: transparent; border-radius: 12px; text-align: left; cursor: pointer;
  color: var(--t2); font: 400 15px var(--f-ui); text-decoration: none;
}
.h4-qi svg{ color: var(--t3); flex: none; }
.h4-qi b{ color: var(--t1); font-weight: 600; }
.h4-qi:hover, .h4-qi.on, .h4-hi:hover, .h4-hi.on{ background: var(--s3); }
.h4-qi.h4-find{ margin-top: 4px; border-top: 1px solid var(--hair); border-radius: 0 0 14px 14px; color: var(--hero-hi); }
.h4-qi.h4-find svg{ color: var(--hero); }
.h4-hi{ display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--t1); text-decoration: none; }
.h4-hi img, .h4-hi .h4-av{ width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--s3); display: grid; place-items: center; color: var(--t3); font-weight: 700; }
.h4-hi b{ display: block; font-size: 14px; font-weight: 600; }
.h4-hi small{ display: block; font-size: 12px; color: var(--t3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.h4-dym{ display: block; padding: 8px 12px 4px; font-size: 12.5px; color: var(--t3); }
.h4-dym a{ color: var(--t1); font-weight: 600; }

/* ── Быстрые агенты ────────────────────────────────────────────────────── */
.h4-agents{ display: flex; gap: 8px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
.h4-agents::-webkit-scrollbar{ display: none; }
.h4-agents::after{ content: ""; flex: 0 0 4px; }
.h4-agc{
  flex: none; display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 11px;
  border: 0; border-radius: var(--r-full, 999px); background: var(--s2); color: var(--t1);
  font: 600 13.5px var(--f-ui); cursor: pointer; transition: transform .12s;
}
.h4-agc span{ font-size: 16px; line-height: 1; }
.h4-agc:active{ transform: scale(.96); }
.h4-typing .h4-agents{ display: none; }

/* ── Бонусы за заходы ──────────────────────────────────────────────────── */
.h4-bonus{ display: flex; flex-direction: column; gap: 8px; margin: 18px 16px 0; }
.h4-bh{ display: flex; align-items: center; gap: 8px; padding: 0 2px; font: 700 11.5px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.h4-bx{ margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--s2); color: var(--t2); display: grid; place-items: center; cursor: pointer; }
.h4-gift{
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--t1);
  background: linear-gradient(100deg, color-mix(in srgb, var(--mark) 16%, transparent), color-mix(in srgb, var(--mark) 4%, transparent) 60%), var(--s1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mark) 24%, transparent);
}
.h4-gi{ font-size: 22px; line-height: 1; }
.h4-gt{ display: flex; flex-direction: column; min-width: 0; }
.h4-gt b{ font-size: 14px; } .h4-gt small{ font-size: 12px; color: var(--t2); }
.h4-gl{ margin-left: auto; font: 700 12px var(--f-ui); color: var(--mark); white-space: nowrap; }
.h4-streak{ display: block; padding: 14px 14px 12px; border-radius: 22px; background: var(--s1); color: var(--t1); text-decoration: none; box-shadow: inset 0 0 0 1px var(--hero-lo); }
.h4-sk{ display: flex; align-items: center; gap: 12px; }
.h4-fire{ width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--hero-lo); animation: h4flick 2.6s ease-in-out infinite; }
@keyframes h4flick{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.08); } }
.h4-sx{ display: flex; flex-direction: column; min-width: 0; }
.h4-sx b{ font: 800 16px/1.2 var(--f-display); letter-spacing: -.01em; }
.h4-sx small{ font-size: 12px; color: var(--t2); margin-top: 3px; }
.h4-sn{ margin-left: auto; text-align: right; flex: none; }
.h4-sn b{ display: block; font: 800 22px/1 var(--f-display); color: var(--hero-hi); }
.h4-sn small{ font-size: 11px; color: var(--t3); }
.h4-days{ list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.h4-days li{ display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.h4-days i{ width: 100%; height: 34px; border-radius: 11px; display: grid; place-items: center; font: 700 12.5px var(--f-ui); font-style: normal; background: var(--s3); color: var(--t3); font-variant-numeric: tabular-nums; }
.h4-days span{ font-size: 10.5px; color: var(--t3); white-space: nowrap; }
.h4-days .done i{ background: color-mix(in srgb, var(--hero) 28%, transparent); color: var(--hero-hi); }
.h4-days .today i{ background: var(--hero); color: var(--on-hero); box-shadow: 0 0 0 3px var(--hero-lo); }
.h4-days .today span{ color: var(--hero-hi); font-weight: 700; }
.h4-days .max i{ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mark) 50%, transparent); color: var(--mark); }
.h4-hint{ margin: 12px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--t2); }
.h4-hint b{ color: var(--t1); }
.h4-bonus.h4-out{ animation: h4out .3s ease forwards; }
@keyframes h4out{ to{ opacity: 0; transform: translateY(-8px); } }

/* ── Ритм сетки и большая карточка ─────────────────────────────────────── */
.h4 .h4-grid + .h4-big, .h4 .h4-big + .h4-grid{ margin-top: 12px; }
.h4-big{
  position: relative; display: block; margin: 12px 16px 0; height: min(118vw, 520px); max-width: 100%;
  border-radius: var(--r-lg, 28px); overflow: hidden; background: var(--s2); color: #fff; text-decoration: none;
  transition: transform .15s;
}
.h4-big:active{ transform: scale(.98); }
.h4-big img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h4-shd{ position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,8,0) 45%, rgba(10,9,8,.9) 100%); }
.h4-tag{
  position: absolute; top: 12px; left: 12px; z-index: 2; height: 22px; padding: 0 9px; border-radius: 999px;
  font: 600 9px/22px ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .13em; text-transform: uppercase; color: #fff;
  background: rgba(10,9,8,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(250,249,245,.16);
}
.h4-bd{ position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.h4-why{ font-size: 12px; font-weight: 600; background: rgba(10,9,8,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; padding: 5px 11px; margin-bottom: 10px; }
.h4-nm{ font: 800 26px/1.08 var(--f-display); letter-spacing: -.02em; text-wrap: balance; text-shadow: 0 1px 14px rgba(0,0,0,.5); }
.h4-tg{ font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.82); margin-top: 6px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.h4-btn{ margin-top: 14px; height: 44px; padding: 0 20px; border-radius: 999px; background: #faf9f5; color: #0A0908; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; }

/* ── Бесконечная лента без кнопки ──────────────────────────────────────── */
.h4-dots{ display: none; justify-content: center; gap: 6px; padding: 22px 0 6px; }
.h4-dots i{ width: 7px; height: 7px; border-radius: 50%; background: var(--t3); animation: h4blink 1.2s infinite; }
.h4-dots i:nth-child(2){ animation-delay: .2s; } .h4-dots i:nth-child(3){ animation-delay: .4s; }
@keyframes h4blink{ 0%,100%{ opacity: .25; } 50%{ opacity: 1; } }
.h4-js .h4-more:not(.sc3-done) .h4-dots{ display: flex; }
.h4-js .h4-more:not(.sc3-done) a{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Страница результатов /search ──────────────────────────────────────── */
.h4s{ max-width: 760px; margin: 0 auto; padding-bottom: var(--nav-gap, 88px); }
.h4s .h4-askw{ margin-top: 12px; }
.h4s-tabs{ display: flex; gap: 6px; padding: 14px 16px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hair); }
.h4s-tabs::-webkit-scrollbar{ display: none; }
.h4s-tabs a{ flex: none; height: 34px; border-radius: 999px; padding: 0 14px; display: flex; align-items: center; color: var(--t2); font: 600 13.5px var(--f-ui); text-decoration: none; }
.h4s-tabs a[aria-current="page"]{ background: var(--t1); color: var(--s0); }
.h4s-h{ margin: 22px 20px 12px; font: 800 17px var(--f-display); }
.h4s-ans{ margin: 16px 16px 0; padding: 16px; border-radius: 20px; background: var(--s1); }
.h4s-ans .hd{ display: flex; align-items: center; gap: 8px; color: var(--hero); }
.h4s-ans .hd b{ color: var(--t1); font-size: 15px; }
.h4s-ans p{ margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--t2); }
.h4s-ans button{ margin-top: 14px; height: 42px; border-radius: 999px; border: 0; background: var(--hero); color: var(--on-hero); font: 700 14px var(--f-ui); padding: 0 18px; cursor: pointer; }
.h4s-web{ display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.h4s-wr{ display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; text-decoration: none; }
.h4s-wr:hover{ background: var(--s1); }
.h4s-wd{ display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--t3); }
.h4s-wd i{ width: 20px; height: 20px; border-radius: 6px; background: var(--s3); color: var(--t2); font: 700 10px/20px var(--f-ui); font-style: normal; text-align: center; }
.h4s-wr b{ font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--info, #4c8dff); }
html[data-yz-theme="amber"] .h4s-wr b, html[data-yz-theme="midnight"] .h4s-wr b, html:not([data-yz-theme]) .h4s-wr b{ color: #9fbcff; }
.h4s-wr span.t{ font-size: 13px; line-height: 1.45; color: var(--t2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.h4s-none{ margin: 22px 20px 6px; color: var(--t2); font-size: 14px; line-height: 1.5; }
.h4s-mk{ display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding: 12px 14px; border-radius: 16px; background: var(--s1); color: var(--t1); text-decoration: none; }
.h4s-mk i{ width: 38px; height: 38px; border-radius: 50%; background: var(--s3); display: grid; place-items: center; font-style: normal; font-size: 20px; color: var(--t2); }
.h4s-mk b{ display: block; font-size: 14px; } .h4s-mk small{ display: block; font-size: 12px; color: var(--t3); }
.h4s-cat{ display: block; margin: 16px 16px 0; text-align: center; padding: 13px; border-radius: 999px; background: var(--s2); color: var(--t1); font-weight: 600; font-size: 14px; text-decoration: none; }
.h4s-rel{ display: flex; flex-direction: column; padding: 0 16px; }
.h4s-rel a{ display: flex; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--hair); color: var(--t1); font-size: 14.5px; text-decoration: none; padding: 0 4px; }
.h4s-rel a svg{ color: var(--t3); flex: none; }
.h4s-err{ margin: 16px; padding: 12px 14px; border-radius: 14px; background: var(--s1); color: var(--t2); font-size: 13px; }

/* ═══ ШАПКА КАК В ПРОТОТИПЕ ════════════════════════════════════════════════
   Та же общая шапка (includes/yz_topbar.php), только тише: фон страницы,
   без линии, кнопки-призраки, плюс — акцентный кружок. Истории — стопкой
   слева, как в Telegram: нажал — под шапкой раскрылся ряд, нажал ещё — свернулся. */
.h4-body .yzt{
  --yzt-bg: color-mix(in srgb, var(--s0) 86%, transparent);
  --yzt-solid: var(--s0);
  border-bottom: 0;
  box-shadow: 0 1px 0 transparent; transition: box-shadow .25s;
}
.h4-body.h4-min .yzt{ box-shadow: 0 1px 0 var(--hair); }
.h4-body .yzt .yzt-row{ min-height: 58px; gap: 6px; }
.h4-body .yzt .yzt-b, .h4-body .yzt .bell-btn{ background: transparent; border-color: transparent; color: var(--t2); }
.h4-body .yzt .yzt-b:hover, .h4-body .yzt .bell-btn:hover{ background: var(--s2); color: var(--t1); }
.h4-body .yzt .yzt-in{ background: var(--s3); border-color: transparent; }
.h4-body .yzt .yzt-tar{ background: transparent; border-color: transparent; padding: 0 8px; }
.h4-body .yzt .yzt-tar span{ display: none; }
@media (min-width: 900px){ .h4-body .yzt .yzt-tar span{ display: inline; } .h4-body .yzt .yzt-tar{ border-color: color-mix(in srgb, var(--mark) 34%, transparent); padding: 0 12px; } }

/* ═══ ВИДЕО И ИСТОРИИ В ШАПКЕ — как в Telegram ═══════════════════════════
   Свёрнуто: одна стопка в шапке (кружок «Видео» + первые лица историй).
   Нажали — ряд кружков раскрывается внутри шапки, стопка уходит. Прокрутка
   или нажатие мимо — ряд схлопывается обратно в стопку. */
.h4-body .yzt .yzs-stack, .h4-body .yzt .yzs-mebtn, .h4-body .yzt .ysc-stack, .h4-body .yzt .ysc-mebtn{ display: none !important; }
.h4-body .yzs-tray:not(.h4-tray .yzs-tray), .h4-body .ysc-tray:not(.h4-tray .ysc-tray), .h4-body .yzv-tray:not(.h4-tray .yzv-tray){ display: none !important; }

.h4-stk{ display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 10px 0 4px; margin-left: -4px;
  border: 0; border-radius: 999px; background: transparent; color: var(--t2); font: 600 13px/1 var(--f-ui, inherit); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background .2s, opacity .25s, transform .3s var(--e-out, cubic-bezier(.22,1,.36,1)); }
.h4-stk[hidden]{ display: none !important; }
.h4-stk:hover{ background: var(--s2); color: var(--t1); }
.h4-stk:active{ transform: scale(.96); }
.h4-stk-f{ display: flex; align-items: center; }
.h4-stk-f i{ width: 32px; height: 32px; border-radius: 50%; margin-left: -11px; flex: none; display: grid; place-items: center;
  background: var(--s3) center/cover no-repeat; color: var(--t1); font: 700 12px/1 var(--f-ui, inherit); font-style: normal;
  box-shadow: 0 0 0 2px var(--s0), 0 0 0 3.6px var(--hair); transition: margin .3s var(--e-out, cubic-bezier(.22,1,.36,1)); }
.h4-stk-f i:first-child{ margin-left: 0; }
.h4-stk-f i.live{ box-shadow: 0 0 0 2px var(--s0), 0 0 0 3.6px var(--mark); }
.h4-stk-f i.gold{ box-shadow: 0 0 0 2px var(--s0), 0 0 0 3.6px #e2b13c; }
.h4-stk-f .h4-stk-v{ background: #140f08; color: #f7dd9b; box-shadow: 0 0 0 2px var(--s0), 0 0 0 3.6px #e2b13c; }
.h4-stk-f .h4-stk-v svg{ margin-left: 2px; }
.h4-stk:hover .h4-stk-f i{ margin-left: -6px; }
.h4-stk:hover .h4-stk-f i:first-child{ margin-left: 0; }
.h4-stk-t{ white-space: nowrap; }
.h4-stk.fresh .h4-stk-t{ color: var(--mark); }
.h4-body.h4-min .h4-stk-t{ display: none; }
@media (max-width: 400px){ .h4-stk-t{ display: none; } }

/* Раскрытый ряд живёт внутри шапки: шапка плавно вырастает вниз. */
.h4-tray{ display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s var(--e-out, cubic-bezier(.22,1,.36,1)); margin: 0 -12px; }
.h4-tray-in{ min-height: 0; overflow: hidden; }
.h4-tray .yzs-tray, .h4-tray .ysc-tray, .h4-tray .yzv-tray{ display: block !important; margin: 0 auto; opacity: 0; transform: translateY(-14px) scale(.96);
  transform-origin: 30px 0; transition: opacity .25s, transform .38s var(--e-out, cubic-bezier(.22,1,.36,1)); background: transparent; border: 0; }
.h4-tray .yzs-tray, .h4-tray .ysc-tray{ max-width: none !important; }
/* Первый кружок ряда — ровно под первым кружком стопки (и под краем шапки). */
.h4-tray .yzs-tray-in, .h4-tray .ysc-tray-in, .h4-tray .yzv-tray-in{
  padding-left: calc(var(--h4-rl, 12px) - (var(--yzs-cell, 78px) - var(--yzs-ring-d, 64px)) / 2) !important;
  padding-right: var(--h4-rl, 12px) !important; }
.h4-body.h4-st-open .h4-tray{ grid-template-rows: 1fr; }
.h4-body.h4-st-open .h4-tray .yzs-tray, .h4-body.h4-st-open .h4-tray .ysc-tray, .h4-body.h4-st-open .h4-tray .yzv-tray{ opacity: 1; transform: none; }
.h4-body.h4-st-open .h4-stk{ opacity: 0; transform: scale(.7); pointer-events: none; }
.h4-body.h4-st-open .yzt{ box-shadow: 0 10px 30px -18px rgba(0,0,0,.7); }
@media (prefers-reduced-motion: reduce){ .h4-tray, .h4-tray .yzs-tray, .h4-tray .yzv-tray, .h4-stk{ transition: none; } }

/* ═══ КОМПЬЮТЕР ════════════════════════════════════════════════════════════
   Верх — колонка по центру, как у поисковика: заголовок, большое поле, агенты,
   бонусы. Ниже — каталог во всю колонку сайта. Сетка ритма — ровно 4 в ряд,
   большая карточка — горизонтальная: портрет слева, текст справа. */
@media (min-width: 900px){
  .h4 .sc3-hero{ max-width: 760px; margin: 0 auto; padding: 44px 20px 0; text-align: center; }
  .h4 .sc3-hero h1{ font-size: 40px; }
  .h4 .sc3-hero p{ margin-left: auto; margin-right: auto; font-size: 15px; }
  .h4-in .h4 .h4-askw{ margin-top: 40px; }
  .h4 .h4-askw, .h4 .h4-agents, .h4 .h4-bonus{ max-width: 760px; margin-left: auto; margin-right: auto; }
  .h4 .h4-askw{ margin-top: 24px; }
  .h4-ask{ height: 64px; border-radius: 24px; padding-left: 20px; }
  .h4-fld, .h4-ph{ height: 64px; }
  .h4-fld input, .h4-ph{ font-size: 17px; }
  .h4 .h4-agents{ flex-wrap: wrap; justify-content: center; overflow: visible; padding: 16px 20px 0; }
  .h4 .h4-agents::after{ display: none; }
  .h4 .h4-bonus{ display: grid; grid-template-columns: 1fr 1.6fr; grid-template-areas: "bh bh" "gift streak"; align-items: start; margin-top: 26px; padding: 0 20px; }
  .h4 .h4-bonus .h4-bh{ grid-area: bh; }
  .h4 .h4-bonus .h4-gift{ grid-area: gift; height: 100%; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
  .h4 .h4-bonus .h4-gift .h4-gl{ margin-left: 0; }
  .h4 .h4-bonus .h4-streak{ grid-area: streak; }
  .h4 .h4-bonus:not(:has(.h4-gift)) .h4-streak, .h4 .h4-bonus:not(:has(.h4-streak)) .h4-gift{ grid-column: 1 / -1; }
  .h4 .sc3-navbar{ margin-top: 30px; }
  .h4 .h4-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .h4-big{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 380px; margin: 14px 20px 0; background: var(--s1); color: var(--t1); }
  .h4-big img{ position: relative; inset: auto; height: 380px; }
  .h4-big .h4-shd{ display: none; }
  .h4-big .h4-tag{ top: 16px; left: 16px; }
  .h4-bd{ position: static; padding: 40px 44px; justify-content: center; }
  .h4-why{ background: var(--hero-lo); color: var(--hero-hi); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .h4-nm{ font-size: 36px; text-shadow: none; }
  .h4-tg{ color: var(--t2); font-size: 15.5px; -webkit-line-clamp: 4; margin-top: 10px; }
  .h4-btn{ background: var(--hero); color: var(--on-hero); margin-top: 22px; height: 46px; padding: 0 24px; }
  .h4 .h4-grid + .h4-big, .h4 .h4-big + .h4-grid{ margin-top: 14px; }
  .h4s .h4-askw{ max-width: none; }
}
@media (min-width: 1200px){
  .h4-big{ grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

@media (prefers-reduced-motion: reduce){
  .h4-ask::before, .h4-fire, .h4-dots i{ animation: none; }
  .h4-pill, .h4-ph, .h4-agc, .h4-big{ transition: none; animation: none; }
}
