/* ══════════════════════════════════════
   Episode Detail Page Styles
   ══════════════════════════════════════ */

.episode-page {
    background: var(--light-bg);
}

.ep-detail-main {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 80px;
    min-height: 80vh;
}

/* Navigation */
.ep-detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 16px 0;
    border-bottom: 1px solid var(--light-border);
}

.ep-nav-link {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--light-muted);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--light-border);
    transition: all 0.3s var(--ease);
}

.ep-nav-link:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-50);
}

.ep-nav-home {
    background: var(--brand-50);
    color: var(--brand);
    border-color: transparent;
}

/* Article hero */
.ep-detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-bottom: 56px;
    align-items: start;
}

.ep-detail-artwork {
    position: sticky;
    top: calc(var(--header-h) + 24px);
}

.ep-detail-artwork img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.ep-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ep-detail-number {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-50);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
}

.ep-detail-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--light-muted);
}

.ep-detail-duration {
    font-size: 0.78rem;
    color: var(--light-muted);
}

.ep-detail-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
    line-height: 1.4;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.ep-detail-desc {
    font-size: 0.92rem;
    color: var(--light-secondary);
    line-height: 1.9;
    white-space: pre-wrap;
}

/* Platform links */
.ep-detail-platforms {
    border-top: 1px solid var(--light-border);
    padding-top: 40px;
    margin-bottom: 48px;
}

.ep-detail-platforms-heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 20px;
}

.ep-detail-platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.ep-detail-platform {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    transition: all 0.3s var(--ease);
    height: 72px;
}

.ep-detail-platform img {
    height: var(--logo-height, 28px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.ep-detail-platform:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--brand-50);
}

.note-promo-card-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s var(--ease);
}

.note-promo-card-mini:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.note-icon-mini {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--light-border);
}

.note-icon-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.note-text-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.note-text-mini strong {
    font-size: 1rem;
    color: var(--light-text);
}

.note-text-mini span {
    font-size: 0.8rem;
    color: var(--light-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .ep-detail-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ep-detail-artwork {
        position: static;
        max-width: 280px;
        margin: 0 auto;
    }

    .ep-detail-title {
        font-size: 1.4rem;
    }

    .ep-detail-nav {
        gap: 8px;
    }

    .ep-nav-link {
        font-size: 0.72rem;
        padding: 6px 10px;
    }

    .ep-detail-platforms-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════
   REFERENCES — 参考資料セクション
   ══════════════════════════════════════ */
.ep-detail-references {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--light-border);
}

.ep-detail-references-heading {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 16px;
}

.ref-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ref-item {
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.ref-item:hover {
    border-color: var(--brand);
}

.ref-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.ref-link:hover {
    background: var(--brand-50);
}

.ref-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-text);
}

.ref-url {
    font-size: 0.75rem;
    color: var(--light-muted);
    word-break: break-all;
    font-family: var(--font-mono);
}