/* Сира Пророка ﷺ — оформление презентаций. Холст 1920×1080, масштабируется под окно. */

:root {
  --ink: #07090f;
  --text: #f3eee4;
  --muted: rgba(243, 238, 228, .70);
  --faint: rgba(243, 238, 228, .45);
  --gold: #e8b25a;
  --gold-2: #f6d595;
  --ember: #e0663c;
  --blood: #c23b2a;
  --sky: #8fc3ff;
  --green: #9fd49a;
  --violet: #c4b2ff;
  --glass: rgba(9, 11, 19, .70);
  --glass-2: rgba(16, 19, 31, .78);
  --line: rgba(232, 178, 90, .22);
  --paper: #f8f0de;
  --paper-2: #efe0c0;
  --paper-ink: #2a2017;
  --r: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  overflow: hidden;
  font-family: Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- фон ---------- */

.bgs { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg {
  position: absolute; inset: -3%;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.6s ease;
  animation: drift 60s ease-in-out infinite alternate;
}
.bg.on { opacity: 1; }
@keyframes drift {
  from { transform: scale(1.0) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.2%, -.8%, 0); }
}
.shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(7, 9, 15, .30), rgba(7, 9, 15, .82) 100%),
    linear-gradient(180deg, rgba(7, 9, 15, .35), rgba(7, 9, 15, .55));
  transition: opacity 1.2s ease, background 1.2s ease;
}
body[data-shade="soft"] .shade { opacity: .55; }
body[data-shade="deep"] .shade {
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(7, 9, 15, .55), rgba(7, 9, 15, .92) 100%),
    linear-gradient(180deg, rgba(7, 9, 15, .55), rgba(7, 9, 15, .70));
}
.pattern {
  position: absolute; inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23e8b25a' stroke-width='1.2'%3E%3Cpath d='M48 14 58 38 82 48 58 58 48 82 38 58 14 48 38 38Z'/%3E%3Cpath d='M24 24H72V72H24Z' transform='rotate(45 48 48)'/%3E%3Cpath d='M24 24H72V72H24Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 35%, #000 100%);
}

/* ---------- сцена и слайды ---------- */

.deck { position: fixed; inset: 0; z-index: 1; }
.stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
}
.slide {
  position: absolute; inset: 0;
  padding: 78px 120px 96px;
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .9s var(--ease), visibility 0s linear .7s;
  display: flex; flex-direction: column;
}
.slide.on {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .8s ease .15s, transform 1s var(--ease) .15s, visibility 0s;
}
.slide.center { justify-content: center; align-items: center; text-align: center; }

.hud {
  position: absolute; left: 120px; right: 120px; bottom: 34px;
  display: flex; justify-content: space-between; align-items: center;
  font: 600 18px/1 Manrope, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); pointer-events: none;
  transition: opacity .6s;
}
.hud .num b { color: var(--gold); font-weight: 800; }
body.no-hud .hud { opacity: 0; }

.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 4px; z-index: 5; background: rgba(255, 255, 255, .06); }
.progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  box-shadow: 0 0 12px rgba(232, 178, 90, .6);
  transition: width .6s var(--ease);
}

/* ---------- типографика ---------- */

h1, h2, h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 132px; line-height: 1.0; font-weight: 900; }
h2 { font-size: 64px; line-height: 1.08; margin: 6px 0 30px; }
h3 { font-size: 36px; line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
p { margin: 0 0 16px; }
.slide { font-size: 29px; line-height: 1.45; font-weight: 500; }
.kicker {
  display: inline-flex; align-items: center; gap: 18px;
  font: 800 21px/1 Manrope, sans-serif; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
}
.kicker::before { content: ""; width: 54px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.center .kicker::after { content: ""; width: 54px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.lead { font-size: 36px; line-height: 1.4; color: var(--muted); font-weight: 500; }
.small { font-size: 23px; line-height: 1.45; color: var(--muted); }
.tiny { font-size: 19px; line-height: 1.4; color: var(--faint); }
b, strong { font-weight: 800; color: var(--gold-2); }
em { font-style: normal; color: var(--gold); }
.gold { color: var(--gold); }
.ember { color: var(--ember); }
.sky { color: var(--sky); }
.green { color: var(--green); }
.violet { color: var(--violet); }
.muted { color: var(--muted); }
.serif { font-family: "Playfair Display", Georgia, serif; }
.saw { font-family: Amiri, serif; font-weight: 400; }

.ar, .ar-q {
  font-family: "Amiri Quran", Amiri, serif;
  direction: rtl; unicode-bidi: isolate;
  font-weight: 400; color: #fbefd6;
}
.ar-h { font-family: Amiri, serif; direction: rtl; unicode-bidi: isolate; color: #fbefd6; }

/* ---------- блоки ---------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(12px);
}
.glass.tight { padding: 22px 28px; }
.paper {
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  color: var(--paper-ink);
  border-radius: var(--r);
  padding: 30px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.paper b, .paper strong { color: #8a4b12; }
.paper .muted, .paper .small { color: rgba(42, 32, 23, .72); }
.paper .ar, .paper .ar-h { color: #3a2410; }

.row { display: flex; gap: 36px; }
.col { display: flex; flex-direction: column; gap: 22px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.fill { flex: 1; min-height: 0; }
.mt { margin-top: 26px; }
.mt-s { margin-top: 14px; }
.mb0 { margin-bottom: 0; }

/* аят */
.ayah { position: relative; text-align: center; }
.ayah .ar { font-size: 50px; line-height: 2.05; margin: 0 0 6px; }
.ayah.big .ar { font-size: 62px; }
.ayah.sm .ar { font-size: 40px; line-height: 1.95; }
.ayah.paper.sm .ar { font-size: 34px; line-height: 2.6; margin-bottom: 0; padding-bottom: 18px; }
.ayah.paper.sm .tr { font-size: 22px; line-height: 1.45; }
.ayah.xs .ar { font-size: 34px; line-height: 1.9; }
.ayah .tr { font-size: 27px; line-height: 1.45; color: var(--muted); margin: 0; }
.ayah.sm .tr, .ayah.xs .tr { font-size: 23px; }
.ayah cite, .src {
  display: inline-block; margin-top: 10px;
  font: 700 17px/1.2 Manrope, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-style: normal;
}
.ayah .ar .hl, .hl { color: var(--gold-2); text-shadow: 0 0 22px rgba(246, 213, 149, .45); }
.ayah .tr .hl { color: var(--gold-2); text-shadow: none; font-weight: 700; }
.paper .ayah .ar .hl, .paper .hl { color: #a35a12; text-shadow: none; }
.paper .ayah .tr { color: rgba(42, 32, 23, .78); }
.hl-a { color: #f6d595 !important; }
.hl-b { color: #8fd0ff !important; }
.hl-c { color: #b9e59a !important; }
.hl-d { color: #ffa98a !important; }
.paper .hl-a { color: #a35a12 !important; }
.paper .hl-b { color: #1f6aa6 !important; }
.paper .hl-c { color: #3f7d22 !important; }
.paper .hl-d { color: #b4432a !important; }
.ayah-orn {
  display: block; width: 140px; height: 14px; margin: 0 auto 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 14'%3E%3Cg fill='none' stroke='%23e8b25a' stroke-width='1.4'%3E%3Cpath d='M0 7H54M86 7H140'/%3E%3Cpath d='M70 1 76 7 70 13 64 7Z'/%3E%3Ccircle cx='59' cy='7' r='1.6' fill='%23e8b25a'/%3E%3Ccircle cx='81' cy='7' r='1.6' fill='%23e8b25a'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* хадис и цитата */
.quote {
  position: relative;
  border-left: 4px solid var(--gold);
  background: linear-gradient(90deg, rgba(232, 178, 90, .12), rgba(232, 178, 90, .02));
  border-radius: 0 var(--r) var(--r) 0;
  padding: 22px 30px;
}
.quote p { margin: 0; }
.quote .src { margin-top: 10px; }
.quote.ember { border-color: var(--ember); background: linear-gradient(90deg, rgba(224, 102, 60, .14), rgba(224, 102, 60, .02)); }
.quote.ember .src { color: var(--ember); }
.paper .quote { background: rgba(163, 90, 18, .08); border-color: #a35a12; }
.paper .quote .src { color: #8a4b12; }
.quote .ar-h { font-size: 36px; line-height: 1.7; display: block; margin-bottom: 6px; }

/* чипы и метки */
.tag {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font: 800 16px/1 Manrope, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid currentColor; color: var(--gold);
}
.tag.ember { color: var(--ember); }
.tag.sky { color: var(--sky); }
.tag.green { color: var(--green); }
.tag.violet { color: var(--violet); }
.tag.solid { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* фото */
.photo {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--r);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .08);
  background: #111;
}
.photo img {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04);
  transition: transform 14s ease-out;
}
.slide.on .photo img { transform: scale(1.12); }
.photo.still img, .slide.on .photo.still img { transform: none; transition: none; }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 50px 22px 16px;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 12, .88));
  font-size: 20px; line-height: 1.35; color: rgba(243, 238, 228, .88);
}
.photo figcaption b { color: var(--gold-2); }

/* таблица сравнения */
table.cmp { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 25px; line-height: 1.35; }
table.cmp th {
  text-align: left; padding: 4px 20px 6px;
  font: 800 18px/1.2 Manrope, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
table.cmp td {
  padding: 14px 20px; vertical-align: top;
  background: var(--glass-2);
  border-top: 1px solid rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(0, 0, 0, .3);
}
table.cmp td:first-child { border-radius: 14px 0 0 14px; font-weight: 800; color: var(--gold-2); }
table.cmp td:last-child { border-radius: 0 14px 14px 0; }
table.cmp td + td { border-left: 1px solid rgba(255, 255, 255, .06); }
table.cmp tr.f td { transition: inherit; }
table.cmp .good { color: #c9efb8; }
table.cmp .bad { color: #ffb7a0; }
table.cmp td.c-rum { color: #ddd2ff; }
table.cmp td.c-per { color: #ffc2ad; }
table.cmp td.c-arab { color: #ffe3a8; background: rgba(60, 44, 18, .82); }
table.cmp th.c-rum { color: var(--violet); }
table.cmp th.c-per { color: var(--ember); }
table.cmp th.c-arab { color: var(--gold); }
.paper table.cmp td { background: rgba(255, 255, 255, .55); border-color: rgba(0, 0, 0, .05); }
.paper table.cmp td:first-child { color: #8a4b12; }
.paper table.cmp th { color: #8a4b12; }

/* факты-строки */
.facts { display: flex; flex-direction: column; gap: 14px; }
.fact {
  display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start;
  padding: 16px 22px; border-radius: 16px;
  background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .05);
  font-size: 25px; line-height: 1.4;
}
.fact > :first-child {
  font: 800 17px/1.3 Manrope, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); padding-top: 5px;
}

/* карточки */
.card {
  position: relative;
  background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 18px; padding: 24px 26px;
  font-size: 24px; line-height: 1.42;
}
.card h3 { font-size: 30px; }
.card .ico { width: 54px; height: 54px; margin-bottom: 10px; color: var(--gold); }
.card.dark { background: rgba(30, 10, 8, .74); border-color: rgba(224, 102, 60, .25); }
.card.dark h3 { color: #ffb7a0; }
.card .ar-h { font-size: 30px; }

/* цепочка-схема */
.chain { display: flex; align-items: stretch; gap: 0; }
.chain .node {
  flex: 1; min-width: 0;
  background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px; padding: 16px 18px;
  font-size: 22px; line-height: 1.35;
}
.chain .node b { display: block; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; color: var(--gold); }
.chain .node.hot { border-color: rgba(224, 102, 60, .55); background: rgba(48, 14, 10, .8); }
.chain .node.hot b { color: var(--ember); }
.chain .node.good { border-color: rgba(159, 212, 154, .5); background: rgba(16, 40, 24, .8); }
.chain .node.good b { color: var(--green); }
.chain .arr {
  flex: 0 0 46px; display: grid; place-items: center;
  color: var(--gold); font-size: 34px;
}
.chain-label {
  font: 800 18px/1 Manrope, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 10px;
}
.chain-label b { color: var(--text); letter-spacing: .06em; font-size: 26px; text-transform: none; font-family: "Playfair Display", serif; margin-right: 14px; }

/* лестница вниз */
.stairs { display: flex; flex-direction: column; gap: 10px; }
.stairs .st {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center;
  padding: 14px 22px; border-radius: 14px;
  background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .06);
  font-size: 24px; line-height: 1.4;
}
.stairs .st .n {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font: 900 28px/1 "Playfair Display", serif; color: var(--ink); background: var(--gold);
}
.stairs .st:nth-child(1) { margin-left: 0; }
.stairs .st:nth-child(2) { margin-left: 60px; filter: brightness(.94); }
.stairs .st:nth-child(3) { margin-left: 120px; filter: brightness(.88); }
.stairs .st:nth-child(4) { margin-left: 180px; filter: brightness(.82); }
.stairs .st:nth-child(5) { margin-left: 240px; filter: brightness(.76); }
.stairs .st:nth-child(n+3) .n { background: #b9782f; }
.stairs .st:nth-child(n+4) .n { background: var(--ember); }
.stairs .st:nth-child(5) .n { background: var(--blood); color: #fff; }

/* хронология */
.tl { position: relative; }
.tl-line { position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(232, 178, 90, .2), var(--gold), rgba(232, 178, 90, .2)); }
.tl-ev { position: absolute; transform: translateX(-50%); text-align: center; width: 220px; }
.tl-ev .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); margin: 0 auto; box-shadow: 0 0 0 6px rgba(232, 178, 90, .18), 0 0 20px rgba(232, 178, 90, .6); }
.tl-ev .y { font: 900 34px/1 "Playfair Display", serif; color: var(--gold-2); margin: 10px 0 6px; }
.tl-ev .t { font-size: 21px; line-height: 1.3; color: var(--text); }
.tl-ev.battle .dot { background: var(--ember); box-shadow: 0 0 0 6px rgba(224, 102, 60, .2), 0 0 20px rgba(224, 102, 60, .6); }
.tl-ev.battle .y { color: #ffb08f; }
.tl-ev.up { bottom: 0; }

/* вертикальная хронология */
.vtl { position: relative; padding-left: 40px; display: flex; flex-direction: column; gap: 14px; }
.vtl::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(180deg, var(--violet), var(--ember), var(--gold)); border-radius: 3px; }
.vtl .ev { position: relative; font-size: 23px; line-height: 1.38; }
.vtl .ev::before { content: ""; position: absolute; left: -37px; top: 9px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); border: 3px solid var(--gold); }
.vtl .ev.per::before { border-color: var(--ember); }
.vtl .ev.rum::before { border-color: var(--violet); }
.vtl .ev.isl::before { background: var(--gold); }
.vtl .ev .y { font: 900 25px/1 "Playfair Display", serif; color: var(--gold-2); margin-right: 12px; }

/* перевёртыш «было → стало» */
.flips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.flip { perspective: 1400px; height: 210px; }
.flip .in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.flip.on .in { transform: rotateY(180deg); }
.flip .face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 18px; padding: 22px 26px;
  display: flex; flex-direction: column; justify-content: center;
  font-size: 25px; line-height: 1.35;
}
.flip .front { background: linear-gradient(160deg, #2a0f0b, #140808); border: 1px solid rgba(224, 102, 60, .35); color: #ffd9cc; }
.flip .back { background: linear-gradient(160deg, #fbf3e2, #efdfbd); color: var(--paper-ink); transform: rotateY(180deg); box-shadow: 0 20px 60px rgba(232, 178, 90, .25); }
.flip .face small { font: 800 15px/1 Manrope, sans-serif; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 10px; }
.flip .front small { color: var(--ember); }
.flip .back small { color: #a35a12; }

/* уроки-фонари */
.lamps { display: flex; flex-direction: column; gap: 14px; }
.lamp {
  display: grid; grid-template-columns: 70px 1fr; gap: 22px; align-items: start;
  padding: 18px 26px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(232, 178, 90, .13), rgba(9, 11, 19, .72) 40%);
  border: 1px solid rgba(232, 178, 90, .22);
}
.lamp svg { width: 62px; height: 62px; color: var(--gold); filter: drop-shadow(0 0 12px rgba(246, 213, 149, .55)); }
.lamp h3 { font-size: 31px; margin: 2px 0 6px; color: var(--gold-2); }
.lamp p { margin: 0; font-size: 23px; line-height: 1.42; color: var(--muted); }

/* большие числа */
.stat { text-align: center; }
.stat .v { font: 900 92px/1 "Playfair Display", serif; color: var(--gold-2); }
.stat .l { font-size: 22px; color: var(--muted); margin-top: 6px; }

/* разделитель раздела */
.divider { justify-content: center; }
.divider .roman {
  font: 900 300px/0.8 "Playfair Display", serif;
  color: transparent; -webkit-text-stroke: 2px rgba(232, 178, 90, .55);
  margin-bottom: 20px;
}
.divider h1 { font-size: 120px; max-width: 1400px; }
.divider .lead { max-width: 1180px; margin-top: 26px; color: rgba(243, 238, 228, .86); }

/* вопросы */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.qa .q {
  background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px; padding: 18px 24px; font-size: 24px; line-height: 1.38;
}
.qa .q .n { font: 900 26px/1 "Playfair Display", serif; color: var(--gold); margin-right: 10px; }
.qa .q .a { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(232, 178, 90, .3); color: #ffe3a8; font-size: 22px; }

/* книги */
.book {
  display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center;
}
.book .cover {
  height: 210px; border-radius: 6px 14px 14px 6px; position: relative;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .55), inset 6px 0 0 rgba(0, 0, 0, .25), inset 9px 0 0 rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 16px 14px 16px 22px;
  font-family: "Playfair Display", serif; line-height: 1.1;
}
.book .cover .ar-h { font-size: 24px; line-height: 1.4; color: inherit; }
.book .cover small { font: 700 11px/1.3 Manrope, sans-serif; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: 8px; }
.book .c1 { background: linear-gradient(160deg, #19432f, #0c2419); color: #f1d9a0; border: 1px solid rgba(241, 217, 160, .3); }
.book .c2 { background: linear-gradient(160deg, #5a1d16, #2c0d0a); color: #f6dcae; border: 1px solid rgba(246, 220, 174, .3); }

/* кирпичи */
.wall { display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; }
.wall .brow { display: flex; gap: 8px; }
.wall .brow:nth-child(even) { margin-left: 70px; }
.wall .b {
  width: 132px; height: 56px; border-radius: 6px;
  background: linear-gradient(180deg, #d7b98a, #b48e5c);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .3);
}
.wall .b.gap { background: transparent; box-shadow: inset 0 0 0 3px rgba(246, 213, 149, .7); border: 2px dashed rgba(246, 213, 149, .8); animation: pulse 1.6s ease-in-out infinite; }
.wall .b.gold { background: linear-gradient(180deg, #ffe7a6, #e8b25a); box-shadow: 0 0 40px rgba(246, 213, 149, .9), inset 0 -4px 0 rgba(0, 0, 0, .15); }
@keyframes pulse { 50% { opacity: .45; } }
.wall .b.gap { position: relative; }
.wall .b.gap:has(.gold.on) { animation: none; border-color: transparent; box-shadow: none; }
.wall .b.gap .gold { position: absolute; inset: -2px; width: auto; height: auto; }

/* титул */
.title-ar { font-size: 56px; line-height: 2.2; color: var(--gold); margin: 0; padding-top: 46px; }
.photo-note { position: absolute; right: 120px; bottom: 76px; max-width: 760px; margin: 0; text-align: right; color: rgba(243, 238, 228, .62); }

/* карта курса */
.tl2 { display: grid; grid-template-columns: repeat(20, 1fr); grid-template-rows: auto 40px auto; row-gap: 0; }
.tl2 .era {
  grid-row: 1; margin: 0 4px 14px; padding: 10px 0 0;
  border-top: 5px solid currentColor; text-align: center;
  font: 800 17px/1.2 Manrope, sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
.tl2 .e1 { color: var(--violet); }
.tl2 .e2 { color: var(--gold); }
.tl2 .e3 { color: var(--green); }
.tl2 .rail { grid-row: 2; grid-column: 2 / 20; align-self: center; height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(196, 178, 255, .5), var(--gold), rgba(159, 212, 154, .7)); }
.tl2 .ev { grid-row: 2 / 4; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; }
.tl2 .ev .dot { width: 24px; height: 24px; margin-top: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(232, 178, 90, .18), 0 0 20px rgba(232, 178, 90, .6); }
.tl2 .ev .y { font: 900 32px/1 "Playfair Display", serif; color: var(--gold-2); margin: 14px 0 6px; }
.tl2 .ev .t { font-size: 19px; line-height: 1.3; }
.tl2 .ev.battle .dot { background: var(--ember); box-shadow: 0 0 0 6px rgba(224, 102, 60, .2), 0 0 20px rgba(224, 102, 60, .6); }
.tl2 .ev.battle .y { color: #ffb08f; }
.tl2 .ev.here .dot { background: #fff; box-shadow: 0 0 0 8px rgba(255, 255, 255, .18), 0 0 26px rgba(255, 255, 255, .7); }
.tl2 .ev.here .tag { margin-top: 10px; }

/* слова-числа */
.names { display: flex; flex-direction: column; gap: 4px; }
.names > div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed rgba(232, 178, 90, .25); font-size: 25px; }
.names b { font: 900 44px/1 "Playfair Display", serif; color: var(--gold-2); }

/* переселение племён */
.mig { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.mig .m { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: baseline; padding: 11px 18px; border-radius: 14px; background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .05); font-size: 21px; line-height: 1.35; }
.mig .m b { font-size: 23px; }
.mig .m span { color: var(--muted); }

/* избранный род */
.rings { position: relative; width: 720px; height: 720px; }
.rings .ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  border: 2px solid rgba(232, 178, 90, .45);
  background: radial-gradient(circle, rgba(232, 178, 90, .02), rgba(232, 178, 90, .09));
  display: flex; justify-content: center;
}
.rings .ring span { margin-top: 18px; font: 800 18px/1.1 Manrope, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.rings .r1 { width: 720px; height: 720px; margin: -360px 0 0 -360px; border-color: rgba(232, 178, 90, .25); }
.rings .r2 { width: 580px; height: 580px; margin: -290px 0 0 -290px; border-color: rgba(232, 178, 90, .35); }
.rings .r3 { width: 440px; height: 440px; margin: -220px 0 0 -220px; }
.rings .r4 { width: 300px; height: 300px; margin: -150px 0 0 -150px; border-color: rgba(232, 178, 90, .7); }
.rings .r5 {
  width: 168px; height: 168px; margin: -84px 0 0 -84px; align-items: center;
  background: radial-gradient(circle, #ffe7a6, #e8b25a); border: 0;
  box-shadow: 0 0 60px rgba(246, 213, 149, .7);
}
.rings .r5 span { margin: 0; color: var(--ink); font: 900 24px/1.15 "Playfair Display", serif; letter-spacing: 0; text-transform: none; text-align: center; }

/* таблицы: варианты */
table.cmp th.green { color: var(--green); }
table.cmp th.ember { color: var(--ember); }
table.cmp.plain td:first-child { font-weight: 500; color: var(--text); }
table.cmp td.good, table.cmp.plain td.good { color: #d3f2c4; }
table.cmp td.bad, table.cmp.plain td.bad { color: #ffc4b0; }
table.cmp.twin td.good { background: rgba(14, 38, 22, .84); }
table.cmp.twin td.bad { background: rgba(44, 13, 9, .84); }
table.cmp.twin td.good b { color: #b9e59a; }
table.cmp.worship td { vertical-align: middle; padding: 10px 20px; }
table.cmp.worship td:first-child { font-size: 22px; line-height: 1.38; }
table.cmp.worship td:first-child b { color: #ffc4b0; }
table.cmp.ba th:first-child { color: var(--ember); }
table.cmp.ba th:last-child { color: #fff1cf; }
table.cmp.ba td { vertical-align: middle; }
table.cmp.ba td:first-child { background: rgba(40, 12, 9, .88); color: #ffcdbd; font-weight: 700; }
table.cmp.ba td:last-child { background: linear-gradient(180deg, var(--paper), var(--paper-2)); color: var(--paper-ink); border-color: rgba(0, 0, 0, .05); }
table.cmp.ba td:last-child b { color: #8a4b12; }
table.cmp.ba td:last-child .src { color: #8a4b12; margin: 0 0 0 8px; font-size: 14px; }
table.cmp.ba td:last-child .ar { color: #3a2410; }
table.cmp.ba td:last-child .tr { color: rgba(42, 32, 23, .82); }
table.cmp.ba td:last-child .ayah cite, table.cmp.ba td:last-child .ayah .an { color: #8a4b12; }
table.cmp.ba td:last-child .hl { text-shadow: none; }
table.cmp.ba td:last-child .hl-a { color: #a35a12 !important; }
table.cmp.ba td:last-child .hl-b { color: #1f6aa6 !important; }
table.cmp.ba td:last-child .hl-c { color: #3f7d22 !important; }
table.cmp.ba td:last-child .hl-d { color: #b4432a !important; }

/* арабские термины в карточках */
.term { float: right; margin: -4px 0 0 14px; font-size: 36px; line-height: 1.25; color: var(--gold); }
.card.idol { text-align: center; padding-top: 12px; }
.card.idol .term { float: none; display: block; margin: 0 0 2px; font-size: 64px; line-height: 1.5; color: var(--gold-2); text-shadow: 0 0 26px rgba(246, 213, 149, .35); }
.talb { font-size: 36px; line-height: 1.8; margin: 14px 0 10px; }

/* аят: дополнения */
.ayah > .tag { margin-bottom: 8px; }
.ayah .basm { font-size: .72em; line-height: 1.6; color: var(--gold-2); opacity: .85; margin: 0; }
.ayah .an { color: var(--gold); }
.paper .ayah .an, .paper .ayah cite { color: #8a4b12; }
.ayah.inl { text-align: left; }
.ayah.inl .ar { text-align: right; font-size: 30px; line-height: 1.75; margin: 4px 0 2px; }
.ayah.inl .tr { display: inline; font-size: 20px; line-height: 1.4; }
.ayah.inl cite { display: inline; margin: 0 0 0 8px; font-size: 13px; letter-spacing: .12em; white-space: nowrap; }
.chain .node .ayah.inl .tr { color: rgba(243, 238, 228, .85); }

/* войны */
.wars { display: flex; flex-direction: column; gap: 20px; }
.wars .chain .node { font-size: 20px; padding: 12px 16px; }
.wars .chain-label { margin-bottom: 8px; }

/* источники */
.src-h { font-family: Manrope, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: .04em; margin-bottom: 8px; }
.credits-box { overflow: hidden; }
.credits { columns: 2; column-gap: 30px; margin: 0; padding-left: 22px; font-size: 14.5px; line-height: 1.38; color: var(--muted); }
.credits li { break-inside: avoid; margin-bottom: 7px; }
.credits b { color: var(--gold-2); font-weight: 700; }
.credits a { color: #f3dfb2; text-decoration: none; border-bottom: 1px solid rgba(246, 213, 149, .3); }
.slide a { color: var(--gold-2); }

/* ---------- фрагменты: пошаговое появление ---------- */

.f { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .75s var(--ease), filter .75s ease; }
.f.on { opacity: 1; transform: none; }
.f.l { transform: translateX(-46px); }
.f.r { transform: translateX(46px); }
.f.z { transform: scale(.9); }
.f.d { transform: translateY(-22px); }
.f.fade { transform: none; }
.f.blur { transform: none; filter: blur(14px); }
.f.l.on, .f.r.on, .f.z.on, .f.d.on { transform: none; }
.f.blur.on { filter: none; }
.f.drop { transform: translateY(-260px) rotate(-8deg); transition: opacity .3s ease, transform 1.1s cubic-bezier(.3, 1.4, .5, 1); }
.f.drop.on { transform: none; }
.off { opacity: .28 !important; filter: saturate(.4); transition: opacity .6s ease, filter .6s ease; }
.gone { display: none !important; }

svg .f { transform: none; transition: opacity .8s ease; }
svg .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: opacity .3s ease, stroke-dashoffset 2.4s ease-in-out; }
svg .draw.on { stroke-dashoffset: 0; }

.now-pulse.on { animation: glowp 2.4s ease-in-out 1; }
@keyframes glowp { 30% { box-shadow: 0 0 0 3px rgba(246, 213, 149, .6), 0 0 50px rgba(246, 213, 149, .45); } }

/* ---------- карты ---------- */

.map { display: block; width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); border: 1px solid rgba(232, 178, 90, .18); }
.map .grat { fill: none; stroke: rgba(255, 255, 255, .05); stroke-width: 1; }
.map .coast { fill: none; stroke: rgba(232, 178, 90, .38); stroke-width: 1.1; }
.map .lake { fill: #0f2032; stroke: rgba(143, 195, 255, .35); stroke-width: .8; }
.map .river { fill: none; stroke: #4a86b5; stroke-width: 1.6; stroke-linecap: round; opacity: .85; }
.map .emp { stroke: none; }
.map .emp.rum { fill: rgba(140, 108, 230, .46); }
.map .emp.per { fill: rgba(224, 96, 52, .46); }
.map .emp.aks { fill: rgba(110, 180, 110, .40); }
.map .emp.arab { fill: rgba(246, 200, 110, .40); }
.map text { font-family: Manrope, sans-serif; paint-order: stroke; stroke: rgba(7, 9, 15, .9); stroke-width: 5px; stroke-linejoin: round; }
.map .sea-l { font: italic 600 19px "Playfair Display", serif; fill: rgba(150, 190, 230, .55); letter-spacing: .06em; stroke: none; }
.map .emp-l { font: 800 40px "Playfair Display", serif; letter-spacing: .14em; }
.map .emp-s { font-weight: 700; font-size: 19px; fill: rgba(243, 238, 228, .85); }
.map .rum-l, .map .rum-t { fill: #d9ccff; }
.map .per-l, .map .per-t { fill: #ffb399; }
.map .aks-l, .map .aks-t { fill: #b9e6b0; }
.map .ind-l { fill: #a9d2ff; }
.map .arab-l { fill: #ffe3a8; }
.map .yem-l { fill: #cfeec8; font-size: 17px; }
.map .reg-l { font-weight: 800; font-size: 17px; letter-spacing: .24em; fill: rgba(246, 213, 149, .8); }
.map .reg-big { font: 800 26px "Playfair Display", serif; letter-spacing: .3em; fill: rgba(246, 213, 149, .92); }
.map .reg-desert { font: italic 700 22px "Playfair Display", serif; fill: rgba(243, 238, 228, .5); }
.map .reg-desert-s { font-size: 16px; font-weight: 600; fill: rgba(243, 238, 228, .45); }
.map .city circle { fill: #f3eee4; stroke: #07090f; stroke-width: 2; }
.map .city text { font-weight: 700; font-size: 19px; fill: #f3eee4; }
.map .city.cap circle { fill: var(--gold); r: 8; }
.map .city.cap text { font-size: 22px; font-weight: 800; fill: #fff4dc; }
.map .front { fill: none; stroke: #ff5a3c; stroke-width: 5; stroke-linecap: round; }
.map .front-glow { fill: none; stroke: #ff3a1c; stroke-width: 14; opacity: .7; }
.map .front-l text { font-weight: 800; font-size: 22px; fill: #ffb399; }
.map .front-l text.sub, .map .ally .sub { font-size: 16px; font-weight: 600; fill: rgba(243, 238, 228, .75); }
.map .ally text { font: 800 22px "Playfair Display", serif; }
.map .edge-l { font-weight: 800; font-size: 20px; letter-spacing: .2em; }
.map .mecca circle { fill: #ffd27a; stroke: #07090f; stroke-width: 2.5; }
.map .mecca text { font: 900 30px "Playfair Display", serif; fill: #ffe3a8; }
.map .mecca-glow { fill: #ffcf6e; opacity: .85; }
.map .mecca-glow.f { opacity: 0; }
.map .mecca-glow.f.on { opacity: .85; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.map .route { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.map .route.sum { stroke: #ffd27a; }
.map .route.win { stroke: #8fd0ff; }
.map .route-l text { font-weight: 800; font-size: 20px; }
.map .sum-t { fill: #ffd27a; }
.map .win-t { fill: #8fd0ff; }
.map .note { font: italic 600 15px Manrope, sans-serif; fill: rgba(243, 238, 228, .5); stroke: none; }

/* синхронный список рядом с картой */
.legend { display: flex; flex-direction: column; gap: 8px; }
.legend .it {
  display: grid; grid-template-columns: 18px 1fr; gap: 14px; align-items: start;
  padding: 8px 16px; border-radius: 14px; background: var(--glass-2); border: 1px solid rgba(255, 255, 255, .05);
  font-size: 20px; line-height: 1.32;
}
.legend .sw { width: 18px; height: 18px; border-radius: 5px; margin-top: 6px; }
.legend .it h3 { font-size: 22px; margin: 0 0 1px; font-family: Manrope, sans-serif; font-weight: 800; }

/* родословная урока 2 */
.nasab { display: flex; flex-direction: column; gap: 8px; }
.nasab .above { display: flex; justify-content: center; align-items: center; gap: 22px; }
.nasab .who {
  width: 320px; text-align: center; padding: 8px 14px 10px;
  border-radius: 16px; border: 1px solid rgba(232, 178, 90, .4);
  background: rgba(9, 11, 19, .55);
}
.nasab .who .ar-h { font-size: 36px; line-height: 1.15; color: var(--gold-2); }
.nasab .who b { display: block; margin-top: 0; font-size: 20px; color: var(--text); }
.nasab .who small { display: block; margin-top: 1px; font-size: 15px; color: var(--muted); font-weight: 600; }
.nasab .bridge { width: 250px; text-align: center; color: var(--faint); font: 700 14px/1.3 Manrope, sans-serif; }
.nasab .bridge i { display: block; border-top: 2px dashed rgba(232, 178, 90, .45); margin: 6px 18px; }
.gen { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.gen .p {
  text-align: center; padding: 5px 3px 6px; border-radius: 12px;
  background: rgba(9, 11, 19, .62); border: 1px solid rgba(255, 255, 255, .07);
  font-size: 17px; font-weight: 800; line-height: 1.15;
}
.gen .p .ar-h { display: block; font-size: 20px; line-height: 1.7; font-weight: 400; color: #fbefd6; }
.gen .p em { display: block; margin-top: 1px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold); }
.gen .p.lim { border-color: rgba(232, 178, 90, .8); background: rgba(232, 178, 90, .12); }
.gen .p.father { border-color: rgba(159, 212, 154, .5); }
.nasab .down { text-align: center; color: var(--gold); font-size: 16px; line-height: 1; opacity: .75; }
.son {
  align-self: center; display: flex; align-items: baseline; gap: 14px;
  padding: 6px 22px 8px; border-radius: 999px;
  border: 1px solid rgba(232, 178, 90, .65); background: rgba(232, 178, 90, .14);
}
.son .ar-h { font-size: 32px; line-height: 1; color: var(--gold-2); }
.son b { font: 800 26px/1 "Playfair Display", serif; color: var(--text); }
.chips { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.chips span {
  padding: 7px 14px; border-radius: 999px;
  background: rgba(9, 11, 19, .55); border: 1px solid rgba(255, 255, 255, .08);
  font-size: 22px; font-weight: 700;
}
.chips .hot { border-color: rgba(224, 102, 60, .55); color: #ffd0c2; }
.chips .now { border-color: rgba(232, 178, 90, .75); color: var(--gold-2); background: rgba(232, 178, 90, .12); }
.card.idol.dream { padding-top: 16px; }
.card.idol.dream .term { font-size: 50px; line-height: 2.05; padding-top: 8px; }
.ayah.tall .ar { font-size: 34px; line-height: 2.7; }
.ayah.tall .an { display: block; width: max-content; margin: .2em auto 0; }
.ayah.tall .tr { font-size: 23px; line-height: 1.45; }
.ayah .an { display: inline-block; margin-inline: .35em .15em; vertical-align: middle; }
.son { white-space: nowrap; gap: 20px; }

/* ---------- оглавление ---------- */

.toc {
  position: fixed; inset: 0; z-index: 10; display: none;
  background: rgba(5, 7, 12, .88); backdrop-filter: blur(10px);
  padding: 4vh 5vw; overflow: auto;
}
.toc.open { display: block; }
.toc h4 { font: 800 14px/1 Manrope, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; }
.toc ol { columns: 3; column-gap: 40px; margin: 0; padding-left: 28px; color: var(--faint); }
.toc li { font-size: 16px; line-height: 1.3; padding: 5px 0; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover, .toc li.cur a { color: var(--gold); }
.mark {
  position: absolute; left: 40px; bottom: 18px; z-index: 4;
  margin: 0; pointer-events: none; user-select: none;
  font: 700 26px/1 Manrope, sans-serif; letter-spacing: .04em;
  color: rgba(243, 238, 228, .82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 10px rgba(0, 0, 0, .45);
}

.help {
  position: fixed; right: 18px; bottom: 14px; z-index: 6;
  font: 600 12px/1.4 Manrope, sans-serif; color: rgba(243, 238, 228, .35);
  pointer-events: none; transition: opacity 1s;
}
body.idle .help { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .bg { animation: none; }
  .photo img, .slide.on .photo img { transform: none; transition: none; }
}

@media print {
  html, body { overflow: visible; height: auto; }
}
