@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Literata:opsz,wght@7..72,500;7..72,600;7..72,700&display=swap');
/* Kur'an fontlari (OFL 1.1, lisanslar: fonts/OFL-*.txt) — 2026-10-03 */
@font-face {
  font-family: "Amiri Quran";
  src: url("../fonts/AmiriQuran.woff2") format("woff2"), url("../fonts/AmiriQuran.woff") format("woff");
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Scheherazade New";
  src: url("../fonts/ScheherazadeNew.woff2") format("woff2"), url("../fonts/ScheherazadeNew.woff") format("woff");
  font-weight: normal; font-style: normal; font-display: swap;
}

/* Namaz 360 · Kur’an öğren — visual redesign v43
   Brand mark top-left, classroom curriculum order, cream/teal, tahta projection. */

:root {
  --bg: #f3eee4;
  --bg-glow: rgba(15, 120, 110, 0.11);
  --paper: #fffdf8;
  --paper-2: #faf6ee;
  --ink: #1a1814;
  --muted: #5c574e;
  --line: rgba(28, 25, 21, 0.1);
  --line-strong: rgba(28, 25, 21, 0.16);
  --brand: #0d7a72;
  --brand-deep: #0a5f59;
  --brand-soft: #e6f5f2;
  --brand-mid: rgba(13, 122, 114, 0.18);
  --gold: #8f6414;
  --gold-soft: #f7ecd2;
  --danger: #a33b2b;
  --danger-soft: #fff1ee;
  --shadow: 0 10px 28px rgba(55, 40, 18, 0.07);
  --shadow-sm: 0 2px 10px rgba(55, 40, 18, 0.05);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --arabic: "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", serif;
  --ui: "DM Sans", "Segoe UI", system-ui, Tahoma, sans-serif;
  --display: "Literata", Georgia, "Times New Roman", serif;
  --nav-h: 72px;
  --tools-h: 120px;
  --rail-w: 240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scroll-padding-bottom: 2rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  font-family: var(--ui);
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(900px 320px at 100% -10%, var(--bg-glow), transparent 55%),
    radial-gradient(700px 260px at 0% 0%, rgba(143, 100, 20, 0.07), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ——— Top nav ——— */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  min-width: 0;
  line-height: 1.15;
  flex-shrink: 0;
}
.brand:hover { color: var(--brand-deep); }
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 4px 12px rgba(13, 122, 114, 0.18);
  border: 1px solid rgba(13, 122, 114, 0.12);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}
.brand small {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.78rem;
}

.nav-toggle { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.nav-links a,
.tahta {
  color: var(--ink);
  font-weight: 650;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.98rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

/* ——— Typography & hero ——— */
.hero { padding: 2.5rem 0 0.75rem; }
.kicker {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin: 0;
}
h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4.5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0.45rem 0 0.75rem;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}
h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 650;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 40rem;
  margin: 0;
}
.note { color: var(--muted); margin: 0.5rem 0; }
.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
  align-items: center;
}

.section { padding: 1.75rem 0 0.5rem; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.1rem;
  padding: 0 1.2rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s var(--ease), transform 0.15s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover {
  background: var(--brand-deep);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}
.btn.gold {
  background: var(--gold-soft);
  color: #5c3d08;
  border-color: rgba(143, 100, 20, 0.22);
  box-shadow: none;
}
.btn.gold:hover {
  background: #f3e2b8;
  color: #5c3d08;
}

/* ——— Cards / steps / grids ——— */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.step,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.step:hover,
.card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.step b { display: block; margin: 0.4rem 0 0.25rem; }
.step span,
.card span { color: var(--muted); font-size: 0.92rem; }
.card .ar,
.card b,
.card .card-line { display: block; }
.card b { margin-top: 0.25rem; }
.card .card-line { margin-top: 0.15rem; }
.card .ar {
  font-family: var(--arabic);
  font-size: 1.75rem;
  line-height: 1.4;
  text-align: right;
  direction: rtl;
}
.card.dua { background: var(--gold-soft); }
.card.extra { background: var(--paper-2); }

.num-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

.grades {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.grades a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 6.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.grades a b { font-size: 1.45rem; line-height: 1.15; }
.grades a span { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.grades a.on,
.grades a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.85rem 0;
}
.filters button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-pill);
  min-height: 2.5rem;
  padding: 0 1rem;
  cursor: pointer;
  font-weight: 650;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filters button.on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.search {
  width: 100%;
  min-height: 3.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 1.1rem;
  box-shadow: var(--shadow-sm);
}
.search:focus {
  outline: 2px solid var(--brand-mid);
  border-color: var(--brand);
}

.switch {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 1rem;
}
.switch a {
  min-width: 4.5rem;
  min-height: 3.4rem;
  padding: 0 1rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}
.switch a.on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.pill {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.theme { margin: 1.75rem 0; }
.theme h2 { margin-bottom: 0.4rem; }
.adim { margin: 0.65rem 0 0.9rem; padding-left: 1.25rem; }
.adim li { margin: 0.3rem 0; }

.work {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}
.work .card b { display: block; font-size: 1.08rem; margin-bottom: 0.4rem; }

/* ——— Reader (oku) ——— */
.ayah {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.1rem 1.2rem;
  margin: 0.85rem 0;
  box-shadow: var(--shadow-sm);
}
.ayah.playing {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-mid);
}
.ayah.range { box-shadow: inset 5px 0 0 var(--brand); }
.ayah-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 800;
  flex: none;
}
.arabic {
  font-family: var(--arabic);
  font-size: clamp(1.85rem, 4.2vw, 3.1rem);
  line-height: 2.3;
  text-align: right;
  direction: rtl;
  margin: 0.65rem 0;
  overflow-wrap: anywhere;
}
.ayah .dinle {
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.okunus { color: var(--muted); font-style: italic; }
body.hide-meal .meal,
body.hide-read .okunus { display: none; }
/* Elegant sureler player (oku) — compact card, not a bulky strip */
.sure-player {
  position: sticky;
  top: calc(var(--nav-h, 64px) + 0.5rem);
  z-index: 25;
  margin: 0.85rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,253,248,0.98), rgba(247,242,232,0.96));
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.sure-player-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.sure-player-main .btn-play {
  min-width: 7.5rem;
  min-height: 2.75rem;
  border-radius: 999px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  padding: 0 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 122, 114, 0.25);
}
.sure-player-main button,
.sure-player-opts select {
  min-height: 2.55rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 0.85rem;
  cursor: pointer;
  font-weight: 650;
  font-size: 0.95rem;
}
.sure-player-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}
.sure-player-opts label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  color: var(--ink);
}
.sure-player #status {
  margin-inline-start: auto;
  font-size: 0.9rem;
}
#ayahs { padding-bottom: 1.5rem; }

/* ——— Studio / letter grid (ana strip) ——— */
.studio {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.letter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}
.letter {
  min-height: 5.5rem;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--arabic);
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s;
}
.letter.on {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.letter.thick { background: #fff8ea; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.panel .big {
  font-family: var(--arabic);
  font-size: clamp(4rem, 11vw, 7rem);
  line-height: 1.05;
  text-align: center;
  margin: 0.5rem 0;
  direction: rtl;
}

.group-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1rem 0 0.55rem;
}

.foot {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem 0 4rem;
}

/* ——— Yol app layout ——— */
.yol-app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - var(--nav-h));
  max-width: 100%;
}

.tahta-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0.65rem 0 0;
}
.tam-ekran { min-height: 2.6rem; font-size: 0.92rem; }

.yol-rail {
  position: sticky;
  top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.85rem 0.55rem 1.75rem;
  background: #fffef9;
  border-right: 1px solid rgba(28, 25, 21, 0.08);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.7) inset;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-mid) transparent;
}
.yol-rail h2 {
  font-size: 0.98rem;
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  padding: 0.15rem 0.4rem 0.55rem;
  border-bottom: 1px solid rgba(28, 25, 21, 0.06);
}

.rail-hide,
.rail-show {
  min-height: 2.2rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 0.7rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  flex: none;
  color: var(--muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rail-hide:hover,
.rail-show:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.rail-scrim {
  display: none;
}

/* Accordion groups */
.yol-acc { margin: 0.2rem 0 0.35rem; }
.yol-grup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.5rem 0.4rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s;
}
.yol-grup:hover { background: rgba(143, 100, 20, 0.06); }
.yol-grup span:first-child { flex: 1; min-width: 0; }
.yol-chev {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  border-radius: 6px;
  background: rgba(143, 100, 20, 0.1);
  position: relative;
}
.yol-chev::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.yol-acc.open .yol-chev::before {
  transform: translateY(1px) rotate(225deg);
}
.yol-acc-body {
  display: none;
  padding: 0.1rem 0 0.45rem;
}
.yol-acc.open .yol-acc-body { display: block; }

.yol-item,
.yol-sub {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  white-space: normal;
  overflow: visible;
  max-width: 100%;
  line-height: 1.28;
}
.yol-item {
  min-height: 2.55rem;
  padding: 0.4rem 0.5rem;
  font-weight: 650;
  font-size: 0.88rem;
}
.yol-sub {
  min-height: 2.15rem;
  padding: 0.3rem 0.5rem 0.3rem 2.15rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}
.yol-item > span:not(.yol-num):not(.yol-done) {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.yol-sub { flex-wrap: wrap; }
.yol-item:hover,
.yol-sub:hover { background: rgba(13, 122, 114, 0.08); }
.yol-item.on,
.yol-sub.on {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 122, 114, 0.22);
}
.yol-item.on:hover,
.yol-sub.on:hover {
  background: var(--brand-deep);
  color: #fff;
}

.yol-num {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  margin-top: 0.05rem;
}
.on .yol-num {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.yol-done {
  margin-left: auto;
  font-size: 0.65rem;
  flex: none;
  opacity: 0.8;
  align-self: center;
  color: var(--brand);
}
.on .yol-done { color: #fff; }

.yol-stage {
  padding: 1.25rem 1.4rem 3rem;
  min-width: 0;
  max-width: 100%;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(13, 122, 114, 0.05), transparent 60%);
}

.yol-bar {
  height: 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--brand-mid);
  overflow: hidden;
  margin: 0.55rem 0 1.1rem;
}
.yol-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  border-radius: inherit;
  transition: width 0.35s var(--ease);
}

.yol-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.1rem;
  align-items: start;
  max-width: 100%;
}

.yol-nav {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
  align-items: center;
}

body.rail-off .yol-app { grid-template-columns: 1fr; }
@media (min-width: 981px) {
  body.rail-off .yol-rail { display: none; }
  .rail-show { display: none; margin-bottom: 0.75rem; }
  body.rail-off .rail-show { display: inline-flex; align-items: center; }
}

/* ——— Lesson stage: frame + huge Arabic ——— */
.frame {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border: 1px solid rgba(143, 100, 20, 0.28);
  border-radius: 16px;
  pointer-events: none;
}

.huge,
.frame .huge,
#huge {
  font-family: var(--arabic);
  font-size: clamp(2.35rem, 6.5vw, 4.1rem);
  direction: rtl;
  line-height: 1.55;
  text-align: center;
  margin: 0.35rem 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  letter-spacing: 0;
}

.quran-yazi {
  font-family: var(--arabic);
  color: #1a1a1a;
  letter-spacing: 0;
  line-height: 1.85;
  display: inline-block;
  max-width: 100%;
  padding: 0.15em 0.08em 0.3em;
  overflow-wrap: anywhere;
}

.komsu { color: var(--ink); }
.hedef { color: #c41010; font-weight: 700; }

.ad-ar {
  font-family: var(--arabic);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  text-align: center;
  margin: 0 0 0.5rem;
  direction: rtl;
}

/* ——— Hece / pick tiles (classroom denser defaults) ——— */
.hece-grid,
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
}

.hece,
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
  min-height: 6.1rem;
  padding: 0.85rem 0.55rem;
  border-radius: 16px;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.12s;
}
button.hece { font: inherit; color: inherit; }
.hece:hover,
.pick:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.hece.on,
.pick.iyi {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px var(--brand-mid);
}
.hece.thick { background: #fff8ea; }
.pick.kotu {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.hece .ar,
.pick .ar,
.hece span.ar {
  font-family: var(--arabic);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  direction: rtl;
  line-height: 1.4;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
  display: block;
  letter-spacing: 0;
  color: #0c0b09;
  font-weight: 600;
}
.hece small,
.pick small {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.78rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.formlar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.formlar article {
  min-height: 7.5rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.55rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  overflow: hidden;
}
.formlar .ar {
  font-family: var(--arabic);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  direction: rtl;
  line-height: 1.45;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.formlar small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .yol-app { grid-template-columns: 1fr; }
  .yol-rail {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    width: min(260px, 84vw);
    max-height: none;
    z-index: 36;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    border-right: 1px solid rgba(28, 25, 21, 0.1);
    border-bottom: 0;
    box-shadow: 8px 0 32px rgba(55, 40, 18, 0.14);
    padding-bottom: 2.5rem;
  }
  body:not(.rail-off) .yol-rail {
    transform: translateX(0);
  }
  body.rail-off .yol-rail {
    display: block; /* keep in DOM for drawer anim; hide via transform */
    transform: translateX(-105%);
    pointer-events: none;
  }
  .rail-scrim {
    display: block;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 35;
    background: rgba(26, 24, 20, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
  }
  body:not(.rail-off) .rail-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .yol-split { grid-template-columns: 1fr; }
  .yol-stage { padding: 1.1rem 1rem 2.5rem; }
  .rail-show {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.75rem;
  }
  body:not(.rail-off) .rail-show { display: none; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .nav-links a { padding: 0.45rem 0.7rem; font-size: 0.92rem; }
}

@media (max-width: 860px) {
  :root { --nav-h: 60px; }

  .steps,
  .studio,
  .grades { grid-template-columns: 1fr 1fr; }
  .letter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .formlar { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .nav-inner {
    min-height: var(--nav-h);
    flex-wrap: nowrap;
    min-width: 0;
  }
  .brand { flex: 1; overflow: hidden; min-width: 0; }
  .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .brand-text { overflow: hidden; }
  .brand small { display: none; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-height: 2.6rem;
    padding: 0 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--paper);
    font-weight: 700;
    cursor: pointer;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.55rem 1rem 0.9rem;
    background: rgba(255, 253, 248, 0.98);
    border-bottom: 1px solid var(--line);
    z-index: 50;
    box-shadow: var(--shadow);
  }
  .nav-inner.nav-open .nav-links { display: flex; }
  .nav-links a { white-space: normal; }

  .tools button,
  .tools select {
    min-height: 2.5rem;
    font-size: 0.9rem;
    padding: 0 0.65rem;
  }

  .hece-grid,
  .pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  }
  .huge,
  .frame .huge,
  #huge { font-size: clamp(1.7rem, 8vw, 2.8rem); }
}

@media (max-width: 520px) {
  .steps,
  .grades { grid-template-columns: 1fr; }
  .wrap { width: min(1120px, calc(100% - 1.25rem)); }
  .btn { min-height: 2.85rem; font-size: 0.95rem; }
}


/* ——— Tahta button in nav ——— */
.nav-links .tahta,
.nav-links .tam-ekran {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(143, 100, 20, 0.28);
}
.nav-links .tam-ekran {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  min-height: 2.6rem;
  font-size: 0.95rem;
  font-weight: 750;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
}
.nav-links .tahta:hover,
.nav-links .tahta[aria-pressed="true"],
.nav-links .tam-ekran:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* ——— Hoca tahtası / projeksiyon / TV modu ——— */
body.tahta-modu {
  --nav-h: 72px;
  --bg: #e8e2d4;
  --paper: #ffffff;
  --ink: #0a0908;
  --muted: #3a372f;
  --line: rgba(10, 9, 8, 0.18);
  --line-strong: rgba(10, 9, 8, 0.28);
  padding-top: var(--nav-h);
  background: #e8e2d4;
}
body.tahta-modu .nav {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.07);
}
body.tahta-modu .nav-inner {
  min-height: var(--nav-h);
  gap: 0.75rem;
}
body.tahta-modu .brand small,
body.tahta-modu .nav-links a,
body.tahta-modu .tahta-bar {
  display: none !important;
}
/* Header controls stay visible on big TV: Tahta + Tam ekran */
body.tahta-modu .nav-links .tahta,
body.tahta-modu .nav-links .tam-ekran {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  min-width: 7.5rem;
  padding: 0.7rem 1.35rem;
  font-size: 1.12rem;
  font-weight: 800;
  border-width: 2px;
  border-radius: 14px;
  gap: 0.35rem;
}
body.tahta-modu .nav-links {
  gap: 0.65rem;
}
body.tahta-modu .brand img {
  width: 40px;
  height: 40px;
}
body.tahta-modu .brand { font-size: 1.12rem; font-weight: 800; }
body.tahta-modu .yol-app {
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--nav-h));
}
body.tahta-modu .yol-rail { display: none; }
body.tahta-modu.rail-peek .yol-app {
  grid-template-columns: min(260px, 28vw) minmax(0, 1fr);
}
body.tahta-modu.rail-peek .yol-rail {
  display: block;
  top: var(--nav-h);
  max-height: calc(100vh - var(--nav-h));
  background: #fffef9;
  border-right: 2px solid rgba(10, 9, 8, 0.12);
  padding: 1rem 0.75rem 1.75rem;
}
body.tahta-modu .rail-show {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  min-height: 3.15rem;
  min-width: 9rem;
  padding: 0.7rem 1.35rem;
  font-size: 1.12rem;
  font-weight: 800;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 15, 8, 0.08);
}
body.tahta-modu.rail-peek .rail-show { display: none !important; }
body.tahta-modu .rail-scrim { display: none !important; }
body.tahta-modu .rail-hide {
  min-height: 2.8rem;
  font-size: 1rem;
  font-weight: 800;
  padding: 0 1rem;
  border-width: 2px;
}

body.tahta-modu .yol-stage {
  padding: 1rem 1.35rem 1.75rem;
  background: transparent;
}
body.tahta-modu .kicker,
body.tahta-modu .yol-bar,
body.tahta-modu .lead,
body.tahta-modu .adim {
  display: none !important;
}
body.tahta-modu .yol-split {
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
body.tahta-modu .yol-split > div:last-child {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  flex-wrap: wrap;
}
body.tahta-modu .yol-split h1 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  margin: 0;
  color: var(--ink);
}
body.tahta-modu .frame {
  padding: 1.25rem 1.15rem 1.15rem;
  border: 2px solid rgba(10, 9, 8, 0.16);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(20, 15, 8, 0.08);
  background: #fff;
}
body.tahta-modu .frame::after {
  border-color: rgba(143, 100, 20, 0.45);
  inset: 0.55rem;
}
body.tahta-modu .huge,
body.tahta-modu .frame .huge,
body.tahta-modu #huge {
  font-size: clamp(3.4rem, 9.5vw, 6.6rem);
  line-height: 1.35;
  margin: 0.15rem 0;
  color: #000;
  font-weight: 700;
}
body.tahta-modu #okunus {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
body.tahta-modu .ad-ar {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  color: #000;
}
body.tahta-modu .formlar article {
  min-height: 8.75rem;
  border: 2px solid var(--line-strong);
  background: #fff;
}
body.tahta-modu .formlar .ar {
  font-size: clamp(2.3rem, 5vw, 4rem);
  color: #000;
  font-weight: 700;
}

/* Hece tiles: couch / TV distance — larger gaps + tap targets */
body.tahta-modu .hece-grid,
body.tahta-modu .pick-grid {
  grid-template-columns: repeat(auto-fill, minmax(9.75rem, 1fr));
  gap: 1.25rem;
  margin-top: 0.85rem;
}
body.tahta-modu .hece,
body.tahta-modu .pick {
  min-height: 8.75rem;
  padding: 1.15rem 0.75rem;
  border-width: 2px;
  border-color: rgba(10, 9, 8, 0.22);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(20, 15, 8, 0.07);
}
body.tahta-modu .hece:hover,
body.tahta-modu .pick:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(13, 122, 114, 0.18);
}
body.tahta-modu .hece.on {
  border-color: var(--brand-deep);
  background: #e0f4f1;
  box-shadow: 0 0 0 4px rgba(13, 122, 114, 0.28);
}
body.tahta-modu .hece .ar,
body.tahta-modu .pick .ar,
body.tahta-modu .hece span.ar,
body.tahta-modu .hece .quran-yazi {
  font-size: clamp(2.55rem, 5vw, 4.15rem) !important;
  line-height: 1.3;
  color: #000;
  font-weight: 700;
}
body.tahta-modu .hece small,
body.tahta-modu .pick small,
body.tahta-modu .hece .ad-ar {
  font-size: clamp(1.2rem, 2.1vw, 1.75rem) !important;
  color: #1a1814;
  white-space: normal;
  font-weight: 700;
}
body.tahta-modu .group-label {
  font-size: 0.95rem;
  margin: 1.35rem 0 0.75rem;
  color: #6a4a0e;
  font-weight: 800;
}

/* Bottom nav: big TV remote / finger targets */
body.tahta-modu .yol-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 1.15rem;
  padding: 0.95rem 0.45rem 1.05rem;
  background: linear-gradient(180deg, transparent, #e8e2d4 28%);
  gap: 0.85rem;
  flex-wrap: wrap;
}
body.tahta-modu .yol-nav .btn {
  min-height: 3.55rem;
  font-size: 1.18rem;
  font-weight: 800;
  padding: 0 1.5rem;
  border-width: 2px;
  border-radius: 14px;
}
body.tahta-modu .yol-nav #once,
body.tahta-modu .yol-nav #sonra {
  min-width: 10rem;
}

@media (max-width: 980px) {
  body.tahta-modu {
    --nav-h: 64px;
  }
  body.tahta-modu .nav-links .tahta,
  body.tahta-modu .nav-links .tam-ekran {
    min-height: 2.85rem;
    min-width: 6.25rem;
    font-size: 1rem;
    padding: 0.55rem 1rem;
  }
  body.tahta-modu .yol-rail {
    display: block;
    position: fixed;
    transform: translateX(-105%);
  }
  body.tahta-modu.rail-peek .yol-rail,
  body.tahta-modu:not(.rail-off) .yol-rail {
    transform: translateX(0);
  }
  body.tahta-modu.rail-peek .yol-app,
  body.tahta-modu:not(.rail-off) .yol-app {
    grid-template-columns: 1fr;
  }
  body.tahta-modu .hece-grid,
  body.tahta-modu .pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.95rem;
  }
  body.tahta-modu .hece .ar,
  body.tahta-modu .pick .ar,
  body.tahta-modu .hece span.ar {
    font-size: clamp(2rem, 7vw, 3.1rem) !important;
  }
  body.tahta-modu .huge,
  body.tahta-modu .frame .huge,
  body.tahta-modu #huge {
    font-size: clamp(2.6rem, 12vw, 4.4rem);
  }
}

/* Large TV / projector */
@media (min-width: 1400px) {
  body.tahta-modu {
    --nav-h: 80px;
  }
  body.tahta-modu .nav-links .tahta,
  body.tahta-modu .nav-links .tam-ekran {
    min-height: 3.45rem;
    min-width: 8.5rem;
    font-size: 1.22rem;
    padding: 0.8rem 1.55rem;
  }
  body.tahta-modu .rail-show {
    min-height: 3.45rem;
    font-size: 1.2rem;
  }
  body.tahta-modu .hece-grid,
  body.tahta-modu .pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(11.25rem, 1fr));
    gap: 1.45rem;
  }
  body.tahta-modu .hece,
  body.tahta-modu .pick {
    min-height: 10.25rem;
    padding: 1.25rem 0.85rem;
  }
  body.tahta-modu .yol-nav .btn {
    min-height: 3.85rem;
    font-size: 1.28rem;
    padding: 0 1.7rem;
  }
  body.tahta-modu .yol-stage {
    padding: 1.25rem 1.75rem 2rem;
  }
}



/* ——— Sınıf temposu ——— */
.sinif-tempo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.35rem 0 1.1rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1.5px solid var(--line-strong);
  background: var(--brand-soft);
}
.sinif-tempo .tempo-btn {
  flex: 1 1 10rem;
  min-height: 3.4rem;
  font-size: 1.2rem;
  font-weight: 800;
  justify-content: center;
}

/* ——— Hangisi? quiz board ——— */
.hangisi {
  margin: 1.35rem 0 1.1rem;
  padding: 1.1rem 1rem 1.25rem;
  border-radius: 20px;
  border: 2px solid var(--brand);
  background: linear-gradient(180deg, #f3fbf8, var(--paper));
  box-shadow: var(--shadow);
}
.hangisi-ust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.hangisi-baslik {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.hangisi-aksiyon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.hangisi-aksiyon .btn {
  min-height: 3rem;
  font-size: 1.05rem;
  font-weight: 800;
}
.hangisi-durum {
  margin: 0 0 0.9rem;
  font-size: 1.08rem;
  font-weight: 650;
  color: var(--ink-soft, #445);
}
.hangisi-durum.iyi { color: #0a7a45; }
.hangisi-durum.kotu { color: #b42318; }
.hangisi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}
@media (min-width: 720px) {
  .hangisi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hangisi-secenek {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  padding: 1rem 0.6rem;
  border-radius: 18px;
  border: 2px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.hangisi-secenek:hover:not(:disabled) {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.hangisi-secenek .ar,
.hangisi-secenek .quran-yazi {
  font-family: var(--arabic);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.25;
  direction: rtl;
}
.hangisi-secenek.iyi {
  border-color: #0a7a45;
  background: #e6f7ee;
  box-shadow: 0 0 0 3px #0a7a4533;
}
.hangisi-secenek.kotu {
  border-color: #b42318;
  background: #fdecea;
}
.hangisi-secenek:disabled { cursor: default; opacity: 0.95; }

body.tahta-modu .sinif-tempo {
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.35rem;
}
body.tahta-modu .sinif-tempo .tempo-btn {
  min-height: 4.25rem;
  font-size: 1.55rem;
  padding: 0 1.5rem;
  border-radius: 14px;
}
body.tahta-modu .hangisi {
  padding: 1.35rem 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
body.tahta-modu .hangisi-baslik {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}
body.tahta-modu .hangisi-aksiyon .btn {
  min-height: 3.75rem;
  font-size: 1.3rem;
  padding: 0 1.5rem;
}
body.tahta-modu .hangisi-durum {
  font-size: 1.35rem;
}
body.tahta-modu .hangisi-grid {
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.tahta-modu .hangisi-secenek {
  min-height: 11rem;
  padding: 1.25rem;
  border-width: 3px;
}
body.tahta-modu .hangisi-secenek .ar,
body.tahta-modu .hangisi-secenek .quran-yazi {
  font-size: clamp(3.2rem, 6vw, 4.8rem);
}
@media (min-width: 1100px) {
  body.tahta-modu .hangisi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1400px) {
  body.tahta-modu .sinif-tempo .tempo-btn {
    min-height: 4.6rem;
    font-size: 1.7rem;
  }
  body.tahta-modu .hangisi-secenek {
    min-height: 12.5rem;
  }
}

/* Print quiet */
@media print {
  .nav, .tools, .yol-rail, .rail-show, .tahta-bar, .tahta { display: none !important; }
  body { padding-top: 0; background: #fff; }
  .yol-app { grid-template-columns: 1fr; }
}

.grades-home { margin-top: 0.85rem; }
.letter-strip { margin-top: 0.85rem; max-width: 520px; }

/* Besmele basligi ve not satirlari (reader) — 2026-10-03 */
.besmele {
  font-family: var(--arabic);
  font-size: clamp(1.85rem, 4.2vw, 3.1rem);
  line-height: 2.3;
  text-align: center;
  direction: rtl;
  margin: 0.6rem 0 0.2rem;
  color: var(--ink, #1a1a1a);
}
.ayah .meal-not, .ayah .secde-not { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0; }
.ayah .hizb { color: var(--muted); font-size: 0.85rem; margin-inline-start: 0.4rem; }
body.hide-meal .meal-not { display: none; }
