/* ==========================================================================
   منارة: موقع المنتج
   ========================================================================== */
:root {
  --ink: #0a231e;
  --emerald-900: #0c2b25;
  --emerald-800: #103a31;
  --emerald-700: #155044;
  --emerald-500: #23806b;
  --gold: #c9a24b;
  --gold-soft: #e6cf96;
  --gold-deep: #846417; /* 4.8:1 and more on the light backgrounds (QA-U09) */
  --sand: #f4eee2;
  --paper: #fbf8f1;
  --text: #17302a;
  --muted: #5a6d67;
  --line: rgba(16, 58, 49, .12);
  --white: #fff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(10, 35, 30, .35);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-gold { background: linear-gradient(180deg, #d8b562, var(--gold)); color: var(--ink); box-shadow: 0 10px 24px -12px rgba(201, 162, 75, .9); }
.btn-gold:hover { background: linear-gradient(180deg, #e2c373, #cfa955); }
.btn-ghost { color: var(--paper); border-color: rgba(230, 207, 150, .45); }
.btn-ghost:hover { border-color: var(--gold-soft); background: rgba(230, 207, 150, .08); }
.btn-ghost-light { color: var(--paper); border-color: rgba(255, 255, 255, .25); }
.btn-ghost-light:hover { border-color: var(--gold-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 43, 37, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(230, 207, 150, .12);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.brand-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gold-soft); }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { color: rgba(251, 248, 241, .78); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--gold-soft); }
.nav a.nav-login { color: var(--gold-soft); padding: 0 14px; border: 1px solid rgba(230, 207, 150, .4); border-radius: 999px; line-height: 34px; white-space: nowrap; }
.nav a.nav-login:hover { border-color: var(--gold-soft); background: rgba(230, 207, 150, .08); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--gold-soft); border-radius: 2px; margin: 5px 0; transition: transform .25s, opacity .25s; }

/* ---------- Pattern ---------- */
.hero-pattern {
  position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: url("../img/pattern.svg");
  background-size: 120px 120px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
}
.hero-pattern.faint { opacity: .07; -webkit-mask-image: none; mask-image: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(201, 162, 75, .18), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(35, 128, 107, .35), transparent 60%),
    linear-gradient(180deg, var(--emerald-900), var(--ink));
  color: var(--paper);
  padding: 72px 0 96px;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--gold-soft); margin-bottom: 14px; }
.eyebrow.dark { color: var(--gold-deep); }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin-bottom: 20px; }
.gold { color: var(--gold); }
.lead { font-size: 19px; color: rgba(251, 248, 241, .82); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; color: rgba(251, 248, 241, .72); }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.tv-caption { margin: 18px auto 0; font-size: 13px; color: rgba(251, 248, 241, .55); text-align: center; max-width: 520px; }

/* ---------- Strip ---------- */
.strip { background: var(--emerald-800); color: var(--paper); border-top: 1px solid rgba(230, 207, 150, .15); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-grid > div { padding: 26px 20px; display: flex; flex-direction: column; border-inline-start: 1px solid rgba(230, 207, 150, .12); }
.strip-grid > div:first-child { border-inline-start: 0; }
.strip strong { color: var(--gold-soft); font-size: 18px; font-weight: 600; }
.strip span { font-size: 14px; color: rgba(251, 248, 241, .68); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 104px 0; }
.section-sand { background: var(--sand); }
.section-dark { background: linear-gradient(180deg, var(--emerald-900), var(--ink)); color: var(--paper); overflow: hidden; }
.section-head { max-width: 760px; margin-bottom: 52px; position: relative; }
.section-head.center { margin-inline: auto; text-align: center; }
.sub { font-size: 18px; color: var(--muted); }
.section-dark .sub, .section-head.light .sub { color: rgba(251, 248, 241, .72); }
.note { margin-top: 28px; font-size: 15px; color: var(--muted); text-align: center; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature p { color: var(--muted); font-size: 15.5px; margin: 0; }
.ficon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(160deg, var(--emerald-700), var(--emerald-900));
}
.ficon svg { width: 24px; height: 24px; fill: none; stroke: var(--gold-soft); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.split.reverse { grid-template-columns: 1fr 1fr; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-inline-start: 34px; color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--emerald-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6cf96' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Time guard ---------- */
.guard {
  background: linear-gradient(170deg, var(--emerald-800), var(--ink)); color: var(--paper);
  border-radius: 24px; padding: 36px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.guard::after { content: ""; position: absolute; inset: auto -60px -60px auto; width: 220px; height: 220px; background: url("../img/pattern.svg") center/80px; opacity: .08; border-radius: 50%; }
.guard-badge { display: inline-block; background: rgba(201, 162, 75, .16); color: var(--gold-soft); border: 1px solid rgba(201, 162, 75, .35); border-radius: 999px; padding: 2px 14px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.guard h3 { font-size: 22px; }
.guard p { color: rgba(251, 248, 241, .75); font-size: 15.5px; }
.trust { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.trust li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.trust b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.trust b::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.trust span { color: rgba(251, 248, 241, .72); }
.t-ok b::before { background: #4cc79a; box-shadow: 0 0 0 4px rgba(76, 199, 154, .18); }
.t-warn b::before { background: #e8b84a; box-shadow: 0 0 0 4px rgba(232, 184, 74, .18); }
.t-bad b::before { background: #e5675a; box-shadow: 0 0 0 4px rgba(229, 103, 90, .18); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--paper); border-radius: var(--radius); padding: 28px 24px; border: 1px solid var(--line); position: relative; }
.steps p { color: var(--muted); font-size: 15.5px; margin: 0; }
.step-n {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px;
  font: 700 22px/1 var(--font-display); color: var(--ink);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold)); border-radius: 50%;
}

/* ---------- Dashboard mock ---------- */
.dash { background: var(--white); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; font-size: 14px; }
.dash-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #eef1ee; border-bottom: 1px solid var(--line); }
.dash-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd6d2; }
.dash-bar span { margin-inline-start: 10px; font-size: 13px; color: var(--muted); }
.dash-body { display: grid; grid-template-columns: 150px 1fr; min-height: 340px; }
.dash-side { background: var(--emerald-900); color: rgba(251, 248, 241, .7); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.dash-side b { color: var(--gold-soft); margin-bottom: 10px; font-weight: 600; }
.dash-side span { padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.dash-side span.on { background: rgba(230, 207, 150, .14); color: var(--paper); }
.dash-main { padding: 18px; }
.dash-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.dash-cards div { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.dash-cards small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.dash-cards b { font-size: 16px; color: var(--emerald-700); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dash-table th { text-align: start; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.dash-table td:nth-child(2) { font-weight: 600; color: var(--emerald-700); }
.dash-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.pill { font-size: 12.5px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); }
.pill.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }

/* ---------- Audience ---------- */
.audience { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.audience div { background: var(--paper); border-radius: var(--radius); padding: 24px 20px; border-top: 3px solid var(--gold); }
.audience h3 { font-size: 18px; }
.audience p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Modes ---------- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto; }
.mode { position: relative; border: 1px solid var(--line); border-radius: 22px; padding: 34px; background: var(--white); }
.mode.featured { border-color: rgba(201, 162, 75, .55); box-shadow: var(--shadow); }
.mode-sub { color: var(--muted); font-size: 15px; }
.mode ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.mode li { position: relative; padding-inline-start: 30px; font-size: 15.5px; }
.mode li::before { position: absolute; inset-inline-start: 0; top: 1px; width: 20px; text-align: center; font-weight: 700; }
.mode li.yes::before { content: "✓"; color: var(--emerald-500); }
.mode li.mid::before { content: "!"; color: var(--gold-deep); }
.mode li.mid { color: var(--muted); }
.ribbon { position: absolute; top: -13px; inset-inline-end: 24px; background: var(--gold); color: var(--ink); font-size: 12.5px; font-weight: 700; padding: 3px 14px; border-radius: 999px; }

/* ---------- Plans ---------- */
.plans { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 34px 28px; }
.plan.featured { background: linear-gradient(170deg, rgba(201, 162, 75, .16), rgba(255, 255, 255, .03)); border-color: rgba(201, 162, 75, .55); }
.plan h3 { font-family: var(--font-display); font-size: 26px; color: var(--gold-soft); margin-bottom: 4px; }
.plan-for { color: rgba(251, 248, 241, .65); font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 10px; flex: 1; }
.plan li { padding-inline-start: 22px; position: relative; color: rgba(251, 248, 241, .85); font-size: 15.5px; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 11px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 0 24px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: 0 12px 30px -20px rgba(10, 35, 30, .4); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--gold-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* ---------- Form ---------- */
.form { background: var(--white); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #d8ddd9;
  font: 400 16px var(--font); color: var(--text); background: var(--paper);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--emerald-500); box-shadow: 0 0 0 4px rgba(35, 128, 107, .14); }
.field input[aria-invalid="true"] { border-color: #c9584b; }
.field input[dir="ltr"] { text-align: right; }
.form-msg { margin: 0; font-size: 15px; min-height: 1.6em; }
.form-msg.ok { color: var(--emerald-500); }
.form-msg.err { color: #b54a3e; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(251, 248, 241, .65); padding: 48px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 48px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; justify-content: flex-end; }
.footer-grid nav a { text-decoration: none; }
.footer-grid nav a:hover { color: var(--gold-soft); }
.site-footer .brand { margin-bottom: 8px; }
.copy { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 20px; margin: 8px 0 0; font-size: 13px; }

/* ==========================================================================
   شاشة المسجد (المحاكاة)، أفقية أو عمودية
   ========================================================================== */
.tv { --bg: #0E3A31; --bg2: #072019; --fg: #F2EFE4; --dim: #A9B3AC; --acc: #E9C46A; --cell: rgba(255, 255, 255, .05); --cellb: rgba(233, 196, 106, .22); --next: rgba(233, 196, 106, .16);
  width: 100%; max-width: 680px; margin: 0 auto; }
.tv[data-theme="dark"] { --bg: #111417; --bg2: #050607; --fg: #F4F6F5; --dim: #9AA3A0; --acc: #62D1B4; --cell: rgba(255, 255, 255, .04); --cellb: rgba(98, 209, 180, .2); --next: rgba(98, 209, 180, .14); }
.tv[data-theme="minimal"] { --bg: #FBF7EE; --bg2: #EFE7D6; --fg: #14322B; --dim: #54625D; --acc: #745A21; --cell: rgba(20, 50, 43, .04); --cellb: rgba(20, 50, 43, .12); --next: rgba(116, 90, 33, .12); }
.tv[data-theme="navy"] { --bg: #10233D; --bg2: #040C16; --fg: #EEF2F8; --dim: #A9B6C8; --acc: #E2BE6A; --cell: rgba(255, 255, 255, .05); --cellb: rgba(226, 190, 106, .22); --next: rgba(226, 190, 106, .15); }
.tv[data-theme="burgundy"] { --bg: #36151E; --bg2: #13060A; --fg: #F8EEEA; --dim: #CDB5B1; --acc: #E9C77E; --cell: rgba(255, 255, 255, .05); --cellb: rgba(233, 199, 126, .22); --next: rgba(233, 199, 126, .15); }
.tv[data-theme="emerald"] { --bg: #0C4333; --bg2: #031812; --fg: #F0F7F2; --dim: #B0C9BE; --acc: #F0D48A; --cell: rgba(255, 255, 255, .05); --cellb: rgba(240, 212, 138, .22); --next: rgba(240, 212, 138, .15); }
.tv[data-theme="petrol"] { --bg: #0A363E; --bg2: #021316; --fg: #EEF7F7; --dim: #A6C2C5; --acc: #7FDBCB; --cell: rgba(255, 255, 255, .05); --cellb: rgba(127, 219, 203, .22); --next: rgba(127, 219, 203, .15); }
.tv[data-theme="coffee"] { --bg: #2C1E15; --bg2: #0F0A06; --fg: #F6EEE3; --dim: #C4B4A2; --acc: #E6CFA3; --cell: rgba(255, 255, 255, .05); --cellb: rgba(230, 207, 163, .22); --next: rgba(230, 207, 163, .15); }
.tv[data-theme="sand"] { --bg: #F5EDE0; --bg2: #E6DFD3; --fg: #38261A; --dim: #695645; --acc: #7E5018; --cell: rgba(56, 38, 26, .04); --cellb: rgba(56, 38, 26, .12); --next: rgba(126, 80, 24, .15); }
.tv[data-theme="pearl"] { --bg: #F7F8FA; --bg2: #E8E9EB; --fg: #13243A; --dim: #516077; --acc: #1F5F8B; --cell: rgba(19, 36, 58, .04); --cellb: rgba(19, 36, 58, .12); --next: rgba(31, 95, 139, .15); }

.tv-frame { background: linear-gradient(145deg, #1d1f20, #0c0d0e); padding: clamp(5px, 1.1%, 12px); border-radius: 12px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.tv-screen {
  container-type: inline-size; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px;
  background: radial-gradient(120% 90% at 50% 0%, var(--bg), var(--bg2));
  color: var(--fg); display: grid; grid-template-rows: auto 1fr auto auto; transition: background .5s, color .5s;
  font-family: var(--font);
}
.tv-orn { position: absolute; inset: 0; background: url("../img/pattern.svg") center/14cqw; opacity: .06; pointer-events: none; }
.tv[data-theme="minimal"] .tv-orn, .tv[data-theme="sand"] .tv-orn, .tv[data-theme="pearl"] .tv-orn { opacity: .05; filter: invert(1); }
.tv[data-theme="dark"] .tv-orn { opacity: .03; }

.tv-head { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 3cqw 4cqw 0; }
.tv-mosque b { display: block; font: 600 2.6cqw/1.3 var(--font-display); color: var(--acc); }
.tv-mosque small { font-size: 1.6cqw; color: var(--dim); }
.tv-clock { display: flex; align-items: baseline; gap: .6cqw; direction: ltr; }
.tv-clock b { font: 600 7cqw/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tv-clock span { font-size: 2.4cqw; color: var(--acc); }
.tv-clock i { font-style: normal; font-size: 2.6cqw; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.tv-dates { text-align: left; display: flex; flex-direction: column; font-size: 1.7cqw; line-height: 1.5; }
.tv-dates span:first-child { color: var(--acc); font-weight: 600; }
.tv-dates span:last-child { color: var(--dim); }

.tv-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 4cqw; position: relative; }
.tv-center p { margin: 0; }
.tv-center .k { font-size: 2.3cqw; color: var(--dim); }
.tv-center .big { font: 700 6.4cqw/1.25 var(--font-display); color: var(--fg); }
.tv-center .big.num, .tv-center .num { font-family: var(--font); font-variant-numeric: tabular-nums; direction: ltr; display: inline-block; }
.tv-center .big.num { font-size: 8.5cqw; font-weight: 600; color: var(--acc); }
.tv-center .s { font-size: 2.3cqw; color: var(--acc); }
.tv-center .dhikr { font: 500 3cqw/1.9 var(--font); margin-top: .8cqw; }

.tv-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1cqw; padding: 0 3cqw 1.8cqw; transition: opacity .5s; }
.tv-cell { background: var(--cell); border: 1px solid var(--cellb); border-radius: 1.2cqw; padding: 1.2cqw .5cqw; text-align: center; display: flex; flex-direction: column; align-items: center; line-height: 1.3; transition: background .4s, border-color .4s, transform .4s; }
.tv-cell .n { font-size: 1.75cqw; color: var(--dim); }
.tv-cell .a { font-size: 3.1cqw; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; }
.tv-cell .a em { font-style: normal; font-size: 1.4cqw; color: var(--dim); margin-inline-start: .3cqw; }
.tv-cell .i { font-size: 1.35cqw; color: var(--acc); }
.tv-cell.is-next { background: var(--next); border-color: var(--acc); transform: translateY(-.4cqw); }
.tv-cell.is-next .n { color: var(--acc); font-weight: 600; }

.tv-ticker { background: rgba(0, 0, 0, .22); border-top: 1px solid var(--cellb); padding: 1cqw 4cqw; font-size: 1.7cqw; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .4s; }
.tv[data-theme="minimal"] .tv-ticker, .tv[data-theme="sand"] .tv-ticker, .tv[data-theme="pearl"] .tv-ticker { background: rgba(0, 0, 0, .04); }
.tv-ticker span::before { content: "◆"; color: var(--acc); margin-inline-end: 1cqw; font-size: 1.2cqw; vertical-align: middle; }

/* حالات الشاشة */
.tv[data-state="adhan"] .tv-center .big { color: var(--acc); animation: glow 2.4s ease-in-out infinite; }
.tv[data-state="adhan"] .tv-ticker,
.tv[data-state="countdown"] .tv-ticker,
.tv[data-state="preiqamah"] .tv-ticker,
.tv[data-state="postprayer"] .tv-ticker { opacity: 0; }
.tv[data-state="preiqamah"] .tv-screen { box-shadow: inset 0 0 0 .5cqw var(--acc); }
.tv[data-state="inprayer"] .tv-screen { background: #030807; color: rgba(255, 255, 255, .4); }
.tv[data-theme="minimal"][data-state="inprayer"] .tv-screen, .tv[data-theme="sand"][data-state="inprayer"] .tv-screen, .tv[data-theme="pearl"][data-state="inprayer"] .tv-screen { background: #1d2523; }
.tv[data-state="inprayer"] .tv-row,
.tv[data-state="inprayer"] .tv-ticker,
.tv[data-state="inprayer"] .tv-dates,
.tv[data-state="inprayer"] .tv-mosque,
.tv[data-state="inprayer"] .tv-orn { opacity: 0; }
.tv[data-state="inprayer"] .tv-clock b { color: rgba(255, 255, 255, .25); }
.tv[data-state="inprayer"] .tv-clock span, .tv[data-state="inprayer"] .tv-clock i { opacity: 0; }
.tv[data-state="inprayer"] .tv-cell.is-next { border-color: transparent; }
.tv[data-state="inprayer"] .tv-center .big { color: rgba(255, 255, 255, .45); font-size: 4.5cqw; }
.tv-mosque, .tv-dates, .tv-clock span, .tv-clock i, .tv-orn { transition: opacity .5s; }
@keyframes glow { 50% { opacity: .7; } }

/* المحاكاة */
.demo { position: relative; display: grid; gap: 22px; justify-items: center; }
.demo .tv { max-width: 860px; }
.demo .tv[data-orient="port"] { max-width: 400px; }
.tv-lh { display: none; }

/* عمودياً: الترويسة في الوسط، ثم الحالة، ثم المواقيت قائمةً كما في التطبيق */
.tv[data-orient="port"] .tv-frame { padding: clamp(5px, 2%, 12px); }
.tv[data-orient="port"] .tv-screen { aspect-ratio: 9 / 16; grid-template-rows: auto 1fr auto auto; }
.tv[data-orient="port"] .tv-orn { background-size: 26cqw; }
.tv[data-orient="port"] .tv-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6cqw; padding: 5.5cqw 6cqw 0; }
.tv[data-orient="port"] .tv-mosque b { font-size: 5cqw; }
.tv[data-orient="port"] .tv-mosque small { font-size: 3cqw; }
.tv[data-orient="port"] .tv-clock { gap: 1.2cqw; }
.tv[data-orient="port"] .tv-clock b { font-size: 13cqw; }
.tv[data-orient="port"] .tv-clock span { font-size: 4.2cqw; }
.tv[data-orient="port"] .tv-clock i { font-size: 4.4cqw; }
.tv[data-orient="port"] .tv-dates { text-align: center; font-size: 3.2cqw; line-height: 1.45; }
.tv[data-orient="port"] .tv-center { padding: 1cqw 6cqw; min-height: 0; }
.tv[data-orient="port"] .tv-center .k { font-size: 4cqw; }
.tv[data-orient="port"] .tv-center .big { font-size: 10cqw; line-height: 1.2; }
.tv[data-orient="port"] .tv-center .big.num { font-size: 13cqw; }
.tv[data-orient="port"] .tv-center .s { font-size: 4cqw; }
.tv[data-orient="port"] .tv-center .dhikr { font-size: 4.1cqw; line-height: 1.7; }
.tv[data-orient="port"][data-state="inprayer"] .tv-center .big { font-size: 8cqw; }
.tv[data-orient="port"] .tv-row { grid-template-columns: 1fr; gap: 1.2cqw; padding: 0 5cqw 3cqw; }
.tv[data-orient="port"] .tv-lh, .tv[data-orient="port"] .tv-cell { display: grid; grid-template-columns: 1.15fr 1fr 1fr; align-items: center; text-align: center; }
.tv[data-orient="port"] .tv-lh { font-size: 3cqw; color: var(--dim); padding: 0 4cqw; line-height: 1.3; }
.tv[data-orient="port"] .tv-cell { padding: 1.4cqw 4cqw; border-radius: 2.2cqw; line-height: 1.25; }
.tv[data-orient="port"] .tv-cell .n { font-size: 4.3cqw; text-align: start; }
.tv[data-orient="port"] .tv-cell .a { font-size: 5.3cqw; }
.tv[data-orient="port"] .tv-cell .a em { font-size: 2.7cqw; }
.tv[data-orient="port"] .tv-cell .i { font-size: 4.4cqw; font-variant-numeric: tabular-nums; }
.tv[data-orient="port"] .tv-cell .il { display: none; }
.tv[data-orient="port"] .tv-cell.is-next { transform: none; }
.tv[data-orient="port"] .tv-ticker { font-size: 3.2cqw; padding: 2cqw 5cqw; }
.tv[data-orient="port"] .tv-ticker span::before { font-size: 2.4cqw; margin-inline-end: 2cqw; }
.tv[data-orient="port"][data-state="inprayer"] .tv-lh { opacity: 0; }

/* الواجهة: شاشة أفقية وأخرى عمودية جنباً إلى جنب */
.screens { display: grid; grid-template-columns: 16fr 7fr; gap: 4%; align-items: end; }
.screens .tv { max-width: none; margin: 0; }

/* القوالب العشرة: لون الخلفية ولون الإبراز */
.seg.swatches { border-radius: 22px; }
@media (max-width: 1100px) { .seg.swatches { display: grid; grid-template-columns: repeat(5, auto); } }
@media (max-width: 600px) { .seg.swatches { grid-template-columns: repeat(2, 1fr); } }
.swatches button { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-acc) 50%); }
.sw[data-sw="classic"] { --sw-bg: #0E3A31; --sw-acc: #E9C46A; }
.sw[data-sw="dark"] { --sw-bg: #111417; --sw-acc: #62D1B4; }
.sw[data-sw="minimal"] { --sw-bg: #FBF7EE; --sw-acc: #745A21; }
.sw[data-sw="navy"] { --sw-bg: #10233D; --sw-acc: #E2BE6A; }
.sw[data-sw="burgundy"] { --sw-bg: #36151E; --sw-acc: #E9C77E; }
.sw[data-sw="emerald"] { --sw-bg: #0C4333; --sw-acc: #F0D48A; }
.sw[data-sw="petrol"] { --sw-bg: #0A363E; --sw-acc: #7FDBCB; }
.sw[data-sw="coffee"] { --sw-bg: #2C1E15; --sw-acc: #E6CFA3; }
.sw[data-sw="sand"] { --sw-bg: #F5EDE0; --sw-acc: #7E5018; }
.sw[data-sw="pearl"] { --sw-bg: #F7F8FA; --sw-acc: #1F5F8B; }
.demo-controls { display: grid; gap: 10px; justify-items: center; text-align: center; width: 100%; }
.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; }
.seg button { font: 500 15px var(--font); color: rgba(251, 248, 241, .78); background: none; border: 0; padding: 9px 18px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.seg button:hover { color: var(--paper); }
.seg button[aria-checked="true"] { background: var(--gold); color: var(--ink); font-weight: 600; }
.seg-sm button { font-size: 14px; padding: 7px 16px; }
.state-desc { color: rgba(251, 248, 241, .7); font-size: 15.5px; margin: 0; min-height: 1.8em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .audience { grid-template-columns: repeat(3, 1fr); }
  /* The eight links with the two buttons no longer fit on one line below 1100px: they wrapped
     inside themselves between 961 and 1100 (QA-053), so the menu folds here, not at 960. */
  .nav-toggle { display: block; margin-inline-start: auto; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--emerald-900); border-bottom: 1px solid rgba(230, 207, 150, .15);
    padding: 8px 24px 20px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s;
  }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nav a.nav-login { padding: 14px 0; line-height: inherit; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); border-radius: 0; background: none; }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid, .split, .split.reverse { grid-template-columns: 1fr; gap: 44px; }
  .split.reverse .dash { order: 2; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid > div:nth-child(3) { border-inline-start: 0; }
  .strip-grid > div:nth-child(n+3) { border-top: 1px solid rgba(230, 207, 150, .12); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .plans, .modes { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .section { padding: 80px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { gap: 12px; }
  .nav { padding: 8px 16px 20px; }
  .hero-actions .btn { width: 100%; }
  .lead { font-size: 17px; }
  .features, .steps, .audience { grid-template-columns: 1fr; }
  .strip-grid > div { padding: 18px 12px; }
  .strip strong { font-size: 16px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .sub { font-size: 16.5px; }
  .guard, .mode, .form { padding: 24px 20px; }
  .trust li { grid-template-columns: 1fr; gap: 4px; }
  .field-row { grid-template-columns: 1fr; }
  .dash-body { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .dash-cards { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .dash-cards div { padding: 8px; }
  .dash-cards b { font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid nav { justify-content: flex-start; }
  .seg { border-radius: 18px; }
  .seg button { padding: 8px 12px; font-size: 14px; }
  .tv-frame { border-radius: 8px; }
}
/* ==========================================================================
   قالب من مكتبة القوالب على الموقع (الواجهة): «زمردي» كما صُمّم في
   docs/design/template-library/mosque-screen-themes.html، بوحدات التصميم
   (540×960 عمودياً و960×540 أفقياً) مكبَّراً إلى عرض حاويته (main.js).
   ========================================================================== */
.mtv { --ui: "Readex Pro", "Cairo", Tahoma, sans-serif; --num: "Cairo", "Readex Pro", Tahoma, sans-serif; width: 100%; }
.mtv-frame { background: linear-gradient(145deg, #1d1f20, #0c0d0e); padding: clamp(5px, 1.1%, 12px); border-radius: 12px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.mtv-box { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; }
.mtv[data-orient="port"] .mtv-frame { padding: clamp(5px, 2%, 12px); }
.mtv[data-orient="port"] .mtv-box { aspect-ratio: 9 / 16; }
.mtv .screen h3 { font-family: var(--ui); letter-spacing: 0; }
.mtv .next .phone { grid-column: 1 / -1; justify-self: center; margin-top: 6px; font-size: 26px; color: var(--s-next-accent); }
.mtv .land .next .phone { font-size: 22px; }
.screens .mtv { margin: 0; }
.mtv .screen {
  position: absolute; top: 0; right: 0; width: 540px; height: 960px; transform-origin: top right;
  direction: rtl; display: flex; flex-direction: column; overflow: hidden;
  background: var(--s-bg); color: var(--s-text); font-family: var(--ui);
}
.mtv .tnum { font-family: var(--num); font-variant-numeric: tabular-nums; }
.mtv .hdr { position: relative; flex: none; }
.mtv .name { font-weight: 800; font-size: 26px; line-height: 1.1; }
.mtv .name small { display: block; font-size: 9px; letter-spacing: .28em; font-weight: 600; color: var(--s-sub); margin-top: 4px; font-family: var(--ui); }
.mtv .clock { font-weight: 800; font-size: 96px; line-height: .95; letter-spacing: -2px; direction: ltr; display: inline-flex; align-items: baseline; gap: 8px; }
.mtv .clock .sec { font-size: 30px; color: var(--s-accent); letter-spacing: 0; }
.mtv .clock .ap { font-size: 26px; color: var(--s-accent); letter-spacing: 0; font-family: var(--ui); }
.mtv .dates { font-size: 15px; line-height: 1.6; }
.mtv .dates b { font-weight: 700; color: var(--s-date); white-space: nowrap; }
.mtv .dates .g { color: var(--s-sub); font-size: 13px; }
.mtv .next { flex: none; margin: 12px 20px 0; padding: 12px 20px; border-radius: 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  background: var(--s-next-bg); color: var(--s-next-text); box-shadow: var(--s-next-shadow); border: var(--s-next-border); }
.mtv .next .lbl { font-size: 13px; opacity: .8; }
.mtv .next .pn { font-size: 34px; font-weight: 800; line-height: 1.1; }
.mtv .next .iq { font-size: 13px; opacity: .85; }
.mtv .next .iq b { font-family: var(--num); font-weight: 700; }
.mtv .cd { direction: ltr; display: flex; gap: 2px; align-items: flex-start; color: var(--s-next-accent); }
.mtv .cd .u { display: grid; justify-items: center; }
.mtv .cd .u b { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 46px; font-weight: 800; line-height: 1; }
.mtv .cd .u i { font-style: normal; font-size: 11px; opacity: .85; margin-top: 3px; font-family: var(--ui); }
.mtv .cd .c { font-family: var(--num); font-size: 40px; font-weight: 700; line-height: 1; opacity: .7; }
.mtv .next .cdwrap { grid-row: 1 / span 3; grid-column: 2; display: grid; justify-items: center; gap: 2px; }
.mtv .next .cdwrap .lbl { font-size: 12px; }
.mtv .list { flex: 1; display: flex; flex-direction: column; justify-content: safe center; gap: 6px; padding: 8px 20px; min-height: 0; }
.mtv .cols { display: grid; grid-template-columns: 52px 1fr 128px 98px; padding: 0 16px; font-size: 12px; color: var(--s-sub); }
.mtv .cols span:nth-child(3), .mtv .cols span:nth-child(4) { text-align: center; }
.mtv .row { display: grid; grid-template-columns: 52px 1fr 128px 98px; align-items: center; padding: 6px 16px; border-radius: 14px;
  background: var(--s-row); border: var(--s-row-border); box-shadow: var(--s-row-shadow); }
.mtv .row svg { width: 38px; height: 38px; color: var(--s-icon); }
.mtv .row .pn { font-size: 25px; font-weight: 800; line-height: 1.1; }
.mtv .row .pn small { display: block; font-size: 10px; letter-spacing: .2em; font-weight: 600; color: var(--s-sub); font-family: var(--ui); }
.mtv .row .t { text-align: center; direction: ltr; font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 800; line-height: 1; }
.mtv .row .t i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--s-sub); margin-left: 4px; font-family: var(--ui); }
.mtv .row .iqv { text-align: center; font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 700; color: var(--s-iq); border-right: 1px solid var(--s-divider); line-height: 1.4; }
.mtv .row.on { background: var(--s-on-bg); border: var(--s-on-border); box-shadow: var(--s-on-shadow); }
.mtv .row.on .pn, .mtv .row.on .t { color: var(--s-on-text); }
.mtv .row.on .pn small, .mtv .row.on .t i { color: var(--s-on-sub); }
.mtv .row.on svg { color: var(--s-on-icon); }
.mtv .row.on .iqv { color: var(--s-on-iq); border-color: var(--s-on-divider); }
.mtv .row.sun { padding-block: 2px; }
.mtv .row.sun .pn { font-size: 18px; }
.mtv .row.sun .t { font-size: 24px; }
.mtv .row.sun svg { width: 28px; height: 28px; }
.mtv .ann { flex: none; margin: 0 20px 18px; border-radius: 16px; overflow: hidden; background: var(--s-ann-bg); border: var(--s-ann-border); box-shadow: var(--s-row-shadow); }
.mtv .ann h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; padding: 10px 18px; background: var(--s-ann-head); color: var(--s-ann-head-text); }
.mtv .ann h3 svg { width: 24px; height: 24px; color: var(--s-ann-head-icon); }
.mtv .ann ul { list-style: none; margin: 0; padding: 4px 18px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.mtv .ann li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--s-divider); }
.mtv .ann li:nth-child(-n+2) { border-top: 0; }
.mtv .ann li .ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--s-chip); color: var(--s-icon); }
.mtv .ann li .ic svg { width: 18px; height: 18px; }
.mtv .ann li b { display: block; font-size: 14px; font-weight: 700; }
.mtv .ann li span { display: block; font-size: 12px; color: var(--s-sub); }
.mtv .t-emerald { --s-bg: linear-gradient(#F3EFE6, #EAE4D6); --s-text: #173A2E; --s-sub: #6B6557; --s-accent: #D9B36E; --s-date: #F2D79C;
  --s-row: #FBF8F2; --s-row-border: 1px solid #E5DDCB; --s-row-shadow: 0 2px 6px rgba(60,50,30,.07); --s-icon: #B48A47; --s-iq: #5D6F64; --s-divider: #E0D3B8;
  --s-on-bg: linear-gradient(90deg, #163F31, #1D4D3C); --s-on-border: 1.5px solid #D2AE68; --s-on-shadow: 0 8px 18px rgba(22,63,49,.3); --s-on-text: #FFF; --s-on-sub: #C7D6CD; --s-on-icon: #E4C27F; --s-on-iq: #E4C27F; --s-on-divider: rgba(228,194,127,.35);
  --s-next-bg: #FBF8F2; --s-next-text: #173A2E; --s-next-accent: #163F31; --s-next-shadow: 0 2px 8px rgba(60,50,30,.08); --s-next-border: 1.5px solid #D2AE68;
  --s-ann-bg: #FBF8F2; --s-ann-border: 1px solid #E5DDCB; --s-ann-head: linear-gradient(90deg, #163F31, #1E4E3D); --s-ann-head-text: #FFF; --s-ann-head-icon: #E4C27F; --s-chip: #F1E6CF; }
.mtv .t-emerald .hdr { height: 262px; display: grid; grid-template-columns: 54% 46%; background: url("../img/emerald-photo.jpg") center / cover; background-position: left center; }
.mtv .t-emerald .panel { background: linear-gradient(160deg, #123A2C, #0F3226); border-radius: 0 0 0 0; color: #FFF; padding: 16px 20px 12px; display: grid; justify-items: center; align-content: center; gap: 2px; text-align: center;
  box-shadow: -1px 0 0 #D2AE68; }
.mtv .t-emerald .panel .name small { color: #CFC3A4; }
.mtv .t-emerald .panel .dome { width: 32px; height: 32px; color: #E0BC76; }
.mtv .t-emerald .panel .clock { font-size: 68px; color: #FFF8EA; }
.mtv .t-emerald .panel .dates { color: #E6E0D0; border-top: 1px solid rgba(224,188,118,.5); padding-top: 6px; margin-top: 4px; }
.mtv .t-emerald .panel .dates .g { color: #C9C1AE; }
.mtv .t-emerald .photo { background: url("../img/emerald-photo.jpg") center / cover; }
.mtv .t-emerald .hdr { background: none; }
.mtv .screen.land { width: 960px; height: 540px; flex-direction: row; }
.mtv .land .side { width: 380px; flex: none; display: flex; flex-direction: column; padding-bottom: 16px; position: relative; }
.mtv .land .side .hdr { flex: 1; height: auto; min-height: 0; align-content: center; }
.mtv .land .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mtv .land .next { margin: 10px 16px 0; padding: 10px 16px; }
.mtv .land .next .pn { font-size: 30px; }
.mtv .land .cd .u b { font-size: 38px; }
.mtv .land .cd .c { font-size: 32px; }
.mtv .land .list { padding: 14px 18px 8px 16px; gap: 5px; }
.mtv .land .cols, .mtv .land .row { grid-template-columns: 44px 1fr 120px 92px; }
.mtv .land .row { padding: 4px 14px; }
.mtv .land .row svg { width: 32px; height: 32px; }
.mtv .land .row .pn { font-size: 22px; }
.mtv .land .row .t { font-size: 30px; }
.mtv .land .row .iqv { font-size: 21px; }
.mtv .land .row.sun { padding-block: 1px; }
.mtv .land .row.sun .pn { font-size: 16px; }
.mtv .land .row.sun .t { font-size: 21px; }
.mtv .land .row.sun svg { width: 24px; height: 24px; }
.mtv .land .ann { margin: 0 18px 16px 16px; }
.mtv .land .ann h3 { padding: 8px 16px; font-size: 16px; }
.mtv .land .ann li { padding: 6px 0; }
.mtv .land.t-emerald .side { background: linear-gradient(rgba(16,52,40,.55), rgba(16,52,40,.92) 55%, #10342A), url("../img/emerald-photo.jpg") center 30% / cover; }
.mtv .land.t-emerald .hdr { grid-template-columns: 1fr; }
.mtv .land.t-emerald .photo { display: none; }
.mtv .land.t-emerald .panel { background: none; box-shadow: none; padding-top: 22px; }
.mtv .land.t-emerald .panel .clock { font-size: 78px; }
.mtv .land.t-emerald .next { background: rgba(251,248,242,.96); }
.mtv .screen .dev { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--s-sub); }
@media (prefers-reduced-motion: no-preference) { .mtv .row.on { transition: background .4s; } }

/* «فضلاً أغلق الهاتف» قبيل الإقامة: خط عريض ونبض كنبض القلب (نبضتان ثم سكون)، كما في تطبيق الشاشة */
.phone-pulse { display: inline-block; font-weight: 800; animation: heartbeat 1.4s ease-in-out infinite; }
@keyframes heartbeat {
  0% { transform: scale(1); opacity: .7; }
  10% { transform: scale(1.14); opacity: 1; }
  21% { transform: scale(1); opacity: .75; }
  31% { transform: scale(1.09); opacity: 1; }
  46%, 100% { transform: scale(1); opacity: .7; }
}
.tv-center .phone { margin-top: .6cqw; font-size: 3.6cqw; color: var(--fg); }
.tv[data-orient="port"] .tv-center .phone { font-size: 6.4cqw; margin-top: 1.2cqw; }

/* مكتبة القوالب: معرض القوالب، أفقياً أو عمودياً */
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 26px; }
.gallery-count { margin: 0; color: var(--muted); font-size: 15px; }
.seg-light { background: var(--sand); border-color: var(--line); }
.seg-light button { color: var(--muted); }
.seg-light button:hover { color: var(--ink); }
.tpl-gallery { display: grid; gap: 26px 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tpl-gallery[data-orient="port"] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.tpl { margin: 0; display: grid; gap: 10px; min-width: 0; }
.tpl-shot { background: linear-gradient(145deg, #1d1f20, #0c0d0e); padding: 6px; border-radius: 10px; box-shadow: var(--shadow); transition: transform .3s; }
.tpl:hover .tpl-shot { transform: translateY(-3px); }
.tpl-shot img { display: block; width: 100%; height: auto; border-radius: 4px; }
.tpl-gallery[data-orient="land"] .tpl-port, .tpl-gallery[data-orient="port"] .tpl-land { display: none; }
.tpl figcaption b { display: block; font-size: 16px; color: var(--ink); }
.tpl figcaption span { display: block; font-size: 14px; color: var(--muted); }
.tpl-state { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; font-style: normal; color: var(--gold-deep); }
.tpl-state.soon { color: var(--muted); font-weight: 500; }

/* بعد الصلاة: الأذكار في صفحة واحدة، والمواقيت مخفية (كما في تطبيق الشاشة) */
.tv[data-state="postprayer"] .tv-row, .tv[data-state="postprayer"] .tv-ticker { display: none; }
.tv[data-state="postprayer"] .tv-center { justify-content: flex-start; padding-top: 1.2cqw; }
.tv-center .adhkar-title { font: 700 2.6cqw/1.3 var(--font-display); color: var(--acc); margin-bottom: .8cqw; }
.adhkar { list-style: none; margin: 0; padding: 0; text-align: start; columns: 2; column-gap: 3.5cqw; }
.adhkar li { break-inside: avoid; position: relative; padding-inline-start: 1.6cqw; margin-bottom: 1.1cqw; font-size: 2.15cqw; font-weight: 600; line-height: 1.55; }
.adhkar li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.05cqw; width: .55cqw; height: .55cqw; transform: rotate(45deg); background: var(--acc); }
.adhkar small { display: block; font-size: .78em; color: var(--acc); font-weight: 600; }
.tv[data-orient="port"] .tv-center .adhkar-title { font-size: 5.2cqw; }
.tv[data-orient="port"] .adhkar { columns: 1; }
.tv[data-orient="port"] .adhkar li { font-size: 3.8cqw; padding-inline-start: 3.4cqw; margin-bottom: 1.8cqw; }
.tv[data-orient="port"] .adhkar li::before { top: 1.9cqw; width: 1cqw; height: 1cqw; }
.mtv .adhkar-page { flex: 1; margin: 18px; padding: 16px 22px; border-radius: 18px; background: var(--s-ann-bg); border: var(--s-ann-border); color: var(--s-text); font-family: var(--ui); }
.mtv .adhkar-page .adhkar-title { margin: 0 0 8px; font-size: 30px; font-weight: 800; color: var(--s-accent); border-bottom: 1.5px solid var(--s-divider); padding-bottom: 6px; }
.mtv .adhkar-page .adhkar { --acc: var(--s-accent); }
.mtv .adhkar-page .adhkar li { font-size: 17px; padding-inline-start: 18px; margin-bottom: 9px; }
.mtv .adhkar-page .adhkar li::before { top: 9px; width: 7px; height: 7px; }
.mtv .screen:not(.land) .adhkar-page .adhkar { columns: 1; }
.mtv .screen:not(.land) .adhkar-page .adhkar li { font-size: 18.5px; margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Features not in the first release yet. */
.soon { display: inline-block; vertical-align: middle; margin-inline-start: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--font); font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--gold-deep); background: rgba(201, 162, 75, .14); border: 1px solid rgba(201, 162, 75, .45); }
.section-dark .soon { color: var(--gold-soft); background: rgba(201, 162, 75, .16); }

/* Set from the admin dashboard: a top line, plan prices, direct contact details. */
.announce { background: var(--gold); color: var(--ink); text-align: center; font-weight: 600; font-size: 15px; padding: 8px 16px; }
.plan-price { font-family: var(--font-display); font-size: 24px; color: #fbf8f1; margin: 10px 0 2px; }
.contact-direct { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; color: var(--muted); }
.contact-direct a { color: var(--gold-deep); font-weight: 600; }
/* A trap for bots, out of sight for people. */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pages made from the dashboard (App\Site\Blocks) ---------- */
.preview-bar { position: sticky; top: 0; z-index: 60; background: #8a5a00; color: #fff; text-align: center; padding: 6px 16px; font-size: 14px; font-weight: 600; }
.page-head { position: relative; overflow: hidden; background: var(--emerald-900); color: var(--paper); padding: 72px 0 56px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 0 0 .3em; position: relative; }
.page-head .lead { color: rgba(251, 248, 241, .78); font-size: 19px; margin: 0; position: relative; }
.prose { color: var(--muted); }
.prose h2 { color: var(--text); font-size: clamp(22px, 2.6vw, 28px); margin-top: 1.6em; }
.prose h3 { color: var(--text); margin-top: 1.3em; }
.prose ul, .prose ol { padding-inline-start: 22px; display: grid; gap: 6px; margin: 0 0 1em; }
.prose a { color: var(--emerald-500); }
.prose strong { color: var(--text); }
.section-dark .prose, .section-dark .prose strong, .section-dark .prose h2, .section-dark .prose h3 { color: rgba(251, 248, 241, .86); }
.block-text .section-head { margin-bottom: 18px; }
.block-figure { margin: 0; }
.block-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.block-figure.wide { max-width: 980px; margin: 0 auto; }
.block-figure figcaption { color: var(--muted); font-size: 15px; text-align: center; margin-top: 10px; }
.block-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.block-actions.center { justify-content: center; }
/* The legal pages: one document, narrow. */
.legal { padding: 64px 0 96px; }
.legal h1 { font-size: clamp(32px, 4.4vw, 46px); }
.legal .prose h2 { font-size: 24px; margin-top: 44px; }
.legal .meta { color: var(--gold-deep); font-weight: 600; }
/* Two light sections of a page one after the other read as one flow, not two gaps. */
.section[class*="block-"]:not(.section-sand):not(.section-dark) + .section[class*="block-"]:not(.section-sand):not(.section-dark) { padding-top: 0; }
