* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: #0b0c0f; color: #e9ebf0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { display: flex; flex-direction: column; min-height: 100vh; }
#stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; background: #000; overflow: hidden; }
#video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
#offline { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; background: #0b0c0f; font-size: 18px; }
#start { position: absolute; right: 10px; top: 10px; border: 0; border-radius: 20px; padding: 8px 14px; font-size: 15px;
  font-weight: 600; color: #fff; background: rgba(224, 71, 91, .92); cursor: pointer; }
#aitag { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; }
#top { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.pill { background: rgba(0,0,0,.6); padding: 4px 9px; border-radius: 12px; font-size: 13px; }
.pill.on { background: #c3162f; font-weight: 700; }
#captions { position: absolute; left: 50%; bottom: 38px; transform: translateX(-50%); width: min(92%, 860px); text-align: center; pointer-events: none; }
#qline { color: #cfd6e4; font-size: 14px; text-shadow: 0 1px 3px #000; margin-bottom: 4px; }
#aline { display: inline-block; background: rgba(0,0,0,.62); padding: 4px 10px; border-radius: 8px; font-size: 17px; }
#aline:empty { display: none; }
#panel { padding: 12px 14px 20px; max-width: 900px; width: 100%; margin: 0 auto; }
#status { font-size: 15px; margin-bottom: 10px; min-height: 22px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
button { border: 0; border-radius: 22px; padding: 11px 16px; font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; background: #3b4456; }
button:disabled { opacity: .5; cursor: default; }
#hand { background: #e0475b; }
#mic.rec { background: #b3122b; box-shadow: 0 0 0 4px rgba(224,71,91,.35); }
button.link { background: none; padding: 4px; color: #9fb3d9; font-weight: 400; text-decoration: underline; }
#me { color: #9aa3b2; font-size: 14px; }
#askbox { background: #171a21; border: 1px solid #2c313c; border-radius: 14px; padding: 10px; margin-bottom: 12px; }
#timer { font-size: 14px; color: #ffcf6b; margin-bottom: 8px; }
#text { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 22px; border: 1px solid #2c313c; background: #0f1115; color: #e9ebf0; font-size: 16px; }
#past { margin-top: 14px; color: #cfd3da; }
#hist .h { padding: 6px 0; border-bottom: 1px solid #20242c; font-size: 14px; }
#hist .h b { color: #9fb3d9; font-weight: 600; }
.fine { color: #7d8594; font-size: 12px; margin-top: 16px; }
