/* Pocket handheld shell (shared). Original artwork, no third-party marks. */
html.hh-lock,html.hh-lock body{overflow:hidden!important;overscroll-behavior:none;-webkit-overflow-scrolling:auto}
html.hh-lock body{position:fixed;left:0;right:0;width:100%;height:100%;touch-action:none}
.hh-launch[hidden],.hh-root[hidden]{display:none!important}

/* ---------- launcher ---------- */
.hh-launch{position:fixed;inset:0;height:100vh;height:100dvh;z-index:9400;display:flex;align-items:center;justify-content:center;padding:16px;
  background:var(--hh-launch-bg) repeating-linear-gradient(0deg,rgba(255,255,255,.03) 0 2px,transparent 2px 4px);color:#e9e6dc;
  font-family:"Courier New",ui-monospace,Menlo,monospace;overflow:auto;touch-action:manipulation;-webkit-user-select:none;user-select:none;text-align:center}
.hh-lcard{width:min(100%,380px);display:flex;flex-direction:column;align-items:center;gap:14px}
.hh-lbrand{font:italic 900 22px/1 "Trebuchet MS",system-ui,sans-serif;letter-spacing:.14em;color:var(--hh-launch-brand)}
.hh-ltitle{margin:0;font:900 clamp(26px,8vw,38px)/1.1 "Trebuchet MS",system-ui,sans-serif;color:#fff;text-transform:uppercase;letter-spacing:.04em}
.hh-lscr{width:100%;background:#9bbc0f;color:#0f380f;border:6px solid var(--hh-bezel-solid);border-radius:10px 10px 28px 10px;padding:22px 10px;font-weight:700;letter-spacing:.12em;box-shadow:inset 0 0 0 3px #0f380f33}
.hh-blink{animation:hhb 1.1s steps(2,jump-none) infinite}
@keyframes hhb{50%{opacity:.25}}
.hh-open{font:900 22px/1 "Trebuchet MS",system-ui,sans-serif;letter-spacing:.08em;color:#fff;background:var(--hh-ab);border:0;border-radius:999px;padding:18px 38px;min-height:64px;min-width:230px;cursor:pointer;
  box-shadow:0 5px 0 var(--hh-ab-edge),0 10px 16px rgba(0,0,0,.4);touch-action:manipulation}
.hh-open:active{transform:translateY(3px);box-shadow:0 2px 0 var(--hh-ab-edge)}
.hh-open:focus-visible,.hh-lback:focus-visible,.hh-exit:focus-visible,.hh-btn:focus-visible{outline:3px solid #ffd54a;outline-offset:3px}
.hh-lnote{margin:0;font-size:13px;line-height:1.45;color:#a9a597}
.hh-lback{color:#cfcab9;font-size:15px;padding:12px 16px;text-decoration:underline}

/* ---------- takeover ---------- */
.hh-root{position:fixed;inset:0;height:100vh;height:100dvh;z-index:9400;display:flex;align-items:stretch;justify-content:center;
  background:var(--hh-backdrop);touch-action:none;overscroll-behavior:none;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;font-family:"Trebuchet MS",system-ui,sans-serif;color:#2a2a32}
.hh-root *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.hh-shell{--ch:clamp(176px,31dvh,268px);--pad:calc(var(--ch)*.64);position:relative;display:flex;flex-direction:column;
  width:min(100vw,520px,calc(100dvh*.66));height:100%;box-sizing:border-box;
  padding:max(6px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
  background:var(--hh-shell);border-radius:var(--hh-radius);box-shadow:inset 0 2px 0 #fff8,inset 0 -3px 0 #0003,0 0 40px #000a}
.hh-top{flex:none;height:34px;display:flex;align-items:center;gap:6px;padding:0 4px}
.hh-sp{flex:1}
.hh-led{width:9px;height:9px;border-radius:50%;background:var(--hh-led);box-shadow:0 0 6px var(--hh-led)}
.hh-ledtxt{font:700 9px/1 "Trebuchet MS",system-ui,sans-serif;letter-spacing:.18em;color:var(--hh-label)}
.hh-exit{width:34px;height:34px;border-radius:50%;border:0;background:var(--hh-btn2);color:var(--hh-btn2-text);font:700 16px/1 system-ui,sans-serif;cursor:pointer;box-shadow:0 2px 0 var(--hh-btn2-edge);touch-action:manipulation;padding:0}
.hh-exit:active{transform:translateY(1px)}
.hh-area{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.hh-bezel{flex:none;max-width:100%;box-sizing:border-box;background:var(--hh-bezel);border-radius:var(--hh-bezel-radius);padding:12px 14px 10px;box-shadow:inset 0 2px 4px #0006,0 2px 0 #fff6}
.hh-lcd{position:relative;overflow:hidden;background:#000;border-radius:3px;box-shadow:0 0 0 3px #1c1c26;transform:translateZ(0);isolation:isolate;touch-action:none}
.hh-brand{flex:none;display:flex;align-items:center;gap:5px;padding-top:5px;line-height:1}
.hh-brand b{font:italic 900 15px/1 "Trebuchet MS",system-ui,sans-serif;letter-spacing:.12em;color:var(--hh-brand)}
.hh-brand i{display:block;width:16px;height:3px;border-radius:2px;background:var(--hh-stripe1)}.hh-brand i+i{background:var(--hh-stripe2)}

.hh-ctl{position:relative;flex:none;height:var(--ch);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto;padding:0 4px}
.hh-dwrap{grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:center}
.hh-dpad{position:relative;width:var(--pad);height:var(--pad);touch-action:none;cursor:pointer;filter:drop-shadow(0 3px 0 #0003)}
.hh-arm,.hh-hub{position:absolute;background:var(--hh-dpad)}
.hh-hub{left:33.3%;top:33.3%;width:33.4%;height:33.4%}
.hh-arm.hh-up,.hh-arm.hh-down{left:33.3%;width:33.4%;height:36%}
.hh-arm.hh-left,.hh-arm.hh-right{top:33.3%;height:33.4%;width:36%}
.hh-arm.hh-up{top:0;border-radius:8px 8px 0 0}.hh-arm.hh-down{bottom:0;border-radius:0 0 8px 8px}
.hh-arm.hh-left{left:0;border-radius:8px 0 0 8px}.hh-arm.hh-right{right:0;border-radius:0 8px 8px 0}
.hh-arm::after{content:"";position:absolute;left:50%;top:50%;border:solid transparent;border-width:0}
.hh-up::after{border-width:0 7px 10px;border-bottom-color:var(--hh-dpad-arrow);transform:translate(-50%,-70%)}
.hh-down::after{border-width:10px 7px 0;border-top-color:var(--hh-dpad-arrow);transform:translate(-50%,-30%)}
.hh-left::after{border-width:7px 10px 7px 0;border-right-color:var(--hh-dpad-arrow);transform:translate(-70%,-50%)}
.hh-right::after{border-width:7px 0 7px 10px;border-left-color:var(--hh-dpad-arrow);transform:translate(-30%,-50%)}
.hh-arm.on{background:var(--hh-dpad-on)}.hh-arm.on::after{opacity:.6}
.hh-ab{grid-column:2;grid-row:1;position:relative;width:calc(var(--pad)*1.08);height:calc(var(--pad)*.7);margin:auto;transform:rotate(-20deg)}
.hh-btn{font:900 calc(var(--pad)*.17)/1 "Trebuchet MS",system-ui,sans-serif;touch-action:none;cursor:pointer;border:0;padding:0;outline-offset:3px}
.hh-btn.hh-a,.hh-btn.hh-b{position:absolute;width:calc(var(--pad)*.5);height:calc(var(--pad)*.5);border-radius:50%;color:var(--hh-ab-text);
  background:var(--hh-ab);box-shadow:0 4px 0 var(--hh-ab-edge),0 8px 10px #0004;text-shadow:0 1px 0 var(--hh-ab-edge)}
.hh-btn.hh-a{right:0;top:0}.hh-btn.hh-b{left:0;bottom:0}
.hh-btn.on,.hh-btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--hh-ab-edge),0 3px 4px #0004;filter:brightness(.88)}
.hh-mid{grid-column:1/3;grid-row:2;display:flex;justify-content:center;gap:clamp(20px,9vw,44px);padding:0 0 4px}
.hh-pillw{position:relative;display:flex;flex-direction:column;align-items:center;gap:5px}
.hh-pillw.hh-off{visibility:hidden}
.hh-btn.hh-select,.hh-btn.hh-start{position:relative;width:44px;height:15px;border-radius:8px;background:var(--hh-pill);box-shadow:0 2px 0 var(--hh-pill-edge);transform:rotate(-24deg)}
.hh-btn.hh-select::after,.hh-btn.hh-start::after{content:"";position:absolute;inset:-14px -8px}
.hh-btn.hh-select.on,.hh-btn.hh-start.on{transform:rotate(-24deg) translateY(2px);box-shadow:0 0 0 var(--hh-pill-edge)}
.hh-pl{font:800 8px/1 "Trebuchet MS",system-ui,sans-serif;letter-spacing:.14em;color:var(--hh-label)}
.hh-grille{position:absolute;right:16px;bottom:8px;display:flex;gap:5px;transform:rotate(-24deg);pointer-events:none}
.hh-grille i{display:block;width:4px;height:30px;border-radius:3px;background:var(--hh-grille);box-shadow:inset 1px 0 0 #0003,1px 0 0 #fff6}

/* landscape phones: screen in the middle, D-pad left, A/B right */
@media (orientation:landscape) and (max-height:600px){
  .hh-shell{--pad:min(150px,42dvh);--side:calc(var(--pad)*1.3);width:100vw;display:grid;grid-template-columns:var(--side) minmax(0,1fr) var(--side);grid-template-rows:minmax(0,1fr);
    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));border-radius:14px 14px 56px 14px}
  .hh-top{position:absolute;left:12px;right:12px;top:6px;height:0;padding:0;z-index:5;pointer-events:none}
  .hh-led,.hh-ledtxt{display:none}
  .hh-exit{pointer-events:auto;position:absolute;right:0;top:4px;width:36px;height:36px}
  .hh-area{grid-column:2;grid-row:1}
  .hh-brand,.hh-grille{display:none}
  .hh-bezel{padding:8px 10px 8px;border-radius:8px 8px 26px 8px}
  .hh-ctl{display:contents}
  .hh-dwrap{grid-column:1;grid-row:1}
  .hh-ab{grid-column:3;grid-row:1}
  .hh-mid{display:contents}
  .hh-pillw{grid-row:1;align-self:end;justify-self:center;margin-bottom:6px}
  .hh-pillw:first-child{grid-column:1}.hh-pillw:last-child{grid-column:3}
}

/* wide style: landscape console even on big windows */
@media (orientation:landscape) and (min-height:601px){
  html[data-hh-style="wide"] .hh-shell{--pad:min(150px,42dvh);--side:calc(var(--pad)*1.3);width:100vw;display:grid;grid-template-columns:var(--side) minmax(0,1fr) var(--side);grid-template-rows:minmax(0,1fr);
    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));border-radius:14px 14px 56px 14px}
  html[data-hh-style="wide"] .hh-top{position:absolute;left:12px;right:12px;top:6px;height:0;padding:0;z-index:5;pointer-events:none}
  html[data-hh-style="wide"] .hh-led,html[data-hh-style="wide"] .hh-ledtxt{display:none}
  html[data-hh-style="wide"] .hh-exit{pointer-events:auto;position:absolute;right:0;top:4px;width:36px;height:36px}
  html[data-hh-style="wide"] .hh-area{grid-column:2;grid-row:1}
  html[data-hh-style="wide"] .hh-brand,html[data-hh-style="wide"] .hh-grille{display:none}
  html[data-hh-style="wide"] .hh-bezel{padding:8px 10px 8px;border-radius:8px 8px 26px 8px}
  html[data-hh-style="wide"] .hh-ctl{display:contents}
  html[data-hh-style="wide"] .hh-dwrap{grid-column:1;grid-row:1}
  html[data-hh-style="wide"] .hh-ab{grid-column:3;grid-row:1}
  html[data-hh-style="wide"] .hh-mid{display:contents}
  html[data-hh-style="wide"] .hh-pillw{grid-row:1;align-self:end;justify-self:center;margin-bottom:6px}
  html[data-hh-style="wide"] .hh-pillw:first-child{grid-column:1}
  html[data-hh-style="wide"] .hh-pillw:last-child{grid-column:3}
  html[data-hh-style="wide"] .hh-root{align-items:center}
  html[data-hh-style="wide"] .hh-shell{width:min(100vw,1040px);height:min(100%,640px);--pad:min(170px,30dvh);border-radius:18px 18px 70px 18px}
}


/* ---------- inside the screen: shared fixes so any game fills the LCD ---------- */
.hh-lcd>*{box-sizing:border-box}
.hh-lcd canvas{max-width:none}
body>.ghost{z-index:9450}
.hh-nav{outline:3px solid #ffd54a!important;outline-offset:2px!important;box-shadow:0 0 0 6px #0008!important}

/* Core Break + Castle Quest: full-window canvases fill the screen */
.hh-lcd[data-game="core-break"] canvas,.hh-lcd[data-game="castle-quest"] canvas{width:100%!important;height:100%!important;display:block}
.hh-lcd[data-game="core-break"]{background:#0b1026}
.hh-lcd[data-game="core-break"] #mute{position:absolute;top:6px}
.hh-lcd[data-game="castle-quest"] #mute{position:absolute;top:6px;right:6px}
.hh-lcd[data-game="castle-quest"] .ov{position:absolute;inset:0}
.hh-lcd[data-game="castle-quest"] .ov.title{padding:8px}
.hh-lcd[data-game="castle-quest"] .ov.title .box{margin:auto auto 8px}
.hh-lcd[data-game="castle-quest"] .box h1{font-size:clamp(26px,8vw,40px)}
.hh-lcd[data-game="castle-quest"] .btns button{min-width:0;width:100%;padding:10px 14px;font-size:17px}

/* Road Dodge + Dino Life: the game box fills the LCD */
.hh-lcd[data-game="road-dodge"] .game,.hh-lcd[data-game="dino-life"] .game,.hh-lcd[data-game="dino-dash"] .game{width:100%!important;height:100%!important;max-width:none!important;aspect-ratio:auto!important;border-radius:0!important;margin:0!important;border:0!important;box-shadow:none!important}

/* Corn Maze Chase + Runway (canvas sized by handheld.js canvasFit) */
.hh-lcd[data-game="corn-maze"],.hh-lcd[data-game="runway"]{background:#2b1d0e}
.hh-lcd[data-game="corn-maze"] .game-wrap,.hh-lcd[data-game="runway"] .game-wrap{width:100%;height:100%;gap:0;align-items:stretch;background:#fff8ec}
.hh-lcd[data-game="corn-maze"] .hud,.hh-lcd[data-game="runway"] .hud{flex:none;flex-wrap:nowrap;gap:4px;font-size:.78rem;padding:4px 4px;justify-content:center}
.hh-lcd[data-game="corn-maze"] .hud .pill,.hh-lcd[data-game="runway"] .hud .pill{min-height:30px;padding:0 7px;border-width:2px;white-space:nowrap;line-height:1}
.hh-lcd[data-game="corn-maze"] .hud .btn.icon,.hh-lcd[data-game="runway"] .hud .btn.icon{min-height:30px;width:30px;min-width:30px;font-size:.95rem}
.hh-lcd[data-game="corn-maze"] .stage,.hh-lcd[data-game="runway"] .stage{flex:1 1 0;min-height:0;max-width:none;width:100%;display:flex;align-items:center;justify-content:center;background:#2b1d0e;overflow:hidden}
.hh-lcd[data-game="corn-maze"] .stage canvas,.hh-lcd[data-game="runway"] .stage canvas{flex:none;max-width:none;border:0;border-radius:0}
.hh-lcd[data-game="corn-maze"] .overlay,.hh-lcd[data-game="runway"] .overlay{border-radius:0;padding:10px;gap:8px}
.hh-lcd[data-game="corn-maze"] .overlay h2,.hh-lcd[data-game="runway"] .overlay h2{font-size:1.35rem}
.hh-lcd[data-game="corn-maze"] .overlay p,.hh-lcd[data-game="runway"] .overlay p{font-size:.9rem;line-height:1.3;max-width:28ch}
.hh-lcd[data-game="corn-maze"] .overlay .btn.big,.hh-lcd[data-game="runway"] .overlay .btn.big{min-height:52px;padding:10px 24px;font-size:1.15rem}
.hh-lcd[data-game="corn-maze"] .banner,.hh-lcd[data-game="runway"] .banner{font-size:1.1rem;padding:8px 14px;white-space:nowrap}
.hh-lcd[data-game="corn-maze"] .dpad,.hh-lcd[data-game="corn-maze"] .how,.hh-lcd[data-game="runway"] .dpad,.hh-lcd[data-game="runway"] .how{display:none}

/* Dream Doll House */
.hh-lcd[data-game="dream-doll-house"] #app{height:100%!important;min-height:0!important;max-width:none!important;overflow:hidden}
.hh-lcd[data-game="dream-doll-house"] #app>*{flex-shrink:0}
.hh-lcd[data-game="dream-doll-house"] #stageWrap{height:38%;max-height:none;flex:none;padding:0 6px}
.hh-lcd[data-game="dream-doll-house"] #stage{width:auto;height:100%;max-width:100%;max-height:none;aspect-ratio:4/3}
.hh-lcd[data-game="dream-doll-house"] #panel{flex:1 1 0;min-height:60px}
.hh-lcd[data-game="dream-doll-house"] #ov{position:absolute;inset:0}
.hh-lcd[data-game="dream-doll-house"]{background:linear-gradient(#ffe3f1,#f3e1ff)}

/* The Farm */
.hh-lcd[data-game="farm"]{background:#cfeab4}
/* overlays taller than the little screen scroll instead of being cut off (Sell Woolly? buttons were clipped on phone landscape) */
.hh-lcd[data-game="farm"] .overlay{position:absolute;inset:0;align-items:start;overflow-y:auto}
.hh-lcd[data-game="farm"] .overlay>.card{margin:0 auto}
.hh-lcd[data-game="farm"] .overlay{padding:6px}
.hh-lcd[data-game="farm"] .overlay>.card{max-height:100%!important;overflow-y:auto;-webkit-overflow-scrolling:touch}
@media (max-height:520px){
  .hh-lcd[data-game="farm"] .sellcard .sell-pic,.hh-lcd[data-game="farm"] .sellcard .tip,.hh-lcd[data-game="farm"] .sellcard p.small{display:none}
  .hh-lcd[data-game="farm"] .sellcard h2{font-size:1.2rem;margin:0 0 4px}
}

/* Repair Shop */
.hh-lcd[data-game="repair-shop"] .app{max-width:none!important;height:100%!important;min-height:0!important;overflow-y:auto}

/* Shopping Spree: same light shop background as the page (was black behind dark text) */
.hh-lcd[data-game="shopping-spree"]{background:#e8f8ef linear-gradient(#cfeee0 0,#fff8ec 55%)}
.hh-lcd[data-game="shopping-spree"] main{height:100%;max-width:none;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
.hh-lcd[data-game="shopping-spree"] .cart-col{position:static!important;margin:0;padding-left:0;padding-right:0}
/* the LCD is phone-sized even on a wide landscape screen, so always use the one-column store (the desktop two-column grid pushed the cart off the screen) */
.hh-lcd[data-game="shopping-spree"] .store-body{display:block}
.hh-lcd[data-game="shopping-spree"] .stock{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.hh-lcd[data-game="shopping-spree"] .item{min-height:96px}
.hh-lcd[data-game="shopping-spree"] .item .em{font-size:2.1rem}
.hh-lcd[data-game="shopping-spree"] .checkout{display:block}
.hh-lcd[data-game="shopping-spree"] .wallet-tray{padding:6px 8px 8px}
.hh-lcd[data-game="shopping-spree"] .wallet-tray .youhave{font-size:1.3rem;margin:0 0 4px}
.hh-lcd[data-game="shopping-spree"] .wallet-tray .money-row{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding:2px 2px 6px;scrollbar-width:thin}

/* Learn pages (reading, writing, math, runway) */
.hh-lcd[data-game^="learn-"]{background:#fff8ec;overflow:auto}
.hh-lcd[data-game^="learn-"] main{padding:8px 10px;max-width:none;height:100%;overflow-y:auto;overflow-x:hidden}
.hh-lcd[data-game^="learn-"] h1{font-size:1.2rem;margin:.1em 0 .3em}

/* no ad slots inside the handheld screen */
.hh-lcd .ka-ad,.hh-lcd [data-ka-ad]{display:none!important}

/* shorter phones: squeeze the shell a little so the screen stays big */
@media (orientation:portrait) and (max-height:720px){
  .hh-shell{--ch:clamp(160px,28dvh,268px)}
  .hh-top{height:28px}.hh-exit{width:30px;height:30px}
  .hh-bezel{padding:8px 10px 8px}
  .hh-brand{padding-top:3px}
}

/* ================= THEMES (CSS variables) =================
   Every theme sets the same variables. [data-hh-theme] works on <html> and on the little previews in Settings. */
:root,[data-hh-theme="classic"]{
  --hh-shell:linear-gradient(160deg,#d9d5c9,#bcb7a8 70%,#aaa595);
  --hh-radius:16px 16px 72px 16px; --hh-bezel-radius:10px 10px 34px 10px;
  --hh-bezel:#4a4a5c; --hh-bezel-solid:#4a4a5c;
  --hh-dpad:#2a2a32; --hh-dpad-arrow:#5b5b68; --hh-dpad-on:#101016;
  --hh-ab:radial-gradient(circle at 35% 28%,#e04a76,#a3224f 58%,#7d1a3c); --hh-ab-edge:#5e1230; --hh-ab-text:#f3c9d6;
  --hh-pill:linear-gradient(#9a9aa6,#7c7c88); --hh-pill-edge:#4a4a54;
  --hh-label:#6b6759; --hh-brand:#32357a; --hh-stripe1:#a3224f; --hh-stripe2:#1f6f8b; --hh-led:#e23b3b; --hh-grille:#8f8a7b;
  --hh-btn2:#4a4a5c; --hh-btn2-text:#e8e6dc; --hh-btn2-edge:#2a2a38;
  --hh-backdrop:#0e0e14 radial-gradient(ellipse at 50% 30%,#23232f,#0e0e14 70%);
  --hh-launch-bg:#15151d; --hh-launch-brand:#b9b4a4;
  --hh-accent:#2b4c9b; --hh-accent2:#0072B2; --hh-home-bg:#fff8ec; --hh-glow1:#ffe9c7; --hh-glow2:#d9f0ff; --hh-sect:#e7eeff; --hh-line:#ffd9a0;
}
[data-hh-theme="pea"]{
  --hh-shell:linear-gradient(160deg,#cdd3ab,#aeb683 70%,#9aa26e);
  --hh-bezel:#4b5340; --hh-bezel-solid:#4b5340; --hh-dpad:#2c3324; --hh-dpad-arrow:#6a7458; --hh-dpad-on:#151a10;
  --hh-ab:radial-gradient(circle at 35% 28%,#d9625a,#a53a35 58%,#772522); --hh-ab-edge:#4f1a18; --hh-ab-text:#f6d4d0;
  --hh-pill:linear-gradient(#a9b090,#8a9270); --hh-pill-edge:#555d40;
  --hh-label:#5d6340; --hh-brand:#2f3a1f; --hh-stripe1:#a53a35; --hh-stripe2:#3d5a2a; --hh-led:#d9423b; --hh-grille:#8a926a;
  --hh-btn2:#4b5340; --hh-btn2-text:#e6ebd2; --hh-btn2-edge:#2a3022;
  --hh-launch-bg:#12170f; --hh-launch-brand:#b9c29a;
  --hh-accent:#4f7a2f; --hh-accent2:#4f7a2f; --hh-home-bg:#f3f6e1; --hh-glow1:#e3edc0; --hh-glow2:#f1f6d8; --hh-sect:#eaf2d5; --hh-line:#c3d69a;
}
[data-hh-theme="atomic"]{
  --hh-shell:linear-gradient(160deg,rgba(168,110,240,.80),rgba(105,58,182,.82) 70%,rgba(72,38,142,.86));
  --hh-bezel:rgba(36,26,58,.88); --hh-bezel-solid:#2a2044; --hh-dpad:#1b1230; --hh-dpad-arrow:#8a76b8; --hh-dpad-on:#0c0718;
  --hh-ab:radial-gradient(circle at 35% 28%,#9ff6ff,#2bb7d9 58%,#17788f); --hh-ab-edge:#0b4a5c; --hh-ab-text:#04303c;
  --hh-pill:linear-gradient(rgba(255,255,255,.55),rgba(215,200,255,.4)); --hh-pill-edge:rgba(30,10,70,.6);
  --hh-label:#eadfff; --hh-brand:#f1e8ff; --hh-stripe1:#7cf0ff; --hh-stripe2:#ffd54a; --hh-led:#7cf0ff; --hh-grille:rgba(40,20,90,.55);
  --hh-btn2:rgba(30,20,52,.85); --hh-btn2-text:#eadfff; --hh-btn2-edge:#120a26;
  --hh-backdrop:#0b0716 radial-gradient(ellipse at 50% 30%,#2a1a52,#0b0716 72%);
  --hh-launch-bg:#100a20; --hh-launch-brand:#cdb8ff;
  --hh-accent:#7a45d6; --hh-accent2:#7a45d6; --hh-home-bg:#f5eeff; --hh-glow1:#e5d4ff; --hh-glow2:#d4f4ff; --hh-sect:#eadffc; --hh-line:#cdb4f5;
}
html[data-hh-theme="atomic"] .hh-shell::before,.hs-mini[data-hh-theme="atomic"] .hs-m-shell::before{content:"";position:absolute;inset:0;z-index:0;border-radius:inherit;pointer-events:none;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.10) 0 2px,transparent 2px 22px),repeating-linear-gradient(0deg,rgba(255,255,255,.08) 0 2px,transparent 2px 22px)}
html[data-hh-theme="atomic"] .hh-shell>*{z-index:1}
[data-hh-theme="berry"]{
  --hh-shell:linear-gradient(160deg,#ee6a80,#cc3a55 70%,#a8233c);
  --hh-bezel:#3a2530; --hh-bezel-solid:#3a2530; --hh-dpad:#2b1a22; --hh-dpad-arrow:#7a5662; --hh-dpad-on:#150b10;
  --hh-ab:radial-gradient(circle at 35% 28%,#ffe9a6,#f2b84b 58%,#c98a1e); --hh-ab-edge:#8a5a10; --hh-ab-text:#6b4300;
  --hh-pill:linear-gradient(#f6b0bc,#dc7f90); --hh-pill-edge:#8d3347;
  --hh-label:#ffe3e8; --hh-brand:#fff3f5; --hh-stripe1:#ffd24a; --hh-stripe2:#ffffff; --hh-led:#ffd24a; --hh-grille:#9c2a40;
  --hh-btn2:#3a2530; --hh-btn2-text:#ffe3e8; --hh-btn2-edge:#1d1016;
  --hh-launch-bg:#1a0f13; --hh-launch-brand:#f2b0be;
  --hh-accent:#c93550; --hh-accent2:#c93550; --hh-home-bg:#fff1f4; --hh-glow1:#ffd7df; --hh-glow2:#ffe9c7; --hh-sect:#ffe4ea; --hh-line:#f5b3c0;
}
[data-hh-theme="ocean"]{
  --hh-shell:linear-gradient(160deg,#5fcfca,#2fa6a2 70%,#208482);
  --hh-bezel:#24424a; --hh-bezel-solid:#24424a; --hh-dpad:#17323a; --hh-dpad-arrow:#5c8791; --hh-dpad-on:#0b1a1f;
  --hh-ab:radial-gradient(circle at 35% 28%,#ffb08a,#e8643a 58%,#b8431f); --hh-ab-edge:#7a2c12; --hh-ab-text:#ffe6da;
  --hh-pill:linear-gradient(#86dcd8,#55b8b4); --hh-pill-edge:#1f6b69;
  --hh-label:#dcfffd; --hh-brand:#0e3b44; --hh-stripe1:#ffd54a; --hh-stripe2:#ff9a6c; --hh-led:#ffd54a; --hh-grille:#1f7270;
  --hh-btn2:#24424a; --hh-btn2-text:#dcfffd; --hh-btn2-edge:#10252b;
  --hh-launch-bg:#0c1719; --hh-launch-brand:#8fdcd8;
  --hh-accent:#1f8a8a; --hh-accent2:#1f8a8a; --hh-home-bg:#eafbfa; --hh-glow1:#c8f2ef; --hh-glow2:#d9f0ff; --hh-sect:#daf5f3; --hh-line:#9ee0dc;
}
[data-hh-theme="sunny"]{
  --hh-shell:linear-gradient(160deg,#ffe56e,#f7c52b 70%,#e0a800);
  --hh-bezel:#4a4030; --hh-bezel-solid:#4a4030; --hh-dpad:#3a2f10; --hh-dpad-arrow:#9a8650; --hh-dpad-on:#1f1808;
  --hh-ab:radial-gradient(circle at 35% 28%,#6aa8f0,#2a62b0 58%,#1c4580); --hh-ab-edge:#12305c; --hh-ab-text:#d8e9ff;
  --hh-pill:linear-gradient(#ffeaa5,#e6c765); --hh-pill-edge:#a07c10;
  --hh-label:#7a5a00; --hh-brand:#7a3b00; --hh-stripe1:#2a62b0; --hh-stripe2:#e0553a; --hh-led:#e23b3b; --hh-grille:#c99a10;
  --hh-btn2:#4a4030; --hh-btn2-text:#fff0b8; --hh-btn2-edge:#272010;
  --hh-launch-bg:#17130a; --hh-launch-brand:#f2d77a;
  --hh-accent:#c98a00; --hh-accent2:#c98a00; --hh-home-bg:#fffbe3; --hh-glow1:#fff0a8; --hh-glow2:#ffe3c2; --hh-sect:#fff3c4; --hh-line:#f5d96a;
}
[data-hh-theme="midnight"]{
  --hh-shell:linear-gradient(160deg,#3d404a,#272930 70%,#17181d);
  --hh-radius:16px 16px 72px 16px;
  --hh-bezel:#0d0e11; --hh-bezel-solid:#0d0e11; --hh-dpad:#0b0b0e; --hh-dpad-arrow:#5a5f6e; --hh-dpad-on:#000;
  --hh-ab:radial-gradient(circle at 35% 28%,#ffad63,#e8601c 58%,#a83c0c); --hh-ab-edge:#6b2306; --hh-ab-text:#fff0e0;
  --hh-pill:linear-gradient(#555865,#3a3c46); --hh-pill-edge:#0c0c10;
  --hh-label:#9096a8; --hh-brand:#d4d8e6; --hh-stripe1:#ff9340; --hh-stripe2:#5cc8ff; --hh-led:#5cf2a0; --hh-grille:#0c0c10;
  --hh-btn2:#0d0e11; --hh-btn2-text:#cfd3e0; --hh-btn2-edge:#000;
  --hh-backdrop:#050507 radial-gradient(ellipse at 50% 30%,#14151b,#050507 70%);
  --hh-launch-bg:#08080b; --hh-launch-brand:#8d92a3;
  --hh-accent:#4b4f7a; --hh-accent2:#4b4f7a; --hh-home-bg:#eef0f7; --hh-glow1:#d7dbee; --hh-glow2:#e4e7f5; --hh-sect:#e0e3f1; --hh-line:#b9bdd6;
}
[data-hh-theme="earlybird"]{
  --hh-shell:linear-gradient(160deg,#f6e6bd,#e8cc8e 70%,#d3ad63);
  --hh-bezel:#5b4630; --hh-bezel-solid:#5b4630; --hh-dpad:#7a2e22; --hh-dpad-arrow:#e0b09c; --hh-dpad-on:#4a1a12;
  --hh-ab:radial-gradient(circle at 35% 28%,#9bdc6a,#4f9a2f 58%,#357020); --hh-ab-edge:#20480f; --hh-ab-text:#eaffd8;
  --hh-pill:linear-gradient(#ecd9a8,#cdac68); --hh-pill-edge:#8b6d2f;
  --hh-label:#7a5a2e; --hh-brand:#b5361f; --hh-stripe1:#4f9a2f; --hh-stripe2:#f2b630; --hh-led:#f2b630; --hh-grille:#a98748;
  --hh-btn2:#5b4630; --hh-btn2-text:#f6e6bd; --hh-btn2-edge:#33261a;
  --hh-backdrop:#1c140c radial-gradient(ellipse at 50% 30%,#3a2a18,#1c140c 70%);
  --hh-launch-bg:#1a130b; --hh-launch-brand:#e8cc8e;
  --hh-accent:#c95d43; --hh-accent2:#c95d43; --hh-home-bg:#fff5da; --hh-glow1:#ffe7a8; --hh-glow2:#d8f0b8; --hh-sect:#ffecc2; --hh-line:#f0c987;
}

/* ---- screen tint: green monochrome LCD ---- */
html[data-hh-tint="1"] .hh-lcd,html[data-hh-tint="1"] .hs-m-lcd{filter:grayscale(1) contrast(1.08) sepia(1) hue-rotate(28deg) saturate(2.1) brightness(.92)}

/* ---- home page accents follow the theme (Settings: "Match home page colors") ---- */
html[data-hh-home="1"]{--arcade:var(--hh-accent);--blue:var(--hh-accent2);--bg:var(--hh-home-bg)}
html[data-hh-home="1"] body{background-image:radial-gradient(circle at 10% 0%,var(--hh-glow1) 0,transparent 40%),radial-gradient(circle at 90% 10%,var(--hh-glow2) 0,transparent 40%)}
html[data-hh-home="1"] .section.arcade{background:var(--hh-sect)}
html[data-hh-home="1"] .site-header,html[data-hh-home="1"] .site-footer{border-color:var(--hh-line)}
html[data-hh-home="1"] .card{box-shadow:0 4px 0 var(--hh-line)}

/* ---- little palette / LCD buttons inside the takeover ---- */
.hh-pal,.hh-lcdb{width:34px;height:34px;border-radius:50%;border:0;background:var(--hh-btn2);color:var(--hh-btn2-text);font:800 9px/1 system-ui,sans-serif;letter-spacing:.02em;cursor:pointer;box-shadow:0 2px 0 var(--hh-btn2-edge);touch-action:manipulation;padding:0}
.hh-pal{font-size:16px}
.hh-pal:active,.hh-lcdb:active{transform:translateY(1px)}
.hh-lcdb[aria-pressed="true"]{background:#9bbc0f;color:#0f380f}
.hh-tname{font:800 10px/1 "Trebuchet MS",system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--hh-label);opacity:0;transition:opacity .25s;margin-right:6px;white-space:nowrap}
.hh-tname.show{opacity:1}
.hh-top .hh-pal,.hh-top .hh-lcdb{margin-right:6px}
.hh-voice{display:grid;place-items:center}.hh-voice .kav-ic{width:22px;height:22px}.hh-voice.kav-off{opacity:.6}
@media (orientation:landscape) and (max-height:600px){
  .hh-pal,.hh-lcdb{pointer-events:auto;position:absolute;top:4px;width:36px;height:36px;margin:0!important}
  .hh-pal{right:44px}.hh-lcdb{right:88px}.hh-pal.hh-voice{right:132px}
  .hh-tname{position:absolute;right:176px;top:16px;margin:0}
}
@media (orientation:landscape) and (min-height:601px){
  html[data-hh-style="wide"] .hh-pal,html[data-hh-style="wide"] .hh-lcdb{pointer-events:auto;position:absolute;top:4px;width:36px;height:36px;margin:0!important}
  html[data-hh-style="wide"] .hh-pal{right:44px}html[data-hh-style="wide"] .hh-lcdb{right:88px}html[data-hh-style="wide"] .hh-pal.hh-voice{right:132px}
  html[data-hh-style="wide"] .hh-tname{position:absolute;right:176px;top:16px;margin:0}
}

/* ================= SETTINGS PANEL (home page) ================= */
.hs-back{position:fixed;inset:0;height:100vh;height:100dvh;z-index:9300;background:rgba(15,18,30,.55);display:flex;align-items:flex-end;justify-content:center;overscroll-behavior:contain}
.hs-back[hidden]{display:none}
.hs-sheet{width:min(100%,640px);max-height:92vh;max-height:92dvh;display:flex;flex-direction:column;background:#fff;color:#1f2a44;border-radius:24px 24px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.35);font-family:"Trebuchet MS","Segoe UI",system-ui,sans-serif;animation:hsup .22s ease-out}
@keyframes hsup{from{transform:translateY(40px);opacity:.4}}
@media (min-width:700px){.hs-back{align-items:center}.hs-sheet{border-radius:24px}}
.hs-head{display:flex;align-items:center;gap:10px;padding:14px 16px 10px;border-bottom:3px solid #eef0f6}
.hs-head h2{margin:0;flex:1;font-size:1.3rem}
.hs-x{width:44px;height:44px;border-radius:50%;border:3px solid #1f2a44;background:#fff;font-size:1.2rem;font-weight:900;color:#1f2a44;cursor:pointer;touch-action:manipulation}
.hs-body{overflow-y:auto;padding:12px 16px 20px;-webkit-overflow-scrolling:touch}
.hs-body h3{margin:14px 0 8px;font-size:1rem;text-transform:uppercase;letter-spacing:.08em;color:#4a5568}
.hs-themes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (min-width:520px){.hs-themes{grid-template-columns:repeat(4,minmax(0,1fr))}}
.hs-theme{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 6px 10px;border-radius:16px;border:3px solid #d6dbe7;background:#f7f9fc;color:#1f2a44;font:inherit;font-weight:800;font-size:.95rem;cursor:pointer;touch-action:manipulation;min-height:44px}
.hs-theme[aria-checked="true"]{border-color:#1f2a44;background:#fff;box-shadow:0 0 0 4px #ffd54a}
.hs-theme:focus-visible,.hs-seg button:focus-visible,.hs-x:focus-visible,.hs-switch:focus-visible{outline:4px solid #111;outline-offset:2px}
.hs-seg{display:flex;gap:8px}
.hs-seg button{flex:1;min-height:48px;border-radius:14px;border:3px solid #d6dbe7;background:#f7f9fc;color:#1f2a44;font:inherit;font-weight:800;cursor:pointer;touch-action:manipulation;padding:6px 8px}
.hs-seg button[aria-checked="true"]{border-color:#1f2a44;background:#fff;box-shadow:0 0 0 3px #ffd54a}
.hs-seg small{display:block;font-weight:600;font-size:.72rem;color:#5a6477}
.hs-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:10px 12px;border-radius:14px;background:#f7f9fc}
.hs-switch{min-width:64px;min-height:44px;border-radius:999px;border:3px solid #1f2a44;background:#fff;font:inherit;font-weight:900;cursor:pointer;touch-action:manipulation}
.hs-switch[aria-checked="true"]{background:#1f8a4c;color:#fff;border-color:#0f5b30}
.hs-note{margin:10px 0 0;font-size:.85rem;color:#5a6477}
.hs-gear{font-size:1.4rem}
/* mini console preview */
.hs-mini{display:block;width:76px;height:112px;position:relative;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25))}
.hs-m-shell{display:block;position:absolute;inset:0;background:var(--hh-shell);border-radius:8px 8px 30px 8px;box-shadow:inset 0 1px 0 #fff8,inset 0 -2px 0 #0003}
.hs-m-bezel{display:block;position:absolute;left:6px;right:6px;top:7px;height:52px;background:var(--hh-bezel);border-radius:4px 4px 14px 4px;z-index:1}
.hs-m-lcd{display:block;position:absolute;left:6px;right:6px;top:6px;bottom:6px;background:linear-gradient(#8fd3f4 0 55%,#7cc36e 55%);border-radius:2px;overflow:hidden}
.hs-m-lcd::after{content:"";position:absolute;left:30%;top:42%;width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:12px 6px 0 -1px #ffd23f}
.hs-m-dpad{display:block;position:absolute;left:9px;top:72px;width:26px;height:26px;z-index:1;
  background:linear-gradient(var(--hh-dpad),var(--hh-dpad)) center/34% 100% no-repeat,linear-gradient(var(--hh-dpad),var(--hh-dpad)) center/100% 34% no-repeat}
.hs-m-b,.hs-m-a{display:block;position:absolute;width:13px;height:13px;border-radius:50%;background:var(--hh-ab);box-shadow:0 2px 0 var(--hh-ab-edge);z-index:1}
.hs-m-b{right:25px;top:90px}.hs-m-a{right:9px;top:80px}
.hs-m-pill{display:block;position:absolute;left:24px;top:102px;width:12px;height:4px;border-radius:3px;background:var(--hh-pill);transform:rotate(-24deg);z-index:1}
.hs-m-pill+.hs-m-pill{left:42px}
.hs-m-label{display:block;position:absolute;left:8px;top:62px;font:italic 900 7px/1 "Trebuchet MS",sans-serif;letter-spacing:.1em;color:var(--hh-brand);z-index:1}
html.hh-lock-soft,html.hh-lock-soft body{overflow:hidden}
