body.held-mode{margin:0;min-height:100svh;display:grid;place-items:center;overflow-x:hidden;background:#17271e!important}
body.held-mode>.shell{display:none}
.held-stage{position:relative;width:min(100vw,150svh);aspect-ratio:3/2;overflow:hidden;animation:raise-console .85s cubic-bezier(.2,.7,.2,1) both}
.held-scene{position:absolute;inset:0;background:url('./player.js?asset=gba-held-v1.png') center/100% 100%;transform:scale(var(--held-zoom,1.3));transform-origin:49.7% 46.8%;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.held-zoom{position:absolute;left:16px;bottom:16px;z-index:6;padding:8px 14px;background:#173d30c9;color:#fff4db;border:1px solid #d4f5df80;border-radius:12px;font-size:13px;backdrop-filter:blur(10px);opacity:.75}
.held-zoom:hover,.held-zoom:focus-visible{opacity:1}
@media(prefers-reduced-motion:reduce){.held-scene{transition:none}}
.held-stage #screenWrap{position:absolute!important;left:31.25%;top:28.4%;width:36.85%;height:36.85%;border:0!important;border-radius:0;aspect-ratio:3/2;background:#001b0e}
.held-stage #empty{padding:5px;background:radial-gradient(#254937,#081f16)!important;color:#fff0cf}
.held-stage #empty h2{font-size:clamp(12px,1.5vw,22px);margin:0}
.held-stage #empty p{font-size:clamp(9px,1vw,13px);margin:4px}
.held-stage #empty .launch-actions{gap:5px;width:90%;margin:auto}
.held-stage #empty button{font-size:clamp(9px,1vw,14px);padding:5px;min-height:28px;margin:0}
.held-dock{position:absolute;right:12px;top:50%;transform:translateY(-50%);display:grid;gap:7px;padding:9px;background:#193b2bbd;border:1px solid #fae7b84d;border-radius:22px;opacity:.45;transition:opacity .25s;backdrop-filter:blur(12px);z-index:5}
.held-dock{right:62px;width:170px;gap:4px;padding:12px;opacity:.9;background:linear-gradient(135deg,#163d3fda,#153021bd);border:1px solid #b9f2dc88;border-radius:4px 18px 4px 18px;box-shadow:0 0 24px #8ae9d526,inset 0 0 18px #c3ffe210;transform:translateY(-50%) perspective(800px) rotateY(-5deg);transform-origin:right center;transition:opacity .25s,transform .35s,visibility .35s}
.held-dock::before{content:'NONPLAE / MENU';color:#bdebd7;font:10px/1.5 monospace;letter-spacing:1px;padding:4px 6px 10px;border-bottom:1px solid #b9f2dc44;margin-bottom:4px}
.held-dock{transform:translateY(-50%);width:clamp(170px,15vw,210px);max-height:calc(100% - 24px);overflow-y:auto}
.held-dock.is-hidden{opacity:0;visibility:hidden;pointer-events:none;transform:translate(20px,-50%)}
.held-dock:hover,.held-dock:focus-within{opacity:1}
.held-dock button{width:46px;height:46px;padding:0;border:0;background:transparent;color:#fff1ce;box-shadow:none;font-size:25px;border-radius:12px}
.held-dock button:hover{background:#fff3cf25!important}
.held-dock button{display:flex;align-items:center;gap:12px;width:100%;height:42px;padding:0 8px;font-size:20px;text-align:left}
.held-action-label{font:500 14px/1.4 Tahoma,sans-serif;color:#efffeF}
.held-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);z-index:6;width:42px;height:54px;padding:0;border:1px solid #d4f5df80;border-radius:14px;background:#173d30b8;color:#fff4db;font-size:24px;box-shadow:0 4px 15px #0003;backdrop-filter:blur(10px);opacity:.65}
.held-toggle:hover,.held-toggle:focus-visible{opacity:1;background:#285942}
@media(prefers-reduced-motion:reduce){.held-dock{transition:none}}
.held-settings{width:min(620px,90vw);max-height:85svh;overflow:auto;background:#fff0cf;border:2px solid #ad7748;border-radius:20px;padding:24px;color:#30452d}
.held-settings::backdrop{background:#10281a99;backdrop-filter:blur(7px)}
.held-settings .toolbar{display:flex;gap:14px;flex-wrap:wrap}
.held-settings .pc-extra-tools,.held-settings .screen-tools{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
@keyframes raise-console{from{opacity:0;transform:translateY(3vh) scale(.97)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.held-stage{animation:none}.held-dock{transition:none}}
/* Tools belong to the sunny desk and purple console palette. */
body.held-mode .held-settings{
 width:min(680px,calc(100vw - 32px));padding:24px;
 color:#354331;background:linear-gradient(135deg,#fff8e6,#f8e8c8);
 border:3px solid #b68349;border-radius:16px;
 box-shadow:0 5px 0 #765137,0 20px 60px #0005,inset 0 0 0 3px #fffdf04d;
 font-family:'Chakra Petch',Tahoma,sans-serif;
}
.held-settings>h2{margin:0 0 22px;padding:6px 0 14px;border-bottom:2px dashed #d6b585;font-size:23px;color:#544078}
.held-settings>button:first-child{float:right;min-height:40px;margin:0 0 10px 12px}
.held-settings .toolbar{display:grid;grid-template-columns:1fr;gap:14px;margin:0}
.held-settings .tool-group{padding:14px;background:#fffdf2;border:1px solid #d5bd95;border-radius:12px}
.held-settings .tool-group-label{display:block;margin:0 0 9px;font-size:13px;font-weight:700;color:#667353}
.held-settings .tool-group-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.held-settings .pc-extra-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:14px;background:#eff5df;border:1px solid #b7c79d;border-radius:12px;margin-top:14px}
.held-settings .screen-tools{padding:14px;background:#fffdf2;border:1px solid #d5bd95;border-radius:12px;margin-top:14px;align-items:center}
body.held-mode .held-settings button,body.held-mode .held-settings select{
 background:#fff8e8;color:#474039;border:1px solid #c7a77a;border-radius:9px;
 min-height:46px;padding:9px 12px;font:600 13px/1.45 Tahoma,sans-serif;
 box-shadow:0 3px 0 #c5a377;transition:background .15s,transform .15s;
}
body.held-mode .held-settings button:hover:not(:disabled){background:#f0e8ff;border-color:#9981b8}
body.held-mode .held-settings button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #c5a377}
body.held-mode .held-settings button.primary{background:#7050a0;color:#fff8ed;border-color:#593880;box-shadow:0 3px 0 #493164}
body.held-mode .held-settings button.primary:hover:not(:disabled){background:#8060b2}
body.held-mode .held-settings button:disabled{opacity:1;background:#ede6d7;color:#938a7c;border-color:#d8cfbf;box-shadow:none;cursor:not-allowed}
body.held-mode .held-settings :is(button,select,input):focus-visible{outline:3px solid #9774c4;outline-offset:3px}
.held-settings .pc-tool-icon{font-size:18px}
.held-settings .screen-tools label{margin:0;color:#526342}
.held-settings .pc-volume-control{display:flex;align-items:center;gap:12px;flex:1 0 100%}
.held-settings #pcVolume{accent-color:#7050a0;flex:1;min-width:70px}
.held-settings .pc-volume-control output{min-width:38px;font-size:12px}
@media(max-width:520px){.held-settings .pc-extra-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.held-settings .tool-group-buttons{grid-template-columns:1fr}.held-settings>h2{font-size:20px}}
body.held-mode[data-pc-theme] .held-settings{
 background:#f2d9ad!important;color:#30452d!important;border:2px solid #ad7748!important;
 border-radius:22px!important;padding:26px!important;box-shadow:0 4px 0 #79522f!important;
}
body.held-mode .held-settings>h2{color:#30452d;margin:0 0 22px;padding:10px 0 20px;border-bottom:1px solid #ae885c;font-size:22px}
body.held-mode .held-settings .toolbar{display:grid!important;gap:18px!important}
body.held-mode .held-settings .tool-group{padding:0;background:none!important;border:0!important;box-shadow:none}
body.held-mode .held-settings .tool-group-label{margin-bottom:10px;color:#586448}
body.held-mode .held-settings .tool-group-buttons{gap:10px}
body.held-mode .held-settings .pc-extra-tools{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));padding:20px 0!important;margin-top:22px;border:0!important;border-top:1px solid #c3a271!important;border-bottom:1px solid #c3a271!important;background:none!important;gap:10px}
body.held-mode .held-settings .screen-tools{padding:0!important;margin-top:22px;background:none!important;border:0!important;gap:14px}
body.held-mode[data-pc-theme] .held-settings :is(button,select){
 background:#fae8c7!important;color:#30452d!important;border:1px solid #b88049!important;border-radius:12px!important;
 min-height:48px;padding:12px!important;box-shadow:none!important;font-size:14px!important;line-height:1.45;
}
body.held-mode[data-pc-theme] .held-settings button.primary{background:#355632!important;color:#fff2d5!important;border-color:#355632!important}
body.held-mode[data-pc-theme] .held-settings button:hover:not(:disabled){background:#fff3db!important}
body.held-mode[data-pc-theme] .held-settings button.primary:hover:not(:disabled){background:#476a40!important}
body.held-mode[data-pc-theme] .held-settings button:disabled{background:#e8d4ae!important;color:#9a8c71!important;border-color:#cfb58a!important}
body.held-mode .held-settings #pcVolume{accent-color:#355632}
/* All immersive dialogs share the floating HUD's visual language. */
body.held-mode[data-pc-theme] dialog{
 color:#eef8ec!important;background:linear-gradient(135deg,#173e39f2,#202b42ed)!important;
 border:1px solid #bde9d36b!important;border-radius:18px!important;
 box-shadow:0 24px 80px #0006,inset 0 1px #ffffff18!important;
 padding:24px!important;max-height:85svh;overflow:auto;backdrop-filter:blur(18px);
 scrollbar-width:thin;scrollbar-color:#75988a #233d38;
}
body.held-mode dialog::backdrop{background:#081c2166;backdrop-filter:blur(6px)}
body.held-mode[data-pc-theme] dialog :is(h2,p,label,summary,.note,.tool-group-label,.heading){color:#e0eee4!important}
body.held-mode[data-pc-theme] dialog :is(button,select,input,textarea){
 color:#eef8ec!important;background:#c0e3da12!important;border:1px solid #bde9d345!important;
 box-shadow:none!important;border-radius:10px!important;min-height:44px;padding:10px 14px;
}
body.held-mode[data-pc-theme] dialog button:hover:not(:disabled){background:#c0e3da28!important}
body.held-mode[data-pc-theme] dialog :is(button.primary,button[aria-pressed="true"]){background:#5d9a803d!important;border-color:#a3dfbd!important}
body.held-mode[data-pc-theme] dialog button:disabled{color:#a8b8b0!important;background:#a5b6ae09!important;border-color:#9fb8aa22!important;opacity:.5}
body.held-mode[data-pc-theme] dialog :is(.tool-group,.pc-extra-tools,.screen-tools){background:transparent!important;border-color:#bde9d32b!important}
body.held-mode[data-pc-theme] dialog :is(.heading,h2){border-color:#bde9d32b!important}
body.held-mode[data-pc-theme] dialog select option{background:#203a35;color:#eef8ec}
body.held-mode #themeChoices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.held-mode #themeChoices .theme-swatch{height:48px}
body.held-mode #themeChoices button{padding:10px!important;font-size:13px}
body.held-mode #themeChoices strong{color:inherit!important}
.held-scene{pointer-events:none;z-index:0}
.held-scene #screenWrap{pointer-events:auto}
.held-stage>.held-toggle,.held-stage>.held-zoom,.held-stage>.held-dock{z-index:20!important}
.held-stage{animation:none}
.held-stage>.held-toggle:hover,.held-stage>.held-toggle:active{transform:translateY(-50%)!important}
body.held-mode .held-settings>h2{color:#eef8ec!important}
/* Override legacy desktop AND mobile theme selectors for every HUD dialog.
   Keep this scope desktop-only: held-mode is only enabled for desktop. */
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog{
 --pc-panel:#18302e;--pc-button:#263e3d;--pc-accent:#a9d9bc;--pc-hover:#36564d;
 --ui-text:#edf5ed;--ui-muted:#b8cec6;--ui-edge:#74978b;
 --ui-primary-text:#18382b;--ui-disabled:#263533;--ui-shadow:transparent;--ui-focus:#a9d9bc;
 background:linear-gradient(145deg,rgba(24,48,46,.97),rgba(25,30,44,.97))!important;
 color:#edf5ed!important;border:1px solid #74978b!important;border-radius:24px!important;
 box-shadow:0 30px 100px #0008!important;padding:28px!important;
 max-width:calc(100vw - 32px);max-height:88svh;box-sizing:border-box;
}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(h2,h3,p,label,small,summary,strong,output,.note,.eyebrow){color:inherit!important;text-shadow:none}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog .heading{gap:20px;padding-bottom:18px;margin-bottom:20px;border-bottom:1px solid #ffffff20!important}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(button,select,textarea,input:not([type=range]):not([type=checkbox]):not([type=radio])){
 background:#ffffff0b!important;color:#edf5ed!important;border:1px solid #ffffff26!important;
 border-radius:12px!important;box-shadow:none!important;min-height:44px;padding:10px 14px;
 font:600 14px/1.5 'Chakra Petch',Tahoma,sans-serif;text-shadow:none;
}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(button.primary,button[aria-pressed=true]){background:#a9d9bc!important;color:#18382b!important;border-color:#a9d9bc!important}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog button:hover:not(:disabled){background:#36564d!important;color:#edf5ed!important}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(button,input,select):disabled{background:#ffffff05!important;color:#899d95!important;border-color:#ffffff0c!important;opacity:1;cursor:not-allowed}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(input,button,textarea,select):focus-visible{outline:2px solid #a9d9bc!important;outline-offset:3px}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(input[type=range],input[type=checkbox],input[type=radio]){accent-color:#a9d9bc;min-height:initial;padding:0}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(select option){background:#203a35;color:#edf5ed}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(textarea,input)::placeholder{color:#a5bbb1;opacity:1}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(a){color:#b7e6cc}
body.handheld-shell.held-mode[data-pc-theme][data-mobile-theme] dialog :is(.library-game-delete){background:transparent!important;color:#edf5ed!important}
.held-settings .held-menu-intro{margin:-12px 0 22px;font-size:14px;opacity:.75}
.held-settings .held-menu-section{padding:18px;margin:0 0 14px;border:1px solid #ffffff18;border-radius:16px;background:#ffffff03}
.held-settings .held-menu-section h3{margin:0 0 4px;font-size:16px;font-weight:700}
.held-settings .held-menu-section>p{margin:0 0 14px;font-size:12px;line-height:1.6;opacity:.7}
.held-settings .held-menu-section .held-save-hint{margin:12px 0 0}
.held-settings .held-shortcut{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:18px 0 0;font-size:13px}
.held-settings .held-shortcut span{opacity:.65;font-size:12px}
.held-settings .held-picture-field{display:grid;gap:8px;min-width:0}
.held-settings .held-picture-field>span{font-size:13px;color:#b8cec6;line-height:1.6}
.held-settings .screen-tools #openShader,.held-settings .screen-tools #speed{width:100%;box-sizing:border-box;height:48px}
.held-settings .screen-tools #pcVolume{width:100%;min-width:0;margin:0;accent-color:#a9d9bc}
.held-settings .pc-volume-control output{text-align:right}
.held-settings kbd{border:1px solid #ffffff35;border-bottom-width:3px;padding:3px 10px;border-radius:6px;font:600 12px/1.5 inherit;background:#ffffff0b}

.held-ai-status{position:absolute;left:16px;bottom:66px;z-index:20;display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #b9d9ce55;border-radius:12px;background:#172e2de0;color:#d5dfdc;font-size:13px;font-weight:600;line-height:20px;backdrop-filter:blur(10px);pointer-events:none}
.held-ai-status::before{content:'';width:7px;height:7px;border-radius:50%;background:#8b9b9b;flex:none}
.held-ai-status[data-active="true"]{color:#dffce9;border-color:#9bdfb57a}
.held-ai-status[data-active="true"]::before{background:#93e4af;box-shadow:0 0 8px #93e4af55}
