:root {
  color-scheme: dark;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  background: #0c1523;
  color: #f4f7fc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible {
  outline: 3px solid #bed4ff;
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
#ar {
  position: fixed;
  inset: 0;
  background: #0c1523;
}
#scene-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
#scene-host a-scene {
  position: absolute;
  inset: 0;
}
.ar-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(18px, env(safe-area-inset-top)) 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#080e17b3, transparent);
  z-index: 20;
  pointer-events: none;
}
.ar-header button {
  pointer-events: auto;
}
.brand {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.5px;
  color: #e9f1ff;
}
.glass {
  color: white;
  background: #111d31c9;
  border: 1px solid #7189ac;
  border-radius: 9px;
  padding: 10px 15px;
}
.start-layer {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  background: #08132140;
  pointer-events: none;
}
.start-button {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 1px solid #91b5fa80;
  border-radius: 24px;
  padding: 26px 40px;
  color: #f4f7ff;
  background: #101e32e6;
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 80px #0005;
}
.scan-symbol {
  color: #82adff;
  font-size: 50px;
  line-height: 1;
}
.start-button strong {
  font-size: 20px;
}
.start-button small {
  color: #b3c6e0;
  font-size: 12px;
}
.start-button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.ar-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 26px 20px max(22px, env(safe-area-inset-bottom));
  text-align: center;
  z-index: 20;
  pointer-events: none;
}
#tracking-status {
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 6px #000;
  background: #0c1523b3;
  border-radius: 30px;
  padding: 10px 16px;
  display: inline-block;
  margin: 0;
}
#tracking-status:empty {
  display: none;
}
#message {
  font-size: 13px;
  line-height: 1.5;
  color: #ffd4d4;
  margin: 12px auto 0;
  max-width: 380px;
  text-shadow: 0 1px 4px #000;
}
#message:empty {
  display: none;
}
:root #video-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
:root #ar-video {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  max-width: none;
  object-fit: cover;
  transform-origin: 0 0;
  backface-visibility: hidden;
  will-change: transform;
}

/* Only the projected video receives taps; the rest of the camera remains unobstructed. */
:root #ar-video {
  pointer-events: auto;
  cursor: pointer;
}

.viewer-actions {
  display: flex;
  gap: 8px;
}
/* The video expands inside the camera document; target tracking keeps running. */
:root #video-overlay.expanded #ar-video {
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  object-fit: contain;
  background: #000;
}
