* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Serif JP", Arial, sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    color: #f5f5f5;
    background-color: #333333;
    height: 100%;
    overflow: hidden;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* 背景を一番下に */
}

@font-face {
    font-family: 'MessageFont';
    src: url('../fonts/851MkPOP_101.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


.section {

    position: relative;

    /* 画面サイズより横幅が広い場合に、コンテンツの幅を固定して両側の余白を自動的に広げる */
    /* コンテンツの最大幅を設定 */
    max-width: 1200px;
    /* 一般的なデスクトップサイズ - 必要に応じて調整可能 */

    /* 両側の余白を均等に自動調整 */
    margin-left: auto;
    margin-right: auto;

    /* 内側のパディングを追加（必要に応じて） */
    padding-left: 20px;
    padding-right: 20px;


    height: 100vh;
    /* 標準の設定 */
    height: calc(var(--vh, 1vh) * 100);
    /* モバイル対応 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 20px;
    /* ← ← ← NEWSのタイトルが切れないように余白 */

}

.content {
    padding: 30px;
    text-align: center;
}

.h2 {
    font-size: 2rem;
    padding: 60px;
    text-align: center;
    font-family: "Rock Salt", cursive;
    font-weight: 400;
    font-style: normal;
}

/* 初期状態（透明＆下に配置） */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* フェードイン時の状態 */
.show {
    opacity: 1;
    transform: translateY(0);
}




/* 共通 */
.mgl-30 {
    margin-left: 30px;
}




/* SCROLL */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    writing-mode: vertical-rl;
    /* 縦書き */
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.line {
    display: block;
    width: 2px;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.4);
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(5px);
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0.3;
    }
}


@media (max-width: 768px) {
    .h2 {
        padding: 20px;
    }
}



/* モバイル向け調整 */
@media (max-width: 768px) {
    .section {
        height: calc(100 * var(--vh, 1vh));
        padding: 0 15px;
    }


}

/* ----------------------TOP------------------------ */
#top .content {
    height: calc(100 * var(--vh, 1vh));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    width: 100%;
}

/* トップタイトル */
.top-title {
    height: auto;
    padding: 10px 0;
    margin: 30px 0 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;


    /* 画面サイズより横幅が広い場合に、コンテンツの幅を固定して両側の余白を自動的に広げる */
    /* コンテンツの最大幅を設定 */
    max-width: 142px;
    /* 一般的なデスクトップサイズ - 必要に応じて調整可能 */

    /* 両側の余白を均等に自動調整 */
    margin-left: auto;
    margin-right: auto;
}

.top-title h1 {
    font-family: "Yuji Boku", serif;
    font-weight: 400;
    font-style: normal;
    line-height: 0.5;
    font-size: min(5vw, 60px);
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.name-ja {
    margin-right: 0.1em;
}

.name-eg {
    font-size: 0.4em;
}

.official-hp {
    font-size: 0.25em;
    font-family: "Noto Serif JP";
}

.k1-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    z-index: 1;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

/* プレイヤー */
.player {
    /* aspect-ratio: 414 / 238; */
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    /* サイズ固定 */
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

video:focus {
    outline: none;
}

/* オーバーレイ */
#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 87%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
    pointer-events: auto;
}

#play-button {
    width: 6vw;
    max-width: 60px;
    height: 6vw;
    max-height: 60px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-top: 20px;
}

#play-button svg {
    width: 40px;
    height: 40px;
    fill: black;
}

.overlay-movie {
    font-family: "Rock Salt", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: min(8.5vw, 60px);
    ;
}

/* メッセージコンテナ */
.message-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
    flex: 1 0 auto;
    /* 必要に応じて伸縮 */
    z-index: 1;
}

.img-shadow {
    max-width: min(90%, 800px);
    width: 100%;
    height: auto;
    z-index: 1;
    pointer-events: none;
    margin-bottom: -2vh;
}

.top-message {
    position: relative;
    z-index: 2;
    font-family: 'MessageFont';
    transform: skew(-15deg) rotate(-5deg);
    font-size: calc(1rem + 2vh);
    text-align: center;
    max-width: 90%;
    white-space: normal;
    margin-top: 2vh;
}


/* スマートフォン対応のCSS */
@media screen and (max-width: 767px) {

    /* トップセクション全体の調整 */
    #top .content {
        transform: none;
        /* スケールを解除して通常表示 */
        height: 100%;
        justify-content: space-between;
    }

    /* トップタイトル調整 */
    .top-title {
        height: auto;
        padding: 10px 0;
        margin-bottom: 5px;
    }

    .top-title h1 {
        font-size: 8vw;
        line-height: 0.5;
    }

    .name-ja {
        display: block;
        margin-bottom: 5px;
    }

    .name-eg {
        font-size: 0.4em;
    }

    .official-hp {
        display: block;
        font-size: 0.2em;
        margin-top: 5px;
    }

    .k1-watermark {
        font-size: 2em;
    }

    /* プレイヤー調整 */
    #overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 87%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: white;
        z-index: 10;
        pointer-events: none;
        /* これを追加 */
    }

    .player {
        width: 95%;
        margin: 5px auto;
        flex: 0 0 auto;
        /* サイズ固定 */
    }


    #play-button {
        display: none;
        /* スマホでは再生ボタンを表示しない */
    }

    .overlay-movie {
        font-size: 10vw;
    }



    /* メッセージエリア調整 */
    .message-container {
        padding-bottom: 10px;
        flex: 1 0 auto;
    }

    .img-shadow {
        max-width: 90%;
    }

    .top-message {
        font-size: calc(0.8rem + 1vh);
        margin-top: 5px;
        line-height: 1.4;
    }


}





/* ----------------------NEWS------------------------ */
/* news-imgサイズ250×200 */


/* NEWSセクション全体 */
#news {
    position: relative;
    height: calc(var(--vh, 1vh) * 100);
    width: 100%;
    overflow: hidden;
    padding: 20px;
}

.slide {
    height: 100%;
    display: flex;
    flex-direction: column;
}


/* 横スクロールコンテナ */
.news-wrapper-scroll {
    display: flex;
    width: 90%;
    margin: 0 auto;
    /* 中央寄せ */
    height: calc(var(--vh, 1vh) * 100 - 160px);
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    touch-action: pan-x pan-y;
}


.news-wrapper-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}



/* ページインジケーター */
.page-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #808080;
    cursor: pointer;
}

.page-dot.active {
    background-color: #fff;
}

/* 1ページ分 */
.news-page {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: grid;
    gap: 15px;
    padding: 10px;
    width: 100%;
    height: auto !important;
    min-height: 100%;
}



/* PC：4x3表示 */
@media (min-width: 769px) {
    .news-page {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }

    .news-item {
        aspect-ratio: 1 / 1;
    }
}

/* スマホ：1x2表示 */
@media (max-width: 768px) {
    .news-page {
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(2, 1fr);
        height: 100%;
    }

    .news-wrapper-scroll {
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .news-item {
        aspect-ratio: auto;
        max-height: 100%;
        pointer-events: auto;
    }
}

.news-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    touch-action: pan-y;
    /* 垂直方向のスクロールを許可 */
    -webkit-tap-highlight-color: transparent;
    /* タップ時のハイライトを無効化 */
}

.news-item img {
    width: 100%;
    height: 60%;
    object-fit: cover;

}

.news-item-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.news-title {
    font-size: 1rem;
    font-weight: bold;
}

/* ----------------------PROFILE------------------------ */

.profile-img {
    position: absolute;
    left: 10%;
    height: 95%;
    object-fit: cover;
    z-index: -1;
    /* 背景を一番下に */
    opacity: 0.6;
}

.profile-content {
    position: absolute;
    left: 40%;
    text-align: left;
}

.profile-name {
    font-size: 8rem;
    font-family: "Yuji Boku", serif;
    font-weight: 400;
    font-style: normal;
}

.profile-name span {
    font-size: 3rem;
}

.profile-detail {
    font-size: 1.5rem;
    padding: 10%;
    line-height: 2.5rem;
}

.profile-message {
    font-size: 1.2rem;
    padding: 10%;
    line-height: 2.5rem;
}

@media (max-width: 768px) {
    #profile .h2 {
        margin-top: 0;
    }

    /* スマホ時は画像を全画面背景に */
    .profile-img {
        position: absolute;
        bottom: 0;
        left: 0;
        width: auto;
        height: 90%;
        object-fit: cover;
        opacity: 0.4;
        z-index: 1;
        /* 背面に配置 */
    }

    /* スマホ時は profile-content を前面に */
    .profile-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        padding: 20px;
        border-radius: 10px;
        z-index: 2;
        /* 画像の前面 */
    }

    .profile-name {
        font-size: 3rem;
    }

    .profile-name span {
        font-size: 1.8rem;
    }

    .profile-detail {
        font-size: 1rem;
        padding: 15px;
        line-height: 1.8rem;
    }

    .profile-message {
        font-size: 0.8rem;
        padding: 10px;
        line-height: 1.8rem;
        border: solid 1px #777;
    }
}


/* ----------------------RECORD------------------------ */
#record {
    display: grid;
    height: calc(var(--vh, 1vh) * 100);
    /* 1ページに収める */
    background-color: #333;
    /* セクション背景色 */
    padding: 0px 20px 20px 20px;
}

.record-p {
    font-weight: bold;
    text-align: center;
    font-style: italic;
    letter-spacing: .1em;
    color: #fff;
    text-shadow: -4px 3px 0 #f2d67a;
}

.record-container {
    display: grid;
    gap: 30px;
    /* カード間の間隔 */
    max-width: 1100px;
    /* カード幅を制限 */
    width: 90%;
}

.record-inner {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    /* 勝敗 | 詳細 | 日付 */
    gap: 20px;
    align-items: center;
    padding: 20px;
    color: #f5f5f5;
    border-bottom: 2px solid #777;
    transition: transform 0.3s;
    box-sizing: border-box;
    /* パディング含めたサイズ指定 */
}

.record-inner:hover {
    transform: translateY(-5px);
}

/* 勝敗表示 */
.record-a {
    text-decoration: none;
}

.record-result {
    text-align: center;
}

.win span {
    color: #28a745;
    font-size: 28px;
    font-weight: bold;
}

.lose span {
    color: #dc3545;
    font-size: 28px;
    font-weight: bold;
}

.record-result p {
    font-size: 16px;
    margin: 5px 0 0;
}

/* 詳細部分 */

.record-details p {
    margin: 5px 0;
}

.record-details span {
    font-size: 18px;
}

/* 日付 */
.record-date {
    text-align: right;
    font-size: 14px;
}

/* メディアクエリでレスポンシブ対応 */

@media (max-width: 768px) {
    #record {
        height: auto !important;
        min-height: 100vh;
    }

    #record h2 {
        margin: 0;
    }

    .record-inner {
        gap: 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 10px 10px 10px;
    }

    .record-result {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        /* WINと判定の間に少し余白 */
        text-align: center;
    }


    .record-result span {
        font-size: 20px;
        font-weight: bold;
    }

    .record-result p {
        font-size: 12px;
        margin: 0;
    }

    .record-details {
        order: 2;
        font-size: 10px;
    }

    .record-details p:first-child {
        order: 1;
    }

    .record-details p:last-child {
        order: 2;
    }

    .record-details span {
        display: inline-block;
        font-size: 12px;
    }

    .record-date {
        font-size: 10px;
    }


}


/* ----------------------SPONSOR------------------------ */
#sponsor {
    position: relative;
    min-height: 100vh;
    padding-bottom: 100px;
    /* フッターの高さ分のパディングを追加 */
}

#sponsor .slide {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#sponsor .content {
    flex: 1;
    /* メインコンテンツが余白を埋める */
}


/* --- スポンサーセクション共通設定 --- */
.sponsor-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* 全体を中央に寄せる */
    align-items: center;
    gap: 20px;
    /* ロゴ同士の間隔 */
    padding: 20px;
}

/* --- ロゴの「枠」を統一 --- */
.sponsor-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    /* 白背景にするとロゴの形が違っても統一感が出ます */
    border-radius: 4px;
    overflow: hidden;

    /* PCでのサイズ */
    width: 240px;
    height: 135px;
    /* 16:9に近い比率 */
}

/* --- 中の画像を枠に合わせる --- */
.sponsor-item img {
    width: 90%;
    /* 枠いっぱいにせず、少し余白（マージン）を持たせると綺麗です */
    height: 90%;
    object-fit: contain;
    /* 縦横比を崩さず枠内に収める */
}

/* ホバー時に少し大きく（リンク付きの場合） */
.sponsor-item:hover img {
    transform: scale(1.05);
}


/* スマートフォン用のスタイル */
@media (max-width: 768px) {


    .h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .sponsor-inner {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 15px 5px !important;
        /* 上下に15px、左右に5pxの隙間 */
        padding: 10px !important;
    }

    .sponsor-item {
        width: calc(50% - 5px) !important;
        /* 2列 */
        height: 120px !important;
        /* ★高さをしっかり確保して重なりを防ぐ */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        /* 枠からはみ出させない */
        background-color: #fff;
        /* ロゴが見やすいように白背景（お好みで） */
        border-radius: 4px;
    }

    .sponsor-item img {
        /* scaleは使わず、枠の中で最大限広がる設定 */
        width: 95% !important;
        height: 95% !important;
        object-fit: contain !important;
        transform: none !important;
        /* 重なりの原因になるので解除 */
    }
}

/* 小さいスマートフォン用のスタイル */
@media (max-width: 480px) {
    .sponsor-inner {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sponsor-inner img {
        width: calc(45% - 10px);
        max-width: 100px;
    }
}


/* ----------------------FOOTER------------------------ */
#sponsor .section-inner {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
}


#sponsor .footer {
    position: relative;
    /* 絶対配置をやめる */
    margin-top: auto;
    /* フッターを下に押す */
}

.footer {
    width: 100%;
    color: #333333;
    background-color: #f4f4f4;
    padding: 30px 10px;
    text-align: center;
    margin-top: auto;
    /* 一番下に寄せるキー！ */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-space {
    flex: 1;
}

.copyright {
    flex: 2;
    text-align: center;
}


.social-links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.social-links a {
    color: #666;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #000;
}

@media (max-width: 768px) {
    #sponsor {
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
        display: flex;
        flex-direction: column;
        /* フッターのスペースを確保 */
    }

    #sponsor .slide.slide05 {
        height: auto;
        min-height: 100vh;
        padding-bottom: 80px;
        /* フッターの高さ分の余白 */
    }

    .footer {
        position: relative;
        /* スマホでは相対配置に */
        bottom: auto;
        margin-top: auto;
        /* 下に寄せる */
        padding: 15px 10px;
        /* サイズ調整 */
    }

    .footer-container {
        padding: 5px 0;
    }

    .copyright {
        font-size: 0.7rem;
    }

}