/*
 * Manara masjids demo. Token values are copied from site/assets/css/tokens.css
 * (same names) because the build hashes css file names, so the iframe cannot
 * link the shared file. The .theme-masjids values are applied on :root here.
 */
:root {
  --brand: #01b151;
  --brand-strong: #008a3f;
  --ink: #1b1b2e;
  --ink-soft: #3d3d57;
  --muted: #5d6275;
  --bg: #f3f8fb;
  --surface: #ffffff;
  --line: #dde5ec;
  --focus: #1a73e8;
  --danger: #b42318;
  --ok: #067647;
  --warn: #b54708;

  --accent: #0b6b45;
  --accent-ink: #ffffff;
  --accent-soft: #e7f3ec;
  --accent-2: #b8892b;
  --hero-from: #0c2a22;
  --hero-to: #0f3d2e;

  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem;  --space-6: 2rem;
  --radius-s: 8px; --radius-m: 14px; --radius-l: 22px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(27 27 46 / 6%), 0 2px 8px rgb(27 27 46 / 6%);
  --shadow-2: 0 10px 30px rgb(27 27 46 / 12%);

  /* Demo-only additions. */
  --gold-soft: #fff4d6;
  --gold-ink: #6b4a00;
  --tv-bg: #0f1412;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.demo { max-width: 1180px; margin: 0 auto; padding: 12px 16px 24px; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.logo svg { width: 24px; height: 24px; }
.who-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who-text strong { font-size: 16px; }
.who-text span { font-size: 13px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border: 1px solid var(--accent-2); background: var(--gold-soft); color: var(--gold-ink);
  border-radius: var(--radius-pill); font-weight: 700; font-size: 13px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }

.step { margin: 12px 0 10px; color: var(--ink-soft); font-size: 15px; }

/* ---------- buttons ---------- */
.btn {
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-s); border: 1px solid transparent;
  font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #095a3a; }
.btn-quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- scene tabs ---------- */
.scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.scenes [role="tab"] {
  min-height: 44px; padding: 0 16px 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface); font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.scenes .n {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 14px;
}
.scenes [aria-selected="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.scenes [aria-selected="true"] .n { background: rgb(255 255 255 / 20%); color: #fff; }

/* ---------- layout ---------- */
.layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.pv { min-width: 0; }
.pv-title { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.soon {
  text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; padding: 1px 8px;
  border-radius: var(--radius-pill); background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--accent-2);
}

@media (min-width: 720px) {
  .layout { grid-template-columns: 290px minmax(0, 1fr); }
  .admin { grid-column: 1 / -1; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}
@media (min-width: 1000px) {
  .layout { grid-template-columns: 320px 290px minmax(0, 1fr); }
  .admin { grid-column: auto; }
  .cards { display: grid; grid-template-columns: minmax(0, 1fr); }
  .jump { display: none !important; }
}
@media (max-width: 719px) {
  .cards { display: grid; gap: 16px; }
}

/* ---------- admin ---------- */
.panel { animation: rise 0.25s ease-out; }
.panel:focus { outline: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 16px; box-shadow: var(--shadow-1); container-type: inline-size;
}
.card h2 { font-size: 18px; margin-bottom: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.help { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
.err { color: var(--danger); font-size: 14px; font-weight: 600; margin: 8px 0; }

.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label, legend { font-weight: 650; font-size: 14px; }
input[type="text"], input[type="number"], input[type="time"], textarea, select {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #b9c4cf; border-radius: var(--radius-s);
  background: #fff;
}
textarea { resize: vertical; min-height: 84px; }
input[aria-invalid="true"] { border-color: var(--danger); background: #fff5f4; }
.num { text-align: center; }
.num.wide { text-align: start; }

.iq { margin-top: 4px; }
.iq legend { margin-bottom: 4px; padding: 0; color: var(--ink-soft); }
.iq-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 70px; grid-template-areas: "name input" "line input";
  gap: 0 10px; align-items: center; padding: 8px 6px; border-top: 1px solid var(--line); border-radius: 6px; position: relative;
}
.iq-row label { grid-area: name; font-weight: 650; }
.iq-line { grid-area: line; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
@container (max-width: 270px) { .iq-adhan, .iq-out { display: block; } }
.iq-out { font-weight: 750; color: var(--accent); }
.iq-row input { grid-area: input; }
.iq-row.try { background: var(--accent-soft); border-top-color: transparent; }
.try-tag {
  position: absolute; top: -9px; right: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
  text-transform: uppercase; background: var(--accent-2); color: #fff; padding: 1px 8px; border-radius: var(--radius-pill);
}

.chan { margin-bottom: 12px; display: grid; gap: 8px; }
.chan legend { margin-bottom: 6px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-size: 13px; }

.shifts { display: grid; gap: 12px; margin-bottom: 12px; }
.shift { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; background: #fbfdfe; }
.shift-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.shift-head h3 { font-size: 15px; }
.shift-grid { display: grid; gap: 8px 10px; grid-template-columns: minmax(0, 1fr); }
.shift-grid .field { margin: 0; }
@container (min-width: 330px) { .shift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #efc1bc; }
.btn-danger:hover { background: #fff5f4; }

.ticks { display: grid; gap: 8px; margin: 8px 0 14px; }
.ticks li { position: relative; padding-inline-start: 24px; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 6px; width: 12px; height: 7px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg);
}

/* ---------- sync strip ---------- */
.sync { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); font-size: 13px; font-weight: 650; color: var(--muted); background: var(--bg);
}
.chips .ic { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c3ccd5; display: inline-block; position: relative; }
.chips li[data-state="working"] .ic { border-color: var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.chips li[data-state="done"] { color: var(--ok); border-color: #b7dfc9; background: #effaf3; }
.chips li[data-state="done"] .ic { background: var(--ok); border-color: var(--ok); }
.chips li[data-state="done"] .ic::after {
  content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@keyframes spin { to { transform: rotate(360deg); } }
.sync-text { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.jump { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.jump button {
  min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; font-weight: 650; cursor: pointer;
}

/* ---------- previews: shared ---------- */
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--accent-2); } 100% { box-shadow: 0 0 0 4px transparent; } }
.chg { color: var(--ink) !important; padding-inline: 5px; background: var(--gold-soft) !important; outline: 2px solid var(--accent-2); outline-offset: -2px; border-radius: 6px; }
.new-tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--accent-2); color: #fff; padding: 0 6px; border-radius: var(--radius-pill); margin-inline-start: 6px; vertical-align: middle;
}

/* ---------- phone ---------- */
.phone {
  width: min(100%, 290px); margin: 0 auto; border-radius: 36px; background: #14181a; padding: 9px; box-shadow: var(--shadow-2); position: relative;
}
.ph-screen { background: var(--bg); border-radius: 28px; overflow: hidden; position: relative; font-size: 12.5px; line-height: 1.35; }
.ph-screen::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 74px; height: 20px; margin-left: -37px; border-radius: 12px; background: #14181a; z-index: 3;
}
.ph-head { background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); color: #fff; padding: 38px 14px 14px; }
.ph-now { font-size: 22px; font-weight: 700; line-height: 1.15; }
.ph-time { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; font-size: 22px; font-weight: 700; }
.ph-time small { font-size: 11px; font-weight: 500; opacity: 0.85; }
.ph-line { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11.5px; opacity: 0.95; }
.ph-body { padding: 10px 10px 12px; display: grid; gap: 8px; }
.ph-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ph-sun { background: #fff4c9; border-color: #efdc8c; display: flex; justify-content: space-between; font-weight: 700; }
.ph-th, .ph-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px; gap: 6px; align-items: center; }
.ph-th { padding: 0 10px; font-size: 11px; font-weight: 700; color: var(--muted); }
.ph-th span:not(:first-child), .ph-row span:not(:first-child) { text-align: end; }
.ph-row { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-weight: 650; font-size: 13px; }
.ph-row.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ph-list { display: grid; gap: 5px; }
.ph-h { font-size: 12px; font-weight: 750; padding: 2px 2px 0; }
.ph-jum b { display: flex; justify-content: space-between; font-size: 13px; }
.ph-jum span { display: block; font-size: 12px; }
.ph-jum .faint { color: var(--muted); font-size: 11.5px; }
.ph-ann b { display: block; font-size: 13px; }
.ph-ann span { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 2px; }

.ph-banner {
  position: absolute; z-index: 5; top: 34px; left: 8px; right: 8px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px;
  align-items: start; background: rgb(252 252 253 / 97%); color: var(--ink); border-radius: 16px; padding: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
  animation: drop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } }
.ph-banner .app { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.ph-banner .app svg { width: 19px; height: 19px; }
.ph-banner small { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.ph-banner b { display: block; font-size: 13px; }
.ph-banner span.msg { display: block; font-size: 12px; color: var(--ink-soft); }
.ph-banner button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #e8edf1; cursor: pointer; font-size: 16px; line-height: 1; }

/* ---------- website ---------- */
.web { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-1); container-type: inline-size; }
.w-bar { background: #e6ecf1; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.w-dots { display: flex; gap: 5px; }
.w-dots i { width: 9px; height: 9px; border-radius: 50%; background: #c2ccd4; display: block; }
.w-url { flex: 1; min-width: 0; background: #fff; border-radius: var(--radius-pill); padding: 3px 12px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-nav { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.w-brand { white-space: nowrap; display: flex; align-items: center; gap: 8px; font-weight: 750; margin-inline-end: auto; min-width: 0; }
.w-brand .logo { width: 28px; height: 28px; border-radius: 9px; }
.w-brand .logo svg { width: 18px; height: 18px; }
.w-links { display: none; gap: 14px; font-size: 13px; color: var(--ink-soft); }
@container (min-width: 520px) { .w-links { display: flex; } }
.donate {
  min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: var(--accent-2); color: #1b1b2e;
  font-weight: 800; cursor: pointer;
}
.donate:hover { filter: brightness(0.94); }
.donate.pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(184 137 43 / 60%); } 70%, 100% { box-shadow: 0 0 0 12px rgb(184 137 43 / 0%); } }
.w-body { padding: 14px; background: var(--bg); display: grid; gap: 10px; }
.w-hero h4 { margin: 0; font-size: 22px; line-height: 1.15; color: var(--ink); }
.w-hero p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.w-box { background: #fff; border: 2px solid #d8e6de; border-radius: 10px; padding: 10px; }
.w-sun { display: flex; justify-content: space-between; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-weight: 700; }
.w-date { font-weight: 700; font-size: 14px; }
.w-date span { color: var(--muted); font-weight: 600; }
.w-th, .w-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px; gap: 8px; align-items: center; }
.w-th { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 12px 6px; }
.w-row { border: 2px solid #d8e6de; border-radius: 8px; padding: 9px 12px; margin-bottom: 6px; font-weight: 650; }
.w-row:last-child { margin-bottom: 0; }
.w-th span:not(:first-child), .w-row span:not(:first-child) { text-align: end; }
.w-row.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.w-h { font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.w-jrow { display: flex; justify-content: space-between; border: 2px solid #d8e6de; border-radius: 8px; padding: 9px 12px; margin-bottom: 6px; font-weight: 650; }
.w-jrow:last-child { margin-bottom: 0; }
.w-ann { border-inline-start: 4px solid var(--accent-2); }
.w-ann + .w-ann { margin-top: 6px; }
.w-ann b { display: block; }
.w-ann span { display: block; color: var(--ink-soft); font-size: 13px; }

/* ---------- lobby TV ---------- */
.tv-wrap { container-type: inline-size; border-radius: 12px; border: 5px solid #232a28; background: var(--tv-bg); box-shadow: var(--shadow-2); overflow: hidden; }
.tv-screen {
  aspect-ratio: 16 / 9; background: var(--tv-bg); color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) 43%;
  gap: 3cqw; padding: 3cqw 3.6cqw; font-size: 1cqw; line-height: 1.15; overflow: hidden;
}
.tv-left { display: grid; grid-template-rows: auto 1fr auto; gap: 2cqw; min-width: 0; }
.tv-brand { display: flex; align-items: center; gap: 1.4cqw; font-size: 3em; font-weight: 700; }
.tv-brand .logo { width: 5cqw; height: 5cqw; border-radius: 1.2cqw; }
.tv-brand .logo svg { width: 3.3cqw; height: 3.3cqw; }
.tv-slide {
  background: linear-gradient(160deg, #143b2e, #0e2a21); border-radius: 1.6cqw; padding: 3cqw; display: flex; flex-direction: column; justify-content: center;
  gap: 1.4cqw; min-width: 0; overflow: hidden;
}
.tv-slide .kicker { font-size: 1.8em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #e6c477; }
.tv-slide h4 { margin: 0; font-size: 4.3em; line-height: 1.08; font-weight: 750; overflow-wrap: anywhere; }
.tv-slide p { margin: 0; font-size: 2.5em; color: rgb(255 255 255 / 86%); overflow-wrap: anywhere; }
.tv-dots { display: flex; gap: 0.9cqw; justify-content: center; min-height: 1.2cqw; }
.tv-dots i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: rgb(255 255 255 / 28%); display: block; }
.tv-dots i.on { background: #e6c477; }

.tv-rail { min-width: 0; display: flex; flex-direction: column; gap: 0.8em; font-size: calc(1cqw * var(--tvs, 1)); }
.tv-date { font-size: 2.7em; font-weight: 750; }
.tv-hijri { font-size: 2.05em; color: rgb(255 255 255 / 72%); margin-top: 0.15em; }
.tv-th, .tv-row { display: grid; grid-template-columns: minmax(0, 1.1fr) 1fr 1fr; gap: 0.5em; align-items: center; }
.tv-th { font-size: 1.75em; color: rgb(255 255 255 / 70%); font-weight: 650; padding: 0 0.6em; }
.tv-th span:not(:first-child), .tv-row span:not(:first-child) { text-align: end; }
.tv-row { font-size: 2.5em; font-weight: 550; padding: 0.2em 0.5em; border-radius: 0.4em; color: rgb(255 255 255 / 88%); white-space: nowrap; }
.tv-row.on { background: rgb(1 177 81 / 35%); font-weight: 750; color: #fff; }
.tv-row.chg { background: rgb(230 196 119 / 30%) !important; outline: 0.15em solid #e6c477; outline-offset: -0.15em; }
.tv-jum { background: rgb(255 255 255 / 6%); border-radius: 0.5em; padding: 0.6em 0.8em; }
.tv-jum h5 { margin: 0 0 0.3em; font-size: 2.1em; font-weight: 750; }
.tv-jrow { display: flex; justify-content: space-between; font-size: 1.95em; color: rgb(255 255 255 / 88%); gap: 0.6em; }
.tv-jrow b { font-weight: 600; }
.tv-jsub { font-size: 1.45em; color: rgb(255 255 255 / 66%); margin-bottom: 0.3em; }
.tv-jrow.chg { background: rgb(230 196 119 / 30%) !important; outline: 0.15em solid #e6c477; outline-offset: 0.1em; color: #fff; }
.tv-count {
  margin-top: auto; background: rgb(1 177 81 / 16%); border-radius: 0.7em; padding: 0.55em 0.8em; display: flex; justify-content: space-between;
  align-items: baseline; gap: 0.5em;
}
.tv-count .k { font-size: 1.6em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(255 255 255 / 68%); }
.tv-count .s { font-size: 2.7em; font-weight: 750; }
.tv-count .t { font-size: 3.3em; font-weight: 750; color: #6ee0a4; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- fine print ---------- */
.fine { margin-top: 18px; color: var(--muted); font-size: 13px; max-width: 78ch; }

/* ---------- donate button dialog ---------- */
dialog {
  border: 0; border-radius: var(--radius-l); padding: 0; width: calc(100% - 24px); max-width: 440px; max-height: calc(100vh - 24px); overflow: auto;
  color: var(--ink); background: #fff; box-shadow: 0 24px 60px rgb(0 0 0 / 35%);
}
dialog::backdrop { background: rgb(15 20 18 / 58%); }
.give { padding: 18px; }
.give-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.give h2 { font-size: 20px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-ink); }
.x { width: 44px; height: 44px; margin: -8px -8px 0 0; border: 0; border-radius: 50%; background: transparent; font-size: 26px; cursor: pointer; }
.x:hover { background: #eef2f5; }
.give-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.give-actions .btn-primary { flex: 1 1 auto; }
.give > p { margin-bottom: 12px; }

/* ---------- narrow ---------- */
@media (max-width: 380px) {
  .demo { padding-inline: 12px; }
  .card { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .chips li[data-state="working"] .ic { animation: none; border-top-color: var(--accent); }
  .donate.pulse { animation: none; box-shadow: 0 0 0 4px rgb(184 137 43 / 55%); }
}

/* On a narrow screen the TV keeps its content but stacks, so the text stays readable. */
@container (max-width: 390px) {
  .tv-screen { aspect-ratio: auto; grid-template-columns: minmax(0, 1fr); font-size: 2.1cqw; gap: 4cqw; padding: 4cqw; }
  .tv-brand .logo { width: 9cqw; height: 9cqw; border-radius: 2cqw; }
  .tv-brand .logo svg { width: 6cqw; height: 6cqw; }
  .tv-left { grid-template-rows: auto auto auto; }
  .tv-rail { font-size: calc(2.1cqw * var(--tvs, 1)); }
  .tv-dots i { width: 2cqw; height: 2cqw; }
  .tv-slide { padding: 4.5cqw; border-radius: 3cqw; }
}

/* Changed-value highlight on the dark TV needs light text, not the ink used elsewhere. */
.tv-row.chg, .tv-jrow.chg { color: #fff !important; padding-inline: 0.5em; }

/* The generic ".card span { display:block }" rules above must not stretch the tag. */
.new-tag { display: inline-block !important; width: auto !important; margin-top: 0 !important; color: #fff !important; font-size: 10.5px !important; }
