.ar-viewer-status {
  display: none;
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: min(520px, calc(100% - 28px));
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(0, 6, 23, 0.76);
  color: #fff;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.viewer-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 49, 165, 0.22);
  border-radius: 6px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.viewer-actions a[aria-disabled="true"] {
  cursor: default;
  opacity: 0.62;
}

.viewer-actions [hidden] { display: none; }

.ar-quicklook-preview {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ar-launch { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:16px 0; }
.ar-launch > a { display:inline-flex; align-items:center; gap:10px; padding:8px 14px; min-height:56px; border:1px solid currentColor; border-radius:6px; font-weight:700; }
.ar-launch [hidden] { display:none; }
#native-ar::after { content:attr(aria-label); }
.ar-launch p { flex-basis:100%; }
#viewer { position:relative; z-index:1; }
.viewer-actions,.ar-viewer-status { z-index:2; transform:translateZ(0); }
.viewer-wrap.viewer-expanded { position:fixed; inset:0; width:100%; height:100dvh; margin:0; z-index:100; }
body.viewer-open { overflow:hidden; }
.viewer-actions { padding-top:env(safe-area-inset-top); }

body.camera-page,
body:has(.camera-shell) {
  overflow: hidden;
  background: #101618;
}

body.camera-page .topbar,
body.camera-page footer,
body:has(.camera-shell) .topbar,
body:has(.camera-shell) footer {
  display: none;
}

body.camera-page main,
body:has(.camera-shell) main {
  min-height: 100dvh;
}

.camera-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: #101618;
}

.camera-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay {
  z-index: 2;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.back-light {
  display: inline-flex;
  align-self: flex-start;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-weight: 700;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.camera-panel {
  width: min(520px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.camera-panel .eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
}

.camera-panel h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.camera-panel p {
  margin: 0;
}

.camera-candidates {
  max-height: 78px;
  overflow: auto;
  gap: 8px 12px;
  margin: 12px 0;
  font-size: 14px;
}

.camera-actions {
  gap: 8px;
}

.camera-actions button {
  min-height: 44px;
}

.scan-frame {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 38%;
  width: min(68vw, 360px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(8, 127, 157, 0.75), 0 0 0 1px rgba(8, 127, 157, 0.35), 0 12px 30px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

@media (max-width: 540px) {
  .scan-frame {
    top: 36%;
    width: min(76vw, 310px);
  }

  .camera-panel {
    padding: 12px;
  }

  .camera-panel h1 {
    font-size: 22px;
  }

  .camera-candidates {
    max-height: 66px;
    font-size: 13px;
  }
}
