@media (max-width: 768px) {
    :root {
        --text-panel-padding: 1.5rem 1.25rem;
    }

    .text-content {
        font-size: 1rem;
        line-height: 1.75;
    }

    .choice-btn {
        padding: 0.9rem 1.25rem;
        font-size: 0.9rem;
    }

    .title-text {
        font-size: 1.8rem;
    }

    .ending-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --text-panel-padding: 1.25rem 1rem;
    }

    .text-content {
        font-size: 0.95rem;
    }

    .choice-btn {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }

    .title-text {
        font-size: 1.4rem;
        letter-spacing: 0.1em;
    }

    .ending-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .ending-gallery-item {
        padding: 0.5rem 0.6rem;
    }

    .ending-gallery-item-title {
        font-size: 0.65rem;
    }
}

/* Hide scroll hint in landscape on short viewports */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-scroll-hint {
        display: none;
    }

    .hero-cta-sub {
        margin-bottom: 1rem;
    }
}

/* Safe area for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .text-panel,
    .choice-panel {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }
}
