/* Main landing only: setup, gameplay, dialogs and the launch title keep their styling. */
body:has(#home:not([hidden]) #menu-front:not([hidden])){background:#091e3a}
main:has(#home:not([hidden]) #menu-front:not([hidden])){width:min(100%,470px);padding:0}
main:has(#home:not([hidden]) #menu-front:not([hidden]))>header,
main:has(#home:not([hidden]) #menu-front:not([hidden]))>footer{display:none}
#arena:has(#home:not([hidden]) #menu-front:not([hidden])){width:100%;height:100dvh;max-height:none;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none}
#overlay:has(#home:not([hidden]) #menu-front:not([hidden])){padding:0;backdrop-filter:none;background:linear-gradient(180deg,#10275255,#0c2845b8 38%,#0c1c39 76%),url('earthrise.jpg') center 38%/cover;touch-action:pan-y;align-items:safe start}
#home:has(#menu-front:not([hidden])){margin:0;min-height:100%;padding:0}
#menu-front{position:relative;isolation:isolate;min-height:100dvh;padding:calc(env(safe-area-inset-top) + 12px) max(18px,env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 12px) max(18px,env(safe-area-inset-left));display:flex;flex-direction:column;justify-content:center;gap:14px;text-align:left;animation:menu-arrive .4s ease-out both}
#menu-front::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(circle at 12% 26%,#d7ffff 1px,transparent 2px),radial-gradient(circle at 88% 11%,#fff4c2 1px,transparent 2px),radial-gradient(circle at 84% 47%,#b3fff2 1px,transparent 3px);animation:menu-stars 6s ease-in-out infinite}
body:has(#launch-intro:not([hidden])) #menu-front{animation:none}
.menu-topline{display:flex;align-items:center;gap:10px;min-height:44px;flex-shrink:0}
.menu-base{font:800 9px/1.5 system-ui;letter-spacing:.18em;color:#d4f6ff;margin-right:auto}
.menu-wallet{font:800 13px system-ui;color:#fff0bb;background:#081d3cd9;border:1px solid #9bbbe956;padding:9px 12px;border-radius:24px;max-width:50%;overflow-wrap:anywhere}
#menu-settings{width:44px;min-width:44px;height:44px;padding:6px;border-radius:50%;background:#0b2745cc;border:1px solid #a3d6e76b;font-size:22px;color:#e6fbff}
.menu-skyline{position:relative;min-height:220px;flex:1;max-height:300px;display:flex;align-items:center}
.menu-brand{position:relative;z-index:3;pointer-events:none}
.menu-brand>small{font:800 9px system-ui;letter-spacing:.17em;color:#d1fff6;text-shadow:0 2px 7px #052039}
#menu-front .menu-brand h1{margin:14px 0 18px;font:900 clamp(30px,8.7vw,42px)/1.05 SkyArcade,system-ui;letter-spacing:.005em;color:#fff1cb;transform:rotate(-5deg);text-shadow:0 3px #a66b36,0 6px #102d50,0 10px 20px #05172e}
#menu-front .menu-brand h1 em{color:#ffcf65;text-shadow:0 3px #bb7633,0 6px #102d50}
#menu-front .menu-brand p{font:600 12px/1.5 system-ui;color:#e1f7ff;margin:0;max-width:none;text-shadow:0 2px 7px #061c35}
.menu-cast{position:absolute;right:-6px;bottom:-5px;top:0;width:56%;pointer-events:none}
.menu-cast span{position:absolute;aspect-ratio:3/4;background-size:400% 200%;background-repeat:no-repeat;filter:drop-shadow(0 12px 9px #08213caa)}
.menu-brindle{background-image:url('crew-courier.webp');background-position:0 100%;width:91%;right:-2%;bottom:0;transform:rotate(6deg)}
.menu-patch{background-image:url('crew-unit.webp');background-position:0 100%;width:56%;right:0;top:0;transform:rotate(13deg)}
.menu-adventures{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
#menu-front .adventure-card{position:relative;isolation:isolate;overflow:hidden;min-width:0;min-height:176px;text-align:left;border-radius:19px;padding:15px 12px;display:flex;align-items:end;box-shadow:0 5px 0 #061b30,0 12px 24px #06132866;transition:transform .16s,border-color .16s}
#menu-front .adventure-story{background:linear-gradient(180deg,#123d5822,#12374788 30%,#132d35 72%),url('earthrise.jpg') center 65%/cover;border:1.5px solid #ffdb86}
#menu-front .adventure-endless{background:linear-gradient(180deg,#54326d00,#23245788 25%,#242148 72%),url('deep-space.jpg') center/cover;border:1.5px solid #b4afff}
.adventure-arrow{position:absolute;right:11px;top:11px;width:29px;height:29px;display:grid;place-items:center;border:1px solid #f5edc38a;border-radius:50%;background:#0b203677;font:700 20px system-ui;color:#ffebbc}
.adventure-endless .adventure-arrow{color:#e6e1ff;border-color:#dbd7ff88}
.adventure-copy{display:flex;flex-direction:column;gap:7px;position:relative}
.adventure-copy>small{font:800 8px/1.35 system-ui;letter-spacing:.11em;color:#f0e6b8}
.adventure-copy>strong{font:900 clamp(20px,5.9vw,27px)/1.1 SkyArcade,system-ui;letter-spacing:-.035em;color:#ffe293;text-shadow:0 2px #7a542c}
.adventure-endless .adventure-copy>strong{color:#e0dbff;text-shadow:0 2px #655395}
.adventure-copy>span{font:600 11px/1.4 system-ui;color:#f0f9ff}
.adventure-copy>.adventure-note{font:500 9px/1.4 system-ui;color:#c5d8e6;border-top:1px solid #dde5f333;margin-top:3px;padding-top:8px}
.menu-collections{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
#menu-front .menu-collections button{min-height:87px;min-width:0;position:relative;overflow:hidden;display:flex;align-items:center;gap:7px;text-align:left;padding:12px 7px;background:linear-gradient(130deg,#1c4d60,#14384e);border:1px solid #6cb4c56b;border-radius:15px;box-shadow:0 3px 0 #061c31}
#menu-front .menu-collections button:last-child{background:linear-gradient(130deg,#303953,#202d46)}
.menu-collections strong{font:800 12px/1.5 system-ui;letter-spacing:.035em;color:#effaff}
.menu-collections small{display:block;font:500 11px/1.5 system-ui;color:#bcd9e5;margin-top:4px}
.collection-crew,.collection-shop{width:36px;min-width:36px;height:48px;background:url('crew-cat-v11.webp') 0 0/400% 200% no-repeat;filter:drop-shadow(0 2px 2px #091d39)}
.collection-shop{background-image:url('crew-marlow.webp')}
.menu-workshop{border:0;border-bottom:1px solid #658fab44}
.menu-workshop summary{list-style:none;min-height:44px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font:600 12px system-ui;color:#c2dce9;padding:2px 4px}
.menu-workshop summary::-webkit-details-marker{display:none}
.menu-workshop summary:focus-visible{outline:3px solid #ffdc96;outline-offset:2px}
#menu-front .home-navigation{margin:0 0 14px;padding:0;border:0;grid-template-columns:repeat(3,minmax(0,1fr))}
#menu-front .home-navigation button{font:600 12px/1.4 system-ui;min-height:44px}
#menu-front .home-extras{justify-content:space-between;gap:8px;margin-top:-8px}
#menu-front .home-extras button{min-height:44px;font:500 11px system-ui;color:#d1e4ee;padding:8px 2px}
#menu-setup-back{display:block;min-height:44px;margin-bottom:8px}
#menu-front button:active{transform:translateY(2px)}
#menu-front button:focus-visible{outline:3px solid #fff3c5;outline-offset:3px}
@media(hover:hover){#menu-front .adventure-card:hover{transform:translateY(-2px);border-color:#fff4d4}}
@media(max-height:740px){#menu-front{gap:10px;padding-top:calc(env(safe-area-inset-top) + 8px);padding-bottom:calc(env(safe-area-inset-bottom) + 8px)}.menu-skyline{min-height:174px;max-height:210px}#menu-front .adventure-card{min-height:157px}.menu-brand>small{font-size:8px}#menu-front .menu-brand h1{font-size:30px}.menu-cast{width:49%}.menu-patch{display:none}#menu-front .menu-collections button{min-height:75px}}
@media(max-width:350px){#menu-front{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.menu-adventures,.menu-collections{gap:9px}.adventure-copy>strong{font-size:20px}.menu-collections strong{font-size:11px}.menu-collections small{font-size:10px}.collection-crew,.collection-shop{min-width:29px;width:29px;height:39px}#menu-front .menu-brand h1{font-size:28px}.menu-brand>small{font-size:8px}}
@keyframes menu-arrive{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
@keyframes menu-stars{50%{opacity:.35}}
@media(prefers-reduced-motion:reduce){#menu-front,#menu-front::before{animation:none}#menu-front button{transition:none}}

#qa-menu:not([hidden]){display:block;flex:1 0 100%;min-height:44px;color:#a9f5ff;border:2px solid #65d7eb;background:#112f43;font-weight:800}
.menu-topline:has(#qa-menu:not([hidden])){flex-wrap:wrap}

/* High-visibility shortcuts on home, flight setup and results. */
.menu-rewards{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;flex-shrink:0;margin:10px 0;text-align:left}
#menu-front .menu-rewards{margin:0}
.menu-rewards button{min-height:76px;min-width:0;display:flex;align-items:center;gap:9px;padding:12px 10px;border-radius:15px;text-align:left;box-shadow:0 3px 0 #061c31}
.menu-rewards .reward-shortcut{background:linear-gradient(135deg,#4c3827,#302b30);border:1px solid #bb965f;color:#ffe5ae}
.menu-rewards .reward-ready{background:linear-gradient(135deg,#ffdc8e,#efb468);border-color:#fff0bd;color:#352519;box-shadow:0 3px 0 #996636,0 0 18px #ffc66826}
.menu-rewards .invite-shortcut{background:linear-gradient(135deg,#165b69,#1b405b);border:1px solid #73d6dc;color:#e1ffff}
.menu-rewards .shortcut-icon{font:800 25px/1 system-ui;flex-shrink:0}
.menu-rewards strong{display:block;font:850 14px/1.3 system-ui;letter-spacing:0}
.menu-rewards small{display:block;margin-top:5px;font:650 10px/1.4 system-ui;letter-spacing:0}
#menu-front .menu-skyline{min-height:176px;max-height:230px}
#menu-front .home-extras{justify-content:center}
@media(max-height:740px){#menu-front .menu-skyline{min-height:125px;max-height:155px}#menu-front .adventure-card{min-height:144px}#menu-front{gap:10px}}
@media(max-width:350px){.menu-rewards{gap:8px}.menu-rewards button{padding:10px 8px;gap:6px}.menu-rewards strong{font-size:12px}.menu-rewards .shortcut-icon{font-size:20px}}
