@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  font-family: Inter, 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  color: #23352f;
  background: #f7f5ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #174f42;
  --green-dark: #123d34;
  --green-soft: #eaf1eb;
  --gold: #b79045;
  --gold-pale: #eadbb9;
  --ink: #23352f;
  --muted: #78817a;
  --line: #e6e2d7;
  --paper: #fffefa;
  --red: #a25040;
  --mushaf-paper: #fffdf6;
  --mushaf-gold: #b08b42;
  --mushaf-gold-light: #e9ddbd;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, #fffdf7 0, #f7f5ef 55%, #f1eee6 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #cfad68; outline-offset: 3px; }
[hidden] { display: none !important; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed !important; opacity: .58; }

.page-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(29, 75, 61, .10); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(183, 144, 69, .7); color: var(--gold); background: #f6f1e3; }
.brand-mark::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(183, 144, 69, .4); border-radius: 50%; }
.brand-mark span { font-family: 'Noto Naskh Arabic', serif; font-size: 24px; line-height: 1; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-family: 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--green-dark); }
.brand-copy small { font-size: 11px; letter-spacing: .01em; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 18px; }
.privacy-note { color: #748078; font-size: 12px; }
.language-button { color: var(--green); border: 1px solid #d7ddd5; border-radius: 999px; background: transparent; min-width: 82px; padding: 9px 15px; font-size: 12px; font-weight: 600; transition: background .18s ease, border-color .18s ease; }
.language-button:hover { background: white; border-color: #aebcb1; }

.intro { min-height: 194px; display: flex; align-items: center; justify-content: space-between; padding: 30px 8px 26px; }
.intro-copy { max-width: 700px; }
.eyebrow { display: inline-block; margin-bottom: 8px; color: #8a7040; font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.intro h1 { margin: 0; color: var(--green-dark); font-family: 'Noto Naskh Arabic', serif; font-size: clamp(30px, 4vw, 42px); font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.intro p { margin: 6px 0 0; color: #6f7972; font-size: 14px; line-height: 1.9; }
.intro-ornament { display: flex; align-items: center; gap: 13px; margin-inline-end: 5%; color: var(--gold); opacity: .68; }
.ornament-line { width: 40px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament-line:last-child { transform: scaleX(-1); }
.ornament-star { font-family: 'Noto Naskh Arabic', serif; font-size: 30px; }

.workbench { margin: 0 auto 56px; overflow: hidden; border: 1px solid #e5e1d6; border-radius: 18px; background: rgba(255, 254, 250, .94); box-shadow: 0 18px 58px rgba(35, 53, 47, .065), 0 2px 5px rgba(35, 53, 47, .025); }
.workbench-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 32px 18px; }
.workbench-top .eyebrow { margin-bottom: 2px; }
.workbench-top h2 { margin: 0; font-family: 'Noto Naskh Arabic', serif; font-size: 23px; line-height: 1.5; font-weight: 600; color: var(--ink); }
.range-summary { color: var(--green); background: #f0f4ed; padding: 10px 14px; border: 1px solid #e1e9df; border-radius: 9px; font-size: 12px; white-space: nowrap; }
.selection-row { display: flex; align-items: end; gap: 13px; padding: 0 32px 24px; border-bottom: 1px solid #efede6; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 112px; color: #66736b; font-size: 11px; font-weight: 600; }
.field select, .field input { width: 100%; min-height: 42px; color: #263c32; border: 1px solid #dddcd2; border-radius: 8px; background-color: #fffefa; padding: 0 12px; font-size: 13px; outline: none; }
.field select:focus, .field input:focus { border-color: #739487; box-shadow: 0 0 0 3px rgba(23, 79, 66, .08); }
.surah-field { flex: 1 1 260px; }
.surah-field select { font-family: 'Noto Naskh Arabic', Inter, sans-serif; }
.selection-row input { width: 94px; }
.range-dash { align-self: center; margin: 17px -5px 0; color: #b5b9b2; }

.mode-heading { padding: 22px 32px 14px; }
.mode-heading > .eyebrow { margin-bottom: 12px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-tab { display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 11px 15px; text-align: start; color: #65716a; border: 1px solid #e6e4dc; border-radius: 11px; background: #fffefa; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.mode-tab:hover { border-color: #c6d1c6; }
.mode-tab.active { color: var(--green); border-color: #c9b274; background: #faf6e9; box-shadow: inset 0 0 0 1px rgba(176, 139, 66, .10); }
.mode-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; border: 1px solid #dbc99c; background: #f7f0dd; color: #947432; font-family: 'Noto Naskh Arabic', serif; font-size: 22px; }
.listen-icon { color: #997c40; background: #f5f0e4; border-color: #e6dac0; }
.mode-tab > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.mode-tab strong { font-size: 14px; font-weight: 700; }
.mode-tab small { color: #818a82; font-size: 11px; }
.tab-arrow { margin-inline-start: auto; color: #91a095; font-size: 17px; }
.notice { margin: 3px 32px 16px; padding: 11px 14px; border: 1px solid #ecd9c4; border-radius: 8px; color: #76533e; background: #fff9f1; font-size: 12px; line-height: 1.8; }
.mode-panel { margin: 0 32px 32px; border: 1px solid #eae7dd; border-radius: 13px; background: #fffefa; }

.recite-ready { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; min-height: 260px; padding: 28px 30px; }
.ready-copy { max-width: 520px; }
.status-kicker { display: inline-flex; align-items: center; gap: 8px; color: #547965; font-size: 11px; font-weight: 700; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6e9977; box-shadow: 0 0 0 4px #e8f0e7; }
.ready-copy h3, .listen-title h3, .result-heading h3 { margin: 14px 0 6px; color: var(--green-dark); font-family: 'Noto Naskh Arabic', serif; font-size: 24px; font-weight: 600; line-height: 1.55; }
.ready-copy p { max-width: 500px; margin: 0; color: #737e76; font-size: 13px; line-height: 1.9; }
.ready-meta { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; color: #89928b; font-size: 10px; line-height: 1.7; }
.meta-icon { color: var(--gold); font-size: 16px; line-height: 1; }
.ready-actions { display: flex; flex-direction: column; align-items: stretch; gap: 11px; padding: 19px; border: 1px solid #e6dcc2; border-radius: 11px; background: #fcf9f0; box-shadow: inset 0 0 0 3px rgba(255,255,255,.64); }
.dialect-field { min-width: 0; }
.dialect-field select { min-height: 38px; font-size: 12px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 47px; padding: 0 18px; border: 1px solid #85692f; border-radius: 8px; color: white; background: #295143; box-shadow: 0 4px 10px rgba(23, 79, 66, .13), inset 0 0 0 1px rgba(231, 211, 160, .18); font-size: 13px; font-weight: 700; transition: background .18s ease, transform .18s ease; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .68; transform: none; }
.mic-icon { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid rgba(255,255,255,.72); border-radius: 50%; font-size: 8px; }
.fine-print { margin: 0; color: #929890; text-align: center; font-size: 10px; line-height: 1.6; }

.recording-view { position: relative; min-height: 390px; display: grid; place-items: center; margin: 14px; padding: 38px 20px; border: 1px solid #c9ad6b; border-radius: 11px; background: radial-gradient(ellipse at center, #fffef9 0%, var(--mushaf-paper) 62%, #faf6ea 100%); box-shadow: inset 0 0 0 4px rgba(255,255,255,.78), inset 0 0 0 5px rgba(201,173,107,.23); }
.recording-view::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(176,139,66,.27); border-radius: 7px; pointer-events: none; }
.recording-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.recording-rings { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: 17px; }
.recording-rings::before, .recording-rings::after, .recording-rings span, .recording-rings i { content: ''; position: absolute; inset: 0; border: 1px solid rgba(176, 139, 66, .38); border-radius: 50%; }
.recording-rings::before { inset: 10px; border-color: rgba(176, 139, 66, .25); }
.recording-rings::after { inset: 21px; border-color: rgba(41, 81, 67, .28); }
.recording-rings span { inset: 32px; border-color: rgba(176, 139, 66, .7); background: #f8f2df; }
.recording-rings i { inset: 41px; width: 10px; height: 10px; margin: auto; border: 0; background: var(--green); }
.recording-label { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 12px; font-weight: 700; }
.recording-pulse { width: 7px; height: 7px; border-radius: 50%; background: #bc624f; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(188, 98, 79, .14); opacity: .65; } }
.recording-time { margin-top: 9px; color: #68766e; font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: .08em; }
.recording-signal { display: grid; gap: 8px; width: min(300px, 82vw); margin-top: 14px; color: #766339; font-size: 11px; }
.signal-track { display: block; height: 6px; overflow: hidden; border: 1px solid #e4d8b8; border-radius: 999px; background: #f4efdf; }
.signal-track > span { display: block; width: 2%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c2a867, #94743a); transition: width .12s linear; }
.recording-center p { margin: 14px 0 19px; color: #8b938d; font-family: 'Noto Naskh Arabic', serif; font-size: 15px; }
.stop-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 17px; border: 1px solid #e7cbc4; border-radius: 8px; color: #874c40; background: #fff9f6; font-size: 12px; font-weight: 700; }
.stop-button:hover { background: #fdf0eb; }
.stop-button:disabled { opacity: .7; cursor: wait; }
.stop-square { width: 9px; height: 9px; border-radius: 2px; background: #a85a49; }
.recording-footnote { max-width: 300px; margin-top: 12px; color: #a1a69f; font-size: 10px; line-height: 1.6; }

.result-view { padding: 26px 30px 20px; }
.result-heading { padding-bottom: 13px; border-bottom: 1px solid #efede6; }
.result-heading .eyebrow { margin-bottom: 0; }
.result-heading h3 { margin: 3px 0; font-size: 22px; }
.result-body { display: grid; grid-template-columns: 210px 1fr; gap: 27px; padding: 22px 0; }
.score-block { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; border-inline-end: 1px solid #efede6; }
.score-ring { display: grid; place-items: center; width: 126px; height: 126px; border-radius: 50%; background: conic-gradient(var(--mushaf-gold) var(--score, 0%), #e9e5d9 0); position: relative; }
.score-inner { display: flex; align-items: baseline; justify-content: center; width: 105px; height: 105px; padding-top: 34px; border-radius: 50%; background: #fffefa; color: var(--green-dark); }
.score-inner strong { font-size: 30px; font-weight: 700; line-height: 1; }
.score-inner small { margin-inline-start: 2px; color: #778279; font-size: 12px; }
.score-block > p { margin: 12px 0 0; color: #7b857d; font-size: 11px; text-align: center; }
.mistakes-block h4 { margin: 0 0 4px; color: #35483e; font-family: 'Noto Naskh Arabic', serif; font-size: 17px; font-weight: 600; }
.mistakes-intro { margin: 0 0 12px; color: #90978f; font-size: 11px; line-height: 1.7; }
.correction-tools { display: grid; grid-template-columns: minmax(135px, .8fr) minmax(0, 1.2fr); align-items: end; gap: 8px 12px; margin-bottom: 12px; padding: 10px; border: 1px solid #e8dfc8; border-radius: 8px; background: #fcf9f0; }
.correction-tools .field { min-width: 0; }
.correction-tools audio { display: block; width: 100%; min-width: 0; height: 38px; }
.correction-tools audio[hidden] { display: none; }
.correction-audio-status { grid-column: 1 / -1; min-height: 1em; color: #8d7a51; font-size: 10px; }
.mistake-list { display: grid; gap: 7px; }
.mistake-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 9px 12px; border: 1px solid #eee9de; border-radius: 7px; background: #fdfbf6; }
.mistake-row > span { display: flex; flex-direction: column; gap: 4px; }
.mistake-row small { color: #92988f; font-size: 9px; }
.mistake-row strong { color: #435b4e; font-family: 'Noto Naskh Arabic', serif; font-size: 14px; font-weight: 600; }
.mistake-heard strong { color: var(--red); }
.mistake-play { min-height: 32px; padding: 0 10px; border: 1px solid #d9ccaa; border-radius: 7px; color: #735d31; background: #fffdf7; font-size: 10px; font-weight: 700; white-space: nowrap; }
.mistake-play:hover { border-color: #bfa66f; background: #f6f0e2; }
.transcript-panel { margin: 2px 0 17px; padding: 13px 15px; border: 1px solid #e2d5b5; border-radius: 8px; background: #fcf9f0; }
.transcript-panel h4 { margin: 0 0 7px; color: #806b3d; font-family: 'Noto Naskh Arabic', serif; font-size: 13px; font-weight: 600; }
.transcript-panel p { margin: 0; color: #34473d; font-family: 'Noto Naskh Arabic', serif; font-size: 16px; line-height: 1.9; }
.no-mistakes { margin: 0; padding: 12px; border-radius: 7px; color: #4f725a; background: #f0f6ee; font-size: 12px; line-height: 1.7; }
.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 15px; border-top: 1px solid #efede6; }
.result-footer p { margin: 0; color: #7d867f; font-size: 11px; line-height: 1.7; }
.secondary-button { min-height: 37px; padding: 0 14px; flex: 0 0 auto; color: var(--green); border: 1px solid #ced9ce; border-radius: 7px; background: #f7faf5; font-size: 11px; font-weight: 700; }
.secondary-button:hover { background: #edf3eb; }
.mic-test-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px; padding: 11px 12px; border: 1px solid #e8e2d2; border-radius: 8px; background: rgba(255,255,255,.65); }
.mic-test-copy { display: flex; flex-direction: column; gap: 3px; }
.mic-test-copy strong { color: #52665a; font-size: 11px; }
.mic-test-copy span { color: #929990; font-size: 10px; line-height: 1.6; }
.mic-test-track { grid-column: 1; display: block; height: 5px; overflow: hidden; border: 1px solid #e4d8b8; border-radius: 999px; background: #f4efdf; }
.mic-test-track > span { display: block; width: 2%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c2a867, #94743a); transition: width .12s linear; }
.mic-test-button { grid-column: 2; grid-row: 1 / span 2; }
.progress-panel { margin: 0 15px 17px; padding: 21px 23px 15px; border: 1px solid #eee7d6; border-radius: 10px; background: linear-gradient(140deg, #fffefa, #fcfaf3); }
.progress-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid #efede6; }
.progress-heading .eyebrow { margin-bottom: 2px; }
.progress-heading h3 { margin: 0; color: var(--green-dark); font-family: 'Noto Naskh Arabic', serif; font-size: 20px; font-weight: 600; }
.progress-heading p { margin: 4px 0 0; color: #858e85; font-size: 10px; line-height: 1.7; }
.progress-device-badge { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #e6ddc4; border-radius: 999px; color: #806b3d; background: #fcf8eb; font-size: 9px; }
.progress-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 14px 0; }
.progress-stat { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid #efede5; border-radius: 8px; background: rgba(255,255,255,.72); }
.progress-stat span { color: #8d958d; font-size: 9px; }
.progress-stat strong { color: var(--green); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 7px; }
.progress-history-heading h4 { margin: 0; color: #42564b; font-family: 'Noto Naskh Arabic', serif; font-size: 14px; font-weight: 600; }
.progress-history-heading span { color: #969c94; font-size: 9px; }
.progress-list { display: grid; gap: 7px; margin-top: 9px; }
.progress-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid #f0ede5; border-radius: 7px; background: #fffefa; }
.progress-item-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.progress-item-copy strong { overflow: hidden; color: #485c50; font-family: 'Noto Naskh Arabic', serif; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.progress-item-copy span { color: #989f97; font-size: 9px; }
.progress-score { min-width: 53px; padding: 6px 8px; border: 1px solid #e0e9dd; border-radius: 999px; color: #4f7558; background: #f2f7ef; text-align: center; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-empty { margin: 0; padding: 13px 10px; border: 1px dashed #e9e2d2; border-radius: 7px; color: #929990; background: rgba(255,255,255,.54); text-align: center; font-size: 10px; line-height: 1.7; }
.progress-footnote { margin: 11px 0 0; color: #a1a69e; font-size: 9px; line-height: 1.6; }

.listen-panel { padding: 25px 28px 18px; }
.listen-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.listen-title .eyebrow { margin-bottom: 0; }
.listen-title h3 { margin: 3px 0 0; font-size: 22px; }
.reciter-field { min-width: min(250px, 45%); }
.audio-limit { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; padding: 11px 13px; border: 1px solid #eadfc9; border-radius: 8px; color: #715d39; background: #fcf8ef; font-size: 10px; line-height: 1.7; }
.small-action { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #d5c291; border-radius: 999px; color: #78633b; background: #fffdf8; font-size: 10px; font-weight: 700; }
.audio-player { display: flex; align-items: center; gap: 13px; margin: 22px 0 13px; padding: 14px 16px; border: 1px solid #e9e8df; border-radius: 10px; background: #f9faf6; }
.round-control, .play-control { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; }
.round-control { width: 34px; height: 34px; border: 1px solid #d8e0d8; color: #5f7566; background: #fffefa; font-size: 19px; }
.round-control:hover { background: #edf3ec; }
.play-control { width: 44px; height: 44px; border: 0; color: #fff; background: var(--green); box-shadow: 0 4px 9px rgba(23, 79, 66, .16); font-size: 15px; }
.play-control:hover { background: var(--green-dark); }
.audio-track { min-width: 0; flex: 1; }
.track-labels { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #7d887e; font-size: 10px; }
#audioNowPlaying { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#audioTime { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.progress-range { display: block; width: 100%; height: 4px; margin-top: 11px; accent-color: var(--green); cursor: pointer; }
.listen-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.listen-note { margin: 0; color: #92988f; font-size: 10px; }
.translation-button { padding: 8px 11px; border: 1px solid #e5dfd0; border-radius: 999px; color: #79663e; background: #fffdf8; font-size: 10px; font-weight: 600; }
.translation-button:hover, .translation-button[aria-pressed="true"] { background: #f4efdf; border-color: #d7c99d; }
.verse-list { display: grid; gap: 9px; max-height: 375px; overflow-y: auto; padding: 2px 1px 5px; scrollbar-color: #d7ddd5 transparent; scrollbar-width: thin; }
.verse-card { position: relative; padding: 18px 48px 17px 17px; border: 1px solid #eeece4; border-radius: 9px; background: #fffefa; }
.verse-number { position: absolute; top: 17px; right: 14px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #e0d3b4; border-radius: 50%; color: #9b7f43; background: #fbf7eb; font-size: 10px; }
html[dir="ltr"] .verse-card { padding: 18px 17px 17px 48px; }
html[dir="ltr"] .verse-number { right: auto; left: 14px; }
.verse-arabic { margin: 0; color: #334f41; font-family: 'Noto Naskh Arabic', serif; font-size: 21px; line-height: 2.05; text-align: right; }
.verse-translation { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid #f0eee8; color: #68756c; font-size: 12px; line-height: 1.8; text-align: left; }
.loading-state { display: grid; place-items: center; min-height: 110px; color: #8c958d; font-size: 12px; }
.source-note { padding-top: 13px; color: #a2a69f; font-size: 9px; text-align: center; }

.page-footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 0 30px; color: #929990; font-family: 'Noto Naskh Arabic', serif; font-size: 12px; }
.footer-mark { color: var(--gold); font-size: 15px; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 28px, 620px); }
  .topbar { height: 73px; }
  .privacy-note { display: none; }
  .intro { min-height: auto; padding: 31px 4px 27px; }
  .intro-ornament { margin-inline-end: 1%; gap: 7px; }
  .ornament-line { width: 20px; }
  .workbench { margin-bottom: 38px; border-radius: 14px; }
  .workbench-top { align-items: flex-start; flex-direction: column; gap: 11px; padding: 20px 19px 15px; }
  .range-summary { white-space: normal; }
  .selection-row { display: grid; grid-template-columns: 1fr 18px 1fr; gap: 10px; padding: 0 19px 19px; }
  .surah-field { grid-column: 1 / -1; }
  .range-dash { justify-self: center; margin: 0; padding-top: 19px; }
  .mode-heading { padding: 18px 19px 12px; }
  .mode-switch { gap: 7px; }
  .mode-tab { min-height: 63px; gap: 8px; padding: 9px; }
  .mode-icon { width: 31px; height: 31px; font-size: 18px; }
  .mode-tab strong { font-size: 12px; }
  .mode-tab small { font-size: 9px; }
  .tab-arrow { font-size: 13px; }
  .notice { margin-inline: 19px; }
  .mode-panel { margin: 0 19px 20px; }
  .recite-ready { grid-template-columns: 1fr; gap: 18px; padding: 22px 19px; }
  .ready-copy h3 { font-size: 21px; }
  .ready-actions { padding: 15px; }
  .recording-view { min-height: 330px; }
  .result-view { padding: 20px 16px 16px; }
  .progress-panel { margin-inline: 9px; padding: 17px 14px 13px; }
  .progress-heading { align-items: flex-start; }
  .progress-device-badge { max-width: 100px; text-align: center; }
  .progress-stats { gap: 6px; }
  .progress-stat { padding: 9px 7px; }
  .progress-stat span { min-height: 2.8em; line-height: 1.4; }
  .progress-item { padding: 8px; }
  .result-body { grid-template-columns: 1fr; gap: 20px; }
  .score-block { border-inline-end: 0; border-bottom: 1px solid #efede6; padding-bottom: 17px; }
  .mistake-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mistake-play { grid-column: 1 / -1; justify-self: start; }
  .correction-tools { grid-template-columns: 1fr; }
  .correction-tools audio { grid-column: 1; }
  .correction-audio-status { grid-column: 1; }
  .score-ring { width: 110px; height: 110px; }
  .score-inner { width: 91px; height: 91px; padding-top: 29px; }
  .score-inner strong { font-size: 27px; }
  .result-footer { align-items: flex-start; flex-direction: column; }
  .listen-panel { padding: 19px 15px 15px; }
  .listen-toolbar { align-items: flex-start; flex-direction: column; gap: 13px; }
  .reciter-field { min-width: 0; width: 100%; }
  .audio-player { gap: 8px; padding: 11px 9px; }
  .round-control { width: 30px; height: 30px; }
  .play-control { width: 38px; height: 38px; }
  .audio-limit { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .page-shell { width: calc(100% - 20px); }
  .brand-copy strong { font-size: 19px; }
  .language-button { min-width: 72px; padding: 8px 10px; }
  .mode-tab { gap: 6px; padding: 8px 6px; }
  .mode-icon { width: 28px; height: 28px; }
  .tab-arrow { display: none; }
  .listen-options { align-items: flex-start; flex-direction: column; }
  .verse-arabic { font-size: 19px; }
}
