/* RuTube 2006 — лендинг к 20-летию */

/* Где есть настоящая Tahoma (Windows, macOS) — берётся она, файл не качается.
   На iOS/Android подгружается Wine Tahoma (LGPL 2.1, проект Wine, fonts/LICENSE-wine-tahoma.txt):
   метрики совпадают с Tahoma. В жирном файле Wine половина кириллицы была
   нарисована обычным начертанием — эти буквы утолщены (_ref/embold.py). */
@font-face {
  font-family: "Wine Tahoma";
  src: url("../fonts/wine-tahoma.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Wine Tahoma";
  src: url("../fonts/wine-tahomabd.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}


:root {
  --c-link: #010fb4;
  --c-brand: #99cf2e;
  --c-brand-muted: #82b743;
  --c-brand-dark: #527f20;
  --c-text: #000;
  --c-text-2: #7b8596;
  --c-border: #c7c7c7;
  --c-surface: #fff;
  --font: Tahoma, "Wine Tahoma", Arial, Helvetica, sans-serif;
  --content: 1200px;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* сайт 2006 года — только светлый: не даём браузерам (Samsung Internet) перекрашивать в тёмный */
html { -webkit-text-size-adjust: 100%; color-scheme: only light; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--c-text);
  background: #fff;
  overflow-x: hidden;
  cursor: url('../img/cur-standart.svg'), auto;

  a,
  button,
  .clickable {
    cursor: url('../img/cur-pointer.svg') 12 4, pointer;
  }
}



img { display: block; max-width: 100%; }

/* hidden всегда прячет, даже если у блока свой display (плеер, салют) */
[hidden] { display: none !important; }

a { color: var(--c-link); }

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ HEADER ============ */

.header {
  position: relative;
  max-width: 1438px;
  height: 171px;
  margin: 0 auto;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(180deg, #8ece13 0%, #afd567 48.5%, #8acd14 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

/* светлое пятно под логотипом */
.header::before {
  content: "";
  position: absolute;
  left: 27px; top: 22px;
  width: 265px; height: 124px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  mix-blend-mode: overlay;
  pointer-events: none;
}

.header__logo {
  position: absolute;
  left: 44px; top: 38px;
  z-index: 1;
  display: block;
  width: 207px;
}

.header__logo img { width: 207px; height: auto; }

.header__bookmark {
  position: absolute;
  left: 138px; top: 107px;
  z-index: 1;
  font-size: 15px;
  color: var(--c-brand-dark);
  white-space: nowrap;
}

.header__upload {
  position: absolute;
  /* как в макете: на 58px левее меню (меню 668px по центру шапки), а не от края шапки */
  left: calc(50% - 392px); top: 46px;
  z-index: 2; /* хвостик лежит поверх меню, как в макете */
  display: flex;
  align-items: center;
  gap: 20px;
  height: 42px;
  padding: 0 18px 0 18px;
  border-radius: 10px;
  background: #fff;
  font-size: 20px;
  color: var(--c-link);
  text-decoration: none;
}

/* «хвостик» кнопки */
.header__upload::after {
  content: "";
  position: absolute;
  left: 107px; bottom: -18px;
  border: 9px solid transparent;
  border-top: 18px solid #fff;
  border-bottom: 0;
}

.header__upload-icon {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #a7e374 0%, #5aab1f 70%, #46a21b 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
  position: relative;
}

.header__upload-icon::before,
.header__upload-icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}
.header__upload-icon::before { width: 4px; height: 13px; }
.header__upload-icon::after  { width: 13px; height: 4px; }

.header__user {
  position: absolute;
  right: 0; top: 0;
  display: flex;
  align-items: flex-start;
  gap: 34px;
  width: 507px; height: 65px;
  padding: 22px 22px 0;
  border-radius: 0 0 0 20px;
  background: linear-gradient(180deg, #f5f9fc 22%, #e1e3e1 73%, #cdd5c8 86%, #c5d6ac 100%);
  filter: drop-shadow(-2px 4px 4px rgba(0, 0, 0, .25));
  font-size: 16px;
}

.header__user a { color: var(--c-link); }

.header__menu {
  display: flex;
  align-items: center;
  gap: 3px;
}

.header__menu a {
  text-decoration: none;
  border-bottom: 1px dashed var(--c-link);
}

.header__menu::after {
  content: "";
  border: 5px solid transparent;
  border-top: 8px solid #8a8f95;
  border-bottom: 0;
  margin-top: 3px;
}

.header__login {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* в SVG уже вся иконка из макета: зелёный квадрат + дверь */
.header__login-icon {
  flex: none;
  width: 22px; height: 22px;
}

.header__login-icon img { width: 22px; height: 22px; }

.header__login-sep {
  width: 1px; height: 19px;
  margin: 0 4px;
  background: var(--c-link);
}

.nav {
  position: absolute;
  left: 50%; bottom: 0;
  width: 668px; height: 76px;
  transform: translateX(-50%);
  display: flex;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(180deg, #484849 0%, #363634 48.5%, #262726 100%);
}

.nav__item {
  position: relative;
  flex: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  white-space: nowrap;
}

.nav__item + .nav__item {
  box-shadow: inset 2px 0 0 #1c1c1c, inset 3px 0 0 #505050;
}

.nav__item a { padding: 0 8px; }

.nav__item--video a { color: #a9ff00; }
.nav__item--people a { color: #f8a900; }
.nav__item--tv a { color: #fff000; }
.nav__item--back a { color: #00a4d3; }

/* треугольник-указатель активного пункта */
.nav__item.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -13px;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top: 13px solid #262726;
  border-bottom: 0;
}

.search {
  position: absolute;
  right: 42px; top: 123px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.search__field { width: 168px; }

.search__input {
  display: block;
  width: 100%;
  height: 24px;
  padding: 4px 5px;
  border: 1px solid #b2b2b2;
  border-radius: 0;
  background: #fff;
  font: 12px var(--font);
  color: var(--c-text);
}

.search__adv {
  display: block;
  font-size: 12px;
  color: #498a00;
  text-decoration: none;
}

.search__btn {
  height: 24px;
  width: 70px;
  border: 0;
  border-radius: 7px;
  background: #000;
  color: #fff;
  font: bold 14px var(--font);
  cursor: url('../img/cur-pointer.svg') 12 4, pointer;
  box-shadow: 0 0 14px 6px rgba(255, 255, 255, .55);
}

/* ============ MAIN ============ */

.main { padding-block: 38px 60px; }

.page-title {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: bold;
  color: var(--c-brand);
}

/* ---- Hero ---- */

/* Две колонки: слева текст, справа кусты с медведем. Картинка не может
   заехать на текст — при нехватке места она уходит за правый край,
   а облачко «Превед!» остаётся целым (важно для iOS, где Tahoma нет
   и заголовок набирается запасным шрифтом другой ширины). */
.hero {
  --hero-pad: 48px;
  --hero-in: 210px;                          /* внутренняя высота баннера */
  --art-w: calc(var(--hero-in) * 552 / 210); /* ширина слоя с кустами */
  position: relative;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 16px;
  height: 214px;
  margin-bottom: 50px;
  padding: 0 var(--hero-pad);
  overflow: hidden;
  border: 2px solid #95da13;
  border-radius: 10px;
  background: #fff;
}

.hero__title {
  position: relative;
  z-index: 1;
  font-size: 76px;
  line-height: 1;
  font-weight: bold;
  font-family: var(--font);
  color: #2d2e2d;
}

.hero__title span { color: #67b514; }

.hero__text {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero__slot {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  overflow: hidden;
  margin-right: calc(-1 * var(--hero-pad));
  pointer-events: none;
}

/* прижат вправо; если места мало — сдвигается дальше вправо так, чтобы
   левый край облачка (7.25% ширины слоя) не выходил за начало колонки */
.hero__slot .hero__art--d {
  right: min(0px, 100% - var(--art-w) * 1.0725);
}

/* кусты + медведь: общий слой, координаты медведя в % от слоя (из макета) */
.hero__art {
  position: absolute;
  right: 0; top: 0;
  height: 100%;
  width: var(--art-w); /* без aspect-ratio: его нет в Safari до 15 (iPhone на iOS 14) */
  pointer-events: none;
}

.hero__art--m { display: none; }

.hero__art img { position: absolute; max-width: none; }

.hero__bushes { top: 0; left: 0; width: 100%; height: 100%; }

.hero__art--d .hero__bear { left: -7.25%; top: 0; width: 68.48%; height: 100%; }
.hero__art--m .hero__bear { left: 11.8%; top: 12.5%; width: 68.44%; height: 87.5%; }

/* медведь «Превед!» выезжает снизу по кнопке «Вернуть» */
.hero__bear {
  transform: translateY(110%);
  transform-origin: 50% 100%;
}

.hero.is-bear .hero__bear {
  animation: bear-up .7s cubic-bezier(.3, 1.5, .6, 1) forwards,
             bear-wobble 2.6s ease-in-out .7s infinite;
}

@keyframes bear-up {
  from { transform: translateY(105%) rotate(-6deg); }
  to   { transform: translateY(0) rotate(0); }
}

@keyframes bear-wobble {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(2%) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero.is-bear .hero__bear { animation: none; transform: none; }
}


.btn { border: 0; cursor: url('../img/cur-pointer.svg') 12 4, pointer; }

/* ---- Buttons ---- */

.btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 187px;
  height: 50px;
  border-radius: 6px;
  background: linear-gradient(180deg, #aed464 0%, #8ece17 60%, #8bcd18 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  font: bold 14px var(--font);
  color: #2d2e2d;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.06); }

/* ---- Video shelves ---- */

.shelf { margin-bottom: 50px; }

.shelf__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 2px solid #e2e2e2;
}

.shelf__title {
  font-size: 24px;
  font-weight: bold;
  color: var(--c-brand);
}

.shelf__all {
  font-size: 20px;
  color: var(--c-link);
  text-decoration: none;
  white-space: nowrap;
}

.shelf__all:hover { text-decoration: underline; }

.shelf__all--compact { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 21px;
}

.card {
  display: flex;
  gap: 11px;
  min-width: 0;
}

.card__thumb {
  flex: 1 1 0;
  min-width: 0;
  height: 113px;
  border: 2px solid #000;
  background: #fff;
  overflow: hidden;
}

.card__thumb picture { display: contents; }

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s;
}

.card:hover .card__thumb img { transform: scale(1.05); }

.card__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.card__title {
  font-size: 14px;
  line-height: 1.3;
  color: var(--c-link);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.card__title:hover { text-decoration: underline; }

.card__views {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  color: var(--c-text-2);
  white-space: nowrap;
}

.stars {
  display: block;
  width: 106px;
  height: 18px;
  background: url("../img/stars.svg") no-repeat 0 0 / contain;
}

/* ---- Ad banners ---- */

.ad {
  display: block;
  margin-bottom: 50px;
  cursor: url('../img/cur-pointer.svg') 12 4, pointer;
}

.ad img { width: 100%; height: auto; }

.info .ad { margin-bottom: 0; }

/* «Вирусная угроза» вёрсткой (планшет и телефон), на десктопе — картинка */
.virus {
  display: none;
  align-items: center;
  gap: 2.5%;
  padding: 14px 3%;
  background: #fbf61a;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  text-align: center;
}

.ad .virus__bug { flex: none; width: 13%; max-width: 90px; height: auto; }

.virus__text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }

.virus__box {
  display: flex;
  white-space: nowrap;
  flex-direction: column;
  width: 100%;
  padding: 4px 8px;
  border: 2px solid #9a0000;
  background: #e8161b;
  color: #fff;
  font-size: clamp(13px, 3.3vw, 26px);
  line-height: 1.1;
  letter-spacing: .02em;
  text-shadow: 1px 1px 0 #600;
}

.virus__y { color: #fff200; font-size: 1.15em; }

.virus__sub { font-weight: bold; font-size: clamp(10px, 2.2vw, 17px); line-height: 1.3; }

.virus__sub u { color: #c00000; }

/* ---- Info blocks ---- */

.info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 21px;
  align-items: start;
}

.info__col { display: flex; flex-direction: column; gap: 21px; }

.panel {
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 19px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d5fcc2 0%, #b1ef90 100%);
  font-size: 20px;
  font-weight: bold;
  color: #67b514;
}

.panel--gray {
  background: linear-gradient(180deg, #c8c8c8 0, #e2e2e2 70px, #fff 150px);
}

.panel--gray .panel__head { background: none; padding-left: 30px; }

.panel__head img { width: 103px; height: auto; }

.panel__brand { display: none; }

.panel__body { padding: 33px 19px 24px; }

/* отступы текста в блоках — по макету: категории 19px, теги и новости 30px */
.panel--tags .panel__body { padding: 30px 30px 24px; }
.panel--gray .panel__body { padding: 30px 30px 24px; }

/* в макете «Теги» и «Новости» одной высоты, «Остальные теги» прижаты к низу */
.panel--tags, .panel--gray { align-self: stretch; display: flex; flex-direction: column; }
.panel--tags .panel__body { flex: 1; display: flex; flex-direction: column; }
.panel--tags .panel__more { margin-top: auto; padding-top: 24px; align-self: flex-start; }
.panel--gray .panel__body { padding-right: 38px; }

.panel__more {
  display: inline-block;
  margin-top: 45px;
  font-size: 14px;
  font-weight: bold;
  color: #66a100;
}

.cats li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.cats li + li { margin-top: 14px; }

.cats a { color: #000; }

.cats b { font-weight: bold; }

.tags {
  line-height: 36px;
  color: #000;
}

/* крупные теги не раздвигают строки: высота строки задаётся только блоком */
.tags a { color: #000; text-decoration: none; line-height: 1; }
.tags a:hover { text-decoration: underline; }

.t1 { font-size: 14px; }
.t2 { font-size: 18px; }
.t3 { font-size: 24px; }

.news li { font-size: 14px; line-height: 18px; }
.news li + li { margin-top: 6px; }

/* ============ FOOTER ============ */

.loading {
  max-width: 1440px;
  margin: 0 auto;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px dashed #c7c7c7;
  border-bottom: 1px dashed #c7c7c7;
  font-size: 14px;
}

.footer {
  max-width: 1440px;
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #8ece13 0%, #bef05e 48.6%, #8acd14 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, .25);
}

.footer { min-height: 171px; padding: 40px 90px; }

.footer__logo { position: relative; flex: none; }

/* мягкое белое свечение под логотипом */
.footer__logo::before {
  content: "";
  position: absolute;
  left: -40px; top: -30px; right: -40px; bottom: -30px;
  background: url("../img/footer-glow.svg") no-repeat center / contain;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.footer__logo img { position: relative; width: 145px; height: auto; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer__links li:not(:last-child)::after { content: "|"; margin: 0 5px; }

.footer__links a { color: #000; text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }

/* ============ PEOPLE ============ */

.people {
  display: grid;
  grid-template-columns: 382px 1fr;
  gap: 22px;
  align-items: start;
}

.tips p {
  font-size: 13px;
  line-height: 1.7;
}

.tips p + p { margin-top: 20px; }

.tips__promo { margin-top: 54px; }

.rating-wrap { overflow-x: auto; }

.rating {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
}

.rating thead th {
  height: 65px;
  background: #ffe1b4;
  font-weight: normal;
  font-size: 17px;
  text-align: center;
}

.rating thead th a { color: #000; }

.rating thead .rating__place {
  padding-left: 45px;
  text-align: left;
  font-size: 20px;
  font-weight: bold;
}

.rating tbody tr { height: 91px; }
.rating tbody tr:nth-child(even) { background: #f4f4f4; }

.rating td {
  vertical-align: top;
  padding-top: 12px;
  text-align: center;
  font-weight: bold;
}

.rating .down, .rating .up {
  font-weight: normal;
  font-size: 18px;
}

.rating .down { color: #ff3f1f; }
.rating .up { color: #6cbd1c; }
.rating .same { color: #999; font-weight: normal; }

.user {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.user__ava {
  flex: none;
  width: 52px; height: 52px;
  object-fit: cover;
}

.user__name {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

.user__name::before {
  content: "";
  width: 14px; height: 20px;
  background: url("../img/icon-user.png") no-repeat center / contain;
}

/* ============ PLAYER / FIREWORKS ============ */

html.is-modal { overflow: hidden; }

.player {
  position: fixed;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .7);
}

.player__box {
  width: min(960px, 100%);
  border: 2px solid #95da13;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.player__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #d5fcc2 0%, #b1ef90 100%);
}

.player__title {
  min-width: 0;
  font-size: 16px;
  font-weight: bold;
  color: #3d7a00;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player__close {
  flex: none;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font: bold 22px/1 var(--font);
  cursor: url('../img/cur-pointer.svg') 12 4, pointer;
}

.player__frame { position: relative; padding-top: 56.25%; background: #000; }

.player__frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.fireworks {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 90;
  cursor: url('../img/cur-pointer.svg') 12 4, pointer;
}

/* ============ ADAPTIVE ============ */

@media (min-width: 1600px) {
  .main { padding-block-start: 58px; }
}

@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ≈1024: логотип слева, поиск в серой плашке, навигация по центру */
/* шапка 1024 из макета — с 1360px: в полную шапку логотип, кнопка, меню и поиск уже не влезают */
@media (max-width: 1360px) {
  .header { height: 184px; border-radius: 0 0 24px 24px; }
  .header__bookmark,
  .header__upload,
  .search__adv { display: none; }
  .header__logo { left: 44px; top: 12px; }
  .header__user {
    width: calc(100% - 350px);
    gap: 18px;
    padding-right: 290px;
    font-size: 14px;
    white-space: nowrap;
  }
  .search { right: 26px; top: 20px; z-index: 1; }
  .nav { height: 75px; }
  .nav__item { font-size: 18px; }
}

@media (max-width: 1140px) {
  .container { padding-inline: 64px; max-width: none; }

  .hero { height: 182px; --hero-pad: 32px; --hero-in: 178px; }
  .hero__title { font-size: 60px; }
  .hero .btn { width: 145px; height: 39px; }

  .shelf__title { font-size: 20px; }
  .shelf__all { font-size: 12px; }
  .shelf__all--compact { display: inline; }
  .grid { grid-template-columns: repeat(2, 1fr); row-gap: 7px; }
  .card__thumb { flex: 0 0 min(220px, 50%); }

  .info { gap: 18px; }
  .info__col { gap: 18px; }
  .cats__all { display: none; }
  /* отступы инфоблоков из десктопного макета на планшете/мобильном не нужны */
  .panel__body,
  .panel--tags .panel__body,
  .panel--gray .panel__body { padding: 24px 19px; }
  .panel__more { margin-top: 28px; }
  .cats li + li { margin-top: 12px; }
  .tags { line-height: 30px; }
  .t1 { font-size: 12px; }
  .t2 { font-size: 14px; }
  .t3 { font-size: 18px; }
  .panel__head { min-height: 60px; }
  .panel--gray { background: #fff; }
  .panel--gray .panel__head {
    padding-left: 19px;
    background: linear-gradient(180deg, #d5fcc2 0%, #b1ef90 100%);
  }
  .panel__head img { display: none; }
  .panel__brand { display: inline; }

  .people { display: block; max-width: 790px; margin: 0 auto; }
  .tips { display: none; }
}

/* ≈768: логотип + поиск, под ними полоса навигации во всю ширину */
@media (max-width: 900px) {
  .header { height: 173px; }
  .container { padding-inline: 32px; }
  .header__user { display: none; }
  .nav__item.is-active::after { display: none; }
  .header__logo { left: 50px; top: 14px; width: 170px; }
  .header__logo img { width: 170px; }
  .search { right: 32px; top: 36px; }
  .nav { left: 50%; width: calc(100% - 64px); height: 64px; }
  .nav__item { font-size: 18px; }



  .main { padding-block-start: 32px; }
  .page-title { font-size: 20px; }

  .hero { height: 200px; --hero-pad: 28px; --hero-in: 196px; margin-bottom: 40px; }
  .hero__title { font-size: clamp(34px, 6vw, 48px); }
  .hero .btn { width: 160px; height: 45px; }

  .shelf { margin-bottom: 40px; }
  .shelf__title { font-size: 20px; }
  .shelf__all { font-size: 14px; }

  .info { grid-template-columns: 1fr; }
  .info__col { display: contents; }
  .cats__all { display: inline; }
  /* широкий баннер как в макете 768 — вёрсткой, чтобы не мылился при растягивании */
  .ad--virus { text-decoration: none; }
  .virus-img { display: none; }
  .virus { display: flex; }
  .tags { line-height: 30px; }
  .t2 { font-size: 16px; }
  .t3 { font-size: 20px; }

  .rating .col-hide { display: none; }
  .rating td:first-child { width: 15%; }
  .rating td:first-child + td { width: 9%; }
  .rating thead .rating__q { text-align: right; padding-right: 40px; }

  .footer { padding: 40px 32px; }
}

/* ≈375: одна колонка карточек, мобильная шапка */
@media (max-width: 600px) {
  .header { height: 114px; border-radius: 0 0 16px 16px; }
  .header::before { left: 0; top: 0; width: 160px; height: 80px; }
  .header__logo { left: 12px; top: 10px; width: 100px; }
  .header__logo img { width: 100px; }
  .search { right: 12px; top: 20px; gap: 8px; }
  .search__field { width: 135px; }
  .search__input { height: 24px; font-size: 13px; }
  .search__adv { display: none; }
  .search__btn { width: 64px; height: 24px; }

  .nav {
    left: 0; width: 100%; height: 44px;
    transform: none;
    border-radius: 0 0 16px 16px;
  }
  .nav__item { font-size: 14px; }
  .nav__item a { padding: 0 4px; }
  .nav__item.is-active::after { display: none; }

  .hero {
    display: block;
    height: 323px;
    padding: 22px;
    border-color: #72d500;
  }
  .hero__text { align-items: stretch; gap: 20px; }
  .hero__slot { display: none; }
  .hero__title { font-size: 36px; }
  .hero .btn { width: 100%; height: 45px; }
  .hero__art--m {
    display: block;
    top: auto; right: 0; left: 0; bottom: 0;
    width: 100%; height: 0;
    padding-top: 42%; /* 176 / 339 — пропорция кустов, вместо aspect-ratio */
  }

  .grid { grid-template-columns: 1fr; gap: 18px; }
  .card__thumb { flex: 0 0 168px; }

  .shelf__all { font-size: 12px; }

  .ad--wide { display: none; }

  .container { padding-inline: 16px; }
  .rating { font-size: 20px; }
  /* не display:none — шапка объединяет колонки через colspan, число колонок должно сохраняться */
  .rating td.arrow, .rating td:first-child { width: 0; padding: 0; font-size: 0; }
  .rating td:first-child + td { width: auto; }
  .cats__all { display: none; } /* в мобильном макете у категорий только число */
  /* на телефоне баннер помещается в родных пропорциях — снова картинка */
  .virus-img { display: block; width: 100%; height: auto; }
  .virus { display: none; }
  .rating thead .rating__place { padding-left: 20px; }
  .rating thead .rating__q { padding-right: 20px; }
  .rating tbody tr { height: 92px; }
  .rating td { padding-left: 6px; padding-right: 6px; }
  .rating td:first-child + td { padding-left: 20px; }
  .user__name { font-size: clamp(13px, 4.2vw, 18px); }
  .rating { font-size: 17px; }
  .user__ava { width: 42px; height: 42px; }
  .rating thead .rating__q { padding-right: 10px; }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    margin: 20px 16px 0;
    padding: 30px 20px 26px;
  }
  /* как в макете: перенос строго после «СофтНовости |»; на узких экранах
     и с более широким шрифтом (на iOS нет Tahoma) строка чуть уменьшается */
  /* строка «Контакты … СофтНовости |» ≈ 21.5em + 4 разделителя по 10px;
     доступно 100vw − 72px (поля подвала) — шрифт считается так, чтобы она влезала всегда */
  .footer__links {
    display: block;
    white-space: nowrap;
    font-size: clamp(10px, calc((100vw - 120px) / 21.5), 14px);
    line-height: 1.45;
  }
  .footer__links li { display: inline; white-space: nowrap; }
  .footer__links li:nth-child(4)::after { content: "|\A"; white-space: pre; margin-right: 0; }
}

@media (max-width: 360px) {
  .search__field { width: 110px; }
  .nav__item { font-size: 12px; }
  .card__thumb { flex-basis: 140px; }
  .hero__title { font-size: 32px; }
  .rating thead th { font-size: 15px; }
  .rating thead .rating__place { padding-left: 12px; font-size: 17px; }
  .rating thead .rating__q { padding-right: 8px; }
  .rating td { padding-left: 3px; padding-right: 3px; }
  .rating td:first-child + td { padding-left: 12px; }
  .user__ava { width: 44px; height: 44px; }
}

.floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #72d500;
  color: white;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.2s;
}

.floating-btn:active {
  transform: scale(0.9);
}