/* =========================================================
   客家小彬数字档案馆 · YouTube 风格清爽亮色主题（支持一键暗黑）
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #f9f9f9;
  --surface: #f2f2f2;
  --surface-hover: #e5e5e5;
  --card: #ffffff;
  --line: #e5e5e5;
  --line-strong: #d4d4d4;
  --text: #0f0f0f;
  --text-muted: #606060;
  --accent: #cc0000;
  --accent-hover: #a80000;
  --accent-soft: #ffebeb;
  --chip-active-bg: #0f0f0f;
  --chip-active-text: #ffffff;
  --header-h: 56px;
  --sidebar-w: 236px;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --font-sans: "Roboto", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-soft: #181818;
  --surface: #272727;
  --surface-hover: #3a3a3a;
  --card: #181818;
  --line: #2e2e2e;
  --line-strong: #444444;
  --text: #f1f1f1;
  --text-muted: #aaaaaa;
  --accent: #ff0033;
  --accent-hover: #cc0029;
  --accent-soft: rgba(255, 0, 51, 0.16);
  --chip-active-bg: #f1f1f1;
  --chip-active-text: #0f0f0f;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font-family: inherit; }

/* ---------- Top Fixed Header (YouTube Masthead) ---------- */
.yt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.yt-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 19px;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--surface); }

.yt-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
}
.yt-logo-badge {
  width: 30px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.yt-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.yt-brand-domain {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
  align-self: flex-start;
  padding-top: 2px;
}

/* Center Search Box */
.yt-header-center {
  flex: 1;
  max-width: 600px;
  display: flex;
  justify-content: center;
}
.yt-search-form {
  display: flex;
  width: 100%;
  max-width: 560px;
  height: 40px;
}
.yt-search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-right: none;
  border-radius: 40px 0 0 40px;
  padding: 0 16px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.yt-search-form input:focus {
  border-color: #1c62b9;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.yt-search-form button {
  width: 60px;
  border: 1px solid var(--line-strong);
  border-radius: 0 40px 40px 0;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.yt-search-form button:hover { background: var(--surface); }

/* Right Actions */
.yt-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lang-switch {
  display: inline-flex;
  background: var(--surface);
  border-radius: 18px;
  padding: 2px;
}
.lang-switch a {
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
}
.lang-switch a.active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
}
.header-cta {
  padding: 7px 14px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}
.header-cta:hover { background: var(--surface-hover); }

/* ---------- Shell: Left Sidebar + Main Content ---------- */
.yt-shell {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

.yt-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 12px 10px 24px;
  z-index: 150;
  transition: transform 0.2s ease, width 0.2s ease;
}
.yt-sidebar::-webkit-scrollbar { width: 6px; }
.yt-sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.sidebar-section {
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 12px 6px;
  letter-spacing: 0.3px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-link:hover { background: var(--surface); }
.side-link.active {
  background: var(--surface);
  font-weight: 700;
}
.side-ico {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}
.side-count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
}
.sidebar-footer {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}
.sidebar-footer a {
  margin-right: 8px;
  color: var(--text-muted);
}
.sidebar-footer a:hover { color: var(--text); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 140;
}

/* Main Content Area */
.yt-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.2s ease;
  display: flex;
  flex-direction: column;
}

body.sidebar-collapsed .yt-sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .yt-main {
  margin-left: 0;
}

/* Watch page: sidebar collapsed by default on desktop like YouTube */
body.page-watch .yt-sidebar {
  transform: translateX(-100%);
}
body.page-watch .yt-main {
  margin-left: 0;
}
body.page-watch.sidebar-open .yt-sidebar {
  transform: translateX(0);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
}
body.page-watch.sidebar-open .sidebar-backdrop {
  display: block;
}

/* ---------- Sticky Category Chips Bar ---------- */
.chips-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-bar::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}
.chip:hover { background: var(--surface-hover); }
.chip.active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
  font-weight: 600;
}
.chip-num {
  font-size: 11.5px;
  opacity: 0.72;
}

/* ---------- Content Container ---------- */
.yt-content {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 24px 48px;
  flex: 1;
}

/* ---------- Channel Header Banner (Home / Category) ---------- */
.channel-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.channel-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}
.channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cc0000 0%, #8f1d14 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.channel-meta h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}
.channel-sub-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.channel-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 720px;
}
.channel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-yt-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 20px;
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
  font-size: 13.5px;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-yt-sub:hover { opacity: 0.88; }
.btn-yt-red {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-yt-red:hover { background: var(--accent-hover); }
.btn-yt-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-yt-ghost:hover { background: var(--surface-hover); }

/* ---------- Section Heading ---------- */
.yt-section { margin-bottom: 32px; }
.yt-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.yt-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.yt-section-more {
  font-size: 13.5px;
  font-weight: 600;
  color: #065fd4;
}
[data-theme="dark"] .yt-section-more { color: #3ea6ff; }
.yt-section-more:hover { text-decoration: underline; }

/* ---------- YouTube Video Grid ---------- */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 16px;
}
@media (max-width: 1280px) {
  .yt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .yt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .yt-grid { grid-template-columns: 1fr; }
}

.yt-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.yt-thumb-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #181818;
}
.yt-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.yt-card:hover .yt-thumb-link img {
  transform: scale(1.03);
}
.yt-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
}
.yt-short-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
}

.yt-card-info {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}
.yt-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.yt-card-avatar.ch-small {
  background: #2f5d50;
}
.yt-card-text {
  min-width: 0;
  flex: 1;
}
.yt-card-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-card-title a:hover { color: var(--accent); }
.yt-card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.yt-meta-dot::before { content: "•"; margin-right: 6px; }
.yt-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.yt-tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
}
.yt-tag:hover { background: var(--surface-hover); color: var(--text); }

/* ---------- Index Chip Wall (Regions / Surnames) ---------- */
.index-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.chip-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.index-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
}
.index-chip span {
  font-size: 11.5px;
  color: var(--text-muted);
}
.index-chip:hover {
  border-color: var(--text);
  background: var(--surface);
}

/* ---------- Watch Page (Classic YouTube 2-Column) ---------- */
.watch-wrap {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1080px) {
  .watch-wrap { grid-template-columns: 1fr; }
}

.watch-breadcrumb {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.watch-breadcrumb a:hover { color: var(--text); text-decoration: underline; }

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.player-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.yt-facade {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92);
  transition: filter 0.2s;
}
.yt-facade:hover img { filter: brightness(1); }
.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 14px;
  background: rgba(204, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s, background 0.15s;
}
.yt-play-btn::after {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.yt-facade:hover .yt-play-btn {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.06);
}
.yt-play-tip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 6px;
}

.watch-title {
  margin: 14px 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.watch-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
}
.watch-ch-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.watch-ch-name {
  font-size: 15px;
  font-weight: 700;
}
.watch-ch-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}
.watch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.watch-desc-box {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.watch-stats-line {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.watch-fact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.watch-fact-tags .yt-tag {
  background: var(--bg);
  border: 1px solid var(--line);
}

.chapter-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
}
.chapter-box h2 {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 700;
}
.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
}
.chapter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.chapter-item:hover { background: var(--surface); }
.chapter-time {
  color: #065fd4;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
[data-theme="dark"] .chapter-time { color: #3ea6ff; }

.article-body {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.8;
}
.article-body h2 {
  font-size: 16px;
  margin: 14px 0 8px;
}
.article-body p {
  margin: 0 0 12px;
  color: var(--text);
}

/* Watch Right Column (Up Next List) */
.watch-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-cta-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.side-cta-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.side-cta-card p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.upnext-head {
  font-size: 15px;
  font-weight: 700;
  margin: 2px 0 4px;
}
.upnext-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upnext-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 8px;
  transition: background 0.15s;
}
.upnext-item:hover .upnext-title { color: var(--accent); }
.upnext-thumb {
  position: relative;
  width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #181818;
  flex-shrink: 0;
}
.upnext-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upnext-meta {
  min-width: 0;
  flex: 1;
}
.upnext-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.upnext-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Search Page ---------- */
.search-filter-bar {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}
.search-controls {
  display: grid;
  grid-template-columns: 1fr 200px 200px;
  gap: 10px;
}
@media (max-width: 760px) {
  .search-controls { grid-template-columns: 1fr; }
}
.search-controls input,
.search-controls select {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search-controls input:focus,
.search-controls select:focus {
  border-color: #1c62b9;
}
.search-stats {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Prose Pages (Xungen / About / Privacy / Disclaimer) ---------- */
.prose-page {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 36px;
}
@media (max-width: 640px) {
  .prose-page { padding: 20px 18px; }
}
.prose-page h1 {
  margin: 0 0 14px;
  font-size: 24px;
}
.prose-page h2 {
  margin: 24px 0 10px;
  font-size: 17px;
}
.prose-page p, .prose-page li {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
}
.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 700px) {
  .service-cards { grid-template-columns: 1fr; }
}
.service-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.service-card h3 { margin: 0 0 8px; font-size: 15.5px; }
.service-card p { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Ad Slot ---------- */
.ad-slot {
  margin: 16px 0;
  min-height: 90px;
  text-align: center;
}

/* ---------- Footer ---------- */
.yt-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 20px 24px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.yt-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.yt-footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Responsive Drawer ---------- */
@media (max-width: 960px) {
  .yt-sidebar {
    transform: translateX(-100%);
  }
  .yt-main {
    margin-left: 0;
  }
  body.sidebar-open .yt-sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.22);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .yt-brand-domain, .header-cta { display: none; }
  .yt-content, .watch-wrap { padding: 14px 14px 36px; }
  .chips-bar { padding: 10px 14px; }
}
@media (max-width: 560px) {
  .yt-header { padding: 0 10px; }
  .yt-brand-name { font-size: 15.5px; }
  .yt-search-form button { width: 44px; }
}
