:root {
  --bg: #0b0f14; --ink: #f3f5f7; --mute: #9aa6b2; --line: rgba(255,255,255,.14);
  --accent: #19e3b1; --accent-ink: #04221b; --glass: rgba(11,15,20,.62);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden;
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }

#ar { position: fixed; inset: 0; overflow: hidden; background: #000; }
#ar video { object-fit: cover; }
#full { position: fixed; inset: 0; z-index: 2;
  background: radial-gradient(120% 80% at 50% 100%, #12303a 0%, #0b0f14 60%); }
#full-canvas { width: 100%; height: 100%; display: block; }
video.src { position: fixed; left: 0; bottom: 0; width: 2px; height: 2px; opacity: .01; pointer-events: none; z-index: 0; }

#gate { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #143842 0%, #0b0f14 62%); }
.gate-card { width: min(100%, 420px); text-align: center; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 10vw, 46px); line-height: 1.05; letter-spacing: -.02em; }
.role { margin: 8px 0 26px; color: var(--mute); font-size: 17px; }
.why { margin: 0 auto 26px; max-width: 34ch; color: #cfd6dd; }

.btn { appearance: none; border: 0; border-radius: 999px; font: inherit; font-weight: 650; color: var(--ink);
  padding: 15px 22px; min-height: 52px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 30px rgba(25,227,177,.28); }
.btn.ghost { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.small { padding: 10px 16px; min-height: 44px; font-weight: 550; font-size: 14px; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; }
.gate-card .btn { display: block; width: 100%; margin-top: 12px; }
.chip { position: absolute; top: calc(14px + var(--safe-t)); right: 16px; background: var(--glass); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; }

#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
#hud > * { pointer-events: auto; }
.top { display: flex; gap: 8px; justify-content: space-between; padding: calc(12px + var(--safe-t)) 14px 0; pointer-events: none !important; }
.badge { background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12px; color: #dfe6ec;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.badge::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
.badge.timer::before { background: #ff5d5d; }
.hint { align-self: center; margin: 0; padding: 10px 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 14px;
  font-size: 15px; pointer-events: none !important; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.bottom { padding: 0 14px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(to top, rgba(5,8,11,.82), rgba(5,8,11,0)); padding-top: 40px; }
.subs { margin: 0; min-height: 1.4em; max-height: 6.2em; overflow: hidden; text-align: center; font-size: 17px; font-weight: 550;
  text-shadow: 0 1px 6px rgba(0,0,0,.9); display: flex; flex-direction: column; justify-content: flex-end; }
.subs .you { color: var(--mute); font-weight: 450; font-size: 14px; }
.status { margin: 0; text-align: center; color: var(--accent); font-size: 14px; }
.status.err { color: #ffb4a8; }
.bar { display: flex; gap: 10px; align-items: center; }
.bar > .primary { flex: 1; }
.bar.live { flex-direction: column; align-items: stretch; }
.ptt.on { background: #ff5d5d; color: #fff; box-shadow: 0 0 0 8px rgba(255,93,93,.22); }
#ask { display: flex; gap: 8px; }
#q { flex: 1; min-width: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  padding: 0 16px; min-height: 44px; font: inherit; outline: none; }
#q::placeholder { color: var(--mute); }
.row { display: flex; gap: 8px; justify-content: space-between; }
.notice { margin: 0; text-align: center; color: var(--mute); font-size: 11.5px; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .hint { animation: none; } }
