:root {
  --night: #0E2A3A;
  --night-2: #163B4F;
  --ink: #12313F;
  --muted: #5F7C88;
  --gold: #F5C451;
  --gold-2: #E6A93A;
  --gold-3: #B9802A;
  --cream: #FFF8EA;
  --parch: #FBF1DC;
  --line: rgba(245, 196, 81, .35);
  --glass: rgba(12, 38, 52, .72);
  --ok: #3FA66A;
  --bad: #D9665B;
  --r-lg: 26px;
  --r-md: 18px;
  --shadow: 0 18px 40px -12px rgba(5, 20, 28, .45), 0 4px 12px rgba(5, 20, 28, .18);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--night);
  font-family: "Nunito", "Amiri", system-ui, -apple-system, "Segoe UI", sans-serif;   /* Amiri подхватывает ﷺ и арабские слова */ color: var(--ink);
  overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
#app { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: #CFEAF7; }   /* clip: сцену нельзя прокрутить даже программно (фокус, scrollIntoView) */
#stage { position: absolute; inset: 0; overflow: hidden; overflow: clip; touch-action: none; }

/* ---------- верхняя панель ---------- */
#top {
  position: absolute; z-index: 40; left: 0; right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  display: flex; justify-content: space-between; align-items: center; padding: 0 12px; pointer-events: none;
}
#top button { pointer-events: auto; }
.tright { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 15px; border-radius: 21px;
  background: var(--glass); color: #F4F8FA; font-weight: 800; font-size: 15px;
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 6px 16px -6px rgba(0,0,0,.35);
  backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3);
  transition: transform .15s, opacity .2s;
}
.pill:active { transform: scale(.94); }
.pill svg { width: 22px; height: 22px; }
.pill.round { width: 42px; padding: 0; justify-content: center; }
.pill[aria-pressed="false"] { opacity: .45; }
#tBag.bump { animation: bump .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 35% { transform: scale(1.3); } }

/* ---------- подпись с репликой ---------- */
#cap {
  position: absolute; z-index: 30; left: 12px; right: 12px;
  top: calc(env(safe-area-inset-top, 0px) + 64px);
  max-width: 560px; margin: 0 auto; padding: 16px 18px 16px 18px; border-radius: var(--r-lg);
  background: var(--glass); color: #fff; box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: opacity .35s, transform .35s cubic-bezier(.2,.9,.3,1);
}
#cap::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7;
}
#cap.hidden { opacity: 0; transform: translateY(-14px) scale(.98); pointer-events: none; }
#capTalk { position: absolute; right: 16px; top: 14px; display: flex; gap: 3px; align-items: flex-end; height: 16px; opacity: 0; transition: opacity .3s; }
#capTalk i { width: 4px; height: 6px; border-radius: 2px; background: var(--gold); }
#cap.talk #capTalk { opacity: 1; }
#cap.talk #capTalk i { animation: eq .9s ease-in-out infinite; }
#cap.talk #capTalk i:nth-child(2) { animation-delay: .15s; }
#cap.talk #capTalk i:nth-child(3) { animation-delay: .3s; }
/* детский голос-друг: свои цвета индикатора и подписи */
#cap.kid #capTalk { opacity: 1; } #cap.kid #capTalk i { background: #8FE3C6; animation: eq .6s ease-in-out infinite; }
#cap.kid #capTalk i:nth-child(2) { animation-delay: .1s; } #cap.kid #capTalk i:nth-child(3) { animation-delay: .2s; }
#cap.kid #capNote { color: #8FE3C6; }
@keyframes eq { 50% { height: 16px; } }
#capText { margin: 0; padding-right: 22px; font-size: clamp(18px, 4.8vw, 22px); line-height: 1.38; font-weight: 800; letter-spacing: .1px; }
#capText.pop { animation: capin .45s cubic-bezier(.2,.9,.3,1); }
@keyframes capin { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
#capNote { margin: 10px 0 0; font-size: 16px; line-height: 1.4; color: #FFE09A; font-weight: 700; }
#capNote:empty { display: none; }
#capBtns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#capBtns:empty { display: none; }

/* ---------- кнопки ---------- */
.btn {
  position: relative; min-height: 54px; padding: 0 28px; border-radius: 27px;
  background: linear-gradient(180deg, #FFD978 0%, var(--gold) 45%, var(--gold-2) 100%); color: #3B2A0C;
  font-weight: 900; font-size: 18px; letter-spacing: .2px;
  box-shadow: 0 5px 0 var(--gold-3), 0 12px 20px -8px rgba(185,128,42,.7), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-3), 0 4px 10px -6px rgba(185,128,42,.7), inset 0 1px 0 rgba(255,255,255,.6); }
.btn.big { min-height: 62px; font-size: 21px; padding: 0 44px; min-width: 230px; }
.btn.glass {
  background: rgba(255,255,255,.14); color: #fff; min-width: 230px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn.glass:active { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.btn.teal { background: linear-gradient(180deg, #2B6E8A, #1C5169); color: #fff; box-shadow: 0 5px 0 #123B4D, inset 0 1px 0 rgba(255,255,255,.25); }
.btn.teal:active { box-shadow: 0 1px 0 #123B4D; }
.btn.line { background: transparent; color: var(--night-2); box-shadow: inset 0 0 0 2px rgba(22,59,79,.35); }
.btn.glow::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 3px solid rgba(255,224,140,.95);
  animation: glow 1.5s ease-out infinite; pointer-events: none;
}
@keyframes glow { from { opacity: .9; transform: scale(.96); } to { opacity: 0; transform: scale(1.12); } }

/* ---------- варианты ответа ---------- */
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 8px 16px 8px 8px; border-radius: var(--r-md);
  background: var(--cream); color: var(--ink); font-weight: 900; font-size: 19px; text-align: left;
  box-shadow: 0 4px 0 #E3D3AE, 0 10px 18px -10px rgba(0,0,0,.4);
  transition: transform .2s, background .25s, opacity .25s, box-shadow .25s;
}
.opt .oi {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(160deg, #E7F3F8, #CFE5EE); box-shadow: inset 0 0 0 1px rgba(18,49,63,.08);
}
.opt .oi svg { width: 32px; height: 32px; }
.opt .oi.ar { background: linear-gradient(160deg, #1F5B74, #123D50); font-family: "Amiri", serif; font-size: 30px; line-height: 1; padding-top: 6px; color: var(--gold); font-weight: 700; }
.opt.reading { transform: scale(1.025); box-shadow: 0 4px 0 #E3D3AE, 0 0 0 3px var(--gold), 0 10px 18px -10px rgba(0,0,0,.4); }
.opt.no { background: #F6DEDA; opacity: .55; animation: shake .42s; }
.opt.yes { background: #DCF2E3; box-shadow: 0 4px 0 #B5DCC2, 0 0 0 3px var(--ok); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- стартовый экран ---------- */
#start {
  position: absolute; inset: 0; z-index: 50; overflow-y: auto; background: #163444;
  display: flex; flex-direction: column; align-items: stretch;
  transition: opacity .7s, transform .7s;
}
#start.off { opacity: 0; transform: scale(1.04); pointer-events: none; }
.hero {
  position: relative; flex: 1 1 auto; min-height: 150px; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(255,227,163,.8), rgba(255,227,163,0) 70%),
    linear-gradient(180deg, #0B2236 0%, #1D4A66 45%, #C98A6B 82%, #F6D08C 100%);
}
.hero .stars { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 65%; }
.hero .moon { position: absolute; top: 10%; right: max(6%, calc(50% - 230px)); width: clamp(64px, 12vh, 110px); height: auto; aspect-ratio: 1; }
.hero .skyline { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; height: clamp(90px, 62%, 230px); width: auto; aspect-ratio: 240 / 150; }
.hero .dunes { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 48px; }
.twinkle circle { animation: tw 3s ease-in-out infinite; }
.twinkle circle:nth-child(3n) { animation-delay: 1s; }
.twinkle circle:nth-child(3n+1) { animation-delay: 2s; }
@keyframes tw { 50% { opacity: .25; } }
.sbox {
  position: relative; flex: none; width: min(92vw, 440px); margin: 0 auto; text-align: center; color: #fff;
  padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 18px);
}
.bism { font-family: "Amiri", serif; font-size: 25px; color: var(--gold); margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
#start h1 {
  margin: 6px 0 10px; font-size: clamp(42px, 12vw, 56px); line-height: 1; font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(180deg, #FFFFFF 30%, #FFE3A1 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.35));
}
.sub { margin: 0 auto 26px; max-width: 300px; font-size: 17px; line-height: 1.4; color: rgba(255,255,255,.82); font-weight: 700; }
.sbtns { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.chip { margin-top: 2px; padding: 8px 16px; border-radius: 18px; color: rgba(255,255,255,.75); font-weight: 800; font-size: 15px; background: rgba(255,255,255,.08); }
.chip b { color: var(--gold); }
a.chip { display: inline-block; text-decoration: none; font-size: 14px; }
.vlist { display: flex; flex-direction: column; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 #E6D7B5; }
.vrow.on { box-shadow: 0 3px 0 #E6D7B5, 0 0 0 3px var(--gold); }
.vrow span { flex: 1; } .vrow b { display: block; font-size: 18px; color: var(--ink); } .vrow small { color: var(--muted); font-weight: 700; font-size: 13.5px; }
.vplay { flex: none; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(160deg, #2B6E8A, #1C5169); color: #fff; font-size: 18px; padding-left: 3px; }
.vplay:active { transform: scale(.92); }
.vpick { min-height: 42px; font-size: 15px; padding: 0 14px; }
.vrow.on .vpick { background: #DCF2E3; color: #2A7A4B; box-shadow: none; }
.hint-sound { margin: 20px 0 0; color: rgba(255,255,255,.6); font-weight: 700; font-size: 14px; }
.credits { margin: 10px auto 0; max-width: 320px; font-size: 11.5px; line-height: 1.45; color: rgba(255,255,255,.42); font-weight: 700; }

/* ---------- переходы ---------- */
#fade { position: absolute; inset: 0; z-index: 60; background: var(--night); opacity: 0; pointer-events: none; transition: opacity .5s; }
#fade.on { opacity: 1; pointer-events: auto; }

/* ---------- заставка главы ---------- */
.chtitle {
  position: absolute; z-index: 35; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(14,42,58,.55) 0%, rgba(14,42,58,0) 70%);
  opacity: 0; transition: opacity .6s;
}
.chtitle.on { opacity: 1; }
.chtitle div { text-align: center; color: #fff; transform: translateY(10px); transition: transform .8s cubic-bezier(.2,.9,.3,1); }
.chtitle.on div { transform: none; }
.chtitle small { display: block; font-size: 15px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
.chtitle b { display: block; font-size: clamp(34px, 10vw, 46px); font-weight: 900; line-height: 1.05; margin-top: 6px; text-shadow: 0 4px 20px rgba(0,0,0,.45); }
.chtitle .orn { width: 120px; height: 16px; margin: 12px auto 0; }

/* ---------- листы ---------- */
.sheet {
  position: absolute; inset: 0; z-index: 55; overflow-y: auto; background: rgba(6, 22, 31, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start; padding: calc(env(safe-area-inset-top, 0px) + 16px) 12px 30px;
  opacity: 0; transition: opacity .3s;
}
.sheet.on { opacity: 1; }
.sheet-in {
  width: min(100%, 520px); background: var(--parch); border-radius: 28px; padding: 24px 16px 18px; box-shadow: var(--shadow);
  transform: translateY(16px); transition: transform .4s cubic-bezier(.2,.9,.3,1);
}
.sheet.on .sheet-in { transform: none; }
.sheet h2 { margin: 0 0 16px; text-align: center; color: var(--night-2); font-size: 27px; font-weight: 900; }
.world { margin: 0 0 14px; padding: 14px; border-radius: 22px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(185,128,42,.15); }
.whead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.whead .wnum { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 20px; color: var(--gold); background: linear-gradient(160deg, #1F5B74, #123D50); }
.whead b { display: block; font-size: 17px; color: var(--night-2); line-height: 1.2; }
.whead small { display: block; font-size: 13.5px; color: var(--muted); font-weight: 700; }
.wbar { height: 6px; border-radius: 3px; background: rgba(18,49,63,.1); margin-top: 6px; overflow: hidden; }
.wbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 3px; }
.chlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ch > span:last-child { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.ch .nw { white-space: nowrap; }
.ch {
  display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 8px 10px; border-radius: 16px; background: #fff;
  text-align: left; font-weight: 900; font-size: 15px; line-height: 1.15; color: var(--ink);
  box-shadow: 0 3px 0 #E6D7B5, 0 8px 14px -10px rgba(0,0,0,.35); transition: transform .15s;
}
.ch:active { transform: scale(.97); }
.ch .ci { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, #E7F3F8, #CFE5EE); }
.ch .ci svg { width: 28px; height: 28px; }
.ch .stars { display: block; color: var(--gold-2); font-size: 13px; letter-spacing: 1px; margin-top: 2px; }
.ch.soon { background: rgba(255,255,255,.4); color: #8FA5AE; box-shadow: none; cursor: default; font-weight: 800; }
.ch.soon .ci { background: rgba(18,49,63,.06); }
.ch.soon .stars { color: #A9BCC2; letter-spacing: 0; }
.sheet .row { display: flex; justify-content: center; margin-top: 8px; }
.bag { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.bag div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) { .bag { gap: 7px; } .bag svg { width: 52px; height: 52px; } .bag div { font-size: 12.5px; } }
.bag div { background: #fff; border-radius: 20px; padding: 12px 6px 10px; text-align: center; font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 #E6D7B5; }
.bag div.lk { opacity: .35; filter: grayscale(1); }
.bag svg { width: 64px; height: 64px; display: block; margin: 0 auto 6px; }
.sheet p.small { text-align: center; color: var(--muted); font-weight: 700; margin: 6px 0 0; }

/* ---------- карточка аята ---------- */
.ayah {
  position: absolute; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 66px) 14px 24px; background: rgba(6, 22, 31, .5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .45s;
}
.ayah.on { opacity: 1; }
.acard {
  position: relative; width: min(100%, 540px); background: var(--parch); border-radius: 28px; padding: 30px 22px 20px; text-align: center;
  box-shadow: var(--shadow); transform: translateY(18px) scale(.97); transition: transform .5s cubic-bezier(.2,.9,.3,1);
}
.ayah.on .acard { transform: none; }
.acard::before { content: ""; position: absolute; inset: 8px; border-radius: 21px; border: 1.5px solid var(--line); pointer-events: none; }
.acard .star8 { position: absolute; width: 34px; height: 34px; }
.acard .star8.tl { left: 14px; top: 14px; } .acard .star8.tr { right: 14px; top: 14px; }
.acard .star8.bl { left: 14px; bottom: 14px; } .acard .star8.br { right: 14px; bottom: 14px; }
.acard .lbl { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-3); }
.acard .ref { margin: 4px 0 14px; color: var(--night-2); font-weight: 900; font-size: 17px; }
.acard .ar { font-family: "Amiri", serif; font-size: clamp(25px, 6.6vw, 31px); line-height: 2; color: var(--ink); margin: 0 4px 12px; }
.acard .ar .num { font-size: .8em; color: var(--gold-2); }
.acard .tr { font-size: 17px; line-height: 1.5; margin: 0 6px 6px; font-weight: 700; color: #34505C; }
.acard .src { font-size: 12.5px; color: #9AAEB5; margin: 0 0 16px; font-weight: 700; }
.abtns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.abtns .btn { min-height: 50px; font-size: 17px; padding: 0 20px; }

/* ---------- награды ---------- */
.toast {
  position: absolute; z-index: 48; left: 50%; top: 44%; translate: -50% -50%; min-width: 250px;
  background: var(--parch); border-radius: 28px; padding: 22px 28px 20px; text-align: center; box-shadow: var(--shadow);
  opacity: 0; transform: scale(.7); transition: opacity .35s, transform .45s cubic-bezier(.2,1.6,.4,1);
}
.toast::before { content: ""; position: absolute; inset: 7px; border-radius: 22px; border: 1.5px solid var(--line); }
.toast.on { opacity: 1; transform: scale(1); }
.toast b { display: block; font-size: 22px; color: var(--night-2); font-weight: 900; }
.toast .st { display: flex; justify-content: center; gap: 6px; margin: 10px 0 2px; }
.toast .st svg { width: 46px; height: 46px; opacity: 0; transform: scale(.3) rotate(-30deg); animation: starin .5s cubic-bezier(.2,1.6,.4,1) forwards; }
.toast .st svg:nth-child(2) { animation-delay: .15s; } .toast .st svg:nth-child(3) { animation-delay: .3s; }
@keyframes starin { to { opacity: 1; transform: none; } }
.toast i { display: block; font-style: normal; font-size: 14.5px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.toast .item { width: 96px; height: 96px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.2)); }
.spark { position: absolute; z-index: 47; width: 10px; height: 10px; border-radius: 3px; pointer-events: none; }

/* ---------- объекты сцены ---------- */
.obj { position: absolute; translate: -50% -50%; }
.obj > svg, .obj > div > svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tapme { cursor: pointer; }
.hint::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 70px); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 4px solid rgba(255, 224, 140, .95); box-shadow: 0 0 18px rgba(255, 213, 79, .6);
  animation: ring 1.4s ease-out infinite; pointer-events: none;
}
@keyframes ring { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.wob { animation: wob .38s; }
@keyframes wob { 30% { rotate: -7deg; } 70% { rotate: 7deg; } }
.layer { position: absolute; left: 0; right: 0; pointer-events: none; }
.layer svg { width: 100%; height: 100%; display: block; }
.sky { position: absolute; inset: 0; transition: background 1.5s; }
.sunwrap { position: absolute; width: 120px; height: 120px; translate: -50% -50%; }
.sunwrap .rays { animation: spin 40s linear infinite; transform-origin: 60px 60px; }
.cloud { position: absolute; animation: drift linear infinite; will-change: transform; }
@keyframes drift { from { transform: translateX(-200px); } to { transform: translateX(calc(100vw + 200px)); } }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(8,28,38,.28) 100%); z-index: 20; }

/* море */
.sea { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #4DB0D8 0%, #2A88B4 45%, #175F86 100%); }
.wave { position: absolute; left: 0; width: 200%; height: 44px; animation: waves 7s linear infinite; }
.wave.w2 { animation-duration: 11s; opacity: .55; }
.wave.w3 { animation-duration: 15s; opacity: .35; }
@keyframes waves { to { transform: translateX(-50%); } }
.glint { position: absolute; width: 18px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.7); animation: glint 3s ease-in-out infinite; }
@keyframes glint { 0%, 100% { opacity: 0; } 50% { opacity: .9; } }
.ship .sail-full, .ship .sail-slack { transition: opacity .6s; }
.ship .sail-slack { opacity: 0; }
.ship.slack .sail-full { opacity: 0; }
.ship.slack .sail-slack { opacity: 1; }
.bob { animation: bob 2.8s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes bob { 50% { transform: translateY(6px) rotate(1.6deg); } }
.windline { position: absolute; height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.9)); animation: wind 1.1s linear forwards; }
@keyframes wind { from { transform: translateX(-30vw); opacity: 0; } 20% { opacity: 1; } to { transform: translateX(110vw); opacity: 0; } }
.fanblades { transform-box: fill-box; transform-origin: 50% 50%; }
.fanblades.spin { animation: spin .12s linear infinite; }
.fanblades.slow { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* частицы */
.drop { position: absolute; width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(180deg, #BFE8FF, #5BB8E8); translate: -50% -50%; pointer-events: none; }
.puff { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); translate: -50% -50%; pointer-events: none; }
.steam { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.85), rgba(255,255,255,0) 70%); translate: -50% -50%; pointer-events: none; }
.fruit { transform-box: fill-box; transform-origin: 50% 0%; transform: scale(0); transition: transform .7s cubic-bezier(.2,1.6,.4,1); }
.grown .fruit { transform: scale(1); }
.items-row { position: absolute; left: 50%; translate: -50% 0; width: min(92vw, 420px); bottom: 14%; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; z-index: 6; }
.items-row svg { width: 72px; height: 72px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); animation: float 3s ease-in-out infinite; }
.items-row svg:nth-child(2) { animation-delay: .5s; } .items-row svg:nth-child(3) { animation-delay: 1s; }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  .cloud, .wave, .twinkle circle, .sunwrap .rays { animation: none; }
}

/* невысокие экраны: стартовый экран должен помещаться без прокрутки */
@media (max-height: 720px) {
  .hero { min-height: 120px; }
  .sbox { padding-top: 0; }
  .bism { font-size: 20px; }
  #start h1 { font-size: 38px; margin: 2px 0 6px; }
  .sub { font-size: 15px; margin-bottom: 12px; }
  .btn.big { min-height: 52px; font-size: 19px; }
  #start .btn.glass { min-height: 46px; }
  .sbtns { gap: 8px; }
  .hint-sound { margin-top: 8px; font-size: 13px; }
  .credits { margin-top: 4px; }
}
@media (max-height: 600px) {
  .hero { min-height: 90px; }
  .hint-sound { display: none; }
}

/* выравнивание по центру: текст подсказки, пояснение, кнопки и варианты ответа */
#capText { text-align: center; padding: 0 22px; }
#capNote { text-align: center; }
#capBtns { justify-content: center; }
.opt { position: relative; justify-content: center; text-align: center; padding: 8px 64px; }
.opt .oi { position: absolute; left: 8px; top: 50%; translate: 0 -50%; }

/* ночные сцены */
.nightveil { position: absolute; inset: 0; background: rgba(6, 16, 32, .55); pointer-events: none; }
.glowspot { position: absolute; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; }
.tapfield { position: absolute; inset: 0; }
.frost { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #E9F6FF; box-shadow: 0 0 6px #E9F6FF; }
.cloud.dark svg path { fill: #4C6582; }
.sea.night { background: linear-gradient(180deg, #1F4E6E 0%, #163A55 50%, #0E2A40 100%); }

/* механики: удержание, ритм, ползунок времени, шкалы, кран */
.holdring { position: absolute; translate: -50% -50%; border-radius: 50%; pointer-events: none; z-index: 9;
  background: conic-gradient(#F5C451 calc(var(--p, 0) * 360deg), rgba(255,255,255,.35) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); }
.tbar { position: absolute; z-index: 25; left: 50%; translate: -50% 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 34px); width: min(80vw, 360px); height: 28px;
  border-radius: 14px; background: rgba(12, 38, 52, .78); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.tbar .tzone { position: absolute; top: 4px; bottom: 4px; width: 24%; border-radius: 10px; background: linear-gradient(180deg, #7FD99A, #47B06A); transition: left .3s; }
.tbar .tmark { position: absolute; top: -9px; width: 8px; height: 46px; translate: -50% 0; border-radius: 4px; background: #F5C451; box-shadow: 0 0 10px rgba(245,196,81,.8); }
.tbar.miss { animation: shake .35s; }
.tslider { position: absolute; z-index: 25; left: 50%; translate: -50% 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 44px); width: min(78vw, 360px); height: 14px;
  border-radius: 7px; background: rgba(12, 38, 52, .6); touch-action: none; }
.tslider .tfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: linear-gradient(90deg, #F5C451, #E6A93A); }
.tslider .tknob { position: absolute; top: 50%; left: 0; width: 54px; height: 54px; translate: -50% -50%; border-radius: 50%; background: #FFF8EA; box-shadow: 0 6px 16px rgba(0,0,0,.3); display: grid; place-items: center; }
.tslider .tknob svg { width: 40px; height: 40px; }
.tslider .tlabel { position: absolute; top: -40px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 900; font-size: 17px; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.meters { position: absolute; z-index: 25; left: 50%; translate: -50% 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); width: min(84vw, 360px);
  padding: 10px 14px; border-radius: 18px; background: rgba(12, 38, 52, .78); color: #fff; font-weight: 900; display: grid; gap: 8px; }
.mrow { display: grid; grid-template-columns: 56px 1fr 46px; align-items: center; gap: 10px; font-size: 15px; }
.mrow i { height: 12px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
.mrow b { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .4s; }
.mrow em { font-style: normal; text-align: right; color: #FFE09A; }
.rail { position: absolute; left: 6%; right: 6%; height: 8px; border-radius: 4px; background: linear-gradient(180deg, #6E8691, #4F6F7C); z-index: 5; }
.crope { position: absolute; width: 3px; height: 30px; translate: -50% 0; background: #4F6F7C; z-index: 5; }
.blk { width: 100%; height: 100%; border-radius: 8px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), inset 0 3px 0 rgba(255,255,255,.35); }
.grain { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #D9B477; pointer-events: none; }
.obj.dot.lit svg circle { fill: #FFE7A0; r: 8; }
.obj.dot.lit { filter: drop-shadow(0 0 8px #FFE7A0); }

/* подпись не перехватывает касания игровой зоны: нажимаются только её кнопки */
#cap { pointer-events: none; }
#capBtns { pointer-events: auto; }
#cap.hidden #capBtns { pointer-events: none; }
/* полоска ритма не глотает касания */
.tbar { pointer-events: none; }
/* карточка аята всегда влезает в экран: прокручивается только текст, кнопки на месте */
.ayah { overflow: hidden; }
.acard { display: flex; flex-direction: column; max-height: 100%; }
.acard .abody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px; }
.acard .abody.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 46px), transparent); mask-image: linear-gradient(#000 calc(100% - 46px), transparent); }
.acard .abtns { flex: none; padding-top: 4px; }
.ayah.long .acard .ar { font-size: clamp(22px, 5.6vw, 27px); line-height: 1.85; }
.ayah.xlong .acard .ar { font-size: clamp(20px, 5vw, 25px); line-height: 1.8; }
.ayah.xlong .acard .tr { font-size: 15.5px; }

/* мир 2 */
.swave { position: absolute; border-radius: 50%; border: 4px solid transparent; border-right-color: rgba(255,255,255,.9); pointer-events: none; }
.rain i { position: absolute; top: -10%; width: 2px; height: 18px; background: rgba(220,235,245,.6); animation: rainfall linear infinite; }
@keyframes rainfall { to { transform: translate(-30px, 115vh); } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 15; }
.flash.on { animation: flash .5s ease-out; }
@keyframes flash { 10% { opacity: .7; } 30% { opacity: .1; } 45% { opacity: .5; } }
.storm { animation: storm 2.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes storm { 25% { transform: translateY(10px) rotate(-7deg); } 75% { transform: translateY(-6px) rotate(7deg); } }
.veil { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s; pointer-events: none; z-index: 7; }
.veil.on { opacity: 1; }
.obj.wslot { display: flex; align-items: center; justify-content: center; border-radius: 16px; border: 2.5px dashed rgba(255,231,160,.6); color: rgba(255,231,160,.7); font-weight: 900; font-size: 20px; }
.obj.wslot.filled { border-color: transparent; }
.obj.wcard { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 16px; background: var(--parch); box-shadow: 0 6px 16px rgba(0,0,0,.35); cursor: grab; touch-action: none; }
.obj.wcard b { font-family: "Amiri", serif; font-size: 21px; line-height: 1.1; color: var(--ink); }
.obj.wcard small { font-size: 13px; font-weight: 800; color: var(--muted); }
.obj.wcard.placed { background: #FFF3CC; box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(245,196,81,.6); }
.room .wall { position: absolute; inset: 0 0 26% 0; background: linear-gradient(180deg, #F6E9D3, #EBD9BA); }
.room .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(180deg, #C99A66, #A9784A); }
.table { position: absolute; height: 14px; border-radius: 6px; background: #8E5A2E; box-shadow: 0 8px 0 #6E4428; z-index: 3; }
.counter2 { position: absolute; z-index: 26; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); padding: 10px 16px; border-radius: 18px;
  background: rgba(12, 38, 52, .82); color: #fff; font-weight: 900; font-size: 17px; }
.counter2 b { color: var(--gold); font-size: 22px; }
.counter2.bump { animation: bump .4s; }
.counter2.big { left: 50%; right: auto; translate: -50% 0; font-size: 20px; }
.plus { position: absolute; padding: 4px 10px; border-radius: 12px; background: rgba(12, 38, 52, .8); color: #FFE7A0; font-weight: 900; font-size: 15px; white-space: nowrap; pointer-events: none; }
.obj.thing.got { filter: drop-shadow(0 0 10px rgba(245,196,81,.9)); }

/* финал: когда сокровищ много, они мельче */
.items-row.many { gap: 8px 10px; bottom: 8%; }
.items-row.many svg { width: 42px; height: 42px; animation-duration: 4s; }
/* узкий экран: «Чтец» и «Перевод» в одну строку, «Дальше» под ними */
@media (max-width: 380px) {
  .abtns { gap: 8px; }
  .acard { padding: 24px 16px 16px; }
  .acard .star8 { width: 26px; height: 26px; }
}
@media (max-height: 600px) {
  .acard .ref { margin-bottom: 8px; }
  .abtns .btn { min-height: 44px; }
}
@media (max-width: 380px) {
  .sheet-in { padding: 22px 12px 16px; }
  .world { padding: 12px 10px; }
  .ch { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 10px 6px 9px; font-size: 14.5px; text-align: center; }
  .ch > span:last-child { overflow-wrap: normal; hyphens: manual; }
}
/* имя ребёнка */
/* грамота */
.cert { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px); background: rgba(6,22,31,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .4s; }
.cert.on { opacity: 1; }
.cert .cin { display: flex; flex-direction: column; align-items: center; max-height: 100%; width: min(100%, 460px); }
.cert img { display: block; min-height: 0; flex: 0 1 auto; max-width: 100%; max-height: calc(100dvh - 190px); object-fit: contain; border-radius: 18px; box-shadow: var(--shadow); -webkit-touch-callout: default; transform: scale(.94); transition: transform .5s cubic-bezier(.2,.9,.3,1); }
.cert.on img { transform: none; }
.cert p { margin: 10px 0 8px; color: rgba(255,255,255,.7); font-weight: 700; font-size: 13.5px; text-align: center; }
.cert .row { display: flex; gap: 10px; justify-content: center; }
.chtitle.lvl { place-items: end center; padding-bottom: 20vh; }
.chtitle.lvl small { letter-spacing: 2px; }
.chtitle.lvl b { font-size: clamp(30px, 8.5vw, 40px); }
/* карточка аята: текст подсвечивается, пока звучит; кнопки-значки в цветах текста */
.acard .ref { margin: 2px 0 10px; font-size: 15px; color: var(--gold-3); }
.acard .ar .ap { border-radius: 12px; padding: 0 3px; transition: background-color .35s, box-shadow .35s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.acard .ar .ap.on { background: rgba(245,196,81,.30); box-shadow: 0 0 0 3px rgba(245,196,81,.30); }
.acard .tr { border-radius: 14px; padding: 4px 8px; transition: background-color .35s; }
.acard .tr.on { background: rgba(43,138,160,.13); }
.acard .src { font-size: 11.5px; margin: 6px 0 12px; }
.abtns { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
.ibtn { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; }
.ibtn svg { width: 56px; height: 56px; padding: 13px; border-radius: 50%; box-sizing: border-box; transition: transform .15s; }
.ibtn.qari svg { background: linear-gradient(180deg, #E9B850, #C9902F); box-shadow: 0 4px 0 #9C6B1E; }
.ibtn.trn svg { background: linear-gradient(180deg, #2E8EA3, #1F6F80); box-shadow: 0 4px 0 #14505D; }
.ibtn:active svg { transform: translateY(3px); box-shadow: none; }
.ibtn small { font-size: 11.5px; font-weight: 800; color: #7A8F97; }
.ibtn.play svg { animation: ibtnPulse 1.2s ease-in-out infinite; }
@keyframes ibtnPulse { 50% { transform: scale(1.08); filter: brightness(1.12); } }
.abtns .btn.next { display: inline-flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 22px; font-size: 18px; }
.abtns .btn.next svg { width: 22px; height: 22px; }
@media (max-width: 380px) {
  .abtns { gap: 8px; }
  .ibtn { width: 54px; } .ibtn svg { width: 50px; height: 50px; padding: 11px; }
  .abtns .btn.next { min-height: 50px; padding: 0 16px; font-size: 16px; }
}
/* ---------- меню: пауза, повтор реплики, главная кнопка ---------- */
#capRe { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.75); background: rgba(255,255,255,.1); pointer-events: auto; transition: opacity .25s, transform .15s; }
#capRe svg { width: 22px; height: 22px; }
#capRe:active { transform: scale(.9); }
#cap.talk #capRe { opacity: 0; pointer-events: none; }
#cap.hidden #capRe { pointer-events: none; }
#capText { padding-right: 26px; padding-left: 26px; }
#go { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
#go small { margin-top: 3px; max-width: 260px; font-size: 13px; font-weight: 800; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psheet .sheet-in { max-width: 380px; margin-top: 8vh; }
.psheet h2 { margin-bottom: 2px; }
.psub { margin: 0 0 14px !important; }
.pmenu { display: flex; flex-direction: column; gap: 10px; }
.pbtn { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 12px; border-radius: 18px; background: #fff; color: var(--night-2); font-weight: 900; font-size: 18px; text-align: left; box-shadow: 0 3px 0 #E6D7B5; transition: transform .12s; }
.pbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #E6D7B5; }
.pbtn .pi { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, #E7F3F8, #CFE5EE); color: #1F5B74; }
.pbtn .pi svg { width: 24px; height: 24px; }
/* главное действие слегка выделено: тёплый фон и золотая иконка */
.pbtn.main { background: linear-gradient(180deg, #FFF6DA, #FFE9AE); box-shadow: 0 3px 0 #E2C77E, 0 0 0 2px rgba(230,169,58,.55); }
.pbtn.main .pi { background: linear-gradient(180deg, #FFD978, var(--gold-2)); color: #3B2A0C; }
/* следующая глава в списке — слегка подсвечена */
.ch.next { box-shadow: 0 3px 0 #E2C77E, 0 0 0 2.5px rgba(230,169,58,.75), 0 8px 14px -10px rgba(0,0,0,.35); background: #FFFBEF; }
.ch.next .stars { color: var(--gold-3); }
/* ---------- подписка ---------- */
.ch { position: relative; }
.ch.lock { background: rgba(255,255,255,.75); }
.ch.lock .ci { filter: grayscale(.5); opacity: .8; }
.ch.lock .stars { color: #A9BCC2; letter-spacing: 0; font-size: 12px; }
.chlock { position: absolute; right: 8px; top: 8px; width: 18px; height: 18px; }
.chlock svg { width: 100%; height: 100%; }
.paysheet .sheet-in { max-width: 420px; }
.paysheet h2 { margin-bottom: 0; }
.pfeat { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pfeat li { position: relative; padding: 10px 12px 10px 40px; border-radius: 14px; background: #fff; font-weight: 800; color: var(--night-2); box-shadow: 0 2px 0 #E6D7B5; }
.pfeat li::before { content: "✓"; position: absolute; left: 14px; top: 9px; color: var(--ok); font-weight: 900; }
.pgate { text-align: center; padding: 6px 0 4px; }
.pgate p { margin: 0 0 10px; font-weight: 800; color: var(--muted); }
.pgate p b { color: var(--night-2); font-size: 20px; }
.gans { display: flex; gap: 10px; justify-content: center; }
.gbtn { width: 64px; height: 54px; border-radius: 16px; background: #fff; font-weight: 900; font-size: 22px; color: var(--night-2); box-shadow: 0 3px 0 #E6D7B5; }
.gbtn.no { opacity: .35; }
.plans { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.plan { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 18px; background: #fff; color: var(--night-2); box-shadow: 0 3px 0 #E6D7B5; }
.plan b { font-size: 20px; font-weight: 900; } .plan small { font-size: 13px; font-weight: 700; color: var(--muted); }
/* выгодный вариант слегка выделен */
.plan.main { background: linear-gradient(180deg, #FFF6DA, #FFE9AE); box-shadow: 0 3px 0 #E2C77E, 0 0 0 2px rgba(230,169,58,.6); }
.pbuy .btn.line { width: 100%; }
.poffer { font-size: 12px !important; margin-top: 10px !important; }
.poffer a { color: var(--muted); }
.pnote { margin: 8px 0 12px !important; }
.pcode { display: block; margin: 8px 0; font-size: 26px; letter-spacing: 2px; color: var(--night-2); }
.pmsgbig { font-size: 16px !important; line-height: 1.45; }
.pcin { text-transform: uppercase; letter-spacing: 2px; }
/* крестик окна: сверху справа и не уезжает при прокрутке */
.sheet-in { position: relative; }
.sxwrap { position: sticky; top: 0; height: 0; z-index: 5; display: flex; justify-content: flex-end; }
.sx { width: 44px; height: 44px; margin: 2px 2px 0 0; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--night-2); box-shadow: 0 3px 0 #E6D7B5, 0 6px 14px -6px rgba(0,0,0,.35); transition: transform .12s; }
.sx svg { width: 22px; height: 22px; }
.sx:active { transform: scale(.9); }
.sheet h2 { padding: 0 40px; }
/* автонажатие «Дальше»: снизу на кнопке заполняется полоска (3 с) */
.btn.auto::before { content: ""; position: absolute; left: 18px; right: 18px; bottom: 7px; height: 4px; border-radius: 2px; background: rgba(59,42,12,.35); transform-origin: left; animation: autofill 3s linear forwards; pointer-events: none; }
@keyframes autofill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- конец главы: аят не перематывается, потом «Что мы узнали» ---------- */
.btn.lock { opacity: .45; filter: grayscale(.5); box-shadow: none; }
.btn.lock.timer { opacity: .75; overflow: hidden; }
.btn.lock.timer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.55); animation: lockFill var(--lock-ms, 8s) linear forwards; pointer-events: none; }
@keyframes lockFill { to { width: 100%; } }
.btn.nudge { animation: nudge .4s; }
@keyframes nudge { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.ibtn.glow svg { animation: ibtnCall 1.4s ease-in-out infinite; }
@keyframes ibtnCall { 0%, 100% { transform: scale(1); filter: none; } 50% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(245,196,81,.95)); } }
.concl .acard .lbl { margin-bottom: 10px; }
.concl .vyvod { font-size: clamp(20px, 5.4vw, 24px); line-height: 1.45; font-weight: 900; color: var(--ink); margin: 0 8px 16px; transition: color .3s; }
.concl .vyvod.on { color: #1F6F80; }
.dalil { text-align: left; margin: 0 2px 12px; border-top: 1.5px solid var(--line); padding-top: 10px; }
.dalil summary { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 900; font-size: 15px; color: var(--gold-3); padding: 6px 0; }
.dalil summary::-webkit-details-marker { display: none; }
.dalil summary svg { width: 20px; height: 20px; }
.dalil summary::after { content: "▾"; font-size: 13px; transition: transform .2s; }
.dalil[open] summary::after { transform: rotate(180deg); }
.dalil ol { margin: 8px 0 6px; padding-left: 20px; }
.dalil li { margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; color: #34505C; }
.dalil li b { display: block; font-size: 13px; color: var(--night-2); margin-bottom: 2px; }
.dalil li p { margin: 2px 0; }
.dalil .dar { font-family: "Amiri", serif; font-size: 22px; line-height: 1.9; color: var(--ink); text-align: right; }
.dalil .src { text-align: center; margin: 4px 0 0; }
.ibtn.back svg { background: linear-gradient(180deg, #8FA3AB, #6E8590); box-shadow: 0 4px 0 #4F646D; }
/* слово, которое сейчас звучит (чтец или перевод) — зелёным */
.acard .ar .ap.on { background: rgba(245,196,81,.16); box-shadow: 0 0 0 3px rgba(245,196,81,.16); }
.acard .tr.on { background: none; }
.acard .w { border-radius: 8px; transition: background-color .12s, color .12s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.acard .w.now { background: #BFE8C8; color: #145A2C; box-shadow: 0 0 0 3px #BFE8C8; }

/* ============ ГРАФИКА (js/art.js): планы, свет, облака, луг, частицы, отклик ============ */
.plane { position: absolute; inset: 0; pointer-events: none; }
.plane .obj { pointer-events: auto; }
.sky2, .skydeep { position: absolute; inset: 0; }
.skydeep { opacity: 0; transition: opacity 2.2s ease; }
.sunbloom { position: absolute; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,251,232,.95) 0, rgba(255,238,178,.6) 3.5%, rgba(255,228,156,.26) 11%, rgba(255,222,146,.09) 33%, rgba(255,222,146,0) 60%); }
.godrays { position: absolute; translate: -50% -50%; pointer-events: none; opacity: .6; will-change: transform;
  background: repeating-conic-gradient(from 0deg, rgba(255,244,212,.26) 0deg 2.6deg, rgba(255,244,212,0) 2.6deg 9deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.5) 22%, transparent 62%); mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.5) 22%, transparent 62%);
  animation: spin 180s linear infinite; }
.godrays.still { animation: none; }
.suncore { position: absolute; translate: -50% -50%; pointer-events: none; }
.suncore svg, .cloud2 svg, .range svg, .meadow svg, .tree2 svg, .tuft svg, .flower svg, .crane svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cloud2 { position: absolute; translate: -50% -50%; pointer-events: none; will-change: transform; }
.range, .meadow { position: absolute; inset: 0; pointer-events: none; }
.tree2, .tuft, .flower { position: absolute; translate: -50% -100%; transform-origin: 50% 100%; pointer-events: none; animation: sway 3.6s ease-in-out infinite alternate; }
.tree2 { animation-duration: 7s; }
.flower, .tuft.still { animation: none; }
.tuft.near { filter: blur(1.4px); animation-duration: 4.6s; z-index: 12; }
@keyframes sway { from { rotate: -2.5deg; } to { rotate: 2.5deg; } }
.cshadow { position: absolute; translate: -50% -50%; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(24,48,32,.6), rgba(24,48,32,0)); }
.fxcanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 25; pointer-events: none; }
.lightwave { position: absolute; z-index: 46; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; }
.ripple { position: absolute; z-index: 46; width: 86px; height: 86px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 0 18px rgba(255,236,170,.8), inset 0 0 12px rgba(255,236,170,.5); pointer-events: none; }
.filmgrain { position: absolute; inset: 0; z-index: 21; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vignette2 { position: absolute; inset: 0; z-index: 20; pointer-events: none; background: radial-gradient(ellipse 85% 75% at 50% 42%, transparent 62%, rgba(16,40,62,.26) 100%); }
/* кран и кубики главы «Небо без опор» */
.crane { position: absolute; inset: 0; pointer-events: none; }
.trolley { position: absolute; translate: -50% 0; pointer-events: none; }
.trolley svg { width: 100%; height: 100%; display: block; overflow: visible; }
.obj.block2 > svg, .obj.plank2 > svg { overflow: visible; }
.obj.block2, .trolley { will-change: transform; }
@media (prefers-reduced-motion: reduce) { .tree2, .tuft, .flower, .godrays { animation: none; } }
.cloudshadow { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(24,70,40,.2), rgba(24,70,40,0)); will-change: transform; }
/* заставка главы: моушн */
.chtitle .ct { position: relative; transition: opacity .6s ease, transform .7s cubic-bezier(.4,0,.2,1), filter .6s; }
.chtitle.out .ct { opacity: 0; transform: translateY(-22px) scale(.98); filter: blur(5px); }
.chtitle.out { opacity: 0; transition: opacity .7s .1s; }
.chtitle small { opacity: 0; letter-spacing: 12px; transition: opacity .9s .1s, letter-spacing 1.2s cubic-bezier(.2,.8,.2,1) .1s; }
.chtitle.on small { opacity: 1; letter-spacing: 3px; }
.chtitle b span { display: inline-block; opacity: 0; transform: translateY(28px) scale(.94); filter: blur(6px); transition: opacity .55s, transform .9s cubic-bezier(.2,1.25,.3,1), filter .6s; transition-delay: calc(.3s + var(--i) * .14s); }
.chtitle.on b span { opacity: 1; transform: none; filter: none; animation: titleGlow 2.4s ease-in-out calc(1s + var(--i) * .14s) 1; }
@keyframes titleGlow { 40% { text-shadow: 0 0 24px rgba(255,226,140,.95), 0 4px 20px rgba(0,0,0,.45); } }
.chtitle .orn .ol { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1) .7s; }
.chtitle.on .orn .ol { stroke-dashoffset: 0; }
.chtitle .orn .od, .chtitle .orn .oc { transform-box: fill-box; transform-origin: center; transform: scale(0) rotate(-90deg); transition: transform .7s cubic-bezier(.2,1.5,.4,1) .55s; }
.chtitle.on .orn .od, .chtitle.on .orn .oc { transform: none; }
@media (prefers-reduced-motion: reduce) { .chtitle * { transition-duration: .01s !important; animation: none !important; } }
.dropguide { position: absolute; width: 3px; translate: -50% 0; pointer-events: none; border-radius: 2px; transition: opacity .4s, box-shadow .2s;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.75) 0 8px, rgba(255,255,255,0) 8px 16px); }
.dropguide.on { background: repeating-linear-gradient(180deg, #FFE08A 0 10px, rgba(255,224,138,.2) 10px 16px); box-shadow: 0 0 10px rgba(255,214,110,.9); }
/* слабое устройство: без лучей, качания и зерна */
.lowfx .godrays, .lowfx .filmgrain { display: none; }
.lowfx .tuft, .lowfx .tree2, .lowfx .cloud2 { animation: none !important; }
.dropguide.pulse { animation: guidePulse 1s ease-in-out infinite; }
@keyframes guidePulse { 50% { box-shadow: 0 0 14px rgba(255,255,255,.95); } }
/* ---------- указатель «куда нажать» (Art.pointer / Art.coach) ---------- */
.pointer { position: absolute; z-index: 40; width: 0; height: 0; pointer-events: none; animation: ptIn .35s ease-out; }
.pointer .ph { position: absolute; left: -29px; top: -11px; width: 88px; height: 88px; transform-origin: 29px 11px; filter: drop-shadow(0 6px 8px rgba(10,30,40,.35)); }
.pointer .ph svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pointer::after { content: ""; position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 3.5px solid #fff; box-shadow: 0 0 14px rgba(255,214,110,.9), inset 0 0 10px rgba(255,214,110,.6); opacity: 0; }
.pointer .burst { opacity: 0; transform-origin: 21px 4px; }
@keyframes ptIn { from { opacity: 0; } }
/* нажми */
.pointer.tap .ph { animation: ptTap 1.7s cubic-bezier(.45,0,.3,1) infinite; }
.pointer.tap .burst { animation: ptBurst 1.7s infinite; }
.pointer.tap::after { animation: ptRing 1.7s infinite; }
@keyframes ptTap { 0% { transform: translate(30px, 34px) rotate(8deg); } 32% { transform: translate(0, 0) rotate(0); } 42% { transform: translate(0, 2px) scale(.86); } 54% { transform: translate(0, 0) scale(1); } 76% { transform: translate(0, 0); } 100% { transform: translate(30px, 34px) rotate(8deg); } }
@keyframes ptBurst { 0%, 40% { opacity: 0; transform: scale(.5); } 47% { opacity: 1; transform: scale(1); } 66%, 100% { opacity: 0; transform: scale(1.25); } }
@keyframes ptRing { 0%, 40% { opacity: 0; transform: scale(.3); } 44% { opacity: 1; } 70%, 100% { opacity: 0; transform: scale(1.3); } }
/* нажми и держи */
.pointer.hold .ph { animation: ptHold 2.4s cubic-bezier(.45,0,.3,1) infinite; }
.pointer.hold::after { animation: ptHoldRing 2.4s infinite; }
@keyframes ptHold { 0% { transform: translate(30px, 34px); } 22% { transform: translate(0, 0); } 30%, 80% { transform: translate(0, 2px) scale(.86); } 88% { transform: scale(1); } 100% { transform: translate(30px, 34px); } }
@keyframes ptHoldRing { 0%, 28% { opacity: 0; transform: scale(.3); } 32% { opacity: 1; transform: scale(.4); } 80% { opacity: 1; transform: scale(1.2); } 90%, 100% { opacity: 0; transform: scale(1.3); } }
/* тяни к цели */
.pointer.drag .ph { animation: ptDrag 2.6s cubic-bezier(.45,0,.3,1) infinite; }
.pointer.drag::after { animation: ptRing 2.6s infinite; }
@keyframes ptDrag { 0% { transform: translate(24px, 28px); opacity: 0; } 12% { opacity: 1; transform: translate(0, 0); } 22% { transform: scale(.86); } 70% { transform: translate(var(--dx), var(--dy)) scale(.86); } 80% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
/* води туда-сюда */
.pointer.swipe .ph { animation: ptSwipe 2s ease-in-out infinite; }
@keyframes ptSwipe { 0%, 100% { transform: translate(-36px, 0) scale(.88); } 50% { transform: translate(36px, 0) scale(.88); } }
@media (prefers-reduced-motion: reduce) { .pointer .ph, .pointer::after, .pointer .burst { animation: none !important; } .pointer .burst { opacity: 1; } }
/* красивые переносы: ровные строки, без «одного слова на последней строке» */
.nicewrap, #capText, #capNote, .concl .vyvod, .chtitle b { text-wrap: balance; }
.acard .tr, .dalil li p { text-wrap: pretty; hyphens: manual; }
.nicewrap .sent { display: block; text-wrap: balance; }
