/* دعاء لكل حالة — standalone app styles. Same visual language as the thanawya calculator:
   Cairo, #0b0d14 ground, #161a26 cards, gold #f5b84b to orange #ff8a5c, pill buttons, 22px radii. */

@font-face {
    font-family: 'CairoDua';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url(./fonts/cairo-ar.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'CairoDua';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url(./fonts/cairo-la.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --font: 'CairoDua', Cairo, system-ui, 'Segoe UI', Tahoma, sans-serif;
    --bg: #0b0d14;
    --card: #161a26;
    --card-2: #1b2030;
    --line: #252a3a;
    --tx: #f3f1ec;
    --mut: #9aa0b4;
    --acc: #f5b84b;
    --acc2: #ff8a5c;
    --ok: #5fd6a0;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--tx);
    font-family: var(--font);
    background-image: radial-gradient(75% 45% at 78% -4%, rgba(245, 184, 75, 0.16) 0%, rgba(11, 13, 20, 0) 62%),
        radial-gradient(60% 40% at 10% 8%, rgba(255, 138, 92, 0.08) 0%, rgba(11, 13, 20, 0) 60%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px 18px calc(40px + env(safe-area-inset-bottom));
}

p { margin: 0; }

a { color: inherit; }

/* ---------- header ---------- */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: rgba(22, 26, 38, 0.75);
    color: var(--tx);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acc);
    box-shadow: 0 0 12px rgba(245, 184, 75, 0.8);
}

.nav { display: flex; gap: 8px; flex-wrap: wrap; }

.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--mut);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    background: rgba(22, 26, 38, 0.55);
}

.nav a.on { color: var(--acc); border-color: rgba(245, 184, 75, 0.5); background: rgba(245, 184, 75, 0.08); }

/* ---------- hero ---------- */

.eyebrow {
    margin: 0 0 16px;
    color: var(--acc);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.6;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 8.6vw, 56px);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.5px;
}

.grad {
    background: linear-gradient(100deg, #f5b84b 0%, #ff8a5c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--acc);
}

.intro {
    max-width: 54ch;
    margin: 0 0 20px;
    color: var(--mut);
    font-size: 16px;
    line-height: 1.9;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

.chip {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: rgba(22, 26, 38, 0.6);
    color: var(--mut);
    font-size: 12.5px;
    font-weight: 600;
}

/* ---------- search ---------- */

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 0 18px;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--card);
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tx);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    padding: 14px 0;
}

.search input::placeholder { color: #6f768c; font-weight: 400; }
.search svg { flex: none; color: var(--acc); }

/* ---------- daily ---------- */

.daily { margin-bottom: 30px; }

.daily-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.daily-head .eyebrow { margin: 0; }

.daily-tag {
    padding: 5px 12px;
    border-radius: 99px;
    background: rgba(245, 184, 75, 0.12);
    color: var(--acc);
    font-size: 12px;
    font-weight: 800;
}

/* ---------- states ---------- */

.section-label { margin: 0 0 14px; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.state-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    min-height: 104px;
    padding: 16px;
    text-align: start;
    font-family: inherit;
    color: var(--tx);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.state-card:hover, .state-card:focus-visible {
    background: var(--card-2);
    border-color: rgba(245, 184, 75, 0.5);
    transform: translateY(-1px);
    outline: none;
}

.state-name { font-size: 18px; font-weight: 800; line-height: 1.35; }
.state-hint { font-size: 12.5px; color: var(--mut); line-height: 1.7; }
.state-count { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 800; color: var(--acc); }

/* ---------- dua cards ---------- */

.list { display: grid; gap: 14px; }

.card {
    padding: 20px 18px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.kind {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid rgba(245, 184, 75, 0.4);
    border-radius: 99px;
    color: var(--acc);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

.star {
    border: 0;
    background: transparent;
    color: #4c536a;
    font-size: 22px;
    line-height: 1;
    padding: 6px;
    cursor: pointer;
    border-radius: 99px;
}

.star.on { color: var(--acc); }
.star:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

.dua-text {
    font-size: 20.5px;
    font-weight: 600;
    line-height: 1.95;
    color: var(--tx);
}

.source {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--acc);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.7;
}

.note { margin-top: 8px; color: var(--mut); font-size: 13px; line-height: 1.85; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 99px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(135deg, #f5b84b 0%, #ff8a5c 100%);
    color: #1a1204;
    box-shadow: 0 10px 30px rgba(245, 184, 75, 0.23);
}

.btn.ghost {
    border-color: rgba(245, 184, 75, 0.55);
    color: var(--acc);
    background: transparent;
}

.btn.ghost:hover { background: rgba(245, 184, 75, 0.1); border-color: var(--acc); }
.btn:active { transform: translateY(1px); }

.from { margin-top: 12px; color: #6f768c; font-size: 12px; font-weight: 600; }
.from a { color: #8f97ad; text-decoration: none; }
.from a:hover { color: var(--acc); }

.state-head { margin-bottom: 18px; }
.state-title {
    margin: 0 0 4px;
    font-size: clamp(32px, 7.4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.empty {
    padding: 34px 20px;
    border: 1px dashed var(--line);
    border-radius: 22px;
    color: var(--mut);
    text-align: center;
    font-size: 14.5px;
    line-height: 1.9;
}

.foot {
    margin-top: 34px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--mut);
    font-size: 12.5px;
    line-height: 1.9;
}

.foot a { color: #8f97ad; }

/* ---------- app page ---------- */

.app-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.app-hero img { width: 72px; height: 72px; border-radius: 18px; }
.app-name { font-size: 22px; font-weight: 800; }
.app-sub { color: var(--mut); font-size: 13.5px; margin-top: 4px; }

.steps { display: grid; gap: 12px; margin: 22px 0; padding: 0; list-style: none; counter-reset: s; }
.steps li {
    counter-increment: s;
    position: relative;
    padding: 14px 52px 14px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--tx);
}
.steps li::before {
    content: counter(s);
    position: absolute;
    inset-inline-start: 14px;
    top: 13px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(245, 184, 75, 0.14);
    color: var(--acc);
    font-size: 13px;
    font-weight: 800;
}

.warn {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(245, 184, 75, 0.3);
    border-radius: 18px;
    background: rgba(245, 184, 75, 0.06);
    color: var(--mut);
    font-size: 13px;
    line-height: 1.9;
}

/* ---------- toast ---------- */

.toast {
    position: fixed;
    inset-inline: 0;
    bottom: 22px;
    margin: 0 auto;
    width: max-content;
    max-width: calc(100% - 40px);
    padding: 12px 20px;
    border-radius: 99px;
    background: #f3f1ec;
    color: #12151f;
    font-size: 13.5px;
    font-weight: 800;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 50;
}

.toast.show { opacity: 1; transform: translateY(0); }

@media (min-width: 700px) {
    .page { padding: 26px 24px 56px; }
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
    .dua-text { font-size: 22px; }
    .card { padding: 24px 22px 18px; }
    .state-card { min-height: 112px; }
}

/* ---------- desktop hero ---------- */

.hero-art { display: none; }

@media (min-width: 860px) {
    .hero {
        display: grid;
        grid-template-columns: 1.3fr 0.7fr;
        gap: 40px;
        align-items: center;
        margin-bottom: 8px;
    }

    .hero-art { display: block; }

    h1 { font-size: clamp(38px, 4.2vw, 46px); }

    .art-card {
        padding: 22px 20px 18px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
        transform: rotate(-2.5deg);
    }

    .art-card .dua-text { font-size: 18px; }
    .art-card .source { margin-top: 12px; padding-top: 10px; }

    .art-note {
        margin-top: 14px;
        color: var(--mut);
        font-size: 12px;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .nav a[href="#/"] { display: none; }
    .brand { font-size: 14px; padding: 8px 14px; }
    .nav a { padding: 0 12px; font-size: 12.5px; }
}

/* ---------- سبحة ---------- */

.sabaha { text-align: center; margin-top: 8px; }
.sabaha-label { margin: 6px 0 20px; font-size: 22px; font-weight: 900; }

.sabaha-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: min(250px, 72vw);
    aspect-ratio: 1;
    margin: 0 auto;
    border: 1px solid rgba(245, 184, 75, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #1b2030 0%, #12151f 70%);
    color: var(--tx);
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 6px rgba(245, 184, 75, 0.05);
    transition: transform 0.06s ease;
}

.sabaha-btn:active { transform: scale(0.97); }
.sabaha-count { font-size: 66px; font-weight: 900; color: var(--acc); line-height: 1; }
.sabaha-target { color: var(--mut); font-size: 14px; font-weight: 700; }
.sabaha-done { min-height: 24px; margin: 14px 0 0; color: var(--acc); font-weight: 800; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }

.preset {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: transparent;
    color: var(--mut);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.preset.on { color: var(--acc); border-color: rgba(245, 184, 75, 0.5); background: rgba(245, 184, 75, 0.08); }

/* ---------- مواقيت ---------- */

.times-box { margin-top: 6px; }
.times-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.city-form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 220px; }

.city-form input {
    flex: 1;
    min-width: 150px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--card);
    color: var(--tx);
    font-family: inherit;
    font-size: 14px;
}

.times-place { margin: 18px 0 2px; font-size: 20px; font-weight: 900; }
.times-hijri { margin: 0 0 6px; color: var(--mut); font-size: 13px; font-weight: 700; }
.times-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }

.time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    font-size: 15px;
    font-weight: 700;
}

.time-row b { color: var(--acc); font-size: 17px; }

.qibla {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}

.qibla-deg { font-size: 26px; font-weight: 900; color: var(--acc); }
.qibla-txt { color: var(--mut); font-size: 13px; line-height: 1.7; }

@media (max-width: 520px) {
    .times-grid { grid-template-columns: 1fr; }
}

/* ---------- أسماء الله الحسنى ---------- */

.names-search { margin-bottom: 18px; }

.names-search input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--card);
    color: var(--tx);
    font-family: inherit;
    font-size: 15px;
}

.names-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.name-card {
    padding: 16px 16px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}

.name-ar { margin: 0 0 6px; font-size: 19px; font-weight: 900; color: var(--acc); }
.name-mean { margin: 0; color: var(--mut); font-size: 13px; line-height: 1.75; }

.names-note {
    margin-top: 18px;
    color: var(--mut);
    font-size: 12.5px;
    line-height: 1.9;
}

@media (min-width: 760px) {
    .names-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- الأذكار ---------- */

.athkar-list { display: grid; gap: 12px; margin-bottom: 26px; }

.athkar-card {
    position: relative;
    padding: 22px 20px 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
}

.athkar-count {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 12px;
    border-radius: 99px;
    background: rgba(245, 184, 75, 0.12);
    color: var(--acc);
    font-size: 12px;
    font-weight: 800;
}

.athkar-text { margin: 0 0 12px; font-size: 18px; line-height: 2.05; font-weight: 600; }
.athkar-source { margin: 0; color: var(--acc); font-size: 13.5px; font-weight: 800; }
.athkar-note { margin: 8px 0 0; color: var(--mut); font-size: 13px; line-height: 1.85; }
.athkar-card .actions { margin-top: 14px; }

/* ---------- بوصلة القبلة ---------- */

.compass { margin-top: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); text-align: center; }

.compass-dial {
    position: relative;
    width: min(220px, 62vw);
    aspect-ratio: 1;
    margin: 0 auto 16px;
    border: 1px solid rgba(245, 184, 75, 0.3);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #1b2030 0%, #12151f 72%);
}

.compass-n { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); color: var(--mut); font-size: 13px; font-weight: 800; }

.compass-needle {
    position: absolute;
    inset: 0;
    transform: rotate(0deg);
    transition: transform 0.12s linear;
}

.compass-needle::before {
    content: '';
    position: absolute;
    top: 16%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 66px solid var(--acc);
}

.compass-deg { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--acc); font-size: 20px; font-weight: 900; }

.city-hit {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card-2);
    color: var(--tx);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
}

/* ---------- الإعدادات ---------- */

.set-card { margin-bottom: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.set-label { margin: 0 0 10px; font-size: 15px; font-weight: 900; }
.set-sub { margin: 4px 0 0; color: var(--mut); font-size: 13px; line-height: 1.7; }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.set-row input { flex: 1; min-width: 150px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 99px; background: var(--card-2); color: var(--tx); font-family: inherit; font-size: 15px; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.switch {
    position: relative;
    width: 54px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--card-2);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.switch-dot { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mut); transition: transform 0.15s ease, background 0.15s ease; }
.switch.on { background: rgba(245, 184, 75, 0.18); border-color: rgba(245, 184, 75, 0.55); }
.switch.on .switch-dot { transform: translateX(24px); background: var(--acc); }
.warn-note { margin-top: 10px; color: #c9a05a; }

/* ---------- اختيار صوت الأذان ---------- */

.voices { display: grid; gap: 8px; margin: 14px 0; }

.voice {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card-2);
    color: var(--tx);
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}

.voice.on { border-color: rgba(245, 184, 75, 0.55); background: rgba(245, 184, 75, 0.08); }
.voice-name { display: block; font-size: 15px; font-weight: 800; }
.voice-credit { display: block; margin-top: 3px; color: var(--mut); font-size: 12px; }
.voice.on .voice-name { color: var(--acc); }
.add-own { cursor: pointer; }
