/* Hide redundant reCAPTCHA badge (checkbox widget is used instead) */
.grecaptcha-badge { visibility: hidden !important; display: none !important; }

/* Paper texture background */
.bg-paper {
    background-color: #fdfbf7;
    background-image: radial-gradient(#e3e3e3 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Sketchy borders for cards */
.guide-card, .comic-item, .gallery-item {
    border: 2px solid #333;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.guide-card:hover, .comic-item:hover, .gallery-item:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.15);
}

/* Buttons with sketchy look */
.btn {
    border: 2px solid #333;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2);
}

/* Images in cards */
.guide-thumb-img, .comic-thumb-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    margin-bottom: 1rem;
    border: 2px solid #333;
}

.comic-thumb-img {
    height: auto; /* Let comics be full height/aspect ratio */
    aspect-ratio: 1/1;
}

/* Guide Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    overflow-y: hidden; /* Changed from auto to hidden to prevent background scroll interference */
    padding: 20px;
    overscroll-behavior: contain; /* Prevents scroll chaining to body */
}

.modal-content {
    background-color: #fff;
    background-image: radial-gradient(#e3e3e3 1px, transparent 1px);
    background-size: 20px 20px;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 4px solid #333;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 2px dashed #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-family: 'Mali', cursive;
}

.close-modal {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #e74c3c;
}

.guide-steps-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1; /* Ensures it fills available space for scrolling */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.guide-step {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #eee;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.05);
}

.guide-step:last-child {
    margin-bottom: 0;
}

.step-number {
    background-color: var(--primary-color); /* Updated from broken --brand-teal */
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 2px solid #333;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.step-image-container {
    flex: 1;
    max-width: 350px;
}

.step-image-container img {
    width: 100%;
    border-radius: 10px;
    border: 2px solid #333;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.step-content {
    flex: 1;
    padding-top: 5px;
}

.step-content h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.step-content p {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .guide-steps-container {
        padding: 15px; /* More screen space */
    }

    .guide-step {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
        padding: 10px; /* Reduced padding on mobile */
        position: relative;
    }
    
    .step-number {
        display: none !important; /* Hide step numbers on mobile as requested - FORCE HIDE */
    }

    .step-image-container {
        max-width: 100%;
        width: 100%;
    }
    
    .step-content {
        width: 100%;
        padding-top: 0;
        text-align: center; /* Center text on mobile */
    }
}
