@media(pointer:coarse){
 .touch:not(.paused) .topbar .game-brand{display:none}
 .touch .topbar{padding:0;background:none}
 .touch #gameMenuButton{position:fixed;right:calc(12px + env(safe-area-inset-right));top:calc(12px + env(safe-area-inset-top));width:46px;height:46px;padding:0;font-size:22px;border-radius:14px;min-width:0}
 .touch .voice-badge{top:calc(12px + env(safe-area-inset-top));right:calc(66px + env(safe-area-inset-right));width:46px;min-width:0;height:46px;padding:0;border-radius:14px;font-size:0}
 .touch .voice-badge::before{content:'';display:block;width:24px;height:24px;margin:auto;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3M5 10h2v2a5 5 0 0 0 10 0v-2h2v2a7 7 0 0 1-6 6.93V21h3v2H8v-2h3v-2.07A7 7 0 0 1 5 12z'/%3E%3C/svg%3E") center/contain no-repeat}
 .touch .voice-badge[aria-pressed=false]::after{content:'';position:absolute;left:10px;top:21px;width:26px;height:2px;background:currentColor;transform:rotate(-45deg);box-shadow:0 1px #213035}
 .touch #prompt{display:none!important}
 .touch #joystick{left:calc(18px + env(safe-area-inset-left));bottom:calc(26px + env(safe-area-inset-bottom));width:118px;height:118px}
 .touch #touchJump,.touch #touchCrouch{position:absolute;left:auto;right:calc(18px + env(safe-area-inset-right));bottom:calc(32px + env(safe-area-inset-bottom));width:58px;height:58px;min-width:0;border-radius:50%;padding:0;background:#102126a6;border:1px solid #ffffff60;pointer-events:auto;touch-action:none}
 .touch #touchCrouch{right:calc(86px + env(safe-area-inset-right));font-size:0}
 .touch #touchCrouch::after{content:'Agachar';font-size:11px}
 .touch #touchCrouch[aria-pressed=true]::after{content:'Levantar'}
 #mobileInteraction{position:absolute;right:calc(18px + env(safe-area-inset-right));bottom:calc(104px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:6px;max-width:190px;pointer-events:auto}
 #mobileInteraction button{border:1px solid #c9fa7990;background:#102126d9;border-radius:18px;min-height:54px;touch-action:manipulation;padding:10px 16px;font-size:14px}
 #mobileInteraction .mobile-more{min-width:44px;padding:8px;font-size:22px}
 .mobile-target{position:absolute;bottom:calc(100% + 8px);right:0;width:190px;font-size:12px;line-height:1.35;text-align:right;color:white;text-shadow:0 1px 4px #000;pointer-events:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .touch .game-menu .topactions{display:block;visibility:visible}
 .mobile-menu-group{border-bottom:1px solid #ffffff20}
 .mobile-menu-group summary{padding:17px 2px;cursor:pointer;font-size:17px;font-weight:600;min-height:54px}
 .mobile-menu-options{display:grid;grid-template-columns:1fr;gap:8px;padding:0 0 14px}
 .game-menu .mobile-menu-options>button,.game-menu .mobile-menu-options>select{width:100%;min-height:48px;white-space:normal;text-align:left;font-size:14px;border-radius:10px;padding:12px;background:#20373d;color:#eef7f8;border:1px solid #ffffff25}
 .touch .game-menu{padding:calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));background:#09191edb}
 .touch .game-menu-card{width:min(100%,480px);max-height:100%;overflow-y:auto;padding:20px;overscroll-behavior:contain}
 .touch #resumeGameMenu{margin-top:16px;min-height:48px}
 .touch .game-menu-help{font-size:12px;margin:12px 0}
 .touch #toast{top:calc(72px + env(safe-area-inset-top));max-width:80vw}
 .touch .minimap{bottom:calc(205px + env(safe-area-inset-bottom))!important;right:16px}
 @media(orientation:landscape){
  .touch #joystick{bottom:calc(18px + env(safe-area-inset-bottom))}
  .touch #touchJump,.touch #touchCrouch{bottom:calc(20px + env(safe-area-inset-bottom))}
  #mobileInteraction{bottom:calc(94px + env(safe-area-inset-bottom))}
  .touch .game-menu-card{width:min(620px,90vw);padding:16px 24px}
  .mobile-menu-options{grid-template-columns:1fr 1fr}
  .touch .minimap{right:calc(180px + env(safe-area-inset-right));bottom:20px!important}
 }
}

#landscapeRequired{display:none}
@media(pointer:coarse) and (orientation:portrait){
 body:not(.in-vr) #landscapeRequired{position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:32px;background:#10262e;color:#edf7f8;touch-action:none}
 #landscapeRequired>span{font-size:64px;color:#80d5ed}
 #landscapeRequired h2{margin:0;font-size:25px}
 #landscapeRequired p{margin:0;font-size:16px;color:#bfd3da}
}

@media(pointer:coarse) and (orientation:landscape){
 body.touch:has(#startScreen:not([hidden])) .topbar,
 body.touch:has(#startScreen:not([hidden])) .voice-badge{visibility:hidden}
 .touch #startScreen{height:100dvh;max-height:100dvh;align-items:stretch;justify-content:center;padding:calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));background:#102126ed;overflow:hidden}
 .touch #startScreen .start-card{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px;width:min(100%,960px);height:100%;min-height:0;max-height:100%;padding:0}
 .mobile-start-intro,.mobile-start-actions{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;padding:8px}
 .touch #startScreen .game-title{width:100%;max-width:340px;margin:0 0 16px;padding:10px;line-height:0}
 .touch #startScreen .start-card p{max-width:none;font-size:14px;line-height:1.5;margin:0 0 14px}
 .touch #startScreen .start-meta{flex-wrap:wrap;font-size:11px;gap:8px;margin:0 0 14px}
 .touch #startScreen #startHelp{display:block;font-size:12px;line-height:1.5;color:#bfd0d4}
 .touch #startScreen .reference-note{font-size:10px;line-height:1.4;margin-top:12px}
 .mobile-start-actions{display:flex;flex-direction:column;gap:10px;scroll-padding:8px}
 .touch #startScreen .mobile-start-actions>button,.touch #startScreen .mobile-start-actions>a{width:100%;max-width:none;min-height:44px;flex-shrink:0;margin:0;padding:12px 14px;font-size:14px;line-height:1.35;white-space:normal}
 .touch #startScreen .mobile-start-actions>.primary{min-height:52px;font-size:16px}
 .touch #startScreen #vrStatus{font-size:11px;line-height:1.45;margin:0;flex-shrink:0}
 .touch #startScreen .scene-caption{display:none}
}
