:root {
    --primary-color: #FF8C00;
    --secondary-color: #FFD700;
    --text-color: #444;
    /* 文字色を少し淡くして柔らかさを強調 */
    --bg-color: #F9F9F9;
    --white: #FFFFFF;
    --gray-light: #F5F7FA;
    /* よりクリーンな背景 */
    --accent-color: #333;
    /* 引き締め色 */
    --header-height: 100vw;
    --footer-height: 72px;
    /* フッター高さアップ */

    /* Spacing System */
    --space-md: 20px;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif;
    background-color: var(--gray-light);
    color: var(--text-color);
    padding-bottom: calc(var(--footer-height) + 10px);
    line-height: 1.7;
    font-weight: 400;
}

/* Global Font unification */
button,
input,
textarea,
select {
    font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif;
}

.main-header {
    background-size: cover;
    background-position: center;
    height: var(--header-height);
    display: block;
    overflow: hidden;
    /* Added to prevent overflow from children */
}

.main-header.fallback-active {
    background: linear-gradient(135deg, #FF8C00, #FF5000);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.header-fallback-content {
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-rally-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.header-rally-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.header-rally-period {
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.period-label {
    font-size: 0.8rem;
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.period-dates {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.main-header::after {
    display: none;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* Intro Catchphrase */
.intro {
    padding: 30px 0;
    text-align: center;
    background: transparent;
    margin-top: 30px;
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    container-type: inline-size;
}

.intro-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: var(--primary-color);
    letter-spacing: 0.05em;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    line-height: 1.2;
    width: 100%;
    /* コンテナ幅に合わせて自動調整するためのclamp。最大サイズをコンテナ幅(440px)に収まる程度に制限 */
    font-size: clamp(1.2rem, 6vw, 1.8rem);
    white-space: nowrap;
    text-align: center;
    /* 明示的に指定 */
}

/* 画面幅が極端に狭い場合のフォールバック（任意のブレークポイント） */
@media (max-width: 360px) {
    .intro-title {
        font-size: 1.8rem;
        white-space: normal;
        /* さすがに狭すぎる場合は折り返す */
    }
}

.intro-subtitle {
    font-size: 0.95rem;
    color: #555;
    font-weight: 600;
    margin: 0 auto 30px auto;
    text-shadow: 1px 1px 0 #fff;
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
}

.catchphrase {
    background: transparent;
    padding: 0;
    box-shadow: none;
    font-size: 1.05rem;
    line-height: 1.8;
    /* バランス調整 */
    margin: 0 auto;
    font-weight: 400;
    /* 太すぎず、程よく */
    color: var(--text-color);
    text-shadow: 2px 2px 0 #fff;
    white-space: normal;
    text-align: left;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.catchphrase p {
    text-align: left;
    margin-bottom: 1em;
}

.intro-note {
    font-size: 0.85rem;
    display: block;
    margin-top: 0.8em;
    color: #666;
    font-weight: 400;
    text-align: center;
}

.terms-link-area {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

.terms-link {
    font-size: 0.8rem;
    color: #999;
    text-decoration: underline;
    display: inline-block;
}

.terms-link:hover {
    color: var(--primary-color);
}

/* User Banner */
/* User Banner */
.user-banner {
    width: 100%;
    /* Remove strip styling */
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: none;
    box-sizing: border-box;
}

.user-banner-inner {
    max-width: 100%;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Card Style */
    background: #FFF8E1;
    /* Soft cream/yellow accent */
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.user-row {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-icon {
    color: #ffd700;
    font-size: 1.8rem;
}

.nickname {
    font-weight: 700;
    /* 強調部分は700 */
    color: #444;
    font-size: 1.5rem;
    border: none;
}

.user-id {
    font-size: 0.9rem;
    color: #888;
    font-family: monospace;
    letter-spacing: 0.05em;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.6);
    padding: 2px 10px;
    border-radius: 10px;
}

/* Action Button & Counter */
.status-area {
    text-align: center;
    max-width: 480px;
    margin: 0 auto 30px auto;
}

.apply-area {
    text-align: center;
    max-width: 480px;
    margin: 40px auto 0 auto;
}

.btn-primary {
    background: linear-gradient(to left, #FF8C00, #FF5000);
    color: white;
    border: none;
    width: auto;
    min-width: 280px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 12px;
    /* Softer corners */
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 5px 0 #b33a00;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin: 0 auto 15px auto;
    display: table;
    /* Using table to shrink-wrap content and allow margin: auto to work */
    text-align: center;
    transform: translateY(0);
}

.btn-primary:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #b33a00;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

/* Icon style in button */
.btn-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 2px;
}

.apply-note {
    font-size: 0.8rem;
    color: #AAA;
    margin: 10px 0 0 0;
    text-align: center;
    font-weight: 400;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

.btn-primary:disabled {
    background: #EAEAEA;
    color: #BBB;
    cursor: not-allowed;
    box-shadow: none;
    text-shadow: none;
    transform: none;
}

.btn-applied {
    background: linear-gradient(to bottom, #f0f0f0, #dcdcdc);
    color: #777;
    border: 1px solid #ccc;
    width: auto;
    min-width: 280px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #b0b0b0;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    margin: 0 auto 15px auto;
    display: block;
    transform: translateY(0);
}

.btn-applied:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #b0b0b0;
}

.btn-applied:hover {
    filter: brightness(1.05);
}

.stamp-status {
    text-align: center;
    color: var(--text-color);
}

.status-label {
    font-size: 1.0rem;
    color: #666;
    /* 少し淡く */
    margin-bottom: 8px;
    font-weight: 400;
    /* 軽く */
    letter-spacing: 0.08em;
}

.status-count {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
}

.count-highlight {
    font-size: 4.0rem;
    line-height: 1;
    color: #FF6B6B;
    /* ここも丸く */
    font-weight: 900;
    /* 重すぎないボールド */
    letter-spacing: -2px;
    margin-right: 5px;
    text-shadow: 2px 2px 0px #fff, 4px 4px 10px rgba(255, 107, 107, 0.2);
}

.count-total {
    font-size: 1.4rem;
    color: #BBB;
    font-weight: 400;
}

/* Stamp Grid Container */
.stamp-rally {
    margin: 0 auto;
}

/* Stub Grid */
.stamp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stamp-slot {
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* 影もさらに薄く */
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stamp-slot:active {
    transform: scale(0.96);
}

.spot-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.spot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spot-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    /* 透過度下げる */
    color: #555;
    font-size: 0.8rem;
    padding: 8px 5px;
    text-align: center;
    box-sizing: border-box;
    font-weight: 400;
    /* 名前も軽く */
    backdrop-filter: blur(2px);
}

.stamp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    /* 全体に白く */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stamp-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transform: rotate(-15deg);
    opacity: 0.9;
}

.stamp-date-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: rotate(-25deg);
    /* 反時計回りに25度回転 */
}

.stamp-date-text {
    fill: #E84530;
    /* スタンプ画像と同じ明るい朱赤 */
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 24px;
    letter-spacing: 2px;
}

.stamp-slot.completed .stamp-overlay {
    opacity: 1;
}

/* Footer */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    height: var(--footer-height);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.footer-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.footer-link {
    text-decoration: none;
    color: #AAA;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex: 1;
    /* Distribute space equally */
    width: auto;
    /* Reset fixed width */
    min-width: 0;
    /* Allow shrinking */
    transition: color 0.2s;
    font-weight: 400;
    /* アイコンテキストも軽く */
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-link .icon {
    font-size: 1.5rem;
    /* 大きく */
    margin-bottom: 6px;
}

/* Spot Detail Components */

/* Spot Header */
.spot-header {
    width: 100%;
    /* aspect-ratio: 1 / 1; Remove forced square, use padding-top trick or height if needed, but standard header height usage? */
    /* Requirement says "Square size header" */
    height: 100vw;
    max-height: 480px;
    /* Limit on desktop */
    position: relative;
    background-image: url('../images/spot_shrine_1769698234884.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    /* Added to prevent rotated stamp from causing horizontal scroll */
}

.spot-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.spot-header-name {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.spot-stamp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.spot-stamp-overlay.active {
    display: flex;
}

.spot-stamp-image {
    width: 70%;
    height: 70%;
    object-fit: contain;
    transform: rotate(-10deg);
    opacity: 0.9;
}

.spot-stamp-date-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: rotate(-20deg) scale(0.9);
    /* Adjust rotation and scale to match spot-stamp-image */
}

/* --------------------------------------------------------------------------
   Prize Application Page Styles
   -------------------------------------------------------------------------- */

/* Section Title (Consistent across all pages) */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Prize Grid */
.prize-section {
    margin-bottom: 40px;
}

.prize-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column on mobile for better readability */
    gap: 20px;
}

/* If you want 2 columns on larger mobiles, add media query */
@media (min-width: 400px) {
    .prize-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.prize-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.prize-card:active {
    transform: scale(0.98);
}

.prize-img-area {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
    overflow: hidden;
}

.prize-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prize-content {
    padding: 15px;
}

.prize-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.prize-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    /* Do NOT truncate - show full description */
}

/* Complete Bonus Section */
.bonus-section {
    margin-bottom: 40px;
}

/* Removed center alignment to keep all section titles consistent */

/* Application Form */
.apply-form-section {
    margin-bottom: 60px;
}

.apply-form {
    margin-top: 20px;
}

.form-intro {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.7;
}

/* Form Help Text */
.form-help-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

/* Spot Info Section */
.spot-info-section {
    padding: 20px 0 10px 0;
    background: #fff;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.spot-info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.spot-icon {
    width: 24px;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-right: 12px;
    margin-top: 4px;
}

.spot-info-content {
    flex: 1;
}

.spot-address,
.spot-tel,
.spot-hours {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
}

.map-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #555;
    background-color: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #ddd;
}

.map-link-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}



/* Description & Location */
.spot-description {
    padding: 0 0 20px 0;
    margin-bottom: 20px;
}

.spot-lead {
    font-size: 1.0rem;
    line-height: 1.8;
    color: var(--text-color);
    margin: 0;
}

/* Removed duplicate .section-title definition - kept the one at line 584-590 */

.stamp-location-section,
.keyword-section,
.benefit-section {
    padding: 0;
    margin-bottom: 40px;
}

.location-photo-area {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.location-photo {
    width: 100%;
    height: auto;
    display: block;
}

.location-text {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Keyword Form */
.keyword-hint {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.keyword-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyword-input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.keyword-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.2);
    /* Focus ring */
}

.keyword-submit-btn {
    background: linear-gradient(to left, #FF8C00, #FF5000);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    /* Softer corners */
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 5px 0 #b33a00;
}

.keyword-submit-btn:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #b33a00;
}

.keyword-submit-btn:hover {
    filter: brightness(1.1);
}

/* Benefit Section */
.benefit-card {
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    background: #FFFDF5;
    overflow: hidden;
    transition: all 0.3s;
}

/* ... existing code ... */

/* KEYWORD GET PAGE STYLES */
.get-container {
    padding-top: 20px;
    /* Reduced since header is added */
    text-align: center;
    /* Ensure footer pushes down (removed excessive min-height) */
}

.get-stamp-msg {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    color: #FFD700;
    text-shadow:
        3px 3px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    transform: rotate(-5deg);
    text-align: center;
    animation: stampSlam 0.5s ease-out forwards;
}

@keyframes stampSlam {
    0% {
        transform: scale(2) rotate(-15deg);
        opacity: 0;
    }

    60% {
        transform: scale(0.9) rotate(-2deg);
        opacity: 1;
    }

    80% {
        transform: scale(1.05) rotate(-6deg);
    }

    100% {
        transform: scale(1) rotate(-5deg);
    }
}

/* Remove old .get-spot-name since it is replaced by header */
.get-form-section {
    padding: 30px 0;
    background: transparent;
    /* Removed card bg */
    box-shadow: none;
    /* Removed shadow */
    margin-bottom: 30px;
    margin-top: 0;
    /* No overlap */
    position: relative;
    z-index: 10;
}

.get-form-label {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.get-form-label::before {
    content: '\f084';
    /* Key icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
}

.get-form-hint {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 25px;
}

.keyword-input-large {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 700;
    color: #444;
}

.keyword-input-large:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-large {
    width: 100%;
    padding: 18px 0;
    font-size: 1.3rem;
}

/* Modal Check Results */
.check-icon {
    font-size: 6rem;
    /* Larger icon */
    margin-bottom: 25px;
}

.check-icon.correct::before {
    content: '\f00c';
    /* check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #4CAF50;
}

.check-icon.incorrect::before {
    content: '\f00d';
    /* xmark */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #FF6B6B;
}

#check-title {
    font-size: 5rem;
    /* Ultra large */
    margin-bottom: 20px;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 4px 4px 0 #fff;
    line-height: 1.0;
    letter-spacing: -0.02em;
}

.check-message {
    font-size: 1.3rem;
    /* Larger message */
    color: #555;
    margin-bottom: 35px;
    line-height: 1.7;
    font-weight: 500;
}

.btn-modal-action {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
}

.benefit-card.disabled {
    filter: grayscale(100%);
    opacity: 0.6;
    pointer-events: none;
    border-color: #ccc;
    background: #f0f0f0;
}

.benefit-card.disabled .benefit-header {
    background: #ccc;
    color: #888;
}

.benefit-lock-msg {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
    font-weight: 500;
}

.benefit-header {
    background: var(--secondary-color);
    color: #5d4d2b;
    padding: 10px;
    text-align: center;
    font-weight: 700;
}

.benefit-body {
    padding: 20px;
    text-align: center;
}

.benefit-summary {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #555;
}

.btn-secondary {
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 12px;
    /* Softer corners */
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    /* Unified font size */
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:active,
.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
}



/* Back Link */
.back-link-area {
    text-align: center;
    margin: 40px 0 60px 0;
}

.back-link {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    /* Hidden */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    padding: 30px 20px;
    position: relative;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.benefit-name {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.benefit-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.staff-only-area {
    border-top: 1px dashed #ddd;
    padding-top: 20px;
    background: #f9f9f9;
    margin: 0 -20px -30px -20px;
    /* Stretch to edges */
    padding: 20px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.staff-msg {
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 15px;
    font-weight: 500;
}

.use-benefit-btn {
    background: #ccc;
    /* Default disabled-ish look until needed logic, but here "staff presses it" */
    background: #FF6B6B;
    color: #fff;
    border: none;
    padding: 12px 0;
    width: 100%;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.use-benefit-btn:active {
    transform: scale(0.98);
}

.staff-note {
    font-size: 0.7rem;
    color: #888;
    margin-top: 8px;
}

/* Profile Page Styles */
.profile-intro-text {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 15px;
    /* Reduced vertical margin heavily */
    padding: 0;
    line-height: 1.8;
    text-align: left;
}

.text-link {
    color: #007bff;
    /* Standard link blue or primary color if preferred */
    text-decoration: underline;
}

.profile-form-section {
    padding: 20px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    /* Removed bottom margin as requested */
    margin-left: 0;
    margin-right: 0;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.0rem;
    margin-bottom: 10px;
    color: #444;
}

.badge-required {
    display: inline-block;
    border: 1px solid #FF6B6B;
    color: #FF6B6B;
    background: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    margin-left: 10px;
}

.intro-title {
    text-align: center;
    /* Center title */
    margin-bottom: 20px;
}

.participant-id-section {
    text-align: center;
    /* Center ID */
    margin-bottom: 10px;
    /* Reduced margin */
    font-size: 0.85rem;
    color: #666;
}

.id-label {
    font-weight: 500;
}

.id-value {
    font-family: monospace;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 5px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.form-separator {
    border: none;
    border-top: 1px dashed #ddd;
    /* Subtle dashed line */
    margin: 20px 0;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary-color);
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.radio-text {
    font-size: 1.0rem;
    color: #444;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
    /* Space for icon */
}

.text-center {
    text-align: center;
}

.copyright {
    text-align: center;
    color: #aaa;
    font-size: 0.8rem;
    padding: 20px;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Content Pages (How to play, Terms, News)
   -------------------------------------------------------------------------- */

.content-section {
    padding: 20px 0;
    margin-bottom: 40px;
}

/* Terms & Generic Card style */
.card-panel {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.card-panel h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    display: block;
}

.card-panel p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.card-panel p:last-child {
    margin-bottom: 0;
}

/* How to play STEP styling */
.step-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.step-desc {
    margin-bottom: 35px;
    color: #555;
    font-size: 1.0rem;
    line-height: 1.7;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    text-decoration: none;
    display: block;
}

.news-item:active {
    transform: scale(0.98);
}

.news-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
    font-weight: 500;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

.news-excerpt {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.intro-subtitle {
    font-size: 1.0rem;
    color: #666;
    font-weight: 500;
    margin-top: 5px;
    text-align: center;
}

/* How to Play Steps (from Mockup H3 styles) */
.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 15px;
    border-bottom: 2px solid #FF8C00;
    display: inline-block;
}

.step-desc {
    margin-bottom: 30px;
    color: #666;
    font-size: 0.95rem;
}

/* Ensure content section has proper spacing if not already */

/* How To Play Scoped Styles */
.how-to-play-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    margin-top: 30px;
}

.how-to-play-content h3:first-child {
    margin-top: 0;
}

.how-to-play-content p {
    margin-bottom: 30px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Unified Text Styles for Static Pages
   -------------------------------------------------------------------------- */
.how-to-play-content p,
.how-to-play-content .step-desc,
.prize-desc,
.news-excerpt,
.card-panel p,
.card-panel div {
    line-height: 1.65;
    margin-bottom: 1.2em;
    color: var(--text-color);
}

.how-to-play-content .step-desc {
    margin-bottom: 2em;
    /* Steps need more separation */
}

/* Ensure no double margin on last element */
.how-to-play-content p:last-child,
.prize-desc:last-child,
.news-excerpt:last-child,
.card-panel p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   WYSIWYG Editor Content - Responsive Images
   -------------------------------------------------------------------------- */
/* 利用規約、ニュース、その他のWYSIWYGコンテンツ内の画像を親要素の幅に収める */
.card-panel img,
.how-to-play-content img,
.content-area img,
p img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
}

/* --------------------------------------------------------------------------
   WYSIWYG Alignment Classes (Quill.js compatibility)
   -------------------------------------------------------------------------- */
.ql-align-center {
    text-align: center;
}

.ql-align-right {
    text-align: right;
}

.ql-align-justify {
    text-align: justify;
}