/* Schriftarten einbinden */
@font-face {
    font-family: "KuranFont";
    src: url("../fonts/shaik.ttf") format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "comic";
    src: url("../fonts/comic-sans.ttf") format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "amiri";
    src: url("../fonts/Amiri.ttf") format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "AmiriQuran";
    src: url("../fonts/ScheherazadeNew-Regular.ttf") format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "ScheherazadeNew";
    src: url("../fonts/ScheherazadeNew-Regular.ttf") format('truetype');
    font-display: swap;
}
@font-face {
    font-family: "Hafs";
    src: url("../fonts/hafs.woff2") format('woff2');
    font-display: swap;
}

/* ========== CSS-Variablen für dein Farbschema ========== */
:root {
  --bs-primary:   #0d6efd;
  --bs-secondary: #6c757d;
  --bs-dark:      #212529;
  --bs-light:     #f8f9fa;
  --bs-accent:    #d9534f;
  --page: #fdf7e4;
}

/* ========== Globales Reset & Basis ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ========== Utility-Klassen ========== */
.mat-0  { margin-top:    0.23rem; }
.mt-1  { margin-top:    0.25rem; }
.mt-2  { margin-top:    0.5rem;  }
.mt-3  { margin-top:    1rem;    }
.mt-4  { margin-top:    1.5rem;  }
.mab-0  { margin-bottom: 0.22rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem;  }
.mb-3  { margin-bottom: 1rem;    }
.mb-4  { margin-bottom: 1.5rem;  }


/* Padding – alle Richtungen */

/* Padding rundum */
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem  !important; }
.p-3 { padding: 1rem    !important; }
.p-4 { padding: 1.5rem  !important; }

/* Padding vertikal (top & bottom) */
.py-1 { padding-top:    0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top:    0.5rem  !important; padding-bottom: 0.5rem  !important; }
.py-3 { padding-top:    1rem    !important; padding-bottom: 1rem    !important; }
.py-4 { padding-top:    1.5rem  !important; padding-bottom: 1.5rem  !important; }

/* Padding horizontal (left & right) */
.px-1 { padding-left:   0.25rem !important; padding-right:  0.25rem !important; }
.px-2 { padding-left:   0.5rem  !important; padding-right:  0.5rem  !important; }
.px-2-5 { padding-left:   0.85rem  !important; padding-right:  0.85rem  !important; }
.px-3 { padding-left:   1rem    !important; padding-right:  1rem    !important; }
.px-4 { padding-left:   1.5rem  !important; padding-right:  1.5rem  !important; }

/* Padding oben */
.pt-1 { padding-top:    0.25rem !important; }
.pt-2 { padding-top:    0.5rem  !important; }
.pt-3 { padding-top:    1rem    !important; }
.pt-4 { padding-top:    1.5rem  !important; }

/* Padding unten */
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem  !important; }
.pb-3 { padding-bottom: 1rem    !important; }
.pb-4 { padding-bottom: 1.5rem  !important; }


/* Body-Hintergrund */
body {
    background: rgba(10, 10, 10, 0.99);
    background-image: url("../images/hatsanat2.webp");
    background-repeat: repeat;
    font-family: 'Inter', sans-serif;
    /* position: relative; */
}

/* body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("../images/kaaba-door.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
} */

.header-container {
          position: relative;
          padding-top: 1rem;
          text-align: center;
          padding-left: 0;
          opacity: 0;
          transition: opacity 0.5s ease-out;
          transition-delay: 0.2s;
          width: 100%;
          align-self: stretch;
          box-sizing: border-box;
          padding-left: 2rem;
        }
body.content-ready .header-container {
          opacity: 1;
        }
.header-content-row {
  position: relative;
  display: inline-block;
}
.language-switch {
  position: absolute;
  top: 50%;
  left: -12px;
  transform: translate(-100%, -50%);
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  padding: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  overflow: hidden;
}
.language-switch select {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
}
.language-switch::before {
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255,255,255,0.3);
}
.language-switch.flag-tr::before {
  background-image: url('../images/icons8-turkey-48.webp');
}
.language-switch.flag-de::before {
  background-image: url('../images/icons8-germany-48.webp');
}
.language-switch.flag-en::before {
  background-image: url('../images/icons8-great-britain-48.webp');
}
.language-switch.flag-fr::before {
  background-image: url('../images/icons8-frankreich-rundschreiben-48.webp');
}
.language-switch.flag-es::before {
  background-image: url('../images/icons8-spain-48.webp');
}
.language-switch.flag-it::before {
  background-image: url('../images/icons8-italien-rundschreiben-48.webp');
}
.language-switch.flag-pt::before {
  background-image: url('../images/icons8-portugal-rundschreiben-48.webp');
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
        .custom-title {
          margin: 0;
          font-family: 'amiri', serif;
          font-size: clamp(1.8rem, 4vw, 3.8rem);
          color: #dca56c;
          letter-spacing: clamp(0.06em, 0.8vw, 0.16em);
          text-transform: uppercase;
          white-space: nowrap;
          line-height: 1.1;
        }

/* Kleine Bildschirme: Titel zentriert mit symmetrischem Padding (nur Unterseiten mit Back-Button) */
@media (max-width: 480px) {
  .back-arrow ~ .custom-title {
    padding-left: 3.5rem;
    padding-right: 3.5rem;
    white-space: break-spaces;
  }
}

/* Fixed back-arrow auf Unterseiten – eingeklappt am Seitenrand */
.back-arrow {
  position: fixed !important;
  top: 1rem !important;
  left: 0 !important;
  transform: none !important;
  z-index: 1000;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  opacity: 0.55;
  transition: left 0.3s ease, opacity 0.3s ease, border-radius 0.3s ease;
}
.back-arrow .back-label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.3s ease;
}
/* Eingeklappt + über bgnew */
.back-arrow.faded {
  opacity: 0.25;
}
/* Aufgeklappt */
.back-arrow.open {
  left: 0.75rem !important;
  opacity: 1;
  border-top-left-radius: 1.25rem !important;
  border-bottom-left-radius: 1.25rem !important;
}
.back-arrow.open .back-label {
  max-width: 5rem;
}
/* Aufgeklappt + über bgnew → voll sichtbar */
.back-arrow.open.faded {
  opacity: 1;
}

/* Header-Schriftart und Effekte */
header {
    font-family: "comic", sans-serif;
    color: #d9534f;
    text-shadow: 0 0 1em #d9534f, 0 0 5em white, 0 0 10em white;
}

header.p-1 {
  width: 100% !important;
  text-align: center !important;
}

/* Horizontale Linie mit weniger Abstand */
hr {
    margin-top: 0.7rem;
    margin-bottom: 0.7rem;
}

/* ========== Sticky Footer & Grund-Layout ========== */
/* HTML und Body auf volle Höhe setzen */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  margin: 0;
  padding: 0;
}
/* Body als Flex-Container, damit Footer unten bleibt */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Hauptbereich (alles zwischen Header und Footer) soll flexibel wachsen */
main {
  flex: 1 0 auto; /* Nimmt verbleibenden Platz ein */
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Footer nicht fixieren, sondern ans Ende des Flex-Containers schieben */
footer.bottom-nav,
footer {
    flex-shrink: 0;
    background: whitesmoke;
    display: flex;
    justify-content: space-around;
    border-radius: 10px 10px 0 0;
    align-items: center;
    width: 100%;
    margin: 1.5rem auto 0;
}

/* active-Mode Highlight */
.active-mode {
  border: 3px solid var(--bs-accent) !important;
  color: var(--bs-dark)      !important;  /* dunkler Text */

}

.line{
  height: 0.2rem;
  border-radius: 999px;
  background: #c19b4acc;
  opacity: 0.8;
  margin: 1.5rem auto 1rem;
  width: 100%;
}

/* Auto-Scroll Status Indicator */
#autoScrollStatus {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #d9534f;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0.3;
    z-index: 999;
}
#autoScrollStatus.is-running {
    display: flex;
}

/* Auto-Scroll Control Row (für Seiten ohne Bottom-Sheet) */
.as-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 2px;
    border-top: 1px solid rgba(128,128,128,0.15);
    margin-top: 4px;
    clear: both;
}
.as-ctrl-label {
    font-size: 12px;
    opacity: 0.55;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Auto-Scroll Speed Stepper */
.as-stepper {
    display: none;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}
.as-stepper.is-visible {
    display: flex;
}
.as-step-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    width: 26px;
    height: 26px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}
.as-step-btn:active {
    background: rgba(26,188,156,0.4);
}
.as-step-val {
    font-size: 13px;
    font-weight: 600;
    color: #1abc9c;
    min-width: 30px;
    text-align: center;
}

#scrollToTopBtn {
    position: fixed;
    bottom: 40px;
    right: 20px;
    background-color: #d9534f;
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    display: none; /* Start hidden */
    transition: opacity 0.4s ease;
    transition: bottom 0.6s ease-in-out;
    opacity: 0.3;
    z-index: 999;
}
#scrollToTopBtn:hover {
    background-color: #c0392b;
}

/* Auf größeren Bildschirmen: Elemente an bgnew-Container ausrichten */
@media (min-width: 880px) {
  .header-container {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
  }
  .back-arrow {
    left: calc(50% - 410px) !important;
    border-radius: 1.25rem !important;
  }
  .back-arrow.open {
    left: calc(50% - 410px + 0.75rem) !important;
  }
  #scrollToTopBtn {
    right: calc(50% - 390px);
  }
  #autoScrollStatus {
    left: calc(50% - 390px);
  }
}

/* Touch-Geräte: Zurück-Pfeil ausblenden (Swipe-Navigation vorhanden) */
@media (hover: none) and (pointer: coarse) {
  .back-arrow {
    display: none !important;
  }
}

/* Hauptanzeigebereich */
.bgnew {
  position: relative;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  background: var(--page);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  margin-top: -2rem;
  hyphens: auto;
    -webkit-hyphens: auto;
}


/* Bismillah-Block */
.bismillah {
    padding-bottom: 5px;
}

/* Navigationsleiste */
.navbar {
    text-align: center;
    display: flex;
    justify-content: center;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
}

/* Flex-Utility */
.flex,
.nav-item {
    display: inline-flex;
}
.img-fluid{
    width: 100%;
    max-width: 1200px;
    min-width: 290px;
    height: auto;
    padding:1% 4%;
  }
.line{margin-top:2rem;}

/* Button-Styling */
.btn-outline-success {
    color: #d9534f;
    border-color: #d9534f;
    background-color: transparent;
    transition: all 0.2s ease;
}

.btn-outline-success:hover,
.btn-outline-success:active,
.btn-outline-success:focus,
.btn-outline-success.active {
    color: white;
    background-color: #d9534f;
    border-color: #d9534f;
    outline: none;
}


/* Koran-Textblöcke */
.left {
    font-size: 2rem;
    line-height: 2.5rem;
    padding-bottom: 0.5rem;
    text-align: left;
}

.right {
  font-size: 3.2rem;
  font-family: "KuranFont", "AmiriQuran", "ScheherazadeNew";
  line-height: 6rem;
  letter-spacing: 0.03em;
  word-spacing: -3px;
  direction: rtl;
  text-align: right;
  letter-spacing: -0.0em;
}
body:not(.no-justify) .right {
  text-align: justify;
  text-justify: inter-word;
}
.translation{
font-size:2rem;
line-height:3rem;
direction: ltr;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
text-align: left;
word-spacing: normal;
}


/* Toolbar mit Pfeilen und Schnell-Aktionen */
.nav-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    float: none !important; /* override Bootstrap col-md float so the bar can stay centered */
}

.is-touch .nav-toolbar {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.6rem;
}

.is-touch .nav-toolbar .arrow {
    display: none;
}

@media (pointer: coarse) {
  .nav-toolbar {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.6rem;
  }
  .nav-toolbar .arrow {
    display: none;
  }
  .zoom-slider-inline {
    display: none !important;
  }
  #cookset {
    margin-left: 0;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .nav-toolbar {
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-left: auto;
    margin-right: auto;
  }
  .nav-toolbar .arrow {
    order: 1;
    width: 100%;
    justify-content: center;
  }
  .zoom-slider-inline {
    order: 2;
    width: 100%;
    justify-content: center;
  }
  #cookset {
    order: 3;
    margin-left: 0;
    justify-content: center;
  }
}

/* Navigationsleiste */
.arrow {
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.zoom-slider-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.01);
    box-shadow: 0 2px 6px rgba(0,0,0,0.01);
    color: #222;
    flex: 0 1 auto;
}

.zoom-slider-inline input[type="range"] {
    flex: 1 1 60px;
    min-width: 40px;
    max-width: 70px;
    accent-color: #d9534f;
    cursor: pointer;
    width: 70px;
}

.zoom-icon-btn {
    border: none;
    background: #fff;
    color: #d9534f;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.zoom-icon-btn:focus-visible {
    outline: 2px solid #d9534f;
    outline-offset: 2px;
}

.zoom-icon-btn:hover {
    transform: translateY(-1px);
}

.zoom-icon-btn:active {
    transform: translateY(0);
}

.is-touch #zoomSliderWrapper {
    display: none !important;
}

@media (hover: none) and (pointer: coarse) {
  #zoomSliderWrapper {
    display: none !important;
  }
}

/* 1) Mach aus Deinem #navAyet / #navSayfa Span einen Flex-Container */
#navAyet, #navSayfa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem; /* Abstand zwischen Icon, Text und Icon */
}

@media (max-width: 640px) {
  .nav-toolbar {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.6rem;
  }
  .nav-toolbar .arrow {
    display: none !important;
  }
  .zoom-slider-inline {
    width: 100%;
    justify-content: center;
  }
  #cookset {
    margin-left: 0;
    justify-content: center;
  }
}

/* 2) Einheitliche Schrift-/Icon-Größen und Line-Height */
#navAyet .left_arrow,
#navSayfa .left_arrow_1,
#navAyet .right_arrow,
#navSayfa .right_arrow_1 {

  line-height: 1;
}

/* 3) Text ebenfalls mittig */
#navAyet span.left_arrow,
#navSayfa span.left_arrow_1 {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

.left_arrow,
.right_arrow,
.left_arrow_1,
.right_arrow_1,
#toggleSearchIcon{
    color: whitesmoke;
    font-size: 1.4rem;
    padding: 0 2px;
    cursor: pointer;
}

/* Hinweisbox "Gespeichert" */
#saved {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 12000;
  pointer-events: none;
  width: min(90vw, 360px);
}

#saved .saved-content {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(12, 29, 43, 0.92), rgba(36, 73, 102, 0.95));
  box-shadow: 0 25px 60px rgba(7, 13, 19, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f9f5ea;
  backdrop-filter: blur(6px);
}

#saved .saved-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #f5c56a;
  flex-shrink: 0;
}

#saved .saved-text {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
}

/* 1) Basis-Style versteckt */
#cookset input#searchInput.form-control {
  display: none !important;        /* ausgeblendet per Default */
  width: clamp(60px, 10vw, 160px) !important;
  min-width: 60px;
  max-width: 100%;/* gleiche Breite wie Cüz-Input */
  padding: 0.15rem !important;
  text-align: center !important;
  border-radius: 4px !important;
  opacity: 0;
  transition: opacity 0.2s ease !important;
}

/* 2) Sobald .visible dazukommt, einblenden */
#cookset input#searchInput.form-control.visible {
  display: inline-block !important;
  opacity: 1 !important;
}

.search-results {
  position: fixed;
  top: 110px;
  right: 1rem;
  width: min(420px, calc(100% - 2rem));
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(13, 20, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  padding: 0.75rem 0.75rem 0.5rem;
  display: none;
  z-index: 2500;
  color: #f5f5f5;
}

.search-results.visible {
  display: block;
}

.search-results__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.search-results__count {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
}

.search-results__close {
  border: none;
  background: transparent;
  color: #f5f5f5;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}

.search-result-item {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.search-result-item:hover,
.search-result-item:focus-within {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.search-result-item__meta {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.search-result-item__text {
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  color: #fdfdfd;
}

.search-result-item__lang {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}

.search-results__empty {
  font-size: 0.9rem;
  opacity: 0.85;
  padding: 0.25rem 0;
}

@media (max-width: 768px) {
  .search-results {
    top: 160px;
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translate(-50%, -60%); }
  10%  { opacity: 1; transform: translate(-50%, -50%); }
  90%  { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}

/* Steuer-Icons oben rechts */
#osx,
#addBookmark,
#toggleThemeIcon,
#toggleOrnaIcon,
#toggleSetupIcon,
#toggleBookmarksIcon {
  color: whitesmoke;
  font-size: 1.6rem;
  padding-left: 0.2rem;
  cursor: pointer;
}

/* Container für Bookmark-Symbole */
#cookset {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;         /* Abstand zwischen den Elementen */
    margin-left: auto;
}

.is-touch #cookset {
  margin-left: 0;
  justify-content: center;
}

/* override Bootstrap .form-control so dein Cüz-Input nicht 100% breit wird */
#cookset .form-control {
  display: inline-block !important;
  width: auto !important;
  min-width: 20px;
  max-width: 30px;
  padding: 0.05rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom:0.5rem;
}



@media (max-width: 900px) {
  #cookset {
    flex-wrap: wrap;
    justify-content: center;
  }
  #zoomSliderWrapper {
    order: 99;
    justify-content: center;
    margin-top: 0.4rem;
  }
}




/* Schließen-Symbol */
#closeBookmarks:hover {
  color: whitesmoke;
}

#closeBookmarks {
  color: whitesmoke;
  position: relative;            /* für absolutes Positionieren des Buttons */
    display: flex;
    align-items: center;           /* vertikal zentrieren */
    justify-content: right;       /* Inhalt (Text) horizontal zentrieren */
    padding: 0.4rem 1rem;          /* Höhe verkleinern */
    max-width: 300px;              /* bei Bedarf Breite einschränken */
    margin: 0.3rem auto;
}

/* 1) Den Bookmark-Eintrag als Flex-Container mittig ausrichten */
#bookmarkList .list-group-item {
  position: relative;            /* für absolutes Positionieren des Buttons */
  display: flex;
  align-items: center;           /* vertikal zentrieren */
  justify-content: center;       /* Inhalt (Text) horizontal zentrieren */
  padding: 0.5rem 1rem;          /* Höhe verkleinern */
  max-width: 300px;              /* bei Bedarf Breite einschränken */
  margin: 0.3rem auto;           /* Abstand und zentrieren im Parent */
}


/* Justified Text */
#just {
  text-align: justify;
}


/* Innenabstände */
.p-0-5 {
  padding: 0 0 1.5rem;
}
.p-0-6 {
  padding-bottom: 2rem;
}

.nrbg3 {
  display: inline;
  vertical-align: middle;
  padding: 0.7rem;
  background-image: url(../images/vahid_1.webp);
  background-repeat: no-repeat;
  background-position: center;
  font-family: 'amiri', serif;

  /* Icon-Box etwas größer machen */
  width: clamp(2.5em, 6vw, 4.5em);
  height: clamp(2.5em, 6vw, 4.5em);

  /* Zahlproportion zur Box */
  font-size: clamp(0.5rem, 3vw, 2.5rem);
  line-height: 1;
  background-size: 85% auto;  /* Icon skaliert auf 80% der Box-Breite */
  margin: 0 0.3rem;
  color: white;
  align-items: center;
  justify-content: center;
}

.inline-symbol {
  width: 1em;
  height: auto;
  vertical-align: middle;
}

/* Trennerlinie */


/* Aktiver Zustand für Bootstrap Buttons */
.btn-outline-success.active,
.btn-outline-success.active:focus,
.btn-outline-success.active:hover,
.btn-outline-success.focus:active,
.btn-outline-success:active:focus,
.btn-outline-success:active:hover,
.open > .btn-outline-success.dropdown-toggle.focus,
.open > .btn-outline-success.dropdown-toggle:focus,
.open > .btn-outline-success.dropdown-toggle:hover {
  color: white;
  background-color: #d9534f;
  border-color: #d9534f;
  outline-color: transparent;
}


/* Visuell abgerundete Box mit Leuchteffekt */
.rounded {
  padding: 1.3rem;
  box-shadow: 0 0 1em white, 0 0 1em white, 0 0 1em white;
}

/* Arabischer Text rechtsbündig & Blocksatz */
.arabic-text {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
}

/* Surenname */
.surename {
  font-family: 'KuranFont', serif;
  font-size: 2.5rem;
  color: #d9534f;
  text-align: center;
  line-height: 2rem;
}

/* Bismillah-Text */
.bismillah {
  font-family: 'KuranFont', serif;
  font-size: 2rem;
  text-align: center;
}

.bismillah .right {
  font-feature-settings: "calt" 1, "liga" 1, "curs" 1;
  font-variant-ligatures: common-ligatures contextual;
}

/* Firefox: Tatweel-Lücken in der Bismillah schließen */
@supports (-moz-appearance: none) {
  .bismillah .right {
    letter-spacing: -0.0em;
  }
}

/* Seitenzähler */
.sayfa {
  font-weight: bold;
}

/* Hervorhebungen im Text */
.red-word{color: #d9534f;}
/*.red-top-mark{top: -0.10em;}*/
/*.red-top-mark { transform: translateY(0.25em); }*/
/*.red-top-meddeh { column-span: all; top: -0.3em; color: #d9534f !important;}*/
/*.red-bottom-mark { transform: translateY(0em); }*/


#cuez::placeholder {
  color: #000;
  opacity: 0.7;
}



/* Shake-Effekt bei falschem Swipe */
@keyframes softShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-1px); }
  40% { transform: translateX(1px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: softShake 0.1s ease;
}

/* Lesezeichenbereich */
#bookmarkList {
  transform-origin: top center;
  margin-bottom: 1rem;
}

/* Inhalt-Sektion mit Transition für Swipe */
.bgnew {
    transition: transform 0.3s ease, opacity 0.2s ease;
    overflow-y: auto;     /* sorgt dafür, dass gescrollt wird */
    touch-action: pan-y;   /* erlaubt vertikales Panning, sperrt horizontales & Pinch */
    padding-top: 2rem;
  padding-bottom: 2rem;
}

#cuzInput.form-control {
  width: clamp(30px, 15vw, 65px) !important;
  max-width: 65px;
  text-align:center;
  padding:0.2rem;
}

/* Vertikale Cüz-Anzeige */
#vertical-cuez {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #c19b4a;
  border-radius: 9px;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  direction: ltr;
}

#vertical-sure {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #c19b4a;
  border-radius: 9px;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  direction: ltr;
}

body.no-mushaf #vertical-cuez,
body.no-mushaf #vertical-sure {
  background: rgba(217, 83, 79, 0.8);
  border: none;
  color: #fff;
}

/* Vereinfachtes Arabisch → Amiri Quran Font */
body.simple-arabic .right,
body.simple-arabic .bismillah,
body.simple-arabic .surename {
  font-family: 'Hafs', serif !important;
}

body.no-arabic .bgnew .right,
body.no-arabic .bgnew .bismillah {
  display: none !important;
}

body.no-arabic .bgnew > .nrbg3 {
  display: none !important;
}

body.no-arabic .translation .nrbg3 {
  display: inline-flex !important;
  width: clamp(1.8rem, 5vw, 2.8rem) !important;
  height: clamp(1.8rem, 5vw, 2.8rem) !important;
  font-size: clamp(0.6rem, 2.2vw, 1.05rem) !important;
  padding: 0.15rem !important;
}


.surah-title {
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;

  /* KEIN extra linkes/rechtes padding –
     sondern nur oben/unten für Abstand */
  padding: 1.5em 0;
  margin: 0.5em 0;

  border: 2px solid #d9534f;
  border-radius: 8px;
  background: rgba(255,255,255,0.8);

  font-size: 1.25rem;
  color: #d9534f;
  font-family: 'KuranFont', serif;

  /* Die beiden Halbbilder als Hintergründe: */
  background-image:
    url('../images/orna1_links.webp'),
    url('../images/orna1_rechts.webp');
  background-repeat: no-repeat, no-repeat;
  background-position:
    left center,
    right center;
  background-size:
    auto 100%,   /* volle Höhe, Breite automatisch */
    auto 100%;
}

@media (max-width: 600px) {
  #vertical-cuez {
    font-size: 0.9rem;
    padding: 3px 3px;
  }
  #vertical-sure {
      font-size: 0.9rem;
      padding: 3px 3px;
    }
}

.nav-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}


/* ========== Responsive Meta-Overrides ========== */
/* Wenn du im <head> noch shrink-to-fit hattest, sorgt Bootstrap 5+ für proper scaling.
   Hier nur ergänzend, falls nötig: */
@media (max-width: 768px) {
  /* Beispiel: Hero-Header-Padding o.ä. */
  header {
    padding-top: 1rem;
  }
}

@media (orientation: landscape) {
  #controls {
    gap: 1rem;               /* mehr Abstand in Quer */
  }
  #controls .form-select,
  #controls .form-control {
    min-width: 140px;        /* etwas breiter */
  }
  footer .nav-icon {
    width: 36px;             /* evtl. Icons etwas kleiner */
    height: auto;
  }

   .nrbg3 {
        /* hier z.B. max‐Font‐Size auf 1.2rem begrenzen */
         font-size: clamp(0.4rem, 2.0vw, 1rem);
   }
   .surename {
       font-size: 3rem;
     }

}

@media (orientation: landscape) and (max-height: 500px) {
   .surah-title {
       padding: 0.4em 0 !important;
       margin: 0.2em 0 !important;
   }
   .page-header-row {
       margin-bottom: -20px !important;
   }
}


/* 1) Definiere die Puls-Animation */
@keyframes pulse-glow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217,83,79, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 10px 6px rgba(217,83,79, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217,83,79, 0.0);
  }
}

/* 2) Wende sie auf dein Icon an */
.highlight-icon {
  display: inline-block;           /* falls es ein <img> ist */
  animation: pulse-glow 2s ease-in-out infinite;
  border-radius: 50%;              /* rund, falls gewünscht */
  cursor: pointer;                 /* optional */
}

/* Optional: Hover-State noch stärker betonen */
.highlight-icon:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px 8px rgba(217,83,79, 0.6);
}

/* Wenn es ein <img> ist, stell's so sicher in der Zeile dar */
.highlight-icon img {
  width: 2.5em;
  height: auto;
  vertical-align: middle;
}

.cuez,
  .sayfa
  {
      font-family: 'KuranFont', serif;
      font-size: 1.3rem;
      margin-bottom: -2rem;
    }

 /* Wrapper für alle Controls */
 #controls {
   display: flex;
   justify-content: center;
   gap: 0.5rem;
   flex-wrap: nowrap;               /* kein Umbruch */
   padding: 0rem 0;
   max-width: 100%;
   margin: 0 auto;
   overflow-x: auto;                /* Falls sehr eng, scrollbar */
 }

 #controls > * {
   flex: 1 1 auto;
   text-align: center;
   width: auto !important;
   min-width: 90px !important;
   max-width: 180px !important;
   padding: 0.2rem 0.2rem !important;
   white-space: nowrap;
   font-size: clamp(0.95rem, 1.3vw, 1.2rem); /* Dynamisch skalierbar */
 }

 #ayetno.form-control,
 #cuez.form-control {
   padding: 0.05rem 0.1rem !important;
 }

/* Safari-only fix: -webkit-touch-callout wird nur von Safari unterstützt */
@supports (-webkit-touch-callout: none) {
  #ayetno.form-control,
  #cuez.form-control,
  #cuzInput.form-control {
    height: 34px;
    min-height: 34px;
    font-size: 1rem;
    line-height: 1.42857143;
    box-sizing: border-box;
  }
  #cuez.form-control,
  #cuzInput.form-control {
    -webkit-appearance: none;
    appearance: textfield;
  }
  #cuez.form-control {
    min-width: 58px !important;
  }
}

/* Footer */
.app-footer {
  position: relative;
  width: 100%;
  margin-top: 2rem;
  padding: 4rem 0.5rem 0rem;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 -25px 45px rgba(20,20,20,0.3);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-out;
  transition-delay: 0.2s;
}

body.content-ready .app-footer {
  opacity: 1;
}

.app-footer .footer-wave {
  position: absolute;
  top: -120px;
  left: 0;
  width: 100%;
  height: 180px;
  background: #fff;
  box-shadow: 0 35px 60px rgba(20,20,20,0.3);
}

.app-footer .footer-inner {
  position: relative;
  margin: 0 auto;
  text-align: center;
}

#footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
  margin-top: -3.5rem;
}

#footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#footer-nav img.nav-icon {
  width: 48px;
  height: auto;
  margin: 0 0.5rem;
}

.app-footer .footer-meta {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: whitesmoke;
}

@media (min-width: 290px) and (max-width: 768px) {
.btn-group > .btn:first-child{
	margin-bottom:3px;
}
	.bgnew{padding: 1rem 1rem;}
}

/* Smartphones (290px–512px) */
@media (min-width: 290px) and (max-width: 512px) {
  .mushaf-page{
    padding: 1rem 0.5rem;
  }

     .footer-apps__title {
          margin-top: 2rem;
        }

  .language-switch {
  left: -10px;
  }
    #controls > * {
       flex: 0 0 auto;
       text-align: center;
       width: auto !important;
       min-width: 0 !important;
       max-width: none !important;
       padding: 0.1rem 0.2rem !important;
       white-space: nowrap;
       font-size: 0.85rem;
     }
  .bgnew {
    padding: 1rem;
  }
  #cuzInput.form-control {
    width: 55px !important;
    padding:0.1rem;
  }
  #footer-nav {
    gap: 1.1rem;
  }
  #footer-nav img.nav-icon {
    width: 42px;
    margin: 0;
    }
  .p-0-5 {
    padding-bottom: 3.2rem;
  }
  .left {
    font-size: 1.2rem;
    line-height: 1.5rem;
  }
  .right {
    font-size: 1.8rem;
    line-height: 3.8rem;
  }
  .surename {
    font-size: 1.8rem;
    line-height: 2rem;
  }
  .line{margin-top:1rem;}
  .kuran-text{font-size:30px;}
  .cuez,
  .sayfa
  {
      font-size: 1rem;
    }
  #osx,
  #addBookmark,
   #toggleBookmarksIcon {
    font-size: 1.5rem;
  }
  #cookset {
    margin-left: 0;
    justify-content: center;
  }
  .red-top-mark{top: -0.27em;}

  .left_arrow,
  .right_arrow,
  .left_arrow_1,
  .right_arrow_1,
   #toggleSearchIcon{
    font-size: 1.2rem;
  }
  #cookset input#searchInput.form-control {
    width: clamp(100px, 10vw, 120px) !important;
  }
  .klein{font-size: 1.1rem;}
  .nrbg3 {

           font-size: clamp(0.6rem, 2.0vw, 1.1rem);
     }
     .surah-title {
        padding: 0.5rem 0;
     }
     .translation{
     font-size:1.1rem;
     line-height:1.7rem;
     }
}

/* Kleine Tablets (513px–768px) */
@media (min-width: 513px) and (max-width: 768px) {
  .p-0-5 {
    padding-bottom: 3.2rem;
  }
  .left {
    font-size: 1.4rem;
    line-height: 1.8rem;
  }
  .right {
    font-size: 1.9rem;
    line-height: 3.8rem;
  }
  .surename {
    font-size: 2.5rem;
    line-height: 3rem;
  }
  .nrbg3 {

           font-size: clamp(0.4rem, 2.0vw, 1rem);
     }
  .surah-title {
      padding: 0.6rem 0;
  }

}

/* Tablets/Laptops (769px–1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .left {
    font-size: 2.9rem;
    line-height: 4.5rem;
  }
  .translation{
  font-size: 1.5rem;
      line-height: 2.5rem;
  }
  .right {
    font-size: 2.7rem;
    line-height: 5.5rem;
  }
  .surename {
    font-size: 2.7rem;
    line-height: 3rem;
  }
.red-top-mark{top: -0.30em;}

  .bgnew {
    padding: 1rem 1.5rem;
  }
  .nrbg3 {
           font-size: clamp(0.4rem, 2.0vw, 1.3rem);
     }
   .cuez,
     .sayfa
     {
         font-size: 1.1rem;
       }
       .line{margin-top:1rem;}
       .surah-title {
               padding: 0.7rem 0;
            }


}

/* Default: orna1 */
/*body.unca-orna1 .surah-title {
  background-image:
    url('../images/orna1_links.webp'),
    url('../images/orna1_rechts.webp');
}*/

/* Alternativ: orna2 */
/*body.unca-orna2 .surah-title {
  background-image:
    url('../images/orna2_links.webp'),
    url('../images/orna2_rechts.webp');
}*/

/* ==============================
   Dark Theme Overrides
   ============================== */
body.dark-theme {
  /* Seiten-Hintergrund */
  background: rgba(30, 30, 30, 1) !important;
  background-image: url("../images/hatsanat2.webp") !important;
      background-repeat: repeat;
}

html body.dark-theme .bgnew {
  background: rgba(50, 50, 50, 0.99) !important;
  background-image: none     !important;
  color:white !important;
}
html body.dark-theme .nrbg3 {
  background-image: url(../images/vahid_2.webp);
  }

html body.dark-theme .surah-title {
    background-image: url('../images/orna2_links.webp'),
                          url('../images/orna2_rechts.webp');
    }

 html body.dark-theme #swipeIndicator, #zoomIndicator{
          background: rgba(255,255,255,0.9) !important;
          color: #000 !important;
    }



/* ========== Bottom Sheet Settings ========== */
#openThemeMenu {
  font-size: 1.4rem;
  padding: 0.2rem;
  cursor: pointer;
  color: #fff;
}

.bs-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 14000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bs-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  max-height: 80vh;
  background: #1c1c1e;
  color: #f5f5f5;
  border-radius: 16px 16px 0 0;
  padding: 0 1.25rem 1.5rem;
  z-index: 14001;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

body.sheet-open {
  overflow: hidden;
}

.bs-handle {
  width: 36px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin: 12px auto 20px;
  cursor: grab;
}

.bs-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 1;
}

.bs-close-btn:hover,
.bs-close-btn:focus {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.bs-section {
  margin-bottom: 1.25rem;
}

.bs-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
}

.bs-row + .bs-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bs-row-icon {
  font-size: 1.2rem;
  width: 2rem;
  text-align: center;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.bs-row-label {
  flex: 1;
  font-size: 0.95rem;
}

.qari-select {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  max-width: 160px;
}
.qari-select option {
  background: #1a1a1a;
  color: #fff;
}

.bs-row {
  position: relative;
  flex-wrap: wrap;
}

.bs-tooltip {
  width: 100%;
  font-size: 0.78rem;
  color: #f5b041;
  margin-top: 0.2rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.bs-tooltip.is-visible {
  opacity: 1;
  max-height: 2rem;
}

/* Toggle switch (iOS style) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #3a3a3c;
  border-radius: 28px;
  transition: background 0.3s ease;
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: #D4A017;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Theme cards grid */
.bs-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.bs-theme-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 10px;
  padding: 0.6rem 0.5rem 0.5rem;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s ease, transform 0.15s ease;
  text-align: center;
}

.bs-theme-card:active {
  transform: scale(0.97);
}

.bs-theme-card.is-active {
  border-color: #D4A017;
}

.bs-theme-preview {
  width: 100%;
  height: 20px;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.bs-theme-card[data-theme="theme1"] .bs-theme-preview {
  background: rgba(252, 243, 207, 0.9);
}

.bs-theme-card[data-theme="theme2"] .bs-theme-preview {
  background: rgba(249, 235, 234, 0.9);
}

.bs-theme-card[data-theme="theme3"] .bs-theme-preview {
  background: rgba(254, 249, 231, 0.9);
}

.bs-theme-card[data-theme="theme4"] .bs-theme-preview {
  background: rgba(254, 249, 231, 0.9);
}

.bs-theme-card[data-theme="theme5"] .bs-theme-preview {
  background: rgba(253, 237, 236, 0.9);
}

.bs-theme-card[data-theme="theme6"] .bs-theme-preview {
  background: rgba(244, 236, 247, 0.9);
}

.bs-theme-card[data-theme="theme7"] .bs-theme-preview {
  background: rgba(248, 245, 230, 0.9);
}

.bs-theme-card[data-theme="theme8"] .bs-theme-preview {
  background: rgba(232, 246, 243, 0.9);
}

.bs-theme-name {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
}

.bs-theme-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #D4A017;
  color: #3b2a00;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.bs-theme-card.is-active .bs-theme-check {
  display: flex;
}

/* 1. Ganzes Fenster abdunkeln */
.tour-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  pointer-events: none;
}

/* 2. Ziel-Element hervorheben */
.tour-highlight {
  position: absolute;
  border: 3px solid #D4A017;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.65), 0 0 18px rgba(212, 160, 23, 0.55);
  z-index: 10001;
  pointer-events: none;
}

/* 3. Tooltip-Box */
.tour-tooltip {
  position: fixed;
  width: clamp(240px, 80%, 400px);
  background: #fff;
  color: #333;
  padding: clamp(0.6rem, 2vw, 1rem);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 10002;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.4;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
  transition: top 0.35s ease;
  visibility: hidden;
}


.tour-controls {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10003;
  transition: top 0.35s ease;
  visibility: hidden;
}
.tour-controls button {
  background: #D4A017;
  border: 1px solid rgba(212, 160, 23, 0.65);
  padding: 0.35rem 0.75rem;
  font-size: clamp(0.85rem, 2vw, 1rem);
  cursor: pointer;
  border-radius: 8px;
  color: #3b2a00;
  box-shadow: 0 8px 18px rgba(212, 160, 23, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.tour-controls button:hover,
.tour-controls button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(212, 160, 23, 0.35);
}

.tour-controls button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: rgba(212, 160, 23, 0.35);
  color: #3b2a00;
  border-color: rgba(212, 160, 23, 0.4);
}

/* ---------- Tour Modal ---------- */
.modal-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(30, 22, 9, 0.92);
  backdrop-filter: blur(6px);
  z-index: 20000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease;
  touch-action: none;
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-box {
  width: min(420px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background: #2a2010;
  color: #fff8e7;
  padding: 1.5rem;
  border-radius: 18px;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 160, 23, 0.4);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-overlay.is-visible .modal-box {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  background: #D4A017;
  color: #3b2a00;
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.35);
  font-size: 1.3rem;
}

.modal-body {
  text-align: left;
}

.modal-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: rgba(255, 248, 231, 0.72);
}

.modal-message {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #fff8e7;
}

.modal-buttons {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-btn {
  flex: 1 1 120px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.modal-btn--primary {
  background: #D4A017;
  color: #3b2a00;
  box-shadow: 0 10px 25px rgba(212, 160, 23, 0.35);
}

.modal-btn--primary:hover,
.modal-btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(212, 160, 23, 0.45);
}

.modal-btn--ghost {
  background: rgba(212, 160, 23, 0.08);
  color: #fff8e7;
  border-color: rgba(212, 160, 23, 0.6);
}

.modal-btn--ghost:hover,
.modal-btn--ghost:focus-visible {
  transform: translateY(-2px);
  background: rgba(212, 160, 23, 0.14);
  border-color: rgba(212, 160, 23, 0.75);
}

body.modal-open {
  overflow: hidden;
}

@media (pointer: coarse) {
  .modal-box {
    width: min(480px, 100%);
    padding: 1.75rem;
    border-radius: 20px;
  }
  .modal-btn {
    padding: 1rem 1.2rem;
    font-size: 1.05rem;
  }
  .modal-buttons {
    gap: 0.9rem;
  }
  .tour-controls button {
    padding: 0.7rem 1.1rem;
    font-size: 1rem;
  }
}

/* ── Audio Player Bar ──────────────────────────────────────────────────── */
#audioPlayerBar {
  position: sticky;
  bottom: 6px;
  margin: 0 auto;
  height: 34px;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 14px;
  z-index: 998;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  max-width: 260px;
  width: fit-content;
}
#audioPlayerBar.is-visible {
  display: flex;
}
#audioVerseLabel {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  margin-right: 4px;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 0;
}
#audioPlayPause, #audioPrev, #audioNext {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}
#audioPlayPause {
  color: #1abc9c;
  font-size: 15px;
  width: 32px;
  height: 32px;
}
#audioPlayPause:hover, #audioPrev:hover, #audioNext:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
#audioPlayPause:hover {
  color: #1abc9c;
  background: rgba(26,188,156,0.15);
}

@media (max-width: 512px) {
  #audioPlayPause, #audioPrev, #audioNext {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  #audioPlayPause {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
}

/* Ayah Highlighting */
.ayah-span.ayah-playing {
  background: rgba(26,188,156,0.18);
  border-radius: 4px;
  outline: 1px solid rgba(26,188,156,0.35);
  transition: background 0.3s;
}

/* Auto-Scroll Info Modal */
.autoscroll-info-icon {
  background: linear-gradient(135deg, #1abc9c, #2980b9) !important;
}

/* Tajweed Info Modal */
.tajweed-info-icon {
  background: linear-gradient(135deg, #FF9800, #E91E63, #9C27B0) !important;
}

.tajweed-color-preview {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.tajweed-color-preview .color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tajweed-info-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  list-style: none;
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(255, 248, 231, 0.85);
}

.tajweed-info-note li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tajweed-info-note li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 160, 23, 0.15);
}

.tajweed-info-note-general {
  font-size: 0.8rem;
  color: rgba(255, 248, 231, 0.65);
  font-style: italic;
}

.tajweed-info-note-img {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
}

.tajweed-info-note-featured {
  flex-direction: column;
  align-items: stretch;
}

.tajweed-info-note-img-large {
  align-self: center;
  width: auto;
  max-width: 70%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px;
  margin-bottom: 8px;
}

.tajweed-info-checkbox {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 160, 23, 0.2);
}

.tajweed-info-checkbox .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: rgba(255, 248, 231, 0.8);
}

.tajweed-info-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #D4A017;
  cursor: pointer;
}

/* ausgegraut im Free-Mode */
.locked #cookset {
  filter: grayscale(100%) opacity(0.6);
}

/* Der Cursor bleibt ein Pointer, damit man weiß, dass man klicken kann */
.locked #cookset * {
  cursor: pointer;
}

/* ausgegraut im Free-Mode */
body.locked #cuzInput {
  filter: grayscale(100%) opacity(0.6);
  cursor: pointer; /* damit man sieht, dass Klicks abgefangen werden */
}

/* 2.2 Modal-Grundgerüst */
.upgrade-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: none;           /* versteckt */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.upgrade-modal.active {
  display: flex;           /* sichtbar, wenn .active gesetzt */
}
/* halbtransparenter Hintergrund */
/*.upgrade-modal__backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}*/
/* Box in der Mitte */
/*.upgrade-modal__content {
  position: relative;
  background: #fff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 1;
}
.upgrade-modal__content h2 {
  margin-top: 0;
}
.upgrade-modal__content button {
  margin: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 1rem;
}*/

/* ========== Tajweed Farbcodierung ========== */
/* Ghunnah - Nasallaut (2 Harakat) - Orange */
tajweed.ghunnah { color: #F48FB1 !important; }

/* Ikhfa - Verstecken - Grün / Hellrosa */
tajweed.ikhafa { color: #43A047 !important; }
tajweed.ikhafa_shafawi { color: #FF9800 !important; }

/* Idgham - Verschmelzung - Lila */
tajweed.idgham_ghunnah { color: #B84AFF !important; }
tajweed.idgham_wo_ghunnah { color: #B84AFF !important; }
tajweed.idgham_shafawi { color: #FFC107 !important; }
tajweed.idgham_mutajanisayn { color: #D53DFF !important; }
tajweed.idgham_mutaqaribayn { color: #D53DFF !important; }
tajweed.idgham_misleyn { color: #D53DFF !important; }

/* Qalqalah - Echo-Laut - Hellblau */
tajweed.qalaqah { color: #29B6F6 !important; }

/* Madd - Dehnung */
tajweed.madda_normal { color: #FF6D2A !important; }
tajweed.madda_obligatory { color: #FF3646 !important; }
tajweed.madda_permissible { color: #FF3646 !important; }
tajweed.madda_necessary { color: #0D47A1 !important; }
tajweed.madda_lin { color: #FF3C80 !important; }

/* Iqlab - Umwandlung (Nun zu Mim) - Beige/Braun */
tajweed.iqlab { color: #A1887F !important; }

/* Hamzat al-Wasl - Verbindungs-Hamza - Grau */
tajweed.ham_wasl { color: #9E9E9E !important; }

/* Laam Shamsiyah - wird assimiliert - Grau */
tajweed.laam_shamsiyah { color: #9E9E9E !important; }

/* Laam Qamariyah - Mond-Lam, wird ausgesprochen - Blaugrau */
tajweed.laam_qamariyah { color: #3B7E99 !important; }

/* İzhar - klare Aussprache - Schwarz */
tajweed.izhar { color: #8B8B00 !important; }

/* Silent Letters - Grau */
tajweed.slnt { color: #9E9E9E !important; }

/* Hükmü Ra - Kalın (blau dunkel) / İnce (blau hell) */
tajweed.ra_thick { color: #1976D2 !important; }
tajweed.ra_thin { color: #FFA64F !important; } 

/* Lafzatullah - Kalın (blau dunkel) / İnce (blau hell) */
tajweed.lafza_thick { color: #d9534f !important; }
tajweed.lafza_thin { color: #309497 !important; }

/* Secavend (Waqf-Zeichen) - Rot (nur Stopp-Zeichen) */
tajweed.secavend_sala,
tajweed.secavend_mim,
tajweed.secavend_jim,
tajweed.secavend_muanaka,
tajweed.secavend_sakte { color: #D32F2F !important; }
/* Secavend deaktiviert (Weiterlesen-Zeichen, nicht rot) */
/* tajweed.secavend_qala { color: #D32F2F !important; } */
/* tajweed.secavend_la { color: #D32F2F !important; } */

/* sv-base: Basisbuchstaben innerhalb eines Tajweed-Tags zurück auf Standardfarbe setzen.
   Wird für combining marks (ٰ, ۪, Secavend) genutzt, die den Basisbuchstaben
   im selben Element brauchen (Chromium-Ligatur-Fix). */
tajweed .sv-base { color: inherit; }
.right tajweed .sv-base { color: #333 !important; }

/* Verse End Marker */
.bgnew tajweed span.end { display: none; }

/* Tajweed base styling */
tajweed {
  display: inline;
  cursor: pointer;
}


/* Tajweed Tooltip */
#tajweed-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  z-index: 50000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  direction: ltr;
}

#tajweed-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

#tajweed-tooltip .tooltip-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

#tajweed-tooltip .tooltip-title {
  font-weight: bold;
  font-size: 1.05rem;
}

#tajweed-tooltip .tooltip-desc {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 4px;
}

/* Dark theme adjustments for Tajweed */
body.dark-theme tajweed.ham_wasl,
body.dark-theme tajweed.laam_shamsiyah,
body.dark-theme tajweed.slnt {
  color: #757575 !important;
}

.mushaf-app {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  /*padding: clamp(1.2rem, 4vw, 2.5rem);*/
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 1 0 auto;
}
.mushaf-page {
  position: relative;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  background: var(--page);
  border-radius: 20px;
  border: 8px double #c19b4a;
  padding: 3rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  margin-top: -2rem;
  hyphens: auto;
    -webkit-hyphens: auto;
}

body.no-justify .mushaf-page {
  text-align: center;
  text-justify: auto;
}

body.no-justify .bgnew {
  text-align: center;
  text-justify: auto;
}

body.no-mushaf .line {
  background: #d9534f;
}

.translation-hint {
  margin: 0.5rem 0 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: rgba(217, 83, 79, 0.12);
  color: #d9534f;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(217, 83, 79, 0.35);
}

/* Smartphones (290px–512px) */
@media (min-width: 290px) and (max-width: 512px) {
  .mushaf-page{
    padding: 2rem 1rem;
  }
}

/* ========== iOS Safe Area (Notch / Dynamic Island / Home Indicator) ========== */
@supports (padding-top: env(safe-area-inset-top)) {
  .header-container {
    padding-top: calc(1rem + env(safe-area-inset-top));
  }

  .app-footer {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px));
  }

  #footer-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .bgnew {
    padding-left: calc(1rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1rem + env(safe-area-inset-right, 0px));
  }

  /* Bottom sheet safe area */
  #bottomSheet {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* =====================================================================
   HEBEBÜHNEN (Sajdah-Zeichen, kleine Noons, Drei Punkte)
   ===================================================================== */

/* 1. Basis für normale Hebebühnen (Sajdah-Zeichen) */
[class^="ht-"] {
    display: inline-block;
    position: relative;
}

/* 2. Basis für künstliche kleine Noons (U+06E8 Ersatz) */
[class$="-noon"] {
    display: inline-block;
    position: relative;
    font-size: 0.45em;
    font-weight: 100;
}

/* 3. Basis für die "drei Punkte" (U+06DB) bei Doppel-Zeichen */
[class^="ht-dots-"] {
    display: inline-block;
    position: relative;
}

/* --- GRUPPE 1: EINFACHE ZEICHEN (Sajdah über Einzelbuchstaben) --- */
.ht-teh-damma          { top: 0.1em; }
.ht-teh-dammatan       { top: 0.05em; }
.ht-lam-damma          { top: 0.0em;   right: -0.15em; }
.ht-dal-dammatan       { top: 0.05em; }
.ht-ta-dammatan        { top: 0.15em;  right: -0.2em; }
.ht-ghayn-damma        { top: 0.1em; }
.ht-lam-shadda-fatha   { top: -0.02em; right: -0.1em; }
.ht-kaf-dammatan       { top: -0.05em; right: -0.25em; }
.ht-qaf-shadda-damma   { top: 0.05em;  right: -0.05em; }
.ht-ain-dammatan       { top: 0.1em;   right: -0.05em; }
.ht-lam-shadda-damma   { top: -0.1em;  right: -0.15em; }
.ht-qaf-dammatan       { top: 0.05em;  right: -0.05em; }
.ht-noon-dammatan      { top: 0.05em; }
.ht-lam-dammatan       { top: -0.05em; right: -0.15em; }
.ht-waw-shadda-dammatan { top: 0.02em; }
.ht-kaf-damma          { top: 0.02em;  right: -0.25em; }
.ht-ra-shadda-damma    { top: 0.05em;  right: -0.1em; }
.ht-zha-dammatan       { top: -0.1em;  right: -0.05em; }
.ht-lam-shadda-dammatan { top: -0.2em; right: -0.15em; }
.ht-noon-fatha-special { top: 0.1em;   right: -0.15em; }
.ht-qaf-damma-special  { top: 0.1em;   right: -0.15em; }

/* --- GRUPPE 2: DOPPEL-ZEICHEN (Sajdah + Drei Punkte) --- */
.ht-meem-sukun-dots { top: 0.1em; right: -0.1em; }
.ht-dots-meem       { top: 0.23em; right: -0.15em; }
.ht-kaf-fatha-dots  { top: 0.1em; right: -0.2em; }
.ht-dots-kaf        { top: -0.25em; right: -0.15em; }
.ht-dal-fatha-dots  { top: 0.15em; right: -0.1em; }
.ht-dots-dal        { top: 0.3em; right: -0.1em; }
.ht-ra-sukun-dots   { top: 0.15em; right: -0.1em; }
.ht-dots-ra         { top: 0.27em; right: -0.1em; }
.ht-hah-damma-dots  { top: 0.1em; right: -0.15em; }
.ht-dots-hah        { top: 0.22em; right: -0.2em; }

/* --- GRUPPE 3b: QILA WAQF-ZEICHEN (U+06D7) --- */
.ht-qala { top: 0.05em; }

/* --- GRUPPE 3: DAS KLEINE NOON (U+06E8) --- */
.ht-small-noon             { top: 0.5em; right: -0.2em; }
.ht-jeem-lam-dammatan-noon { top: 0.95em; right: -0.25em; }
.ht-alif-lam-dammatan-noon { top: 0.65em; right: -0.3em; }
.ht-kaf-dammatan-noon      { top: 0.6em; right: -0.55em; }
.ht-ra-dammatan-noon       { top: 0.9em; right: -0.1em; }
.ht-hah-kasratan-noon      { top: 1.25em; right: -0.25em; }
.ht-hah-dammatan-noon      { top: 1.25em; right: -0.3em; }
.ht-teh-kasratan-noon      { top: 0.6em; right: 0em; }
.ht-meem-kasratan-noon     { top: 1em; right: 0em; }
.ht-dad-kasratan-noon      { top: 1.4em; right: -1.3em; font-size: 0.31em; }

/* === Slide Viewport Wrapper === */


/* === Transition Selector Buttons (Bottom Sheet) === */
.trans-btn-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.trans-btn {
  flex: 1;
  padding: 0.45rem 0.4rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
}
.trans-btn.is-active {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  font-weight: 600;
}

/* === Page Transition Clone (seitenwechsel) === */
.page-clone {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: all 0.5s ease-in-out;
  pointer-events: none;
  overflow: hidden;
}
.page-clone.fade-out { opacity: 0; }
.page-clone.slide-left-out { transform: translateX(-100%); opacity: 0; }
.page-clone.slide-right-out { transform: translateX(100%); opacity: 0; }
.page-clone.flip-out-fwd {
  transform: rotateY(-180deg);
  transform-origin: left center;
}
.page-clone.flip-out-back {
  transform: rotateY(180deg);
  transform-origin: right center;
}

/* =====================================================================
   Hinweis auf den Seitenwechsel  (06.09.2026)
   ---------------------------------------------------------------------
   Ersetzt den blockierenden Dialog, der ERST NACH dem ersten Wischen kam
   und genau die Bewegung abfing, die er erklären wollte: man wischte,
   bekam eine Erklärung des Wischens, musste sie wegklicken — und erst
   dann wechselte die Seite.
   Jetzt: eine Karte MITTEN IM BILD mit wandernder Hand, die die Geste
   vorführt, dazu die Richtungen wie im alten Dialog. Sie nimmt keine
   Klicks an (pointer-events:none) und hält nichts auf.
   Hand-Animation nach dem Vorbild von .fp-wisch-hinweis auf
   foreverpics.events (public/css/upload.css).
   ===================================================================== */
.ka-wisch-hinweis {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46%);
    z-index: 1040;              /* unter den Dialogen (.modal-overlay) */
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 26px;
    border-radius: 18px;
    background: rgba(18, 22, 32, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    color: #fff;
    max-width: calc(100vw - 32px);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;       /* fängt keine Berührung und keinen Klick ab */
}

.ka-wisch-hinweis.is-da {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.ka-wisch-titel {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.ka-wisch-zeilen {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.88;
    white-space: nowrap;
}

.ka-wisch-hand {
    font-size: 2rem;
    line-height: 1;
    flex: 0 0 auto;
    animation: ka-wisch 1.5s ease-in-out infinite;
}

@keyframes ka-wisch {
    0%   { transform: translateX(8px)  rotate(0deg);   opacity: 0.55; }
    25%  { opacity: 1; }
    60%  { transform: translateX(-16px) rotate(-12deg); opacity: 1; }
    100% { transform: translateX(8px)  rotate(0deg);   opacity: 0.55; }
}

/* Schmale Telefone: die Richtungszeilen dürfen umbrechen, sonst schiebt
   der längste Satz (pt/es) die Karte über den Bildrand hinaus. */
@media (max-width: 420px) {
    .ka-wisch-hinweis { gap: 12px; padding: 16px 18px; }
    .ka-wisch-zeilen  { white-space: normal; font-size: 0.85rem; }
    .ka-wisch-hand    { font-size: 1.7rem; }
}

/* Wer Bewegung im System abgestellt hat, bekommt die Hand ruhig gestellt —
   der Hinweis selbst bleibt lesbar. */
@media (prefers-reduced-motion: reduce) {
    .ka-wisch-hand { animation: none; }
    .ka-wisch-hinweis { transition: opacity 0.28s ease; }
}
