/* =====================
   基本設定（PC既定そのまま）
===================== */
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #fafafa;
    margin: 20px;
    color: #333;
    font-size: 14px;
}

h1 {
    margin-bottom: 20px;
    font-size: 28px;
}

/* =====================
   ヘッダー
===================== */
.site-header {
    background: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
}

.site-header .logo {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
}

.site-header .logo a {
    text-decoration: none;
    color: #222;
}

.site-header .logo a:hover {
    text-decoration: underline;
}

/* =====================
   ハンバーガー（虫眼鏡／×）
   ※ PCでは非表示、スマホで右端に表示
===================== */
.hamburger {
    display: none;
    /* PCで非表示 */
    cursor: pointer;
    width: 28px;
    height: 28px;
    position: absolute;
    top: 50%;
    right: 20px;
    /* 右端に配置（ロゴと同じ余白） */
    transform: translateY(-50%);
    z-index: 1001;
}

.hamburger span {
    display: none;
}

/* ×用ラインは通常非表示 */

/* 虫眼鏡の造形 */
.hamburger::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 50%;
    margin: auto;
}

.hamburger::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 2px;
    background: #333;
    bottom: 5px;
    right: 2px;
    transform: rotate(45deg);
    border-radius: 1px;
}

/* 開いたら × に切り替え（同位置） */
.hamburger.active::before,
.hamburger.active::after {
    content: none;
}

.hamburger.active span {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* =====================
   検索フォーム（共通：PCは従来どおり）
===================== */
.search-form {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-form label {
    font-size: 14px;
    margin-right: 6px;
}

.search-form input[type=text],
.search-form input[type=number],
.search-form select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 4px 6px 10px 0;
    font-size: 14px;
    min-width: 120px;
    box-sizing: border-box;
}

.search-form button {
    padding: 8px 16px;
    font-size: 15px;
    border-radius: 6px;
    border: none;
    background: #444;
    color: #fff;
    cursor: pointer;
    margin-right: 6px;
}

.search-form button:hover {
    background: #222;
}

.search-form .reset-link {
    font-size: 14px;
    text-decoration: none;
    color: #444;
}

.search-form .reset-link:hover {
    text-decoration: underline;
}

/* PC：横並び維持（既存挙動） */
@media (min-width:769px) {
    .form-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        align-items: center;
        margin-bottom: 10px;
    }

    .keyword-row,
    .order-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
    }

    .hamburger {
        display: none;
    }

    /* PCでは虫眼鏡非表示 */
    /* .search-overlay を PC では通常フローに */
    .search-overlay {
        display: block;
        position: static;
        inset: auto;
        background: transparent;
        z-index: auto;
        padding: 0;
    }
}

/* =====================
   グリッド（一覧）
===================== */
.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

@media (max-width:480px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================
   女優カード
===================== */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 10px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.card img {
    width: 100%;
    height: auto;
    max-width: 200px;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 6px;
    display: block;
}

.card .name {
    font-weight: bold;
    margin: 6px 0;
    font-size: 12px;
    /* ← 女優名のサイズをここで統一管理 */
    line-height: 1.4;
    /* 読みやすさ調整（任意） */
}



.card .profile {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
    line-height: 1.4;
}

.card a {
    text-decoration: none;
    color: #333;
}

.card a:hover {
    text-decoration: underline;
}

/* =====================
   ページネーション
===================== */
.pagination {
    margin-top: 18px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 4px;
    border-radius: 6px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    background: #fff;
    font-size: 14px;
}

.pagination a.active {
    background: #444;
    color: #fff;
    border-color: #444;
}

.pagination span {
    margin: 0 6px;
    color: #888;
    font-size: 14px;
}

/* =======================================================
   女優詳細（actress.php）— 出演作品カード & 再生マーク
======================================================= */
.grid.cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (max-width:480px) {
    .grid.cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.card.card--video {
    cursor: pointer;
    text-align: center;
}

.card.card--video .thumb-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.card.card--video .thumb-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 180px;
    aspect-ratio: 180 / 220;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 8px;
}

.card.card--video .thumb-wrap .play-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, .88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
    pointer-events: none;
}

.card.card--video .thumb-wrap .play-icon::before {
    content: "▶";
    font-size: 28px;
    color: #fff;
    margin-left: 4px;
}

.card.card--video .title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.card.card--video .meta {
    font-size: 12px;
    color: #666;
}

/* =====================
   モーダル（共通）
===================== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 9999;
}

.overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 28px;
}

.popup {
    width: 95%;
    max-width: 980px;
    background: #fff;
    border-radius: 8px;
    position: relative;
    padding: 14px;
    box-sizing: border-box;
}

.videoWrap {
    display: grid;
    place-items: center;
    background: #000;
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 16/9;
    max-width: 980px;
    margin: 0 auto;
    overflow: hidden;
}

.videoWrap iframe,
.videoWrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    border: 0;
    display: block;
}

.titleBar {
    background: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.titleBar a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.thumbsWrap {
    background: #333;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.thumbsInner {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.thumb {
    width: 100px;
    flex: 0 0 auto;
    cursor: pointer;
    opacity: .6;
    transition: transform .15s, opacity .15s;
    border-radius: 6px;
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.thumb.active {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #111;
}

.controls a {
    display: inline-block;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.counter {
    font-weight: 700;
    color: #111;
}

/* =================================================================
   ここからスマホ専用（PCデザインは変更しない）
================================================================= */
@media (max-width:768px) {

    /* 虫眼鏡（右端表示） */
    .hamburger {
        display: block;
    }

    /* 検索オーバーレイ（開いている間だけ黒半透明） */
    .search-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
    }

    .search-overlay.active {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 70px;
        /* ヘッダー分の余白 */
    }

    /* 検索フォーム：上からスライド、左右に余白を残す */
    .search-form {
        width: min(600px, calc(100% - 32px));
        /* 画面いっぱいにしない（左右16px余白） */
        margin: 0 auto;
        animation: slideDown .3s ease forwards;
        box-sizing: border-box;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 「女優名・タイトル」と「並び替え」は1ブロック1行（入力は100%で収める） */
    .keyword-row,
    .order-row {
        display: block;
        margin-bottom: 12px;
    }

    .keyword-row label,
    .order-row label {
        display: block;
        margin-bottom: 4px;
        font-size: 14px;
    }

    .keyword-row input,
    .order-row select {
        width: 100%;
        max-width: 100%;
        font-size: 15px;
        padding: 10px;
        box-sizing: border-box;
        /* はみ出し防止 */
    }

    /* 数値系（年齢/身長/B/W/H）は必ず1行（横スクロール許容） */
    .form-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-row label {
        margin: 0 6px 0 0;
        font-size: 14px;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .form-row .tilde {
        flex: 0 0 auto;
    }

    .form-row input[type=number] {
        width: 64px;
        /* 2〜3桁想定 */
        min-width: 56px;
        padding: 8px 8px;
        font-size: 14px;
        flex: 0 0 auto;
    }

    .form-row input[type=text],
    .form-row select {
        min-width: 60px;
        padding: 8px 10px;
        font-size: 14px;
        flex: 1 1 auto;
    }

    /* ボタンは幅いっぱい */
    .search-form button {
        width: 100%;
        padding: 14px;
        font-size: 17px;
        margin-top: 10px;
    }

    .search-form .reset-link {
        display: block;
        text-align: center;
        margin-top: 12px;
        font-size: 15px;
    }
}

/* =====================
   サイト統計表示
===================== */
.site-stats {
    font-size: 14px;
    color: #666;
    position: absolute;
    top: 50%;
    right: 60px;
    /* ハンバーガーの左に配置 */
    transform: translateY(-50%);
    white-space: nowrap;
}

/* スマホではロゴの下に表示 */
@media (max-width:768px) {
    .site-stats {
        position: static;
        margin-top: 6px;
        text-align: left;
        display: block;
        color: #444;
    }
}

/* =====================
   フッター
===================== */
.site-footer {
    margin-top: 40px;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.closeBtnTop {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s;
}

.closeBtnTop:hover {
    background: rgba(0, 0, 0, 0.85);
}

.name ruby rt {
    font-size: 10px;
    color: #888;
    font-weight: normal;
}

/* =====================
   お問い合わせフォーム
===================== */
.contact-form {
    background: #fff;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.contact-form h1 {
    font-size: 24px;
    margin-bottom: 18px;
    text-align: center;
    color: #222;
}

.contact-form .form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.contact-form label {
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 15px;
    color: #333;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    display: block;
    width: 100%;
    padding: 12px;
    background: #444;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
}

.contact-form button:hover {
    background: #222;
}

/* エラーメッセージ */
.contact-form .error-message {
    color: #c00;
    font-size: 14px;
    margin-top: 4px;
}

/* フッター内のリンク色を本文色に揃える */
.site-footer a:link,
.site-footer a:visited {
    color: #444;
    /* #666でもOK、好みで */
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    text-decoration: underline;
}

.page-title {
    font-size: 18px;
    /* お好みで調整 (14px〜20pxくらいが自然) */
    font-weight: bold;
    /* 見出し感を残したい場合 */
    margin-bottom: 16px;
    /* 余白調整 */
    text-align: center;
    /* 中央寄せしたい場合 */
}