html, body { overflow:auto; height:auto; min-height:100%; user-select:auto; }
body { min-height:100dvh; background:#0b1a24 url('tg-bgg.jpg') center center / cover no-repeat fixed; }
.video-card { max-width:680px; margin:auto; }
.video-frame { position:relative; width:100%; aspect-ratio:16/9; --scan-color:#baf6ff; }
.video-frame video { width:100%; height:100%; max-height:none; object-fit:contain; }
#finalePlayer { position:absolute; inset:0; opacity:0; transition:opacity .18s; }
.show-finale #finalePlayer { opacity:1; }
#scanProgress { position:absolute; inset:0; pointer-events:none; }
#scanProgress svg { display:block; width:100%; height:100%; overflow:visible; }
.ring-ticks { stroke:var(--scan-color); fill:none; stroke-width:3; stroke-dasharray:2 19; opacity:.5; }
.ring-track { stroke:rgba(5,56,86,.56); stroke-width:9; fill:none; }
.ring-progress { fill:none; stroke:var(--scan-color); stroke-width:7; stroke-linecap:round; stroke-dasharray:100; stroke-dashoffset:100; filter:drop-shadow(0 0 5px var(--scan-color)); }
.percent-badge { fill:rgba(6,53,80,.83); stroke:var(--scan-color); stroke-opacity:.4; }
.percent-text { fill:var(--scan-color); font:700 24px Consolas,monospace; text-anchor:middle; }
.word-badge { fill:rgba(6,29,47,.9); stroke:var(--scan-color); stroke-width:2; }
.word-text { fill:var(--scan-color); font:700 41px Arial,sans-serif; text-anchor:middle; }
#scanBadge { transition:opacity .18s; }
[data-state="detected"] { --scan-color:#ff414f; }
[data-state="neutralizing"] { --scan-color:#ffd369; }
[data-state="neutralizing"] .word-text { font-size:36px; }
.status-block.is-neutralized .status-title { color:#854d0e; text-shadow:none; }
[data-state="protected"], [data-state="complete"] { --scan-color:#70f69d; }
.scan-actions { display:flex; justify-content:center; gap:12px; margin-top:20px; flex-wrap:wrap; }
.scan-action { border:1px solid #bfdae7; border-radius:10px; background:#eff8fc; color:#174665; padding:10px 16px; font-size:14px; cursor:pointer; min-height:44px; }
.scan-action:disabled { opacity:.5; cursor:default; }
[hidden] { display:none !important; }
.demo-note { margin:18px auto 0; max-width:450px; color:#61717e; font-size:13px; line-height:1.5; }
button:focus-visible { outline:3px solid #1683b7; outline-offset:3px; }
.status-desc { font-size:16px; }
@media (max-width:480px) { .video-card { padding:14px 10px 20px; } .status-title { font-size:20px; } }
@media (prefers-reduced-motion:reduce) { .status-dot { animation:none !important; } #scanBadge,#finalePlayer { transition:none; } }
