/* v0.10.29.2 — measured phone multiplayer controls, no turn-rule changes.
 * CSS-viewport width matters: a 2048px Android screenshot is often ~683 CSS px.
 * Draw and PANIC must remain anchored during a call and never cover seats. */
@media (orientation:landscape) and (max-width:900px) and (max-height:480px) {
  .game-shell.ty-online .game-stage{isolation:isolate;overflow:hidden}
  .game-shell.ty-online .game-stage .ty-draw-rail {
    position:absolute!important;inset:auto!important;
    left:5px!important;top:56%!important;
    width:clamp(94px,16.5vw,122px)!important;max-width:19%!important;
    z-index:17!important;
  }
  .game-shell.ty-online .game-stage .ty-draw-rail #draw {
    min-height:40px!important;font-size:clamp(10px,1.5vw,12px)!important;
    padding:5px!important;border-radius:10px;
  }
  /* The action panel lives INSIDE .ty-control-rail. Anchor its PARENT.
     Positioning the child as an absolute right rail sent PANIC offscreen. */
  .game-shell.ty-online .game-stage .ty-control-rail {
    position:absolute!important;inset:auto!important;
    top:56%!important;right:5px!important;left:auto!important;bottom:auto!important;
    width:clamp(94px,16.5vw,122px)!important;max-width:19%!important;
    max-height:calc(44% - 44px)!important;overflow-y:auto!important;
    padding:0!important;gap:0!important;z-index:17!important;
  }
  .game-shell.ty-online .game-stage .ty-control-rail > .action-panel,
  .game-shell.ty-online .game-stage .ty-control-rail > .action-panel.panic-visible {
    position:relative!important;inset:auto!important;width:100%!important;
    display:flex!important;flex-direction:column!important;gap:4px!important;
  }
  .game-shell.ty-online .game-stage .ty-control-rail > .action-panel .action-btn {
    min-height:40px!important;padding:5px!important;
    font-size:clamp(10px,1.5vw,12px)!important;
    line-height:1.05!important;
  }
  /* Critical active effects still appear on player seats and in the central
     status; the old floating sidebar occupies the PANIC hit target. */
  .game-shell.ty-online .game-stage .effects-panel {display:none!important}
  /* One-card warnings stay tied to the relevant seat, not to the PANIC rail. */
  .game-shell.ty-online .game-stage .opponent.party-left-lower,
  .game-shell.ty-online .game-stage .opponent.party-right-lower{top:33%!important}
  .game-shell.ty-online.ty-party-table .game-stage .opponent.crew-seat {z-index:5}
  .game-shell.ty-online .game-stage .ty28-special {z-index:38!important}
  .game-shell.ty-online .game-stage .ty27-panic-event {z-index:39!important}
}
@media (orientation:landscape) and (max-width:900px) and (max-height:370px) {
  .game-shell.ty-online .game-stage .opponent.party-left-lower,
  .game-shell.ty-online .game-stage .opponent.party-right-lower {top:30%!important}
  .game-shell.ty-online.ty-party-table .game-stage .opponent.crew-seat {
    height:43px!important;min-height:43px!important;max-height:43px!important;
    grid-template-columns:22px minmax(0,1fr) 23px!important;
    grid-template-rows:18px 13px!important;gap:1px 2px!important;padding:2px 3px!important;
  }
  .game-shell.ty-online.ty-party-table .game-stage .opponent.crew-seat .crew-portrait-wrap {
    width:21px!important;height:35px!important;grid-row:1/3!important;
  }
  .game-shell.ty-online.ty-party-table .game-stage .opponent.crew-seat .persona,
  .game-shell.ty-online.ty-party-table .game-stage .opponent.crew-seat .status-effects {display:none!important}
}
/* Reduced-motion is an accessibility setting, NOT permission to erase ability
   results. Present a readable static hit for 450ms instead of a rapid flash. */
@media(prefers-reduced-motion:reduce){
 .game-stage .ty28-hit.ty28-hit-static{display:grid!important;animation:none!important;opacity:1!important;scale:1!important;filter:none!important}
 .game-stage .ty28-hit.ty28-hit-static .ty28-hit-bolt{display:none!important}
 .game-stage .ty28-hit.ty28-hit-static .ty28-hit-ring{box-shadow:0 0 6px var(--ty28-ink)}
}
