/* =========================================================================
 * 바이블 퀘스트 : 생명의 길 — 스타일 (다국어 + RTL 지원)
 * ========================================================================= */
:root {
  --ink: #3b2f5c; --ink2: #6d6390; --bg1: #5ab8ff; --bg2: #bfe8ff;
  --green: #4cd964; --greenD: #2fa84a; --blue: #4dabff; --blueD: #2b7fd1;
  --orange: #ff9f1c; --orangeD: #d97a00; --pink: #ff5d8f; --pinkD: #d63a6c;
  --gold: #ffc83d; --goldD: #d99a00; --red: #ff5a5a; --redD: #c93636;
  --card: #ffffff; --r: 22px;
  --font: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a2350; }
body { font-family: var(--font); color: var(--ink); -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
html:not([lang="ko"]) * { word-break: normal !important; overflow-wrap: break-word; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
input { font-family: inherit; }
.hidden { display: none !important; }
b { font-weight: normal; color: var(--pinkD); }

#app { position: relative; margin: 0 auto; width: 100%; max-width: 480px; height: 100%; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 60%, #e9f8ff 100%); }
@media (min-width: 520px) {
  body { display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 30% 20%, #6b5bd6, #2a2350 70%); }
  #app { height: min(920px, 96vh); border-radius: 38px; box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 10px #15112b; }
}
#view { flex: 1; min-height: 0; position: relative; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; animation: screenIn .35s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { transform: none; } }

/* ---------- 공통 버튼 ---------- */
.btn { --b: var(--blue); --bd: var(--blueD); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--b); color: #fff; font-size: 19px; padding: 13px 22px; border-radius: 18px;
  box-shadow: 0 5px 0 var(--bd); transition: transform .08s, box-shadow .08s; text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd); }
.btn-big { width: 100%; font-size: 21px; padding: 15px 18px; margin-top: 12px; }
.btn-green { --b: var(--green); --bd: var(--greenD); }
.btn-blue { --b: var(--blue); --bd: var(--blueD); }
.btn-orange { --b: var(--orange); --bd: var(--orangeD); }
.btn-gold { --b: linear-gradient(180deg, #ffd85c, #ffb800); --bd: var(--goldD); color: #5a3a00; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.btn-red { --b: var(--red); --bd: var(--redD); }
.btn-ghost { --b: rgba(255,255,255,.9); --bd: rgba(59,47,92,.25); color: var(--ink); text-shadow: none; }
.row-btns { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.muted { color: var(--ink2); font-size: 15px; line-height: 1.6; }
.pop { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.shake { animation: shake .42s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(5px); } }

/* ---------- 마스코트 ---------- */
.lamb { width: 100%; height: 100%; overflow: visible; }
.lamb .eyes { transform-origin: 60px 61px; animation: blink 4s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.lamb.happy { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- 탭바 ---------- */
#tabs { display: flex; background: #fff; border-top: 3px solid #e8e4f7; padding: 6px 4px calc(6px + var(--safe-b)); z-index: 5; }
#tabs[hidden] { display: none; }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; font-size: 12px; color: var(--ink2); min-width: 0; }
#tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#tabs button i { font-style: normal; font-size: 24px; transition: transform .2s; }
#tabs button.on { background: #eef6ff; color: var(--blueD); }
#tabs button.on i { transform: scale(1.18) translateY(-2px); }

/* ---------- HUD ---------- */
.hud { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: calc(10px + var(--safe-t)) 14px 10px; z-index: 3; }
.hud-me { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); padding: 5px 14px 5px 5px; border-radius: 99px; box-shadow: 0 3px 0 rgba(0,0,0,.1); min-width: 0; }
.hud-me b { color: var(--ink); font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-ava { width: 36px; height: 36px; border-radius: 50%; background: #ffe9a8; display: grid; place-items: center; font-size: 22px; flex: none; }
.hud-stats { display: flex; align-items: center; gap: 6px; flex: none; }
.pill { background: rgba(255,255,255,.92); padding: 8px 11px; border-radius: 99px; font-size: 15px; box-shadow: 0 3px 0 rgba(0,0,0,.1); }
.hud-lang { font-size: 18px; padding: 6px 10px; line-height: 1; }
.hud-lang:active { transform: translateY(2px); }

/* ---------- 오버레이 / 대화 / 모달 / 언어 선택 ---------- */
#overlay { position: absolute; inset: 0; z-index: 50; display: none; }
#overlay.show { display: flex; }
.talk { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,15,50,.05) 30%, rgba(20,15,50,.55));
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 16px 16px calc(24px + var(--safe-b)); }
.talk-bubble { position: relative; width: 100%; background: #fff; border-radius: 26px; padding: 18px 20px 14px; box-shadow: 0 8px 0 rgba(59,47,92,.2), 0 14px 30px rgba(0,0,0,.25); border: 4px solid #ffe08a; }
.talk-bubble::after { content: ''; position: absolute; bottom: -18px; left: 50%; margin-left: -14px; border: 14px solid transparent; border-top-color: #ffe08a; border-bottom: 0; }
.talk-name { position: absolute; top: -16px; left: 18px; background: var(--pink); color: #fff; padding: 4px 14px; border-radius: 99px; font-size: 15px; box-shadow: 0 3px 0 var(--pinkD); }
.talk-text { font-size: 20px; line-height: 1.55; margin: 8px 0 6px; min-height: 66px; white-space: pre-line; word-break: keep-all; }
.talk-next { text-align: right; font-size: 13px; color: var(--ink2); animation: blinkTxt 1.2s infinite; }
@keyframes blinkTxt { 50% { opacity: .3; } }
.talk-lamb { width: 130px; height: 130px; margin-top: 16px; }
.modal { margin: auto; width: calc(100% - 40px); max-height: 88%; overflow-y: auto; background: #fff; border-radius: 28px; padding: 26px 20px 20px; text-align: center; box-shadow: 0 10px 0 rgba(59,47,92,.25), 0 20px 50px rgba(0,0,0,.35); }
#overlay:has(.modal) { background: rgba(25,18,60,.55); }
.modal h3 { font-size: 23px; margin: 8px 0; font-weight: normal; }
.modal p { font-size: 16px; line-height: 1.6; color: var(--ink2); margin: 6px 0; }
.modal-emoji { font-size: 64px; }
.modal-btns { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.badge-big { font-size: 96px; animation: spinIn 1s cubic-bezier(.2, 1.4, .4, 1); filter: drop-shadow(0 6px 10px rgba(255,180,0,.6)); }
@keyframes spinIn { from { transform: rotate(-200deg) scale(.2); } to { transform: none; } }
.law-mini { background: #fff8e0; border: 3px dashed var(--gold); border-radius: 18px; padding: 12px; font-size: 16px; line-height: 1.6; margin-top: 12px; word-break: keep-all; }
.cert-img { width: 100%; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.share-status { background: #f3f0ff; color: var(--ink); padding: 10px 12px; border-radius: 14px; font-size: 15px; line-height: 1.5; word-break: keep-all; }
.share-status.ok { background: #e3ffe6; color: var(--greenD); }
.share-url { width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 3px solid #d9d3ee; background: #faf9ff; color: var(--ink); font-size: 15px; text-align: center; outline: none; -webkit-user-select: all; user-select: all; direction: ltr; }
.share-url:focus { border-color: var(--blue); }

/* 스크롤 언어 선택 모달 */
.lang-modal { padding: 20px 16px 16px; }
.lang-modal h3 { margin: 0 0 12px; font-size: 21px; }
.lang-list { max-height: 56dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 8px; padding: 4px 6px 4px 2px; overscroll-behavior: contain; }
.lang-list::-webkit-scrollbar { width: 7px; }
.lang-list::-webkit-scrollbar-track { background: #f1edff; border-radius: 99px; }
.lang-list::-webkit-scrollbar-thumb { background: #b8afe8; border-radius: 99px; }
.lang-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 18px; background: #f8f6ff; border: 3px solid #ebe7f8; text-align: left; transition: transform .08s, background .15s; }
.lang-item:active { transform: scale(.98); }
.lang-item.on { background: #fff8dc; border-color: var(--gold); box-shadow: 0 3px 0 var(--goldD); }
.lang-item.loading { opacity: .6; }
.li-flag { font-size: 28px; line-height: 1; flex: none; }
.li-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-names b { font-size: 18px; color: var(--ink); line-height: 1.3; }
.li-names small { font-size: 12px; color: var(--ink2); }
.li-check { font-size: 18px; flex: none; }
.lang-current { display: flex; align-items: center; gap: 12px; background: #f8f6ff; border-radius: 16px; padding: 10px 14px; margin-bottom: 6px; }
.lang-current span { font-size: 32px; line-height: 1; }
.lang-current b { display: block; font-size: 18px; color: var(--ink); }
.lang-current small { display: block; font-size: 13px; color: var(--ink2); }

#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
#toast { position: absolute; left: 50%; bottom: 100px; transform: translate(-50%, 30px); opacity: 0; background: rgba(40,30,80,.92); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 16px; z-index: 70; transition: .3s; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 스플래시 ---------- */
.splash { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(52px + var(--safe-t)) 24px calc(30px + var(--safe-b)); overflow: hidden;
  background: linear-gradient(180deg, #58b4ff 0%, #9fdcff 55%, #d8f3ff 100%); }
.splash-lang { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; z-index: 5; background: rgba(255,255,255,.94); color: var(--ink); padding: 8px 14px; border-radius: 99px; font-size: 15px; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.splash-lang:active { transform: translateY(2px); }
.splash-sun { position: absolute; top: -80px; right: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, #fff7b0 0 35%, rgba(255,230,120,.5) 50%, transparent 70%); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.cloud { position: absolute; background: #fff; border-radius: 99px; opacity: .9; animation: drift 28s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 50%; height: 160%; left: 15%; top: -70%; } .cloud::after { width: 38%; height: 130%; right: 15%; top: -45%; }
.c1 { width: 120px; height: 36px; top: 16%; left: -130px; } .c2 { width: 90px; height: 28px; top: 34%; left: -100px; animation-duration: 36s; animation-delay: -14s; }
.c3 { width: 150px; height: 42px; top: 6%; left: -160px; animation-duration: 44s; animation-delay: -30s; }
@keyframes drift { to { transform: translateX(680px); } }
.logo { position: relative; z-index: 2; text-align: center; margin-top: 10px; width: 100%; }
.logo small { display: inline-block; background: #fff; color: var(--blueD); padding: 6px 16px; border-radius: 99px; font-size: 14px; box-shadow: 0 3px 0 rgba(0,0,0,.1); max-width: 100%; }
.logo h1 { margin: 12px 0 4px; font-size: clamp(36px, 11.5vw, 62px); line-height: 1.12; font-weight: normal; color: #fff; letter-spacing: 1px;
  -webkit-text-stroke: 3px #3b62c9; paint-order: stroke fill; text-shadow: 0 6px 0 #2e4aa0, 0 10px 18px rgba(0,0,0,.25); animation: titleIn .8s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes titleIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.logo-sub { font-size: 24px; color: #fff4b8; -webkit-text-stroke: 1.5px #c97a00; paint-order: stroke fill; text-shadow: 0 3px 0 #b36b00; }
.splash-lamb { width: 180px; height: 180px; z-index: 2; }
.splash-btns { width: 100%; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.hills { position: absolute; left: -10%; right: -10%; bottom: 0; height: 32%; z-index: 1; border-radius: 50% 50% 0 0 / 40% 40% 0 0;
  background: radial-gradient(ellipse at 30% 0%, #8ee07a, #4fbf54 70%); box-shadow: inset 0 10px 0 rgba(255,255,255,.25); }
.hills::before { content: '🌼  🌷     🌸   🌼    🌷  🌸'; position: absolute; top: 14%; left: 12%; right: 12%; font-size: 20px; letter-spacing: 4px; text-align: center; opacity: .95; }

/* ---------- 온보딩 ---------- */
.onboard { position: relative; flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: calc(56px + var(--safe-t)) 22px calc(24px + var(--safe-b)); }
.ob-lamb { width: 136px; height: 136px; }
.ob-bubble { background: #fff; border-radius: 22px; padding: 14px 20px; font-size: 19px; text-align: center; line-height: 1.5; box-shadow: 0 5px 0 rgba(59,47,92,.15); margin: 6px 0 16px; }
.name-input { width: 100%; font-size: 24px; text-align: center; padding: 14px; border-radius: 20px; border: 4px solid #fff; background: #fff; color: var(--ink); outline: none; box-shadow: 0 5px 0 rgba(59,47,92,.15); -webkit-user-select: text; user-select: text; }
.name-input:focus { border-color: var(--gold); }
.name-input.sm { font-size: 20px; padding: 10px; }
.ob-label { font-size: 18px; margin: 18px 0 8px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.ava-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; }
.ava { aspect-ratio: 1; font-size: 34px; background: rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 4px 0 rgba(59,47,92,.15); transition: transform .15s; }
.ava.on { background: #fff6c9; outline: 4px solid var(--gold); transform: scale(1.08); }
.ava-grid.sm .ava { font-size: 26px; border-radius: 14px; }

/* ---------- 지도 ---------- */
.scr-map .hud { position: absolute; top: 0; left: 0; right: 0; }
.map { flex: 1; overflow-y: auto; overflow-x: hidden; padding: calc(70px + var(--safe-t)) 14px 30px; scroll-behavior: smooth;
  background: linear-gradient(180deg, #7cc8ff 0%, #b6e6ff 30%, #c9f0d9 65%, #fff1c9 100%); }
.world { margin-bottom: 10px; }
.world-banner { position: relative; height: 150px; border-radius: 26px; background-size: cover; background-position: center; overflow: hidden;
  box-shadow: 0 6px 0 rgba(0,0,0,.12), 0 0 0 4px #fff; background-color: var(--c); }
.wb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55)); }
.wb-text { position: absolute; left: 16px; right: 70px; bottom: 12px; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.wb-chip { align-self: flex-start; background: var(--c); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 99px; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.wb-text b { color: #fff; font-size: 26px; text-shadow: 0 2px 0 rgba(0,0,0,.35); line-height: 1.2; }
.wb-text small { font-size: 14px; opacity: .95; }
.wb-badge { position: absolute; right: 12px; top: 12px; width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.wb-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; background: rgba(40,40,70,.35); }
.world.locked .world-banner { filter: grayscale(.75); }
.path { position: relative; direction: ltr; }
.path-line { position: absolute; left: 50%; top: 0; transform: translateX(-50%); overflow: visible; }
.path-line path { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 2 18; opacity: .95; }
.node-wrap { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 148px; }
.node { width: 74px; height: 74px; border-radius: 50%; font-size: 32px; position: relative; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--c2) 13%, var(--c) 75%); box-shadow: 0 7px 0 rgba(0,0,0,.22), inset 0 -5px 0 rgba(0,0,0,.12); border: 4px solid #fff; transition: transform .1s; }
.node:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.22); }
.node.done { background: radial-gradient(circle at 35% 30%, #fff 0 12%, #ffe58a 13%, #ffb800 75%); }
.node.locked { background: radial-gradient(circle at 35% 30%, #fff 0 12%, #d9d6e6 13%, #a9a4c0 75%); font-size: 24px; }
.node.current { animation: nodePulse 1.4s ease-in-out infinite; }
.node.current::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 5px solid #fff; opacity: .8; animation: ring 1.4s ease-out infinite; }
@keyframes nodePulse { 50% { transform: scale(1.08); } }
@keyframes ring { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.n-stars { color: #ffb800; font-size: 15px; letter-spacing: 1px; margin-top: 6px; text-shadow: 0 1px 0 #fff, 0 0 2px #fff; }
.n-label { margin-top: 4px; background: rgba(255,255,255,.93); padding: 3px 10px; border-radius: 12px; font-size: 13px; text-align: center; box-shadow: 0 2px 0 rgba(0,0,0,.08); line-height: 1.3; max-width: 146px; word-break: keep-all; }
.n-lamb { position: absolute; top: 0; width: 68px; height: 68px; pointer-events: none; }
.n-lamb.l { right: 112px; } .n-lamb.r { left: 112px; }
.n-go { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--pink); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 99px; white-space: nowrap; box-shadow: 0 2px 0 var(--pinkD); }
.map-end { text-align: center; font-size: 19px; padding: 20px; color: var(--ink); line-height: 1.6; }
.map-end small { font-size: 14px; color: var(--ink2); }

/* ---------- 월드 인트로 / 스테이지 스플래시 ---------- */
.world-intro { flex: 1; position: relative; background: var(--c); }
.wi-img { position: absolute; inset: 0; background-size: cover; background-position: center; animation: kenburns 12s ease-out both; }
@keyframes kenburns { from { transform: scale(1.25); } to { transform: scale(1); } }
.wi-text { position: absolute; top: calc(40px + var(--safe-t)); left: 20px; right: 20px; text-align: center; color: #fff; }
.wi-text h2 { font-size: 40px; font-weight: normal; margin: 10px 0 0; -webkit-text-stroke: 2px rgba(0,0,0,.35); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.wi-text p { font-size: 18px; margin: 4px 0; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.wi-text .wb-chip { display: inline-block; font-size: 15px; }
.stage-splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding-bottom: 40%;
  background: radial-gradient(circle at 50% 30%, var(--c2), var(--c)); color: #fff; text-align: center; }
.ss-emoji { font-size: 96px; filter: drop-shadow(0 8px 0 rgba(0,0,0,.15)); }
.ss-title { font-size: 28px; padding: 0 20px; text-shadow: 0 3px 0 rgba(0,0,0,.2); word-break: keep-all; }
.ss-world { background: rgba(255,255,255,.3); padding: 5px 14px; border-radius: 99px; font-size: 15px; }

/* ---------- 플레이 화면 ---------- */
.play { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative;
  background: radial-gradient(circle at 50% -10%, var(--c2), transparent 60%), linear-gradient(180deg, #fff 0%, #f4f1ff 100%); }
.play-top { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 14px 8px; }
.x-btn { width: 40px; height: 40px; border-radius: 50%; background: #fff; font-size: 18px; color: var(--ink2); box-shadow: 0 3px 0 rgba(59,47,92,.15); flex: none; }
.play-title { flex: 1; text-align: center; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-right { min-width: 40px; text-align: right; flex: none; }
.pbar { flex: 1; height: 18px; background: #e6e1f5; border-radius: 99px; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0,0,0,.08); }
.pbar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #7ef08f, var(--green)); border-radius: 99px; transition: width .45s cubic-bezier(.2, 1.3, .4, 1); position: relative; }
.pbar i::after { content: ''; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; background: rgba(255,255,255,.55); border-radius: 99px; }
.combo b { color: var(--orangeD); font-size: 16px; display: inline-block; }
.play-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px calc(20px + var(--safe-b)); display: flex; flex-direction: column; }

/* ---------- 퀴즈 ---------- */
.quiz { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.qcard { position: relative; background: #fff; border-radius: 28px; padding: 22px 18px 20px; text-align: center; box-shadow: 0 6px 0 rgba(59,47,92,.12), 0 0 0 4px var(--c2); }
.q-emoji { font-size: 60px; line-height: 1.1; animation: bob 2s ease-in-out infinite; }
.q-text { font-size: 22px; line-height: 1.5; margin: 10px 0 0; word-break: keep-all; }
.retry-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--orange); color: #fff; font-size: 14px; padding: 3px 12px; border-radius: 99px; white-space: nowrap; }
.answers { display: flex; flex-direction: column; gap: 11px; }
.ans { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 20px; padding: 14px 16px; font-size: 18px; text-align: left; line-height: 1.35;
  box-shadow: 0 5px 0 #d9d3ee; border: 3px solid #ebe7f8; animation: pop .4s cubic-bezier(.2, 1.5, .4, 1) both; transition: background .2s, transform .08s; word-break: keep-all; }
.ans:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #d9d3ee; }
.ans-key { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c2); color: #fff; font-size: 18px; }
.answers.ox { flex-direction: row; }
.answers.ox .ans { flex: 1; flex-direction: column; justify-content: center; padding: 22px 8px; font-size: 20px; text-align: center; }
.answers.ox .ans-key { width: auto; height: auto; background: none; font-size: 52px; }
.ans.right { background: #dcffe2; border-color: var(--green); box-shadow: 0 5px 0 var(--greenD); animation: rightPop .5s; }
.ans.right .ans-key { background: var(--green); }
.ans.wrong { background: #ffe1e1; border-color: var(--red); box-shadow: 0 5px 0 var(--redD); animation: shake .42s; }
.ans.wrong .ans-key { background: var(--red); }
.ans:disabled:not(.right):not(.wrong) { opacity: .55; }
@keyframes rightPop { 40% { transform: scale(1.05); } }

/* 피드백 시트 */
.fb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 18px 18px calc(18px + var(--safe-b)); border-radius: 28px 28px 0 0;
  transform: translateY(105%); transition: transform .32s cubic-bezier(.2, 1.2, .4, 1); box-shadow: 0 -8px 30px rgba(0,0,0,.18); max-height: 78%; overflow-y: auto; }
.fb.show { transform: none; }
.fb-good { background: #e3ffe6; } .fb-bad { background: #fff0e0; } .fb-info { background: #f1edff; }
.fb-head { font-size: 24px; margin-bottom: 6px; }
.fb-good .fb-head { color: var(--greenD); } .fb-bad .fb-head { color: var(--orangeD); } .fb-info .fb-head { color: #6a54d6; }
.fb-x { font-size: 17px; line-height: 1.6; margin: 6px 0; word-break: keep-all; }
.fb-ref { display: inline-block; background: #fff; padding: 4px 12px; border-radius: 99px; font-size: 14px; color: var(--ink2); margin: 4px 0 2px; }
.fb-btn { width: 100%; margin-top: 12px; font-size: 20px; padding: 15px; }

/* ---------- 말씀 카드 / 퍼즐 ---------- */
.verse-card { background: #fff; border-radius: 26px; padding: 22px 18px; text-align: center; box-shadow: 0 6px 0 rgba(59,47,92,.12), 0 0 0 4px var(--vc, var(--c2)); position: relative; }
.vc-step { position: absolute; top: 12px; right: 16px; font-size: 13px; color: var(--ink2); }
.vc-h { font-size: 21px; color: var(--ink); margin-bottom: 10px; word-break: keep-all; }
.verse-card blockquote, .vod blockquote, .vrow blockquote { margin: 0; font-size: 19px; line-height: 1.7; color: #4a3a7a; word-break: keep-all; background: #fffbea; border-radius: 18px; padding: 16px; position: relative; }
.verse-card blockquote::before { content: '“'; position: absolute; top: -14px; left: 10px; font-size: 54px; color: var(--gold); line-height: 1; }
.vc-r { margin-top: 8px; font-size: 15px; color: var(--ink2); }
.vc-n { font-size: 15px; color: var(--ink2); line-height: 1.6; margin: 10px 0 0; word-break: keep-all; }
.vc-key { font-size: 18px; background: #f1edff; border-radius: 14px; padding: 10px; margin: 12px 0 0; color: #5a43c9; word-break: keep-all; }
.mini-verse { margin: 12px 0 0; background: #fffbea; border-left: 6px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 17px; line-height: 1.65; color: #4a3a7a; text-align: left; word-break: keep-all; }
.mini-verse cite { display: block; font-style: normal; font-size: 14px; color: var(--ink2); margin-top: 4px; text-align: right; }
.puzzle { display: flex; flex-direction: column; gap: 12px; }
.pz-ref { align-self: center; background: var(--c); color: #fff; padding: 6px 16px; border-radius: 99px; font-size: 17px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.pz-board { background: #fff; border-radius: 24px; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 120px; box-shadow: 0 6px 0 rgba(59,47,92,.12), 0 0 0 4px var(--c2); transition: box-shadow .4s; }
.pz-board.glow { box-shadow: 0 0 0 6px var(--gold), 0 0 40px var(--gold); }
.pz-slot { min-width: 54px; padding: 9px 12px; border-radius: 14px; border: 3px dashed #d7d0ef; color: #c5bde3; font-size: 18px; text-align: center; }
.pz-slot.filled { border: 3px solid var(--c); background: var(--c2); color: var(--ink); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.pz-help { text-align: center; font-size: 16px; color: var(--ink2); margin: 0; }
.pz-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tile { background: #fff; padding: 12px 16px; border-radius: 16px; font-size: 18px; box-shadow: 0 5px 0 #d4cdea; border: 3px solid #ebe7f8; transition: transform .08s, opacity .25s; }
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 #d4cdea; }
.tile.used { opacity: 0; transform: scale(.5); pointer-events: none; }
.tile.hint { border-color: var(--gold); animation: hintGlow 1s infinite; }
@keyframes hintGlow { 50% { box-shadow: 0 5px 0 #d4cdea, 0 0 18px var(--gold); } }

/* ---------- 보물상자 / 원리 카드 ---------- */
.chest-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.chest { font-size: 140px; animation: wiggle 1.2s ease-in-out infinite; filter: drop-shadow(0 12px 0 rgba(0,0,0,.12)); }
.chest.open { animation: chestOpen .9s forwards; }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-10deg) scale(1.05); } 80% { transform: rotate(10deg) scale(1.05); } 90% { transform: rotate(-6deg); } }
@keyframes chestOpen { 40% { transform: scale(1.35); } 100% { transform: scale(3); opacity: 0; } }
.tap-hint { font-size: 19px; color: var(--ink2); animation: blinkTxt 1.4s infinite; }
.law-card { background: linear-gradient(160deg, #fff7d1, #ffe08a); border-radius: 30px; padding: 30px 22px 22px; text-align: center; border: 5px solid #fff; box-shadow: 0 8px 0 var(--goldD), 0 0 50px rgba(255,200,60,.6); }
.flip-in { animation: flipIn .8s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes flipIn { from { transform: perspective(800px) rotateY(90deg) scale(.7); opacity: 0; } }
.law-no { display: inline-block; background: var(--pink); color: #fff; font-size: 24px; padding: 6px 22px; border-radius: 99px; box-shadow: 0 4px 0 var(--pinkD); }
.law-text { font-size: 22px; line-height: 1.65; margin: 18px 0 4px; color: #4b3500; word-break: keep-all; }

/* ---------- 골짜기 장면 ---------- */
.scene { position: relative; height: 240px; border-radius: 26px; overflow: hidden; flex: none; direction: ltr;
  background: linear-gradient(180deg, #6d5fc7 0%, #a99be8 55%, #d9cffb 100%); box-shadow: 0 6px 0 rgba(59,47,92,.15); transition: background 1s; }
.scene.lit { background: linear-gradient(180deg, #ffb35c 0%, #ffe39a 55%, #fff6d6 100%); }
.sc-sky { position: absolute; inset: 0; background: radial-gradient(circle at 82% 30%, rgba(255,240,170,.85), transparent 40%); }
.sc-chasm { position: absolute; left: 30%; right: 30%; bottom: 0; height: 110px; background: linear-gradient(180deg, transparent, #20183f 70%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; }
.sc-chasm span { color: #fff; font-size: 12px; opacity: .85; text-align: center; padding: 0 4px; }
.cliff { position: absolute; bottom: 0; width: 30%; height: 110px; background: linear-gradient(180deg, #6fd36a 0 14px, #9a6b45 14px, #7a5133); }
.cliff.left { left: 0; border-radius: 0 20px 0 0; } .cliff.right { right: 0; border-radius: 20px 0 0 0; }
.god-light { position: absolute; bottom: 116px; left: 50%; transform: translateX(-50%); text-align: center; width: 120px; }
.god-light i { font-style: normal; font-size: 46px; display: block; animation: pulse 2s infinite; filter: drop-shadow(0 0 16px #fff4a0); }
.god-light b { color: #fff; font-size: 12px; background: rgba(0,0,0,.25); padding: 2px 8px; border-radius: 99px; display: inline-block; max-width: 112px; line-height: 1.25; }
.god-light.hug i { animation: hug 1s ease 2; }
@keyframes hug { 50% { transform: scale(1.5); filter: drop-shadow(0 0 40px #fff4a0); } }
.hero { position: absolute; bottom: 108px; left: 8%; width: 60px; text-align: center; z-index: 3; }
.hero span { font-size: 42px; display: block; line-height: 1.1; }
.hero b { font-size: 11px; color: #fff; background: rgba(0,0,0,.3); padding: 1px 6px; border-radius: 99px; white-space: nowrap; }
.hero.jumpfail { animation: jumpfail 1.5s ease-in forwards; }
@keyframes jumpfail { 0% { transform: none; } 35% { transform: translate(calc(var(--dx) * .6), -70px) rotate(10deg); } 50% { transform: translate(var(--dx), -20px) rotate(20deg); }
  100% { transform: translate(var(--dx), 220px) rotate(200deg); opacity: 0; } }
.hero.respawn { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.hero.walk { transition: transform 2.5s ease-in-out; transform: translateX(var(--dx)); animation: walkBob .35s infinite; }
.hero.walk span { animation: walkBob .35s infinite alternate; }
@keyframes walkBob { to { translate: 0 -6px; } }
.bridge { position: absolute; left: 27%; right: 27%; bottom: 96px; height: 18px; border-radius: 6px; z-index: 2; transform: scaleX(0); transform-origin: left;
  background: repeating-linear-gradient(90deg, #c9853f 0 18px, #b06f2c 18px 21px); box-shadow: 0 0 0 3px #7a4a1c, 0 0 30px #ffd34d; transition: transform 1s cubic-bezier(.2, 1.3, .4, 1); }
.bridge::after { content: ''; position: absolute; left: 62%; top: -22px; width: 18px; height: 62px; border-radius: 5px; background: #c9853f; box-shadow: 0 0 0 3px #7a4a1c; transform: scaleY(.45); }
.bridge.show { transform: scaleX(1); }
.drop-zone { position: absolute; left: 32%; right: 32%; bottom: 80px; height: 50px; border: 3px dashed rgba(255,255,255,.8); border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 13px; text-align: center; padding: 0 4px; animation: blinkTxt 1.2s infinite; }
.drop-zone.hot { background: rgba(255,230,120,.4); border-color: #fff36b; animation: none; }
.scene-msg { text-align: center; font-size: 18px; margin: 14px 0 10px; line-height: 1.5; word-break: keep-all; min-height: 27px; }
.try-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.try-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border-radius: 20px; padding: 14px 6px; font-size: 16px; box-shadow: 0 5px 0 #d4cdea; border: 3px solid #ebe7f8; text-align: center; }
.try-btn i { font-style: normal; font-size: 34px; }
.try-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #d4cdea; }
.try-btn.tried { background: #f0eef7; opacity: .7; }
.try-btn.tried::after { content: attr(data-fail); font-size: 13px; color: var(--redD); }
.cross-dock { display: flex; justify-content: center; padding: 10px; }
.cross-item { position: relative; width: 80px; height: 110px; touch-action: none; cursor: grab; filter: drop-shadow(0 0 14px #ffd34d); animation: bob 1.6s ease-in-out infinite; }
.cross-item.drag { animation: none; cursor: grabbing; z-index: 20; }
.cr-v { position: absolute; left: 30px; top: 0; width: 20px; height: 110px; background: linear-gradient(90deg, #d8954e, #b06f2c); border-radius: 6px; box-shadow: 0 0 0 3px #7a4a1c; }
.cr-h { position: absolute; left: 0; top: 24px; width: 80px; height: 20px; background: linear-gradient(180deg, #d8954e, #b06f2c); border-radius: 6px; box-shadow: 0 0 0 3px #7a4a1c; }

/* ---------- 두 마음 의자 ---------- */
.circ-q { font-size: 20px; text-align: center; line-height: 1.5; margin: 6px 0 14px; word-break: keep-all; }
.life-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.life-card { background: #fff; border-radius: 22px; padding: 12px 8px; box-shadow: 0 5px 0 #d4cdea; border: 4px solid #ebe7f8; text-align: center; transition: transform .2s; }
.life-card.on { border-color: var(--gold); background: #fffbe6; transform: scale(1.04); }
.life-card svg { width: 100%; max-width: 150px; }
.life-card svg text { font-family: var(--font); }
.lc-title { font-size: 16px; margin-bottom: 4px; }
.life-card ul { list-style: none; margin: 6px 0 0; padding: 0; text-align: left; font-size: 13px; line-height: 1.45; color: var(--ink2); word-break: keep-all; }
.life-card li { display: flex; gap: 5px; margin-bottom: 4px; }
.life-card li i { font-style: normal; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #fff2c2; display: grid; place-items: center; font-size: 11px; color: var(--ink); }

/* ---------- 마음 문 ---------- */
.door-scene { position: relative; height: 300px; border-radius: 26px; overflow: hidden; flex: none; box-shadow: 0 6px 0 rgba(59,47,92,.15); background: #3a2a1c; direction: ltr; }
.door-img { position: absolute; inset: 0; background: url('assets/door.jpg') center 35% / cover; transform-origin: 50% 60%; }
.door-glow { position: absolute; right: 18%; top: 15%; width: 30%; height: 70%; background: radial-gradient(ellipse, rgba(255,220,120,.7), transparent 70%); animation: pulse 2.4s infinite; mix-blend-mode: screen; }
.knock { position: absolute; font-size: 24px; color: #fff; background: rgba(120,70,20,.85); padding: 4px 12px; border-radius: 99px; opacity: 0; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.k1 { top: 30%; left: 12%; } .k2 { top: 45%; left: 24%; } .k3 { top: 60%; left: 10%; }
.knocking .door-img { animation: knockShake .9s; }
.knocking .k1 { animation: knockPop .9s 0s; } .knocking .k2 { animation: knockPop .9s .28s; } .knocking .k3 { animation: knockPop .9s .56s; }
@keyframes knockShake { 0%, 30%, 60% { transform: none; } 10%, 40%, 70% { transform: scale(1.015) rotate(.4deg); } }
@keyframes knockPop { 0% { opacity: 0; transform: scale(.5); } 20% { opacity: 1; transform: scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.door-burst { position: absolute; left: 70%; top: 55%; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, #ffe27a 55%, rgba(255,210,90,0) 72%); transform: translate(-50%, -50%) scale(0); }
.burst .door-burst { animation: burst 1.6s ease-in forwards; }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(0); } 100% { transform: translate(-50%, -50%) scale(70); } }
.mean-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.mean-list li { display: flex; gap: 10px; font-size: 17px; line-height: 1.5; padding: 10px 0; border-bottom: 2px dashed #eee8fb; word-break: keep-all; }
.mean-list li i { font-style: normal; font-size: 24px; flex: none; }
.prayer-intro p { font-size: 17px; line-height: 1.65; text-align: left; word-break: keep-all; }
.prayer { display: flex; flex-direction: column; flex: 1; }
.pr-head { text-align: center; font-size: 22px; margin-bottom: 10px; }
.pr-lines { background: linear-gradient(180deg, #fffaf0, #fff1d6); border-radius: 26px; padding: 14px 16px; box-shadow: 0 6px 0 rgba(217,154,0,.25), 0 0 0 4px #ffe08a; }
.pr-line { font-size: 19px; line-height: 1.6; margin: 0; padding: 10px 12px; border-radius: 16px; color: #b3a689; transition: all .35s; word-break: keep-all; }
.pr-line.past { color: #8a7346; }
.pr-line.now { color: #4b3500; background: #fff; font-size: 21px; box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(255,200,60,.6); }
.decide { text-align: center; padding: 30px 6px; display: flex; flex-direction: column; gap: 12px; }
.decide-emoji { font-size: 80px; animation: pulse 1.6s infinite; }
.decide h3 { font-weight: normal; font-size: 23px; line-height: 1.5; margin: 0 0 10px; }
.celebrate { text-align: center; }
.cel-crown { font-size: 90px; animation: spinIn 1s cubic-bezier(.2, 1.4, .4, 1), bob 2s 1s ease-in-out infinite; }
.celebrate h2 { font-size: 40px; margin: 0; font-weight: normal; color: var(--pink); text-shadow: 0 3px 0 #ffd0de; }
.cel-big { font-size: 22px; line-height: 1.6; margin: 6px 0 12px; }
.cel-big b { font-size: 26px; }
.newlife { list-style: none; padding: 0; margin: 0; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.newlife li { display: flex; align-items: center; gap: 12px; background: #fff; padding: 12px 14px; border-radius: 18px; box-shadow: 0 4px 0 #ece6fa; font-size: 17px; animation: pop .5s both; word-break: keep-all; }
.newlife li:nth-child(2) { animation-delay: .15s; } .newlife li:nth-child(3) { animation-delay: .3s; } .newlife li:nth-child(4) { animation-delay: .45s; } .newlife li:nth-child(5) { animation-delay: .6s; }
.newlife i { font-style: normal; font-size: 28px; } .newlife small { display: block; font-size: 13px; color: var(--ink2); }

/* ---------- 믿음 기차 ---------- */
.train-scene { position: relative; height: 180px; border-radius: 26px; overflow: hidden; flex: none; direction: ltr; background: linear-gradient(180deg, #8fd3ff, #d9f2ff 70%, #8ee07a 70%); box-shadow: 0 6px 0 rgba(59,47,92,.15); }
.sun-s { position: absolute; top: 12px; right: 18px; font-size: 40px; }
.track { position: absolute; left: 0; right: 0; bottom: 38px; height: 10px; background: repeating-linear-gradient(90deg, #7a5133 0 8px, transparent 8px 22px), linear-gradient(#777, #777) 0 0 / 100% 4px no-repeat; }
.train { position: absolute; left: 16px; bottom: 46px; display: flex; gap: 4px; transition: transform 2.2s ease-in; }
.train.go { transform: translateX(-130%); }
.train.go .tcar { animation: walkBob .25s infinite alternate; }
.tcar { display: flex; flex-direction: column; align-items: center; }
.tcar i { font-style: normal; font-size: 52px; line-height: 1; }
.tcar b { font-size: 13px; background: #fff; padding: 1px 8px; border-radius: 99px; color: var(--ink); }
.cars { display: flex; flex-direction: column; gap: 10px; }
.car { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left; background: #fff; border-radius: 20px; padding: 10px 14px; box-shadow: 0 5px 0 #d4cdea; border: 3px solid #ebe7f8; }
.car i { font-style: normal; font-size: 40px; grid-row: span 2; }
.car b { font-size: 20px; color: var(--ink); } .car small { font-size: 14px; color: var(--ink2); }
.car.used { opacity: .35; }

/* ---------- 삼위 하나님 ---------- */
.tri-scene { position: relative; height: 300px; flex: none; border-radius: 26px; overflow: hidden; direction: ltr; background: radial-gradient(circle at 50% 55%, #3b2f7a, #1d1645); box-shadow: 0 6px 0 rgba(59,47,92,.2); }
.tri-scene::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(2px 2px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 80%, #fff, transparent), radial-gradient(2px 2px at 85% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 10% 65%, #fff, transparent); animation: blinkTxt 3s infinite; }
.big-light { position: absolute; left: 50%; top: 58%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; transform: scale(0); opacity: 0;
  background: radial-gradient(circle, rgba(255,250,220,.95) 0 30%, rgba(255,220,120,.65) 55%, rgba(255,200,100,0) 72%); transition: transform 1.6s cubic-bezier(.2, 1.2, .4, 1), opacity 1s; display: flex; align-items: flex-start; justify-content: center; }
.big-light span { margin-top: 10px; font-size: 6px; color: #5a3800; text-shadow: 0 0 4px #fff, 0 0 6px #fff6c9; white-space: nowrap; }
.inlight .big-light { transform: scale(2.8); opacity: 1; }
.core { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.12); border: 3px dashed rgba(255,255,255,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; transition: all .6s; }
.core-heart { position: absolute; font-size: 82px; opacity: .25; transition: opacity .6s, transform .6s; }
.core-ava { font-size: 40px; position: relative; } .core b { position: relative; font-size: 11px; color: #fff; }
.core.g0 { box-shadow: 0 0 0 5px #ffc93c; } .core.g0.g1 { box-shadow: 0 0 0 5px #ffc93c, 0 0 0 10px #ff7a7a; } .core.g0.g1.g2 { box-shadow: 0 0 0 5px #ffc93c, 0 0 0 10px #ff7a7a, 0 0 0 15px #5ec8ff, 0 0 50px #fff; border-style: solid; }
.core[class*="g"] .core-heart { opacity: .9; transform: scale(1.1); }
.inlight .core b { color: #8a5a00; }
.orb { position: absolute; width: 84px; height: 84px; border-radius: 50%; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--oc) 60%); box-shadow: 0 0 24px var(--oc), 0 0 0 4px rgba(255,255,255,.6); animation: floaty 2.4s ease-in-out infinite; transition: transform .7s cubic-bezier(.5, -.2, .5, 1.2), opacity .7s .4s; }
.orb i { font-style: normal; font-size: 32px; } .orb small { font-size: 10px; color: #3b2f5c; background: rgba(255,255,255,.88); padding: 1px 6px; border-radius: 99px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o0 { left: 50%; margin-left: -42px; top: 12px; } .o1 { left: 6%; top: 150px; animation-delay: -.8s; } .o2 { right: 6%; top: 150px; animation-delay: -1.6s; }
.orb.fly { animation: none; opacity: 0; pointer-events: none; }
@keyframes floaty { 50% { translate: 0 -8px; } }
.tri-info { margin-top: 14px; }
.secret-row { display: flex; align-items: center; justify-content: space-between; background: #fff8e0; border-radius: 16px; padding: 10px 14px; margin: 8px 0; font-size: 17px; gap: 8px; }
.secret-row span { direction: ltr; flex: none; }
.secret-row b { font-size: 18px; }
.secret p { font-size: 17px; line-height: 1.65; word-break: keep-all; }

/* ---------- 결과 ---------- */
.result { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px calc(30px + var(--safe-b));
  background: radial-gradient(circle at 50% 35%, var(--c2), var(--c)); color: #fff; text-align: center; }
.rays { position: absolute; left: 50%; top: 35%; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: repeating-conic-gradient(rgba(255,255,255,.18) 0 10deg, transparent 10deg 20deg); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result > * { position: relative; }
.result h2 { font-size: 38px; margin: 0; font-weight: normal; text-shadow: 0 4px 0 rgba(0,0,0,.2); }
.res-stars { display: flex; gap: 6px; margin: 10px 0; direction: ltr; }
.rs { font-size: 70px; color: rgba(0,0,0,.18); animation: starIn .6s cubic-bezier(.2, 1.8, .4, 1) both; }
.rs.on { color: #ffd23f; text-shadow: 0 4px 0 #d99a00, 0 0 24px #fff3a0; }
.rs:nth-child(2) { font-size: 88px; margin-top: -20px; }
@keyframes starIn { from { transform: scale(0) rotate(-180deg); } }
.res-lamb { width: 150px; height: 150px; }
.res-title { font-size: 20px; background: rgba(255,255,255,.25); padding: 6px 16px; border-radius: 99px; margin-top: 6px; }
.res-gems { font-size: 26px; margin: 10px 0; text-shadow: 0 2px 0 rgba(0,0,0,.2); }

/* ---------- 페이지 (도전 / 보물함 / 설정) ---------- */
.page { flex: 1; overflow-y: auto; padding: 0 16px 24px; }
.page-h { font-size: 28px; font-weight: normal; margin: 4px 0 12px; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.daily-hero { text-align: center; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.dh-icon { font-size: 80px; animation: bob 1.6s infinite; }
.daily-hero h2 { font-size: 32px; margin: 0; font-weight: normal; } .daily-hero p { margin: 4px 0 12px; font-size: 18px; }
.streak-row { display: flex; gap: 10px; }
.st-card { flex: 1; background: #fff; border-radius: 22px; padding: 14px; text-align: center; box-shadow: 0 5px 0 rgba(59,47,92,.12); display: flex; flex-direction: column; }
.st-card i { font-style: normal; font-size: 34px; } .st-card b { font-size: 26px; color: var(--orangeD); } .st-card small { color: var(--ink2); font-size: 14px; }
.done-today { text-align: center; background: #e3ffe6; color: var(--greenD); border-radius: 16px; padding: 10px; margin: 12px 0 0; }
.vod { background: #fff; border-radius: 24px; padding: 18px; margin-top: 22px; text-align: center; box-shadow: 0 5px 0 rgba(59,47,92,.12); }
.vod-h { font-size: 19px; margin-bottom: 10px; }
.t-sec { background: #fff; border-radius: 24px; padding: 16px; margin-bottom: 14px; box-shadow: 0 5px 0 rgba(59,47,92,.12); }
.t-sec.gold { background: linear-gradient(160deg, #fff7d1, #ffe9a6); text-align: center; }
.t-sec h3 { font-size: 19px; font-weight: normal; margin: 0 0 10px; }
.t-sec .btn { margin-top: 8px; }
.badges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.badge { text-align: center; opacity: .45; } .badge.on { opacity: 1; }
.badge i { font-style: normal; display: grid; place-items: center; aspect-ratio: 1; font-size: 30px; background: #f1edff; border-radius: 50%; }
.badge.on i { background: radial-gradient(circle, #fff6c9, #ffd75e); box-shadow: 0 3px 0 var(--goldD); }
.badge small { font-size: 11px; display: block; margin-top: 4px; line-height: 1.25; word-break: keep-all; }
.grow { list-style: none; margin: 0; padding: 0; }
.grow li { display: grid; grid-template-columns: 36px 1fr; align-items: center; padding: 9px 4px; border-bottom: 2px dashed #eee8fb; font-size: 16px; word-break: keep-all; }
.grow li i { font-style: normal; font-size: 24px; grid-row: span 2; } .grow li small { color: var(--ink2); font-size: 13px; }
.grow.check li { cursor: pointer; border-radius: 12px; } .grow.check li.on { background: #e9ffe9; }
.law-row { position: relative; background: #fff8e0; border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.law-row b { color: var(--pinkD); } .law-row p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; word-break: keep-all; }
.law-row.locked { background: #f3f1f8; color: var(--ink2); }
.vrow { position: relative; margin-bottom: 10px; }
.vrow blockquote { font-size: 16px; padding: 12px; }
.vrow .vc-r { text-align: right; font-size: 13px; }
.tog { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 17px; }
.tog input { display: none; }
.tog i { width: 56px; height: 32px; border-radius: 99px; background: #d9d4ea; position: relative; transition: .2s; direction: ltr; flex: none; }
.tog i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: .2s; }
.tog input:checked + i { background: var(--green); } .tog input:checked + i::after { left: 27px; }
.ver { text-align: center; color: var(--ink2); font-size: 13px; }

/* ---------- 피날레 ---------- */
.finale { text-align: center; }
.fin-crown { font-size: 100px; animation: spinIn 1s cubic-bezier(.2, 1.4, .4, 1), bob 2s 1s infinite; filter: drop-shadow(0 6px 14px rgba(255,190,0,.6)); }
.finale h2 { font-size: 34px; font-weight: normal; margin: 0 0 12px; color: var(--pink); }
.fin-badges { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.fb-b { width: 64px; } .fb-b i { font-style: normal; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; font-size: 30px; background: radial-gradient(circle, #fff6c9, #ffd75e); box-shadow: 0 3px 0 var(--goldD); }
.fb-b small { font-size: 11px; line-height: 1.2; display: block; margin-top: 3px; word-break: keep-all; }
.fin-box { background: #fff; border-radius: 22px; padding: 16px; margin-bottom: 12px; text-align: left; box-shadow: 0 5px 0 rgba(59,47,92,.12); }
.fin-box.gold { background: linear-gradient(160deg, #fff7d1, #ffe9a6); }
.fin-box h3 { margin: 0 0 8px; font-size: 19px; font-weight: normal; }
.fin-box p { font-size: 15px; line-height: 1.6; margin: 6px 0; word-break: keep-all; }

/* ---------- RTL (Arabic) 지원 ---------- */
html[dir="rtl"] .hud-me { padding: 5px 5px 5px 14px; }
html[dir="rtl"] .splash-lang { right: auto; left: 14px; }
html[dir="rtl"] .talk-name { left: auto; right: 18px; }
html[dir="rtl"] .talk-next { text-align: left; }
html[dir="rtl"] .lang-item { text-align: right; }
html[dir="rtl"] .wb-text { left: 70px; right: 16px; }
html[dir="rtl"] .wb-badge { right: auto; left: 12px; }
html[dir="rtl"] .ans { text-align: right; }
html[dir="rtl"] .vc-step { right: auto; left: 16px; }
html[dir="rtl"] .mini-verse { border-left: 0; border-right: 6px solid var(--gold); text-align: right; }
html[dir="rtl"] .mini-verse cite { text-align: left; }
html[dir="rtl"] .life-card ul { text-align: right; }
html[dir="rtl"] .mean-list, html[dir="rtl"] .prayer-intro p, html[dir="rtl"] .newlife, html[dir="rtl"] .fin-box { text-align: right; }
html[dir="rtl"] .car { text-align: right; }
html[dir="rtl"] .vrow .vc-r { text-align: left; }

@media (max-height: 700px) {
  .scene, .door-scene, .tri-scene { height: 210px; }
  .tri-scene .o1, .tri-scene .o2 { top: 110px; }
  .splash-lamb { width: 140px; height: 140px; }
  .logo h1 { font-size: clamp(32px, 10vw, 52px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
