:root {
    color-scheme: dark;
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    background: #071427;
    color: #f8fafc;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 209, 102, 0.28) 0 2px, transparent 3px),
        radial-gradient(circle at 72% 12%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px),
        radial-gradient(circle at 86% 34%, rgba(125, 211, 252, 0.75) 0 2px, transparent 3px),
        radial-gradient(circle at 22% 68%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
        radial-gradient(circle at 64% 76%, rgba(255, 209, 102, 0.6) 0 2px, transparent 3px),
        linear-gradient(145deg, #071427 0%, #12335d 54%, #0f766e 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.5px);
    background-position: 0 0, 32px 44px;
    background-size: 86px 86px, 112px 112px;
    opacity: 0.42;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #fde68a;
    outline-offset: 3px;
}

h1,
h2,
p {
    margin-top: 0;
}

.home-hero,
.games-page,
.game-page,
.simple-page,
.theme-select {
    margin: 0 auto;
    max-width: 1180px;
    padding: clamp(1.25rem, 4vw, 3rem);
    position: relative;
}

.home-hero {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    isolation: isolate;
    min-height: calc(100vh - 76px);
    overflow: hidden;
}

.home-hero::before,
.home-hero::after {
    animation: shooting-star 8s ease-in-out infinite;
    background:
        radial-gradient(circle at 100% 50%, rgba(255, 255, 255, 1) 0 0.18rem, transparent 0.24rem),
        linear-gradient(90deg, transparent 0%, rgba(125, 211, 252, 0.12) 28%, rgba(186, 230, 253, 0.72) 72%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(125, 211, 252, 0.4);
    content: "";
    height: 2px;
    left: -28%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 18%;
    transform: rotate(18deg) translate3d(0, 0, 0);
    transform-origin: 100% 50%;
    width: 9rem;
    z-index: 0;
}

.home-hero::after {
    animation-delay: 3.7s;
    animation-duration: 11s;
    left: -18%;
    top: 42%;
    width: 6.5rem;
}

.home-copy,
.orbit-preview {
    position: relative;
    z-index: 1;
}

.home-copy h1,
.games-intro h1,
.game-header h1 {
    font-size: clamp(2.25rem, 6vw, 4.8rem);
    line-height: 0.98;
    margin-bottom: 1rem;
}

.home-copy p,
.games-intro p,
.game-header p,
.simple-page p {
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    max-width: 640px;
}

.eyebrow {
    color: #fde68a;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.primary-link,
.restart-button {
    align-items: center;
    background: #ffd166;
    border: 0;
    border-radius: 8px;
    color: #172554;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 900;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
}

.primary-link:hover,
.restart-button:hover {
    background: #fbbf24;
}

.orbit-preview {
    aspect-ratio: 1;
    min-height: 280px;
    position: relative;
}

.preview-sun,
.preview-orbit,
.preview-planet {
    position: absolute;
}

.preview-sun {
    animation: sun-pulse 4.8s ease-in-out infinite;
    background: #ffd166;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 209, 102, 0.5);
    height: 32%;
    left: 34%;
    top: 34%;
    width: 32%;
}

.preview-orbit {
    animation: orbit-spin 24s linear infinite;
    border: 2px dashed rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    inset: 12%;
}

.orbit-two {
    animation-duration: 36s;
    animation-direction: reverse;
    inset: 0;
}

.preview-planet {
    border-radius: 50%;
    box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.16);
}

.planet-one {
    animation: planet-float-one 6s ease-in-out infinite;
    background: #38bdf8;
    height: 14%;
    left: 11%;
    top: 24%;
    width: 14%;
}

.planet-two {
    animation: planet-float-two 7.5s ease-in-out infinite;
    background: #ef6b4a;
    height: 11%;
    right: 4%;
    top: 55%;
    width: 11%;
}

.planet-three {
    animation: planet-float-three 6.8s ease-in-out infinite;
    background: #a78bfa;
    height: 9%;
    bottom: 10%;
    left: 43%;
    width: 9%;
}

.preview-sun,
.preview-orbit,
.preview-planet {
    will-change: transform;
}

.theme-select {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    min-height: calc(100vh - 76px);
}

.theme-select-intro {
    max-width: 640px;
}

.theme-portal-list {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.75rem);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    justify-items: center;
}

.theme-portal-item {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    max-width: 220px;
    text-align: center;
}

.theme-portal {
    animation: portal-float 6s ease-in-out infinite;
    aspect-ratio: 1;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: block;
    isolation: isolate;
    min-height: 120px;
    min-width: 120px;
    padding: 0;
    position: relative;
    width: min(42vw, 200px);
}

.theme-portal-item:nth-of-type(2n) .theme-portal {
    animation-delay: 1.2s;
}

.theme-portal-item:nth-of-type(3n) .theme-portal {
    animation-delay: 2.4s;
}

.theme-portal-mascot {
    border-radius: 50%;
    display: block;
    inset: 14%;
    overflow: hidden;
    position: absolute;
}

.theme-portal-mascot img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.theme-portal-frame {
    height: 100%;
    inset: 0;
    object-fit: contain;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.theme-portal-coming-soon {
    opacity: 0.55;
}

.theme-portal-badge {
    background: #0b1c3a;
    border-radius: 999px;
    bottom: 6%;
    color: #fde68a;
    font-size: 0.75rem;
    font-weight: 900;
    left: 50%;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.75rem;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.theme-portal-name {
    color: #fde68a;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 900;
    line-height: 1.1;
}

.theme-portal-message {
    background: rgba(11, 28, 58, 0.92);
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.9rem;
    line-height: 1.35;
    margin: 0;
    padding: 0.6rem 0.9rem;
}

@keyframes portal-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -10px, 0);
    }
}

.ocean-hero {
    isolation: isolate;
    min-height: calc(100vh - 76px);
    overflow: hidden;
    position: relative;
}

.ocean-hero::before,
.ocean-games-page::before {
    background:
        radial-gradient(circle at 86% 16%, rgba(254, 249, 195, 0.9) 0 2.6rem, transparent 3.2rem),
        radial-gradient(circle at 86% 16%, rgba(254, 249, 195, 0.35) 0 4.4rem, transparent 5rem),
        radial-gradient(circle at 20% 26%, rgba(255, 255, 255, 0.4) 0 2px, transparent 3px),
        radial-gradient(circle at 32% 44%, rgba(255, 255, 255, 0.32) 0 2px, transparent 3px),
        radial-gradient(circle at 74% 58%, rgba(224, 242, 254, 0.6) 0 2px, transparent 3px),
        radial-gradient(circle at 88% 72%, rgba(224, 242, 254, 0.5) 0 2px, transparent 3px),
        linear-gradient(to top, rgba(202, 138, 4, 0.55) 0%, transparent 9%),
        linear-gradient(to top, rgba(250, 204, 21, 0.75) 0%, rgba(250, 204, 21, 0.6) 8%, transparent 22%),
        linear-gradient(100deg, #071a3f 0%, #0c2f63 30%, #0ea5e9 66%, #38bdf8 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.ocean-hero-inner {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    margin: 0 auto;
    max-width: 1180px;
    min-height: calc(100vh - 76px);
    padding: clamp(1.25rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
}

.ocean-copy h1 {
    font-size: clamp(2.25rem, 6vw, 4.8rem);
    line-height: 0.98;
    margin-bottom: 1rem;
}

.ocean-copy p {
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    max-width: 640px;
}

.ocean-illustration {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    min-height: 280px;
}

.ocean-illustration img {
    animation: submarine-float 6s ease-in-out infinite;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.ocean-bubbles {
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.ocean-anchor {
    bottom: -6%;
    height: clamp(140px, 20vw, 220px);
    left: calc(clamp(1.25rem, 4vw, 3rem) + clamp(140px, 20vw, 220px) * 0.1124);
    object-fit: contain;
    opacity: 0.92;
    pointer-events: none;
    position: absolute;
    transform: rotate(15deg);
    width: auto;
    z-index: 0;
}

.ocean-coral {
    bottom: -4%;
    height: clamp(180px, 26vw, 300px);
    object-fit: contain;
    opacity: 0.95;
    pointer-events: none;
    position: absolute;
    right: clamp(1.25rem, 4vw, 3rem);
    width: auto;
    z-index: 0;
}

.ocean-bubble {
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.9), rgba(224, 242, 254, 0.35) 60%, transparent 72%);
    border-radius: 50%;
    bottom: -10%;
    opacity: 0;
    position: absolute;
    animation: bubble-rise linear infinite;
}

.bubble-one {
    animation-delay: 0s;
    animation-duration: 9s;
    left: 8%;
    height: 14px;
    width: 14px;
}

.bubble-two {
    animation-delay: 1.5s;
    animation-duration: 7s;
    left: 22%;
    height: 10px;
    width: 10px;
}

.bubble-three {
    animation-delay: 3s;
    animation-duration: 11s;
    left: 46%;
    height: 18px;
    width: 18px;
}

.bubble-four {
    animation-delay: 0.8s;
    animation-duration: 8s;
    left: 68%;
    height: 12px;
    width: 12px;
}

.bubble-five {
    animation-delay: 4.5s;
    animation-duration: 10s;
    left: 84%;
    height: 16px;
    width: 16px;
}

@keyframes submarine-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(-2deg);
    }

    50% {
        transform: translate3d(0, -14px, 0) rotate(2deg);
    }
}

@keyframes bubble-rise {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0);
    }

    12% {
        opacity: 0.85;
    }

    88% {
        opacity: 0.4;
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -120vh, 0);
    }
}

.games-page {
    min-height: calc(100vh - 76px);
}

.ocean-games-page,
.ocean-game-page {
    isolation: isolate;
    min-height: calc(100vh - 76px);
    position: relative;
}

.ocean-game-page::before {
    background:
        radial-gradient(circle at 18% 22%, rgba(125, 211, 252, 0.35) 0 2px, transparent 3px),
        radial-gradient(circle at 78% 16%, rgba(125, 211, 252, 0.28) 0 2px, transparent 3px),
        radial-gradient(circle at 60% 78%, rgba(125, 211, 252, 0.24) 0 2px, transparent 3px),
        linear-gradient(160deg, #071a3f 0%, #103b78 52%, #0284c7 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.ocean-games-page .game-card-link {
    background: rgba(7, 26, 63, 0.6);
    border-color: rgba(125, 211, 252, 0.45);
}

.ocean-games-page .game-card-link:hover {
    background: rgba(7, 26, 63, 0.75);
}

.ocean-coming-soon {
    align-items: center;
    background: rgba(7, 26, 63, 0.55);
    border: 1px solid rgba(125, 211, 252, 0.4);
    border-radius: 12px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    padding: 1.5rem;
}

.ocean-coming-soon-icon {
    align-items: center;
    aspect-ratio: 1;
    display: inline-flex;
    justify-content: center;
}

.ocean-coming-soon-icon img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.ocean-coming-soon-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.ocean-coming-soon-copy p:last-child {
    color: #dbeafe;
    line-height: 1.5;
    margin-bottom: 0;
}

.ocean-coming-soon-discreet {
    background: rgba(7, 26, 63, 0.4);
    border-color: rgba(125, 211, 252, 0.25);
    grid-template-columns: 2.75rem minmax(0, 1fr);
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
}

.ocean-coming-soon-discreet .ocean-coming-soon-copy p:last-child {
    color: #bfdbfe;
    font-size: 0.9rem;
}

.ocean-games-page .game-card-planet img {
    transform: none;
}

.games-intro {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.games-stage {
    align-items: center;
    display: grid;
    gap: clamp(1.25rem, 4vw, 3rem);
    grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
}

.games-character-scene {
    aspect-ratio: 1;
    min-height: 300px;
    position: relative;
}

.games-character {
    bottom: 0;
    display: block;
    left: 50%;
    max-height: 92%;
    max-width: 70%;
    object-fit: contain;
    position: absolute;
    transform: translateX(-50%);
    z-index: 2;
}

.games-orbit,
.games-planet {
    pointer-events: none;
    position: absolute;
}

.games-orbit {
    border: 2px dashed rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    inset: 9%;
    transform: rotate(-14deg);
}

.orbit-small {
    border-color: rgba(125, 211, 252, 0.32);
    inset: 22%;
    transform: rotate(18deg);
}

.games-planet {
    border-radius: 50%;
    box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.16);
    z-index: 1;
}

.games-planet-blue {
    background: #38bdf8;
    height: 16%;
    left: 8%;
    top: 24%;
    width: 16%;
}

.games-planet-orange {
    background: #ef6b4a;
    height: 12%;
    right: 8%;
    top: 18%;
    width: 12%;
}

.games-planet-purple {
    background: #a78bfa;
    bottom: 14%;
    height: 10%;
    right: 16%;
    width: 10%;
}

.games-list {
    display: grid;
    gap: 1rem;
}

.game-card-link {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 1rem;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    padding: 1rem;
    text-decoration: none;
}

.game-card-link:hover {
    background: rgba(45, 212, 191, 0.18);
    border-color: rgba(125, 211, 252, 0.55);
}

.game-card-planet {
    align-items: center;
    aspect-ratio: 1;
    background: transparent;
    border: 0;
    display: inline-flex;
    justify-content: center;
    overflow: visible;
    padding: 0.2rem;
}

.game-card-planet img {
    display: block;
    height: 100%;
    object-fit: contain;
    transform: rotate(45deg);
    width: 100%;
}

.game-card-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.game-card-title {
    color: #fde68a;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 900;
    line-height: 1.1;
}

.game-card-description {
    color: #dbeafe;
    line-height: 1.45;
}

.game-card-action {
    color: #67e8f9;
    font-weight: 900;
    margin-top: 0.25rem;
}

@keyframes sun-pulse {
    0%,
    100% {
        box-shadow: 0 0 42px rgba(255, 209, 102, 0.42);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 68px rgba(255, 209, 102, 0.68);
        transform: scale(1.05);
    }
}

@keyframes orbit-spin {
    to {
        transform: rotate(1turn);
    }
}

@keyframes planet-float-one {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(10%, -12%, 0);
    }
}

@keyframes planet-float-two {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(-12%, 10%, 0);
    }
}

@keyframes planet-float-three {
    0%,
    100% {
        filter: brightness(1);
        transform: translate3d(0, 0, 0);
    }

    50% {
        filter: brightness(1.08);
        transform: translate3d(8%, 14%, 0);
    }
}

@keyframes shooting-star {
    0%,
    68%,
    100% {
        opacity: 0;
        transform: rotate(18deg) translate3d(0, 0, 0);
    }

    72% {
        opacity: 0.85;
    }

    84% {
        opacity: 0;
        transform: rotate(18deg) translate3d(145vw, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero::before,
    .home-hero::after,
    .preview-sun,
    .preview-orbit,
    .preview-planet,
    .ocean-illustration img,
    .ocean-bubble,
    .theme-portal {
        animation: none;
        filter: none;
        transform: none;
    }

    .ocean-bubble {
        opacity: 0;
    }
}

.game-header {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.game-panel {
    display: grid;
    gap: 1rem;
}

.scorebar {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.scorebar span {
    background: rgba(7, 20, 39, 0.6);
    border-radius: 8px;
    min-width: 8rem;
    padding: 0.65rem 0.75rem;
}

.scorebar strong {
    color: #fde68a;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
}

.fact-box,
.finish-panel {
    background: #ecfeff;
    border: 3px solid #67e8f9;
    border-radius: 8px;
    color: #164e63;
    padding: 1rem;
}

.fact-box strong {
    color: #0f766e;
    display: block;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.fact-box p,
.finish-panel p {
    margin-bottom: 0;
}

.memory-grid {
    display: grid;
    gap: clamp(0.55rem, 1.8vw, 1rem);
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.memory-grid.is-large {
    gap: clamp(0.45rem, 1.2vw, 0.75rem);
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.memory-card {
    aspect-ratio: 0.78;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    perspective: 800px;
    width: 100%;
}

.memory-card:disabled {
    cursor: default;
}

.memory-card-inner {
    display: block;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 320ms ease;
    width: 100%;
}

.memory-card.is-open .memory-card-inner,
.memory-card.is-matched .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-face {
    align-items: center;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    inset: 0;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 0.65rem;
    position: absolute;
}

.memory-card-back {
    background:
        radial-gradient(circle at 28% 24%, #fff 0 2px, transparent 3px),
        radial-gradient(circle at 72% 66%, #fff 0 2px, transparent 3px),
        linear-gradient(160deg, #312e81, #0f766e);
    border: 3px solid #93c5fd;
}

.card-star {
    align-items: center;
    background: #ffd166;
    border-radius: 50%;
    color: #172554;
    display: inline-flex;
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    font-weight: 900;
    height: 46%;
    justify-content: center;
    width: 46%;
}

.memory-card-front {
    background: #fff7ed;
    border: 3px solid #fde68a;
    color: #172554;
    font-weight: 900;
    transform: rotateY(180deg);
}

.memory-card-front img {
    display: block;
    height: min(62%, 6.5rem);
    max-width: 88%;
    object-fit: contain;
}

.memory-card-front span {
    font-size: clamp(0.74rem, 1.6vw, 1rem);
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

.memory-card.is-matched .memory-card-front {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.25), 0 10px 22px rgba(0, 0, 0, 0.24);
}

.finish-panel {
    margin: 1rem auto 0;
    max-width: 680px;
    text-align: center;
}

.finish-panel h2 {
    color: #0f766e;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.finish-panel .restart-button {
    margin-top: 1rem;
}

.memory-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 780px;
    text-align: left;
}

.memory-finish-copy {
    min-width: 0;
}

.memory-finish-panel h2 {
    color: #fde68a;
}

.memory-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.memory-finish-panel strong {
    color: #ffffff;
}

.memory-finish-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

.memory-settings {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.memory-settings strong {
    color: #fde68a;
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.memory-levels {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.memory-level-button {
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 0.3rem;
    min-height: 4.8rem;
    padding: 0.75rem;
    text-align: left;
}

.memory-level-button span {
    color: #fde68a;
    font-weight: 900;
    line-height: 1.1;
}

.memory-level-button small {
    color: #dbeafe;
    font-size: 0.9rem;
    line-height: 1.25;
}

.memory-level-button:hover,
.memory-level-button.is-selected {
    background: rgba(45, 212, 191, 0.2);
    border-color: #fde68a;
}

.reading-start-panel,
.reading-question-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: clamp(1rem, 4vw, 2rem);
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.reading-start-panel h2,
.reading-question-content h2 {
    color: #fde68a;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.reading-start-panel p {
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.55;
    max-width: 36rem;
}

.reading-start-panel img {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

.reading-game-panel {
    display: grid;
    gap: 1rem;
}

.reading-progress span {
    min-width: 9rem;
}

.reading-visual {
    align-items: center;
    aspect-ratio: 1;
    background: #fff7ed;
    border: 3px solid #fde68a;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 14rem;
    padding: 1rem;
}

.reading-visual img {
    display: block;
    height: min(100%, 16rem);
    object-fit: contain;
    width: min(100%, 16rem);
}

.reading-question-content {
    min-width: 0;
}

.reading-options {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.reading-option {
    background: #ecfeff;
    border: 3px solid #67e8f9;
    border-radius: 8px;
    color: #164e63;
    cursor: pointer;
    font: inherit;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 900;
    min-height: 4.25rem;
    overflow-wrap: anywhere;
    padding: 0.8rem;
}

.reading-option:hover:not(:disabled),
.reading-option.is-selected {
    background: #cffafe;
    border-color: #fde68a;
}

.reading-option.is-correct {
    background: #dcfce7;
    border-color: #34d399;
    color: #14532d;
}

.reading-option:disabled {
    cursor: default;
}

.reading-feedback {
    border-radius: 8px;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 900;
    line-height: 1.35;
    margin-top: 1rem;
    min-height: 3.5rem;
    padding: 0.9rem 1rem;
}

.reading-feedback.is-success {
    background: #dcfce7;
    border: 2px solid #34d399;
    color: #14532d;
}

.reading-feedback.is-try-again {
    background: #fef9c3;
    border: 2px solid #fde68a;
    color: #713f12;
}

.reading-next-button {
    margin-top: 1rem;
}

.reading-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 780px;
    text-align: left;
}

.reading-finish-copy {
    min-width: 0;
}

.reading-finish-panel h2 {
    color: #fde68a;
}

.reading-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.reading-finish-panel strong {
    color: #ffffff;
}

.reading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-top: 1rem;
}

.reading-actions .restart-button,
.reading-actions .primary-link {
    margin-top: 0;
}

.secondary-link {
    background: #ecfeff;
    color: #164e63;
}

.secondary-link:hover {
    background: #cffafe;
}

.reading-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

.puzzle-game-panel {
    display: grid;
    gap: 1rem;
    position: relative;
}

.puzzle-progress span:first-child {
    flex: 1 1 14rem;
}

.puzzle-settings {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    padding: 1rem;
}

.puzzle-settings strong {
    color: #fde68a;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.puzzle-selector {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.puzzle-select-button {
    align-items: center;
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: pointer;
    display: grid;
    font: inherit;
    font-weight: 900;
    gap: 0.35rem;
    justify-items: center;
    min-height: 4.5rem;
    min-width: 0;
    padding: 0.55rem;
    text-align: center;
}

.puzzle-select-button img {
    display: block;
    height: 2.6rem;
    object-fit: contain;
    width: 2.6rem;
}

.puzzle-select-button small {
    color: #bae6fd;
    font-size: 0.74rem;
    font-weight: 900;
}

.puzzle-select-button:hover,
.puzzle-select-button.is-selected {
    background: rgba(45, 212, 191, 0.2);
    border-color: #fde68a;
}

.puzzle-levels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.puzzle-layout {
    align-items: start;
    display: grid;
    gap: clamp(1rem, 4vw, 2rem);
    grid-template-columns: minmax(18rem, 30rem) minmax(16rem, 1fr);
}

.puzzle-board {
    aspect-ratio: 1;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(var(--puzzle-grid-size), minmax(0, 1fr));
    margin: 0 auto;
    max-width: 30rem;
    width: 100%;
}

.puzzle-slot {
    align-items: center;
    aspect-ratio: 1;
    background: rgba(236, 254, 255, 0.14);
    border: 3px dashed rgba(125, 211, 252, 0.72);
    border-radius: 8px;
    color: #dbeafe;
    cursor: pointer;
    display: flex;
    font: inherit;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    touch-action: none;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.puzzle-slot.is-drop-target {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.puzzle-slot.is-filled {
    background: #fff7ed;
    border-color: #34d399;
    border-style: solid;
    cursor: default;
}

.puzzle-slot:hover:not(.is-filled) {
    transform: translateY(-2px);
}

.puzzle-slot-number {
    align-items: center;
    background: rgba(7, 20, 39, 0.68);
    border-radius: 50%;
    color: #fde68a;
    display: inline-flex;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 900;
    height: 3.3rem;
    justify-content: center;
    width: 3.3rem;
}

.puzzle-tray {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.35rem);
}

.puzzle-tray h2 {
    color: #fde68a;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.1;
    margin-bottom: 0;
}

.puzzle-pieces {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(var(--puzzle-grid-size), minmax(0, 1fr));
}

.puzzle-piece {
    aspect-ratio: 1;
    background: #fff7ed;
    border: 3px solid #fde68a;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(7, 20, 39, 0.28);
    cursor: grab;
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    touch-action: none;
    transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
    width: 100%;
}

.puzzle-piece:active {
    cursor: grabbing;
}

.puzzle-piece.is-selected {
    border-color: #67e8f9;
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.24), 0 12px 24px rgba(7, 20, 39, 0.28);
}

.puzzle-piece.is-dragging {
    opacity: 0.35;
    transform: scale(0.96);
}

.puzzle-piece-image {
    background-repeat: no-repeat;
    background-size: 200% 200%;
    display: block;
    height: 100%;
    width: 100%;
}

.puzzle-drag-ghost {
    border: 3px solid #67e8f9;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(7, 20, 39, 0.34);
    display: block;
    height: min(28vw, 10rem);
    max-height: 10rem;
    max-width: 10rem;
    min-height: 6rem;
    min-width: 6rem;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, -50%);
    width: min(28vw, 10rem);
    z-index: 30;
}

.puzzle-feedback {
    border-radius: 8px;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 900;
    line-height: 1.35;
    min-height: 3.4rem;
    padding: 0.9rem 1rem;
}

.puzzle-feedback.is-success {
    background: #dcfce7;
    border: 2px solid #34d399;
    color: #14532d;
}

.puzzle-feedback.is-try-again {
    background: #fef9c3;
    border: 2px solid #fde68a;
    color: #713f12;
}

.puzzle-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 820px;
    text-align: left;
}

.puzzle-finish-panel h2 {
    color: #fde68a;
}

.puzzle-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.puzzle-finish-copy {
    min-width: 0;
}

.puzzle-complete-image {
    align-items: center;
    aspect-ratio: 1;
    background: #fff7ed;
    border: 3px solid #fde68a;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    margin: 1rem 0 0;
    max-width: 13rem;
    padding: 0.75rem;
}

.puzzle-complete-image img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.puzzle-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

.solar-order-start-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: clamp(1rem, 4vw, 2rem);
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 16rem);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.solar-order-start-panel h2,
.solar-order-track-panel h2,
.solar-order-tray h2 {
    color: #fde68a;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.solar-order-levels {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.solar-order-level-card {
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 0.4rem;
    min-height: 8rem;
    padding: 1rem;
    text-align: left;
}

.solar-order-level-card span {
    color: #fde68a;
    font-size: clamp(1.2rem, 2.5vw, 1.65rem);
    font-weight: 900;
    line-height: 1.1;
}

.solar-order-level-card small {
    color: #dbeafe;
    font-size: 0.98rem;
    line-height: 1.35;
}

.solar-order-level-card:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: #fde68a;
}

.solar-order-start-sun {
    display: block;
    justify-self: center;
    max-height: 15rem;
    max-width: 100%;
    object-fit: contain;
}

.solar-order-game-panel {
    display: grid;
    gap: 1rem;
    position: relative;
}

.solar-order-progress span:first-child {
    flex: 1 1 14rem;
}

.solar-order-layout {
    display: grid;
    gap: clamp(1rem, 4vw, 1.5rem);
    min-width: 0;
}

.solar-order-track-panel,
.solar-order-tray {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    min-width: 0;
    padding: clamp(1rem, 3vw, 1.35rem);
}

.solar-order-track-panel {
    overflow: hidden;
}

.solar-order-track-panel h2,
.solar-order-tray h2 {
    margin-bottom: 0.9rem;
}

.solar-order-track {
    aspect-ratio: 1.25;
    display: block;
    margin: 0 auto;
    max-height: 38rem;
    max-width: min(100%, 54rem);
    min-width: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.solar-order-sun-anchor,
.solar-order-slot {
    align-items: center;
    display: grid;
    justify-items: center;
    min-width: 0;
    position: absolute;
}

.solar-order-sun-anchor {
    color: #fde68a;
    font-weight: 900;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.solar-order-sun-anchor img {
    display: block;
    height: 5.6rem;
    object-fit: contain;
    width: 5.6rem;
}

.solar-order-sun-anchor span,
.solar-order-placed-astro span,
.solar-order-astro span,
.solar-order-drag-ghost span {
    font-weight: 900;
    line-height: 1.1;
    overflow-wrap: anywhere;
    text-align: center;
}

.solar-order-slot {
    background: transparent;
    border: 0;
    color: #dbeafe;
    cursor: pointer;
    font: inherit;
    left: var(--slot-x);
    min-height: 6.2rem;
    min-width: 6.4rem;
    overflow: visible;
    padding: 0;
    top: var(--slot-y);
    touch-action: none;
    transform: translate(-50%, -50%);
    transition: transform 160ms ease;
    z-index: 3;
}

.solar-order-slot.is-drop-target {
    background: transparent;
}

.solar-order-slot.is-filled {
    background: transparent;
    cursor: default;
}

.solar-order-slot:hover:not(.is-filled) {
    transform: translate(-50%, -52%);
}

.solar-order-orbit-guides {
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.solar-order-orbit-guides span {
    border: 2px dashed rgba(103, 232, 249, 0.26);
    border-radius: 50%;
    height: var(--orbit-size);
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    width: var(--orbit-size);
}

.solar-order-track.is-explorer .solar-order-orbit-guides span {
    border-color: rgba(103, 232, 249, 0.18);
}

.solar-order-slot-number {
    align-items: center;
    background: rgba(7, 20, 39, 0.72);
    border: 2px dashed rgba(125, 211, 252, 0.72);
    border-radius: 50%;
    color: #fde68a;
    display: inline-flex;
    font-size: 1.25rem;
    font-weight: 900;
    height: 2.8rem;
    justify-content: center;
    width: 2.8rem;
    z-index: 1;
}

.solar-order-slot.is-drop-target .solar-order-slot-number,
.solar-order-slot.is-select-target .solar-order-slot-number {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.solar-order-placed-astro,
.solar-order-astro,
.solar-order-drag-ghost {
    align-items: center;
    display: grid;
    gap: 0.25rem;
    justify-items: center;
    min-width: 0;
}

.solar-order-placed-astro {
    color: #f8fafc;
    position: relative;
    z-index: 1;
}

.solar-order-placed-astro img,
.solar-order-astro img,
.solar-order-drag-ghost img {
    display: block;
    object-fit: contain;
}

.solar-order-placed-astro img {
    height: 4.6rem;
    width: 4.6rem;
}

.solar-order-tray {
    display: grid;
    gap: 0.85rem;
}

.solar-order-astros {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
}

.solar-order-astro {
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: grab;
    font: inherit;
    min-height: 7.4rem;
    min-width: 0;
    padding: 0.55rem;
    touch-action: none;
    transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.solar-order-astro img {
    height: 4.2rem;
    width: 4.2rem;
}

.solar-order-astro:active {
    cursor: grabbing;
}

.solar-order-astro:hover,
.solar-order-astro.is-selected {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.solar-order-astro.is-selected {
    box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.22);
}

.solar-order-astro.is-dragging {
    opacity: 0.35;
    transform: scale(0.96);
}

.solar-order-drag-ghost {
    background: rgba(7, 20, 39, 0.82);
    border: 2px solid #67e8f9;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(7, 20, 39, 0.34);
    color: #f8fafc;
    min-height: 6.7rem;
    min-width: 6.7rem;
    padding: 0.55rem;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 30;
}

.solar-order-drag-ghost img {
    height: 4.6rem;
    width: 4.6rem;
}

.solar-order-feedback {
    border-radius: 8px;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 900;
    line-height: 1.35;
    min-height: 3.4rem;
    padding: 0.9rem 1rem;
}

.solar-order-feedback.is-success {
    background: #dcfce7;
    border: 2px solid #34d399;
    color: #14532d;
}

.solar-order-feedback.is-try-again {
    background: #fef9c3;
    border: 2px solid #fde68a;
    color: #713f12;
}

.solar-order-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 960px;
    text-align: left;
}

.solar-order-finish-panel h2 {
    color: #fde68a;
}

.solar-order-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.solar-order-finish-panel strong {
    color: #ffffff;
}

.solar-order-finish-copy {
    min-width: 0;
}

.solar-order-complete-image {
    align-items: center;
    background: rgba(7, 20, 39, 0.36);
    border: 2px solid rgba(125, 211, 252, 0.5);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 0.75rem;
}

.solar-order-complete-image img {
    display: block;
    min-width: min(44rem, 100%);
    object-fit: contain;
    width: 100%;
}

.solar-order-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

.simple-page {
    min-height: 55vh;
}

/* ── Planet Mystery ──────────────────────────────────────── */

.mystery-start-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: clamp(1rem, 4vw, 2rem);
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 14rem);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.mystery-start-panel h2 {
    color: #fde68a;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.mystery-start-panel p {
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.mystery-start-panel img {
    display: block;
    justify-self: center;
    max-height: 14rem;
    max-width: 100%;
    object-fit: contain;
}

.mystery-game-panel {
    display: grid;
    gap: 1rem;
}

.mystery-progress span:first-child {
    flex: 1 1 10rem;
}

.mystery-layout {
    display: grid;
    gap: clamp(1rem, 4vw, 1.5rem);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mystery-planet-reveal {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.mystery-planet-image-wrap {
    display: grid;
    justify-items: center;
    position: relative;
}

.mystery-planet-image {
    display: block;
    height: clamp(10rem, 22vw, 18rem);
    object-fit: contain;
    transition: filter 500ms ease;
    width: clamp(10rem, 22vw, 18rem);
}

.mystery-planet-name {
    color: #fde68a;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    margin-top: 0.75rem;
    text-align: center;
}

.mystery-clues {
    color: #dbeafe;
    display: grid;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    gap: 0.6rem;
    line-height: 1.45;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mystery-clues li {
    background: rgba(7, 20, 39, 0.42);
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-left: 3px solid #67e8f9;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
}

.mystery-interaction {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.mystery-question {
    color: #fde68a;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.1;
}

.mystery-options {
    display: grid;
    gap: 0.65rem;
}

.mystery-option {
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: pointer;
    font: inherit;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 700;
    padding: 0.7rem 1rem;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease;
}

.mystery-option:hover:not(:disabled) {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.mystery-option.is-selected {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.mystery-option.is-correct {
    background: #dcfce7;
    border-color: #34d399;
    color: #14532d;
}

.mystery-option:disabled {
    cursor: default;
    opacity: 0.6;
}

.mystery-option.is-correct:disabled {
    opacity: 1;
}

.mystery-feedback {
    border-radius: 8px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 900;
    line-height: 1.35;
    padding: 0.75rem 1rem;
}

.mystery-feedback.is-success {
    background: #dcfce7;
    border: 2px solid #34d399;
    color: #14532d;
}

.mystery-feedback.is-try-again {
    background: #fef9c3;
    border: 2px solid #fde68a;
    color: #713f12;
}

.mystery-fact {
    background: rgba(7, 20, 39, 0.42);
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 8px;
    color: #dbeafe;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.5;
    padding: 0.75rem 1rem;
}

.mystery-fact strong {
    color: #fde68a;
}

.mystery-clue-button {
    background: rgba(7, 20, 39, 0.54);
    border: 2px dashed rgba(125, 211, 252, 0.55);
    border-radius: 8px;
    color: #dbeafe;
    cursor: pointer;
    font: inherit;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 700;
    padding: 0.7rem 1rem;
    text-align: center;
    transition: background 160ms ease, border-color 160ms ease;
}

.mystery-clue-button:hover {
    background: rgba(45, 212, 191, 0.14);
    border-color: #67e8f9;
    color: #f8fafc;
}

.mystery-next-button {
    justify-self: start;
}

.mystery-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 960px;
}

.mystery-finish-panel h2 {
    color: #fde68a;
}

.mystery-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.45;
    margin-bottom: 0.5rem;
}

.mystery-finish-copy {
    min-width: 0;
}

.mystery-discovered {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.25rem 0;
}

.mystery-discovered-planet {
    align-items: center;
    display: grid;
    gap: 0.35rem;
    justify-items: center;
}

.mystery-discovered-planet img {
    display: block;
    height: 5rem;
    object-fit: contain;
    width: 5rem;
}

.mystery-discovered-planet span {
    color: #fde68a;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: center;
}

.mystery-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

/* ── Planet Size Order ───────────────────────────────────── */

.size-order-start-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: clamp(1rem, 4vw, 2rem);
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 16rem);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.size-order-start-panel h2 {
    color: #fde68a;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.size-order-start-planet {
    display: block;
    justify-self: center;
    max-height: 15rem;
    max-width: 100%;
    object-fit: contain;
}

.size-order-game-panel {
    display: grid;
    gap: 1rem;
    position: relative;
}

.size-order-layout {
    display: grid;
    gap: clamp(1rem, 4vw, 1.5rem);
    min-width: 0;
}

.size-order-track-panel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 1.35rem);
}

.size-order-track-panel h2 {
    color: #fde68a;
    font-size: clamp(1.1rem, 2.5vw, 1.55rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.size-order-track {
    align-items: flex-end;
    display: flex;
    gap: clamp(0.4rem, 1.5vw, 0.75rem);
    min-height: 8rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 0.75rem;
}

.size-order-slot {
    align-items: center;
    background: transparent;
    border: 0;
    color: #dbeafe;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    font: inherit;
    gap: 0.35rem;
    min-width: calc(var(--slot-indicator-size, 4rem) + 0.4rem);
    padding: 0;
    touch-action: none;
    transition: transform 160ms ease;
}

.size-order-slot:hover:not(.is-filled) {
    transform: translateY(-4px);
}

.size-order-slot-indicator {
    background: rgba(7, 20, 39, 0.72);
    border: 2px dashed rgba(125, 211, 252, 0.72);
    border-radius: 50%;
    height: var(--slot-indicator-size, 4rem);
    width: var(--slot-indicator-size, 4rem);
}

.size-order-slot.is-drop-target .size-order-slot-indicator,
.size-order-slot.is-select-target .size-order-slot-indicator {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.size-order-slot-number {
    color: #fde68a;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    font-weight: 900;
    text-align: center;
}

.size-order-placed-astro {
    align-items: center;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 1;
}

.size-order-placed-astro img {
    display: block;
    height: 4.2rem;
    object-fit: contain;
    width: 4.2rem;
}

.size-order-placed-astro span {
    font-size: 0.78rem;
    font-weight: 900;
    overflow-wrap: anywhere;
    text-align: center;
}

.size-order-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 960px;
    text-align: left;
}

.size-order-finish-panel h2 {
    color: #fde68a;
}

.size-order-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.size-order-finish-panel strong {
    color: #ffffff;
}

.size-order-finish-copy {
    min-width: 0;
}

.size-order-finish-parade {
    align-items: flex-end;
    background: rgba(7, 20, 39, 0.36);
    border: 2px solid rgba(125, 211, 252, 0.5);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
}

.size-order-finish-planet {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 2rem;
}

.size-order-finish-planet img {
    display: block;
    object-fit: contain;
}

.size-order-finish-planet span {
    color: #dbeafe;
    font-size: 0.65rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-align: center;
}

.size-order-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

/* ── Day and Night ───────────────────────────────────────── */

.day-night-stage {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1.5rem;
}

.day-night-instruction {
    color: #dbeafe;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.day-night-discovery-area {
    min-height: 2.6rem;
    text-align: center;
}

.day-night-discovery {
    animation: day-night-fade-in 300ms ease;
    background: rgba(253, 230, 138, 0.15);
    border: 1px solid rgba(253, 230, 138, 0.55);
    border-radius: 8px;
    color: #fde68a;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 900;
    margin: 0;
    padding: 0.45rem 1.25rem;
}

@keyframes day-night-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.day-night-arena {
    --planet-size: min(14rem, 42vw);
    --sun-size: min(3rem, 9vw);
    --orbit-radius: min(11rem, 33vw);
    aspect-ratio: 1 / 1;
    cursor: default;
    margin: 0 auto;
    max-width: min(30rem, 96vw);
    position: relative;
    touch-action: none;
    user-select: none;
    width: 100%;
}

.day-night-arena.is-interactive {
    cursor: grab;
}

.day-night-planet-wrap {
    border-radius: 50%;
    height: var(--planet-size);
    left: 50%;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--planet-size);
}

.day-night-planet-img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.day-night-overlay {
    background: conic-gradient(
        from calc(var(--sun-angle, 0) * 1deg),
        transparent 0deg 155deg,
        rgba(0, 5, 20, 0.55) 175deg,
        rgba(0, 5, 20, 0.88) 205deg 360deg
    );
    border-radius: 50%;
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.day-night-sun {
    --sun-size: min(3rem, 9vw);
    background: radial-gradient(
        circle,
        #fff9c4 0%,
        #fde68a 30%,
        #fbbf24 60%,
        rgba(245, 158, 11, 0) 100%
    );
    border-radius: 50%;
    box-shadow:
        0 0 clamp(0.75rem, 3vw, 1.25rem) clamp(0.4rem, 1.5vw, 0.65rem) rgba(253, 230, 138, 0.55),
        0 0 clamp(1.5rem, 5vw, 2.5rem) clamp(0.75rem, 2.5vw, 1.25rem) rgba(251, 191, 36, 0.28);
    height: var(--sun-size);
    left: calc(50% - var(--sun-size) / 2);
    pointer-events: none;
    position: absolute;
    top: calc(50% - var(--sun-size) / 2);
    transform: rotate(calc(var(--sun-angle, 0) * 1deg)) translateX(var(--orbit-radius));
    width: var(--sun-size);
}

.day-night-selector {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.day-night-planet-btn {
    align-items: center;
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 0.3rem;
    min-width: 5.5rem;
    padding: 0.6rem 0.75rem;
    transition: border-color 160ms ease, background 160ms ease;
}

.day-night-planet-btn img {
    display: block;
    height: 3rem;
    object-fit: contain;
    width: 3rem;
}

.day-night-planet-btn span {
    font-size: 0.85rem;
    font-weight: 700;
}

.day-night-planet-btn:hover,
.day-night-planet-btn.is-selected {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.day-night-planet-btn.is-selected {
    box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.22);
}

.simple-page h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #fecaca;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro.";
}

/* ── Decolar com as Letras ─────────────────────────────────────────────── */

.rocket-word-page .game-header {
    margin-bottom: 1.25rem;
}

.rocket-word-start-panel {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr auto;
    margin: 0 auto;
    max-width: 52rem;
}

.rocket-word-start-rocket {
    height: 12rem;
    opacity: 0.85;
    width: auto;
}

.rocket-word-game-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
    max-width: 52rem;
}

.rocket-word-progress {
    align-items: center;
    flex-wrap: wrap;
}

.rocket-word-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    padding: 0.25rem 0;
}

.rocket-word-slot {
    align-items: center;
    background: rgba(255 255 255 / 0.06);
    border-bottom: 3px solid var(--color-primary, #6c8cff);
    border-radius: 6px 6px 0 0;
    color: var(--color-text-primary, #fff);
    display: flex;
    font-size: 1.75rem;
    font-weight: 700;
    height: 3rem;
    justify-content: center;
    letter-spacing: 0.05em;
    min-width: 2.4rem;
    padding: 0 0.15rem;
    transition: background 200ms ease, color 200ms ease;
}

.rocket-word-slot.is-filled {
    background: rgba(108 140 255 / 0.18);
    border-bottom-color: #a5b4fc;
    color: #c7d2fe;
}

/* Launch scene */

.rocket-launch-scene {
    align-items: flex-end;
    display: flex;
    gap: 0;
    justify-content: center;
    position: relative;
}

.rocket-launch-rocket-wrap {
    bottom: 17.33%;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    z-index: 200;
}

.rocket-launch-rocket {
    display: block;
    height: 9rem;
    transition: opacity 200ms ease;
    width: auto;
}

.rocket-launch-pad {
    display: block;
    width: 100%;
    max-width: 28rem;
}

@keyframes rocket-vibrate {
    0%, 100% { transform: translateX(-50%) translateX(0) rotate(0deg); }
    20%       { transform: translateX(-50%) translateX(-2px) rotate(-1deg); }
    40%       { transform: translateX(-50%) translateX(2px) rotate(1deg); }
    60%       { transform: translateX(-50%) translateX(-3px) rotate(-1deg); }
    80%       { transform: translateX(-50%) translateX(3px) rotate(1deg); }
}

@keyframes rocket-liftoff {
    0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateX(-50%) translateY(-120vh); opacity: 0; }
}

.rocket-launch-rocket.is-vibrating {
    animation: rocket-vibrate 0.12s linear infinite;
}

.rocket-launch-rocket.is-launching {
    animation: rocket-liftoff 1.5s cubic-bezier(0.25, 0, 0.6, 1) forwards;
}

/* Planet preview */

.rocket-planet-wrap {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0 auto;
}

.rocket-planet-img {
    height: 8rem;
    object-fit: contain;
    transition: filter 400ms ease;
    width: 8rem;
}

.rocket-planet-hint {
    color: var(--color-text-secondary, #94a3b8);
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

/* Keyboard */

.rocket-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem 0;
}

.rocket-key {
    align-items: center;
    background: rgba(255 255 255 / 0.08);
    border: 2px solid rgba(255 255 255 / 0.15);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 700;
    height: 3.2rem;
    justify-content: center;
    min-width: 3.2rem;
    padding: 0 0.5rem;
    transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

.rocket-key:hover:not(:disabled) {
    background: rgba(108 140 255 / 0.25);
    border-color: rgba(108 140 255 / 0.6);
    transform: translateY(-2px);
}

.rocket-key:active:not(:disabled) {
    transform: translateY(0);
}

.rocket-key.is-used {
    background: rgba(255 255 255 / 0.03);
    border-color: rgba(255 255 255 / 0.06);
    color: rgba(255 255 255 / 0.2);
    cursor: default;
}

.rocket-key.is-wrong {
    animation: shake 0.35s ease;
    background: rgba(248 113 113 / 0.2);
    border-color: rgba(248 113 113 / 0.6);
    color: #fca5a5;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-4px); }
    40%       { transform: translateX(4px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* Finish panel */

.rocket-word-finish-panel {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr auto;
    margin: 0 auto;
    max-width: 52rem;
    text-align: left;
}

.rocket-word-finish-copy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rocket-word-finish-planets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rocket-word-finish-planet {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
}

.rocket-word-finish-planet img {
    height: 3.5rem;
    object-fit: contain;
    width: 3.5rem;
}

.rocket-word-finish-planet span {
    color: var(--color-text-secondary, #94a3b8);
    font-size: 0.75rem;
}

.rocket-word-mascot {
    height: 18rem;
    width: auto;
}

/* ── End Decolar com as Letras ──────────────────────────────────────────── */

/* ── Cada Coisa no Seu Lugar ─────────────────────────────── */

.celestial-game-panel {
    display: grid;
    gap: 1rem;
    position: relative;
}

.celestial-progress span:first-child {
    flex: 1 1 14rem;
}

.celestial-feedback {
    border-radius: 8px;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 900;
    line-height: 1.35;
    min-height: 3.4rem;
    padding: 0.9rem 1rem;
}

.celestial-feedback.is-success {
    background: #dcfce7;
    border: 2px solid #34d399;
    color: #14532d;
}

.celestial-feedback.is-try-again {
    background: #fef9c3;
    border: 2px solid #fde68a;
    color: #713f12;
}

.celestial-tray {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    padding: clamp(1rem, 3vw, 1.5rem);
    text-align: center;
}

.celestial-tray h2 {
    color: #fde68a;
    font-size: clamp(1.1rem, 2.5vw, 1.55rem);
    line-height: 1.1;
    margin-bottom: 0;
}

.celestial-current-card {
    align-items: center;
    background: rgba(7, 20, 39, 0.54);
    border: 2px solid rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: grab;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 0.35rem;
    min-height: 9rem;
    min-width: 9rem;
    padding: 0.75rem;
    touch-action: none;
    transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.celestial-current-card img {
    height: 5.4rem;
    width: 5.4rem;
}

.celestial-current-card span {
    font-size: 0.9rem;
    font-weight: 900;
    text-align: center;
}

.celestial-current-card:active {
    cursor: grabbing;
}

.celestial-current-card:hover,
.celestial-current-card.is-selected {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.celestial-current-card.is-selected {
    box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.22);
}

.celestial-current-card.is-dragging {
    opacity: 0.35;
    transform: scale(0.96);
}

.celestial-drag-ghost {
    align-items: center;
    background: rgba(7, 20, 39, 0.82);
    border: 2px solid #67e8f9;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(7, 20, 39, 0.34);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 7rem;
    min-width: 7rem;
    padding: 0.55rem;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 30;
}

.celestial-drag-ghost img {
    height: 4.2rem;
    width: 4.2rem;
}

.celestial-drag-ghost span {
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.celestial-categories {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.celestial-category {
    background: rgba(7, 20, 39, 0.54);
    border: 2px dashed rgba(125, 211, 252, 0.45);
    border-radius: 8px;
    color: #f8fafc;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 0.5rem;
    min-height: 8rem;
    padding: 0.75rem;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease;
}

.celestial-category:hover,
.celestial-category.is-drop-target {
    background: rgba(45, 212, 191, 0.18);
    border-color: #fde68a;
}

.celestial-category-name {
    color: #fde68a;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
}

.celestial-category-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.celestial-category-card {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 3rem;
}

.celestial-category-card img {
    height: 2.2rem;
    object-fit: contain;
    width: 2.2rem;
}

.celestial-category-card span {
    font-size: 0.6rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-align: center;
}

.celestial-finish-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 45px rgba(7, 20, 39, 0.24);
    color: #f8fafc;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    max-width: 780px;
    text-align: left;
}

.celestial-finish-panel h2 {
    color: #fde68a;
}

.celestial-finish-panel p {
    color: #dbeafe;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.celestial-finish-copy {
    min-width: 0;
}

.celestial-mascot {
    display: block;
    justify-self: center;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

/* ── End Cada Coisa no Seu Lugar ─────────────────────────── */

@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .games-stage {
        grid-template-columns: 1fr;
    }

    .games-character-scene {
        margin: 0 auto;
        max-width: 420px;
        min-height: 260px;
        width: 100%;
    }

    .orbit-preview {
        min-height: 240px;
        order: -1;
    }

    .memory-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .memory-grid.is-large {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .game-header {
        align-items: start;
        flex-direction: column;
    }

    .memory-finish-panel,
    .reading-start-panel,
    .reading-question-card,
    .reading-finish-panel,
    .solar-order-start-panel,
    .solar-order-finish-panel,
    .puzzle-settings,
    .puzzle-layout,
    .puzzle-finish-panel,
    .mystery-start-panel,
    .mystery-layout,
    .mystery-finish-panel,
    .size-order-start-panel,
    .size-order-finish-panel,
    .celestial-finish-panel {
        grid-template-columns: 1fr;
    }

    .celestial-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reading-question-card {
        align-items: stretch;
    }

    .reading-visual {
        margin: 0 auto;
        max-width: 18rem;
        width: 100%;
    }

    .memory-finish-panel,
    .reading-finish-panel,
    .solar-order-finish-panel,
    .puzzle-finish-panel,
    .mystery-finish-panel,
    .size-order-finish-panel,
    .celestial-finish-panel {
        text-align: center;
    }

    .reading-actions {
        justify-content: center;
    }

    .puzzle-complete-image {
        margin-left: auto;
        margin-right: auto;
    }

    .solar-order-complete-image {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .ocean-hero-inner {
        grid-template-columns: 1fr;
    }

    .ocean-illustration {
        min-height: 240px;
        order: -1;
    }

    .ocean-anchor,
    .ocean-coral {
        display: none;
    }
}

@media (max-width: 560px) {
    .mystery-planet-image {
        height: clamp(10rem, 55vw, 16rem);
        width: clamp(10rem, 55vw, 16rem);
    }

    .mystery-planet-reveal {
        padding: 1rem;
    }

    .mystery-interaction {
        padding: 1rem;
    }

    .games-character-scene {
        min-height: 220px;
    }

    .games-orbit,
    .games-planet {
        display: none;
    }

    .games-character {
        max-width: 58%;
    }

    .game-card-link {
        align-items: start;
        grid-template-columns: 4.25rem minmax(0, 1fr);
    }

    .memory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .memory-grid.is-large {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scorebar {
        align-items: stretch;
        flex-direction: column;
    }

    .scorebar span {
        min-width: 0;
    }

    .reading-options {
        grid-template-columns: 1fr;
    }

    .puzzle-board {
        gap: 0.4rem;
    }

    .puzzle-selector,
    .puzzle-levels {
        grid-template-columns: 1fr;
    }

    .memory-levels {
        grid-template-columns: 1fr;
    }

    .solar-order-levels {
        grid-template-columns: 1fr;
    }

    .solar-order-tray {
        overflow: hidden;
        padding: 0.75rem;
        position: relative;
    }

    .solar-order-tray::before,
    .solar-order-tray::after {
        bottom: 0;
        content: "";
        opacity: 0;
        pointer-events: none;
        position: absolute;
        top: 0;
        transition: opacity 200ms ease;
        width: 3.5rem;
        z-index: 1;
    }

    .solar-order-tray::before {
        background: linear-gradient(to left, transparent, rgba(7, 20, 39, 0.82));
        left: 0;
    }

    .solar-order-tray::after {
        background: linear-gradient(to right, transparent, rgba(7, 20, 39, 0.82));
        right: 0;
    }

    .solar-order-tray.has-scroll-left::before,
    .solar-order-tray.has-scroll-right::after {
        opacity: 1;
    }

    .solar-order-tray h2 {
        font-size: 1.15rem;
        margin-bottom: 0.55rem;
    }

    .solar-order-sun-anchor img {
        height: 3.2rem;
        width: 3.2rem;
    }

    .solar-order-slot {
        min-height: 3.8rem;
        min-width: 4rem;
    }

    .solar-order-slot-number {
        font-size: 0.85rem;
        height: 1.8rem;
        width: 1.8rem;
    }

    .solar-order-placed-astro img {
        height: 2.8rem;
        width: 2.8rem;
    }

    .solar-order-astros {
        display: flex;
        gap: 0.55rem;
        margin: 0 -0.25rem;
        overflow-x: auto;
        padding: 0.25rem;
        scroll-snap-type: x proximity;
    }

    .solar-order-astro {
        align-content: center;
        flex: 0 0 5.5rem;
        min-height: 6.5rem;
        padding: 0.55rem 0.45rem;
        scroll-snap-align: start;
        touch-action: manipulation;
    }

    .solar-order-astro img {
        height: 3.2rem;
        width: 3.2rem;
    }

    .memory-finish-mascot,
    .reading-start-panel img,
    .reading-mascot,
    .solar-order-start-sun,
    .solar-order-mascot,
    .size-order-mascot,
    .puzzle-mascot,
    .celestial-mascot {
        max-height: 10rem;
    }

    .celestial-categories {
        grid-template-columns: 1fr;
    }

    .celestial-current-card img {
        height: 4rem;
        width: 4rem;
    }

    .celestial-category-card img {
        height: 1.8rem;
        width: 1.8rem;
    }

    .size-order-track {
        gap: 0.35rem;
    }

    .size-order-slot-indicator {
        height: calc(var(--slot-indicator-size, 4rem) * 0.72);
        width: calc(var(--slot-indicator-size, 4rem) * 0.72);
    }

    .size-order-placed-astro img {
        height: 3rem;
        width: 3rem;
    }

    .rocket-word-start-panel,
    .rocket-word-finish-panel {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .rocket-word-start-rocket,
    .rocket-word-mascot {
        display: none;
    }

    .rocket-word-finish-planets {
        justify-content: center;
    }

    .rocket-word-slot {
        font-size: 1.45rem;
        height: 2.6rem;
        min-width: 2rem;
    }

    .rocket-launch-rocket {
        height: 7rem;
    }

    .rocket-planet-img {
        height: 6rem;
        width: 6rem;
    }

    .rocket-key {
        font-size: 1.1rem;
        height: 2.8rem;
        min-width: 2.8rem;
    }
}
