/* Site-specific extensions on top of colors_and_type.css + kit.css */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 4px 0 18px;
    color: var(--fg-3);
    font-size: 12px;
    line-height: 1.5;
}
.breadcrumbs a {
    color: var(--fg-2);
}
.breadcrumbs a:hover {
    color: var(--accent);
}
.breadcrumbs span:last-child {
    max-width: 78ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .breadcrumbs span:last-child {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-title {
    margin: 0 0 18px;
    color: var(--fg-1);
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.35;
    font-weight: 700;
}

/* 18+確認 */
html:not(.age-ok),
.has-age-gate {
    overflow: hidden;
}
.age-ok .age-gate,
.age-gate[hidden] {
    display: none;
}
.age-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(10, 10, 12, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.age-gate-panel {
    width: min(420px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 6px;
    padding: 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.age-gate-logo {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 22px;
    color: var(--fg-1);
    margin-bottom: 18px;
}
.age-gate-logo span {
    color: var(--accent);
}
.age-gate-title {
    font-size: 24px;
    line-height: 1.35;
    margin-bottom: 10px;
    color: var(--fg-1);
    font-weight: 700;
}
.age-gate-panel p {
    color: var(--fg-2);
    line-height: 1.7;
    margin-bottom: 20px;
}
.age-gate-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 480px) {
    .age-gate-panel {
        padding: 22px;
    }
    .age-gate-actions {
        grid-template-columns: 1fr;
    }
}

/* ページネーション */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin: var(--sp-5) 0;
    font-family: var(--font-en);
    font-variant-numeric: tabular-nums;
}
.pagination .pg-btn,
.pagination .pg-cur,
.pagination .pg-gap {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 2px;
}
.pagination .pg-btn {
    background: var(--bg-card);
    color: var(--fg-1);
    border: 1px solid var(--border-1);
    cursor: pointer;
}
.pagination .pg-btn:hover { color: var(--accent); border-color: var(--accent); }
.pagination .pg-cur {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}
.pagination .pg-gap { color: var(--fg-3); border: none; min-width: 18px; }
.pagination .pg-info {
    margin-left: auto;
    color: var(--fg-3);
    font-size: 12px;
}

/* 空状態 */
.empty-state {
    padding: 48px 16px;
    text-align: center;
    color: var(--fg-3);
    background: var(--bg-card);
    border: 1px dashed var(--border-1);
    border-radius: var(--r-card);
}

/* meta テーブル（作品詳細・女優詳細用） */
.meta-table {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--sp-2) var(--sp-4);
    font-size: 13px;
}
.meta-table .k { color: var(--fg-3); }
.meta-table .v { color: var(--fg-1); }
.meta-table .v a { border-bottom: 1px dashed var(--border-1); }
.meta-table .v a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* 簡易作品カード（タイトルのみのとき） */
.work.minimal .pkg::before {
    content: 'No image';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--fg-4);
    letter-spacing: 0.05em;
}
.work.minimal .pkg[style*="background-image"]::before {
    content: none;
}

/* 作品カードのサムネ: 縦長（FANZAパッケージ準拠）+ contain でトリミングなし */
.work .pkg {
    aspect-ratio: 3 / 4 !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: var(--bg-card-2);
    overflow: hidden;
}

.pkg .thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.pkg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.actor-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.pkg-main-img,
.work-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.work .ttl {
    overflow-wrap: anywhere;
    word-break: normal;
}

.work-main-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.work-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 8px 8px;
}

.work-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    flex: 0 1 auto;
    border: 1px solid rgba(255, 20, 112, 0.28);
    border-radius: 3px;
    background: rgba(255, 20, 112, 0.1);
    color: #ff8fbd;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

.work-card-cta.is-fanza:hover {
    background: rgba(255, 20, 112, 0.18);
    border-color: rgba(255, 20, 112, 0.45);
    color: #ffd1e4;
}

.work-card-cta.is-mgs {
    border-color: rgba(47, 128, 237, 0.36);
    background: rgba(47, 128, 237, 0.12);
    color: #8fc3ff;
}

.work-card-cta.is-mgs:hover {
    background: rgba(47, 128, 237, 0.2);
    border-color: rgba(47, 128, 237, 0.55);
    color: #d7ebff;
}

.client-work-section[hidden] {
    display: none !important;
}

.client-work-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.client-work-card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-card);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.client-work-card:hover {
    border-color: var(--accent);
}

.client-work-media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background: var(--bg-card-2);
}

.client-work-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.client-work-body {
    display: grid;
    gap: 5px;
    padding: 9px 10px 10px;
}

.client-work-title {
    color: var(--fg-1);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.client-work-code {
    color: var(--accent);
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 700;
}

.genre-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 999px;
    color: var(--fg-1);
    font-size: 13px;
    text-decoration: none;
}

.genre-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.genre-chip-count {
    color: var(--fg-3);
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 700;
}

.search-recovery-section {
    margin-top: var(--sp-5);
}

.search-recovery-link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.search-recovery-link {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 4px;
    color: var(--fg-1);
    font-size: 13px;
}

.search-recovery-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.search-recovery-link span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-recovery-link span:last-child {
    flex: 0 0 auto;
    color: var(--fg-3);
    font-family: var(--font-en);
    font-size: 11px;
}

.favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border-1);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--fg-1);
    font-weight: 700;
    cursor: pointer;
}

.favorite-toggle-icon {
    color: #ffd84d;
    font-size: 17px;
    line-height: 1;
    text-shadow: 0 0 8px rgba(255, 216, 77, 0.35);
}

.favorite-toggle:hover,
.favorite-toggle.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.work-title-main {
    font-size: 22px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: normal;
}

.work-title-main.is-minimal {
    font-size: 21px;
}

@media (min-width: 901px) {
    .work-title-main {
        font-size: 23px;
    }
}

@media (max-width: 480px) {
    .work-title-main,
    .work-title-main.is-minimal {
        font-size: 19px;
        line-height: 1.45;
    }
}

.actor-popular-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}
.actor-popular-grid .actor-thumb {
    min-width: 0;
}

.actor-thumb .av {
    position: relative;
    overflow: hidden;
}

.actor-thumb .av.has-img {
    background-image: none;
}

.actor-thumb .actor-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.series-thumb .pkg {
    aspect-ratio: 3 / 4 !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: var(--bg-card-2);
}

/* hero card のオーバーレイテキスト: コンパクト + 1行 ellipsis */
.hero-card .ttl {
    font-size: 14px !important;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 2px !important;
}
.hero-card.large .ttl {
    font-size: 18px !important;
}
.hero-card .meta {
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.hero-card { background-size: cover !important; }

/* リンク種類バッジ（FANZA/元情報など） */
.link-kind {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 2px;
    background: var(--bg-card-2);
    color: var(--fg-3);
    font-family: var(--font-en);
    letter-spacing: 0.05em;
    margin-left: 4px;
}
.link-kind.fanza_verified { background: var(--accent); color: #fff; }
.link-kind.fanza_guess { background: var(--accent-soft); color: var(--accent); }

/* nav-search を form として使うため */
.nav-search { gap: 0; }
.nav-search input { width: 100%; }

.search-tabs {
    position: relative;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.search-tabs .tab {
    white-space: nowrap;
}
@media (max-width: 720px) {
    .search-tabs {
        margin-right: calc(var(--sp-5) * -1);
        padding-right: var(--sp-5);
    }
}

/* 404 page */
.not-found {
    max-width: 760px;
    margin: 56px auto;
    padding: 40px 20px;
    text-align: center;
}
.not-found-code {
    font-family: var(--font-en);
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}
.not-found h1 {
    font-size: 30px;
    margin: 0 0 12px;
}
.not-found p {
    color: var(--fg-2);
    line-height: 1.8;
    margin: 0 auto 18px;
    max-width: 620px;
}
.not-found-path {
    display: inline-block;
    max-width: 100%;
    margin: 0 0 22px;
    padding: 6px 10px;
    border: 1px solid var(--border-1);
    border-radius: 4px;
    color: var(--fg-3);
    font-family: var(--font-en);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.not-found-search {
    display: flex;
    gap: 8px;
    max-width: 560px;
    margin: 0 auto 18px;
}
.not-found-search .input {
    flex: 1 1 auto;
    min-width: 0;
}
.not-found-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.not-found-popular {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
    text-align: left;
}
.not-found-popular h2 {
    margin: 0 0 10px;
    font-size: 16px;
}
.not-found-popular a {
    display: block;
    padding: 8px 0;
    color: var(--fg-2);
    border-bottom: 1px solid var(--border-1);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.not-found-popular a:hover {
    color: var(--accent);
}
@media (max-width: 720px) {
    .not-found-popular {
        grid-template-columns: 1fr;
    }
}

/* Conversion helpers */
.cta-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 4px;
    position: sticky;
    top: calc(var(--nav-h) + 16px);
}
.cta-note {
    font-size: 11px;
    color: var(--fg-3);
    text-align: center;
    line-height: 1.6;
}
.inline-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.inline-cta .btn {
    min-height: 42px;
    width: 100%;
}
.inline-cta .btn-mgs {
    min-width: 0;
    width: 100%;
    text-align: center;
    justify-content: center;
}
.inline-cta .note {
    color: var(--fg-3);
    font-size: 11px;
    line-height: 1.5;
    flex: 0 0 100%;
}
.official-overlay {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    background: rgba(10,10,12,0.82);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
}
a:hover .official-overlay {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-mgs {
    min-height: 52px;
    background: #2f80ed !important;
    border-color: #2f80ed !important;
    color: #fff !important;
}
.btn-mgs:hover {
    background: #4b97ff !important;
    border-color: #4b97ff !important;
    color: #fff !important;
}
.genre-tags span,
.genre-tags a {
    padding: 4px 10px;
    background: var(--bg-card-2);
    color: var(--fg-1);
    font-size: 12px;
    border-radius: 999px;
}
.genre-tags a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.sample-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.sample-strip img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--bg-card-2);
    border-radius: 2px;
    display: block;
}

.sample-movie {
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 4px;
    overflow: hidden;
}
.sample-movie-head {
    padding: 10px 12px;
    color: var(--fg-2);
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-1);
}
.sample-movie iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
}
@media (max-width: 720px) {
    .sample-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ナビの日本語ラベルが1文字ずつ折り返されるのを防ぐ */
.app-nav .logo,
.nav-links a {
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .app-nav {
        height: auto;
        min-height: var(--nav-h);
        flex-wrap: wrap;
        gap: 10px 18px;
        padding: 10px var(--sp-4);
    }
    .nav-links {
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 18px;
    }
    .nav-search {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 1100px) {
    .actor-popular-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .client-work-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .search-recovery-link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .actor-popular-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .client-work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .search-recovery-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .actor-popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .client-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-recovery-link-grid { grid-template-columns: 1fr; }
    .not-found { margin: 28px auto; padding: 28px 0; }
    .not-found h1 { font-size: 24px; }
    .not-found-search { flex-direction: column; }
}

.work-media {
    min-width: 0;
}

.work-hero-slot {
    display: block;
    text-decoration: none;
}

@media (max-width: 900px) {
    .work-detail-layout,
    .mgs-work-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .work-media {
        display: contents;
    }

    .work-hero-slot {
        order: 1;
    }

    .work-info-block {
        order: 2;
    }

    .work-sample-list {
        order: 3;
        margin-top: 0 !important;
    }

    .work-sample-movie {
        order: 3;
    }

    .work-sample-list.samples,
    .work-sample-list.sample-strip {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .work-sample-list a:nth-child(n+11) {
        display: none;
    }

    .work-sample-list img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        border-radius: 3px;
    }

    .work-media-note {
        display: none;
    }

    .work-breadcrumb-tail,
    .work-detail-float-cta {
        display: none !important;
    }
}
