/* Landscape HUD in the MapleStory Idle layout. Always landscape: on an upright phone idle-ui.js rotates #app 90deg (html.rot) (Claude Code, 2026-11-17).
   Reference: user's 13 screenshots (MAPLE-IDLE-SCREENSHOTS.md). Own icons and styling, no official assets.
   The battle canvas fills the screen; every control sits on an edge. Existing IDs/listeners are reused;
   idle-ui.js moves them into the new containers (#mhMenu, #mhCapsule, #mhDrawer, #mhPlate). */
:root{
  --sw:100vw;--sh:100vh;              /* landscape width/height; idle-ui.js swaps them when the phone is held upright */
  --mh-glass:rgba(18,18,24,.72);       /* HUD plates */
  --mh-glass-strong:rgba(22,22,28,.9);
  --mh-line:rgba(255,255,255,.16);
  --mh-text:#ffffff;
  --mh-dim:#c9ccd6;
  --mh-gold:#ffd25a;
  --mh-orange:#f6992e;                  /* 도전 */
  --mh-teal:#21b6c8;                    /* selected tab / primary button */
  --mh-lime:#b6e13d;                    /* guide quest, bulk action */
  --mh-hp:#e8435e;--mh-mp:#3b8cf0;--mh-exp:#8bd84a;
  --mh-win-head:#2a2c33;--mh-win-body:#e7e9ee;--mh-card:#ffffff;--mh-card-text:#22252c;--mh-card-dim:#6b7180;
  --hud-pad:max(10px,env(safe-area-inset-left,0px));
  --hud-pad-r:max(10px,env(safe-area-inset-right,0px));
  --hud-top:max(6px,env(safe-area-inset-top,0px));
  --hud-bottom:max(4px,env(safe-area-inset-bottom,0px));
  /* Control sizes follow screen height so 344px-tall and 430px-tall phones both fit. */
  --sk:clamp(34px,calc(var(--sh) * 0.115),48px);
  --jump:clamp(54px,calc(var(--sh) * 0.175),74px);
  --move:clamp(42px,calc(var(--sh) * 0.13),54px);
  --menu:clamp(40px,calc(var(--sh) * 0.12),50px);
  --side-left:calc(var(--move) * 2 + 26px);
  --side-right:calc(var(--sk) * 4 + 15px + var(--jump) + 30px);
}
#mhMenu,#mhCapsule,#mhDrawer,#mhPlateHead,#mhHamb,#stgHead{display:none}

/* Guide quest card (also used outside landscape). */
#guideCard{display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:left;width:100%;margin:6px 0;padding:8px 12px 8px 14px;border:0;
  border-left:4px solid var(--mh-lime);border-radius:0 4px 4px 0;background:linear-gradient(90deg,rgba(20,20,26,.85),rgba(20,20,26,.55));color:var(--mh-text);font:inherit;cursor:pointer}
#guideCard[hidden]{display:none}
#guideCard b{font-size:13px;color:var(--mh-lime);font-weight:900;letter-spacing:-.2px}
#guideCard span{font-size:12px;line-height:1.35;font-weight:700}
#guideCard i{display:block;width:100%;height:3px;border-radius:2px;background:rgba(255,255,255,.15);overflow:hidden}
#guideCard i u{display:block;height:100%;width:0;background:var(--mh-lime);text-decoration:none}
#guideCard.ready{border-left-color:var(--mh-orange)}
#guideCard.ready b{color:var(--mh-orange)}
#guideCard.ready::after{content:"보상 받기";position:absolute;right:10px;top:8px;padding:2px 8px;border-radius:10px;background:var(--mh-orange);color:#fff;font-size:10px;font-weight:900}

  html.land,html.land body{height:100%;overflow:hidden;background:#000}
  html.land body{display:block;font-family:"Noto Sans KR",system-ui,sans-serif}
  html.land #app{position:fixed;inset:0;max-width:none;width:auto;min-height:0;background:#000}
  html.land #view{position:fixed;inset:0;margin:0;border-radius:0;box-shadow:none;display:grid;place-items:center;background:#000;z-index:0}
  html.land #cv{width:var(--sw)!important;height:var(--sh)!important;height:var(--sh)!important;object-fit:contain}
  html.land .mh-out{text-shadow:0 0 2px #000,0 1px 3px #000}

  /* Old containers that idle-ui.js empties or replaces. */
  html.land #tabs,html.land .view-tools,html.land #hud{background:none!important;border:0!important;box-shadow:none!important}
  html.land #tabs{display:none!important}
  html.land .view-tools{position:fixed;width:0;height:0;overflow:hidden;padding:0;margin:0}

  /* ---- Top-left profile: square portrait, combat power, currencies ---- */
  html.land #top{position:fixed;top:var(--hud-top);left:var(--hud-pad);z-index:4;padding:0;margin:0;display:grid;grid-template-columns:auto auto;gap:2px 10px;align-items:center;background:none!important;width:auto}
  html.land #ava{grid-row:1/3;width:54px;height:54px;border-radius:6px;background:linear-gradient(180deg,#6d7a8c,#3b4352);box-shadow:0 0 0 2px #fff,0 2px 6px rgba(0,0,0,.5)}
  html.land #lvBox{display:block;width:auto}
  html.land #lvBox .l1{display:none}
  html.land #lvBox .l2{display:flex;align-items:center;gap:6px;font-size:16px;color:#fff;font-weight:900;text-shadow:0 0 2px #000,0 1px 3px #000}
  html.land #lvBox .l2 span{display:none}
  html.land #lvBox .l2 svg{width:16px;height:16px}
  html.land #lvBox .l2 b{color:#fff}
  html.land #cur{grid-column:1/3;display:flex;flex-direction:row;gap:12px;padding:0;margin-top:4px;background:none}
  html.land #cur div{min-width:0;padding:0;background:none!important;box-shadow:none!important;font-size:14px;font-weight:900;color:#fff;text-shadow:0 0 2px #000,0 1px 3px #000;gap:5px}
  html.land #cur div svg{width:18px;height:18px;margin:0}
  html.land #guideCard{position:fixed;top:calc(var(--hud-top) + 92px);left:var(--hud-pad);z-index:3;width:min(300px,calc(var(--sw) * 0.34));margin:0}

  /* ---- Top-centre stage header: location, Stage bar with boss dot, 도전 ---- */
  html.land #stg{position:fixed;top:var(--hud-top);left:50%;transform:translateX(-50%);z-index:4;margin:0;width:min(400px,calc(var(--sw) * 0.36));padding:0;background:none!important;box-shadow:none!important;display:flex;flex-direction:column;align-items:center;gap:2px}
  html.land #stgHead{display:flex;align-items:center;gap:5px;font-size:15px;font-weight:900;color:#fff;text-shadow:0 0 2px #000,0 1px 3px #000;white-space:nowrap}
  html.land #stgHead svg{width:15px;height:15px}
  html.land #stg .sgl{width:100%;position:relative;gap:0}
  html.land #stg .st{position:absolute;inset:0;z-index:1;display:flex;justify-content:center;align-items:center;pointer-events:none}
  html.land #stT{font-size:13px;font-weight:900;color:#fff;text-shadow:0 0 2px #000,0 1px 2px #000;font-family:inherit}
  html.land #stS{display:none}
  html.land #stK{position:absolute;right:8px;font-size:10px;color:#fff;text-shadow:0 0 2px #000}
  html.land #stg .sb{position:relative;height:13px;border-radius:7px;background:rgba(10,10,14,.75);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.55);overflow:visible}
  html.land #stF{border-radius:7px;background:linear-gradient(90deg,#f7c33b,#ffe48a)!important}
  html.land #stg .sb::after{content:"";position:absolute;right:-3px;top:50%;width:13px;height:13px;transform:translateY(-50%);border-radius:50%;background:radial-gradient(circle at 40% 35%,#ff8a7a,#d8242f);box-shadow:0 0 0 2px rgba(0,0,0,.4)}
  html.land #chal{margin-top:3px;min-height:32px;padding:0 22px;border-radius:7px;font-size:15px;font-weight:900;color:#fff;background:linear-gradient(180deg,#ffb54a,#f08a1e);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.55),0 2px 0 #9a5410;animation:none}

  /* ---- Top-right: hamburger opens the full menu drawer ---- */
  html.land #mhHamb{display:grid;place-items:center;position:fixed;top:var(--hud-top);right:var(--hud-pad-r);z-index:5;width:42px;height:42px;border:0;background:none;color:#fff;cursor:pointer;filter:drop-shadow(0 1px 2px #000)}
  html.land #mhHamb svg{width:30px;height:30px}

  /* ---- Right edge capsule: settings / fullscreen / save ---- */
  html.land #mhCapsule{display:flex;flex-direction:column;gap:6px;position:fixed;right:var(--hud-pad-r);top:50%;transform:translateY(-62%);z-index:4;padding:6px 4px;border-radius:24px;background:var(--mh-glass);box-shadow:inset 0 0 0 1px var(--mh-line)}
  html.land #mhCapsule button{width:36px;height:36px;border:0;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);color:#fff;cursor:pointer;padding:0}
  html.land #mhCapsule svg{width:20px;height:20px}

  /* ---- Bottom-centre: nameplate (Lv · name · HP · MP) and the main menu ---- */
  html.land #hud{position:fixed;left:var(--side-left);right:var(--side-right);bottom:calc(var(--hud-bottom) + var(--menu) + 12px);z-index:3;padding:0;display:flex;justify-content:center;pointer-events:none}
  html.land #bars{flex:none;width:min(230px,100%);display:flex;flex-direction:column;gap:3px;padding:0 7px 6px;border-radius:5px;overflow:hidden;background:rgba(40,40,46,.92);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.35),0 2px 6px rgba(0,0,0,.45)}
  html.land #mhPlateHead{display:flex;justify-content:space-between;align-items:center;margin:0 -7px 3px;padding:3px 9px;background:rgba(0,0,0,.45);font-size:12px;font-weight:900;color:#fff}
  html.land #mhPlateHead b{color:var(--mh-gold)}
  html.land #bars .bar{height:12px;border-radius:2px;background:#15161b;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
  html.land #bars .bar i{border-radius:2px}
  html.land #bars .bar.hp i{background:linear-gradient(180deg,#ff7d92,#d8304d)}
  html.land #bars .bar.mp i{background:linear-gradient(180deg,#76b6ff,#2f72d8)}
  html.land #bars .bar span{left:-1px;transform:translateX(-100%);display:none}
  html.land #bars .bar em{right:auto;left:50%;transform:translateX(-50%);font-size:10px;line-height:12px;color:#fff}
  html.land #bars .bar.ex{position:fixed;left:0;right:0;bottom:0;height:5px;border-radius:0;z-index:5;background:rgba(0,0,0,.65);box-shadow:none}
  html.land #bars .bar.ex i{border-radius:0;background:linear-gradient(90deg,#6fcf3a,#c8f25a)}
  html.land #bars .bar.ex span{display:none}
  html.land #bars .bar.ex em{position:fixed;top:auto;left:var(--hud-pad);transform:none;bottom:7px;font-size:12px;line-height:1;color:var(--mh-gold);font-weight:900;text-shadow:0 0 2px #000,0 1px 2px #000}
  html.land #bars .bar.ex em::before{content:"EXP ";color:#fff}
  html.land #classMeter{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--hud-bottom) + var(--menu) + 72px);z-index:3;
    padding:2px 10px!important;font-size:10.5px!important;border-radius:10px;background:rgba(0,0,0,.55)!important;white-space:nowrap;max-width:calc(var(--sw) * 0.46);overflow:hidden;text-overflow:ellipsis}

  html.land #mhMenu{display:flex;position:fixed;left:var(--side-left);right:var(--side-right);bottom:calc(var(--hud-bottom) + 8px);z-index:4;justify-content:center}
  html.land #mhMenu .row{display:flex;padding:0;margin:0;border-radius:6px;background:rgba(20,20,26,.7);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);overflow:hidden}
  html.land #mhMenu button{position:relative;min-width:clamp(52px,calc(var(--sw) * 0.085),72px);height:var(--menu);border:0;background:none;color:#e9ebf1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
  html.land #mhMenu button+button::before{content:"";position:absolute;left:0;top:22%;bottom:22%;width:1px;background:rgba(255,255,255,.18)}
  html.land #mhMenu button svg{width:20px;height:20px}
  html.land #mhMenu button.on{color:#fff;background:linear-gradient(0deg,rgba(33,182,200,.55),rgba(33,182,200,0) 75%)}
  html.land #mhMenu button.on::after{content:"";position:absolute;left:18%;right:18%;bottom:0;height:2px;background:#7ff1ff;box-shadow:0 0 8px #7ff1ff}

  /* ---- Bottom-right: skills, Full Auto, jump ---- */
  html.land #skillbar{position:fixed;right:calc(var(--hud-pad-r) + var(--jump) + 12px);bottom:calc(var(--hud-bottom) + 10px);z-index:4;
    width:calc(var(--sk) * 4 + 15px);padding:0;gap:5px;background:none;grid-template-columns:repeat(4,minmax(0,1fr))!important}
  html.land #skillbar .sk{height:var(--sk)!important;min-height:0;aspect-ratio:auto;border-radius:6px;background:linear-gradient(180deg,#2d3446,#161a24)!important;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.35),0 2px 4px rgba(0,0,0,.5)!important}
  html.land #skillbar .sk svg,html.land #skillbar .sk img{width:calc(var(--sk) - 8px)!important;height:calc(var(--sk) - 8px)!important}
  html.land #skillbar .sk .n{display:none}
  html.land #skillbar .coolnum{font-size:calc(var(--sk) * .38);text-shadow:0 0 3px #000,0 0 3px #000}
  html.land #ctrl{position:static;padding:0;background:none}
  html.land #ctrl button{position:fixed;z-index:4;min-height:0;flex:none;border:0;cursor:pointer}
  html.land #bJ{right:var(--hud-pad-r);bottom:calc(var(--hud-bottom) + 12px);width:var(--jump);height:var(--jump);border-radius:50%!important;
    background:radial-gradient(circle at 50% 40%,rgba(70,74,86,.85),rgba(20,22,28,.85))!important;box-shadow:inset 0 0 0 3px rgba(255,255,255,.75),0 3px 8px rgba(0,0,0,.5)!important;color:#fff;display:grid!important;place-items:center}
  html.land #bJ svg{width:55%;height:55%}
  html.land #autoBtn{right:calc(var(--hud-pad-r) + var(--jump) + 12px + var(--sk) * 4 + 22px);bottom:calc(var(--hud-bottom) + var(--sk) + 6px);width:46px!important;height:46px;border-radius:50%!important;padding:0!important;
    display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:0;background:rgba(20,22,28,.6)!important;color:#ffd75a!important;font-size:9px!important;font-weight:900;line-height:1.05;box-shadow:inset 0 0 0 2px rgba(255,215,90,.6)!important;text-align:center}
  html.land #autoBtn svg{width:18px;height:18px}
  html.land #autoBtn.on{background:radial-gradient(circle,rgba(255,200,60,.45),rgba(20,22,28,.6))!important;color:#fff!important}
  html.land #bL,html.land #bR{bottom:calc(var(--hud-bottom) + 14px);width:var(--move);height:var(--move);border-radius:50%!important;background:rgba(20,22,28,.55)!important;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)!important;color:#fff}
  html.land #bL{left:var(--hud-pad)}html.land #bR{left:calc(var(--hud-pad) + var(--move) + 6px)}
  html.land #bD{left:calc(var(--hud-pad) + var(--move) * .5 + 3px);bottom:calc(var(--hud-bottom) + var(--move) + 20px);width:44px;height:26px;border-radius:13px!important;font-size:11px;background:rgba(20,22,28,.55)!important;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)!important}

  /* ---- Windows (menu panel + modal) in the reference style: dark title bar, light body, white cards ---- */
  html.land #panelWin{position:fixed;top:calc(var(--hud-top) + 44px);right:calc(var(--hud-pad-r) + 46px);bottom:calc(var(--hud-bottom) + 10px);width:min(420px,calc(var(--sw) * 0.46));z-index:6;
    display:none;flex-direction:column;border-radius:10px;overflow:hidden;background:var(--mh-win-body);box-shadow:0 0 0 2px #3a3d46,0 12px 40px rgba(0,0,0,.6)}
  html.land body.panel-open #panelWin{display:flex}
  html.land #panelHead{position:relative;display:flex;align-items:center;justify-content:center;height:38px;flex:none;background:var(--mh-win-head);color:#fff;font-weight:900;font-size:16px}
  html.land #panelHead button{position:absolute;right:6px;top:3px;border:0;background:none;color:#fff;font-size:22px;line-height:1;width:32px;height:32px;cursor:pointer}
  html.land #panel{position:static;flex:1;margin:0!important;padding:10px!important;overflow-y:auto;border-radius:0;background:var(--mh-win-body)!important;box-shadow:none!important;color:var(--mh-card-text)}
  html.land body.panel-open #skillbar,html.land body.panel-open #bJ,html.land body.panel-open #autoBtn,html.land body.panel-open #mhCapsule{visibility:hidden}

  html.land #panel .row,html.land #modal .mb .row{background:var(--mh-card)!important;box-shadow:0 1px 2px rgba(0,0,0,.12)!important;border-radius:8px;color:var(--mh-card-text)}
  html.land #panel .nm{color:var(--mh-card-text)}
  html.land #panel .inf,html.land #modal .mb .inf{color:var(--mh-card-dim)!important}
  html.land #panel h4,html.land #modal .mb h4{color:#3a3f4b!important;font-size:13px;margin:12px 2px 6px;padding-left:8px;border-left:3px solid var(--mh-teal)}
  html.land #panel .btn,html.land #modal .mb .btn{background:linear-gradient(180deg,#36c6d8,#1a9fb2)!important;color:#fff!important;box-shadow:0 2px 0 #10707e!important;border-radius:6px;text-shadow:0 1px 1px rgba(0,0,0,.3)}
  html.land #panel .btn.b2,html.land #modal .mb .btn.b2{background:linear-gradient(180deg,#c6ec52,#99c62a)!important;color:#22300a!important;box-shadow:0 2px 0 #66871a!important;text-shadow:none}
  html.land #panel .btn:disabled{background:#c3c7cf!important;color:#7a808c!important;box-shadow:none!important}
  html.land #panel .btn small{color:inherit;opacity:.9}
  html.land #panel .inv{background:var(--mh-card);box-shadow:0 1px 2px rgba(0,0,0,.12)}
  html.land #panel .invr i{background:#f3f4f7!important}
  html.land #panel .tg{background:#c3c7cf}html.land #panel .tg.on{background:linear-gradient(90deg,#1a9fb2,#36c6d8)}
  html.land #panel .cc{background:var(--mh-card)!important;color:var(--mh-card-text)}html.land #panel .cc small{color:var(--mh-card-dim)}
  html.land #panel .job{background:var(--mh-card)!important;box-shadow:0 1px 2px rgba(0,0,0,.12)!important}html.land #panel .job .nm{color:var(--mh-card-text)}
  html.land #panel .sl>div{background:var(--mh-card)!important;color:var(--mh-card-text)}html.land #panel .sl small{color:#3a3f4b!important}html.land #panel .sl p{color:var(--mh-card-dim)!important}
  html.land #panel .chs button{background:#dfe2e8;color:#3a3f4b}html.land #panel .chs button.on{background:var(--mh-teal);color:#fff}
  html.land #panel .opt button{background:#dfe2e8;color:#3a3f4b}html.land #panel .opt button.on{background:var(--mh-teal);color:#fff}
  html.land #panel .sw i{box-shadow:inset 0 0 0 2px rgba(0,0,0,.15)}
  html.land #panel .cosprev{background:#cfd8e6}

  html.land #modal{background:rgba(0,0,0,.45)!important;backdrop-filter:none!important}
  html.land #modal .mb{padding:0!important;border-radius:10px!important;overflow:hidden auto;background:var(--mh-win-body)!important;color:var(--mh-card-text);box-shadow:0 0 0 2px #3a3d46,0 12px 40px rgba(0,0,0,.6)!important;width:min(560px,calc(var(--sw) * 0.92))!important;max-height:calc(var(--sh) * 0.88)}
  html.land #modal .mb>*:not(h3){margin-left:12px;margin-right:12px}
  html.land #modal .mb h3,html.land #modalBox h3{position:sticky;top:0;z-index:1;margin:0 0 10px!important;padding:9px 12px;background:var(--mh-win-head);color:#fff!important;font-family:inherit!important;font-weight:900!important;font-size:16px!important;text-align:center}
  html.land #modal .mb .opt button{background:#dfe2e8;color:#3a3f4b;border:0}html.land #modal .mb .opt button.on{background:var(--mh-teal);color:#fff}
  html.land #modal .mb .loadout-slots button{background:var(--mh-card);color:var(--mh-card-text);border:1px solid #c9ced8}
  html.land #modal .mb .loadout-slots button.on{border-color:var(--mh-teal);background:#dff6f9}
  html.land #modal .mb .adv-tier{border-top-color:#cfd3db}html.land #modal .mb .adv-tier h4{color:#3a3f4b}html.land #modal .mb .adv-tier h4 span{color:var(--mh-card-dim)}
  html.land #modal .mb .adv-skill{background:var(--mh-card);color:var(--mh-card-text);border:1px solid #d3d7df}
  html.land #modal .mb .adv-skill span{color:var(--mh-card-dim)}html.land #modal .mb .adv-skill small{color:#118a9b}
  html.land #modal .mb .job{background:var(--mh-card)!important}html.land #modal .mb .job .nm{color:var(--mh-card-text)}html.land #modal .mb .job .inf{color:var(--mh-card-dim)}
  html.land #modal .mb .save-text{background:#fff;color:#22252c;border-color:#c9ced8}
  html.land #modal .mb>button.btn[data-close]{display:block;width:calc(100% - 24px)!important;margin:12px!important}

  /* ---- Full menu drawer (☰) ---- */
  html.land #mhDrawer{display:none;position:fixed;top:0;right:0;bottom:0;width:min(440px,calc(var(--sw) * 0.5));z-index:8;flex-direction:column;padding:calc(var(--hud-top) + 6px) calc(var(--hud-pad-r) + 8px) calc(var(--hud-bottom) + 8px) 14px;
    background:rgba(22,23,28,.94);box-shadow:-8px 0 30px rgba(0,0,0,.5)}
  html.land body.drawer-open #mhDrawer{display:flex;animation:mhSlide .16s ease-out}
  
  html.land #mhDrawer .x{align-self:flex-end;border:0;background:none;color:#fff;width:40px;height:40px;cursor:pointer}
  html.land #mhDrawer .x svg{width:28px;height:28px}
  html.land #mhDrawer .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;overflow-y:auto;overflow-x:hidden;padding-bottom:6px;min-width:0}
  html.land #mhDrawer .tile span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  html.land body.drawer-open #mhCapsule,html.land body.drawer-open #skillbar,html.land body.drawer-open #bJ,html.land body.drawer-open #autoBtn{visibility:hidden}
  html.land #mhDrawer .grid hr{grid-column:1/-1;border:0;height:1px;background:rgba(255,255,255,.12);margin:2px 0}
  html.land #mhDrawer .tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:clamp(58px,calc(var(--sh) * 0.17),76px);border:0;border-radius:8px;background:rgba(255,255,255,.07);color:#e9ebf1;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
  html.land #mhDrawer .tile svg{width:26px;height:26px}
  html.land #mhDrawer .tile:active{background:rgba(33,182,200,.3)}
  html.land body.drawer-open #mhHamb{visibility:hidden}

  html.land #toast{top:calc(var(--hud-top) + 92px)}


/* Narrow / short landscape phones. */
  html.land.narrow{--sk:clamp(32px,calc(var(--sh) * 0.105),40px);--move:clamp(40px,calc(var(--sh) * 0.12),46px);--menu:clamp(38px,calc(var(--sh) * 0.11),44px)}
  html.land.narrow #mhMenu button{min-width:46px;font-size:10px}html.land.narrow #mhMenu button svg{width:17px;height:17px}
  html.land.narrow #cur div:nth-child(2){font-size:12px}
  html.land.narrow #stg{width:min(300px,calc(var(--sw) * 0.34))}html.land.narrow #stgHead{font-size:12px}
  html.land.narrow #guideCard{width:min(240px,calc(var(--sw) * 0.36))}html.land.narrow #guideCard b{font-size:11px}html.land.narrow #guideCard span{font-size:10.5px}
  html.land.narrow #ava{width:44px;height:44px}html.land.narrow #lvBox .l2{font-size:13px}html.land.narrow #cur div{font-size:12px}
  html.land.narrow #guideCard{top:calc(var(--hud-top) + 80px)}
  /* No room left of the skills: Full Auto sits on top of the skill grid instead. */
  html.land.narrow #autoBtn{right:calc(var(--hud-pad-r) + var(--jump) + 12px + var(--sk) * 4 + 15px - 42px)!important;bottom:calc(var(--hud-bottom) + 10px + var(--sk) * 2 + 10px)!important;width:42px!important;height:42px!important}

  html.land.short #classMeter{display:none}
  html.land.short #mhCapsule{transform:translateY(-75%)}


/* Portrait phones: rotate prompt (landscape-only game). */

@keyframes idleTurn{0%,30%{transform:rotate(0)}60%,100%{transform:rotate(-90deg)}}
@media (prefers-reduced-motion:reduce){#rotateHint svg{animation:none}body.drawer-open #mhDrawer{animation:none}}

@keyframes mhSlide{from{transform:translateX(40px)}to{transform:none}}

/* Skill window (reference 08_10_22): right window, teal tabs, dark section bars, 5-per-row icon grid, E badge, red Lv lock. */
#mhSkill{display:none}
html.land #mhSkill.open{display:flex;flex-direction:column;position:fixed;top:calc(var(--hud-top) + 44px);right:calc(var(--hud-pad-r) + 46px);bottom:calc(var(--hud-bottom) + 10px);width:min(380px,calc(var(--sw) * 0.44));z-index:6;
  border-radius:10px;overflow:hidden;background:var(--mh-win-body);box-shadow:0 0 0 2px #3a3d46,0 12px 40px rgba(0,0,0,.6);color:var(--mh-card-text)}
#mhSkill .head{position:relative;display:flex;align-items:center;justify-content:center;height:38px;flex:none;background:var(--mh-win-head);color:#fff;font-weight:900;font-size:16px}
#mhSkill .head .x{position:absolute;right:6px;top:3px;border:0;background:none;color:#fff;width:32px;height:32px;cursor:pointer;padding:0}
#mhSkill .head .x svg{width:22px;height:22px}
#mhSkill .tabs{display:flex;flex:none;background:var(--mh-win-head);padding:0 8px;gap:2px}
#mhSkill .tabs button{flex:1;height:34px;border:0;border-radius:6px 6px 0 0;background:#3a3d46;color:#d6d9e0;font:inherit;font-size:13px;font-weight:900;cursor:pointer}
#mhSkill .tabs button.on{background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff}
#mhSkill .body{flex:1;overflow-y:auto;padding:8px 10px 10px}
#mhSkill h5{margin:6px 0;padding:6px 10px;border-radius:5px;background:#4a4e58;color:#fff;font-size:13px;font-weight:900}
#mhSkill .hint{margin:4px 2px 8px;font-size:11.5px;color:var(--mh-card-dim)}
#mhSkill .sk-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-bottom:6px}
#mhSkill .sk-tile{position:relative;aspect-ratio:1;border:0;border-radius:6px;padding:3px;background:linear-gradient(180deg,#3a5d8f,#1f3256);box-shadow:inset 0 0 0 2px rgba(255,255,255,.7),0 1px 3px rgba(0,0,0,.35);cursor:pointer;display:grid;place-items:center;overflow:hidden}
#mhSkill .sk-tile svg,#mhSkill .sk-tile img{width:86%;height:86%}
#mhSkill .sk-tile.pick{box-shadow:inset 0 0 0 3px #3fe3f5,0 0 8px #3fe3f5}
#mhSkill .sk-tile.locked{background:linear-gradient(180deg,#2a3346,#151a26)}
#mhSkill .sk-tile.locked>svg,#mhSkill .sk-tile.locked>img,#mhSkill .sk-tile.locked>b,#mhSkill .sk-tile.locked>small{filter:grayscale(.9) brightness(.45)!important}
#mhSkill .sk-tile .e{position:absolute;right:3px;bottom:3px;width:17px;height:17px;border-radius:3px;background:#2b2d33;color:#fff;font-style:normal;font-size:11px;font-weight:900;line-height:17px;text-align:center;box-shadow:0 0 0 1px rgba(255,255,255,.6)}
#mhSkill .sk-tile .lv{position:absolute;right:2px;top:2px;padding:0 4px;border-radius:3px;background:#c4202f;color:#fff;font-style:normal;font-size:9.5px;font-weight:900;line-height:15px;filter:none}

#mhSkill .sk-tile.pas{flex-direction:column;background:linear-gradient(180deg,#5b8a3a,#2c4a1d);color:#fff;gap:0}
#mhSkill .sk-tile.pas b{font-size:10px;line-height:1.1}#mhSkill .sk-tile.pas small{font-size:10px;color:#e6ff9a}
#mhSkill .sk-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:8px}
#mhSkill .slot{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 3px;border:1px solid #c9ced8;border-radius:7px;background:#fff;color:var(--mh-card-text);font:inherit;cursor:pointer}
#mhSkill .slot.on{border-color:#1a9fb2;box-shadow:0 0 0 2px rgba(33,182,200,.4);background:#e6f8fb}
#mhSkill .slot span{position:absolute;left:5px;top:3px;font-size:10px;font-weight:900;color:#1a9fb2}
#mhSkill .slot svg,#mhSkill .slot img{width:34px;height:34px}
#mhSkill .slot small{font-size:10px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mhSkill .hy{display:flex;align-items:center;gap:10px;width:100%;margin:0 0 8px;padding:12px;border:1px solid #c9ced8;border-radius:8px;background:#fff;color:var(--mh-card-text);font:inherit;text-align:left;cursor:pointer}
#mhSkill .hy b{font-size:14px}#mhSkill .hy span{flex:1;font-size:12px;color:var(--mh-card-dim)}#mhSkill .hy em{font-style:normal;font-size:11px;font-weight:900;color:#fff;background:#1a9fb2;border-radius:10px;padding:2px 8px}
#mhSkill .hy.on{border-color:#1a9fb2;background:#e6f8fb}#mhSkill .hy:disabled{opacity:.5}
#mhSkill .detail{flex:none;border-top:1px solid #c9ced8;background:#fff;padding:8px 10px 10px}
#mhSkill .detail[hidden]{display:none}
#mhSkill .d-top{display:flex;align-items:center;gap:8px}
#mhSkill .d-top svg,#mhSkill .d-top img{width:38px;height:38px;flex:none;border-radius:6px;background:linear-gradient(180deg,#3a5d8f,#1f3256);padding:3px}
#mhSkill .d-top b{display:block;font-size:14px}#mhSkill .d-top small{font-size:11px;color:var(--mh-card-dim)}
#mhSkill .detail p{margin:6px 0;font-size:12px;line-height:1.5;color:#3a3f4b}
#mhSkill .d-slots{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}
#mhSkill .d-slots button{height:30px;border:0;border-radius:5px;background:#dfe2e8;color:#3a3f4b;font:inherit;font-weight:900;cursor:pointer}
#mhSkill .d-slots button.on{background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff}
#mhSkill .d-note{display:block;margin-top:4px;font-size:10.5px;color:var(--mh-card-dim)}
#mhSkill .d-lock{padding:6px;border-radius:5px;background:#fde6e8;color:#c4202f;font-size:12px;font-weight:900;text-align:center}
#mhSkill .sk-upgrade{width:100%;min-height:34px;margin-top:5px;border:1px solid #07889b;border-radius:6px;background:linear-gradient(180deg,#3dd4df,#159daf);color:#fff;font:inherit;font-size:12px;font-weight:900;cursor:pointer}
#mhSkill .sk-upgrade:disabled{background:#b4bbc2;border-color:#a8aeb7;cursor:default}
#mhSkill .sk-glyph{display:grid;place-items:center;width:85%;height:85%;color:#fff;font-size:23px;text-shadow:0 0 9px #aaf3ff}
body.skill-open #skillbar,body.skill-open #bJ,body.skill-open #autoBtn,body.skill-open #mhCapsule{visibility:hidden}

/* ---- Two-pane windows: 캐릭터 / 장비 / 직업 선택 / 동료 (reference layouts) ---- */
html.land #panelWin.wide{width:min(860px,calc(var(--sw) * 0.9))}
html.land #panelWin.wide #panel{overflow:hidden;padding:8px!important}
html.land .mh-two{display:grid;grid-template-columns:minmax(150px,34%) minmax(0,1fr);gap:10px;height:100%;min-height:0}
html.land .mh-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:0;overflow-y:auto;padding:10px 8px;border-radius:10px;background:#fff;box-shadow:0 0 0 2px #2f323a inset,0 2px 6px rgba(0,0,0,.2)}
html.land .mh-sky{position:absolute;left:4px;right:4px;top:4px;height:62%;border-radius:8px 8px 40% 40%/8px 8px 16% 16%;background:linear-gradient(180deg,#59b3f2,#bfe6ff 75%,#e9f6ff);z-index:0}
html.land .mh-card>*:not(.mh-sky){position:relative;z-index:1}
html.land .mh-portrait{width:min(170px,100%);height:auto;aspect-ratio:170/190;image-rendering:auto;filter:drop-shadow(0 6px 6px rgba(0,0,0,.25))}
html.land .mh-cp{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:6px 12px;border-radius:16px;background:#3b3e47;color:#fff;font-weight:900;font-size:13px}
html.land .mh-cp b{font-size:15px}
html.land .mh-stats{width:100%;display:grid;grid-template-columns:1fr auto;gap:5px 8px;margin:4px 0 0;padding:0 4px;font-size:12px;color:#2a2d35}
html.land .mh-stats dt{color:#555b68}.mh-stats dd{margin:0;font-weight:900;text-align:right}
html.land .mh-main{min-height:0;overflow-y:auto;padding:2px 2px 6px}
html.land .mh-grade{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:8px;padding:9px 12px;margin-bottom:8px;border-radius:8px;background:#34373f;color:#fff;font-size:12px;font-weight:900}
html.land .mh-grade b{color:#ffc93a}.mh-grade em{font-style:normal;font-size:11px;color:#c9ccd6}
html.land .mh-grade i{display:block;height:9px;border-radius:5px;background:#1d1f25;overflow:hidden}.mh-grade u{display:block;height:100%;width:0;background:linear-gradient(90deg,#f7c33b,#ffe48a);text-decoration:none}
html.land .mh-upcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
html.land #panel .row.mh-up{flex-direction:column;align-items:stretch;gap:6px;margin:0;padding:10px;border-radius:9px;background:linear-gradient(180deg,#245c68,#173f49)!important;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important;text-align:center}
html.land #panel .row.mh-up .ic{display:none}
html.land #panel .row.mh-up .nm{color:#fff;font-size:13px}
html.land #panel .row.mh-up .inf{color:#bfeaf2!important;font-size:12px;font-weight:700}
html.land #panel .row.mh-up .btn{min-width:0;width:100%;margin:0}
html.land #panel .row.mh-up.mh-wide{flex-direction:row;flex-wrap:wrap;text-align:left}#panel .row.mh-up.mh-wide .tx{flex:1 1 60%}#panel .row.mh-up.mh-wide .btn{width:auto;flex:1 1 30%}
html.land .mh-sub{margin:12px 2px 6px;padding-left:8px;border-left:3px solid var(--mh-teal);color:#3a3f4b;font-size:13px}
/* 장비 */
html.land .mh-equip{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto auto;align-items:center;justify-items:center;column-gap:4px}
html.land .mh-equip .mh-sky{height:70%}
html.land .mh-equip .mh-slots{display:flex;flex-direction:column;gap:6px}
html.land .mh-equip .mh-cp{grid-column:1/-1;margin-top:6px}
html.land .mh-slot{position:relative;width:clamp(44px,calc(var(--sh) * 0.15),58px);aspect-ratio:1;border-radius:7px;display:grid;place-items:center;background:linear-gradient(180deg,#fff,#eef2f8);box-shadow:inset 0 0 0 2.5px var(--g,#9aa3b5);color:#3a3f4b}
html.land .mh-slot svg{width:52%;height:52%}
html.land .mh-slot .tag{position:absolute;left:3px;top:2px;padding:0 3px;border-radius:3px;background:var(--g,#9aa3b5);color:#fff;font-size:8.5px;font-weight:900;line-height:13px}
html.land .mh-slot b{position:absolute;left:4px;bottom:2px;font-size:10px;color:#3a3f4b}
html.land .mh-slot i{position:absolute;right:3px;bottom:3px;width:14px;height:14px;border-radius:3px;background:#2b2d33;color:#fff;font-style:normal;font-size:9px;font-weight:900;line-height:14px;text-align:center}
html.land .mh-slot small{position:absolute;bottom:2px;font-size:9px;color:#8a909c}
html.land .mh-slot.locked{background:#d9dde5;box-shadow:inset 0 0 0 2px #b9bfca;color:#8a909c}.mh-slot.locked .tag{background:#9aa3b5}
/* 직업 선택 (전직) — dark starry window like the homepage slide */
html.land #panelWin.wide .mh-jobwin{grid-template-columns:minmax(150px,36%) minmax(0,1fr);background:radial-gradient(120% 120% at 30% 20%,#3a3360,#1d1a33 70%);border-radius:10px;padding:10px;color:#fff}
html.land .mh-jobinfo{display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:auto;align-items:flex-start}
html.land .mh-jobinfo .grp{color:#5fd6e6;font-weight:900;font-size:12px}
html.land .mh-jobinfo h3{margin:0;font-size:22px;font-weight:900;color:#fff}
html.land .mh-jobinfo .stat{padding:2px 10px;border-radius:10px;background:rgba(255,255,255,.12);font-size:11px;font-weight:700}
html.land .mh-jobinfo p{margin:2px 0 0;font-size:11.5px;line-height:1.5;color:#d9dcef}
html.land .mh-jobinfo .mh-portrait{align-self:center;width:min(150px,80%)}
html.land .mh-jobinfo h6{margin:4px 0 2px;font-size:12px;color:#fff}
html.land .mh-jskills{display:flex;gap:5px}.mh-jskills i{width:36px;height:36px;border-radius:6px;background:linear-gradient(180deg,#3a5d8f,#1f3256);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.7);display:grid;place-items:center}.mh-jskills svg,.mh-jskills img{width:80%;height:80%}
html.land .mh-jobpick{display:flex;flex-direction:column;gap:6px}
html.land #panel .mh-jobpick h4{margin:0;padding:0;border:0;color:#fff!important;font-size:16px}
html.land .mh-jobpick .chip{align-self:flex-start;padding:2px 10px;border-radius:10px;background:#1a9fb2;color:#fff;font-size:11px;font-weight:900}
html.land .mh-jobgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
html.land .mh-jobcard{position:relative;display:flex;align-items:center;gap:6px;min-height:52px;padding:4px 8px 4px 4px;border:0;border-radius:7px;background:linear-gradient(90deg,rgba(255,255,255,.12),rgba(255,255,255,.04));color:#fff;font:inherit;text-align:left;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(255,255,255,.15)}
html.land .mh-jobcard canvas{width:44px;height:44px;flex:none}
html.land .mh-jobcard b{display:block;font-size:12.5px}.mh-jobcard small{display:block;font-size:10px;color:#5fd6e6}
html.land .mh-jobcard.on{box-shadow:inset 0 0 0 2px #5fe8ff,0 0 10px rgba(95,232,255,.45)}
html.land .mh-jobcard.cur::after{content:"현재";position:absolute;right:6px;top:5px;padding:0 5px;border-radius:6px;background:#ffc93a;color:#3a2a00;font-size:9px;font-weight:900}
html.land .mh-go{margin-top:auto;align-self:flex-end;min-width:150px;height:38px;border:0;border-radius:7px;background:linear-gradient(180deg,#c6ec52,#99c62a);color:#1f2a06;font:inherit;font-weight:900;font-size:14px;box-shadow:0 2px 0 #66871a;cursor:pointer}
html.land .mh-go:disabled{background:#6b6f7a;color:#d6d8de;box-shadow:none;cursor:default}
/* 동료 */
html.land .mh-comp{align-items:stretch;background:#2b2e36;box-shadow:inset 0 0 0 2px #4a4e58}
html.land .mh-comp h6{margin:2px 0;color:#fff;font-size:12px}
html.land .mh-lead{position:relative;display:grid;place-items:center;border-radius:8px;background:radial-gradient(circle at 50% 40%,#5a67a8,#262a4a);box-shadow:inset 0 0 0 2px var(--g)}
html.land .mh-lead span{position:absolute;left:8px;top:6px;color:#fff;font-weight:900;font-size:13px;text-shadow:0 1px 2px #000}
html.land .mh-comp p{margin:0;color:#d9dcef;font-size:11.5px;text-align:center}.mh-comp p.none{padding:20px 4px;line-height:1.6}
html.land .mh-party{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
html.land .mh-party div{aspect-ratio:1;border-radius:7px;display:grid;place-items:center;background:rgba(255,255,255,.08);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.25);color:#8a909c;overflow:hidden}
html.land .mh-party div canvas{width:100%;height:auto}.mh-party svg{width:40%}
html.land #panelWin.wide .mh-main .comps{grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}
html.land #panel .cc{background:linear-gradient(180deg,#3b4170,#252946)!important;color:#fff!important;box-shadow:inset 0 0 0 2px var(--g)!important}
html.land #panel .cc small,html.land #panel .cc div{color:#e9ebf5!important}

/* ---- Stat points / special stats (reference 08_10_42) ---- */
html.land .mh-statcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-bottom:6px}
html.land .mh-statcard{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:10px 8px 8px;border-radius:9px;background:linear-gradient(180deg,#245c68,#173f49);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
html.land .mh-statcard small{position:absolute;right:8px;top:6px;font-size:11px;font-weight:900;color:#ffc93a}
html.land .mh-statcard b{font-size:13px}html.land .mh-statcard strong{font-size:20px;font-weight:900}
html.land .mh-statcard .row2{display:flex;gap:5px;width:100%}
html.land .mh-statcard button,html.land .mh-special button{flex:1;height:30px;border:0;border-radius:6px;background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff;font:inherit;font-weight:900;font-size:12px;cursor:pointer}
html.land .mh-statcard button:disabled,html.land .mh-special button:disabled{background:#c3c7cf;color:#6f7582;cursor:default}
html.land .mh-sub small{margin-left:6px;color:#1a9fb2;font-weight:900}
html.land .mh-specials{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px}
html.land .mh-special{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:2px 8px;align-items:center;padding:8px 10px;border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.12)}
html.land .mh-special b{font-size:12px;color:#2a2d35}html.land .mh-special div small{margin-left:6px;font-size:11px;color:#8a909c}
html.land .mh-special strong{grid-row:2;font-size:15px;color:#118a9b}
html.land .mh-special button{grid-row:1/3;grid-column:2;width:64px}
html.land .mh-special em{grid-row:1/3;grid-column:2;font-style:normal;font-size:10.5px;color:#c4202f;font-weight:900;text-align:right}
html.land .mh-special.locked{background:#e3e6ec}html.land .mh-special.locked strong{color:#9aa0ab}
html.land #panel .mh-gearrow .ic svg{width:26px;height:26px}

/* ---- Generic window (weapon, shop) ---- */
.mh-win{display:none}
html.land .mh-win.open{display:flex;flex-direction:column;position:fixed;top:calc(var(--hud-top) + 44px);right:calc(var(--hud-pad-r) + 46px);bottom:calc(var(--hud-bottom) + 10px);width:min(860px,calc(var(--sw) * 0.9));z-index:6;
  border-radius:10px;overflow:hidden;background:var(--mh-win-body);box-shadow:0 0 0 2px #3a3d46,0 12px 40px rgba(0,0,0,.6);color:var(--mh-card-text)}
.mh-win .head{position:relative;display:flex;align-items:center;justify-content:center;height:38px;flex:none;background:var(--mh-win-head);color:#fff;font-weight:900;font-size:16px}
.mh-win .head .x{position:absolute;right:6px;top:3px;border:0;background:none;color:#fff;width:32px;height:32px;cursor:pointer;padding:0}.mh-win .head .x svg{width:22px;height:22px}
.mh-win .body{flex:1;min-height:0;overflow:hidden;padding:8px}
body.win-open #skillbar,body.win-open #bJ,body.win-open #autoBtn,body.win-open #mhCapsule{visibility:hidden}
/* weapon tiles */
.wtile{position:relative;aspect-ratio:1;border:0;border-radius:7px;padding:0;display:grid;place-items:center;background:linear-gradient(180deg,#fff,#eef1f6);box-shadow:inset 0 0 0 2.5px var(--g);color:var(--g);cursor:pointer;font:inherit;overflow:hidden}
.wtile svg{width:46%;height:46%}
.wtile .tier{position:absolute;left:3px;top:2px;padding:0 4px;border-radius:3px;background:var(--g);color:#fff;font-size:9px;font-weight:900;line-height:14px}
.wtile .lvl{position:absolute;right:3px;top:2px;font-size:9px;font-weight:900;color:#3a3f4b}
.wtile .stars{position:absolute;left:0;right:0;bottom:15px;font-size:8px;letter-spacing:-1px;color:#ffb81c;text-align:center}.wtile .stars i{font-style:normal;color:#cfd3db}
.wtile .cnt{position:absolute;left:3px;right:3px;bottom:2px;height:11px;border-radius:6px;background:#2b2d33;overflow:hidden}
.wtile .cnt u{position:absolute;left:0;top:0;bottom:0;background:#2cc3d6;text-decoration:none}.wtile .cnt b{position:relative;display:block;font-size:8px;line-height:11px;color:#fff;text-align:center}
.wtile .e{position:absolute;right:3px;bottom:16px;width:14px;height:14px;border-radius:3px;background:#2b2d33;color:#fff;font-style:normal;font-size:9px;font-weight:900;line-height:14px;text-align:center}
.wtile.none{filter:grayscale(.85) opacity(.45);cursor:default}
.wtile.pick{box-shadow:inset 0 0 0 3px var(--g),0 0 0 3px #3fe3f5}
.wtile.big{width:56px;flex:none}
.wgrid .wtile{aspect-ratio:auto;height:clamp(64px,calc(var(--sh) * 0.2),84px)}
html.land .mh-statcard b{max-width:calc(100% - 30px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.5px}
.mh-wtwo{display:grid;grid-template-columns:minmax(170px,36%) minmax(0,1fr);gap:10px;height:100%}
.wdetail{display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:auto;padding:10px;border-radius:9px;background:#2b2e36;color:#fff}
.wdetail .stars{font-size:15px;color:#ffb81c;text-align:center}.wdetail .stars i{font-style:normal;color:#5a5e68}
.wdetail h3{margin:0;font-size:15px;text-align:center}
.wd-badge{display:flex;align-items:center;gap:8px;padding:6px;border-radius:7px;background:rgba(255,255,255,.06)}
.wd-badge small{display:block;font-size:11px;color:#c9ccd6}.wd-badge em{margin-left:auto;font-style:normal;font-size:11px;color:#7be05a;font-weight:900}
.wdetail h6{margin:6px 0 0;font-size:12px;color:#7be05a}.wdetail h6+.eff+h6{color:#5fd6e6}
.wdetail .eff{display:flex;justify-content:space-between;margin:0;padding:4px 6px;border-radius:5px;background:rgba(255,255,255,.06);font-size:12px}.wdetail .eff b{color:#fff}
.wd-btns{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:auto}
.wd-btns button{height:38px;border:0;border-radius:6px;background:#5a5e68;color:#fff;font:inherit;font-weight:900;font-size:12px;line-height:1.1;cursor:pointer}
.wd-btns button small{display:block;font-size:9.5px;font-weight:700;opacity:.85}
.wd-btns button:not(:disabled){background:linear-gradient(180deg,#36c6d8,#1a9fb2)}.wd-btns .eq:not(:disabled){background:linear-gradient(180deg,#c6ec52,#99c62a);color:#1f2a06}
.wd-btns button:disabled{opacity:.55;cursor:default}
.wdetail .empty{margin:auto;text-align:center;font-size:12px;line-height:1.7;color:#c9ccd6}
.wlist{display:flex;flex-direction:column;min-height:0;gap:6px}
.wgrid{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:2px;align-content:start}
.wbtns{display:flex;gap:6px;justify-content:space-between}
.wbtns button{flex:1;height:38px;border:0;border-radius:7px;background:#c3c7cf;color:#3a3f4b;font:inherit;font-weight:900;cursor:pointer}
.wbtns .summon{background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff}
/* summon view */
.mh-summon{display:flex;flex-direction:column;gap:8px;height:100%;padding:10px;border-radius:9px;background:radial-gradient(120% 120% at 70% 20%,#5b4fb0,#2a2160 70%);color:#fff}
.sum-top b{font-size:16px;margin-right:8px}.sum-top span{font-size:11.5px;color:#d9d4ff}
.sum-results{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(54px,1fr));gap:6px;align-content:center;justify-items:center}
.sum-results .wtile{width:54px}.sum-results p{grid-column:1/-1;color:#d9d4ff;font-size:12px}
.sum-bar{display:grid;grid-template-columns:auto 1fr auto;gap:4px 10px;align-items:center;padding:8px 10px;border-radius:8px;background:rgba(0,0,0,.3)}
.sum-bar div span{font-size:11px;color:#d9d4ff;margin-right:6px}.sum-bar div b{color:#ffc93a}
.sum-bar i{display:block;height:8px;border-radius:4px;background:#1d1a3a;overflow:hidden}.sum-bar u{display:block;height:100%;background:linear-gradient(90deg,#f7c33b,#ffe48a);text-decoration:none}
.sum-bar small{font-size:11px}.sum-bar em{grid-column:1/-1;font-style:normal;font-size:10.5px;color:#e6e3ff}
.sum-btns{display:flex;gap:8px}
.sum-btns button{flex:1;height:44px;border:0;border-radius:7px;font:inherit;font-weight:900;font-size:14px;line-height:1.1;cursor:pointer;color:#fff}
.sum-btns button small{display:block;font-size:11px}
.sum-btns .back{flex:.6;background:#4a4470}.sum-btns .one{background:linear-gradient(180deg,#36c6d8,#1a9fb2)}.sum-btns .ten{background:linear-gradient(180deg,#c6ec52,#99c62a);color:#1f2a06}
/* shop */
.mh-shop{display:grid;grid-template-columns:minmax(110px,22%) 1fr;gap:10px;height:100%}
.mh-shop nav{display:flex;flex-direction:column;gap:4px;padding:6px;border-radius:8px;background:#2b2e36}
.mh-shop nav button{height:40px;border:0;border-radius:6px;background:none;color:#d6d9e0;font:inherit;font-weight:900;cursor:pointer}.mh-shop nav button.on{background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff}
.mh-shop .cards{min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px;align-content:start}
.mh-shop .card{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:22px 8px 8px;border-radius:9px;background:linear-gradient(180deg,#f4f5f8,#dfe2e8);box-shadow:inset 0 0 0 1px #c9ced8}
.mh-shop .lim{position:absolute;left:8px;top:5px;font-size:10px;color:#6b7180;font-weight:700}
.mh-shop .pic{width:54px;height:54px;border-radius:12px;display:grid;place-items:center;background:radial-gradient(circle,#fff,#cfd8e6);color:#1a9fb2}.mh-shop .pic svg{width:30px;height:30px}
.mh-shop .card b{font-size:13px;color:#22252c}.mh-shop .card small{font-size:10.5px;color:#6b7180;text-align:center}
.mh-shop .card button{width:100%;height:32px;margin-top:auto;border:0;border-radius:6px;background:#3a3d46;color:#fff;font:inherit;font-weight:900;cursor:pointer}
.mh-shop .card.soldout{opacity:.55}.mh-shop .card button:disabled{cursor:default}

/* ---- Unified summon window (08_10_36 / 08_10_38) ---- */
html.land #mhSummon .body{padding:0}
.mh-sutwo{display:grid;grid-template-columns:minmax(120px,24%) minmax(0,1fr);height:100%;background:radial-gradient(130% 120% at 75% 15%,#6a5bc4,#2c2366 55%,#191440)}
.su-tabs{display:flex;flex-direction:column;gap:8px;padding:10px 8px;overflow-y:auto}
.su-tabs button{position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;min-height:clamp(56px,calc(var(--sh) * 0.19),84px);padding:6px 8px;border:0;border-radius:9px;overflow:hidden;
  background:linear-gradient(135deg,#3a3f8f,#5b4fb0);color:#fff;font:inherit;font-weight:900;font-size:13px;cursor:pointer;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.25)}
.su-tabs button.on{box-shadow:inset 0 0 0 2.5px #8ff3ff,0 0 10px rgba(143,243,255,.5)}
.su-tabs .pic{position:absolute;left:4px;top:2px;display:flex;color:#ffe08a}.su-tabs .pic svg{width:34px;height:34px}.su-tabs .pic canvas{width:42px;height:42px}
.su-tabs b{position:relative;text-shadow:0 1px 3px #000}
.su-main{display:flex;flex-direction:column;gap:8px;min-height:0;padding:10px 12px 10px 4px;color:#fff}
.su-hero{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.su-hero h3{margin:0 0 6px;font-size:clamp(18px,calc(var(--sh) * 0.07),26px);font-weight:900;text-shadow:0 2px 6px rgba(0,0,0,.5)}
.su-hero p{margin:0;font-size:12px;line-height:1.6;color:#e6e3ff}.su-hero small{display:block;margin-top:8px;color:#ffe08a;font-weight:900}
.su-hero .art{display:flex;align-items:flex-end;max-height:100%}.su-hero .art canvas{height:clamp(110px,calc(var(--sh) * 0.48),190px);width:auto;filter:drop-shadow(0 8px 10px rgba(0,0,0,.4))}
.su-results{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:7px;align-content:center;justify-items:center;padding:4px}
.su-results .wtile{width:60px}
.wtile .new{position:absolute;right:-2px;top:-3px;padding:0 3px;border-radius:3px;background:#2cd36a;color:#fff;font-style:normal;font-size:8px;font-weight:900;line-height:12px}
.wtile.ctile{background:radial-gradient(circle at 50% 35%,#5a67a8,#262a4a)}.wtile.ctile canvas{width:100%;height:100%}

/* ---- Red dots (only actionable things) ---- */
.has-dot,.dot{position:relative}
.has-dot::after,i.dot{content:'';position:absolute;right:4px;top:3px;width:9px;height:9px;border-radius:50%;background:#ff3b4a;box-shadow:0 0 0 1.5px #fff;pointer-events:none}
i.dot{display:inline-block;position:relative;right:auto;top:-6px;margin-left:3px}
#mhDrawer .tile.has-dot::after{right:12px;top:8px}

/* ---- Quick icons beside ☰ (top right) ---- */
#mhQuick,#mhStick,#mhGate{display:none}
html.land #mhQuick{display:flex;gap:2px;position:fixed;top:var(--hud-top);right:calc(var(--hud-pad-r) + 46px);z-index:5}
html.land #mhQuick button{position:relative;display:flex;flex-direction:column;align-items:center;gap:1px;width:44px;padding:3px 0 0;border:0;background:none;color:#fff;font:inherit;font-size:10px;font-weight:900;cursor:pointer;filter:drop-shadow(0 1px 2px #000)}
html.land #mhQuick svg{width:26px;height:26px;padding:3px;border-radius:9px;background:rgba(20,22,28,.5);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.3)}
html.land #mhQuick button.has-dot::after{right:6px;top:1px}
html.land.narrow #mhQuick button{width:36px}html.land.narrow #mhQuick span{display:none}
html.land #mhHamb.has-dot::after{right:3px;top:3px}

/* ---- Joystick replaces the two arrow buttons (08_11_05) ---- */
html.land.touch #mhStick,html.land #mhStick{display:block;position:fixed;left:var(--hud-pad);bottom:calc(var(--hud-bottom) + 14px);z-index:4;width:calc(var(--move) * 2);height:calc(var(--move) * 2);border-radius:50%;
  background:radial-gradient(circle,rgba(20,22,28,.25),rgba(20,22,28,.55));box-shadow:inset 0 0 0 2px rgba(255,255,255,.3);touch-action:none;cursor:pointer}
html.land #mhStick i{position:absolute;left:50%;top:50%;width:46%;height:46%;margin:-23% 0 0 -23%;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fff,#c9ced8);box-shadow:0 2px 6px rgba(0,0,0,.45);transition:transform .08s}
html.land #mhStick.on i{transition:none}
html.land #bL,html.land #bR{opacity:0!important;pointer-events:none!important}
body.win-open #mhStick,body.drawer-open #mhStick{visibility:hidden}

/* ---- Boss gate reward preview (08_11_02) ---- */
html.land #mhGate:not([hidden]){display:flex;flex-direction:column;gap:5px;position:fixed;left:var(--hud-pad);top:calc(var(--hud-top) + 160px);z-index:3;padding:8px 10px;border-radius:9px;background:rgba(20,22,28,.7);box-shadow:inset 0 0 0 1.5px rgba(255,201,58,.55);color:#fff}
html.land #mhGate b{font-size:12px;color:#ffc93a}html.land #mhGate small{font-size:10.5px;color:#d6d9e0}
html.land #mhGate .gr{display:flex;gap:5px}html.land #mhGate .gr span{position:relative;display:grid;place-items:center;width:38px;height:38px;border-radius:7px;background:linear-gradient(180deg,#3d4250,#262a33);box-shadow:inset 0 0 0 1.5px #b86af0;color:#ffe08a}
html.land #mhGate .gr svg{width:20px;height:20px}html.land #mhGate .gr em{position:absolute;right:2px;bottom:0;font-style:normal;font-size:9px;font-weight:900;color:#fff;text-shadow:0 1px 2px #000}
body.win-open #mhGate{display:none!important}
body.boss-on #stgHead{visibility:hidden}

/* ---- Shared buttons ---- */
.wbtns .lime,.mh-compbtns .lime{background:linear-gradient(180deg,#c6ec52,#99c62a)!important;color:#1f2a06!important}
.wbtns button:disabled{opacity:.5;cursor:default}
.wd-btns.one{grid-template-columns:1fr}
.mh-shop .card button.free{background:linear-gradient(180deg,#c6ec52,#99c62a);color:#1f2a06}
.mh-shop nav button{position:relative}
html.land .mh-compbtns{display:flex;justify-content:flex-end;gap:6px;margin-bottom:8px}html.land .mh-compbtns button{flex:0 0 130px}
html.land .mh-compbtns button{height:34px;border:0;border-radius:6px;background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff;font:inherit;font-weight:900;font-size:12px;cursor:pointer}

/* ---- Weapon mastery ---- */
.ms-lv{text-align:center}.ms-lv b{font-size:28px;color:#ffc93a}.ms-lv small{color:#c9ccd6;margin-left:4px}
.ms-help{margin:0;padding:8px 10px;border-radius:8px;background:#fff;font-size:12px;line-height:1.6;color:#3a3f4b}.ms-help b{color:#118a9b}
.ms-bar{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:8px 10px;border-radius:8px;background:#2b2e36;color:#fff;font-size:12px}
.ms-bar i{height:9px;border-radius:5px;background:#16181d;overflow:hidden}.ms-bar u{display:block;height:100%;background:linear-gradient(90deg,#f7c33b,#ffe48a)}.ms-bar b{color:#ffc93a}
.ms-steps{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:5px;align-content:start}
.ms-steps div{display:flex;flex-direction:column;align-items:center;padding:5px 0;border-radius:7px;background:#e3e6ec;color:#8a909c}
.ms-steps div b{font-size:13px}.ms-steps div small{font-size:10px}
.ms-steps .done{background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff}.ms-steps .next{background:#fff;color:#118a9b;box-shadow:inset 0 0 0 2px #36c6d8}

/* ---- Missions ---- */
.mh-mission{display:grid;grid-template-columns:minmax(110px,20%) 1fr;gap:10px;height:100%}
.mi-tabs{display:flex;flex-direction:column;gap:4px;padding:6px;border-radius:8px;background:#2b2e36}
.mi-tabs button{position:relative;height:40px;border:0;border-radius:6px;background:none;color:#d6d9e0;font:inherit;font-weight:900;cursor:pointer}.mi-tabs button.on{background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff}
.mi-main{display:flex;flex-direction:column;gap:6px;min-height:0}
.mi-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:5px}
.mi-row,.mi-all,.ma-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:7px 10px;border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.mi-row .ic,.ma-row .ic{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#e7f7f9;color:#1a9fb2}.mi-row .ic svg,.ma-row .ic svg{width:22px;height:22px}
.mi-row .tx{display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center}.mi-row .tx b{font-size:12.5px;color:#22252c}.mi-row .tx small{font-size:11px;color:#6b7180}
.mi-row .tx i,.mi-all i{grid-column:1/-1;height:7px;border-radius:4px;background:#e3e6ec;overflow:hidden}.mi-row .tx u,.mi-all u{display:block;height:100%;background:linear-gradient(90deg,#f7c33b,#ffd75a)}
.mi-row .rw,.mi-all .rw{font-size:11.5px;font-weight:900;color:#3a3f4b;white-space:nowrap}
.mi-row button,.mi-all button,.ma-row button{width:68px;height:32px;border:0;border-radius:6px;background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff;font:inherit;font-weight:900;font-size:12px;cursor:pointer}
.mi-row button:disabled,.mi-all button:disabled{background:#c3c7cf;color:#6f7582;cursor:default}
.mi-row.done{opacity:.6}
.mi-all{grid-template-columns:auto minmax(60px,1fr) auto auto;background:#2b2e36;color:#fff}.mi-all b{display:block;font-size:12.5px}.mi-all small{font-size:11px;color:#c9ccd6}.mi-all .rw{color:#ffe08a}.mi-all i{grid-column:auto;background:#16181d}
.mi-main .wbtns,.mh-mail .wbtns{justify-content:flex-end}.mi-main .wbtns button,.mh-mail .wbtns button{flex:0 0 160px}

/* ---- Mailbox ---- */
.mh-mail{display:flex;flex-direction:column;gap:6px;height:100%}
.ma-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:5px}
.ma-row .tx{display:flex;flex-direction:column;gap:1px}.ma-row .tx b{font-size:13px;color:#22252c}.ma-row .tx small{font-size:11px;color:#6b7180}.ma-row .tx em{font-style:normal;font-size:11.5px;font-weight:900;color:#118a9b}
.ma-row .left{font-size:10.5px;color:#8a909c}
.mh-mail .empty{margin:auto;text-align:center;font-size:12.5px;line-height:1.8;color:#6b7180}
.ma-note{margin-right:auto;align-self:center;font-size:11px;color:#6b7180}

/* ---- Growth pass ---- */
.mh-pass{display:grid;grid-template-columns:minmax(140px,24%) 1fr;gap:10px;height:100%}
.pa-side{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:9px;background:#2b2e36;color:#fff}
.pa-side h3{margin:0;font-size:16px}.pa-side p{margin:0;font-size:11.5px;color:#c9ccd6;line-height:1.5}
.pa-now{font-size:12px}.pa-now b{font-size:18px;color:#ffc93a}
.pa-tags{display:flex;flex-direction:column;gap:3px;font-size:11px;font-weight:900}.pa-tags span{padding:2px 6px;border-radius:4px}.t-free{background:#36c6d8}.t-prem{background:#b86af0}
.pa-side button{height:38px;border:0;border-radius:6px;font:inherit;font-weight:900;font-size:12px;line-height:1.1;cursor:pointer}
.pa-side .buy{margin-top:auto;background:linear-gradient(180deg,#c98bf5,#9a52d6);color:#fff}.pa-side .buy small{display:block;font-size:10px}
.pa-side .lime{background:linear-gradient(180deg,#c6ec52,#99c62a);color:#1f2a06}.pa-own{margin-top:auto!important;color:#c98bf5!important;font-weight:900}
.pa-track{display:flex;gap:6px;min-width:0;overflow-x:auto;overflow-y:hidden;padding-bottom:4px}
.pa-col{flex:0 0 92px;display:grid;grid-template-rows:1fr auto 1fr;gap:5px}
.pa-cell{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 4px;border-radius:8px;background:#fff;box-shadow:inset 0 0 0 2px #9fdde6;font-size:11px;font-weight:900;color:#3a3f4b;text-align:center}
.pa-cell.prem{box-shadow:inset 0 0 0 2px #d4a8f5;background:#faf5ff}.pa-cell.lock{opacity:.6}.pa-cell.lock svg{width:16px;height:16px;color:#8a909c}
.pa-cell.got{opacity:.5}.pa-cell em{font-style:normal;color:#2cae5a;font-size:16px}
.pa-cell button{margin-top:3px;width:100%;height:26px;border:0;border-radius:5px;background:linear-gradient(180deg,#36c6d8,#1a9fb2);color:#fff;font:inherit;font-weight:900;font-size:11px;cursor:pointer}
.pa-cell.prem button{background:linear-gradient(180deg,#c98bf5,#9a52d6)}
.pa-lv{text-align:center;padding:3px 0;border-radius:12px;background:#c3c7cf;color:#3a3f4b;font-size:12px}
.pa-col.on .pa-lv{background:#ffc93a;color:#3a2a00}

/* Upright phone (rotation lock or portrait-only app): show the landscape game turned 90 degrees. */
html.rot body{overflow:hidden}
html.rot #app{position:fixed;inset:auto;top:0;left:0;width:var(--sw);height:var(--sh);transform-origin:top left;transform:rotate(-90deg) translateX(-100%)}
#rotateHint{display:none!important}

/* ---- Phone check fixes (Claude Code, 2026-11-18; Samsung Browser screenshot inside claude.ai, ~350px tall) ----
   Browser font boosting enlarged the HUD text; the 아래 button sat inside the joystick; the nameplate covered the hero. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.land #bD{left:calc(var(--hud-pad) + var(--move) - 22px);bottom:calc(var(--hud-bottom) + 14px + var(--move) * 2 + 6px)}
@media (max-height:430px){
  html.land #hud{bottom:calc(var(--hud-bottom) + var(--menu) + 4px)}
  html.land #bars{width:min(160px,100%);gap:2px;padding:0 5px 3px;background:rgba(40,40,46,.78)}
  html.land #mhPlateHead{margin:0 -5px 2px;padding:1px 7px;font-size:10px}
  html.land #bars .bar{height:8px}
  html.land #bars .bar em{font-size:8px;line-height:8px}
  html.land #bD{bottom:calc(var(--hud-bottom) + 10px + var(--move) * 2 + 4px);height:22px;font-size:10px}
  /* Lift the field so the bottom floor (where the hero fights) sits above the main menu; only sky is cropped. */
  html.land #cv{transform:translateY(calc(-1 * (var(--menu) + 2px)))}
}
