/* Shared responsive layout; the original space-themed design stays intact. */
:root { --header-height: 85px; }
html { scroll-padding-top: calc(var(--header-height) + 24px); }
img, video { max-width: 100%; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #bda5ff; outline-offset: 4px; }
.header { gap: 24px; padding-inline: clamp(20px, 3vw, 56px); }
.navigation { position: static; transform: none; margin-left: auto; }
.navigation a { font-size: clamp(11px, .9vw, 13px); padding-inline: 9px; }
.logo { flex-shrink: 0; }
.menu-toggle { flex-shrink: 0; min-width: 44px; min-height: 44px; }
.contact-form input, .contact-form textarea { width: 100%; min-width: 0; }
.planet-explorer-shell, .planet-explorer-story, .card-info { min-width: 0; }
.planet-explorer-shell { max-height: 96dvh; }
.planet-explorer-close { min-width: 44px; min-height: 44px; }
@media (max-width: 1200px) {
    :root { --header-height: 72px; }
    .header { height: var(--header-height); padding-inline: 20px; z-index: 200; }
    .menu-toggle { display: block; }
    .navigation, .navigation.open {
        position: fixed; inset: var(--header-height) 0 0;
        width: 100%; height: calc(100dvh - var(--header-height));
        margin: 0; padding: 20px max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom));
        border: 0; border-radius: 0; transform: none;
        background: rgba(13,16,37,.99); overflow-y: auto;
        overscroll-behavior: contain; align-content: start; gap: 8px;
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
    .navigation { display: none; }
    .navigation.open { display: grid; }
    .navigation a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; font-size: 14px; white-space: normal; text-align: left; }
    body.menu-open { overflow: hidden; }
    body.menu-open .site-music-dock { visibility: hidden; }
    .site-music-dock { top: calc(var(--header-height) + 10px); }
}
@media (max-width: 700px) {
    .hero { min-height: auto; padding: 105px 6% 52px; }
    .hero-content { width: 100%; min-width: 0; }
    .hero h1 { font-size: clamp(31px, 8.8vw, 56px); letter-spacing: -1px; overflow-wrap: anywhere; }
    .hero-description { font-size: 15px; line-height: 1.75; margin-block: 22px; }
    .hero-buttons { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .hero-buttons .btn { display: flex; justify-content: center; align-items: center; min-height: 48px; padding: 14px 12px; text-align: center; }
    .hero-planet { pointer-events: none; right: -130px; }
    .subtitle { font-size: 10px; letter-spacing: 2.5px; overflow-wrap: anywhere; }
    .page-title { padding: 96px 6% 36px; }
    .page-title h1 { font-size: clamp(28px, 8.5vw, 43px); line-height: 1.2; overflow-wrap: anywhere; }
    .page-title p { overflow-wrap: anywhere; }
    .statistics { padding: 36px 6%; gap: 24px 10px; }
    .stat { min-width: 0; }
    .stat h2 { font-size: clamp(25px, 8vw, 40px); }
    .stat p { font-size: 11px; line-height: 1.5; }
    .section { padding: 48px 6%; }
    .section-heading h2 { font-size: clamp(25px, 7vw, 36px); overflow-wrap: anywhere; }
    .planet-item, .planet-card, .contact-info { min-width: 0; }
    .planet-info, .planet-card p { overflow-wrap: anywhere; }
    .contact-form { padding: 20px; }
    input, textarea, select { font-size: 16px; }
    .contact-form input { min-height: 48px; }
    .contact-form .btn { width: 100%; min-height: 48px; }
    .footer { gap: 22px; padding: 34px 6% max(34px, env(safe-area-inset-bottom)); }
    .footer p, .footer .socials { max-width: 100%; overflow-wrap: anywhere; }
    .socials { flex-wrap: wrap; justify-content: center; }
    .socials a { display: inline-flex; align-items: center; min-height: 44px; }
    .solar-canvas-wrap { height: clamp(300px, 56svh, 440px); }
    .solar-controls { flex-wrap: wrap; }
    .solar-controls button, .solar-legend-item, .weather-toolbar button,
    .globe-controls button, .planet-story-controls button, .planet-explorer-zoom button { min-height: 44px; min-width: 44px; }
    .weather-search { flex-wrap: wrap; }
    .weather-search input { width: 100%; flex-basis: 180px; }
    .weather-globe-stage { height: clamp(300px, 55svh, 430px); }
    .planet-explorer-shell { max-height: 100dvh; padding-top: max(20px, env(safe-area-inset-top)); }
    .planet-explorer-head { padding-right: 42px; }
    .planet-explorer-close { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 6; }
    .planet-explorer-stage { min-height: 330px; }
    .planet-explorer-head h2 { font-size: 28px; }
    .planet-explorer-head p { max-width: 100%; }
    .planet-story-controls { flex-wrap: wrap; }
    .site-music-toggle, .site-music-wheel { min-height: 44px; }
    .site-music-wheel { width: 44px; }
    .site-music-wheel-wrap { width: 44px; height: 44px; }
    .site-music-wheel-menu { display: flex; flex-direction: column; gap: 7px; inset: calc(100% + 12px) 0 auto auto; width: min(265px, calc(100vw - 32px)); height: auto; padding: 10px; border: 1px solid #ac94ff55; border-radius: 14px; background: #101329; visibility: hidden; opacity: 0; }
    .site-music-wheel-wrap.is-open .site-music-wheel-menu { visibility: visible; opacity: 1; pointer-events: auto; }
    .site-music-track, .site-music-wheel-wrap.is-open .site-music-track { position: static; width: 100%; min-height: 44px; padding: 10px; border-radius: 9px; white-space: normal; text-align: left; font-size: 12px; transform: none; opacity: 1; pointer-events: auto; }
}
@media (max-width: 900px) {
    .lander-stage { height: clamp(360px, 68svh, 580px); min-height: 0; }
    .lander-stage canvas { height: 100%; min-height: 0; }
    .lander-stage > .lander-touch-controls { position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 5; margin: 0; gap: 6px; }
    .lander-touch-controls button { min-height: 48px; font-size: 12px; }
    .lander-panel { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
 .lander-stage > .lander-restart { position:absolute; top:12px; right:12px; z-index:5; width:44px; min-height:44px; margin:0; padding:8px; font-size:20px; }
 .lander-stage > .lander-restart .lander-restart-label { display:none; }
}
@media (max-width: 700px) {
 .site-music-wheel-menu { max-height:calc(100dvh - 155px); overflow-y:auto; overscroll-behavior:contain; }
}

@media (max-width: 1200px) {
 .site-music-dock { position:relative; top:auto; left:auto; transform:none; width:max-content; margin:12px auto 0; }
}
@media (max-width: 700px) {
 .hero { padding-top:48px; }
 .page-title { padding-top:40px; }
}
