/* Kurgöz: one full-bleed camera, a thin top bar, a bottom dock. Amber is the only accent: it marks converted prices. */
:root {
  --bg: #121216;
  --ink: #f5f5f0;
  --dim: #a3a3ad;
  --line: rgba(255,255,255,.14);
  --glass: rgba(18,18,22,.72);
  --amber: #ffb02e;
  --amber-ink: #1a1305;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --num: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); font: 15px/1.4 var(--ui); overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.controls > .round[hidden] { display: grid !important; visibility: hidden; } /* keep the shutter centred */

#stage { position: fixed; inset: 0; overflow: hidden; }
#video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
#overlay { position: absolute; inset: 0; pointer-events: none; }

/* Corner brackets: only a hint of where to aim, so the picture stays clean. */
#reticle { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 34%; pointer-events: none; opacity: .55; transition: opacity .3s; }
#reticle i { position: absolute; width: 22px; height: 22px; border: 3px solid var(--ink); }
#reticle i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
#reticle i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
#reticle i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
#reticle i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
body.found #reticle { opacity: .2; }

/* Price tags drawn on top of the video */
.box { position: absolute; border: 2px solid var(--amber); border-radius: 6px; box-shadow: 0 0 0 9999px transparent; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease, opacity .25s; }
.tag { position: absolute; transform: translate(-50%, calc(-100% - 8px)); background: var(--amber); color: var(--amber-ink); font: 700 17px/1 var(--num); padding: 7px 10px; border-radius: 9px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: left .25s ease, top .25s ease, opacity .25s; }
.tag::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 0; border-top-color: var(--amber); }
.tag small { font-weight: 600; opacity: .7; margin-right: 4px; font-size: 12px; }

/* Top bar */
.bar { position: fixed; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + 10px) 14px 10px; display: flex; align-items: center; gap: 10px; background: linear-gradient(#000a, #0000); }
.brand { font-weight: 700; letter-spacing: .01em; }
.chip { border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 999px; padding: 6px 12px; font-weight: 600; }
.rate { margin-left: auto; font: 11px/1.35 var(--num); color: var(--ink); text-align: right; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 10px; padding: 5px 9px; }
.rate br + * , .rate span { color: var(--dim); }

/* Bottom dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(var(--safe-b) + 16px); background: linear-gradient(#0000, #000b 30%, #000e); display: grid; gap: 10px; justify-items: center; }
.status { font-size: 12px; color: var(--ink); opacity: .8; min-height: 16px; text-shadow: 0 1px 3px #000; }
.readout { display: flex; align-items: baseline; gap: 10px; font-family: var(--num); min-height: 40px; }
.readout .from { font-size: 18px; color: var(--dim); }
.readout .arrow { color: var(--dim); }
.readout .to { font-size: 32px; font-weight: 700; color: var(--amber); }
.controls { display: flex; align-items: center; justify-content: center; gap: 34px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); display: grid; place-items: center; }
.round[aria-pressed="true"] { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--ink); background: transparent; padding: 0; display: grid; place-items: center; }
.shutter span { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); transition: transform .15s, border-radius .2s, background .2s; }
.shutter:active span { transform: scale(.92); }
body.frozen .shutter span { border-radius: 12px; transform: scale(.6); background: var(--amber); }

/* Sheets */
.sheet { position: fixed; inset: 0; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.55); z-index: 10; }
.sheet.show { display: flex; }
.panel { width: 100%; max-width: 520px; background: var(--bg); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 18px 18px calc(var(--safe-b) + 18px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.panel h2 { margin: 0; font-size: 15px; color: var(--dim); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid button { border: 1px solid var(--line); background: #1c1c22; border-radius: 12px; padding: 12px 6px; display: grid; gap: 2px; }
.grid button b { font: 700 18px var(--num); }
.grid button span { font-size: 11px; color: var(--dim); }
.grid button[aria-pressed="true"] { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.ghost { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 12px; }
.primary { border: 0; background: var(--amber); color: var(--amber-ink); font-weight: 700; border-radius: 14px; padding: 15px 18px; font-size: 16px; width: 100%; }

#intro { align-items: center; background: var(--bg); }
.intro-card { max-width: 340px; padding: 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.intro-card img { border-radius: 18px; }
.intro-card h1 { margin: 4px 0 0; font-size: 28px; }
.intro-card p { margin: 0; color: var(--dim); }
.intro-card .fine { font-size: 12px; }

.calc-in { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; background: #1c1c22; }
.calc-in span { font: 700 22px var(--num); color: var(--dim); }
.calc-in input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); font: 700 28px var(--num); padding: 10px 0; outline: none; }
.calc-out { font: 700 36px var(--num); color: var(--amber); text-align: center; }

@media (prefers-reduced-motion: reduce) { .box, .tag, .panel { transition: none; animation: none; } }
