/* Generated by src/build.js (rtlcss) from css/components/share-modals.css — LTR version, do not edit: edit css/components/share-modals.css and rebuild */
/* ==========================================================================
   share-modals.css — the three sharing dialogs (material QR, material share,
   guidance-card share). Shared by every page.
   Breakpoints follow the original JS values: 820px (two columns + preview)
   and 560px (roomier paddings / bigger chips).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Overlay + backdrop
   -------------------------------------------------------------------------- */
.shm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(26, 43, 69, 0.32);
  backdrop-filter: blur(8px);
}

/* Phones: the screen's height as it is now, between the browser's address
   bar and its bottom bar (100vh there is the height with both bars hidden,
   so a window sized on it runs under them, cut at the top and the bottom) */
@supports (height: 100dvh) {
  .shm-overlay {
    bottom: auto;
    height: 100dvh;
  }
}

.shm-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.shm-overlay [role="dialog"]:focus {
  outline: none;
}

/* Scrollbar on the right in an RTL page: the box runs LTR, its content RTL
   (same trick as the original ".sb-r"). */
.shm-ltr {
  direction: ltr;
}

.shm-ltr *:not([dir]) {
  direction: ltr;
}

.shm-ltr .shm-ltr:not([dir]) {
  direction: ltr;
}

/* --------------------------------------------------------------------------
   Shared pieces: title row, close button, labels
   -------------------------------------------------------------------------- */
.shm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.shm-head__title {
  margin: 0;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--color-navy-700);
}

.shm-x {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.shm-x--sm {
  width: 38px;
  height: 38px;
}

.shm-x svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: var(--color-navy-700);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}

.shm-x:hover {
  background: var(--color-ink-800);
  border-color: var(--color-ink-800);
  color: var(--color-white);
}

.shm-x:hover svg {
  stroke: var(--color-white);
}

.shm-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-ink-500);
}

.shm-label--center {
  text-align: center;
}

/* Copy ↔ check icon swaps (state class .is-copied on the button) */
.is-copied .shm-ico-copy,
:not(.is-copied) > .shm-ico-check {
  display: none;
}

/* --------------------------------------------------------------------------
   Two-column share dialogs (material + guidance card)
   -------------------------------------------------------------------------- */
.shm-dialog {
  --acc: var(--color-blue-500);
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%; /* the overlay's box: the visible screen less 16px all round; taller content scrolls inside */
  overflow: auto;
  background: var(--color-white);
  border-radius: 24px;
  border: 1px solid var(--color-mist-200);
  box-shadow: 0 40px 90px -30px rgba(26, 43, 69, 0.5);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* Their scrollbar (when a window is taller than the screen, as on phones): a
   thin rounded thumb kept off the window's edge and clear of its rounded
   corners — the track starts and ends one corner radius in. Chrome / Safari
   draw it from ::-webkit-scrollbar (they ignore it once scrollbar-width or
   scrollbar-color is set, so those are for Firefox only). The material QR
   window (.shm-qr) scrolls the same way. */
.shm-dialog::-webkit-scrollbar,
.shm-qr::-webkit-scrollbar {
  width: 12px;
}

.shm-dialog::-webkit-scrollbar-track,
.shm-qr::-webkit-scrollbar-track {
  background: transparent;
  margin: 26px 0;
}

.shm-qr::-webkit-scrollbar-track {
  margin: 34px 0;
}

.shm-dialog::-webkit-scrollbar-thumb,
.shm-qr::-webkit-scrollbar-thumb {
  background-color: var(--color-blue-200);
  background-clip: padding-box;
  border: 4px solid transparent;
  border-radius: 999px;
}

.shm-dialog::-webkit-scrollbar-thumb:hover,
.shm-qr::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-blue-500);
}

@supports not selector(::-webkit-scrollbar) {
  .shm-dialog,
  .shm-qr {
    scrollbar-width: thin;
    scrollbar-color: var(--color-blue-200) transparent;
  }
}

@media (min-width: 560px) {
  .shm-dialog::-webkit-scrollbar-track {
    margin: 34px 0;
  }
}

/* Touch screens (phones, tablets): the windows' own scrollbar hidden — a
   styled one there is a classic bar that takes its width from the window,
   pushing the content off centre (and the phone's own thin bar hugs the edge
   and runs past the rounded corners). share-modals.js draws a thin indicator
   over the window's right edge instead (.shm-sb), taking no room. */
@media (hover: none) and (pointer: coarse) {
  .shm-dialog,
  .shm-qr {
    scrollbar-width: none;
  }

  .shm-dialog::-webkit-scrollbar,
  .shm-qr::-webkit-scrollbar {
    display: none;
    width: 0;
  }
}

/* The indicator: a 4px rounded track (faint) and thumb (soft blue), 6px in
   from the window's right edge, clear of its corners (placed by the script);
   it fades in and out with the window and catches no touch */
.shm-sb {
  position: absolute;
  z-index: 2;
  width: 4px;
  border-radius: 999px;
  background: rgba(26, 43, 69, .08);
  pointer-events: none;
  animation: pop-fade .38s ease;
}

.shm-sb[hidden] {
  display: none;
}

.shm-sb__thumb {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: var(--color-blue-300);
}

.shm-overlay.is-closing .shm-sb {
  animation: pop-fade-out .2s ease-in forwards;
}

@media (prefers-reduced-motion: reduce) {
  .shm-sb {
    animation: none;
  }
}

.shm-share {
  width: 900px;
}

.shm-g {
  width: 940px;
  overflow-y: auto;
}

.shm-controls {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

@media (min-width: 560px) {
  .shm-dialog {
    border-radius: 32px;
  }

  .shm-controls {
    padding: 28px;
    gap: 22px;
  }

  .shm-controls .shm-head__title {
    font-size: 24px;
  }
}

@media (min-width: 820px) {
  .shm-dialog {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .shm-share {
    overflow: visible;
  }
}

/* --------------------------------------------------------------------------
   Language chips + "more languages" button
   -------------------------------------------------------------------------- */
.shm-langs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shm-chips--g {
  gap: 6px;
}

.shm-chip {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--color-mist-200);
  background: var(--color-white);
  color: var(--color-navy-700);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.shm-chip--g {
  flex: none;
  padding: 0 12px;
}

.shm-chip[aria-checked="true"] {
  border-color: var(--acc);
  background: var(--acc);
  color: var(--color-white);
}

.shm-more {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px dashed var(--color-blue-300);
  background: var(--color-sky-50);
  color: var(--acc);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.shm-more--g {
  flex: none;
  padding: 0 12px 0 8px;
  gap: 4px;
}

.shm-more svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shm-more[aria-expanded="true"] .shm-chev-down,
.shm-more[aria-expanded="false"] .shm-chev-up {
  display: none;
}

/* a language from the dropdown is the current one */
.shm-more.is-picked {
  border-style: solid;
  border-color: var(--acc);
  background: var(--acc);
  color: var(--color-white);
}

.shm-chip:not([aria-checked="true"]):hover,
.shm-more:not(.is-picked):hover {
  background: var(--color-blue-500);
  border-color: var(--color-blue-500);
  color: var(--color-white);
}

@media (min-width: 560px) {
  .shm-chip:not(.shm-chip--g),
  .shm-more:not(.shm-more--g) {
    font-size: 14px;
    height: 40px;
  }
}

.shm-more-wrap {
  position: relative;
  flex: none;
  display: inline-flex;
}

/* --------------------------------------------------------------------------
   "More languages" dropdown (search + list)
   -------------------------------------------------------------------------- */
.shm-drop {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(244px, 100%);
  box-sizing: border-box;
  padding: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-mist-200);
  border-radius: 18px;
  box-shadow: 0 24px 48px -24px rgba(26, 43, 69, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* guidance window: anchored to the "+N" button */
.shm-drop--g {
  inset-inline-end: auto;
  right: auto;
  left: 0;
  width: 244px;
}

@media (min-width: 820px) {
  .shm-drop--g {
    right: 0;
    left: auto;
  }
}

.shm-drop__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--color-mist-100);
  border: 1px solid var(--color-mist-200);
}

.shm-drop__search svg {
  display: inline-block;
  flex: none;
  fill: none;
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shm-drop__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-navy-700);
}

.shm-drop__list {
  max-height: 176px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-inline-end: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-blue-200) transparent;
}

.shm-drop__list::-webkit-scrollbar {
  width: 8px;
}

.shm-drop__list::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 0 8px;
}

.shm-drop__list::-webkit-scrollbar-thumb {
  background: var(--color-blue-200);
  border-radius: 999px;
  border: 2px solid var(--color-white);
}

.shm-drop__list::-webkit-scrollbar-thumb:hover {
  background: var(--color-blue-500);
}

.shm-opt {
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--color-navy-700);
  text-align: left;
  transition: background .2s ease, color .2s ease;
}

.shm-opt[aria-selected="true"] {
  background: var(--color-blue-50);
  color: var(--acc);
}

.shm-opt:hover {
  background: var(--color-mist-100);
  color: var(--color-blue-500);
}

.shm-opt__native {
  font-size: 13px;
  font-weight: 700;
}

.shm-opt__ar {
  font-size: 11px;
  color: var(--color-ink-500);
}

.shm-drop__empty {
  margin: 0;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--color-ink-500);
}

/* --------------------------------------------------------------------------
   QR box + social row (both share windows)
   -------------------------------------------------------------------------- */
.shm-qrbox {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--color-mist-200);
  border-radius: 18px;
  background: var(--color-sky-50);
}

.shm-qrbox__img {
  flex: none;
  display: block;
  padding: 6px;
  border-radius: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
}

.shm-qrbox__img img {
  width: 84px;
  height: 84px;
  display: block;
  image-rendering: pixelated;
}

.shm-qrbox__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.shm-qrbox__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-navy-700);
}

.shm-qrbox__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-ink-500);
}

.shm-qrbox__dl,
.shm-qrbox__dl:hover {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-blue-500);
  text-decoration: none;
}

.shm-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shm-social__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.shm-soc {
  width: 40px;
  height: 40px;
  flex: none;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--color-blue-50);
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, border-color .2s ease;
}

.shm-soc:hover {
  background: var(--acc, var(--hover-fill));
  border-color: var(--acc, var(--hover-fill));
}

.shm-soc svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
  fill: var(--color-blue-500);
  stroke: none;
}

/* outline icons: copy link / download card */
.shm-soc--link svg,
.shm-soc--dl svg {
  display: inline-block;
  fill: none;
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shm-soc--dl svg {
  stroke: var(--acc);
}

.shm-soc--link.is-copied svg {
  stroke: var(--color-success);
}

/* hover: filled with the window accent (brand blue, or the card colour), white icon */
.shm-soc:hover svg {
  fill: var(--color-white);
}

.shm-soc--link:hover svg,
.shm-soc--dl:hover svg {
  fill: none;
  stroke: var(--color-white);
}

/* --------------------------------------------------------------------------
   Material share: preview column (only in the two-column layout)
   -------------------------------------------------------------------------- */
.shm-share__preview {
  display: none;
  order: 2;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 31px 0 0 31px;
  background: linear-gradient(-180deg, var(--color-cream-200) 0%, var(--color-sky-50) 100%);
}

@media (min-width: 820px) {
  .shm-share__preview {
    display: flex;
  }
}

.shm-share__pattern {
  position: absolute;
  z-index: -1;
  bottom: -90px;
  right: -90px;
  width: 380px;
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 100%);
}

.shm-share__card {
  width: 100%;
  max-width: 296px;
  background: var(--color-white);
  border: 1px solid var(--color-mist-200);
  border-radius: 20px;
  overflow: hidden;
}

.shm-share__cover {
  height: 212px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-mist-100);
}

.shm-share__cover img {
  display: block;
  height: 172px;
  width: auto;
  border-radius: 6px 3px 3px 6px;
  box-shadow: 0 16px 30px -16px rgba(26, 43, 69, 0.55), 0 0 0 1px rgba(26, 43, 69, 0.06);
}

.shm-share__info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* the material's title and description: two lines at most, then "…" (as on its card) */
.shm-share__title {
  margin: 0;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-navy-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shm-share__author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-ink-500);
}

.shm-share__author svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: var(--color-ink-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shm-share__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-ink-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Material QR dialog
   -------------------------------------------------------------------------- */
.shm-qr {
  position: relative;
  z-index: 1;
  width: 420px;
  max-width: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto; /* on a short screen (a small phone, the browser's bars shown) the rest scrolls */
  background: linear-gradient(-180deg, var(--color-cream-200) 0%, var(--color-sky-50) 100%);
  border-radius: 32px;
  border: 1px solid var(--color-mist-200);
  box-shadow: 0 40px 90px -30px rgba(26, 43, 69, 0.5);
}

.shm-qr__head {
  position: relative;
  isolation: isolate;
  padding: 22px 24px 16px;
}

.shm-qr__body {
  padding: 0 20px 20px;
}

.shm-qr__card {
  border-radius: 24px;
  border: 1px solid var(--color-line-neutral);
  background: var(--color-white);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shm-qr__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-mist-200);
}

.shm-qr__cover {
  flex: none;
  display: flex;
}

.shm-qr__cover img {
  display: block;
  height: 56px;
  width: auto;
  border-radius: 4px 2px 2px 4px;
  box-shadow: 0 8px 16px -10px rgba(26, 43, 69, 0.55), 0 0 0 1px rgba(26, 43, 69, 0.06);
}

.shm-qr__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shm-qr__title {
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-navy-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shm-qr__author {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-ink-500);
}

.shm-qr__code {
  align-self: center;
  width: 168px;
  height: 168px;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shm-qr__code img {
  width: 144px;
  height: 144px;
  display: block;
  image-rendering: pixelated;
}

.shm-qr__url {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 4px;
  background: var(--color-white);
}

.shm-qr__link {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--color-ink-700);
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  unicode-bidi: isolate;
}

.shm-qr__copy {
  flex: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-blue-500);
  border: 2px solid var(--color-blue-500);
  box-sizing: border-box;
  border-radius: 999px;
  height: 40px;
  padding: 0 18px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.shm-qr__copy svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: var(--color-white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}

.shm-qr__copy.is-copied {
  background: var(--color-success);
  border-color: var(--color-success);
}

.shm-qr__copy:hover {
  background: var(--hover-cream);
  color: var(--hover-cream-ink);
  border-color: var(--hover-cream-border);
}

.shm-qr__copy:hover svg {
  stroke: var(--hover-cream-ink);
}

.shm-qr__dl,
.shm-qr__dl:hover {
  align-self: center;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 40px;
  box-sizing: border-box;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--color-mist-200);
  background: var(--color-white);
  color: var(--color-navy-700);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.shm-qr__dl svg {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}

.shm-qr__dl:hover {
  background: var(--color-blue-500);
  border-color: var(--color-blue-500);
  color: var(--color-white);
}

.shm-qr__dl:hover svg {
  stroke: var(--color-white);
}

.shm-qr__dl:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 117, 150, .25);
}

/* --------------------------------------------------------------------------
   Guidance-card share: per-tab accent colours
   -------------------------------------------------------------------------- */
.shm-g[data-tab="verses"] {
  --acc: var(--color-theme-verses);
  --acc-ring: rgba(46, 108, 168, .28);
  --shm-tint: var(--color-theme-verses);
  --shm-wash: var(--color-theme-verses-deep);
}

.shm-g[data-tab="hadith"] {
  --acc: var(--color-theme-hadith-acc);
  --acc-ring: rgba(31, 122, 77, .28);
  --shm-tint: var(--color-theme-hadith);
  --shm-wash: var(--color-theme-hadith-deep);
}

.shm-g[data-tab="benefits"] {
  --acc: var(--color-gold-900);
  --acc-ring: rgba(140, 97, 16, .28);
  --shm-tint: var(--color-theme-benefits);
  --shm-wash: var(--color-theme-benefits-deep);
}

.shm-g[data-tab="names"] {
  --acc: var(--color-theme-names-acc);
  --acc-ring: rgba(107, 63, 168, .28);
  --shm-tint: var(--color-theme-names);
  --shm-wash: var(--color-theme-names-deep);
}

/* --------------------------------------------------------------------------
   Guidance-card share: preview column (card as it will be shared)
   -------------------------------------------------------------------------- */
.shm-g__preview {
  order: 0;
  position: relative;
  isolation: isolate;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(-180deg, var(--color-cream-200) 0%, var(--color-sky-50) 100%);
  border-radius: 24px 24px 0 0;
}

@media (min-width: 820px) {
  .shm-g__preview {
    order: 2;
    border-radius: 31px 0 0 31px;
  }
}

.shm-gcard {
  position: relative;
  isolation: isolate;
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
  padding: 26px 22px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  box-shadow: 0 24px 50px -28px rgba(26, 43, 69, 0.6);
}

/* long text (+ explanation) → portrait card */
.shm-gcard.is-portrait {
  aspect-ratio: 4 / 5;
}

.shm-gcard__art {
  position: absolute;
  z-index: -2;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  clip-path: inset(0 round 18px);
}

.shm-gcard__img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shm-art-pos, 50% 50%);
}

.shm-gcard__tint {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--shm-tint);
  mix-blend-mode: color;
  opacity: 0.8;
}

.shm-gcard__wash {
  position: absolute;
  inset: 0;
  background: var(--shm-wash);
  opacity: 0.72;
}

.shm-gcard__veil {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 18px;
  background:
    radial-gradient(75% 65%, rgba(10, 15, 25, 0.48) 0%, rgba(10, 15, 25, 0.18) 70%, rgba(10, 15, 25, 0) 100%),
    linear-gradient(rgba(10, 15, 25, 0.32), rgba(10, 15, 25, 0.32));
}

.shm-gcard__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* Main text: Amiri bold by default, Lotus for verses, Almarai for big names */
.shm-gcard__text {
  font-family: 'Amiri', 'Thmanyah Serif Text', serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.85;
  color: var(--color-white);
  text-shadow: 0 1px 14px rgba(10, 20, 35, 0.5);
}

.shm-g[data-tab="verses"] .shm-gcard__text {
  font-family: 'Lotus', 'Amiri', serif;
  font-weight: 400;
}

.shm-g .shm-gcard.is-big .shm-gcard__text {
  font-family: 'Almarai', 'Cairo', sans-serif;
}

.shm-gcard[data-size="52"] .shm-gcard__text { font-size: 52px; }
.shm-gcard[data-size="22"] .shm-gcard__text { font-size: 22px; }
.shm-gcard[data-size="19"] .shm-gcard__text { font-size: 19px; }
.shm-gcard[data-size="16"] .shm-gcard__text { font-size: 16px; }

.shm-gcard__ref {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold-200);
}

/* translation placeholder (any language other than Arabic) */
.shm-gcard__tr {
  margin: 0;
  max-width: 94%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.75;
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* explanation: collapses with a grid-rows animation */
.shm-gcard__exp {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .45s ease, opacity .35s ease;
  width: 100%;
}

.shm-gcard.has-exp-on .shm-gcard__exp {
  grid-template-rows: 1fr;
  opacity: 1;
}

.shm-gcard__exp-in {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.shm-gcard__orn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.shm-gcard__orn-line {
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.shm-gcard__orn svg {
  fill: var(--color-gold-200);
}

.shm-gcard__exp-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.92);
}

.shm-gcard.is-long-exp .shm-gcard__exp-text {
  font-size: 12.5px;
}

.shm-gcard__foot {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.shm-gcard__logo {
  height: 34px;
  width: auto;
  display: block;
}

.shm-gcard__qr {
  display: block;
  padding: 4px;
  border-radius: 8px;
  background: var(--color-white);
}

.shm-gcard__qr img {
  width: 42px;
  height: 42px;
  display: block;
  image-rendering: pixelated;
}

/* --------------------------------------------------------------------------
   Guidance-card share: "add explanation" switch
   -------------------------------------------------------------------------- */
.shm-switch {
  font-family: inherit;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.shm-switch__label {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-navy-700);
}

.shm-switch__track {
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-slate-200);
  position: relative;
  transition: background .25s ease;
}

.shm-switch__knob {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: inset-inline-start .25s ease;
}

.shm-switch[aria-checked="true"] .shm-switch__track {
  background: var(--acc);
}

.shm-switch[aria-checked="true"] .shm-switch__knob {
  inset-inline-start: 23px;
}

/* --------------------------------------------------------------------------
   Opening motion (keyframes in css/base.css)
   -------------------------------------------------------------------------- */
.shm-backdrop {
  animation: pop-fade .25s ease;
}

.shm-qr,
.shm-dialog {
  animation: pop-in .38s cubic-bezier(.22, .61, .36, 1);
}

.shm-drop {
  animation: pop-drop .22s cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .shm-backdrop,
  .shm-qr,
  .shm-dialog,
  .shm-drop {
    animation: none;
  }
}

/* Closing motion (.is-closing is set by GP.hide — js/core/dom.js) */
.shm-overlay.is-closing .shm-backdrop {
  animation: pop-fade-out .2s ease-in forwards;
}

.shm-overlay.is-closing .shm-qr,
.shm-overlay.is-closing .shm-dialog {
  animation: pop-out .22s cubic-bezier(.4, 0, 1, 1) forwards;
}

.shm-drop.is-closing {
  animation: pop-lift .18s cubic-bezier(.4, 0, 1, 1) forwards;
}
