/* Ahlul Athar Media — styles
   Palette rule 60 / 30 / 10:
   60  Ink       deep blue-black surfaces (dominant)
   30  Parchment warm manuscript paper, used for alternating "band" sections
   10  Gold      the single accent: actions, labels, active states
   In the light theme Ink and Parchment swap roles. No green anywhere. */
:root {
  --ink: #121318; --ink-2: #181a21; --ink-3: #1f222b; --ink-4: #2a2e39;
  --paper: #efe6d4; --paper-2: #f8f2e6; --paper-3: #e3d8c1;
  --gold-hi: #c9a24f; --gold-lo: #8a6519;

  --bg: var(--ink); --bg-2: var(--ink-2); --surface: var(--ink-3); --surface-2: var(--ink-4);
  --text: #eee7da; --muted: #a9a498; --line: rgba(239, 230, 212, 0.12);
  --gold: var(--gold-hi); --on-gold: #17130a;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .65);
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-ar: "Amiri", "Traditional Arabic", serif;
  color-scheme: dark;
}
/* 30% band — parchment sections inside the ink page */
.band {
  --bg: var(--paper); --bg-2: var(--paper-3); --surface: var(--paper-2); --surface-2: var(--paper-3);
  --text: #1b1c22; --muted: #5d574b; --line: rgba(27, 28, 34, .13);
  --gold: var(--gold-lo); --on-gold: #fbf6ec;
  --shadow: 0 1px 2px rgba(60, 45, 15, .12), 0 18px 36px -22px rgba(60, 45, 15, .35);
  background: var(--bg); color: var(--text); color-scheme: light;
}
[data-theme="light"] {
  --bg: var(--paper); --bg-2: var(--paper-3); --surface: var(--paper-2); --surface-2: var(--paper-3);
  --text: #1b1c22; --muted: #5d574b; --line: rgba(27, 28, 34, .13);
  --gold: var(--gold-lo); --on-gold: #fbf6ec;
  --shadow: 0 1px 2px rgba(60, 45, 15, .12), 0 18px 36px -22px rgba(60, 45, 15, .35);
  color-scheme: light;
}
[data-theme="light"] .band {
  --bg: var(--ink); --bg-2: var(--ink-2); --surface: var(--ink-3); --surface-2: var(--ink-4);
  --text: #eee7da; --muted: #a9a498; --line: rgba(239, 230, 212, .12);
  --gold: var(--gold-hi); --on-gold: #17130a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .65);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
h1, h2, h3 { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
a, button, select, summary { touch-action: manipulation; -webkit-tap-highlight-color: color-mix(in srgb, var(--gold) 20%, transparent); }

.container { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 1rem; top: 0; transform: translateY(-120%); background: var(--gold); color: var(--on-gold); padding: .6rem 1rem; z-index: 100; border-radius: 0 0 10px 10px; }
.skip:focus { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  view-transition-name: site-header;
}
.nav { display: flex; align-items: center; gap: 1.25rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 600; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand > span { white-space: nowrap; }
.brand small { display: block; font-size: .7rem; letter-spacing: .18em; color: var(--gold); font-weight: 500; }
.nav-links { display: flex; gap: .15rem; margin: 0; margin-inline-start: auto; list-style: none; padding: 0; }
.nav-links a { text-decoration: none; padding: .5rem .6rem; border-radius: 999px; font-size: .9rem; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface); }
.menu-toggle { display: none; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; padding: .3rem .55rem; border-radius: 999px; cursor: pointer; min-width: 32px; }
.lang-switch button[lang="ar"] { font-family: var(--font-ar); font-size: 1rem; line-height: 1; }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }

@media (max-width: 1240px) {
  .menu-toggle { display: grid; }
  .nav-links { position: fixed; inset: 72px 0 auto 0; flex-direction: column; padding: 1rem 1.25rem 1.5rem; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .85rem 1rem; font-size: 1.05rem; }
  .nav-actions { margin-inline-start: auto; }
}
@media (max-width: 560px) { .nav { gap: .6rem; } .nav-actions { gap: .35rem; } .lang-switch button { padding: .3rem .45rem; min-width: 28px; } }
@media (max-width: 440px) { .brand > span { display: none; } }
@media (pointer: coarse) { .lang-switch button { min-height: 40px; min-width: 40px; } .icon-btn { width: 44px; height: 44px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: .96rem; text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 88%, var(--text)); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); }
.link-more { color: var(--gold); font-weight: 600; text-decoration: none; font-size: .94rem; }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; isolation: isolate; }
.hero-pattern {
  position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c9a24f' stroke-width='1'%3E%3Cpath d='M40 4 L52 28 L76 40 L52 52 L40 76 L28 52 L4 40 L28 28 Z'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1, .page-hero h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; margin: 1rem 0 1.25rem; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; }
.hero h1 em, .page-hero h1 em { color: var(--gold); font-style: normal; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; margin: 0 0 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.badge-line { margin-top: 2.25rem; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: .6rem; }
.badge-line span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.verse-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 2.5rem 2rem; text-align: center; margin: 0; }
.verse-card .ar { font-family: var(--font-ar); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--gold); line-height: 1.7; direction: rtl; margin: 0; }
.verse-card .tr { font-family: var(--font-display); font-size: 1.25rem; margin: .75rem 0 .5rem; }
.verse-card .tr:empty { display: none; }
.verse-card .ref { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.08; max-width: 18ch; }
.page-hero .lead { margin-bottom: 0; }
.crumbs { display: flex; gap: .5rem; align-items: center; font-size: .86rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.section-head h2, .h2-plain { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.1; margin: .6rem 0 0; letter-spacing: -.01em; }
.section-head p { color: var(--muted); max-width: 52ch; margin: .6rem 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; transition: transform .35s var(--ease), border-color .25s; }
a.card:hover, .card.hoverable:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.tag { align-self: flex-start; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---------- Home: today row ---------- */
.today-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.today-grid .tile { min-height: 230px; }
@media (max-width: 900px) { .today-grid { grid-template-columns: 1fr; } .today-grid .tile { min-height: 0; } }

/* ---------- Home bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: .5rem; text-decoration: none; min-height: 200px; }
.tile h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; line-height: 1.2; margin: 0; }
.tile p { margin: 0; color: var(--muted); }
.tile .link-more { margin-top: auto; padding-top: 1rem; }
.tile-radio { grid-column: span 4; }
.tile-prayer { grid-column: span 2; }
.tile-article, .tile-lessons, .tile-masajid { grid-column: span 2; }
.tile-library { grid-column: span 6; display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem; align-items: center; padding: 0; overflow: hidden; }
.tile-library .copy { padding: 1.8rem; display: flex; flex-direction: column; gap: .5rem; }
.tile-library img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 800/462; }
.mini-stations { display: grid; gap: .5rem; margin-top: .75rem; }
.next-prayer strong { font-family: var(--font-display); font-weight: 500; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; display: block; margin-top: .4rem; }
.next-prayer .np-name { font-size: 1.05rem; color: var(--text); }
@media (max-width: 960px) { .tile-prayer, .tile-article, .tile-lessons, .tile-masajid { grid-column: span 3; } .tile-radio { grid-column: span 6; } }
@media (max-width: 640px) { .bento > * { grid-column: span 6 !important; } .tile-library { grid-template-columns: 1fr; } }

/* ---------- Radio ---------- */
.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.station { display: flex; align-items: center; gap: 1rem; cursor: pointer; text-align: start; color: inherit; font: inherit; width: 100%; }
.station .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); min-width: 2.2rem; font-variant-numeric: tabular-nums; }
.station h3 { margin: 0; font-size: 1.05rem; }
.station p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.station .play { margin-inline-start: auto; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; flex-shrink: 0; }
.station.compact { padding: .7rem .9rem; border-radius: 14px; background: var(--surface-2); }
.station.compact .play { width: 38px; height: 38px; }
.station.compact .num { font-size: 1.2rem; min-width: 1.6rem; }
.station[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.eq { display: none; gap: 3px; align-items: end; height: 16px; }
.station[aria-pressed="true"] .eq { display: inline-flex; }
.station[aria-pressed="true"] .play svg { display: none; }
.eq i { width: 3px; background: var(--on-gold); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
/* Radio device — hardware-style tuner. Fixed palette so it reads as an object in both themes:
   ink body (60), parchment display (30), gold needle and play key (10). */
.radio-stage { display: grid; grid-template-columns: minmax(0, 470px) 1fr; gap: 2rem; align-items: center; }
.radio-list { display: grid; gap: .9rem; }
.radio-device {
  --dv-body: #1a1c23; --dv-key: #262a34; --dv-key-hi: #30343f; --dv-line: rgba(239, 230, 212, .14);
  background: linear-gradient(180deg, #20232b, var(--dv-body));
  border-radius: 34px; padding: .6rem .6rem 1rem; color: #eee7da;
  border: 1px solid var(--dv-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 4px rgba(0, 0, 0, .25), 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.rd-screen {
  position: relative; background: var(--paper); color: #1b1c22; border-radius: 26px; padding: 1.6rem 1.5rem 0; text-align: center; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(27, 28, 34, .08), inset 0 -10px 24px -18px rgba(27, 28, 34, .35);
}
.rd-place { font-size: .88rem; color: #6b6458; }
.rd-num { font-family: var(--font-body); font-weight: 600; font-size: clamp(4.2rem, 11vw, 5.6rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: .35rem 0 .3rem; direction: ltr; }
.rd-num .dim { color: #c9bfa9; }
.rd-name { display: block; font-size: 1.02rem; color: #3e3a33; font-weight: 500; }
.rd-status { display: inline-flex; align-items: center; gap: .45rem; margin-top: .7rem; padding: .3rem .75rem; border-radius: 999px; background: rgba(27, 28, 34, .06); font-size: .8rem; color: #5d574b; }
.rd-status b { font-weight: 600; }
.rd-status i { width: 7px; height: 7px; border-radius: 50%; background: #a9a093; }
.rd-status[data-state="connecting"] i { background: var(--gold-lo); animation: blink 1s infinite; }
.rd-status[data-state="live"] i { background: #b3261e; }
.rd-status[data-state="live"] { color: #1b1c22; }
@keyframes blink { 50% { opacity: .25; } }
.rd-wave { display: flex; align-items: end; justify-content: center; gap: 3px; height: 54px; margin-top: 1rem; padding-bottom: 0; }
.rd-wave i { width: 3px; height: 6px; border-radius: 2px 2px 0 0; background: rgba(27, 28, 34, .2); transition: height .4s var(--ease), background .3s; }
.radio-device.is-live .rd-wave i { background: var(--gold-lo); animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--d) * -90ms); }
@keyframes wave { 0%, 100% { height: calc(var(--h) * .35); } 50% { height: var(--h); } }
.rd-dial { position: relative; height: 74px; margin: .6rem .4rem 0; }
.rd-ticks {
  position: absolute; inset: 10px 4% auto; height: 22px;
  background:
    repeating-linear-gradient(90deg, rgba(239, 230, 212, .55) 0 2px, transparent 2px 100%) 0 0 / calc(100% / 6) 100% repeat-x,
    repeating-linear-gradient(90deg, rgba(239, 230, 212, .22) 0 1px, transparent 1px 100%) 0 6px / calc(100% / 30) 10px repeat-x;
}
.rd-needle { position: absolute; top: 4px; width: 2px; height: 36px; background: var(--gold-hi); border-radius: 2px; left: var(--pos, 16.66%); transform: translateX(-50%); transition: left .7s var(--ease); box-shadow: 0 0 0 3px rgba(201, 162, 79, .15); }
.rd-needle::before { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 2px; background: var(--gold-hi); transform: translateX(-50%); }
.rd-stop { position: absolute; top: 40px; transform: translateX(-50%); background: none; border: 0; color: rgba(239, 230, 212, .45); font: inherit; font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; padding: .3rem .6rem; border-radius: 8px; cursor: pointer; transition: color .3s; }
.rd-stop[data-index="0"] { left: 16.66%; } .rd-stop[data-index="1"] { left: 50%; } .rd-stop[data-index="2"] { left: 83.33%; }
.rd-stop[aria-checked="true"], .rd-stop:hover { color: #eee7da; }
.rd-keys { display: grid; grid-template-columns: 1fr 2.2fr 1fr; gap: .6rem; padding: .5rem .4rem 0; }
.rd-key {
  height: 68px; border: 0; border-radius: 20px; background: var(--dv-key); color: #eee7da; display: grid; place-items: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 0 rgba(0, 0, 0, .35); transition: background .2s, transform .1s;
}
.rd-key:hover { background: var(--dv-key-hi); }
.rd-key:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.rd-main { background: var(--gold-hi); color: #17130a; }
.rd-main:hover { background: #d4b062; }
[dir="rtl"] .rd-keys { direction: ltr; }
@media (max-width: 900px) { .radio-stage { grid-template-columns: 1fr; justify-items: center; } .radio-device { width: 100%; max-width: 470px; } .radio-list { width: 100%; } }

.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tips h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.tips p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .radio-grid, .tips { grid-template-columns: 1fr; } }

/* ---------- Lessons ---------- */
.lessons-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; align-items: stretch; }
.video-facade { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.video-facade::before { content: ""; position: absolute; inset: 0; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c9a24f' stroke-width='1'%3E%3Cpath d='M40 4 L52 28 L76 40 L52 52 L40 76 L28 52 L4 40 L28 28 Z'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E"); }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-btn { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: transparent; border: 0; color: var(--text); cursor: pointer; font: inherit; }
.play-big { width: 76px; height: 76px; border-radius: 50%; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; transition: transform .3s var(--ease); }
.video-btn:hover .play-big { transform: scale(1.06); }
.video-btn strong { font-size: 1.15rem; margin-top: .6rem; }
.video-btn small { color: var(--muted); }
.platforms { display: grid; gap: 1rem; }
.platform { display: flex; gap: 1rem; align-items: center; text-decoration: none; }
.platform > svg { color: var(--gold); flex-shrink: 0; }
.platform h3 { margin: 0; font-size: 1.05rem; }
.platform p { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }
.types { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.types-label { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.types ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.types li { padding: .4rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
@media (max-width: 900px) { .lessons-grid { grid-template-columns: 1fr; } }

/* ---------- Articles ---------- */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.articles[dir="ltr"] { text-align: left; }
.article { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; }
.article .thumb { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.article .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.article h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.25; margin: 0; }
.article p { color: var(--muted); margin: 0; font-size: .95rem; }
.meta { margin-top: auto; padding-top: .8rem; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); }
.meta span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: .45rem .95rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem; }
.chip[aria-pressed="true"], .chip:hover { color: var(--text); background: var(--surface); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
@media (pointer: coarse) { .chip { padding: .65rem 1rem; } }
@media (max-width: 960px) { .articles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .articles { grid-template-columns: 1fr; } }

/* ---------- Prayer ---------- */
.prayer-wrap { display: grid; grid-template-columns: .9fr 1.4fr; gap: 1.5rem; align-items: stretch; }
.date-card h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; margin: .3rem 0; }
.date-card .hijri { font-family: var(--font-ar); color: var(--gold); font-size: 1.5rem; direction: rtl; text-align: start; }
.date-card small { color: var(--muted); display: block; margin-top: 1rem; font-size: .82rem; }
select { font: inherit; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; font-size: 1rem; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.time { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.time span { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.time strong { font-family: var(--font-display); font-weight: 500; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.time.next { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.time.next span { color: var(--gold); }
@media (max-width: 860px) { .prayer-wrap { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .times { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Library / posters ---------- */
.resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.resource { display: flex; gap: 1.2rem; text-decoration: none; align-items: flex-start; }
.resource h3 { margin: 0 0 .3rem; }
.resource p { margin: 0; color: var(--muted); }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.poster { padding: 0; overflow: hidden; margin: 0; }
.poster .img { aspect-ratio: 800/462; background: var(--surface-2); overflow: hidden; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.poster:hover img { transform: scale(1.03); }
.poster .row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; }
.poster h3 { margin: 0; font-size: 1.02rem; }
.poster a { color: var(--gold); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 900px) { .resources { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .posters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .posters { grid-template-columns: 1fr; } }

/* ---------- Masajid / contact ---------- */
.masajid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.masjid h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; margin: 0 0 .2rem; }
.masjid p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }
.masjid a { color: var(--gold); text-decoration: none; font-weight: 600; font-size: .92rem; }
@media (max-width: 960px) { .masajid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .masajid { grid-template-columns: 1fr; } }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: start; }
.socials { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.social { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; text-decoration: none; font-weight: 500; }
.social svg { color: var(--gold); flex-shrink: 0; }
.social small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .socials { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 6rem; color: var(--muted); font-size: .92rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-grid nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-cols { display: grid !important; grid-template-columns: repeat(3, auto); gap: .5rem 3rem !important; }
.footer-cols div { display: grid; gap: .55rem; align-content: start; }
.footer-social { display: flex; gap: .4rem; flex-wrap: wrap; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: color .2s, border-color .2s; }
.footer-social a:hover { color: var(--gold); border-color: var(--gold); }
@media (max-width: 560px) { .footer-cols { grid-template-columns: repeat(2, auto); gap: .5rem 2rem !important; } }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.copy { margin-top: 2rem; font-size: .82rem; }

/* ---------- Mini player ---------- */
.mini-player {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translate(-50%, 160%);
  width: min(540px, calc(100% - 2rem)); z-index: 60; display: flex; align-items: center; gap: 1rem;
  padding: .7rem .9rem .7rem 1.1rem; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow); transition: transform .45s var(--ease); view-transition-name: mini-player;
}
.mini-player.show { transform: translate(-50%, 0); }
.mini-player .info { flex: 1; min-width: 0; }
.mini-player .info small { color: var(--gold); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.mini-player .info div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mini-player .mp-play { background: var(--gold); color: var(--on-gold); border: 0; }
.mini-player input[type="range"] { width: 90px; accent-color: var(--gold); }
@media (max-width: 640px) {
  .mini-player { left: 1rem; transform: translateY(160%); width: calc(100% - 6rem); gap: .6rem; }
  [dir="rtl"] .mini-player { left: auto; right: 1rem; }
  .mini-player.show { transform: none; }
  .mini-player input[type="range"] { display: none; }
}

/* ---------- Assistant ---------- */
.assistant { position: fixed; inset-inline-end: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 70; view-transition-name: assistant; }
.as-launch { display: flex; align-items: center; gap: .55rem; height: 54px; padding: 0 1.2rem 0 1rem; border-radius: 999px; border: 0; cursor: pointer; background: var(--gold); color: var(--on-gold); font: inherit; font-weight: 600; box-shadow: var(--shadow); transition: transform .3s var(--ease); }
.as-launch:hover { transform: translateY(-2px); }
@media (max-width: 640px) { .as-launch { width: 54px; padding: 0; justify-content: center; } .as-launch span { display: none; } }
.as-panel {
  position: absolute; inset-inline-end: 0; bottom: 66px; width: min(390px, calc(100vw - 2rem)); height: min(600px, calc(100dvh - 7rem));
  display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
  transform-origin: bottom right; transform: translateY(12px) scale(.97); opacity: 0; visibility: hidden;
  transition: transform .3s var(--ease), opacity .25s, visibility 0s .3s;
}
[dir="rtl"] .as-panel { transform-origin: bottom left; }
.assistant.open .as-panel { transform: none; opacity: 1; visibility: visible; transition: transform .35s var(--ease), opacity .25s; }
.as-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.as-avatar { width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); display: grid; place-items: center; font-family: var(--font-ar); font-size: 1.3rem; flex-shrink: 0; }
.as-head strong { display: block; font-size: 1rem; }
.as-head small { color: var(--muted); font-size: .8rem; }
.as-head .icon-btn { margin-inline-start: auto; width: 36px; height: 36px; }
.as-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: .65rem .9rem; border-radius: 16px; font-size: .95rem; line-height: 1.5; animation: msg-in .35s var(--ease) both; }
.msg.bot { background: var(--surface-2); align-self: flex-start; border-end-start-radius: 4px; }
.msg.user { background: var(--gold); color: var(--on-gold); align-self: flex-end; border-end-end-radius: 4px; }
.msg.bot a { color: var(--gold); font-weight: 600; }
.msg ul { margin: .4rem 0 0; padding-inline-start: 1.1rem; }
.msg li { margin: .15rem 0; }
.msg.typing { display: inline-flex; gap: 4px; padding: .8rem .9rem; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dots 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.as-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .75rem; }
.as-chips button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: .4rem .8rem; font: inherit; font-size: .85rem; cursor: pointer; }
.as-chips button:hover { border-color: var(--gold); color: var(--gold); }
.as-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); }
.as-form input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .6rem 1rem; }
.as-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.as-form button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
[dir="rtl"] .as-form button svg { transform: scaleX(-1); }
.as-hits { list-style: none; padding: 0 !important; display: grid; gap: .35rem; }
.as-hits li { display: flex; gap: .5rem; align-items: flex-start; margin: 0 !important; }
.as-hits small { display: block; color: var(--muted); font-size: .75rem; }
.as-play { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-gold); font-size: .7rem; cursor: pointer; }
.as-note { font-size: .72rem; color: var(--muted); text-align: center; padding: 0 1rem .6rem; margin: 0; }

/* ---------- Route progress ---------- */
#route-progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; z-index: 100; opacity: 0; pointer-events: none; }
#route-progress.run { opacity: 1; transform: scaleX(.7); transition: transform 2s cubic-bezier(.1, .6, .2, 1), opacity .1s; }
#route-progress.done { opacity: 0; transform: scaleX(1); transition: transform .25s var(--ease), opacity .4s .2s; }
[dir="rtl"] #route-progress { transform-origin: right; }

/* ---------- Motion ----------
   Page transitions use the View Transitions API (same-document via script.js; cross-document fallback below).
   Reveals: staggered fade-and-rise, word-by-word headlines, image wipe. All switched off for reduced motion. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease) both; }
::view-transition-group(site-header), ::view-transition-group(mini-player), ::view-transition-group(assistant) { animation: none; }
::view-transition-old(site-header), ::view-transition-old(mini-player), ::view-transition-old(assistant) { display: none; }
::view-transition-new(site-header), ::view-transition-new(mini-player), ::view-transition-new(assistant) { animation: none; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .8s var(--ease), border-color .25s; transition-delay: calc(var(--i, 0) * 80ms); }
  html:not(.no-js) .reveal.in { opacity: 1; transform: none; }
  html:not(.no-js) a.card.reveal.in:hover { transform: translateY(-3px); transition-delay: 0s; }
  html:not(.no-js) .reveal .thumb img, html:not(.no-js) .reveal .img img, html:not(.no-js) .reveal.tile-library img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms + 150ms); }
  html:not(.no-js) .reveal.in .thumb img, html:not(.no-js) .reveal.in .img img, html:not(.no-js) .reveal.in.tile-library img { clip-path: inset(0); }
  .split .w { display: inline-block; opacity: 0; transform: translateY(.4em); animation: word-in .9s var(--ease) forwards; animation-delay: calc(var(--w) * 55ms + 60ms); }
  @keyframes word-in { to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Arabic / RTL ---------- */
html[lang="ar"] { --font-body: "Amiri", "Traditional Arabic", serif; --font-display: "Amiri", serif; }
html[lang="ar"] body { font-size: 1.15rem; line-height: 1.8; }
html[lang="ar"] .eyebrow, html[lang="ar"] .types-label, html[lang="ar"] .ref, html[lang="ar"] .time span { letter-spacing: 0; }
html[lang="ar"] .hero h1, html[lang="ar"] .page-hero h1 { line-height: 1.35; }

/* ---------- Timetable ---------- */
.tt-today { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; padding: 1.2rem 1.4rem; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: var(--radius); background: var(--surface); margin-bottom: 1.5rem; }
.tt-today:empty { display: none; }
.tt-k { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .2rem; }
.tt-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 2rem; }
.tt-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; min-width: 0; }
.tt-filters label { display: grid; gap: .3rem; font-size: .82rem; color: var(--muted); min-width: 0; max-width: 100%; }
.tt-filters select { max-width: 100%; text-overflow: ellipsis; }
.tt-filters input { font: inherit; font-size: 1rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; min-width: 220px; }
.tt-search { flex: 1; } .tt-search input { width: 100%; }
.tt-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.tt-actions .btn { padding: .65rem 1.1rem; font-size: .9rem; }
.tt-day { margin-bottom: 2rem; }
.tt-day-h { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin: 0 0 .8rem; display: flex; align-items: center; gap: .75rem; }
.tt-day-h .tag { font-family: var(--font-body); }
.tt-lesson { display: grid; grid-template-columns: 110px 1fr auto; gap: 1.25rem; align-items: center; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-bottom: .6rem; transition: border-color .25s; }
.tt-lesson.is-now { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.tt-lesson.is-next { border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.tt-time { display: grid; gap: .1rem; font-variant-numeric: tabular-nums; }
.tt-time strong { font-family: var(--font-display); font-weight: 500; font-size: 1.55rem; line-height: 1.1; }
.tt-time span { color: var(--muted); font-size: .9rem; }
.tt-time span::before { content: "– "; }
.tt-time small { color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .04em; margin-top: .2rem; }
.tt-body { min-width: 0; }
.tt-flag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--gold); color: var(--on-gold); padding: .15rem .5rem; border-radius: 6px; margin-bottom: .35rem; }
.tt-ar { font-family: var(--font-ar); font-weight: 700; font-size: 1.3rem; line-height: 1.6; margin: 0; text-align: start; }
html[dir="ltr"] .tt-ar { text-align: left; }
.tt-tr { margin: .1rem 0 0; font-weight: 500; }
.tt-author { color: var(--muted); font-weight: 400; font-size: .9rem; }
.tt-meta { margin: .4rem 0 0; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.tt-meta a { color: var(--gold); text-decoration: none; }
.tt-meta a:hover { text-decoration: underline; }
.tt-listen.station { width: auto; padding: .5rem .9rem .5rem .5rem; gap: .6rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; }
.tt-listen .play { width: 36px; height: 36px; margin: 0; }
.tt-listen-txt { display: grid; font-size: .85rem; font-weight: 600; line-height: 1.25; }
.tt-listen-txt small { color: var(--muted); font-weight: 400; font-size: .76rem; }
.tt-listen.station:hover, .tt-listen.station[aria-pressed="true"] { border-color: var(--gold); }
.tt-note, .tt-empty { color: var(--muted); font-size: .88rem; margin-top: 1.5rem; }
@media (max-width: 760px) {
  .tt-lesson { grid-template-columns: 78px 1fr; gap: .9rem; }
  .tt-time strong { font-size: 1.25rem; }
  .tt-listen.station { grid-column: 2; justify-self: start; }
  .tt-filters input { min-width: 0; }
  .tt-filters label { flex: 1 1 100%; }
  .tt-filters select { width: 100%; }
}
@media print {
  .site-header, .site-footer, .mini-player, .assistant, .band, .hero-pattern, .tt-toolbar, .tt-listen, .crumbs, #route-progress, .skip { display: none !important; }
  body, .tt-lesson, .tt-today { background: #fff !important; color: #000 !important; }
  .page-hero { padding: 0 0 1rem; border: 0; }
  .page-hero .lead { display: none; }
  .tt-lesson { break-inside: avoid; border-color: #bbb !important; grid-template-columns: 90px 1fr; }
  .tt-time small, .tt-meta a, .tt-k, .eyebrow { color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .split .w { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ---------- Bookshelf ---------- */
.shelf-tools { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-bottom: 1.5rem; }
.shelf-tools input, .arc-tools input { font: inherit; font-size: 1rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .6rem 1.1rem; flex: 1 1 260px; min-width: 0; max-width: 420px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; }
.book { display: grid; grid-template-columns: 112px 1fr; gap: 1.1rem; padding: 1rem; align-items: start; }
.book .cover { aspect-ratio: 360/525; border-radius: 8px; overflow: hidden; background: var(--surface-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 20px -12px rgba(0, 0, 0, .6); }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-body { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.book h3 { font-family: var(--font-ar); font-weight: 700; font-size: 1.2rem; line-height: 1.55; margin: 0; text-align: start; }
html[dir="ltr"] .book h3 { text-align: left; }
.book-en { margin: 0; font-weight: 600; font-size: .95rem; }
.book-en span { color: var(--muted); font-weight: 400; }
.book-meta { margin: 0; color: var(--muted); font-size: .86rem; }
.book-when { margin: .15rem 0 0; display: flex; gap: .4rem; align-items: flex-start; color: var(--gold); font-size: .84rem; font-weight: 500; }
.book-when svg { flex-shrink: 0; margin-top: .2rem; }
.book-actions { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-top: .6rem; }
.book-actions .btn { padding: .5rem .9rem; font-size: .84rem; }

/* ---------- Audio archive ---------- */
.arc-tools { display: grid; gap: .9rem; margin-bottom: 1.5rem; }
.arc-tools input { max-width: 560px; }
.arc { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.arc-series { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; display: grid; gap: .3rem; padding-inline-end: .4rem; overscroll-behavior: contain; }
.arc-h { margin: .6rem .2rem .2rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.arc-s { display: grid; gap: .1rem; text-align: start; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: .6rem .8rem; color: var(--text); font: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.arc-s:hover { background: var(--surface); }
.arc-s[aria-current="true"] { background: var(--surface); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.arc-s-name { font-weight: 600; font-size: .94rem; line-height: 1.35; }
.arc-s-meta { color: var(--muted); font-size: .8rem; }
.arc-select { display: none; width: 100%; margin-bottom: 1rem; }
.arc-main { min-width: 0; }
.arc-tracks { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.arc-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--line); }
.arc-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; margin: 0; }
.arc-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.arc-playall { padding: .6rem 1rem; font-size: .88rem; }
.trk-list { list-style: none; margin: 0; padding: .3rem 0; }
.trk { display: grid; grid-template-columns: auto 2.6rem 1fr auto; gap: .6rem; align-items: center; padding: .45rem 1rem; border-radius: 10px; margin: 0 .3rem; }
.trk:hover { background: var(--surface-2); }
.trk.is-current { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.track { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--gold); display: grid; place-items: center; cursor: pointer; padding: 0; }
.track .play { display: grid; place-items: center; }
.track:hover, .trk.is-current .track { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.track .eq { display: none; gap: 2px; align-items: end; height: 12px; }
.track .eq i { width: 2px; background: currentColor; animation: eq 1s ease-in-out infinite; }
.track .eq i:nth-child(2) { animation-delay: .2s; } .track .eq i:nth-child(3) { animation-delay: .4s; }
.track[aria-pressed="true"] svg { display: none; }
.track[aria-pressed="true"] .eq { display: inline-flex; }
.trk-n { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; text-align: end; }
.trk-t { min-width: 0; font-size: .95rem; line-height: 1.4; }
.trk-t small { display: block; color: var(--muted); font-size: .78rem; }
.trk-t .trk-resume { color: var(--gold); }
.trk-dl { color: var(--muted); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.trk-dl:hover { color: var(--gold); background: var(--surface-2); }
@media (max-width: 860px) {
  .arc { grid-template-columns: 1fr; }
  .arc-series { display: none; }
  .arc-select { display: block; }
  .trk { grid-template-columns: auto 2rem 1fr auto; padding: .45rem .6rem; }
}

/* mini player: progress row for recordings */
.mp-seek-row { display: none; align-items: center; gap: .5rem; margin-top: .15rem; }
.mini-player.is-rec .mp-seek-row { display: flex; }
.mini-player.is-rec { border-radius: 22px; }
#mp-seek { flex: 1; min-width: 0; accent-color: var(--gold); height: 4px; }
#mp-time { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 404 ---------- */
.nf { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.nf .num { font-family: var(--font-display); font-size: clamp(5rem, 15vw, 9rem); color: var(--gold); line-height: 1; }

/* ---------- Qibla (qibla.html) ---------- */
.qibla-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: start; }
.qibla-compass { text-align: center; }
.q-svg { display: block; width: min(100%, 360px); height: auto; margin: 0 auto; }
.q-ring { fill: var(--surface-2); stroke: var(--line); stroke-width: 2; }
.q-ticks line { stroke: var(--muted); stroke-width: 1.4; opacity: .6; }
.q-ticks line.long { stroke: var(--text); stroke-width: 2.4; opacity: .9; }
.q-card { fill: var(--muted); font: 600 15px var(--font-body); text-anchor: middle; dominant-baseline: middle; }
.q-north { fill: var(--text); }
.q-needle-line { stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.q-needle-head { fill: var(--gold); }
.q-kaaba { fill: #101116; stroke: var(--gold); stroke-width: 1.5; }
.q-kaaba-band { fill: var(--gold); }
.q-hub { fill: var(--gold); stroke: var(--surface); stroke-width: 3; }
.q-marker { fill: var(--muted); opacity: .35; }
.q-marker.is-on { opacity: 1; fill: var(--text); }
.is-aligned .q-marker { fill: var(--gold); }
.is-aligned .q-ring { stroke: var(--gold); stroke-width: 3; }
.q-reading { margin: 1rem 0 0; font-weight: 600; }
.q-status { margin: .35rem 0 0; color: var(--muted); min-height: 1.6em; }
.is-aligned .q-status { color: var(--gold); font-weight: 600; }
.q-label { display: block; color: var(--muted); font-size: .85rem; }
#q-city { margin-top: .35rem; width: 100%; }
.q-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.q-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 0; }
.q-facts div { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; }
.q-facts dt { color: var(--muted); font-size: .8rem; }
.q-facts dd { margin: .2rem 0 0; font-family: var(--font-display); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.q-how { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; margin: 1.8rem 0 .6rem; }
.q-steps { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .45rem; }
.q-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: no-preference) { #q-dial, #q-needle { transition: transform .25s linear; } }
@media (max-width: 860px) { .qibla-wrap { grid-template-columns: 1fr; } }
#q-dial, #q-needle { transform-box: view-box; transform-origin: 150px 150px; }
