:root {
  --nove: #001F3E; --sky: #0685C5; --aqua: #189C9F; --eco: #2AB982;
  --clarity: #F7F7F7; --line: #EBEBEB; --grey: #5B6B7C; --err: #B42318;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; color: var(--nove); background: var(--clarity); }
.hidden { display: none !important; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--nove); color: #fff; }
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.brand .muted { font-weight: 400; color: #C9D6E3; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--eco); display: inline-block; }
.statusbar { font-size: 13px; color: #C9D6E3; }
main { padding: 24px; }
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card.narrow { max-width: 820px; margin: 0 auto; }
.card.small { padding: 14px 16px; margin-top: 14px; }
h1 { margin: 0 0 8px; font-size: 26px; }
h2 { font-size: 16px; margin: 24px 0 10px; color: var(--sky); text-transform: uppercase; letter-spacing: .08em; }
.lead { color: var(--grey); line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field small { color: var(--grey); }
input, select { font: inherit; padding: 10px 12px; border: 1px solid #cfd6dd; border-radius: 8px; background: #fff; }
.consent { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; font-size: 14px; }
.check input { margin-top: 3px; width: 18px; height: 18px; }
.minor { border-left: 3px solid var(--aqua); padding: 10px 14px; background: #f2fafa; border-radius: 6px; display: flex; flex-direction: column; gap: 10px; }
button { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 999px; border: 1px solid #cfd6dd; background: #fff; color: var(--nove); cursor: pointer; }
button.primary { background: var(--sky); border-color: var(--sky); color: #fff; }
button.big { width: 100%; padding: 16px; font-size: 18px; }
button.link { border: none; background: none; color: var(--grey); text-decoration: underline; margin-top: 10px; }
button:disabled { opacity: .5; cursor: default; }
#btn-start { margin-top: 22px; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.12); margin-left: 6px; }
.error { color: var(--err); margin-top: 14px; font-weight: 600; }
.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; max-width: 1280px; margin: 0 auto; }
.videowrap { position: relative; background: #0b1622; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
video, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 140px; font-weight: 700; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.recbadge { position: absolute; top: 14px; left: 14px; background: var(--err); color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #C9D6E3; padding: 20px; text-align: center; }
.hint { color: var(--grey); font-size: 14px; margin-top: 10px; }
.prompt { text-align: center; }
.prompt .cat { color: var(--aqua); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.prompt .word { font-size: 38px; font-weight: 700; margin: 6px 0 2px; }
.prompt .hindi { font-size: 24px; color: var(--grey); }
.prompt .gloss { margin-top: 10px; font-size: 13px; color: var(--grey); }
.prompt .attempts { margin-top: 8px; font-size: 13px; color: var(--eco); font-weight: 600; }
.controls { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
#replay { width: 100%; background: #0b1622; border-radius: 10px; }
.quality { font-size: 14px; }
.quality.warn { color: #9a5b00; }
.quality.good { color: #17744F; }
.statline { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.progress { height: 8px; background: var(--line); border-radius: 999px; margin: 10px 0 6px; overflow: hidden; }
#s-bar { height: 100%; width: 0; background: var(--eco); }
@media (max-width: 900px) { .record-layout { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
.signin { background: #f2f8fc; border: 1px solid #d6e9f5; border-radius: 10px; padding: 14px 16px; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.signed-in { margin: 10px 0; font-size: 14px; color: #17744F; }
.locked { opacity: .45; pointer-events: none; }
.check input { flex: 0 0 18px; }
