@import url("https://fonts.googleapis.com/css2?family=MuseoModerno:wght@700&family=Noto+Sans:wght@300;400;600;700&family=Noto+Sans+JP:wght@300;400;600;700&display=swap");

:root {
    /* 変数: 背景色 */
    --bg: #f7f1e8;
    /* 変数: 背景グラデーション */
    --bg-accent: #fff6ec;
    /* 変数: テキスト色 */
    --text: #1a1a1a;
    /* 変数: サブテキスト */
    --muted: #6b5f55;
    /* 変数: アクセント */
    --accent: #e91e63;
    /* 変数: サブアクセント */
    --accent-2: #0f7173;
    /* 変数: カード背景 */
    --card: #ffffff;
    /* 変数: 境界線 */
    --border: #e7d6c3;
    /* 変数: 影 */
    --shadow: 0 10px 30px rgba(26, 26, 26, 0.08);
    /* 変数: ヘッダー背景 */
    --header-bg: #fec7d7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans", "Noto Sans JP", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, var(--bg-accent), var(--bg));
}

html:lang(ja) body {
    font-family: "Noto Sans JP", "Noto Sans", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: min(1180px, 92vw);
    margin: 0 auto 64px;
}

.site-header {
    padding: 24px 4vw 16px;
    display: grid;
    gap: 16px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.brand-link {
    font-size: 28px;
    letter-spacing: 0.06em;
    /* 注記: ブランド名を太字にする */
    font-weight: 700;
    /* 注記: ブランド名のフォント指定 */
    font-family: "MuseoModerno", "Noto Sans", "Noto Sans JP", sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 28px;
    height: 28px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-switch a,
.auth-links a {
    margin-right: 12px;
    font-size: 13px;
    color: var(--muted);
}

.search-area {
    background: var(--card);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.search-form label span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.search-form input,
.search-form select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}

.search-form .search-input {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 12px;
}

.search-submit {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(26, 26, 26, 0.12);
}

.search-submit:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.search-submit-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-form .view-all {
    font-size: 12px;
    color: var(--accent-2);
    align-self: center;
}

.search-results {
    margin-top: 16px;
}

.search-results[hidden] {
    display: none;
}

.search-results-empty {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.search-results-list {
    display: grid;
    gap: 12px;
}

.search-examples {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.search-examples-title {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-examples-list {
    display: grid;
    gap: 10px;
    background: #f3efe9;
    border-radius: 12px;
    padding: 12px;
}

.search-example-label {
    font-size: 12px;
    color: var(--text);
    font-weight: 700;
}

.search-example-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.search-example-link {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    text-decoration: underline;
    cursor: pointer;
}

.search-example-link:hover {
    color: var(--accent-2);
}

.search-example-sep {
    font-size: 12px;
    color: var(--muted);
}

.search-result-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.search-result-thumb {
    width: 96px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-code {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
}

.section {
    margin-top: 40px;
}

.section h1,
.section h2 {
    margin: 0 0 16px;
}

.meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag,
.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 12px;
}

.rank-list {
    padding-left: 18px;
}

/* 注記: 人気キャストのセクション */
.popular-cast-sections {
    display: grid;
    gap: 24px;
}

.popular-cast-section {
    background: var(--card);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.popular-cast-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.popular-cast-title {
    margin: 0;
}

.popular-cast-updated {
    font-size: 12px;
    color: var(--muted);
}

/* 注記: デフォルトは8列で表示 */
.popular-cast-list {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.popular-cast-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    text-align: center;
}

.popular-cast-thumb,
.popular-cast-placeholder {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    object-fit: cover;
    background: #f0e7db;
}

.popular-cast-name {
    font-size: 13px;
}

.video-list {
    display: grid;
    gap: 16px;
}

.video-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    background: var(--card);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

/* 注記: サムネイル右下の再生時間バッジ */
.video-thumb,
.related-thumb {
    position: relative;
    display: block;
}

.video-duration-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: #666;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1.2;
    z-index: 1;
}

.calendar-date .video-card {
    position: relative;
}

.calendar-date .video-card-link {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    z-index: 1;
}

.calendar-date .video-actions {
    position: relative;
    z-index: 2;
}

.video-thumb img,
.thumb-placeholder {
    width: 100%;
    height: 210px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0e7db;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.video-title {
    margin: 8px 0 12px;
}

.video-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.maker-sections {
    display: grid;
    gap: 28px;
}

.maker-section-title {
    margin: 0 0 12px;
    font-size: 18px;
}

.maker-section-title a {
    color: inherit;
}

.maker-section-title a:hover {
    text-decoration: underline;
}

.home-video-grid .video-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.home-video-grid .video-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.home-video-grid .video-thumb img,
.home-video-grid .thumb-placeholder {
    height: auto;
    aspect-ratio: 2 / 3;
}

.home-video-grid .video-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-video-grid .video-title {
    order: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.home-video-grid .video-meta {
    order: 2;
}

.home-video-grid .video-actions {
    order: 3;
}

.home-video-grid .video-meta span:not(:first-child) {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 13px;
    cursor: pointer;
}

.btn.ghost {
    background: transparent;
    color: var(--accent-2);
    border: 1px solid var(--accent-2);
}

.detail-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 20px;
}

.detail-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.detail-sample {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.detail-sample::-webkit-scrollbar {
    display: none;
}

.detail-player .thumb-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.detail-body {
    background: var(--card);
    padding: 20px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.detail-related {
    background: var(--card);
    padding: 16px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.detail-related h2 {
    margin-top: 0;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-card {
    display: grid;
    gap: 8px;
}

.related-thumb img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #f0e7db;
}

.related-thumb .thumb-placeholder {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: #f0e7db;
}

.related-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.detail-meta,
.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.detail-info {
    display: grid;
    gap: 8px;
}

.pagination {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.pagination .page {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.pagination .page.active {
    background: var(--accent-2);
    color: #fff;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-buttons .sort-btn.active {
    box-shadow: var(--shadow);
}

.cell-date-link {
    color: inherit;
    text-decoration: none;
}

.cell-date-link:hover {
    text-decoration: underline;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.weekly-calendar {
    margin-bottom: 16px;
    overflow-x: auto;
}

.weekly-calendar-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
    gap: 8px;
    min-width: 560px;
}

.weekly-day {
    background: var(--card);
    border-radius: 12px;
    padding: 10px;
    min-height: 90px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid transparent;
}

.weekly-day-weekday {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.weekly-day-date {
    font-size: 16px;
    font-weight: 600;
}

.weekly-day.selected {
    border-color: var(--accent);
    background: #fff1f5;
}

.weekly-day .today-label {
    margin-left: 0;
    margin-top: 6px;
    align-self: flex-start;
}

.calendar-grid {
    display: grid;
    gap: 8px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-row.header span {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
}

.calendar-cell {
    background: var(--card);
    border-radius: 12px;
    padding: 10px;
    min-height: 120px;
    box-shadow: var(--shadow);
}

.calendar-cell.empty {
    background: transparent;
    box-shadow: none;
}

.cell-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* 注記: 今日セルの強調 */
.calendar-cell.today {
    border: 1px solid var(--accent);
    background: #fff1f5;
}

/* 注記: 今日ラベル */
.today-label {
    margin-left: auto;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 2px 6px;
    background: #fff;
}

.cell-count {
    font-size: 14px;
    color: var(--accent-2);
}

.empty-message {
    color: var(--muted);
}

.load-more {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.site-footer {
    margin-top: 64px;
    padding: 24px 4vw;
    border-top: 1px solid var(--border);
    background: #fff;
    text-align: center;
}

.footer-credit,
.footer-copy {
    font-size: 12px;
    color: var(--muted);
}

.footer-credit {
    margin-bottom: 6px;
}

.footer-credit a {
    color: var(--accent-2);
}

.footer-credit a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.favorites-share {
    background: var(--card);
    padding: 16px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.favorites-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted);
}

.share-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.share-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.share-links a {
    font-size: 13px;
    color: var(--accent-2);
}

.favorites-list {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

/* 注記: 画面幅に応じて列数を調整 */
/* 注記: 1200px以下は6列 */
@media (max-width: 1200px) {
    .popular-cast-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* 注記: 980px以下は4列 */
@media (max-width: 980px) {
    .popular-cast-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* 注記: 720px以下は3列 */
@media (max-width: 720px) {
    .popular-cast-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 注記: 520px以下は2列 */
@media (max-width: 520px) {
    .popular-cast-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .home-video-grid .video-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .home-video-grid .video-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .video-card {
        grid-template-columns: 1fr;
    }
    .video-thumb img,
    .thumb-placeholder {
        height: 200px;
    }
}

@media (max-width: 700px) {
    .nav-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .search-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .search-result-card {
        grid-template-columns: 1fr;
    }
    .search-result-thumb {
        width: 100%;
        height: 180px;
    }
}
