:root {
    --primary:       #4f86f7;
    --primary-dark:  #2563eb;
    --primary-light: #eff4ff;
    --bg:            #f0f4fb;
    --bg-card:       #ffffff;
    --text:          #1e2a3a;
    --text-muted:    #7a8fa6;
    --border:        #dde4f0;
    --badge-amateur: #f59e0b;
    --badge-alias:   #8b5cf6;
    --shadow:        0 2px 12px rgba(79,134,247,0.10);
    --shadow-hover:  0 6px 24px rgba(79,134,247,0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

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

/* ヘッダー */
header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(79,134,247,0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}
header .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
    padding: 0 20px;
}
header h1 a {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
header h1 a span {
    color: var(--primary);
}

/* 検索バー */
.search-bar {
    flex: 1;
    display: flex;
    gap: 0;
}
.search-bar input {
    flex: 1;
    padding: 9px 16px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--primary); background: #fff; }
.search-bar button {
    padding: 9px 20px;
    background: var(--primary);
    color: #fff;
    border: 1.5px solid var(--primary);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}
.search-bar button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* メインコンテンツ */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px;
}

/* ヒーロー */
.hero {
    text-align: center;
    padding: 56px 20px 44px;
}
.hero h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.hero p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 15px;
}
.hero-search {
    display: flex;
    max-width: 540px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(79,134,247,0.22);
}
.hero-search input {
    flex: 1;
    padding: 15px 20px;
    font-size: 15px;
    background: #fff;
    border: 2px solid var(--primary);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--text);
    outline: none;
}
.hero-search input::placeholder { color: #b0bfd0; }
.hero-search button {
    padding: 15px 28px;
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s;
    white-space: nowrap;
}
.hero-search button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* セクションタイトル */
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    letter-spacing: 0.02em;
}
.section-title span { color: var(--primary-dark); }

/* 女優グリッド */
.actress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 16px;
}
.actress-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.actress-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.actress-card a { text-decoration: none; color: inherit; display: block; }
.actress-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: var(--bg);
}
.actress-card .no-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #e8eef8, #d0dcf0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0b4cc;
    font-size: 44px;
}
.actress-card .card-body { padding: 10px 12px 12px; }
.actress-card .name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}
.actress-card .kana { font-size: 11px; color: var(--text-muted); }
.actress-card .aliases { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 3px; }
.actress-card .alias-tag {
    display: inline-block;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 500;
}

/* 女優詳細 */
.actress-profile {
    display: flex;
    gap: 28px;
    margin-bottom: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.actress-profile img {
    width: 180px;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--bg);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.actress-profile .no-image {
    width: 180px;
    height: 240px;
    background: linear-gradient(135deg, #e8eef8, #d0dcf0);
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0b4cc;
    font-size: 64px;
}
.actress-info h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.actress-info .kana { color: var(--text-muted); margin-bottom: 16px; font-size: 14px; }
.alias-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.alias-badge {
    background: #ede9fe;
    color: #6d28d9;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #ddd6fe;
}
.alias-badge.past::before  { content: '旧名 '; font-size: 10px; opacity: 0.6; }
.alias-badge.alias::before { content: '別名 '; font-size: 10px; opacity: 0.6; }
.profile-table { font-size: 13px; border-collapse: collapse; }
.profile-table td { padding: 4px 12px 4px 0; }
.profile-table td:first-child {
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 70px;
    font-size: 12px;
}
.profile-table td:last-child { color: var(--text); font-weight: 500; }

/* タブ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tab-count {
    background: var(--border);
    border-radius: 20px;
    font-size: 11px;
    padding: 1px 8px;
    margin-left: 5px;
    font-weight: 700;
}
.tab-btn.active .tab-count { background: var(--primary); color: #fff; }

/* 作品グリッド */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.item-card a { text-decoration: none; color: inherit; display: block; }
.item-card .jacket {
    position: relative;
    width: 100%;
    aspect-ratio: 9/6;
    background: var(--bg);
    overflow: hidden;
}
.item-card .jacket img { width: 100%; height: 100%; object-fit: cover; }
.item-card .jacket .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0bfd0;
    font-size: 32px;
    background: linear-gradient(135deg, #e8eef8, #d0dcf0);
}
.item-card .amateur-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--badge-amateur);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(245,158,11,0.4);
}
.item-card .card-body { padding: 9px 10px; }
.item-card .title {
    font-size: 11px;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    font-weight: 500;
}
.item-card .meta { font-size: 10px; color: var(--text-muted); line-height: 1.6; }
.item-card .fanza-link {
    display: block;
    text-align: center;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-top: 1px solid var(--border);
    padding: 7px;
    font-size: 11px;
    font-weight: 700;
    transition: background 0.2s;
    letter-spacing: 0.02em;
}
.item-card .fanza-link:hover { background: #dbeafe; text-decoration: none; }

/* バッジ */
.badge-amateur-label {
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #fde68a;
    margin-left: 8px;
    font-weight: 600;
}

/* ページネーション */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
    padding: 7px 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
    background: var(--primary-light);
}
.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* アラート */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* フッター */
footer {
    border-top: 1px solid var(--border);
    padding: 24px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 48px;
    background: #fff;
}

/* レスポンシブ */
@media (max-width: 640px) {
    header .inner { flex-wrap: wrap; height: auto; padding: 10px 20px; gap: 10px; }
    .search-bar { order: 3; width: 100%; }
    .actress-profile { flex-direction: column; }
    .actress-profile img, .actress-profile .no-image { width: 100%; height: 200px; }
    .actress-grid { grid-template-columns: repeat(3, 1fr); }
    .items-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h2 { font-size: 22px; }
}
