* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    
    margin: 0;
    padding: 0;
    min-height: 100vh;
    
    font-family: Arial, sans-serif;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 120vh;
    background-image: url('/img/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    animation: slowDrift 12s ease-in-out infinite alternate;
}

@keyframes slowDrift {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-10vh) scale(1.05);
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

.main_box {
    background-color: rgba(104, 136, 103, 0.808);
    backdrop-filter: blur(5px);
    box-shadow: 5px 5px 15px rgba(139, 135, 109, 0.4);
    
    color: rgb(253, 143, 126);
    text-shadow: 0 0.5px 0 rgb(248, 195, 185);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    
    width: min(60vh, 500px);
    min-height: 25vh;
    padding: clamp(20px, 3vw, 40px);
    border-radius: 5vh;
    
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}

.page {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}

.page-1 {
    transform: translate(-50%, -50%) translateX(0);
    opacity: 1;
    z-index: 2;
}

.page-2 {
    transform: translate(-50%, -50%) translateX(110%);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.page-3 {
    transform: translate(-50%, -50%) translateX(110%);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.page.slide-out {
    transform: translate(-50%, -50%) translateX(-110%) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

.page.slide-in {
    transform: translate(-50%, -50%) translateX(0);
    opacity: 1;
    z-index: 3;
    pointer-events: all;
}

.page.hidden {
    transform: translate(-50%, -50%) translateX(110%);
    opacity: 0;
    pointer-events: none;
}

.table_of_contents {
    box-shadow: inset 2px 2px 10px rgba(0, 48, 19, 0.4);
    border: 1px solid rgba(1, 56, 26, 0.25);
    
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 65, 35, 0.185),
        transparent
    );
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    width: 100%;
    max-width: 40vh;
    padding: 20px 30px;
    border-radius: 5vh;
    
    font-weight: 500;
    backdrop-filter: blur(2px);
    font-size: xx-large;
}

.contents {
    font-size: large;
    text-align: center;
    padding: 10px;
}

.contents p {
    margin: 0;
    line-height: 1.6;
}

.contents strong {
    color: #ff6b6b;
    font-size: 1.2em;
}

.contents u {
    text-decoration-color: #ff6b6b;
    text-underline-offset: 3px;
}

.main_box button {
    border-radius: 5vh;
    border: none;
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    
    padding: 12px 24px;
    
    box-shadow: 5px 5px 15px rgba(139, 135, 109, 0.4);
    color: #f0e6ed;
    font-size: 3vh;
    
    background: rgba(209, 132, 121, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 164, 150, 0.699);
    
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    min-width: 140px;
}

.main_box button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(209, 132, 121, 0.2),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.main_box button:hover::before {
    left: 100%;
}

.main_box button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 5px 8px 20px rgba(139, 135, 109, 0.5);
    background: rgba(209, 132, 121, 0.2);
}

.main_box button:active {
    transform: scale(0.95) translateY(0px);
    background: rgba(255, 164, 150, 0.4);
}

.main_box button svg {
    transition: transform 0.4s ease;
}

.main_box button:hover svg {
    transform: translateX(5px);
}

.main_box button:has(svg[style*="rotate"]) {
    background: rgba(209, 132, 121, 0.05);
}

.main_box button:has(svg[style*="rotate"]):hover {
    background: rgba(209, 132, 121, 0.15);
}

.main_box button:has(svg[style*="rotate"]):hover svg {
    transform: translateX(-5px) rotate(180deg);
}
input[type="date"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 164, 150, 0.3);
    border-radius: 2vh;
    padding: 10px 15px;
    color: rgb(253, 143, 126);
    font-size: 2vh;
    width: 80%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

input[type="date"]:focus {
    outline: none;
    border-color: rgba(255, 164, 150, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) hue-rotate(-20deg) saturate(3);
    cursor: pointer;
}
#dateError {
    color: #ff6b6b;
    font-size: 2vh;
    margin-top: 5px;
    display: none;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

input[type="date"].error {
    border: 2px solid #ff6b6b !important;
    animation: shake 0.5s ease-in-out;
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
        height: 100vh;
        width: 100vw;
    }

    .main_box {
        width: 92vw;
        min-height: 55vh;
        max-height: 85vh;
        padding: 20px 15px;
        border-radius: 4vh;
        gap: 12px;
    }

    .table_of_contents {
        font-size: 3.5vh;
        padding: 14px 16px;
        max-width: 95%;
        word-wrap: break-word;
        line-height: 1.3;
        border-radius: 4vh;
    }

    .contents {
        font-size: 2.2vh;
        padding: 8px 10px;
        max-width: 95%;
    }

    .contents p {
        font-size: 2.2vh;
        line-height: 1.5;
        padding: 5px 0;
    }

    .contents strong {
        font-size: 2.5vh;
    }

    .main_box button {
        font-size: 2.5vh;
        padding: 14px 20px;
        min-width: 100px;
        width: 90%;
        justify-content: center;
        gap: 10px;
        border-radius: 4vh;
    }

    .main_box button svg {
        width: 24px;
        height: 24px;
    }

    input[type="date"] {
        font-size: 2.5vh;
        padding: 12px 15px;
        width: 90%;
        min-height: 48px;
        border-radius: 2.5vh;
    }

    #dateError {
        font-size: 2vh;
        padding: 5px 10px;
    }

    .main_box {
        gap: 14px;
    }

    .main_box button:has(svg[style*="rotate"]) {
        min-width: 100px;
    }
    input[type="date"] {
        font-size: 2.5vh;
        padding: 14px 15px;
        min-height: 50px;
        -webkit-tap-highlight-color: transparent;
    }

    input[type="date"]::-webkit-calendar-picker-indicator {
        padding: 8px;
        font-size: 20px;
    }
}
@supports (padding: max(0px)) {
    .main_box {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-top: max(15px, env(safe-area-inset-top));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}
