.sm-camera video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #1c1c1e; }
.sm-camera-status { max-width: calc(100% - 20px); white-space: normal; text-align: center; justify-content: center; }
#codeOverlays { position: absolute; inset: 0; pointer-events: none; }
.scan-code { position: absolute; pointer-events: auto; padding: 0; background: rgba(15, 150, 82, .1); border: 2px solid #37cf83; color: #fff; border-radius: 2px; }
.scan-code span { position: absolute; left: 0; top: 100%; max-width: 180px; overflow: hidden; text-overflow: ellipsis; padding: 3px 5px; background: #163c2a; white-space: nowrap; font-size: 12px; }
.scan-code:focus-visible { outline: 3px solid white; outline-offset: 2px; }
.scan-line-header { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.scan-line-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.scan-line-fields label { display: grid; gap: 4px; font-size: 12px; }
.scan-line-fields input { width: 100%; min-width: 0; }
.scan-line-header small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.sm-topbar a { margin-left: auto; text-decoration: none; }
.sm-detections button { min-height: 44px; overflow-wrap: anywhere; }
#error { overflow-wrap: anywhere; }
[data-user-scan-settings] select[multiple] { min-height: 96px; }
#scan .sm-main { max-width: 1250px; padding: 8px 0 28px; }
#scan .sm-heading { align-items: center; flex-direction: row; }
#scan .sm-heading > div { min-width: 0; }
#scan .sm-heading > .sm-btn { flex-shrink: 0; }
[data-theme="dark"] #scan .sm-modebar button[aria-pressed="true"],
[data-theme="dark"] #scan .sm-last > svg,
[data-theme="dark"] #scan .sm-action > svg:first-child { color: #f2a4b8; }
[data-theme="dark"] #scan .sm-badge { color: #f2a4b8; background: #4b2530; }
[data-theme="dark"] .general-scan-active .topbar-brand img { background: #fff; padding: 4px; border-radius: 3px; }
@media (max-width: 767px) {
  #scan { padding: 12px 14px; }
  #scan .sm-main { padding-bottom: 90px; }
  #scan .sm-heading { gap: 10px; margin-bottom: 12px; }
  #scan .sm-heading h1 { font-size: 20px; }
  #scan .sm-context { padding: 8px 0 10px; margin-bottom: 10px; }
  #scan .sm-context-top { margin-bottom: 4px; }
  #scan .sm-modebar { margin-bottom: 10px; }
  #scan .sm-camera { width: 100%; height: clamp(220px, 35dvh, 320px); max-height: none; aspect-ratio: auto; }
  #scan .sm-camera-toolbar { padding: 8px 0; }
  #scan .sm-last { margin-top: 4px; padding: 10px 0; }
  #scan .sm-mobile-footer { bottom: calc(70px + env(safe-area-inset-bottom)); padding: 8px 14px; z-index: 50; }
  #scan .sm-list.is-open { inset: 64px 0 calc(64px + env(safe-area-inset-bottom)); z-index: 60; }
  #scan .sm-toast { bottom: calc(152px + env(safe-area-inset-bottom)); z-index: 70; }
}
@media (max-width: 767px) { .sm-camera { aspect-ratio: 16 / 10; max-height: 28dvh; } .scan-line-fields { gap: 6px; } .scan-line-fields input { min-height: 44px; } }
@media (max-width: 720px) { .sm-topbar { gap: 8px; } .sm-topbar img { width: 96px; } .sm-topbar a { padding-inline: 8px; } }
