:root {
  color-scheme: dark;
  --ink: #10100f;
  --panel: #191816;
  --cream: #f5f0e7;
  --muted: #b8b1a4;
  --gold: #d9b56f;
  --line: rgba(217, 181, 111, .28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #29241b 0, var(--ink) 48rem);
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
}
button { font: inherit; }
.shell { width: min(100% - 32px, 620px); margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom)); }
.brand { display: flex; align-items: center; gap: 13px; padding: 8px 0 25px; border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 23px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font: 600 10px/1.3 Arial, sans-serif; letter-spacing: .2em; }
.brand h1 { margin: 0; font-size: 18px; font-weight: 400; letter-spacing: .02em; }
.intro { padding: 25px 2px 18px; }
.eyebrow.gold { color: var(--gold); }
.intro h2 { max-width: 540px; margin: 0 0 9px; font-size: clamp(30px, 8vw, 43px); line-height: 1.05; font-weight: 400; }
.intro > p:last-child { margin: 0; color: var(--muted); font: 15px/1.55 Arial, sans-serif; }
.scanner { position: relative; overflow: hidden; min-height: 330px; aspect-ratio: 4 / 5; max-height: 58vh; border: 1px solid var(--line); border-radius: 18px; background: #0c0c0b; box-shadow: 0 18px 60px rgba(0, 0, 0, .45); }
.camera-placeholder { position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at center, rgba(47, 39, 26, .84), rgba(12, 12, 11, .96)); pointer-events: none; transition: background .3s ease; }
.scanner.is-active .camera-placeholder { background: transparent; }
.placeholder-icon { color: var(--gold); font: 58px/1 Arial, sans-serif; opacity: .8; }
.camera-placeholder p { position: absolute; left: 16px; right: 16px; bottom: 17px; margin: 0; padding: 11px 14px; border: 1px solid rgba(217, 181, 111, .3); border-radius: 12px; background: rgba(10, 10, 9, .72); color: var(--cream); text-align: center; font: 13px/1.4 Arial, sans-serif; }
.scan-frame { position: absolute; width: 58%; height: 70%; border: 1px solid rgba(217, 181, 111, .55); border-radius: 12px; opacity: .8; }
.scan-frame span { position: absolute; width: 22px; height: 22px; border-color: var(--gold); border-style: solid; }
.scan-frame span:nth-child(1) { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 12px 0 0; }
.scan-frame span:nth-child(2) { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 12px 0 0; }
.scan-frame span:nth-child(3) { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 12px; }
.scan-frame span:nth-child(4) { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-radius: 0 0 0 12px; }
.scanner.is-active .placeholder-icon { display: none; }
.scanner.is-active .scan-frame { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; transform: scale(.97); } }
a-scene { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 1; }
a-scene canvas { display: block; width: 100%; height: 100%; }
.camera-controls { display: flex; gap: 9px; margin-top: 13px; }
.button { min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font: 600 13px Arial, sans-serif; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.button:active { transform: scale(.98); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { flex: 1; background: var(--gold); border-color: var(--gold); color: #211a10; }
.button-secondary { background: #25221c; color: var(--cream); }
.button-quiet { background: transparent; color: var(--muted); }
.tips { display: grid; grid-template-columns: 30px 1fr; gap: 10px 12px; margin: 24px 2px 20px; align-items: baseline; }
.tip-number { color: var(--gold); font: 600 11px Arial, sans-serif; letter-spacing: .08em; }
.tips p { margin: 0; color: var(--muted); font: 13px/1.45 Arial, sans-serif; }
footer { padding: 18px 2px 0; border-top: 1px solid var(--line); color: #8d8679; font: 11px/1.5 Arial, sans-serif; text-align: center; }
@media (max-width: 380px) { .shell { width: min(100% - 22px, 620px); } .camera-controls { gap: 6px; } .button { padding: 0 12px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
