/* ============================================================
   HoloClip Station — Theme v10
   Hololive Premium Style (Refined Neutral + Holo Colors)
   ============================================================ */

/* --- LOADING STATE --- */
body.loading-state::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 30%;
    height: 3px;
    background: var(--holo-primary, #00A8E0);
    z-index: 9999;
    animation: holo-loading-bar 1s infinite ease-in-out;
}

@keyframes holo-loading-bar {
    0% {
        left: -30%;
        width: 30%;
    }

    50% {
        width: 50%;
    }

    100% {
        left: 100%;
        width: 30%;
    }
}

#video-grid-container,
.holo-grid-wrapper {
    transition: opacity 0.2s ease;
}

body.is-date-display-transitioning #video-grid-container,
body.is-date-display-transitioning .holo-grid-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.is-grid-refreshing #video-grid-container,
body.is-grid-refreshing .holo-grid-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.is-date-display-transitioning .holo-grid-actions,
body.is-date-display-transitioning .holo-goto-clips-btn,
body.is-date-display-transitioning .holo-watch-later-btn-mini,
body.is-date-display-transitioning .holo-youtube-link {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.loading-state #video-grid-container,
body.loading-state .holo-grid-wrapper {
    opacity: 0.6;
    pointer-events: none;
}

body.loading-state #new-clips-section,
body.loading-state #popular-clips-section,
body.loading-state .holo-ad-container {
    opacity: 0;
    pointer-events: none;
}

/* ---------- Design Tokens ---------- */
:root {
    scrollbar-gutter: stable;
    --holo-bg: #F4F6FB;
    /* Refined neutral — not too blue, not plain white */
    --holo-card-bg: #FFFFFF;
    /* Pure white cards */
    --holo-text: #1A202C;
    /* Richer dark for crisp readability */
    --holo-text-muted: #64748B;
    /* Cooler muted gray */
    --holo-primary: #00A8E0;
    /* Hololive sky-blue (slightly deeper) */
    --holo-primary-light: #E0F4FD;
    --holo-secondary: #FF4D8D;
    /* Hololive pink */
    --holo-secondary-light: #FFF0F5;
    --holo-accent: #FFD700;
    /* Gold accent */
    --holo-border: #DDE3EE;
    --holo-radius: 16px;
    --holo-radius-lg: 24px;
    --holo-radius-sm: 10px;
    --holo-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    --holo-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.13);
    --holo-font: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;

    /* Theme-specific tokens */
    --header-bg: rgba(255, 255, 255, 0.92);
    --filter-bg: rgba(248, 250, 255, 0.96);
    --input-bg: #fff;
    --input-border: #DDE3EE;
}

/* Dark Mode Tokens */
[data-theme="dark"] {
    --holo-bg: #0F172A;
    --holo-card-bg: #1E293B;
    --holo-text: #F8FAFC;
    --holo-text-muted: #94A3B8;
    --holo-border: #334155;
    --holo-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.3);
    --holo-shadow-lg: 0 16px 30px -5px rgba(0, 0, 0, 0.4);

    --header-bg: rgba(15, 23, 42, 0.9);
    --filter-bg: rgba(15, 23, 42, 0.95);
    --input-bg: #0F172A;
    --input-border: #334155;
    --holo-primary-light: rgba(0, 184, 240, 0.15);
    --fav-color: #F6AD55;
    --holo-secondary-light: rgba(255, 77, 141, 0.15);
}

.holo-aggregator-ui {
    max-width: 1400px;
    margin: 0 auto;
    font-family: var(--holo-font);
    color: var(--holo-text);
    background-color: transparent;
    /* bodyの背景を透過させて同期を安定させる */
    padding: 16px;
    padding-bottom: calc(110px + var(--holo-filter-bar-height, 0px));
    border-radius: var(--holo-radius);
}

/* --- Loading Spinner --- */
@keyframes holoSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.holo-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid #00B8F0;
    border-radius: 50%;
    animation: holoSpin 0.8s linear infinite;
    margin: 0 auto 12px auto;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes holoPopIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    70% {
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes holoSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes holoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.holo-empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--holo-text-muted);
}

.holo-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    color: var(--holo-primary);
}

/* ============================================================
   GRID PAGE
   ============================================================ */
.holo-date-group,
.holo-virtual-chunk {
    margin-top: -10px;
    margin-bottom: 20px;
    padding-top: 50px;
    padding-left: 10px;
    padding-right: 10px;
    /* スクロール時の余白 */
    scroll-margin-top: var(--holo-scroll-offset, 85px);
}

.holo-date-group:first-child,
.holo-virtual-chunk:first-child {
    margin-top: -50px;
}

body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] #video-grid-container {
    display: grid !important;
    gap: 20px;
    align-items: start;
    grid-auto-flow: row dense;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] #video-grid-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] #video-grid-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] .holo-month-header {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 18px;
    width: fit-content;
    min-height: 0;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--holo-primary) 0%, #00D4FF 100%);
    box-shadow: 0 6px 18px rgba(0, 168, 224, 0.24);
}

body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] .holo-month-header:hover {
    transform: scale(1.02) translateY(-1px);
}

body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] .holo-compact-section-header {
    grid-column: 1 / -1;
}

body.main-grid-ready.is-compact-date-groups[data-compact-effective="1"] .holo-date-group.is-skeleton {
    grid-column: 1 / -1;
}

.holo-date-header {
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 20px 5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.04em;
    background: linear-gradient(120deg, var(--holo-primary) 0%, #00D4FF 100%);
    padding: 7px 20px;
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(0, 168, 224, 0.25);
    width: auto;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    user-select: none;
    /* スクロール時に固定ヘッダーの下に隠れないよう設定 */
    scroll-margin-top: var(--holo-scroll-offset, 85px);
}

.holo-date-header:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 224, 0.4);
    filter: brightness(1.1);
}


/* --- Floating Date Picker --- */
/* --- Premium Custom Calendar --- */
.holo-date-picker-modal {
    position: fixed;
    top: 15vh;
    /* 固定位置に変更して高さ変化によるボタンのズレを防止 */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    z-index: 9000;
    background: var(--header-bg);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    padding: 25px;
    width: 90%;
    max-width: 380px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.holo-date-picker-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

.holo-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
}

.holo-calendar-current-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
}

.holo-calendar-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"),
        linear-gradient(120deg, var(--holo-primary) 0%, #00D4FF 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: right 14px center, center;
    background-size: 14px, cover;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    height: 38px;
    padding: 0 34px 0 18px;
    border-radius: 100px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 168, 224, 0.25);
}

.holo-calendar-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 224, 0.4);
    filter: brightness(1.1);
}

/* Dropdown option styles for visibility */
.holo-calendar-select option {
    background-color: var(--holo-card-bg);
    color: var(--holo-text);
    font-weight: normal;
}

[data-theme="dark"] .holo-calendar-select option {
    background-color: #1E293B;
    /* var(--holo-card-bg) for dark */
    color: #F8FAFC;
    /* var(--holo-text) for dark */
}

.holo-calendar-nav-btn {
    background: linear-gradient(120deg, var(--holo-primary) 0%, #00D4FF 100%);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 168, 224, 0.25);
}

.holo-calendar-nav-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 224, 0.4);
    filter: brightness(1.1);
}

.holo-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    min-height: 240px;
    /* ある程度の高さを確保してチラつきを抑制 */
}


.holo-calendar-weekday {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--holo-text-muted);
    padding-bottom: 10px;
    text-transform: uppercase;
}

.holo-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--holo-text);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.holo-calendar-day:hover:not(.empty) {
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 224, 0.2);
}

.holo-calendar-day.active {
    background: linear-gradient(135deg, var(--holo-primary) 0%, #00D4FF 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(0, 168, 224, 0.3);
}

.holo-calendar-day.today {
    border: 2px solid var(--holo-secondary);
    color: var(--holo-secondary);
}

.holo-calendar-day.empty {
    cursor: default;
    opacity: 0.2;
}

.holo-calendar-day.sun {
    color: var(--holo-secondary);
}

.holo-calendar-day.sat {
    color: var(--holo-primary);
}

.holo-date-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 8999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.holo-date-picker-overlay.active {
    opacity: 1;
    pointer-events: auto;
}



.new-clips-title,
.popular-clips-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 20px;
    background: linear-gradient(120deg, var(--holo-primary) 0%, #00D4FF 100%);
    border-radius: 100px;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    margin: 0 0 20px 25px;
    box-shadow: 0 4px 12px rgba(0, 168, 224, 0.25);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.04em;
}

.popular-clips-title {
    background: linear-gradient(120deg, var(--holo-secondary) 0%, #FF8FB1 100%);
    box-shadow: 0 4px 12px rgba(255, 77, 141, 0.25);
}

.new-clips-title::after,
.popular-clips-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.new-clips-title:hover::after,
.popular-clips-title:hover::after {
    transform: translateX(100%);
}

.holo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* 600px以上 (スマホ portrait 除外): 2列 */
@media (min-width: 600px) {
    .holo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1024px以上 (タブレット portrait 除外): 3列 */
@media (min-width: 1024px) {
    .holo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 1280px以上 (デスクトップ等): 4列 */
@media (min-width: 1280px) {
    .holo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Card --- */
.holo-grid-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: var(--holo-card-bg);
    border-radius: var(--holo-radius);
    border: 2px solid var(--holo-border);
    box-shadow: var(--holo-shadow);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.2s ease;
    animation: holoPopIn 0.2s ease backwards;

    /* 画面外のレンダリングを最適化 */
    content-visibility: auto;
    contain-intrinsic-size: 1px 320px;
}

.holo-calendar-day.disabled {
    opacity: 0.15;
    pointer-events: none;
    cursor: default;
    filter: grayscale(1);
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.is-theme-toggling,
.is-theme-toggling *,
.is-theme-toggling *::before,
.is-theme-toggling *::after {
    transition: background-color 0.2s linear,
        color 0.2s linear,
        border-color 0.2s linear,
        box-shadow 0.2s linear,
        opacity 0.2s linear,
        filter 0.2s linear,
        backdrop-filter 0.2s linear !important;
    transition-delay: 0s !important;
}


.holo-grid-card:hover {
    transform: translateY(-10px) rotate(1deg);
    border-color: var(--holo-primary);
    box-shadow: var(--holo-shadow-lg);
}

/* .holo-grid-card--empty style removed to fix 'layered' look */

/* --- Watch Later Button (in card) --- */
.holo-watch-later-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--holo-text-muted);
    border: 2px solid var(--holo-border);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
}

[data-theme="dark"] .holo-watch-later-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--holo-border);
}

.holo-watch-later-btn:hover {
    transform: scale(1.15) rotate(10deg);
    color: var(--holo-secondary);
    border-color: var(--holo-secondary);
    background: #fff;
}

[data-theme="dark"] .holo-watch-later-btn:hover {
    background: var(--holo-card-bg);
}

.holo-watch-later-btn--active {
    background: var(--holo-secondary) !important;
    color: #fff !important;
    border-color: var(--holo-secondary) !important;
    box-shadow: 0 4px 12px rgba(255, 77, 141, 0.4);
}

/* --- Thumbnail --- */
.holo-grid-thumb {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--holo-border);
    border-bottom: 2px solid var(--holo-border);
    cursor: pointer;
}

.holo-grid-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    color: transparent;
    /* altテキストのフラッシュを防止 */
}

.holo-grid-card:hover .holo-grid-thumb img {
    transform: scale(1.05);
}

/* --- Badges (in grid-info) --- */
.holo-grid-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    flex-wrap: wrap;
    overflow: hidden;
    min-height: 24px;
}

.holo-grid-main-channel {
    width: 100%;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--holo-text-muted);
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.4em;
}

.holo-grid-channel-clipper {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--holo-primary);
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holo-grid-clip-count,
.holo-grid-views {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

.holo-grid-clip-count {
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    border: 1.5px solid rgba(0, 184, 240, 0.2);
}

.holo-grid-clip-count--zero {
    background: var(--holo-border);
    color: var(--holo-text-muted);
    border-color: var(--holo-border);
}

.holo-grid-views {
    background: var(--holo-secondary-light);
    color: var(--holo-secondary);
    border: 1.5px solid rgba(255, 77, 141, 0.2);
}

.holo-grid-views--main {
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    border-color: rgba(0, 184, 240, 0.2);
}

/* Dark mode specific for better visibility */
[data-theme="dark"] .holo-grid-clip-count {
    background: rgba(0, 168, 224, 0.2);
    color: #4FD1FF;
    border-color: rgba(79, 209, 255, 0.3);
}

[data-theme="dark"] .holo-grid-views {
    background: rgba(255, 77, 141, 0.2);
    color: #FF8FB1;
    border-color: rgba(255, 143, 177, 0.3);
}

.holo-grid-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 6px;
}

.holo-grid-channel {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--holo-text-muted);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

.holo-grid-channel span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.holo-channel-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--holo-primary-light);
}

.holo-grid-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 0;
    color: var(--holo-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.45em * 3);
}

/* --- Watch Later Button --- */
.holo-watch-later-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.holo-watch-later-btn:hover {
    background: var(--holo-secondary);
    transform: scale(1.1);
}

.holo-watch-later-btn--active {
    background: var(--holo-secondary);
    color: #fff;
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.holo-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--holo-primary);
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: #fff;
    border-radius: 100px;
    box-shadow: var(--holo-shadow);
    transition: all 0.2s;
}

.holo-detail-back:hover {
    transform: scale(1.05);
    background: var(--holo-primary-light);
}

.holo-detail-section {
    background: var(--holo-card-bg);
    border-radius: var(--holo-radius-lg);
    box-shadow: var(--holo-shadow);
    margin-bottom: 40px;
    overflow: hidden;
    border: 4px solid var(--holo-card-bg);
}

.holo-detail-section-title {
    padding: 20px 30px;
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0;
}

/* --- Video Player --- */
.holo-detail-player {
    background: #000;
    position: relative;
    padding-top: 56.25%;
}

.holo-player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.holo-play-button-large {
    width: 70px;
    height: 70px;
    background: var(--holo-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(0, 184, 240, 0.4);
    transition: transform 0.3s;
    cursor: pointer;
}

.holo-player-wrapper:hover .holo-play-button-large {
    transform: scale(1.15) rotate(5deg);
}

.holo-detail-video-info {
    padding: 25px 30px;
}

.holo-detail-video-info h3 {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* ============================================================
   CLIPS GRID
   ============================================================ */
.holo-clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 30px;
}

.holo-clip-card {
    background: var(--holo-card-bg);
    border-radius: var(--holo-radius-sm);
    border: 2px solid var(--holo-border);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.holo-clip-card:hover {
    transform: translateY(-5px);
    border-color: var(--holo-primary);
    box-shadow: var(--holo-shadow);
}

.holo-clip-card--active {
    border-color: var(--holo-secondary);
    background: var(--holo-secondary-light);
}

.holo-clip-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.holo-clip-card-title {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.holo-clip-card-views {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--holo-secondary);
}

.holo-clipper-name {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--holo-primary);
    background: var(--holo-primary-light);
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    border: 1px solid rgba(0, 184, 240, 0.1);
}

/* ============================================================
   BADGES
   ============================================================ */
.holo-badge {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 800;
}

.holo-views-badge {
    background: var(--holo-secondary-light);
    color: var(--holo-secondary);
}

.holo-channel-badge {
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    box-shadow: var(--holo-shadow-lg);
}

.holo-date-badge {
    background: var(--holo-bg);
    color: var(--holo-text-muted);
    border: 1.5px solid var(--holo-border);
}

/* ============================================================
   PAGINATION (Filter Bar Integrated)
   ============================================================ */
.holo-filter-pager {
    order: 7;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-left: 14px;
    border-left: 2px solid var(--holo-border);
    min-height: 34px;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.holo-filter-pager--inactive {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Pager Label Removed */

.holo-filter-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--holo-card-bg);
    color: var(--holo-primary);
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 8px;
    border: 2px solid var(--holo-border);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    /* Visual centering fix for characters like ‹ › » */
    padding-bottom: 2px;
}

[data-theme="dark"] .holo-filter-pager-btn {
    background: var(--holo-card-bg);
    color: var(--holo-text);
    border-color: var(--holo-border);
}

.holo-filter-pager-btn:hover:not(.holo-filter-pager-btn--disabled) {
    background: var(--holo-primary);
    color: #fff;
    border-color: var(--holo-primary);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 184, 240, 0.3);
}

.holo-filter-pager-btn--disabled {
    opacity: 0.3;
    cursor: default;
    background: var(--holo-bg);
    color: var(--holo-text-muted);
    border-color: var(--holo-border);
    transform: none !important;
}

[data-theme="dark"] .holo-filter-pager-btn--disabled {
    background: rgba(15, 23, 42, 0.7);
    color: #64748B;
}

.holo-filter-pager-input {
    width: 38px;
    padding: 3px 2px;
    border-radius: 6px;
    border: 2px solid var(--holo-border);
    background: var(--holo-card-bg);
    color: var(--holo-text);
    font-weight: 700;
    text-align: center;
    font-family: inherit;
    font-size: 0.78rem;
    transition: all 0.2s;
}

[data-theme="dark"] .holo-filter-pager-input {
    background: var(--holo-card-bg);
    border-color: var(--holo-border);
    color: var(--holo-text);
}

.holo-filter-pager-input:focus {
    outline: none;
    border-color: var(--holo-primary);
    box-shadow: 0 0 0 3px var(--holo-primary-light);
}

/* Chrome, Safari, Edge, Opera - hide arrows */
.holo-filter-pager-input::-webkit-outer-spin-button,
.holo-filter-pager-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Firefox - hide arrows */
.holo-filter-pager-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.holo-filter-pager-sep {
    color: var(--holo-text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.5;
}

[data-theme="dark"] .holo-filter-pager-sep,
[data-theme="dark"] .holo-filter-pager-total {
    color: #94A3B8;
}

.holo-filter-pager-total {
    color: var(--holo-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 16px;
}

/* ============================================================
   FILTER BAR (Desktop Sticky / Mobile Bottom)
   ============================================================ */
.holo-filter-bar {
    position: sticky;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 6500;
    background: var(--filter-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 3px solid var(--holo-primary);
    box-shadow: 0 8px 30px rgba(0, 184, 240, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
    scrollbar-gutter: stable;
    transition: opacity 0.18s ease, transform 0.18s ease;
    will-change: opacity, transform;
}

html.js-enabled body.filters-loading .holo-filter-bar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
}

html.js-enabled body.filters-loading .holo-custom-select-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.holo-filter-bar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    overflow-x: visible;
    overflow-y: visible;
    cursor: default;
    overscroll-behavior-x: contain;
    touch-action: auto;
}

.holo-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    overflow: visible;
    order: 1;
}

.holo-filter-search-wrapper {
    order: 1;
}

.holo-filter-item--date {
    order: 2;
}

.holo-filter-item--channel {
    order: 3;
}

.holo-filter-checkboxes {
    order: 4;
    flex: 0 0 auto;
}

.holo-filter-reset-btn {
    order: 5;
    flex: 0 0 auto;
}

.holo-filter-advanced-wrapper {
    order: 6;
    flex: 0 0 auto;
}

.holo-filter-pager {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-left: 14px;
    border-left: 2px solid var(--holo-border);
    margin-right: -10px;
    flex: 0 0 auto;
    order: 7;
}

.holo-active-filters {
    order: 2;
    margin-right: 4px;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--holo-border);
}

/* --- Filter Search --- */
.holo-filter-search-wrapper {
    flex: 1 1 300px;
    max-width: 300px;
    position: relative;
    min-width: 300px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.holo-filter-search {
    width: 100%;
    height: 32px;
    padding: 5px 14px;
    border-radius: 100px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--holo-text);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.holo-filter-search:focus {
    outline: none;
    border-color: var(--holo-primary);
    box-shadow: 0 0 0 4px var(--holo-primary-light);
}

.holo-filter-search-submit {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- Advanced Toggle Button --- */
.holo-filter-advanced-btn {
    padding: 6px 14px;
    border-radius: 100px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--holo-text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.holo-filter-advanced-btn:hover {
    border-color: var(--holo-primary);
    color: var(--holo-primary);
}

.holo-filter-advanced-btn--active {
    background: var(--holo-primary);
    color: #fff;
    border-color: var(--holo-primary);
}

/* --- Advanced Panel (Horizontal companion to button) --- */
.holo-filter-advanced-panel {
    display: none;
    align-items: center;
    gap: 12px;
    margin-left: 10px;
    padding: 0 10px;
    border-left: 2px solid var(--holo-border);
    animation: holoFadeIn 0.3s ease;
}

.holo-filter-advanced-panel--visible {
    display: flex !important;
}

/* --- Active Filters Display --- */
.holo-active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 0;
    border-bottom: none;
    margin-bottom: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: 0;
    flex: 0 0 auto;
}

.holo-active-filters-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--holo-text-muted);
    /* 他のラベルに合わせてグレー系に変更 */
    white-space: nowrap;
}

.holo-active-filters-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

.holo-active-filters-tags::-webkit-scrollbar {
    display: none;
}

.holo-active-filters-tags--dragging {
    cursor: grabbing;
    user-select: none;
}

.holo-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    /* 少し大きくしてボタン類と合わせる */
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    border-radius: 100px;
    font-size: 0.75rem;
    /* 他の入力項目とフォントサイズを統一 */
    font-weight: 700;
    border: 1.5px solid rgba(0, 184, 240, 0.2);
    animation: holoPopIn 0.15s ease;
    cursor: pointer;
    transition: all 0.2s;
}

/* カスタムマルチセレクトドロップダウン */
.holo-custom-select-wrapper {
    position: relative;
    flex: 0 0 auto;
    width: clamp(160px, 13vw, 220px);
    min-width: 160px;
    max-width: 220px;
    overflow: visible;
}

.holo-custom-select-trigger {
    width: 100%;
    height: 32px;
    padding: 0 32px 0 14px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 100px;
    color: var(--holo-text);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.holo-custom-select-trigger::after {
    content: "▼";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.5;
}

.holo-custom-select-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    bottom: auto;
    left: 0;
    transform: none;
    width: max-content;
    min-width: 100%;
    max-width: min(92vw, 720px);
    /* デスクでは固定 */
    max-height: 85vh;
    /* ユーザーが大きくできるように制限を緩和 */
    min-height: 200px;
    height: 450px;
    /* デフォルト高 */
    background: var(--holo-card-bg);
    border: 2px solid var(--holo-primary);
    border-radius: 12px;
    box-shadow: var(--holo-shadow-lg);
    z-index: 1001;
    display: none;
    flex-direction: column;
    margin-top: 0;
    animation: holoSlideDown 0.15s ease;
    overflow: hidden;
    /* ハンドル周辺の余白制御用 */
}

.holo-custom-select-dropdown--above {
    top: auto;
    bottom: calc(100% + 2px);
}

/* モバイル対応: 画面端で切れないよう配置を調整 */
@media (max-width: 699px) {
    .holo-custom-select-dropdown {
        position: fixed;
        /* 親要素の幅に縛られないよう固定配置へ */
        bottom: calc(85px + env(safe-area-inset-bottom, 0px));
        /* フィルターバーの上に配置 */
        left: 2.5vw;
        right: 2.5vw;
        width: 95vw;
        max-width: none;
        transform: none;
        /* translateX(-50%) を解除 */
        border-radius: 16px 16px 12px 12px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        animation: holoSlideUp 0.2s ease-out;
        z-index: 8100;
    }
}

/* 上端のリサイズハンドル */
.holo-dropdown-resizer {
    width: 100%;
    height: 14px;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    background: var(--holo-card-bg);
    border-top: 1px solid var(--holo-border);
}

.holo-dropdown-resizer::after {
    content: '';
    width: 36px;
    height: 4px;
    background: var(--holo-border);
    border-radius: 2px;
    transition: background 0.2s;
}

.holo-dropdown-resizer:hover::after {
    background: var(--holo-primary);
}

@keyframes holoSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.holo-custom-select-dropdown--open {
    display: flex;
}

.holo-dropdown-list {
    overflow-y: auto;
    flex: 1;
    padding: 3px 0;
    order: 1;
}

.holo-dropdown-resizer {
    order: 2;
}

.holo-dropdown-group {
    background: var(--holo-bg);
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--holo-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

[data-theme="dark"] .holo-dropdown-group {
    background: #1A202C;
}

.holo-group-toggle-btn {
    background: var(--holo-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.65rem;
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s;
}

.holo-group-toggle-btn:hover {
    background: var(--holo-secondary);
    transform: scale(1.05);
}



.holo-dropdown-item {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.holo-dropdown-item:hover {
    background: var(--holo-primary-light);
}

.holo-dropdown-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--holo-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.holo-dropdown-item-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 0;
    cursor: pointer;
    color: var(--holo-text);
    white-space: nowrap;
}

.holo-dropdown-item-label span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* チャンネルアイコンのサイズ調整 */
.holo-channel-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.holo-fav-star {
    font-size: 1.1rem;
    color: #CBD5E0;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    line-height: 1;
}

[data-theme="dark"] .holo-fav-star {
    color: #94A3B8;
}

.holo-fav-star--active {
    color: #F6AD55;
    text-shadow: 0 0 5px rgba(246, 173, 85, 0.4);
}

[data-theme="dark"] .holo-fav-star--active {
    color: #FBBF24;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.35);
}

.holo-fav-star:hover {
    transform: scale(1.3);
}

/* フィルターチェックボックスエリア */
.holo-filter-checkboxes {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: 0;
}

.holo-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    color: var(--holo-text-muted);
    transition: color 0.2s;
    height: 32px;
    padding: 0 12px;
    border-radius: 100px;
    border: 2px solid var(--holo-border);
    background: #fff;
    box-sizing: border-box;
}

[data-theme="dark"] .holo-filter-checkbox-label {
    background: var(--holo-card-bg);
    border-color: var(--holo-border);
    color: var(--holo-text-muted);
}

.holo-filter-checkbox-label:hover {
    color: var(--holo-text);
}

.holo-filter-checkbox-label input[type="checkbox"] {
    accent-color: var(--holo-primary);
    cursor: pointer;
}

.holo-filter-checkbox-label--fav {
    color: #F6AD55 !important;
}

[data-theme="dark"] .holo-filter-checkbox-label--fav {
    color: #FBBF24 !important;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
}

.holo-filter-checkbox-label--fav input[type="checkbox"] {
    accent-color: #F6AD55;
}

[data-theme="dark"] .holo-filter-checkbox-label--fav input[type="checkbox"] {
    accent-color: #FBBF24;
}

.holo-filter-tag:hover {
    background: var(--holo-secondary-light);
    color: var(--holo-secondary);
    border-color: var(--holo-secondary);
}

.holo-filter-tag--pink {
    background: var(--holo-secondary-light);
    color: var(--holo-secondary);
    border-color: rgba(255, 77, 141, 0.2);
}

.holo-filter-tag::after {
    content: "×";
    font-weight: 900;
    margin-left: 2px;
}

/* --- Filter Controls --- */
.holo-filter-reset-mobile {
    display: none !important;
}

[data-theme="dark"] .holo-filter-reset-mobile {
    background: rgba(127, 29, 29, 0.28);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.28);
}

@media (max-width: 699px) {
    .holo-filter-reset-mobile {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin-left: auto;
        padding: 0 14px;
        height: 32px;
        border-radius: 100px;
        border: 2px solid #FED7D7;
        background: #FFF5F5;
        color: #E53E3E;
        font-size: 0.72rem;
        font-weight: 800;
        font-family: inherit;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        white-space: nowrap;
        box-sizing: border-box;
        order: 11;
        margin-left: auto;
    }

    .holo-filter-reset-mobile:hover {
        background: #E53E3E;
        color: #fff;
        border-color: #E53E3E;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.25);
    }

    [data-theme="dark"] .holo-filter-reset-mobile:hover {
        background: rgba(239, 68, 68, 0.92);
        color: #fff;
        border-color: rgba(239, 68, 68, 0.92);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
    }
}

.holo-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

@media (min-width: 1241px) {
    .holo-filter-controls {
        max-width: none;
        gap: 8px 6px;
        /* 行間を少し広げる (2px -> 8px) */
    }

    .holo-filter-search-wrapper {
        flex: 1 1 260px;
        min-width: 240px;
        max-width: 300px;
        /* 1140〜1160px付近で隣接要素を押し出しすぎないよう少しだけ圧縮 */
    }

    .holo-custom-select-wrapper {
        flex: 1 1 220px;
        min-width: 180px;
        max-width: 240px;
        /* VTuberセレクタは少し縮めて、切り抜き系ボタンの表示領域を確保 */
    }
}

@media (min-width: 700px) and (max-width: 1240px) {
    .holo-filter-bar {
        position: sticky;
        top: 65px;
        bottom: auto;
        border-top: 0;
        border-bottom: 3px solid var(--holo-primary);
        box-shadow: 0 8px 30px rgba(0, 184, 240, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .holo-filter-bar-inner {
        padding: 8px 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .holo-filter-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(220px, 18vw, 250px) minmax(0, 1fr);
        grid-template-areas:
            "search date channel"
            "checks checks pager";
        align-items: center;
        align-content: start;
        gap: 8px 8px;
        min-width: 0;
        overflow: visible;
    }

    .holo-filter-controls > * {
        min-width: 0;
    }

    .holo-filter-controls > .holo-filter-search-wrapper,
    .holo-filter-controls > .holo-filter-item,
    .holo-filter-controls > .holo-filter-checkboxes,
    .holo-filter-controls > .holo-filter-pager {
        display: flex !important;
    }

    .holo-filter-controls .holo-filter-toggle-btn,
    .holo-filter-controls .holo-filter-reset-mobile,
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-reset-mobile {
        display: none !important;
    }

    .holo-filter-search-wrapper {
        grid-area: search;
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: none;
    }

    .holo-filter-item--date,
    .holo-filter-item--channel {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        flex: none;
        width: 100%;
        max-width: none;
    }

    .holo-filter-item--date {
        grid-area: date;
        width: clamp(220px, 18vw, 250px);
        max-width: clamp(220px, 18vw, 250px);
        flex: 0 0 auto;
    }

    .holo-filter-item--channel {
        grid-area: channel;
        width: 100%;
        flex: 1 1 0;
    }

    .holo-filter-item--date .holo-filter-label,
    .holo-filter-item--channel .holo-filter-label {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
        padding: 2px 5px;
    }

    .holo-filter-item--date .holo-filter-ymd-inputs {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .holo-filter-item--channel .holo-custom-select-wrapper {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .holo-custom-select-trigger {
        width: 100%;
        min-width: 0;
    }

    .holo-filter-checkboxes {
        grid-area: checks;
        width: 100%;
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px 6px;
        margin-top: 0;
        align-items: center;
        flex: 1 1 100%;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label,
    .holo-filter-checkboxes .holo-filter-reset-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        height: 32px;
        padding: 0 10px;
        font-size: 0.75rem;
        line-height: 1;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .holo-filter-checkboxes .holo-filter-reset-btn {
        margin-left: 2px;
    }

    .holo-filter-reset-btn {
        display: inline-flex !important;
        flex: 0 0 auto;
        width: auto;
        justify-self: start;
        margin-left: 0;
    }

    .holo-filter-pager {
        grid-area: pager;
        justify-self: end;
        align-self: center;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        margin-top: 0;
        flex: 0 0 auto;
        width: auto;
    }

    .holo-filter-advanced-wrapper,
    .holo-filter-advanced-btn {
        display: none !important;
    }

    .holo-filter-search,
    .holo-filter-select,
    .holo-filter-date-input,
    .holo-filter-select-ymd,
    .holo-filter-pager-input {
        font-size: 14px;
    }

    .holo-filter-search::placeholder,
    .holo-filter-select option,
    .holo-filter-pager-input {
        font-size: 13px;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        height: 32px;
        padding: 0 10px;
        font-size: 0.72rem;
        line-height: 1;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .holo-filter-search::placeholder {
        opacity: 0.8;
    }

    .holo-filter-select-ymd,
    .holo-filter-date-input {
        font-size: 0.72rem;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label--fav {
        order: 2;
    }

    .holo-filter-checkboxes .holo-filter-reset-btn {
        order: 3;
    }

    .holo-filter-pager {
        order: 4;
    }

    .holo-aggregator-ui {
        padding-bottom: 110px;
    }
}

.holo-filter-pager {
    margin-left: auto;
}

.holo-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-grow: 1;
    /* Allow items to fill the line */
}

.holo-filter-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #718096;
    white-space: nowrap;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: transparent;
    border-radius: 100px;
    transition: all 0.2s;
    user-select: none;
    border: 1.5px solid transparent;
}

/* リセットボタンを持つラベルのみクリック可能にする */
.holo-filter-label:has(.holo-filter-label-reset) {
    position: relative;
    cursor: pointer;
}

.holo-filter-label:has(.holo-filter-label-reset):hover {
    color: var(--holo-secondary);
    background: var(--holo-secondary-light);
    border-color: rgba(255, 77, 141, 0.2);
}

.holo-filter-label-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(113, 128, 150, 0.15);
    color: var(--holo-text-muted);
    border-radius: 50%;
    font-size: 8px;
    transition: all 0.2s;
    margin-left: 2px;
    opacity: 0.6;
}

[data-theme="dark"] .holo-filter-label-reset {
    background: rgba(148, 163, 184, 0.2);
    color: #94A3B8;
}

/* 親のラベルがホバーされたときに✕印を強調する */
.holo-filter-label:has(.holo-filter-label-reset):hover .holo-filter-label-reset {
    background: var(--holo-secondary) !important;
    color: #fff !important;
    opacity: 1;
    transform: scale(1.1);
}

.holo-filter-select {
    height: 32px;
    padding: 5px 28px 5px 12px;
    border-radius: 100px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--holo-text);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 90px;
}

.holo-filter-select:hover {
    border-color: #00B8F0;
    box-shadow: 0 2px 8px rgba(0, 184, 240, 0.1);
}

.holo-filter-select:focus {
    outline: none;
    border-color: #00B8F0;
    box-shadow: 0 0 0 3px rgba(0, 184, 240, 0.15);
}

/* Active select style */
.holo-filter-select--active {
    border-color: #00B8F0;
    background-color: #E1F5FE;
    color: #00B8F0;
    font-weight: 800;
}

/* Fix option text color for specific browsers when active */
.holo-filter-select option {
    color: #2D3748;
    background-color: #fff;
    font-weight: 600;
}

/* --- YMD Inputs --- */
.holo-filter-ymd-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.holo-filter-select-ymd {
    min-width: 50px;
    max-width: 85px;
    padding-right: 20px;
    padding-left: 6px;
    background-position: right 6px center;
    height: 28px;
    font-size: 0.7rem;
}

/* --- Range Inputs --- */
.holo-filter-item--range {
    gap: 6px;
}

.holo-filter-range-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.holo-filter-date-input {
    height: 28px;
    padding: 2px 8px;
    border-radius: 8px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    color: var(--holo-text);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.2s;
    width: 140px;
    margin-top: 2px;
}

.holo-filter-date-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.holo-filter-date-label {
    font-size: 0.62rem;
    font-weight: 900;
    color: var(--holo-text-muted);
    line-height: 1;
    margin-bottom: -1px;
    margin-left: 5px;
    z-index: 1;
    letter-spacing: -0.02em;
}

.holo-filter-date-input:hover {
    border-color: #00B8F0;
}

.holo-filter-date-input:focus {
    outline: none;
    border-color: #00B8F0;
    box-shadow: 0 0 0 3px rgba(0, 184, 240, 0.15);
}

.holo-filter-date-input--active {
    border-color: #00B8F0;
    background-color: #E1F5FE;
}

.holo-filter-range-sep {
    color: #A0AEC0;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- Checkbox --- */
.holo-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2D3748;
    cursor: pointer;
    white-space: nowrap;
    padding: 0 10px;
    height: 32px;
    border-radius: 100px;
    border: 2px solid #E2E8F0;
    background: #fff;
    transition: all 0.2s;
    user-select: none;
    box-sizing: border-box;
}

@media (hover: hover) {
    .holo-filter-checkbox-label:hover {
        border-color: #FF4D8D;
        background: #FFF0F5;
    }
}

[data-theme="dark"] .holo-filter-checkbox-label:hover {
    border-color: rgba(255, 77, 141, 0.55);
    background: rgba(255, 77, 141, 0.08);
}

.holo-filter-checkbox {
    display: none;
}

.holo-filter-checkbox-custom {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid #CBD5E0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.holo-filter-checkbox:checked+.holo-filter-checkbox-custom {
    background: #FF4D8D;
    border-color: #FF4D8D;
}

[data-theme="dark"] .holo-filter-checkbox:checked+.holo-filter-checkbox-custom {
    background: #F472B6;
    border-color: #F472B6;
}

.holo-filter-checkbox:checked+.holo-filter-checkbox-custom::after {
    content: "✓";
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
}

[data-theme="dark"] .holo-filter-checkbox:checked+.holo-filter-checkbox-custom::after {
    color: #0F172A;
}

.holo-filter-checkbox:checked~span:last-child {
    color: #FF4D8D;
}

[data-theme="dark"] .holo-filter-checkbox:checked~span:last-child {
    color: #F9A8D4;
}

.holo-filter-checkbox-label:has(.holo-filter-checkbox:checked) {
    border-color: #FF4D8D;
    background: #FFF0F5;
}

[data-theme="dark"] .holo-filter-checkbox-label:has(.holo-filter-checkbox:checked) {
    border-color: rgba(255, 77, 141, 0.55);
    background: rgba(255, 77, 141, 0.12);
}

[data-theme="dark"] .holo-filter-checkbox-label--fav:has(.holo-filter-checkbox:checked) {
    color: #FBBF24 !important;
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.12);
}

/* --- Reset Button --- */
.holo-filter-reset-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 100px;
    border: 2px solid #FED7D7;
    background: #FFF5F5;
    color: #E53E3E;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.holo-filter-reset-icon {
    display: inline-block;
}

.holo-filter-reset-text {
    display: inline;
}

[data-theme="dark"] .holo-filter-reset-btn {
    background: rgba(127, 29, 29, 0.28);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.28);
}

@media (hover: hover) {
    .holo-filter-reset-btn:hover {
        background: #E53E3E;
        color: #fff;
        border-color: #E53E3E;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.25);
    }
}

[data-theme="dark"] .holo-filter-reset-btn:hover {
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.92);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}

/* --- YouTube Link in Detail Card --- */
.holo-clip-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.holo-youtube-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #FF0000;
    background: var(--holo-card-bg);
    box-shadow: var(--holo-shadow);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    flex-shrink: 0;
}

[data-theme="dark"] .holo-youtube-link {
    color: #FF5A5A;
    /* Softer red for dark theme comfort */
    background: rgba(255, 255, 255, 0.03);
    /* Subtle background lift */
}

.holo-youtube-link:hover {
    transform: scale(1.15) rotate(5deg);
    background: #FF0000;
    color: #fff;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.3);
}

/* --- Main Only Checkbox --- */
@media (hover: hover) {
    .holo-filter-checkbox-label--main:hover {
        border-color: #00B8F0;
        background: #E1F5FE;
    }
}

.holo-filter-checkbox:checked+.holo-filter-checkbox-custom--main {
    background: #00B8F0;
    border-color: #00B8F0;
}

[data-theme="dark"] .holo-filter-checkbox:checked+.holo-filter-checkbox-custom--main {
    background: #38BDF8;
    border-color: #38BDF8;
}

.holo-filter-checkbox-label:has(.holo-filter-checkbox:checked).holo-filter-checkbox-label--main {
    border-color: #00B8F0;
    background: #E1F5FE;
}

[data-theme="dark"] .holo-filter-checkbox-label:has(.holo-filter-checkbox:checked).holo-filter-checkbox-label--main {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.12);
}

/* --- Main Only Grid Card --- */
.holo-grid-card--main {
    border: 2px solid var(--holo-primary-light);
}

/* --- Grid Actions & Links --- */
.holo-grid-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    container-type: inline-size;
    flex-wrap: nowrap;
    /* Force single line */
    gap: 8px;
}

.holo-grid-links-group {
    display: flex;
    align-items: center;
    gap: 4px;
    /* Slightly reduced gap to save pixels */
    flex-shrink: 0;
    /* Icons never shrink */
    margin-left: auto;
}

.holo-goto-clips-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    /* Standard horizontal padding */
    background: var(--holo-card-bg);
    color: var(--holo-primary);
    border: 1.5px solid var(--holo-primary);
    border-radius: 100px;
    font-size: clamp(0.55rem, 3.8cqw, 0.82rem);
    /* Reduced lower bound for smaller container widths */
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
    flex-grow: 1;
    min-width: 0;
    /* Allow the button to shrink effectively for font scalability */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Container Query for Narrow Cards (2/3 col on mobile) --- */
@container (max-width: 260px) {
    .holo-goto-clips-btn {
        padding: 8px 4px;
        /* Narrow padding to save space */
        gap: 2px;
        /* Smaller icon-text gap */
        letter-spacing: -0.02em;
        /* Tighter letter spacing to fit more text */
    }

    .holo-grid-actions {
        gap: 4px;
        /* Reduce gap between internal blocks */
    }
}

.holo-goto-clips-btn:hover:not(.holo-goto-clips-btn--disabled) {
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    border-color: var(--holo-primary);
    transform: scale(1.02);
}

.holo-goto-clips-btn--disabled {
    color: var(--holo-text-muted);
    background: var(--holo-bg);
    border-color: var(--holo-border);
    cursor: default;
    opacity: 0.6;
}

/* Dark mode specific visibility adjustment for the clips button */
[data-theme="dark"] .holo-goto-clips-btn {
    color: #4FD1FF;
    border-color: #4FD1FF;
    background: rgba(79, 209, 255, 0.03);
}

[data-theme="dark"] .holo-goto-clips-btn:hover:not(.holo-goto-clips-btn--disabled) {
    background: rgba(79, 209, 255, 0.15);
    color: #82E1FF;
    border-color: #82E1FF;
}

/* --- PiP (Document Picture-in-Picture) Window Styles --- */
.is-pip-body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    width: 100% !important;
    height: 100% !important;
    scrollbar-gutter: auto !important;
}

.is-pip-body #holo-floating-video {
    width: 100% !important;
    height: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
}

.is-pip-body #holo-floating-video iframe {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border: none !important;
}

/* ============================================================
   CLIPS MODAL & FLOATING PLAYER EXTENSIONS
   ============================================================ */
.holo-floating-player {
    position: fixed;
    top: 85px;
    /* Offset to be below header (approx 65px + margin) */
    right: 20px;
    width: 720px;
    height: auto;
    /* height = width * 9/16 + 40px(header) + padding approximate */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 7000;
    /* Above modal and filter bar, below header (8000) */
    overflow: visible;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--holo-primary);
    transition: box-shadow 0.2s;
    user-select: none;
    min-height: 200px;
    will-change: transform, box-shadow;
    /* Video + Header minimum approx */
}

.holo-floating-player--visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.holo-floating-player.holo-floating-player--dragging {
    box-shadow: 0 15px 40px rgba(0, 184, 240, 0.4);
}

/* 8-way resize handles */
.holo-resize-handle {
    position: absolute;
    z-index: 1002;
}

.holo-resize-handle.n {
    top: -15px;
    left: 0;
    right: 0;
    height: 30px;
    cursor: ns-resize;
}

.holo-resize-handle.s {
    bottom: -15px;
    left: 0;
    right: 0;
    height: 30px;
    cursor: ns-resize;
}

.holo-resize-handle.e {
    top: 0;
    bottom: 0;
    right: -15px;
    width: 30px;
    cursor: ew-resize;
}

.holo-resize-handle.w {
    top: 0;
    bottom: 0;
    left: -15px;
    width: 30px;
    cursor: ew-resize;
}

.holo-resize-handle.ne {
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    cursor: nesw-resize;
}

.holo-resize-handle.nw {
    top: -15px;
    left: -15px;
    width: 35px;
    height: 35px;
    cursor: nwse-resize;
}

.holo-resize-handle.se {
    bottom: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    cursor: nwse-resize;
}

.holo-resize-handle.sw {
    bottom: -15px;
    left: -15px;
    width: 35px;
    height: 35px;
    cursor: nesw-resize;
}

.holo-floating-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.holo-floating-player-expand {
    background: rgba(0, 184, 240, 0.1);
    color: var(--holo-primary);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.holo-floating-player-expand:hover {
    background: var(--holo-primary);
    color: #fff;
    transform: scale(1.1);
}

.holo-floating-player-minimize {
    background: rgba(0, 184, 240, 0.1);
    color: var(--holo-primary);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.holo-floating-player-minimize:hover {
    background: var(--holo-primary);
    color: #fff;
    transform: scale(1.1);
}

.holo-floating-player--minimized {
    height: auto !important;
    min-height: 0 !important;
}

.holo-floating-player--minimized .holo-floating-player-video,
.holo-floating-player--minimized .holo-resize-handle {
    display: none !important;
}

.holo-floating-player--minimized .holo-floating-player-related {
    /* Only hidden by default, can be shown via inline style or other rules */
    display: none;
}


.holo-floating-player--minimized .holo-floating-player-header {
    border-bottom: none;
    border-radius: 12px;
}

.holo-floating-player-pip {
    background: rgba(0, 184, 240, 0.1);
    color: var(--holo-primary);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.holo-floating-player-pip:hover,
.holo-floating-player-pip--active {
    background: var(--holo-primary);
    color: #fff;
    transform: scale(1.1);
}

.holo-floating-player-minimize--disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.holo-floating-player-expand--active {
    background: var(--holo-primary);
    color: #fff;
    transform: rotate(180deg);
}


.holo-floating-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--holo-primary-light);
    color: var(--holo-primary);
    cursor: move;
    border-bottom: 1px solid rgba(0, 184, 240, 0.2);
    font-size: 0.9rem;
    font-weight: bold;
    user-select: none;
    position: relative;
    z-index: 1010;
    /* Make sure it's above resize handles so close button works */
}

.holo-floating-player--dragging {
    opacity: 0.9 !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(0, 184, 240, 0.5) !important;
    transition: none !important;
    will-change: left, top, width, height;
}

.holo-floating-player--dragging .holo-floating-player-video iframe {
    pointer-events: none;
}

.holo-floating-player-title {
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.holo-floating-player-close {
    background: rgba(0, 184, 240, 0.1);
    color: var(--holo-primary);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.holo-floating-player-close:hover {
    background: #FF4D8D;
    color: #fff;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 4px 10px rgba(255, 77, 141, 0.3);
}

.holo-floating-player-close:active {
    transform: scale(0.95);
}

.holo-floating-player-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    display: block;
    /* No flex in standard mode to keep it simple */
}

.holo-floating-player-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: none;
}

/* Related Videos List in Floating Player */
.holo-floating-player-related {
    flex: 0 0 auto;
    /* Don't expand beyond max-height */
    max-height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--holo-bg);
    border-top: 1px solid var(--holo-border);
    animation: holoFadeIn 0.3s ease;
}

.holo-floating-related-header {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--holo-text-muted);
    border-bottom: 1px solid var(--holo-border);
    background: var(--holo-card-bg);
}

.holo-floating-related-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.holo-floating-related-item {
    display: flex;
    align-items: center;
    padding: 6px;
    gap: 12px;
    background: var(--holo-card-bg);
    border-radius: 8px;
    border: 1px solid var(--holo-border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.holo-floating-related-item:hover {
    border-color: var(--holo-primary);
    transform: translateX(3px);
    box-shadow: var(--holo-shadow);
}

.holo-floating-related-thumb {
    width: 126px;
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.holo-floating-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
}

.holo-floating-related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2px;
    padding-bottom: 2px;
    /* Removed padding-right: 64px to allow title more space */
    position: relative;
    gap: 2px;
}

.holo-list-duration {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.72rem;
    color: var(--holo-text-muted);
    font-weight: 800;
    padding-top: 2px;
}

.holo-floating-related-title {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.38;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--holo-text);
}

.holo-floating-related-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding-right: 64px;
    /* Space for buttons */
}

.holo-floating-related-channel {
    font-size: 0.78rem;
    color: var(--holo-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.holo-floating-player--dragging .holo-floating-player-related {
    pointer-events: none;
}

.holo-grid-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 5;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.holo-main-play-overlay {
    display: none !important;
}

.holo-grid-card--main:hover .holo-main-play-overlay {
    display: none !important;
}

.holo-clips-modal-footer {
    display: none;
}

.holo-clips-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 5000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.holo-clips-modal--visible {
    opacity: 1;
}

.holo-clips-modal-content {
    background: var(--holo-card-bg);
    width: 92%;
    max-width: 1200px;
    max-height: 85vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(20px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid var(--holo-border);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .holo-clips-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }
}

.holo-clips-modal--visible .holo-clips-modal-content {
    transform: translateY(0) scale(1);
}

.holo-clips-modal-header {
    display: none;
}

.holo-clips-modal-close {
    display: flex;
    /* Ensure it's shown even if parent header is hidden (if moved) */
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--holo-text);
    border: 2px solid var(--holo-border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: var(--holo-shadow);
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .holo-clips-modal-close {
    background: rgba(30, 41, 59, 0.9);
    color: #F8FAFC;
    border-color: var(--holo-border);
}

.holo-clips-modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    border-color: var(--holo-secondary);
    color: var(--holo-secondary);
    box-shadow: 0 4px 15px rgba(255, 77, 141, 0.3);
}

.holo-clips-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    background: var(--holo-bg);
}

.holo-modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.holo-modal-list--compact {
    gap: 10px;
}

/* Modals Grid - Match main grid proportions */
.holo-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .holo-modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .holo-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   FILTER BAR TOGGLE (MOBILE)
   ============================================================ */
.holo-filter-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    background: linear-gradient(120deg, var(--holo-primary) 0%, #00D4FF 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 800;
    font-family: var(--holo-font);
    line-height: 1;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(0, 168, 224, 0.18);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.holo-filter-toggle-btn:hover {
    background: linear-gradient(120deg, #00B0EB 0%, #00C8FF 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 168, 224, 0.24);
}

.holo-filter-toggle-btn--active {
    background: linear-gradient(120deg, #00A8E0 0%, #00D4FF 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 16px rgba(0, 168, 224, 0.28);
}

@media (min-width: 700px) {
    .holo-filter-bar {
        position: fixed;
        top: var(--header-height, 66px);
        left: 0;
        right: 0;
        bottom: auto;
        z-index: 6500;
    }

    .holo-filter-toggle-btn {
        display: none;
    }

    .site-main {
        padding-top: calc(84px + var(--holo-desktop-filter-height, 0px));
    }
}

/* ============================================================
   RESPONSIVE - PHONE (max-width: 699px)
   ============================================================ */
@media (max-width: 699px) {
    .holo-filter-bar {
        position: fixed;
        top: auto;
        bottom: 0;
        z-index: 999;
        border-bottom: none;
        border-top: 3px solid var(--holo-primary);
        box-shadow: 0 -8px 30px rgba(0, 184, 240, 0.12), 0 -2px 8px rgba(0, 0, 0, 0.05);
    }

    .header-nav {
        display: flex !important;
        gap: 10px;
    }

    .header-nav a {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .header-update-time {
        display: none;
    }

    .holo-filter-bar-inner {
        padding: 7px 10px 8px;
        flex-direction: column;
        align-items: stretch;
        overflow-x: visible;
        overflow-y: visible;
        cursor: default;
        gap: 6px;
    }

    .holo-filter-toggle-btn {
        display: inline-flex;
        order: 100;
        width: 100%;
        margin-top: 4px;
    }

    .holo-filter-controls {
        gap: 6px;
        flex-wrap: wrap;
        min-width: 0;
    }

    /* 検索窓を最初（1番目）に配置 */
    .holo-filter-search-wrapper {
        width: 100% !important;
        flex: none !important;
        order: -1 !important;
        /* Ensure it stays at the top */
        margin-bottom: 8px;
        /* Slightly more space */
    }

    /* チェックボックスとページャーの配置設定 */
    .holo-filter-checkboxes {
        gap: 5px;
        margin: 0;
        width: auto;
        display: flex;
        flex-wrap: wrap;
        order: 10;
        /* Always below items */
    }

    /* モバイルではアイコン + テキストを表示 */
    .holo-filter-checkbox-text {
        display: inline;
    }

    .holo-filter-pager {
        margin: 0;
        margin-left: auto;
        display: flex;
        align-items: center;
        flex-shrink: 0;
        order: 12;
        /* Beside or below checkboxes and reset btn */
    }

    /* 絞り込みボタン */
    .holo-filter-toggle-btn {
        display: flex;
        order: 20;
        /* Very bottom */
        width: 100%;
        margin-top: 8px;
    }

    .holo-filter-controls .holo-filter-item,
    .holo-filter-controls .holo-filter-reset-btn,
    .holo-filter-controls .holo-filter-advanced-wrapper,
    .holo-filter-controls .holo-filter-search-wrapper,
    .holo-filter-controls .holo-filter-advanced-btn {
        display: none !important;
    }

    /* ページャーとチェックボックス、リセットボタンの順序整理 */
    .holo-filter-controls .holo-filter-item {
        order: 1;
    }

    .holo-filter-controls .holo-filter-reset-btn {
        order: 11;
        margin-left: 0;
    }

    /* チェックボックス、ページャー、トグルは常に表示 */
    .holo-filter-controls .holo-filter-pager,
    .holo-filter-controls .holo-filter-checkboxes,
    .holo-filter-controls .holo-filter-toggle-btn {
        display: flex !important;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-item,
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-search-wrapper {
        display: flex !important;
        animation: holoSlideUp 0.25s ease;
    }

    /* モバイルでは展開時もデスクトップ版リセットは出さない */
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-reset-btn {
        display: none !important;
        animation: none !important;
    }

    /* reset-mobile は常に静的表示にする */
    .holo-filter-controls .holo-filter-reset-mobile,
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-reset-mobile {
        display: inline-flex !important;
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }

    /* 展開時は詳細フィルタも表示する */
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-advanced-wrapper {
        display: flex !important;
        animation: holoSlideUp 0.25s ease;
    }

    /* ページャーは常に表示 */
    .holo-filter-controls .holo-filter-pager,
    .holo-filter-controls .holo-filter-toggle-btn {
        display: inline-flex !important;
    }

    .holo-filter-controls .holo-filter-pager--inactive {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    /* モバイルではページャー記号のみ非表示 */
    .holo-filter-pager-label {
        display: none !important;
    }

    .holo-active-filters {
        display: flex;
        padding-top: 10px;
        flex-wrap: wrap;
        white-space: normal;
    }

    .holo-filter-select {
        min-width: 80px;
        max-width: 150px;
        font-size: 0.72rem;
        padding: 5px 22px 5px 8px;
    }

    .holo-filter-date-input {
        width: 105px;
        font-size: 0.7rem;
        padding: 5px 6px;
    }

    .holo-filter-label {
        font-size: 0.64rem;
    }

    .holo-filter-checkbox-label {
        font-size: 0.69rem;
        padding: 4px 7px;
    }

    .holo-filter-reset-btn {
        font-size: 0.69rem;
        padding: 5px 9px;
    }

    .holo-filter-item--range {
        flex-wrap: wrap;
    }

    .holo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .holo-grid-card {
        border-width: 1px;
        contain-intrinsic-size: 1px 220px;
    }

    .holo-grid-thumb {
        border-bottom-width: 1px;
    }

    /* -- Condensed Grid Info -- */
    .holo-grid-info {
        padding: 5px 7px 6px;
        gap: 3px;
    }

    .holo-grid-title {
        font-size: 0.82rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: auto;
        margin-bottom: 0;
        line-height: 1.2;
    }

    .holo-grid-meta {
        display: none;
    }

    .holo-grid-channel {
        display: none;
    }

    .holo-grid-main-channel {
        display: none;
    }

    .holo-grid-actions {
        display: flex;
        padding-top: 3px;
        gap: 3px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .holo-goto-clips-btn {
        padding: 4px 5px;
        font-size: 0.6rem;
        line-height: 1;
    }

    .holo-watch-later-btn-mini {
        width: 27px !important;
        height: 27px !important;
        margin: 0 1px !important;
        font-size: 0.82rem !important;
    }

    .holo-youtube-link {
        width: 27px;
        height: 27px;
    }

    /* .holo-goto-clips-btn: font-size removed to use container queries from line 1916 */

    /* -- Floating Player: Mobile Top -- */
    .holo-floating-player {
        top: 64px;
        /* Pushed below fixed site header, JS will refine this */
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 0 0 12px 12px;
        border-top: none;
        z-index: 7000;
        /* Below header (8000) and above modal (6000) */
    }

    .holo-floating-player--visible~.site-main,
    .holo-floating-player--visible~.holo-aggregator-ui {
        transition: padding-top 0.3s;
    }

    .holo-resize-handle,
    #holo-floating-pip {
        display: none !important;
    }

    .holo-floating-player-close {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }

    /* -- Clips Modal: Mobile Start Below Header -- */
    .holo-clips-modal {
        top: auto;
        bottom: 0;
        height: auto;
        z-index: 7100;
        /* Above the mobile floating player (7000) but below the site header (8000) */
        --holo-clips-modal-mobile-row-h: 112px;
        --holo-clips-modal-mobile-gap: 8px;
        --holo-clips-modal-mobile-body-pad-y: 12px;
        --holo-clips-modal-mobile-footer-h: 54px;
        --holo-clips-modal-mobile-extra-h: 16px;
        align-items: flex-end;
        justify-content: center;
        pointer-events: none;
    }

    .holo-clips-modal-content {
        width: 100%;
        max-width: 100%;
        height: calc((var(--holo-clips-modal-mobile-row-h) * 4) + (var(--holo-clips-modal-mobile-gap) * 3) + (var(--holo-clips-modal-mobile-body-pad-y) * 2) + var(--holo-clips-modal-mobile-footer-h) + var(--holo-clips-modal-mobile-extra-h));
        max-height: calc(100vh - 64px);
        border-radius: 20px 20px 0 0;
        min-height: 0;
        transform: translateY(100%) scale(0.98);
        pointer-events: auto;
        overscroll-behavior: contain;
    }

    .holo-clips-modal-header {
        padding: 8px 12px;
        background: var(--holo-card-bg);
        border-bottom: 1px solid var(--holo-border);
        justify-content: flex-end;
    }

    .holo-clips-modal-title {
        display: none;
    }

    .holo-close-icon {
        display: none;
    }

    .holo-close-text {
        display: inline;
    }

    .holo-clips-modal-close {
        display: none !important;
        /* Force hide header close button on mobile */
    }

    .holo-clips-modal-body {
        padding: 12px 14px 70px;
        /* align with holo-aggregator-ui */
        max-height: none;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .holo-clips-modal-footer {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 12px;
        background: linear-gradient(to top, var(--holo-card-bg) 80%, transparent 100%);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
        z-index: 10;
    }

    .holo-clips-modal-close-mobile {
        width: 100%;
        padding: 7px 14px;
        /* match holo-filter-toggle-btn */
        border-radius: 100px;
        background: var(--holo-primary-light, #E1F5FE);
        color: #00B8F0;
        font-size: 0.78rem;
        /* match holo-filter-toggle-btn */
        font-weight: 800;
        border: 2px solid rgba(0, 184, 240, 0.3);
        box-shadow: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .holo-clips-modal-close-mobile::before {
        content: "✕ ";
    }

    .holo-clips-modal-close-mobile:hover {
        background: #00B8F0;
        color: #fff;
        border-color: #00B8F0;
    }

    .holo-floating-related-meta {
        padding-right: 84px;
    }

    .holo-clips-modal .holo-floating-related-item {
        gap: 14px;
        padding: 8px;
        min-height: var(--holo-clips-modal-mobile-row-h);
        overflow: hidden;
    }

    .holo-clips-modal .holo-floating-related-thumb {
        width: 140px;
        border-radius: 8px;
        height: calc(var(--holo-clips-modal-mobile-row-h) - 16px);
    }

    .holo-clips-modal .holo-floating-related-info {
        gap: 4px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .holo-clips-modal .holo-floating-related-title {
        font-size: 0.94rem;
        line-height: 1.32;
        min-height: calc(1.32em * 2);
    }

    .holo-clips-modal .holo-floating-related-channel {
        font-size: 0.82rem;
    }

    .holo-clips-modal .holo-list-duration {
        font-size: 0.76rem;
    }

    .holo-floating-related-item .holo-watch-later-btn-mini {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.8rem !important;
    }

    .holo-floating-related-item .holo-youtube-link {
        width: 28px !important;
        height: 28px !important;
    }

    .holo-floating-related-item .holo-youtube-link svg {
        width: 15px !important;
        height: 15px !important;
    }

    .holo-modal-list--compact {
        gap: var(--holo-clips-modal-mobile-gap);
    }
}

/* ============================================================
   RESPONSIVE - PHONE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .holo-clips-modal {
        --holo-clips-modal-mobile-row-h: 104px;
        --holo-clips-modal-mobile-gap: 8px;
        --holo-clips-modal-mobile-body-pad-y: 12px;
        --holo-clips-modal-mobile-footer-h: 54px;
        --holo-clips-modal-mobile-extra-h: 16px;
    }

    .holo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .holo-date-header {
        width: calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }

    .holo-aggregator-ui {
        padding: 8px;
    }

    .holo-date-header {
        font-size: 1rem;
        margin: 18px 0 10px 0;
        padding: 6px 16px;
        gap: 8px;
        display: flex;
        width: calc((100% - 8px) / 2);
        max-width: calc((100% - 8px) / 2);
        box-sizing: border-box;
        align-self: flex-start;
    }

    .holo-grid-info {
        padding: 6px 7px 6px;
    }

    .holo-grid-title {
        font-size: 0.86rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: calc(1.24em * 2);
        line-height: 1.24;
    }

    .holo-clips-modal .holo-floating-related-item {
        gap: 12px;
        padding: 7px;
        min-height: 104px;
    }

    .holo-clips-modal .holo-floating-related-thumb {
        width: 128px;
        height: 90px;
    }

    .holo-clips-modal .holo-floating-related-title {
        font-size: 0.9rem;
        line-height: 1.28;
        min-height: calc(1.28em * 2);
    }

    .holo-preview-layout .holo-grid-title {
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        min-height: calc(1.12em * 2) !important;
    }

    .holo-clips-modal .holo-floating-related-channel {
        font-size: 0.78rem;
    }

    .holo-grid-actions {
        gap: 3px;
    }

    .holo-goto-clips-btn {
        padding: 5px 7px;
        font-size: 0.66rem;
    }

    /* 画面がさらに小さい場合はラベルだけに戻す */
    .holo-filter-checkbox-text {
        display: none;
    }

    .holo-filter-reset-text {
        display: none;
    }

    .holo-filter-reset-btn {
        padding: 0 8px;
    }

    .holo-floating-player-header {
        padding: 6px 12px;
    }
}

@media (min-width: 1241px) {
    .holo-filter-bar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .holo-filter-controls {
        flex: 0 0 auto;
        min-width: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
        overflow-x: hidden;
        overflow-y: visible;
        gap: 8px 8px;
    }

    .holo-filter-controls > * {
        flex-shrink: 0;
    }

    .holo-filter-search-wrapper {
        display: block;
        flex: 1 1 280px;
        width: 100%;
        min-width: 0;
        max-width: 360px;
        margin: 0;
        align-self: center;
    }

    .holo-filter-item--date {
        flex: 1 1 240px;
        min-width: 220px;
    }

    .holo-filter-item--channel {
        flex: 1 1 280px;
        min-width: 240px;
    }

    .holo-filter-item--channel .holo-custom-select-wrapper {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .holo-filter-pager {
        order: 7 !important;
        margin-left: auto;
        width: auto;
        justify-content: flex-end;
        padding-left: 0;
        padding-top: 0;
        border-left: 0;
        border-top: 0;
        flex: 0 0 auto;
    }

    .holo-active-filters {
        margin-right: 0;
    }

    .holo-active-filters-tags {
        flex-wrap: wrap;
        overflow-x: visible;
        overflow-y: visible;
        touch-action: auto;
    }
}

@media (min-width: 1241px) and (max-width: 1400px) {
    .holo-filter-search-wrapper {
        flex-basis: 300px;
        max-width: 340px;
    }

    .holo-filter-item--date {
        flex: 1 1 260px;
        min-width: 240px;
    }

    .holo-filter-item--channel {
        flex: 1 1 300px;
        min-width: 260px;
    }
}

@media (max-width: 699px) {
    .holo-filter-bar {
        position: fixed;
        top: auto;
        bottom: 0;
        z-index: 999;
        border-bottom: none;
        border-top: 3px solid var(--holo-primary);
        box-shadow: 0 -8px 30px rgba(0, 184, 240, 0.12), 0 -2px 8px rgba(0, 0, 0, 0.05);
    }

    .holo-filter-bar-inner {
        padding: 6px 8px;
        flex-direction: column;
        align-items: stretch;
    }

    .holo-filter-controls {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "search search search"
            "date date date"
            "channel channel channel"
            "checks . pager"
            "toggle toggle toggle";
        align-items: start;
        gap: 6px 8px;
        min-width: 0;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        align-content: start;
        align-items: center;
        justify-items: stretch;
        scrollbar-gutter: stable;
        order: 1;
    }

    .holo-filter-controls.holo-filter-controls--expanded {
        gap: 6px 6px;
    }

    .holo-filter-search-wrapper {
        grid-area: search;
        width: 100% !important;
        flex: none !important;
        min-width: 0;
        max-width: none;
        order: 1 !important;
        margin-bottom: 0;
        grid-column: 1 / -1;
    }

    .holo-filter-search,
    .holo-filter-select,
    .holo-filter-select-ymd,
    .holo-filter-date-input,
    .holo-filter-pager-input {
        font-size: 16px;
    }

    .holo-filter-select-ymd,
    .holo-filter-date-input {
        font-size: 0.7rem;
    }

    .holo-filter-search::placeholder {
        font-size: 0.7rem;
        opacity: 0.8;
    }

    .holo-filter-controls .holo-filter-item {
        width: 100%;
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
        flex: 1 1 100%;
    }

    .holo-filter-controls .holo-filter-item--date {
        grid-area: date;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        grid-column: 1 / -1;
    }

    .holo-filter-controls .holo-filter-item--date .holo-filter-label {
        flex: 0 0 auto;
        width: auto;
    }

    .holo-filter-controls .holo-filter-item--date .holo-filter-ymd-inputs {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .holo-filter-controls .holo-filter-item--channel {
        grid-area: channel;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        grid-column: 1 / -1;
    }

    .holo-filter-controls .holo-filter-item--channel .holo-filter-label {
        flex: 0 0 auto;
    }

    .holo-filter-controls .holo-filter-item--channel .holo-custom-select-wrapper {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    .holo-filter-checkboxes {
        grid-area: checks;
        order: 2;
        width: auto;
        flex: 0 0 auto;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 0;
        align-items: center;
        align-self: center;
        justify-self: start;
        min-height: 36px;
    }

    .holo-filter-pager {
        grid-area: pager;
        order: 1;
        width: auto;
        margin-left: 0;
        justify-content: flex-end;
        padding-left: 0;
        padding-top: 0;
        border-left: 0;
        border-top: 0;
        flex: 0 0 auto;
        align-self: center;
        justify-self: end;
        min-height: 36px;
    }

    .holo-active-filters {
        order: 0;
        margin-bottom: 6px;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label,
    .holo-filter-checkboxes .holo-filter-reset-mobile {
        align-self: center;
    }

    .holo-filter-pager-btn,
    .holo-filter-pager-input {
        height: 32px;
        box-sizing: border-box;
    }

    .holo-filter-pager-btn {
        width: 36px;
        height: 36px;
        padding-bottom: 0;
        line-height: 1;
    }

    .holo-filter-pager-input {
        width: 42px;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 1;
    }

    .holo-filter-toggle-btn {
        grid-area: toggle;
        order: 3;
        width: 100%;
        margin-top: 0;
        min-height: 40px;
        padding: 0 14px;
        font-size: 0.74rem;
    }

    .holo-filter-controls > * {
        flex-shrink: 1;
    }

    .holo-filter-controls .holo-filter-item,
    .holo-filter-controls .holo-filter-reset-btn,
    .holo-filter-controls .holo-filter-advanced-wrapper,
    .holo-filter-controls .holo-filter-search-wrapper,
    .holo-filter-controls .holo-filter-advanced-btn {
        display: none !important;
    }

    .holo-filter-controls .holo-filter-pager,
    .holo-filter-controls .holo-filter-checkboxes,
    .holo-filter-controls .holo-filter-toggle-btn {
        display: flex !important;
    }

    .holo-filter-controls .holo-filter-reset-btn,
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-reset-btn {
        display: none !important;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label,
    .holo-filter-checkboxes .holo-filter-reset-mobile {
        display: inline-flex !important;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label {
        order: 1;
    }

    .holo-filter-checkboxes .holo-filter-checkbox-label--fav {
        order: 2;
    }

    .holo-filter-checkboxes .holo-filter-reset-mobile {
        order: 3;
        margin-left: 0;
        flex: 0 0 auto;
        min-width: 0;
        padding: 0 12px;
        align-self: center;
        height: 34px;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-item,
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-search-wrapper {
        display: flex !important;
        animation: holoSlideUp 0.25s ease;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-item--date {
        flex-direction: row;
        align-items: center;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-item--date .holo-filter-ymd-inputs {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-item--channel .holo-custom-select-wrapper {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .holo-active-filters-tags {
        flex-wrap: wrap;
        overflow-x: visible;
        overflow-y: visible;
        touch-action: auto;
    }

    .holo-filter-controls .holo-filter-reset-btn,
    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-reset-btn {
        display: inline-flex !important;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-reset-btn {
        order: 3 !important;
        width: auto !important;
        flex: 0 0 auto !important;
        min-width: 0;
        margin-left: 0;
        align-self: center;
    }

    .holo-filter-controls .holo-filter-pager--inactive {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .holo-filter-controls .holo-filter-checkbox-label {
        flex-shrink: 0;
    }

    .holo-filter-controls .holo-filter-pager {
        margin-left: 0;
        width: auto;
        flex-shrink: 0;
    }

    .holo-filter-pager-label {
        display: none !important;
    }

    .holo-filter-controls.holo-filter-controls--expanded .holo-filter-toggle-btn {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 0;
        margin-left: 0;
        flex: 0 0 100%;
    }

    .holo-filter-controls:not(.holo-filter-controls--expanded) .holo-filter-search-wrapper {
        margin-bottom: 0;
    }

    .holo-filter-controls:not(.holo-filter-controls--expanded) .holo-filter-toggle-btn {
        margin-top: 0;
    }

    .holo-filter-controls .holo-filter-checkbox-label {
        order: 1;
    }

    .holo-filter-controls .holo-filter-checkbox-label--fav {
        order: 2;
    }

    .holo-filter-controls .holo-filter-reset-btn {
        order: 4;
        padding: 0 12px;
    }

    .holo-filter-controls .holo-filter-advanced-wrapper,
    .holo-filter-controls .holo-filter-advanced-btn {
        display: none !important;
    }

    .holo-aggregator-ui {
        padding-bottom: calc(160px + var(--holo-filter-bar-height, 0px));
    }
}

/* ============================================================
   WATCH LATER SIDEBAR
   ============================================================ */
.holo-wl-sidebar {
    position: fixed;
    top: 70px;
    /* Base header height approx */
    right: -550px;
    width: 500px;
    height: calc(100vh - 70px);
    z-index: 7000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
}

.holo-wl-sidebar--active {
    right: 0;
}

.holo-wl-sidebar-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: auto;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
}

.holo-wl-sidebar--active .holo-wl-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.holo-wl-sidebar-content {
    position: relative;
    width: 100%;
    background: var(--holo-card-bg);
    box-shadow: none;
    /* Hide shadow when inactive to prevent bleed */
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--holo-primary);
    transition: box-shadow 0.4s ease;
}

.holo-wl-sidebar--active .holo-wl-sidebar-content {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.holo-wl-sidebar-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--holo-border);
    background: var(--holo-card-bg);
}

.holo-wl-sidebar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--holo-primary);
}

.holo-wl-sidebar-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--holo-text-muted);
    transition: color 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
}

.holo-wl-sidebar-close:hover {
    color: var(--holo-secondary);
}

.holo-wl-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.holo-wl-item-wrapper {
    position: relative;
}

.holo-wl-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--holo-bg);
    padding: 12px;
    border-radius: var(--holo-radius);
    border: 2px solid var(--holo-border);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.holo-wl-item:hover {
    transform: translateX(-5px);
    border-color: var(--holo-primary);
    box-shadow: var(--holo-shadow);
}

.holo-wl-item-thumb {
    width: 160px;
    aspect-ratio: 16/9;
    background: var(--holo-border);
    border-radius: var(--holo-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.holo-wl-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: transparent;
}

.holo-wl-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.holo-wl-item-title {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--holo-text);
}

.holo-wl-item-channel {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--holo-text-muted);
}

.holo-wl-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--holo-secondary);
    color: #fff;
    border: 2px solid var(--holo-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 2;
    transition: all 0.2s;
}

.holo-wl-remove:hover {
    transform: scale(1.1) rotate(90deg);
}

@media (max-width: 500px) {
    .holo-wl-sidebar {
        width: 100% !important;
        right: -100% !important;
        top: 64px;
        height: calc(100% - 64px);
    }

    .holo-wl-sidebar,
    .holo-wl-sidebar-overlay {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .holo-wl-sidebar-header {
        padding: 12px 16px;
    }

    .holo-wl-sidebar-title {
        font-size: 1rem;
    }

    .holo-wl-sidebar,
    .holo-wl-sidebar-overlay {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .holo-wl-sidebar-header {
        padding: 10px 16px !important;
    }

    .holo-wl-sidebar-title {
        font-size: 1rem !important;
    }

    .holo-wl-sidebar--active {
        right: 0 !important;
    }

    .holo-wl-sidebar-overlay {
        z-index: -1;
        /* Inside parent, but below content */
    }

    .holo-wl-item {
        gap: 10px;
        padding: 10px;
    }

    .holo-wl-item-thumb {
        width: 120px;
    }
}

/* --- Watch Later Button (in actions) --- */
.holo-watch-later-btn-mini {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: var(--holo-card-bg) !important;
    color: var(--holo-text-muted) !important;
    border: 2px solid var(--holo-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    margin: 0 4px !important;
    padding: 0 !important;
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

[data-theme="dark"] .holo-watch-later-btn-mini {
    color: #CBD5E0 !important;
    /* Brighter than standard muted text in dark mode */
    border-color: #475569 !important;
    background: rgba(148, 163, 184, 0.08) !important;
}

.holo-watch-later-btn-mini:hover {
    transform: scale(1.1) !important;
    color: var(--holo-secondary) !important;
    border-color: var(--holo-secondary) !important;
    background: var(--holo-secondary-light) !important;
}

.holo-watch-later-btn-mini--active {
    background: linear-gradient(135deg, #FFB7C5, #FFB1BF) !important;
    color: #fff !important;
    border-color: #FFA5B4 !important;
    box-shadow: 0 4px 10px rgba(255, 150, 180, 0.45) !important;
}

[data-theme="dark"] .holo-watch-later-btn-mini--active {
    background: linear-gradient(135deg, #B83280, #97266D) !important;
    box-shadow: 0 4px 12px rgba(184, 50, 128, 0.3) !important;
    border-color: #D53F8C !important;
}

.holo-watch-later-btn-mini--active:hover {
    background: linear-gradient(135deg, #FFC1CC, #FFB7C5) !important;
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.55) !important;
    transform: scale(1.15) !important;
}

/* --- Watch Later Batch Actions --- */
.holo-wl-batch-actions {
    padding: 10px 16px;
    border-bottom: 1px solid var(--holo-border);
    display: flex;
    justify-content: flex-end;
}

.holo-wl-clear-all {
    padding: 6px 12px;
    background: #FFF5F5;
    color: #E53E3E;
    border: 1px solid #FED7D7;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    /* Push to right, before close button */
    margin-right: 10px;
}

.holo-wl-clear-all:hover {
    background: #E53E3E;
    color: #fff;
    border-color: #E53E3E;
}

/* --- Toast Notification --- */
.holo-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 800;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.holo-toast--visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.holo-toast--fav {
    background: var(--holo-secondary);
}

@media (max-width: 500px) {
    .holo-toast {
        bottom: 80px;
        width: 90%;
        max-width: 320px;
        font-size: 0.75rem;
        padding: 8px 16px;
    }
}

/* ============================================================
   INFORMATIONAL ARTICLES (About, Privacy, etc.)
   ============================================================ */
.holo-article {
    background: var(--holo-card-bg);
    border: 2px solid var(--holo-border);
    border-radius: var(--holo-radius-lg);
    padding: 40px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: var(--holo-shadow-lg);
    line-height: 1.8;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 4px solid var(--holo-primary);
    display: inline-block;
}

.info-section {
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--holo-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-subtitle::before {
    content: '';
    display: block;
    width: 6px;
    height: 1.5rem;
    background: var(--holo-primary);
    border-radius: 3px;
}

.info-grid {
    display: grid;
    gap: 10px;
}

.info-grid p {
    margin: 0;
}

.terms-content p {
    margin-bottom: 16px;
}

.terms-content ul {
    margin-top: 4px;
    margin-bottom: 16px;
    padding-left: 20px;
    list-style-type: disc;
}

.terms-content li {
    margin-bottom: 4px;
}

.terms-content li:last-child {
    margin-bottom: 0;
}

.terms-content strong {
    color: var(--holo-text);
    font-weight: 900;
}

.inline-link,
.holo-article a {
    color: var(--holo-primary);
    text-decoration: none;
    font-weight: 700;
    transition: filter 0.2s, opacity 0.2s;
    border-bottom: none;
}

.inline-link:hover,
.holo-article a:hover {
    filter: brightness(1.2);
    opacity: 0.8;
}

.article-meta {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--holo-border);
    font-size: 0.9rem;
    color: var(--holo-text-muted);
    text-align: right;
}

@media (max-width: 768px) {
    .holo-article {
        padding: 25px;
        margin: 20px 10px;
    }

    .article-title {
        font-size: 1.8rem;
    }
}

/* --- Swipe Navigation --- */
@media (max-width: 768px) {
    #video-grid-container {
        /* 横スワイプでブラウザの履歴移動が発生するのを防ぎ、JavaScriptで制御しやすくする */
        touch-action: pan-y;
    }
}
/* Feed Sections Batch Display */
.holo-feed-section--hidden { opacity: 0; visibility: hidden; }

/* ============================================================
   HOVER PREVIEW (Desktop Only)
   ============================================================ */
.holo-preview-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.holo-preview-layout .holo-modal-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
}

.holo-preview-layout .holo-grid-card {
    display: flex !important;
    flex-direction: row !important;
    height: 135px !important;
    min-height: 135px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 16px !important;
    background: var(--holo-card-bg) !important;
    border: 2px solid var(--holo-border) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    overflow: hidden !important;
}

.holo-preview-layout .holo-grid-card:hover {
    border-color: var(--holo-primary) !important;
    background: var(--holo-primary-light) !important;
}

.holo-preview-layout .holo-grid-thumb {
    width: 240px !important;
    height: 135px !important;
    min-width: 240px !important;
    border-radius: 16px 0 0 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    border-bottom: none !important;
}

.holo-preview-layout .holo-grid-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.holo-preview-layout .holo-grid-info {
    padding: 8px 14px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    gap: 6px !important;
}

.holo-preview-layout .holo-grid-title {
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    font-weight: 800 !important;
    color: var(--holo-text) !important;
    min-height: calc(1.12em * 3) !important;
}

.holo-preview-layout .holo-preview-channel {
    display: block !important;
    font-size: 0.8rem !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    color: var(--holo-text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 0 !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

.holo-preview-layout .holo-preview-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: auto !important;
    min-width: 0 !important;
}

.holo-preview-layout .holo-grid-views {
    display: inline-flex !important;
    font-size: 0.78rem !important;
    color: var(--holo-primary) !important;
    background: var(--holo-primary-light) !important;
    padding: 3px 7px !important;
    border-radius: 100px !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
}

.holo-preview-layout .holo-preview-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
}

.holo-preview-layout .holo-watch-later-btn-mini,
.holo-preview-layout .holo-youtube-link {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
}

.holo-preview-layout .holo-watch-later-btn-mini {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
}

.holo-preview-layout .holo-youtube-link {
    width: 32px !important;
    height: 32px !important;
}

.holo-preview-layout .holo-youtube-link svg {
    width: 17px !important;
    height: 17px !important;
}

.holo-preview-layout .holo-grid-card--original {
    border: 2.5px solid var(--holo-secondary) !important;
}
