/* Native buttons share one click path for touch, pen, keyboard and mouse. */
button,a,input,select{touch-action:manipulation}
button:active:not(:disabled){filter:brightness(1.2)}
.play-scene>img,.scene>img{-webkit-user-drag:none;user-select:none;-webkit-touch-callout:none;pointer-events:none}
.hotspot,.corridor-navigation{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.hotspot:active:not(:disabled){background:#74d9d040;border-color:var(--accent)}
html[data-touch-targets=true] .hotspot{background:#74d9d018;border-color:#74d9d080}
html[data-touch-targets=true] .hotspot span{display:block}
.touch-targets[aria-pressed=true]{border-color:var(--accent);background:#173b3d}
.play-header>div:first-child{min-width:0}
.play-header h1{overflow-wrap:anywhere}
.play-header-actions{flex-shrink:0;flex-wrap:wrap}
.play-actions{display:flex;flex-direction:column;overflow:hidden}
#interaction-actions{flex:1;min-height:0;max-height:none;overflow:auto;align-content:start}
.play-actions>.game-tabs{flex:none}
.action-timing:has(p:empty){display:none}
dialog{max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)))}
.update-status{flex:none;margin:4px 0;font-size:.75rem;color:var(--gold)}
@media(orientation:portrait){
  .play-layout{grid-template-rows:auto minmax(60px,1fr) minmax(140px,30%);gap:8px}
  .scene-status,.play-scene{width:min(100%,max(168px,calc(100dvh - 400px)))}
  .play-actions{height:100%}
}
@media(orientation:landscape){
  .play-actions{align-self:stretch}
  .play-layout{--scene-size:min(42vw,calc(100dvh - 160px));grid-template-columns:minmax(0,1fr) var(--scene-size) minmax(150px,.85fr)}
}
@media(any-pointer:coarse){
  button,.terminal-display button,.play-actions .game-tabs button,.play-header-actions button{min-height:44px}
  .close-button{min-width:44px}
  input,select,.character-field input,.character-field select{font-size:max(16px,1rem)}
  .toggle-field{min-height:54px}
  .toggle-field input{margin-block:7px}
  .play-header{gap:6px}
  .play-header-actions{gap:4px}
  .play-header-actions button{padding:6px;font-size:.75rem}
  .terminal-display:not([hidden]){inset:0;width:100%;height:100%;z-index:4;font-size:16px;padding:6px}
  .terminal-display .camera-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-height:144px}
  .terminal-display button{font-size:12px;padding:6px}
  .terminal-display:has(.camera-feed)>button{bottom:6px;left:6px;max-width:48%}
  .terminal-display:has(.camera-feed)>.camera-size{right:6px;left:auto}
  .terminal-display:has(.camera-feed)>strong{font-size:13px;max-width:100%}
  .life-log{font-size:14px}
  #interaction-actions{gap:8px}
  #interaction-actions button{min-height:48px;font-size:.875rem}
  #pda-map{touch-action:pan-x pan-y pinch-zoom}
}
@media(max-width:360px) and (orientation:portrait){
  .play-header{flex-wrap:wrap}
  .play-header-actions{width:100%;justify-content:flex-end}
  .scene-status,.play-scene{width:min(100%,max(168px,calc(100dvh - 430px)))}
}
/* Very short browser viewports and the software keyboard can scroll the shell. */
@media(max-height:440px) and (orientation:portrait){
  .shell,.play-shell{overflow-y:auto}
  .main-layout,.play-layout{flex:none}
  .scene-column{width:120px}
  .play-layout{grid-template-rows:auto 80px 190px}
}
@media(max-height:300px) and (orientation:landscape){
  .shell,.play-shell{overflow-y:auto}
  .main-layout{min-height:250px;flex:none}
  .play-layout{min-height:220px;flex:none}
}
