/* v0.10.15 · Mobile board composition follow-up on the release polish pass.
   No new game mechanics or layout structure: avoid taps being interpreted as
   double-tap zoom, preserve natural card swipe, and allow controls to scroll. */
@media (pointer:coarse){
  #tymp-root button,
  .game-shell .topbar button,
  .game-stage .ty-control-rail button,
  .game-stage .match-footer button,
  .overlay button {touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  #tymp-root,.overlay,.dialog,.game-stage .ty-control-rail {
    overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
  }
  .game-stage .hand-scroll{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .game-stage .hand-card-cell{touch-action:pan-x}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:640px){
  /* Stay out of an iPhone's camera/sensor cutout without moving the card table. */
  .game-shell .topbar{padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px))}
  .game-shell .game-stage .ty-control-rail{right:max(5px,env(safe-area-inset-right,0px))!important}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:430px){
  /* Tight layouts can scroll their bounded control rail instead of presenting
     28-pixel-tall controls that are difficult to tap on a physical phone. */
  .game-shell .game-stage .ty-control-rail > .action-panel .action-btn{min-height:36px!important}
}
@media (prefers-reduced-motion:reduce){
  #tymp-root button,.overlay button{scroll-behavior:auto;transition:none!important}
}


@media (pointer:coarse) and (orientation:landscape) and (max-height:500px){
  /* v0.10.15: compact mobile board composition.
     Keep side opponents from sitting on the orbit ring and reduce the
     ship/spotlight footprint so the board reads first. */
  .game-shell .game-stage .orbit-container{left:15.5%;right:15.5%;top:11.5%;height:46%;opacity:.56}
  .game-shell .game-stage .ship-lane-base{stroke-opacity:.34!important;stroke-width:1.8!important}
  .game-shell .game-stage .ship-trail-halo{stroke-width:8px!important;opacity:.26!important}
  .game-shell .game-stage .ship-trail-mid{stroke-width:3px!important;opacity:.56!important}
  .game-shell .game-stage .ship-trail-tip{stroke-width:1.8px!important;opacity:.82!important}
  .game-shell .game-stage .foxy-orbit-marker{width:clamp(42px,6.1vw,64px)!important;filter:drop-shadow(0 0 5px #4cdae878)!important}
  .game-shell .game-stage .foxy-ship{filter:drop-shadow(0 0 4px #52e9f678) brightness(1.04) saturate(1.02)!important}
  .game-shell .game-stage .foxy-orbit-marker .foxy-ship-glow{left:23%;bottom:14%;width:48%;height:10%;opacity:.11;filter:blur(4px)}
  .game-shell .game-stage .ship-spotlight #ship-spotlight-aura{opacity:.46}
  .game-shell .game-stage .ship-spotlight #ship-spotlight-wash{opacity:.38}
  .game-shell .game-stage .ship-spotlight #ship-spotlight-core{opacity:.34}
  .game-shell .game-stage .ship-spotlight #ship-spotlight-ray{opacity:.56}
  .game-shell .game-stage .ship-spotlight .spotlight-edge{opacity:.5}
  .game-shell .game-stage .opponent.bot-left,
  .game-shell .game-stage .opponent.bot-right{width:clamp(148px,16vw,184px);min-height:100px;padding:9px 11px;top:19%}
  .game-shell .game-stage .opponent.bot-left{left:max(4px,env(safe-area-inset-left,0px))}
  .game-shell .game-stage .opponent.bot-right{right:max(4px,env(safe-area-inset-right,0px))}
  .game-shell .game-stage .opponent .name{font-size:11px;left:44px;max-width:calc(100% - 94px)}
  .game-shell .game-stage .opponent .persona{font-size:8px;max-width:85px}
  .game-shell .game-stage .opponent .big-count{width:48px;min-height:58px;font-size:30px}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:430px){
  .game-shell .game-stage .orbit-container{left:17.5%;right:17.5%;height:44%;opacity:.48}
  .game-shell .game-stage .foxy-orbit-marker{width:clamp(38px,5.6vw,56px)!important}
  .game-shell .game-stage .opponent.bot-left,
  .game-shell .game-stage .opponent.bot-right{width:clamp(138px,15vw,170px);min-height:96px;padding:8px 10px}
}

/* v0.10.16: target selection is a real interaction, unlike the passive
   center status banner. Previous mobile parity disabled pointer events on
   ALL battle messages and silently swallowed Cancel Selection taps. */
@media (pointer:coarse) and (orientation:landscape) and (max-height:760px) {
  .game-shell .game-stage.is-choosing-target .battle-message {
    pointer-events:auto!important;
    z-index:20!important;
    overflow:visible!important;
    max-height:none!important;
    height:auto!important;
    min-height:clamp(82px,17dvh,110px);
    padding:clamp(5px,1dvh,10px) 10px!important;
    width:min(410px,calc(100% - 2 * var(--side-w,160px) - 12px));
    max-width:calc(100% - 2 * var(--side-w,160px) - 12px);
    bottom:calc(var(--hand-bottom,50px) + var(--hand-h,90px) + 8px);
  }
  .game-shell .game-stage.is-choosing-target #cancel-target {
    display:inline-flex;
    pointer-events:auto!important;
    touch-action:manipulation;
    position:relative;
    z-index:1;
    min-width:152px;
    min-height:44px;
    padding:8px 12px;
    margin:6px auto 0;
    line-height:1.15;
    font-size:clamp(10px,1.2vw,12px);
    -webkit-tap-highlight-color:transparent;
  }
  .game-shell .game-stage.is-choosing-target #cancel-target:focus-visible {
    outline:2px solid #8af5ff;
    outline-offset:2px;
  }
}
