body dialog#pairedScanner504[open] { position: fixed !important; inset: 0 !important; margin: auto !important; width: min(480px, calc(100vw - 12px)) !important; max-width: none !important; height: fit-content !important; min-height: 0 !important; max-height: calc(100dvh - 12px) !important; overflow: hidden !important; }
body dialog#pairedScanner504.sn-moved[open] { inset: var(--sn-top) auto auto var(--sn-left) !important; margin: 0 !important; }
body dialog#pairedScanner504.sn-expanded[open] { width: min(850px, calc(100vw - 12px)) !important; }
#pairedScanner504 > header { cursor: grab; touch-action: none; user-select: none; background: #14334f; color: white; }
#pairedScanner504 > main { margin: 0; width: 100%; max-width: none; overflow-x: hidden; }
.sn-window-actions { display: flex; gap: 4px; }
.sn-window-actions button { min-width: 44px; min-height: 44px; }
.scanner504 [hidden], .sn-phone [hidden] { display: none !important; }
.scanner504 .sn-manual input { min-width: 0; box-shadow: none; outline-offset: 0; }
.scanner504 .sn-manual input:focus { outline: 0; border-color: #236092; box-shadow: inset 0 0 0 1px #236092; }
.scanner504 .sn-photo-options { display: flex; flex-wrap: wrap; gap: 6px; }
.scanner504 .sn-view.scanViewport504 {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10 !important;
  max-height: min(280px, 45dvh);
  background: #101b23;
}
.scanner504 .sn-view.scanViewport504 video {
  position: absolute;
  inset: 0;
  object-fit: contain;
}
.scanner504 .sn-view[data-scanning] .sn-frame::after {
  content: '';
  position: absolute;
  inset: 12% 3% auto;
  height: 2px;
  background: #ff6159;
  box-shadow: 0 0 5px #53201c;
  animation: sn-scan-line 1.6s ease-in-out infinite alternate;
}
@keyframes sn-scan-line { to { top: 86%; } }
.scanner504 .sn-manual input { font-size: 16px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .scanner504 .sn-view[data-scanning] .sn-frame::after { animation: none; top: 50%; }
}
.sn-scan-launch { min-height: 36px; border: 1px solid #b9c8d8; border-radius: 8px; background: #f4f8fc; color: #14334f; font: 600 14px system-ui; padding: 4px 10px; cursor: pointer; }
@media (pointer: coarse) { .sn-scan-launch, .scanner504 button { min-height: 44px; } }
