:root { --bg:#0f172a; --card:#1e293b; --line:#334155; --fg:#e2e8f0; --mut:#94a3b8; --acc:#22c55e; --rec:#ef4444; }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; height:100%; background:var(--bg); color:var(--fg);
  font:16px/1.45 system-ui,-apple-system,"Segoe UI","Noto Sans Arabic",Tahoma,sans-serif; }
.hidden { display:none !important; }
.screen { min-height:100%; display:flex; flex-direction:column; padding:max(12px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom)); gap:12px; }
#login { justify-content:center; align-items:center; }
#login form { display:flex; flex-direction:column; gap:10px; width:min(320px,100%); }
h1 { font-weight:600; }
header { display:flex; justify-content:space-between; align-items:center; }
.brand { font-weight:600; letter-spacing:.3px; }
input,select,button { font:inherit; color:var(--fg); }
input[type=password],select { width:100%; padding:12px; border-radius:10px; border:1px solid var(--line); background:var(--card); }
button { padding:10px 14px; border-radius:10px; border:1px solid var(--line); background:var(--card); cursor:pointer; }
button:active { transform:scale(.98); }
.ghost { background:transparent; }
.danger { color:#fca5a5; }
.pickers { display:flex; flex-direction:column; gap:10px; }
.pickers label { display:flex; flex-direction:column; gap:4px; color:var(--mut); font-size:13px; }
.seg { display:flex; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.seg button { flex:1; border:0; border-radius:0; background:transparent; }
.seg button.on { background:var(--acc); color:#052e16; font-weight:600; }
.result { flex:1; display:flex; flex-direction:column; gap:8px; }
.out { flex:1; min-height:140px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px;
  font-size:19px; white-space:pre-wrap; outline:none; unicode-bidi:plaintext; }
.out:empty::before { content:"Your text appears here"; color:var(--mut); }
details { color:var(--mut); font-size:14px; }
#raw { padding:6px 2px; white-space:pre-wrap; unicode-bidi:plaintext; }
.actions { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.actions button { padding:10px 4px; font-size:14px; }
.status { color:var(--mut); font-size:13px; min-height:1.2em; margin:0; }
.err { color:#fca5a5; min-height:1.2em; }
.talk { display:flex; flex-direction:column; align-items:center; gap:8px; }
#mic { width:100%; height:92px; border-radius:46px; font-size:18px; font-weight:600; display:flex; align-items:center;
  justify-content:center; gap:10px; background:var(--acc); color:#052e16; border:0; user-select:none; -webkit-user-select:none; touch-action:none; }
#mic .dot { width:14px; height:14px; border-radius:50%; background:#052e16; }
#mic.rec { background:var(--rec); color:#fff; }
#mic.rec .dot { background:#fff; animation:pulse 1s infinite; }
#mic.busy { background:var(--line); color:var(--mut); }
@keyframes pulse { 50% { opacity:.25; } }
.tap { color:var(--mut); font-size:13px; }
.hint { color:var(--mut); font-size:14px; }
.vrow { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; font-size:13px; color:var(--mut); }
