:root {
    --deep-green: #00824e;
    --bright-green: #a6d05b;
    --red: #e60012;
    --yellow: #fff100;
    --bg-white: #ffffff;
    --text-black: #333333;
    --border-radius: 1.5rem;
}

@media (max-width: 768px) {
    :root {
        --border-radius: 1rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
    background-color: #f8fcf9;
    color: var(--text-black);
    line-height: 1.6;
    background-image: radial-gradient(#e0eee0 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Header */
nav {
    background: white;
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    height: 60px;
}

.logo-box {
    background: var(--deep-green);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 99px;
    font-weight: 900;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--deep-green);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--red);
}

/* Hamburger Menu */
.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--deep-green);
    padding: 10px;
    margin-right: -10px;
    z-index: 2001;
}

/* Section Layout */
header, section {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 80px 5% 20px;
    scroll-snap-align: start;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    header, section {
        height: 100vh;
        padding: 70px 5% 20px;
        scroll-snap-align: start;
        overflow: hidden;
    }
    
    .content-scroll {
        max-height: calc(100vh - 140px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1.5rem 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        text-align: center;
        z-index: 2000;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        margin: 0.8rem 0;
        font-size: 1.1rem;
        margin-left: 0;
    }

    .flyer-display {
        gap: 10px;
    }

    .flyer-display img {
        max-height: none;
        width: 100%;
        max-width: 400px;
    }

    .section-header {
        font-size: 1.3rem !important;
        padding: 0.4rem 1.2rem !important;
        margin-bottom: 1.5rem !important;
    }

    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.4rem !important; }
}

.section-header {
    background: var(--deep-green);
    color: white;
    display: inline-block;
    padding: 0.4rem 2rem;
    border-radius: 99px;
    margin-bottom: 2.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 130, 78, 0.15);
}

#rules .section-header {
    margin-bottom: 1.5rem;
}

#rules .info-box {
    margin-bottom: 0.8rem;
}

/* Content Area */
.content-scroll {
    width: 100%;
    max-width: 950px;
    height: auto;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content-scroll::-webkit-scrollbar {
    display: none;
}

/* Hero Scaling */
.flyer-display {
    max-width: 90%;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.flyer-display img {
    max-height: 48vh;
    width: auto;
    display: block;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transform: rotate(-0.5deg);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flyer-display img:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 10;
}

.hero h1 {
    color: var(--deep-green);
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

/* Info Boxes */
.info-box {
    background: white;
    border: 3px solid var(--deep-green);
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    box-shadow: 4px 4px 0px var(--bright-green);
    width: 100%;
    margin-bottom: 1rem;
    overflow: hidden;
}

#about .grid {
    max-width: 700px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    .grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .guideline-table th, .guideline-table td {
        display: block;
        width: 100% !important;
        border: none;
    }
    
    .guideline-table th {
        padding-bottom: 0;
        color: var(--deep-green);
        font-size: 0.9rem;
    }
    
    .guideline-table td {
        padding-top: 0.2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }

    .guideline-table tr:last-child td {
        border-bottom: none;
    }
}

/* Stats */
.stat-circle {
    width: 60px;
    height: 60px;
    background: var(--deep-green);
    color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    border: 2px solid var(--yellow);
}

.stat-val { font-size: 1rem; font-weight: 900; }
.stat-unit { font-size: 0.5rem; }

.btn-red {
    background: var(--red);
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 99px;
    font-weight: 900;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 0 #b30000;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #eee;
    padding: 15px;
    text-align: center;
    border-top: 3px solid var(--deep-green);
    scroll-snap-align: end;
    font-size: 0.75rem;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: 0.5s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.modal-content {
    max-width: 98%;
    max-height: 98%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    animation: zoom 0.3s ease-out;
}

@keyframes zoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
