/* 基本設定 */
:root {
    --primary-color: #0a0a0a;
    --secondary-color: #b00000; /* キーカラーを赤に変更 */
    --accent-color: #b00e0e;
    --text-color: #1f2979;
    --bg-color: #ffffff;
    --bg-gray-color: #f3f4f6;
    --border-color: #d1d5db;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding-top: 70px; /* ヘッダーの高さ分 */
}

/* SPメニュー表示時に背景を固定 */
body.nav-open {
    overflow: hidden;
}

h1, h2, h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn--primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn--primary:hover {
    background-color: #b30101;
}
.btn--secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn--secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}
.btn--large {
    font-size: 1.1rem;
    padding: 16px 48px;
}

/* ヘッダー */
.header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}
.header__logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}
.header__nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}
.header__nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: color 0.3s;
}
.header__nav a:hover {
    color: var(--secondary-color);
}
.header__btn {
    padding: 8px 24px;
}


/* ===== ▼ SP用メニュー (ここから) ▼ ===== */
.hamburger-menu {
    display: none; /* PCでは非表示 */
    width: 30px;
    height: 21px;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 2000; /* ナビパネルより手前 */
}
/* ハンバーガーの3本線 */
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color); /* 棒の色を赤に */
    border-radius: 4px;
    position: absolute;
    left: 0;
    transition: all 0.4s ease-in-out;
}
.hamburger-menu span:nth-child(1) {
    top: 0;
}
.hamburger-menu span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-menu span:nth-child(3) {
    bottom: 0;
}

/* is-activeになった時のアニメーション（×印への変化） */
.hamburger-menu.is-active span {
    background-color: #980303; /* ×印は白に */
}
.hamburger-menu.is-active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.is-active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}


/* SP用ナビゲーションパネル */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.907); /* 背景の透明度を70%に */
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-nav.is-active {
    opacity: 1;
    visibility: visible;
}
.mobile-nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}
.mobile-nav li {
    margin-bottom: 24px;
}
.mobile-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

/* 応募するフローティングボタン */
.floating-apply-btn {
    display: none; /* PCでは非表示 */
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 900;
    /* ★ サイズを少し小さく */
    width: 70px;
    height: 70px;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    /* ★ アニメーションの準備 */
    transform: translateY(150%); /* 初期状態では画面下に隠す */
    transition: transform 0.4s ease-in-out; /* アニメーションを設定 */
}

/* ★ ボタンを表示するためのクラス */
.floating-apply-btn.is-visible {
    transform: translateY(0); /* 画面内に表示 */
}
/* ===== ▲ SP用メニューここまで ▲ ===== */


/* ヒーローセクション */
.hero {
    position: relative;
    overflow: hidden;
    padding: 120px 20px;
    text-align: center;
    color: #fff;
    background-color: #c50000bb;
}
.hero__slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.12);
    transition: opacity 4s ease-in-out; 
}
.hero__slide.active {
    opacity: 1;
    animation: kenburns-in 8s ease-out forwards;
}
@keyframes kenburns-in {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}
.hero__inner {
    position: relative;
    z-index: 2;
    background-color: rgba(210, 0, 0, 0.711);
    display: inline-block;
    padding: 40px 60px;
    border-radius: 12px;
}
.hero__title {
    font-size: 3rem;
    margin: 0;
}
.hero__title br {
    display: none; /* PCでは<br>を無効化する */
}
.hero__logo-visual {
    display: block;
    max-width: 800px;
    width: 100%;
    margin: 24px auto;
}
.hero__subtitle {
    font-size: 1.2rem;
    margin: 24px 0 32px;
}
.hero__deadline {
    margin-bottom: 32px;
}
.hero__deadline p {
    margin: 0;
}
.hero__date {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

/* 共通セクションスタイル */
.section {
    padding: 80px 0;
}
.section--bg-gray {
    background-color: var(--bg-gray-color);
}
.section__title {
    font-size: 2.5rem;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: 2px;
}
.section__subtitle {
    text-align: center;
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 48px;
}
.section__text {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.organizer-info {
    text-align: center; /* テキストを中央揃え */
    margin-top: 32px; /* 上のセクションとの余白 */
    color: var(--primary-color);
}


/* 賞 */
.prize-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}
.prize-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.prize-item h3 {
    margin: 0 0 8px;
}
.prize-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 8px;
}

/* 審査員 */
.judge-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}
.judge-item {
    text-align: center;
}
.judge-item img {
    border-radius: 50%;
    width: 160px;
    height: 160px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.judge-name {
    font-weight: 700;
    margin: 0;
}
.judge-title {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* 応募方法 */
.howto-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 48px;
}
.step-item {
    padding: 24px;
    border-left: 4px solid var(--secondary-color);
}
.step-number {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}
.step-title {
    margin: 0 0 8px;
}

/* ★ 修正箇所２: 応募方法セクションのボタンエリア */
.howto-apply-action {
    text-align: center; /* ボタンを中央揃え */
}


/* 募集要項ページ */
.page {
    padding: 60px 0;
}
.page__title {
    font-size: 2.5rem;
    text-align: center;
    margin: 0;
}
.page__title_sub {
    font-size: 1.5rem;
    text-align: center;
    margin: 0;
}
.page__subtitle {
    text-align: center;
    color: #6b7280;
    margin: 0 0 60px;
}
.guideline-section {
    margin-bottom: 48px;
}
.guideline-section h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 24px;
}
.definition-list dt {
    font-weight: 700;
    margin-top: 16px;
}
.definition-list dd {
    margin-left: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.definition-list ul, .definition-list ol {
    padding-left: 20px;
}
.action-area {
    text-align: center;
    margin-top: 60px;
}
.notice {
    font-size: 0.9rem;
    color: #6b7280;
}

/* 費用分担の表 */
.cost-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    margin-bottom: 24px;
}
.cost-table th, .cost-table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}
.cost-table th {
    background-color: var(--bg-gray-color);
    font-weight: 700;
}
.cost-table td:first-child {
    text-align: left;
}
.cost-table small {
    display: block;
    font-size: 0.8em;
    color: #6b7280;
}

/* ===== ▼ Archive Page Styles ▼ ===== */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 40px; /* カード間の余白 */
}

.archive-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.archive-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.archive-card__header {
    background-color: var(--bg-gray-color);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.archive-card__title {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.archive-card__year {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 500;
}

.archive-card__body {
    padding: 20px 30px;
}

.winners-list__group {
    display: flex;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}
.winners-list__group:last-child {
    border-bottom: none;
}

.winners-list__prize-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    width: 100px;
    flex-shrink: 0;
    margin: 0;
}

.winners-list__artist-name {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    color: #374151;
    flex-grow: 1;
}

@media (max-width: 500px) {
    .winners-list__group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .winners-list__prize-name {
        width: auto;
    }
}

/* ===== ▲ Archive Page Styles ▲ ===== */

/* ===== ▼ 応募フォーム用スタイル (ここから) ▼ ===== */
.form-description {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--bg-gray-color);
    border-left: 4px solid var(--secondary-color);
}

.form-section {
    border: none;
    padding: 0;
    margin: 0 0 48px;
}

.form-section__title {
    font-size: 1.5rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 24px;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}
.form-group .required {
    color: var(--secondary-color);
    font-size: 0.8em;
    margin-left: 4px;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box; /* paddingを含めた幅計算に */
}
.form-group small {
    display: block;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.artwork-group {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}
.artwork-group--hidden {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
    /* アニメーションの設定 */
    transition: max-height 0.7s ease-in-out, opacity 0.5s ease-in, padding 0.7s ease-in-out, margin 0.7s ease-in-out, border-width 0.7s ease-in-out;
}
.artwork-group--visible {
    max-height: 1500px; /* 十分な高さを確保 */
    opacity: 1;
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-width: 1px;
}
.add-artwork-container {
    text-align: center;
    margin: 24px 0;
    padding: 24px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.artwork-group__title {
    margin-top: 0;
}

/* 確認ページ */
.confirmation-summary dl {
    border-top: 1px solid var(--border-color);
}
.confirmation-summary dt {
    background-color: var(--bg-gray-color);
    padding: 12px;
    font-weight: 700;
}
.confirmation-summary dd {
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: pre-wrap; /* 改行を反映 */
    word-break: break-all;
}
.action-area.-multi-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 支払い選択ページ */
.text-center { text-align: center; }
.payment-selection {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
    flex-wrap: wrap;
}
.payment-option {
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    width: 300px;
}
.bank-info, .deadline-info, .payment-gateway {
    max-width: 600px;
    margin: 24px auto;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.bank-info dl { text-align: left; }
.bank-info dt { float: left; width: 100px; font-weight: 700; clear: left; }
.bank-info dd { margin-left: 110px; }


/* 規約モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 3000;
    display: none; /* JSで表示を切り替え */
    justify-content: center;
    align-items: center;
    padding: 60px 20px; 
    box-sizing: border-box;
}

.modal.is-visible { display: flex; }

.modal__content {
    background-color: #fff;
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 600px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: relative; /* 閉じるボタンの基準位置 */
}

.modal__header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}
.modal__header h2 { margin: 0; font-size: 1.2rem; }

.modal__close {
    position: absolute;
    /* モーダルウィンドウの上部中央（20px上）に配置 */
    top: 0;
    left: 50%;
    transform: translate(-50%, calc(-100% - 20px));
    
    /* ボタンの見た目を調整 */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
    line-height: 44px; /* アイコンを垂直中央に */
    text-align: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal__close:hover {
    background-color: var(--bg-gray-color);
    transform: translate(-50%, calc(-100% - 20px)) scale(1.05);
}
.modal__body {
    padding: 24px;
    overflow-y: scroll;
    flex-grow: 1;
}

.modal__body h3 { margin-top: 1.5em; }

/* 規約同意ボタンのスタイル */
#open-terms-modal {
    font-size: 1.05rem; /* 文字を少し大きく */
    margin-top: 16px;   /* 上の余白を追加 */
    margin-bottom: 16px;/* 下の余白を追加 */
}

/* 作品追加ボタンのスタイル */
#add-artwork-btn {
    font-size: 1.05rem; /* 文字を少し大きく */
    padding: 14px 36px; /* パディングを調整してボタン自体を大きく */
}
/* ===== ▲ 応募フォーム用スタイル (ここまで) ▲ ===== */

/* フッター */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}
.footer__sns {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 24px;
}
.footer__sns a {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s ease;
}
.footer__sns img {
    height: 32px;
    width: auto;
    vertical-align: middle;
}
.footer__sns a:hover {
    opacity: 0.8;
}
.footer__legal-links {
    margin-bottom: 24px; /* 下のSNSアイコンとの間に余白を確保 */
    display: flex;
    flex-direction: column; /* リンクを縦に並べる（二段） */
    align-items: center; /* 中央揃え */
    gap: 8px; /* リンク間の余白 */
}
.footer__legal-links a {
    color: #a0aec0; /* コピーライトと同じ薄いグレー */
    font-size: 0.8rem; /* 文字を小さく */
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer__legal-links a:hover {
    color: #fff; /* ホバーで白に */
    text-decoration: underline;
}
.footer__copy {
    font-size: 0.9rem;
    margin: 0;
    color: #a0aec0;
}
.footer__logos {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #4a5568;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}
.footer__logos a {
    display: inline-block;
}
.footer__logos img {
    height: 40px;
    width: auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* PC用のナビとボタンを非表示に */
    .header__nav,
    .header__btn {
        display: none;
    }

    /* SP用のメニューとボタンを表示 */
    .hamburger-menu,
    .floating-apply-btn {
        display: flex;
    }

    .hero {
        padding: 20px 20px; 
    }
    /* ヒーローセクションの調整 */
    .hero__inner {
        padding: 20px;
    }
    .hero__title {
        font-size: 2rem;
        word-break: keep-all; 
        line-height: 1.3; 
    }
    .hero__title br {
    display: block; /* PCでは<br>を無効化する */
}
    .hero__date {
        font-size: 2rem;
    }
    .section {
        padding: 60px 0;
    }
}
/* フォーム送信時のローディング画面 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 4000;
    display: none; /* JSで表示を切り替え */
    justify-content: center;
    align-items: center;
    flex-direction: column; /* 縦に並べる */
}
.loading-overlay.is-visible {
    display: flex;
}
.loading-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--bg-gray-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-overlay .loading-text {
    margin-top: 20px;
    font-weight: 700;
    color: var(--text-color);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* フォーム送信ボタン下の注意文言 */
.form-submit-notice {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* フォームのエラーメッセージ */
.form-error-message {
    padding: 16px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* ===== ▼ Square決済フォーム用スタイル ▼ ===== */
.square-form {
    max-width: 500px;
    margin: 30px auto;
}

#card-container {
    min-height: 150px;
}

.payment-status {
    margin-top: 15px;
    color: var(--secondary-color);
    font-weight: 700;
    min-height: 1.5em;
}
/* ===== ▲ Square決済フォーム用スタイル ▲ ===== */

/* ===== ▼ チェックボックス ▼ ===== */
.checkbox-group label {
    cursor: pointer;
    user-select: none;     /* テキスト選択を無効化 */
}

/* デフォルトの非表示 */
.checkbox-group input[type="checkbox"] {
    display: none;
}

/* カスタムチェックボックス */
.checkbox-group label::before {
    content: '';
    display: inline-block;
    width: 1.4em;  /* サイズを大きく */
    height: 1.4em;
    margin-right: 0.6em; /* テキストとの間隔 */
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
    vertical-align: bottom; /* テキストとの垂直位置を調整 */
}

/* チェックされたとき*/
.checkbox-group input[type="checkbox"]:checked + label::before {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

/* アクセシビリティ向上 */
.checkbox-group input[type="checkbox"]:focus + label::before {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
/* ===== ▲ チェックボックスのカスタマイズ  ▲ ===== */