/* AMBA WORLD v100: a single minimal, expandable mission HUD for all three worlds.
   Existing gameplay, physics and touch controls are retained. */
#shell > .hud, #guilinRoot > .guilin-objective, #singaporeRoot > .sg-quest{display:none!important}
/* The old permanent tutorial text is replaced by the expandable mission panel. */
#shell > .bottom .hint{display:none!important}
#guilinRoot > .guilin-tip:not(.notify),#singaporeRoot > .sg-hint{display:none!important}
.amba-mini-hud{--mh-bg:rgba(26,51,71,.89);--mh-fg:#fff3d2;position:absolute;top:clamp(54px,8vh,76px);left:max(10px,env(safe-area-inset-left));z-index:4;width:max-content;max-width:min(94vw,390px);color:var(--mh-fg);font:700 12px/1.2 Trebuchet MS,system-ui,sans-serif;pointer-events:auto;filter:drop-shadow(0 3px 5px rgba(0,0,0,.19));}
.amba-mini-hud[data-world="sakura"]{--mh-bg:rgba(66,37,76,.88);--mh-fg:#fff0e0}
.amba-mini-hud[data-world="guilin"]{--mh-bg:rgba(17,64,68,.88)}
.amba-mini-hud[data-world="singapore"]{--mh-bg:rgba(15,53,74,.88)}
.amba-mini-hud[hidden],.amba-mini-hud .amba-mini-details[hidden]{display:none!important}
.amba-mini-strip{display:flex;align-items:center;gap:8px;min-height:32px;max-width:100%;background:var(--mh-bg);border:1px solid rgba(255,225,166,.6);border-radius:14px;padding:3px 5px 3px 10px;backdrop-filter:blur(7px);box-shadow:0 3px 13px rgba(15,21,42,.25)}
.amba-mini-name{font-size:10px;letter-spacing:.5px;white-space:nowrap;color:#ffe1a9}
.amba-mini-progress,.amba-mini-lives{font-size:12px;white-space:nowrap;color:#fff8e7;font-variant-numeric:tabular-nums}
.amba-mini-lives{color:#ffe1aa}
.amba-mini-button{appearance:none!important;display:grid;place-items:center;flex:0 0 auto!important;width:29px!important;min-width:29px!important;height:28px!important;min-height:28px!important;padding:0!important;border:1px solid rgba(255,237,189,.3)!important;border-radius:9px!important;color:#fff5de!important;background:rgba(255,255,255,.13)!important;font-size:15px!important;font-weight:900!important;box-shadow:none!important;line-height:1!important;touch-action:manipulation!important;pointer-events:auto}
.amba-mini-button:focus-visible{outline:2px solid #ffe79d;outline-offset:2px}
.amba-mini-details{margin-top:6px;padding:12px 14px 11px;border:1px solid rgba(255,220,155,.8);border-radius:14px;background:rgba(24,44,61,.97);color:#fffaec;box-shadow:0 12px 30px rgba(0,0,0,.28);max-height:min(55dvh,235px);overflow-y:auto;max-width:min(88vw,380px)}
.amba-mini-details strong{color:#ffe2a7;font-size:12px;display:block;margin-bottom:7px}
.amba-mini-details p{font-size:12px;line-height:1.42;margin:5px 0;color:#fff5e7;font-weight:600;white-space:normal}
.amba-mini-detail-buttons{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.amba-mini-detail-buttons button{min-width:0;min-height:31px;padding:6px 10px;border:1px solid #ffddb0a6;background:#285169;color:#fff6dc;border-radius:9px;font-size:11px;font-weight:850;box-shadow:none;touch-action:manipulation}
.amba-mini-detail-buttons button:disabled{opacity:.5}
/* Keep cinematic/story overlays, pause screens and the Tetris board above the HUD. */
#shell:has(>.overlay:not(.hidden))>.amba-mini-hud,
#guilinRoot:has(>.guilin-screen:not([hidden]))>.amba-mini-hud,
#guilinRoot:has(>.guilin-battle:not([hidden]))>.amba-mini-hud,
#guilinRoot:has(>.guilin-pause-card:not([hidden]))>.amba-mini-hud,
#guilinRoot.battle-active>.amba-mini-hud,
#guilinRoot.reward-active>.amba-mini-hud,
#singaporeRoot:has(>#sg-modal:not([hidden]))>.amba-mini-hud,
#singaporeRoot:has(>#sg-pause:not([hidden]))>.amba-mini-hud{display:none!important}
@media (pointer:coarse){
 /* Leave most of the canvas unobstructed while keeping the existing controls. */
 #shell>.amba-mini-hud,#guilinRoot>.amba-mini-hud,#singaporeRoot>.amba-mini-hud{top:calc(env(safe-area-inset-top,0px) + 54px)}
 #shell #top,.guilin-hud,.sg-top{top:max(4px,env(safe-area-inset-top,0px))!important}
 #shell #top .tool,.guilin-tools button,.sg-topbuttons button{font-size:clamp(9px,1.45vw,12px)!important;padding:7px 8px!important;min-height:31px!important;border-radius:10px!important}
 #shell #top .logo,.guilin-title,.sg-brand{font-size:clamp(14px,2vw,20px)!important}
 #shell #top .subtitle,.guilin-title small,.sg-brand small{font-size:clamp(8px,1.1vw,10px)!important;margin-top:3px!important;letter-spacing:.6px!important}
}
@media (pointer:coarse) and (orientation:landscape){
 #shell>.amba-mini-hud,#guilinRoot>.amba-mini-hud,#singaporeRoot>.amba-mini-hud{top:calc(env(safe-area-inset-top,0px) + 45px)}
 .amba-mini-strip{min-height:30px;padding:2px 4px 2px 8px;gap:6px}
 .amba-mini-name{font-size:9px}
 .amba-mini-button{height:26px!important;min-height:26px!important}
 .amba-mini-details{max-height:52dvh}
}
@media (pointer:coarse) and (orientation:portrait){
 .amba-mini-hud{max-width:calc(100vw - 20px)}
 .amba-mini-name{font-size:10px}
 .amba-mini-strip{max-width:calc(100vw - 20px)}
}
/* The fullscreen shell uses visual viewport dimensions and stays above browser
   chrome where supported; if unsupported, normal in-page layout remains usable. */
#shell:fullscreen,#shell:-webkit-full-screen{width:100vw!important;height:100dvh!important;overflow:hidden!important}
#shell:fullscreen #guilinRoot,#shell:fullscreen #singaporeRoot{height:100%!important}
