/* ============================================================
   «Мультзал» — панель телевизора: каналы, полка, тумблер языка
   ============================================================ */

.site-header.tv-head {
  --header-h: 84px;
  padding: 0;
  border-bottom: 3px solid var(--text);
  background: linear-gradient(180deg, #fbf4e8, #f2e3cd);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .7), 0 10px 26px -20px rgba(74, 45, 24, .55);
}
.site-header.tv-head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
  opacity: .9;
}
.tv-head__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 84px;
}

/* ---------- марка ---------- */
.tv-brand { gap: 11px; }
.tv-brand .brand__mark {
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 2px solid var(--text);
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: inset 0 2px 4px rgba(74, 45, 24, .14);
  color: var(--accent);
}
.tv-brand .brand__name {
  font-size: 1.24rem;
  line-height: 1;
  letter-spacing: -.02em;
}
.tv-brand .brand__tag { margin-top: 4px; }

.tv-onair {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a6f56;
  white-space: nowrap;
}
.tv-onair i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(210, 70, 47, .15);
  animation: tv-pulse 2s ease-in-out infinite;
}
@keyframes tv-pulse { 50% { opacity: .35; } }

/* ---------- каналы ---------- */
.tv-channels {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 5px;
  border-radius: 13px;
  background: #e9dac4;
  box-shadow: inset 0 2px 5px rgba(74, 45, 24, .17), 0 1px 0 rgba(255, 255, 255, .65);
}
.tv-channels a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #d2bda1;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #f4e7d4);
  box-shadow: 0 2px 0 #cbb496, 0 3px 5px -2px rgba(74, 45, 24, .25);
  color: #5c4a39;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, color .15s ease;
}
.tv-ch__num {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 18px;
  padding: 0 3px;
  border: 1px solid #ddcbb2;
  border-radius: 4px;
  background: #f0e2cd;
  color: #9a7f61;
  font-family: var(--font-mono);
  font-size: .53rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.tv-channels a:hover {
  background: #fffefb;
  color: var(--text);
  transform: translateY(-1px);
}
.tv-channels a[aria-current="page"] {
  border-color: #a93322;
  background: linear-gradient(180deg, #e25a42, #c93f2a);
  box-shadow: inset 0 2px 5px rgba(80, 20, 10, .38), 0 1px 0 #f0b3a4;
  color: #fff8ef;
  transform: translateY(1px);
}
.tv-channels a[aria-current="page"] .tv-ch__num {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .18);
  color: #fff8ef;
}
.tv-channels a[aria-current="page"]::after { display: none; }

/* ---------- полка и язык ---------- */
.tv-tools { gap: 9px; }
.tv-shelf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 2px solid var(--text);
  border-radius: 10px;
  background: #fffaf1;
  box-shadow: 0 2px 0 var(--text);
  color: var(--text);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.tv-shelf svg { width: 15px; height: 15px; }
.tv-shelf:hover { background: #fffefb; transform: translateY(-1px); }
.tv-shelf:active { transform: translateY(1px); box-shadow: 0 0 0 var(--text); }
.tv-shelf__count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8ef;
  font-family: var(--font-mono);
  font-size: .58rem;
}

.tv-head .lang {
  padding: 3px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: #e6d4bb;
  box-shadow: inset 0 2px 4px rgba(74, 45, 24, .2);
}
.tv-head .lang button {
  padding: 5px 8px;
  border-radius: 999px;
  background: none;
  color: #6f5a45;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .06em;
}
.tv-head .lang button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff8ef;
  box-shadow: 0 1px 2px rgba(74, 45, 24, .35);
}
.tv-head .menu-toggle {
  border: 2px solid var(--text);
  border-radius: 10px;
  background: #fffaf1;
}

/* ---------- планшет ---------- */
@media (max-width: 1180px) {
  .tv-onair { display: none; }
  .tv-head__inner { gap: 12px; }
  .tv-channels a { padding-inline: 8px; font-size: .74rem; }
  .tv-shelf__text { display: none; }
}

@media (max-width: 1040px) {
  .tv-brand .brand__tag { display: none; }
  .tv-channels { gap: 3px; }
  .tv-channels a { padding-inline: 7px; gap: 5px; }
  .tv-ch__num { min-width: 17px; height: 17px; }
}

/* ---------- мобильный ---------- */
@media (max-width: 940px) {
  .site-header.tv-head { --header-h: 67px; }
  .tv-head__inner { min-height: 64px; }
  .tv-brand .brand__mark { width: 34px; height: 34px; }
  .tv-brand .brand__name { font-size: 1.08rem; }
  .tv-tools { margin-left: auto; }

  .tv-channels {
    display: grid;
    gap: 6px;
    margin-left: 0;
    padding: 10px var(--gutter) 20px;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
  }
  .tv-channels a {
    display: flex;
    padding: 11px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    box-shadow: none;
    background: var(--surface);
    font-size: .92rem;
  }
  .tv-channels a:hover { transform: none; }
  .tv-channels a[aria-current="page"] {
    background: var(--accent);
    box-shadow: none;
    transform: none;
  }
}

@media (max-width: 520px) {
  .tv-brand .brand__name { font-size: 1rem; }
  .tv-head .lang button { padding: 5px 6px; }
  .tv-shelf { padding: 7px 8px; }
}
