/* V1 mission selection. Scoped to the Hub; accepted gameplay and Home are untouched. */
#mode-lobby{--hub-cyan:#83eaff;--hub-gold:#ffd669;--hub-ink:#030d1d;--hub-muted:#b9d4e6;--hub-radius:18px;scroll-margin-top:100px}
body.game-world #mode-lobby{padding:20px 0;border:0;background:transparent;box-shadow:none;isolation:isolate}
#mode-lobby .lobby-heading{margin:0 0 12px;align-items:center}
#mode-lobby .lobby-heading h2{font-size:clamp(20px,2.5vw,30px);font-weight:900;letter-spacing:.03em;color:#eefcff;line-height:1.4}
#mode-lobby .lobby-heading .text-button{min-height:44px;font-size:14px;max-width:150px;color:#b4e5f2;background:#0b21398c;border-radius:24px;padding:8px 14px}
body.game-world #mode-lobby .mode-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
.featured-mission{grid-column:1/-1;position:relative;isolation:isolate;min-width:0;min-height:440px;padding:28px 30px 26px;display:flex;flex-direction:column;align-items:flex-start;overflow:hidden;background:transparent;border-radius:28px 6px 28px 6px}
.featured-mission:after{content:'';position:absolute;inset:auto 0 0;height:90px;z-index:-1;background:linear-gradient(transparent,#030d1d)}
.mission-foreground{position:absolute;z-index:-1;aspect-ratio:1100/620;pointer-events:none;width:66%;height:auto;right:-4%;top:0;animation:mission-float 10s ease-in-out infinite;}
.mission-copy{width:min(55%,400px);position:relative;text-shadow:0 2px 12px #020c1e;}
.mission-kicker{font-size:14px;font-weight:800;letter-spacing:.15em;color:var(--hub-gold)}
#ufo-meteor-title{margin:10px 0 18px;line-height:.94;font-size:clamp(44px,5.8vw,80px);font-weight:950;font-style:italic;letter-spacing:-.025em;color:#edfcff}
#ufo-meteor-title>span{display:block}
#ufo-meteor-title>span:last-child{color:#84e9ff}
.mission-copy p{font-size:16px;line-height:1.6;color:#d5e7f4;max-width:320px;margin:14px 0 20px}
.mission-level{display:block;width:132px}
.mission-level select{width:100%;min-height:44px;font-weight:800;font-size:17px;color:#fff;background:#061427e8;border:1px solid #88bfd4;border-radius:24px;padding:9px 14px;cursor:pointer}
#mode-lobby .mission-play{margin-top:auto;min-height:58px;display:flex;align-items:center;justify-content:center;gap:16px;width:min(100%,440px);position:relative;font-size:22px;font-weight:900;letter-spacing:.06em;background:linear-gradient(160deg,#ffe79a,#ffd05a 60%,#e9a42e);color:#1f180b;border:0;border-radius:14px;box-shadow:inset 0 1px 0 #fff2bf,0 4px 0 #8a5a1f,0 7px 25px #ffc44430;transition:transform .12s,filter .15s;touch-action:manipulation}
#mode-lobby .mission-play:active{transform:translateY(2px);filter:brightness(.93)}
#mode-lobby .mode-group-heading{grid-column:1/-1;margin:8px 0 0;padding:8px 0;border:0;background:none;font-size:15px;letter-spacing:.13em;font-weight:700;color:#aedcea;}
body.game-world #mode-lobby .mode-tile{grid-column:span 2;min-height:88px;border:0;border-radius:14px;background:#0a213bb0;box-shadow:inset 0 1px 0 #8be8fa2b,0 8px 20px #0004;display:grid;grid-template-columns:74px minmax(0,1fr);align-items:stretch;transition:transform .14s,background .14s}
body.game-world #mode-lobby .mode-tile .mode-art{width:100%;height:100%;border:0;min-height:88px;background-size:300% var(--art-height);opacity:.85;mask-image:linear-gradient(90deg,#000 70%,transparent)}
body.game-world #mode-lobby .mode-tile .mode-copy{border:0;background:transparent;padding:12px 9px 12px 4px;gap:4px;justify-content:center;min-width:0;width:auto}
body.game-world #mode-lobby .mode-tile .mode-copy strong,body.game-world #mode-lobby .mode-tile .mode-copy h3{font-size:16px;line-height:1.35;letter-spacing:0;color:#e7f5ff;overflow-wrap:anywhere;}
body.game-world #mode-lobby .mode-tile .mode-copy>.tile-kicker,body.game-world #mode-lobby .mode-tile .mode-copy>.eyebrow,body.game-world #mode-lobby .mode-tile .mode-copy>b,body.game-world #mode-lobby .mode-tile .mode-copy>span:last-child:not([id]){display:none}
/* Existing descriptions remain available to assistive technology, not repeated quiz-like panels. */
body.game-world #mode-lobby .mode-tile[data-tier="standard"] .mode-copy>span:not(.tile-kicker):not([id]),body.game-world #mode-lobby .mode-tile[data-tier="standard"] .mode-copy>p{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#mode-lobby .mode-copy #daily-status{font-size:12px;color:#b5cfdf;line-height:1.4;margin:0}
#mode-lobby .mode-emblem{width:28px;height:28px;right:12px;bottom:12px;border:0;box-shadow:none;border-radius:50%;background:#071323ba;font-size:18px;color:#b6effb}
body.game-world #mode-lobby .mode-tile[data-tier="major"]{grid-column:span 3;min-height:220px;display:flex;flex-direction:column;justify-content:flex-end;background:#0b2538;}
body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-art{position:absolute;inset:0;mask-image:none;opacity:.85;min-height:0}
body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-art:after{background:linear-gradient(0deg,#03101ff2 0%,#03101f40 70%,transparent);box-shadow:none}
body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy{padding:22px 18px;background:transparent;flex:none}
body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy strong{font-size:clamp(20px,2.1vw,30px);text-transform:uppercase;color:#ffdda0;}
body.game-world #mode-lobby .mode-tile[data-world-mode="writing"] .mode-copy strong{color:#a2fff0}
body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy>span:not(.tile-kicker):not(.eyebrow){display:block;color:#c5e1e6;font-size:14px;line-height:1.45;max-width:270px}
body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy>b{display:none}
@media(hover:hover){body.game-world #mode-lobby .mode-tile:hover{transform:translateY(-3px);background:#153653;box-shadow:0 10px 24px #0006}#mode-lobby .mission-play:hover{filter:brightness(1.06)}}
body.game-world #mode-lobby .mode-tile:active{transform:scale(.98)}
body.mode-hub-view:not(.playing){background:#030d1d;}
body.mode-hub-view:not(.playing):before{background:linear-gradient(180deg,#030d1d35,#030d1d9c 60%,#030d1d),url('assets/hub-cosmos.webp') center top/cover no-repeat;opacity:1}
body.mode-hub-view:not(.playing) .app{max-width:1320px;padding-bottom:90px}
body.mode-hub-view:not(.playing) .topline,body.mode-hub-view:not(.playing) #launch,body.mode-hub-view:not(.playing) .home-controls,body.mode-hub-view:not(.playing) .world-nav{display:none}
body.mode-hub-view:not(.playing) .home-deck{grid-template-columns:minmax(0,1fr);gap:28px}
body.mode-hub-view:not(.playing) #mode-lobby{padding-top:16px;}
body.mode-hub-view:not(.playing) .home-deck>.learning{position:static;max-width:780px;width:100%;justify-self:center;scroll-margin-top:20px}
.mission-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;display:flex;justify-content:center;gap:clamp(30px,7vw,80px);background:linear-gradient(#03101df2,#030d1dfa);padding:9px max(12px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom));box-shadow:0 -1px 0 #78e3ff30;}
.mission-nav[hidden],body.playing .mission-nav,body:has(dialog[open]) .mission-nav{display:none}
.mission-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:68px;min-height:44px;text-decoration:none;color:#9dbbd2;font-size:13px;line-height:1.3}
.mission-nav a>span:first-child{font-size:24px;line-height:1.1}
.mission-nav a[aria-current="page"]{color:#ffdd79}
@keyframes mission-float{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(0,-7px,0)}}
@keyframes mission-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
body.mode-hub-view #mode-lobby{animation:mission-enter .25s ease-out both}
@media(min-width:1100px){.featured-mission{min-height:490px;padding:36px 40px}.mission-foreground{width:61%;top:0}.mission-copy{width:45%}.mission-copy p{max-width:330px}.mission-nav{left:auto;right:24px;bottom:20px;border-radius:30px;gap:18px;padding:12px 18px;box-shadow:0 0 0 1px #79e8ff2b}}
@media(max-width:650px){
 body.game-world #mode-lobby .mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.game-world #mode-lobby .mode-tile{grid-column:span 1;grid-template-columns:48px minmax(0,1fr);min-height:82px}
 body.game-world #mode-lobby .mode-tile .mode-copy{padding:10px 8px 10px 2px}
 body.game-world #mode-lobby .mode-tile .mode-copy strong,body.game-world #mode-lobby .mode-tile .mode-copy h3{font-size:14px}
 body.game-world #mode-lobby .mode-tile[data-tier="major"]{grid-column:span 1;min-height:178px}
 body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy{padding:16px 11px}
 body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy strong{font-size:19px}
 body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-copy>span:not(.tile-kicker):not(.eyebrow){font-size:12px;line-height:1.4}
 #mode-lobby .lobby-heading h2{font-size:20px;letter-spacing:0}
 #mode-lobby .lobby-heading .text-button{font-size:12px;max-width:98px;padding:7px 9px}
 .featured-mission{min-height:425px;padding:22px 16px 18px;border-radius:0;margin-inline:-12px;}
 .mission-foreground{width:90%;right:-22%;top:18%;}
 .mission-copy{width:64%;}
 #ufo-meteor-title{font-size:clamp(43px,12.8vw,63px);margin-bottom:16px}
 .mission-kicker{font-size:13px}
 .mission-copy p{font-size:14px;line-height:1.5;max-width:185px;margin:14px 0 65px}
 #mode-lobby .mission-play{width:100%;min-height:56px;font-size:21px;}
 #mode-lobby .mode-group-heading{font-size:13px;letter-spacing:.09em;margin-top:6px}
 body.mode-hub-view:not(.playing) .app>header{border:0;}
}
@media(max-height:450px) and (min-width:651px){.featured-mission{min-height:310px;padding:20px 24px}.mission-foreground{width:52%;top:0}.mission-copy{width:58%}#ufo-meteor-title{font-size:50px}#ufo-meteor-title>span{display:inline}.mission-copy p{margin:10px 0 16px;max-width:400px;font-size:14px}#mode-lobby .mission-play{min-height:48px;width:310px}.mission-nav{padding:4px 12px}.mission-nav a{flex-direction:row;gap:8px}.mission-nav a>span:first-child{font-size:20px}}
@media(prefers-reduced-motion:reduce){.mission-foreground,body.mode-hub-view #mode-lobby{animation:none}body.game-world #mode-lobby .mode-tile,#mode-lobby .mission-play{transition:none}body.game-world #mode-lobby .mode-tile:hover{transform:none}html:focus-within{scroll-behavior:auto}}

.mission-scene{display:block;width:100%;height:auto}.mission-foreground>span{position:absolute;font-family:serif;font-weight:800;color:#ffe2a3;text-shadow:0 0 12px #ef9a40,0 2px 3px #3b210e;transform:translate(-50%,-50%) rotate(-9deg);font-size:clamp(28px,4vw,55px);line-height:1}.hanzi-rock-one{left:25%;top:68%}.hanzi-rock-two{left:63%;top:83%;font-size:clamp(22px,3vw,40px)!important}

body.game-world #mode-lobby .mode-tile[data-tier="major"] .mode-art{background-image:url('assets/hub-destinations.webp');background-size:200% 100%;background-position:0 50%}
body.game-world #mode-lobby .mode-tile[data-world-mode="writing"] .mode-art{background-position:100% 50%}

#mode-lobby .destination-hanzi{position:absolute;left:54%;top:24%;font-family:serif;font-size:55px;line-height:1;color:#a6ffdf;text-shadow:0 0 14px #22dfa8;transform:translateX(-50%)}
body.mode-hub-view:not(.playing) .brand{font-style:italic;letter-spacing:-.5px}
body.mode-hub-view:not(.playing) #sound{font-size:0;min-width:44px;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid #78d7f34d;background:#0a213a}
body.mode-hub-view:not(.playing) #sound:before{content:'♫';font-size:22px;color:#9fdaef}
@media(max-width:650px){body.mode-hub-view:not(.playing) .brand{font-size:17px}body.mode-hub-view:not(.playing) .language-picker select{max-width:110px}#mode-lobby .destination-hanzi{font-size:40px;top:25%}}

.featured-mission:before{content:'';position:absolute;inset:0;z-index:-2;pointer-events:none;background:linear-gradient(90deg,#030d1ddd 4%,#030d1d66 65%,transparent),url('assets/hub-cosmos.webp') center/cover;mask-image:linear-gradient(180deg,transparent,#000 8%,#000 86%,transparent)}

body.mode-hub-view:not(.playing):before{animation:world-drift 28s ease-in-out infinite;transform-origin:center}
@keyframes world-drift{0%,100%{transform:scale(1.015) translate3d(0,0,0)}50%{transform:scale(1.015) translate3d(-3px,2px,0)}}
body.hub-ambient-paused .mission-foreground,body.hub-ambient-paused:before{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){body.mode-hub-view:not(.playing):before{animation:none;transform:none}}
/* Short landscape keeps PLAY in the first viewport rather than below navigation. */
@media(max-height:450px) and (min-width:651px){
 body.mode-hub-view:not(.playing) .app>header{height:54px}
 body.mode-hub-view:not(.playing) #mode-lobby{padding-top:4px}
 #mode-lobby .lobby-heading{margin-bottom:4px}
 #mode-lobby .lobby-heading h2{font-size:18px;margin:0}
 .featured-mission{min-height:230px;padding:12px 24px}
 .mission-copy{width:60%}
 #ufo-meteor-title{font-size:44px;margin:6px 0 10px}
 #ufo-meteor-title>span+span:before{content:'\00a0'}
 .mission-copy p{margin:8px 0 0;max-width:370px;font-size:14px}
 #mode-lobby .mission-play{position:absolute;right:24px;bottom:14px;width:220px;min-height:48px}
 .mission-foreground{width:52%;top:0}
}

@media(prefers-reduced-motion:reduce){body.game-world #mode-lobby .mode-tile:active,#mode-lobby .mission-play:active{transform:none;filter:brightness(.94)}}
