/* Touch HUD only: desktop hotbar, navigation and graphics are unchanged. */
.mobile-target,.mobile-hud-drawer,.mobile-activity-fold,.panel-nav button.mobile-menu-extra{display:none}
@media(pointer:coarse){
 #gameShell.mobile-combat-hud{--combat-right:max(8px,env(safe-area-inset-right));--combat-bottom:calc(62px + env(safe-area-inset-bottom));-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
 #gameShell.mobile-combat-hud *{-webkit-touch-callout:none}
 #gameShell.mobile-combat-hud input,#gameShell.mobile-combat-hud textarea,#gameShell.mobile-combat-hud [contenteditable=true]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
 #gameShell.mobile-combat-hud #world{touch-action:none}
 #gameShell.mobile-combat-hud #serverState,#gameShell.mobile-combat-hud #connectionPing,#gameShell.mobile-combat-hud #soundToggle,#gameShell.mobile-combat-hud .hud-shortcuts{display:none!important}
 #gameShell.mobile-combat-hud #leftPanel{left:max(8px,env(safe-area-inset-left))!important;top:max(8px,env(safe-area-inset-top))!important;bottom:auto!important;width:215px!important;max-height:none;overflow:visible;transform:scale(.86)!important;border-radius:14px;border-color:#bda361;background:linear-gradient(140deg,#071723f2,#102734da);box-shadow:inset 0 0 0 2px #e3bc6420}
 #gameShell.mobile-combat-hud #leftPanel .resource,#gameShell.mobile-combat-hud #leftPanel .xp-row{display:grid!important}
 #gameShell.mobile-combat-hud #leftPanel .wallet-row{display:flex!important}
 #gameShell.mobile-combat-hud #leftPanel .character-card{display:flex!important;gap:8px;align-items:center;margin-bottom:7px;padding:0}
 #gameShell.mobile-combat-hud #leftPanel .character-card strong{display:block;font:700 17px Georgia;margin:3px 0}
 #gameShell.mobile-combat-hud #leftPanel .character-card>div:last-child>span{display:block;font:11px Arial}
 #gameShell.mobile-combat-hud #leftPanel .character-card>div:last-child{display:block!important}
 #gameShell.mobile-combat-hud .topbar .zone-title{position:fixed!important;left:auto!important;transform:none!important;top:max(8px,env(safe-area-inset-top))!important;right:62px!important;width:110px!important;background:#10212bc9;border-radius:8px}
 #gameShell.mobile-combat-hud .right-hud{top:calc(58px + env(safe-area-inset-top))!important;right:var(--combat-right)!important;width:130px!important;pointer-events:none}
 #gameShell.mobile-combat-hud .right-hud .minimap{pointer-events:auto;background:#10212bee}
 #gameShell.mobile-combat-hud .mobile-map-toggle{position:fixed!important;top:max(8px,env(safe-area-inset-top))!important;right:var(--combat-right)!important;width:44px;height:44px;border-radius:10px;font-size:11px;border:1px solid #d5b366;background:#0a1e2bee}
 #gameShell.mobile-combat-hud #hotbar.action-bar{position:absolute!important;left:auto!important;top:auto!important;right:var(--combat-right)!important;bottom:var(--combat-bottom)!important;width:224px!important;height:248px!important;max-width:none!important;max-height:none!important;transform:none!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;overflow:visible!important;backdrop-filter:none!important;pointer-events:none;z-index:44}
 #gameShell.mobile-combat-hud .bar-handle{display:none!important}
 #gameShell.mobile-combat-hud .bar-slots{display:block!important;position:relative;width:100%;height:100%}
 #gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot{position:absolute;width:44px!important;height:44px!important;min-width:44px;min-height:44px;border:2px solid #c7a65e;border-radius:50%!important;background:radial-gradient(circle at 45% 35%,#284965,#0a1524 75%);box-shadow:inset 0 0 0 2px #111a28,0 2px 4px #0008;overflow:hidden;pointer-events:auto;touch-action:none;padding:3px}
 #gameShell.mobile-combat-hud .skill-slot:nth-child(1){left:58px;top:4px}#gameShell.mobile-combat-hud .skill-slot:nth-child(2){left:110px;top:4px}#gameShell.mobile-combat-hud .skill-slot:nth-child(3){left:160px;top:24px}#gameShell.mobile-combat-hud .skill-slot:nth-child(4){left:179px;top:76px}#gameShell.mobile-combat-hud .skill-slot:nth-child(5){left:179px;top:129px}#gameShell.mobile-combat-hud .skill-slot:nth-child(6){left:152px;top:178px}#gameShell.mobile-combat-hud .skill-slot:nth-child(7){left:102px;top:202px}#gameShell.mobile-combat-hud .skill-slot:nth-child(8){left:50px;top:188px}#gameShell.mobile-combat-hud .skill-slot:nth-child(9){left:8px;top:142px}#gameShell.mobile-combat-hud .skill-slot:nth-child(10){left:4px;top:86px}
 #gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot>b,#gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot>small{display:none}
 #gameShell.mobile-combat-hud #hotbar.action-bar .action-icon{width:32px!important;height:32px!important;border-radius:50%;font-size:25px;background:none}
 #gameShell.mobile-combat-hud #hotbar.action-bar .action-icon img{width:100%;height:100%;object-fit:contain}
 #gameShell.mobile-combat-hud #hotbar.action-bar .slot-count{right:3px;bottom:1px;font:bold 11px Arial;text-shadow:0 1px 3px #000}
 #gameShell.mobile-combat-hud #hotbar.action-bar .slot-timer{border-radius:50%;font-size:18px}
 #gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot.on-cooldown{border-color:#75674e}
 #gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot.action-pressed{box-shadow:0 0 0 2px #ffdf91,inset 0 0 12px #efc56c}
 #gameShell.mobile-combat-hud #mobileAttack{display:grid!important;right:calc(var(--combat-right) + 74px)!important;bottom:calc(var(--combat-bottom) + 90px)!important;top:auto!important;left:auto!important;width:76px!important;height:76px!important;border:2px solid #e4be68;outline:1px solid #857047;outline-offset:4px;border-radius:50%;background:radial-gradient(circle at 40% 30%,#79313a,#23111c 75%);box-shadow:inset 0 0 0 3px #161e29;font-size:36px;z-index:45;touch-action:none}
 #gameShell.mobile-combat-hud .mobile-target{display:grid;place-items:center;position:absolute;right:calc(var(--combat-right) + 180px);bottom:calc(var(--combat-bottom) + 182px);width:44px;height:44px;padding:8px;border:2px solid #d2b065;border-radius:50%;background:#112b3ded;color:#e9d39a;z-index:45;touch-action:manipulation}
 .mobile-target svg{width:100%;height:100%}
 #gameShell.mobile-combat-hud #joystick{display:grid!important;place-items:center;position:absolute;left:max(14px,env(safe-area-inset-left))!important;bottom:calc(106px + env(safe-area-inset-bottom))!important;width:108px!important;height:108px!important;border:2px solid #d5b86f;border-radius:50%;background:radial-gradient(circle,#23374e88,#0a1726c9);box-shadow:inset 0 0 0 4px #081622,0 0 0 1px #b3995c66;z-index:45;touch-action:none}
 #gameShell.mobile-combat-hud #joystick:before{content:'';position:absolute;inset:8px;pointer-events:none;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23acbac6' fill-opacity='.55' d='M50 3 43 12 57 12ZM97 50 88 43 88 57ZM50 97 43 88 57 88ZM3 50 12 43 12 57Z'/%3E%3C/svg%3E")}
 #gameShell.mobile-combat-hud #joystick i{display:block;border-radius:50%;width:42px;height:42px;border:1px solid #c7c8cc88;background:radial-gradient(circle at 35% 30%,#8994a6c9,#515f77b0);box-shadow:0 2px 7px #0007;z-index:1}
 #gameShell.mobile-combat-hud .mobile-menu{display:block!important;position:absolute;left:auto!important;top:auto!important;right:var(--combat-right)!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:54px;height:44px!important;min-height:44px;padding:4px;font-size:11px;border:1px solid #d1ac61;border-radius:10px;background:#0a1e2bee;z-index:72}
 #gameShell.mobile-combat-hud>.game-fullscreen{display:grid;place-items:center;position:absolute;top:auto!important;right:auto!important;left:max(10px,env(safe-area-inset-left));bottom:calc(10px + env(safe-area-inset-bottom));width:48px;height:44px;border:1px solid #d1ac61;border-radius:10px;background:#0a1e2bee;color:#f5d98e;z-index:72;touch-action:manipulation}
 #gameShell.mobile-combat-hud>.game-fullscreen span{font:8px Arial}
 .mobile-fullscreen-hint{animation:mobile-fullscreen-pulse 1.4s ease-in-out 3}
 #gameShell.mobile-combat-hud .mobile-hud-drawer:not([hidden]){display:block;position:absolute;right:var(--combat-right);bottom:calc(62px + env(safe-area-inset-bottom));width:min(330px,calc(100vw - 24px));max-height:calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;background:#0a1828f7;border:1px solid #ceac65;border-radius:14px;z-index:75;padding:10px;box-shadow:0 8px 20px #0006}
 .mobile-hud-drawer>header{display:flex;justify-content:space-between;align-items:center;padding:0 4px 8px;color:#ead6aa;font:18px Georgia}
 .mobile-hud-drawer>header button{width:44px;height:44px;border:1px solid #897751;background:#172838;border-radius:8px;color:#ead6aa;font-size:22px}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .panel-nav{display:grid!important;position:static!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px;background:none;box-shadow:none;border:0;padding:0}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .panel-nav button:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:24px 16px!important;place-items:center!important;text-align:center;gap:0!important;padding:3px!important;width:100%!important;min-width:0!important;height:54px;min-height:44px;border:1px solid #bca15d55;background:#17304485;border-radius:8px}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .panel-nav button b{display:block!important;font:10px/14px Georgia;max-width:100%;overflow:hidden;text-overflow:ellipsis}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .panel-nav button em{display:none!important}
 #gameShell.mobile-combat-hud .panel-nav button[hidden]{display:none!important}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .mobile-camera{display:grid;position:static!important;inset:auto!important;grid-template-columns:repeat(6,1fr);gap:5px;margin-top:10px}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .mobile-camera button{width:100%;height:44px;font-size:20px}
 #gameShell.mobile-combat-hud .activity-panel{left:66px!important;right:70px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;top:auto!important;width:auto!important;max-width:none!important;height:32px!important;transform:none!important;border-radius:9px;background:#0b1c2bdc;z-index:60}
 #gameShell.mobile-combat-hud .activity-panel header{height:30px;cursor:default;font-size:11px}
 #gameShell.mobile-combat-hud .activity-panel header button{height:28px;min-width:30px}
 #gameShell.mobile-combat-hud .activity-panel .mobile-activity-fold{display:block}
 #gameShell.mobile-combat-hud .activity-panel.mobile-activity-expanded{height:120px!important}
 #gameShell.mobile-combat-hud .activity-lines{height:88px;font-size:11px}
 #gameShell.mobile-combat-hud .resize-handle,#gameShell.mobile-combat-hud .panel-resize-grip{display:none}
 #gameShell.mobile-combat-hud .chat{display:none!important}
 #gameShell.mobile-combat-hud.mobile-chat-open .chat{display:block!important;position:absolute;left:12px!important;top:130px!important;bottom:auto!important;max-width:calc(100vw - 24px);z-index:68}
 #gameShell.mobile-combat-hud #targetCard{top:calc(116px + env(safe-area-inset-top));left:50%;width:150px;max-width:45vw}
 @keyframes mobile-fullscreen-pulse{50%{box-shadow:0 0 0 5px #f5c96466,0 0 18px #ffd373;filter:brightness(1.35)}}
 @media(orientation:landscape){
  #gameShell.mobile-combat-hud{--combat-bottom:calc(48px + env(safe-area-inset-bottom))}
  #gameShell.mobile-combat-hud #joystick{bottom:calc(66px + env(safe-area-inset-bottom))!important}
  #gameShell.mobile-combat-hud #targetCard{top:10px;left:50%}
  #gameShell.mobile-combat-hud .activity-panel{right:260px!important;left:150px!important;bottom:10px!important}
  #gameShell.mobile-combat-hud .right-hud .minimap{position:fixed!important;top:58px!important;left:215px!important;width:130px!important;transform:none!important}
  #gameShell.mobile-combat-hud .active-buffs{top:40px;right:185px}
 }
 @media(prefers-reduced-motion:reduce){.mobile-fullscreen-hint{animation:none;box-shadow:0 0 0 2px #f5c964}}
}

/* v179: ten permanent slots in two predictable rows, less screen coverage. */
@media(pointer:coarse){
 #gameShell.mobile-combat-hud #hotbar.action-bar{width:236px!important;height:92px!important}
 #gameShell.mobile-combat-hud #hotbar.action-bar .bar-slots{display:grid!important;grid-template-columns:repeat(5,44px);grid-template-rows:repeat(2,44px);gap:4px}
 #gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot{position:relative;left:auto;top:auto;border-radius:12px!important}
 #gameShell.mobile-combat-hud #hotbar.action-bar .skill-slot>b{display:block;font-size:8px;top:1px;left:3px;z-index:1}
 #gameShell.mobile-combat-hud #mobileAttack{width:54px!important;height:54px!important;right:var(--combat-right)!important;bottom:calc(var(--combat-bottom) + 104px)!important;font-size:27px;outline-offset:2px}
 #gameShell.mobile-combat-hud .mobile-target{right:calc(var(--combat-right) + 64px);bottom:calc(var(--combat-bottom) + 109px)}
 #gameShell.mobile-combat-hud #joystick{width:96px!important;height:96px!important;bottom:calc(92px + env(safe-area-inset-bottom))!important}
 #gameShell.mobile-combat-hud .mobile-hud-drawer .mobile-camera{display:none}
 #gameShell.mobile-combat-hud .mobile-hud-drawer.mobile-camera-expanded .mobile-camera{display:grid}
 #gameShell.mobile-combat-hud .topbar .zone-title{top:58px!important;right:var(--combat-right)!important;width:110px!important}
 #gameShell.mobile-combat-hud .right-hud{top:84px!important}
 @media(orientation:landscape){#gameShell.mobile-combat-hud #joystick{bottom:64px!important}}
}
