:root {
  --ink: #12241f;
  --ink-soft: #51615c;
  --forest: #0b2721;
  --forest-2: #123a31;
  --jade: #157764;
  --mint: #b9e9d4;
  --mint-pale: #eaf7f1;
  --gold: #e7b75c;
  --paper: #f6f7f2;
  --white: #fff;
  --line: #dce4df;
  --shadow: 0 18px 50px rgba(10, 40, 32, 0.09);
  --radius: 22px;
  --shell: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 12px 18px; border-radius: 10px; background: var(--white); color: var(--forest);
  box-shadow: var(--shadow); transition: top .2s;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: sticky; top: 0; z-index: 50; height: 78px;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(246, 247, 242, .9); border-bottom: 1px solid rgba(220, 228, 223, .85);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 41px; aspect-ratio: 1;
  border-radius: 50% 50% 50% 10px; background: var(--forest); color: var(--mint);
  font-family: Georgia, serif; font-size: 21px; font-weight: 700;
}
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { letter-spacing: .12em; font-size: 14px; }
.brand small { margin-top: 4px; color: var(--ink-soft); font-size: 11px; letter-spacing: .08em; }
nav { display: flex; align-items: center; gap: 34px; font-size: 14px; font-weight: 600; }
nav a { transition: color .2s; }
nav a:hover { color: var(--jade); }
.youtube-link { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }

.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.25fr .75fr;
  min-height: 650px; padding: 96px max(24px, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 79% 22%, rgba(185, 233, 212, .17), transparent 26%),
    radial-gradient(circle at 15% 84%, rgba(231, 183, 92, .09), transparent 26%),
    var(--forest);
  color: var(--white);
}
.hero::before, .hero::after {
  content: ""; position: absolute; pointer-events: none; border: 1px solid rgba(185, 233, 212, .09); border-radius: 50%;
}
.hero::before { width: 580px; height: 580px; right: -180px; top: -240px; }
.hero::after { width: 380px; height: 380px; right: -95px; top: -140px; }
.hero-copy { align-self: center; max-width: 730px; padding-right: 48px; }
.eyebrow, .section-kicker {
  display: flex; align-items: center; gap: 11px; margin: 0 0 22px;
  color: var(--mint); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.eyebrow span { width: 28px; height: 1px; background: var(--gold); }
.hero h1 { margin: 0; max-width: 730px; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(48px, 6vw, 80px); line-height: 1.15; letter-spacing: -.04em; font-weight: 500; }
.hero h1 em { color: var(--mint); font-style: normal; }
.hero-intro { max-width: 630px; margin: 30px 0 0; color: #c7d5d0; font-size: 17px; line-height: 1.9; letter-spacing: .02em; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 40px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 21px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 700;
  transition: transform .2s, background .2s, border-color .2s;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--mint); color: var(--forest); }
.button-primary:hover { background: #cef2e2; }
.text-link { padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.4); font-size: 14px; font-weight: 600; }

.hero-panel {
  position: relative; z-index: 2; align-self: center; width: min(100%, 390px); justify-self: end;
  padding: 30px; border: 1px solid rgba(185, 233, 212, .22); border-radius: 28px;
  background: rgba(15, 53, 44, .62); box-shadow: 0 30px 80px rgba(0, 0, 0, .2); backdrop-filter: blur(12px);
}
.hero-panel-top { display: flex; justify-content: space-between; color: #acbeb8; font-size: 12px; letter-spacing: .08em; }
.live-dot { display: flex; align-items: center; gap: 7px; color: var(--mint); }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #75d7ad; box-shadow: 0 0 0 5px rgba(117, 215, 173, .12); }
.hero-count { display: flex; align-items: end; gap: 18px; margin: 42px 0; }
.hero-count strong { font-family: Georgia, serif; color: var(--mint); font-size: 80px; line-height: .8; font-weight: 500; letter-spacing: -.05em; }
.hero-count span { color: #b8c8c3; font-size: 13px; line-height: 1.5; }
.hero-mini-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(185, 233, 212, .16); border-bottom: 1px solid rgba(185, 233, 212, .16); }
.hero-mini-stats div { display: grid; gap: 8px; padding: 20px 0; }
.hero-mini-stats div + div { padding-left: 22px; border-left: 1px solid rgba(185, 233, 212, .16); }
.hero-mini-stats span { color: #94aaa3; font-size: 11px; letter-spacing: .08em; }
.hero-mini-stats strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.hero-panel > p { margin: 18px 0 0; color: #789188; font-size: 11px; }

.section-shell { width: var(--shell); margin: 0 auto; padding: 110px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 42px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(34px, 4vw, 48px); line-height: 1.2; font-weight: 500; letter-spacing: -.035em; }
.section-kicker { margin-bottom: 12px; color: var(--jade); font-size: 10px; }
.section-heading > p { max-width: 370px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; text-align: right; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat-card {
  display: flex; flex-direction: column; min-height: 180px; padding: 26px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.stat-card > span { color: var(--ink-soft); font-size: 12px; letter-spacing: .06em; }
.stat-card strong { margin: auto 0 5px; font-family: Georgia, serif; font-size: 44px; font-weight: 500; letter-spacing: -.04em; }
.stat-card small { color: #819089; font-size: 11px; }
.stat-primary { background: var(--jade); color: var(--white); border-color: var(--jade); }
.stat-primary > span, .stat-primary small { color: #cbe8df; }

.insight-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; margin-top: 16px; }
.chart-card, .category-card { min-height: 370px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.card-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 34px; }
.card-heading p { margin: 0 0 6px; color: var(--jade); font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.card-heading h3 { margin: 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 24px; font-weight: 500; }
.card-heading > span { color: #86948f; font-size: 10px; }
.year-chart { display: flex; align-items: end; gap: 18px; height: 245px; padding-top: 30px; border-bottom: 1px solid var(--line); }
.year-bar { position: relative; display: flex; flex: 1; align-items: end; justify-content: center; height: 100%; }
.year-bar-fill { width: min(54px, 74%); min-height: 3px; border-radius: 6px 6px 0 0; background: var(--mint); transition: height .7s cubic-bezier(.2,.8,.2,1); }
.year-bar:nth-child(even) .year-bar-fill { background: var(--jade); }
.year-bar strong { position: absolute; bottom: calc(var(--bar-height) + 11px); font-family: Georgia, serif; font-size: 15px; font-weight: 500; }
.year-bar span { position: absolute; bottom: -29px; color: var(--ink-soft); font-size: 11px; }
.category-list { display: grid; gap: 18px; }
.category-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 34px; align-items: center; gap: 12px; font-size: 12px; }
.category-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-track { height: 5px; overflow: hidden; border-radius: 99px; background: var(--mint-pale); }
.category-track i { display: block; height: 100%; border-radius: inherit; background: var(--jade); }
.category-row strong { text-align: right; font-family: Georgia, serif; font-size: 15px; font-weight: 500; }

.playlists { padding-top: 44px; }
.playlist-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.playlist-list-header, .playlist-list-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 210px; align-items: center; gap: 14px; }
.playlist-list-header { min-height: 40px; padding: 0 16px; color: #7b8b85; background: var(--mint-pale); font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.playlist-list-row { min-height: 88px; padding: 8px 16px; border-top: 1px solid var(--line); transition: background .18s; }
.playlist-list-row:hover { background: #fbfcf9; }
.playlist-list-index { color: #91a09a; font-family: Georgia, serif; font-size: 13px; text-align: center; }
.playlist-list-open { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 14px; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.playlist-list-open img { width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; background: var(--forest); }
.playlist-list-copy { display: block; min-width: 0; }
.playlist-list-copy small { display: block; margin-bottom: 4px; color: var(--jade); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.playlist-list-copy strong { display: block; overflow: hidden; font-size: 13px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.playlist-list-copy > span { display: block; margin-top: 4px; color: #89968f; font-size: 9px; }
.playlist-list-meta { display: grid; grid-template-columns: 90px 120px; align-items: center; text-align: center; }
.playlist-list-number strong { display: block; color: var(--ink); font-family: Georgia, serif; font-size: 17px; font-weight: 500; }
.playlist-list-number small { display: block; margin-top: 2px; color: #89968f; font-size: 8px; }
.playlist-list-link { justify-self: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--jade); font-size: 9px; font-weight: 700; }
.playlist-list-link:hover { color: var(--white); border-color: var(--jade); background: var(--jade); }
.playlist-items-empty { display: grid; min-height: 180px; place-items: center; color: var(--ink-soft); font-size: 11px; }

.library { padding-top: 40px; padding-bottom: 120px; }
.library-heading > p { font-variant-numeric: tabular-nums; }
.library-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px 12px; }
.library-actions p { margin: 0; color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.manage-categories { padding: 8px 13px; border: 1px solid var(--jade); border-radius: 999px; color: var(--jade); background: transparent; font-size: 11px; font-weight: 700; }
.manage-categories:hover { color: var(--white); background: var(--jade); }
.manage-categories:disabled { cursor: wait; opacity: .6; }
.sync-status { flex-basis: 100%; color: var(--ink-soft); font-size: 10px; text-align: right; }
.sync-status.is-error { color: #a33d2b; }
.sync-reload { padding: 5px 10px; border: 0; border-radius: 999px; color: var(--white); background: var(--jade); font-size: 10px; font-weight: 700; }
.filters { display: grid; grid-template-columns: minmax(280px, 1fr) repeat(4, auto); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 8px 35px rgba(16, 49, 40, .04); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 13px; width: 19px; fill: none; stroke: var(--ink-soft); stroke-width: 1.7; }
.search-box input { width: 100%; height: 45px; padding: 0 55px 0 43px; border: 0; border-radius: 10px; outline: 0; color: var(--ink); background: var(--paper); }
.search-box input:focus { box-shadow: inset 0 0 0 2px var(--jade); }
.search-box kbd { position: absolute; right: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: #84918c; background: var(--white); font-size: 10px; }
.filters select { height: 45px; padding: 0 34px 0 13px; border: 0; border-left: 1px solid var(--line); outline: 0; color: var(--ink); background: var(--white); font-size: 12px; }
.filters select:focus { box-shadow: 0 0 0 2px var(--jade); border-radius: 8px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 34px; }
.category-pill { padding: 9px 15px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 600; transition: .2s; }
.category-pill:hover, .category-pill.active { border-color: var(--forest); background: var(--forest); color: var(--white); }
.active-filter { margin: -16px 0 28px; color: var(--ink-soft); font-size: 12px; }
.active-filter button { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--jade); }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 18px; }
.video-card { min-width: 0; }
.thumbnail-wrap { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: #dfe7e2; box-shadow: 0 7px 24px rgba(10, 40, 32, .07); }
.thumbnail-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.video-card:hover img { transform: scale(1.035); }
.duration-badge { position: absolute; right: 9px; bottom: 9px; padding: 4px 7px; border-radius: 5px; background: rgba(4, 14, 11, .86); color: var(--white); font-size: 10px; font-variant-numeric: tabular-nums; }
.play-button { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; opacity: 0; transition: opacity .2s, background .2s; }
.play-button::before { content: "▶"; display: grid; place-items: center; width: 54px; aspect-ratio: 1; padding-left: 3px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--forest); box-shadow: 0 8px 30px rgba(0,0,0,.16); }
.video-card:hover .play-button, .play-button:focus-visible { opacity: 1; background: rgba(7, 31, 24, .18); }
.video-info { padding: 16px 4px 0; }
.video-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: #73817c; font-size: 10px; letter-spacing: .02em; }
.video-meta .category-tag { color: var(--jade); font-weight: 700; }
.type-tag { padding: 3px 6px; border-radius: 4px; color: var(--forest); background: var(--mint-pale); font-size: 9px; font-weight: 800; }
.type-short { color: #765312; background: #fff2d7; }
.type-live { color: #8f3540; background: #fde8eb; }
.video-info h3 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 50px; margin: 0; font-size: 15px; line-height: 1.65; font-weight: 700; }
.video-info h3 a:hover { color: var(--jade); }
.video-stats { display: flex; justify-content: space-between; margin-top: 12px; color: #88948f; font-size: 10px; }
.video-stats a { opacity: 0; color: var(--jade); font-weight: 700; transition: opacity .2s; }
.video-card:hover .video-stats a, .video-stats a:focus-visible { opacity: 1; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 54px; }
.button-outline { min-width: 180px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--forest); color: var(--white); }
.empty-state { padding: 80px 20px; border: 1px dashed #c9d4ce; border-radius: var(--radius); text-align: center; }
.empty-state > span { font-family: Georgia, serif; color: var(--jade); font-size: 60px; }
.empty-state h3 { margin: 6px 0; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.empty-state p { margin: 0 0 24px; color: var(--ink-soft); font-size: 13px; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 55px max(24px, calc((100vw - 1180px) / 2)); background: var(--forest); color: var(--white); }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand .brand-mark { color: var(--forest); background: var(--mint); }
.footer-brand strong { font-size: 14px; }
.footer-brand p { margin: 6px 0 0; color: #88a098; font-size: 11px; }
.footer-meta { text-align: right; }
.footer-meta a { color: var(--mint); font-size: 12px; font-weight: 700; }
.footer-meta p { margin: 9px 0 0; color: #718a81; font-size: 10px; }

dialog { width: min(920px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: var(--white); box-shadow: 0 30px 100px rgba(0,0,0,.36); }
dialog::backdrop { background: rgba(4, 19, 15, .78); backdrop-filter: blur(5px); }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.dialog-bar > div > p { margin: 0 0 3px; color: var(--jade); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dialog-bar h2 { margin: 0; font-size: 13px; }
.dialog-bar button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 24px; line-height: 1; }
.player-frame { aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.dialog-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px 22px; }
.dialog-meta p { overflow: hidden; margin: 0; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dialog-meta a { flex: none; color: var(--jade); font-size: 12px; font-weight: 700; }
.playlist-dialog { max-height: min(820px, calc(100vh - 40px)); }
.playlist-dialog .dialog-bar { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line); background: var(--white); }
.playlist-dialog-summary { display: flex; justify-content: space-between; gap: 20px; padding: 14px 20px; color: var(--ink-soft); background: var(--paper); font-size: 11px; }
.playlist-dialog-summary a { color: var(--jade); font-weight: 700; }
.playlist-items { max-height: calc(100vh - 190px); overflow-y: auto; padding: 8px 20px 24px; }
.playlist-item { display: grid; grid-template-columns: 28px 130px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.playlist-item-index { color: #91a09a; font-family: Georgia, serif; font-size: 13px; text-align: center; }
.playlist-item-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 8px; background: #dce5e0; }
.playlist-item-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.playlist-item-thumb:hover img { transform: scale(1.04); }
.playlist-item-thumb::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); background: rgba(5, 27, 21, .24); opacity: 0; transition: opacity .2s; }
.playlist-item-thumb:hover::after { opacity: 1; }
.playlist-item-copy { min-width: 0; }
.playlist-item-copy strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 1.55; }
.playlist-item-copy span { display: block; margin-top: 6px; color: #83918c; font-size: 9px; }
.playlist-item > a { color: var(--jade); font-size: 10px; font-weight: 700; white-space: nowrap; }
.category-dialog { width: min(1060px, calc(100% - 32px)); max-height: min(880px, calc(100vh - 28px)); }
.category-dialog .dialog-bar { position: sticky; top: 0; z-index: 4; border-bottom: 1px solid var(--line); background: var(--white); }
.category-editor-toolbar { position: sticky; top: 67px; z-index: 3; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(165px, .8fr) minmax(145px, .65fr) minmax(230px, .9fr); align-items: end; gap: 10px; padding: 12px 20px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.category-editor-field { display: grid; gap: 6px; }
.category-editor-field > span { color: var(--ink-soft); font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.category-editor-toolbar input, .category-editor-toolbar select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--ink); background: var(--white); font-size: 12px; }
.category-editor-toolbar input:focus, .category-editor-toolbar select:focus { border-color: var(--jade); box-shadow: 0 0 0 2px rgba(21,119,100,.12); }
#custom-category-form { display: grid; grid-template-columns: 1fr auto; }
#custom-category-form input { border-radius: 9px 0 0 9px; }
#custom-category-form button { padding: 0 13px; border: 0; border-radius: 0 9px 9px 0; color: var(--white); background: var(--forest); font-size: 11px; font-weight: 700; }
.category-editor-summary { display: flex; justify-content: space-between; padding: 11px 20px; color: var(--ink-soft); background: var(--white); font-size: 10px; }
#category-save-status { color: var(--jade); font-weight: 700; }
.category-editor-list { max-height: calc(100vh - 260px); overflow-y: auto; padding: 0 20px 10px; }
.category-editor-empty { display: grid; place-items: center; gap: 7px; min-height: 220px; color: var(--ink-soft); text-align: center; }
.category-editor-empty strong { color: var(--ink); font-size: 14px; }
.category-editor-empty span { font-size: 10px; }
.category-editor-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 180px; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.category-editor-row img { width: 74px; aspect-ratio: 16 / 9; border-radius: 7px; object-fit: cover; background: #dce5e0; }
.category-editor-title { min-width: 0; }
.category-editor-title strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.category-editor-title span { display: inline-block; margin-top: 5px; color: #85938e; font-size: 9px; }
.category-editor-title .manual-label { color: var(--jade); font-weight: 700; }
.category-editor-row select { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font-size: 11px; }
.category-editor-footer { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--white); }
.category-editor-footer p { margin: 0 auto 0 0; color: var(--ink-soft); font-size: 10px; }
.category-editor-footer .button { min-height: 40px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 60px; padding-top: 82px; padding-bottom: 82px; }
  .hero-copy { padding-right: 0; }
  .hero-panel { width: 100%; justify-self: start; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .playlist-list-header, .playlist-list-row { grid-template-columns: 30px minmax(0, 1fr) 190px; }
  .playlist-list-meta { grid-template-columns: 70px 120px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
  .filters select { width: 100%; border-left: 0; }
}

@media (max-width: 680px) {
  :root { --shell: calc(100% - 32px); }
  .site-header { height: 68px; padding-inline: 16px; }
  nav > a:not(.youtube-link) { display: none; }
  .youtube-link { padding: 8px 12px; font-size: 11px; }
  .brand-mark { width: 36px; }
  .hero { min-height: 0; padding: 68px 20px; }
  .hero h1 { font-size: clamp(43px, 13vw, 60px); }
  .hero-intro { font-size: 15px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .hero-panel { padding: 24px; }
  .hero-count strong { font-size: 68px; }
  .section-shell { padding-block: 76px; }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; }
  .section-heading > p { text-align: left; }
  .stat-grid { gap: 10px; }
  .stat-card { min-height: 150px; padding: 20px; }
  .stat-card strong { font-size: 34px; }
  .chart-card, .category-card { padding: 22px 18px; }
  .year-chart { gap: 8px; }
  .year-bar strong { font-size: 12px; }
  .category-row { grid-template-columns: 105px 1fr 26px; gap: 8px; }
  .library { padding-top: 10px; }
  .filters { grid-template-columns: 1fr; padding: 9px; }
  .search-box { grid-column: auto; }
  .filters label { min-width: 0; }
  .filters select { padding-left: 12px; border-top: 1px solid var(--line); }
  .video-grid { grid-template-columns: 1fr; gap: 34px; }
  .playlist-list-header { display: none; }
  .playlist-list-row { grid-template-columns: 24px minmax(0, 1fr); gap: 8px 10px; padding: 10px; }
  .playlist-list-index { align-self: start; padding-top: 22px; }
  .playlist-list-open { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .playlist-list-open img { width: 88px; }
  .playlist-list-copy strong { white-space: normal; }
  .playlist-list-copy > span { display: none; }
  .playlist-list-row > .playlist-list-meta { grid-column: 2; grid-template-columns: 94px minmax(90px, 1fr); justify-self: stretch; text-align: left; }
  .playlist-list-number strong, .playlist-list-number small { display: inline; }
  .playlist-list-number strong { margin-right: 3px; font-size: 13px; }
  .playlist-list-link { justify-self: end; }
  .video-info h3 { min-height: 0; }
  .video-stats a { opacity: 1; }
  footer { align-items: flex-start; flex-direction: column; }
  .footer-meta { text-align: left; }
  .dialog-meta { align-items: flex-start; flex-direction: column; }
  .dialog-meta p { width: 100%; white-space: normal; }
  .playlist-dialog-summary { align-items: flex-start; flex-direction: column; }
  .playlist-items { padding-inline: 14px; }
  .playlist-item { grid-template-columns: 22px 88px minmax(0, 1fr); gap: 9px; }
  .playlist-item > a { display: none; }
  .library-actions { align-items: flex-start; flex-direction: column; }
  .category-editor-toolbar { top: 67px; grid-template-columns: 1fr; }
  .category-editor-row { grid-template-columns: 60px minmax(0, 1fr); }
  .category-editor-row img { width: 60px; }
  .category-editor-row select { grid-column: 1 / -1; }
  .category-editor-footer { flex-wrap: wrap; }
  .category-editor-footer p { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
