/**
 * 作品詳細 (Issue #153 PR4)
 *
 * - デスクトップ2カラム: ジャケット（左・sticky）｜情報（右）
 *   イベント詳細（event-single.css）と同じ型
 * - カードは kk-card、バッジは kk-badge、色は全てトークン
 * - 旧ダークブロックは削除（トークンで自動追従）
 */

.work-detail-container {
    padding-top: var(--space-2);
    padding-bottom: var(--space-4);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
   パンくず
   ================================ */

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb a {
    color: var(--link);
}

.breadcrumb a:hover {
    color: var(--link-hover);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ================================
   ヘッダー
   ================================ */

.work-header {
    margin-bottom: var(--space-3);
}

.work-header__badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.work-header .work-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--heading);
    line-height: 1.35;
    margin: 0;
}

/* SOLD OUT は両モード共通の暗色（画像上の可読性優先） */
.work-badge--sold-out {
    background: rgba(8, 12, 24, 0.78);
    color: #ffffff;
}

/* ================================
   2カラムレイアウト
   ================================ */

.work-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) 1fr;
    gap: var(--space-3);
    align-items: start;
}

.work-poster {
    position: sticky;
    top: var(--space-2);
}

.work-poster__inner {
    overflow: hidden;
    padding: 0;
}

.work-poster__inner img {
    width: 100%;
    height: auto;
    display: block;
}

.work-main {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}

/* ================================
   情報カード
   ================================ */

.info-card,
.description-card,
.tracklist-card {
    padding: var(--space-3);
}

/* カード内の小見出し（ミンサー下線は控えめサイズ） */
.kk-section-title--sub {
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
}

.kk-section-title--sub::after {
    width: 84px;
    height: 6px;
    margin-top: 8px;
}

.info-grid {
    display: grid;
}

.info-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-soft);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    color: var(--accent-strong);
    font-size: 0.88rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.info-value--price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-strong);
}

/* ================================
   購入エリア
   ================================ */

.purchase-area {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-soft);
    text-align: center;
}

.purchase-note {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ================================
   本文
   ================================ */

.description-content {
    color: var(--text-primary);
    line-height: 1.9;
    font-size: 1rem;
}

.description-content p {
    margin-bottom: 1em;
}

.description-content h2,
.description-content h3 {
    color: var(--heading);
    margin: 1.4em 0 0.7em;
}

.description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ================================
   曲目リスト
   ================================ */

.track-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 13px 4px;
    border-bottom: 1px solid var(--border-soft);
    transition: background-color 0.2s ease;
}

.track-item:hover {
    background-color: var(--bg-inset);
}

.track-item:last-child {
    border-bottom: none;
}

.track-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--bg-inset-strong);
    color: var(--accent-strong);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.85rem;
}

.track-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 1rem;
}

/* ================================
   アクション
   ================================ */

.work-actions {
    display: flex;
}

/* ================================
   関連作品
   ================================ */

.related-section {
    margin-top: var(--space-5);
}

.kk-section-title--center {
    text-align: center;
}

.kk-section-title--center::after {
    margin-left: auto;
    margin-right: auto;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.related-grid .kk-card {
    height: 100%;
}

.work-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.kk-card__image--square {
    position: relative;
    aspect-ratio: 1 / 1;
}

.work-badge--overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.related-grid .kk-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-strong);
}

/* ================================
   レスポンシブ
   ================================ */

@media (max-width: 900px) {
    .work-layout {
        grid-template-columns: 1fr;
    }

    .work-poster {
        position: static;
        max-width: 480px;
    }
}

@media (max-width: 768px) {
    .info-item {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 11px 0;
    }

    .info-card,
    .description-card,
    .tracklist-card {
        padding: var(--space-2);
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-2);
    }
}

/* ================================
   アクセシビリティ
   ================================ */

@media (prefers-reduced-motion: reduce) {
    .work-detail-container {
        animation: none;
    }
}
