/* German Method – Hifz. Gestaltung nach dem Design-Kit „Quran verstehen lernen“
   (uebungen.css, auf Basis der „German Method – In-App-Käufe Screens“):
   DM Sans, Indigo, weiße Karten, schwarze Hauptknöpfe, Richtig/Falsch mit
   Farbe und Symbol. Der Mushaf bleibt in der blauen Madani-Ausgabe. */

/* KFGQPC Uthmanic Script HAFS v3.0 (unverändert aus @quran.ws/text) */
@font-face {
  font-family: "UthmanicHafs";
  src: url("../fonts/UthmanicHafs-v-3.0.ttf") format("truetype");
  font-display: block;
}

/* KFGQPC HAFS Uthmanic Script v1.001 – die Schriftfassung der Madina-Ausgabe
   1405 (gestreckte Kāf, übereinander gesetzte Buchstaben), für die Mushaf-Seite */
@font-face {
  font-family: "MadinaHafs";
  src: url("../fonts/KFGQPC-HAFS-Uthmanic-v1.001.woff2") format("woff2");
  font-display: block;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Italic.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Farben aus dem Design-Kit */
  --ink: #111827;
  --muted: #6b7280;
  --muted-2: #5b5f6e;
  --primary: #26247b;
  --primary-2: #2d248a;
  --primary-soft: #7273b4;
  --lav: #e6e6ff;
  --lav-2: #eff0ff;
  --lav-3: #c2c2f7;
  --line: #eae8f0;
  --chip: #f0eff5;
  --track: #e9e8f1;
  --ok: #0e9f6e;
  --ok-line: #10b981;
  --ok-bg: #e3f6ee;
  --bad: #b8463d;
  --bad-line: #cd5b52;
  --bad-bg: #fbeae8;
  --card: #ffffff;
  --black: #000000;
  --ar: "UthmanicHafs", serif;
  --sans: "DM Sans", -apple-system, system-ui, sans-serif;

  /* Blauer Madani-Mushaf (Gestaltung aus gm-quran-progress) */
  --mp-paper: #ffffff; /* Seitenrand außerhalb des Rahmens */
  --mp-text-bg: #f0faff; /* Fläche im Rahmen, Innenfläche der Medaillons */
  --mp-blue-dark: #173f7d; /* Rahmenlinien, Flechtband-Kontur, Eckquadrate */
  --mp-blue: #2f68b2; /* Blüten, Arabesken, Ranken, Anschluss-Wörter */
  --mp-blue-mid: #7fa6d6; /* Sterne in Medaillons, feine Ranken */
  --mp-blue-light: #dce8f6; /* Rahmenband und Banner */
  --mp-gold: #c49a45; /* Goldlinien, Punkte */
  --mp-gold-light: #e8d29b; /* helle Goldpunkte */
  --mp-ink: #141414; /* Text */
  --mp-ink-muted: #d5d3ce; /* ausgegrauter Text (falls benötigt) */
  --mp-header: #1d2b4f; /* Kopfzeile, Seitenzahl, Surennamen */

  /* ältere Namen (Übungen) */
  --paper: #fffdf5;
  --m-blue: #1d5594;
  --m-blue-2: #3f7fc4;
  --m-blue-light: #9cc4ea;
  --m-blue-wash: #e8f1fb;
  --m-gold: #d9b865;
  --m-ink: #14110d;

  --radius-card: 20px;
  --radius-btn: 16px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(38, 36, 123, 0.06);
  --app-max: 560px;
  --mushaf-size: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", -apple-system, system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background-color: #eeeaf4;
  background-image: radial-gradient(420px 420px at 92% 10%, rgba(99, 56, 140, 0.09), rgba(99, 56, 140, 0) 70%),
    radial-gradient(440px 440px at 4% 50%, rgba(0, 127, 165, 0.07), rgba(0, 127, 165, 0) 70%),
    radial-gradient(360px 360px at 90% 94%, rgba(99, 56, 140, 0.09), rgba(99, 56, 140, 0) 70%),
    radial-gradient(340px 340px at 10% 92%, rgba(185, 159, 111, 0.12), rgba(185, 159, 111, 0) 70%),
    linear-gradient(135deg, #e8e4f0 0%, #f5f3f8 50%, #e0e8f5 100%);
  background-attachment: fixed;
}

button {
  font: inherit;
  color: inherit;
}

.app {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: screen-in 0.28s ease;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.content {
  flex: 1;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Kopfzeile ---------- */

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: max(20px, env(safe-area-inset-top)) 16px 4px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 0 48px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  padding: 0;
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.topbar .icon-btn {
  position: absolute;
  left: 16px;
  bottom: 4px;
}

.topbar .icon-btn.right {
  left: auto;
  right: 16px;
}

.segments {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
}

.segments span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(38, 36, 123, 0.12);
  overflow: hidden;
  position: relative;
}

.segments span i {
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ---------- Typografie ---------- */

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.12;
}

.lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted-2);
}

.bismillah {
  font-family: "UthmanicHafs", serif;
  color: var(--primary);
  font-size: 26px;
  text-align: center;
  direction: rtl;
  line-height: 1.8;
}

.hero-title {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.25;
}

.arabic {
  font-family: "UthmanicHafs", serif;
  direction: rtl;
}

/* ---------- Karten ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
}

.card-soft {
  background: var(--chip);
  border-radius: 16px;
  padding: 14px 16px;
}

.card-dark {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: 0 12px 28px rgba(38, 36, 123, 0.25);
}

.card-dark .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 2px -4px;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.section-title small {
  font-size: 13px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(107, 114, 128, 0.1);
  color: var(--muted-2);
  white-space: nowrap;
}

.pill-light {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.pill-gold {
  background: var(--lav-2);
  border: 1px solid var(--lav-3);
  color: var(--primary);
}

.pill-primary {
  background: var(--lav-2);
  color: var(--primary);
}

/* ---------- Buttons ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-btn);
  background: var(--primary);
  border: 2px solid var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-white {
  background: #fff;
  border-color: #fff;
  color: var(--primary);
  padding: 12px;
  font-size: 15px;
}

.btn-outline {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--primary);
  text-transform: none;
  font-size: 15px;
  padding: 12px;
}

.btn-blue {
  background: var(--primary);
  border-color: var(--primary);
  text-transform: none;
}

.link-btn {
  border: 0;
  background: none;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.link-btn.muted {
  color: var(--muted);
}

.footer {
  position: sticky;
  bottom: 0;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(241, 238, 246, 0), rgba(241, 238, 246, 0.94) 22%);
  z-index: 5;
}

.hint {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Auswahl (Setup) ---------- */

.picker {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.num-badge {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--lav-2);
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.picker-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.picker-main strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.picker-main span {
  font-size: 13px;
  color: var(--muted);
}

.picker-ar {
  font-family: "UthmanicHafs", serif;
  font-size: 24px;
  color: var(--primary);
  direction: rtl;
  flex-shrink: 0;
}

.chevron {
  width: 20px;
  height: 20px;
  fill: var(--muted);
  flex-shrink: 0;
}

.options {
  display: grid;
  gap: 8px;
}

.options-3 {
  grid-template-columns: repeat(3, 1fr);
}

.options-4 {
  grid-template-columns: repeat(4, 1fr);
}

.option {
  position: relative;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.option b {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.option span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.option input,
.weekday input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option[aria-checked="true"],
.option.on {
  border-color: var(--primary);
  background: var(--lav-2);
  box-shadow: 0 6px 16px rgba(38, 36, 123, 0.12);
}

.option:focus-within,
.weekday:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.option[aria-checked="true"]::after,
.option.on::after {
  content: "";
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
  box-shadow: 0 0 0 2px #fff;
}

.option:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  background: #f7f6fa;
}

.field-note {
  margin: -2px 2px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.reciters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reciter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--line);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.reciter[aria-checked="true"] {
  border-color: var(--primary);
  background: var(--lav-2);
}

.reciter-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reciter[aria-checked="true"] .reciter-num {
  background: var(--primary);
  color: #fff;
}

.reciter-name {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}

.reciter-name small {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.mini-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--lav-2);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mini-play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.reciter[aria-checked="true"] .mini-play {
  background: #fff;
}

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

.summary-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
}

.summary-row b {
  font-size: 26px;
  font-weight: 800;
}

.summary small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.45;
}

/* ---------- Bottom-Sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.sheet {
  width: 100%;
  max-width: var(--app-max);
  max-height: 86vh;
  max-height: 86dvh;
  background: #f7f6fa;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  animation: sheet-in 0.25s ease;
  padding-bottom: env(safe-area-inset-bottom);
}

@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0.4;
  }
}

.sheet-head {
  padding: 16px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.search {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  outline: none;
}

.search:focus {
  border-color: var(--primary);
}

.sheet-list {
  overflow-y: auto;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sura-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.sura-row[aria-selected="true"] {
  border: 2px solid var(--primary);
  background: var(--lav-2);
}

.sura-row .num-badge {
  width: 34px;
  height: 34px;
  font-size: 13px;
  border-radius: 10px;
}

.sura-row .picker-ar {
  font-size: 21px;
}

/* ---------- Home ---------- */

.hello {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 27px;
}

.hello-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hello-main span {
  font-size: 14px;
  color: var(--muted);
}

.hello-main strong {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.progress {
  height: 8px;
  border-radius: 8px;
  background: rgba(38, 36, 123, 0.1);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--primary);
  transition: width 0.4s ease;
}

.card-dark .progress {
  background: rgba(255, 255, 255, 0.18);
}

.card-dark .progress i {
  background: #fff;
}

.today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.today-title {
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.today-arabic {
  font-family: "UthmanicHafs", serif;
  direction: rtl;
  text-align: center;
  font-size: 26px;
  line-height: 1.9;
  margin: 12px 0 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.today-meta {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 16px;
}

.days {
  display: flex;
  flex-direction: column;
}

.day {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.day:last-child {
  border-bottom: 0;
}

.day-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  background: var(--chip);
  color: var(--muted);
}

.day.done .day-dot {
  background: var(--primary);
  color: #fff;
}

.day.current .day-dot {
  background: #fff;
  color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.day-dot svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.day-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.day-main strong {
  font-size: 15px;
}

.day-main span {
  font-size: 13px;
  color: var(--muted);
}

.day .pill {
  font-size: 11px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-row small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-row strong {
  font-size: 15px;
}

.credits {
  margin: 4px 8px 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.credits a {
  color: inherit;
}

/* ---------- Lernen ---------- */

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
}

.status-row .left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.range-caption .next-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-blue);
}

.range-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  text-align: center;
  margin: -4px 0 -6px;
}

/* ---------- Mushaf ---------- */

/* ---------- Blauer Madani-Mushaf (Gestaltung aus gm-quran-progress) ---------- */

.mushaf {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Beim Lernen darf die Seite auf breiten Bildschirmen über die Spalte hinaus */
.mushaf.full {
  --w: min(calc(100vw - 16px), 760px);
  width: var(--w);
  margin-left: calc((100% - var(--w)) / 2);
}

.mushaf-page {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 1000 / 1414;
  background: var(--mp-paper);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(23, 63, 125, 0.16), 0 2px 6px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.mp-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.mp-deco-text {
  font-family: var(--ar);
  fill: var(--mp-header);
}

.mp-rows {
  position: absolute;
  inset: 0;
  font-family: "MadinaHafs", var(--ar);
  font-size: var(--mushaf-size);
  color: var(--mp-ink);
  direction: rtl;
}

/* Wie in der Madina-Ausgabe 1405: Wörter mit einfachem Leerzeichen, die ganze
   Zeile wird auf die Satzbreite gestreckt oder gestaucht (Mushaf.fit) */
.ml {
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  /* Leerzeichen der Schrift */
  column-gap: 0.22em;
  white-space: nowrap;
  line-height: 1;
  padding-top: 0.12em;
  transform-origin: right center;
}

/* Versende-Medaillon aus der Schrift v3.0 (۝ mit Versnummer) */
.ml .ayah-end {
  font-family: var(--ar);
}

.ml-center {
  justify-content: center;
}

.ml .t {
  border-radius: 0.2em;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

/* Nicht zu lernen: nur die Wörter fast unsichtbar (Banner, Kopfzeile, Marken bleiben) */
.ml .rest {
  opacity: 0.05;
}

/* Anschluss: die ersten Wörter des nächsten Verses */
.ml .next {
  color: var(--mp-blue);
}

.ml .active {
  background: rgba(47, 104, 178, 0.13);
  box-shadow: 0 0 0 0.08em rgba(47, 104, 178, 0.13);
}

.ml .t[data-key] {
  cursor: pointer;
}

/* Ausgrauen: hinten das ganze Wort blass, vorne deckungsgleich der sichtbare Teil */
.ml .w {
  position: relative;
}

.ml .ghost {
  opacity: 0.05;
}

.ml .front {
  position: absolute;
  top: 0;
  right: 0;
  white-space: nowrap;
  pointer-events: none;
}

.ml .front .hide {
  opacity: 0;
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--lav-2);
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.play-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.play-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.bars {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  min-width: 0;
}

.bars span {
  flex: 1;
  min-width: 3px;
  border-radius: 2px;
  background: var(--lav-3);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.bars span i {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--primary);
}

.bars span.played i {
  width: 100%;
}

.player-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.player-meta b {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  white-space: nowrap;
}

.restart-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.restart-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.player-error {
  font-size: 12.5px;
  color: var(--bad);
  text-align: center;
  margin: -4px 0 0;
}

/* ---------- Timer ---------- */

.timer-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px 64px;
  text-align: center;
}

.ring {
  position: relative;
  width: min(72vw, 280px);
  aspect-ratio: 1;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 10;
}

.ring .track {
  stroke: rgba(38, 36, 123, 0.1);
}

.ring .bar {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ring-label b {
  font-size: 56px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.timer-steps {
  display: flex;
  gap: 8px;
}

.timer-steps span {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(38, 36, 123, 0.08);
  color: var(--muted);
}

.timer-steps span.now {
  background: var(--primary);
  color: #fff;
}

.timer-steps span.past {
  background: var(--lav-2);
  color: var(--primary);
}

/* ---------- Erfolg ---------- */

.done-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 24px 20px;
}

.done-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 10px rgba(38, 36, 123, 0.08), 0 0 0 20px rgba(38, 36, 123, 0.04);
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.done-icon svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

.stats {
  display: flex;
  gap: 10px;
  width: 100%;
}

.stat {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat b {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.stat span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Dialog ---------- */

.dialog {
  width: calc(100% - 32px);
  max-width: 400px;
  margin: auto auto;
  background: #fff;
  border-radius: 24px;
  padding: 22px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pop 0.25s ease;
}

.dialog h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.dialog p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted-2);
}

.dialog-backdrop {
  align-items: center;
}

.loading-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
}

@media (min-width: 600px) {
  .content {
    padding-top: 20px;
  }
}


/* =====================================================================
   Plan, Testmodus, Lernablauf (Version 2)
   ===================================================================== */

.options-5 {
  grid-template-columns: repeat(5, 1fr);
}

.options-5 .option {
  padding: 12px 2px 10px;
}

.options-5 .option b {
  font-size: 20px;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.weekday {
  position: relative;
  aspect-ratio: 1;
  max-height: 52px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.weekday.on {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.picker-main span + span {
  margin-top: 0;
}

.juz-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.juz-row[aria-selected="true"] {
  border: 2px solid var(--primary);
  background: var(--lav-2);
}

.juz-row .num-badge {
  width: 34px;
  height: 34px;
  font-size: 13px;
  border-radius: 10px;
}

.num-badge svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.today-meta.left {
  text-align: left;
  margin: 6px 0 16px;
}

.unit-list {
  margin: 10px 0 16px;
  padding: 0 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.unit-list small {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.unit-list li.done {
  text-decoration: line-through;
  opacity: 0.6;
}

.unit-list li.now {
  color: #fff;
}

.journal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journal-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.journal-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.journal-item small {
  color: var(--muted);
  font-size: 12px;
}

.journal-item p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted-2);
}

/* ---- Testmodus: Seiten und Viertel ---- */

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 6px;
}

.page-chip {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  min-width: 0;
}

.page-chip b {
  font-size: 16px;
  color: var(--primary);
}

.page-chip span {
  font-size: 10px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-chip[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--lav-2);
}

.mini-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mushaf.mini {
  margin: 0;
  max-width: 420px;
  width: 100%;
  align-self: center;
}

.mushaf.mini .t[data-q] {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.mushaf.mini .t.prev {
  opacity: 0.3;
}

.mushaf.mini .ml-head,
.mushaf.mini .ml-basmala {
  opacity: 0.85;
}

.part-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.part-row {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.part-row strong {
  display: block;
  font-size: 14px;
}

.part-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.part-row[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--lav-2);
}

.part-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

:root {
  --q0: rgba(63, 127, 196, 0.28);
  --q1: rgba(217, 164, 60, 0.34);
  --q2: rgba(15, 157, 143, 0.28);
  --q3: rgba(176, 72, 150, 0.24);
}

.part-dot.q0 { background: var(--q0); }
.part-dot.q1 { background: var(--q1); }
.part-dot.q2 { background: var(--q2); }
.part-dot.q3 { background: var(--q3); }

.mushaf.mini[data-hover="0"] .t[data-q="0"],
.mushaf.mini[data-selected="0"] .t[data-q="0"] { background: var(--q0); }
.mushaf.mini[data-hover="1"] .t[data-q="1"],
.mushaf.mini[data-selected="1"] .t[data-q="1"] { background: var(--q1); }
.mushaf.mini[data-hover="2"] .t[data-q="2"],
.mushaf.mini[data-selected="2"] .t[data-q="2"] { background: var(--q2); }
.mushaf.mini[data-hover="3"] .t[data-q="3"],
.mushaf.mini[data-selected="3"] .t[data-q="3"] { background: var(--q3); }

.mushaf.mini[data-hover]:not([data-hover=""]) .t[data-q] {
  opacity: 0.45;
}

.mushaf.mini[data-hover="0"] .t[data-q="0"],
.mushaf.mini[data-hover="1"] .t[data-q="1"],
.mushaf.mini[data-hover="2"] .t[data-q="2"],
.mushaf.mini[data-hover="3"] .t[data-q="3"] {
  opacity: 1;
}

/* ---- Schritte ---- */

.stepper {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
}

.step-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-group small {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.step-group.now small {
  color: var(--primary);
}

.step-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(38, 36, 123, 0.12);
  overflow: hidden;
}

.step-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.stepper.test {
  overflow-x: auto;
  scrollbar-width: none;
  gap: 5px;
  padding-bottom: 2px;
}

.step-chip {
  flex-shrink: 0;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 100px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.step-chip.past {
  background: var(--lav-2);
  color: var(--primary);
  border-color: transparent;
}

.step-chip.now {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.step-title {
  margin: 4px 0 -4px;
  font-size: 20px;
  font-weight: 800;
}

.nav-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
}

.btn-back {
  text-transform: none;
  font-size: 15px;
}

.btn-back:disabled {
  opacity: 0.4;
}

.center {
  text-align: center;
}

/* ---- Vorbereitung ---- */

.prep-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.chip-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--primary);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chip-btn.on {
  background: var(--lav-2);
  border-color: var(--primary);
}

.prep + .munasaba,
.frag-sheet + .hint {
  margin-top: 12px;
}

.frag-sheet {
  background: var(--paper);
  border: 1.5px solid var(--m-blue);
  border-radius: 8px;
  box-shadow: 0 0 0 5px var(--m-blue), 0 0 0 6px var(--m-blue-light), 0 10px 30px rgba(29, 85, 148, 0.18);
  margin: 6px;
  padding: 6px 0;
  overflow: hidden;
}

.frag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: stretch;
  border-bottom: 1px dashed rgba(29, 85, 148, 0.2);
}

.frag-row:last-child {
  border-bottom: 0;
}

.frag-main {
  direction: rtl;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
}

.frag-ar {
  font-family: "UthmanicHafs", serif;
  font-size: 22px;
  line-height: 1.9;
  color: var(--m-ink);
}

.frag-de {
  direction: ltr;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

.frag-slot {
  background: var(--m-blue-wash);
  border-left: 1.5px solid rgba(29, 85, 148, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.frag-slot:not(.filled) {
  background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(29, 85, 148, 0.06) 6px 12px);
}

.frag-slot.drop-hover,
.frag-sheet.drop-hover .frag-row.wanted .frag-main {
  background: rgba(61, 100, 255, 0.16);
}

.emoji-chip {
  font-size: 28px;
  line-height: 1;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.emoji-chip.in-slot {
  width: 42px;
  height: 42px;
  font-size: 26px;
}

.emoji-chip.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 100, 255, 0.25);
}

.emoji-chip.dragging {
  opacity: 0.3;
}

.emoji-tray {
  position: sticky;
  top: 6px;
  z-index: 5;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(38, 36, 123, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 70px;
}

.emoji-tray.drop-hover {
  background: var(--lav-2);
}

.drag-ghost {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.25);
  border-radius: 12px;
}

.drag-ghost.emoji-ghost {
  width: 46px !important;
  height: 46px;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.drag-ghost.frag-ghost {
  font-family: "UthmanicHafs", serif;
  direction: rtl;
  font-size: 21px;
  line-height: 1.8;
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--primary);
  text-align: center;
}

.drag-ghost.returning {
  transition: left 0.25s ease, top 0.25s ease, opacity 0.25s ease;
  opacity: 0.2;
}

.frag-hole {
  direction: ltr;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  min-height: 24px;
}

.frag-row.empty .frag-main {
  background: rgba(17, 24, 39, 0.02);
}

.frag-row.wanted .frag-main {
  background: rgba(61, 100, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(61, 100, 255, 0.5);
  animation: wanted-pulse 1.6s ease-in-out infinite;
}

.frag-row.wanted .frag-hole {
  color: var(--primary);
}

@keyframes wanted-pulse {
  50% {
    box-shadow: inset 0 0 0 2px rgba(61, 100, 255, 0.15);
  }
}

.frag-row.placed .frag-ar {
  animation: screen-in 0.3s ease;
}

.frag-row.shake {
  animation: shake 0.4s ease;
}

.frag-row.shake .frag-main {
  background: rgba(180, 35, 24, 0.1);
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.wheel-wrap {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
}

.wheel {
  position: relative;
  width: 100%;
  height: 270px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

/* Auswahlfenster in der Mitte, Höhe folgt dem aktuellen Fragment */
.wheel-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 56px;
  transform: translateY(-50%);
  background: var(--m-blue-wash);
  border-top: 2px solid var(--m-blue);
  border-bottom: 2px solid var(--m-blue);
  transition: height 0.18s ease;
  pointer-events: none;
}

.wheel-scroll {
  position: relative;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
}

.wheel-scroll::-webkit-scrollbar {
  display: none;
}

.wheel-scroll:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(61, 100, 255, 0.35);
}

.wheel-item {
  scroll-snap-align: center;
  font-family: "UthmanicHafs", serif;
  direction: rtl;
  text-align: center;
  font-size: 22px;
  line-height: 1.75;
  padding: 8px 16px;
  color: var(--m-ink);
  cursor: pointer;
  transform-origin: center;
  will-change: transform, filter, opacity;
}

.wheel-item.current {
  cursor: grab;
}

.wheel-item.lifted {
  opacity: 0.3 !important;
}

.wheel-arrow {
  border: 0;
  background: var(--lav-2);
  color: var(--primary);
  width: 64px;
  height: 30px;
  border-radius: 100px;
  font-size: 14px;
  cursor: pointer;
}

.insert-btn {
  margin-top: 4px;
}

.order-done {
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  color: var(--ok);
}

.munasaba {
  margin-top: 14px;
}

.munasaba summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary);
  list-style: none;
}

.munasaba summary::-webkit-details-marker {
  display: none;
}

.munasaba summary::before {
  content: "▸ ";
}

.munasaba[open] summary::before {
  content: "▾ ";
}

.munasaba .mun-verse {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted-2);
}

.munasaba .mun-verse b {
  color: var(--ink);
}

.munasaba .mun-q {
  display: block;
  margin-top: 3px;
  font-style: italic;
  color: var(--primary);
}

.munasaba .mun-thread {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--lav-2);
  font-size: 13.5px;
  line-height: 1.45;
}

/* ---- Pausen ---- */

.activity {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity .h1 {
  font-size: 26px;
}

.dhikr-ar {
  font-family: "UthmanicHafs", serif;
  direction: rtl;
  text-align: center;
  font-size: 32px;
  line-height: 1.9;
  color: var(--primary);
  padding: 8px 4px;
}

.activity-timer {
  display: flex;
  justify-content: center;
}

.activity-timer .btn {
  max-width: 320px;
}

.ring.ring-small {
  width: min(52vw, 200px);
}

.ring.ring-small .ring-label b {
  font-size: 40px;
}

.time-up {
  text-align: center;
  font-weight: 800;
  color: var(--ok);
  font-size: 17px;
  padding: 6px;
}

.count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.count-row.disabled {
  opacity: 0.45;
}

.count-input {
  width: 84px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--line);
  font: inherit;
  font-size: 18px;
  text-align: center;
}

.count-input:focus {
  outline: none;
  border-color: var(--primary);
}

.dhikr-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dhikr-info p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
}

.dhikr-tr {
  font-weight: 700;
}

.dhikr-reward {
  color: var(--muted-2);
}

.timer-bar {
  position: sticky;
  top: 8px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(38, 36, 123, 0.25);
}

.timer-bar-label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.85;
}

.timer-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.timer-bar-track i {
  display: block;
  height: 100%;
  background: #fff;
  border-radius: 3px;
  transition: width 0.25s linear;
}

.timer-bar b {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.timer-bar.done {
  background: var(--ok);
}

/* Wer wird Millionär */
.wwm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 0%, #2d2a9a, #14124a 70%);
  box-shadow: 0 12px 30px rgba(20, 18, 74, 0.35);
}

.wwm-q {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  padding: 14px 16px;
  border: 2px solid #c9a55a;
  border-radius: 999px / 40px;
  background: linear-gradient(180deg, #1c1a66, #0f0e3a);
}

.wwm-q span {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #e8cf8f;
  margin-bottom: 4px;
}

.wwm-answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 520px) {
  .wwm-answers {
    grid-template-columns: 1fr 1fr;
  }
}

.wwm-a {
  text-align: left;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  padding: 12px 16px;
  border: 2px solid #c9a55a;
  border-radius: 999px / 40px;
  background: linear-gradient(180deg, #1c1a66, #0f0e3a);
  cursor: pointer;
  transition: background 0.2s ease;
}

.wwm-a b {
  color: #e8cf8f;
  margin-right: 4px;
}

.wwm-a:not(:disabled):hover {
  background: linear-gradient(180deg, #d9a43c, #b07a1c);
}

.wwm-a.right {
  background: linear-gradient(180deg, #19a36b, #0c7a4c);
}

.wwm-a.wrong {
  background: linear-gradient(180deg, #d0453a, #9c2219);
}

.wwm .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Lesetext */
.read-text h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
}

.read-text p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.6;
}

.read-q {
  margin: 4px 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.read-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.read-option {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.read-option.right {
  border-color: #19a36b;
  background: #e7f7ef;
}

.read-option.wrong {
  border-color: #d0453a;
  background: #fdecea;
}

.note-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
}

.note-field textarea {
  font: inherit;
  font-weight: 400;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  resize: vertical;
}

.note-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.done-icon.small {
  width: 64px;
  height: 64px;
  align-self: center;
  box-shadow: 0 0 0 8px rgba(38, 36, 123, 0.08);
}

.done-icon.small svg {
  width: 32px;
  height: 32px;
}

/* ======================================================================
   v3: Screens (Sure → Seite → Bereich), Tabs, Munāsaba, Fragment-Ansicht
   ====================================================================== */

/* ---- Schritte eines Ablaufs (ein Schritt pro Screen) ---- */

.wizard-steps {
  list-style: none;
  margin: 0;
  padding: 10px 16px 0;
  display: flex;
  gap: 6px;
}

.wizard-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 3px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.wizard-steps li span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.wizard-steps li span svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.wizard-steps li.past {
  border-color: var(--lav-3);
  color: var(--primary);
}

.wizard-steps li.now {
  border-color: var(--primary);
  color: var(--primary);
}

.wizard-steps li.now span,
.wizard-steps li.past span {
  background: var(--primary);
  color: #fff;
}

.eyebrow.dark {
  color: var(--primary);
}

.sura-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.content > .search {
  position: sticky;
  top: 8px;
  z-index: 4;
  box-shadow: 0 6px 18px rgba(38, 36, 123, 0.08);
}

/* Lerntage als Liste */
.weekday-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
}

.check-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--lav-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-box svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  opacity: 0;
}

.check-row.on {
  border-color: var(--primary);
  background: var(--lav-2);
}

.check-row.on .check-box {
  background: var(--primary);
  border-color: var(--primary);
}

.check-row.on .check-box svg {
  opacity: 1;
}

.check-row:focus-within {
  box-shadow: 0 0 0 3px rgba(38, 36, 123, 0.18);
}

/* ---- Tabs der Startseite ---- */

.content.with-tabbar {
  padding-bottom: 96px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.tabbar button {
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.tabbar svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.tabbar button[aria-current="page"] {
  color: var(--primary);
  background: var(--lav-2);
}

.progress-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.progress-head strong {
  font-size: 16px;
}

.progress-head small {
  color: var(--muted);
  font-weight: 600;
}

.progress-card .progress {
  display: block;
}

.empty-note p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ---- Umschalter Mushaf ⇄ Fragmente und Einblendungen ---- */

.view-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--chip);
  border-radius: 12px;
}

.view-switch button {
  border: 0;
  background: none;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}

.view-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
}

.toggle-row,
.prep-bar .toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  border: 1.5px solid currentColor;
  vertical-align: 1px;
}

.chip-btn.on .dot {
  background: currentColor;
}

.chip-btn:not(.on) {
  color: var(--muted);
}

/* ---- Munāsaba zwischen den Fragmenten ---- */

.frag-row.gap {
  border-bottom: 1px dashed rgba(29, 85, 148, 0.2);
}

.gap-main {
  padding: 8px 12px;
  direction: ltr;
}

.frag-slot.blank {
  background: none;
  border-color: transparent !important;
}

.mun-t {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted-2);
}

.mun-q {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--primary);
}

.frag-row.gap .gap-main {
  background: linear-gradient(90deg, rgba(185, 159, 111, 0.1), rgba(185, 159, 111, 0.02));
  border-left: 3px solid var(--primary-soft);
}

/* 1c: Lücken */
.frag-row.gap.open .gap-main {
  border-left: 0;
  background: none;
  margin: 6px 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(38, 36, 123, 0.25);
  border-radius: 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gap-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.frag-row.gap.open.armed .gap-main {
  border-color: var(--primary);
  cursor: pointer;
}

.frag-row.gap.open.armed .gap-label {
  color: var(--primary);
}

.frag-row.gap.open.drop-hover .gap-main {
  background: rgba(61, 100, 255, 0.12);
  border-color: var(--primary);
}

.frag-row.gap.shake .gap-main {
  animation: shake 0.4s ease;
  background: rgba(180, 35, 24, 0.08);
  border-color: var(--bad);
}

.frag-row.gap.placed.just .gap-main {
  animation: placed-in 0.5s ease;
}

@keyframes placed-in {
  from {
    background: rgba(15, 157, 143, 0.25);
  }
}

.mun-pool-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 18px;
}

.mun-pool-head h3 {
  margin: 0;
  font-size: 17px;
}

.mun-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 12px;
}

.mun-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--primary-soft);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.mun-card.selected {
  border-color: var(--primary);
  border-left-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 100, 255, 0.2);
}

.mun-card.dragging {
  opacity: 0.35;
}

.mun-card.shake {
  animation: shake 0.4s ease;
  border-color: var(--bad);
}

.drag-ghost.mun-ghost {
  background: #fff;
  border: 2px solid var(--primary);
  border-left: 4px solid var(--primary-soft);
  padding: 10px 12px;
  max-width: calc(100vw - 32px);
}

/* ---- Fragment-Ansicht zum Auswendiglernen ---- */

.read-sheet.no-emoji .frag-row {
  grid-template-columns: minmax(0, 1fr);
}

.frag-ar.read {
  font-size: 25px;
  line-height: 2;
}

.frag-ar.read .t {
  border-radius: 0.2em;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.frag-ar.read .w {
  position: relative;
  display: inline-block;
}

.frag-ar.read .ghost {
  opacity: 0.1;
}

.frag-ar.read .front {
  position: absolute;
  top: 0;
  right: 0;
  white-space: nowrap;
  pointer-events: none;
}

.frag-ar.read .front .hide {
  opacity: 0;
}

.frag-ar.read .active {
  background: rgba(63, 127, 196, 0.13);
  box-shadow: 0 0 0 0.08em rgba(63, 127, 196, 0.13);
}

.frag-ar.read .next {
  color: var(--m-blue-2);
  cursor: default;
}

.frag-row.tail .frag-main {
  min-height: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}

.emoji-chip.static {
  cursor: default;
}

/* ======================================================================
   Design-Kit „Quran verstehen lernen“ (uebungen.css): Farben nur über die
   Variablen aus :root, Bausteine mit denselben Namen und Zuständen.
   ====================================================================== */

body {
  font-family: var(--sans);
  line-height: 1.35;
}

/* ---- Kopfzeile und Fortschritt ---- */

.topbar.kit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(18px, env(safe-area-inset-top)) 16px 8px;
}

.topbar.kit .icon-btn {
  position: static;
}

.topbar.kit .topbar-title {
  flex: 1;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-side {
  width: 36px;
  flex-shrink: 0;
}

.topbar-side.count {
  width: auto;
  min-width: 36px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.topbar-side.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  width: auto;
}

.step-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.step-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.step-btn:hover:not(:disabled) {
  background: var(--chip);
  color: var(--primary);
}

.step-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.count-btn {
  border: 0;
  background: var(--chip);
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.progress.run {
  display: flex;
  align-items: center;
  gap: 12px;
  height: auto;
  padding: 4px 16px 10px;
  background: none;
  border-radius: 0;
  overflow: visible;
}

.progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--primary-2);
  border-radius: 4px;
  transition: width 0.25s;
}

.progress-score {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress-score.step,
.progress.run .progress-score {
  color: var(--muted);
}

/* ---- Abschnitt, Frage, Hinweis ---- */

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary-2);
  margin: 4px 2px 0;
}

.section-label .multi {
  color: var(--muted);
}

.frage {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 2px 0;
  color: var(--ink);
  text-align: center;
}

.frage.small {
  font-size: 18px;
  text-align: left;
}

.hinweis {
  font-size: 14px;
  color: var(--muted);
  margin: -6px 2px 0;
  text-align: center;
  line-height: 1.45;
}

.hinweis.top {
  margin-top: 0;
}

.how,
.hint {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
  margin: 6px 0 0;
}

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(107, 114, 128, 0.1);
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  white-space: nowrap;
}

.chip.now {
  background: var(--lav-2);
  color: var(--primary);
  font-style: normal;
}

.basmala {
  font-family: var(--ar);
  text-align: center;
  font-size: 24px;
  line-height: 1.8;
  color: var(--primary-2);
  margin: 4px 0;
}

/* ---- Knöpfe ---- */

.btn {
  padding: 15px 16px;
  border-radius: 16px;
  border: 2px solid var(--black);
  background: var(--black);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.btn:disabled {
  opacity: 1;
  background: #d6d3e0;
  border-color: #d6d3e0;
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--lav-3);
  font-size: 14px;
}

.btn.secondary:disabled {
  background: #fff;
  color: var(--lav-3);
  border-color: var(--line);
}

.btn.ok {
  background: var(--ok);
  border-color: var(--ok);
}

.btn.bad {
  background: var(--bad);
  border-color: var(--bad);
}

.nav-row {
  display: flex;
  gap: 10px;
}

.nav-row .btn-back {
  flex: 0 0 34%;
}

.footer.two {
  flex-direction: row;
}

.footer.two .btn {
  flex: 1;
}

/* ---- Karten ---- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: none;
}

.text-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ar-text {
  font-family: var(--ar);
  font-size: 34px;
  line-height: 2;
  margin: 0;
  text-align: center;
  white-space: pre-wrap;
  color: var(--ink);
}

/* ---- Optionen ---- */

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

.option {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--line);
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.12s, background 0.12s;
}

.option:hover:not(:disabled) {
  border-color: var(--lav-3);
}

.option.selected,
.option.on {
  border-color: var(--primary);
  background: var(--lav-2);
}

.option:disabled {
  cursor: default;
  opacity: 1;
  background: #fff;
}

.option.ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.option.bad {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.option.missed {
  border-color: var(--ok-line);
  border-style: dashed;
  background: #fff;
}

.option.dim {
  opacity: 0.55;
}

.option::after {
  content: none !important;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option .option-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}

.option .box,
.box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--lav-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  background: #fff;
  color: #fff;
}

.option.selected .box {
  background: var(--primary);
  border-color: var(--primary);
}

.option:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.option .letter,
.letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.option.ok .letter,
.option.missed .letter {
  background: var(--ok-line);
  color: #fff;
}

.option.bad .letter {
  background: var(--bad-line);
  color: #fff;
}

.option .mark,
.mark {
  font-size: 20px;
  font-weight: 800;
}

.option.ok .mark,
.option.missed .mark {
  color: var(--ok);
}

.option.bad .mark {
  color: var(--bad);
}

/* Menge pro Tag: fünf kleine Optionen nebeneinander */
.options.options-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.options-5 .option {
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 4px;
  min-height: 72px;
  text-align: center;
}

.options-5 .option b {
  font-size: 22px;
  color: var(--ink);
}

.options-5 .option span {
  font-size: 12px;
  color: var(--muted);
}

.options-5 .option.selected b {
  color: var(--primary);
}

.summary .summary-row {
  color: var(--ink);
}

.summary small {
  color: var(--muted);
}

/* ---- Rückmeldung ---- */

.feedback {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 20px;
  animation: rise 0.18s ease-out;
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
}

.feedback.ok {
  background: var(--ok-bg);
}

.feedback.bad {
  background: var(--bad-bg);
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.feedback.ok .feedback-head {
  color: var(--ok);
}

.feedback.bad .feedback-head {
  color: var(--bad);
}

.feedback-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.solution {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.solution-list {
  font-weight: 700;
  color: var(--ok);
}

.score-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-top: -4px;
}

/* ---- Pausen ---- */

.activity {
  gap: 14px;
}

.timer-bar {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(38, 36, 123, 0.08);
}

.timer-bar-label {
  color: var(--primary-2);
}

.timer-bar-track {
  background: var(--track);
}

.timer-bar-track i {
  background: var(--primary-2);
}

.timer-bar b {
  color: var(--ink);
}

.timer-bar.done b {
  color: var(--ok);
}

.ring .track {
  stroke: var(--track);
}

.ring .bar {
  stroke: var(--primary-2);
}

.time-up {
  color: var(--ok);
  font-weight: 800;
  text-align: center;
}

.count-row {
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.num,
.count-input {
  width: 84px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip);
  font: inherit;
  font-size: 16px;
  text-align: center;
  color: var(--ink);
}

.dhikr-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dhikr-info p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
}

.read-text h2 {
  color: var(--primary-2);
}

.read-text p {
  font-size: 15.5px;
  line-height: 1.6;
}

.note-field span {
  font-weight: 700;
}

.note-field textarea {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip);
  font-family: var(--sans);
}

.note-field textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

/* ---- Segment-Schalter und Schalter ---- */

.seg {
  display: inline-flex;
  background: var(--chip);
  border-radius: 12px;
  padding: 3px;
}

.seg-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.seg-btn.on {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.1);
}

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: var(--lav-3);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  margin: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch:checked {
  background: var(--primary);
}

.switch:checked::after {
  transform: translateX(16px);
}

.switch:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.toggle-row {
  gap: 10px 14px;
}

/* ---- Rezitation als Audio-Karte ---- */

.player.audio-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--lav-2);
  border: 0;
  box-shadow: none;
}

.audio-card .play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: none;
}

.audio-card .play-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.audio-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.audio-note {
  font-size: 13px;
  color: var(--primary-2);
  font-weight: 700;
}

.audio-reciter {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-card .restart-btn {
  font-size: 12px;
}

.audio-track {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.audio-track i {
  display: block;
  height: 100%;
  background: var(--primary-2);
  pointer-events: none;
}

/* ---- Listen: Suren, Seiten, Viertel, Lerntage ---- */

.search {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
}

.sura-row,
.part-row,
.lesson-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.sura-row:hover,
.part-row:hover,
.lesson-card:hover {
  border-color: var(--lav-3);
}

.sura-row[aria-selected="true"],
.part-row[aria-selected="true"],
.lesson-card.current {
  border: 1px solid var(--primary-soft);
  background: var(--lav);
}

.num-badge {
  background: var(--lav-2);
  color: var(--primary);
}

.lesson-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lesson-card-title {
  font-size: 16px;
  font-weight: 700;
}

.lesson-card-sub {
  font-size: 14px;
  color: var(--muted);
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dot svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.dot.done {
  border: 2px solid var(--ok-line);
  color: var(--ok-line);
}

.dot.open {
  border: 2px dashed #c1c0c9;
}

.page-chip {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.page-chip[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--lav-2);
}

.day-dot {
  background: #fff;
  border: 2px dashed #c1c0c9;
  color: var(--muted);
}

.day.done .day-dot {
  border: 2px solid var(--ok-line);
  background: #fff;
  color: var(--ok-line);
}

.day.current .day-dot {
  border: 2px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.day.current {
  background: var(--lav);
  border-radius: 14px;
}

/* ---- Startseite ---- */

.hello {
  border-radius: 16px;
}

.hello-main strong {
  color: var(--primary-2);
}

.hero-title {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--primary-2);
}

.today-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.today-card .today-title {
  color: var(--ink);
  font-size: 22px;
  margin: 0;
}

.today-card .unit-list {
  color: var(--ink);
}

.today-card .unit-list small {
  color: var(--muted);
}

.today-card .unit-list li.done {
  color: var(--ok);
}

.today-card .unit-list li.now {
  color: var(--primary);
}

.today-card .today-meta {
  color: var(--muted);
}

.progress-card .progress {
  background: var(--track);
}

.progress-card .progress i,
.card .progress i {
  background: var(--ok-line);
}

.tabbar button[aria-current="page"] {
  color: var(--primary);
  background: var(--lav);
}

/* ---- Auswertung / Abschluss ---- */

.content.result {
  text-align: center;
  padding-top: 24px;
  align-items: stretch;
}

.result .done-icon {
  align-self: center;
  background: var(--ok-bg);
  color: var(--ok);
  box-shadow: none;
}

.result .done-icon svg {
  fill: var(--ok);
}

.result-title {
  margin: 0;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.result-sub {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
  color: var(--muted);
}

.score-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.score-num {
  font-size: 26px;
  font-weight: 800;
}

.score-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-2);
}

/* ---- Übungen mit Fragmenten (1a, 1b, 1c, Lernen) ---- */

.prep-bar {
  margin: 4px 0 10px;
}

.prep-bar .status-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-2);
}

.frag-sheet {
  background: none;
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frag-row {
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px 8px 14px;
  min-height: 64px;
  transition: border-color 0.12s, background 0.12s;
}

.frag-row:last-child {
  border-bottom: 2px solid var(--line);
}

.frag-main {
  padding: 0;
  min-height: 0;
  background: none !important;
  box-shadow: none !important;
  animation: none !important;
}

.frag-ar {
  font-family: var(--ar);
  font-size: 26px;
  line-height: 1.8;
  color: var(--ink);
}

.frag-de {
  font-size: 14px;
  color: var(--muted-2);
}

.frag-slot {
  align-self: stretch;
  min-height: 52px;
  border-radius: 12px;
  border: 2px dashed var(--lav-3);
  border-left: 2px dashed var(--lav-3);
  background: none;
  background-image: none !important;
}

.frag-slot.filled {
  border-color: transparent;
}

.frag-slot.drop-hover,
.emoji-tray.drop-hover {
  border-color: var(--primary);
  border-style: solid;
  background: var(--lav-2);
}

.emoji-chip {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 0 2px 0 var(--line);
}

.emoji-chip.in-slot {
  width: 46px;
  height: 46px;
  box-shadow: none;
}

.emoji-chip.selected {
  border-color: var(--primary);
  background: var(--lav-2);
  box-shadow: none;
}

.emoji-tray {
  border-radius: 16px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(38, 36, 123, 0.08);
}

.drag-ghost {
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(38, 36, 123, 0.25);
}

.drag-ghost.frag-ghost,
.drag-ghost.mun-ghost {
  border: 2px solid var(--primary);
  background: #fff;
}

.drag-ghost.frag-ghost {
  font-family: var(--ar);
}

/* 1b: gesuchte und eingesetzte Zeilen */
.frag-row.empty {
  background: rgba(255, 255, 255, 0.6);
}

.frag-row.wanted {
  border: 2px dashed var(--primary);
  background: var(--lav-2);
  animation: none;
}

.frag-hole {
  font-size: 13px;
  color: var(--muted);
}

.frag-row.wanted .frag-hole {
  color: var(--primary);
}

.frag-sheet.drop-hover .frag-row.wanted {
  border-style: solid;
}

.frag-row.placed {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.frag-row.shake {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.frag-row.placed:not(.gap) {
  position: relative;
}

.frag-row.placed:not(.gap)::after {
  content: "✓";
  position: absolute;
  top: 6px;
  left: 10px;
  font-weight: 800;
  color: var(--ok);
}

.frag-row.shake .frag-main::after {
  content: "✕ Nicht dieses Fragment";
  font-size: 13px;
  font-weight: 800;
  direction: ltr;
  text-align: center;
  color: var(--bad);
}

.order-done {
  color: var(--ok);
}

.order-done::before {
  content: "✓ ";
}

/* Auswahlrad */
.wheel {
  border: 2px solid var(--line);
  border-radius: 16px;
}

.wheel-band {
  background: var(--lav-2);
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
}

.wheel-item {
  font-family: var(--ar);
  color: var(--ink);
}

.wheel-arrow {
  background: var(--chip);
  color: var(--primary);
  border-radius: 10px;
}

/* Munāsaba-Teile */
.frag-row.gap {
  display: block;
  padding: 0;
  min-height: 0;
  background: none;
  border: 0;
  border-radius: 16px;
}

.frag-row.gap .frag-slot.blank {
  display: none;
}

.frag-row.gap .gap-main {
  background: var(--lav-2);
  border: 0;
  border-radius: 16px;
  padding: 10px 14px;
}

.mun-t {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}

.mun-q {
  font-size: 14.5px;
  color: var(--primary-2);
}

/* 1c: Lücken */
.frag-row.gap.open .gap-main {
  margin: 0;
  min-height: 52px;
  background: none;
  border: 2px dashed var(--lav-3);
  border-radius: 16px;
}

.frag-row.gap.open.armed .gap-main {
  border-color: var(--primary);
}

.frag-row.gap.open.armed .gap-label {
  color: var(--primary);
}

.frag-row.gap.open.drop-hover .gap-main {
  border-color: var(--primary);
  border-style: solid;
  background: var(--lav-2);
}

.frag-row.gap.shake .gap-main {
  border: 2px solid var(--bad-line);
  background: var(--bad-bg);
}

.frag-row.gap.shake .gap-label::before {
  content: "✕ ";
  color: var(--bad);
}

.frag-row.gap.placed .gap-main {
  position: relative;
  background: var(--ok-bg);
  border: 2px solid var(--ok-line);
  padding-right: 34px;
}

.frag-row.gap.placed .gap-main::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 12px;
  font-weight: 800;
  color: var(--ok);
}

.frag-row.gap.placed.just .gap-main {
  animation: rise 0.25s ease-out;
}

.mun-pool-head h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary-2);
}

.mun-pool-head .status-text {
  font-size: 13px;
  color: var(--muted);
}

.mun-card {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 0 var(--line);
}

.mun-card:hover {
  border-color: var(--lav-3);
}

.mun-card.selected {
  border-color: var(--primary);
  background: var(--lav-2);
  box-shadow: none;
}

.mun-card.shake {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

/* Lernen in der Fragment-Ansicht */
.read-sheet .frag-row.gap .gap-main {
  background: var(--lav-2);
}

.frag-row.tail {
  background: rgba(255, 255, 255, 0.6);
  border-style: dashed;
  min-height: 0;
}

.range-caption {
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* =====================================================================
   Startseite: eine Auswahl (Juz, Sure mit Versen, Seite) – aufklappbar
   ===================================================================== */

.sel-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.sel-row + .sel-row {
  border-top: 1px solid var(--line);
}

.sel-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.sel-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--lav-3);
  flex-shrink: 0;
  position: relative;
}

.sel-row.active .sel-dot {
  border-color: var(--primary);
}

.sel-row.active .sel-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
}

.sel-label {
  width: 48px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.sel-value {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sel-value b {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted-2);
}

.sel-value span {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sel-row.active .sel-value b {
  color: var(--ink);
}

.sel-row.active {
  background: var(--lav-2);
}

.sel-chev svg {
  width: 22px;
  height: 22px;
  fill: var(--muted);
  transition: transform 0.15s;
  display: block;
}

.sel-row.open .sel-chev svg {
  transform: rotate(180deg);
}

.sel-body {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.juz-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.juz-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 2px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.juz-chip b {
  font-size: 16px;
  color: var(--ink);
}

.juz-chip span {
  font-size: 10.5px;
  color: var(--muted);
}

.juz-chip[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--lav-2);
}

.verse-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--lav-2);
}

.verse-range .vr-name {
  font-weight: 800;
  color: var(--primary);
  margin-right: auto;
}

.verse-range label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-2);
}

.verse-range select {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--lav-3);
  background: #fff;
  color: var(--ink);
}

.sura-list.compact {
  max-height: 44vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  gap: 0;
}

.sura-list.compact .sura-row {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.sura-list.compact .sura-row[aria-selected="true"] {
  background: var(--lav-2);
}

.page-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.page-input {
  width: 96px;
  font-size: 20px;
  font-weight: 800;
}

.page-range {
  width: 100%;
  accent-color: var(--primary);
}

.resume-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  border: 2px solid var(--lav-3);
}

.resume-card strong {
  font-size: 16px;
}

.resume-card span:last-child {
  font-size: 13px;
  color: var(--muted);
}

.test-link {
  align-self: center;
}

/* =====================================================================
   Seitenauswahl: Viertel – Hälfte – ganze Seite, Markierung beim Überfahren
   ===================================================================== */

.pick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-nav .icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-nav-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  line-height: 1.15;
}

.page-nav-label b {
  font-size: 15px;
}

.page-nav-label small {
  font-size: 11.5px;
  color: var(--muted);
}

.pick-hint {
  margin-top: -4px;
  font-size: 14px;
}

.mushaf.pick .t.off {
  opacity: 0.22;
}

.mushaf.pick .t[data-q] {
  cursor: pointer;
}

.mushaf.pick .t.hl {
  background: rgba(47, 104, 178, 0.17);
  box-shadow: 0 0 0 0.09em rgba(47, 104, 178, 0.17);
}

/* =====================================================================
   Lückentext auf der Mushaf-Seite
   ===================================================================== */

.ml .t.hid {
  opacity: 0;
}

.ml .t.gap {
  color: transparent;
  background: rgba(47, 104, 178, 0.06);
  box-shadow: inset 0 -0.07em 0 rgba(47, 104, 178, 0.45);
}

.ml .t.gap.now {
  background: rgba(47, 104, 178, 0.16);
  box-shadow: 0 0 0 0.06em var(--mp-blue);
  animation: gap-pulse 1.4s ease-in-out infinite;
}

@keyframes gap-pulse {
  50% {
    background: rgba(47, 104, 178, 0.28);
  }
}

.ml .t.fill {
  color: var(--ok);
  background: var(--ok-bg);
  box-shadow: 0 0 0 0.06em var(--ok-line);
}

/* =====================================================================
   Übungen in den Pausen
   ===================================================================== */

.ex-ar {
  font-family: "MadinaHafs", var(--ar);
  direction: rtl;
  unicode-bidi: isolate;
}

.ex-end {
  font-family: var(--ar);
}

.footer.ex-footer {
  background: linear-gradient(to bottom, rgba(241, 238, 246, 0), rgba(241, 238, 246, 0.97) 14px);
  padding-top: 14px;
}

.ex-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(38, 36, 123, 0.12);
}

.ex-de {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
}

.ex-de .label {
  margin-right: 4px;
}

.ex-q {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.ex-note {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.ex-note.ok {
  color: var(--ok);
}

.ex-note .ex-ar {
  font-size: 18px;
}

.word-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.word-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 62px;
  padding: 6px 10px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.word-opt:hover:not(:disabled) {
  border-color: var(--lav-3);
}

.word-opt .ex-ar {
  font-size: 25px;
  line-height: 1.55;
  color: var(--ink);
}

.word-opt .de {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  text-align: center;
}

.word-opt[data-letter]::before {
  content: attr(data-letter);
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-soft);
}

.word-opt .mark {
  position: absolute;
  right: 10px;
  top: 6px;
  font-size: 16px;
  font-weight: 800;
}

.word-opt.ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.word-opt.ok .mark {
  color: var(--ok);
}

.word-opt.bad {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.word-opt.bad .mark {
  color: var(--bad);
}

.word-opt.dim {
  opacity: 0.5;
}

.word-opt:disabled {
  cursor: default;
}

.shake {
  animation: shake 0.38s;
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.nav-row.small .btn {
  padding: 10px 12px;
  font-size: 13px;
}

.ex-wait {
  align-items: stretch;
  text-align: center;
}

.ex-wait .activity-timer {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

/* Abschnitt als Text (Fragen) */
.ex-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ex-text-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.ex-frag {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  text-align: right;
}

.ex-frag .ex-ar {
  font-size: 24px;
  line-height: 1.9;
  color: var(--ink);
}

.ex-frag-de {
  margin: 0;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

/* Munāsaba */
.ex-ask {
  position: sticky;
  top: 6px;
  z-index: 3;
  box-shadow: 0 8px 24px rgba(38, 36, 123, 0.12);
}

.ex-ask .hinweis {
  margin: 4px 0 0;
  font-size: 13px;
  text-align: left;
}

.mun-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mun-item {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 8px 10px 8px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  text-align: right;
  font: inherit;
}

button.mun-item {
  cursor: pointer;
}

button.mun-item:hover {
  border-color: var(--lav-3);
}

.mun-item.placed {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.mun-item.shake {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.mun-main {
  flex: 1;
  min-width: 0;
}

.mun-main .ex-ar {
  font-size: 23px;
  line-height: 1.9;
  color: var(--ink);
}

.mun-emoji {
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border-radius: 12px;
  background: #fff;
}

.mun-emoji.empty {
  background: var(--chip);
  border: 2px dashed var(--lav-3);
}

.order-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-slots .slot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 2px dashed var(--lav-3);
  background: rgba(255, 255, 255, 0.5);
}

.order-slots .slot.next {
  border-color: var(--primary);
  background: var(--lav-2);
}

.order-slots .slot.filled {
  border-style: solid;
  border-color: var(--ok-line);
  background: var(--ok-bg);
  animation: rise 0.18s ease-out;
}

.order-slots .slot-no {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-soft);
}

.order-slots .emo,
.order-chip .emo {
  font-size: 24px;
  flex-shrink: 0;
}

.order-slots .txt,
.order-chip .txt {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

.order-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}

.order-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.order-chip:hover {
  border-color: var(--lav-3);
}

.order-chip.shake {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.emoji-row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.order-slots.emoji-row .slot,
.order-chip.emoji-only {
  width: 58px;
  height: 58px;
  min-height: 0;
  padding: 0;
  justify-content: center;
}

.order-chip.emoji-only .emo,
.order-slots.emoji-row .emo {
  font-size: 30px;
}

.emoji-story {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 32px;
}

/* =====================================================================
   Vorbereitung: Zeilen wie im Mushaf mit Übersetzung, Nacherzählung,
   Schlüsselwörter ordnen, Übersetzung zuordnen, Emojis ordnen
   ===================================================================== */

/* Breiter als die Spalte wie die Mushaf-Seite, Zeilenbreite = Satzbreite */
.prep-text {
  --w: min(calc(100vw - 16px), 640px);
  width: var(--w);
  margin-left: calc((100% - var(--w)) / 2);
  background: var(--mp-text-bg);
  border: 1px solid var(--mp-blue-light);
  border-radius: 16px;
  padding: 10px 14px 6px;
}

.prep-lines {
  font-family: "MadinaHafs", var(--ar);
  font-size: var(--mushaf-size);
  color: var(--mp-ink);
}

.pl-pair + .pl-pair {
  border-top: 1px solid rgba(47, 104, 178, 0.12);
}

.pl-ar {
  direction: rtl;
  padding-top: 0.2em;
}

.prep-lines .ml {
  position: relative;
  height: 1.75em;
  margin: 0 auto;
}

.prep-lines .t.void {
  visibility: hidden;
}

.pl-de {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--primary-2);
}

/* Nacherzählung im Format der Vorgabe */
.story {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 16px 14px;
  text-align: left;
}

.story h2 {
  margin: 18px 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.story h3 {
  margin: 14px 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.story h3 .ar-inline {
  font-size: 26px;
  line-height: 1.6;
}

.story-p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.story-note {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 4px solid var(--lav-3);
  background: var(--lav-2);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted-2);
}

.story-note strong {
  display: block;
  color: var(--primary);
  font-style: normal;
}

.ar-inline {
  font-family: "MadinaHafs", var(--ar);
  font-size: 1.3em;
  font-weight: 400;
  unicode-bidi: isolate;
  direction: rtl;
}

/* Sortieren */
.sortable {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.sort-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: border-color 0.12s, background 0.12s;
}

.sort-item:hover {
  border-color: var(--lav-3);
}

.sort-item.selected {
  border-color: var(--primary);
  background: var(--lav-2);
}

.sort-item.ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.sort-item.bad {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.sort-item.dragging {
  opacity: 0.35;
}

.sort-item.drop-hover {
  border-color: var(--primary);
  border-style: dashed;
}

.sortable.done .sort-item {
  cursor: default;
}

.sort-item .grip {
  color: var(--lav-3);
  font-size: 18px;
  line-height: 1;
}

.kw-de {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.kw-emo {
  font-size: 26px;
  line-height: 1;
}

.kw-ar {
  font-family: "MadinaHafs", var(--ar);
  font-size: 27px;
  line-height: 1.7;
  direction: rtl;
  unicode-bidi: isolate;
  color: var(--ink);
}

.sort-arrow {
  align-self: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--lav-3);
  line-height: 1.2;
}

/* Emojis: nebeneinander, Pfeile dazwischen */
.sortable.sort-emojis {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.sort-emojis .sort-item {
  width: 60px;
  height: 60px;
  min-height: 0;
  padding: 0;
  justify-content: center;
}

.sort-emojis .kw-emo {
  font-size: 32px;
}

.check-btn {
  align-self: center;
  padding: 10px 26px;
}

.drag-ghost.sort-ghost {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--primary);
}

.drag-ghost.chip-ghost {
  padding: 10px 14px;
  background: #fff;
  border: 2px solid var(--primary);
  font-weight: 700;
  width: auto !important;
}

/* Übersetzung zuordnen: Platzhalter links, arabisches Wort rechts */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.match-row .kw-ar {
  margin-left: auto;
}

.match-slot {
  flex: 0 0 48%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 12px;
  border: 2px dashed var(--lav-3);
  background: var(--chip);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.match-slot.armed {
  border-color: var(--primary);
  background: var(--lav-2);
  cursor: pointer;
}

.match-slot.drop-hover {
  border-color: var(--primary);
  background: var(--lav-2);
}

.match-slot.filled {
  border-style: solid;
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.match-slot.shake {
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.match-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 4px;
}

.match-chip {
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: grab;
  touch-action: manipulation;
}

.match-chip.selected {
  border-color: var(--primary);
  background: var(--lav-2);
}

.match-chip.dragging {
  opacity: 0.35;
}

/* =================================================================
   Nachbereitung: Dhikr-Aufgaben, Lesetext mit drei Fragen,
   Ordnen mit dem Auswahlrad, Zusammenhang, Tresor
   ================================================================= */

/* ---- Dhikr-Aufgaben (1 Minute) ---- */

.dhikr-task {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 18px 16px 14px;
}

.dhikr-times {
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 46px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.dhikr-task .ar-text {
  font-size: 30px;
  line-height: 1.9;
  padding: 0 34px;
}

.dhikr-task .dhikr-tr {
  margin: 0;
  font-weight: 700;
  color: var(--primary-2);
  font-size: 15px;
}

.dhikr-task .dhikr-de {
  margin: 0;
  color: var(--muted-2);
  font-size: 14.5px;
  line-height: 1.45;
}

.dhikr-task .dhikr-reward {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted-2);
  text-align: left;
  align-self: stretch;
}

.dhikr-task .dhikr-reward summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary-soft);
  text-align: center;
}

.dhikr-task .dhikr-reward p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.tap-counter {
  align-self: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--primary);
  background: radial-gradient(circle at center, #fff 0 60%, transparent 61%), conic-gradient(var(--primary-2) var(--p, 0%), var(--track) 0);
  box-shadow: var(--shadow-card);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.tap-counter:active {
  transform: scale(0.96);
}

.tap-counter b {
  font-size: 38px;
  line-height: 1;
}

.tap-counter span {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.tap-counter small {
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  max-width: 90px;
  line-height: 1.2;
}

.dhikr-done {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dhikr-done .label {
  width: 100%;
}

.dhikr-chip {
  padding: 5px 10px;
  border-radius: 100px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 12.5px;
  font-weight: 700;
}

.time-up.big {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 20px;
  padding: 24px 0 8px;
}

.time-up.big small {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-2);
}

/* ---- Lesetext mit drei Fragen ---- */

.text-question {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

/* ---- Ordnen (Blatt oben, Auswahlrad unten) ---- */

.sort-sheet {
  background: var(--paper);
  border: 1.5px solid var(--m-blue);
  border-radius: 10px;
  box-shadow: 0 0 0 4px var(--m-blue-wash), 0 8px 24px rgba(29, 85, 148, 0.12);
  padding: 4px 0;
  overflow: hidden;
}

.sort-sheet.drop-hover {
  box-shadow: 0 0 0 4px rgba(61, 100, 255, 0.35), 0 8px 24px rgba(29, 85, 148, 0.12);
}

.sort-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border-bottom: 1px dashed rgba(29, 85, 148, 0.2);
}

.sort-row:last-child {
  border-bottom: 0;
}

.sort-no {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--m-blue);
  border-right: 1px dashed rgba(29, 85, 148, 0.2);
}

.sort-cell {
  padding: 6px 12px;
  min-width: 0;
}

.sort-row.empty .sort-cell {
  min-height: 40px;
}

.sort-row.wanted .sort-cell {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 100, 255, 0.07);
  box-shadow: inset 0 0 0 2px rgba(61, 100, 255, 0.45);
  animation: wanted-pulse 1.6s ease-in-out infinite;
}

.sort-hole {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.sort-row.placed .sort-cell {
  animation: screen-in 0.3s ease;
}

.sort-row.shake {
  animation: shake 0.4s ease;
}

.sort-row.shake .sort-cell {
  background: var(--bad-bg);
  box-shadow: inset 0 0 0 2px var(--bad-line);
}

.kw-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kw-line .kw-de {
  font-size: 16px;
  text-align: left;
}

.kw-line .kw-ar {
  font-size: 24px;
}

.kw-frag {
  font-family: "MadinaHafs", var(--ar);
  font-size: 21px;
  line-height: 1.9;
  color: var(--m-ink);
  text-align: right;
  border-top: 1px solid rgba(29, 85, 148, 0.12);
  margin-top: 2px;
  padding-top: 2px;
}

.kw-frag .ayah-end,
.ctx-ar .ayah-end,
.vault-ar .ayah-end,
.vault-opt-ar .ayah-end,
.vault-practice .ayah-end {
  font-family: "UthmanicHafs", serif;
  color: var(--mp-blue);
}

.kw-emo.big {
  display: block;
  font-size: 34px;
  text-align: center;
}

.sort-sheet.kind-2 .sort-row {
  min-height: 48px;
}

/* Rad in der Fußleiste: bleibt beim Scrollen sichtbar */
.footer.wheel-footer {
  background: linear-gradient(to bottom, rgba(241, 238, 246, 0), rgba(241, 238, 246, 0.97) 14px);
  padding-top: 16px;
}

.wheel-wrap.in-footer {
  margin-top: 0;
  gap: 8px;
}

.wheel-wrap.in-footer .wheel {
  height: 172px;
  box-shadow: 0 6px 22px rgba(38, 36, 123, 0.12);
}

.wheel-wrap.in-footer.kind-0 .wheel {
  height: 214px;
}

.wheel-wrap.in-footer .wheel-arrow {
  position: absolute;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 30px;
  font-size: 12px;
  opacity: 0.9;
}

.wheel-wrap.in-footer .wheel-arrow.up {
  top: 8px;
}

.wheel-wrap.in-footer .wheel-arrow.down {
  bottom: 8px;
}

.wheel-wrap.in-footer .insert-btn {
  width: 100%;
  margin: 0;
}

.wheel-item.kind-0,
.wheel-item.kind-1,
.wheel-item.kind-2 {
  font-family: var(--sans);
  direction: ltr;
  padding: 6px 54px 6px 16px;
}

.wheel-item.kind-1 .kw-line,
.wheel-item.kind-0 .kw-line {
  justify-content: center;
}

.wheel-item.kind-1 .kw-de,
.wheel-item.kind-0 .kw-de {
  flex: 0 1 auto;
}

.wheel-item.kind-0 .kw-frag {
  direction: rtl;
  text-align: center;
  font-size: 19px;
  line-height: 1.8;
  border-top: 0;
}

.wheel-item.nope {
  animation: shake 0.4s ease;
}

.drag-ghost.sort-ghost {
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--primary);
  font-family: var(--sans);
}

.drag-ghost.sort-ghost .kw-line {
  justify-content: center;
}

/* ---- Zusammenhang nach al-Biqāʿī ---- */

.ctx {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctx-note {
  margin: 0;
  padding: 10px 14px;
  border-left: 4px solid var(--m-gold);
  background: #fffaf0;
  border-radius: 0 12px 12px 0;
}

.ctx-note p {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--muted-2);
}

.ctx-note.inner {
  margin: 0 0 0 14px;
  border-left-color: var(--m-blue-light);
  background: var(--m-blue-wash);
}

.ctx-note.before,
.ctx-note.after {
  border-left-color: var(--primary-soft);
  background: var(--lav-2);
}

.ctx-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--primary-soft);
}

.ctx-verse {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 14px;
}

.ctx-verse-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--primary);
  font-size: 14px;
}

.ctx-frag {
  padding: 4px 4px 8px;
  border-bottom: 1px dashed var(--line);
}

.ctx-frag:last-child {
  border-bottom: 0;
}

.ctx-ar {
  font-family: "MadinaHafs", var(--ar);
  font-size: 25px;
  line-height: 2;
  color: var(--m-ink);
  text-align: right;
}

.ctx-ar .t[data-key] {
  cursor: pointer;
  border-radius: 0.2em;
}

.ctx-ar .t.active {
  background: rgba(47, 104, 178, 0.13);
}

.ctx-de {
  margin: 2px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted-2);
}

.ctx-kws {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ctx-kw {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 6px;
  border-radius: 100px;
  background: var(--chip);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.ctx-kw .kw-emo {
  font-size: 17px;
}

/* ---- Tresor ---- */

/* Stellen im Tresor: im Mushaf und im Zusammenhang markiert */
.ml .t.vault,
.ctx-ar .t.vault {
  background: rgba(205, 91, 82, 0.13);
  box-shadow: 0 0.1em 0 rgba(205, 91, 82, 0.55);
}

.range-caption .vault-note {
  color: var(--bad);
  font-weight: 700;
}

.vault-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.vault-row-icon {
  font-size: 22px;
}

.vault-sheet .hinweis {
  margin: 6px 0 0;
}

.vault-opt {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.vault-opt:hover {
  border-color: var(--lav-3);
  background: var(--lav-2);
}

.vault-opt .vault-kind {
  grid-row: 1 / span 2;
}

.vault-opt-ar {
  font-family: "MadinaHafs", var(--ar);
  font-size: 23px;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
}

.vault-opt-ref {
  font-weight: 700;
  font-size: 15px;
}

.vault-opt-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--bad);
}

.vault-opt.play .vault-opt-ref {
  color: var(--primary);
}

.vault-kind {
  display: inline-flex;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--lav);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.vault-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vault-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-item.solid {
  opacity: 0.7;
}

.vault-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.vault-ref {
  font-weight: 800;
  color: var(--ink);
}

.vault-n {
  margin-left: auto;
  font-weight: 800;
  color: var(--bad);
}

.vault-ok {
  font-weight: 700;
  color: var(--ok);
}

.vault-solid {
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 800;
}

.vault-ar {
  font-family: "MadinaHafs", var(--ar);
  font-size: 25px;
  line-height: 2;
  direction: rtl;
  text-align: right;
  color: var(--m-ink);
}

.vault-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn.quiet {
  margin-left: auto;
  color: var(--muted);
  border-color: var(--line);
}

.vault-empty {
  text-align: center;
  padding: 24px 18px;
}

.vault-empty-icon {
  font-size: 40px;
}

.vault-empty p {
  margin: 6px 0;
}

.vault-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--mp-text-bg);
  border-color: var(--mp-blue-light);
}

.vault-cue-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--mp-blue);
}

.vault-practice {
  font-family: "MadinaHafs", var(--ar);
  font-size: 27px;
  line-height: 2.1;
  text-align: right;
  color: var(--m-ink);
}

.vault-practice .dots {
  color: var(--muted);
}

.vault-break {
  display: block;
  height: 4px;
}

.vault-hole {
  display: inline-block;
  height: 1.1em;
  vertical-align: middle;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, rgba(205, 91, 82, 0.1) 0 6px, rgba(205, 91, 82, 0.2) 6px 12px);
  border: 1.5px dashed rgba(205, 91, 82, 0.55);
}

.vault-target.shown {
  background: rgba(205, 91, 82, 0.12);
  border-radius: 8px;
  padding: 0 4px;
  animation: screen-in 0.3s ease;
}

.btn.ok-btn {
  flex: 1;
  background: var(--ok);
  border-color: var(--ok);
}

.btn.bad-btn {
  flex: 1;
  background: var(--bad);
  border-color: var(--bad);
}

.toast {
  position: fixed;
  left: 50%;
  top: 74px;
  z-index: 200;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 100px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(38, 36, 123, 0.3);
  animation: screen-in 0.25s ease;
  transition: opacity 0.4s ease;
  max-width: calc(100vw - 32px);
}

.toast.out {
  opacity: 0;
}

.peek-row {
  display: flex;
  justify-content: center;
  margin-top: -4px;
}

.wheel-item.kind-2 .kw-emo.big {
  font-size: 40px;
  line-height: 1.3;
}

/* Kleine Bildschirme: Rad etwas flacher, damit oben genug vom Blatt bleibt */
@media (max-height: 720px) {
  .wheel-wrap.in-footer .wheel {
    height: 138px;
  }

  .wheel-wrap.in-footer.kind-0 .wheel {
    height: 176px;
  }

  .footer.wheel-footer .how {
    display: none;
  }
}

/* ---- Ordnen 1: Kästchen „Deutsch EMOJI Arabisch“ den Versstücken zuordnen ---- */

.match-wrap {
  --kw-w: auto;
  --kw-h: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Kästchen oben: bleiben beim Scrollen sichtbar */
.kw-pool {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 -16px;
  padding: 10px 16px;
  background: rgba(241, 238, 246, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 14px -10px rgba(38, 36, 123, 0.35);
}

.kw-card,
.kw-slot {
  width: var(--kw-w);
  height: var(--kw-h);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 0 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
}

.kw-card {
  border: 2px solid var(--line);
  background: #fff;
  cursor: grab;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 2px 6px rgba(38, 36, 123, 0.08);
}

.kw-card.selected {
  border-color: var(--primary);
  background: var(--lav-2);
  box-shadow: 0 0 0 3px rgba(61, 100, 255, 0.25);
}

.kw-card.dragging {
  opacity: 0.3;
}

.kw-card .kw-de,
.kw-slot .kw-de,
.kw-probe .kw-de,
.drag-ghost.kw-ghost .kw-de {
  flex: 0 1 auto;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
}

.kw-card .kw-emo,
.kw-slot .kw-emo,
.kw-probe .kw-emo,
.drag-ghost.kw-ghost .kw-emo {
  font-size: 21px;
}

.kw-card .kw-ar,
.kw-slot .kw-ar,
.kw-probe .kw-ar,
.drag-ghost.kw-ghost .kw-ar {
  font-size: 22px;
  line-height: 1.6;
}

/* Messen der größten Kästchen (unsichtbar) */
.kw-probe {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.kw-probe .kw-card {
  width: max-content;
  height: auto;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.kw-probe.fixed .kw-card {
  width: 100%;
  white-space: normal;
  flex-wrap: wrap;
}

.drag-ghost.kw-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 12px;
  background: #fff;
  border: 2px solid var(--primary);
  font-family: var(--sans);
}

.verse-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.vl-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.vl-row.filled {
  border-color: var(--ok-line);
}

.vl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vl-no {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lav);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.kw-slot {
  flex: 0 0 auto;
  border: 2px dashed var(--lav-3);
  background: var(--chip);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.kw-slot.armed {
  border-color: var(--primary);
  background: var(--lav-2);
  cursor: pointer;
}

.kw-slot.drop-hover {
  border-color: var(--primary);
  border-style: solid;
  background: rgba(61, 100, 255, 0.14);
}

.kw-slot.filled {
  border-style: solid;
  border-color: var(--ok-line);
  background: var(--ok-bg);
  animation: screen-in 0.3s ease;
}

.kw-slot.shake {
  animation: shake 0.4s ease;
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

.vl-ar {
  font-family: "MadinaHafs", var(--ar);
  font-size: 23px;
  line-height: 1.9;
  text-align: right;
  color: var(--m-ink);
}

.vl-ar .ayah-end {
  font-family: "UthmanicHafs", serif;
  color: var(--mp-blue);
}

.vl-arrow {
  align-self: center;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--lav-3);
}

/* Tresor: mehrere Wörter wählen */
.range-bar {
  position: fixed;
  left: 50%;
  top: 12px;
  z-index: 150;
  transform: translateX(-50%);
  width: min(528px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(38, 36, 123, 0.3);
  animation: screen-in 0.25s ease;
}

.range-bar span {
  flex: 1;
}

.range-bar .link-btn {
  color: #fff;
  text-decoration: underline;
}

.ml .t.range-start,
.ctx-ar .t.range-start {
  background: rgba(205, 91, 82, 0.28);
  box-shadow: 0 0 0 2px rgba(205, 91, 82, 0.7);
}

.vault-opt-ref small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* =================================================================
   Neu laden, Lernspiele, Nacherzählung
   ================================================================= */

.topbar .reload-btn {
  flex-shrink: 0;
  color: var(--muted);
  background: transparent;
}

.topbar .reload-btn:hover {
  color: var(--primary);
  background: var(--lav-2);
}

/* ---- Lernspiele ---- */

.g-host {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
}

.g-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.g-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

.g-score {
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--lav-2);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.g-score:empty {
  display: none;
}

.g-hint {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted-2);
}

.g-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.g-area > * {
  width: 100%;
}

.g-area button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* Ballons */
.g-field.balloons {
  position: relative;
  height: 330px;
  border-radius: 16px;
  background: linear-gradient(to bottom, #dfeaff, #f7f9ff 70%, #eaf7ef);
  overflow: hidden;
}

.g-balloon {
  position: absolute;
  width: 58px;
  height: 70px;
  padding: 0;
  border: 0;
  border-radius: 50% 50% 47% 47%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.6), transparent 32%), var(--c);
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, 0.08);
  cursor: pointer;
  animation: g-float var(--life) linear forwards;
}

.g-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1.5px;
  height: 22px;
  background: rgba(0, 0, 0, 0.25);
}

.g-balloon.pop {
  animation: g-pop 0.22s ease-out forwards;
}

@keyframes g-float {
  from {
    transform: translateY(24px) scale(0.6);
    opacity: 0;
  }
  15% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(-46px) scale(1);
    opacity: 0.85;
  }
}

@keyframes g-pop {
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Memory */
.g-memory {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}

.g-card {
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: none;
  perspective: 600px;
  cursor: pointer;
}

.g-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.g-card.open .g-card-inner {
  transform: rotateY(180deg);
}

.g-card-back,
.g-card-front {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-card-back {
  background: repeating-linear-gradient(45deg, var(--primary) 0 8px, var(--primary-2) 8px 16px);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.g-card-front {
  transform: rotateY(180deg);
  background: #fff;
  border: 2px solid var(--line);
  font-size: 32px;
}

.g-balloon-emo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 6px;
  font-size: 30px;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.g-card.done .g-card-front {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

/* Simon */
.g-simon-status {
  text-align: center;
  font-weight: 800;
  color: var(--primary);
  min-height: 22px;
}

.g-simon {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 10px;
  max-width: 330px;
  margin: 6px auto 0;
}

.g-pad {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 18px;
  background: var(--c);
  font-size: 30px;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.08s ease, transform 0.08s ease, filter 0.08s ease;
}

.g-pad.lit {
  opacity: 1;
  filter: brightness(1.15);
  transform: scale(1.04);
  box-shadow: 0 0 24px var(--c);
}

/* Snake */
.g-snake {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.g-snake-board {
  position: relative;
}

.g-snake canvas {
  display: block;
  border-radius: 12px;
  touch-action: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

.g-snake-start {
  position: absolute;
  inset: auto 12px 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(38, 36, 123, 0.88);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.g-dpad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 44px);
  gap: 6px;
  justify-content: center;
}

.g-dpad button {
  border: 0;
  border-radius: 12px;
  background: var(--lav-2);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
}

.g-dpad button:active {
  background: var(--lav-3);
}

.g-dpad [data-d="0,-1"] {
  grid-column: 2;
  grid-row: 1;
}

.g-dpad [data-d="-1,0"] {
  grid-column: 1;
  grid-row: 2;
}

.g-dpad [data-d="1,0"] {
  grid-column: 3;
  grid-row: 2;
}

.g-dpad [data-d="0,1"] {
  grid-column: 2;
  grid-row: 2;
}

/* Schiebepuzzle: links das Feld, rechts die richtige Reihenfolge */
.g-slide-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.g-slide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  /* bei mehr Reihen kleinere Plättchen, damit das Feld aufs Handy passt */
  width: min(calc(840px / var(--rows, 3)), 72%);
  padding: 6px;
  border-radius: 18px;
  background: var(--lav-2);
}

.g-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #fff;
  font-size: 28px;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(38, 36, 123, 0.1);
}

.g-tile.emo {
  background: #fff;
  box-shadow: inset 0 -4px 0 rgba(38, 36, 123, 0.18), 0 0 0 2px var(--lav-3);
}

.g-tile.empty {
  background: transparent;
  box-shadow: none;
}

.g-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 6px;
  border-radius: 14px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
}

.g-target-cell {
  font-size: 24px;
  line-height: 1.15;
}

.g-target-arrow {
  font-size: 12px;
  line-height: 1;
  color: var(--ok);
}

.g-slide-won {
  margin-top: 8px;
  text-align: center;
  font-weight: 800;
  color: var(--ok);
}

/* Ergebnis eines Spiels, gespielte Spiele */
.g-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 10px;
  text-align: center;
  animation: screen-in 0.25s ease;
}

.g-result-icon {
  font-size: 54px;
}

.g-result-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 17px;
}

.g-result-next {
  font-size: 13px;
  color: var(--muted);
}

.g-played {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.g-played-row {
  font-size: 14.5px;
}

/* ---- Nacherzählung ---- */

.story2 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.st-intro,
.st-outro {
  padding: 12px 16px;
  border-left: 4px solid var(--primary-soft);
  background: var(--lav-2);
  border-radius: 0 14px 14px 0;
}

.st-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  animation: screen-in 0.35s ease;
  scroll-margin-top: 16px;
}

.st-emoji {
  text-align: center;
  font-size: 64px;
  line-height: 1.1;
}

.st-mean {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 18px;
  color: var(--ink);
}

.st-mean .kw-ar {
  font-size: 28px;
}

.st-dot {
  color: var(--lav-3);
  font-weight: 800;
}

.st-p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.st-note {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-style: italic;
  color: var(--muted-2);
}

.st-intro .st-note + .st-note,
.st-sec .st-note {
  padding-left: 12px;
  border-left: 3px solid var(--m-gold);
}

.st-intro .ctx-label,
.st-outro .ctx-label {
  display: block;
  margin-bottom: 4px;
}

.st-next {
  align-self: center;
  min-width: 180px;
}

.g-skip {
  align-self: center;
  margin-top: 4px;
  min-width: 200px;
}

/* Nacherzählung: Vers bzw. Fragmente des Abschnitts mit Übersetzung */
.st-ayah {
  display: flex;
  flex-direction: column;
  margin: 2px 0 4px;
  padding: 4px 14px;
  border-radius: 14px;
  background: var(--mp-text-bg);
  border: 1px solid var(--mp-blue-light);
}

.st-frag {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(47, 104, 178, 0.25);
}

.st-frag:last-child {
  border-bottom: 0;
}

.st-frag-ar {
  font-family: "MadinaHafs", var(--ar);
  font-size: 25px;
  line-height: 2;
  text-align: right;
  color: var(--mp-ink);
}

.st-frag-ar .ayah-end {
  font-family: "UthmanicHafs", serif;
  color: var(--mp-blue);
}

.st-frag-de {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted-2);
}

.st-frag-ar .t.hl {
  color: var(--primary);
  background: rgba(61, 100, 255, 0.1);
  border-radius: 0.25em;
  box-shadow: 0 0.1em 0 rgba(61, 100, 255, 0.45);
}
