:root {
  --bg: #f6f3ee;
  --bg-2: #efe8f4;
  --card: #ffffff;
  --ink: #2c2434;
  --muted: #6d6576;
  --gold: #b8922a;
  --gold-bright: #c9a84a;
  --line: rgba(184, 146, 42, 0.32);
  --shadow: 0 10px 28px rgba(60, 40, 70, 0.08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: calc(72px + var(--safe-b));
  --en: "Outfit", "Segoe UI", sans-serif;
  --ar: "Noto Sans Arabic", sans-serif;
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --naskh: "Noto Naskh Arabic", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #efeae3;
  color: var(--ink);
  font-family: var(--en);
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; }

.stage {
  min-height: 100dvh;
  display: grid;
  place-items: stretch center;
  background: radial-gradient(ellipse at 50% 0%, #f3e9f6, transparent 50%), #efeae3;
}

#app-shell {
  position: relative;
  width: min(430px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: clip;
  background:
    radial-gradient(90% 40% at 50% -8%, rgba(201, 168, 74, 0.16), transparent 50%),
    linear-gradient(180deg, #faf7f3 0%, #f3eef7 48%, #f6f3ee 100%);
  box-shadow: 0 0 0 1px var(--line);
}

/* Splash keeps the brand banner */
.splash {
  min-height: 100dvh;
  display: grid;
  place-items: end center;
  position: relative;
}

.splash-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.splash-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,0,20,.15) 0%, rgba(10,0,18,.55) 50%, rgba(8,0,14,.94) 100%);
}

.splash-inner {
  position: relative;
  width: 100%;
  padding: 0 24px calc(28px + var(--safe-b));
  text-align: center;
  color: #faf7f1;
}

.seal {
  width: 140px;
  height: 140px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: logo-pulse 1.8s ease-in-out infinite;
}

.splash-logo {
  width: 124px;
  height: 124px;
  object-fit: contain;
  border-radius: 50%;
}

.wordmark {
  margin: 6px 0 10px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.3em;
  font-size: 2.2rem;
  text-indent: 0.3em;
}

.wordmark [lang="ar"] {
  display: block;
  margin-top: 4px;
  font-family: var(--naskh);
  letter-spacing: 0.12em;
  text-indent: 0;
  font-size: 1.55rem;
  color: #e8d07a;
}

.gold-rule {
  display: block;
  width: 88px;
  height: 1px;
  margin: 10px auto;
  background: linear-gradient(90deg, transparent, #e8d07a, transparent);
  position: relative;
  overflow: hidden;
}

.gold-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #fff6d2, transparent);
  animation: rule-drift 2.4s ease-in-out infinite;
}

.bi-line {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #ddd4e6;
  font-size: 0.84rem;
}

.bi-line [lang="ar"] { font-family: var(--ar); }
.dot { color: #e8d07a; }

.enter-btn {
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
  border: 1px solid #e8d07a;
  background: rgba(30, 10, 50, 0.45);
  color: #faf7f1;
  padding: 14px 16px;
  display: inline-flex;
  justify-content: center;
  gap: 12px;
  font: 500 0.86rem var(--en);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.enter-btn [lang="ar"] { font-family: var(--ar); text-transform: none; letter-spacing: 0; }

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tab-h) + 12px);
}

.topbar {
  display: grid;
  grid-template-columns: 42px 1fr 36px;
  align-items: center;
  gap: 10px;
  padding: calc(12px + var(--safe-t)) 16px 4px;
}

.top-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  animation: logo-pulse 1.8s ease-in-out infinite;
}

.top-titles strong {
  display: block;
  font-family: var(--display);
  letter-spacing: 0.24em;
  font-size: 1.15rem;
}

.top-titles span {
  font-family: var(--naskh);
  color: var(--gold);
  font-size: 0.95rem;
}

.header-star {
  width: 28px;
  height: 28px;
  justify-self: end;
  color: var(--gold);
}

.cuneiform-frieze {
  height: 10px;
  margin: 2px 20px 6px;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 7px,
    rgba(184, 146, 42, 0.55) 7px 8px,
    transparent 8px 11px,
    rgba(184, 146, 42, 0.28) 11px 16px,
    transparent 16px 20px
  );
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.motif-row {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.motif {
  width: 36px;
  height: 36px;
  color: var(--gold);
}

.tab-motif {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.view { position: relative; }

.tile-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.88);
  color: var(--gold);
  z-index: 1;
}

.tile.singer,
.tile.album { position: relative; }

.crumb {
  margin: 0 20px 4px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crumb [lang="ar"] { font-family: var(--ar); text-transform: none; letter-spacing: 0; }

.view {
  padding: 10px 16px 24px;
  animation: view-in 0.55s var(--ease);
}

.page-head { margin-bottom: 14px; }
.page-head.compact { margin-bottom: 6px; }

.kicker {
  display: flex;
  justify-content: space-between;
  margin: 0 0 6px;
  color: var(--gold);
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.kicker [lang="ar"] { font-family: var(--ar); text-transform: none; letter-spacing: 0; }

.page-head h2,
.detail-copy h2 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-head h2 [lang="en"],
.detail-copy h2 [lang="en"] {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 600;
}

.page-head h2 [lang="ar"],
.detail-copy h2 [lang="ar"] {
  font-family: var(--naskh);
  color: var(--gold);
  font-size: 1.2rem;
}

.lede, .fineprint, .byline {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 300;
}

.lede, .fineprint {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lede [lang="ar"],
.fineprint [lang="ar"],
.kicker [lang="ar"],
.tab [lang="ar"],
.back-btn [lang="ar"],
.cta [lang="ar"],
.tile [lang="ar"] { font-family: var(--ar); }

.tile-grid {
  display: grid;
  gap: 12px;
}

.tile-grid.singers,
.tile-grid.albums {
  grid-template-columns: 1fr 1fr;
}

.tile {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  text-align: start;
  color: inherit;
  cursor: pointer;
  display: grid;
  animation: card-rise 0.8s var(--ease) both;
}

.tile.program {
  grid-template-columns: 108px 1fr;
  min-height: 108px;
}

.tile.program.featured {
  grid-template-columns: 1fr;
}

.tile.program.featured .cover,
.tile.program.featured .cover-fallback {
  width: 100%;
  height: 168px;
}

.tile.singer,
.tile.album {
  grid-template-rows: 120px auto;
}

.tile .cover,
.tile .cover-fallback {
  width: 108px;
  height: 108px;
  object-fit: cover;
  background: #efe6d8;
}

.tile.singer .cover,
.tile.album .cover,
.tile.singer .cover-fallback,
.tile.album .cover-fallback {
  width: 100%;
  height: 120px;
}

.cover-fallback {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--display);
  letter-spacing: 0.06em;
}

.tile-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 10px 12px;
}

.tile-copy strong {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.25;
}

.tile-copy small {
  color: var(--gold);
  font-size: 0.82rem;
}

.tile-copy em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.tile:nth-child(2) { animation-delay: 0.08s; }
.tile:nth-child(3) { animation-delay: 0.16s; }
.tile:nth-child(4) { animation-delay: 0.22s; }

.back-btn {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.detail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: card-rise 0.75s var(--ease);
}

.detail-card > .cover,
.detail-card > .cover-fallback {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.detail-copy { padding: 16px; }

.cta {
  display: flex;
  justify-content: space-between;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #2c2434;
  color: #faf7f1;
  text-decoration: none;
  font-size: 0.86rem;
}

.follow-label {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 10px;
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tile.social {
  padding: 12px 10px;
  text-decoration: none;
  display: grid;
  gap: 4px;
}

.tile.social .ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-weight: 600;
}

.radio-card {
  position: relative;
  margin-top: 8px;
  padding: 22px 16px 18px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.radio-card h3 {
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.radio-card h3 [lang="en"] { font-family: var(--display); font-size: 1.4rem; }
.radio-card h3 [lang="ar"] { font-family: var(--naskh); color: var(--gold); font-size: 1.1rem; }

.dial {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 6px auto 18px;
}

.dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  animation: dial-pulse 2.4s ease-in-out infinite;
}

.dial img {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  object-fit: contain;
  border-radius: 50%;
  animation: logo-pulse 1.8s ease-in-out infinite;
}

.live-pill {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--gold);
  padding: 3px 10px;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c45c5c;
  animation: live-blink 1.15s ease-in-out infinite;
}

.live-pill.is-off i { background: #c09090; }

.radio-tag {
  margin: 6px 0 0;
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eq {
  width: 72px;
  height: 2px;
  margin: 16px auto 12px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.45;
}

.eq.is-on { animation: gold-shimmer 2.6s ease-in-out infinite; }

.radio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 12px;
}

.play-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: #fff;
  color: var(--gold);
  font-size: 1.05rem;
  cursor: pointer;
}

.vol { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; }
.vol input { accent-color: var(--gold); width: 110px; }

.mini-player {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  bottom: var(--tab-h);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  z-index: 6;
}

.mini-open {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  text-align: start;
  padding: 0;
  cursor: pointer;
}

.mini-open img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.mini-open small { color: var(--muted); }
.mini-stop {
  border: 1px solid var(--gold);
  background: #fff;
  color: var(--gold);
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 4px var(--safe-b);
  background: rgba(255, 252, 248, 0.96);
  border-top: 1px solid var(--line);
  z-index: 7;
}

.tab {
  border: 0;
  background: none;
  color: #8a8194;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 8px;
  cursor: pointer;
  position: relative;
}

.tab::after {
  content: "";
  position: absolute;
  top: 0;
  width: 18px;
  height: 2px;
  background: var(--gold);
  opacity: 0;
}

.tab svg { width: 22px; height: 22px; }
.tab span { font-size: 0.6rem; line-height: 1.15; }
.tab [lang="en"] { letter-spacing: 0.08em; text-transform: uppercase; }
.tab.is-active { color: var(--gold); }
.tab.is-active::after { opacity: 1; }

@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(184, 146, 42, 0), 0 0 6px rgba(184, 146, 42, 0.18);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(184, 146, 42, 0.16), 0 0 28px rgba(201, 168, 74, 0.55);
  }
}

@keyframes dial-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,146,42,0); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(184,146,42,.12), 0 0 24px rgba(184,146,42,.28); transform: scale(1.04); }
}

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@keyframes rule-drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(280%); }
}

@keyframes gold-shimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
