/* R89: a deliberate first action; existing simulator/camera logic remains available. */
.mobile-entry-r89,.mobile-camera-r89 {display:none}
@media (max-width:767px), (max-width:960px) and (max-height:500px) and (pointer:coarse) {
  body {padding-bottom:env(safe-area-inset-bottom)}
  .topbar {padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .mobile-entry-r89 {padding:18px max(16px,env(safe-area-inset-left));background:#f7f8f1;border-bottom:1px solid #bdcec4;scroll-margin-top:12px}
  body[data-mobile-entry="true"] .mobile-entry-r89 {display:block}
  .mobile-entry-r89 .eyebrow {margin:0 0 6px;font-size:10px;letter-spacing:.1em}
  .mobile-entry-r89 h2 {font-size:22px;line-height:1.18;margin:0 0 8px;letter-spacing:-.4px}
  .mobile-entry-r89 p:not(.eyebrow) {font-size:14px;line-height:1.45;margin:0 0 14px;max-width:46ch}
  .mobile-entry-r89 button {display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;min-height:46px;font-size:15px;text-align:left;background:#214e46;color:#fff;border-color:#214e46;font-weight:650}
  body[data-mobile-entry="true"] .controls #pause,
  body[data-mobile-entry="true"] .station-rail,
  body[data-mobile-entry="true"] .workspace .metrics,
  body[data-mobile-entry="true"] .workspace .inspector,
  body[data-mobile-entry="true"] .stage-toolbar {display:none!important}
  body[data-mobile-entry="true"] .workspace {display:block}
  body[data-mobile-entry="true"] .workspace .plant {grid-template-rows:clamp(280px,42svh,380px);grid-template-areas:"stage"}
  body[data-mobile-entry="true"] .workspace .stage {min-height:280px}
  body[data-mobile-entry="true"] #stage canvas {pointer-events:none}
  body[data-mobile-entry="true"] .stage-caption .live-dot {background:#81968c;animation:none}
  .station-rail {padding:5px 10px;gap:3px}
  .station-rail button {min-height:44px;padding:5px 2px}
  .station-rail button strong {font-size:11px}
  .workspace .metrics {padding:8px 12px;background:#f1f4ed}
  .workspace .metrics strong {font-size:18px}
  .workspace .metrics small {font-size:10px}
  .workspace .stage-toolbar {display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:5px;bottom:9px;left:8px;right:8px;padding:0;background:none;box-shadow:none}
  .workspace .stage-toolbar button {min-width:0;min-height:44px;white-space:normal;font-size:11px;padding:6px;line-height:1.25}
  .mobile-camera-r89 {display:block}
  #stage {scroll-margin-top:12px}
  .workspace .inspector {padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  #help {max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  #help .dialog-title button {min-height:44px;min-width:44px}
}
