/* Hatimdir — calm green, muted gold, warm parchment */
:root {
  --green: #0f3d2e;
  --green-2: #17543f;
  --green-3: #1f6b50;
  --gold: #c9a24a;
  --gold-soft: #e3c97f;
  --gold-ink: #8a6a22;
  --bg: #f7f3ea;
  --bg-2: #efe8d8;
  --surface: #fffdf8;
  --ink: #1d2a24;
  --muted: #667269;
  --line: #e3dac4;
  --line-strong: #d3c7a8;
  --accent-text: #0f3d2e;
  --teal: #0f6b6b;
  --red: #b3412f;
  --header-bg: #0f3d2e;
  --header-ink: #f4ecd6;
  --focus: #b08a2e;
  --shadow: 0 1px 2px rgba(15, 61, 46, .06), 0 6px 20px -12px rgba(15, 61, 46, .25);
  --radius: 16px;
  --ar-size: 2rem;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'Amiri', 'Scheherazade New', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #0b2a20;
    --green-2: #123a2c;
    --green-3: #2a8a67;
    --gold: #d4af5a;
    --gold-soft: #ecd48f;
    --gold-ink: #e3c97f;
    --bg: #0a120f;
    --bg-2: #0f1b16;
    --surface: #111f19;
    --ink: #e8e4d6;
    --muted: #93a096;
    --line: #213229;
    --line-strong: #2f4539;
    --accent-text: #e3c97f;
    --teal: #4fb3a8;
    --red: #e0745f;
    --header-bg: #0b2a20;
    --header-ink: #f1e8cf;
    --focus: #e3c97f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -14px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; color: var(--accent-text); letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 7vw, 3rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 .6em; }
a { color: var(--accent-text); }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 110px; }
.view { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.arabic, .sc-ar, .sh-ar, .ayah-ar, .zk-item-ar, .besmele {
  font-family: var(--font-ar);
  direction: rtl;
  line-height: 2.1;
}
.muted { color: var(--muted); }
.note { font-size: .82rem; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.link { color: var(--accent-text); font-weight: 600; font-size: .9rem; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.link:hover { color: var(--gold-ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  color: var(--header-ink);
  background-color: var(--header-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='1' opacity='.22'%3E%3Cpath d='M28 4l5.3 12.7L46 12l-4.7 12.7L54 28l-12.7 3.3L46 44l-12.7-4.7L28 52l-5.3-12.7L10 44l4.7-12.7L2 28l12.7-3.3L10 12l12.7 4.7z'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E");
  border-bottom: 1px solid rgba(201, 162, 74, .45);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-soft); text-decoration: none; font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; letter-spacing: .02em; }
.brand svg { width: 32px; height: 32px; color: var(--gold); }
.menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; background: transparent; border: 1px solid rgba(201, 162, 74, .5); border-radius: 12px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--gold-soft); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.main-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--header-bg); border-bottom: 1px solid rgba(201, 162, 74, .45);
  padding: 8px 16px 16px; flex-direction: column;
}
.nav-open .main-nav { display: flex; }
.main-nav a { color: var(--header-ink); text-decoration: none; padding: 12px 8px; font-weight: 500; border-bottom: 1px solid rgba(244, 236, 214, .1); }
.main-nav a.active { color: var(--gold-soft); font-weight: 700; }
.main-nav a:focus-visible { outline-color: var(--gold-soft); }

@media (min-width: 860px) {
  .menu-toggle { display: none; }
  .main-nav { display: flex; position: static; flex-direction: row; gap: 2px; background: none; border: 0; padding: 0; }
  .main-nav a { border: 0; padding: 8px 12px; border-radius: 999px; font-size: .92rem; transition: background .2s; }
  .main-nav a:hover { background: rgba(244, 236, 214, .1); }
  .main-nav a.active { background: rgba(201, 162, 74, .2); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .55); }
}

/* Location bar */
.location-bar { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.location-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.loc-label { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; margin-right: auto; }
.loc-label svg { width: 18px; height: 18px; color: var(--gold-ink); }
#city-select { max-width: 48vw; }

/* Form controls */
select, input[type="search"], input[type="text"], input[type="number"] {
  font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 12px; min-height: 40px; min-width: 0;
}
input::placeholder { color: var(--muted); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green-3); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  min-height: 44px; padding: 10px 22px; border-radius: 999px;
  color: #f7f0dc; background: var(--green-2); border: 1px solid var(--gold);
  transition: background .2s, transform .1s;
}
.btn:hover { background: var(--green-3); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--accent-text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--gold); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 10px; font: inherit; font-weight: 700; font-size: .95rem;
  color: var(--accent-text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 50%; cursor: pointer; transition: background .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--gold); background: var(--bg-2); }
.icon-btn svg { width: 18px; height: 18px; }
.font-ctl .icon-btn, .month-nav .icon-btn { border-radius: 12px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 1.4rem; }
.grid-2 { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.2fr 1fr; } }

.page-head { margin: 4px 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 3px; background: var(--gold); border-radius: 3px; }
.page-head p { margin: 6px 0 0; }

/* Hero */
.hero { display: grid; gap: 20px; margin-bottom: 20px; align-items: stretch; }
.hero-text { padding: 8px 0; align-self: center; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--gold-ink); margin-bottom: 6px; }
.hero h1 { margin-bottom: 8px; }
.next-card {
  position: relative; overflow: hidden; text-align: center;
  background-color: var(--green); color: var(--header-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='1' opacity='.16'%3E%3Cpath d='M28 4l5.3 12.7L46 12l-4.7 12.7L54 28l-12.7 3.3L46 44l-12.7-4.7L28 52l-5.3-12.7L10 44l4.7-12.7L2 28l12.7-3.3L10 12l12.7 4.7z'/%3E%3C/g%3E%3C/svg%3E");
  border: 1px solid var(--gold); border-radius: 20px; padding: 22px 16px; box-shadow: var(--shadow);
}
.next-card p { margin: 0; }
.next-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .18em; color: var(--gold-soft); }
.next-name { font-family: var(--font-head); font-size: 2.1rem; font-weight: 600; line-height: 1.2; margin-top: 4px !important; }
.next-count { font-size: clamp(2.4rem, 12vw, 3.6rem); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--gold-soft); line-height: 1.15; }
.next-time { color: rgba(244, 236, 214, .75) !important; font-size: .9rem; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr 1fr; gap: 32px; } .hero-text h1 { font-size: 3.4rem; } }

/* Prayer cells */
.times-strip, .pt-today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 6px; }
.pt-today { margin-bottom: 18px; }
@media (min-width: 700px) { .times-strip, .pt-today { grid-template-columns: repeat(6, 1fr); gap: 12px; } }
.pt-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; transition: background .2s, border-color .2s; }
.pt-name { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.pt-time { display: block; font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-text); line-height: 1.3; }
.pt-cell.active { background: linear-gradient(160deg, var(--gold-soft), var(--gold)); border-color: var(--gold); box-shadow: 0 6px 18px -10px rgba(201, 162, 74, .9); }
.pt-cell.active .pt-name, .pt-cell.active .pt-time { color: #1c2a1f; }
.pt-cell.past { opacity: .55; }

/* Mini days */
.mini-days { list-style: none; display: grid; }
.mini-days li { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line-strong); }
.mini-days li:last-child { border-bottom: 0; }
.md-name { grid-column: 1; font-weight: 600; }
.md-date { grid-column: 1; font-size: .82rem; color: var(--muted); }
.md-left { grid-column: 2; grid-row: 1 / span 2; font-size: .78rem; font-weight: 700; color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 18%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }

/* Verse */
.verse-card { background-image: linear-gradient(180deg, color-mix(in srgb, var(--gold) 9%, transparent), transparent 40%); }
#verse-ar { font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 4px 0 8px; text-align: right; color: var(--accent-text); }
.verse-tr { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.5; font-style: italic; }
.verse-ref { font-size: .85rem; margin: 6px 0 0; }

/* Quick links */
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 700px) { .quick-links { grid-template-columns: repeat(4, 1fr); } }
.quick { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: .92rem; transition: transform .2s, border-color .2s; }
.quick svg { width: 38px; height: 38px; padding: 8px; box-sizing: content-box; border-radius: 14px; background: var(--green); color: var(--gold-soft); }
.quick:hover { transform: translateY(-2px); border-color: var(--gold); }

/* Tables */
.table-scroll { overflow: auto; max-height: 70vh; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.pt-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .82rem; text-align: center; }
.pt-table th { position: sticky; top: 0; z-index: 1; background: var(--green); color: var(--gold-soft); font-weight: 600; padding: 9px 4px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.pt-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.pt-table td:first-child, .pt-table th:first-child { text-align: left; padding-left: 8px; white-space: nowrap; }
.pt-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.pt-table tr.today { background: color-mix(in srgb, var(--gold) 28%, transparent) !important; font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
@media (min-width: 700px) { .pt-table { font-size: .95rem; } .pt-table td { padding: 9px 8px; } .pt-table th { padding: 11px 8px; } }
.month-nav { display: flex; gap: 8px; }

/* Qibla */
.qibla-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .qibla-layout { grid-template-columns: 1fr 1fr; gap: 40px; } }
.compass-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 16px; }
.compass { position: relative; width: min(80vw, 340px); aspect-ratio: 1; border-radius: 50%; transition: box-shadow .4s; }
.compass-dial {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--surface) 0 58%, var(--bg-2) 100%);
  border: 6px solid var(--green); box-shadow: 0 0 0 2px var(--gold), var(--shadow);
  transition: transform .2s linear;
}
.cd { position: absolute; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--accent-text); line-height: 1; z-index: 1; }
.cd.n { top: 20px; left: 50%; transform: translateX(-50%); color: var(--red); }
.cd.s { bottom: 20px; left: 50%; transform: translateX(-50%); }
.cd.e { right: 20px; top: 50%; transform: translateY(-50%); }
.cd.w { left: 20px; top: 50%; transform: translateY(-50%); }
.ticks { position: absolute; inset: 0; }
.ticks i { position: absolute; left: calc(50% - 1px); top: 0; width: 2px; height: 100%; pointer-events: none; }
.ticks i::before { content: ""; position: absolute; top: 2px; left: 0; width: 2px; height: 8px; background: var(--muted); opacity: .7; border-radius: 1px; }
.ticks i.major::before { height: 14px; background: var(--gold); opacity: 1; }
.qibla-needle { position: absolute; inset: 0; transition: transform .2s linear; }
.qibla-needle::before { content: ""; position: absolute; left: calc(50% - 1px); top: 62px; bottom: 50%; width: 3px; background: linear-gradient(to bottom, var(--gold), color-mix(in srgb, var(--gold) 25%, transparent)); }
.kaaba { position: absolute; top: 34px; left: 50%; width: 26px; height: 26px; transform: translateX(-50%); background: #111; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); border: 1px solid #000; outline: 2px solid var(--gold); outline-offset: 2px; }
.kaaba::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 4px; background: var(--gold); }
.compass-center { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--green); border: 3px solid var(--gold); z-index: 2; }
.heading-marker { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 16px solid var(--gold); z-index: 3; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.compass.aligned { box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-3) 55%, transparent), 0 0 40px 8px color-mix(in srgb, var(--green-3) 55%, transparent); }
.compass.aligned .heading-marker { border-top-color: var(--green-3); }
.compass-status { text-align: center; font-size: .92rem; color: var(--muted); margin: 0; min-height: 1.5em; }
.qibla-info dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.qibla-info dl > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.qibla-info dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.qibla-info dd { margin: 2px 0 0; font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qibla-info h3 { margin-bottom: 8px; }
.steps { padding-left: 1.3rem; display: grid; gap: 8px; }
.steps li::marker { color: var(--gold-ink); font-weight: 700; }

/* Quran list */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.toolbar input[type="search"] { flex: 1 1 220px; min-height: 44px; border-radius: 999px; padding-left: 18px; }
.seg { display: inline-flex; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; }
.seg-btn { font: inherit; font-size: .88rem; font-weight: 600; padding: 8px 16px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; cursor: pointer; }
.seg-btn.active { background: var(--green); color: var(--gold-soft); }
.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.surah-card { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "num name ar" "num meta ar"; column-gap: 12px; align-items: center; text-align: left; font: inherit; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: border-color .2s, transform .2s; }
.surah-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.sc-num { grid-area: num; display: grid; place-items: center; width: 40px; height: 40px; font-size: .85rem; font-weight: 700; color: var(--gold-soft); background: var(--green); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.sc-name { grid-area: name; font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--accent-text); line-height: 1.2; }
.sc-ar { grid-area: ar; font-size: 1.5rem; line-height: 1.5; color: var(--gold-ink); }
.sc-meta { grid-area: meta; font-size: .76rem; color: var(--muted); }

/* Surah view */
.surah-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.surah-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ctl { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.ctl.check { cursor: pointer; }
.ctl select, .ctl input[type="number"] { color: var(--ink); max-width: 100%; }
.ctl input[type="number"] { width: 90px; }
.font-ctl { display: inline-flex; gap: 6px; }
.surah-header { text-align: center; padding: 24px 16px; margin-bottom: 18px; background: var(--green); color: var(--header-ink); border: 1px solid var(--gold); border-radius: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='1' opacity='.16'%3E%3Cpath d='M28 4l5.3 12.7L46 12l-4.7 12.7L54 28l-12.7 3.3L46 44l-12.7-4.7L28 52l-5.3-12.7L10 44l4.7-12.7L2 28l12.7-3.3L10 12l12.7 4.7z'/%3E%3C/g%3E%3C/svg%3E"); }
.sh-ar { font-size: clamp(2.4rem, 10vw, 3.6rem); color: var(--gold-soft); line-height: 1.6; }
.sh-tr { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; }
.sh-meta { font-size: .85rem; color: rgba(244, 236, 214, .75); margin: 4px 0 0; }
.besmele { text-align: center; font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--gold-soft); margin: 14px 0 0; }
.ayah-list { display: grid; gap: 10px; }
.ayah { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: background .25s, border-color .25s; }
.ayah.playing { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 35%, transparent); }
.ayah-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ayah-num { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 4px; font-size: .78rem; font-weight: 700; color: var(--gold-soft); background: var(--green); border-radius: 50%; }
.ayah-actions { display: flex; gap: 6px; }
.ayah-actions .icon-btn { height: 34px; min-width: 34px; }
.ayah-ar { font-size: var(--ar-size, 2rem); text-align: right; color: var(--ink); margin: 0 0 6px; }
.ayah-end { color: var(--gold-ink); font-size: .8em; }
.ayah-translit { font-style: italic; color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
#ayah-list.hide-translit .ayah-translit { display: none; }
.ayah-tr { margin: 0; font-size: 1rem; }
.surah-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }

/* Player */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--green); color: var(--header-ink); border-top: 2px solid var(--gold); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .5); }
.player-inner { display: flex; align-items: center; gap: 12px; }
.player .icon-btn { background: transparent; color: var(--gold-soft); border-color: rgba(201, 162, 74, .6); }
.player .ctl { color: var(--header-ink); font-size: .8rem; white-space: nowrap; }
.play-main { width: 46px; height: 46px; background: var(--gold) !important; color: #1c2a1f !important; border-color: var(--gold) !important; flex: none; }
.player-meta { flex: 1; min-width: 0; }
.player-meta strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 5px; margin-top: 6px; background: rgba(244, 236, 214, .2); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--gold); border-radius: 5px; transition: width .2s linear; }
.i-pause { display: none; }
#player.is-playing .i-play { display: none; }
#player.is-playing .i-pause { display: block; }

/* Days */
.today-hijri { text-align: center; margin-bottom: 20px; }
.th-big { font-family: var(--font-head); font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 600; color: var(--accent-text); margin: 0; line-height: 1.2; }
.th-sub { color: var(--muted); margin: 4px 0 0; }
.th-ramazan { display: inline-block; margin: 10px 0 0; padding: 4px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); }
.days-year { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; color: var(--gold-ink); margin: 28px 0 12px; display: flex; align-items: center; gap: 12px; }
.days-year::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.days-list { display: grid; gap: 12px; }
.day-item { --accent: var(--muted); display: grid; grid-template-columns: 62px 1fr; grid-template-areas: "date body" "date left"; column-gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 14px; }
.day-date { grid-area: date; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 62px; padding: 8px 0; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); line-height: 1.1; }
.day-num { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.day-mon { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.day-body { grid-area: body; min-width: 0; }
.day-body h3 { font-size: 1.35rem; }
.day-meta { font-size: .8rem; color: var(--muted); margin: 2px 0 6px; }
.desc { font-size: .92rem; margin: 0; }
.day-left { grid-area: left; justify-self: start; margin-top: 8px; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.kind-kandil { --accent: var(--gold); }
.kind-bayram { --accent: var(--green-3); }
.kind-ramazan { --accent: var(--teal); }
.kind-diger { --accent: var(--muted); }
.day-item.is-today { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
@media (min-width: 700px) {
  .day-item { grid-template-columns: 72px 1fr auto; grid-template-areas: "date body left"; align-items: center; padding: 16px 20px; }
  .day-date { width: 72px; }
  .day-left { margin-top: 0; justify-self: end; }
}

/* Zikirmatik */
.zikir-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 860px) { .zikir-layout { grid-template-columns: 1fr 340px; gap: 36px; } }
.zikir-main { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.zikir-text { text-align: center; max-width: 560px; }
.zikir-text .arabic { font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--accent-text); margin: 0; }
.zk-read { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; margin: 0; }
.zk-mean { font-size: .9rem; margin: 2px 0 0; }
.tasbih { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(70vw, 280px); aspect-ratio: 1; padding: 0; border-radius: 50%; border: 0; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font: inherit; color: var(--header-ink); background: radial-gradient(circle at 35% 30%, var(--green-3), var(--green) 70%); box-shadow: 0 14px 30px -14px rgba(15, 61, 46, .8), inset 0 0 0 10px rgba(0, 0, 0, .12); transition: transform .12s, box-shadow .3s; }
.tasbih .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.ring-bg, .ring-fg { fill: none; stroke-width: 10; }
.ring-bg { stroke: rgba(244, 236, 214, .15); }
.ring-fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 565.49; stroke-dashoffset: 565.49; transition: stroke-dashoffset .25s ease; }
.zk-count { position: relative; font-family: var(--font-head); font-size: clamp(4rem, 20vw, 5.5rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gold-soft); }
.zk-target { position: relative; font-size: .95rem; opacity: .8; font-variant-numeric: tabular-nums; }
.tasbih.bump { transform: scale(.96); }
.tasbih.done { box-shadow: 0 0 0 4px var(--gold), 0 0 40px 6px color-mix(in srgb, var(--gold) 60%, transparent); }
.tasbih.done .ring-fg { stroke: var(--gold-soft); }
.zikir-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; }
.zk-total { font-size: .88rem; text-align: center; margin: 0; }
.zikir-side h2 { margin-bottom: 12px; }
.zikir-list { display: grid; gap: 8px; max-height: 420px; overflow: auto; margin-bottom: 14px; }
.zk-item { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name count del" "ar count del"; align-items: center; column-gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); font: inherit; text-align: left; width: 100%; transition: border-color .2s, background .2s; }
.zk-item:hover { border-color: var(--gold); }
.zk-item.active { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.zk-item-name { grid-area: name; font-weight: 600; font-size: .92rem; }
.zk-item-ar { grid-area: ar; font-size: 1.05rem; line-height: 1.6; color: var(--muted); text-align: left; direction: rtl; }
.zk-item-count { grid-area: count; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.zk-del { grid-area: del; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; }
.zk-del:hover { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.custom-zikir { display: grid; grid-template-columns: 1fr 80px auto; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.custom-zikir input[type="text"] { grid-column: 1 / -1; }

/* Loading / error */
.loading, .error { padding: 22px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--line-strong); color: var(--muted); }
.error { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }

/* Footer */
.site-footer { margin-top: 40px; padding: 28px 0 100px; background: var(--green); color: var(--header-ink); border-top: 3px solid var(--gold); text-align: center; font-size: .85rem; }
.site-footer p { margin: 0 0 6px; }
.site-footer .muted { color: rgba(244, 236, 214, .65); }

@media (max-width: 420px) {
  .player .ctl.check { display: none; }
  .pt-time { font-size: 1.5rem; }
  .brand { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Kur'an modülünün hata/yeniden dene kutusu */
.error-box{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:1.5rem;text-align:center;border:1px dashed var(--line-strong);border-radius:14px;grid-column:1/-1}

/* İl linkleri (namaz vakitleri sayfası) */
.pt-intro{margin:-4px 0 16px;max-width:70ch;color:var(--muted)}
.city-links-card{margin-top:20px}
.city-links-card h2{margin-top:0}
.city-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:6px 12px}
.city-links a{padding:6px 10px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:.92rem}
.city-links a:hover{background:color-mix(in srgb,var(--gold) 14%,transparent)}
.city-links a.active{background:color-mix(in srgb,var(--gold) 22%,transparent);color:var(--gold-ink);font-weight:700}

.ayah{scroll-margin-top:84px}
