:root {
      --paper: #f5f3ee;
      --surface: #ffffff;
      --ink: #172027;
      --muted: #68737b;
      --line: #d9ddd9;
      --cyan: #007f91;
      --cyan-dark: #075d69;
      --coral: #e85d4a;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      color: var(--ink);
      background-color: var(--paper);
      font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
      letter-spacing: 0;
    }

    button, input, select { font: inherit; }
    .clipboard-fallback { position: fixed; opacity: 0; pointer-events: none; }
    button, select { cursor: pointer; }
    a { color: inherit; }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 10;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
    }

    .nav {
      width: min(1180px, calc(100% - 32px));
      min-height: 68px;
      margin: auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
    .brand-mark {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      color: #fff;
      background: var(--cyan);
      border-radius: 6px;
      font-family: Georgia, serif;
      font-size: 22px;
      font-weight: 700;
    }
    .brand-name { font-family: Georgia, "Yu Mincho", serif; font-weight: 700; font-size: 20px; }
    .unofficial { color: var(--muted); font-size: 12px; }

    .nav-links { display: flex; gap: 22px; color: var(--muted); font-size: 14px; }
    .nav-links a { text-decoration: none; }
    .nav-links a:hover { color: var(--cyan-dark); }

    main { width: min(1180px, calc(100% - 32px)); margin: 0 auto 64px; }

    .intro {
      min-height: 250px;
      padding: 48px 0 34px;
      display: grid;
      grid-template-columns: 1fr minmax(280px, 460px);
      align-items: end;
      gap: 42px;
      border-bottom: 1px solid var(--line);
    }

    .eyebrow { margin: 0 0 10px; color: var(--coral); font-weight: 700; font-size: 13px; }
    h1 { margin: 0; max-width: 720px; overflow-wrap: anywhere; font: 700 clamp(34px, 5vw, 62px)/1.08 Georgia, "Yu Mincho", serif; }
    .intro-copy { margin: 20px 0 0; max-width: 640px; color: var(--muted); line-height: 1.8; }

    .search-box {
      padding: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--surface);
      border: 1px solid var(--ink);
    }
    .search-box input { width: 100%; min-width: 0; padding: 13px 12px; border: 0; outline: 0; background: transparent; }
    .search-box button { padding: 12px 18px; color: white; background: var(--ink); border: 0; border-radius: 4px; white-space: nowrap; }

    .workspace { padding-top: 30px; }
    .content { min-width: 0; }

    .youtube-attribution { margin-top: 24px; display: flex; justify-content: flex-end; }
    .youtube-attribution a { flex: 0 0 auto; max-width: 100%; display: block; background: #fff; line-height: 0; }
    .youtube-attribution-logo { width: 298px; max-width: 100%; height: auto; display: block; aspect-ratio: 1705 / 573; object-fit: contain; }

    .results-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
    .results-head h2 { margin: 0 0 5px; font: 700 26px Georgia, "Yu Mincho", serif; }
    #resultSummary { color: var(--muted); font-size: 13px; }
    .update-times { margin-top: 5px; display: grid; gap: 2px; color: var(--cyan-dark); font-size: 11px; }
    #resultSummary[data-loading="true"] { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan-dark); }
    #resultSummary[data-loading="true"]::before { content: ""; width: 11px; height: 11px; flex: 0 0 11px; border: 2px solid #b8d6d4; border-top-color: var(--cyan); border-radius: 50%; animation: history-loading-spin .75s linear infinite; }
    @keyframes history-loading-spin { to { transform: rotate(360deg); } }
    select { padding: 9px 34px 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }

    .access-tabs { margin-bottom: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ink); }
    .access-tab { padding: 11px 16px; color: var(--ink); background: var(--surface); border: 0; }
    .access-tab + .access-tab { border-left: 1px solid var(--ink); }
    .access-tab:hover { background: #e8f3f2; }
    .access-tab.active { color: #fff; background: var(--cyan-dark); font-weight: 700; }
    .media-tabs { margin-bottom: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); }
    .media-tabs[hidden], .period-panel[hidden], .filter-controls label[hidden], .tag-search[hidden], #hashtagSummary[hidden], #hashtagCloud[hidden] { display: none; }
    .media-tab { padding: 12px 16px; color: var(--ink); background: var(--surface); border: 0; }
    .media-tab + .media-tab { border-left: 1px solid var(--ink); }
    .media-tab:hover { background: #e8f3f2; }
    .media-tab.active { color: #fff; background: var(--ink); font-weight: 700; }
    .media-tab:disabled { cursor: not-allowed; color: #8b9397; background: #f0f1ef; }
    .media-tab.active:disabled { color: #fff; background: #68737b; }
    .media-availability-note { margin: -14px 0 24px; padding: 10px 12px; color: var(--muted); background: #f0f1ef; border-left: 3px solid #8b9397; font-size: 11px; line-height: 1.7; }
    .media-availability-note[hidden] { display: none; }

    .active-filter-bar {
      position: sticky;
      top: 68px;
      z-index: 9;
      margin-bottom: 16px;
      padding: 12px 14px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      background: #edf3f1;
      border-block: 1px solid #cbd9d5;
      box-shadow: 0 5px 12px rgba(23, 32, 39, .08);
    }
    .active-filter-bar[hidden] { display: none; }
    .active-filter-label { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
    .active-filter-label h2 { margin: 0; font-size: 12px; }
    .active-filter-label span { color: var(--muted); font-size: 10px; }
    .active-filter-chips { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
    .active-filter-chip { max-width: 100%; padding: 7px 12px; display: inline-flex; align-items: center; gap: 8px; color: var(--cyan-dark); background: var(--surface); border: 1px solid #aac7c4; border-radius: 3px; font-size: 16px; }
    .active-filter-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .active-filter-chip b { color: var(--muted); font-size: 19px; line-height: 1; }
    .active-filter-chip.fixed { color: var(--ink); background: #f6f7f5; border-color: var(--line); }
    .active-filter-chip:hover { color: #fff; background: var(--cyan-dark); border-color: var(--cyan-dark); }
    .active-filter-chip.fixed:hover { color: var(--ink); background: #f6f7f5; border-color: var(--line); }
    .active-filter-chip:hover b { color: inherit; }
    .filter-actions { display: flex; align-items: center; gap: 6px; }
    .filter-scroll-top { width: 32px; height: 32px; flex: 0 0 32px; padding: 0; display: grid; place-items: center; color: var(--cyan-dark); background: var(--surface); border: 1px solid #aac7c4; border-radius: 3px; font-size: 17px; font-weight: 700; line-height: 1; }
    .filter-scroll-top:hover, .filter-scroll-top:focus-visible { color: #fff; background: var(--cyan-dark); border-color: var(--cyan-dark); outline: 0; }
    .filter-reset { min-height: 32px; padding: 6px 10px; color: #8f3e35; background: var(--surface); border: 1px solid #d9aaa3; border-radius: 3px; font-size: 11px; font-weight: 700; white-space: nowrap; }
    .filter-reset:hover { color: #fff; background: #a8483c; border-color: #a8483c; }
    .filter-reset:disabled { cursor: default; opacity: .45; }
    .floating-scroll-top { position: fixed; right: clamp(14px, 2vw, 28px); bottom: 20px; z-index: 20; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: #fff; background: rgba(18, 91, 100, .88); border: 1px solid rgba(255, 255, 255, .72); border-radius: 4px; box-shadow: 0 5px 16px rgba(23, 32, 39, .24); opacity: .58; font-size: 22px; font-weight: 700; line-height: 1; transition: opacity .16s ease, background-color .16s ease; }
    .floating-scroll-top[hidden] { display: none; }
    .floating-scroll-top:hover, .floating-scroll-top:focus-visible { background: var(--cyan-dark); opacity: 1; outline: 2px solid rgba(0, 127, 145, .28); outline-offset: 2px; }

    .period-panel { margin-bottom: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); }
    .mobile-panel-toggle { display: none; }
    .period-head { margin-bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
    .period-head h2 { margin: 0; font: 700 20px Georgia, "Yu Mincho", serif; }
    .period-head span { color: var(--muted); font-size: 12px; }
    .period-controls { margin-bottom: 16px; display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
    .period-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
    .period-controls select { min-width: 132px; padding-block: 8px; }
    .period-all { min-height: 37px; padding: 8px 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
    .period-all:hover, .period-all.active { color: #fff; background: var(--cyan); border-color: var(--cyan); }
    .period-presets { display: flex; min-height: 37px; border: 1px solid var(--line); }
    .period-preset { min-width: 66px; padding: 8px 10px; color: var(--ink); background: var(--surface); border: 0; }
    .period-preset + .period-preset { border-left: 1px solid var(--line); }
    .period-preset:hover { background: #e8f3f2; }
    .period-preset.active { color: #fff; background: var(--cyan-dark); font-weight: 700; }
    .age-periods { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ink); }
    .age-period { min-width: 0; min-height: 62px; padding: 10px 14px; display: grid; place-content: center; gap: 5px; color: var(--ink); background: var(--surface); border: 0; text-align: center; }
    .age-period + .age-period { border-left: 1px solid var(--ink); }
    .age-period span { font-weight: 800; }
    .age-period small { color: var(--muted); font-size: 10px; white-space: nowrap; }
    .age-period:hover { background: #e8f3f2; }
    .age-period.active { color: #fff; background: var(--cyan-dark); }
    .age-period.active small { color: rgba(255,255,255,.8); }
    .age-period:disabled { cursor: default; opacity: .45; }

    .filter-panel { margin-bottom: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); }
    .filter-head { margin-bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
    .filter-head h2 { margin: 0; font: 700 20px Georgia, "Yu Mincho", serif; }
    .filter-head span { color: var(--muted); font-size: 11px; }
    .filter-controls { margin-bottom: 14px; display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) minmax(260px, 1.5fr) auto; align-items: end; gap: 12px; }
    .filter-controls label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
    .filter-controls select, .filter-controls input { width: 100%; min-width: 0; height: 38px; padding: 8px 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
    .filter-controls select:focus, .filter-controls input:focus { outline: 2px solid rgba(0, 127, 145, .22); border-color: var(--cyan); }
    .topic-summary { color: var(--muted); font-size: 11px; }
    .topic-cloud { min-height: 32px; display: grid; gap: 14px; }
    .tag-category-section { display: grid; gap: 7px; }
    .tag-category-section > span { color: var(--muted); font-size: 11px; font-weight: 700; }
    .tag-category-list { display: flex; flex-wrap: wrap; gap: 7px; }
    .tag-category-chip { min-height: 34px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); background: #eef0ee; border: 1px solid #cdd2cf; border-radius: 999px; font-size: 13px; font-weight: 700; }
    .tag-category-chip span { color: var(--muted); font-size: 10px; font-weight: 400; }
    .tag-category-chip.format { color: #655016; background: #fff8df; border-color: #dec978; }
    .tag-category-chip.game { color: #176344; background: #edf8f1; border-color: #add6bd; }
    .tag-category-chip.music { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; }
    .tag-category-chip.setlist { color: #244f91; background: #eef4ff; border-color: #aec5eb; }
    .tag-category-chip.hashtag { color: var(--cyan-dark); background: #edf6f5; border-color: #aac7c4; }
    .tag-category-chip:hover, .tag-category-chip.active { color: #fff; background: var(--ink); border-color: var(--ink); }
    .tag-category-chip:hover span, .tag-category-chip.active span { color: rgba(255,255,255,.78); }
    .tag-discovery-menus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tag-discovery-menu { min-width: 0; }
    .tag-discovery-menu summary { min-height: 48px; padding: 10px 42px 10px 14px; position: relative; display: grid; align-content: center; gap: 2px; color: #fff; background: var(--ink); cursor: pointer; list-style: none; }
    .tag-discovery-menu.random-tags-menu summary { background: var(--cyan-dark); }
    .tag-discovery-menu summary::-webkit-details-marker { display: none; }
    .tag-discovery-menu summary::after { content: "+"; position: absolute; right: 15px; top: 50%; font-size: 20px; font-weight: 700; transform: translateY(-50%); }
    .tag-discovery-menu[open] summary::after { content: "−"; }
    .tag-discovery-menu summary span { font-size: 13px; font-weight: 800; }
    .tag-discovery-menu summary small { color: rgba(255,255,255,.72); font-size: 10px; }
    .tag-discovery-options { padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
    .random-tags-actions { width: 100%; display: flex; justify-content: flex-end; }
    .random-tags-refresh { min-height: 32px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; color: var(--cyan-dark); background: #edf6f5; border: 1px solid #aac7c4; border-radius: 3px; font-size: 18px; line-height: 1; }
    .random-tags-refresh span { font-size: 10px; font-weight: 700; }
    .random-tags-refresh:hover, .random-tags-refresh:focus-visible { color: #fff; background: var(--cyan-dark); border-color: var(--cyan-dark); outline: 0; }
    .filter-policy { margin: 14px 0 0; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; line-height: 1.7; }
    .topic-section { min-width: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
    .topic-section + .topic-section { padding-top: 12px; border-top: 1px solid #eceeeb; }
    .topic-section-head { padding-top: 6px; display: flex; justify-content: space-between; gap: 6px; color: var(--muted); }
    .topic-section-head h3 { margin: 0; color: var(--ink); font-size: 11px; }
    .topic-section-head span { font-size: 9px; white-space: nowrap; }
    .topic-section-chips { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
    .topic-chip { padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 17px; }
    .topic-chip:hover, .topic-chip.active { color: white; background: var(--cyan); border-color: var(--cyan); }
    .topic-chip.hashtag { color: var(--cyan-dark); background: #edf6f5; border-color: #aac7c4; }
    .topic-chip.hashtag:hover, .topic-chip.hashtag.active { color: #fff; background: var(--cyan); border-color: var(--cyan); }
    .topic-chip.game { color: #176344; background: #edf8f1; border-color: #add6bd; }
    .topic-chip.game:hover, .topic-chip.game.active { color: #fff; background: #24764f; border-color: #24764f; }
    .topic-chip.music { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; }
    .topic-chip.music:hover, .topic-chip.music.active { color: #fff; background: #b85245; border-color: #b85245; }
    .topic-chip.holodori { color: #244f91; background: #eef4ff; border-color: #aec5eb; }
    .topic-chip.holodori:hover, .topic-chip.holodori.active { color: #fff; background: #3566ad; border-color: #3566ad; }
    .topic-chip.setlist { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; }
    .topic-chip.setlist:hover, .topic-chip.setlist.active { color: #fff; background: #b85245; border-color: #b85245; }
    .topic-chip.format { color: #655016; background: #fff8df; border-color: #dec978; }
    .topic-chip.format:hover, .topic-chip.format.active { color: #fff; background: #7b641d; border-color: #7b641d; }
    .topic-count { margin-left: 7px; color: var(--muted); font-size: 14px; }
    .topic-chip:hover .topic-count, .topic-chip.active .topic-count { color: inherit; }
    .topic-chip.hashtag .topic-count { color: #527379; }
    .topic-empty { color: var(--muted); font-size: 12px; }

    .video-grid { display: grid; gap: 14px; overflow-anchor: none; }
    .history-batch-divider { margin: 10px 0 2px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; color: var(--cyan-dark); background: #e2f0ee; border-block: 2px solid #80b9b6; font-size: 13px; }
    .history-batch-divider span { font-weight: 800; }
    .history-batch-divider strong { color: var(--muted); font-size: 11px; white-space: nowrap; }
    .video-card { overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
    .card-body { padding: 18px; }
    .talent-row { margin-bottom: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--cyan-dark); font-size: 12px; font-weight: 700; }
    .card-filter-chip { max-width: 100%; padding: 5px 8px; overflow-wrap: anywhere; color: var(--cyan-dark); background: #edf6f5; border: 1px solid #c8dfdd; border-radius: 3px; font-size: 14px; font-weight: 700; line-height: 1.25; }
    .card-filter-chip.group { color: #655016; background: #fff8df; border-color: #dec978; }
    .card-filter-chip.media { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; }
    .card-filter-chip.organization { color: #244f91; background: #eef4ff; border-color: #aec5eb; }
    .card-filter-chip.organization { display: inline-flex; align-items: center; gap: 6px; }
    .organization-channel-icon { width: 22px; height: 22px; flex: 0 0 22px; display: block; object-fit: cover; border: 1px solid rgba(23, 32, 39, .14); border-radius: 50%; background: #fff; }
    .card-filter-chip:hover, .card-filter-chip:focus-visible, .card-filter-chip.active { color: #fff; background: var(--cyan-dark); border-color: var(--cyan-dark); outline: 0; }
    .card-filter-chip.group:hover, .card-filter-chip.group:focus-visible, .card-filter-chip.group.active { background: #7b641d; border-color: #7b641d; }
    .card-filter-chip.media:hover, .card-filter-chip.media:focus-visible, .card-filter-chip.media.active { background: #b85245; border-color: #b85245; }
    .card-filter-chip.organization:hover, .card-filter-chip.organization:focus-visible, .card-filter-chip.organization.active { background: #3566ad; border-color: #3566ad; }
    .card-filter-context { color: var(--muted); font-weight: 400; }
    .card-filter-context + .card-filter-context::before { content: "·"; margin-right: 5px; }
    .video-title { margin: 0 0 8px; overflow-wrap: anywhere; font-size: 17px; line-height: 1.5; }
    .video-title a { min-width: 0; text-decoration-color: var(--line); text-underline-offset: 4px; }
    .video-title a:hover { color: var(--cyan-dark); text-decoration-color: var(--cyan); }
    .video-card-meta { margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
    .video-copy-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 5px; }
    .video-copy-button { padding: 4px 6px; color: var(--cyan-dark); background: #edf6f5; border: 1px solid #c8dfdd; border-radius: 3px; font-size: 10px; line-height: 1.2; white-space: nowrap; }
    .video-copy-button:hover { color: #fff; background: var(--cyan); border-color: var(--cyan); }
    .video-copy-button[data-copy-state="copied"] { color: #176344; background: #edf8f1; border-color: #add6bd; }
    .video-copy-button[data-copy-state="failed"] { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; }
    .video-status-controls { min-width: 0; flex: 1 1 560px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
    .watch-status-control { min-height: 28px; padding: 4px 7px; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; color: var(--muted); background: #f6f7f5; border: 1px solid var(--line); border-radius: 3px; font-size: 11px; font-weight: 700; cursor: pointer; }
    .watch-status-control:has(input:checked) { color: #176344; background: #edf8f1; border-color: #add6bd; }
    .watch-status-control input { width: 15px; height: 15px; margin: 0; accent-color: #24764f; cursor: pointer; }
    .video-status-control.later:has(input:checked) { color: #244f91; background: #eef4ff; border-color: #aec5eb; }
    .video-status-control.later input { accent-color: #3566ad; }
    .video-status-control.repeat:has(input:checked) { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; }
    .video-status-control.repeat input { accent-color: #b85245; }
    .video-status-control.hidden:has(input:checked) { color: #5a4141; background: #f4eded; border-color: #cbb7b7; }
    .video-status-control.hidden input { accent-color: #705050; }
    .watch-checked-date { padding-left: 7px; color: #4c6658; border-left: 1px solid #add6bd; font-size: 10px; font-weight: 400; white-space: nowrap; }
    .watch-checked-date[hidden] { display: none; }
    .video-metrics { min-width: 0; flex: 1 1 440px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: 11px; }
    .video-metrics span { display: inline-flex; align-items: baseline; gap: 5px; }
    .video-metrics b { color: var(--ink); font-size: 10px; }
    .video-metrics time { display: inline-flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: 10px; }
    .video-metrics .metric-highlight-notable { color: #a84b00; font-weight: 700; }
    .video-metrics .metric-highlight-exceptional { color: #b42318; font-weight: 800; }
    .members-only-badge { padding: 3px 7px; color: #7a3d00; background: #fff3df; border: 1px solid #dfbd7d; border-radius: 3px; font-size: 10px; font-weight: 800; }
    .official-channel-badge { color: #075d69; background: #edf6f5; border-color: #aac7c4; }
    .metric-signal { margin-left: 3px; font-size: 10px; line-height: 1; }
    .metric-highlight-notable .metric-signal { color: #a84b00; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .video-references { margin: -5px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; color: var(--muted); font-size: 11px; }
    .video-references > span { color: var(--ink); font-size: 10px; font-weight: 800; }
    .video-references a { color: var(--cyan-dark); text-decoration: none; text-underline-offset: 3px; }
    .video-references a:hover { text-decoration: underline; }
    .video-caption-contexts { margin: 10px 0 2px; padding-top: 10px; border-top: 1px solid var(--line); }
    .caption-context-head { margin-bottom: 7px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
    .caption-context-head strong { font-size: 11px; }
    .caption-context-head span { color: var(--muted); font-size: 9px; }
    .video-caption-contexts ul { margin: 0; padding: 0; display: grid; gap: 4px; list-style: none; }
    .video-caption-contexts a { min-width: 0; padding: 6px 7px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 12px; gap: 7px; align-items: baseline; color: var(--ink); background: #f4f8f7; border: 1px solid #dbe6e3; border-radius: 4px; text-decoration: none; }
    .video-caption-contexts a:hover { background: #e8f3f2; border-color: #bdd9d8; }
    .video-caption-contexts time { color: var(--cyan-dark); font-family: Consolas, monospace; font-size: 10px; font-weight: 700; }
    .video-caption-contexts a span:nth-of-type(1) { min-width: 0; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
    .video-caption-contexts a span:last-child { color: var(--cyan); font-size: 11px; }
    .video-guests { margin: -4px 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
    .guest-chip { padding: 6px 10px; color: #654d19; background: #fff8df; border: 1px solid #ddc67b; border-radius: 3px; font-size: 16px; font-weight: 700; }
    .guest-chip:hover { color: #fff; background: #8a6a22; border-color: #8a6a22; }
    .video-performers { margin: -4px 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
    .performer-chip { padding: 6px 10px; color: #244f91; background: #eef4ff; border: 1px solid #aec5eb; border-radius: 3px; font-size: 16px; font-weight: 700; }
    .performer-chip:hover { color: #fff; background: #3566ad; border-color: #3566ad; }
    .video-hashtags { margin: -4px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
    .video-hashtag { padding: 6px 10px; color: var(--cyan-dark); background: #edf6f5; border: 1px solid #c8dfdd; border-radius: 3px; font-size: 16px; }
    .video-hashtag:hover { color: #fff; background: var(--cyan); border-color: var(--cyan); }
    .video-hashtag.game { color: #176344; background: #edf8f1; border-color: #add6bd; font-weight: 700; }
    .video-hashtag.game:hover { color: #fff; background: #24764f; border-color: #24764f; }
    .video-hashtag.music { color: #8f3e35; background: #fff1ee; border-color: #e9b8b0; font-weight: 700; }
    .video-hashtag.music:hover { color: #fff; background: #b85245; border-color: #b85245; }
    .video-hashtag.holodori { color: #244f91; background: #eef4ff; border-color: #aec5eb; font-weight: 700; }
    .video-hashtag.holodori:hover { color: #fff; background: #3566ad; border-color: #3566ad; }
    .video-hashtag.format { color: #655016; background: #fff8df; border-color: #dec978; font-weight: 700; }
    .video-hashtag.format:hover { color: #fff; background: #7b641d; border-color: #7b641d; }
    .video-setlist { min-width: 0; margin-top: 2px; border-top: 1px solid var(--line); }
    .setlist-head { min-width: 0; display: grid; grid-template-columns: 174px minmax(0, 1fr); align-items: start; column-gap: 8px; }
    .setlist-toggle { min-height: 41px; padding: 8px 0; display: flex; align-items: center; gap: 7px; color: var(--ink); background: transparent; border: 0; font-size: 12px; font-weight: 700; text-align: left; }
    .setlist-toggle strong { padding: 2px 6px; color: #8f3e35; background: #fff1ee; border: 1px solid #e9b8b0; border-radius: 3px; font-size: 10px; }
    .setlist-disclosure { width: 13px; color: var(--cyan-dark); font-size: 14px; text-align: center; }
    .setlist-filter-tags { min-width: 0; padding: 7px 0; display: flex; flex-wrap: wrap; gap: 5px; }
    .setlist-filter-tag { max-width: 100%; padding: 7px 10px; overflow-wrap: anywhere; color: #8f3e35; background: #fff1ee; border: 1px solid #e9b8b0; border-radius: 3px; font-size: 14px; font-weight: 700; text-align: left; }
    .setlist-filter-tag:hover { color: #fff; background: #b85245; border-color: #b85245; }
    .setlist-content { min-width: 0; }
    .setlist-content[hidden] { display: none; }
    .setlist-meta { margin: 10px 0 8px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
    .setlist-meta a, .video-setlist-empty a { color: var(--cyan-dark); text-underline-offset: 3px; }
    .setlist-songs { width: 100%; max-height: 360px; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 5px; list-style: none; }
    .setlist-songs li { min-width: 0; display: grid; grid-template-columns: 54px minmax(0, 1fr) 16px; gap: 8px; align-items: center; background: #f5f7f5; border: 1px solid transparent; border-radius: 4px; }
    .setlist-songs li:hover { background: #e8f3f2; border-color: #bdd9d8; }
    .setlist-time { padding: 8px 0 8px 9px; color: var(--coral); font-family: Consolas, monospace; font-size: 12px; font-weight: 700; text-decoration: none; }
    .setlist-song-copy { min-width: 0; padding: 8px 0; display: grid; gap: 2px; color: var(--ink); }
    .setlist-song-copy strong { overflow-wrap: anywhere; font-size: 13px; }
    .semantic-headlines-title { margin: 0; padding: 10px 0; font-size: 13px; font-weight: 700; }
    .semantic-headlines-title span { margin-left: 8px; color: var(--muted); font-weight: 400; }
    .semantic-time-note { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 400; white-space: nowrap; }
    .semantic-headlines .setlist-meta { flex-wrap: wrap; }
    .semantic-headlines .setlist-songs { max-height: none; overflow: visible; }
    .semantic-headlines .setlist-songs li { grid-template-columns: 66px minmax(0, 1fr); padding-right: 8px; }
    .semantic-section-title { margin: 12px 0 6px; font-size: 12px; }
    .setlist-song-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .setlist-play { padding: 8px 8px 8px 0; color: var(--cyan); font-weight: 700; text-decoration: none; }
    .video-setlist-empty { padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
    .moments { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
    .moment {
      min-width: 0;
      padding: 9px 10px;
      display: grid;
      grid-template-columns: 58px 1fr 18px;
      gap: 8px;
      align-items: center;
      color: var(--ink);
      background: #f5f7f5;
      border: 1px solid transparent;
      border-radius: 4px;
      text-decoration: none;
    }
    .moment:hover { background: #e8f3f2; border-color: #bdd9d8; }
    .time { color: var(--coral); font-family: Consolas, monospace; font-size: 12px; font-weight: 700; }
    .moment-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .arrow { color: var(--cyan); font-weight: 700; }
    .empty { display: none; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line); text-align: center; color: var(--muted); }
    .empty strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 18px; }

    .history-more { width: 100%; margin-top: 16px; padding: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
    .history-more:hover { color: var(--cyan-dark); border-color: var(--cyan); }
    .history-more:disabled { cursor: wait; opacity: .6; }
    .history-more[hidden] { display: none; }
    .source-note { color: var(--muted); font-size: 12px; line-height: 1.7; }



    footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
    footer a { margin-left: 10px; color: var(--cyan-dark); }

    @media (max-width: 820px) {
      .intro { grid-template-columns: 1fr; align-items: start; gap: 28px; }
      .filter-controls { grid-template-columns: 1fr 1fr; }
      .tag-search { grid-column: 1 / -1; }
    }

    @media (max-width: 620px) {
      main, .nav { width: min(100% - 22px, 1180px); }
      .compact-mobile-nav { min-height: 48px; padding: 8px 0; flex-wrap: nowrap; gap: 10px; }
      .compact-mobile-nav .brand { flex: 0 0 auto; gap: 8px; }
      .compact-mobile-nav .brand-mark { width: 32px; height: 32px; font-size: 19px; }
      .compact-mobile-nav .brand-name { font-size: 17px; }
      .compact-mobile-nav .nav-links { width: auto; min-width: 0; flex: 1 1 auto; justify-content: flex-end; gap: clamp(6px, 2.5vw, 12px); padding: 0; border-top: 0; font-size: 12px; white-space: nowrap; }
      .compact-mobile-nav .nav-links a { min-height: 32px; display: grid; align-items: center; }
      .unofficial { display: none; }
      .intro { padding-top: 34px; }
      .youtube-attribution { margin-inline: 0; }
      .search-box button { padding-inline: 12px; }
      .media-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      .access-tab { padding-inline: 8px; font-size: 12px; }
      .media-tab { min-width: 0; padding-inline: 5px; font-size: 11px; }
      .results-head { align-items: start; flex-direction: column; }
      .active-filter-bar { top: 49px; grid-template-columns: 1fr auto; }
      .active-filter-chips { grid-column: 1 / -1; grid-row: 2; }
      .floating-scroll-top { left: 12px; right: auto; bottom: 14px; }
      .filter-panel, .period-panel { padding: 0; }
      .mobile-panel-toggle { min-height: 52px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
      .mobile-panel-toggle span { color: var(--ink); font-size: 13px; font-weight: 700; }
      .mobile-panel-toggle small { color: var(--muted); font-size: 10px; text-align: right; }
      .filter-panel[open] .mobile-panel-toggle, .period-panel[open] .mobile-panel-toggle { border-bottom: 1px solid var(--line); }
      .mobile-panel-body { padding: 16px; }
      .filter-head, .period-head { display: none; }
      .filter-controls { grid-template-columns: 1fr; }
      .tag-search { grid-column: auto; }
      .topic-section { grid-template-columns: 1fr; gap: 7px; }
      .topic-section-head { justify-content: flex-start; }
      .tag-discovery-menus { grid-template-columns: 1fr; }
      .setlist-head { grid-template-columns: minmax(0, 1fr); }
      .setlist-filter-tags { padding: 0 0 8px; }
      .period-controls { align-items: stretch; }
      .age-periods { grid-template-columns: 1fr; }
      .age-period { min-height: 52px; }
      .age-period + .age-period { border-top: 1px solid var(--ink); border-left: 0; }
      .period-controls label { flex: 1 1 132px; }
      .period-presets { width: 100%; }
      .period-preset { flex: 1; min-width: 0; }
      select { width: 100%; }
      .video-grid { gap: 10px; }
      .card-body { padding: 12px; }
      .talent-row { margin-bottom: 7px; gap: 4px; font-size: 11px; line-height: 1.4; }
      .card-filter-chip { padding: 5px 7px; font-size: 13px; }
      .video-title { margin-bottom: 7px; font-size: 15px; line-height: 1.45; }
      .video-card-meta { margin-bottom: 10px; gap: 6px 10px; }
      .video-metrics { flex-basis: 100%; gap: 4px 10px; font-size: 10px; }
      .history-batch-divider { grid-template-columns: 1fr; gap: 3px; }
      .video-references, .video-guests, .video-performers, .video-hashtags { margin-bottom: 10px; }
      .video-hashtags { gap: 5px; }
      .video-hashtag { padding: 5px 8px; font-size: 14px; }
    }

    @media (max-width: 360px) {
      .compact-mobile-nav .brand-name { display: none; }
    }

    @media print {
      .video-card { content-visibility: visible; contain-intrinsic-size: none; }
      .floating-scroll-top { display: none; }
    }

    @media (prefers-reduced-motion: reduce) {
      #resultSummary[data-loading="true"]::before { animation: none; }
    }
