/* ========================================
   Detail pages (WC / Olympic)
======================================== */

.page-detail {
    background: #F0EDE8;
}

/* ---- Detail KV ---- */
.p-dkv {
    position: relative;
    background: var(--color-navy);
}

/* 2011（優勝）のみ：左上→右下のゴールドグラデ */
.page-detail.is-champion .p-dkv {
    background: linear-gradient(to bottom right, #836B00 0%, #D0A900 50%, #FFF9E6 110%);
}

.page-detail.is-champion .p-dkv::after {
    content: "";
    display: block;
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg,
            #8C6A1D 0%,
            #D9B44A 35%,
            #F7E7B0 50%,
            #D9B44A 65%,
            #7A5A14 100%);
}

.p-dkv__media {
    position: relative;
    z-index: 1;
}

.p-dkv picture {
    display: block;
    width: 100%;
}

.p-dkv__img {
    display: block;
    width: 100%;
    height: auto;
    /* 曲線は画像側で加工済みのため clip-path なし */
}

/* ---- Photo credit (右上) ---- */
.c-photo {
    position: relative;
    display: block;
}

.c-photo-credit {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: auto;
    z-index: 3;
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.2;
    color: #fff;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 1),
        0 0 12px rgba(0, 0, 0, 1),
        0 2px 6px rgba(0, 0, 0, 1);
    pointer-events: none;
    white-space: nowrap;
}

.c-photo-credit--jfa {
    text-shadow: none;
    line-height: 0;
    filter:
        drop-shadow(0 0 3px rgba(0, 0, 0, 1)) drop-shadow(0 0 6px rgba(0, 0, 0, 1));
}

.c-photo-credit--jfa img {
    display: block;
    height: 10px;
    width: auto;
}

.p-dkv__media .c-photo-credit {
    right: 12px;
    top: 12px;
    bottom: auto;
}

.p-dkv__title {
    position: relative;
    z-index: 2;
    max-width: var(--content-max);
    margin: -60px auto 0;
    padding: 0 0 40px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    box-sizing: border-box;
    justify-content: flex-start;
}

/* WC: 左寄せ / OL: 右寄せ */
.page-detail.is-olympic .p-dkv__title {
    justify-content: flex-end;
    text-align: right;
}

.p-dkv__year {
    font-family: var(--font-en-title);
    font-size: 14rem;
    letter-spacing: -0.06em;
    line-height: 0.8;
    font-weight: 700;
    color: var(--color-white);
}

.page-detail.is-champion .p-dkv__year {
    text-shadow: 0px 0px 20px rgba(0, 0, 0, 0.4);
}

.p-dkv__place {
    font-family: var(--font-en-title);
    font-weight: 400;
    font-style: normal;
    font-size: 6rem;
    align-self: flex-end;
    background: linear-gradient(90deg, #CEB4FF 0%, #E1A0E1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border: none;
    line-height: 1;
}

.page-detail.is-champion .p-dkv__place {
    background: linear-gradient(90deg, #1C1503 0%, #795905 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 400;
}

.p-dkv__place--multi {
    font-size: 2.4rem;
    line-height: 1;
}

.p-dkv__place--img {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: inherit;
    line-height: 0;
}

.p-dkv__place--img img {
    display: block;
    height: 0.75em;
    width: auto;
}

/* 2行ロゴ（AUSTRALIA & NEW ZEALAND） */
.p-dkv__place--img-2line img {
    height: 1.25em;
}

/* 大会名称（リードテキストと同程度のサイズ） */
.p-dkv__tournament {
    flex: 1 0 100%;
    margin: 12px 0 0;
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.6;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.page-detail.is-champion .p-dkv__tournament {
    color: #1C1503;
    text-shadow: none;
}

@media (max-width: 640px) {
    .p-dkv__title {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 4px;
        width: 100%;
        max-width: none;
        margin: -32px 0 0;
        padding: 0 16px 24px;
        text-align: left;
    }

    .page-detail.is-olympic .p-dkv__title {
        align-items: flex-end;
        justify-content: flex-end;
        text-align: right;
    }

    .p-dkv__year {
        font-size: 8rem;
        line-height: 0.7;
    }

    .p-dkv__place {
        align-self: flex-start;
        font-size: 4rem;
        text-align: left;
    }

    .page-detail.is-olympic .p-dkv__place {
        align-self: flex-end;
        text-align: right;
    }

    .p-dkv__place--multi {
        font-size: 2.4rem !important;
    }

    .p-dkv__tournament {
        margin-top: 8px;
        font-size: 13px;
    }
}


/* ---- Summary ---- */
.p-summary {
    max-width: var(--content-max);
    margin: 64px auto;
    padding: 0 20px;
}

.p-summary__box {
    padding: 40px 48px;
    border-radius: 24px;
    background: var(--color-white);
    color: var(--color-navy);
    font-size: 15px;
    line-height: 1.9;
    box-shadow: var(--shadow-card);
}

.p-summary__box p+p {
    margin-top: 1em;
}

@media (max-width: 640px) {
    .p-summary {
        margin: 32px auto;
    }

    .p-summary__box {
        padding: 28px 20px;
        font-size: 13px;
        border-radius: 16px;
    }
}

/* ---- Section shell ---- */
.p-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    max-width: var(--content-max);
    margin: 0 auto 72px;
    padding: 0 20px;
}

.p-section:has(.c-gallery-fixed, .c-gallery-slider) {
    max-width: 90%;
}

/* ---- Detail background wrappers (divで囲む) ---- */
.detail-bg-group {
    /* margin collapseを避けて背景で囲む */
    padding-top: 1px;
    padding-bottom: 1px;
}

.detail-bg-group--worldcup {
    background:
        linear-gradient(180deg, rgba(240, 237, 232, 0.4), rgba(240, 237, 232, 0.4)),
        url("../images/bg_img.png") center top / 100% auto repeat-y;
}

body.page-detail.is-olympic .detail-bg-group--worldcup {
    background:
        linear-gradient(180deg, rgba(240, 237, 232, 0.4), rgba(240, 237, 232, 0.4)),
        url("../images/bg_ol_img.png") center top / 100% auto repeat-y;
}

.detail-bg-group--sub-vertical {
    background: var(--grad-2);
    padding-top: 80px;
}

/* ---- Section title（英字を head の上に配置） ---- */
.p-section__bg {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0;
    min-height: 0;
    font-family: var(--font-en-sub);
    font-weight: 400;
    font-style: normal;
    font-size: 80px;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--color-white);
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    border: none;
    overflow: visible;
}

.p-section__head {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    margin: 8px 0 0;
    padding: 16px 32px;
    background: var(--color-navy);
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 700;
    font-style: normal;
    font-size: 32px;
    letter-spacing: 0.06em;
    border-radius: 4px;
    text-align: center;
    width: fit-content;
    line-height: 1;
    box-shadow: none;
}

.p-section__body {
    grid-row: 3;
    grid-column: 1;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-top: 40px;
    background: var(--color-white);
    border-radius: 24px;
    padding: 32px 40px;
    box-shadow: 0 8px 24px rgba(0, 30, 85, 0.08);
}

.p-section:has(.c-gallery-fixed, .c-gallery-slider) .p-section__body {
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 640px) {
    .page-detail {
        overflow-x: hidden;
    }

    .c-photo-credit {
        font-size: 10px;
    }

    .detail-bg-group--sub-vertical {
        padding-top: 40px;
        overflow-x: clip;
    }

    .p-section {
        margin-bottom: 48px;
        padding: 0 16px;
    }

    .p-section:has(.c-gallery-fixed, .c-gallery-slider) {
        max-width: 90%;
        overflow: hidden;
    }

    /* 2011 SP: フォトギャラリーをブラウザ幅いっぱいに（中央サイズ維持・両脇を端まで） */
    .p-section:has(.c-gallery-slider) {
        max-width: none;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
    }

    .p-section:has(.c-gallery-slider) .p-section__bg,
    .p-section:has(.c-gallery-slider) .p-section__head {
        width: calc(100% - 32px);
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .p-section:has(.c-gallery-slider) .p-section__body {
        max-width: none;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        border: none;
        background: transparent;
    }

    .c-gallery-slider {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        overflow: hidden;
    }

    .c-gallery-nav {
        padding: 0 16px;
    }

    .p-section__bg {
        justify-self: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
        font-size: clamp(20px, 9vw, 40px);
        white-space: nowrap;
        text-align: center;
    }

    .p-section__head {
        margin-top: 4px;
        padding: 12px 20px;
        font-size: 18px;
    }

    .p-section__body {
        margin-top: 28px;
        padding: 20px 16px;
        border-radius: 16px;
    }

    .p-section:has(.c-gallery-fixed, .c-gallery-slider) .p-section__body {
        padding: 0;
        border-radius: 0;
    }

    .c-result-wrap {
        margin-top: 28px;
    }
}

/* ---- Match list (sample / non-champion) ---- */
.c-match-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.c-match-list__item {
    position: relative;
    display: grid;
    grid-template-columns: 7.5em auto auto 1fr auto;
    grid-template-areas:
        "date stage stage stage more"
        ". result score scorers more";
    column-gap: 16px;
    row-gap: 8px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid #EDE7F5;
    color: var(--color-navy);
}

.c-match-list__item:last-child {
    border-bottom: none;
}

.c-match-list__date {
    grid-area: date;
    font-family: var(--font-en-sub);
    font-weight: 700;
    font-size: 14px;
}

.c-match-list__stage {
    grid-area: stage;
    font-size: 14px;
}

.c-match-list__result {
    grid-area: result;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary);
}

.c-match-list__result--draw {
    color: var(--color-purple);
}

.c-match-list__result--lose {
    color: #888;
}

.c-match-list__score {
    grid-area: score;
    font-family: var(--font-en-title);
    font-size: 22px;
    color: var(--color-purple);
    white-space: nowrap;
}

.c-match-list__scorers {
    grid-area: scorers;
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-navy);
}

/* 各試合行のMOREボタン */
.c-match-list__more {
    grid-area: more;
    align-self: center;
    min-width: 0;
    width: 120px;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    letter-spacing: 0.08em;
    border: 3px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 4px 4px 0 0 var(--color-primary);
}

.c-match-list__more:hover,
.c-match-list__more:focus {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 4px 4px 0 0 rgba(225, 0, 110, 0.25);
}

.c-match-list__note {
    margin-top: 20px;
    font-size: 12px;
    color: #888;
}

.c-match-list__action {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

@media (max-width: 640px) {
    .c-match-list__item {
        grid-template-columns: auto auto 1fr;
        grid-template-areas:
            "date date date"
            "stage stage stage"
            "result score scorers"
            "more more more";
        column-gap: 12px;
        row-gap: 6px;
    }

    .c-match-list__more {
        justify-self: center;
        width: 100%;
        max-width: 200px;
        height: 40px;
        margin-top: 10px;
    }

    .c-match-list__score {
        font-size: 18px;
    }

    .c-match-list__scorers {
        font-size: 12px;
    }
}

/* ---- Match cards (champion / 2011) ---- */
.c-match-cards {
    grid-row: 3;
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 40px;
    list-style: none;
    padding: 0;
}

.c-match-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 24px 0;
    background: var(--color-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-sizing: border-box;
}

/* カード全体を試合詳細ページへのリンクにする */
.c-match-card__link {
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    transition: box-shadow 0.2s ease-out;
}

.c-match-card__link:hover,
.c-match-card__link:focus-visible {
    box-shadow: inset 0 0 0 3px var(--color-primary);
}

.c-match-card__date {
    margin: 0;
    color: var(--color-navy);
    font-family: var(--font-en-title);
    font-weight: 700;
    font-size: 50px;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* PCグループステージ */
.c-match-card:not(.c-match-card--knockout) .c-match-card__date {
    font-size: 40px;
}

.c-match-card:not(.c-match-card--knockout) .c-match-card__score {
    font-size: 80px;
}

.c-match-card__bars {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.c-match-card__venue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 8px 16px;
    background: linear-gradient(180deg,
            rgba(206, 180, 255, 0.3) 0%,
            rgba(225, 160, 225, 0.3) 100%);
    color: var(--color-navy);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}

.c-match-card__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 8px 24px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}

.c-match-card__country {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.c-match-card__flag {
    display: block;
    width: 120px;
    height: 80px;
    object-fit: cover;
    background: #d9d9d9;
}

.c-match-card__opponent {
    margin: 0;
    color: var(--color-navy);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.6;
    white-space: nowrap;
}

.c-match-card__score {
    margin: 0;
    font-family: var(--font-en-title);
    font-weight: 700;
    font-size: 120px;
    line-height: 0.8;
    white-space: nowrap;
    color: var(--color-navy);
}

/* ラウンド16以降（ノックアウト）：左情報 + 右画像中央スコア */
.c-match-card--knockout {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.c-match-card--knockout .c-match-card__info {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 24px 0;
}

.c-match-card--knockout .c-match-card__media {
    position: relative;
    flex: 0 0 48.67%;
    width: 48.67%;
    min-height: 100%;
    background: #d9d9d9;
    overflow: hidden;
}

.c-match-card--knockout .c-match-card__media>img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c-match-card--knockout .c-match-card__score {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    margin: 0;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--color-white);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1024px) {
    .c-match-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .c-match-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-top: 28px;
    }

    .c-match-card:not(.c-match-card--knockout) {
        max-width: none;
        margin: 0;
        padding: 10px 0 8px;
        gap: 6px;
        border-radius: 12px;
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__date {
        font-size: clamp(9px, 2.8vw, 12px);
        letter-spacing: 0;
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__venue {
        font-size: clamp(7px, 2vw, 9px);
        padding: 3px 2px;
        line-height: 1.3;
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__stage {
        font-size: clamp(7px, 2vw, 9px);
        padding: 3px 2px;
        line-height: 1.3;
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__flag {
        width: clamp(28px, 9vw, 40px);
        height: clamp(19px, 6vw, 27px);
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__opponent {
        font-size: clamp(8px, 2.2vw, 10px);
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__country {
        gap: 2px;
    }

    .c-match-card:not(.c-match-card--knockout) .c-match-card__score {
        font-size: clamp(22px, 7vw, 32px);
        color: var(--color-navy);
    }

    .c-match-card--knockout {
        flex-direction: column;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0;
        border-radius: var(--radius-card);
    }

    .c-match-card--knockout .c-match-card__info {
        width: 100%;
        padding: 16px 0;
        gap: 12px;
    }

    .c-match-card--knockout .c-match-card__date {
        font-size: clamp(36px, 10vw, 50px);
    }

    .c-match-card--knockout .c-match-card__venue {
        font-size: 14px;
        padding: 8px 16px;
    }

    .c-match-card--knockout .c-match-card__stage {
        font-size: 16px;
        padding: 8px 16px;
    }

    .c-match-card--knockout .c-match-card__flag {
        width: 120px;
        height: 80px;
    }

    .c-match-card--knockout .c-match-card__opponent {
        font-size: 14px;
        white-space: nowrap;
    }

    .c-match-card--knockout .c-match-card__media {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .c-match-card--knockout .c-match-card__score {
        font-size: clamp(72px, 22vw, 120px);
        color: var(--color-white);
    }
}

/* ---- Players (text list for normal / cards for champion) ---- */
.c-players-pos {
    margin-bottom: 20px;
}

.c-players-pos__label {
    display: block;
    padding: 6px 14px;
    margin-bottom: 12px;
    background: color-mix(in srgb, var(--color-navy) 10%, transparent);
    color: var(--color-primary);
    font-family: var(--font-en-sub);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.08em;
    border-radius: 4px;
}

/* 2011のみ白70% */
.page-detail.is-champion .c-players-pos__label {
    background: rgba(255, 255, 255, 0.7);
}

.c-players-pos__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    font-size: 14px;
    color: var(--color-navy);
}

.c-players-pos__list li span {
    color: #888;
    font-size: 12px;
    margin-left: 8px;
}

@media (max-width: 640px) {
    .c-players-pos__list {
        grid-template-columns: 1fr;
    }
}

/* Champion player cards */
.c-player-roster {
    grid-row: 3;
    grid-column: 1;
    width: 100%;
    margin-top: 40px;
}

.c-player-roster .c-players-pos__label {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 20px;
}

.c-player-roster .c-players-pos__label:first-child {
    margin-top: 0;
}

.c-player-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin: 0 0 8px;
}

.c-player-card {
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(to bottom right, #001E55 15%, #9660FF 55%, #E1006E 130%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.c-player-card__visual {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.c-player-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    -webkit-mask-image: url("../images/wc_2011/player_card_mask.png");
    mask-image: url("../images/wc_2011/player_card_mask.png");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.c-player-card__mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.c-player-card__visual .c-photo-credit {
    z-index: 3;
}

.c-player-card__meta {
    padding: 16px 24px 24px;
    color: #fff;
    position: relative;
}

.c-player-card__en {
    font-family: var(--font-en-title);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    opacity: 0.85;
}

.c-player-card__no {
    font-family: var(--font-en-title);
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 4px 0;
}

.c-player-card__name {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
}

.p-section>.c-match-list__note,
.c-player-roster>.c-match-list__note {
    grid-row: 4;
    grid-column: 1;
    width: 100%;
    justify-self: stretch;
}

@media (max-width: 640px) {
    .c-player-roster {
        margin-top: 28px;
    }

    .c-player-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .c-player-card__meta {
        padding: 16px;
    }

    .c-player-card__en {
        font-size: 14px;
    }

    .c-player-card__no {
        font-size: 20px;
    }

    .c-player-card__name {
        font-size: 24px;
    }
}

/* ---- Gallery ---- */
.c-gallery-fixed {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.c-gallery-fixed:has(> .c-photo:only-child) {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin-inline: auto;
}

/* クレジット画像に当たらないよう直下の写真のみを対象にする */
.c-gallery-fixed>.c-photo,
.c-gallery-fixed>img {
    width: 100%;
    display: block;
}

.c-gallery-fixed>.c-photo>img,
.c-gallery-fixed>img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.c-gallery-fixed .c-photo {
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .c-gallery-fixed {
        grid-template-columns: repeat(2, 1fr);
    }
}

.c-gallery-slider {
    position: relative;
    overflow: hidden;
}

.c-gallery-slider .swiper-slide .c-photo,
.c-gallery-slider .swiper-slide {
    position: relative;
}

.c-gallery-slider .swiper-slide>.c-photo>img,
.c-gallery-slider .swiper-slide>img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.c-gallery-slider .swiper-slide .c-photo {
    border-radius: 12px;
    overflow: hidden;
}

/* 拡大表示できる写真 */
.c-gallery-fixed .c-photo>img,
.c-gallery-slider .c-photo>img {
    cursor: zoom-in;
}

/* ---- Photo modal ---- */
.c-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(0, 30, 85, 0.85);
}

.c-modal.is-open {
    display: flex;
}

.c-modal__body {
    max-width: 1200px;
    width: 100%;
    line-height: 0;
}

.c-modal__img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 8px;
}

.c-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-navy);
    cursor: pointer;
    transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.c-modal__close:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.c-modal__close:focus {
    background: var(--color-white);
    color: var(--color-navy);
}

.c-modal__close:focus:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.c-modal__close .material-icons {
    font-size: 28px;
}

body.is-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .c-modal {
        padding: 16px;
    }

    .c-modal__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .c-modal__close .material-icons {
        font-size: 24px;
    }
}

.c-gallery-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.c-gallery-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    line-height: 1;
    cursor: pointer;
}

.c-gallery-nav .material-icons {
    font-family: "Material Icons";
    font-size: 24px;
    line-height: 1;
    width: 1em;
    height: 1em;
    display: block;
    color: inherit;
}

.c-gallery-nav .js-gallery-prev .material-icons {
    transform: scaleX(-1);
}

/* ---- Result summary (優勝 / 準優勝 / 3位 / MVP / 得点王) ---- */
.c-result-summary {
    width: 70%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    /* margin: 0 0 28px; */
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.c-result-summary__item {
    display: flex;
    align-items: start;
    gap: 10px;
}

.c-result-summary__item-wfull {
    width: 100%;
}

.c-result-summary__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 4px;
    background: var(--color-navy);
    color: #F0EDE8;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    white-space: nowrap;
}

.c-result-summary__value {
    color: var(--color-navy);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    /* white-space: nowrap; */
}

@media (max-width: 640px) {
    .c-result-summary {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .c-result-summary__label,
    .c-result-summary__value {
        font-size: 14px;
    }
}

.c-result-wrap {
    grid-row: 3;
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    margin-top: 40px;
    overflow-x: auto;
    box-sizing: border-box;
}

/* 2011: 順位表の下に公式球ブロックを続く */
.p-section:has(.c-result-wrap)>.p-section__body {
    grid-row: 4;
    margin-top: 24px;
}

.c-result-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-white);
    font-size: 13px;
    overflow: hidden;
    border-radius: 12px;
}

.c-result-table th,
.c-result-table td {
    border: 1px solid var(--color-white);
}

.c-result-table th {
    background: var(--color-navy);
    color: #fff;
    padding: 10px 8px;
    font-weight: 700;
}

.c-result-table__caption th {
    background: #E8D5F5;
    color: var(--color-navy);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.04em;
    padding: 12px 24px;
    border: none;
    border-radius: 12px 12px 0 0;
}

.c-result-table__caption-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

@media (max-width: 640px) {
    .c-result-table__caption th {
        font-size: 18px;
    }

    .c-result-table__caption-inner {
        gap: 20px;
    }
}

.c-result-table td {
    padding: 10px 8px;
    text-align: center;
    background: color-mix(in srgb, var(--color-white) 20%, transparent);
    font-weight: 600;
}

.c-result-table tr:nth-child(even) td {
    background: color-mix(in srgb, #F3ECFF 20%, transparent);
}

.c-result-table tr.is-japan td {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.c-ball {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    margin-top: 28px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #EDE7F5;
}

.c-ball__img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}

.c-ball__title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-navy);
}

.c-ball__text {
    font-size: 13px;
    color: #555;
}

/* ---- Year pager on detail ---- */
/* 年号が増えても常に3列等分で折り返す */
.l-yearnav--detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
    max-width: 480px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px 48px;
    box-sizing: border-box;
}

.l-yearnav--detail .l-yearnav__item {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.l-yearnav--detail .l-yearnav__back {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
}

.l-yearnav--detail .l-yearnav__back .c-more {
    font-family: var(--font-body);
    letter-spacing: 0.06em;
    min-width: 280px;
    box-shadow: 5px 5px 0 0 var(--color-navy);
}

.l-yearnav--detail .l-yearnav__back .c-more:hover,
.l-yearnav--detail .l-yearnav__back .c-more:focus {
    background: var(--color-navy);
    color: var(--color-white);
    box-shadow: 5px 5px 0 0 var(--color-primary);
}

@media (max-width: 640px) {
    .l-yearnav--detail {
        max-width: none;
        gap: 10px;
        padding: 24px 16px 48px;
    }

    .l-yearnav--detail .l-yearnav__back {
        margin-top: 16px;
    }

    .l-yearnav--detail .l-yearnav__back .c-more {
        width: 100%;
        max-width: 280px;
        min-width: 0;
        padding: 0;
    }
}

/* ---- Match detail sample ---- */
.p-game {
    max-width: var(--content-max);
    margin: 40px auto 64px;
    padding: 0 20px;
}

.p-game__scoreboard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 32px 24px;
    border-radius: 24px;
    background: var(--grad-card-wc);
    color: #fff;
    text-align: center;
    margin-bottom: 32px;
}

.p-game__team {
    font-weight: 700;
    font-size: 18px;
}

.p-game__score {
    font-family: var(--font-en-title);
    font-size: 48px;
    line-height: 1;
}

.p-game__meta {
    grid-column: 1 / -1;
    font-size: 13px;
    opacity: 0.9;
}

.p-game__members {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.p-game__members table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.p-game__members th {
    background: var(--color-navy);
    color: #fff;
    padding: 10px;
    text-align: left;
}

.p-game__members td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.p-game__note {
    margin-top: 16px;
    font-size: 12px;
    color: #888;
}

@media (max-width: 640px) {
    .p-game__members {
        grid-template-columns: 1fr;
    }

    .p-game__score {
        font-size: 36px;
    }
}
