*{box-sizing:border-box}
:root{--bg:#e9eadf;--ink:#244b40;--muted:#858779;--paper:#fbfaf5;--line:#e2dfd3;--clay:#a9705c;--soft:#e7eee5}
html{min-height:100%;background:var(--bg)}
body{margin:0;min-height:100vh;color:var(--ink);font-family:"Tajawal",system-ui,sans-serif;background:radial-gradient(ellipse at 50% 0%,#f5f2e8 0,#e9eadf 58%,#e4e7db 100%);-webkit-font-smoothing:antialiased}
button,select{font:inherit}
.page{width:min(100%,760px);margin:0 auto;padding:30px 18px calc(30px + env(safe-area-inset-bottom))}
.top{text-align:center;padding:8px 4px 26px}
.brand-mark{font-size:28px;color:#a87965;line-height:1.1}
.brand{font-family:"Amiri",serif;font-size:20px;font-weight:700;letter-spacing:.04em;margin-top:2px}
.eyebrow{margin:23px 0 8px;color:#a87965;font-size:16px;font-weight:700}
h1{font-family:"Amiri",serif;font-size:clamp(34px,8vw,55px);line-height:1.35;margin:0 auto 10px;font-weight:700;color:#234b40}
.intro{max-width:620px;margin:0 auto;color:#85877d;font-size:16px;line-height:1.9}
.counter-card{background:rgba(251,250,245,.96);border:1px solid rgba(215,213,202,.85);border-radius:34px;padding:25px 22px 24px;box-shadow:0 18px 55px rgba(62,73,54,.07)}
.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.small-label{font-weight:700;color:#858779}
.status{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:30px;background:var(--soft);font-size:13px;color:#55705d}
.status i{width:9px;height:9px;border-radius:50%;background:#91a88e;display:inline-block}
.status.listening i{background:#b87560;box-shadow:0 0 0 5px rgba(184,117,96,.12);animation:pulse 1.5s infinite}
.select-wrap{height:76px;border:1.5px solid #dedbcc;border-radius:25px;background:#f8f6ee;display:flex;align-items:center;padding:0 22px;position:relative}
select{appearance:none;-webkit-appearance:none;border:0;outline:0;background:transparent;color:#31584b;font-family:"Amiri",serif;font-size:31px;font-weight:700;width:100%;text-align:right;direction:rtl;padding:8px 0}
.select-icon{font-size:30px;color:#5e655c;pointer-events:none;line-height:1}
.count{font-family:"Amiri",serif;font-size:112px;line-height:1.25;text-align:center;margin-top:28px;color:#315d4d;font-variant-numeric:tabular-nums}
.count-caption{text-align:center;color:#9a9b8e;font-size:16px;margin-top:0}
.recognition-box{margin:25px 0 20px;padding:14px 16px;border-radius:20px;background:#f3f2e9;display:flex;align-items:center;gap:14px;min-height:78px}
.mic-pulse{width:46px;height:46px;flex:0 0 46px;border-radius:50%;background:#e5ebe2;display:grid;place-items:center;font-size:20px}
.mic-pulse.active{background:#f2e5df;animation:pulse 1.6s infinite}
.recognition-title{font-weight:800;font-size:15px;color:#385c4e;margin-bottom:4px}
.recognition-detail{font-size:13px;color:#8a8b80;line-height:1.6}
.actions{display:flex;gap:12px;align-items:center}
.listen-btn{border:0;border-radius:22px;background:var(--clay);color:white;min-height:66px;flex:1;padding:12px 18px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:19px;font-weight:700;box-shadow:0 10px 22px rgba(169,112,92,.17);cursor:pointer;transition:transform .15s,background .15s}
.listen-btn:active,.reset-btn:active{transform:scale(.98)}
.listen-btn.stop{background:#31584b}
.btn-icon{font-size:20px}
.reset-btn{border:1px solid #dedbcc;background:transparent;color:#8b8177;border-radius:18px;padding:12px 18px;min-height:54px;cursor:pointer;font-size:14px;text-decoration:underline;text-underline-offset:4px}
.divider{height:1px;background:var(--line);margin:25px 0 18px}
.last-row{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#8b8c80;font-size:13px}
.last-row strong{color:#31584b;font-size:14px;max-width:55%;overflow-wrap:anywhere}
.hint{margin:16px 0 0;color:#a0a092;font-size:12px;line-height:1.8}
.footer{text-align:center;padding:26px 8px 10px;color:#8d735f;font-family:"Amiri",serif;font-size:20px}
.footer small{display:block;margin-top:6px;font-family:"Tajawal",sans-serif;font-size:11px;color:#99998c}
.toast{position:fixed;left:16px;right:16px;bottom:calc(18px + env(safe-area-inset-bottom));max-width:520px;margin:auto;padding:13px 16px;border-radius:14px;background:#294c40;color:white;text-align:center;font-size:14px;box-shadow:0 8px 25px #0002;opacity:0;transform:translateY(12px);pointer-events:none;transition:.25s;z-index:10}
.toast.show{opacity:1;transform:translateY(0)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.55}}
@media(min-width:650px){.page{padding-top:42px}.counter-card{padding:32px 36px}.intro{font-size:18px}}
@media(max-width:380px){.page{padding-inline:12px}.counter-card{padding:20px 16px;border-radius:27px}.count{font-size:96px}.listen-btn{font-size:17px}.reset-btn{padding-inline:13px}}
.brand-mark {
  width: 90px;
  height: 90px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
