:root{--green-100:#dff6e7;--green-300:#88d8ad;--green-400:#54c08a;--green-600:#1b8354;--green-700:#166a45;--green-800:#14573a;--neutral-50:#f9fafb;--neutral-100:#f3f4f6;--neutral-200:#e5e7eb;--neutral-300:#d2d6db;--neutral-400:#9da4ae;--neutral-500:#6c727e;--neutral-700:#384250;--neutral-900:#111927;--black:#161616;--gold:#b8965f;--gold-soft:#d6bb8a;--gold-deep:#8a6a35;--gold-pale:#efe3cc;--gold-rgb:184,150,95;--slate:#26343f;--slate-deep:#1a232c;--slate-night:#121a21;--error:#d92c20;--warning:#dc6803;--warning-soft:#f79009;--info:#156fee;--radius-sm:4px;--radius-md:8px;--radius-lg:16px;--radius-xl:24px;--radius-full:9999px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--space-10:40px;--ease:.2s ease;--ease-calm:cubic-bezier(.22,.61,.36,1);--t-word:.32s;--t-ayah:.42s;--t-page:.34s;--font-ui:"IBM Plex Sans Arabic", system-ui, "Segoe UI", Roboto, sans-serif;--font-quran:"KFGQPC Hafs", "Amiri Quran", "Scheherazade New", serif;--font-latin:"IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;--shadow-md:0 4px 8px -2px rgba(16,24,40,.1), 0 2px 4px -2px rgba(16,24,40,.06);--shadow-xl:0 20px 24px -4px rgba(16,24,40,.14), 0 8px 8px -4px rgba(16,24,40,.06)}:root[data-theme=dark]{--bg:#121a21;--surface:#1a232c;--surface-2:#212d38;--surface-3:#2a3744;--page:#18212a;--border:#2c3a46;--border-strong:#3a4a57;--text:#f3f4f6;--muted:#9da4ae;--subtle:#d2d6db;--on-brand:#fff;--brand:var(--green-300);--brand-bg:var(--green-600);--accent:var(--gold-soft);--said:var(--gold-soft);--now:#f1dcae;--now-bg:rgba(184,150,95,.24);--cur-bg:rgba(184,150,95,.09);--cur-edge:rgba(184,150,95,.55);--done:#86ab96;--idle:#c9ced4;--ahead:#e6e9ed;--ok:var(--green-400);--warn:var(--warning-soft);--bad:#f04437;--focus:#fff}:root[data-theme=light]{--bg:#f9fafb;--surface:#ffffff;--surface-2:#f3f4f6;--surface-3:#e9ecef;--page:#fffdf8;--border:#e5e7eb;--border-strong:#d2d6db;--text:#161616;--muted:#6c727e;--subtle:#384250;--on-brand:#fff;--brand:var(--green-600);--brand-bg:var(--green-600);--accent:var(--gold-deep);--said:#8a6a35;--now:#6f5327;--now-bg:rgba(184,150,95,.28);--cur-bg:rgba(184,150,95,.11);--cur-edge:rgba(184,150,95,.7);--done:var(--green-600);--idle:#384250;--ahead:#161616;--ok:var(--green-600);--warn:var(--warning);--bad:var(--error);--focus:#161616}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html,body{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-ui);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}button,select,input{font:inherit;color:inherit}button{cursor:pointer}a{color:var(--brand);text-underline-offset:2px}:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:2px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}[lang=en],.latin{font-family:var(--font-latin)}.quran{font-family:var(--font-quran)}.num{font-variant-numeric:tabular-nums}.ic{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding-inline:14px;border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface);color:var(--text);transition:border-color var(--ease),background var(--ease),color var(--ease);font-size:14px;white-space:nowrap}.btn:hover:not(:disabled){border-color:var(--accent)}.btn.primary{background:var(--brand-bg);border-color:var(--brand-bg);color:var(--on-brand);font-weight:600}.btn.primary:hover:not(:disabled){background:var(--green-800);border-color:var(--green-800)}.btn.danger{color:var(--bad)}.btn.danger:hover:not(:disabled){border-color:var(--bad)}.btn.ghost{border-color:transparent;background:transparent}.btn.ghost:hover:not(:disabled){background:var(--surface-2);border-color:transparent}.btn:disabled{opacity:.45;cursor:default}.btn.icon{width:40px;padding:0}.btn.sm{height:32px;padding-inline:10px;font-size:13px}.btn.sm.icon{width:32px}.btn input[type=file]{display:none}.chip{display:inline-flex;align-items:center;gap:6px;height:26px;padding-inline:10px;border-radius:var(--radius-full);background:var(--surface-2);color:var(--accent);font-size:12px;font-weight:600;white-space:nowrap}.chip.n{min-width:26px;justify-content:center;padding-inline:8px}.select{height:36px;border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);padding-inline:10px 28px;max-width:260px;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239da4ae' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:16px;background-position:left 8px center}[dir=ltr] .select{padding-inline:10px 28px;background-position:right 8px center}.seg{display:inline-flex;padding:3px;gap:2px;border-radius:var(--radius-md);background:var(--surface-2);border:1px solid var(--border)}.seg button{display:inline-flex;align-items:center;gap:8px;height:34px;padding-inline:12px;border:0;border-radius:6px;background:transparent;color:var(--subtle);font-size:13px;font-weight:500;transition:background var(--ease),color var(--ease);white-space:nowrap}.seg button:hover{color:var(--text)}.seg button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow-md)}.seg button[aria-pressed=true] .ic{color:var(--accent)}.status{display:inline-flex;align-items:center;gap:8px;height:34px;padding-inline:12px;border-radius:var(--radius-full);background:var(--surface-2);font-size:13px;color:var(--muted);border:1px solid transparent;transition:color var(--ease),border-color var(--ease)}.status .dot{width:8px;height:8px;border-radius:50%;background:var(--muted);transition:background var(--ease),box-shadow var(--ease);flex:none}.status[data-state=listening] .dot,.status[data-state=following] .dot{background:var(--ok);box-shadow:0 0 0 4px #54c08a2e}.status[data-state=locking] .dot{background:var(--gold);animation:scan 1.1s ease-in-out infinite}.status[data-state=reciting]{color:var(--text)}.status[data-state=reciting] .dot{background:var(--gold);box-shadow:0 0 0 4px rgba(var(--gold-rgb),.25);animation:breathe 1.6s ease-in-out infinite}.status[data-state=paused] .dot{background:var(--gold);opacity:.7}.status[data-state=lost] .dot,.status[data-state=stalled] .dot{background:var(--warn);box-shadow:0 0 0 4px #dc68032e}.status[data-state=lost],.status[data-state=stalled]{color:var(--warn)}.status[data-state=offline] .dot,.status[data-state=idle] .dot{background:var(--muted)}.status[data-state=connecting] .dot{animation:scan 1.1s ease-in-out infinite}@keyframes breathe{50%{box-shadow:0 0 0 7px rgba(var(--gold-rgb),.08)}}@keyframes scan{0%,to{opacity:.35}50%{opacity:1}}.src{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:500;padding:2px 8px;border-radius:var(--radius-full);white-space:nowrap}.src.official{color:var(--accent);background:rgba(var(--gold-rgb),.14);border:1px solid rgba(var(--gold-rgb),.4)}.src.alt{color:var(--muted);border:1px dashed var(--border-strong)}.rosette{position:absolute;width:120px;height:120px;opacity:.08;pointer-events:none;stroke:var(--gold);fill:none;stroke-width:.9}.rosette.tl{inset-block-start:10px;inset-inline-start:10px}.rosette.br{inset-block-end:10px;inset-inline-end:10px;transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}@media (forced-colors:active){:focus-visible{outline-color:Highlight}}@keyframes enter{0%{opacity:0;transform:translateY(-4px)}}.note{display:inline-flex;align-items:center;gap:6px;height:28px;padding-inline:10px;border-radius:var(--radius-full);background:rgba(var(--gold-rgb),.14);color:var(--accent);font-size:12px;font-weight:600;opacity:0;transition:opacity .3s var(--ease-calm);pointer-events:none;white-space:nowrap}.note.show{opacity:1}.chip.prov{border:1px dashed var(--gold);background:transparent;color:var(--accent);font-weight:500}.transcript{display:flex;flex-wrap:wrap;gap:2px 8px;direction:rtl;align-items:baseline;line-height:1.6}.tw{color:var(--subtle);transition:color .2s}.tw.no{color:var(--muted);text-decoration:underline dotted var(--warn);text-decoration-thickness:1.5px;text-underline-offset:5px;opacity:.85}.phrase-card{border:1px solid rgba(var(--gold-rgb),.45);border-radius:var(--radius-lg);padding:14px 16px;background:rgba(var(--gold-rgb),.06);display:flex;flex-direction:column;gap:8px;animation:enter .3s var(--ease-calm)}.ph-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ph-ar{font-size:28px;font-weight:600;line-height:1.6;color:var(--text);text-align:center}.ph-ar.quran{font-family:var(--font-quran);font-weight:400;font-size:32px}.ph-tr{font-size:20px;line-height:1.5;color:var(--text);text-align:center}.ph-tr[dir=ltr]{font-family:var(--font-latin)}.phrase-card.big .ph-ar{font-size:calc(4.2vw*var(--scale,1))}.phrase-card.big .ph-ar.quran{font-size:calc(4.6vw*var(--scale,1))}.phrase-card.big .ph-tr{font-size:calc(2.2vw*var(--scale,1))}.phrase-card.big{padding:3vh 4vw;max-width:80vw;gap:2vh}.phrase-card.big .ph-head{justify-content:center;font-size:calc(1.3vw*var(--scale,1))}.phrase-card.big .ph-head .chip{font-size:inherit;height:auto;padding:.3em .9em}.phrase-card.big .ph-head .src{font-size:.8em}:root[data-riwaya=qalun]{--font-quran:"KFGQPC Qaloon", "KFGQPC Hafs", "Amiri Quran", serif}:root[data-riwaya=warsh]{--font-quran:"KFGQPC Warsh", "KFGQPC Hafs", "Amiri Quran", serif}.riwaya-note{font-size:12px;color:var(--subtle);border:1px solid var(--border);border-radius:999px;padding:1px 8px}
