:root { --g: #0b6e4f; --g2: #e7f4ee; --red: #c62828; --ink: #111; --muted: #444; --bg: #fff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Noto Sans Tamil", "Tamil Sangam MN", "Noto Sans", system-ui, sans-serif; font-size: 20px; line-height: 1.5; }
html[lang="ta"] body { font-size: 24px; }
#app { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.screen { display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 28px; margin: 8px 0; }
.brand { text-align: center; color: var(--g); }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .45; }
.big { min-height: 84px; font-size: 26px; border-radius: 18px; border: 3px solid var(--g); background: #fff; color: var(--g);
       padding: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-align: center; }
.mid { min-height: 64px; font-size: 22px; border-radius: 14px; border: 2px solid var(--g); background: #fff; color: var(--g);
       padding: 8px 14px; font-weight: 600; flex: 1; }
.primary { background: var(--g); color: #fff; }
.link { background: none; border: none; color: var(--g); text-decoration: underline; font-size: 18px; min-height: 48px; }
.pin { font-size: 32px; letter-spacing: .3em; text-align: center; padding: 14px; border: 3px solid var(--g); border-radius: 14px; width: 100%; }
.msg, .err { color: var(--red) !important; font-weight: 700; min-height: 1.5em; }
.tabs { display: flex; gap: 8px; }
.tabs button { flex: 1; min-height: 64px; font-size: 20px; border: 2px solid var(--g); border-radius: 14px; background: #fff; color: var(--g); font-weight: 700; }
.tabs button.on { background: var(--g); color: #fff; }
.tab { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.mic { width: 180px; height: 180px; border-radius: 50%; border: none; background: var(--g); color: #fff; font-size: 72px;
       align-self: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.mic.rec { background: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(198,40,40,.6); } 70% { box-shadow: 0 0 0 26px rgba(198,40,40,0); } 100% { box-shadow: 0 0 0 0 rgba(198,40,40,0); } }
.status { text-align: center; font-size: 24px; font-weight: 700; min-height: 1.5em; margin: 0; }
.progress { height: 16px; background: var(--g2); border-radius: 8px; overflow: hidden; }
.progress div { height: 100%; width: 5%; background: var(--g); transition: width .4s; }
.result { display: flex; flex-direction: column; gap: 10px; background: var(--g2); padding: 14px; border-radius: 16px; }
label { font-weight: 700; color: var(--muted); }
textarea { font: inherit; width: 100%; padding: 10px; border: 2px solid #888; border-radius: 12px; }
.trans { font-size: 1.2em; font-weight: 700; margin: 0; }
.orig { margin: 0; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
details.type summary { font-size: 20px; color: var(--g); min-height: 48px; cursor: pointer; font-weight: 600; }
details.type[open] { display: flex; flex-direction: column; gap: 10px; }
.hint { color: var(--muted); margin: 0; }
.file { cursor: pointer; }
footer { text-align: center; margin-top: 24px; }

/* ---------- live chat ---------- */
.live-box { display: flex; flex-direction: column; gap: 12px; }
.text-in { font: inherit; padding: 12px; border: 2px solid #888; border-radius: 12px; width: 100%; }
.code-in { font-size: 28px; letter-spacing: .2em; text-align: center; flex: 2; min-width: 0; }
.room-head { display: flex; flex-direction: column; gap: 8px; background: var(--g2); padding: 12px; border-radius: 14px; }
.conn { font-weight: 700; font-size: .85em; }
.conn.ok { color: var(--g); }
.conn.bad { color: var(--red); }
.members { color: var(--muted); font-size: .85em; }
.msgs { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; background: #f1f1f1; align-self: flex-start; }
.bubble.mine { background: var(--g2); align-self: flex-end; }
.bubble .who { font-size: .75em; font-weight: 700; color: var(--muted); }
.bubble .main { font-size: 1.05em; font-weight: 600; }
.bubble .sub { font-size: .8em; color: var(--muted); }
.bubble .play { margin-top: 6px; min-height: 48px; min-width: 64px; border: 2px solid var(--g); background: #fff; color: var(--g); border-radius: 12px; font-weight: 700; }
.bubble.pending { opacity: .6; }
.bubble.failed { border: 2px solid var(--red); cursor: pointer; }
.composer { display: flex; gap: 8px; align-items: center; }
.composer textarea { flex: 1; min-width: 0; }
.composer .mid { flex: none; }
.mic.small { width: 72px; height: 72px; font-size: 32px; flex: none; }
