/* Color only the existing decorative tile; Quran and page content are untouched. */
html[data-quran-decorations="on"][data-quran-pattern-color="custom"]::before{
  background:var(--quran-pattern-color)!important;
  -webkit-mask-image:url("../images/home-geometric-tile.svg?v=20261009-1");
  mask-image:url("../images/home-geometric-tile.svg?v=20261009-1");
  -webkit-mask-size:clamp(320px,32vw,520px) clamp(320px,32vw,520px);
  mask-size:clamp(320px,32vw,520px) clamp(320px,32vw,520px);
  -webkit-mask-repeat:repeat;mask-repeat:repeat;
  -webkit-mask-position:center top;mask-position:center top;
  opacity:.32!important;
  filter:drop-shadow(0 0 2px var(--quran-pattern-color));
}
/* Decorative animation stays behind page content and never captures clicks. */
#quran-pattern-meteors{display:none}
html[data-quran-decorations="on"][data-quran-pattern-meteor="on"] body > #quran-pattern-meteors{
  display:block;position:fixed;inset:0;z-index:-1;width:100%;height:100%;pointer-events:none;
  background:transparent!important;contain:strict;
}
/* Color and motion controls remain visible in every brightness mode. */
html[data-quran-theme] body :is(#quran-visit-colors,#quran-default-colors) .quran-background-reset{display:block;width:100%;min-height:42px;margin:10px 0 0;padding:8px;border:1px solid var(--qt-line)!important;border-radius:10px;background:var(--qt-card)!important;color:var(--qt-ink)!important;font:inherit;cursor:pointer}
html[data-quran-theme] body :is(#quran-visit-colors,#quran-default-colors) .quran-background-reset[aria-pressed="true"]{border-color:var(--qt-accent)!important;font-weight:700}
html[data-quran-theme] body :is(#quran-visit-colors,#quran-default-colors) .quran-background-hint{margin:8px 0 0!important;color:var(--qt-muted)!important;font-size:12px!important;line-height:1.7!important}
html[data-quran-theme] body .quran-pattern-options{margin-top:16px;padding-top:14px;border-top:1px solid var(--qt-line)!important}
html[data-quran-theme] body .quran-pattern-options h3{margin:0 0 10px;font-family:inherit;font-weight:600;font-size:14px;line-height:1.6;color:var(--qt-ink)!important}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-label{display:block;margin-bottom:8px;font-size:13px;font-weight:600;color:var(--qt-ink)!important}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-swatches{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-swatch{width:34px;height:34px;min-height:34px;padding:0;border:1px solid #0008!important;border-radius:50%;background:var(--quran-swatch)!important;box-shadow:0 0 8px var(--quran-swatch)!important;cursor:pointer}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-swatch[aria-pressed="true"]{outline:2px solid var(--qt-ink);outline-offset:3px}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-reset{display:block;width:100%;min-height:42px;margin:4px 0 12px;padding:8px;border:1px solid var(--qt-line)!important;border-radius:10px;background:var(--qt-card)!important;color:var(--qt-ink)!important;font:inherit;cursor:pointer}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-toggle{display:flex;align-items:center;gap:10px;margin:10px 0;color:var(--qt-ink)!important;font-size:13px;cursor:pointer}
html[data-quran-theme] body .quran-pattern-options input[type="checkbox"]{appearance:auto!important;width:21px!important;height:21px!important;min-height:21px!important;flex:0 0 21px;margin:0;accent-color:var(--qt-accent,#79d7b1)}
html[data-quran-theme] body .quran-pattern-options .quran-meteor-colors{display:flex;flex-wrap:wrap;gap:8px 14px;min-width:0;margin:10px 0!important;padding:10px!important;border:1px solid var(--qt-line)!important;border-radius:10px;background:transparent!important}
html[data-quran-theme] body .quran-pattern-options .quran-meteor-colors legend{padding:0 5px;font-size:13px;font-weight:600;color:var(--qt-ink)!important}
html[data-quran-theme] body .quran-pattern-options .quran-meteor-color-choice{display:inline-flex;align-items:center;gap:6px;color:var(--qt-ink)!important;font-size:13px;cursor:pointer}
html[data-quran-theme] body .quran-pattern-options .quran-meteor-color-choice input[type="radio"]{appearance:auto!important;width:18px!important;height:18px!important;min-height:18px!important;margin:0;accent-color:var(--qt-accent,#79d7b1)}
html[data-quran-theme] body .quran-pattern-options .quran-meteor-custom{flex-basis:100%;margin-top:4px}
html[data-quran-theme] body .quran-pattern-options .quran-meteor-custom[hidden]{display:none!important}
html[data-quran-theme] body .quran-pattern-options .quran-pattern-help{margin:8px 0 0!important;color:var(--qt-muted)!important;font-size:12px!important;line-height:1.7!important}
html[data-quran-theme] body .quran-pattern-options :is(input,button):focus-visible{outline:2px solid var(--qt-accent)!important;outline-offset:3px}
@media(prefers-reduced-motion:reduce){html body > #quran-pattern-meteors{display:none!important}}
@media print{html body > #quran-pattern-meteors{display:none!important}}

/* Do not select or drag the decorative homepage image on a double-click. */
html body .hero .kitab-allah-art{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
