#pressure-ui { position: relative; margin: 0 10px 10px; }
.pressure-clock { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 7px 9px; border: 2px inset white; background: #ffffa3; color: #660000; font: 9px 'Courier New', monospace; }
.pressure-clock strong { display: inline-block; background: #202020; color: #64ff4a; padding: 3px 6px; font: bold 18px/1 'Courier New', monospace; min-width: 45px; text-align: center; margin-left: 5px; }
.pressure-clock.urgent { background: #ffdbb0; border-color: #b00000; }
.pressure-clock.urgent strong { background: #800000; color: #fff; }
.pressure-clock .text-button { padding: 3px; min-height: 24px; font-size: 9px; }
.inspection-strip { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px; background: #e9e9ff; border: 1px solid #000080; border-top: 0; font: 10px/1.5 Tahoma, sans-serif; }
.inspection-strip b { display: block; color: #000080; font: bold 9px 'Courier New', monospace; margin-bottom: 3px; }
.inspection-strip .button { font-size: 10px; min-height: 32px; padding: 5px 9px; flex-shrink: 0; }
.inspection-done { background: #e3efd5; border-color: #58763d; }
.popup-stack { position: absolute; top: calc(100% + 15px); left: 0; right: 0; pointer-events: none; }
.nuisance-popup { width: min(390px, calc(100% - 36px)); position: absolute; top: calc(var(--pile) * 29px); right: calc(8px + var(--pile) * 8px); pointer-events: auto; background: #c0c0c0; border: 2px outset white; padding: 2px; box-shadow: 5px 5px #0005; color: #111; }
.nuisance-title { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 3px 4px 3px 6px; background: #000080; color: white; font: bold 11px Tahoma, sans-serif; }
.expiry-popup .nuisance-title { background: #950000; }
.popup-x { color: black; background: #c0c0c0; border: 2px outset white; width: 23px; height: 23px; flex-shrink: 0; padding: 0; font: bold 17px/17px Tahoma, sans-serif; }
.nuisance-body { display: flex; align-items: center; gap: 12px; padding: 18px 15px 10px; }
.nuisance-body p { font: 12px/1.5 Tahoma, sans-serif; }
.nuisance-symbol { color: #956000; text-shadow: 1px 1px #fff; font: 37px/1 serif; flex-shrink: 0; }
.nuisance-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 9px 13px 14px; }
.nuisance-actions small { font: 8px 'Courier New', monospace; color: #444; }
.nuisance-actions .button { font-size: 10px; padding: 6px 10px; min-height: 31px; max-width: 100%; }
#arcade-dialog { width: min(740px, calc(100% - 24px)); max-width: 740px; max-height: calc(100dvh - 24px); }
#arcade-dialog .dialog-head .button { padding: 0; width: 25px; min-height: 22px; height: 23px; font-size: 18px; }
.arcade-body { padding: 18px; }
.arcade-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font: bold 10px 'Courier New', monospace; color: #000080; }
.arcade-clock { color: #333; white-space: nowrap; }
.arcade-clock b { font-size: 24px; color: #008000; }
.arcade-clock.urgent b { color: #ad0000; text-decoration: underline; }
.arcade-instructions { font-size: 12px; line-height: 1.5; margin-bottom: 14px; color: #111; }
.arcade-field { position: relative; width: 100%; aspect-ratio: 640 / 300; background-color: #ffffed; background-image: linear-gradient(#00008009 1px, transparent 1px), linear-gradient(90deg, #00008009 1px, transparent 1px); background-size: 20px 20px; border: 3px inset #fff; overflow: hidden; touch-action: none; }
.arcade-field:focus-visible { outline: 2px dotted navy; outline-offset: 2px; }
.arcade-field > svg { display: block; width: 100%; height: 100%; font-family: 'Courier New', monospace; user-select: none; }
.arcade-grid-label { position: absolute; left: 12px; top: 10px; color: #777; font: 9px 'Courier New', monospace; }
.rogue-checkbox, .robot-checkbox { position: absolute; width: 18.75%; height: 13.33%; min-height: 25px; padding: 0; border: 2px outset white; background: #c0c0c0; color: #000080; font: bold clamp(8px, 1.4vw, 12px) Tahoma, sans-serif; white-space: nowrap; box-shadow: 2px 2px #0004; touch-action: manipulation; }
.rogue-checkbox { z-index: 2; background: #ffff55; }
.rogue-checkbox { transform: scale(var(--target-scale, 1)); transform-origin: top left; }
.scanner-status { position: absolute; right: 8px; top: 8px; background: #900; color: white; padding: 5px 7px; font: bold 10px 'Courier New', monospace; z-index: 3; }
.scanner-status.scanner-open { background: #006000; }
.robot-checkbox { background: #ddd; color: #777; }
.robot-one { left: 57%; top: 20%; transform: rotate(-7deg); }
.robot-two { left: 24%; top: 72%; transform: rotate(8deg); }
.arcade-score { display: flex; justify-content: space-between; gap: 10px; font: 10px 'Courier New', monospace; margin: 9px 0; }
.arcade-score > span { font-size: 8px; color: #555; text-align: right; }
.arcade-feedback { min-height: 18px; font: 11px/1.4 Tahoma, sans-serif; color: #800000; margin: 10px 0; }
.arcade-controls > .button { width: 100%; }
.launch-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; }
.launch-sliders label { font-size: 11px; display: block; }
.launch-sliders b { float: right; font-family: monospace; }
.launch-sliders input { display: block; width: 100%; accent-color: #000080; margin: 8px 0; min-height: 26px; }
.tilt-controls { display: flex; gap: 7px; }
.tilt-controls .button { flex: 1; }
.brake-row { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 10px; font: 12px 'Courier New', monospace; }
.brake-row .button { color: #a00000; font-weight: bold; }
.arcade-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 13px; margin-top: 15px; border-top: 1px solid #999; }
.arcade-bottom .button { font-size: 10px; padding: 5px 8px; }
.arcade-interruption, .arcade-result { position: absolute; top: 15%; left: 14%; width: 72%; padding: 15px; border: 2px outset #fff; background: #c0c0c0; box-shadow: 4px 4px #0005; z-index: 4; font: 12px Tahoma, sans-serif; }
.arcade-interruption strong, .arcade-result strong { display: block; padding: 5px; background: navy; color: white; font: bold 10px Tahoma, sans-serif; }
.arcade-interruption p, .arcade-result p { font-size: 11px; line-height: 1.4; margin: 10px 0; }
.arcade-interruption .button, .arcade-result .button { font-size: 11px; }
.arcade-result { top: 20%; text-align: center; }
.arcade-result strong { background: #007000; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  #pressure-ui { margin-inline: 6px; }
  .pressure-level { display: none; }
  .inspection-strip { flex-wrap: wrap; gap: 7px; }
  .inspection-strip .button { width: 100%; }
  .nuisance-popup { width: calc(100% - 25px); right: calc(3px + var(--pile) * 6px); }
  .nuisance-title { font-size: 10px; }
  .nuisance-body { padding: 12px 9px 7px; gap: 8px; }
  .nuisance-symbol { font-size: 27px; }
  .nuisance-body p { font-size: 11px; }
  .nuisance-actions { padding: 7px 9px 10px; gap: 6px; }
  .arcade-body { padding: 12px; }
  .arcade-status { font-size: 8px; }
  .arcade-clock b { font-size: 20px; }
  .arcade-instructions { font-size: 11px; }
  .arcade-field { aspect-ratio: 640 / 340; }
  .arcade-grid-label { font-size: 7px; }
  .scanner-status { top: 23px; font-size: 8px; padding: 3px 5px; }
  .rogue-checkbox, .robot-checkbox { width: 24%; font-size: 7px; }
  .tilt-controls { gap: 4px; }
  .tilt-controls .button { font-size: 10px; padding-inline: 4px; }
  .brake-row { font-size: 10px; gap: 6px; flex-wrap: wrap; }
  .brake-row .button { font-size: 10px; padding-inline: 6px; }
  .arcade-bottom { gap: 6px; }
  .arcade-bottom .button { flex: 1; }
  .arcade-interruption, .arcade-result { top: 8%; left: 5%; width: 90%; padding: 8px; }
  .arcade-interruption p, .arcade-result p { font-size: 10px; margin: 7px 0; }
  .arcade-interruption .button, .arcade-result .button { font-size: 10px; padding: 5px; min-height: 28px; }
  .launch-sliders { gap: 10px; }
  .launch-sliders label { font-size: 10px; }
}
