/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ── */
:root {
    --bg:       #0e0e10;
    --bg-card:  #18181b;
    --bg-hover: #26262c;
    --text:     #efeff1;
    --text-dim: #adadb8;
    --accent:   #bf94ff;
    --link:     #a970ff;
    --border:   #2f2f35;
    --btn:      #9147ff;
    --btn-hover:#772ce8;
    --red:      #eb0400;
    --green:    #00c853;
    --font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', sans-serif;
    --container: 1200px;
}

body.jav-body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Header ── */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Site-level navigation links */
.site-nav { display: flex; gap: 4px; flex-shrink: 0; }
.site-nav a {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: var(--bg-hover); }
.site-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }

.header-search {
    flex: 1;
    display: flex;
    max-width: 400px;
}
.header-search input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
}
.header-search input:focus { outline: none; border-color: var(--accent); }
.header-search button {
    background: var(--btn);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}
.header-search button:hover { background: var(--btn-hover); }

.lang-switcher { position: relative; margin-left: auto; }
.lang-current {
    background: var(--btn);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.4;
}
.lang-current:hover { background: var(--btn-hover); }
.lang-current span { font-size: 10px; opacity: .7; }
.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    flex-direction: column;
    min-width: 56px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
    z-index: 200;
}
.lang-switcher:focus-within .lang-dropdown,
.lang-switcher.open .lang-dropdown { display: flex; }
.lang-dropdown a {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.lang-dropdown a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }

/* ── Main ── */
.site-main { padding: 24px 16px 12px; max-width: var(--container); margin: 0 auto; }

/* ── Ad Slots ── */
.ad-slot {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
}
.ad-slot--footer_banner {
    width: 100%;
    height: 100px;
    max-height: 100px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
}
/* Desktop: show 728×90, hide 300×50 */
.jads-mobile  { display: none; }
.jads-desktop { display: block; }
/* Mobile: swap to 300×50 and shrink slot height */
@media (max-width: 768px) {
    .ad-slot--footer_banner {
        height: 60px;
        max-height: 60px;
    }
    .jads-desktop { display: none; }
    .jads-mobile  { display: block; }
}

/* ── Detail page: 3× 300×250 above Screenshots ── */
/* WE control the flex row so layout is always horizontal regardless of ad fill.
   Desktop: zones 1112832 (A) | 1112828 (B) | 1112833 (C) side by side.
   Mobile (≤768px): only zone B (1112828) shown centred. */
.ad-slot--detail_mrec {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    width: 100%;
}
.mrec-unit {
    flex: 0 0 300px;
    width: 300px;
    height: 250px;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
}
@media (max-width: 768px) {
    .mrec-unit--a,
    .mrec-unit--c { display: none; }
    .ad-slot--detail_mrec { gap: 0; }
}

/* ── Footer ── */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 14px 0 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
    margin-bottom: 14px;
}
.footer-nav a {
    color: var(--text-dim);
    font-size: 12px;
    padding: 3px 10px;
    text-decoration: none;
    border-right: 1px solid var(--border);
    transition: color .15s;
    white-space: nowrap;
}
.footer-nav a:last-child { border-right: none; }
.footer-nav a:hover { color: var(--text); text-decoration: none; }

.footer-copy { color: var(--text-dim); font-size: 11px; line-height: 1.6; }

/* ── Legal Pages ── */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 48px;
}
.legal-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}
.legal-updated {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 32px;
}
.legal-section {
    margin-bottom: 32px;
}
.legal-section h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
}
.legal-section p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dim);
}
.legal-section p strong { color: var(--text); }
.legal-section ul, .legal-section ol {
    margin: 8px 0 10px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dim);
}
.legal-section li { margin-bottom: 4px; }
.legal-note {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    margin-top: 16px;
}

/* DMCA steps */
.dmca-steps { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.dmca-step {
    display: flex;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
}
.dmca-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--btn);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.dmca-step > div { flex: 1; }
.dmca-step strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 14px; }
.dmca-step p { margin: 0; font-size: 13px; }

/* Contact cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: border-color .15s;
}
.contact-card:hover { border-color: var(--accent); }
.contact-card__icon { font-size: 28px; margin-bottom: 10px; }
.contact-card h3 { font-size: 15px; margin-bottom: 8px; color: var(--text); }
.contact-card p { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.contact-card__link {
    display: inline-block;
    background: var(--btn);
    color: #fff;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    word-break: break-all;
    transition: background .15s;
}
.contact-card__link:hover { background: var(--btn-hover); text-decoration: none; color: #fff; }

/* Cookie table */
.cookie-table-wrap { overflow-x: auto; margin: 16px 0; }
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.cookie-table th, .cookie-table td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.cookie-table th {
    background: var(--bg-card);
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}
.cookie-table td { color: var(--text-dim); }

/* RTA badge */
.rta-badge-block { margin: 0 0 16px; }
.rta-badge-link { display: inline-block; }
.rta-badge-link img { border-radius: 3px; }

/* ── Video Grid ── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 16px 0;
}
@media (max-width: 900px) {
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}
.video-grid--small {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* ── Video Card ── */
.video-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    transition: transform .15s;
}
.video-card:hover { transform: translateY(-2px); }
.video-card__thumb-link { display: block; text-decoration: none; }
.video-card__thumb {
    aspect-ratio: 3 / 2;
    background: var(--bg-hover);
    overflow: hidden;
}
.video-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: right center;
    display: block;
    transition: opacity .2s;
}
.video-card__thumb-link:hover .video-card__thumb img { opacity: .85; }
.video-card__info {
    padding: 6px 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.video-card__title {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.video-card__title:hover { color: var(--accent); }
.video-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
}
.video-card__meta-left {
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.video-card__meta-left:not(a) { color: var(--text-dim); }
a.video-card__meta-left:hover { text-decoration: underline; }
.video-card__meta-right {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Video Single ── */
.video-single { max-width: 1000px; margin: 0 auto; }
.video-title { font-size: 20px; margin-bottom: 16px; }
.video-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) {
    .video-layout { grid-template-columns: 1fr; }
}

.video-media .video-cover img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    object-position: top center;
    border-radius: 4px;
    display: block;
    background: #111;
}

/* ── Preview Player (right column) ── */
.preview-player {
    display: grid;
    margin: 16px 0;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}
/* poster / slideshow / waiting / video 全部疊在同一個格子，靠 display:none 控制誰可見 */
.preview-poster,
.preview-slideshow,
.preview-waiting,
.preview-video { grid-area: 1 / 1; }
.preview-poster {
    position: relative;
    cursor: pointer;
    line-height: 0;
}
.preview-poster .preview-thumb {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 6px;
}
.preview-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    transition: background 0.2s;
}
.preview-poster:hover .preview-play-overlay { background: rgba(0, 0, 0, 0.55); }
.preview-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.preview-play-btn:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.08); }
.preview-player.loading .preview-play-btn { opacity: 0.5; pointer-events: none; }
/* SEO watch page: native video in DOM for crawlers (src fetched); hidden from view so users see token player */
.preview-video-seo {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.preview-video { width: 100%; display: block; background: #000; border-radius: 6px; }

/* ── Screenshot Slideshow (while preview is being downloaded) ── */
.preview-slideshow {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    line-height: 0;
}
.preview-slide-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: opacity 0.3s;
}
.preview-slide-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    line-height: 1;
}
.slide-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: background 0.2s;
}
.slide-dot.active { background: #fff; }

/* ── Preview Waiting Message ── */
.preview-waiting {
    padding: 14px 12px;
    text-align: center;
    background: #111;
    border-radius: 0 0 6px 6px;
}
.preview-waiting-msg {
    margin: 0;
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.5;
}

/* ── Preview fetching notice (worker still processing) ── */
.preview-fetching-notice {
    padding: 14px 12px;
    text-align: center;
    background: #111;
    border-radius: 6px;
    border: 1px dashed #333;
}
.preview-fetching-msg {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.5;
}

/* ── Screenshots (below player) ── */
.video-screenshots { margin-top: 32px; }
.video-screenshots-title { font-size: 16px; margin-bottom: 12px; color: var(--text); }
.video-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 115px;
    grid-auto-flow: dense;
    gap: 10px;
}
.video-screenshot-item {
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-card);
}
.video-screenshot-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Portrait images (ratio h/w > 1.1) span 2 rows */
.video-screenshot-item.portrait { grid-row: span 2; }
/* 來源 404 時隱藏該格，不顯示破圖圖示 */
.video-screenshot-item.media-load-failed { display: none; }

/* ── Meta Table ── */
.meta-table { width: 100%; border-collapse: collapse; }
.meta-table th, .meta-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}
.meta-table th { color: var(--text-dim); width: 80px; white-space: nowrap; }
.tag-link {
    display: inline-block;
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
    color: var(--link);
}
.tag-link:hover { background: var(--btn); color: #fff; text-decoration: none; }

/* ── Download Buttons ── */
.download-links { margin-top: 24px; }
.download-links h3 { font-size: 16px; margin-bottom: 12px; }
.dl-buttons { display: flex; flex-direction: column; gap: 8px; }
.dl-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    background: var(--btn);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background .15s;
}
.dl-btn:hover { background: var(--btn-hover); }
.dl-btn--magnet { background: #444; }
.dl-btn--magnet:hover { background: #555; }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 32px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span, .pagination button {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.pagination a, .pagination .pagination__btn {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.pagination a:hover,
.pagination .pagination__btn:hover { background: var(--bg-hover); text-decoration: none; }
.pagination__current {
    background: var(--btn);
    color: #fff;
    font-weight: 700;
    border: none;
}
.pagination__dots { color: var(--text-dim); cursor: default; }
.pagination__jump {
    background: var(--bg-card);
    color: var(--text-dim);
    border: 1px dashed var(--border);
    font-size: 12px;
    letter-spacing: 0.02em;
}
.pagination__jump:hover { color: var(--text); background: var(--bg-hover); }

/* ── Search ── */
.search-form { display: flex; max-width: 600px; margin: 16px 0; }
.search-form input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 15px;
}
.search-form input:focus { outline: none; border-color: var(--accent); }
.search-form button {
    background: var(--btn);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 15px;
}

.search-count, .taxonomy-count { color: var(--text-dim); margin-bottom: 16px; }
.no-results { color: var(--text-dim); font-style: italic; margin: 32px 0; }

/* ── Taxonomy ── */
.actress-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 12px 0 20px;
}
.actress-photo {
    width: 120px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Actress Profile ── */
.actress-profile {
    flex: 1;
    min-width: 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.actress-profile__bio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 16px;
    margin: 0;
}
.actress-profile__field {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 4px 0;
}
.actress-profile__field dt {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    min-width: 50px;
}
.actress-profile__field dd {
    font-size: 13px;
    margin: 0;
}
.actress-profile__sns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.actress-profile__sns-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, color .15s;
}
a.actress-profile__sns-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.actress-profile__sns-item--stopped {
    color: var(--text-dim);
    text-decoration: line-through;
    opacity: .6;
}
@media (max-width: 480px) {
    .actress-header {
        flex-direction: column;
        align-items: center;
    }
    .actress-profile {
        width: 100%;
    }
    .actress-profile__bio {
        grid-template-columns: 1fr;
    }
}

.view-all { margin-top: 16px; }
.view-all a { font-weight: 600; }

/* ── Sections ── */
.home-latest { margin-bottom: 32px; }
.home-latest h2 { margin-bottom: 12px; font-size: 18px; }
.related-videos { margin-top: 32px; }
.related-videos h3 { margin-bottom: 12px; }

/* ── Browse pages (Actresses / Genres / Makers) ── */
.browse-page { padding-bottom: 48px; }

.browse-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.browse-total-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dim);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Shared tab strip */
.browse-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
}
.browse-tab {
    background: var(--bg-card);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.browse-tab:hover { background: var(--bg-hover); color: var(--text); }
.browse-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.tab-count {
    font-size: 11px;
    opacity: .75;
}

/* ── SNS filter bar ── */
.browse-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: -12px 0 16px;
}
.browse-filters-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-right: 2px;
}
.browse-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.browse-filter svg { flex-shrink: 0; }
.browse-filter:hover { background: var(--bg-hover); color: var(--text); }
.browse-filter.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Actress browse ── */
.browse-actress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px;
}
.actress-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    transition: border-color .15s, background .15s;
    overflow: hidden;
}
.actress-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.actress-name { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actress-sub  { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.actress-count {
    font-size: 11px;
    color: var(--text-dim);
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}
.browse-empty { color: var(--text-dim); margin: 24px 0; }

/* ── Genre browse ── */
.genre-panel { display: none; }
.genre-panel.active { display: block; }

.genre-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.genre-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    transition: background .15s, border-color .15s;
}
.genre-tag:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.genre-tag:hover .genre-tag-count { color: rgba(255,255,255,.8); }
.genre-tag-count { font-size: 11px; color: var(--text-dim); }

/* ── Maker browse ── */
.maker-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.maker-tier-tabs { margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; }
.maker-search-input {
    flex: 1;
    min-width: 200px;
    padding: 7px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
}
.maker-search-input:focus { outline: none; border-color: var(--accent); }

.maker-showing { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.maker-no-results { color: var(--text-dim); font-style: italic; margin: 24px 0; }

.maker-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}
.maker-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 9px 14px;
    background: var(--bg-card);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    transition: border-color .15s, background .15s;
    overflow: hidden;
}
.maker-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.maker-name { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maker-sub  { font-size: 11px; color: var(--text-dim); flex-shrink: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80px; }
.maker-count {
    font-size: 12px;
    color: var(--text-dim);
    background: var(--bg);
    padding: 1px 7px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ── Updates / Batch pages ─────────────────────────────────────── */
.updates-list-page .page-title,
.updates-batch-page .page-title { margin-bottom: 16px; }

.batch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.batch-item {}
.batch-link {
    display: grid;
    grid-template-columns: 100px 90px 120px 130px 120px;
    align-items: center;
    column-gap: 8px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    transition: border-color .15s, background .15s;
}
.batch-link:hover { border-color: var(--accent); background: var(--bg-hover); }
.batch-date     { grid-column: 1; font-weight: 500; }
.batch-stat     { font-size: 13px; color: var(--text-dim); }
.batch-new      { grid-column: 2; color: var(--accent); font-weight: 600; }
.batch-updated  { grid-column: 3; color: #e8a040; font-weight: 600; }
.batch-actresses{ grid-column: 4; color: var(--text-dim); font-weight: 400; }
.batch-series   { grid-column: 5; color: var(--text-dim); font-weight: 400; }
@media (max-width: 540px) {
    .batch-link {
        display: flex; flex-wrap: wrap; gap: 4px 10px;
    }
    .batch-date { flex: 0 0 100%; font-size: 13px; margin-bottom: 2px; }
    .batch-stat { font-size: 12px; }
}

.batch-header { margin-bottom: 20px; }
.batch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.badge:hover, .badge.active { border-color: var(--accent); background: var(--bg-hover); color: var(--accent); }
.badge.clear-filter { color: var(--text-dim); }
.badge.badge-info { cursor: default; pointer-events: none; opacity: 0.3; border-color: transparent; background: transparent; }
.breadcrumb { margin-bottom: 12px; font-size: 13px; }
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }


/* ── Home Sections ────────────────────────────────────────────────────────── */
.home-section {
    margin-bottom: 48px;
}
.home-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}
.home-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.home-section__viewall {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    white-space: nowrap;
}
.home-section__viewall:hover { color: var(--accent); text-decoration: none; }

/* ── Home Carousel ────────────────────────────────────────────────────────── */
.home-carousel {
    position: relative;
}
.home-carousel__track-wrap {
    overflow: hidden;
}
.home-carousel__track {
    display: flex;
    gap: 12px;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* Video carousel: 2-row CSS Grid, column width set by JS */
.home-carousel--videos .home-carousel__track {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    gap: 12px;
    /* grid-auto-columns injected by JS based on container width */
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.home-carousel--videos .home-carousel__item {
    min-width: 0;
}

/* Scroll carousels: track-wrap enables native horizontal scroll */
.home-carousel--actresses .home-carousel__track-wrap,
.home-carousel--tags .home-carousel__track-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.home-carousel--actresses .home-carousel__track-wrap::-webkit-scrollbar,
.home-carousel--tags .home-carousel__track-wrap::-webkit-scrollbar {
    display: none;
}
.home-carousel--actresses .home-carousel__track,
.home-carousel--tags .home-carousel__track {
    display: flex;
    gap: 12px;
    /* no transition — scroll-based, not transform-based */
    transform: none !important;
}

/* Actress carousel: avatar cards */
.home-carousel--actresses .home-carousel__track {
    padding-bottom: 4px;
}
.actress-card {
    flex: 0 0 110px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.actress-card:hover { color: var(--accent); text-decoration: none; }
.actress-card__img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: block;
}
.actress-card__name {
    font-size: 12px;
    line-height: 1.3;
    max-width: 100px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.actress-card__count {
    font-size: 11px;
    color: var(--text-dim);
}

/* Tag carousel: genre / maker badges */
.home-carousel--tags .home-carousel__track {
    flex-wrap: nowrap;
    padding-bottom: 4px;
}
.tag-card {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}
.tag-card:hover { border-color: var(--accent); background: var(--bg-hover); color: var(--accent); text-decoration: none; }
.tag-card__name { font-size: 13px; font-weight: 500; }
.tag-card__count { font-size: 11px; color: var(--text-dim); }

/* Arrows */
.home-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity .15s, border-color .15s;
    padding: 0;
}
.home-carousel__arrow:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }
.home-carousel__arrow--prev { left: -16px; }
.home-carousel__arrow--next { right: -16px; }
.home-carousel__arrow[disabled] { opacity: 0.3; cursor: default; }
@media (max-width: 600px) {
    .home-carousel__arrow { display: none; }
}

/* Dots (video carousel only) */
.home-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
.home-carousel__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .15s;
}
.home-carousel__dot.active { background: var(--accent); }

/* ── Home Video Card (hvc) ────────────────────────────────────────────────── */
.hvc {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.hvc__thumb-link {
    display: block;
    text-decoration: none;
}
.hvc__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-card);
    border-radius: 4px;
}
.hvc__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center; /* default: DMM double-panel → show front cover */
    display: block;
    transition: opacity .2s;
}
/* portrait/square images shown with contain + dark letterbox */
.hvc__thumb img.hvc-contain,
.video-card__thumb img.hvc-contain {
    object-fit: contain;
    object-position: center;
    background: var(--bg-card);
}
.hvc__thumb-link:hover .hvc__thumb img { opacity: .85; }

.hvc__info {
    padding: 6px 2px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;          /* fill remaining card height so meta can anchor to bottom */
}
.hvc__title {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;          /* grow to push .hvc__meta to the bottom */
}
.hvc__title:hover { color: var(--accent); text-decoration: none; }

.hvc__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
}
.hvc__actress {
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}
.hvc__actress:not(a) { color: var(--text-dim); }
a.hvc__actress:hover { text-decoration: underline; }

.hvc__date {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.hvc__maker {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    margin-left: auto;
    max-width: 55%;
    text-decoration: none;
}
a.hvc__maker:hover { color: var(--accent); text-decoration: underline; }

/* ── Actress Facet Filters ─────────────────────────────────────────────────── */
.actress-facets {
    margin: 12px 0 24px;
}
.facet-group {
    margin-bottom: 12px;
}
.facet-group__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.facet-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.facet-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, border-color .15s, opacity .3s;
    white-space: nowrap;
}
.facet-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}
.facet-btn.is-active {
    background: var(--btn);
    border-color: var(--btn);
    color: #fff;
}
.facet-btn__count {
    font-size: 10px;
    opacity: .75;
    vertical-align: middle;
    line-height: 1;
}
.facet-btn.is-active .facet-btn__count { opacity: .85; }
.facet-btn--fading {
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}
.facet-reset {
    float: right;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
    font-size: 11px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.facet-reset:hover { background: var(--red); color: #fff; }
.facet-more {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.facet-more:hover { color: var(--accent); border-color: var(--accent); }
.facet-btns--hidden { margin-top: 6px; }

/* Mobile: cap facets height so it doesn't bury the video grid */
@media (max-width: 600px) {
    .actress-facets {
        position: relative;
        max-height: 160px;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .actress-facets.facets-expanded {
        max-height: 9999px;
    }
    .actress-facets::after {
        content: '';
        position: absolute;
        bottom: 0; left: 0; right: 0;
        height: 40px;
        background: linear-gradient(transparent, var(--bg));
        pointer-events: none;
    }
    .actress-facets.facets-expanded::after { display: none; }
    .facets-toggle {
        display: block;
        width: 100%;
        margin: 4px 0 10px;
        padding: 5px;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: 6px;
        color: var(--text-dim);
        font-size: 12px;
        cursor: pointer;
        text-align: center;
    }
}
@media (min-width: 601px) {
    .facets-toggle { display: none; }
}

/* Loading overlay on video grid while AJAX fetches */
#jaf-grid.jaf-loading {
    opacity: .45;
    pointer-events: none;
    transition: opacity .2s;
}
.jaf-spinner {
    text-align: center;
    padding: 32px 0;
    color: var(--text-dim);
    font-size: 14px;
}

/* ── Story pages ────────────────────────────────────────────────── */

/* Single story */
.story-single-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.story-header { margin-bottom: 28px; }
.story-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 12px;
}
.story-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-dim);
}
.story-meta time { font-weight: 500; }
.story-stats { color: var(--text-dim); }
.story-style-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--accent);
    color: var(--bg);
}

/* Story content — article body typography */
.story-content {
    font-size: 15.5px;
    line-height: 1.78;
    color: var(--text);
}
.story-content p {
    margin-bottom: 1.15em;
}
.story-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2em 0 .7em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.story-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.6em 0 .5em;
    color: var(--accent);
}
.story-content a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(169, 112, 255, .35);
    text-underline-offset: 2px;
    transition: text-decoration-color .15s;
}
.story-content a:hover {
    text-decoration-color: var(--link);
}

/* Prev / Next navigation */
.story-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}
.story-nav a {
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.story-nav a:hover { border-color: var(--accent); background: var(--bg-hover); }

/* Related stories */
.related-stories {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.related-stories h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
}
.related-stories-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.related-stories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.related-stories-list li a:hover { border-color: var(--accent); background: var(--bg-hover); }
.related-title { font-weight: 500; }
.related-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* Story list page */
.story-list-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.story-list-page .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.story-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.story-list-item {}
.story-link {
    display: grid;
    grid-template-columns: 95px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.story-link:hover { border-color: var(--accent); background: var(--bg-hover); }
.story-date { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.story-link .story-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-link .story-stats { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.story-link .story-style-badge { font-size: 11px; }

@media (max-width: 600px) {
    .story-link {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .story-link .story-title { white-space: normal; }
}

/* Pagination */
.story-list-page .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    justify-content: center;
}
.story-list-page .pagination a,
.story-list-page .pagination .page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--bg-card);
    transition: border-color .15s, background .15s;
}
.story-list-page .pagination a:hover { border-color: var(--accent); background: var(--bg-hover); }
.story-list-page .pagination .page-current {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    font-weight: 700;
}

/* Homepage stories section */
.home-stories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.home-story-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.home-story-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.home-story-card__body { flex: 1; min-width: 0; }
.home-story-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}
.home-story-card__desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-story-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
}
@media (max-width: 540px) {
    .home-story-card { flex-direction: column; gap: 8px; }
    .home-story-card__meta { flex-direction: row; align-items: center; }
}
