@import url("fonts/fonts.css");

:root {
  --night: #1d2a4f; --night2: #2d3f70; --gold: #d9a93a; --gold2: #a97b17; --goldl: #f6e2a4;
  --cream: #fbf4e3; --paper: #fffaf0; --ink: #2a2017; --ink2: #6a5843; --rose: #b5523b;
  --wine: #8f2b3c; --green: #4f7d3b; --ok: #2f8a46; --no: #c0503b; --sky: #d7e8f5;
  --blue: #2c5cb4; --line: #e8d9b6;
  --f-text: "Lexend", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-head: "Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #14182b; overflow: hidden; }
body { font-family: var(--f-text); color: var(--ink); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

/* the stage: a fixed virtual canvas scaled to the window */
#stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0;
  background: var(--cream); overflow: hidden; }
#stage.port { width: 900px; height: 1600px; }
.scene { position: absolute; inset: 0 0 84px 0; }
.port .scene { bottom: 96px; }
.scene.out { animation: sceneOut .45s ease forwards; pointer-events: none; }
.scene.in { animation: sceneIn .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sceneOut { to { opacity: 0; transform: scale(1.03); } }
@keyframes sceneIn { from { opacity: 0; transform: scale(.98); } }

/* enter animations, staggered with --d */
.rise { animation: rise .7s cubic-bezier(.2,.9,.2,1.1) both; animation-delay: var(--d, 0s); }
.pop { animation: popIn .55s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d, 0s); }
.fade { animation: fadeIn .9s ease both; animation-delay: var(--d, 0s); }
.fly-l { animation: flyL .8s cubic-bezier(.2,.9,.25,1.15) both; animation-delay: var(--d, 0s); }
.fly-r { animation: flyR .8s cubic-bezier(.2,.9,.25,1.15) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.4) rotate(-6deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes flyL { from { opacity: 0; transform: translateX(-260px) rotate(-8deg); } }
@keyframes flyR { from { opacity: 0; transform: translateX(260px) rotate(8deg); } }

/* corner medallions of the book */
.roh { position: absolute; width: 92px; height: 92px; z-index: 3; pointer-events: none; }
.roh.tl { left: 14px; top: 14px; } .roh.tr { right: 14px; top: 14px; }
.roh.bl { left: 14px; bottom: 14px; } .roh.br { right: 14px; bottom: 14px; }

/* pictures */
.pic { position: absolute; overflow: hidden; border-radius: 30px; background: #e9dcc0;
  box-shadow: 0 0 0 6px #fff, 0 0 0 10px var(--gold), 0 18px 40px rgba(40,25,5,.25); }
.pic > img.kb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: kb var(--kbt, 22s) ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1.0); } to { transform: scale(var(--kbz, 1.12)); } }
.bgpic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bgpic.soft { filter: blur(14px) saturate(1.1) brightness(1.05); transform: scale(1.1); opacity: .55; }
.land .pic.side { left: 48px; top: 40px; width: 760px; height: 744px; }
.port .pic.side { left: 40px; top: 40px; width: 820px; height: 760px; }

.puppet { position: absolute; left: 50%; top: 50%; max-width: 86%; max-height: 86%;
  transform: translate(-50%, -50%); filter: drop-shadow(0 10px 18px rgba(60,35,5,.35)); cursor: pointer; }
.puppet-wrap { position: absolute; inset: 0; animation: bob 4.5s ease-in-out infinite; }
.puppet.jump { animation: jump .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-.8deg); } 50% { transform: translateY(-14px) rotate(.8deg); } }
@keyframes jump { 40% { transform: translate(-50%, -62%) scale(1.06); } }

/* text panel */
.txt { position: absolute; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.land .txt.side { left: 860px; right: 70px; top: 40px; bottom: 30px; }
.port .txt.side { left: 56px; right: 56px; top: 830px; bottom: 20px; justify-content: flex-start; }
.kicker { font-family: var(--f-head); font-weight: 800; color: var(--gold2); font-size: 28px; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.kicker .num { display: inline-grid; place-items: center; min-width: 52px; height: 52px; padding: 0 12px; border-radius: 26px; background: var(--night); color: var(--goldl); font-size: 28px; }
.para { font-size: 40px; line-height: 1.5; }
.port .para { font-size: 44px; }
.s { border-radius: 10px; padding: 2px 4px; margin: 0 -4px; transition: background .35s, box-shadow .35s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.s.now { background: var(--goldl); box-shadow: 0 0 0 3px var(--goldl); }
h1, h2, h3 { font-family: var(--f-head); margin: 0; line-height: 1.12; }

/* title */
.title-scene { background: var(--night); }
.title-scene .bgpic.soft { opacity: .35; filter: blur(18px) saturate(1.2); }
.title-scene .pic.hero { right: 60px; top: 40px; width: 720px; height: 736px; }
.port .title-scene .pic.hero { left: 60px; right: 60px; width: auto; top: 40px; height: 820px; }
.title-box { position: absolute; left: 110px; top: 70px; width: 680px; bottom: 40px; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.port .title-box { left: 60px; right: 60px; width: auto; top: 890px; bottom: 30px; justify-content: flex-start; }
.medal { width: 168px; height: 168px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #34488a, var(--night) 70%); display: grid; place-items: center;
  box-shadow: 0 0 0 6px var(--gold), 0 0 0 12px rgba(255,255,255,.9), 0 0 0 16px var(--gold); color: var(--goldl); cursor: pointer; }
.port .medal { position: absolute; right: 0; top: -150px; }
.medal b { font-family: var(--f-head); font-size: 86px; font-weight: 800; line-height: 1; }
.medal small { display: block; text-align: center; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: -6px; }
.title-box h1 { font-size: 84px; font-weight: 800; color: #fff; }
.title-box .ref { font-size: 32px; color: var(--goldl); }
.big-btn { display: inline-flex; align-items: center; gap: 18px; padding: 22px 46px; border-radius: 60px; font-size: 40px; font-weight: 700;
  background: linear-gradient(180deg, #f2c75a, var(--gold)); color: var(--night); box-shadow: 0 6px 0 var(--gold2), 0 14px 30px rgba(0,0,0,.3); transition: transform .12s; }
.big-btn svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold2); }
.big-btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.ed-switch { display: inline-flex; background: rgba(255,255,255,.15); border-radius: 40px; padding: 6px; gap: 6px; align-self: flex-start; }
.ed-switch button { padding: 10px 26px; border-radius: 30px; font-size: 26px; color: #fff; }
.ed-switch button[aria-pressed="true"] { background: #fff; color: var(--night); font-weight: 700; }

/* sign of the cross */
.kriz-scene { background: radial-gradient(circle at 50% 40%, #fff7e0, var(--cream) 70%); }
.kriz-fig { position: absolute; left: 170px; top: 140px; width: 500px; height: 643px; }
.port .kriz-fig { left: 170px; top: 40px; }
.kriz-fig .pt { fill: #fff; stroke: var(--gold); stroke-width: 6; transition: fill .3s, r .3s; }
.kriz-fig .pt.lit { fill: var(--gold); }
.kriz-fig .trail { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset .9s ease; }
.kriz-words { position: absolute; left: 780px; right: 80px; top: 120px; display: flex; flex-direction: column; gap: 18px; }
.port .kriz-words { left: 60px; right: 60px; top: 800px; }
.kriz-words .w { font-family: var(--f-head); font-size: 54px; font-weight: 800; color: #b9a882; transition: color .3s, transform .3s; }
.kriz-words .w.lit { color: var(--night); transform: translateX(10px); }
.kriz-words .sl { font-size: 28px; color: var(--ink2); margin-top: 10px; }
.fingers { display: flex; gap: 26px; align-items: center; font-size: 24px; color: var(--ink2); margin-top: 18px; }
.fingers i { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); margin-right: 4px; vertical-align: middle; }
.fingers i.o { background: #fff; box-shadow: inset 0 0 0 4px var(--gold2); }

/* story ribbon line */
.linka-scene .ribbon { position: absolute; left: 120px; right: 120px; top: 50%; transform: translateY(-60%); text-align: center; }
.ribbon .band { display: inline-block; padding: 40px 70px; border-radius: 28px; background: var(--night); color: #fff; font-family: var(--f-head); font-weight: 800; font-size: 72px; line-height: 1.25;
  box-shadow: 0 0 0 8px var(--gold), 0 0 0 16px #fff, 0 24px 60px rgba(0,0,0,.35); }
.ribbon .band span { display: inline-block; animation: wordDrop .6s cubic-bezier(.2,1.5,.4,1) both; animation-delay: var(--d); }
@keyframes wordDrop { from { opacity: 0; transform: translateY(-60px) rotate(-8deg); } }
.linka-scene .together { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); }

/* section headers */
.sec-head { position: absolute; left: 70px; top: 36px; right: 230px; display: flex; align-items: center; gap: 22px; }
.sec-head .ico { width: 76px; height: 76px; border-radius: 50%; background: var(--night); display: grid; place-items: center; box-shadow: 0 0 0 5px var(--gold); flex: none; }
.sec-head .ico svg { width: 42px; height: 42px; fill: none; stroke: var(--goldl); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sec-head h2 { font-size: 54px; font-weight: 800; color: var(--night); }
.sec-head .sub { margin-left: auto; font-size: 28px; color: var(--ink2); }

/* quiz */
.quiz-q { position: absolute; left: 70px; right: 70px; top: 150px; font-size: 56px; font-weight: 700; line-height: 1.25; }
.port .quiz-q { top: 160px; }
.answers { position: absolute; left: 70px; right: 70px; top: 330px; display: flex; flex-direction: column; gap: 26px; }
.port .answers { top: 520px; }
.ans { display: flex; align-items: center; gap: 28px; padding: 22px 30px; border-radius: 26px; background: #fff; text-align: left; font-size: 40px; line-height: 1.25;
  box-shadow: 0 0 0 4px var(--line), 0 8px 0 var(--line); transition: transform .15s, box-shadow .2s, background .3s, opacity .3s; }
.ans:hover { transform: translateY(-3px); }
.ans .let { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-head); font-weight: 800; font-size: 44px; color: #fff; }
.ans:nth-child(1) .let { background: var(--blue); } .ans:nth-child(2) .let { background: var(--rose); } .ans:nth-child(3) .let { background: var(--green); }
.ans.ok { background: #e3f5e5; box-shadow: 0 0 0 6px var(--ok), 0 8px 0 var(--ok); animation: okPop .5s cubic-bezier(.2,1.6,.4,1); }
.ans.ok .let { background: var(--ok); }
.ans.bad { opacity: .45; animation: shake .45s; }
@keyframes okPop { 40% { transform: scale(1.04); } }
@keyframes shake { 20%,60% { transform: translateX(-16px); } 40%,80% { transform: translateX(16px); } }

/* stars counter and bursts */
.stars { position: absolute; right: 28px; top: 26px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 40px; background: var(--night); color: var(--goldl); font-size: 32px; font-weight: 700; }
.stars svg { width: 36px; height: 36px; fill: var(--gold); }
.stars.bump { animation: okPop .5s; }
.burst { position: absolute; z-index: 20; pointer-events: none; }
.burst i { position: absolute; width: 26px; height: 26px; margin: -13px; background: var(--gold);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: fly 1.1s cubic-bezier(.1,.8,.3,1) forwards; }
@keyframes fly { to { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.3); opacity: 0; } }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -30px; width: 16px; height: 26px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(1700px) rotate(720deg); } }

/* map */
.map { position: absolute; left: 70px; top: 135px; width: 433px; height: 666px; border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--gold); }
.port .map { left: 40px; top: 150px; width: 433px; height: 666px; }
.map img { width: 100%; height: 100%; object-fit: cover; }
.pin { position: absolute; width: 0; height: 0; z-index: 2; }
.pin .dot { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; background: var(--wine); box-shadow: 0 0 0 5px #fff, 0 4px 10px rgba(0,0,0,.4); animation: pinDrop .6s cubic-bezier(.3,1.6,.5,1) both; animation-delay: var(--d); }
.pin .lab { position: absolute; left: 22px; top: -20px; white-space: nowrap; font-weight: 700; font-size: 24px; color: var(--ink); padding: 2px 12px; border-radius: 14px; background: rgba(255,255,255,.92); animation: fadeIn .4s both; animation-delay: calc(var(--d) + .3s); }
.pin.r .lab { left: auto; right: 22px; }
.pin.now .dot { background: var(--gold); transform: scale(1.4); transition: transform .3s; }
.pin.edge .dot { border-radius: 4px; }
@keyframes pinDrop { from { transform: translateY(-120px); opacity: 0; } }
.place-cards { position: absolute; left: 560px; right: 70px; top: 150px; bottom: 30px; display: flex; flex-direction: column; gap: 22px; overflow: hidden; }
.port .place-cards { left: 40px; right: 40px; top: 850px; }
.place { padding: 22px 28px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 3px var(--line); font-size: 30px; line-height: 1.4; transition: box-shadow .3s, transform .3s; }
.place b { display: block; font-family: var(--f-head); font-size: 38px; color: var(--wine); margin-bottom: 6px; }
.place.now { box-shadow: 0 0 0 5px var(--gold); transform: translateX(-8px); }

/* "really happened" */
.naozaj-pic { left: 60px; top: 150px; width: 640px; height: 470px; }
.port .naozaj-pic { left: 40px; top: 150px; width: 820px; height: 500px; }
.cap { position: absolute; left: 60px; top: 640px; width: 640px; font-size: 24px; color: var(--ink2); font-style: italic; }
.port .cap { left: 40px; width: 820px; }
.facts { position: absolute; left: 740px; right: 60px; top: 140px; bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.port .facts { left: 40px; right: 40px; top: 720px; }
.fact { display: flex; gap: 20px; align-items: flex-start; padding: 18px 22px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 3px var(--line); font-size: 26px; line-height: 1.36; transition: box-shadow .3s; }
.fact.now { box-shadow: 0 0 0 5px var(--gold); }
.fact .fi { flex: none; width: 64px; height: 64px; border-radius: 18px; background: var(--night); display: grid; place-items: center; }
.fact .fi svg { width: 38px; height: 38px; fill: none; stroke: var(--goldl); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fact small { display: block; font-size: 17px; color: var(--ink2); margin-top: 6px; }
.uvod { font-size: 30px; line-height: 1.3; font-weight: 700; color: var(--night); }

/* true or false */
.tf-card { position: absolute; left: 160px; right: 160px; top: 170px; padding: 50px 60px; border-radius: 34px; background: #fff; text-align: center; font-size: 56px; font-weight: 700; line-height: 1.3;
  box-shadow: 0 0 0 6px var(--line), 0 14px 0 var(--line); }
.port .tf-card { left: 50px; right: 50px; top: 190px; }
.tf-btns { position: absolute; left: 0; right: 0; top: 540px; display: flex; justify-content: center; gap: 60px; }
.port .tf-btns { top: 760px; flex-direction: column; align-items: center; gap: 30px; }
.tf { width: 420px; padding: 30px; border-radius: 30px; color: #fff; font-size: 46px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 18px; transition: transform .15s, opacity .3s; }
.tf svg { width: 56px; height: 56px; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tf.yes { background: var(--ok); box-shadow: 0 10px 0 #1f6331; } .tf.no { background: var(--no); box-shadow: 0 10px 0 #8e3626; }
.tf:active { transform: translateY(6px); }
.tf.dim { opacity: .3; }
.verdict { position: absolute; left: 160px; right: 160px; top: 520px; text-align: center; font-size: 40px; line-height: 1.35; }
.port .verdict { left: 50px; right: 50px; top: 760px; }
.stamp { display: inline-block; margin-bottom: 20px; padding: 10px 40px; border: 8px solid currentColor; border-radius: 18px; font-family: var(--f-head); font-weight: 800; font-size: 64px; transform: rotate(-6deg); animation: stamp .45s cubic-bezier(.3,1.6,.5,1) both; }
.stamp.yes { color: var(--ok); } .stamp.no { color: var(--no); }
@keyframes stamp { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } }

/* commandment */
.prik-scene { background: radial-gradient(circle at 50% 30%, #2f4277, var(--night) 75%); color: #fff; }
.tablet { position: absolute; left: 50%; top: 70px; width: 1040px; transform: translateX(-50%); padding: 50px 70px 46px; border-radius: 40px 40px 26px 26px; background: var(--paper); color: var(--ink); text-align: center;
  box-shadow: 0 0 0 8px var(--gold), 0 0 0 16px rgba(255,255,255,.15), 0 30px 80px rgba(0,0,0,.4); animation: unroll .9s cubic-bezier(.2,.9,.2,1) both; transform-origin: top center; }
.port .tablet { width: 820px; top: 80px; padding: 46px 44px; }
@keyframes unroll { from { transform: translateX(-50%) scaleY(.05); opacity: 0; } }
.tablet .lab { font-size: 26px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold2); font-weight: 700; }
.tablet .words { font-family: var(--f-head); font-weight: 800; font-size: 54px; line-height: 1.25; color: var(--night); margin: 16px 0 12px; }
.tablet .ref { font-size: 28px; color: var(--ink2); }
.tablet .note { font-size: 24px; color: var(--ink2); margin-top: 8px; font-style: italic; }
.prik-badge { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 2; }
.expl { position: absolute; left: 140px; right: 140px; bottom: 40px; display: flex; flex-direction: column; gap: 14px; font-size: 36px; line-height: 1.4; color: #fff; }
.port .expl { left: 60px; right: 60px; bottom: 50px; }
.expl .s.now { background: rgba(246,226,164,.25); box-shadow: 0 0 0 3px rgba(246,226,164,.25); }

/* choices */
.situ { position: absolute; left: 70px; right: 70px; top: 150px; font-size: 52px; font-weight: 700; line-height: 1.3; text-align: center; }
.choices { position: absolute; left: 70px; right: 70px; top: 340px; display: flex; gap: 50px; }
.port .choices { flex-direction: column; top: 470px; gap: 36px; }
.choice { flex: 1; padding: 40px 36px; border-radius: 32px; background: #fff; font-size: 42px; line-height: 1.3; box-shadow: 0 0 0 5px var(--line), 0 12px 0 var(--line); transition: transform .2s, box-shadow .3s, opacity .3s, background .3s; }
.choice:hover { transform: translateY(-4px) rotate(-.5deg); }
.choice.good { background: #e6f6e8; box-shadow: 0 0 0 7px var(--ok), 0 12px 0 var(--ok); }
.choice.wrong { background: #fbe9e4; opacity: .55; animation: shake .45s; }
.choice .mark { display: block; margin: 0 auto 14px; width: 90px; height: 90px; }
.why { position: absolute; left: 120px; right: 120px; bottom: 40px; text-align: center; font-size: 40px; font-weight: 700; color: var(--ok); }
.port .why { bottom: 50px; }
.heart { position: absolute; z-index: 10; width: 240px; height: 240px; left: 50%; top: 45%; margin: -120px; animation: heart 1.4s ease forwards; pointer-events: none; }
@keyframes heart { 0% { transform: scale(0); opacity: 0; } 30% { transform: scale(1.2); opacity: 1; } 60% { transform: scale(1); } 100% { transform: scale(1.4) translateY(-120px); opacity: 0; } }

/* church */
.chram-scene { background: radial-gradient(circle at 25% 40%, #fff6dc, var(--cream) 70%); }
.chram-pic { left: 60px; top: 150px; width: 800px; height: 533px; }
.port .chram-pic { left: 40px; right: 40px; width: auto; height: 547px; }
.chram-scene .cap { top: 702px; width: 800px; }
.port .chram-scene .cap { top: 715px; width: 820px; }
.chram-panel { position: absolute; left: 900px; right: 50px; top: 130px; bottom: 26px; display: flex; flex-direction: column; gap: 16px; }
.port .chram-panel { left: 40px; right: 40px; top: 770px; bottom: 20px; }
.chram-panel h2 { font-size: 46px; color: var(--night); }
.chram-panel .para { font-size: 30px; line-height: 1.42; }
.urob { margin-top: auto; display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-radius: 22px; background: var(--night); color: #fff; font-size: 28px; line-height: 1.3; }
.urob .big-btn { font-size: 30px; padding: 14px 28px; flex: none; }
.motes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.motes i { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, #fff6c8, rgba(255,230,150,0)); animation: mote linear infinite; }
@keyframes mote { to { transform: translate(var(--x), -1000px); opacity: 0; } }

/* song */
.song-scene { background: linear-gradient(180deg, #fffaf0, var(--cream)); }
.song-meta { position: absolute; left: 70px; right: 70px; top: 130px; font-size: 30px; color: var(--ink2); line-height: 1.4; }
.song-lines { position: absolute; left: 70px; right: 70px; top: 140px; bottom: 110px; overflow: hidden; }
.song-lines .inner { transition: transform .6s ease; display: flex; flex-direction: column; gap: 14px; }
.sl-line { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: baseline; padding: 14px 20px; border-radius: 20px; cursor: pointer; transition: background .3s, box-shadow .3s; }
.sl-line .who { font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); }
.sl-line.knaz .who { color: var(--wine); }
.sl-line .sla { font-family: var(--f-head); font-weight: 800; font-size: 46px; color: var(--night); line-height: 1.2; }
.sl-line .vyz { grid-column: 2; font-size: 28px; color: var(--ink2); line-height: 1.35; }
.sl-line.focus .sla { color: var(--wine); }
.sl-line.now { background: #fff; box-shadow: 0 0 0 5px var(--gold); }
.port .sl-line { grid-template-columns: 1fr; gap: 4px; }
.port .sl-line .vyz { grid-column: 1; }
.song-btns { position: absolute; left: 70px; right: 70px; bottom: 20px; display: flex; gap: 24px; justify-content: center; }
.song-btns .big-btn { font-size: 30px; padding: 16px 34px; }
.note-fly { position: absolute; font-family: var(--f-head); font-size: 64px; color: var(--gold); animation: noteFly 3s ease-out forwards; pointer-events: none; z-index: 4; }
@keyframes noteFly { to { transform: translate(var(--x), -420px) rotate(var(--r)); opacity: 0; } }

.song-intro .cover { position: absolute; left: 110px; top: 130px; width: 460px; height: 650px; object-fit: cover; border-radius: 18px; box-shadow: 0 0 0 5px var(--gold), 0 24px 60px rgba(0,0,0,.35); animation: popIn .8s cubic-bezier(.2,1.3,.4,1) both .2s; }
.port .song-intro .cover { left: 220px; top: 140px; width: 460px; height: 650px; }
.song-intro .page-badge { position: absolute; left: 470px; top: 690px; width: 150px; height: 150px; border-radius: 50%; background: var(--night); color: var(--goldl); display: grid; place-items: center; text-align: center; box-shadow: 0 0 0 6px var(--gold); font-size: 22px; line-height: 1.1; animation: popIn .6s cubic-bezier(.2,1.5,.4,1) both 1s; }
.song-intro .page-badge b { display: block; font-family: var(--f-head); font-size: 60px; }
.port .song-intro .page-badge { left: 600px; top: 700px; }
.song-intro .txt { left: 680px; right: 80px; top: 140px; bottom: 40px; }
.port .song-intro .txt { left: 60px; right: 60px; top: 880px; bottom: 20px; justify-content: flex-start; }
.song-intro .para { font-size: 36px; }
.song-intro .song-name { font-family: var(--f-head); font-weight: 800; font-size: 60px; color: var(--wine); }

/* verse puzzle */
.verse-slots { position: absolute; left: 80px; right: 80px; top: 160px; min-height: 300px; padding: 30px; border-radius: 30px; background: #fff; box-shadow: 0 0 0 4px var(--line); display: flex; flex-wrap: wrap; gap: 14px 16px; align-content: flex-start; font-family: var(--f-head); font-size: 52px; font-weight: 800; color: var(--night); }
.port .verse-slots { left: 40px; right: 40px; min-height: 420px; }
.verse-slots .ph { color: #d8cba9; }
.verse-slots .w { animation: popIn .4s cubic-bezier(.2,1.5,.4,1) both; }
.verse-ref { position: absolute; left: 80px; right: 80px; top: 480px; text-align: right; font-size: 30px; color: var(--ink2); }
.port .verse-ref { top: 610px; }
.chips { position: absolute; left: 80px; right: 80px; top: 540px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.port .chips { left: 40px; right: 40px; top: 690px; }
.chip { padding: 16px 28px; border-radius: 22px; background: var(--night); color: #fff; font-size: 40px; font-weight: 700; box-shadow: 0 7px 0 #0f1730; transition: transform .15s, opacity .3s; }
.chip:hover { transform: translateY(-3px); }
.chip.used { opacity: 0; pointer-events: none; transform: scale(.5); }
.chip.no { animation: shake .4s; background: var(--no); }

/* prayer */
.prayer-scene { background: radial-gradient(circle at 50% 70%, #34477a, #121a33 75%); color: #fff; transition: background 1.5s; }
.prayer-scene.lit { background: radial-gradient(circle at 50% 70%, #a8762a, #3a2a1c 55%, #121a33 100%); }
.candle { position: absolute; left: 50%; bottom: 30px; width: 200px; height: 525px; margin-left: -100px; cursor: pointer; }
.port .candle { bottom: 60px; }
.candle .flame { opacity: 0; transform-origin: 50% 100%; transition: opacity .6s; }
.lit .candle .flame { opacity: 1; animation: flicker .18s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1, 1) skewX(-2deg); } to { transform: scale(.94, 1.06) skewX(2deg); } }
.glow { position: absolute; left: 50%; bottom: 300px; width: 900px; height: 900px; margin-left: -450px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,120,.45), rgba(255,214,120,0) 60%); opacity: 0; transition: opacity 1.5s; pointer-events: none; }
.lit .glow { opacity: 1; }
.prayer-text { position: absolute; left: 140px; right: 140px; top: 90px; text-align: center; opacity: 0; transition: opacity 1s .5s; }
.lit .prayer-text { opacity: 1; }
.prayer-text .lab { font-size: 30px; color: var(--goldl); letter-spacing: .1em; text-transform: uppercase; }
.prayer-text .words { font-family: var(--f-head); font-weight: 800; font-size: 64px; line-height: 1.3; margin-top: 20px; }
.port .prayer-text { left: 50px; right: 50px; top: 120px; }
.light-btn { position: absolute; left: 50%; top: 220px; transform: translateX(-50%); }
.amen-btn { position: absolute; left: 50%; top: 420px; transform: translateX(-50%); opacity: 0; transition: opacity .6s 1.5s; }
.lit .amen-btn { opacity: 1; }
.port .amen-btn { top: 640px; }

/* end */
.end-scene { background: radial-gradient(circle at 50% 35%, #fff3cf, var(--cream) 70%); }
.end-scene h1 { position: absolute; left: 0; right: 0; top: 40px; text-align: center; font-size: 84px; font-weight: 800; color: var(--night); }
.sticker { position: absolute; left: 50%; top: 160px; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 10px var(--gold), 0 0 0 20px #fff, 0 20px 50px rgba(0,0,0,.25);
  display: grid; place-items: center; overflow: hidden; animation: flipIn 1.2s cubic-bezier(.2,1.2,.3,1) both; animation-delay: 1.2s; }
.sticker img { width: 82%; height: 82%; object-fit: contain; }
.sticker .nr { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 4px 22px; border-radius: 20px; background: var(--night); color: var(--goldl); font-family: var(--f-head); font-size: 34px; font-weight: 800; }
@keyframes flipIn { from { transform: rotateY(90deg) scale(.4); opacity: 0; } }
.end-info { position: absolute; left: 0; right: 0; top: 515px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.port .end-info { top: 640px; padding: 0 50px; }
.end-info .k { font-size: 36px; font-weight: 700; color: var(--wine); }
.end-info .zaver { font-size: 32px; max-width: 1200px; line-height: 1.4; }
.end-btns { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.end-btns .big-btn { font-size: 28px; padding: 14px 30px; }
.ghost-btn { padding: 14px 26px; border-radius: 40px; font-size: 26px; font-weight: 600; background: #fff; box-shadow: 0 0 0 3px var(--line); }

/* bottom bar */
.hud { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--night); color: #fff; }
.port .hud { height: 96px; flex-wrap: wrap; }
.hb { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: background .2s; }
.hb:hover { background: rgba(255,255,255,.1); }
.hb svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hb.off { opacity: .4; }
.hb.on { background: rgba(246,226,164,.18); }
.hb.on svg { stroke: var(--goldl); }
.secs { flex: 1; display: flex; gap: 6px; align-items: center; min-width: 0; }
.sec { flex: none; width: 60px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 22px; color: rgba(255,255,255,.75); white-space: nowrap; padding: 0 12px; transition: width .3s; }
.sec .bar { position: absolute; left: 0; bottom: 0; height: 5px; width: var(--p, 0%); background: var(--gold); transition: width .4s; }
.sec.cur { width: auto; background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.sec svg { width: 28px; height: 28px; flex: none; position: relative; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sec span { position: relative; display: none; }
.sec.cur span { display: inline; }
.port .sec { width: 48px; padding: 0 8px; } .port .sec.cur span { display: none; } .port .sec.cur { width: 48px; }
.nav-next { height: 64px; padding: 0 30px 0 34px; border-radius: 34px; background: linear-gradient(180deg, #f2c75a, var(--gold)); color: var(--night); font-weight: 800; font-size: 28px; display: flex; align-items: center; gap: 10px; flex: none; box-shadow: 0 4px 0 var(--gold2); }
.nav-next svg { width: 30px; height: 30px; fill: none; stroke: var(--night); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nav-next.pulse { animation: pulse 1.4s ease-in-out infinite; }

/* teacher overlay */
.overlay { position: absolute; inset: 40px 80px 120px; z-index: 60; padding: 40px 50px; border-radius: 30px; background: var(--paper); box-shadow: 0 0 0 5px var(--gold), 0 30px 80px rgba(0,0,0,.5); overflow: auto; font-size: 26px; line-height: 1.45; }
.overlay h2 { font-size: 44px; margin-bottom: 14px; color: var(--night); }
.overlay h3 { font-size: 30px; margin: 22px 0 8px; color: var(--wine); }
.overlay ul { margin: 0; padding-left: 30px; }
.overlay .x { position: absolute; right: 24px; top: 20px; }
.toast { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); z-index: 70; padding: 14px 28px; border-radius: 30px; background: var(--night); color: #fff; font-size: 26px; animation: fadeIn .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
