/*  Centralized frontend stylesheet
   Each selector is defined once per media-query context. Component source rules
   live here directly; responsive changes are limited to explicit media queries.  */
:root {
  --bg: #fff;
  --panel: #fff;
  --soft: #f2f2f2;
  --text: #0f0f0f;
  --muted: #606060;
  --border: #e5e5e5;
  --shadow: none;
  --radius: 12px;
  --accent: #0f0f0f;
  --accent2: #0f0f0f;
  --yt-border: #e5e5e5;
  --yt-border-soft: #efefef;
  --yt-hover: #f2f2f2;
  --yt-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --yt-shadow-md: 0 8px 22px rgba(0, 0, 0, 0.08);
  --topbar-height: 64px;
  --sidebar-collapsed: 70px;
  --sidebar-expanded: 248px;
  --gold-1: #fff4bd;
  --gold-2: #e4c261;
  --gold-3: #b88424;
  --gold-dark: #171108;
  --gold-panel: #20180c;
  --ink: #11100d;
  --ivory: #fffaf0;
  --ui-font: Arial, sans-serif;
  --text-2: #374151;
  --soft-2: #f8fafc;
  --link: #065fd4;
  --link-strong: #2563eb;
  --btn-strong-bg: #111;
  --btn-strong-text: #fff;
  --ink-gold: #17120a;
  --ink-on-gold: #17120a;
  --gold-muted: #8a6419;
  --cream: #fffaf0;
  --cream-2: #fff8e8;
  --cream-3: #efe5d1;
  --cream-border: #e5d9bf;
  --cream-grad: linear-gradient(180deg, #fff, #fffaf0);
  --cream-grad-2: linear-gradient(180deg, #fffdf8, #fff3d5);
  --gloss: rgba(255, 255, 255, 0.9);
  --hero-grad: linear-gradient(135deg, #fffaf0, #ffffff 54%, #f8fafc);
  --glass-1: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.86);
  --glass-gold: rgba(255, 248, 215, 0.58);
  --glass-3: rgba(255, 255, 255, 0.97);
  --ok-text: #166534;
  --ok-soft: #eaf7ee;
  --ok-border: #b9e4c4;
  --err-text: #991b1b;
  --err-soft: #ffecec;
  --err-border: #f0c2c2;
  --err-bg: #b91c1c;
  --info-soft: #eef2ff;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0f;
  --panel: #0f0f0f;
  --soft: #272727;
  --soft-2: #1c1c1c;
  --text: #f1f1f1;
  --text-2: #cfcfcf;
  --muted: #aaa;
  --border: #303030;
  --accent: #f1f1f1;
  --accent2: #f1f1f1;
  --yt-border: #303030;
  --yt-border-soft: #262626;
  --yt-hover: #272727;
  --yt-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --yt-shadow-md: 0 8px 22px rgba(0, 0, 0, 0.55);
  --link: #3ea6ff;
  --link-strong: #7ab5ff;
  --btn-strong-bg: #f1f1f1;
  --btn-strong-text: #0f0f0f;
  --ink-gold: #f0e3c2;
  --gold-muted: #d9b96a;
  --cream: #1d1812;
  --cream-2: #241d13;
  --cream-3: #2c2416;
  --cream-border: #4a3d24;
  --cream-grad: linear-gradient(180deg, #181818, #1d1812);
  --cream-grad-2: linear-gradient(180deg, #241d13, #1d1812);
  --gloss: rgba(255, 255, 255, 0.05);
  --hero-grad: linear-gradient(135deg, #1d1812, #141414 54%, #181a1c);
  --glass-1: rgba(18, 18, 18, 0.72);
  --glass-2: rgba(18, 18, 18, 0.86);
  --glass-gold: rgba(40, 32, 14, 0.58);
  --glass-3: rgba(15, 15, 15, 0.95);
  --ok-text: #86d9a3;
  --ok-soft: #142a1c;
  --ok-border: #2c5c3c;
  --err-text: #f1a0a0;
  --err-soft: #2d1515;
  --err-border: #5a2626;
  --err-bg: #8f2020;
  --info-soft: #182339;
}

html[data-theme="dark"] .watchSubscribePanel {
  --watch-border: #3a4250;
  --watch-text: #e5e7eb;
  --watch-bg: #1c1c1c;
}
/* Dark-mode watch action buttons: warm, elevated, no harsh white rim */
html[data-theme="dark"] .watchSubscribePanel {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .watchSaveActions .saveVideoBtn:not(.active),
html[data-theme="dark"] .watchExternalActions > .btn:not(.active),
html[data-theme="dark"] .watchAutoplayToggle:not(.active) {
  background: linear-gradient(180deg, #272727, #191919);
  border-color: #3d4351;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
html[data-theme="dark"] .watchSaveActions .saveVideoBtn:not(.active):hover,
html[data-theme="dark"] .watchExternalActions > .btn:not(.active):hover,
html[data-theme="dark"] .watchAutoplayToggle:not(.active):hover {
  background: linear-gradient(180deg, #302a1d, #221d14);
  border-color: var(--gold-muted);
  color: var(--ink-gold);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(217, 185, 106, 0.28),
    inset 0 1px 0 rgba(255, 224, 150, 0.14);
}
html[data-theme="dark"] .watchSubscribeChoice:hover {
  background: rgba(217, 185, 106, 0.12);
  color: var(--ink-gold);
}
/* Dark-mode logo: swap to the cream-text variant so the brand stays legible */
html[data-theme="dark"] .brandLogo {
  content: url("/youtora-logo-dark.png");
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}
/* Dark-mode "video is in these playlists" / tags strip under the player */
html[data-theme="dark"] .watchMetaGroup {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #201a12, #191512);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .watchMetaGroupIcon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
html[data-theme="dark"] .watchPlaylistChip {
  border-color: rgba(217, 185, 106, 0.28);
  background: linear-gradient(180deg, #272219, #1e1a13);
  color: var(--ink-gold);
}
html[data-theme="dark"] .watchPlaylistChip:hover {
  border-color: var(--gold-muted);
  background: linear-gradient(180deg, #302a1d, #221d14);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .watchPlaylistChipMeta {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .tagIndexPage,
html[data-theme="dark"] .tagVideoPage {
  --tag-gold-soft: #33290f;
  --tag-ink: #f0e3c2;
  --tag-muted: #b3a68e;
  --tag-border: rgba(190, 150, 70, 0.35);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
img {
  max-width: 100%;
}
html,
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font-family: Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 62px;
    --sidebar-collapsed: 62px;
    --sidebar-expanded: 232px;
  }
}

/* ===== TOP BAR ===== */
.brand:hover {
  background: transparent;
  text-decoration: none;
}

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

.page {
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
  overflow: visible;
}

.pad {
  padding: 0;
}
.muted {
  color: var(--muted);
}
.hr {
  display: none;
}

/* ===== GRID ===== */
.grid,
.playlistGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px 16px;
  align-items: start;
}

@media (max-width: 700px) {
  .grid,
  .playlistGrid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

.card,
.shortCard {
  width: 100%;
  min-width: 0;
  align-self: start;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.card:hover,
.shortCard:hover {
  filter: none;
}
.card .thumb16x9,
.shortCard .shortThumb,
.playlistCard .playlistThumb {
  transition: transform 0.24s ease;
}
.card:hover .thumb16x9,
.shortCard:hover .shortThumb,
.playlistCard:hover .playlistThumb {
  transform: scale(1.03);
}
.card:hover .cardTitle,
.shortCard:hover .shortTitle,
.playlistCard:hover .playlistTitle {
  color: var(--text);
}

.cardBody {
  padding: 12px 0 0;
}

.cardThumbLink,
.cardTitleLink {
  display: block;
  color: inherit;
  text-decoration: none;
}
.cardTitleLink:hover {
  text-decoration: none;
}

.thumbWrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--soft);
  display: block;
  isolation: isolate;
}

.thumb16x9 {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--soft);
  position: relative;
  z-index: 1;
}

.thumbBadge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  max-width: calc(100% - 16px);
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(15, 15, 15, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  direction: ltr;
  pointer-events: none;
}

.thumbBadgeSm {
  font-size: 11px;
  padding: 3px 5px;
  min-width: auto;
  left: 6px;
  bottom: 6px;
}

.videoChannelAvatarLink,
.videoChannelAvatar {
  display: block;
  flex: 0 0 auto;
}

.videoChannelAvatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--soft);
  object-fit: cover;
}
.videoChannelAvatarFallback {
  border: 1px solid var(--border);
}

.metaAvatar {
  width: 32px;
  height: 32px;
}

.videoMetaStackRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  min-height: 32px;
}

.videoMetaStack {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.videoMetaDate {
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.videoChannelLink {
  display: block;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.videoChannelLink:hover {
  color: var(--text);
  text-decoration: none;
}

.videoChannelBelow,
.shortChannelLink {
  margin-top: 0;
}
.playlistCard:hover {
  text-decoration: none;
}
.playlistThumb {
  position: relative;
  z-index: 1;
}
.playlistCard:hover .playlistMetaLink {
  color: var(--text);
}
.channelCard:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: var(--border);
}
.channelCardAvatar {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: var(--muted);
}
.channelCardAvatarFallback {
  background: var(--soft);
}

.cardMeta,
.shortMeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
  min-height: 22px;
}
.cardMeta > span + span::before {
  content: "•";
  margin: 0 6px;
}

.avatarRow {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--soft);
  object-fit: cover;
  border: 1px solid var(--yt-border-soft);
  flex: 0 0 auto;
}

/* ===== CHANNEL TABS ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.tabs::-webkit-scrollbar {
  height: 0;
}

.tab {
  border: 1px solid var(--border);
  background: var(--soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}
.tab.active {
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  border-color: var(--btn-strong-bg);
}
.tab:hover {
  text-decoration: none;
  filter: brightness(0.98);
}

.btnRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.btn:hover {
  text-decoration: none;
  filter: brightness(0.98);
}
.btn.primary {
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  border-color: var(--btn-strong-bg);
}

/* ===== WATCH PAGE ===== */
.watchMain {
  min-width: 0;
}
.player {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.playerNoEmbed {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--hero-grad);
  color: var(--text);
  text-align: center;
}
.playerNoEmbedInner {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.playerNoEmbedIcon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}
.playerNoEmbedIcon .contentKindSvg {
  width: 26px;
  height: 26px;
}
.publicPlaylistEmptyIcon .contentKindSvg {
  width: 28px;
  height: 28px;
}
.playerNoEmbedTitle {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
}
.playerNoEmbedText {
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}
.playerNoEmbedBtn {
  margin-top: 4px;
}
.recoMeta {
  color: var(--muted);
  font-size: 12px;
}

/* ===== SHORTS GRID ===== */
.shortsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px 16px;
  align-items: start;
}

@media (max-width: 700px) {
  .shortsGrid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

.shortThumbWrap {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--soft);
  isolation: isolate;
}
.shortThumb {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
  background: var(--soft);
}
.shortBody {
  padding-top: 12px;
}

/* ===== MOBILE ===== */

@media (max-width: 720px) {
  .pad {
    padding: 0;
  }
}

@media (max-width: 600px) {
  .videoChannelAvatar {
    width: 32px;
    height: 32px;
  }
  .metaAvatar {
    width: 30px;
    height: 30px;
  }
  .cardTitle,
  .shortTitle {
    font-size: 15px;
  }
  .cardMeta,
  .videoChannelLink,
  .shortMeta,
  .videoMetaDate {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .recoThumb {
    width: 140px;
  }
}

/* ===== RECOMMENDED SIDEBAR: avatar + date + channel ===== */
.reco {
  border-bottom: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  text-decoration: none;
}

.recoAvatarLink {
  flex: 0 0 auto;
  display: block;
  text-decoration: none;
}

.recoAvatarFallback {
  border: 1px solid var(--border);
}

.recoChannel:hover {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 760px) {
  .channelsGrid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 12px;
  }
  .channelCard {
    padding: 16px 10px;
  }
  .channelCardAvatar {
    width: 76px;
    height: 76px;
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  .playlistGrid {
    grid-template-columns: 1fr;
  }
}

a:hover {
  text-decoration: none;
}
.nav::-webkit-scrollbar {
  height: 0;
}
.h1 {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 6px;
}
.sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.card,
.shortCard,
.playlistCard,
.channelCard {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.thumbWrap,
.shortThumbWrap,
.playlistThumbWrap {
  box-shadow: var(--yt-shadow-sm);
}
.card:hover,
.shortCard:hover,
.playlistCard:hover,
.channelCard:hover {
  transform: translateY(-2px);
}
.card:hover .thumbWrap,
.shortCard:hover .shortThumbWrap,
.playlistCard:hover .playlistThumbWrap,
.channelCard:hover {
  box-shadow: var(--yt-shadow-md);
}
.cardTitle,
.shortTitle {
  width: 100%;
  font-weight: 700;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.7em;
  max-height: 2.7em;
  font-size: 16px;
  line-height: 1.4;
  /* Mixed Hebrew/English titles: lay each title out by its own first strong character
     so "…‎ | Personal Meeting Room" style titles stop scrambling. */
  unicode-bidi: plaintext;
}
.videoMetaDate,
.videoChannelLink,
.playlistChannel,
.playlistMetaLink,
.recoDate,
.recoChannel {
  color: var(--muted);
}

.playlistGrid {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 28px 18px;
}
.playlistCard {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.playlistVisual {
  position: relative;
  display: block;
  padding-top: 13px;
  padding-inline: 0;
  --playlist-thumb: linear-gradient(135deg, #e5dfd6, #cfc8bf);
}
.playlistVisual::before,
.playlistVisual::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 12px;
  box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.playlistVisual::before {
  /* שכבה אחורית כמו YouTube: יוצאת יותר החוצה, אבל נקייה בלי רעש ובלי blur */
  top: 0;
  inset-inline: 58px 40px;
  height: calc(100% - 13px);
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.46)),
    var(--playlist-thumb);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(0, 0, 0, 0.08);
}
.playlistVisual::after {
  /* שכבה קרובה יותר לתמונה: קצת רחבה וכהה יותר, עם פס לבן דקיק */
  top: 6px;
  inset-inline: 31px 18px;
  height: calc(100% - 6px);
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24), rgba(0, 0, 0, 0.06)),
    var(--playlist-thumb);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(0, 0, 0, 0.10);
}
.playlistThumbWrap {
  display: block;
  position: relative;
  z-index: 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.92),
    0 0 0 2px rgba(0, 0, 0, 0.035),
    0 1px 3px rgba(0, 0, 0, 0.12);
}
.playlistShade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.03) 38%,
    rgba(0, 0, 0, 0.42) 100%
  );
}
.playlistTypeBadge {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  line-height: 1;
  pointer-events: none;
  top: 12px;
  right: 12px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.84);
  font-size: 12px;
  font-weight: 700;
}
.playlistCountBadge {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  line-height: 1.2;
  pointer-events: none;
  left: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.92);
  font-size: 12px;
  font-weight: 700;
}
.playlistBody {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 0 2px;
  min-width: 0;
}
.playlistChannelAvatarLink,
.playlistChannelAvatar {
  display: block;
  flex: 0 0 auto;
}
.playlistChannelAvatarLink {
  width: 36px;
  height: 36px;
}
.playlistChannelAvatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--border);
}
.playlistChannelAvatarFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  background: var(--soft);
}
.playlistTextStack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.playlistTitle {
  font-weight: 700;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.38;
  min-height: 0;
}
.playlistMetaRow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.playlistChannel {
  min-width: 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.playlistMetaDot,
.playlistMetaText,
.playlistMetaLink {
  color: var(--muted);
  font-size: 13px;
  flex: 0 0 auto;
}

.channelsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px 18px;
}
.channelCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  position: relative;
  gap: 14px;
  padding: 16px 14px 18px;
  border: 1px solid var(--yt-border-soft);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.channelCardMedia {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  min-height: auto;
  padding-top: 10px;
  justify-content: center;
}
.channelCardMedia::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 74px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--soft-2) 0%, var(--soft) 100%);
}
.channelCardAvatar,
.channelCardAvatarFallback {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  box-shadow: 0 0 0 4px #fff;
}
.channelCardTitle {
  font-weight: 700;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
  min-height: 2.8em;
}
.channelCardStats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  color: var(--ink-gold);
  font-size: 12px;
  font-weight: 700;
}
.channelCardStats span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid var(--cream-border);
  border-radius: 999px;
  background: var(--cream-2);
  white-space: nowrap;
}
.channelCardUpdated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.channelsListToolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 2px;
}
.channelListSortFilter {
  margin: 0;
}

.watchLayout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
}
.watchSide {
  position: sticky;
  top: 84px;
  align-self: start;
  border-inline-start: 0;
  padding-inline-start: 0;
}
.watchSideTitle {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.watchSideTabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.watchSideTab {
  appearance: none;
  border: 1px solid var(--yt-border);
  background: var(--yt-chip-bg);
  color: var(--yt-text);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.watchSideTab:hover {
  background: var(--soft);
}
.watchSideTab.active {
  background: var(--btn-strong-bg);
  border-color: var(--btn-strong-bg);
  color: var(--btn-strong-text);
}
.watchSideContent {
  min-height: 120px;
}
.watchSideHint {
  padding: 10px 2px;
}
.recoPlaylistThumbWrap {
  background: var(--soft);
}
.recoPlaylistEmptyThumb {
  display: block;
  background: linear-gradient(135deg, var(--soft), var(--border));
}
.recoList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.recoCard {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.recoThumbLink {
  display: block;
  color: inherit;
}
.recoThumbWrap {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 168px;
  display: block;
  border-radius: 12px;
  box-shadow: var(--yt-shadow-sm);
}
.recoThumb {
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--soft);
  flex: 0 0 auto;
  width: 168px;
  border-radius: 12px;
}
.recoBody {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recoTitleLink {
  color: inherit;
}
.recoTitle {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0;
}
.recoMetaBlock {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 9px;
}
.recoAvatar {
  border-radius: 999px;
  background: var(--soft);
  object-fit: cover;
  display: block;
  width: 30px;
  height: 30px;
}
.recoMetaText {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.recoDate,
.recoChannel {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .watchLayout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .recoCard {
    grid-template-columns: 144px minmax(0, 1fr);
  }
  .recoThumbWrap,
  .recoThumb {
    width: 144px;
  }
}

@media (max-width: 900px) {
  .watchLayout {
    grid-template-columns: 1fr;
  }
  .watchSide {
    border-inline-start: 0;
    padding-inline-start: 0;
    position: static;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--yt-border);
  }
}

@media (max-width: 720px) {
  .brand,
  .search,
  .nav {
    direction: inherit;
  }
  .playlistGrid,
  .channelsGrid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 560px) {
  .search {
    grid-template-columns: 1fr 56px;
  }
  .search button {
    width: 56px;
  }
  .watchSideTitle {
    margin-bottom: 10px;
  }
  .recoCard {
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 10px;
  }
  .recoThumbWrap,
  .recoThumb {
    width: 138px;
  }
  .playlistGrid {
    grid-template-columns: 1fr;
  }
}
.topbar > * {
  min-width: 0;
}
.brand,
.search,
.nav {
  direction: inherit;
}
.search input:focus {
  border-color: #1c62b9;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.04),
    0 0 0 1px #1c62b9;
}
.nav {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.navLink {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.navLink:hover {
  background: var(--soft);
  color: var(--text);
  text-decoration: none;
}
.navLink.active {
  background: #0f0f0f;
  color: #fff;
}
.navLink.active:hover {
  background: #0f0f0f;
  color: #fff;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: auto minmax(260px, 1fr);
    grid-template-areas: none;
    gap: 14px 16px;
  }
  .brand {
    grid-column: 2;
    justify-self: end;
  }
  .search {
    grid-column: 1 / span 2;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }
  .nav {
    grid-column: 1;
    justify-self: start;
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar {
    height: 0;
  }
}

@media (max-width: 720px) {
  .nav {
    -webkit-overflow-scrolling: touch;
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar {
    height: 0;
  }
  .navLink {
    flex: 0 0 auto;
  }
}
@media (min-width: 721px) {
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(320px, 680px) auto;
    align-items: center;
    gap: 18px;
  }
  .brand {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .search {
    grid-column: 2;
    grid-row: 1;
    width: min(100%, 680px);
    max-width: 680px;
    justify-self: center;
  }
  .nav {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    max-width: 100%;
    padding-bottom: 0;
  }
  .navLink {
    flex: 0 0 auto;
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 560px) auto;
  }
}

/* ===== VIDEO META DETAILS ===== */
.watchChannelRow {
  margin-top: 14px;
  margin-bottom: 12px;
}

.watchSubscribePanel {
  --watch-border: #d7dee8;
  --watch-text: #111827;
  --watch-bg: #f8fafc;
  margin: 14px 0 18px;
  padding: 10px 12px;
  min-height: 62px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
  direction: inherit;
  border: 1px solid var(--watch-border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel), var(--watch-bg));
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.055),
    inset 0 1px 0 var(--gloss);
}
.watchSubscribePanel > * {
  min-width: 0;
}

.watchSubscribeMain {
  flex: 1 1 210px;
  width: auto;
  min-width: 130px;
  max-width: 260px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0;
  margin: 0;
  direction: inherit;
}

.watchSubscribeAvatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--watch-border);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}
.watchSubscribeAvatarFallback {
  background: var(--soft);
}
.watchSubscribeText {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.watchSubscribeTitle,
.watchSubscribeTitle a {
  color: var(--watch-text);
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.watchSubscribeTitle {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.watchSubscribeHint {
  display: none;
}
.watchSubscribeChoices {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  height: 40px;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  overflow: hidden;
  direction: inherit;
  border: 1px solid var(--watch-border);
  border-radius: 999px;
  background: var(--panel);
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.045),
    inset 0 1px 0 var(--gloss);
}

.watchSubscribeChoice {
  flex: 0 0 auto;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--watch-text);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}
.watchSubscribeChoice + .watchSubscribeChoice {
  border-inline-start: 1px solid var(--watch-border);
}
.watchSubscribeChoice::before,
.watchAutoplayToggle::before,
.watchSaveActions .saveVideoBtn::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.watchSubscribeChoices .channelSubscribeBtn {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='3.6'/><path d='M5 20a7 7 0 0 1 14 0'/></svg>");
}
.watchSubscribeChoices .channelPushBtn {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 9a6 6 0 1 0-12 0c0 6-2.5 7-2.5 7h17S18 15 18 9'/><path d='M10.3 20.5a2 2 0 0 0 3.4 0'/></svg>");
}
.watchExternalActions {
  display: contents;
}

.watchExternalActions > a[href*="youtube.com/watch"] {
  display: none;
}
.watchExternalActions .watchSaveActions {
  display: contents;
}

.watchExternalActions > .btn,
.watchAutoplayToggle,
.watchSaveActions .saveVideoBtn {
  flex: 0 0 auto;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--watch-border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--watch-text);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  overflow: visible;
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 var(--gloss);
  transition:
    background 0.14s ease,
    color 0.14s ease,
    border-color 0.14s ease,
    transform 0.14s ease;
}

.watchAutoplayToggle {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m17 2 4 4-4 4'/><path d='M3 11V9a4 4 0 0 1 4-4h14'/><path d='m7 22-4-4 4-4'/><path d='M21 13v2a4 4 0 0 1-4 4H3'/></svg>");
}
.watchSaveActions [data-save-list="watch_later"] {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='8'/><path d='M12 8v5l3 2'/></svg>");
}
.watchSaveActions [data-save-list="favorite"] {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m12 3.6 2.5 5.1 5.6.8-4 4 .9 5.6-5-2.7-5 2.7.9-5.6-4-4 5.6-.8z'/></svg>");
}
.watchSaveActions .playlistAddBtn {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6h10'/><path d='M4 11h10'/><path d='M4 16h6'/><path d='M18 13v6'/><path d='M15 16h6'/></svg>");
}
.watchSubscribeChoice:hover,
.watchExternalActions > .btn:hover,
.watchAutoplayToggle:hover,
.watchSaveActions .saveVideoBtn:hover {
  background: var(--soft-2);
  border-color: #c8d2df;
  transform: translateY(-1px);
  text-decoration: none;
}
.watchSubscribeChoice.active,
.watchExternalActions .watchAutoplayToggle.active,
.watchSaveActions .saveVideoBtn.active,
.watchSaveActions .saveVideoBtn[data-saved="1"] {
  background: linear-gradient(135deg, #fff2bd, #d6a33a 58%, #b27b1f);
  color: var(--ink-on-gold);
  border-color: #d3a33d;
  box-shadow:
    0 8px 18px rgba(198, 148, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.watchSubscribeChoice:disabled,
.watchAutoplayToggle:disabled,
.watchSaveActions .saveVideoBtn:disabled {
  opacity: 0.72;
  cursor: default;
  transform: none;
}
.watchSubscribePanel.watchPanelCompactActions .watchExternalActions > .btn,
.watchSubscribePanel.watchPanelCompactActions .watchAutoplayToggle,
.watchSubscribePanel.watchPanelCompactActions .watchSaveActions .saveVideoBtn {
  flex: 0 0 42px;
  width: 42px;
  max-width: 42px;
  padding-inline: 0;
  gap: 0;
  font-size: 0;
  overflow: hidden;
}
.watchSubscribePanel.watchPanelCompactActions .watchAutoplayToggle::before,
.watchSubscribePanel.watchPanelCompactActions
  .watchSaveActions
  .saveVideoBtn::before {
  margin: 0;
}
.watchSubscribePanel.watchPanelCompactChoices .watchSubscribeChoice {
  flex: 0 0 42px;
  width: 42px;
  padding-inline: 0;
  gap: 0;
  font-size: 0;
}
.watchSubscribePanel.watchPanelCompactChoices .watchSubscribeChoice::after {
  display: none;
}
.watchSubscribePanel.watchPanelCompactChoices .watchSubscribeChoice::before {
  margin: 0;
}
.watchSubscribePanel.watchPanelCompactChannel .watchSubscribeMain {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
}
.watchSubscribePanel.watchPanelCompactChannel .watchSubscribeText {
  display: none;
}
@media (max-width: 420px) {
  .watchSubscribePanel {
    gap: 5px;
    padding: 8px 10px;
  }
  .watchSubscribeAvatar,
  .watchSubscribePanel.watchPanelCompactChannel .watchSubscribeMain,
  .watchSubscribePanel.watchPanelCompactChoices .watchSubscribeChoice,
  .watchSubscribePanel.watchPanelCompactActions .watchExternalActions > .btn,
  .watchSubscribePanel.watchPanelCompactActions .watchAutoplayToggle,
  .watchSubscribePanel.watchPanelCompactActions
    .watchSaveActions
    .saveVideoBtn {
    flex-basis: 38px;
    width: 38px;
    max-width: 38px;
  }
}

.videoDescription {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: none;
  overflow: visible;
}

.inlineHashLink,
.textLink,
.videoDescription a,
.h1 .inlineHashLink,
.h1 .textLink {
  color: var(--link);
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
}

.inlineHashLink:hover,
.textLink:hover,
.videoDescription a:hover,
.h1 .inlineHashLink:hover,
.h1 .textLink:hover,
.tagChip:hover {
  text-decoration: underline;
}

/* SEO fallback rendered by the Worker before app.js loads */
.seoListPage {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 0 28px;
  direction: inherit;
}
.seoListPage h1 {
  margin: 14px 0 10px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
}
.seoLinkList a:hover {
  text-decoration: underline;
}
.seoVideoPage {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 0 28px;
}
.seoVideoPage h1 {
  margin: 14px 0 10px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
}
.seoVideoEmbed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}
.seoVideoEmbed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.seoVideoMeta,
.seoOriginalLink {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
}
.seoTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.seoTags a {
  color: var(--link-strong);
  text-decoration: none;
}
.seoDescription {
  white-space: pre-wrap;
  line-height: 1.8;
}
.seoRelated {
  margin-top: 24px;
}
.seoRelated h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.seoRelated ul {
  display: grid;
  gap: 8px;
  padding-inline-start: 20px;
}
.seoRelated li span {
  color: var(--muted);
  margin-inline-start: 8px;
  font-size: 13px;
}

/* ===== PREMIUM TAG / HASHTAG PAGES ===== */
.tagIndexPage,
.tagVideoPage {
  --tag-gold: #c79831;
  --tag-gold-soft: #fff4cf;
  --tag-ink: #17120a;
  --tag-muted: #6f6656;
  --tag-border: rgba(190, 150, 70, 0.26);
  direction: inherit;
}

.tagIndexHero,
.tagVideoHero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 1px solid rgba(196, 154, 70, 0.25);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(255, 237, 178, 0.76),
      transparent 34%
    ),
    radial-gradient(
      circle at 88% 100%,
      rgba(214, 171, 77, 0.24),
      transparent 35%
    ),
    linear-gradient(135deg, var(--cream) 0%, var(--cream-2) 54%, var(--panel) 100%);
  box-shadow:
    0 18px 46px rgba(82, 58, 17, 0.07),
    inset 0 1px 0 var(--gloss);
}

.tagIndexHero::before,
.tagVideoHero::before {
  content: "";
  position: absolute;
  inset: auto 22px -42px auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(215, 174, 74, 0.24),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.tagIndexHeroText,
.tagVideoHeroText {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tagIndexEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(199, 152, 49, 0.26);
  border-radius: 999px;
  background: var(--glass-1);
  color: var(--gold-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.tagIndexEyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3b5, #c79831);
  box-shadow: 0 0 0 3px rgba(199, 152, 49, 0.1);
}

.tagIndexTitle {
  margin: 0;
  color: var(--tag-ink);
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.tagIndexSub {
  max-width: 720px;
  margin-top: 8px;
  color: var(--tag-muted);
  font-size: 15px;
  line-height: 1.65;
}

.tagIndexSwitch {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px;
  border: 1px solid rgba(199, 152, 49, 0.23);
  border-radius: 999px;
  background: var(--glass-1);
  box-shadow:
    0 10px 26px rgba(55, 38, 10, 0.08),
    inset 0 1px 0 var(--gloss);
}

.tagIndexSwitchBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--tag-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.tagIndexSwitchBtn:hover {
  text-decoration: none;
  background: var(--cream-2);
  transform: translateY(-1px);
}

.tagIndexSwitchBtn.active {
  color: #fff;
  background: linear-gradient(135deg, #17120a, #30200b 58%, #9b6d19);
  box-shadow:
    0 9px 18px rgba(92, 62, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tagIndexSwitchIcon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff4bf, #d9af43 56%, #b57d21);
  color: var(--ink-on-gold);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.tagIndexToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  background: var(--cream-grad);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
}

.tagIndexToolbarTitle {
  color: var(--ink-gold);
  font-size: 14px;
  font-weight: 700;
}

.tagIndexToolbarSub {
  margin-top: 2px;
  color: #7a7265;
  font-size: 12px;
  line-height: 1.35;
}

.tagIndexToolbarBadge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.tagIndexGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.tagIndexCard {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 128px;
  padding: 17px 18px;
  border: 1px solid var(--tag-border);
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(255, 250, 239, 0.94)
    ),
    radial-gradient(circle at 0% 0%, rgba(255, 238, 182, 0.55), transparent 38%);
  color: var(--text);
  text-decoration: none;
  box-shadow:
    0 9px 25px rgba(36, 27, 9, 0.055),
    inset 0 1px 0 var(--gloss);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.tagIndexCard::after {
  content: "";
  position: absolute;
  inset: auto -18px -26px auto;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(215, 174, 74, 0.22),
    rgba(215, 174, 74, 0)
  );
  z-index: -1;
}

.tagIndexCardShine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.78) 38%,
    transparent 62%
  );
  transform: translateX(120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.tagIndexCard:hover {
  border-color: rgba(184, 132, 36, 0.5);
  background:
    linear-gradient(180deg, var(--cream), var(--cream-2)),
    radial-gradient(circle at 0% 0%, rgba(255, 238, 182, 0.72), transparent 38%);
  box-shadow:
    0 16px 34px rgba(90, 61, 12, 0.12),
    inset 0 1px 0 var(--gloss);
  text-decoration: none;
  transform: translateY(-3px);
}

.tagIndexCard:hover .tagIndexCardShine {
  transform: translateX(-120%);
}

.tagIndexTopLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.tagIndexIcon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff4bf, #d9af43 56%, #b57d21);
  color: var(--ink-on-gold);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    0 9px 18px rgba(184, 132, 36, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.tagIndexSwitchIcon .tagGlyphSvg,
.tagIndexIcon .tagGlyphSvg,
.tagVideoIcon .tagGlyphSvg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tagIndexSwitchIcon .tagGlyphSvg {
  width: 15px;
  height: 15px;
}

.tagIndexIcon .tagGlyphSvg {
  width: 23px;
  height: 23px;
}

.tagVideoIcon .tagGlyphSvg {
  width: 35px;
  height: 35px;
}

.tagIndexTypePill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(199, 152, 49, 0.22);
  background: var(--glass-1);
  color: var(--gold-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.tagIndexName {
  display: block;
  min-width: 0;
  color: #0b1b35;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tagIndexCard-hashtag .tagIndexName {
  color: var(--link);
}

.tagIndexMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  color: #71695e;
  font-size: 13px;
  line-height: 1.35;
}

.tagIndexMeta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tagIndexMeta span::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(199, 152, 49, 0.7);
}

.tagIndexMoreRow {
  justify-content: center;
  margin-top: 18px;
}

.tagIndexMoreBtn {
  min-height: 42px;
  padding: 0 22px;
  border-color: rgba(199, 152, 49, 0.25);
  background: var(--cream-grad);
  box-shadow: 0 10px 24px rgba(80, 52, 8, 0.07);
}

.tagIndexMoreBtn:hover {
  background: linear-gradient(180deg, var(--cream-2), var(--cream-3));
  text-decoration: none;
}

.tagIndexHint {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
}

.tagVideoHero {
  justify-content: flex-start;
}

.tagVideoIcon {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff4bf, #d9af43 56%, #b57d21);
  color: var(--ink-on-gold);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    0 14px 26px rgba(184, 132, 36, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.tagVideoGrid {
  margin-top: 18px;
}

.tagIndexBackBtn {
  position: relative;
  z-index: 1;
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(199, 152, 49, 0.28);
  border-radius: 999px;
  background: var(--glass-1);
  color: var(--ink-gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 9px 20px rgba(64, 43, 10, 0.07);
}

.tagIndexBackBtn:hover {
  text-decoration: none;
  background: var(--cream-2);
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  gap: 9px;
}

.tagChip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border-color: rgba(199, 152, 49, 0.24);
  background: var(--cream-grad);
  color: var(--ink-gold);
  box-shadow: 0 5px 14px rgba(55, 38, 10, 0.045);
  font-weight: 700;
}

.tagChip:hover {
  border-color: rgba(184, 132, 36, 0.45);
  background: linear-gradient(180deg, var(--cream-2), var(--cream-3));
  color: var(--ink-gold);
  text-decoration: none;
}

.inlineHashLink {
  color: #075fcc;
  font-weight: 700;
}

@media (max-width: 900px) {
  .tagIndexHero,
  .tagVideoHero {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
    border-radius: 24px;
  }

  .tagIndexSwitch {
    width: 100%;
    justify-content: stretch;
  }

  .tagIndexSwitchBtn {
    flex: 1 1 0;
    padding-inline: 12px;
  }

  .tagIndexToolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tagIndexToolbarBadge,
  .tagIndexBackBtn {
    margin-inline-start: 0;
  }
}

@media (max-width: 620px) {
  .tagIndexGrid {
    grid-template-columns: 1fr;
  }

  .tagIndexTitle {
    font-size: 30px;
  }

  .tagIndexCard {
    min-height: 118px;
    border-radius: 22px;
  }
}

/* Channel metadata header */
.channelBanner {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--soft);
  margin-bottom: 14px;
  aspect-ratio: 6 / 1;
  min-height: 120px;
  max-height: 240px;
}
.channelBanner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.channelInfoBox {
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}
.channelDescription {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.channelMetaLine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.channelChipRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.channelChipLabel {
  color: var(--muted);
  font-size: 13px;
  margin-inline-end: 2px;
}
.channelChip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--soft-2);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
  padding: 7px 9px;
  border-radius: 999px;
}
@media (max-width: 640px) {
  .channelBanner {
    border-radius: 14px;
    min-height: 80px;
  }
}

/* Channel info is hidden by default and opened only on demand */
.channelInfoDisclosure > summary {
  list-style: none;
  cursor: pointer;
  width: max-content;
  max-width: 100%;
  user-select: none;
}
.channelInfoDisclosure > summary::-webkit-details-marker {
  display: none;
}
.channelInfoToggle::before {
  content: "ⓘ";
  font-size: 14px;
  line-height: 1;
}
.whenOpen {
  display: none;
}
.channelInfoDisclosure[open] .whenClosed {
  display: none;
}
.channelInfoDisclosure[open] .whenOpen {
  display: inline;
}
.channelChipLink {
  color: var(--link);
  text-decoration: none;
  cursor: pointer;
}
.channelChipLink:hover {
  background: var(--info-soft);
  border-color: #c8d7ff;
  text-decoration: none;
}

/* ===== Language filter ===== */
.languageFilter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}
.languageFilterLabel {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.languagePill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.languagePill:hover {
  background: var(--soft);
}
.languagePill.active {
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  border-color: var(--btn-strong-bg);
}

/* ===== USERS / AUTH ===== */
.authShell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.authCard,
.meSubscriptionsBox,
.emptyPersonalBox {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: var(--panel);
}
.authForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.formInput {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  outline: none;
  background: var(--panel);
}
.formInput:focus {
  border-color: var(--btn-strong-bg);
}
.googleBtn {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
}
.authDivider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 13px;
}
.authDivider:before,
.authDivider:after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}
.formStatus {
  min-height: 20px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.formStatus.error {
  color: #b00020;
}
.meHeader {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.meSubscriptionsBox {
  margin: 14px 0;
}
.meBoxTitle {
  font-weight: 700;
  margin-bottom: 10px;
}
.subscriptionMiniGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.subscriptionMiniCard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  min-width: 0;
}
.subscriptionMiniCard:hover {
  text-decoration: none;
  background: var(--soft-2);
}
.subscriptionMiniAvatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--soft);
  flex: 0 0 auto;
}
.subscriptionMiniFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.subscriptionMiniTitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.channelSubscribeBtn.active:not([data-subscribe-ui="watch"]) {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok-text);
}
.meTabs {
  margin-top: 10px;
}
.emptyPersonalBox {
  color: var(--muted);
}

@media (max-width: 700px) {
  .meHeader {
    flex-direction: column;
  }
}

/* ===== USER SAVED VIDEOS ===== */
.saveVideoActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.saveVideoBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.saveVideoBtn:hover {
  background: var(--soft);
}
.saveVideoBtn.active {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok-text);
}
.saveVideoBtn:disabled {
  opacity: 0.72;
  cursor: wait;
}
.watchActionsRow {
  align-items: center;
}
.watchSaveActions {
  margin-top: 0;
}
.meMainTabs {
  margin: 8px 0 12px;
}
@media (max-width: 700px) {
  .watchActionsRow {
    margin-inline-start: 0;
    width: 100%;
  }
}

/* ===== AUTH HARDENING ===== */
.turnstileBox {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.formStatus.ok {
  color: #116329;
}

/* ===== PASSWORD RESET ===== */
.authShellSingle {
  grid-template-columns: minmax(280px, 520px);
  justify-content: center;
}
.authSmallLink {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-self: flex-start;
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.authSmallLink:hover {
  text-decoration: underline;
}

/* ===== PERSONAL PLAYLISTS ===== */
.personalPlaylistCreateBox {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0;
}
.personalPlaylistForm {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto;
  gap: 8px;
  align-items: center;
}
.personalPlaylistForm input {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  font-family: Arial, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.personalPlaylistsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.personalPlaylistCard {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
.personalPlaylistTitle {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.35;
}
.personalPlaylistTitle:hover {
  color: var(--brand);
}
.personalPlaylistDesc {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.personalPlaylistMeta {
  color: var(--muted);
  margin-top: 8px;
  font-size: 12px;
}
.personalPlaylistActions {
  margin-top: 12px;
}
.ghostBtn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}
.personalPlaylistDetailHead {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.personalPlaylistEditBox {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 14px;
  margin: 14px 0 4px;
}
.personalPlaylistEditForm {
  margin-top: 8px;
}
.smallH1 {
  font-size: 26px;
}
.playlistItemControlRow {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 12px 12px;
}
.playlistItemOrderControls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.playlistItemOrderControls .saveVideoBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.playlistItemRemoveRow {
  margin: 0 12px 12px;
}
.dangerBtn {
  color: #a01818;
  border-color: var(--err-border);
  background: var(--err-soft);
}
.dangerBtn:hover {
  background: var(--err-soft);
}
@media (max-width: 800px) {
  .personalPlaylistForm {
    grid-template-columns: 1fr;
  }
}
.personalPlaylistWatchHead {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  padding: 12px;
  margin-bottom: 12px;
}
.personalPlaylistWatchTitle {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}
.personalPlaylistWatchMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.personalPlaylistWatchNav {
  margin-top: 10px;
  gap: 7px;
}
.smallBtn {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 11px;
}
.personalPlaylistWatchList {
  gap: 8px;
}
.personalPlaylistRecoCard {
  position: relative;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 6px;
}
.activePersonalPlaylistVideo {
  border-color: var(--brand);
  background: rgba(0, 112, 243, 0.06);
}
.activePersonalPlaylistVideo .recoTitle {
  color: var(--brand);
  font-weight: 700;
}
.personalPlaylistIndexBadge {
  position: absolute;
  inset-inline-start: 6px;
  top: 6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
}
.channelPushBtn.active:not([data-subscribe-ui="watch"]) {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
}

.channelPushBtn.disabledLike {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Logged out, subscribe and push would both read as a login button — keep one. */
.channelPushBtn.needsLogin {
  display: none;
}

/* ===== SIDE NAV + COMPACT TOP BAR ===== */

.brand,
.search,
.topbarActions {
  direction: inherit;
}

.brand {
  gap: 10px;
  border-radius: 0;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  grid-column: auto;
  justify-self: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: max-content;
}

.topAuthLink:hover {
  background: var(--soft);
  text-decoration: none;
}

.languageMenu.open .tinyChevron {
  transform: rotate(180deg);
}

.languageMenu.open .languageMenuPanel {
  display: block;
}

.languageMenuItem.active .languageMenuItemIcon {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 520px) {
  .topAuthLink {
    width: 40px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .topAuthLink::before {
    color: var(--text);
    font-size: 16px;
  }

  .languageMenuPanel {
    inset-inline-end: auto;
    inset-inline-start: 0;
  }
}
.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.navIconWrap .sideNavIcon {
  position: relative;
  z-index: 1;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.navIconWrapMenu {
  background: linear-gradient(135deg, #111827, #374151);
}
.navIconHome {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
.navIconPopular {
  background: linear-gradient(135deg, #f97316, #dc2626);
}
.navIconLater {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}
.navIconFavorite {
  background: linear-gradient(135deg, #ec4899, #be123c);
}
.navIconShorts {
  background: linear-gradient(135deg, #ff4d6d, #7c2d12);
}
.navIconLive {
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
}
.navIconChannels {
  background: linear-gradient(135deg, #10b981, #047857);
}
.navIconPlaylists {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}
.navIconHashtag {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}
.navIconTags {
  background: linear-gradient(135deg, #64748b, #334155);
}

.sideNav .sideNavText {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.languageMenuBtn:hover,
.languageMenu.open .languageMenuBtn {
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.languageFlagText {
  position: relative;
  z-index: 2;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
}

.languageFlag-he {
  background: linear-gradient(
    180deg,
    #fff 0 22%,
    #2f64d6 22% 34%,
    #fff 34% 66%,
    #2f64d6 66% 78%,
    #fff 78% 100%
  );
}


.languageFlag-en {
  background: repeating-linear-gradient(180deg, #b91c1c 0 3px, #fff 3px 6px);
}
.languageFlag-en::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 54%;
  height: 56%;
  background: #1d4ed8;
}
.languageFlag-en::after {
  content: "EN";
  position: absolute;
  inset: auto auto 4px 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.languageFlag-fr {
  background: linear-gradient(90deg, #1d4ed8 0 33%, #fff 33% 66%, #dc2626 66%);
}
.languageFlag-ru {
  background: linear-gradient(180deg, #fff 0 33%, #2563eb 33% 66%, #dc2626 66%);
}
.languageFlag-yi {
  background: linear-gradient(135deg, #ede9fe, #7c3aed);
}
.languageFlag-yi .languageFlagText {
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.languageMenuItem.active .languageFlag {
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

body {
  background:
    radial-gradient(
      circle at top right,
      rgba(231, 196, 106, 0.08),
      transparent 34%
    ),
    linear-gradient(180deg, var(--panel) 0%, var(--cream) 100%);
}

.brandLogo {
  display: block;
  max-width: none;
  width: auto;
  height: 36px;
  filter: drop-shadow(0 8px 18px rgba(184, 132, 36, 0.1));
}

.topAuthLink,
.languageMenuBtn {
  height: 42px;
  min-height: 42px;
  border: 1px solid rgba(184, 132, 36, 0.34);
  border-radius: 999px;
  background: var(--cream-grad);
  color: var(--ink-gold);
  box-shadow:
    0 9px 22px rgba(184, 132, 36, 0.11),
    inset 0 1px 0 var(--gloss);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.topAuthLink:hover,
.languageMenuBtn:hover,
.languageMenu.open .languageMenuBtn {
  text-decoration: none;
  transform: translateY(-1px);
  background: linear-gradient(
    135deg,
    var(--gold-1),
    var(--gold-2) 58%,
    var(--gold-3)
  );
  color: #181006;
  box-shadow:
    0 13px 30px rgba(184, 132, 36, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.languageMenuIcon {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.01em;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tinyChevron {
  transition: transform 0.18s ease;
  width: 15px;
  height: 15px;
  color: var(--gold-muted);
}

.languageFlag {
  position: relative;
  isolation: isolate;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 7px 16px rgba(23, 17, 8, 0.16),
    0 0 0 1px rgba(184, 132, 36, 0.35);
}

.languageFlag::before,
.languageFlag::after {
  content: none;
}

.languageFlagSvg {
  width: 100%;
  height: 100%;
  display: block;
}

.languageFlagFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff4bd, #b88424);
  color: #1a1205;
  font-size: 11px;
  font-weight: 700;
}

.languageMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  display: none;
  z-index: 80;
  min-width: 220px;
  padding: 10px;
  border: 1px solid rgba(184, 132, 36, 0.22);
  border-radius: 22px;
  background: var(--cream-grad);
  box-shadow: 0 24px 70px rgba(23, 17, 8, 0.2);
}

.languageMenuItem {
  display: flex;
  align-items: center;
  padding: 10px 10px;
  font-size: 14px;
  white-space: nowrap;
  min-height: 48px;
  gap: 12px;
  border-radius: 16px;
  color: var(--ink-gold);
  font-weight: 700;
}

.languageMenuItem:hover {
  background: rgba(231, 196, 106, 0.2);
  text-decoration: none;
}

.languageMenuItem.active {
  background: linear-gradient(135deg, #1c1408, #3b280d);
  color: #fff5cf;
  box-shadow: inset 0 0 0 1px rgba(231, 196, 106, 0.34);
}

.languageMenuItemIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  width: 36px;
  height: 36px;
  background: transparent;
}

.sideNav.expanded {
  width: var(--sidebar-expanded);
  box-shadow: 16px 0 48px rgba(23, 17, 8, 0.22);
}

.sideNavLinks.nav,
.sideNavLinks {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  margin-top: 6px;
  overflow: hidden;
}

.sideNav:not(.expanded) .sideNavToggle,
.sideNav:not(.expanded) .navLink {
  justify-content: center;
  padding-inline: 0;
}

.navIconWrap {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  color: var(--ink-on-gold);
  background: linear-gradient(135deg, #fff5c8 0%, #e5c366 58%, #a8751d 100%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 7px 15px rgba(184, 132, 36, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(70, 43, 5, 0.16);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.navIconWrap::before {
  content: "";
  position: absolute;
  inset: 2px 2px auto auto;
  width: 44%;
  height: 44%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  filter: blur(2px);
  pointer-events: none;
}

.navIconWrap::after {
  position: absolute;
  inset: 1px 1px auto auto;
  width: 40%;
  height: 40%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(2px);
  content: none;
}

.sideNavIcon {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.28));
}

.sideNavIcon .iconFill {
  fill: currentColor;
  stroke: none;
  opacity: 0.25;
}

.sideNavToggle:hover .navIconWrap,
.sideNav .navLink:hover .navIconWrap {
  box-shadow:
    0 10px 22px rgba(231, 196, 106, 0.26),
    0 0 0 2px rgba(255, 244, 189, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.sideNav .navLink.active .navIconWrap {
  color: #f8d978;
  background: linear-gradient(135deg, #241806 0%, #0f0b07 100%);
  border-color: rgba(255, 232, 160, 0.44);
  transform: none;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(255, 250, 240, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sideNav .navLink.active .sideNavIcon {
  filter: drop-shadow(0 0 7px rgba(255, 216, 120, 0.18));
}

.sideNavText {
  flex: 1 1 auto;
  min-width: 0;
  text-align: start;
  color: inherit;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transform: translateX(-4px);
  transition:
    opacity 0.14s ease,
    max-width 0.16s ease,
    transform 0.14s ease;
  pointer-events: none;
}

.sideNav.expanded .sideNavText {
  opacity: 1;
  max-width: 178px;
  transform: none;
  pointer-events: auto;
}

.sideNav:not(.expanded) .sideNavDivider {
  display: none;
}

.shell {
  width: auto;
  max-width: none;
  margin: 0;
  transition:
    margin-inline-start 0.2s ease,
    margin-inline-end 0.2s ease;
  padding: 22px 26px 30px;
}

@media (min-width: 721px) {
  html[dir="ltr"] .shell,
  html[dir="rtl"] .shell {
    margin-inline-start: var(--sidebar-collapsed);
    margin-inline-end: 0;
  }
}

.languageFilter[aria-label="סינון לפי שפה"] {
  display: none;
}

@media (max-width: 720px) {
  .search input,
  .search button {
    height: 38px;
  }
  .topAuthText {
    display: none;
  }
  .topAuthLink {
    min-height: 38px;
    font-size: 13px;
    width: 44px;
    padding: 0;
  }
  .topActionIcon {
    width: 30px;
    height: 30px;
  }
  .languageMenuBtn {
    padding: 0 8px;
    min-width: 56px;
    height: 40px;
    min-height: 40px;
  }
  .languageFlag {
    width: 30px;
    height: 30px;
  }
  .sideNavToggle,
  .sideNav .navLink {
    padding-inline: 4px;
    min-height: clamp(34px, 4.55vh, 40px);
    padding: 3px 5px;
    border-radius: 13px;
    gap: 8px;
    font-size: 12px;
  }
  .navIconWrap {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 11px;
  }
  .sideNavIcon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }
  .sideNav.expanded .sideNavText {
    max-width: 156px;
  }
}

@media (max-height: 680px) {
  .sideNav {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(231, 196, 106, 0.45) transparent;
  }
  .sideNavToggle,
  .sideNav .navLink {
    min-height: 34px;
  }
  .navIconWrap {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    border-radius: 10px;
  }
  .sideNavIcon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }
}

.sideNav::-webkit-scrollbar {
  width: 5px;
}

/* ===== Unified content toolbar: videos / shorts / live + sort + content language ===== */

.contentToolbarTab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(212, 175, 55, 0.38);
}

.contentToolbarTab.active {
  color: var(--ink-on-gold);
  border-color: rgba(255, 224, 139, 0.8);
  background: linear-gradient(135deg, #fff1b8, #c7962d 56%, #8b641a);
  box-shadow:
    0 10px 24px rgba(198, 148, 42, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.contentToolbarMiniBtn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.contentToolbarMiniBtn.active {
  color: var(--ink-gold);
  background: linear-gradient(135deg, #ffe7a1, #bd8c28);
}

.contentToolbarLang {
  position: relative;
  padding: 0;
}

.contentToolbarLang summary::-webkit-details-marker {
  display: none;
}

.contentToolbarLangItem.active {
  color: var(--ink-gold);
  background: linear-gradient(135deg, #ffe7a1, #bd8c28);
}

@media (max-width: 900px) {
  .contentToolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .contentToolbarTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .contentToolbarTab {
    padding-inline: 10px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .contentToolbar {
    border-radius: 18px;
    padding: 9px;
  }

  .contentToolbarTabs {
    gap: 5px;
  }

  .contentToolbarTab {
    min-height: 42px;
    gap: 5px;
    padding: 8px 6px;
    font-size: 12px;
    border-radius: 13px;
  }

  .contentToolbarIcon {
    display: none;
  }

  .contentToolbarControls {
    gap: 7px;
  }

  .contentToolbarGroup {
    min-height: 38px;
  }

  .contentToolbarLabel {
    font-size: 12px;
    padding-inline: 6px 0;
  }

  .contentToolbarMiniBtn {
    min-height: 29px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .contentToolbarLang summary {
    min-height: 38px;
    padding-inline: 9px;
  }

  .contentToolbarLang strong {
    font-size: 12px;
  }
}
html,
body,
button,
input,
select,
textarea,
.topbar,
.topbar *,
.sideNav,
.sideNav *,
.languageMenu,
.languageMenu *,
.contentToolbar,
.contentToolbar *,
.tabs,
.tabs *,
.nav,
.nav * {
  font-family: Arial, sans-serif;
}

.topbarShortcut:hover {
  transform: translateY(-1px);
  background: var(--cream-2);
  border-color: rgba(184, 132, 36, 0.42);
  text-decoration: none;
}

.contentToolbarGroup,
.contentToolbarLang summary {
  width: 100%;
}

.contentToolbarSort {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  direction: inherit;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 9px 18px;
  border-bottom: 1px solid rgba(184, 132, 36, 0.22);
  box-shadow: 0 8px 28px rgba(23, 17, 8, 0.06);
  backdrop-filter: saturate(160%) blur(16px);
  gap: 14px;
  background: var(--glass-3);
}

.search {
  grid-column: auto;
  justify-self: auto;
  margin: 0 auto;
  flex: 0 1 min(44vw, 560px);
  width: min(44vw, 560px);
  max-width: 560px;
  min-width: 320px;
  display: grid;
  grid-template-columns: 1fr 58px;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.search:focus-within {
  border-color: #b8b8b8;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.035);
}

.search input {
  order: 1;
  flex: 1 1 auto;
  width: 100%;
  border-inline-start: 0;
  border-color: rgba(184, 132, 36, 0.3);
  height: 42px;
  min-width: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: var(--panel);
  box-shadow: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 42px;
}

.search input::placeholder {
  color: #777;
  opacity: 1;
}

.search button {
  cursor: pointer;
  order: 2;
  flex: 0 0 64px;
  border-color: rgba(184, 132, 36, 0.3);
  width: 58px;
  height: 42px;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--border);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft-2);
  color: var(--text);
  box-shadow: none;
}

.search button:hover {
  background: var(--soft);
  filter: none;
}

.searchIcon {
  display: block;
  color: var(--text);
  width: 22px;
  height: 22px;
}

.topbarShortcut,
.topAuthLink,
.languageMenuBtn {
  min-height: 44px;
  height: 44px;
  border: 1px solid rgba(189, 143, 50, 0.28);
  border-radius: 999px;
  background: var(--cream-grad);
  color: var(--ink-gold);
  box-shadow:
    0 8px 18px rgba(184, 132, 36, 0.085),
    inset 0 1px 0 var(--gloss);
}

.topbarShortcut:hover,
.topAuthLink:hover,
.languageMenuBtn:hover,
.languageMenu.open .languageMenuBtn {
  transform: translateY(-1px);
  background: var(--cream-grad-2);
  border-color: rgba(184, 132, 36, 0.48);
  text-decoration: none;
}

.topAuthLink::before {
  font-size: 15px;
  line-height: 1;
  content: none;
  display: none;
}

.topActionIcon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contentToolbarTabs {
  align-items: center;
  min-width: 0;
  flex: 0 1 70%;
  width: 70%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.contentToolbarControls {
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 calc(30% - 12px);
  width: calc(30% - 12px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.contentToolbarTab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5ead0;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
  padding-inline: 12px;
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
}

.contentToolbarTab:hover,
.contentToolbarMiniBtn:hover,
.contentToolbarLang summary:hover {
  background: var(--cream-2);
  border-color: #d8b65d;
  text-decoration: none;
}

.contentToolbarTab.active,
.contentToolbarMiniBtn.active,
.contentToolbarLangItem.active {
  color: var(--ink-on-gold);
  border-color: #d3a33d;
  background: linear-gradient(135deg, #fff2bd, #d6a33a 58%, #b27b1f);
  box-shadow:
    0 8px 18px rgba(198, 148, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.contentToolbarIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 1;
  color: inherit;
  font-size: 17px;
}

.contentToolbarGroup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: #f6ecd5;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 5px;
  border-radius: 16px;
}

.contentToolbarLabel {
  padding-inline: 8px 2px;
  white-space: nowrap;
  color: var(--gold-muted);
  font-size: 13px;
  font-weight: 700;
}

.contentToolbarMiniBtns {
  align-items: center;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.contentToolbarMiniBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  padding-inline: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.contentToolbarLang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 15px;
  width: 100%;
  justify-content: space-between;
  min-height: 48px;
  padding: 5px 12px;
}

.contentToolbarLang strong {
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.contentToolbarArrow {
  font-size: 16px;
  line-height: 1;
  color: #b8821d;
}

.contentToolbarLangMenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 170px;
  padding: 7px;
  border: 1px solid rgba(191, 147, 57, 0.34);
  border-radius: 16px;
  background: var(--panel);
  border-color: var(--cream-border);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
}

.contentToolbarLangItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 11px;
  text-decoration: none;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}

.contentToolbarLangItem:hover {
  background: var(--cream-2);
}

.contentToolbarStatus {
  margin: -6px 4px 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .search {
    flex-basis: min(42vw, 500px);
    width: min(42vw, 500px);
    max-width: 500px;
  }
}

@media (max-width: 900px) {
  .contentToolbarTabs,
  .contentToolbarControls {
    width: 100%;
    flex-basis: auto;
  }

  .contentToolbarControls {
    width: 100%;
    justify-content: space-between;
    grid-template-columns: 1fr;
  }
}
html,
body,
button,
input,
select,
textarea,
a,
span,
summary,
.topbar,
.topbar *,
.sideNav,
.sideNav *,
.languageMenu,
.languageMenu *,
.contentToolbar,
.contentToolbar *,
.tabs,
.tabs *,
.nav,
.nav * {
  letter-spacing: 0;
  font-family: Arial, sans-serif;
}

.topbarActions {
  flex: 0 0 auto;
  justify-content: flex-end;
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: inherit;
}

.topbarShortcutLinks {
  flex: 0 0 auto;
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.languageMenu {
  position: relative;
  flex: 0 0 auto;
  order: 2;
}

.topAuthLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  gap: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  order: 3;
}

.topbarShortcut,
.topAuthLink {
  min-height: 44px;
  height: 44px;
  border: 1px solid rgba(189, 143, 50, 0.3);
  border-radius: 999px;
  background: var(--cream-grad);
  color: var(--ink-gold);
  box-shadow:
    0 8px 18px rgba(184, 132, 36, 0.085),
    inset 0 1px 0 var(--gloss);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.topbarShortcut {
  height: 42px;
  min-width: 42px;
  border: 1px solid rgba(184, 132, 36, 0.28);
  border-radius: 999px;
  background: var(--cream-grad);
  color: var(--ink-gold);
  box-shadow:
    0 7px 18px rgba(184, 132, 36, 0.08),
    inset 0 1px 0 var(--gloss);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 8px;
  padding: 0 13px 0 15px;
  text-decoration: none;
  white-space: nowrap;
}

.topbarShortcut:hover,
.topAuthLink:hover {
  transform: translateY(-1px);
  background: var(--cream-grad-2);
  border-color: rgba(184, 132, 36, 0.5);
  text-decoration: none;
}

.topbarShortcut svg {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 7px;
  border-radius: 999px;
  color: var(--ink-on-gold);
  background: linear-gradient(135deg, #fff4bf, #d9af43 56%, #b57d21);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 5px 13px rgba(184, 132, 36, 0.16);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbarShortcut span,
.topAuthText {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.topActionIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 999px;
  color: var(--ink-on-gold);
  background: linear-gradient(135deg, #fff4bf, #d9af43 56%, #b57d21);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 5px 13px rgba(184, 132, 36, 0.16);
}
.languageMenuBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  height: 44px;
  background: linear-gradient(180deg, var(--panel), var(--soft-2));
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  min-width: 66px;
  padding: 0 7px 0 9px;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.sideNav {
  position: fixed;
  inset-block-end: 0;
  inset-inline-start: 0;
  z-index: 30;
  direction: inherit;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-collapsed);
  height: calc(100dvh - var(--topbar-height));
  inset-block-start: var(--topbar-height);
  padding: 8px 8px 10px;
  overflow: hidden;
  transition:
    width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s ease;
  background: var(--cream-grad);
  border-inline-end: 1px solid rgba(184, 132, 36, 0.22);
  box-shadow: 8px 0 28px rgba(23, 17, 8, 0.07);
}

.sideNavToggle,
.sideNav .navLink {
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  min-height: clamp(36px, 4.65vh, 42px);
  height: auto;
  padding: 4px 6px;
  gap: 10px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: start;
  justify-content: flex-start;
  text-decoration: none;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
  color: var(--ink-gold);
  background: transparent;
  border: 1px solid transparent;
  font-family: Arial, sans-serif;
}

.sideNavToggle:hover,
.sideNav .navLink:hover {
  text-decoration: none;
  background: rgba(184, 132, 36, 0.08);
  color: var(--ink-gold);
  border-color: rgba(184, 132, 36, 0.18);
  box-shadow:
    inset 0 1px 0 var(--gloss),
    0 8px 18px rgba(184, 132, 36, 0.08);
}

.sideNav .navLink.active {
  color: var(--ink-gold);
  background: linear-gradient(
    90deg,
    rgba(255, 244, 189, 0.55),
    rgba(255, 255, 255, 0.72)
  );
  border-color: rgba(184, 132, 36, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset -3px 0 0 rgba(184, 132, 36, 0.72),
    0 8px 18px rgba(184, 132, 36, 0.08);
}

.navIconWrap,
.sideNav .navLink.active .navIconWrap {
  color: var(--ink-on-gold);
  background: linear-gradient(135deg, #fff4bf, #d9af43 56%, #b57d21);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 6px 14px rgba(184, 132, 36, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sideNavIcon,
.sideNav .navLink.active .sideNavIcon {
  filter: none;
}

.sideNavDivider {
  position: relative;
  flex: 0 0 12px;
  height: 12px;
  min-height: 12px;
  margin: 0 6px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  color: #8a6a27;
}

.sideNavDivider::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(184, 132, 36, 0.28),
    transparent
  );
}

.sideNavDivider .sideNavText {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  max-width: none;
  padding-inline: 7px;
  background: var(--cream);
}

.sideNav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(184, 132, 36, 0.32);
}
.contentToolbar {
  display: flex;
  direction: inherit;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid var(--cream-border);
  border-radius: 22px;
  background: var(--cream-grad);
  border-color: var(--cream-border);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.055),
    inset 0 1px 0 var(--gloss);
}

.contentToolbarTab,
.contentToolbarGroup,
.contentToolbarLang summary {
  border: 1px solid var(--cream-border);
  box-shadow: inset 0 1px 0 var(--gloss);
  background: var(--panel);
  color: var(--text);
  border-color: var(--cream-border);
}

/* Global-search content-type tabs: reuse the toolbar pill look, but lay out
   five pills responsively instead of the fixed 3-column home toolbar grid. */
.searchToolbar {
  flex-wrap: wrap;
}

.searchToolbar .searchTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  grid-template-columns: none;
}

.searchToolbar .searchTabs .contentToolbarTab {
  flex: 1 1 130px;
  width: auto;
  min-width: 0;
}

.contentToolbarIcon .tagGlyphSvg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contentToolbarIcon .contentKindSvg {
  display: block;
  width: 18px;
  height: 18px;
}

.channelContentTabIcon .contentKindSvg {
  display: block;
  width: 15px;
  height: 15px;
}

@media (max-width: 620px) {
  .searchToolbar .searchTabs .contentToolbarTab {
    flex: 1 1 calc(50% - 4px);
  }
}

/* In-channel search (videos + playlists) */
.searchScopeBanner.contentToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.searchScopeLabel {
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
}

.searchScopeLabel strong {
  color: var(--text);
}

.searchScopeClear {
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .topbarShortcut span {
    display: inline;
  }

  .topbarShortcut {
    width: auto;
    padding: 0 10px 0 12px;
  }
}

@media (max-width: 980px) {
  .topbarShortcut span {
    display: none;
  }

  .topbarShortcut {
    width: 44px;
    padding: 0;
  }
}

/* ===== VIDEO CARD ACTION ICONS IN META ROW ===== */
.videoCardBody {
  padding-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title title"
    "meta actions";
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
}

.videoCardBody .cardTitleLink {
  grid-area: title;
  min-width: 0;
}

.videoCardBody .videoMetaStackRow {
  grid-area: meta;
  margin-top: 0;
  min-width: 0;
  align-items: center;
}

.videoCardBody .videoMetaStack {
  gap: 1px;
}

.videoCardBody .videoMetaDate {
  font-size: 12px;
}

.videoCardBody .videoChannelLink {
  font-size: 13px;
}

.videoCardBody .saveVideoActions {
  grid-area: actions;
  margin-top: 0;
  gap: 7px;
  flex-wrap: nowrap;
  justify-self: end;
  align-self: center;
}

.shortBody .saveVideoActions {
  margin-top: 8px;
  gap: 7px;
  flex-wrap: nowrap;
}

.videoCardBody .saveVideoBtn,
.shortBody .saveVideoBtn {
  --icon-color: var(--ink-gold);
  position: relative;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(193, 151, 65, 0.28);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  box-shadow:
    0 6px 16px rgba(184, 132, 36, 0.1),
    inset 0 1px 0 var(--gloss);
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.videoCardBody .saveVideoBtn::before,
.shortBody .saveVideoBtn::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
  background: var(--icon-color);
  -webkit-mask: var(--icon) center/contain no-repeat;
  mask: var(--icon) center/contain no-repeat;
}

.videoCardBody .saveVideoBtn:hover,
.shortBody .saveVideoBtn:hover {
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--cream-3) 100%);
  border-color: rgba(193, 151, 65, 0.4);
  transform: translateY(-1px);
  box-shadow:
    0 9px 18px rgba(184, 132, 36, 0.14),
    inset 0 1px 0 var(--gloss);
}

.videoCardBody .saveVideoBtn.active,
.shortBody .saveVideoBtn.active {
  --icon-color: #1d1508;
  background: linear-gradient(135deg, #fff4bf 0%, #d9af43 58%, #b57d21 100%);
  border-color: rgba(163, 113, 26, 0.56);
  box-shadow:
    0 10px 18px rgba(184, 132, 36, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: transparent;
}

.videoCardBody .saveVideoBtn.active::after,
.shortBody .saveVideoBtn.active::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1f8f44;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.videoCardBody .saveVideoBtn:focus-visible,
.shortBody .saveVideoBtn:focus-visible {
  outline: 2px solid rgba(184, 132, 36, 0.55);
  outline-offset: 2px;
}

.videoCardBody .saveVideoBtn[data-save-list="watch_later"],
.shortBody .saveVideoBtn[data-save-list="watch_later"] {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='8'/><path d='M12 8v5l3 2'/></svg>");
}

.videoCardBody .saveVideoBtn[data-save-list="favorite"],
.shortBody .saveVideoBtn[data-save-list="favorite"] {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 17.3l-5.26 3.2 1.4-5.98L3.5 10.4l6.1-.52L12 4.2l2.4 5.68 6.1.52-4.64 4.12 1.4 5.98z'/></svg>");
}

.videoCardBody .playlistAddBtn,
.shortBody .playlistAddBtn {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6h10'/><path d='M4 12h10'/><path d='M4 18h7'/><path d='m17 10 4 3-4 3z'/></svg>");
}

.videoCardBody .saveVideoBtn[data-tooltip]:not(.active)::after,
.shortBody .saveVideoBtn[data-tooltip]:not(.active)::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.13s, transform 0.13s;
  z-index: 99;
}

.videoCardBody .saveVideoBtn[data-tooltip]:not(.active):hover::after,
.shortBody .saveVideoBtn[data-tooltip]:not(.active):hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
  .videoCardBody {
    column-gap: 8px;
  }

  .videoCardBody .saveVideoActions,
  .shortBody .saveVideoActions {
    gap: 6px;
  }

  .videoCardBody .saveVideoBtn,
  .shortBody .saveVideoBtn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 13px;
  }

  .videoCardBody .saveVideoBtn::before,
  .shortBody .saveVideoBtn::before {
    width: 16px;
    height: 16px;
  }
}

/* ===== WATCH PAGE INSTANT LOAD / SKELETONS ===== */
.watchInstantNotice {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.skeletonBlock {
  position: relative;
  overflow: hidden;
  background: var(--soft);
  border-radius: 12px;
}
.skeletonBlock::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.64),
    transparent
  );
  animation: youtoraSkeletonShimmer 1.15s infinite;
}
@keyframes youtoraSkeletonShimmer {
  100% {
    transform: translateX(-100%);
  }
}
.watchSkeletonTitle {
  width: min(720px, 88%);
  height: 30px;
  margin-top: 14px;
}
.watchSkeletonMetaRow,
.watchSkeletonTagRow,
.watchSkeletonDescription,
.watchSkeletonPanelActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.watchSkeletonMetaRow {
  margin-top: 12px;
}
.watchSkeletonMeta {
  height: 14px;
  border-radius: 999px;
}
.watchSkeletonMetaA {
  width: 120px;
}
.watchSkeletonMetaB {
  width: 86px;
}
.watchSkeletonMetaC {
  width: 104px;
}
.watchSkeletonPanel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--yt-border, var(--border));
  border-radius: 18px;
  background: var(--card);
}
.watchSkeletonAvatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.watchSkeletonPanelText {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.watchSkeletonPanelActions {
  justify-content: flex-end;
  flex: 0 0 auto;
}
.watchSkeletonPill {
  width: 92px;
  height: 36px;
  border-radius: 999px;
}
.watchSkeletonTagRow {
  margin-top: 14px;
}
.watchSkeletonTag {
  width: 82px;
  height: 30px;
  border-radius: 999px;
}
.watchSkeletonTagWide {
  width: 116px;
}
.watchSkeletonDescription {
  margin-top: 14px;
  flex-direction: column;
  gap: 9px;
}
.watchSkeletonLine {
  height: 13px;
  border-radius: 999px;
}
.watchSkeletonLineFull {
  width: 100%;
}
.watchSkeletonLineLong {
  width: 88%;
}
.watchSkeletonLineMid {
  width: 62%;
}
.watchSkeletonLineShort {
  width: 42%;
}
.watchSkeletonList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.watchSkeletonReco {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.watchSkeletonThumb {
  width: 168px;
  aspect-ratio: 16/9;
  border-radius: 12px;
}
.watchSkeletonRecoBody {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 3px;
}
@media (max-width: 1100px) {
  .watchSkeletonReco {
    grid-template-columns: 144px minmax(0, 1fr);
  }
  .watchSkeletonThumb {
    width: 144px;
  }
  .watchSkeletonPanel {
    align-items: flex-start;
  }
  .watchSkeletonPanelActions {
    width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .watchSkeletonTitle {
    width: 96%;
    height: 26px;
  }
  .watchSkeletonPanel {
    flex-wrap: wrap;
  }
  .watchSkeletonReco {
    grid-template-columns: 136px minmax(0, 1fr);
  }
  .watchSkeletonThumb {
    width: 136px;
  }
}

/* ===== CHANNEL PAGE: modern YouTube-like layout ===== */
.channelHero {
  position: relative;
  margin: 0 0 18px;
}
.channelHeroBanner {
  position: relative;
  height: clamp(150px, 16vw, 250px);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 16% 20%,
      rgba(213, 170, 59, 0.28),
      transparent 32%
    ),
    linear-gradient(135deg, #171717 0%, #292313 48%, #f4e3b1 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.09);
  isolation: isolate;
}
.channelHeroBanner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.12),
      transparent 34%,
      rgba(0, 0, 0, 0.2)
    ),
    linear-gradient(0deg, rgba(0, 0, 0, 0.24), transparent 54%);
  pointer-events: none;
}
.channelHeroBanner.noBanner::before {
  content: "";
  position: absolute;
  inset: -32% -8%;
  background:
    radial-gradient(
      circle at 24% 48%,
      rgba(255, 255, 255, 0.34),
      transparent 21%
    ),
    radial-gradient(
      circle at 74% 18%,
      rgba(255, 255, 255, 0.22),
      transparent 18%
    );
  transform: rotate(-6deg);
}
.channelHeroBanner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.channelHeroCard {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: -58px 24px 0;
  padding: 18px;
  border: 1px solid var(--cream-border);
  border-radius: 26px;
  background: var(--glass-3);
  box-shadow: 0 18px 50px rgba(31, 24, 10, 0.1);
}
@supports (backdrop-filter: blur(14px)) {
  .channelHeroCard {
    background: var(--glass-2);
    backdrop-filter: saturate(160%) blur(14px);
  }
}
.channelHeroIdentity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}
.channelHeroAvatarShell {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 4px;
  background: var(--panel);
  border: 1px solid rgba(213, 170, 59, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}
.channelHeroAvatar,
.channelHeroAvatarFallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}
.channelHeroAvatarFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  color: #4d3c10;
  background: linear-gradient(135deg, #fff8df, #e9cf79);
}
.channelHeroText {
  min-width: 0;
  max-width: 860px;
}
.channelHeroTitle {
  margin: 0;
  font-size: clamp(26px, 3.1vw, 42px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.channelHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.channelHeroMeta span {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(213, 170, 59, 0.25);
  border-radius: 999px;
  background: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channelHeroDescription {
  margin: 10px 0 0;
  max-width: 78ch;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
}
.channelHeroActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}
.channelHeroActions .btn {
  min-height: 40px;
  padding-inline: 14px;
  border-color: rgba(213, 170, 59, 0.32);
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(65, 47, 12, 0.06);
}
.channelHeroActionBtn::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-block;
  border-radius: 999px;
  background-color: var(--cream-3);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
}
.channelControlShell {
  margin: 18px 0 12px;
}
.channelControlShell .channelControlBar {
  margin: 0;
}
.channelControlShell .channelInfoBox {
  margin-top: 10px;
  border-color: var(--cream-border);
  background: var(--cream-grad);
  border-radius: 20px;
}
.channelInfoPanel[hidden] {
  display: none;
}
.channelInfoToolbarBtn {
  border: 0;
  font-family: Arial, sans-serif;
  cursor: pointer;
}
.channelInfoToolbarBtn:not(.active) {
  background: transparent;
}
.channelControlBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
  padding: 8px;
  border: 1px solid var(--cream-border);
  border-radius: 24px;
  background: var(--cream-grad);
  box-shadow: 0 10px 28px rgba(53, 38, 7, 0.045);
}
.channelContentTabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.channelContentTab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 16px;
  color: var(--ink-gold);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}
.channelContentTab:hover {
  text-decoration: none;
  background: rgba(213, 170, 59, 0.13);
}
.channelContentTab.active {
  color: var(--btn-strong-text);
  background: var(--btn-strong-bg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.channelContentTabIcon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(213, 170, 59, 0.18);
  color: var(--ink-gold);
  font-size: 13px;
  line-height: 1;
}
.channelContentTab.active .channelContentTabIcon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.channelContentTabBadge {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 7px;
  border-radius: 999px;
  background: #f2d06f;
  color: var(--ink-on-gold);
  font-size: 12px;
  line-height: 1;
}
.channelSortCompact {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 5px;
  border: 1px solid rgba(213, 170, 59, 0.24);
  border-radius: 18px;
  background: var(--panel);
  flex: 0 0 auto;
}
.channelSortLabel {
  padding: 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.channelSortPill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--ink-gold);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.channelSortPill:hover {
  text-decoration: none;
  background: var(--cream-2);
}
.channelSortPill.active {
  background: #d5aa3b;
  color: var(--ink-on-gold);
}
.channelInfoDisclosure {
  margin: 12px 0 0;
}
.channelInfoDisclosure > summary.channelInfoToggle {
  border-color: rgba(213, 170, 59, 0.28);
  background: var(--cream);
  color: var(--ink-gold);
  font-weight: 700;
}
.channelInfoDisclosure .channelInfoBox {
  margin-top: 10px;
  border-color: var(--cream-border);
  background: var(--cream-grad);
  border-radius: 20px;
}
.channelSection {
  margin: 22px 0 0;
  padding: 20px;
  border: 1px solid var(--cream-border);
  border-radius: 26px;
  background: var(--cream-grad);
  box-shadow: 0 10px 28px rgba(53, 38, 7, 0.04);
}
.channelMainContent {
  background: var(--panel);
}
.channelSectionHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.channelSectionHead h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}
.channelSectionHead p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}
.channelSectionLink {
  flex: 0 0 auto;
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  border-color: var(--btn-strong-bg);
}
.channelPlaylistRail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  align-items: start;
}
.channelPlaylistRail .playlistCard {
  min-width: 0;
}
.channelPlaylistRail .playlistTitle {
  font-size: 15px;
}
.channelPlaylistRail .playlistChannel {
  display: none;
}
.channelMoreRow {
  margin-top: 18px;
}
.channelHint {
  margin-top: 8px;
}
.channelEmptyState {
  padding: 18px;
  border: 1px dashed rgba(213, 170, 59, 0.45);
  border-radius: 18px;
  background: var(--cream);
}

@media (max-width: 980px) {
  .channelHeroCard {
    align-items: flex-start;
    flex-direction: column;
    margin-inline: 14px;
  }
  .channelHeroActions {
    width: 100%;
    justify-content: flex-start;
  }
  .channelControlBar {
    align-items: stretch;
    flex-direction: column;
  }
  .channelSortCompact {
    width: 100%;
    overflow: auto;
  }
}
@media (max-width: 640px) {
  .channelHeroBanner {
    height: 132px;
    border-radius: 20px;
  }
  .channelHeroCard {
    margin: -38px 10px 0;
    padding: 14px;
    border-radius: 22px;
  }
  .channelHeroIdentity {
    align-items: flex-start;
    gap: 12px;
  }
  .channelHeroAvatarShell {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }
  .channelHeroTitle {
    font-size: 24px;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .channelHeroDescription {
    display: none;
  }
  .channelHeroActions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .channelContentTabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .channelContentTab {
    padding-inline: 10px;
  }
  .channelSection {
    padding: 14px;
    border-radius: 22px;
  }
  .channelSectionHead {
    align-items: flex-start;
    flex-direction: column;
  }
  .channelSectionLink {
    width: 100%;
    justify-content: center;
  }
  .channelPlaylistRail {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SEO fallback styles
   ========================================================================== */
.seoListPage,
.seoVideoPage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 0 32px;
  direction: inherit;
  font-family: Arial, sans-serif;
  color: var(--text);
}
.seoListPage h1,
.seoVideoPage h1 {
  margin: 10px 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  font-weight: 700;
}
.seoLead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.seoLinkList {
  padding-inline-start: 20px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.seoLinkList li {
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  line-height: 1.5;
}
.seoLinkList a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.seoLinkList span {
  margin-inline-start: 8px;
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.seoChannelHeader {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.seoChannelHeader img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}
.seoTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.seoTabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}
.seoTabs a[aria-current="page"] {
  font-weight: 700;
  background: var(--btn-strong-bg);
  border-color: var(--btn-strong-bg);
  color: var(--btn-strong-text);
}
@media (max-width: 700px) {
  .seoLinkList {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .seoListPage,
  .seoVideoPage {
    padding: 14px 0 24px;
  }
}

/* ==========================================================================
   Application responsive rules
   ========================================================================== */
html,
body,
button,
input,
select,
textarea {
  font-family: Arial, sans-serif;
}
@media (min-width: 721px) {
  .sideNav {
    padding: clamp(5px, 0.7vh, 9px) 7px clamp(6px, 0.8vh, 10px);
    overflow: hidden;
  }

  .sideNavLinks.nav,
  .sideNavLinks {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: space-between;
    gap: 0;
    margin-top: clamp(4px, 0.6vh, 7px);
    overflow: hidden;
  }

  .sideNavToggle,
  .sideNav .navLink {
    min-height: clamp(34px, 5.35vh, 62px);
    padding: 2px 4px;
    border-radius: clamp(14px, 1.8vh, 20px);
    gap: 9px;
    transition:
      background 0.16s ease,
      border-color 0.16s ease,
      box-shadow 0.16s ease,
      color 0.16s ease;
  }

  .sideNav:not(.expanded) .sideNavToggle,
  .sideNav:not(.expanded) .navLink {
    justify-content: center;
    padding-inline: 0;
  }

  .navIconWrap {
    width: clamp(32px, 5vh, 56px);
    height: clamp(32px, 5vh, 56px);
    flex-basis: clamp(32px, 5vh, 56px);
    border-radius: clamp(12px, 1.8vh, 19px);
    box-shadow:
      0 6px 13px rgba(184, 132, 36, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.68),
      inset 0 -1px 0 rgba(70, 43, 5, 0.13);
  }

  .sideNavIcon {
    width: clamp(18px, 2.75vh, 29px);
    height: clamp(18px, 2.75vh, 29px);
    flex-basis: clamp(18px, 2.75vh, 29px);
    stroke-width: 2.05;
  }

  .sideNavToggle:hover,
  .sideNav .navLink:hover {
    background: rgba(255, 244, 189, 0.055);
    border-color: rgba(231, 196, 106, 0.16);
    box-shadow: none;
  }

  .sideNav:not(.expanded) .sideNavToggle:hover,
  .sideNav:not(.expanded) .navLink:hover,
  .sideNav:not(.expanded) .navLink.active {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .sideNav .navLink.active {
    color: var(--ink-gold);
    background: var(--glass-gold);
    border-color: rgba(205, 154, 42, 0.25);
    box-shadow: inset 3px 0 0 rgba(190, 137, 31, 0.62);
  }

  .sideNav .navLink.active .sideNavText {
    color: var(--ink-gold);
    opacity: 1;
  }

  .sideNav:not(.expanded) .navLink.active .navIconWrap {
    color: var(--ink-on-gold);
    background: linear-gradient(135deg, #fff8cf 0%, #e8c764 56%, #b67f22 100%);
    border-color: rgba(255, 255, 255, 0.55);
    transform: none;
    box-shadow:
      0 7px 16px rgba(184, 132, 36, 0.24),
      0 0 0 2px rgba(255, 248, 207, 0.62),
      0 0 0 4px rgba(184, 132, 36, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 -1px 0 rgba(70, 43, 5, 0.16);
  }

  .sideNav.expanded .navLink.active .navIconWrap {
    color: var(--ink-on-gold);
    background: linear-gradient(135deg, #fff8cf 0%, #e8c764 56%, #b67f22 100%);
    border-color: rgba(255, 255, 255, 0.48);
    box-shadow:
      0 7px 16px rgba(184, 132, 36, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      inset 0 -1px 0 rgba(70, 43, 5, 0.14);
  }

  .sideNav .navLink.active .sideNavIcon {
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.32));
  }

  html[dir="ltr"] .sideNav {
    box-shadow: 8px 0 28px rgba(23, 17, 8, 0.07);
  }

  html[dir="rtl"] .sideNav {
    box-shadow: -8px 0 28px rgba(23, 17, 8, 0.07);
  }

  html[dir="ltr"] .sideNav.expanded {
    box-shadow: 16px 0 48px rgba(23, 17, 8, 0.22);
  }

  html[dir="rtl"] .sideNav.expanded {
    box-shadow: -16px 0 48px rgba(23, 17, 8, 0.22);
  }

  html[dir="ltr"] .sideNav.expanded .navLink.active {
    box-shadow:
      inset 3px 0 0 rgba(190, 137, 31, 0.62),
      0 8px 18px rgba(184, 132, 36, 0.08);
  }

  html[dir="rtl"] .sideNav.expanded .navLink.active {
    box-shadow:
      inset -3px 0 0 rgba(190, 137, 31, 0.62),
      0 8px 18px rgba(184, 132, 36, 0.08);
  }
}

@media (min-width: 721px) and (max-height: 720px) {
  .sideNavToggle,
  .sideNav .navLink {
    min-height: clamp(30px, 4.9vh, 40px);
    border-radius: 15px;
  }
  .navIconWrap {
    width: clamp(28px, 4.45vh, 38px);
    height: clamp(28px, 4.45vh, 38px);
    flex-basis: clamp(28px, 4.45vh, 38px);
    border-radius: 13px;
  }
  .sideNavIcon {
    width: clamp(16px, 2.45vh, 21px);
    height: clamp(16px, 2.45vh, 21px);
    flex-basis: clamp(16px, 2.45vh, 21px);
  }
}

@media (min-width: 721px) and (max-height: 600px) {
  .sideNavToggle,
  .sideNav .navLink {
    min-height: clamp(26px, 4.7vh, 34px);
  }
  .navIconWrap {
    width: clamp(25px, 4.25vh, 32px);
    height: clamp(25px, 4.25vh, 32px);
    flex-basis: clamp(25px, 4.25vh, 32px);
  }
  .sideNavIcon {
    width: clamp(15px, 2.35vh, 18px);
    height: clamp(15px, 2.35vh, 18px);
    flex-basis: clamp(15px, 2.35vh, 18px);
  }
}

@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    padding-bottom: 76px;
  }

  .topbar {
    flex-wrap: nowrap;
    position: sticky;
    top: 0;
    z-index: 10000;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand search actions";
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    direction: inherit;
    background: var(--glass-3);
    border-bottom: 1px solid rgba(184, 132, 36, 0.16);
  }
  .topbar > * {
    min-width: 0;
  }
  .brand {
    margin-inline-start: auto;
    order: 0;
    grid-area: brand;
    justify-self: start;
    margin: 0;
    padding: 0;
    min-width: 0;
  }
  .brandLogo {
    height: 34px;
    max-width: 124px;
    width: auto;
    display: block;
  }
  .search {
    order: 0;
    grid-template-columns: 1fr 46px;
    flex: 1 1 100%;
    grid-area: search;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 38px;
    display: flex;
    margin: 0;
  }
  .search input {
    height: 38px;
    min-width: 0;
    padding: 0 12px;
    font-size: 13.5px;
    border-radius: 999px 0 0 999px;
  }
  .search button {
    flex: 0 0 42px;
    width: 42px;
    height: 38px;
    border-radius: 0 999px 999px 0;
  }
  .searchIcon {
    width: 19px;
    height: 19px;
  }
  .topbarActions {
    grid-area: actions;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    overflow: visible;
  }
  .topbarShortcutLinks {
    display: none;
  }
  .languageMenu {
    position: static;
  }
  .languageMenuPanel {
    position: fixed;
    top: 54px;
    left: 10px;
    right: auto;
    width: min(230px, calc(100vw - 20px));
    min-width: 0;
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 74px);
    overflow: auto;
    z-index: 10050;
    transform: none;
    direction: inherit;
    border-radius: 18px;
  }
  .languageMenuItem {
    min-height: 42px;
    padding: 7px 9px;
    gap: 9px;
  }
  .languageMenuItemIcon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .languageMenuBtn,
  .topAuthLink {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
  }
  .topAuthText,
  .tinyChevron {
    display: none;
  }
  .topAuthLink svg {
    width: 20px;
    height: 20px;
  }
  .languageMenuIcon {
    min-width: auto;
    font-size: 13px;
    line-height: 1;
  }

  .shell {
    margin: 0;
    margin-inline-start: var(--sidebar-collapsed);
    padding: 14px 12px 22px;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 12px;
    padding-bottom: 18px;
  }
  .page {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
  }

  .sideNav {
    padding-inline: 7px;
    position: fixed;
    inset: auto 0 0 0;
    direction: inherit;
    z-index: 9999;
    width: 100%;
    height: 66px;
    min-height: 66px;
    max-height: 66px;
    display: block;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      180deg,
      rgba(255, 253, 246, 0.98),
      rgba(255, 244, 213, 0.98)
    );
    border-top: 1px solid rgba(184, 132, 36, 0.25);
    border-inline-end: 0;
    box-shadow: 0 -12px 34px rgba(70, 46, 8, 0.16);
    overflow: hidden;
    backdrop-filter: saturate(180%) blur(14px);
  }
  html[data-theme="dark"] .sideNav {
    background: linear-gradient(180deg, rgba(28, 24, 18, 0.98), rgba(20, 17, 12, 0.98));
    border-top: 1px solid rgba(184, 132, 36, 0.2);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.45);
  }
  .sideNavToggle,
  .sideNavDivider {
    display: none;
  }
  .sideNavLinks.nav,
  .sideNavLinks {
    margin-top: 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 50px;
    max-height: 50px;
    margin: 0;
    padding: 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sideNavLinks::-webkit-scrollbar {
    display: none;
  }
  /* The bottom bar fits ~7 items on a 390px screen; secondary destinations stay
     reachable via /me and the search page tabs, so hide them instead of clipping.
     (.sideNavLinks is included to outrank the display:flex .navLink rules below.) */
  .sideNav .sideNavLinks .navLink[data-nav-key="hashtag"],
  .sideNav .sideNavLinks .navLink[data-nav-key="tags"],
  .sideNav .sideNavLinks .navLink[data-nav-key="personal_playlists"],
  .sideNav .sideNavLinks .navLink[data-nav-key="history"],
  .sideNav .sideNavLinks .navLink[data-nav-key="watch_later"],
  .sideNav .sideNavLinks .navLink[data-nav-key="favorite"] {
    display: none;
  }
  .sideNav .navLink,
  .sideNav.expanded .navLink,
  .sideNav:not(.expanded) .navLink {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    gap: 0;
    border-radius: 16px;
    background: transparent;
    border: 0;
    box-shadow: none;
    flex: 0 0 46px;
  }
  .sideNav .navLink.active {
    background: rgba(255, 239, 185, 0.55);
    box-shadow: inset 0 0 0 1px rgba(184, 132, 36, 0.25);
  }
  .sideNavText {
    display: none;
  }
  .navIconWrap,
  .sideNav .navLink.active .navIconWrap {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 15px;
  }
  .sideNavIcon,
  .sideNav .navLink.active .sideNavIcon {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    stroke-width: 2.1;
  }

  .contentToolbar {
    padding: 10px 7px 12px;
    border-radius: 18px;
    font-family: Arial, sans-serif;
  }
  .contentToolbar * {
    font-family: Arial, sans-serif;
  }
  .contentToolbarTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  /* Search has 5 tabs — override to horizontal scroll so they never wrap */
  .searchTabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }
  .searchTabs::-webkit-scrollbar {
    display: none;
  }
  .searchTabs .contentToolbarTab {
    flex: 0 0 auto;
    min-width: max-content;
  }
  .contentToolbarTab {
    min-height: 48px;
    padding: 0 8px;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
  }
  .contentToolbarControls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    width: 100%;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    overflow: visible;
  }
  .contentToolbarGroup,
  .contentToolbarSort,
  .contentToolbarLang {
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;
    margin: 0;
  }
  .contentToolbarSort {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .contentToolbarLabel {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-gold);
    opacity: 0.75;
    white-space: nowrap;
  }
  .contentToolbarMiniBtns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .contentToolbarMiniBtn {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13.2px;
    font-weight: 700;
    white-space: nowrap;
  }
  .contentToolbarLang {
    display: block;
    position: relative;
    visibility: visible;
    opacity: 1;
    z-index: 5;
  }
  .contentToolbarLang summary {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 999px;
    white-space: nowrap;
    visibility: visible;
    opacity: 1;
    list-style: none;
    cursor: pointer;
  }
  .contentToolbarLang summary::-webkit-details-marker {
    display: none;
  }
  .contentToolbarLang summary::marker {
    content: "";
  }
  .contentToolbarLang summary strong {
    display: inline-block;
    font-size: 13.2px;
    font-weight: 700;
    color: var(--ink-gold);
    opacity: 1;
    visibility: visible;
  }
  .contentToolbarArrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 11px;
    height: 13px;
    color: #b8861e;
    font-size: 0;
    line-height: 1;
    flex: 0 0 11px;
  }
  .contentToolbarArrow::before {
    content: "▾";
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
  }
  .contentToolbarLang[open] .contentToolbarArrow::before {
    content: "▴";
  }
  .contentToolbarLangMenu {
    position: absolute;
    right: 0;
    left: auto;
    min-width: 170px;
    max-width: calc(100vw - 24px);
    z-index: 60;
  }
}

@media (max-width: 380px) {
  .brandLogo {
    height: 32px;
    max-width: 108px;
  }
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    padding-inline: 7px;
  }
  .languageMenuBtn,
  .topAuthLink {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;
    flex-basis: 35px;
  }
  .search button {
    flex-basis: 38px;
    width: 38px;
  }
  .contentToolbar {
    padding-inline: 6px;
  }
  .contentToolbarTabs {
    gap: 6px;
  }
  .contentToolbarTab {
    font-size: 13px;
    min-height: 44px;
    padding-inline: 6px;
  }
  .contentToolbarControls {
    gap: 5px;
  }
  .contentToolbarMiniBtn {
    padding-inline: 8px;
    font-size: 12.8px;
  }
  .contentToolbarLang summary {
    padding-inline: 7px;
    gap: 4px;
  }
  .contentToolbarLabel {
    font-size: 11px;
  }
  .contentToolbarLang summary strong {
    font-size: 12.8px;
  }
  .sideNav .navLink,
  .sideNav.expanded .navLink,
  .sideNav:not(.expanded) .navLink {
    width: 43px;
    min-width: 43px;
    max-width: 43px;
    flex-basis: 43px;
  }
  .navIconWrap,
  .sideNav .navLink.active .navIconWrap {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
  }
  .sideNavIcon,
  .sideNav .navLink.active .sideNavIcon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }
}

/* Watch page responsive adjustments */
@media (max-width: 700px) {
  .watchSubscribePanel {
    padding: 10px;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .watchSubscribePanel {
    padding-inline: 8px;
    gap: 4px;
  }
}

/* ==========================================================================
   K9P1 administration page
   ========================================================================== */
body.k9p1-page {
  font-family: Arial, sans-serif;
  max-width: 900px;
  margin: 24px auto;
  padding: 0 12px;
}
body.k9p1-page input,
body.k9p1-page button,
body.k9p1-page textarea {
  padding: 10px;
  font-size: 16px;
}
body.k9p1-page textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 12px;
  min-height: 180px;
  resize: vertical;
}
body.k9p1-page pre {
  background: #111;
  color: #eee;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
}

body.k9p1-page .nf-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin: 10px 0 14px;
}
body.k9p1-page .nf-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
}
body.k9p1-page .nf-toolbar select,
body.k9p1-page .nf-toolbar input {
  min-width: 130px;
}
body.k9p1-page .nf-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 12px 0;
}
body.k9p1-page .nf-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--soft-2);
}
body.k9p1-page .nf-stat b {
  display: block;
  font-size: 22px;
}
body.k9p1-page .nf-table {
  width: 100%;
  border-collapse: collapse;
}
body.k9p1-page .nf-table th,
body.k9p1-page .nf-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: top;
}
body.k9p1-page .nf-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soft);
}
body.k9p1-page .nf-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
body.k9p1-page .nf-actions button {
  font-size: 13px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
body.k9p1-page .nf-open {
  background: #15803d;
  color: #fff;
}
body.k9p1-page .nf-block {
  background: var(--err-bg);
  color: #fff;
}
body.k9p1-page .nf-pending {
  background: #64748b;
  color: #fff;
}
body.k9p1-page .nf-error {
  background: #c2410c;
  color: #fff;
}
@media (max-width: 800px) {
  body.k9p1-page .nf-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  body.k9p1-page .nf-table {
    font-size: 13px;
  }
}

/* ==========================================================================
   NetFree probe page
   ========================================================================== */

body.netfree-probe-page,
body.netfree-probe-page *,
body.netfree-probe-page *::before,
body.netfree-probe-page *::after {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body.netfree-probe-page {
  --bg: #f7f3ea;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --border: rgba(120, 97, 51, 0.22);
  --gold: #b7892f;
  --gold-dark: #7b5419;
  --ok: #0f7a45;
  --warn: #9a6500;
  --bad: #a82626;
  --shadow: 0 18px 45px rgba(68, 52, 24, 0.12);
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top right,
      rgba(183, 137, 47, 0.18),
      transparent 34rem
    ),
    linear-gradient(135deg, #fffaf0 0%, var(--bg) 48%, #f4efe5 100%);
}

body.netfree-probe-page button,
body.netfree-probe-page input,
body.netfree-probe-page textarea,
body.netfree-probe-page select {
  font-family: Arial, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

body.netfree-probe-page code {
  direction: ltr;
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 0.45rem;
  background: var(--cream-2);
  color: #593d13;
}

body.netfree-probe-page .page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

body.netfree-probe-page .hero,
body.netfree-probe-page .panel,
body.netfree-probe-page .notice {
  border: 1px solid var(--border);
  background: var(--glass-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border-radius: 26px;
}

body.netfree-probe-page .hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 30px;
}

body.netfree-probe-page .eyebrow {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
}

body.netfree-probe-page h1,
body.netfree-probe-page h2,
body.netfree-probe-page p {
  margin-top: 0;
}

body.netfree-probe-page h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

body.netfree-probe-page .hero-text {
  margin-bottom: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

body.netfree-probe-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

body.netfree-probe-page button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(123, 84, 25, 0.2);
}

body.netfree-probe-page button:hover {
  filter: brightness(1.04);
}
body.netfree-probe-page button:disabled {
  cursor: wait;
  opacity: 0.65;
}
body.netfree-probe-page button.secondary {
  color: var(--gold-dark);
  background: var(--cream-2);
  border: 1px solid rgba(183, 137, 47, 0.35);
  box-shadow: none;
}

body.netfree-probe-page .notice {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 16px 20px;
  line-height: 1.65;
}
body.netfree-probe-page .notice strong {
  color: var(--gold-dark);
  white-space: nowrap;
}

body.netfree-probe-page .status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 14px;
  margin: 0 0 18px;
}

body.netfree-probe-page .profile-box,
body.netfree-probe-page .summary-box {
  border: 1px solid var(--border);
  background: var(--glass-2);
  box-shadow: 0 12px 28px rgba(68, 52, 24, 0.08);
  border-radius: 20px;
  padding: 14px 16px;
  line-height: 1.65;
}

body.netfree-probe-page .profile-box {
  display: grid;
  gap: 4px;
}

body.netfree-probe-page .profile-box strong {
  color: var(--gold-dark);
}

body.netfree-probe-page .summary-box {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

body.netfree-probe-page .summary-box span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--cream-2);
  color: #5f4217;
  font-weight: 700;
}

body.netfree-probe-page .summary-box strong {
  color: var(--gold-dark);
}

body.netfree-probe-page .video-card.added-by-probe {
  animation: youtoraProbeAdd 480ms ease-out;
}

@keyframes youtoraProbeAdd {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

body.netfree-probe-page .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 18px;
}

body.netfree-probe-page .panel {
  padding: 22px;
}
body.netfree-probe-page .panel-head {
  margin-bottom: 16px;
}
body.netfree-probe-page .panel h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}
body.netfree-probe-page .panel p {
  color: var(--muted);
  line-height: 1.65;
}

body.netfree-probe-page .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

body.netfree-probe-page .video-card {
  overflow: hidden;
  border: 1px solid rgba(120, 97, 51, 0.2);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(68, 52, 24, 0.08);
}

body.netfree-probe-page .thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--cream-3);
  background-size: cover;
  background-position: center;
  text-decoration: none;
}

body.netfree-probe-page .video-card-body {
  padding: 13px;
}
body.netfree-probe-page .video-title {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.45;
}

body.netfree-probe-page .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.86rem;
  font-weight: 700;
  background: var(--cream-2);
  color: var(--gold-dark);
}

body.netfree-probe-page .badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
body.netfree-probe-page .badge.warn {
  background: var(--cream-2);
  color: var(--warn);
}
body.netfree-probe-page .badge.bad {
  background: var(--err-soft);
  color: var(--bad);
}

body.netfree-probe-page .table-wrap {
  overflow-x: auto;
}
body.netfree-probe-page table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

body.netfree-probe-page th,
body.netfree-probe-page td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(120, 97, 51, 0.16);
  text-align: right;
  vertical-align: top;
}

body.netfree-probe-page th {
  color: var(--gold-dark);
  font-size: 0.9rem;
  white-space: nowrap;
}

body.netfree-probe-page td {
  color: var(--text-2);
}
body.netfree-probe-page .small-link {
  color: var(--text-2);
  font-weight: 700;
  text-decoration: none;
}
body.netfree-probe-page .small-link:hover {
  text-decoration: underline;
}

body.netfree-probe-page .status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--muted);
}
body.netfree-probe-page .status-dot.ok {
  background: var(--ok);
}
body.netfree-probe-page .status-dot.warn {
  background: var(--warn);
}
body.netfree-probe-page .status-dot.bad {
  background: var(--bad);
}
body.netfree-probe-page .status-dot.work {
  background: var(--gold);
}

body.netfree-probe-page .details-panel,
body.netfree-probe-page .probe-panel {
  margin-top: 18px;
}

body.netfree-probe-page .probe-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 118px;
  padding: 12px;
  border-radius: 18px;
  background: var(--cream-2);
  border: 1px dashed rgba(123, 84, 25, 0.28);
}

body.netfree-probe-page .probe-box {
  width: 190px;
  height: 112px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--cream-3);
  outline: 1px solid rgba(120, 97, 51, 0.25);
}

body.netfree-probe-page .muted {
  color: var(--muted);
}
body.netfree-probe-page .hidden {
  display: none;
}

@media (max-width: 920px) {
  body.netfree-probe-page .hero {
    align-items: stretch;
    flex-direction: column;
  }
  body.netfree-probe-page .grid {
    grid-template-columns: 1fr;
  }
  body.netfree-probe-page .status-strip {
    grid-template-columns: 1fr;
  }
  body.netfree-probe-page .notice {
    flex-direction: column;
  }
  body.netfree-probe-page .notice strong {
    white-space: normal;
  }
}

/* ==========================================================================
   NetFree all-options lab
   ========================================================================== */
body.netfree-all-options-page {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--soft-2);
  color: var(--text);
}
body.netfree-all-options-page main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}
body.netfree-all-options-page .card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 18px;
  margin-bottom: 18px;
}
body.netfree-all-options-page h1,
body.netfree-all-options-page h2 {
  margin: 0 0 12px;
}
body.netfree-all-options-page p {
  line-height: 1.7;
  margin: 8px 0;
}
body.netfree-all-options-page button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: #172554;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  margin-inline-end: 8px;
}
body.netfree-all-options-page button.secondary {
  background: #475569;
}
body.netfree-all-options-page code {
  direction: ltr;
  unicode-bidi: plaintext;
  background: var(--info-soft);
  padding: 2px 6px;
  border-radius: 6px;
}
body.netfree-all-options-page table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  overflow: hidden;
  border-radius: 14px;
}
body.netfree-all-options-page th,
body.netfree-all-options-page td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  vertical-align: top;
  text-align: right;
  font-size: 14px;
}
body.netfree-all-options-page th {
  background: var(--soft-2);
  font-weight: 700;
}
body.netfree-all-options-page .ltr {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
  font-family: Arial, sans-serif;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body.netfree-all-options-page .ok {
  color: var(--ok-text);
  font-weight: 700;
}
body.netfree-all-options-page .bad {
  color: var(--err-text);
  font-weight: 700;
}
body.netfree-all-options-page .muted {
  color: var(--muted);
}
body.netfree-all-options-page .method-result {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soft);
  color: var(--text-2);
}
body.netfree-all-options-page .method-result.distinguish {
  background: var(--ok-soft);
  color: var(--ok-text);
}
body.netfree-all-options-page .method-result.fail {
  background: var(--err-soft);
  color: var(--err-text);
}
body.netfree-all-options-page #sink {
  position: fixed;
  left: -20000px;
  top: 0;
  width: 360px;
  height: 240px;
  opacity: 0.01;
  pointer-events: none;
  overflow: hidden;
}
body.netfree-all-options-page .probe-frame {
  width: 320px;
  height: 180px;
  border: 0;
  display: block;
}

/* ==========================================================================
   NetFree timing-study lab
   ========================================================================== */
body.netfree-timing-study-page {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--soft-2);
  color: #162033;
}

body.netfree-timing-study-page main {
  max-width: 1250px;
  margin: 0 auto;
  padding: 24px;
}

body.netfree-timing-study-page .card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  padding: 18px;
  margin-bottom: 18px;
}

body.netfree-timing-study-page h1,
body.netfree-timing-study-page h2 {
  margin: 0 0 12px;
}

body.netfree-timing-study-page p {
  line-height: 1.7;
  margin: 8px 0;
}

body.netfree-timing-study-page button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: #172554;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  margin-inline-end: 8px;
  margin-bottom: 8px;
}

body.netfree-timing-study-page button.secondary {
  background: #475569;
}

body.netfree-timing-study-page button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.netfree-timing-study-page code {
  direction: ltr;
  unicode-bidi: plaintext;
  background: var(--info-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

body.netfree-timing-study-page .grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body.netfree-timing-study-page .stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--soft-2);
}

body.netfree-timing-study-page .stat b {
  display: block;
  font-size: 22px;
  margin-top: 6px;
}

body.netfree-timing-study-page table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
}

body.netfree-timing-study-page th,
body.netfree-timing-study-page td {
  border-bottom: 1px solid var(--border);
  padding: 9px;
  vertical-align: top;
  text-align: right;
  font-size: 14px;
}

body.netfree-timing-study-page th {
  background: var(--soft-2);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}

body.netfree-timing-study-page .ltr {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
  font-family: Arial, sans-serif;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.netfree-timing-study-page .ok {
  color: var(--ok-text);
  font-weight: 700;
}

body.netfree-timing-study-page .bad {
  color: var(--err-text);
  font-weight: 700;
}

body.netfree-timing-study-page .warn {
  color: #92400e;
  font-weight: 700;
}

body.netfree-timing-study-page .muted {
  color: var(--muted);
}

body.netfree-timing-study-page .progress-wrap {
  border: 1px solid #cbd5e1;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  height: 16px;
  margin: 12px 0;
}

body.netfree-timing-study-page .progress {
  display: block;
  width: 100%;
  height: 100%;
  appearance: none;
  border: 0;
  background: transparent;
}

body.netfree-timing-study-page .progress::-webkit-progress-bar {
  background: transparent;
}

body.netfree-timing-study-page .progress::-webkit-progress-value {
  background: #172554;
  transition: width 0.25s ease;
}

body.netfree-timing-study-page .progress::-moz-progress-bar {
  background: #172554;
  transition: width 0.25s ease;
}

body.netfree-timing-study-page #sink {
  position: fixed;
  left: -20000px;
  top: 0;
  width: 360px;
  height: 240px;
  opacity: 0.01;
  pointer-events: none;
  overflow: hidden;
}

body.netfree-timing-study-page .probe-frame {
  width: 320px;
  height: 180px;
  border: 0;
  display: block;
}

@media (max-width: 900px) {
  body.netfree-timing-study-page .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Standalone 404 page
   ========================================================================== */
body.not-found-page {
  padding: 24px;
  font-family: Arial, sans-serif;
}

/* ==========================================================================
   Shared utility classes for markup generated by the application
   ========================================================================== */
.scrollSentinel {
  height: 1px;
}

.sectionActionRow {
  margin-top: 14px;
}

.sectionHint {
  margin-top: 8px;
}

.tabsSpaced,
.blockAction,
.watchTitleSpaced {
  margin-top: 10px;
}

.watchTitleSpaced,
.recoTitle {
  unicode-bidi: plaintext;
}

/* ==========================================================================
   K9P1 administration page components
   ========================================================================== */
body.k9p1-page .k9-filter-policy-card,
body.k9p1-page .k9-empty-state {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft-2);
}

body.k9p1-page .k9-filter-policy-card {
  margin: 12px 0;
  padding: 12px;
}

body.k9p1-page .k9-empty-state {
  padding: 14px;
}

body.k9p1-page .k9-card-title {
  margin-bottom: 8px;
  font-weight: 700;
}

body.k9p1-page .k9-filter-policy-select {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  font-size: 16px;
}

body.k9p1-page .k9-help-text,
body.k9p1-page .k9-section-description {
  color: var(--muted);
  line-height: 1.6;
}

body.k9p1-page .k9-help-text {
  margin-top: 8px;
  font-size: 13px;
}

body.k9p1-page .k9-section-description {
  margin-top: 0;
}

body.k9p1-page .k9-section-divider {
  margin: 24px 0;
}

body.k9p1-page .k9-channels-list {
  margin-top: 12px;
}

body.k9p1-page .k9-channels-table {
  width: 100%;
  border-collapse: collapse;
}

body.k9p1-page .k9-channel-heading {
  padding: 6px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

body.k9p1-page .k9-channel-row {
  border-bottom: 1px solid var(--yt-border-soft);
}

body.k9p1-page .k9-channel-cell {
  padding: 8px;
}

body.k9p1-page .k9-actions-cell {
  text-align: left;
}

body.k9p1-page .k9-channel-summary,
body.k9p1-page .k9-video-summary {
  display: flex;
  gap: 10px;
}

body.k9p1-page .k9-channel-summary {
  align-items: center;
}

body.k9p1-page .k9-video-summary {
  align-items: flex-start;
}

body.k9p1-page .k9-channel-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

body.k9p1-page .k9-video-thumbnail {
  width: 112px;
  max-width: 30vw;
  border-radius: 10px;
  background: var(--soft);
  object-fit: cover;
}

body.k9p1-page .k9-medium-text {
  font-weight: 700;
}

body.k9p1-page .k9-channel-id {
  color: var(--muted);
  font-size: 13px;
}

body.k9p1-page .k9-muted-small,
body.k9p1-page .k9-error-text {
  font-size: 12px;
}

body.k9p1-page .k9-muted-small {
  color: #666;
}

body.k9p1-page .k9-error-text {
  color: #b00;
}

body.k9p1-page .k9-channel-policy-select {
  max-width: 260px;
  margin-top: 6px;
}

body.k9p1-page .k9-danger-button {
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: #b00;
  color: #fff;
  cursor: pointer;
}

body.k9p1-page .k9-video-title {
  font-weight: 700;
  line-height: 1.4;
}

body.k9p1-page .k9-meta-line {
  margin-top: 4px;
}

body.k9p1-page .k9-video-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  font-size: 13px;
}

body.k9p1-page .k9-status-note {
  margin-top: 6px;
}

body.netfree-probe-page .thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.netfree-probe-page .probe-box-fast {
  position: absolute;
  top: 0;
  left: -10000px;
  width: 2px;
  height: 2px;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
}

body.netfree-probe-page .probe-fast-frame {
  width: 2px;
  height: 2px;
  border: 0;
}

/* ==========================================================================
   Refresh video metadata administration page
   ========================================================================== */
body.refresh-video-meta-page {
  margin: 0;
  background: var(--soft-2);
  color: var(--text);
  font-family: Arial, sans-serif;
  color-scheme: light;
}

body.refresh-video-meta-page,
body.refresh-video-meta-page *,
body.refresh-video-meta-page *::before,
body.refresh-video-meta-page *::after {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body.refresh-video-meta-page .wrap {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 14px 48px;
}

body.refresh-video-meta-page h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

body.refresh-video-meta-page .sub {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

body.refresh-video-meta-page .grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

body.refresh-video-meta-page .card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body.refresh-video-meta-page .span4 {
  grid-column: span 4;
}
body.refresh-video-meta-page .span8 {
  grid-column: span 8;
}
body.refresh-video-meta-page .span12 {
  grid-column: span 12;
}

body.refresh-video-meta-page label {
  display: block;
  margin: 0 0 7px;
  font-weight: 700;
}

body.refresh-video-meta-page input,
body.refresh-video-meta-page select,
body.refresh-video-meta-page button {
  font-family: Arial, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

body.refresh-video-meta-page input,
body.refresh-video-meta-page select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

body.refresh-video-meta-page .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 10px 0;
}

body.refresh-video-meta-page .row-two-columns {
  grid-template-columns: 1fr 1fr;
}

body.refresh-video-meta-page .check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--text-2);
}

body.refresh-video-meta-page .check input {
  width: auto;
}

body.refresh-video-meta-page button {
  padding: 11px 16px;
  border: 0;
  border-radius: 13px;
  background: #111827;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

body.refresh-video-meta-page button.secondary {
  background: var(--soft);
  color: var(--text);
}
body.refresh-video-meta-page button.danger {
  background: var(--err-bg);
  color: #fff;
}
body.refresh-video-meta-page button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.refresh-video-meta-page .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

body.refresh-video-meta-page .statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

body.refresh-video-meta-page .stat {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft-2);
}

body.refresh-video-meta-page .stat .num {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 700;
}
body.refresh-video-meta-page .stat .name {
  color: var(--muted);
  font-size: 13px;
}

body.refresh-video-meta-page pre {
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

body.refresh-video-meta-page table {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
  border-radius: 14px;
  background: var(--panel);
}

body.refresh-video-meta-page th,
body.refresh-video-meta-page td {
  padding: 9px;
  border-bottom: 1px solid var(--yt-border-soft);
  font-size: 14px;
  text-align: right;
  vertical-align: top;
}

body.refresh-video-meta-page th {
  background: var(--soft-2);
  color: var(--text-2);
  font-weight: 700;
}
body.refresh-video-meta-page .ok {
  color: #15803d;
  font-weight: 700;
}
body.refresh-video-meta-page .bad {
  color: var(--err-text);
  font-weight: 700;
}
body.refresh-video-meta-page .muted {
  color: var(--muted);
}

body.refresh-video-meta-page .pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--info-soft);
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

body.refresh-video-meta-page .progress {
  height: 12px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--soft);
}

body.refresh-video-meta-page .bar {
  display: block;
  width: 100%;
  height: 100%;
  appearance: none;
  border: 0;
  background: transparent;
}

body.refresh-video-meta-page .bar::-webkit-progress-bar {
  background: transparent;
}

body.refresh-video-meta-page .bar::-webkit-progress-value {
  background: #111827;
  transition: width 0.25s ease;
}

body.refresh-video-meta-page .bar::-moz-progress-bar {
  background: #111827;
  transition: width 0.25s ease;
}

body.refresh-video-meta-page a {
  color: var(--link-strong);
  text-decoration: none;
}
body.refresh-video-meta-page .refresh-section-title {
  margin-top: 0;
}
body.refresh-video-meta-page .refresh-status-note {
  margin-bottom: 0;
}

@media (max-width: 800px) {
  body.refresh-video-meta-page .span4,
  body.refresh-video-meta-page .span8 {
    grid-column: span 12;
  }
  body.refresh-video-meta-page .row {
    grid-template-columns: 1fr;
  }
  body.refresh-video-meta-page .statgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Keep the HTML hidden state authoritative even when component rules set display. */
[hidden][hidden][hidden] {
  display: none;
}

/* SVG presentation is centralized here instead of embedded in HTML or JavaScript. */
.svgFillCurrent,
.svgFillCurrentNoStroke {
  fill: currentColor;
}

.svgFillCurrentNoStroke {
  stroke: none;
}

.tinyChevronPath {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.languageFlagSvg .flagWhite {
  fill: #fff;
}
.languageFlagHe .flagBlue {
  fill: #1d5fd3;
}
.languageFlagHe .flagStar {
  fill: none;
  stroke: #1d5fd3;
  stroke-width: 3.2;
  stroke-linejoin: round;
}
.languageFlagEn .flagNavy {
  fill: #123a7a;
}
.languageFlagEn .flagRed {
  fill: #c91f37;
}
.languageFlagFr .flagBlue {
  fill: #1f4fa3;
}
.languageFlagFr .flagRed {
  fill: #d7263d;
}
.languageFlagRu .flagBlue {
  fill: #244cc8;
}
.languageFlagRu .flagRed {
  fill: #d5222f;
}
.languageFlagYi .flagGradientStart {
  stop-color: #fff2bf;
}
.languageFlagYi .flagGradientMiddle {
  stop-color: #d6a93c;
}
.languageFlagYi .flagGradientEnd {
  stop-color: #5a3a08;
}
.languageFlagYi .flagGradient {
  fill: url(#yiLangGrad);
}
.languageFlagYi .flagCircle {
  fill: rgba(18, 12, 3, 0.82);
}
.languageFlagYi .flagText {
  fill: #ffe8a0;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-anchor: middle;
}

/* ===== CHANNEL DIRECTORY FILTER BANNER ===== */
.channelsDirectoryHero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: clamp(120px, 15vw, 190px);
  margin: -22px -26px 18px;
  padding: clamp(30px, 5vw, 64px) 26px 22px;
  overflow: hidden;
  border-block: 1px solid rgba(184, 132, 36, 0.18);
  background:
    radial-gradient(circle at 8% 12%, rgba(233, 195, 96, 0.16), transparent 30%),
    linear-gradient(180deg, var(--panel) 0%, var(--cream) 100%);
}
.channelsDirectoryHero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 246, 218, 0.24) 100%);
}
.channelsDirectoryHeading,
.channelsClearFilter {
  position: relative;
  z-index: 1;
}
.channelsDirectoryHeading {
  min-width: 0;
}
.channelsDirectoryHeading .h1 {
  margin: 0;
}
.channelsDirectoryHeading .sub {
  margin: 7px 0 0;
}
.channelsClearFilter {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #c9952d;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff1b8, #c7962d 58%, #9c6f18);
  color: var(--ink-on-gold);
  box-shadow: 0 8px 18px rgba(198, 148, 42, 0.18);
  font-size: 13px;
  font-weight: 700;
}
.channelsFilterBanner.contentToolbar {
  display: block;
  margin-bottom: 20px;
  overflow: visible;
}
.channelsToolbarControls {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(230px, 1fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
}
.channelsFilterBanner .channelsSortGroup,
.channelsFilterBanner .channelsLanguageDropdown {
  min-height: 58px;
  border-color: var(--cream-border);
  background: var(--panel);
  color: var(--text);
}
.channelsFilterBanner .channelsSortGroup {
  padding: 7px;
}
.channelsFilterBanner .channelsSortButtons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.channelsFilterBanner .contentToolbarMiniBtn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.channelsFilterBanner .contentToolbarMiniBtn:hover {
  border-color: #d8b65d;
  background: var(--cream-2);
}
.channelsFilterBanner .contentToolbarMiniBtn.active {
  border-color: #d3a33d;
  background: linear-gradient(135deg, #fff2bd, #d6a33a 58%, #b27b1f);
  color: var(--ink-on-gold);
  box-shadow:
    0 8px 18px rgba(198, 148, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.channelsFilterBanner .channelsLanguageDropdown {
  position: relative;
  display: block;
  padding: 0;
  z-index: 20;
}
.channelsFilterBanner .channelsLanguageDropdown summary {
  min-height: 58px;
  padding: 8px 14px;
}
.channelsFilterBanner .contentToolbarLangMenu {
  right: 0;
  left: auto;
  width: 100%;
  min-width: 210px;
  max-width: min(310px, calc(100vw - 28px));
}
.channelsFilterBanner .contentToolbarLangItem.active {
  background: linear-gradient(135deg, #fff2bd, #d6a33a 58%, #b27b1f);
  color: var(--ink-on-gold);
}
.channelsDirectoryDivider {
  margin-top: 0;
}

@media (max-width: 1050px) {
  .channelsToolbarControls {
    grid-template-columns: 1fr;
  }
  .channelsFilterBanner .contentToolbarLangMenu {
    width: min(290px, calc(100vw - 28px));
  }
}

@media (max-width: 720px) {
  .channelsDirectoryHero {
    min-height: 132px;
    margin: -14px -14px 14px;
    padding: 34px 14px 18px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
  }
  .channelsFilterBanner.contentToolbar {
    padding: 9px;
    border-radius: 19px;
  }
  .channelsFilterBanner .channelsSortGroup {
    display: block;
    padding: 8px;
  }
  .channelsFilterBanner .channelsSortGroup > .contentToolbarLabel {
    display: block;
    padding: 0 4px 7px;
  }
  .channelsFilterBanner .channelsSortButtons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .channelsFilterBanner .contentToolbarMiniBtn {
    min-height: 44px;
    padding: 7px;
  }
  .channelsFilterBanner .channelsLanguageDropdown,
  .channelsFilterBanner .channelsLanguageDropdown summary {
    min-height: 50px;
  }
  .channelsFilterBanner .contentToolbarLangMenu {
    right: 0;
    left: auto;
  }
}

@media (max-width: 390px) {
  .channelsFilterBanner .channelsSortButtons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .channelsFilterBanner .contentToolbarMiniBtn {
    min-height: 40px;
    font-size: 12.4px;
  }
}

/* ===== TAG / HASHTAG FILTER BAR - same layout as channels ===== */
 .tagFilterBanner.contentToolbar {
  margin: 0 0 16px;
}
.tagFilterBanner .tagToolbarControls {
  grid-template-columns: minmax(230px, 0.9fr) minmax(0, 2.2fr) minmax(210px, 0.85fr);
}
.tagFilterBanner .tagToolbarSwitch {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  align-self: stretch;
  justify-content: stretch;
  padding: 7px;
  border-color: var(--cream-border);
  background: var(--panel);
  box-shadow: none;
}
.tagFilterBanner .tagToolbarSwitch .tagIndexSwitchBtn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
}
.tagFilterBanner .tagSortButtons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tagFilterBanner .tagLanguageDropdown summary {
  justify-content: space-between;
}

@media (max-width: 1050px) {
  .tagFilterBanner .tagToolbarControls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .tagFilterBanner .tagToolbarSwitch {
    min-height: 52px;
  }
  .tagFilterBanner .tagToolbarSwitch .tagIndexSwitchBtn {
    min-height: 38px;
    padding: 0 8px;
  }
  .tagFilterBanner .tagSortButtons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

/* ===== CHANNEL PAGE: read-more banner + wider responsive controls ===== */
.channelHero.descriptionOpen .channelHeroBanner {
  height: clamp(190px, 20vw, 320px);
}
.channelHero.descriptionOpen .channelHeroCard {
  align-items: flex-start;
}
.channelHeroDescriptionWrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  max-width: 88ch;
}
.channelHeroDescriptionWrap .channelHeroDescription {
  margin: 0;
  min-width: min(100%, 280px);
  flex: 1 1 420px;
  max-width: none;
}
.channelReadMoreBtn {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(213, 170, 59, 0.34);
  border-radius: 999px;
  background: var(--cream-grad);
  color: var(--ink-gold);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(65, 47, 12, 0.06);
}
.channelReadMoreBtn:hover,
.channelReadMoreBtn.active {
  background: var(--btn-strong-bg);
  border-color: var(--btn-strong-bg);
  color: var(--btn-strong-text);
}
.channelHeroExpandedDescription {
  margin-top: 12px;
  max-width: min(100%, 98ch);
  padding: 14px 16px;
  border: 1px solid rgba(213, 170, 59, 0.24);
  border-radius: 18px;
  background: var(--cream);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.channelHeroExpandedDescription[hidden] {
  display: none;
}
.channelHero.descriptionOpen .channelHeroDescription {
  display: none;
}
.channelHero.descriptionOpen .channelHeroDescriptionWrap {
  margin-top: 8px;
}

.channelHeroActions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  align-items: stretch;
  width: min(100%, 560px);
  gap: 9px;
}
.channelHeroActions .btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  padding-inline: 16px;
}

.channelControlBar {
  align-items: stretch;
  gap: 10px;
}
.channelContentTabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  flex: 1 1 580px;
  gap: 8px;
  width: 100%;
}
.channelContentTab {
  width: 100%;
  min-height: 52px;
  padding: 11px 16px;
  border-radius: 18px;
  font-size: 15px;
}
.channelContentTabIcon {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.channelSortCompact {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(82px, 1fr));
  align-items: stretch;
  gap: 6px;
  min-height: 52px;
  flex: 0 1 430px;
  overflow: visible;
}
.channelSortLabel,
.channelSortPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.channelSortPill {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 14px;
}

@media (max-width: 980px) {
  .channelHeroActions {
    width: 100%;
  }
  .channelContentTabs {
    flex-basis: auto;
  }
  .channelSortCompact {
    width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 640px) {
  .channelHero.descriptionOpen .channelHeroBanner {
    height: 170px;
  }
  .channelHeroDescriptionWrap .channelHeroDescription {
    display: block;
    flex-basis: 100%;
    font-size: 13px;
    line-height: 1.55;
  }
  .channelHero.descriptionOpen .channelHeroDescription {
    display: none;
  }
  .channelReadMoreBtn {
    width: 100%;
    justify-content: center;
  }
  .channelHeroExpandedDescription {
    padding: 12px;
    font-size: 13px;
    line-height: 1.65;
  }
  /* Horizontal scroll tabs — fit all tabs in one row */
  .channelContentTabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }
  .channelContentTabs::-webkit-scrollbar {
    display: none;
  }
  .channelContentTab {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 46px;
    padding-inline: 12px;
    font-size: 14px;
  }
  .channelSortCompact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .channelSortLabel {
    grid-column: 1 / -1;
    min-height: 28px;
    padding: 0;
  }
}

@media (max-width: 430px) {
  /* Channel tabs: icon-only at very small screens */
  .channelContentTab .contentToolbarText {
    display: none;
  }
  .channelContentTabBadge {
    display: none;
  }
  .channelContentTabIcon {
    font-size: 20px;
    width: auto;
    height: auto;
  }
  .channelContentTabIcon .contentKindSvg {
    width: 20px;
    height: 20px;
  }
  .channelContentTab {
    width: 48px;
    min-width: 48px;
    padding-inline: 0;
    justify-content: center;
  }
  /* Keep hero action buttons side-by-side (don't override to single column) */
  .channelHeroActions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ==========================================================================
   Interface direction normalization
   ========================================================================== */
.topbar,
.nav,
.sideNav,
.sideNavLinks,
.topbarActions,
.topbarShortcutLinks,
.topbarShortcut,
.brand,
.search,
.contentToolbar,
.channelsFilterBanner,
.tagFilterBanner,
.channelsToolbarControls,
.tagToolbarControls,
.channelControlBar,
.channelContentTabs,
.channelSortCompact,
.languageFilter,
.tabs,
.watchSubscribePanel,
.watchSubscribeMain,
.watchSubscribeChoices,
.watchExternalActions,
.watchSaveActions,
.watchAutoplayToggle,
.watchActionsRow,
.watchChannelRow,
.saveVideoActions,
.contentToolbarTabs,
.contentToolbarControls,
.contentToolbarSort,
.contentToolbarLang,
.contentToolbarMiniBtns,
.watchSubscribeText,
.channelHero,
.channelHeroActions,
.seoListPage,
.tagIndexPage,
.personalPage {
  direction: inherit;
  text-align: start;
}

.topbarShortcut,
.contentToolbar,
.watchActionsRow,
.watchSaveActions,
.watchChannelRow {
  flex-direction: row;
}

html[dir="ltr"] .contentToolbar,
html[dir="ltr"] .channelsToolbarControls,
html[dir="ltr"] .tagToolbarControls,
html[dir="ltr"] .channelControlBar,
html[dir="ltr"] .watchSubscribePanel,
html[dir="ltr"] .watchExternalActions,
html[dir="ltr"] .saveVideoActions {
  direction: ltr;
}

html[dir="rtl"] .contentToolbar,
html[dir="rtl"] .channelsToolbarControls,
html[dir="rtl"] .tagToolbarControls,
html[dir="rtl"] .channelControlBar,
html[dir="rtl"] .watchSubscribePanel,
html[dir="rtl"] .watchExternalActions,
html[dir="rtl"] .saveVideoActions {
  direction: rtl;
}

@media (min-width: 721px) {
  .sideNav:not(.expanded) .navLink.active {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .sideNav:not(.expanded) .navLink.active .navIconWrap {
    color: var(--ink-on-gold);
    background: linear-gradient(135deg, #fff8cf 0%, #e8c764 56%, #b67f22 100%);
    border-color: rgba(255, 255, 255, 0.55);
    transform: none;
    box-shadow:
      0 7px 16px rgba(184, 132, 36, 0.24),
      0 0 0 2px rgba(255, 248, 207, 0.62),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .sideNav.expanded .navLink.active {
    background: var(--glass-gold);
    border-color: rgba(205, 154, 42, 0.25);
  }

  html[dir="ltr"] .sideNav.expanded .navLink.active {
    box-shadow:
      inset 3px 0 0 rgba(190, 137, 31, 0.62),
      0 8px 18px rgba(184, 132, 36, 0.08);
  }

  html[dir="rtl"] .sideNav.expanded .navLink.active {
    box-shadow:
      inset -3px 0 0 rgba(190, 137, 31, 0.62),
      0 8px 18px rgba(184, 132, 36, 0.08);
  }
}


/* ===== Latest toolbar responsive fix =====
   שורש הבעיה: חלוקת 70/30 דחסה את אזור המיון והשפה בשפות ארוכות.
   התיקון כאן חל רק על הסרגל הראשי של סרטונים/שורטים/שידורים חיים. */
.latestContentToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  max-width: 100%;
  overflow: visible;
}

.latestContentToolbar .contentToolbarTabs {
  flex: 999 1 600px;
  width: auto;
  min-width: 360px;
  max-width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.latestContentToolbar .contentToolbarControls {
  flex: 1 1 560px;
  width: auto;
  min-width: 480px;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(245px, 1fr) minmax(220px, 0.95fr);
  gap: 8px;
}

.latestContentToolbar .contentToolbarGroup,
.latestContentToolbar .contentToolbarLang summary {
  width: 100%;
  min-width: 0;
}

.latestContentToolbar .contentToolbarMiniBtns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.latestContentToolbar .contentToolbarTab,
.latestContentToolbar .contentToolbarMiniBtn,
.latestContentToolbar .contentToolbarText,
.latestContentToolbar .contentToolbarLabel,
.latestContentToolbar .contentToolbarLang strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latestContentToolbar .contentToolbarTab {
  padding-inline: 10px;
}

.latestContentToolbar .contentToolbarLabel {
  flex: 0 0 auto;
  padding-inline: 8px 2px;
}

.latestContentToolbar .contentToolbarLang strong {
  flex: 1 1 auto;
  text-align: start;
}

@media (max-width: 1180px) {
  .latestContentToolbar .contentToolbarTabs,
  .latestContentToolbar .contentToolbarControls {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .latestContentToolbar .contentToolbarTabs {
    gap: 6px;
  }

  .latestContentToolbar .contentToolbarTab {
    min-height: 42px;
    gap: 5px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .latestContentToolbar .contentToolbarIcon {
    display: none;
  }

  .latestContentToolbar .contentToolbarControls {
    grid-template-columns: 1fr;
  }
}

/* ===== Playlists filter bar ===== */
.playlistsFilterBanner.contentToolbar {
  display: block;
  margin: 0 0 20px;
  overflow: visible;
}

.playlistsToolbarControls {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(230px, 1fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.playlistsFilterBanner .playlistsSortGroup,
.playlistsFilterBanner .playlistsLanguageDropdown {
  min-height: 58px;
  border-color: var(--cream-border);
  background: var(--panel);
  color: var(--text);
}

.playlistsFilterBanner .playlistsSortGroup {
  padding: 7px;
}

.playlistsFilterBanner .playlistsSortButtons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.playlistsFilterBanner .contentToolbarMiniBtn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.playlistsFilterBanner .contentToolbarMiniBtn:hover {
  border-color: #d8b65d;
  background: var(--cream-2);
}

.playlistsFilterBanner .contentToolbarMiniBtn.active {
  border-color: #d3a33d;
  background: linear-gradient(135deg, #fff2bd, #d6a33a 58%, #b27b1f);
  color: var(--ink-on-gold);
  box-shadow:
    0 8px 18px rgba(198, 148, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.playlistsFilterBanner .playlistsLanguageDropdown {
  position: relative;
  display: block;
  padding: 0;
  z-index: 20;
}

.playlistsFilterBanner .playlistsLanguageDropdown summary {
  min-height: 58px;
  padding: 8px 14px;
}

.playlistsFilterBanner .contentToolbarLangMenu {
  right: 0;
  left: auto;
  width: 100%;
  min-width: 210px;
  max-width: min(310px, calc(100vw - 28px));
}

.playlistsFilterBanner .contentToolbarLangItem.active {
  background: linear-gradient(135deg, #fff2bd, #d6a33a 58%, #b27b1f);
  color: var(--ink-on-gold);
}

@media (max-width: 1050px) {
  .playlistsToolbarControls {
    grid-template-columns: 1fr;
  }

  .playlistsFilterBanner .contentToolbarLangMenu {
    width: min(290px, calc(100vw - 28px));
  }
}

@media (max-width: 720px) {
  .playlistsFilterBanner.contentToolbar {
    padding: 9px;
    border-radius: 19px;
  }

  .playlistsFilterBanner .playlistsSortGroup {
    display: block;
    padding: 8px;
  }

  .playlistsFilterBanner .playlistsSortGroup > .contentToolbarLabel {
    display: block;
    padding: 0 4px 7px;
  }

  .playlistsFilterBanner .playlistsSortButtons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .playlistsFilterBanner .contentToolbarMiniBtn {
    min-height: 44px;
    padding: 7px;
  }

  .playlistsFilterBanner .playlistsLanguageDropdown,
  .playlistsFilterBanner .playlistsLanguageDropdown summary {
    min-height: 50px;
  }

  .playlistsFilterBanner .contentToolbarLangMenu {
    right: 0;
    left: auto;
  }
}

@media (max-width: 390px) {
  .playlistsFilterBanner .playlistsSortButtons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .playlistsFilterBanner .contentToolbarMiniBtn {
    min-height: 40px;
    font-size: 12.4px;
  }
}

/* ===== PUBLIC PLAYLIST WATCH PAGE ===== */
.publicPlaylistPage {
  max-width: 1580px;
  margin: 0 auto;
  padding: 12px 22px 34px;
}

.publicPlaylistLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  align-items: start;
}

.publicPlaylistMain {
  min-width: 0;
}

.publicPlaylistPlayerFrame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.publicPlaylistPlayerMount {
  position: relative;
  z-index: 1;
}

.publicPlaylistPlayerFrame::after {
  content: none;
}

.publicPlaylistMain .publicPlaylistPlayerFrame .player {
  border-radius: 0;
  box-shadow: none;
}

.publicPlaylistMain .publicPlaylistPlayerFrame iframe.player {
  display: block;
}

.publicPlaylistOverlayNav {
  appearance: none;
  position: absolute;
  bottom: 12px;
  left: auto;
  z-index: 6;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  opacity: 0;
  transform: translateY(2px);
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.16s ease;
}

.publicPlaylistOverlayPrev {
  right: 250px;
}

.publicPlaylistOverlayNext {
  right: 208px;
}

.publicPlaylistOverlayFullscreen {
  right: 166px;
}

.publicPlaylistOverlayNav svg {
  width: 27px;
  height: 27px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.72));
}

.publicPlaylistOverlayPrev svg path:first-child,
.publicPlaylistOverlayNext svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.publicPlaylistOverlayNav:hover,
.publicPlaylistOverlayNav:focus-visible {
  background: rgba(0, 0, 0, 0.56);
  transform: translateY(0);
}

.publicPlaylistPlayerFrame.publicPlaylistControlsVisible .publicPlaylistOverlayNav:not(:disabled),
.publicPlaylistPlayerFrame:focus-within .publicPlaylistOverlayNav:not(:disabled) {
  opacity: 0.96;
  transform: translateY(0);
}

.publicPlaylistOverlayNav:disabled {
  opacity: 0;
  pointer-events: none;
  cursor: default;
}

.publicPlaylistPlayerFrame:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}

.publicPlaylistPlayerFrame:fullscreen .publicPlaylistPlayerMount,
.publicPlaylistPlayerFrame:-webkit-full-screen .publicPlaylistPlayerMount {
  width: 100%;
  height: 100%;
}

.publicPlaylistPlayerFrame:fullscreen .player,
.publicPlaylistPlayerFrame:-webkit-full-screen .player {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.publicPlaylistPlayerFrame:fullscreen.publicPlaylistControlsVisible .publicPlaylistOverlayNav:not(:disabled),
.publicPlaylistPlayerFrame:-webkit-full-screen.publicPlaylistControlsVisible .publicPlaylistOverlayNav:not(:disabled) {
  opacity: 0.96;
}

.publicPlaylistEmptyPlayer {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--yt-border-soft);
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #101010, #1f1f1f);
  color: #fff;
  text-align: center;
}

.publicPlaylistEmptyInner {
  max-width: 520px;
  padding: 20px;
}

.publicPlaylistEmptyIcon {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 26px;
}

.publicPlaylistEmptyTitle {
  font-size: 20px;
  font-weight: 800;
}

.publicPlaylistEmptyText {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.55;
}

.publicPlaylistUnderPlayerNav {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--yt-border-soft);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--yt-shadow-sm);
  direction: ltr;
}

.publicPlaylistUnderPlayerInfoOnly {
  display: flex;
  justify-content: center;
  direction: rtl;
  padding-block: 10px;
}

.publicPlaylistUnderPlayerInfoOnly .publicPlaylistUnderInfo {
  max-width: min(820px, 100%);
}

.publicPlaylistUnderInfo {
  min-width: 0;
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  justify-self: center;
  text-align: center;
  direction: rtl;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.publicPlaylistUnderTitle {
  min-width: 0;
  max-width: min(520px, 100%);
  text-align: center;
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.publicPlaylistUnderMeta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.publicPlaylistUnderMeta:not(:empty)::before {
  content: "•";
  margin-inline: 1px 8px;
  color: #b8b8b8;
}

.publicPlaylistNavBtn {
  direction: rtl;
  min-height: 42px;
  border-radius: 14px;
  padding-inline: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.publicPlaylistPrevBtn {
  grid-column: 1;
  justify-self: start;
}

.publicPlaylistNextBtn {
  grid-column: 3;
  justify-self: end;
}

.publicPlaylistNavBtn:disabled,
.publicPlaylistMoreBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.publicPlaylistPositionLabel {
  min-height: 18px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.publicPlaylistWatchInfo {
  margin-top: 16px;
}

.publicPlaylistInfoPlaceholder {
  padding: 18px 2px;
}

.publicPlaylistSide {
  position: sticky;
  top: 84px;
  align-self: start;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.publicPlaylistSideTabs {
  margin-bottom: 14px;
}

.publicPlaylistSideContent {
  min-height: 420px;
}

.publicPlaylistSideHeader {
  margin: 0 0 14px;
  padding: 18px 20px;
  border: 1px solid var(--yt-border-soft);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--yt-shadow-sm);
  direction: rtl;
}

.publicPlaylistSideTitle {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.publicPlaylistSideMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.publicPlaylistSidePosition {
  unicode-bidi: isolate;
}

.publicPlaylistSideMetaDot {
  color: #b8b8b8;
  font-weight: 800;
}

.publicPlaylistSideScroller {
  max-height: calc(100vh - 155px);
  min-height: 420px;
  overflow: auto;
  padding: 0 2px 6px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.publicPlaylistList {
  gap: 14px;
  min-height: 420px;
}

.publicPlaylistRecoCard {
  position: relative;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.publicPlaylistRecoCard:hover {
  background: var(--yt-hover);
}

.publicPlaylistRecoCard.active {
  margin: -6px;
  padding: 6px;
  border-color: rgba(184, 132, 36, 0.55);
  background: linear-gradient(135deg, var(--cream-2), var(--panel));
  box-shadow: 0 8px 20px rgba(184, 132, 36, 0.13);
}

.publicPlaylistRecoCard.active .recoTitle {
  color: var(--ink-gold);
}

.publicPlaylistRecoCard.currentOnly {
  background: var(--cream);
}

.publicPlaylistSideIndex {
  position: absolute;
  inset-inline-start: 6px;
  top: 6px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  z-index: 2;
}

.publicPlaylistMoreBtn {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
}

.publicPlaylistHint {
  min-height: 20px;
  padding: 8px 2px 0;
  font-size: 12px;
  line-height: 1.45;
}

.publicPlaylistSideSkeleton {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  pointer-events: none;
}

.publicPlaylistSideSkeletonThumb {
  display: block;
  width: 168px;
  aspect-ratio: 16/9;
  border-radius: 12px;
}

.publicPlaylistSideSkeletonText {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 5px;
}

.publicPlaylistSideSkeletonLine {
  display: block;
  height: 13px;
  border-radius: 999px;
}

.publicPlaylistSideSkeletonLineA {
  width: 94%;
}

.publicPlaylistSideSkeletonLineB {
  width: 58%;
}

@media (hover: none) {
  .publicPlaylistPlayerFrame.publicPlaylistControlsVisible .publicPlaylistOverlayNav:not(:disabled) {
    opacity: 0.96;
  }
}

@media (max-width: 1120px) {
  .publicPlaylistLayout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .publicPlaylistSideSkeleton {
    grid-template-columns: 144px minmax(0, 1fr);
  }
  .publicPlaylistSideSkeletonThumb {
    width: 144px;
  }
}

@media (max-width: 920px) {
  .publicPlaylistPage {
    padding-inline: 12px;
  }
  .publicPlaylistLayout {
    grid-template-columns: 1fr;
  }
  .publicPlaylistSide {
    position: static;
  }
  .publicPlaylistSideScroller {
    max-height: none;
    min-height: 0;
    overflow: visible;
  }
  .publicPlaylistList {
    min-height: 240px;
  }
}

@media (max-width: 560px) {
  .publicPlaylistOverlayNav {
    bottom: 8px;
    width: 34px;
    height: 34px;
  }
  .publicPlaylistOverlayPrev {
    right: 126px;
  }
  .publicPlaylistOverlayNext {
    right: 86px;
  }
  .publicPlaylistOverlayFullscreen {
    right: 46px;
  }
  .publicPlaylistOverlayNav svg {
    width: 25px;
    height: 25px;
  }
  .publicPlaylistUnderPlayerNav {
    grid-template-columns: 1fr 1fr;
  }
  .publicPlaylistUnderInfo {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .publicPlaylistPrevBtn {
    grid-column: 1;
    grid-row: 1;
    justify-self: stretch;
  }
  .publicPlaylistNextBtn {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
  }
  .publicPlaylistSideSkeleton {
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .publicPlaylistSideSkeletonThumb {
    width: 132px;
  }
}

/* קבוצות "פלייליסטים שהסרטון נמצא בהם" ו"תגיות" בדף הצפייה
   (הועבר לכאן מהזרקת style ב-watch-playlist-tags.js) */
#watchTagsMount {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.watchMetaGroup {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
  border-radius: 18px;
  padding: 10px 13px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.watchMetaGroupTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
  flex: 0 0 auto;
  padding-top: 2px;
}
.watchMetaGroupIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 800;
  color: #0f172a;
}
.watchMetaGroupIcon .watchPlaylistChipIcon,
.watchMetaGroupIcon .watchMetaTagSvg {
  width: 14px;
  height: 14px;
}
.watchPlaylistChipRow,
.watchMetaGroup .tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 360px;
}
.watchPlaylistChip,
.watchMetaGroup .tagChip {
  flex: 0 0 auto;
}
.watchPlaylistChip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(100%, 360px);
  padding: 8px 11px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.86);
  color: #1e3a8a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.watchPlaylistChip:hover {
  transform: translateY(-1px);
  background: var(--info-soft);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.14);
}
.watchPlaylistChipIcon,
.watchMetaTagSvg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.watchPlaylistChipText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watchPlaylistChipMeta {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: var(--glass-1);
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
}
.watchMetaGroupTags {
  background: var(--glass-1);
}
.watchMetaGroupTags .watchMetaGroupIcon {
  background: linear-gradient(135deg, #fff7ed, #f59e0b);
  color: var(--ink-on-gold);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.22);
}
@media (max-width: 700px) {
  .watchMetaGroup {
    padding: 9px 10px;
  }
  .watchPlaylistChip {
    font-size: 12.5px;
  }
  .watchPlaylistChipMeta {
    display: none;
  }
}

/* ===== ACCESSIBILITY & DARK MODE ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skipLink {
  position: fixed;
  top: -80px;
  inset-inline-start: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--yt-shadow-md);
  transition: top 0.18s ease;
}
.skipLink:focus-visible {
  top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* a11y toolbar modes (set as data attributes on <html>) */
html[data-a11y-font="1"] body {
  zoom: 1.1;
}
html[data-a11y-font="2"] body {
  zoom: 1.25;
}
html[data-a11y-font="3"] body {
  zoom: 1.45;
}
html[data-a11y-grayscale="1"] {
  filter: grayscale(1);
}
html[data-a11y-contrast="1"] {
  filter: contrast(1.2);
}
html[data-a11y-grayscale="1"][data-a11y-contrast="1"] {
  filter: grayscale(1) contrast(1.2);
}
html[data-a11y-links="1"] a {
  text-decoration: underline !important;
}
html[data-a11y-motion="1"] *,
html[data-a11y-motion="1"] *::before,
html[data-a11y-motion="1"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* theme toggle button in topbar */
.themeToggleBtn {
  height: 42px;
  min-width: 42px;
  padding: 0 10px;
  border: 1px solid rgba(184, 132, 36, 0.34);
  border-radius: 999px;
  background: var(--cream-grad);
  color: var(--ink-gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.themeToggleBtn:hover {
  background: var(--yt-hover);
}
.themeToggleBtn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.themeToggleBtn .themeIconSun {
  display: none;
}
html[data-theme="dark"] .themeToggleBtn .themeIconSun {
  display: block;
}
html[data-theme="dark"] .themeToggleBtn .themeIconMoon {
  display: none;
}

/* floating accessibility toolbar */
.a11yBtn {
  position: fixed;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 120;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--yt-shadow-md);
}
.a11yBtn svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}
.a11yPanel {
  position: fixed;
  bottom: 76px;
  inset-inline-end: 18px;
  z-index: 121;
  width: min(330px, calc(100vw - 36px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--yt-shadow-md);
  padding: 14px;
  display: none;
}
.a11yPanel.open {
  display: block;
}
.a11yPanelTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.a11yPanelClose {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
.a11yGroup {
  margin-bottom: 12px;
}
.a11yGroupLabel {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.a11yRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.a11yOpt {
  flex: 1 1 calc(50% - 8px);
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.a11yOpt:hover {
  background: var(--yt-hover);
}
.a11yOpt.active {
  background: var(--btn-strong-bg);
  color: var(--btn-strong-text);
  border-color: var(--btn-strong-bg);
}
.a11yReset {
  width: 100%;
  margin-top: 2px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.a11yReset:hover {
  background: var(--yt-hover);
}
@media (max-width: 720px) {
  .a11yBtn {
    width: 44px;
    height: 44px;
    bottom: calc(66px + 14px + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 14px;
  }
  .a11yPanel {
    bottom: calc(66px + 66px + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 14px;
  }
}
