* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050a1c; color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; touch-action: none; }
#ar { position: fixed; inset: 0; }
#ar video, #ar canvas { position: absolute; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 20%, #12307a 0%, #050a1c 70%); }
.card { max-width: 380px; text-align: center; }
h1 { margin: 0 0 16px; font-size: 40px; letter-spacing: -.5px; }
h1 span { display: block; font-size: 15px; font-weight: 500; letter-spacing: .35em; text-transform: uppercase; color: #6fd0ff; margin-top: 6px; }
h2 { margin: 0 0 8px; font-size: 24px; }
p { line-height: 1.5; color: #cdd8f5; }
small { display: block; margin-top: 18px; color: #7d8bb3; }
button, .btn { display: inline-block; margin-top: 12px; padding: 16px 40px; font: 600 18px inherit; color: #fff; text-decoration: none; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #2f7bff, #8a3ffc); box-shadow: 0 8px 30px rgba(80,120,255,.45); }
button:active { transform: scale(.97); }
button.ghost { background: transparent; box-shadow: none; border: 1px solid rgba(255,255,255,.35); display: block; margin: 14px auto 0; padding: 12px 32px; font-size: 16px; }

/* HUD */
.hud { position: fixed; z-index: 10; top: calc(14px + env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.hud > * { pointer-events: auto; }
.score { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: rgba(5,10,28,.6); backdrop-filter: blur(8px); font-size: 13px; font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); transition: background .25s, transform .25s; }
.dots i.on { background: #6fd0ff; box-shadow: 0 0 8px #6fd0ff; transform: scale(1.2); }
.icon { margin: 0; width: 40px; height: 40px; padding: 0; border-radius: 50%; font: 700 18px/40px Georgia, serif; font-style: italic; background: rgba(5,10,28,.6); backdrop-filter: blur(8px); box-shadow: none; border: 1px solid rgba(255,255,255,.25); }

.toast { position: fixed; z-index: 10; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translate(-50%, -10px); opacity: 0; pointer-events: none; text-align: center;
  padding: 10px 20px; border-radius: 18px; background: rgba(8,16,48,.85); border: 1px solid rgba(120,190,255,.7); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { display: block; font-size: 17px; }
.toast span { color: #9fd4ff; font-size: 14px; }

.hint, .coach { position: fixed; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; max-width: 86vw; text-align: center;
  padding: 10px 18px; border-radius: 18px; background: rgba(5,10,28,.65); backdrop-filter: blur(8px); font-size: 15px; transition: opacity .3s; }
.hint.fade { opacity: 0; pointer-events: none; }

.done { position: fixed; z-index: 20; inset: auto 16px calc(24px + env(safe-area-inset-bottom)) 16px; display: flex; justify-content: center; }
.done .card { width: 100%; max-width: 420px; padding: 22px; border-radius: 24px; background: rgba(5,10,28,.85); backdrop-filter: blur(12px); border: 1px solid rgba(120,190,255,.5); }

.sheet { position: fixed; inset: 0; z-index: 25; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.5); }
.panel { position: relative; width: 100%; max-width: 480px; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #0a1330; border-top: 1px solid rgba(120,190,255,.5); }
.panel h2 { margin: 0; }
.sub { margin: 4px 0 14px; color: #6fd0ff; font-size: 14px; }
.close { position: absolute; top: 14px; right: 14px; font-style: normal; font-family: inherit; font-size: 24px; line-height: 38px; }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.benefits li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.06); }
.benefits span { color: #9fd4ff; text-align: right; }
