header{gap:12px;flex-wrap:wrap;height:auto;min-height:76px}.top-actions{gap:8px;flex-wrap:wrap;align-items:center}.top-actions .pill{padding:10px 13px;font-size:14px;letter-spacing:0}.account-link{background:#7060ed!important;color:white!important}
.world-notice{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:#294958;color:white;padding:13px 20px;border-radius:18px;z-index:5000;max-width:90vw;text-align:center;pointer-events:none;font-size:15px}
.world-view{height:100%;overflow:auto;padding:4px 6px 18px}.world-view h2{margin:10px 0}.world-view .toolbar{margin:8px 0}.world-empty{max-width:620px;margin:24px auto;text-align:center;padding:30px 20px;background:white;border-radius:24px;line-height:1.65}
.market-layout{grid-template-rows:auto minmax(120px,1fr) auto auto!important;gap:6px!important}.market-top{flex-wrap:wrap;gap:7px!important}.market-title h2{font-size:23px!important}.market-title p{font-size:14px}.market-score{font-size:14px}.market-layout .scene{min-height:0!important}.market-layout .scene-dino{width:60px!important;height:120px!important;transition:none!important;top:auto!important;will-change:left,top;pointer-events:none}.scene-dino.reaching{animation:worldReach .3s ease!important}.scene-dino.facing-left{scale:-1 1}
@keyframes worldReach{50%{rotate:-12deg;translate:0 -8px;filter:drop-shadow(0 0 10px #ffe369)}}
.world-controls{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:4px 7px;background:#e1efdf;border-radius:16px;min-height:54px}.world-controls select{font:inherit;font-size:14px;max-width:150px;padding:9px;border:1px solid #b5ceb9;border-radius:12px;background:white}.world-controls button{font:inherit;font-weight:800;cursor:pointer;border:0;background:white;color:#294958;border-radius:12px;min-height:42px;min-width:42px;touch-action:none;user-select:none;-webkit-user-select:none}.world-controls button:active{background:#f5cf4e}.world-controls .pickup{background:#f5cf4e;padding:10px 20px}.dpad{display:grid;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,34px);gap:3px}.dpad button{min-height:34px}.dpad .up{grid-column:2}.dpad .left{grid-column:1;grid-row:2}.dpad .down{grid-column:2;grid-row:2}.dpad .right{grid-column:3;grid-row:2}.control-help{font-size:14px;max-width:270px;line-height:1.4}.world-controls [hidden]{display:none!important}
.market-layout .scene-tabs{width:100%;height:auto;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:5px;margin:0}.market-layout .scene-tab{font-size:14px!important;min-height:42px;padding:8px 4px!important;white-space:normal!important}.world-progress-label{font-size:14px;font-weight:bold}.world-reset{font-size:14px;border:0;background:white;border-radius:10px;padding:8px;cursor:pointer}
.world-dialog{border:0;border-radius:26px;background:#fffef8;color:#294958;padding:24px;max-width:470px;width:calc(100% - 28px);max-height:90dvh;overflow:auto;box-shadow:0 20px 80px #17373377}.world-dialog::backdrop{background:#17373399}.world-dialog label{display:block;margin:12px 0;font-weight:700;font-size:15px}.world-dialog input{display:block;width:100%;font:inherit;padding:12px;border:2px solid #d4e2da;border-radius:12px;margin-top:5px}.world-dialog form{clear:both}.world-dialog p{line-height:1.55}.world-dialog .dismiss{float:right;border:0;background:#e1efdf;padding:9px 14px;border-radius:12px;cursor:pointer}.world-dialog .error{color:#a23128;min-height:24px;font-size:14px}.world-dialog code{display:block;overflow-wrap:anywhere;user-select:all;background:#eff5ec;padding:12px;border-radius:10px}.world-dialog .toolbar button{font-size:14px}.world-dialog .primary{background:#7060ed;color:white}
.shadow-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr);gap:16px}.shadow-layout video{display:block;width:100%;max-height:50vh;background:#172b35;border-radius:18px}.shadow-cues{max-height:65vh;overflow:auto;display:grid;gap:8px;align-content:start}.shadow-cue{text-align:left;border:2px solid transparent;background:white;border-radius:14px;padding:12px;cursor:pointer;color:#294958;font:inherit}.shadow-cue.active{border-color:#7060ed;background:#eeeaff}.shadow-cue b{display:block;font-size:23px}.shadow-cue span{display:block;margin-top:4px}.shadow-options{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px 0}.shadow-options select{font:inherit;padding:6px}.shadow-recording{color:#b52233;font-weight:800}
.battle-field{position:relative;isolation:isolate;max-width:1100px;margin:auto;aspect-ratio:16/9;max-height:65vh;overflow:hidden;border:6px solid white;border-radius:26px;background:linear-gradient(#668cca44,#17233d66),url('/assets/aluni-planet-simple.webp') center/cover;touch-action:none}.battle-field canvas{width:100%;height:100%;display:block}.battle-banner{position:absolute;inset:0;display:grid;place-items:center;background:#16312fbb;color:white;text-align:center;padding:18px}.battle-banner[hidden]{display:none}.battle-banner>div{max-width:480px}.battle-banner h3{font-size:30px}.battle-banner button{margin:7px}.battle-hud{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap;font-weight:bold;margin:8px 0}.battle-picker{display:flex;gap:10px;flex-wrap:wrap}.battle-picker button{font:inherit;text-align:left;border:2px solid #d0dec9;background:white;border-radius:18px;padding:12px;cursor:pointer;flex:1;min-width:170px}.battle-picker img{height:80px;width:80px;object-fit:contain;float:left;margin-right:8px}.battle-picker strong,.battle-picker small{display:block}.battle-picker small{font-size:14px;margin-top:5px}.battle-picker button:disabled{opacity:.55;cursor:default}
@media(max-width:760px){header{padding:8px}.brand{font-size:15px}.top-actions{gap:5px}.top-actions .pill{padding:8px;font-size:14px}.world{padding-top:12px}.market-title p{display:none}.market-title h2{font-size:18px!important}.market-layout .scene-dino{width:38px!important;height:76px!important}.control-help{display:none}.world-controls select{max-width:130px}.market-layout .scene-tab{font-size:12px!important}.market-layout .scene-tabs{grid-template-columns:repeat(3,1fr)!important}.shadow-layout{grid-template-columns:1fr}.shadow-cues{max-height:38vh}.market-score{padding:6px!important}.dpad{grid-template-columns:repeat(3,36px);grid-template-rows:repeat(2,30px)}.dpad button{min-width:36px;min-height:30px}.world-controls .pickup{padding:8px}.world-progress-label{font-size:12px}.world-view{padding:0}.battle-field{max-height:55vh}}
@media(max-height:500px) and (orientation:landscape){.sheet{height:98dvh!important;padding:6px!important}.market-layout .scene-tabs{grid-template-columns:repeat(6,1fr)!important}.market-layout .scene-tab{min-height:32px}.market-top{min-height:32px}.world-controls{min-height:40px;padding:2px 6px}.dpad{grid-template-columns:repeat(3,32px);grid-template-rows:repeat(2,25px)}.dpad button{min-height:25px;min-width:32px}.world-controls select{padding:5px}.battle-field{max-height:57vh}.battle-hud{margin:2px 0}.world-view h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.collect-star{animation:none}.scene-dino{animation:none!important}}

/* Keep the landing map in view; reserve space for the compact introduction. */
.world{padding-top:14px;padding-bottom:22px}
.intro{width:min(1180px,100%);padding-right:155px}
.intro .eyebrow{font-size:12px;letter-spacing:1.5px}
.intro h1{font-size:clamp(28px,3vw,42px);line-height:1.12;margin:5px 0}
.intro p{font-size:14px;line-height:1.4;margin:5px 0}
.intro .progress{top:50%;bottom:auto;transform:translateY(-50%);padding:12px 16px;border-radius:18px;font-size:22px}
.intro .progress small{font-size:11px}
@media(min-width:761px) and (min-height:600px){
 .app{height:100dvh;min-height:0;display:flex;flex-direction:column}
 .app>header{flex:0 0 auto}
 .world{flex:1;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:10px}
 .world>.intro{margin:0 auto}
 .world>.map-switcher{margin:0 auto}
 .world>.planet{margin:0 auto;width:min(1180px,100%);height:100%;min-height:0;max-height:none;aspect-ratio:auto}
 .planet>.dino{width:clamp(48px,7vh,90px);height:clamp(96px,14vh,180px)}
 .planet>.station{width:clamp(160px,19vw,235px);min-height:68px;padding:9px 12px}
 .planet>.station .art{width:42px;height:42px;font-size:30px}
 .planet>.station strong{font-size:16px}
}
@media(max-width:760px){
 .intro{padding-right:0}
 .intro h1{font-size:28px}
 .intro .progress{position:static;transform:none;display:inline-block;margin-top:4px;padding:7px 12px;font-size:18px}
}

.world-touch-overlay.world-controls{position:absolute;inset:0;z-index:8;background:none;margin:0;padding:0;pointer-events:none;border-radius:0}
.world-touch-overlay .dpad{position:absolute;left:14px;bottom:14px;pointer-events:auto;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px);gap:3px;padding:7px;border-radius:50%;background:#ffffff55;backdrop-filter:blur(3px)}
.world-touch-overlay .dpad .up{grid-row:1}.world-touch-overlay .dpad .down{grid-row:3;grid-column:2}.world-touch-overlay .dpad .left{grid-row:2}.world-touch-overlay .dpad .right{grid-row:2}
.world-touch-overlay .dpad button{min-width:44px;min-height:44px;border-radius:50%;background:#ffffffdc;box-shadow:0 2px 5px #183a4e44;font-size:22px}
.world-touch-overlay .pickup{position:absolute;right:18px;bottom:24px;pointer-events:auto;width:76px;height:76px;border-radius:50%;padding:0;box-shadow:0 4px 0 #b99a35;font-size:17px}
@media(max-height:500px){.world-touch-overlay .dpad{transform:scale(.8);transform-origin:bottom left;left:6px;bottom:6px}.world-touch-overlay .pickup{width:60px;height:60px;right:10px;bottom:12px}}

.world-touch-overlay .pickup{right:24px;bottom:24px;width:56px;height:56px;font-size:30px;line-height:1;padding:0}

/* Topic play takes the viewport; secondary actions live in the Menu dialog. */
.panel.topic-focus{padding:0;background:#eaf3df}
.topic-focus .sheet{width:100%;height:100dvh!important;max-height:none;border-radius:0;padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow:hidden;box-shadow:none}
.topic-focus .market-layout{display:flex;flex-direction:column;gap:6px!important;overflow:hidden}
.topic-focus .market-top{flex:0 0 auto;flex-wrap:nowrap;min-height:42px;gap:8px!important}
.topic-focus .market-title{flex:1;overflow:hidden}
.topic-focus .market-title h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(14px,2vw,23px)!important}
.topic-focus .market-title p{display:none}
.topic-focus .market-top .action{min-height:40px;padding:8px 10px;white-space:nowrap}
.topic-stage{flex:1;min-width:0;min-height:0;display:grid;place-items:center;overflow:hidden}
.topic-focus .market-layout .scene{flex:none;border:0;border-radius:10px;margin:0!important;min-height:0!important;max-width:100%;aspect-ratio:auto!important;box-shadow:none;touch-action:none}
.topic-focus .scene-bg{object-fit:contain}
.topic-focus .scene>.hot,.topic-focus .scene>.collect-star{translate:-50% -50%}
.topic-focus .scene>.hot{width:clamp(25px,3.4vw,43px);height:clamp(25px,3.4vw,43px);border-width:3px;font-size:clamp(12px,1.6vw,19px)}
.topic-focus .scene>.collect-star{font-size:clamp(22px,3vw,34px)}
.topic-menu{margin:auto}
.topic-menu .world-controls{margin:14px 0;flex-wrap:wrap}
.topic-menu .scene-tabs{display:grid;height:auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px;margin:14px 0}
.topic-menu .world-reset{margin-top:8px;min-height:44px}
.topic-rotate-hint{display:none}
#previousWorldMap{white-space:nowrap;padding:10px 12px}
@media(max-width:600px){
 #previousWorldMap{font-size:12px;padding:10px 8px}
 .topic-focus .market-score{display:none}
 .topic-focus .world-progress-label{font-size:11px;max-width:70px}
 .topic-focus .market-top .action{font-size:12px;padding:7px}
}
@media(max-height:500px){
 .topic-focus .sheet{padding:3px max(6px,env(safe-area-inset-right)) 3px max(6px,env(safe-area-inset-left))!important}
 .topic-focus .market-top{min-height:36px;gap:5px!important}
 .topic-focus .market-top .action{min-height:34px;font-size:12px;padding:5px 9px}
 .topic-focus .market-layout .scene-dino{width:36px!important;height:72px!important}
}
@media(max-width:600px) and (orientation:portrait){
 .topic-rotate-hint{display:block;text-align:center;font-size:13px;margin:4px 0}
}
