/* ディスコグラフィページ */
.disc-page #page-wrapper {
    padding-top: 0;
    font-family: "Quicksand";
}

.disc-content {
    padding: 0 96px;
    max-width: 1476px;
    margin: 0 auto;
}

/* フェードインアニメーション */
@keyframes discFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.disc-item {
    opacity: 0;
    transform: translateY(16px);
}

.disc-item.is-visible {
    animation: discFadeIn 0.4s ease both;
}

/* フィルター */
.disc-filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 32px;
}

.disc-filter__select {
    appearance: none;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%236a7282" stroke-width="2" fill="none"/></svg>') no-repeat right 12px center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 36px 8px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #374151;
    cursor: pointer;
    min-width: 180px;
}

.disc-filter__select:focus {
    outline: none;
    border-color: #fe66b2;
}

/* セクション・グリッド */
.disc-section {
    display: flex;
    gap: 64px;
    margin-bottom: 80px;
}

.disc-year {
    position: sticky;
    top: 100px;
    width: 120px;
    height: fit-content;
    flex-shrink: 0;
    font-size: 2.5rem;
    font-weight: 600;
    font-style: normal;
    font-family: 'Quicksand';
    letter-spacing: 0.04em;
    line-height: 100%;
    color: #675F77;
    white-space: nowrap;
}

.disc-grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* アイテムカード */
.disc-item__link {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.disc-item__image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    margin-bottom: 12px;
}

.disc-item__noimage {
    width: 100%;
    aspect-ratio: 1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9ca3af;
    letter-spacing: 0.05em;
}

.disc-item__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.disc-item__link:hover .disc-item__image img {
    transform: scale(1.2);
}

.disc-item__title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 8px;
    letter-spacing: 0;
    /* フォントサイズが縮小しても曲名欄の高さを一定に保つ（行高をpx固定） */
    line-height: 24px;
}

/* 曲名末尾の (Rearrange ver.) 等は小さく表示（親フォントに追従） */
.disc-item__title-sub {
    font-size: 0.72em;
    font-weight: 500;
    white-space: nowrap;
}

.disc-item__type {
    font-size: 12px;
    color: #6a7282;
    letter-spacing: unset;
}

/* タブレット */
@media screen and (max-width: 1024px) {
    .disc-content {
        padding: 0 48px;
    }

    .disc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* モバイル */
@media screen and (max-width: 768px) {
    .disc-content {
        padding: 0 24px;
    }

    .disc-section {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 48px;
    }

    .disc-year {
        position: static;
        width: auto;
        font-size: 24px;
    }

    .disc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .disc-item__image {
        margin-bottom: 8px;
    }

    .disc-item__title {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 16px;
    }

    .disc-item__type {
        font-size: 10px;
    }
}

/* モーダル */
.disc-modal {
    font-family: "Quicksand";
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    margin: 0;
    border: none;
    max-width: 800px;
    width: calc(100% - 48px);
    overflow: unset;
    gap: 32px;
    padding: 32px;
    opacity: 0;
    scale: 0.9;
    transition: opacity 0.3s ease, scale 0.3s ease;
}

.disc-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    padding-bottom: 2px;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.disc-modal__close:hover {
    background: #f3f4f6;
    color: #374151;
}

.disc-modal[open] {
    display: flex;
}

.disc-modal.is-open {
    opacity: 1;
    scale: 1;
}

.disc-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.disc-modal.is-open::backdrop {
    opacity: 1;
}

.disc-modal__image {
    width: 280px;
    flex-shrink: 0;
}

.disc-modal__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.disc-modal__image div {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

.disc-modal__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.disc-modal__name {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    margin: 0;
    text-align: center;
    letter-spacing: 0;
}

.disc-modal__name-sub {
    font-size: 0.7em;
    font-weight: 600;
}

.disc-modal__dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: center;
    margin: 0;
}

.disc-modal__dl dt {
    font-size: 12px;
    letter-spacing: 0.05em;
    background: rgba(254, 102, 178, 0.08);
    padding: 6px 14px;
    text-align: center;
    white-space: nowrap;
}

/* DLミュージックカードの改行用<br>。PCでは無効、モバイルのみ改行させる */
.disc-modal__dlmc-br {
    display: none;
}

.disc-modal__dl dd {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    /* 1fr列が中身で広がってはみ出すのを防ぐ（フィット計測の基準幅を固定） */
    min-width: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.disc-modal__platforms,
.disc-modal__links,
.disc-modal__dlmc {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.disc-modal__platforms a,
.disc-modal__links a,
.disc-modal__dlmc a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 24px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.disc-modal__platforms a:hover,
.disc-modal__links a:hover,
.disc-modal__dlmc a:hover {
    text-decoration: underline;
}

.disc-modal__empty {
    color: #9ca3af;
    font-weight: 400;
}

.disc-modal__external-icon {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.disc-modal__tracks-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.disc-modal__tracks {
    display: flex;
    flex-direction: column;
}

/* モーダル モバイル */
@media screen and (max-width: 768px) {
    .disc-modal {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        max-height: none;
        width: calc(100% - 32px);
    }

    .disc-modal__body {
        gap: 12px;
    }

    /* モバイルは「DLミュージック / カード」で改行 */
    .disc-modal__dlmc-br {
        display: inline;
    }

    /* クレジットのラベル（作詞・作曲・編曲：）だけモバイルで少し小さく（値は変えない） */
    .disc-modal__credit-label {
       font-size: 10px; 
    }

    .disc-modal__close {
        top: -5px;
        right: -5px;
    }

    .disc-modal__image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .disc-modal__image img {
        top: auto;
        position: static;
    }

    .disc-item__noimage div {
        top: auto;
        position: static;
    }

    .disc-modal__name {
        font-size: 20px;
    }

    /* ダイアログのラベル(dt)をモバイルでは小さく（折り返さず1行のまま狭く） */
    .disc-modal__dl {
        gap: 8px 10px;
    }

    .disc-modal__dl dt {
        font-size: 10px;
        padding: 4px 8px;
        letter-spacing: 0;
    }
}