/* A pixel field guide: colored foliage, quiet skies and a little chameleon. */
@property --skin { syntax: '<color>'; inherits: true; initial-value: #7fb950; }
@property --skin-shade { syntax: '<color>'; inherits: true; initial-value: #426c37; }
@property --skin-light { syntax: '<color>'; inherits: true; initial-value: #c4e786; }
:root{--cream:#edf0d0;--mint:#b8d98a;--skin:#7fb950;--skin-shade:#426c37;--skin-light:#c4e786}
body{background:#152e2b;color:#ecedd4}
body::before,.stars,.space-glow,.orbit-stars,.nebula-cloud,.distant-moon,.atmosphere,.beacon-planet,.home-orbit-line{display:none!important}
body:not(.playing){background:linear-gradient(#1e3a35,#152c2a)}
body:not(.playing)::after{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0 119px,#b4d18a03 119px 121px)}
.header,.playing .header{background:transparent}
.brand,.hero-copy h1,.hero-copy h1 span{color:#e7edcc;text-shadow:3px 3px #142d2a}
.hero-copy .eyebrow,.hero-copy>p:last-child{color:#b8cead}
.button{background:#c4df9b;color:#213c30;border-color:#d6eab7;box-shadow:4px 4px #0e2826}
.button:hover{background:#dceeb6}
.text-button{color:#c6dcc0}
.challenge,.icon-button{background:#243e36;border-color:#547264;color:#e1e7c8}
.challenge:hover{background:#304e3f;border-color:#a6c286}
.flight-console,dialog{background:#18352ff2;border-color:#89a68a;box-shadow:5px 5px #0e2429aa;color:#edf0d7}
.flight-console .search-field input,dialog input{background:#102923;color:#edf0d7;border-color:#648573}
.flight-console .search-field input::placeholder{color:#b0c3b0}
.suggestions{background:#193a32;border-color:#7b9b7c}
.suggestions button{color:#ecedd2}
.suggestions button:hover,.suggestions button:focus{background:#365941}
.suggestions::before{color:#b0c8a7}
.flight-info,.flight-info .text-button{color:#bfd4bb}
.trajectory-list li::before{color:#c7e0aa;background:#19382e}
.trajectory-list b,.trajectory-destination b{color:#e3ecc9}
.environment-layer{background:linear-gradient(var(--sky),var(--nebula) 65%,var(--fog));overflow:hidden}
.environment-layer::before{opacity:.12;background-size:6px 6px}
.nature-landscape{z-index:2}
.nature-light{position:absolute;left:15%;top:18%;width:58px;height:58px;background:#fff4bc;clip-path:polygon(20% 0,80% 0,80% 12%,100% 12%,100% 80%,80% 80%,80% 100%,12% 100%,12% 80%,0 80%,0 20%,20% 20%);opacity:.8}
[data-environment=mist] .nature-light{opacity:.12;filter:blur(15px)}
[data-environment=night] .nature-light{background:#dfd9ff;box-shadow:0 0 70px #d0bdff}
[data-environment=dream] .nature-light{background:#defff1;box-shadow:0 0 90px #ffd6ef}
.nature-cloud{position:absolute;top:27%;left:20%;width:140px;height:15px;background:#fff6;box-shadow:18px -12px #fff6,55px -21px #fff6,80px -7px #fff6;opacity:.5}
.cloud-two{left:auto;right:10%;top:36%;transform:scale(.65)}
[data-environment=night] .nature-cloud,[data-environment=dream] .nature-cloud{opacity:.15}
.nature-mist{position:absolute;inset:55% 0 0;background:linear-gradient(transparent,var(--fog) 65%,transparent);opacity:.22;z-index:3;pointer-events:none}
.ambient-nature{position:absolute;inset:0;z-index:4;pointer-events:none}
.nature-object{position:absolute;width:var(--object-size);height:var(--object-size);animation:nature-drift var(--object-duration) ease-in-out var(--object-delay) infinite alternate}
.nature-object svg{width:100%;height:100%}
.nature-firefly{background:var(--skin-light);box-shadow:0 0 9px 2px var(--skin-light);opacity:.8}
@keyframes nature-drift{0%{transform:translate(0,10px);opacity:.3}45%{transform:translate(var(--drift),-18px);opacity:1}100%{transform:translate(15px,-44px);opacity:.4}}
.game-scene{--planet-size:150px;--destination-size:240px}
.world .platform{position:absolute;top:calc(var(--planet-size) * .03 + 4px);width:100%;height:28px;border:0;border-radius:0;background:transparent;box-shadow:none;filter:none}
.platform-grass{position:absolute;inset:0 0 auto;height:9px;background:var(--skin);border-top:3px solid var(--skin-light);box-shadow:0 3px var(--skin-shade);clip-path:polygon(0 0,100% 0,100% 75%,94% 75%,94% 100%,83% 100%,83% 65%,70% 65%,70% 100%,57% 100%,57% 65%,40% 65%,40% 100%,28% 100%,28% 65%,12% 65%,12% 100%,0 100%);z-index:2}
.platform-earth{position:absolute;inset:8px 4px 0;background:#574c49;border-bottom:5px solid #293d38;box-shadow:inset 0 5px #8a7561;clip-path:polygon(0 0,100% 0,100% 60%,93% 60%,93% 80%,82% 80%,82% 100%,12% 100%,12% 80%,5% 80%,5% 60%,0 60%)}
.platform-earth::after{content:'';position:absolute;left:25%;top:11px;width:7px;height:4px;background:#b29b76;box-shadow:35px -2px #a18e6f,70px 2px #8a7561}
.world-current::before,.world-current::after,.world-ghost,.vertical-flight-path{display:none!important}
.world-label{left:50%;top:calc(var(--planet-size) * .03 + 47px);width:min(310px,86vw);transform:translateX(-50%);text-align:center;align-items:center;gap:7px}
.world-caption,.world-current .world-caption{color:#fffde5;font-size:14px;text-shadow:1px 2px #182d35;letter-spacing:.7px}
.world-label b{color:#fffde5;text-shadow:2px 2px #213d40;font-size:25px}
.world-destination .world-label{display:flex}
.world-destination .world-caption{color:var(--skin-light)}
.landing-shadow{display:none}
.game-scene .astronaut{width:42px;height:84px;filter:drop-shadow(2px 3px #122b2930)}
.destination-beacon{padding:10px 13px;background:#193b35d9;border:2px solid #a9c69a66;box-shadow:3px 3px #112d2b44}
.destination-beacon .destination-flag{font:28px var(--mono);color:#d6e6a9}
.destination-beacon b{color:#edf0d3;text-shadow:none}
.destination-beacon span:not(.beacon-planet){color:#c2d4ae}
.home-orbit{height:75px;margin:94px auto 15px;width:150px}
.home-planet{width:150px;height:24px;left:0;top:0;border-radius:0;background:#78a953;border-top:5px solid #c1dc8b;border-bottom:9px solid #655b46;box-shadow:4px 4px #112c29;clip-path:polygon(0 0,100% 0,100% 75%,94% 75%,94% 100%,7% 100%,7% 75%,0 75%)}
.home-chameleon{left:calc(50% - 21px);top:-82px;width:42px;height:84px}
footer{color:#a5bea5}
@media(max-width:700px){.game-scene{--planet-size:122px;--destination-size:200px}.game-scene .astronaut{width:36px;height:72px}.world-label{top:calc(var(--planet-size) * .03 + 43px);gap:5px}.world-label b{font-size:23px}.world-caption,.world-current .world-caption{font-size:12px}.home-orbit{margin-top:86px}.home-chameleon{top:-72px;width:36px;height:72px;left:calc(50% - 18px)}.destination-beacon{padding:8px 10px}.destination-beacon .destination-flag{display:none}}
body[data-keyboard-open=true] .game-scene,body[data-tight-scene=true] .game-scene{--planet-size:100px}
body[data-keyboard-open=true] .game-scene .astronaut,body[data-tight-scene=true] .game-scene .astronaut{width:22px;height:44px}
@media(prefers-reduced-motion:reduce){.nature-object{animation:none}.chameleon-rig path{transition:none}}

[data-rarity=Legendary] .chameleon-rig{filter:drop-shadow(0 0 5px #f8c4e3aa)}
[data-environment=dream] .nature-mist{background:linear-gradient(120deg,#c7fff13d,#ffd1e540,#d6c3ff4d);opacity:.4}
[data-rarity=Legendary] .platform-grass{background:linear-gradient(95deg,var(--skin),#d0dded 50%,var(--skin));border-top-color:#e5fff0}
/* The climber has a wide, low silhouette; feet meet the same platform anchor. */
.game-scene .astronaut{width:96px;height:60px}
.home-chameleon{width:112px;height:70px;left:calc(50% - 56px);top:-69px}
.chameleon-rig .astro-head{transform-origin:41px 24px}
.chameleon-rig .astro-arm-left{transform-origin:42px 27px}
.chameleon-rig .astro-arm-right{transform-origin:45px 27px}
.chameleon-rig .astro-leg-left{transform-origin:27px 28px}
.chameleon-rig .astro-leg-right{transform-origin:29px 28px}
.chameleon-rig .chameleon-tail{transform-origin:23px 25px}
@media(max-width:700px){.game-scene .astronaut{width:80px;height:50px}.home-chameleon{width:96px;height:60px;left:calc(50% - 48px);top:-59px}}
body[data-keyboard-open=true] .game-scene .astronaut,body[data-tight-scene=true] .game-scene .astronaut{width:56px;height:35px}

/* Centered wordmark and a concise three-line invitation to play. */
.header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
.header .brand{grid-column:2;justify-self:center;gap:0}
.header .brand svg{display:none}
.header #rules-open{grid-column:3;justify-self:end}
body:not(.playing) .header .brand{visibility:hidden}
.hero-copy{text-align:center}
.hero-copy h1{font-size:clamp(30px,5.4vw,57px);line-height:1.4;letter-spacing:-1.5px;margin:15px 0 12px;color:#e7edcc}
.hero-copy .game-tagline{font-family:var(--mono);font-size:24px;line-height:1.25;color:#bdd1b0;margin:0;letter-spacing:.3px}
.quick-rules{list-style:none;padding:0;margin:27px auto 0;display:grid;gap:8px;justify-content:center;text-align:left;font-family:var(--mono);font-size:20px;line-height:1.15;color:#d4dfbf}
.quick-rules li{display:flex;align-items:baseline;gap:11px}
.quick-rules li::before{content:'';display:inline-block;width:4px;height:4px;flex:0 0 4px;background:#b5d68a;align-self:center}
@media(max-width:700px){.hero-copy h1{font-size:clamp(28px,7.2vw,44px);letter-spacing:-1px;margin:12px 0 10px}.hero-copy .game-tagline{font-size:21px}.quick-rules{margin-top:22px;font-size:19px;gap:8px}.playing .header .brand{font-size:14px}.header #rules-open{white-space:nowrap}}

/* Compact opening: a short sentence beneath the title and subtitle. */
body:not(.playing) #lobby{padding-top:5px}
.hero-copy .quick-rules{display:block;text-align:center;font-family:var(--mono);font-size:17px;line-height:1.35;letter-spacing:0;margin:16px auto 0;color:#aabea0}
@media(max-width:700px){body:not(.playing) #lobby{padding-top:2px}.hero-copy .quick-rules{font-size:16px;margin-top:13px}}
/* Stable, high-contrast controls stay readable across every colored landscape. */
.header{min-height:44px;column-gap:12px}
.header .top-back{grid-column:1;grid-row:1;justify-self:start;display:inline-flex;align-items:center;gap:3px;min-width:44px;min-height:44px;padding:0 10px 0 4px;font:20px var(--mono);color:#f1f3dc;background:#18352f;border:2px solid #91ab88;box-shadow:3px 3px #102b26;text-decoration:none}
.top-back svg,.settings-trigger svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter}
.header .brand{grid-row:1;min-width:0}
.header .settings-trigger{grid-column:3;grid-row:1;justify-self:end;display:grid;place-items:center;width:44px;height:44px;padding:8px;color:#f1f3dc;background:#18352f;border-color:#91ab88}
body:not(.playing) .top-back{visibility:hidden}
.playing .header .brand{color:#f1f3dc;background:#18352f;padding:12px 13px;text-shadow:none;border:2px solid #91ab88;font-size:16px;line-height:1.3}
.settings-dialog{position:fixed;inset:auto;top:calc(var(--view-top,0px) + 88px);right:4vw;left:auto;bottom:auto;margin:0;width:min(290px,calc(100vw - 32px));padding:18px;max-height:calc(var(--view-height,100dvh) - 110px);overflow:auto;background:#18352f;border:2px solid #91ab88;box-shadow:5px 5px #102b26}
.settings-dialog::backdrop{background:#071f1833;backdrop-filter:none}
.settings-dialog h2{font:22px var(--mono);letter-spacing:0;margin:0;color:#f1f3dc}
.settings-options{display:grid;gap:5px;margin-top:13px}
.settings-options button{width:100%;min-height:48px;padding:12px;text-align:left;border:0;border-bottom:1px solid #53745b;background:#214437;color:#f1f3dc;font:21px var(--mono);line-height:1.1}
.settings-options button:hover:not(:disabled){background:#345d45}
.settings-options button:disabled{opacity:.5;cursor:default}
.settings-options #sound-toggle[aria-pressed=true]{color:#cedbc3}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #f2db8a;outline-offset:3px}
/* Scene labels use an opaque plaque instead of pale type over pale skies. */
.world-label{background:#18352f;border:2px solid #91ab88;box-shadow:3px 3px #102b2655;padding:9px 12px;width:max-content;max-width:min(310px,86vw);min-width:140px}
.world-label b{color:#f1f3dc;text-shadow:none;max-width:100%}
.world-caption,.world-current .world-caption,.world-destination .world-caption{color:#c9dbbd;text-shadow:none;letter-spacing:.3px}
.destination-beacon{background:#18352f;border-color:#91ab88}
.destination-beacon b{color:#f1f3dc}
.destination-beacon span:not(.beacon-planet){color:#c9dbbd}
.flight-console,dialog{background:#18352f;color:#f1f3dc}
.flight-console form>label,dialog label,dialog p,.rule strong,.trajectory-list b,.trajectory-destination,.semantic-matches li{color:#e1ebd4}
.dialog-heading .eyebrow,.semantic-matches small,.trajectory-list small,.trajectory-number,.flight-info,.flight-info .text-button,.win-card>p:not(.eyebrow){color:#c9dbbd}
.button.primary{color:#18352f;background:#c4df9b;text-shadow:none}
.button.primary:hover:not(:disabled){background:#deedc3}
@media(max-width:700px){.header{column-gap:8px}.playing .header .brand{font-size:12px;padding:10px 8px}.header .top-back{font-size:18px;gap:0;padding-right:7px}.settings-dialog{top:calc(var(--view-top,0px) + 68px + env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));max-height:calc(var(--view-height,100dvh) - 90px)}.world-label{padding:8px 10px;max-width:min(280px,85vw)}}
/* A constant platform footprint at every destination. */
.game-scene{--platform-width:150px;--planet-size:var(--platform-width);--destination-size:var(--platform-width)}
.world-destination{--planet-size:var(--platform-width)}
.is-rising .speed-lines,.is-rising .launch-dust{display:none}
@media(max-width:700px){.game-scene{--platform-width:122px}}
body[data-keyboard-open=true] .game-scene,body[data-tight-scene=true] .game-scene{--platform-width:100px;--planet-size:var(--platform-width)}

/* The home mascot softly cycles through the five rarity palettes. */
.home-chameleon{animation:home-color-cycle 18s linear infinite}
@keyframes home-color-cycle{
 0%,100%{--skin:#7fb950;--skin-shade:#426c37;--skin-light:#c4e786}
 20%{--skin:#e8c64e;--skin-shade:#9c7635;--skin-light:#fff29b}
 40%{--skin:#78bddd;--skin-shade:#3b709f;--skin-light:#c6edf2}
 60%{--skin:#b591df;--skin-shade:#73509c;--skin-light:#e7ccff}
 80%{--skin:#ed9dc6;--skin-shade:#ae6caa;--skin-light:#d9fff1}
}
/* Latest topic at the top, the start at the bottom; the stack's center stays fixed. */
.trajectory-rail{position:fixed;right:max(22px,env(safe-area-inset-right));top:calc(var(--view-top,0px) + var(--view-height,100dvh) * .5);transform:translateY(-50%);z-index:8;width:144px;max-width:23vw}
.trajectory-blocks{display:flex;flex-direction:column;gap:9px;list-style:none;margin:0;padding:3px 5px 5px 0;max-height:clamp(60px,calc(var(--view-height,100dvh) - var(--console-base-height,180px) * 2 - 56px),calc(var(--view-height,100dvh) - 160px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8eaa83 #18352f}
.trajectory-block{position:relative;flex:0 0 auto;display:flex;flex-direction:column;gap:5px;padding:9px 10px;background:#18352f;border:2px solid #719071;border-left:5px solid var(--skin);box-shadow:3px 3px #102b2655;text-align:left;overflow-wrap:anywhere}
.trajectory-block b{font:19px/1.05 var(--mono);font-weight:400;color:#f1f3dc}
.trajectory-step{font:12px/1 var(--mono);color:#c9dbbd;letter-spacing:.5px}
.trajectory-block.is-current{border-color:var(--skin-light);border-left-color:var(--skin);background:#24483a}
@media(max-width:700px){.trajectory-rail{right:max(8px,env(safe-area-inset-right));width:76px;max-width:25vw}.trajectory-blocks{gap:7px;padding-right:3px}.trajectory-block{padding:7px 5px;border-left-width:4px;gap:4px;box-shadow:2px 2px #102b2655}.trajectory-block b{font-size:16px}.trajectory-step{font-size:11px}.game-scene .world-label{max-width:calc(100vw - 188px);min-width:0}.game-scene .world-label b{font-size:21px}}
@media(prefers-reduced-motion:reduce){.home-chameleon{animation:none}}
