/* 케미즈 EP.01 · 화면 토큰 (2026-11-12 Yui) — 색은 Sua 썸네일 틀(exports/chemiz-thumb/frame.html)과 같다 */
:root {
  --c1: #5FB2FF; --c2: #2F7CD6; --c3: #123E7A;
  --ink: #12213B; --ink2: #3D4B66; --mute: #6B7891;
  --paper: #F6FAFF; --line: #D5E3F5;
  --sun: #FFB547; --fire: #FF7A3D; --danger: #E5484D; --ok: #22A86B;
  --r-s: 6px; --r: 12px; --r-l: 18px;
  --font: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", 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; overscroll-behavior: none; background: #0E2A52; }
body { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }
#app { position: fixed; inset: 0; overflow: hidden; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r); font-size: 16px; font-weight: 800; line-height: 1; letter-spacing: -.01em; transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(2px) scale(.98); }
.btn.primary { background: var(--c2); color: #fff; box-shadow: 0 4px 0 var(--c3); }
.btn.primary:active { box-shadow: 0 2px 0 var(--c3); }
.btn.light { background: #fff; color: var(--c3); box-shadow: 0 4px 0 rgba(18,33,59,.18); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
.btn.line { background: #fff; color: var(--c3); box-shadow: inset 0 0 0 2px var(--line); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* 위쪽 표시 */
#hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--safe-t)) 12px 0; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
.hud-ep { white-space: nowrap; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 6px; border-radius: var(--r); background: #123E7A; box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.25); color: #fff; font-weight: 800; font-size: 14px; }
.hud-ep b { display: flex; align-items: center; height: 30px; padding: 0 8px; border-radius: var(--r-s); background: #fff; color: var(--c3); font-size: 12px; letter-spacing: .06em; }
.hud-goal { justify-self: center; display: flex; align-items: center; gap: 10px; min-height: 44px; max-width: 520px; padding: 8px 14px; border-radius: var(--r); background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(18,33,59,.16); font-size: 15px; font-weight: 700; line-height: 1.35; }
.hud-goal i { flex: none; display: flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-s); background: var(--sun); color: #5A3500; font-style: normal; font-size: 12px; font-weight: 900; }
.hud-goal.pop { animation: goalpop .5s cubic-bezier(.2,.9,.3,1.3); }
@keyframes goalpop { 0% { transform: scale(.9); opacity: .3 } 100% { transform: none; opacity: 1 } }
.hud-btns { display: flex; gap: 8px; }
.icon-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r); background: rgba(18,62,122,.88); color: #fff; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn em { position: absolute; right: -4px; top: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--sun); color: #5A3500; font-style: normal; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.icon-btn.off .wave { opacity: 0; }
.icon-btn.bump { animation: bump .6s cubic-bezier(.2,.9,.3,1.4); }
@keyframes bump { 0% { transform: scale(1) } 30% { transform: scale(1.25) } 100% { transform: scale(1) } }

/* 조작 버튼 */
#pad { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px calc(16px + var(--safe-b)); display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; z-index: 4; }
#pad > * { pointer-events: auto; }
#pad { transition: opacity .2s; }
body:not([data-mode=walk]) #pad { opacity: 0; pointer-events: none; }
body:not([data-mode=walk]) #pad > * { pointer-events: none; }
.dpad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); gap: 4px; }
.dpad button { display: flex; align-items: center; justify-content: center; border-radius: var(--r); background: rgba(255,255,255,.86); color: var(--c3); box-shadow: 0 4px 0 rgba(18,33,59,.22); touch-action: none; }
.dpad button.on { background: var(--c1); color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 rgba(18,33,59,.22); }
.dpad svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dpad [data-dir=up] { grid-area: 1 / 2; } .dpad [data-dir=left] { grid-area: 2 / 1; } .dpad [data-dir=right] { grid-area: 2 / 3; } .dpad [data-dir=down] { grid-area: 3 / 2; }
.act { width: 96px; height: 96px; border-radius: 24px; background: var(--sun); color: #5A3500; box-shadow: 0 6px 0 #C7801A; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 900; font-size: 20px; transition: transform .12s, opacity .2s, filter .2s; }
.act small { font-size: 11px; font-weight: 800; opacity: .7; }
.act[disabled] { filter: grayscale(1); opacity: .5; }
.act:not([disabled]) { animation: actpulse 1.6s ease-in-out infinite; }
@keyframes actpulse { 50% { transform: translateY(-3px); box-shadow: 0 9px 0 #C7801A, 0 0 0 8px rgba(255,181,71,.25) } }
@media (hover: hover) and (pointer: fine) {
  .dpad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); opacity: .85; }
  .act { width: 84px; height: 84px; }
}

/* 대사 */
#talk { position: absolute; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); width: min(720px, calc(100% - 24px)); min-height: 112px; display: flex; gap: 14px; align-items: center; padding: 16px 48px 16px 16px; border-radius: var(--r-l); background: #fff; box-shadow: 0 0 0 3px var(--c3), 0 10px 0 rgba(18,33,59,.25); z-index: 8; cursor: pointer; animation: talkin .25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes talkin { from { transform: translate(-50%, 20px); opacity: 0 } }
.talk-face { flex: none; width: 64px; height: 64px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); position: relative; overflow: hidden; }
.talk-body { flex: 1; min-width: 0; }
.talk-name { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-s); background: var(--c3); color: #fff; font-size: 13px; font-weight: 800; }
.talk-text { margin: 8px 0 0; font-size: 17px; line-height: 1.5; font-weight: 600; color: var(--ink); text-wrap: pretty; min-height: 1.5em; }
.talk-next { position: absolute; right: 14px; bottom: 12px; width: 24px; height: 24px; color: var(--c2); animation: nextb 1s ease-in-out infinite; }
.talk-next svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
#talk.typing .talk-next { opacity: 0; }
@keyframes nextb { 50% { transform: translateY(4px) } }

/* 얼굴 (대사·카드 공통) */
.face { position: absolute; inset: 0; }
.face .b { position: absolute; left: 12%; right: 12%; top: 22%; bottom: 8%; border-radius: 50% 50% 44% 44%; background: radial-gradient(circle at 35% 30%, #fff 0, #F2F8FF 45%, var(--c1) 150%); box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.face .cap { position: absolute; left: 24%; right: 24%; top: 12%; height: 22%; border-radius: 40% 40% 12% 12%; background: var(--c2); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.face .e { position: absolute; top: 50%; width: 9%; height: 12%; border-radius: 50%; background: var(--ink); }
.face .e.l { left: 35%; } .face .e.r { right: 35%; }
.face .m { position: absolute; top: 64%; left: 44%; width: 12%; height: 6%; border-bottom: 2px solid var(--ink); border-radius: 0 0 50% 50%; }
.face .k { position: absolute; top: 60%; width: 11%; height: 6%; border-radius: 50%; background: #FF9DB0; opacity: .8; }
.face .k.l { left: 22%; } .face .k.r { right: 22%; }
.face.spirit .b { top: 18%; background: radial-gradient(circle at 40% 30%, #fff 0, #DDEFFF 50%, rgba(95,178,255,.7) 100%); box-shadow: 0 0 14px rgba(95,178,255,.8); }
.face.spirit .cap { display: none; }
.face .tag { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); width: 34%; height: 28%; border-radius: 6px; background: var(--c3); color: #fff; font-weight: 900; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.face.q .b { background: radial-gradient(circle at 40% 30%, #F4F6FA 0, #C9D2E0 70%, #9AA6BA 100%); box-shadow: none; }
.face.q .tag { background: var(--mute); }
.face.kid .b { background: radial-gradient(circle at 40% 30%, #FFE7D1 0, #F5C9A4 100%); }
.face.kid .cap { background: #7A5532; left: 18%; right: 18%; }

/* 알림 */
#toast { position: absolute; left: 50%; top: calc(70px + var(--safe-t)); transform: translate(-50%, -10px); opacity: 0; max-width: calc(100% - 24px); padding: 12px 16px; border-radius: var(--r); background: var(--c3); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 20; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) { #toast { top: calc(122px + var(--safe-t)); } }
#flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, #fff 0, #E4F3FF 40%, rgba(160,210,255,.6) 100%); opacity: 0; pointer-events: none; z-index: 15; }
#flash.boom { animation: boom 1.2s ease-out; }
@keyframes boom { 0% { opacity: 0 } 6% { opacity: 1 } 100% { opacity: 0 } }

/* 로딩 */
#loading { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 70% 40%, var(--c1), var(--c2) 50%, var(--c3)); transition: opacity .4s; }
#loading.done { opacity: 0; pointer-events: none; }
.ld-mark { padding: 10px 16px; border-radius: 8px; background: #fff; color: var(--c3); font-weight: 900; letter-spacing: .12em; font-size: 20px; }
.ld-bar { width: 180px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }

/* 겹쳐 뜨는 화면 */
#layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
#layer > * { pointer-events: auto; }
.sheet { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b)); background: rgba(10,26,52,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; overscroll-behavior: contain; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0 } }
.panel { position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; margin: auto; padding: 22px 20px 20px; border-radius: var(--r-l); background: #fff; box-shadow: 0 0 0 3px var(--c3), 0 14px 0 rgba(0,0,0,.25); animation: panelin .35s cubic-bezier(.2,.9,.3,1.15); }
@keyframes panelin { from { transform: translateY(24px) scale(.96); opacity: 0 } }
.panel.wide { width: min(880px, 100%); }
.panel h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 900; letter-spacing: -.02em; color: var(--c3); text-wrap: balance; }
.panel .lead { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink2); font-weight: 600; text-wrap: balance; }
.panel .note { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r); background: var(--paper); color: var(--ink2); font-size: 14px; line-height: 1.5; font-weight: 600; text-wrap: balance; }
.panel .row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.panel .row > .btn { flex: 1 1 140px; }
.kicker { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; margin-bottom: 8px; border-radius: var(--r-s); background: var(--paper); color: var(--c2); font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.close-x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; color: var(--mute); }
.close-x svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; }

/* 첫 화면 */
.title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px 20px calc(24px + var(--safe-b)); background: radial-gradient(circle at 72% 42%, var(--c1) 0, var(--c2) 48%, var(--c3) 100%); overflow: hidden; animation: fadein .4s; }
.title .grid { position: absolute; inset: -40px; background-image: linear-gradient(rgba(255,255,255,.12) 2px, transparent 2px), linear-gradient(90deg, rgba(255,255,255,.12) 2px, transparent 2px); background-size: 64px 64px; mask-image: radial-gradient(circle at 70% 45%, #000 0, transparent 70%); -webkit-mask-image: radial-gradient(circle at 70% 45%, #000 0, transparent 70%); animation: gridmove 20s linear infinite; }
@keyframes gridmove { to { transform: translate(64px, 64px) } }
.title .tt-in { position: relative; width: min(960px, 100%); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.title .series { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .12em; }
.title .series b { display: flex; align-items: center; height: 28px; padding: 0 10px; background: #fff; color: var(--c3); border-radius: 6px; font-size: 14px; letter-spacing: .06em; }
.title .ep { margin-top: 14px; color: #fff; font-weight: 900; font-size: clamp(64px, 12vw, 112px); line-height: .9; letter-spacing: -.02em; text-shadow: 0 5px 0 rgba(0,0,0,.18); }
.title .ep span { font-size: .48em; opacity: .85; margin-right: 6px; }
.title .nm { margin-top: 14px; color: #fff; font-weight: 900; font-size: clamp(36px, 6vw, 52px); line-height: 1; }
.title .sub { margin-top: 12px; color: #fff; font-weight: 700; font-size: 19px; line-height: 1.4; opacity: .95; }
.title .meta { margin-top: 10px; color: rgba(255,255,255,.8); font-weight: 600; font-size: 14px; }
.title .row { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.title .row .btn { min-width: 160px; height: 56px; font-size: 18px; }
.title .stage { position: relative; width: 300px; height: 340px; }
.title .stage .ccard { position: absolute; left: 30px; top: 0; --cw: 240px; transform: rotate(4deg); animation: floaty 4s ease-in-out infinite; }
.title .stage .mascot { position: absolute; right: -6px; bottom: -4px; width: 120px; height: 120px; animation: floaty 3s ease-in-out infinite reverse; }
@keyframes floaty { 50% { translate: 0 -10px } }
@media (max-width: 720px) {
  .title { align-items: flex-start; overflow-y: auto; }
  .title .tt-in { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .title .stage { order: -1; width: 100%; height: 230px; }
  .title .stage .ccard { --cw: 150px; left: calc(50% - 75px); }
  .title .stage .ccard .logo2 { display: none; }
  .title .stage .mascot { width: 84px; height: 84px; right: calc(50% - 130px); bottom: 0; }
  .title .row .btn { flex: 1 1 140px; }
}

/* ===== 카드: 겉모양은 cards.css(Sua 시안), 여기는 뒤집기·기울이기 장치만 ===== */
.ccard { --cw: 300px; width: var(--cw); height: calc(var(--cw) * 1.4); perspective: calc(var(--cw) * 5); position: relative; flex: none; }
.cc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.85,.25,1.15); }
.ccard.down .cc-in { transform: rotateY(180deg); }
.cc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cc-face > .cz { width: 100%; height: 100%; }
.ccard .cc-face .card { --w: var(--cw); }
.cc-back { transform: rotateY(180deg); }
/* 안 보이는 면은 뒤집기 절반(.4초) 뒤에 아예 감춘다: 기울일 때 뒷면이 비치지 않게 */
.cc-back { visibility: hidden; transition: visibility 0s .4s; }
.ccard.down .cc-back, .ccard.flipping .cc-back, .ccard.charging .cc-back { visibility: visible; transition-delay: 0s; }
.cc-front { transition: visibility 0s 0s; }
.ccard.down:not(.flipping) .cc-front { visibility: hidden; transition-delay: .4s; }
.cc-front .in { position: relative; }
.cc-sw { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 3; }
.cc-sw::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.85) 50%, transparent 60%); transform: translateX(-130%); }
.ccard.sweep .cc-sw::after { animation: sweep 1.1s .1s cubic-bezier(.3,.6,.3,1); }
@keyframes sweep { to { transform: translateX(130%) } }
/* 작은 카드(도감·끝 화면·주기율표 손패): Sua .mini 를 그대로 쓰고, 물질용만 더함 */
.cz .mini.subm { background: var(--paper); border: .45em solid var(--c2); box-shadow: 0 .35em 0 var(--c3); }
.cz .mini.subm b { font-size: 1.7em; letter-spacing: -.03em; color: var(--c3); font-family: var(--font); }
.cz .mini.subm .mx { display: flex; align-items: center; gap: .3em; margin-top: .45em; }
.cz .mini.subm .mx i { display: flex; align-items: center; justify-content: center; width: 2.3em; height: 2.3em; border-radius: .4em; background: var(--H2); color: #fff; font: 900 1.4em/1 var(--num); font-style: normal; }
.cz .mini.subm .mx i.O { background: var(--O2); } .cz .mini.subm .mx i.q { background: #EEF2F7; color: #9AA8B8; border: .08em dashed #9AA8B8; }
.cz .mini.subm .mx em { font: 900 1.2em/1 var(--num); color: var(--ink2); font-style: normal; }
.cz .mini.empty .ep { margin-top: .35em; font-size: 1.25em; font-weight: 800; color: #9AA8B8; }
.mtile { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; }
.mtile .lb { min-height: 20px; display: flex; align-items: center; font-size: 13px; font-weight: 800; color: var(--ink2); text-align: center; }
.mtile.lock .lb { color: #9AA8B8; }
.mtile:hover .mini { transform: translateY(-3px); }
.mtile .mini { transition: transform .2s; }

/* ===== 카드 공개 연출 ===== */
.reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: calc(16px + var(--safe-t)) 12px calc(16px + var(--safe-b)); background: radial-gradient(circle at 50% 45%, #1E5BA8 0, #0B2148 70%); overflow: hidden; animation: fadein .3s; }
.reveal .rays { position: absolute; left: 50%; top: 45%; width: 180vmax; height: 180vmax; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.10) 0 6deg, transparent 6deg 18deg); mask-image: radial-gradient(circle, #000 0, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 55%); opacity: 0; transition: opacity .6s; animation: raysspin 30s linear infinite; pointer-events: none; }
.reveal.lit .rays { opacity: 1; }
@keyframes raysspin { to { rotate: 360deg } }
.reveal .head { position: relative; z-index: 4; margin-bottom: 22px; text-align: center; color: #fff; text-shadow: 0 2px 8px rgba(5,15,32,.6); }
.reveal .head b { display: block; font-size: 24px; font-weight: 900; line-height: 1.3; letter-spacing: -.02em; }
.reveal .head span { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; opacity: .8; }
.reveal .deck { position: relative; display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: nowrap; }
.reveal .deck .ccard { --cw: clamp(240px, min(82vw, 44vh), 320px); cursor: pointer; transition: transform .5s cubic-bezier(.2,.9,.3,1.2), opacity .4s, filter .4s; }
.reveal .deck .ccard.enter { animation: cardin .55s cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes cardin { from { transform: translateX(60px) rotate(6deg) scale(.9); opacity: 0 } }
.reveal .queue { position: relative; display: flex; gap: 8px; justify-content: center; }
.reveal .queue i { width: 28px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); }
.reveal .queue i.on { background: #FFD36E; }
.reveal .got { display: flex; gap: 14px; justify-content: center; }
.reveal .deck .ccard.wait { filter: brightness(.7); }
.reveal .deck .ccard.next { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.reveal .deck .ccard.focus { z-index: 3; transform: scale(1.06); }
.reveal .deck .ccard.charging .cc-in { animation: charge .9s ease-in both; }
@keyframes charge { 0% { transform: rotateY(180deg) } 20% { transform: rotateY(180deg) rotateZ(-3deg) scale(1.02) } 40% { transform: rotateY(180deg) rotateZ(3deg) scale(1.04) } 60% { transform: rotateY(180deg) rotateZ(-4deg) scale(1.06) } 80% { transform: rotateY(180deg) rotateZ(4deg) scale(1.08) } 100% { transform: rotateY(180deg) scale(1.1) } }
.reveal .deck .ccard.flipping .cc-in { animation: flipup .95s cubic-bezier(.2,.85,.25,1) both; }
@keyframes flipup { 0% { transform: rotateY(180deg) scale(1.1) } 45% { transform: rotateY(90deg) scale(1.16) } 75% { transform: rotateY(-12deg) scale(1.05) } 100% { transform: rotateY(0) scale(1) } }
.reveal .ring { position: absolute; inset: -14%; border-radius: 50%; border: 3px solid var(--c1); opacity: 0; pointer-events: none; }
.reveal .ccard.charging .ring { animation: ring .9s ease-in both; }
@keyframes ring { 0% { transform: scale(1.6); opacity: 0 } 70% { opacity: .9 } 100% { transform: scale(.7); opacity: 0 } }
.burst { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; pointer-events: none; z-index: 6; }
.burst i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 2px; background: var(--c); animation: fly 1.1s cubic-bezier(.15,.7,.3,1) forwards; }
.burst i.s { border-radius: 50%; }
@keyframes fly { 0% { transform: translate(0,0) rotate(0) scale(1); opacity: 1 } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.3); opacity: 0 } }
.pop-glow { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95) 0, color-mix(in srgb, var(--c1) 60%, transparent) 30%, transparent 65%); opacity: 0; pointer-events: none; z-index: 5; animation: popglow .9s ease-out forwards; }
@keyframes popglow { 0% { opacity: 0; transform: scale(.4) } 25% { opacity: 1 } 100% { opacity: 0; transform: scale(1.5) } }
.reveal .rv-cap { text-wrap: balance; position: relative; min-height: 48px; color: #fff; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.5; max-width: 520px; }
.reveal .rv-cap b { color: #FFD36E; }
@media (prefers-reduced-motion: reduce) {
  .reveal .deck .ccard.charging .cc-in, .reveal .deck .ccard.flipping .cc-in { animation: none; }
  .reveal .rays, .title .grid { animation: none; }
}

/* ===== 도감 ===== */
.dex { position: absolute; inset: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, #0F2C57 0, #0A1F40 100%); animation: fadein .25s; }
.dex-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 12px 10px 16px; color: #fff; }
.dex-head h2 { margin: 0; flex: 1; font-size: 20px; font-weight: 900; }
.dex-head .count { font-size: 14px; font-weight: 800; opacity: .8; }
.dex-head .close-x { position: static; color: #fff; background: rgba(255,255,255,.1); }
.tabs { display: flex; gap: 6px; padding: 0 12px; }
.tabs button { flex: 1; height: 44px; border-radius: var(--r) var(--r) 0 0; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.tabs button.on { background: #F3F7FD; color: var(--c3); }
.dex-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 12px; padding: 16px 12px calc(16px + var(--safe-b)); border-radius: 0 0 var(--r-l) var(--r-l); background: #F3F7FD; }
.dex-save { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r); background: #fff; box-shadow: 0 0 0 1.5px var(--line) inset; font-size: 14px; font-weight: 700; color: var(--ink2); line-height: 1.45; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 20px 12px; justify-items: center; }
.dex-grid .mini { --m: 100px; }
@media (max-width: 400px) { .dex-grid { grid-template-columns: repeat(3, 1fr); } .dex-grid .mini { --m: min(92px, calc((100vw - 96px) / 3)); } }
.dex-sec { margin: 22px 0 10px; font-size: 15px; font-weight: 900; color: var(--c3); }
.dex-sec:first-child { margin-top: 0; }
.detail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,15,32,.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadein .2s; overflow-y: auto; }
.detail .dt-in { display: flex; gap: 22px; align-items: center; max-width: 760px; width: 100%; margin: auto; }
.detail .ccard { --cw: clamp(240px, min(82vw, 52vh), 320px); cursor: grab; margin-bottom: 14px; }
.detail .info { flex: 1; color: #fff; }
.detail .info h3 { margin: 0; font-size: 24px; font-weight: 900; }
.detail .info dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 15px; line-height: 1.45; }
.detail .info dt { color: rgba(255,255,255,.6); font-weight: 700; }
.detail .info dd { margin: 0; font-weight: 700; }
.detail .info .guide { margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: rgba(255,255,255,.1); font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.85); }
.detail .row { display: flex; gap: 10px; margin-top: 16px; }
@media (max-width: 640px) { .detail .dt-in { flex-direction: column; } .detail .info { width: 100%; } }

/* ===== 주기율표 ===== */
.pt-wrap { margin-top: 14px; }
.pt-zoom { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr) 0.5fr repeat(6, 1fr); gap: 4px; }
.pt-zoom .gap { font-size: 10px; grid-row: span 2; display: flex; align-items: center; justify-content: center; border-radius: var(--r-s); background: repeating-linear-gradient(135deg, #EEF3FA 0 6px, #E4EBF5 6px 12px); color: var(--mute); font-size: 11px; font-weight: 800; text-align: center; line-height: 1.3; writing-mode: vertical-rl; }
.cell { position: relative; aspect-ratio: 1 / 1.18; border-radius: 6px; background: #F1F4F8; border: 2px dashed #B7C3D0; display: flex; align-items: center; justify-content: center; font-size: clamp(13px, 3vw, 18px); font-weight: 900; color: #B7C3D0; }
.cell:not(.got):not(.empty)::after { content: "?"; }
.cell .z { position: absolute; left: 4px; top: 3px; font-size: clamp(9px, 2vw, 11px); font-weight: 900; color: #9AA8B8; }
.cell.empty { background: transparent; box-shadow: none; }
.cell.target { border: 2.5px solid var(--sun); background: #FFF6E5; color: #B86E00; animation: tpulse 1.2s ease-in-out infinite; }
@keyframes tpulse { 50% { box-shadow: 0 0 0 5px rgba(255,181,71,.3) } }
.cell.got { border: 0; padding: 3px; background: #2F7CD6; color: #123E7A; font-size: clamp(16px, 4vw, 24px); box-shadow: 0 3px 0 #123E7A; }
.cell.got::before { content: ""; position: absolute; inset: 3px; border-radius: 4px; background: #F7FAFE; }
.cell.got b { position: relative; }
.cell.got .z { z-index: 1; color: #2F7CD6; }
.cell.got.special { background: conic-gradient(from 210deg, #FFD84D, #FF7AB6, #9B87F5, #5FB2FF, #46E0B5, #FFD84D); }
.cell.miss { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-4px) } 40%,80% { transform: translateX(4px) } }
.pt-head { max-width: 520px; margin-left: auto; margin-right: auto; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--mute); }
.pt-full { display: grid; grid-template-columns: repeat(18, 1fr); gap: 2px; max-width: 380px; margin: 10px auto 0; }
.pt-full .m { aspect-ratio: 1; border-radius: 2px; background: #E3EAF4; }
.pt-full .m.got { background: var(--c2); box-shadow: 0 0 0 1.5px #FFD36E; }
.pt-full .m.sp { background: transparent; }
.pt-full .fgap { grid-column: 1 / -1; height: 4px; }
.pt-count { display: flex; align-items: baseline; gap: 6px; font-weight: 900; color: var(--c3); }
.pt-count b { font-size: 34px; line-height: 1; } .pt-count span { font-size: 16px; color: var(--mute); }
.hand { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px; border-radius: var(--r); background: var(--paper); }
.hand .mini { --m: 72px; cursor: grab; touch-action: none; transition: transform .2s, opacity .3s; }
.hand .mini.sel { transform: translateY(-6px) scale(1.04); filter: drop-shadow(0 0 10px rgba(255,181,71,.9)); }
.hand > p { margin: 0; flex: 1; font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--ink2); }
.ghost-card { position: fixed; z-index: 60; pointer-events: none; }
.ghost-card .mini { --m: 72px; transform: rotate(-6deg) scale(1.08); filter: drop-shadow(0 10px 14px rgba(0,0,0,.3)); }

/* ===== 관찰 (풍선) ===== */
.obs { position: relative; height: 230px; margin-top: 14px; border-radius: var(--r); background: linear-gradient(180deg, #DDF0FF 0, #F4FAFF 70%, #E8D9B8 70%, #E2CFA8 100%); overflow: hidden; }
.obs .bal { position: absolute; bottom: 64px; width: 60px; transition: transform 3.2s cubic-bezier(.4,0,.6,1); }
.obs .bal .o { width: 60px; height: 72px; border-radius: 50% 50% 48% 48%; box-shadow: inset -8px -10px 0 rgba(0,0,0,.08); position: relative; }
.obs .bal .o::after { content: ""; position: absolute; left: 14px; top: 12px; width: 12px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.6); }
.obs .bal .s { width: 2px; height: 46px; margin: 0 auto; background: #8A96AA; }
.obs .bal.h { left: 22%; } .obs .bal.h .o { background: #8FCBFF; }
.obs .bal.a { right: 22%; } .obs .bal.a .o { background: #FFB4A0; }
.obs.go .bal.h { transform: translateY(-260px) rotate(-6deg); }
.obs.go .bal.a { transform: translateY(40px) rotate(8deg); transition-duration: 1.6s; }
.obs .lb { position: absolute; bottom: 10px; width: 46%; text-align: center; font-size: 13px; font-weight: 800; color: #6A5328; line-height: 1.35; }
.obs .lb.h { left: 2%; } .obs .lb.a { right: 2%; }
.obs .hand-ic { position: absolute; bottom: 40px; width: 40px; height: 26px; border-radius: 10px 10px 14px 14px; background: #F5C9A4; }
.obs .hand-ic.h { left: calc(22% + 10px); } .obs .hand-ic.a { right: calc(22% + 10px); }
.obs.go .hand-ic { opacity: .4; transition: opacity .4s; }

/* ===== 새는 곳 찾기 ===== */
.leak { position: relative; height: 300px; margin-top: 14px; border-radius: var(--r); background: linear-gradient(180deg, #E9F3FF 0, #F7FBFF 100%); overflow: hidden; }
.leak svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.spot { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 8px; border-radius: var(--r); background: #fff; box-shadow: 0 0 0 2px var(--c2) inset, 0 4px 0 rgba(18,33,59,.15); font-weight: 800; font-size: 14px; color: var(--c3); white-space: nowrap; }
.spot i { width: 22px; height: 22px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 0 4px rgba(95,178,255,.3); flex: none; }
.spot.tried { box-shadow: 0 0 0 2px #B8C4D6 inset; color: var(--mute); }
.spot.tried i { background: #B8C4D6; box-shadow: none; }
.spot.hit { box-shadow: 0 0 0 2.5px var(--danger) inset, 0 4px 0 rgba(229,72,77,.3); color: var(--danger); }
.spot.hit i { background: var(--danger); animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3 } }
.meter { margin-top: 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 14px; font-weight: 800; color: var(--ink2); }
.meter .bar { height: 14px; border-radius: 7px; background: #E6ECF5; overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--ok), var(--sun) 60%, var(--danger)); transition: width .6s cubic-bezier(.2,.8,.3,1); }
.gas { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(143,203,255,.7); animation: gasup 2.4s ease-out infinite; }
@keyframes gasup { 0% { transform: translate(0,0) scale(.6); opacity: 0 } 20% { opacity: .9 } 100% { transform: translate(var(--dx, 6px), -90px) scale(1.6); opacity: 0 } }
.shut { margin-top: 12px; height: 10px; border-radius: 5px; background: #E6ECF5; overflow: hidden; }
.shut i { display: block; height: 100%; width: 0; background: var(--ok); transition: width 2.2s linear; }

/* ===== 안전 카드 ===== */
.safety { display: grid; gap: 10px; margin-top: 14px; }
.safety .st { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: #FFF3EE; }
.safety .st b { width: 44px; height: 44px; border-radius: 12px; background: var(--danger); color: #fff; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.safety .st span { font-size: 16px; font-weight: 800; line-height: 1.4; color: #5B1E1E; }

/* ===== 불 끄기 ===== */
.fire { position: relative; height: 300px; margin-top: 14px; border-radius: var(--r); background: linear-gradient(180deg, #33415E 0, #4A5A7A 60%, #8C7556 60%, #6E5A40 100%); overflow: hidden; touch-action: none; }
.boxes { position: absolute; left: 0; right: 0; bottom: 38px; display: flex; justify-content: space-around; align-items: flex-end; }
.pbox { position: relative; width: 26%; max-width: 120px; aspect-ratio: 1 / .78; cursor: crosshair; touch-action: none; }
.pbox .cb { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(180deg, #D7A86E 0, #BD8B52 100%); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.pbox .cb::before { content: ""; position: absolute; left: 0; right: 0; top: 22%; height: 4px; background: rgba(0,0,0,.12); }
.pbox .cb::after { content: ""; position: absolute; left: 44%; width: 12%; top: 0; height: 22%; background: rgba(255,255,255,.35); }
.pbox.burnt .cb { background: linear-gradient(180deg, #7A6B5A 0, #5E5246 100%); }
.flame { position: absolute; left: 50%; bottom: 60%; width: 90%; aspect-ratio: 1 / 1.2; transform: translateX(-50%) scale(var(--s, 1)); transform-origin: 50% 100%; transition: transform .25s; pointer-events: none; }
.flame i { position: absolute; left: 50%; bottom: 0; translate: -50% 0; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; animation: flick .45s ease-in-out infinite alternate; }
.flame i:nth-child(1) { width: 100%; height: 100%; background: radial-gradient(circle at 50% 75%, #FFD36E 0, #FF7A3D 55%, rgba(229,72,77,.0) 75%); }
.flame i:nth-child(2) { width: 66%; height: 72%; background: radial-gradient(circle at 50% 80%, #FFF6D0 0, #FFC54D 60%, rgba(255,122,61,0) 80%); animation-duration: .35s; }
.flame i:nth-child(3) { width: 34%; height: 40%; background: radial-gradient(circle at 50% 80%, #fff 0, #FFF1B0 70%, transparent 80%); animation-duration: .28s; }
@keyframes flick { from { transform: scaleY(.92) skewX(-3deg) } to { transform: scaleY(1.06) skewX(3deg) } }
.pbox .hp { position: absolute; left: 10%; right: 10%; bottom: -18px; height: 8px; border-radius: 4px; background: rgba(0,0,0,.3); overflow: hidden; }
.pbox .hp i { display: block; height: 100%; background: var(--fire); transition: width .2s; }
.pbox.out .hp { opacity: 0; }
.steam { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.7); pointer-events: none; animation: steam 1s ease-out forwards; }
@keyframes steam { to { transform: translateY(-60px) scale(2); opacity: 0 } }
.drop { position: absolute; width: 8px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #7FD1FF; pointer-events: none; z-index: 3; }
.nozzle { position: absolute; left: 50%; bottom: 0; width: 46px; height: 34px; translate: -50% 0; border-radius: 10px 10px 0 0; background: #2F7CD6; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2); }
.nozzle::before { content: ""; position: absolute; left: 16px; top: -12px; width: 14px; height: 14px; border-radius: 4px 4px 0 0; background: #5FB2FF; }
.fire-ui { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; font-weight: 800; color: var(--ink2); }
.fire-ui .left { color: var(--fire); }

/* ===== 비교 ===== */
.cmp { display: grid; grid-template-columns: 1fr 0.8fr 1fr; gap: 8px; margin-top: 14px; }
.zone { min-height: 230px; padding: 10px 8px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 2px var(--line) inset; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: box-shadow .2s, background-color .2s; }
.zone.both { background: #F4F1FF; }
.zone.hot { box-shadow: 0 0 0 3px var(--sun) inset; background: #FFF8EA; }
.zone h4 { margin: 0; font-size: 15px; font-weight: 900; color: var(--c3); text-align: center; line-height: 1.3; }
.zone .mixline { display: flex; align-items: center; gap: 4px; }
.zone .mixline .t { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 8px; background: var(--c3); color: #fff; font-weight: 900; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.zone .mixline .t.q { background: #fff; color: var(--mute); box-shadow: 0 0 0 1.5px var(--mute) inset; }
.zone .mixline .p { font-weight: 900; color: var(--c3); }
.zone .z-ic { width: 54px; height: 54px; }
.zone .drop-in { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; min-height: 48px; }
.cmp-chip { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 2px var(--c2) inset, 0 3px 0 rgba(18,33,59,.15); font-size: 14px; font-weight: 800; color: var(--c3); text-align: center; line-height: 1.3; touch-action: none; cursor: grab; }
.cmp-chip.sel { background: #FFF6E5; box-shadow: 0 0 0 2.5px var(--sun) inset, 0 3px 0 rgba(18,33,59,.15); }
.cmp-chip.placed { background: var(--c3); color: #fff; box-shadow: none; cursor: default; width: 100%; font-size: 13px; min-height: 40px; }
.cmp-chip.miss { animation: shake .4s; }
.hint { margin: 10px 0 0; min-height: 21px; text-align: center; font-size: 14px; font-weight: 800; color: #B86E00; line-height: 1.5; }
.hint:empty { min-height: 0; margin: 0; }
.cmp-sum { margin-top: 14px; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, var(--c3), var(--c2)); color: #fff; font-size: 17px; font-weight: 800; line-height: 1.5; text-align: center; text-wrap: balance; animation: panelin .4s; }
.cmp-sum small { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; opacity: .85; }
@media (max-width: 480px) { .cmp { grid-template-columns: 1fr 1fr; } .zone.both { grid-column: 1 / -1; grid-row: 2; min-height: 120px; } .zone { min-height: 190px; } }

/* ===== 끝 화면 ===== */
.end-cards { display: flex; gap: 14px; justify-content: center; margin-top: 18px; }
.end-cards .mini { --m: min(84px, 22vw); }
.save-line { margin-top: 14px; display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--paper); font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--ink2); }
.save-line i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--mute); }
.save-line.ok i { background: var(--ok); } .save-line.warn i { background: var(--sun); } .save-line.busy i { background: var(--c1); animation: blink .6s steps(2) infinite; }
.next-ep { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, #7A1620, #E5484D); color: #fff; }
.next-ep .o { width: 56px; height: 62px; border-radius: 10px; background: #fff; color: #7A1620; font-size: 30px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.next-ep b { display: block; font-size: 17px; font-weight: 900; } .next-ep span { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; opacity: .9; }
.series-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.series-row a, .series-row span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1.5px var(--line) inset; color: var(--mute); font-size: 12px; font-weight: 800; text-decoration: none; text-align: center; line-height: 1.25; }
.series-row .cur { background: var(--c3); color: #fff; box-shadow: none; }
.series-row a { color: var(--c3); box-shadow: 0 0 0 2px var(--c2) inset; }

/* 진단 (?diag) */
#diag { position: absolute; left: 8px; top: 120px; z-index: 70; pointer-events: none; max-width: min(520px, calc(100% - 16px)); max-height: 45%; opacity: .92; overflow: auto; padding: 10px; border-radius: 8px; background: rgba(0,0,0,.82); color: #9EF5C4; font: 12px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }

/* 좁은 화면: 할 일을 둘째 줄 전체 폭으로 */
@media (max-width: 640px) {
  #hud { grid-template-columns: 1fr auto; grid-template-areas: "ep btns" "goal goal"; row-gap: 8px; }
  .hud-ep { grid-area: ep; justify-self: start; } .hud-btns { grid-area: btns; } .hud-goal { grid-area: goal; justify-self: stretch; max-width: none; }
}

/* ===== 원소 정령 스프라이트 (Gilbert exports/chemiz-spirits, 48px 4칸 숨쉬기 · 96px 15칸 튀어나오기) =====
   정수 배만: 카드 폭 300px 이상 3배 144px, 그 아래 2배 96px. 그림은 CSS url() 로만(미리보기가 data: 로 바꿔 줌) */
.ccard .cc-face { container-type: inline-size; }
.cz .art .sp { position: absolute; right: 0; bottom: -4px; width: 96px; height: 96px; z-index: 1;
  background: radial-gradient(closest-side at 50% 52%, rgba(255,255,255,.55), rgba(255,255,255,.18) 65%, rgba(255,255,255,0)); }
@container (min-width: 300px) { .cz .art .sp { width: 144px; height: 144px; bottom: -6px; } }
.cz .art .sp::after { content: ""; position: absolute; inset: 0; background: var(--img) no-repeat 0 0 / 400% 100%; image-rendering: pixelated; animation: sp-breathe .8s steps(4) infinite; }
@keyframes sp-breathe { to { background-position: 133.333% 0 } }
.cz .sp.H { --img: url(spirits/spirit-H.png); } .cz .sp.O { --img: url(spirits/spirit-O.png); } .cz .sp.C { --img: url(spirits/spirit-C.png); }
.cz .sp.N { --img: url(spirits/spirit-N.png); } .cz .sp.He { --img: url(spirits/spirit-He.png); }
.cz .art .sp.lock { --img: url(spirits/spirit-lock.png); background: none; }
.cz .sp.popping::after { visibility: hidden; }
.cz .sp .pop { position: absolute; left: -50%; top: -87.5%; width: 200%; height: 200%; background-repeat: no-repeat; background-size: 1500% 100%; image-rendering: pixelated; animation: sp-pop 1.25s steps(15) 1 forwards; }
@keyframes sp-pop { to { background-position: 107.143% 0 } }
.cz .pop.H { background-image: url(spirits/pop-H.png); } .cz .pop.O { background-image: url(spirits/pop-O.png); } .cz .pop.C { background-image: url(spirits/pop-C.png); }
.cz .pop.N { background-image: url(spirits/pop-N.png); } .cz .pop.He { background-image: url(spirits/pop-He.png); }
@media (prefers-reduced-motion: reduce) { .cz .art .sp::after, .cz .sp .pop { animation: none; } }

/* 카드 아래가 비지 않게: 특징 줄 뒤에 남는 높이는 그림 창이 늘어나 채운다 (충쌤 11-12 "카드 아래 여백이 너무 많은데?") */
.ccard .cz .card .in > .art { flex: 1 0 auto; height: auto; min-height: 13.4em; }
.ccard .cz .card .in > .fo { margin-top: .4em; }

/* ===== 3D 판 (2026-11-12 다시 만들기): 게임 대화창 · 키 안내 줄 · 지도 위 표시 ===== */
:root { --kb: 48px; }
body { background: #BFE6FF; }
#pad { padding-bottom: calc(14px + var(--kb) + var(--safe-b)); }
.sheet { padding-bottom: calc(12px + var(--kb) + var(--safe-b)); }
.reveal { padding-bottom: calc(16px + var(--kb) + var(--safe-b)); }
.dex-body { padding-bottom: calc(16px + var(--kb) + var(--safe-b)); }
.dex { padding-bottom: calc(var(--kb) + var(--safe-b)); }
.detail { padding-bottom: calc(16px + var(--kb) + var(--safe-b)); }
.title { padding-bottom: calc(24px + var(--kb) + var(--safe-b)); }

/* 대화창: Kenney Fantasy UI 테두리(panel-border-007), 초상, 이름표, 한 글자씩, ▼ 깜빡임 */
#talk { bottom: calc(12px + var(--kb) + var(--safe-b)); width: min(760px, calc(100% - 20px)); min-height: 128px; gap: 16px; padding: 18px 54px 18px 18px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(20,44,86,.97), rgba(12,28,58,.97)); box-shadow: 0 10px 0 rgba(5,15,32,.35);
  border: 16px solid transparent; border-image: url(ui/panel-border-007.png) 16 / 16px / 0 stretch; color: #fff; overflow: visible; }
.talk-face { width: 92px; height: 92px; border-radius: 6px; background: radial-gradient(circle at 50% 35%, #7FC4FF, #2F7CD6 70%); box-shadow: 0 0 0 3px #FFD36E, 0 0 0 6px rgba(255,255,255,.18); }
.talk-face img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; display: block; }
.talk-face .pix { width: 100%; height: 100%; background-repeat: no-repeat; background-size: 400% 100%; background-position: 0 0; image-rendering: pixelated; animation: sp-breathe .8s steps(4) infinite; }
.talk-face .pix.H { background-image: url(spirits/spirit-H.png); } .talk-face .pix.O { background-image: url(spirits/spirit-O.png); } .talk-face .pix.lock { background-image: url(spirits/spirit-lock.png); }
.talk-face.sys { background: radial-gradient(circle at 50% 40%, #FF8A8A, #E5484D 70%); display: flex; align-items: center; justify-content: center; }
.talk-face.sys b { font-size: 44px; font-weight: 900; color: #fff; line-height: 1; }
.talk-name { position: absolute; left: 118px; top: -30px; height: 30px; padding: 0 14px; border-radius: 4px 4px 0 0; background: #FFD36E; color: #3A2400; font-size: 15px; font-weight: 900; letter-spacing: .02em; box-shadow: 0 -3px 0 rgba(255,255,255,.35) inset; display: flex; align-items: center; }
.talk-text { margin: 0; color: #fff; font-size: 18px; line-height: 1.55; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.talk-next { right: 12px; bottom: 8px; color: #FFD36E; animation: nextblink .9s steps(2) infinite; }
@keyframes nextblink { 50% { opacity: .15 } }
@media (max-width: 520px) { .talk-face { width: 64px; height: 64px; } .talk-name { left: 96px; } .talk-text { font-size: 16px; } #talk { padding-right: 40px; } }

/* 키 안내 줄: 늘 화면 아래 가운데, 같은 모양 */
#keys { position: absolute; left: 50%; bottom: calc(8px + var(--safe-b)); transform: translateX(-50%); z-index: 40; height: 36px; max-width: calc(100% - 16px); display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 8px; background: rgba(10,24,50,.86); color: #fff; font-size: 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 0 rgba(0,0,0,.2); pointer-events: none; overflow: hidden; }
#keys .it { display: flex; align-items: center; gap: 6px; }
#keys .it.dim { opacity: .4; }
#keys .kc { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 5px; background: #fff; color: #12213B; font-size: 12px; font-weight: 900; box-shadow: 0 2px 0 #9AA8B8; }
#keys .sep { width: 1px; height: 18px; background: rgba(255,255,255,.25); }
#keys .wait { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #FFD36E; border-right-color: transparent; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
@media (max-width: 400px) { #keys { font-size: 13px; gap: 10px; padding: 0 10px; } }

/* 지도 위: 조사 말풍선, 목표 화살표 */
#wprompt { position: absolute; left: 0; top: 0; z-index: 3; height: 34px; padding: 0 14px; border-radius: 8px; background: #FFB547; color: #5A3500; font-size: 15px; font-weight: 900; display: flex; align-items: center; box-shadow: 0 4px 0 #C7801A; pointer-events: none; white-space: nowrap; }
#wprompt::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #FFB547; }
#wmark { position: absolute; left: 0; top: 0; z-index: 3; width: 34px; height: 34px; pointer-events: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
#wmark svg { width: 100%; height: 100%; fill: #FFB547; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.ld-txt { color: rgba(255,255,255,.9); font-size: 14px; font-weight: 700; }
.title .stage .mascot img { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #7FC4FF, #2F7CD6 70%); box-shadow: 0 0 0 4px #fff, 0 8px 0 rgba(0,0,0,.18); }
.spot i { display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: 12px; font-weight: 900; }

@media (pointer: coarse) { .act small { display: none; } }

/* 초상은 CSS 배경으로 (스튜디오 미리보기가 CSS url() 을 data: 로 바꿔 준다) */
.ph { width: 100%; height: 100%; background-size: cover; background-position: center; }
.ph.kemi { background-image: url(ui/face-kemi.png); } .ph.kid { background-image: url(ui/face-kid.png); } .ph.doc { background-image: url(ui/face-doc.png); }
.title .stage .mascot .ph { border-radius: 50%; background-color: #4A9BEA; box-shadow: 0 0 0 4px #fff, 0 8px 0 rgba(0,0,0,.18); }

/* ===== 풍선 실험실 (Gilbert 설계) ===== */
.lab-img { background-repeat: no-repeat; background-position: center bottom; background-size: contain; }
.lab-img.table { background-image: url(lab/table.png); } .lab-img.tank { background-image: url(lab/tank-b.png); } .lab-img.jerry { background-image: url(lab/jerry-a.png); }
.lab-img.beam-img { background-image: url(lab/beam.png); background-size: 100% 100%; } .lab-img.bowl-img { background-image: url(lab/bowl.png); } .lab-img.pillar-img { background-image: url(lab/pillar.png); background-size: 100% 100%; }
.blk { display: inline-block; width: 12px; height: 12px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.blk.air { background-image: url(lab/blk-air.png); } .blk.dev { background-image: url(lab/blk-dev.png); } .blk.breath { background-image: url(lab/blk-breath.png); } .blk.can { background-image: url(lab/blk-can.png); } .blk.rubber { background-image: url(lab/blk-rubber.png); }
.blk.big { width: 22px; height: 22px; }
.lab { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; background: #F3F8FF; padding-bottom: calc(var(--kb) + var(--safe-b)); animation: fadein .25s; }
.lab-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 8px; background: #fff; box-shadow: 0 1px 0 var(--line); }
.lab-head .kicker { margin: 0; }
.lab-head b { flex: 1; font-size: 17px; font-weight: 900; color: var(--c3); line-height: 1.3; }
.lab-steps { display: flex; gap: 4px; }
.lab-steps i { width: 22px; height: 22px; border-radius: 6px; background: #E3EAF4; color: var(--mute); font-style: normal; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.lab-steps i.on { background: var(--c2); color: #fff; }
.lab-scene { position: relative; flex: 1 1 56%; min-height: 200px; overflow: hidden; background-color: #EAF4FF; background-image: radial-gradient(rgba(47,124,214,.16) 1.5px, transparent 1.5px); background-size: 16px 16px; }
.lab-ceil, .lab-floor { position: absolute; left: 0; right: 0; height: 3px; background: #9AB4D6; }
.lab-ceil { top: 5%; } .lab-floor { bottom: 7%; background: #B89A72; height: 7%; bottom: 0; }
.lab-ceil span, .lab-floor span { position: absolute; left: 8px; top: 4px; font-size: 11px; font-weight: 800; color: #5B7090; }
.lab-floor span { color: #fff; top: 50%; transform: translateY(-50%); }
.lab-ruler { position: absolute; right: 0; top: 0; bottom: 0; width: 46px; border-left: 2px dashed #B9CBE3; }
.lab-ruler i { position: absolute; left: 4px; font-style: normal; font-size: 10px; font-weight: 800; color: #5B7090; transform: translateY(-50%); white-space: nowrap; }
.lab-table { position: absolute; left: 6%; right: 52px; bottom: 7%; height: 22%; background-size: 100% 100%; opacity: .95; }
.lab-src { position: absolute; bottom: 7%; width: 44px; height: 60px; z-index: 1; }
.lab-src .tag { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 5px; color: #fff; font-style: normal; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.tag.blue, .kn.blue, .knot.blue { background: #2F7CD6; } .tag.grey, .kn.grey, .knot.grey { background: #7A8699; } .kn.white, .knot.white { background: #fff; box-shadow: 0 0 0 1.5px #B9CBE3 inset; } .kn.rub { background: #B97A4A; }
.bal-wrap { position: absolute; top: 24%; width: 84px; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; z-index: 2; }
.bal-wrap .ring { position: absolute; top: 0; left: 50%; width: 76px; height: 86px; margin-left: -38px; border-radius: 50% 50% 46% 46%; border: 2.5px dashed #6B88B0; opacity: 0; transition: opacity .3s, border-color .2s; }
.bal-wrap.show-ring .ring { opacity: 1; }
.bal-wrap.fit .ring { border-color: var(--ok); border-style: solid; box-shadow: 0 0 0 4px rgba(34,168,107,.2); }
.bal-wrap.over .ring { border-color: var(--danger); }
.bal-wrap.over .body { box-shadow: inset -8px -10px 0 rgba(0,0,0,.08), 0 0 0 3px rgba(229,72,77,.7); animation: blink .4s steps(2) infinite; }
.bal { width: 76px; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bal .body { width: calc(76px * var(--s)); height: calc(86px * var(--s)); min-width: 10px; min-height: 12px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 35% 30%, #FFE3DC 0, #FF9F8A 55%, #E77C66 100%); box-shadow: inset -8px -10px 0 rgba(0,0,0,.08); transition: width .05s, height .05s; }
.bal .knot { width: 16px; height: 13px; margin-top: -2px; border-radius: 3px 3px 6px 6px; color: #fff; font-size: 9px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.bal-wrap .string { width: 2px; height: 40px; background: #8A96AA; }
.bal-wrap .blabel { margin-top: 2px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,.9); font-size: 11px; font-weight: 900; color: var(--c3); white-space: nowrap; }
.bal-wrap.filling .ring { border-color: var(--c2); }
.bal-wrap.clue { animation: cluepulse 1s ease-in-out 3; }
@keyframes cluepulse { 50% { filter: drop-shadow(0 0 10px #FFD36E) } }
.bghost { position: absolute; top: 24%; width: 76px; height: 86px; border-radius: 50% 50% 46% 46%; border: 2.5px dashed #7A8699; background: rgba(255,255,255,.35); transform: translate(-50%, 0); z-index: 1; pointer-events: none; }
.lab-alarm { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); z-index: 3; padding: 8px 12px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 14px; font-weight: 900; white-space: nowrap; animation: blink .8s steps(2) 4; }
.lab-panel { flex: 0 1 auto; max-height: 50%; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 14px; background: #fff; box-shadow: 0 -1px 0 var(--line); }
.lab-say { margin: 0; min-height: 22px; font-size: 15px; font-weight: 800; line-height: 1.45; color: var(--ink); text-wrap: balance; }
.lab-note { margin: 8px 0 0; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--mute); text-wrap: balance; }
.lab-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lab-row .btn { flex: 1 1 140px; min-height: 44px; font-size: 15px; }
.kn { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; flex: none; }
.lab-guess { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.g-col { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1.5px var(--line) inset; }
.g-col.sel { box-shadow: 0 0 0 2.5px var(--sun) inset; }
.g-col b { font-size: 12px; font-weight: 900; color: var(--c3); text-align: center; min-height: 18px; display: flex; align-items: center; justify-content: center; }
.gchip, .hchip, .wchip { min-height: 40px; padding: 6px 8px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1.5px var(--c2) inset; font-size: 13px; font-weight: 800; color: var(--c3); display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25; }
.gchip.on, .hchip.on { background: var(--c2); color: #fff; }
.lab-fast { margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--ink2); }
.lab-fast .lab-row { margin-top: 6px; }
.lab-res { display: grid; gap: 6px; margin-top: 8px; }
.r-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; min-height: 34px; padding: 4px 8px; border-radius: 8px; background: var(--paper); font-size: 13px; font-weight: 800; }
.r-row b { color: var(--c3); } .r-row .mine { color: var(--mute); }
.r-row em { font-style: normal; padding: 3px 6px; border-radius: 5px; font-size: 12px; }
.r-row em.ok { background: #FFF2C6; color: #8A5A00; } .r-row em.diff { background: #EEF2F7; color: var(--ink2); }
.scale { position: relative; height: 150px; margin-top: 8px; }
.scale .pillar { position: absolute; left: 50%; bottom: 18px; width: 16px; height: 86px; margin-left: -8px; }
.beam-wrap { position: absolute; left: 50%; top: 22px; width: min(300px, 86%); height: 14px; transform-origin: 50% 50%; translate: -50% 0; transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.beam-wrap .beam { position: absolute; inset: 0; }
.pan { position: absolute; top: 6px; width: 96px; transform-origin: 50% 0; transition: transform .6s cubic-bezier(.3,1.4,.5,1); display: flex; flex-direction: column-reverse; align-items: center; }
.pan.L { left: -34px; } .pan.R { right: -34px; }
.pan .bowl { width: 92px; height: 34px; }
.pan .pile { width: 84px; display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: 1px; margin-bottom: -10px; position: relative; z-index: 1; }
.pan-lb { position: absolute; bottom: 0; font-size: 12px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.pan-lb.L { left: 0; } .pan-lb.R { right: 0; text-align: right; }
.lab-gas .btn { flex: 1 1 90px; font-size: 13px; padding: 0 8px; }
.lab-gas .btn.on { box-shadow: inset 0 0 0 2.5px var(--sun); background: #FFF8EA; }
.lab-why { margin-top: 10px; display: grid; gap: 8px; }
.lab-q { margin: 0; font-size: 14px; font-weight: 900; color: var(--c3); }
.why-row { padding: 8px; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1.5px var(--line) inset; }
.why-row.cur { box-shadow: 0 0 0 2.5px var(--sun) inset; }
.why-row > b { display: flex; align-items: center; font-size: 13px; font-weight: 900; color: var(--c3); }
.why-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.why-row.done .why-chips { display: none; }
.why-row .got { display: block; font-style: normal; font-size: 13px; font-weight: 800; color: var(--ok); }
.wchip { font-size: 12px; }
.wchip.miss, .zone-s.miss { animation: shake .4s; }
.strip { display: grid; grid-template-columns: 1fr .8fr 1fr; gap: 6px; margin-top: 10px; }
.zone-s { min-height: 92px; padding: 6px; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1.5px var(--line) inset; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.zone-s.air { background: #E8F4FF; }
.zone-s.cursor { box-shadow: 0 0 0 2.5px var(--sun) inset; }
.zone-s > span { font-size: 12px; font-weight: 900; color: var(--c3); text-align: center; min-height: 18px; display: flex; align-items: center; }
.zone-s .slot { display: flex; flex-direction: column; gap: 4px; align-items: center; width: 100%; }
.zone-s .placed { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 30px; padding: 2px 4px; border-radius: 6px; background: var(--c3); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.hchip { flex: 1 1 90px; }
.lab-where .btn { flex: 1 1 80px; }
@media (min-width: 700px) { .lab-panel { max-height: 46%; padding: 14px 24px 16px; } .lab-panel > * { max-width: 760px; margin-left: auto; margin-right: auto; } .blk { width: 15px; height: 15px; } .pan .pile { width: 100px; } .scale { height: 170px; } }

.lab.big .lab-scene { flex: 0 0 22%; min-height: 96px; }
.lab.big .lab-panel { max-height: none; flex: 1 1 auto; }
.lab.big .scale { height: 120px; }
.lab.big .wchip { min-height: 34px; }
/* 작은 화면: 조작판은 내용만큼, 장면은 남는 높이 */
.lab-scene { flex: 1 1 auto; min-height: 140px; }
.lab-panel { flex: 0 0 auto; max-height: none; overflow: visible; }
@media (max-width: 520px) {
  .lab-head { padding: calc(8px + var(--safe-t)) 10px 6px; gap: 6px; }
  .lab-head .kicker { display: none; }
  .lab-head b { font-size: 15px; }
  .lab-steps i { width: 18px; height: 18px; font-size: 10px; }
  .lab-panel { padding: 8px 10px 10px; }
  .lab-say { font-size: 14px; }
  .lab-note { font-size: 12px; margin-top: 6px; }
  .lab-row { margin-top: 8px; gap: 6px; }
  .lab-row .btn { min-height: 40px; font-size: 14px; flex-basis: 100px; }
  .gchip, .hchip, .wchip { min-height: 36px; font-size: 12px; padding: 4px 6px; }
  .lab-guess { gap: 6px; margin-top: 8px; } .g-col { padding: 6px; gap: 4px; }
  .scale { height: 128px; } .beam-wrap { top: 18px; } .scale .pillar { height: 76px; bottom: 16px; }
  .pan .bowl { width: 74px; height: 28px; } .pan { width: 80px; } .pan.L { left: -26px; } .pan.R { right: -26px; } .pan .pile { width: 66px; }
  .blk { width: 10px; height: 10px; }
  .lab-gas .btn { flex: 1 1 46%; }
  .r-row { font-size: 12px; gap: 6px; padding: 3px 6px; }
  .lab-res { gap: 4px; }
  .zone-s { min-height: 76px; }
  .bal-wrap .string { height: 26px; }
  .lab.big .lab-scene { flex: 0 0 60px; min-height: 60px; }
  .lab.big .scale { height: 110px; }
  .why-chips { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 520px) { .why-row:not(.cur) .why-chips { display: none; } .why-row > b { cursor: pointer; min-height: 22px; } .why-row { padding: 6px 8px; } }
.lab-alarm { top: auto; bottom: 12%; }

/* ===================== 게임 창 (11-12 충쌤 "게임 같지가 않네, 무슨 홈페이지인줄") =====================
   흰 카드·얇은 테두리 대신: 남색 창 + Kenney 판타지 UI 테두리, 금색 리본 제목, 두께 있는 게임 버튼 */
:root { --gold1: #FFE08A; --gold2: #FFB733; --gold3: #B86A00; --navy1: #23477F; --navy2: #142C55; --navy3: #0A1A36; }
.sheet { background: radial-gradient(circle at 50% 40%, rgba(10,26,54,.45), rgba(5,12,28,.82)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.panel { border-radius: 8px; padding: 30px 18px 18px; background: linear-gradient(180deg, var(--navy1), var(--navy2) 60%, var(--navy3)); color: #fff;
  border: 16px solid transparent; border-image: url(ui/panel-border-007.png) 16 / 16px / 0 stretch; box-shadow: 0 0 0 4px rgba(255,211,110,.0), 0 14px 0 rgba(0,0,0,.35), 0 20px 40px rgba(0,0,0,.4); overflow: visible; margin-top: 26px; }
.panel .kicker { position: absolute; left: 50%; top: -38px; transform: translateX(-50%); height: 34px; padding: 0 22px; margin: 0; border-radius: 4px; background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #4A2A00; font-size: 14px; font-weight: 900; letter-spacing: .04em; white-space: nowrap; box-shadow: 0 4px 0 var(--gold3), 0 0 0 3px #fff inset; }
.panel .kicker::before, .panel .kicker::after { content: ""; position: absolute; top: 8px; width: 16px; height: 26px; background: var(--gold3); z-index: -1; }
.panel .kicker::before { left: -10px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); } .panel .kicker::after { right: -10px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.panel h2 { color: #FFE08A; text-align: center; font-size: 21px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.panel .lead { color: rgba(255,255,255,.88); text-align: center; }
.panel .note { background: rgba(0,0,0,.28); color: rgba(255,255,255,.9); box-shadow: 0 0 0 1.5px rgba(255,255,255,.12) inset; border-radius: 6px; }
.panel .row { justify-content: center; }
.fire-ui { color: rgba(255,255,255,.85); } .fire-ui .left { color: #FFB08A; }
.meter { color: rgba(255,255,255,.88); } .meter .bar { background: rgba(0,0,0,.35); }
.panel .hint { color: #FFD36E; }
.pt-head, .panel .pt-count span { color: rgba(255,255,255,.7); } .panel .pt-count b { color: #FFE08A; }
.panel .hand { background: rgba(0,0,0,.25); } .panel .hand > p { color: rgba(255,255,255,.88); }
.panel .zone { background: #F3F7FD; } .panel .zone.both { background: #ECE8FF; }
.panel .cell:not(.got) { background: #E9EEF6; }
.close-x { color: rgba(255,255,255,.75); }

/* 게임 버튼: 두께(아래 그림자)·윗면 빛·눌림. 알약 아님 */
.btn, .gbtn { position: relative; min-height: 50px; padding: 0 22px; border-radius: 8px; font-size: 16px; font-weight: 900; letter-spacing: -.01em; text-shadow: 0 1px 0 rgba(0,0,0,.2); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn.primary, .gbtn.gold { background: linear-gradient(180deg, var(--gold1) 0, var(--gold2) 55%, #F29A1C 100%); color: #4A2A00; text-shadow: 0 1px 0 rgba(255,255,255,.45); box-shadow: 0 5px 0 var(--gold3), 0 0 0 2px rgba(255,255,255,.55) inset, 0 8px 14px rgba(0,0,0,.25); }
.btn.primary:hover, .gbtn.gold:hover { filter: brightness(1.06); }
.btn.primary:active, .gbtn.gold:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold3), 0 0 0 2px rgba(255,255,255,.55) inset; }
.btn.line, .btn.light, .gbtn.blue { background: linear-gradient(180deg, #4F8FE0 0, #2F6EC2 100%); color: #fff; box-shadow: 0 5px 0 #173E78, 0 0 0 2px rgba(255,255,255,.35) inset, 0 8px 14px rgba(0,0,0,.25); }
.btn.line:active, .btn.light:active, .gbtn.blue:active { transform: translateY(4px); box-shadow: 0 1px 0 #173E78, 0 0 0 2px rgba(255,255,255,.35) inset; }
.btn:focus-visible, .gbtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn[disabled], .gbtn[disabled] { filter: grayscale(.8) brightness(.8); opacity: .6; }
.title .btn.ghost { background: rgba(10,26,54,.35); color: #fff; box-shadow: 0 5px 0 rgba(10,26,54,.5), 0 0 0 2px rgba(255,255,255,.6) inset; }

/* 클리어 화면 */
.clear { position: absolute; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior: contain; display: flex; justify-content: center; padding: calc(18px + var(--safe-t)) 14px calc(18px + var(--kb) + var(--safe-b)); background: radial-gradient(circle at 50% 30%, #2F6EC2 0, #142C55 55%, #071230 100%); animation: fadein .3s; }
.clear .rays { position: absolute; left: 50%; top: 22%; width: 200vmax; height: 200vmax; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, rgba(255,224,138,.10) 0 7deg, transparent 7deg 18deg); mask-image: radial-gradient(circle, #000 0, transparent 48%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 48%); opacity: 0; transition: opacity .8s; animation: raysspin 40s linear infinite; pointer-events: none; }
.clear.lit .rays { opacity: 1; }
.cl-in { position: relative; width: min(560px, 100%); margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; }
.cl-ep { display: flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 4px; background: rgba(0,0,0,.3); box-shadow: 0 0 0 2px rgba(255,255,255,.25) inset; font-size: 14px; font-weight: 900; letter-spacing: .06em; }
.cl-title { position: relative; margin-top: 8px; font-size: clamp(40px, 12vw, 64px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; color: var(--gold1); text-shadow: 0 4px 0 var(--gold3), 0 8px 0 rgba(0,0,0,.35), 0 0 30px rgba(255,200,80,.35); -webkit-text-stroke: 2px #6B3A00; paint-order: stroke fill; animation: titlepop .6s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes titlepop { from { transform: scale(.4) rotate(-6deg); opacity: 0 } }
.cl-stars { display: flex; gap: 6px; margin-top: 6px; }
.cl-stars i { font-style: normal; font-size: 34px; line-height: 1; color: var(--gold1); text-shadow: 0 3px 0 var(--gold3), 0 0 14px rgba(255,210,90,.7); }
.cl-stars i:nth-child(2) { font-size: 44px; margin-top: -8px; }
.cl-sub { margin-top: 6px; font-size: 16px; font-weight: 800; color: rgba(255,255,255,.88); }
.cl-reward { position: relative; margin-top: 16px; padding: 22px 18px 18px; width: 100%; border: 14px solid transparent; border-image: url(ui/panel-border-007.png) 16 / 14px / 0 stretch; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.25)); border-radius: 6px; }
.cl-rlb { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); height: 28px; padding: 0 16px; border-radius: 4px; background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #4A2A00; font-size: 13px; font-weight: 900; display: flex; align-items: center; white-space: nowrap; box-shadow: 0 3px 0 var(--gold3); }
.clear .end-cards { margin-top: 0; gap: 16px; }
.clear .end-cards .mini { --m: min(86px, 23vw); filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.save-chip { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; border-radius: 6px; background: rgba(0,0,0,.35); font-size: 13px; font-weight: 800; line-height: 1.35; text-align: left; color: rgba(255,255,255,.92); }
.save-chip i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #9AA8B8; }
.save-chip.ok i { background: #4BE08F; } .save-chip.warn i { background: var(--gold2); } .save-chip.busy i { background: #7FC4FF; animation: blink .6s steps(2) infinite; }
.cl-map { position: relative; width: 100%; margin-top: 22px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cl-path { position: absolute; left: 10%; right: 10%; top: 25px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 10px, transparent 10px 18px); }
.nd { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: rgba(255,255,255,.6); }
.nd-ic { position: relative; width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; background: linear-gradient(180deg, #5A6B88, #3A4866); box-shadow: 0 4px 0 #222C40, 0 0 0 2px rgba(255,255,255,.2) inset; }
.nd.lock .nd-ic::before { content: ""; width: 16px; height: 13px; margin-top: 8px; border-radius: 3px; background: rgba(255,255,255,.55); }
.nd.lock .nd-ic::after { content: ""; position: absolute; top: 12px; width: 10px; height: 10px; border: 3px solid rgba(255,255,255,.55); border-bottom: 0; border-radius: 8px 8px 0 0; }
.nd.done .nd-ic { background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #6B3A00; box-shadow: 0 4px 0 var(--gold3), 0 0 0 2px #fff inset, 0 0 18px rgba(255,210,90,.6); }
.nd.next .nd-ic { background: linear-gradient(180deg, #FF8A7A, #E5484D); color: #fff; box-shadow: 0 4px 0 #7A1620, 0 0 0 2px rgba(255,255,255,.6) inset; animation: ndbob 1.4s ease-in-out infinite; }
@keyframes ndbob { 50% { transform: translateY(-4px) } }
.nd b { font-size: 12px; font-weight: 900; color: #fff; } .nd small { font-size: 11px; font-weight: 800; }
.nd.done small { color: var(--gold1); } .nd.next small { color: #FFB0A6; }
.nd-tag { position: absolute; top: -12px; right: 4px; padding: 2px 6px; border-radius: 4px; background: #fff; color: #E5484D; font-style: normal; font-size: 10px; font-weight: 900; }
.cl-clue { margin: 14px 0 0; font-size: 13px; font-weight: 700; line-height: 1.6; color: rgba(255,255,255,.75); text-wrap: balance; }
.cl-clue b { color: #FFB0A6; margin-right: 4px; }
.cl-btns { display: flex; gap: 12px; width: 100%; margin-top: 18px; }
.cl-btns .gbtn { flex: 1; }

/* 실험실도 게임 판으로 */
.lab { background: #0E2245; }
.lab-head { background: linear-gradient(180deg, var(--navy1), var(--navy2)); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.lab-head .kicker { background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #4A2A00; border-radius: 4px; box-shadow: 0 2px 0 var(--gold3); }
.lab-head b { color: #FFE08A; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.lab-steps i { background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); }
.lab-steps i.on { background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #4A2A00; box-shadow: 0 2px 0 var(--gold3); }
.lab-panel { background: linear-gradient(180deg, var(--navy1), var(--navy2)); box-shadow: 0 -3px 0 rgba(0,0,0,.25); border-top: 3px solid #FFD36E; }
.lab-say { color: #fff; } .lab-note { color: rgba(255,255,255,.7); } .lab-q { color: #FFE08A; } .lab-fast { color: rgba(255,255,255,.85); }
.pan-lb { color: rgba(255,255,255,.85); } .pan-lb b { color: #FFE08A; }
.g-col, .why-row, .zone-s, .r-row { background: rgba(0,0,0,.25); box-shadow: 0 0 0 1.5px rgba(255,255,255,.14) inset; }
.g-col b, .why-row > b, .zone-s > span, .r-row b { color: #fff; } .r-row .mine { color: rgba(255,255,255,.6); } .r-row span { color: rgba(255,255,255,.9); }
.zone-s.air { background: rgba(127,196,255,.18); }
.g-col.sel, .why-row.cur, .zone-s.cursor { box-shadow: 0 0 0 2.5px #FFD36E inset; }
.gchip, .hchip, .wchip { background: linear-gradient(180deg, #fff, #E6EEF9); color: #142C55; box-shadow: 0 3px 0 #8FA4C4; border-radius: 6px; }
.gchip:active, .hchip:active, .wchip:active { transform: translateY(2px); box-shadow: 0 1px 0 #8FA4C4; }
.gchip.on, .hchip.on { background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #4A2A00; box-shadow: 0 3px 0 var(--gold3); }
.why-row .got { color: #6FF0A8; }
.lab-gas .btn.on { box-shadow: 0 5px 0 #173E78, 0 0 0 3px #FFD36E inset; background: linear-gradient(180deg, #5FA0F0, #3577CC); }
@media (max-width: 720px) { .title .row { flex-direction: column; } .title .row .btn { width: 100%; min-width: 0; flex: none; } }
@media (hover: none) { .mtile:hover .mini { transform: none; } }
@media (max-height: 760px) {
  .clear { padding-top: calc(10px + var(--safe-t)); }
  .cl-ep { height: 26px; font-size: 12px; }
  .cl-title { font-size: clamp(34px, 10vw, 48px); margin-top: 4px; }
  .cl-stars i { font-size: 24px; } .cl-stars i:nth-child(2) { font-size: 30px; margin-top: -4px; }
  .cl-sub { display: none; }
  .cl-reward { margin-top: 20px; padding: 16px 10px 10px; }
  .clear .end-cards .mini { --m: min(66px, 19vw); }
  .save-chip { margin-top: 8px; font-size: 12px; min-height: 28px; padding: 4px 10px; }
  .cl-map { margin-top: 14px; } .nd-ic { width: 40px; height: 40px; font-size: 19px; } .cl-path { top: 20px; }
  .nd small { display: none; }
  .cl-clue { margin-top: 8px; font-size: 12px; line-height: 1.45; }
  .cl-btns { margin-top: 12px; } .cl-btns .gbtn { min-height: 46px; }
}
.dex { z-index: 6; }
@media (max-height: 760px) { .pt-fullwrap { display: none; } .pt-countrow > span { display: none; } }

/* ===================== 퍼즐 2판 (Gilbert 설계, 에셋: src/p2) ===================== */
.lab-img.p2-shelf { background-image: url(p2/shelf.png); background-size: 100% 100%; } .lab-img.p2-ladder { background-image: url(p2/ladder.png); background-size: 100% 100%; }
.lab-img.p2-basket { background-image: url(p2/basket.png); } .lab-img.p2-toolbox { background-image: url(p2/toolbox.png); } .lab-img.p2-key { background-image: url(p2/key.png); }
.lab-img.p2-box { background-image: url(p2/box.png); } .lab-img.p2-box-large { background-image: url(p2/box-large.png); } .lab-img.p2-box-open { background-image: url(p2/box-open.png); }
.lab-img.p2-window { background-image: url(p2/window.png); background-size: 100% 100%; } .lab-img.p2-hydrant { background-image: url(p2/hydrant.png); } .lab-img.p2-tower { background-image: url(p2/tower.png); }
.balimg { display: block; width: 100%; aspect-ratio: 1 / 1.05; background-size: contain; background-repeat: no-repeat; background-position: center bottom; }
.balimg.white { background-image: url(p2/bal-white.png); } .balimg.blue { background-image: url(p2/bal-blue.png); } .balimg.grey { background-image: url(p2/bal-grey.png); }
.pz-scene { position: relative; overflow: hidden; background: linear-gradient(180deg, #E9DCC6 0, #E2D2B6 100%); background-image: linear-gradient(90deg, rgba(120,80,40,.07) 1px, transparent 1px), linear-gradient(180deg, #EADCC4, #E0CFB0); background-size: 48px 100%, 100% 100%; }
.pz-ceil { position: absolute; left: 0; right: 0; top: 0; height: 9%; background: linear-gradient(180deg, #6B4A2E, #8A6340); box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.pz-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 10%; background: linear-gradient(180deg, #A7835A, #8E6B45); box-shadow: 0 -3px 0 rgba(0,0,0,.15) inset; }
.pz-ruler { position: absolute; right: 0; top: 0; bottom: 0; width: 50px; border-left: 2px dashed rgba(90,60,30,.35); }
.pz-ruler i { position: absolute; left: 4px; transform: translateY(-50%); font-style: normal; font-size: 10px; font-weight: 900; color: #5A3A20; white-space: nowrap; background: rgba(255,255,255,.7); padding: 1px 4px; border-radius: 3px; }
.pz-shelf { position: absolute; right: 54px; width: 26%; height: 7%; }
.pz-shelf.s1 { top: 47.8%; } .pz-shelf.s2 { top: 22.4%; }
.pz-ladder { position: absolute; right: calc(54px + 26% + 4px); bottom: 10%; width: 30px; height: 60%; opacity: .55; }
.pz-rack { position: absolute; left: 2%; top: 9%; width: 30%; height: 50%; }
.rack-pole { position: absolute; left: 2px; top: 0; width: 12px; height: 100%; }
.rack-beam { position: absolute; left: 0; top: 4px; width: 100%; height: 12px; }
.rack-bal { position: absolute; top: 18px; left: calc(14px + var(--i) * 30%); width: 30%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: 8px; transition: transform .15s, box-shadow .15s; }
.rack-bal .balimg { width: 82%; }
.rack-bal em { font-style: normal; font-size: 10px; font-weight: 900; color: #3A2410; background: rgba(255,255,255,.85); padding: 1px 4px; border-radius: 4px; white-space: nowrap; }
.rack-bal.sel { box-shadow: 0 0 0 3px #FFD36E; background: rgba(255,211,110,.18); transform: translateY(-3px); }
.rack-bal.hint { animation: hintglow 1s ease-in-out infinite; }
@keyframes hintglow { 50% { box-shadow: 0 0 0 4px #FFD36E, 0 0 18px #FFD36E; } }
.pz-basket { position: absolute; left: 50%; top: 0; width: 96px; display: flex; flex-direction: column; align-items: center; will-change: transform; z-index: 2; }
.bk-bals { display: flex; align-items: flex-end; justify-content: center; gap: 0; height: 92px; }
.hook-bal { position: relative; width: 44px; display: flex; flex-direction: column; align-items: center; }
.hook-bal .balimg { width: 44px; }
.hook-bal::after { content: ""; width: 2px; height: 26px; background: #6B5A44; }
.hook-bal.fixed { opacity: .95; }
.hook-empty { width: 30px; height: 30px; margin: 0 4px 6px; border-radius: 50%; border: 2px dashed rgba(90,60,30,.5); align-self: flex-end; }
.bk-body { width: 78px; height: 62px; }
.bk-cargo { position: absolute; bottom: 14px; width: 54px; height: 40px; }
.pz-basket.keymode .bk-body { display: none; } .pz-basket.keymode .bk-cargo { position: static; width: 60px; height: 30px; }
.pz-ghost { position: absolute; left: 50%; top: 0; width: 96px; height: 160px; margin-left: -48px; border: 2px dashed rgba(90,60,30,.55); border-radius: 12px; background: rgba(255,255,255,.18); pointer-events: none; }
.pz-note { position: absolute; left: 8px; bottom: calc(10% + 8px); width: min(220px, 46%); padding: 6px 8px; border-radius: 6px; background: rgba(255,250,238,.94); box-shadow: 0 3px 0 rgba(90,60,30,.25); font-size: 11px; font-weight: 800; color: #3A2410; z-index: 3; }
.pz-note b { display: block; font-size: 11px; color: #8A5A00; margin-bottom: 2px; }
.pz-note .nt { display: flex; align-items: center; gap: 4px; min-height: 18px; color: rgba(58,36,16,.45); }
.pz-note .nt i { margin-left: auto; font-style: normal; } .pz-note .nt.got { color: #3A2410; } .pz-note .nt.got i { color: #2F7CD6; }
.pz-note .nt.blink { animation: blink .5s steps(2) 8; background: #FFE8A8; }
.pz-goal { margin: 0 0 6px; display: flex; align-items: center; min-height: 26px; font-size: 14px; font-weight: 900; color: #FFE08A; }
.pz.cleared .pz-goal { color: #6FF0A8; }
/* 감지기 */
.pz-safe, .pz-safe2 { position: absolute; top: 9%; bottom: 10%; left: 44%; width: 0; border-left: 3px dashed #E5484D; }
.pz-safe span, .pz-safe2 span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 900; color: #E5484D; white-space: nowrap; background: rgba(255,255,255,.8); padding: 1px 4px; border-radius: 3px; }
.pz-pipe { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pz-tank { position: absolute; left: calc(24% - 26px); bottom: 10%; width: 52px; height: 70px; }
.pz-joint { position: absolute; width: 18px; height: 14px; margin: -7px 0 0 -9px; border-radius: 3px; background: #6B7891; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.pz-joint.blink { animation: blink .5s steps(2) infinite; background: #FFB547; } .pz-joint.fixed { background: #22A86B; }
.pz-lamp { position: absolute; left: calc(24% + 18px); bottom: calc(10% + 66px); width: 14px; height: 14px; border-radius: 50%; background: #7A8699; }
.pz-lamp.on { background: #FF5A5F; box-shadow: 0 0 12px #FF5A5F; animation: blink .5s steps(2) infinite; }
.pz-det { position: absolute; z-index: 3; transform: translate(-50%, -50%); pointer-events: none; }
.pz-det .lens { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #12213B; background-color: rgba(220,240,255,.35); background-image: radial-gradient(rgba(47,124,214,calc(var(--c) * .95)) 2.2px, transparent 2.6px); background-size: calc(18px - var(--c) * 10px) calc(18px - var(--c) * 10px); box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 6px 14px rgba(0,0,0,.25); }
.pz-det .stick { position: absolute; left: 50%; top: 76px; width: 8px; height: 80px; margin-left: -4px; background: linear-gradient(90deg, #3A4866, #5A6B88); border-radius: 0 0 4px 4px; }
.pz-marks i { position: absolute; width: 8px; height: var(--h); margin-left: -4px; transform: translateY(-100%); background: #2F7CD6; border-radius: 2px; opacity: .7; }
.pz-ghostbal { position: absolute; right: 60px; top: 10%; width: 54px; opacity: .8; animation: floaty 2s ease-in-out infinite; }
.pz-meter { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.pz-meter .bar { height: 14px; border-radius: 7px; background: rgba(0,0,0,.35); overflow: hidden; } .pz-meter .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7FC4FF, #2F7CD6); transition: width .15s; }
/* 정리 저울 */
.pz-scale-scene { display: flex; align-items: center; justify-content: center; }
.big-scale { width: min(420px, 92%); height: 200px; margin: 0; }
.blk.rb.flash { animation: blink .4s steps(2) 6; filter: drop-shadow(0 0 4px #FFD36E); }
.ss-b.on { box-shadow: 0 5px 0 #173E78, 0 0 0 3px #FFD36E inset; }
/* 불 끄기 */
.pz-boxes { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: min(380px, 78%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; z-index: 2; }
.fbox { position: relative; aspect-ratio: 1 / .9; border-radius: 8px; }
.fbox .fb-img { position: absolute; inset: 8% 6% 0; background-size: contain; background-position: center bottom; background-repeat: no-repeat; }
.fbox.cur { box-shadow: 0 0 0 3px #FFD36E; background: rgba(255,211,110,.12); }
.fbox.blink { animation: hintglow 1s ease-in-out infinite; }
.fbox .fb-fire, .fbox .fb-smoke, .fbox .fb-steam { position: absolute; left: 50%; pointer-events: none; background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0; }
.fbox .fb-fire { bottom: 25%; width: 90%; height: 90%; transform: translateX(-50%); filter: hue-rotate(-28deg) saturate(1.8) brightness(1.05); }
.fbox .fb-smoke { bottom: 80%; width: 80%; height: 80%; transform: translateX(calc(-50% + var(--wx, 0px))); opacity: 0; }
.fbox .fb-steam { bottom: 30%; width: 90%; height: 90%; transform: translateX(-50%); }
.fbox.s-fire .fb-fire { opacity: 1; } .fbox.s-fire .fb-smoke { opacity: .75; }
.fbox.s-fire .fb-img { filter: brightness(.85) sepia(.3); }
.fbox.s-out .fb-img { filter: brightness(.45) saturate(.4); }
.fbox.steaming .fb-steam { opacity: .9; animation: steamup 1.3s ease-out forwards; }
@keyframes steamup { to { transform: translate(-50%, -40px) scale(1.4); opacity: 0 } }
.fbox .fb-wet { position: absolute; inset: 6%; border-radius: 6px; box-shadow: 0 0 0 3px #4FAAF0 inset; opacity: 0; background-image: url(p2/splash1.png); background-size: 40%; background-repeat: no-repeat; background-position: 90% 10%; }
.fbox.s-wet .fb-wet { opacity: 1; }
.pz-scene[data-f="0"] .fbox.s-fire .fb-fire { background-image: url(p2/fire0.png); } .pz-scene[data-f="1"] .fbox.s-fire .fb-fire { background-image: url(p2/fire1.png); } .pz-scene[data-f="2"] .fbox.s-fire .fb-fire { background-image: url(p2/fire2.png); }
.pz-scene[data-f="3"] .fbox.s-fire .fb-fire { background-image: url(p2/fire3.png); } .pz-scene[data-f="4"] .fbox.s-fire .fb-fire { background-image: url(p2/fire4.png); } .pz-scene[data-f="5"] .fbox.s-fire .fb-fire { background-image: url(p2/fire5.png); }
.pz-scene[data-f="0"] .fbox.s-fire .fb-smoke { background-image: url(p2/smoke0.png); } .pz-scene[data-f="1"] .fbox.s-fire .fb-smoke { background-image: url(p2/smoke1.png); } .pz-scene[data-f="2"] .fbox.s-fire .fb-smoke { background-image: url(p2/smoke2.png); }
.pz-scene[data-f="3"] .fbox.s-fire .fb-smoke { background-image: url(p2/smoke3.png); } .pz-scene[data-f="4"] .fbox.s-fire .fb-smoke { background-image: url(p2/smoke4.png); } .pz-scene[data-f="5"] .fbox.s-fire .fb-smoke { background-image: url(p2/smoke5.png); }
.fbox .fb-steam { background-image: url(p2/steam2.png); }
.pz-win { position: absolute; top: 18%; width: 70px; height: 110px; z-index: 1; } .pz-win.left { left: 3%; } .pz-win.right { right: 3%; }
.pz-wind { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; z-index: 3; }
.pz-wind i { width: 34px; height: 6px; border-radius: 3px; background: rgba(90,110,140,.5); position: relative; animation: windgo 1.2s linear infinite; }
.pz-wind i::after { content: ""; position: absolute; top: -5px; border: 8px solid transparent; }
.pz-wind.r i::after { right: -12px; border-left-color: rgba(90,110,140,.5); } .pz-wind.l i::after { left: -12px; border-right-color: rgba(90,110,140,.5); }
.pz-wind.r i { --dir: 1; } .pz-wind.l i { --dir: -1; }
@keyframes windgo { 0% { transform: translateX(calc(var(--dir) * -10px)); opacity: .3 } 50% { opacity: 1 } 100% { transform: translateX(calc(var(--dir) * 10px)); opacity: .3 } }
.pz-wind.thick i { height: 10px; background: rgba(229,72,77,.75); }
.pz-safe2 { left: 0; right: 0; top: auto; bottom: 26%; width: auto; height: 0; border-left: 0; border-top: 3px dashed #E5484D; }
.pz-hyd { position: absolute; left: 50%; bottom: 10%; width: 48px; height: 58px; margin-left: -24px; z-index: 2; }
.pz-tankg { position: absolute; right: 8px; bottom: 10%; display: flex; align-items: flex-end; gap: 4px; z-index: 2; }
.pz-tankg .lab-img { width: 44px; height: 60px; }
.pz-tankg .pips { display: flex; flex-direction: column-reverse; gap: 3px; }
.pz-tankg .pips i { width: 12px; height: 9px; border-radius: 2px; background: rgba(0,0,0,.2); } .pz-tankg .pips i.on { background: #4FAAF0; box-shadow: 0 0 6px rgba(79,170,240,.7); }
.pz-shot { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; background: url(p2/splash0.png) center / contain no-repeat; z-index: 4; pointer-events: none; }
.cl-stars i.off { color: rgba(255,255,255,.22); text-shadow: none; }
@media (max-width: 520px) {
  .pz-rack { width: 38%; } .rack-bal em { font-size: 9px; } .pz-basket { width: 84px; } .hook-bal, .hook-bal .balimg { width: 36px; } .bk-bals { height: 78px; } .bk-body { width: 64px; height: 52px; }
  .pz-shelf { width: 24%; } .pz-note { width: 52%; font-size: 10px; } .pz-boxes { width: 88%; top: 24%; } .pz-win { width: 46px; height: 76px; }
}

/* 퍼즐 크기: 화면 높이에 맞춰 키운다 */
.pz-basket { width: clamp(84px, 13vh, 150px); }
.hook-bal, .hook-bal .balimg { width: clamp(36px, 6.5vh, 66px); }
.bk-bals { height: clamp(78px, 13vh, 140px); }
.bk-body { width: clamp(64px, 10vh, 120px); height: clamp(52px, 8vh, 96px); }
.pz-ghost { width: clamp(84px, 13vh, 150px); margin-left: calc(clamp(84px, 13vh, 150px) / -2); height: clamp(150px, 24vh, 260px); }
.pz-shelf { transform: translateY(-100%); height: 7%; }
.pz-scale-scene .pan-lb { color: #3A2410; font-size: 14px; } .pz-scale-scene .pan-lb b { color: #B85A00; }
.big-scale { width: min(560px, 94%); height: min(300px, 80%); }
.big-scale .beam-wrap { top: 30%; } .big-scale .pillar { height: 55%; width: 22px; margin-left: -11px; }
.big-scale .pan { width: 140px; } .big-scale .pan .bowl { width: 136px; height: 48px; } .big-scale .pan .pile { width: 120px; } .big-scale .blk { width: 18px; height: 18px; }
.big-scale .pan.L { left: -50px; } .big-scale .pan.R { right: -50px; }
.pz-boxes { top: 20%; bottom: 30%; height: auto; width: min(460px, 70%); grid-template-rows: 1fr 1fr; align-items: end; }
.fbox { aspect-ratio: auto; height: 100%; min-height: 0; }
.pz-hyd { bottom: 11%; }
@media (max-width: 520px) { .big-scale .pan { width: 96px; } .big-scale .pan .bowl { width: 92px; height: 34px; } .big-scale .pan .pile { width: 84px; } .big-scale .blk { width: 12px; height: 12px; } .big-scale .pan.L { left: -30px; } .big-scale .pan.R { right: -30px; } .pz-boxes { width: 86%; } }

.pz-note .nt-head { display: flex; align-items: center; min-height: 22px; padding: 0; font-size: 11px; font-weight: 900; color: #8A5A00; }
.pz-note.new { animation: hintglow .9s ease-in-out 1; }
@media (max-width: 520px) {
  .pz-note { width: auto; max-width: 62%; padding: 4px 8px; }
  .pz-note .nt-head::after { content: " ▸"; } .pz-note.open .nt-head::after { content: " ▾"; }
  .pz-note:not(.open) .nt { display: none; }
  .pz-note.open { z-index: 5; }
}

/* ===== 실험실 uiuxup (2026-11-13): 질문 막대, 글자 16px 이상, 겹침 0, 한 번에 조작 하나 ===== */
.pz-q { flex: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; background: #0A1A36; border-bottom: 3px solid #FFD36E; }
.pz-qtag { flex: none; display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 10px; border-radius: 6px; background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #4A2A00; font-size: 16px; font-weight: 900; box-shadow: 0 2px 0 var(--gold3); }
.pz-qtext { flex: 1; font-size: 19px; font-weight: 900; line-height: 1.35; color: #fff; text-wrap: balance; word-break: keep-all; }
.pz-q.learned { border-bottom-color: #5FE39A; }
.pz-q.learned .pz-qtag { background: linear-gradient(180deg, #7DF0B0, #3CC47E); color: #06331B; box-shadow: 0 2px 0 #1F7A4B; }
.pz-q.learned .pz-qtext { color: #B8FFD6; }
.lab-head b { font-size: 18px; }
.lab-steps i { width: 30px; height: 30px; font-size: 16px; }
.pz-panel .lab-say { font-size: 17px; line-height: 1.45; min-height: 25px; word-break: keep-all; }
.pz-panel .lab-row { margin-top: 12px; margin-bottom: 6px; row-gap: 14px; }
.pz-panel .lab-row .btn { font-size: 17px; min-height: 48px; }
.pz-panel .btn[hidden] { display: flex; visibility: hidden; }
.pz-lvrow { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-bottom: 4px; }
.pz-lv { flex: 1; margin: 0; font-size: 16px; font-weight: 800; color: #FFE08A; line-height: 1.35; }
.pz-lv b { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 8px; margin-right: 8px; border-radius: 5px; background: rgba(255,224,138,.16); color: #FFE08A; font-weight: 900; }
.pz-reset { flex: none; width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(255,255,255,.1); box-shadow: 0 0 0 1.5px rgba(255,255,255,.28) inset; color: #fff; }
.pz-reset svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pz-reset:active { transform: translateY(1px); }
.pz-meter { font-size: 16px; min-height: 30px; margin-bottom: 8px; }
.ss-b .ssn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 5px; background: rgba(0,0,0,.18); font-size: 16px; }
.pz-scale-scene .pan-lb { font-size: 16px; }
/* 장면 안 글자 */
.pz-ruler { width: 62px; }
.pz-ruler i { left: auto; right: 4px; font-size: 16px; padding: 2px 6px; background: rgba(255,255,255,.88); }
.pz-shelf { right: 66px; } .pz-ladder { right: calc(66px + 26% + 4px); } .pz-ghostbal { right: 72px; }
.rack-bal em { font-size: 16px; padding: 2px 6px; }
.pz-note { font-size: 16px; padding: 8px 10px; width: min(300px, 48%); }
.pz-note b, .pz-note .nt-head { font-size: 16px; min-height: 28px; }
.pz-note .nt { min-height: 28px; }
.pz-safe span, .pz-safe2 span { font-size: 16px; padding: 2px 6px; }
.pz-badge { position: absolute; left: 50%; bottom: calc(10% + 8px); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); margin: 0; padding: 6px 12px; border-radius: 8px; background: rgba(10,26,54,.86); color: #fff; font-size: 16px; font-weight: 800; line-height: 1.35; text-align: center; word-break: keep-all; z-index: 4; pointer-events: none; }
@media (max-width: 520px) {
  .pz-q { min-height: 48px; padding: 8px 10px; gap: 8px; }
  .pz-qtext { font-size: 17px; }
  .lab-head b { font-size: 17px; }
  .lab-steps i { width: 26px; height: 26px; font-size: 16px; }
  .pz-panel .lab-say { font-size: 16px; }
  .pz-panel .lab-row .btn { font-size: 16px; min-height: 46px; }
  .ss-row .btn { flex-basis: 96px; padding-left: 4px; padding-right: 4px; }
  .ss-b .kn { display: none; }
  /* 풍선 걸이: 세로로 세워 이름이 한 줄씩 보이게 */
  .pz-rack { width: 32%; height: auto; bottom: auto; }
  .rack-bal { position: relative; top: auto; left: auto; width: 100%; flex-direction: row; justify-content: flex-start; gap: 4px; padding: 2px 4px 2px 16px; margin-top: 4px; }
  .rack-bal:first-of-type { margin-top: 20px; }
  .rack-bal .balimg { width: 34px; flex: none; }
  .rack-bal em { white-space: normal; word-break: keep-all; text-align: left; line-height: 1.2; padding: 2px 4px; }
  .pz-ruler { width: 56px; } .pz-shelf { right: 60px; } .pz-ladder { right: calc(60px + 24% + 4px); }
  .pz-note { max-width: 60%; width: auto; }
  .pz-badge { max-width: calc(100% - 16px); padding: 5px 10px; }
}
.pz-badge.br { left: auto; right: 10px; transform: none; max-width: min(56%, 360px); text-align: left; }
.pz-safe-note { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 16px; font-weight: 800; color: #FFC9A8; line-height: 1.4; word-break: keep-all; }
.pz-safe-note::before { content: "!"; flex: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #E5484D; color: #fff; font-size: 16px; font-weight: 900; }
@media (max-width: 520px) { .pz-badge.br { right: 8px; max-width: 58%; } }
.pz-note .nt.got i { color: #1A5BA8; }
.pz-safe span, .pz-safe2 span { color: #B3191E; background: rgba(255,255,255,.92); }
.pz-safe span { bottom: auto; top: 38%; }
.pz-safe2 span { bottom: auto; top: 6px; }
.pz-scale-scene .pan-lb { color: #2E1C0C; } .pz-scale-scene .pan-lb b { color: #7A3A00; }
/* 알아낸 결과는 풍선 옆 화살표로 */
.rack-bal[data-res]::after { content: attr(data-res); position: absolute; right: 2px; top: 2px; min-width: 26px; height: 24px; padding: 0 4px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: #7A2E10; color: #fff; font-size: 16px; font-weight: 900; line-height: 1; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.rack-bal.up[data-res]::after { background: #1A5BA8; }
.pz-badge { z-index: 2; }
@media (max-width: 520px) {
  .pz-rack { width: 34%; }
  .rack-bal { padding-left: 14px; padding-right: 4px; }
  .rack-bal .balimg { width: 30px; }
  .rack-bal em { letter-spacing: -.02em; }
  .rack-bal[data-res]::after { top: auto; right: auto; left: 26px; bottom: -2px; min-width: 24px; height: 22px; }
  .ss-b .ssn { display: none; }
}
.pz-info { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 16px; font-weight: 700; color: #BFE0FF; line-height: 1.4; word-break: keep-all; }
.pz-info::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #4FAAF0; box-shadow: 0 0 0 3px rgba(79,170,240,.3); }
@media (max-width: 520px) { .rack-bal[data-res]::after { left: 14px; bottom: -4px; } }
.pz .lab-head .kicker { display: none; }
.pz-info, .pz-safe-note { margin-left: auto; margin-right: auto; max-width: 760px; }
/* 카드 설명 줄: 아직 안 겪은 줄은 잠김, 새로 열린 줄은 반짝 */
.cz .ft li.lk { width: auto; height: auto; background-image: none; }
.cz .ft li.lk small { margin-left: auto; font-size: .72em; font-weight: 800; color: #7A8899; white-space: nowrap; }
.cz .ft li.fresh { border-color: #FFC83D; background: #FFF6D8; animation: ftopen .7s cubic-bezier(.2,.9,.3,1.3) both; }
.cz .ft li.fresh + li.fresh { animation-delay: .35s; }
@keyframes ftopen { 0% { transform: scale(.92); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cz .ft li.fresh { animation: none; } }

/* ===== 정리 저울 2판 (11-13): 실험실 천칭 + 같은 크기 유리병 ===== */
.pz-scale-scene { container-type: size; display: flex; align-items: center; justify-content: center; }
.sb-bal { --u: min(.96cqw, 1.1cqh); position: relative; width: calc(100 * var(--u)); height: calc(88 * var(--u)); flex: none; }
.sb-bal > * { position: absolute; }
.sb-base { left: 50%; top: calc(54 * var(--u)); width: calc(28 * var(--u)); height: calc(5 * var(--u)); margin-left: calc(-14 * var(--u)); border-radius: calc(1.4 * var(--u)); background: linear-gradient(180deg, #C48A52, #9A6534); box-shadow: 0 calc(.9 * var(--u)) 0 #5E3A1C, inset 0 calc(.6 * var(--u)) 0 rgba(255,255,255,.25); }
.sb-post { left: 50%; top: calc(22 * var(--u)); width: calc(5 * var(--u)); height: calc(33 * var(--u)); margin-left: calc(-2.5 * var(--u)); border-radius: calc(1.2 * var(--u)) calc(1.2 * var(--u)) 0 0; background: linear-gradient(90deg, #22335A, #3E5A92 40%, #2B3F6C); box-shadow: inset calc(.7 * var(--u)) 0 0 rgba(255,255,255,.12); }
.sb-dial { left: 50%; top: calc(32 * var(--u)); width: calc(18 * var(--u)); height: calc(10 * var(--u)); margin-left: calc(-9 * var(--u)); border-radius: calc(9 * var(--u)) calc(9 * var(--u)) calc(1.2 * var(--u)) calc(1.2 * var(--u)); background: radial-gradient(circle at 50% 100%, #FFFDF4, #FFEFC4); border: calc(.8 * var(--u)) solid #22335A; box-shadow: 0 calc(.7 * var(--u)) 0 rgba(0,0,0,.25); box-sizing: border-box; z-index: 2; }
.sb-dial > i { position: absolute; left: 50%; bottom: calc(.6 * var(--u)); transform-origin: 50% 100%; }
.sb-tk { width: calc(.7 * var(--u)); height: calc(2 * var(--u)); border-radius: calc(.3 * var(--u)); background: #22335A; transform: translateX(-50%) rotate(var(--a)) translateY(calc(-4.6 * var(--u))); }
.sb-tk.mid { height: calc(2.6 * var(--u)); background: #E3A93A; }
.sb-needle { width: calc(1 * var(--u)); height: calc(6.6 * var(--u)); border-radius: calc(.5 * var(--u)); background: linear-gradient(180deg, #FF6B6B, #C42F33); transform: translateX(-50%) rotate(var(--n, 0deg)); transition: transform 1.6s cubic-bezier(.3, 1.25, .5, 1); }
.sb-hub { width: calc(2.4 * var(--u)); height: calc(2.4 * var(--u)); margin-left: calc(-1.2 * var(--u)); bottom: calc(-.6 * var(--u)) !important; border-radius: 50%; background: #22335A; box-shadow: inset 0 0 0 calc(.5 * var(--u)) #E3A93A; }
.sb-beam { left: 50%; top: calc(22 * var(--u)); width: calc(64 * var(--u)); height: 0; margin-left: calc(-32 * var(--u)); transform: rotate(var(--ang, 0deg)); transition: transform 1.6s cubic-bezier(.3, 1.25, .5, 1); z-index: 3; }
.sb-bar { position: absolute; left: calc(-1 * var(--u)); right: calc(-1 * var(--u)); top: calc(-1.8 * var(--u)); height: calc(3.6 * var(--u)); border-radius: calc(1.8 * var(--u)); background: linear-gradient(180deg, #FFE7A0, #E8B04A 55%, #C98A22); box-shadow: 0 calc(.7 * var(--u)) 0 #8A5A10; }
.sb-knob { left: 50%; top: calc(22 * var(--u)); width: calc(5.6 * var(--u)); height: calc(5.6 * var(--u)); margin: calc(-2.8 * var(--u)) 0 0 calc(-2.8 * var(--u)); border-radius: 50%; background: radial-gradient(circle at 38% 32%, #FFF3C4, #E8B04A 55%, #A9741A); box-shadow: 0 0 0 calc(.7 * var(--u)) #22335A, 0 calc(.7 * var(--u)) 0 calc(.7 * var(--u)) rgba(0,0,0,.25); z-index: 4; }
.sb-hang { position: absolute; top: 0; width: calc(30 * var(--u)); height: calc(28 * var(--u)); margin-left: calc(-15 * var(--u)); transform-origin: 50% 0; transform: rotate(calc(-1 * var(--ang, 0deg))); transition: transform 1.6s cubic-bezier(.3, 1.25, .5, 1); }
.sb-hang.L { left: calc(1 * var(--u)); } .sb-hang.R { left: calc(63 * var(--u)); }
.sb-rods::before, .sb-rods::after { content: ""; position: absolute; left: 50%; top: 0; width: calc(1 * var(--u)); height: calc(23 * var(--u)); margin-left: calc(-.5 * var(--u)); border-radius: calc(.5 * var(--u)); background: linear-gradient(90deg, #6B7891, #A9B6CC, #6B7891); transform-origin: 50% 0; }
.sb-rods::before { transform: rotate(38deg); } .sb-rods::after { transform: rotate(-38deg); }
.sb-rods { position: absolute; inset: 0; }
.sb-rods { --hook: 0; }
.sb-hang::before { content: ""; position: absolute; left: 50%; top: calc(-1.4 * var(--u)); width: calc(2.6 * var(--u)); height: calc(2.6 * var(--u)); margin-left: calc(-1.3 * var(--u)); border-radius: 50%; background: #22335A; box-shadow: inset 0 0 0 calc(.6 * var(--u)) #A9B6CC; z-index: 1; }
.sb-slot { position: absolute; left: 50%; top: calc(3.5 * var(--u)); width: calc(14 * var(--u)); height: calc(20 * var(--u)); margin-left: calc(-7 * var(--u)); }
.sb-bowl { position: absolute; left: 0; top: calc(18 * var(--u)); width: 100%; height: calc(9.5 * var(--u)); border-radius: calc(1 * var(--u)) calc(1 * var(--u)) calc(15 * var(--u)) calc(15 * var(--u)) / calc(1 * var(--u)) calc(1 * var(--u)) calc(9 * var(--u)) calc(9 * var(--u)); background: linear-gradient(180deg, #F2F6FB, #C9D5E3 45%, #93A4BB); box-shadow: 0 calc(.9 * var(--u)) 0 #5F6F88, inset 0 calc(1.4 * var(--u)) 0 #FFFFFF; display: flex; align-items: center; justify-content: center; }
.sb-tag { display: flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 6px; background: #22335A; color: #fff; font-size: 16px; font-weight: 900; line-height: 1.2; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.3); margin-top: calc(1 * var(--u)); }
.sb-jar { position: absolute; inset: 0; animation: jarIn .45s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes jarIn { from { transform: translateY(calc(-6 * var(--u))); opacity: 0; } }
.sb-lid { position: absolute; left: 18%; right: 18%; top: 0; height: calc(3.2 * var(--u)); border-radius: calc(.8 * var(--u)) calc(.8 * var(--u)) calc(.3 * var(--u)) calc(.3 * var(--u)); background: linear-gradient(180deg, #3E5A92, #22335A); box-shadow: inset 0 calc(-.8 * var(--u)) 0 #E3A93A; z-index: 1; }
.sb-glass { position: absolute; left: 0; right: 0; top: calc(2.8 * var(--u)); bottom: 0; border-radius: calc(2.4 * var(--u)) calc(2.4 * var(--u)) calc(3 * var(--u)) calc(3 * var(--u)); border: calc(.6 * var(--u)) solid rgba(236,248,255,.95); background: linear-gradient(90deg, rgba(255,255,255,.6) 0 7%, rgba(190,226,255,.32) 16%, rgba(190,226,255,.18) 60%, rgba(255,255,255,.45) 86%, rgba(190,226,255,.35)); box-shadow: inset 0 calc(-1.2 * var(--u)) calc(2 * var(--u)) rgba(70,130,200,.28), 0 calc(.5 * var(--u)) 0 rgba(0,0,0,.12); overflow: hidden; box-sizing: border-box; }
.sb-glass::after { content: ""; position: absolute; left: 12%; top: 10%; width: calc(1 * var(--u)); height: 55%; border-radius: calc(.5 * var(--u)); background: rgba(255,255,255,.75); }
.sb-jar.empty .sb-glass { border-style: dashed; border-color: rgba(90,60,30,.45); background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; }
.sb-jar.empty .sb-lid { opacity: .35; }
.sb-q { font-size: clamp(24px, 7 * var(--u), 44px); font-weight: 900; color: rgba(90,60,30,.55); }
.sb-rub { position: absolute; left: 10%; right: 10%; top: calc(2.4 * var(--u)); height: calc(1.6 * var(--u)); border-radius: calc(.8 * var(--u)); background: linear-gradient(180deg, #E08A52, #B0602C); box-shadow: 0 calc(.4 * var(--u)) 0 #6E3612; z-index: 2; }
.sb-rub.flash { animation: blink .4s steps(2) 6; filter: drop-shadow(0 0 6px #FFD36E); }
/* 분자: 같은 수, 기체마다 크기·색이 다르다 */
.sb-mo { position: absolute; display: flex; align-items: center; transform: translate(-50%, -50%) rotate(var(--r)); animation: molfloat 3.4s ease-in-out infinite; animation-delay: var(--d); }
@keyframes molfloat { 0%, 100% { translate: 0 0; } 33% { translate: calc(.8 * var(--u)) calc(-1 * var(--u)); } 66% { translate: calc(-.7 * var(--u)) calc(.6 * var(--u)); } }
.sb-mo b { --s: calc(2 * var(--u)); width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.85) 0 16%, transparent 34%), var(--c, #8E9BBF); box-shadow: inset 0 calc(-.35 * var(--u)) 0 rgba(0,0,0,.18); }
.sb-mo b + b { margin-left: calc(-.5 * var(--u)); }
.sb-mo.h2 b { --s: calc(1.5 * var(--u)); --c: #4FA8FF; box-shadow: 0 0 calc(.8 * var(--u)) rgba(79,168,255,.8); }
.sb-mo.n2 b { --c: #8E9BBF; }
.sb-mo.o2 b { --c: #F08A8A; }
.sb-mo.co2 b { --c: #F08A8A; --s: calc(1.8 * var(--u)); } .sb-mo.co2 b:nth-child(2) { --c: #4A4F5C; --s: calc(2.2 * var(--u)); }
.sb-mo.heavy b { --s: calc(2.5 * var(--u)); --c: #5E6A80; }
@media (prefers-reduced-motion: reduce) { .sb-mo { animation: none; } }
/* 무게 숫자: 접시 아래 큰 글씨 */
.sb-wlb { top: calc(62 * var(--u)); width: calc(44 * var(--u)); min-width: 140px; padding: calc(.8 * var(--u)) 8px; border-radius: 10px; background: rgba(255,250,238,.92); box-shadow: 0 3px 0 rgba(90,60,30,.25); text-align: center; box-sizing: border-box; }
.sb-wlb.L { left: 0; } .sb-wlb.R { right: 0; }
.sb-wlb > b { display: block; font-size: clamp(30px, 7 * var(--u), 46px); font-weight: 900; line-height: 1.1; color: #2E1C0C; }
.sb-wlb > span { display: block; font-size: clamp(16px, 2.8 * var(--u), 18px); font-weight: 800; line-height: 1.35; color: #3A2410; word-break: keep-all; }
.sb-wlb > span b { color: #7A3A00; }
.sb-bal { --u: min(.96cqw, calc(.98cqh / .92)); height: calc(92 * var(--u)); }
.sb-tag { position: absolute; left: 50%; top: calc(100% + 1.6 * var(--u)); transform: translateX(-50%); margin: 0; }
.sb-wlb { top: calc(67 * var(--u)); }
.sb-wlb .nw { white-space: nowrap; }
@media (max-width: 520px) {
  .sb-bal { --u: min(.96cqw, calc(.98cqh / .96)); height: calc(96 * var(--u)); }
  .sb-hang { width: calc(34 * var(--u)); margin-left: calc(-17 * var(--u)); height: calc(32 * var(--u)); }
  .sb-rods::before, .sb-rods::after { height: calc(27 * var(--u)); }
  .sb-rods::before { transform: rotate(39deg); } .sb-rods::after { transform: rotate(-39deg); }
  .sb-slot { width: calc(17 * var(--u)); height: calc(24 * var(--u)); margin-left: calc(-8.5 * var(--u)); }
  .sb-bowl { top: calc(21 * var(--u)); height: calc(10.5 * var(--u)); }
  .sb-base { width: calc(22 * var(--u)); margin-left: calc(-11 * var(--u)); }
  .sb-wlb { top: calc(72 * var(--u)); width: calc(47 * var(--u)); }
  .sb-mo b { --s: calc(2.7 * var(--u)); }
  .sb-mo.h2 b { --s: calc(2.1 * var(--u)); } .sb-mo.co2 b { --s: calc(2.4 * var(--u)); } .sb-mo.co2 b:nth-child(2) { --s: calc(2.9 * var(--u)); } .sb-mo.heavy b { --s: calc(3.1 * var(--u)); }
}
.pz-panel .btn.line { background: linear-gradient(180deg, #2E6AC0 0, #2560B4 100%); }
.sb-q { color: #6B4A2A; }

/* ===== EP.02 퍼즐 (Gilbert 2026-11-13): 유리컵 덮기 · 불씨 막대 · 물 나누기 ===== */
.lab-img.p3-candle { background-image: url(p3/candle.png); } .lab-img.p3-lever { background-image: url(p3/lever.png); }
.flm { display: block; width: 100%; height: 100%; background: url(p3/fire-strip.png) 0 100% / 600% 100% no-repeat; animation: flk .55s steps(6) infinite; transform-origin: 50% 100%; }
@keyframes flk { to { background-position: 120% 100%; } }
@media (prefers-reduced-motion: reduce) { .flm { animation: none; } }
.pz-scene:has(.c-row) .pz-note, .pz-scene:has(.b-row) .pz-note { top: 10px; bottom: auto; left: 10px; }
.pz-scene:has(.w-app) .pz-note { top: auto; bottom: 8px; left: auto; right: 10px; width: 28%; } /* 관 위 이름표와 겹치지 않게 오른쪽 아래 */
.c-table { position: absolute; left: 4%; right: 4%; bottom: 6%; height: 20%; background-size: 100% 100%; }
.c-doc { position: absolute; left: 50%; bottom: 1.2%; transform: translateX(-50%); padding: 3px 10px; border-radius: 6px; background: rgba(255,250,238,.92); color: #5A3A20; font-size: 13px; font-weight: 800; white-space: nowrap; }
.c-row { position: absolute; left: 4%; right: 34%; bottom: 22%; display: flex; justify-content: space-around; align-items: flex-end; }
.cnd { --w: clamp(62px, 13vw, 118px); --f: 1; position: relative; width: var(--w); height: calc(var(--w) * 1.05); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.cnd.sel { box-shadow: 0 0 0 3px #FFD36E, 0 0 18px rgba(255,211,110,.6); }
.cnd-body { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; }
.cnd-fl { position: absolute; left: 50%; bottom: 84%; width: 46%; height: 54%; transform: translateX(-50%) scale(var(--f)); transform-origin: 50% 100%; transition: transform .2s; }
.cnd.out .cnd-fl .flm { display: none; }
.cnd.out .cnd-fl::after { content: ""; position: absolute; left: 30%; bottom: 0; width: 40%; height: 70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(120,120,130,.55), rgba(120,120,130,0)); animation: puff 1.6s ease-out forwards; }
@keyframes puff { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-40%) scale(1.4); opacity: 0; } }
.cup { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); border: 3px solid rgba(255,255,255,.95); border-bottom: 0; border-radius: 14px 14px 3px 3px; background: linear-gradient(100deg, rgba(255,255,255,.55) 0 12%, rgba(190,228,255,.22) 22% 100%); box-shadow: 0 0 0 1.5px rgba(70,110,150,.55), inset 0 0 12px rgba(255,255,255,.35); pointer-events: none; }
.cup.s { width: 74%; height: 158%; } .cup.m { width: 96%; height: 180%; } .cup.l { width: 128%; height: 214%; } .cup.v1, .cup.v2 { width: 96%; height: 180%; }
.cup.v1::before, .cup.v2::before { content: ""; position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 46%; height: 8px; background: radial-gradient(circle, #33475E 3px, transparent 3.5px) 0 0 / 12px 8px repeat-x; }
.cup.v2::after { content: ""; position: absolute; left: -3px; right: -3px; bottom: 6px; height: 8px; background: radial-gradient(circle, #33475E 3px, transparent 3.5px) 0 0 / 14px 8px repeat-x; }
.cnd-t { position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); min-width: 52px; height: 24px; padding: 0 6px; border-radius: 6px; background: #0A1A36; color: #FFE08A; font-size: 14px; font-weight: 900; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.cnd-t:empty { display: none; }
.c-shelf { position: absolute; right: 10px; top: 10px; width: 30%; display: grid; gap: 6px; }
.cupbtn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; border-radius: 8px; border: 0; background: rgba(255,250,238,.95); box-shadow: 0 3px 0 rgba(90,60,30,.3); color: #3A2410; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; text-align: left; }
.cupbtn .cup { position: relative; left: auto; bottom: auto; transform: none; flex: none; display: block; }
.cupbtn .cup.s { width: 16px; height: 24px; } .cupbtn .cup.m, .cupbtn .cup.v1, .cupbtn .cup.v2 { width: 20px; height: 28px; } .cupbtn .cup.l { width: 26px; height: 34px; }
.cupbtn .cup::before, .cupbtn .cup::after { transform: scale(.5); transform-origin: 50% 0; }
.cupbtn em { flex: 1; font-style: normal; line-height: 1.2; }
.cupbtn kbd { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; background: #E9DCC6; font: 900 13px/1 inherit; }
.cupbtn.hint { animation: hintglow 1s ease-in-out infinite; }
.b-row { position: absolute; left: 4%; right: 4%; bottom: 24%; display: flex; justify-content: space-around; align-items: flex-end; }
.btl { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border: 0; background: none; cursor: pointer; border-radius: 12px; font: inherit; }
.btl.sel { box-shadow: 0 0 0 3px #FFD36E; background: rgba(255,211,110,.15); }
.btl-glass { --w: clamp(60px, 13vw, 110px); position: relative; width: var(--w); height: calc(var(--w) * 1.35); border: 3px solid rgba(255,255,255,.95); border-radius: 18px 18px 14px 14px; background: linear-gradient(100deg, rgba(255,255,255,.55) 0 12%, rgba(190,228,255,.25) 22% 100%); box-shadow: 0 0 0 1.5px rgba(70,110,150,.55); margin-top: 26px; }
.btl-neck { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); width: 34%; height: 24px; border: 3px solid rgba(255,255,255,.95); border-bottom: 0; background: rgba(190,228,255,.3); box-shadow: 0 0 0 1.5px rgba(70,110,150,.45); }
.btl-stop { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 40%; height: 14px; border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btl.white .btl-stop { background: #F4F6FA; } .btl.red .btl-stop { background: #E5484D; } .btl.grey .btl-stop { background: #7A8699; }
.btl em { font-style: normal; min-height: 28px; padding: 0 10px; border-radius: 6px; background: rgba(255,250,238,.95); color: #3A2410; font-size: 15px; font-weight: 900; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.splint { position: absolute; top: 4%; width: 12px; height: 40%; transform: translateX(-50%); transition: top .5s cubic-bezier(.2,.8,.3,1), left .25s; pointer-events: none; z-index: 2; }
.sp-stick { position: absolute; left: 3px; right: 3px; top: 0; bottom: 10px; border-radius: 3px; background: #8A5A2B; box-shadow: 0 0 0 1px #5A3A20; }
.sp-tip { position: absolute; left: -2px; right: -2px; bottom: 0; height: 16px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #FFE08A, #FF6A2A 50%, #B3261E); box-shadow: 0 0 12px #FF6A2A; animation: ember 1s ease-in-out infinite; }
@keyframes ember { 50% { box-shadow: 0 0 4px #FF6A2A; filter: brightness(.8); } }
.sp-fl { position: absolute; left: 50%; bottom: 6px; width: 54px; height: 64px; transform: translateX(-50%) scale(0); transform-origin: 50% 100%; transition: transform .25s; }
.splint.down { top: 30%; }
.splint.flare .sp-fl { transform: translateX(-50%) scale(1); }
.splint.out .sp-tip { background: #555C66; box-shadow: none; animation: none; }
.splint.mouth { top: 6%; }
.splint.mouth.flare .sp-fl { transform: translateX(-50%) scale(1.25); }
.b-yday { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 8px; background: rgba(10,26,54,.92); color: #fff; font-size: 13px; font-weight: 800; }
.b-yday .pop { color: #FFD36E; font-size: 22px; font-weight: 900; }
.b-yday small { color: #9FD0FF; font-size: 12px; }
.b-yday[hidden] { display: none; }
.w-app { position: absolute; left: 6%; right: 34%; top: 14%; bottom: 7%; }
.w-tank { position: absolute; left: 0; right: 24%; bottom: 0; height: 52%; border: 3px solid rgba(255,255,255,.95); border-top: 0; border-radius: 0 0 14px 14px; box-shadow: 0 0 0 1.5px rgba(70,110,150,.5); background: rgba(190,228,255,.18); }
.w-water { position: absolute; left: 0; right: 0; bottom: 0; height: 78%; background: rgba(95,178,255,.42); border-radius: 0 0 11px 11px; }
.w-tube { position: absolute; bottom: 18%; width: 18%; height: 170%; border: 3px solid rgba(255,255,255,.95); border-bottom: 0; border-radius: 12px 12px 0 0; background: rgba(95,178,255,.42); box-shadow: 0 0 0 1.5px rgba(70,110,150,.55); cursor: pointer; padding: 0; overflow: visible; }
.w-tube.L { left: 18%; } .w-tube.R { left: 56%; }
.w-gas { position: absolute; left: 0; right: 0; top: 0; height: 0; background: rgba(245,250,255,.9); border-radius: 9px 9px 0 0; transition: height 3s ease-out; }
.w-app.on .w-tube.L .w-gas { height: 52%; } .w-app.on .w-tube.R .w-gas { height: 26%; }
.w-elec { position: absolute; left: 35%; width: 30%; bottom: -14px; height: 22px; background: #33475E; border-radius: 3px; }
.w-bub { position: absolute; left: 30%; bottom: 0; width: 40%; height: 70%; opacity: 0; background: radial-gradient(circle, rgba(255,255,255,.95) 2px, transparent 2.5px) 0 0 / 10px 14px; }
.w-app.on:not(.full) .w-bub { opacity: 1; animation: bub .6s linear infinite; }
@keyframes bub { to { background-position: 0 -14px; } }
.w-tag { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); min-height: 30px; padding: 0 10px; border-radius: 6px; display: flex; align-items: center; justify-content: center; white-space: nowrap; font-size: 15px; font-weight: 900; color: #fff; }
.w-tag:empty { display: none; } .w-tag.H { background: #1F5FAF; } .w-tag.O { background: #B8262E; } /* 흰 글자 대비 4.5 이상 */
.w-lever { position: absolute; right: 0; bottom: 30px; width: 22%; aspect-ratio: 1; border: 0; background-color: transparent; cursor: pointer; border-radius: 10px; }
.w-lever:focus-visible, .w-app:not(.on) .w-lever { box-shadow: 0 0 0 3px #FFD36E; }
.w-app.on .w-lever { transform: scaleX(-1); }
.w-lvtag { position: absolute; right: 0; width: 22%; bottom: 0; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255,250,238,.95); box-shadow: 0 2px 0 rgba(90,60,30,.25); font-size: 14px; font-weight: 900; color: #3A2410; }
.w-test { position: absolute; right: 10px; top: 10px; width: 30%; display: grid; gap: 8px; } .w-test[hidden] { display: none; }
.w-test .btn { min-height: 48px; font-size: 15px; justify-content: flex-start; gap: 8px; padding: 0 10px; text-align: left; line-height: 1.25; background: #FFFFFF; color: #12213B; border-radius: 8px; box-shadow: 0 4px 0 rgba(90,60,30,.35); }
.w-test .btn:disabled { opacity: .55; box-shadow: 0 2px 0 rgba(90,60,30,.25); }
.w-test .btn:not(:disabled):hover { box-shadow: 0 0 0 3px #FFD36E, 0 4px 0 rgba(90,60,30,.35); }
.w-test kbd { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; background: #12213B; color: #FFE08A; font: 900 13px/1 inherit; }
.w-fx { position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 3; }
.w-fx.pop b { display: block; color: #fff; font-size: 34px; font-weight: 900; text-shadow: 0 3px 0 #2F7CD6, 0 0 12px #5FB2FF; animation: popin .9s ease-out; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.3); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.w-fx.flare .flm { width: 64px; height: 76px; }
.w-chips { display: flex; gap: 10px; margin-top: 10px; }
.w-chip { flex: 1; min-height: 48px; border-radius: 8px; border: 0; background: #fff; color: #12213B; font: inherit; font-size: 16px; font-weight: 900; box-shadow: 0 4px 0 rgba(0,0,0,.25); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.w-chip.sel { box-shadow: 0 0 0 3px #FFD36E, 0 4px 0 rgba(0,0,0,.25); transform: translateY(-2px); }
.w-chip.placed { opacity: .35; }
.w-water-card { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: #fff; font-weight: 800; }
.w-water-card .mini { --m: 116px; } .w-water-card .mini .mx em { font-size: 15px !important; }
.w-water-card p { margin: 0; }
@media (max-width: 560px) {
  .c-doc { display: none; }
  .c-row { right: 4%; bottom: 24%; } .c-shelf { position: absolute; left: 6px; right: 6px; top: 6px; width: auto; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 4px; }
  .cupbtn { min-height: 38px; font-size: 13px; padding: 3px 6px; gap: 6px; } .cupbtn kbd { display: none; }
  .pz-scene:has(.c-row) .pz-note { top: auto; bottom: 8px; left: 6px; }
  .w-app { right: 4%; top: 22%; } .w-test { left: 6px; right: 6px; width: auto; grid-template-columns: 1fr 1fr; top: 6px; } .w-test .btn { min-height: 44px; font-size: 13px; }
  .w-test kbd { display: none; }
  .pz-scene:has(.w-app) .pz-note { top: auto; bottom: 8px; right: auto; left: 6px; width: auto; max-width: 46%; } /* 전원 이름표(오른쪽 아래)와 겹치지 않게 */
  .b-yday { top: auto; bottom: 6px; right: 6px; }
}

.w-mix { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.w-mix b { font-size: 18px; color: #0B4F5C; margin-right: 4px; }
.w-mix em { font-style: normal; font-size: 20px; font-weight: 900; color: #12213B; }
.wc { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #fff; }
.wc.H { background: #1F5FAF; } .wc.O { background: #B8262E; } .wc.q { background: #fff; color: #607084; border: 2px dashed #9AA8B8; }
/* 이름표 키 번호 (2026-11-13 키 점검) */
.w-chip { gap: 8px; }
.w-chip kbd { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; background: #12213B; color: #FFE08A; font: 900 13px/1 inherit; }
@media (pointer: coarse) { .w-chip kbd { display: none; } }
/* 통 기체 표시 (EP.01 과 같은 색·기호, 2026-11-13) */
.gi { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 5px; vertical-align: middle; }
.gi svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gi-C { background: #4E5563; color: #fff; }
.btl.grey .btl-stop { background: #4E5563; }
/* EP.02 첫 화면: 해 질 녘 숲가 캠핑장 (EP.01 파란 낮과 첫눈에 다르게, 2026-11-13) */
.title { background: radial-gradient(circle at 72% 46%, #FFC27A 0, #E8784E 34%, #9A4A5E 66%, #2E2650 100%); }
.title .grid { opacity: .35; }
.title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath fill='%231E1B33' d='M0 100V62l10-22 10 22 8-34 9 34 7-18 8 18 10-40 10 40 6-16 8 16 9-30 9 30 7-20 8 20 10-44 10 44 6-18 8 18 9-28 9 28 7-14 8 14 10-38 10 38 6-20 8 20 9-32 9 32 7-16 8 16 10-42 10 42 6-14 8 14 9-26 9 26 7-22 8 22 10-36 10 36 6-18 8 18 9-30 9 30 7-12 8 12 10-40 10 40 6-20 8 20 9-24 9 24 7-18 8 18 6-30 8 30V100z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.title .tt-in { position: relative; z-index: 1; }


/* ===== EP.02 유리컵 덮기 화면 2판 (2026-11-13 Yui, 충쌤 "아 이거 uiuxup") =====
   컵마다 촛불 하나(작은·중간·큰 순서), 촛불 아래에 이름·시간·목표 막대·결과. 노트·컵 목록·박사 띠 없음 */
.c-row { left: 4%; right: 4%; bottom: max(22%, 124px); display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); justify-content: stretch; align-items: end; }
.c-row[data-n="3"] { --n: 3; } .c-row[data-n="5"] { --n: 5; }
.c-row .cnd { --w: clamp(62px, 11vw, 118px); width: 100%; height: calc(var(--w) * 1.05); border-radius: 12px; }
.c-row[data-n="5"] .cnd { --w: clamp(46px, 8.5vw, 100px); }
.c-row .cnd-body { left: 50%; right: auto; width: var(--w); margin-left: calc(var(--w) / -2); }
.c-row .cnd-fl { width: calc(var(--w) * .46); height: calc(var(--w) * .54); bottom: calc(var(--w) * .88); }
.c-row .cup.s { width: calc(var(--w) * .74); height: calc(var(--w) * 1.66); } .c-row .cup.m, .c-row .cup.v1, .c-row .cup.v2 { width: calc(var(--w) * .96); height: calc(var(--w) * 1.89); } .c-row .cup.l { width: calc(var(--w) * 1.28); height: calc(var(--w) * 2.25); }
.c-row .cnd:focus-visible { outline: 3px solid #FFD36E; outline-offset: 4px; }
.c-row .cnd:hover:not(.covered) .cnd-body { filter: brightness(1.06); }
.c-row .cnd-st { display: none; }
.c-row .cnd.burn .cnd-fl::before { content: ""; position: absolute; left: 50%; bottom: -10%; width: 220%; height: 160%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255,200,90,.35), rgba(255,200,90,0)); pointer-events: none; }
.cnd-cap { position: absolute; left: 2px; right: 2px; top: calc(100% + 6px); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.cnd-nm { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 26px; padding: 2px 6px; border-radius: 6px; background: rgba(255,250,238,.95); color: #3A2410; font-size: 16px; font-weight: 800; line-height: 1.15; text-align: center; word-break: keep-all; box-shadow: 0 2px 0 rgba(90,60,30,.25); }
.cnd-nm kbd { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; background: #3A2410; color: #FFE08A; font: 900 13px/1 inherit; }
.c-row .cnd-t { position: static; transform: none; display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 8px; font-size: 16px; white-space: nowrap; }
.c-row .cnd.burn .cnd-t { background: #7A2E10; color: #FFE08A; }
.c-row .cnd.burn .cnd-t::before { content: ""; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #FFB547; box-shadow: 0 0 6px #FFB547; }
.c-row .cnd.out .cnd-t { background: #4A5568; color: #fff; }
.cnd-bar { width: min(100%, 96px); height: 8px; border-radius: 4px; background: rgba(58,36,16,.25); overflow: hidden; }
.cnd-bar[hidden] { display: none; }
.cnd-bar i { display: block; height: 100%; width: 0; background: #FFB547; }
.cnd-bar.ok i { background: #2FB36B; }
.cnd:not(.covered) .cnd-bar { display: none; }
.cnd-seen { font-size: 16px; font-weight: 700; color: #5A3A20; line-height: 1.2; text-align: center; word-break: keep-all; }
.cnd-seen:empty, .cnd.covered .cnd-seen { display: none; }
.cnd.blink .cnd-seen { animation: blink .5s steps(2) 8; background: #FFE8A8; border-radius: 4px; }
.c-row .cnd.hint .cnd-body { animation: hintglow 1s ease-in-out infinite; border-radius: 8px; }
@media (max-width: 520px) {
  .c-row { left: 2%; right: 2%; bottom: max(24%, 132px); }
  .cnd-nm { font-size: 15px; padding: 2px 4px; } .cnd-nm kbd { display: none; }
  .c-row .cnd-t { font-size: 15px; padding: 0 6px; }
}
.c-row .cnd-t:empty { display: none; }

/* ===== EP.02 불씨 막대 · 물 나누기: 결과는 그 물건 바로 곁에 (2026-11-13 Yui) ===== */
.btl-res { min-height: 26px; padding: 2px 8px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; line-height: 1.2; text-align: center; word-break: keep-all; max-width: 150px; }
.btl-res:empty { visibility: hidden; }
.btl-res.flare { background: #FFE2B8; color: #7A2E10; } .btl-res.out { background: #4A5568; color: #fff; } .btl-res.stay { background: rgba(255,250,238,.95); color: #3A2410; }
.btl em { font-size: 16px; }
.b-yday small { font-size: 16px; }
.w-res { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); width: max-content; max-width: 150px; padding: 4px 10px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(255,250,238,.96); color: #12213B; font-size: 16px; font-weight: 800; line-height: 1.25; text-align: center; box-shadow: 0 3px 0 rgba(90,60,30,.25); pointer-events: none; }
.w-res:empty, .w-tube:has(.w-tag:not(:empty)) .w-res { display: none; }
.w-res span:last-child { color: #B85A00; }
.w-tube.R .w-res span:last-child { color: #B8262E; }
.w-res.blink { animation: blink .5s steps(2) 8; background: #FFE8A8; }
.b-yday b { font-size: 16px; } .w-lvtag { font-size: 16px; }
.w-test .btn { font-size: 16px; }
@media (max-width: 520px) { .w-test .btn { font-size: 16px; min-height: 48px; line-height: 1.2; } .cnd-nm { font-size: 16px; } .c-row .cnd-t { font-size: 16px; } }
.w-res { padding: 4px 7px; }
.w-tube.R .w-res { left: 62%; } .w-tube.L .w-res { left: 40%; }
.w-tag { font-size: 16px; }
.w-res span:last-child { color: #8F4400; }
.cnd-seen { padding: 1px 6px; border-radius: 5px; background: rgba(255,250,238,.92); color: #3A2410; }
.pz-scene:has(.w-app) .pz-note { display: none !important; } /* 결과는 관 위 이름표 자리에(Yui 11-13) */

/* ===== EP.02 불씨 막대: 병 안으로 꽂히는 깊이 (2026-11-13 Yui, 충쌤 "통에 넣는 게 아니라 통 밖에 있는 거 처럼 보여 삐져나간거 처럼") =====
   층: 유리 바탕 → 병 안(막대·불씨·불꽃, 유리 안쪽으로 잘림) → 유리 앞면(옅은 색·반사) → 입구 위 막대 → 목(반투명 유리) → 뚜껑(담글 때 옆으로 비킴) */
.pz-scene .splint { display: none !important; }
.btl-glass { isolation: isolate; }
.btl-in { position: absolute; inset: 0; border-radius: 15px 15px 11px 11px; overflow: hidden; z-index: 1; }
.btl-face { position: absolute; inset: 0; border-radius: 15px 15px 11px 11px; z-index: 2; pointer-events: none; background: linear-gradient(100deg, rgba(255,255,255,.42) 0 10%, rgba(200,232,255,.30) 18% 70%, rgba(255,255,255,.22) 86%); }
.btl-face::after { content: ""; position: absolute; left: 12%; top: 8%; width: 8%; height: 55%; border-radius: 4px; background: rgba(255,255,255,.55); }
.bs-in { position: absolute; left: 50%; top: -2px; width: 8px; height: 0; margin-left: -4px; border-radius: 0 0 3px 3px; background: #8A5A2B; box-shadow: 0 0 0 1px #5A3A20; transition: height .55s cubic-bezier(.2,.8,.3,1); }
.bs-tip { position: absolute; left: 50%; top: -2px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #FFE08A, #FF6A2A 50%, #B3261E); box-shadow: 0 0 12px #FF6A2A; opacity: 0; transition: top .55s cubic-bezier(.2,.8,.3,1), opacity .2s; animation: ember 1s ease-in-out infinite; }
.bs-fl { position: absolute; left: 50%; top: 0; width: calc(var(--w) * .5); height: calc(var(--w) * .6); transform: translate(-50%, -100%) scale(0); transform-origin: 50% 100%; transition: transform .25s, top .55s cubic-bezier(.2,.8,.3,1); }
.bs-smoke { position: absolute; left: 50%; top: 0; width: calc(var(--w) * .45); height: calc(var(--w) * .45); transform: translate(-50%, -100%); border-radius: 50%; background: radial-gradient(closest-side, rgba(110,115,125,.55), rgba(110,115,125,0)); opacity: 0; }
.btl.dip .bs-in { height: calc(var(--w) * .62); }
.btl.dip .bs-tip { top: calc(var(--w) * .62); opacity: 1; }
.btl.dip .bs-fl, .btl.dip .bs-smoke { top: calc(var(--w) * .62); }
.btl.r-flare .bs-fl { transform: translate(-50%, -82%) scale(1); }
.btl.r-flare .bs-tip { box-shadow: 0 0 22px #FFB547, 0 0 40px rgba(255,181,71,.6); }
.btl.r-flare .btl-face { background: linear-gradient(100deg, rgba(255,255,255,.42) 0 10%, rgba(255,214,150,.30) 18% 70%, rgba(255,255,255,.22) 86%); }
.btl.r-out .bs-tip { background: #555C66; box-shadow: none; animation: none; }
.btl.r-out .bs-smoke { opacity: 1; animation: puffup 1.2s ease-out forwards; }
@keyframes puffup { from { transform: translate(-50%, -60%) scale(.6); opacity: .9; } to { transform: translate(-50%, -140%) scale(1.2); opacity: 0; } }
/* 입구 위 막대: 고를 때는 뚜껑 위에 떠 있고, 담그면 내려와 목(반투명 유리) 뒤를 지나 병 안 막대와 이어진다 */
.bs-top { position: absolute; left: 50%; width: 8px; margin-left: -4px; bottom: calc(100% + 42px); height: calc(var(--w) * .7); border-radius: 3px 3px 0 0; background: #8A5A2B; box-shadow: 0 0 0 1px #5A3A20; z-index: 3; opacity: 0; transition: bottom .55s cubic-bezier(.2,.8,.3,1), opacity .2s; pointer-events: none; }
.bs-top::after { content: ""; position: absolute; left: -3px; right: -3px; bottom: -6px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #FFE08A, #FF6A2A 50%, #B3261E); box-shadow: 0 0 10px #FF6A2A; animation: ember 1s ease-in-out infinite; }
.btl.sel .bs-top { opacity: 1; }
.btl.dip .bs-top, .btl.mouth .bs-top { bottom: 100%; opacity: 1; }
.btl.dip .bs-top::after { opacity: 0; }
.btl-neck { z-index: 4; background: rgba(190,228,255,.38); }
.btl-stop { z-index: 5; transition: transform .35s cubic-bezier(.2,.8,.3,1); }
.btl.dip .btl-stop, .btl.mouth .btl-stop { transform: translateX(calc(-50% + var(--w) * .32)) translateY(-6px) rotate(16deg); }
/* 병 B 입구 시험: 막대 끝 불꽃이 입구에서 밝아진다(병 밖이 맞다: 입구에 대는 시험) */
.btl.mouth .bs-top { bottom: calc(100% + 26px); }
.btl.mouth .bs-top::after { width: 20px; left: -6px; height: 20px; bottom: -10px; box-shadow: 0 0 22px #FFB547, 0 0 44px rgba(255,181,71,.7); background: radial-gradient(circle at 50% 40%, #FFF3C4, #FFB547 50%, #FF6A2A); }
@media (prefers-reduced-motion: reduce) { .bs-in, .bs-tip, .bs-fl, .bs-top, .btl-stop { transition: none; } }

.pz-scene:has(.b-row) .pz-note, .pz-scene:has(.w-app) .pz-note { display: none !important; } /* 결과는 병 이름 아래·관 위에(Yui 11-13) */

/* ===================== EP.02 v2 (2026-11-15 이혜진쌤 기획서): 분자식 카드 · 원소 탐지기 · 어항 · 물 카드 · 수소 자동차 · 회의실 · 주기율표 좌우 ===================== */
/* 분자 카드 머리: 분자식(크게) · 이름 · 종류. 미완성 카드는 회색 + 자물쇠 */
.cz .card.sub .hd { flex-wrap: wrap; row-gap: .35em; }
.cz .card.sub .hd .fm { flex: none; min-width: 2.4em; height: 1.9em; padding: 0 .4em; border-radius: .33em; background: #fff; color: var(--c3); display: flex; align-items: center; justify-content: center; font: 900 1.7em/1 var(--num); letter-spacing: -.02em; box-shadow: 0 .12em 0 rgba(0,0,0,.18); }
.cz .card.sub .hd .kind { flex-basis: 100%; justify-content: center; }
.cz .card.sub .qlock { position: absolute; right: .8em; top: .8em; width: 3.2em; height: 3.2em; border-radius: .6em; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; font-size: 1.6em; }
.cz .card.sub.unfinished .art { filter: saturate(.4); }
.cz .ft li.lk small { margin-left: auto; font-size: .9em; }
.cz .mini.subm .mx i.fm { width: auto; min-width: 2.6em; padding: 0 .35em; background: var(--c2); }
.cz .ft li.fresh { border-color: #FFB547; background: #FFF6E2; animation: ftnew 1.1s ease-out; }
@keyframes ftnew { 0% { transform: translateX(-10px); opacity: 0; box-shadow: 0 0 0 .4em rgba(255,181,71,.6); } 60% { opacity: 1; } 100% { transform: none; box-shadow: 0 0 0 0 rgba(255,181,71,0); } }

/* 대사 얼굴: 연구소 연락 · 자동차 · 탐지기 */
.talk-face.who-lab { background: #1E5B40; } .talk-face.who-car { background: #B33A3A; } .talk-face.who-det { background: #123E7A; }
.ic-det { position: relative; display: block; width: 24px; height: 30px; border-radius: 5px; background: #DDEBFF; }
.ic-det i { position: absolute; left: 4px; right: 4px; top: 4px; height: 12px; border-radius: 2px; background: #3FE0A0; }

/* 원소 탐지기: 화면 아래에서 올라와 깜빡인다 */
.detector { position: absolute; left: 50%; bottom: calc(110px + var(--safe-b)); z-index: 7; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 12px; background: linear-gradient(180deg, var(--navy1), var(--navy3)); border: 3px solid #FFD36E; color: #fff; box-shadow: 0 8px 0 rgba(0,0,0,.3); animation: detin .35s cubic-bezier(.2,.9,.3,1.3); pointer-events: none; max-width: calc(100vw - 24px); }
.detector.out { animation: detout .25s forwards; }
@keyframes detin { from { transform: translate(-50%, 40px); opacity: 0; } } @keyframes detout { to { transform: translate(-50%, 30px); opacity: 0; } }
.dt-dev { position: relative; flex: none; width: 74px; height: 64px; border-radius: 10px; background: #DDEBFF; box-shadow: 0 3px 0 #8FA9CC inset; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 4px; }
.dt-dev b { font-size: 9px; font-weight: 900; color: #123E7A; line-height: 1; }
.dt-scr { position: absolute; left: 8px; right: 8px; top: 8px; height: 32px; border-radius: 5px; background: #0B2148; overflow: hidden; }
.dt-wave { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(63,224,160,.9) 6px 8px); animation: dtwave .5s linear infinite; mask-image: linear-gradient(transparent 30%, #000 50%, transparent 70%); -webkit-mask-image: linear-gradient(transparent 30%, #000 50%, transparent 70%); }
@keyframes dtwave { to { transform: translateX(8px); } }
.dt-led { position: absolute; right: -4px; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: #FF5A5A; box-shadow: 0 0 10px #FF5A5A; animation: blink .3s steps(2) infinite; }
.detector p { margin: 0; font-size: 16px; font-weight: 900; line-height: 1.4; }

/* 카드 갱신 연출: 뒤집지 않고, 훑는 빛 + UPDATE 띠 (획득은 뒷면에서 뒤집기) */
.reveal.upd { background: radial-gradient(circle at 50% 45%, #1E6B5A 0, #0B2B2E 72%); }
.reveal .deck .ccard { --cw: clamp(230px, min(80vw, 42vh), 300px); }
.ccard.upd-scan .cc-front::after { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: inherit; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.85) 50%, transparent 70%); background-size: 250% 100%; animation: updscan .65s linear; pointer-events: none; }
@keyframes updscan { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.ccard.upd-new { animation: updpop .5s cubic-bezier(.2,.9,.3,1.3); }
@keyframes updpop { 0% { transform: scale(.96); } 50% { transform: scale(1.04); } }
.upd-tag { position: absolute; left: 50%; top: -14px; z-index: 6; transform: translateX(-50%); height: 30px; padding: 0 16px; border-radius: 6px; background: #3FE0A0; color: #073B2A; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; letter-spacing: .08em; box-shadow: 0 4px 0 #1B8A60; }
.ccard.upd-fm .hd .fm { animation: fmstamp .8s cubic-bezier(.2,.9,.3,1.3); }
@keyframes fmstamp { 0% { transform: scale(2.2); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: none; } }
.ccard.glow { animation: cglow 1.2s ease-in-out infinite; border-radius: 14px; }
@keyframes cglow { 50% { filter: drop-shadow(0 0 18px rgba(255,224,138,.95)); } }

/* 퍼즐 공통: 큰 선택 버튼 */
.act-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 4px; }
@media (min-width: 700px) { .act-grid { grid-template-columns: repeat(4, 1fr); } }
.pact { position: relative; min-height: 86px; padding: 10px 8px; border-radius: 10px; border: 0; background: linear-gradient(180deg, #F7FAFE, #E3ECF8); color: #123E7A; box-shadow: 0 5px 0 #8FA9CC; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 15px; font-weight: 900; text-align: center; cursor: pointer; }
.pact .ic svg { width: 34px; height: 34px; fill: none; stroke: #2F7CD6; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pact small { min-height: 16px; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pact kbd, .wc-pick kbd, .car-row kbd { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; background: rgba(18,62,122,.12); color: #123E7A; display: flex; align-items: center; justify-content: center; font: 800 11px/1 var(--num); }
.car-row kbd { position: static; margin-right: 8px; background: rgba(0,0,0,.18); color: inherit; }
.pact.ok { background: linear-gradient(180deg, #E9FBF1, #C9F1DB); box-shadow: 0 5px 0 #3FA06E; } .pact.ok small { color: #1B7A4A; }
.pact.no { background: linear-gradient(180deg, #FFF0F0, #F8D8D8); box-shadow: 0 5px 0 #C46A6A; } .pact.no small { color: #A33; }
.pact.shake { animation: shake .4s; }
.pact:active { transform: translateY(3px); box-shadow: 0 2px 0 #8FA9CC; }
@media (pointer: coarse) { .pact kbd, .wc-pick kbd, .car-row kbd { display: none; } }

/* Scene 1 어항 */
.aq-scene { display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #DDEFE6, #C7E2D4); }
.aq { position: relative; width: min(78%, 420px); aspect-ratio: 1.7; border-radius: 12px; border: 5px solid rgba(255,255,255,.9); background: rgba(220,240,255,.35); box-shadow: 0 10px 0 #7B5A3A, 0 16px 26px rgba(0,0,0,.18); overflow: hidden; }
.aq-water { position: absolute; left: 0; right: 0; bottom: 0; top: 14%; background: linear-gradient(180deg, #6FC3E8, #2F86B8); transition: filter .6s; }
.aq[data-o="0"] .aq-water { filter: saturate(.55) brightness(.85); } .aq[data-o="1"] .aq-water { filter: saturate(.8); }
.aq-surf { position: absolute; left: -10%; right: -10%; top: -6px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.55); }
.aq.flow .aq-surf { animation: surf 1.2s ease-in-out infinite; }
@keyframes surf { 50% { transform: translateX(6%) scaleY(1.6); } }
.aq-sand { position: absolute; left: 0; right: 0; bottom: 0; height: 12%; background: #E7D3A6; }
.aq-fish { position: absolute; width: 18%; transition: top 1s; }
.aq-fish svg { width: 100%; fill: #FF9F43; }
.aq-fish.f1 svg { fill: #FFD23F; } .aq-fish.f2 svg { fill: #FF6B6B; }
.aq-fish.f0 { left: 14%; } .aq-fish.f1 { left: 44%; } .aq-fish.f2 { left: 70%; }
.aq[data-o="0"] .aq-fish { top: 2%; animation: gasp .5s ease-in-out infinite; } .aq[data-o="0"] .aq-fish svg { transform: rotate(-22deg); }
.aq[data-o="1"] .aq-fish { top: 22%; animation: swim 3s ease-in-out infinite; }
.aq[data-o="2"] .aq-fish { animation: swim 2.2s ease-in-out infinite; } .aq[data-o="2"] .f0 { top: 52%; } .aq[data-o="2"] .f1 { top: 30%; } .aq[data-o="2"] .f2 { top: 60%; }
.aq-fish.f1 { animation-delay: -.8s !important; } .aq-fish.f2 { animation-delay: -1.6s !important; }
@keyframes gasp { 50% { transform: translateY(3px) scale(1.04); } }
@keyframes swim { 0%,100% { transform: translateX(-14px); } 50% { transform: translateX(14px) scaleX(-1); } }
.aq-bub { position: absolute; left: 8%; bottom: 10%; width: 14%; height: 86%; opacity: 0; transition: opacity .4s; }
.aq.pump .aq-bub { opacity: 1; }
.aq-bub i { position: absolute; bottom: 0; width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); animation: bub 2s linear infinite; }
.aq-bub i:nth-child(3n+1) { left: 10%; } .aq-bub i:nth-child(3n+2) { left: 45%; width: 6px; height: 6px; } .aq-bub i:nth-child(3n) { left: 70%; }
.aq-bub i:nth-child(1) { animation-delay: 0s } .aq-bub i:nth-child(2) { animation-delay: -.3s } .aq-bub i:nth-child(3) { animation-delay: -.6s } .aq-bub i:nth-child(4) { animation-delay: -.9s } .aq-bub i:nth-child(5) { animation-delay: -1.1s } .aq-bub i:nth-child(6) { animation-delay: -1.3s } .aq-bub i:nth-child(7) { animation-delay: -1.5s } .aq-bub i:nth-child(8) { animation-delay: -1.7s } .aq-bub i:nth-child(9) { animation-delay: -1.9s }
@keyframes bub { to { transform: translateY(-260px); opacity: 0; } }
.aq-flow { position: absolute; right: 0; top: 0; width: 22%; height: 30%; opacity: 0; background: repeating-linear-gradient(170deg, transparent 0 8px, rgba(255,255,255,.55) 8px 10px); transition: opacity .4s; }
.aq.flow .aq-flow { opacity: 1; animation: flowmv .6s linear infinite; }
@keyframes flowmv { to { background-position: -20px 0; } }
.aq-gauge { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: min(78%, 420px); display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.9); font-size: 13px; font-weight: 900; color: #123E7A; }
.aq-gauge .bar { flex: 1; height: 12px; border-radius: 6px; background: #DDE6F2; overflow: hidden; }
.aq-gauge .bar i { display: block; height: 100%; width: 18%; border-radius: 6px; background: linear-gradient(90deg, #FF8A7A, #5CC08F); transition: width .7s cubic-bezier(.2,.9,.3,1.1); }
.aq-gauge b { min-width: 72px; display: flex; align-items: center; justify-content: flex-end; }
.aq-scene .aq { margin-top: 40px; }

/* Scene 2 물 카드 */
.wc-scene { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; padding: 12px; background: radial-gradient(circle at 50% 40%, #1E5BA8, #0B2148 75%); }
.wc-card { cursor: pointer; transition: transform .4s; }
.wc-card.small .ccard { --cw: clamp(150px, min(38vw, 26vh), 200px) !important; }
.wc-eq { display: flex; align-items: center; gap: 8px; flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 260px; }
.wc-eq .wc-h, .wc-slot { width: 84px; height: 96px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font: 900 40px/1 var(--num); }
.wc-eq .wc-h { background: #fff; color: #123E7A; box-shadow: 0 5px 0 #8FA9CC; }
.wc-slot { border: 4px dashed #FFD36E; color: #FFD36E; background: rgba(255,211,110,.1); animation: tpulse 1.2s ease-in-out infinite; cursor: pointer; }
.wc-slot.got { border: 0; background: var(--O2, #FF6A5C); color: #fff; animation: none; box-shadow: 0 5px 0 #7A1620; }
.wc-slot.miss { animation: shake .4s; }
.wc-eq small { flex-basis: 100%; text-align: center; color: #fff; font-size: 15px; font-weight: 900; min-height: 24px; display: flex; align-items: center; justify-content: center; }
.wc-eq.done small { color: #3FE0A0; font-size: 18px; }
.wc-hand, .car-dexlist { display: flex; justify-content: center; gap: 14px; margin: 4px 0 8px; flex-wrap: wrap; }
.wc-pick { position: relative; padding: 8px 8px 6px; border: 0; border-radius: 10px; background: rgba(0,0,0,.25); cursor: grab; touch-action: none; transition: transform .2s, opacity .3s; }
.wc-pick .mini { --m: 72px; pointer-events: none; }
.wc-pick kbd { background: rgba(255,255,255,.85); }
.wc-pick.sel { transform: translateY(-6px); box-shadow: 0 0 0 3px #FFD36E; }
.wc-pick.blink { animation: cglow 1s ease-in-out infinite; }
.wc-pick.used { opacity: .3; } .wc-pick:disabled { cursor: default; }

/* Scene 3 수소 자동차 계기판 */
.car-scene { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; background: linear-gradient(180deg, #2A3348, #161C2A); }
.dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(96%, 560px); }
.dl { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px; border-radius: 10px; background: #0E1422; box-shadow: 0 0 0 2px #3A4660 inset; color: #C9D4E8; font-size: 12px; font-weight: 900; text-align: center; }
.dl > span { min-height: 30px; display: flex; align-items: center; justify-content: center; line-height: 1.25; }
.dl b { min-height: 24px; padding: 0 8px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.dl b.okc { background: #1B7A4A; color: #fff; } .dl b.bad { background: #B33A3A; color: #fff; }
.gauge { width: 70%; height: 14px; border-radius: 7px; background: #2A3348; overflow: hidden; } .gauge.full i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #5FB2FF, #BFE3FF); }
.car-slot { position: relative; width: 64px; height: 74px; border-radius: 8px; border: 3px dashed #FFD36E; display: flex; align-items: center; justify-content: center; color: #FFD36E; overflow: hidden; cursor: pointer; }
.car-slot em { position: relative; z-index: 1; font-style: normal; font: 900 13px/1.2 var(--font); }
.car-slot.got { border: 0; background: var(--O2, #FF6A5C); color: #fff; } .car-slot.got em { font: 900 26px/1 var(--num); }
.car-slot.miss { animation: shake .4s; }
.car-slot .flow { position: absolute; inset: 0; opacity: 0; background: repeating-linear-gradient(90deg, transparent 0 8px, rgba(255,255,255,.6) 8px 11px); }
.car-scene.intake .car-slot .flow { opacity: 1; animation: flowmv .35s linear infinite; }
.lamp { width: 34px; height: 34px; border-radius: 50%; background: #3A4660; }
.lamp.warn { background: #FF5A5A; box-shadow: 0 0 14px #FF5A5A; animation: blink .45s steps(2) infinite; } .lamp.on { background: #3FE0A0; box-shadow: 0 0 14px #3FE0A0; }
.car-motor { display: flex; align-items: center; gap: 10px; color: #C9D4E8; font-size: 13px; font-weight: 900; }
.car-motor i { width: 40px; height: 40px; border-radius: 50%; border: 6px dotted #5A6884; }
.car-motor.on i { border-color: #3FE0A0; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.car-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.car-row .btn { display: inline-flex; align-items: center; justify-content: center; }
.btn.glow { animation: cglow 1s ease-in-out infinite; }

/* 연료전지 그림 */
.fc { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.fc-in, .fc-out { display: flex; flex-direction: column; gap: 8px; }
.fc-g { display: flex; align-items: center; gap: 8px; min-width: 128px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.95); color: #123E7A; }
.fc-g b { min-width: 46px; height: 34px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font: 900 18px/1 var(--num); }
.fc-g span { font-size: 13px; font-weight: 900; line-height: 1.25; } .fc-g small { font-size: 11px; font-weight: 700; color: #5A6B85; }
.fc-g.h b { background: #5FB2FF; } .fc-g.o b { background: #FF8A7A; } .fc-g.e b { background: #FFB733; color: #4A2A00; } .fc-g.w b { background: #14A3B8; }
.fc-arrow { width: 26px; height: 18px; background: #FFE08A; clip-path: polygon(0 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 0 70%); }
.fc-box { width: 112px; height: 112px; border-radius: 12px; background: linear-gradient(180deg, #3FE0A0, #1B8A60); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; box-shadow: 0 5px 0 #0D5A3C; }
.fc-box b { font-size: 18px; font-weight: 900; } .fc-box small { font-size: 11px; font-weight: 800; line-height: 1.3; padding: 0 6px; }
.fc-eq { margin: 10px 0 4px; text-align: center; font: 900 22px/1.3 var(--num); color: #FFE08A; }
@media (max-width: 520px) { .fc { flex-direction: column; } .fc-in, .fc-out { flex-direction: row; } .fc-g { min-width: 0; } .fc-arrow { transform: rotate(90deg); } }

/* Scene 4 회의실 */
.room-scene { display: flex; align-items: stretch; gap: 10px; padding: 10px; background: linear-gradient(180deg, #F4E9D8, #E8D7BC); }
.rm { position: relative; flex: 1 1 60%; min-width: 0; border-radius: 10px; background: linear-gradient(180deg, #FBF4E8 0 62%, #C9A97E 62%); overflow: hidden; }
.rm-win { position: absolute; left: 8%; top: 8%; width: 34%; height: 40%; border-radius: 6px; border: 6px solid #fff; background: linear-gradient(180deg, #9FD7FF, #DDF2FF); box-shadow: 0 4px 0 rgba(0,0,0,.12); overflow: hidden; }
.rm-win .sun { position: absolute; right: 10%; top: 12%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: #FFD23F; box-shadow: 0 0 18px #FFD23F; }
.rm-win .pane { position: absolute; top: 0; bottom: 0; width: 50%; background: rgba(230,244,255,.7); border: 3px solid #fff; transition: transform .5s; }
.rm-win .pane.l { left: 0; transform-origin: left; } .rm-win .pane.r { right: 0; transform-origin: right; }
.rm-win.open .pane.l { transform: perspective(200px) rotateY(70deg); } .rm-win.open .pane.r { transform: perspective(200px) rotateY(-70deg); }
.rm-win.open::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 14px, rgba(255,255,255,.7) 14px 16px); animation: flowmv .5s linear infinite; }
.rm-table { position: absolute; left: 18%; right: 18%; bottom: 14%; height: 12%; border-radius: 6px; background: #8A6340; box-shadow: 0 4px 0 #5E4128; }
.rm-people { position: absolute; left: 22%; right: 22%; bottom: 26%; display: flex; justify-content: space-around; }
.rm-people .pp { position: relative; width: 34px; height: 46px; border-radius: 16px 16px 6px 6px; background: #5F8FD6; transition: transform .5s; }
.rm-people .pp::before { content: ""; position: absolute; left: 6px; top: -22px; width: 22px; height: 22px; border-radius: 50%; background: #F5C9A4; }
.rm[data-lv="0"] .pp { transform: rotate(-12deg) translateY(6px); } .rm[data-lv="1"] .pp { transform: rotate(-5deg) translateY(3px); }
.rm-people .zz { position: absolute; right: -10px; top: -36px; font-size: 14px; font-weight: 900; color: #5A6B85; animation: zz 1.6s ease-in-out infinite; }
.rm[data-lv="2"] .zz { display: none; }
@keyframes zz { 50% { transform: translate(4px, -6px); opacity: .4; } }
.rm-plants { position: absolute; right: 4%; bottom: 3%; width: 40%; display: flex; flex-wrap: wrap-reverse; gap: 4px; justify-content: flex-end; }
.rm-plants .pl { position: relative; width: 26px; height: 36px; animation: updpop .4s; }
.rm-plants .pl::before { content: ""; position: absolute; left: 3px; bottom: 0; width: 20px; height: 14px; border-radius: 2px 2px 6px 6px; background: #C46A3A; }
.rm-plants .pl::after { content: ""; position: absolute; left: 1px; bottom: 12px; width: 24px; height: 24px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 40% 35%, #8BE08B, #2E9A4E); }
.rmeter { flex: 0 0 38%; max-width: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px; border-radius: 10px; background: #0E1422; color: #fff; text-align: center; box-shadow: 0 0 0 3px #B33A3A inset; transition: box-shadow .4s; }
.rmeter.mid { box-shadow: 0 0 0 3px #FFB733 inset; } .rmeter.ok { box-shadow: 0 0 0 3px #3FE0A0 inset; }
.rmeter .mt-lb { font-size: 12px; font-weight: 900; color: #C9D4E8; min-height: 18px; display: flex; align-items: center; }
.rmeter > b { font: 900 clamp(30px, 7vw, 44px)/1 var(--num); color: #FF8A7A; transition: color .4s; } .rmeter.mid > b { color: #FFD36E; } .rmeter.ok > b { color: #3FE0A0; }
.rmeter > small { font-size: 12px; font-weight: 800; color: #C9D4E8; }
.rmeter em { min-height: 24px; padding: 0 10px; border-radius: 5px; background: #B33A3A; font-style: normal; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.rmeter.warn em { animation: blink .5s steps(2) infinite; } .rmeter.mid em { background: #B87A00; } .rmeter.ok em { background: #1B7A4A; }
.mt-graph { width: 100%; height: 44px; margin-top: 6px; border-radius: 4px; background: #161E30; }
.mt-graph polyline { fill: none; stroke: #FF8A7A; stroke-width: 2.4; vector-effect: non-scaling-stroke; } .rmeter.ok .mt-graph polyline { stroke: #3FE0A0; }
.mt-graph .gl { stroke: rgba(63,224,160,.7); stroke-dasharray: 4 3; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.mt-goal { font-size: 11px; font-weight: 800; color: #3FE0A0; min-height: 16px; display: flex; align-items: center; }
@media (max-width: 520px) { .room-scene { flex-direction: column; } .rmeter { flex: none; max-width: none; flex-direction: row; flex-wrap: wrap; gap: 6px 10px; } .rm { min-height: 150px; } .mt-graph { height: 30px; flex-basis: 100%; } }

/* 주기율표: 1~20번 확대(왼쪽) + 전체 표(오른쪽). 좁은 화면은 위아래 */
.pt-pair { display: flex; gap: 16px; align-items: flex-start; justify-content: center; margin-top: 12px; }
.pt-pair .pt-wrap { flex: 1 1 56%; margin-top: 0; min-width: 0; } .pt-side { flex: 1 1 44%; min-width: 0; max-width: 340px; }
.pt-zoom.z20 { max-width: 420px; grid-template-columns: repeat(8, 1fr); }
.pt-zb .pt-head { max-width: 420px; display: grid; grid-template-columns: repeat(8, 1fr); }
.pt-zb .pt-head .mid { grid-column: 3 / 9; text-align: center; }
.pt-cap { margin: 6px 0 0; text-align: center; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.65); }
.dex .pt-cap { color: var(--mute); }
.pt-side .pt-countrow { display: flex; justify-content: space-between; align-items: flex-end; } .pt-side .pt-lb { font-size: 13px; font-weight: 800; color: var(--mute); }
.panel .pt-side .pt-lb { color: rgba(255,255,255,.7); }
.pt-side .pt-full { max-width: none; } .pt-full .m.zin:not(.got) { background: #C9D6EA; }
.panel.pt-panel { width: min(860px, 100%); }
@media (max-width: 600px) { .pt-pair { flex-direction: column; align-items: stretch; } .pt-side { max-width: none; } }
@media (max-height: 760px) { .pt-pair .pt-fullwrap { display: block; } .pt-side .pt-countrow > span { display: inline; } }
:root { --num: ui-rounded, "SF Pro Rounded", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --O2: #E5484D; }
.ccard .cz .card.sub .in > .art { flex: 1 1 auto; min-height: 5.6em; height: auto; }
.dex .pt-head { color: var(--mute); }
.mt-goal { font-size: 12px; }
@media (max-width: 600px) { .pt-side .pt-full { max-width: 240px; margin-left: auto; margin-right: auto; } .pt-side .pt-countrow { max-width: 240px; margin: 0 auto; } }
.detector { top: calc(118px + var(--safe-t, 0px)); bottom: auto; } @keyframes detin { from { transform: translate(-50%, -30px); opacity: 0; } } @keyframes detout { to { transform: translate(-50%, -20px); opacity: 0; } }

/* ===== EP.02 v2 퍼즐·도감 다듬기 (Yui 2026-11-16) =====
   1280: 조작판 안 고르기 칸·카드·단추를 말 줄과 같은 760px 기둥에 맞춤(앞 규칙의 margin: X 0 이 가운데 맞춤을 지우고 있었음)
   말 줄은 고르기 칸에서 14px 띄움. 자동차 계기판·카드 칸을 큰 화면에서 키움. 회의실 검지기 글자 사이 띄움. 도감 표 두 개를 가운데 한 덩어리로 */
.pz-panel .act-grid, .pz-panel .wc-hand, .pz-panel .car-row, .pz-panel .car-dexlist { margin-left: auto; margin-right: auto; max-width: 760px; }
.pz-panel .pz-say { margin-top: 14px; }
.pz-panel .act-grid + .pz-say, .pz-panel .act-grid ~ .pz-say { margin-top: 16px; }
.pz-panel .pz-lv { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 700px) {
  .pact { min-height: 104px; gap: 6px; }
  .pact .ic svg { width: 38px; height: 38px; }
  .pact b { font-size: 16px; }
  .pact small { font-size: 13px; }
  .wc-pick .mini { --m: 88px; }
  .wc-hand, .car-dexlist { gap: 18px; }
  .dash { width: min(94%, 760px); gap: 14px; }
  .dl { padding: 16px 10px 14px; gap: 12px; font-size: 15px; border-radius: 12px; }
  .dl > span { min-height: 34px; }
  .dl b { min-height: 28px; font-size: 14px; padding: 0 10px; }
  .dl .gauge { width: 70%; }
  .car-slot { width: 84px; height: 96px; } .car-slot em { font-size: 15px; } .car-slot.got em { font-size: 32px; }
  .dl .lamp { transform: scale(1.25); }
  .car-motor { font-size: 15px; } .car-motor i { width: 48px; height: 48px; }
  .rmeter { gap: 6px; }
  .rmeter .mt-lb { font-size: 13px; }
}
.rmeter > b { margin-top: 2px; }
#rm-plant .cnt, #rm-plant .rm-n { display: inline-flex; align-items: baseline; }
@media (max-width: 699px) { .dl { font-size: 13px; } }
@media (max-width: 420px) {
  .car-dexlist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .car-dexlist .wc-pick { padding: 6px 4px 4px; display: flex; justify-content: center; }
  .car-dexlist .wc-pick .mini { --m: 62px; }
}
.pt-pair { gap: clamp(16px, 4vw, 48px); }
@media (min-width: 601px) {
  .pt-pair .pt-wrap { flex: 0 1 440px; }
  .pt-pair .pt-side { flex: 0 1 340px; }
}
/* 카드 고르기 키 표시가 카드의 원자번호(왼쪽 위)를 덮지 않게 카드 위 가운데로 (Yui 11-16) */
.wc-pick { margin-top: 10px; }
.wc-pick kbd { left: 50%; top: -11px; transform: translateX(-50%); z-index: 2; background: #FFE08A; color: #4A2A00; box-shadow: 0 2px 0 rgba(0,0,0,.25); }

/* ===================== EP.03 탄소 (2026-11-16): 얼굴 · 반응 카드 · 시간 전환 · 숯불 · 대기 · 빵 · 탐지기 · 불꽃 ===================== */
.ph.dad { background-image: url(ui/face-dad.png); } .ph.mom { background-image: url(ui/face-mom.png); }
.reveal.glowc { background: radial-gradient(circle at 50% 45%, #3A3F66 0, #14182E 72%); }
.ccard.react { animation: cglow 1.2s ease-in-out infinite, wiggle .9s ease-in-out 2; }
@keyframes wiggle { 20% { transform: rotate(-3deg) } 40% { transform: rotate(3deg) } 60% { transform: rotate(-2deg) } 80% { transform: rotate(1deg) } }
.tskip { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: rgba(10,18,40,.92); color: #fff; animation: fadein .3s; }
.tskip.out { opacity: 0; transition: opacity .3s; }
.tskip b { font-size: clamp(30px, 8vw, 48px); font-weight: 900; }
.clock { position: relative; width: 120px; height: 120px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 8px #FFD36E; }
.clock .hand { position: absolute; left: 50%; bottom: 50%; width: 6px; margin-left: -3px; border-radius: 3px; background: #123E7A; transform-origin: 50% 100%; }
.clock .hand.m { height: 46px; animation: spin .7s linear 3; } .clock .hand.h { height: 30px; background: #E5484D; transform: rotate(90deg); }
.ice-safe { display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 14px; border-radius: 8px; background: rgba(255,255,255,.95); color: #12213B; }
.ice-safe p { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.5; }
.glove { flex: none; width: 56px; height: 64px; border-radius: 20px 20px 10px 10px; background: linear-gradient(#5FB2FF, #2F7CD6); box-shadow: inset 0 -12px 0 #123E7A; }
.lore-book { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lore-book li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.95); color: #12213B; font-size: 15px; font-weight: 800; line-height: 1.4; opacity: 0; animation: lorein .4s ease-out forwards; }
.lore-book li b { flex: none; min-width: 44px; height: 30px; padding: 0 6px; border-radius: 6px; background: #5B6B85; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
@keyframes lorein { from { opacity: 0; transform: translateX(-12px) } to { opacity: 1; transform: none } }
.wc-slot.got.c { background: #4A5366; box-shadow: 0 5px 0 #1C212B; }

/* 숯불 화력 */
.cg-scene { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 12px; background: linear-gradient(180deg, #8E9FD8, #3D3A5C); }
.cg { position: relative; width: min(60vw, 300px); height: 190px; }
.cg-box { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; border-radius: 8px; background: repeating-linear-gradient(90deg, #A0503A 0 30px, #8A4030 30px 32px); box-shadow: 0 6px 0 #5A2A1A; }
.cg-coals { position: absolute; left: 10%; right: 10%; bottom: 62px; height: 34px; display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.cg-coals i { width: 26px; height: 22px; border-radius: 6px 8px 5px 7px; background: radial-gradient(circle at 50% 70%, #FF5A1A 0, #3A1A12 70%); box-shadow: 0 0 0 rgba(255,90,26,0); transition: box-shadow .4s, filter .4s; filter: brightness(.6); }
.cg[data-lv="1"] .cg-coals i { filter: brightness(1); box-shadow: 0 0 10px rgba(255,90,26,.6); } .cg[data-lv="2"] .cg-coals i { filter: brightness(1.35); box-shadow: 0 0 18px rgba(255,120,40,.9); }
.cg-fl { position: absolute; left: 50%; bottom: 90px; width: 120px; height: 90px; margin-left: -60px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.cg-fl i { width: 28px; height: 20px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 50% 80%, #FFF3B0, #FFB347 45%, #FF5A1A 90%); transition: height .5s; animation: flick .35s ease-in-out infinite alternate; }
.cg-fl i:nth-child(2) { animation-delay: -.15s; }
.cg[data-lv="1"] .cg-fl i { height: 44px; } .cg[data-lv="2"] .cg-fl i { height: 78px; } .cg[data-lv="2"] .cg-fl i:nth-child(2) { height: 90px; }
@keyframes flick { to { transform: scaleY(.88) translateY(3px); } }
.cg-air { position: absolute; left: -36px; bottom: 70px; width: 60px; height: 50px; opacity: 0; transition: opacity .3s; }
.cg[data-lv="1"] .cg-air, .cg[data-lv="2"] .cg-air { opacity: 1; }
.cg-air i { position: absolute; left: 0; height: 3px; width: 34px; border-radius: 2px; background: rgba(255,255,255,.8); animation: airmv .7s linear infinite; }
.cg-air i:nth-child(2n) { top: 14px; animation-delay: -.3s; } .cg-air i:nth-child(3n) { top: 28px; animation-delay: -.5s; }
@keyframes airmv { from { transform: translateX(-10px); opacity: 0 } 50% { opacity: 1 } to { transform: translateX(40px); opacity: 0 } }
.cg-gauges { display: flex; flex-direction: column; gap: 10px; min-width: 180px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.92); color: #123E7A; font-size: 13px; font-weight: 900; }
.cg-gauges > div { display: flex; align-items: center; gap: 8px; } .cg-gauges span { min-width: 30px; }
.cg-gauges .bar { flex: 1; height: 12px; border-radius: 6px; background: #DDE6F2; overflow: hidden; } .cg-gauges .bar i { display: block; height: 100%; width: 15%; background: linear-gradient(90deg, #FFB347, #FF5A1A); }
.cg-lv { display: flex; gap: 4px; flex: 1; } .cg-lv i { flex: 1; height: 12px; border-radius: 3px; background: #DDE6F2; } .cg-lv i.on { background: #5FB2FF; }
.cg-gauges b { min-width: 34px; display: flex; justify-content: flex-end; }
.sky-ctl { display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 4px auto 8px; color: #fff; font-size: 14px; font-weight: 900; }
.sky-ctl input { flex: 1; height: 32px; accent-color: #FFD36E; }

/* 대기 개념 모형 */
.sky-scene { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 12px; background: radial-gradient(circle at 50% 40%, #1B2A5C, #070C22 75%); }
.sky-tag { position: absolute; left: 10px; top: 10px; z-index: 2; height: 26px; padding: 0 10px; border-radius: 5px; background: #FFD36E; color: #4A2A00; display: flex; align-items: center; font-size: 12px; font-weight: 900; }
.earth { position: relative; width: min(42vw, 200px); aspect-ratio: 1; }
.earth .atm { position: absolute; inset: -14%; border-radius: 50%; transition: background .6s, box-shadow .6s; }
.earth[data-lv="0"] .atm { background: radial-gradient(circle, transparent 62%, rgba(140,200,255,.25) 64%, transparent 74%); }
.earth[data-lv="1"] .atm { background: radial-gradient(circle, transparent 62%, rgba(140,200,255,.45) 64%, transparent 76%); }
.earth[data-lv="2"] .atm { background: radial-gradient(circle, transparent 62%, rgba(255,120,80,.6) 64%, transparent 80%); box-shadow: 0 0 40px rgba(255,90,60,.5); }
.earth .land { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7FD1FF, #2F7CD6 60%, #123E7A); overflow: hidden; }
.earth .land::after { content: ""; position: absolute; left: 22%; top: 28%; width: 40%; height: 30%; border-radius: 40% 60% 50% 50%; background: #5CC08F; box-shadow: 30px 50px 0 -6px #5CC08F; }
.co2s { position: absolute; inset: -18%; }
.co2s b { position: absolute; font: 900 11px/1 var(--num); color: #E8ECF6; opacity: 0; transition: opacity .4s; }
.co2s b:nth-child(1) { left: 2%; top: 20%; } .co2s b:nth-child(2) { right: 0; top: 30%; } .co2s b:nth-child(3) { left: 40%; top: 0; } .co2s b:nth-child(4) { left: 6%; bottom: 14%; } .co2s b:nth-child(5) { right: 6%; bottom: 10%; } .co2s b:nth-child(6) { left: 46%; bottom: -2%; } .co2s b:nth-child(7) { left: -4%; top: 52%; } .co2s b:nth-child(8) { right: -6%; top: 58%; } .co2s b:nth-child(9) { left: 74%; top: 4%; }
.earth[data-lv="0"] .co2s b:nth-child(-n+1) { opacity: 1; } .earth[data-lv="1"] .co2s b:nth-child(-n+3) { opacity: 1; } .earth[data-lv="2"] .co2s b { opacity: 1; color: #FFB08A; }
.thermo { position: relative; width: 26px; height: 150px; border-radius: 13px; background: #fff; box-shadow: 0 0 0 3px #C9D4E8; }
.thermo i { position: absolute; left: 6px; right: 6px; bottom: 6px; border-radius: 7px; background: #FF5A5A; transition: height .6s; }
.thermo[data-lv="0"] i { height: 30%; background: #5FB2FF; } .thermo[data-lv="1"] i { height: 50%; background: #FFB733; } .thermo[data-lv="2"] i { height: 85%; }
.thermo span { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; color: #fff; font-size: 12px; font-weight: 900; }

/* 빵 */
.br-scene { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 12px; background: linear-gradient(180deg, #FFF4E2, #F0DCC0); }
.oven { position: relative; width: 210px; height: 160px; border-radius: 12px; background: #4A5366; box-shadow: 0 8px 0 #2A3040; }
.oven .win { position: absolute; left: 18px; right: 18px; top: 22px; bottom: 22px; border-radius: 8px; background: #1C2230; transition: background .5s, box-shadow .5s; }
.oven.on .win { background: radial-gradient(circle at 50% 80%, #FFB060, #8A3A10 80%); box-shadow: inset 0 0 20px rgba(255,160,60,.8); }
.dough { position: absolute; left: 50%; bottom: 32px; width: 90px; height: 40px; margin-left: -45px; border-radius: 50% 50% 14px 14px; background: radial-gradient(circle at 40% 30%, #FFF6E0, #F2D9A6); transform-origin: 50% 100%; transition: transform 1.2s cubic-bezier(.2,.9,.3,1.1), background .8s; }
.dough.soda::after { content: ""; position: absolute; left: 30%; top: 30%; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 14px 4px 0 #fff, 26px -2px 0 #fff; }
.dough.rise { transform: scale(1.3, 1.45); } .dough.done { transform: scale(1.35, 1.6); background: radial-gradient(circle at 40% 30%, #F2C478, #C67A2A); }
.cut { width: 190px; padding: 10px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 4px #E0A23B; color: #6B4300; font-size: 12px; font-weight: 900; text-align: center; }
.crumb { position: relative; height: 110px; margin-top: 6px; border-radius: 50% 50% 12px 12px; background: #F2D9A6; overflow: hidden; }
.crumb i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #FFF8EA; box-shadow: inset 0 0 0 2px #E0C08A; transform: scale(0); }
.cut.rise .crumb i { animation: bubin .5s ease-out forwards; }
.crumb i:nth-child(1) { left: 12%; top: 50%; } .crumb i:nth-child(2) { left: 30%; top: 30%; } .crumb i:nth-child(3) { left: 50%; top: 58%; } .crumb i:nth-child(4) { left: 70%; top: 36%; } .crumb i:nth-child(5) { left: 84%; top: 62%; } .crumb i:nth-child(6) { left: 22%; top: 72%; } .crumb i:nth-child(7) { left: 44%; top: 22%; width: 14px; height: 14px; } .crumb i:nth-child(8) { left: 62%; top: 74%; } .crumb i:nth-child(9) { left: 8%; top: 28%; } .crumb i:nth-child(10) { left: 76%; top: 16%; } .crumb i:nth-child(11) { left: 36%; top: 48%; width: 16px; height: 16px; } .crumb i:nth-child(12) { left: 56%; top: 40%; } .crumb i:nth-child(13) { left: 90%; top: 40%; } .crumb i:nth-child(14) { left: 26%; top: 12%; }
.crumb i:nth-child(n) { animation-delay: calc(var(--d, 0) * 1ms); }
.cut.rise .crumb i:nth-child(2n) { animation-delay: .4s; } .cut.rise .crumb i:nth-child(3n) { animation-delay: .8s; } .cut.rise .crumb i:nth-child(5n) { animation-delay: 1.2s; }
@keyframes bubin { to { transform: scale(1); } }
.pact > b { font-size: 15px; }

/* 드라이아이스 탐지 */
.dt3-scene { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 12px; background: linear-gradient(180deg, #E8ECF6, #C9D4E8); }
.cbox { position: relative; width: 190px; height: 210px; border-radius: 6px; border: 6px solid #5B6B85; border-top-width: 0; background: #F7FAFE; display: flex; flex-direction: column; }
.cbox .lid { position: absolute; left: -10px; top: -26px; height: 22px; padding: 0 8px; border-radius: 4px; background: #5B6B85; color: #fff; font-size: 11px; font-weight: 900; display: flex; align-items: center; transform: rotate(-6deg); }
.bzone { flex: 1; position: relative; border-bottom: 2px dashed #C9D4E8; cursor: pointer; }
.bzone:last-of-type { border-bottom: 0; }
.bzone em { position: absolute; left: 8px; top: 6px; font-style: normal; font-size: 12px; font-weight: 900; color: #6B7891; }
.bzone.cur { background: rgba(95,178,255,.12); } .bzone.found { background: rgba(63,224,160,.22); }
.probe { position: absolute; right: -34px; width: 56px; height: 44px; border-radius: 8px; background: #123E7A; box-shadow: 0 4px 0 #0A1A36; cursor: grab; touch-action: none; transition: top .25s; }
.probe i { position: absolute; left: 8px; right: 8px; top: 8px; height: 16px; border-radius: 3px; background: #3FE0A0; }
.probe[data-z="0"] { top: calc(16.6% - 22px); } .probe[data-z="1"] { top: calc(50% - 22px); } .probe[data-z="2"] { top: calc(83.3% - 22px); }
.probe.shake { animation: shake .4s; }
.dt-side { display: flex; flex-direction: column; gap: 10px; width: 180px; }
.mag { padding: 8px; border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px; background: #0B2148; color: #fff; text-align: center; font-size: 11px; font-weight: 900; box-shadow: 0 0 0 4px #5FB2FF; }
.mag .mol { min-height: 70px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; margin-top: 6px; }
.mag .mol b { padding: 3px 6px; border-radius: 10px; background: #5B6B85; font: 900 12px/1 var(--num); }
.sig { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 900; color: #123E7A; }
.sigb { display: flex; align-items: flex-end; gap: 3px; height: 26px; } .sigb i { width: 10px; background: #DDE6F2; border-radius: 2px; } .sigb i:nth-child(1) { height: 8px; } .sigb i:nth-child(2) { height: 14px; } .sigb i:nth-child(3) { height: 20px; } .sigb i:nth-child(4) { height: 26px; }
.sigb i.on { background: #3FA06E; }

/* 불꽃 3지선다 · 가상 소화 */
.fa-scene { display: flex; align-items: center; justify-content: center; padding: 12px; background: radial-gradient(circle at 50% 40%, #3A3F66, #14182E 75%); }
.fa-cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.fa-c { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px 8px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); cursor: pointer; }
.fa-c .mini { --m: min(96px, 24vw); pointer-events: none; }
.fa-c small { min-height: 18px; color: #fff; font-size: 13px; font-weight: 900; display: flex; align-items: center; }
.fa-c kbd { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; border-radius: 4px; background: rgba(255,255,255,.85); color: #123E7A; display: flex; align-items: center; justify-content: center; font: 800 11px/1 var(--num); }
.fa-c.no { background: rgba(229,72,77,.25); } .fa-c.ok { background: rgba(63,224,160,.3); box-shadow: 0 0 0 3px #3FE0A0; } .fa-c.shake { animation: shake .4s; }
@media (pointer: coarse) { .fa-c kbd { display: none; } }
.fb-scene { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; padding: 12px; background: linear-gradient(180deg, #E8ECF6, #B7C3D8); }
.vjar { position: relative; width: 180px; height: 200px; border-radius: 16px 16px 10px 10px; border: 4px solid rgba(255,255,255,.95); background: rgba(220,236,255,.35); }
.candle { position: absolute; left: 50%; bottom: 0; width: 40px; margin-left: -20px; height: 150px; }
.candle .body { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; border-radius: 6px 6px 2px 2px; background: #FFF6E0; box-shadow: inset -6px 0 0 #EADBB8; }
.candle .wick { position: absolute; left: 50%; bottom: 80px; width: 3px; height: 10px; margin-left: -1.5px; background: #333; }
.candle .fl { position: absolute; left: 50%; bottom: 88px; width: 26px; height: 50px; margin-left: -13px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 50% 75%, #FFF8C8, #FFB347 45%, #FF6A2A 85%); transform-origin: 50% 100%; transition: transform .5s, opacity .5s; animation: flick .3s ease-in-out infinite alternate; }
.candle[data-o="2"] .fl { transform: scale(.75); } .candle[data-o="1"] .fl { transform: scale(.45); } .candle.out .fl { transform: scale(0); opacity: 0; }
.gasdots { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-wrap: wrap-reverse; gap: 4px; }
.gasdots b { padding: 3px 6px; border-radius: 10px; background: #5B6B85; color: #fff; font: 900 11px/1 var(--num); animation: bubin .3s ease-out; transform: scale(1); }
.o2m { display: flex; flex-direction: column; gap: 6px; width: 170px; padding: 10px; border-radius: 8px; background: #fff; color: #123E7A; font-size: 12px; font-weight: 900; }
.o2m .cg-lv i.on { background: #FF8A7A; }

.title { background: radial-gradient(circle at 72% 46%, #FFD9A0 0, #B9A2E0 36%, #6F6FB8 66%, #262A55 100%); }
.fa-c .mini { --m: min(120px, 26vw); }
.dt3-scene .cbox { height: min(210px, calc(100% - 40px)); min-height: 150px; }
.lore-book.small { margin: 10px 0; gap: 6px; } .lore-book.small li { opacity: 1; animation: none; font-size: 13px; padding: 6px 8px; } .lore-book.small li b { min-width: 38px; height: 24px; font-size: 12px; } .lore-book.small li.lk { opacity: .6; }
.title .ep small { font-size: .42em; margin-left: .08em; letter-spacing: 0; }

/* ===== EP.03 퍼즐 다듬기 (Yui 2026-11-16, EP.02 v2 틀과 같은 760px 기둥·카드 칸·키 표시) =====
   큰 화면: 폰 크기로 그려진 장면(숯불·탐지 상자·3지선다 카드·가상 실험 병)을 1.4배로. 화면 높이 700 이상일 때만
   하늘: CO₂ 글자가 온도계를 덮지 않게 사이를 띄움. 빵 360: 오븐과 단면 창을 나란히 줄여 장면 안에 다 보이게
   3지선다: 키 표시가 카드 원자번호 자리를 덮지 않게 카드 위 가운데로(EP.02 카드 고르기와 같음) */
@media (min-width: 900px) and (min-height: 700px) {
  .cg-scene > *, .dt3-scene > *, .fb-scene > .vjar, .fb-scene > .o2m, .fa-cards { zoom: 1.4; }
  .cg-scene, .dt3-scene, .fb-scene { gap: 32px; }
}
.sky-scene { gap: clamp(44px, 9vw, 72px); }
@media (max-width: 520px) {
  .br-scene { flex-wrap: nowrap; gap: 12px; }
  .br-scene > .oven, .br-scene > .cut { zoom: .72; flex: none; }
}
.fa-c { margin-top: 10px; }
.fa-c kbd { left: 50%; top: -11px; transform: translateX(-50%); z-index: 2; background: #FFE08A; color: #4A2A00; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
/* 전체 화면 단추 (2026-11-16): 오른쪽 위 고정, 네모 단추(알약 아님), 아이콘 상하좌우 가운데 */
.fs-btn { width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; background: rgba(10,18,40,.62); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fs-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fs-btn:hover { background: rgba(10,18,40,.85); border-color: rgba(255,255,255,.7); }
.fs-btn:focus-visible { outline: 2px solid #FFD36E; outline-offset: 2px; }
.fs-fixed { position: fixed; z-index: 2147483000; }
.fs-fixed { top: calc(12px + var(--safe-t, 0px)); right: 12px; }
body:not([data-mode="title"]) .fs-fixed { display: none; }
.icon-btn.fs-hud svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.title .fs-hint { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.82); }
.gate-panel .gate-links { flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gate-panel .gate-links .btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.gate-panel .row + .row { margin-top: 12px; }
.sheet:has(.gate-panel) { z-index: 5; } /* 첫 화면 위에 뜨는 순서 잠금 창: 첫 화면 그림(.tt-in z-index 1) 위로 */

/* ---- 원소 탐지기(걸을 때 오른쪽 아래): 가까울수록 막대가 차고 불빛이 빨리 깜빡인다. '조사' 버튼은 없앴다 ---- */
#btn-act { display: none; }
#det { position: absolute; right: 16px; bottom: calc(56px + var(--safe-b)); z-index: 6; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px 0 12px; border-radius: 12px; background: #16233F; box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(0,0,0,.28); color: #fff; pointer-events: none; }
#det[hidden] { display: none; }
#det .det-led { width: 14px; height: 14px; border-radius: 50%; background: #3A4A6A; box-shadow: 0 0 0 3px #0B1426; }
#det .det-in { display: grid; grid-template-columns: auto auto; grid-template-rows: 22px 22px; column-gap: 10px; align-items: center; }
#det b { font-size: 13px; font-weight: 900; letter-spacing: .02em; line-height: 22px; }
#det .det-bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; justify-self: end; }
#det .det-bars s { display: block; width: 6px; border-radius: 2px; background: #3A4A6A; text-decoration: none; }
#det .det-bars s:nth-child(1) { height: 6px; } #det .det-bars s:nth-child(2) { height: 9px; } #det .det-bars s:nth-child(3) { height: 12px; } #det .det-bars s:nth-child(4) { height: 16px; } #det .det-bars s:nth-child(5) { height: 20px; }
#det .det-msg { grid-column: 1 / 3; font-size: 12px; font-weight: 700; color: #B9C6DE; line-height: 22px; white-space: nowrap; }
#det[data-level="1"] s:nth-child(-n+1), #det[data-level="2"] s:nth-child(-n+2), #det[data-level="3"] s:nth-child(-n+3), #det[data-level="4"] s:nth-child(-n+4), #det[data-level="5"] s:nth-child(-n+5) { background: #6EE7A8; }
#det:not([data-level="0"]) .det-led { background: #6EE7A8; animation: detblink var(--blink, 1.2s) ease-in-out infinite; }
#det[data-level="5"] .det-msg, #det[data-level="4"] .det-msg { color: #FFE08A; }
@keyframes detblink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #det .det-led { animation: none !important; } }
@media (max-width: 520px) { #det { right: 12px; bottom: auto; top: calc(122px + var(--safe-t)); height: 58px; } }   /* 좁은 화면: 방향 버튼과 안 겹치게 할 일 줄 아래 오른쪽 */

/* 화면 UI는 맵 간판 위에 떠 있는 것이 분명하게: 남색 테(흰 칸)·흰 테(남색 칸) + 그림자 (2026-11-16 충쌤 "인터페이스랑 맵 간판에 색 차이 필요해") */
.hud-goal { box-shadow: 0 0 0 2px #123E7A, 0 4px 10px rgba(0,0,0,.25); }
.hud-btns .icon-btn { box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.25); }

/* ---- 원소 탐지기(휴대용 가스 감지기 모양): 센서 머리 + 몸통 + 남색 화면(막대·문구) + 경고등(초록 → 노랑 → 빨강) + 손잡이 ---- */
#det.dev { display: block; height: auto; width: 176px; padding: 8px 10px 10px; border-radius: 12px 12px 10px 10px; background: #DDEBFF; box-shadow: 0 0 0 2px #123E7A, 0 -3px 0 #8FA9CC inset, 0 6px 14px rgba(0,0,0,.3); color: #123E7A; }
#det.dev[hidden] { display: none; }
#det.dev .det-head { position: absolute; left: 22px; top: -16px; width: 34px; height: 18px; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(90deg, #5A6B88 0 3px, #8FA9CC 3px 6px); box-shadow: 0 0 0 2px #123E7A; }
#det.dev .det-grip { position: absolute; right: 26px; bottom: -14px; width: 46px; height: 14px; border-radius: 0 0 8px 8px; background: #8FA9CC; box-shadow: 0 0 0 2px #123E7A; }
#det.dev .det-top { display: flex; align-items: center; gap: 8px; height: 22px; }
#det.dev .det-top b { font-size: 13px; font-weight: 900; line-height: 22px; color: #123E7A; }
#det.dev .det-led { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #9AA8C0; box-shadow: 0 0 0 2px #123E7A; animation: none; }
#det.dev .det-scr { margin-top: 6px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 6px; background: #0B2148; }
#det.dev .det-bars { height: 22px; justify-self: start; } #det.dev .det-bars s { background: #2A4370; }
#det.dev .det-msg { grid-column: auto; color: #DDEBFF; font-size: 12px; font-weight: 800; line-height: 1.25; white-space: normal; word-break: keep-all; }
#det.dev[data-level="1"] .det-led, #det.dev[data-level="2"] .det-led { background: #3FE0A0; animation: detblink var(--blink, 1.2s) ease-in-out infinite; }
#det.dev[data-level="3"] .det-led, #det.dev[data-level="4"] .det-led { background: #FFD23A; animation: detblink var(--blink, .7s) ease-in-out infinite; }
#det.dev[data-level="5"] .det-led { background: #FF5A5A; box-shadow: 0 0 0 2px #123E7A, 0 0 10px #FF5A5A; animation: detblink var(--blink, .3s) ease-in-out infinite; }
#det.dev[data-level="1"] s:nth-child(-n+1), #det.dev[data-level="2"] s:nth-child(-n+2) { background: #3FE0A0; }
#det.dev[data-level="3"] s:nth-child(-n+3), #det.dev[data-level="4"] s:nth-child(-n+4) { background: #FFD23A; }
#det.dev[data-level="5"] s:nth-child(-n+5) { background: #FF5A5A; }
#det.dev[data-level="4"] .det-msg, #det.dev[data-level="5"] .det-msg { color: #FFE08A; }
@media (max-width: 520px) { #det.dev { width: 150px; height: auto; } #det.dev .det-msg { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { #det.dev .det-led { animation: none !important; } }

/* ---- 저울 접시: 오목한 그릇 → 납작한 평판 (2026-11-16 충쌤 "저울 그릇모양 평면으로 수정해 오목한 그릇말고") ----
   병 밑면(슬롯 바닥 23.5u)이 판 윗면에 닿는다. 테두리는 아주 낮게, 판 아래에 그림자. 양쪽 같은 크기 */
.sb-bowl { top: calc(23.1 * var(--u)); height: calc(2.2 * var(--u)); border-radius: calc(.7 * var(--u)); background: linear-gradient(180deg, #F6F9FD 0 22%, #C9D5E3 22% 70%, #93A4BB); box-shadow: 0 calc(.7 * var(--u)) 0 #5F6F88, 0 calc(1.8 * var(--u)) calc(1.4 * var(--u)) rgba(34,51,90,.22); }
.sb-rods::before, .sb-rods::after { height: calc(27.4 * var(--u)); }
.sb-rods::before { transform: rotate(32deg); } .sb-rods::after { transform: rotate(-32deg); }
.sb-hang { height: calc(26 * var(--u)); }
/* 병이 판에 닿는 자리의 그림자 */
.sb-slot::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: calc(-.35 * var(--u)); height: calc(.9 * var(--u)); border-radius: 50%; background: rgba(34,51,90,.28); z-index: -1; }
.sb-slot { z-index: 1; }
@media (max-width: 520px) {
  .sb-bowl { top: calc(27.1 * var(--u)); height: calc(2.4 * var(--u)); }
  .sb-rods::before, .sb-rods::after { height: calc(31.8 * var(--u)); }
  .sb-rods::before { transform: rotate(31.5deg); } .sb-rods::after { transform: rotate(-31.5deg); }
  .sb-hang { height: calc(30 * var(--u)); }
}

/* ---- 실험 다시 하기: 위쪽 머리 줄의 작은 보조 버튼(주 버튼과 헷갈리지 않게 테두리만) + 지난 회차 노트 ---- */
.pz-again { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.08); color: #DDEBFF; font-size: 14px; font-weight: 800; box-shadow: 0 0 0 2px rgba(221,235,255,.55) inset; }
.pz-again svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pz-again em { font-style: normal; display: flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; background: #FFD36E; color: #4A2A00; font-size: 12px; font-weight: 900; }
.pz-again:active { transform: translateY(1px); }
.pz-note .nt-prev { margin-top: 6px; padding-top: 6px; border-top: 2px dashed rgba(90,60,30,.3); }
.pz-note .nt-prev b { display: flex; align-items: center; min-height: 22px; font-size: 13px; font-weight: 900; color: #8A5A00; margin: 0; }
.pz-note .nt-prev .nt.old { color: rgba(58,36,16,.6); } .pz-note .nt-prev .nt.old i { color: rgba(26,91,168,.7); }
@media (max-width: 520px) { .pz-again { height: 28px; padding: 0 7px; font-size: 12px; gap: 4px; } .pz-again span { display: none; } .pz-note:not(.open) .nt-prev { display: none; } }

/* 대화창 초상 칸: 아이콘은 칸 한가운데, 칸은 늘 글자 왼쪽 자리를 지킨다 (2026-11-16 충쌤 "이거 이미지 곂친다 수정해") */
.talk-face { position: relative !important; inset: auto !important; flex: none; }
.talk-face.sys { display: flex; align-items: center; justify-content: center; padding: 0; }
.talk-face.sys b { display: flex; align-items: center; justify-content: center; }
.talk-face .ic-call { width: 1em; height: 1em; line-height: 1; }

/* ---- 대사 속 카드 칩: 색 띠(기호·분자식) + 이름. 모서리 4px, 글자는 위아래 가운데 (2026-11-16 충쌤 "카드처럼 보이게 해") ---- */
.cchip { display: inline-flex; align-items: stretch; vertical-align: middle; height: 1.5em; margin: -.2em .22em 0; border-radius: 4px; background: #FFF8E8; box-shadow: 0 0 0 2px var(--cc, #6B7891), 0 2px 0 rgba(0,0,0,.25); overflow: hidden; white-space: nowrap; text-shadow: none; line-height: 1; }
.cchip i { display: flex; align-items: center; justify-content: center; min-width: 1.5em; padding: 0 .38em; background: var(--cc, #6B7891); color: #fff; font-style: normal; font-size: .82em; font-weight: 900; letter-spacing: 0; }
.cchip b { display: flex; align-items: center; padding: 0 .45em; color: #2A2018; font-size: .84em; font-weight: 900; }
.cc-H, .cc-hydrogen_gas { --cc: #2F7CD6; } .cc-O, .cc-oxygen_gas { --cc: #E5484D; } .cc-C, .cc-carbon_dioxide { --cc: #4A5366; }
.cc-water { --cc: #2F9ED6; } .cc-air { --cc: #6FA6C8; } .cc-unknown_o2 { --cc: #6B7891; } .cc-baking_soda { --cc: #C98A3A; }

/* ===== 카드 머리 · 설명 띠 · 그림 상자 간격 (충쌤 11-16 "카드 헤드랑 박스랑 곂쳐") =====
   머리 색은 .in 의 고정 9em 그라디언트가 아니라 머리 자체가 칠한다. 그래서 그림 상자는 늘 색 영역 밖에서 시작한다. */
.cz .card.sub .in { background: var(--paper); }
.cz .card.sub .hd { background: var(--c2); row-gap: max(12px, 1.2em); padding: max(12px, 1.2em) .8em max(12px, 1.2em); }
.cz .card.sub.lock .hd { background: none; }
.cz .card.sub .in > .art { margin-top: max(12px, 1.2em); }
.cz .card:not(.sub) .hd { padding-bottom: max(12px, 1.2em); }
.cz .card.sub .hd .fm { line-height: 1; padding-top: 0; padding-bottom: 0; }
.cz .card.sub .hd .nm { display: flex; align-items: center; min-height: 1.9em; margin: 0; }

/* ===== 숯불 그릴 그림 2판 (충쌤 11-16 "이것도 그래픽 다시 만들어줘") =====
   공기 단계(data-lv 0·1·2)에 따라 숯의 붉은 빛(--glow), 재(--ash), 불꽃 높이(--fh), 불티 수가 함께 바뀐다 */
.cg-scene { background: linear-gradient(180deg, #2B3A6B 0, #4A4877 55%, #5A4A6A 100%); }
.cg.cg2 { width: min(78vw, 340px); height: auto; aspect-ratio: 340 / 240; --glow: .22; --ash: .92; --fh: .14; --hz: .15; }
.cg.cg2[data-lv="1"] { --glow: .6; --ash: .6; --fh: .5; --hz: .4; }
.cg.cg2[data-lv="2"] { --glow: 1; --ash: .28; --fh: .88; --hz: .7; }
.cg-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cg-svg .gnd { fill: rgba(20,26,40,.35); } .cg-svg .gsh { fill: rgba(0,0,0,.3); }
.cg-svg .legs path { stroke: #2A2F3C; stroke-width: 6; stroke-linecap: round; fill: none; }
.cg-svg .b1 { fill: #3A4152; } .cg-svg .b2 { fill: #4B5468; } .cg-svg .b3 { fill: #5E687E; }
.cg-svg .rim { fill: #727C92; } .cg-svg .rimhi { fill: #A9B2C4; }
.cg-svg .vent polygon { fill: #14110F; } .cg-svg .ventg polygon { fill: #FF7A2A; opacity: calc(var(--glow) * .5); transition: opacity .6s; }
.cg-svg .grate polygon { fill: none; stroke: #8E97AB; stroke-width: 3; stroke-linejoin: round; } .cg-svg .grate path { stroke: #6C7589; stroke-width: 2; fill: none; }
.cg-svg .halo { opacity: var(--glow); transition: opacity .6s; }
.cg-svg .coal .cb { fill: #231A19; } .cg-svg .coal .cs { fill: #35282A; }
.cg-svg .coal .cgl { fill: url(#cgCore); opacity: var(--glow); transition: opacity .6s; animation: cgpulse 1.6s ease-in-out infinite alternate; }
.cg-svg .coal:nth-of-type(2n) .cgl { animation-delay: -.7s; } .cg-svg .coal:nth-of-type(3n) .cgl { animation-delay: -1.2s; }
.cg-svg .coal .cash { fill: #CFC9C2; opacity: var(--ash); transition: opacity .8s; }
.cg-svg .coal .ccr { fill: none; stroke: #FF6A22; stroke-width: 1.4; stroke-linejoin: round; opacity: calc(.35 + var(--glow) * .65); transition: opacity .6s; }
@keyframes cgpulse { from { filter: brightness(.86); } to { filter: brightness(1.12); } }
.cg-svg .fl-s { transform: scale(var(--fh)); transform-box: fill-box; transform-origin: 50% 100%; transition: transform .7s cubic-bezier(.3,.7,.3,1); }
.cg-svg .fl-w { transform-box: fill-box; transform-origin: 50% 100%; animation: cgflick .45s ease-in-out infinite alternate; }
@keyframes cgflick { 0% { transform: scale(.94, .9) skewX(-5deg); } 50% { transform: scale(1.04, 1) skewX(2deg); } 100% { transform: scale(.98, 1.1) skewX(6deg); } }
.cg-svg .f3 { fill: #E8452A; } .cg-svg .f2 { fill: #FF9A2E; } .cg-svg .f1 { fill: #FFE27A; }
.cg-svg .spk { fill: #FFD27A; opacity: 0; } .cg-svg .afl { fill: #D9D4CE; opacity: 0; }
.cg2[data-lv="1"] .spk:not(.s2), .cg2[data-lv="2"] .spk { animation: cgspark 2s linear infinite; }
@keyframes cgspark { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 70% { opacity: .9; } 100% { transform: translate(var(--dx), -86px); opacity: 0; } }
.cg2[data-lv="2"] .afl { animation: cgash 2.8s linear infinite; }
@keyframes cgash { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 12% { opacity: .85; } 100% { transform: translate(74px, -34px) rotate(200deg); opacity: 0; } }
.cg-svg .smk circle { animation: cgsmoke 4.8s linear infinite; opacity: 0; }
@keyframes cgsmoke { 0% { transform: translate(0, 30px) scale(.6); opacity: 0; } 25% { opacity: .55; } 100% { transform: translate(14px, -30px) scale(1.25); opacity: 0; } }
.cg-svg .haze { opacity: var(--hz); transition: opacity .6s; } .cg-svg .haze path { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 2; stroke-linecap: round; animation: cghaze 1.8s ease-in-out infinite alternate; }
@keyframes cghaze { from { transform: translate(-2px, 4px); } to { transform: translate(3px, -6px); } }
.cg-svg .fan .fh { stroke: #8A5A2B; stroke-width: 5; stroke-linecap: round; } .cg-svg .fan .fp { fill: #F3E3B8; stroke: #B5823F; stroke-width: 2.5; stroke-linejoin: round; } .cg-svg .fan .fr { stroke: #C9A268; stroke-width: 1.2; fill: none; }
.cg-svg .fan-w { transform-origin: 50px 204px; transform: rotate(-4deg); }
.cg2[data-lv="1"] .fan-w { animation: cgfan .9s ease-in-out infinite; } .cg2[data-lv="2"] .fan-w { animation: cgfan .5s ease-in-out infinite; }
.cg2.swing .fan-w { animation: cgfan .45s ease-in-out 1; }
@keyframes cgfan { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(12deg); } }
.cg-svg .air path { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 14 44; opacity: 0; }
.cg2[data-lv="1"] .air path:not(.a2), .cg2[data-lv="2"] .air path { opacity: 1; animation: cgair .9s linear infinite; }
.cg2[data-lv="2"] .air path { animation-duration: .55s; }
@keyframes cgair { from { stroke-dashoffset: 58; } to { stroke-dashoffset: 0; } }
/* 계기판: 원소 탐지기(#det.dev)와 같은 하늘색 몸통 · 남색 테두리 · 어두운 화면 */
.cg-gauges.v2 { position: relative; display: block; min-width: 0; width: 188px; padding: 8px 10px 10px; border-radius: 12px 12px 10px 10px; background: #DDEBFF; box-shadow: 0 0 0 2px #123E7A, 0 -3px 0 #8FA9CC inset, 0 6px 14px rgba(0,0,0,.3); color: #123E7A; font-size: 13px; font-weight: 900; }
.cg-gauges.v2 .cgm-top { display: flex; align-items: center; gap: 8px; height: 22px; }
.cg-gauges.v2 .cgm-top em { font-style: normal; line-height: 22px; }
.cg-gauges.v2 .cgm-led { width: 10px; height: 10px; border-radius: 50%; background: #6EE7A8; box-shadow: 0 0 0 2px #123E7A; }
.cg-gauges.v2 .cgm-scr { align-items: stretch; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #16233F; box-shadow: 0 0 0 2px #0B1426 inset; display: flex; flex-direction: column; gap: 8px; }
.cg-gauges.v2 .cgm-row { display: flex; align-items: center; gap: 8px; height: 22px; color: #fff; }
.cg-gauges.v2 .cgm-row span { min-width: 30px; line-height: 22px; color: #B9C6DE; } .cg-gauges.v2 .cgm-row b { min-width: 30px; display: flex; justify-content: flex-end; line-height: 22px; color: #FFE08A; }
.cg-gauges.v2 .cg-lv { align-items: flex-end; height: 18px; gap: 4px; } .cg-gauges.v2 .cg-lv i { border-radius: 2px; background: #3A4A6A; height: 8px; }
.cg-gauges.v2 .cg-lv i:nth-child(2) { height: 13px; } .cg-gauges.v2 .cg-lv i:nth-child(3) { height: 18px; } .cg-gauges.v2 .cg-lv i.on { background: #6EE7A8; }
.cg-gauges.v2 .bar { height: 12px; border-radius: 3px; background: #3A4A6A; } .cg-gauges.v2 .bar i { background: linear-gradient(90deg, #FFB347, #FF5A1A); }
@media (max-width: 520px) { .cg.cg2 { width: min(70vw, 250px); } .cg-scene { gap: 14px; padding: 8px; } }
@media (max-width: 520px) and (max-height: 700px) { .cg.cg2 { width: min(50vw, 180px); } .cg-scene { gap: 8px; padding: 6px; } .cg-gauges.v2 { padding: 4px 8px 8px; } .cg-gauges.v2 .cgm-scr { padding: 6px 8px; gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .cg-svg * { animation: none !important; } .cg2[data-lv="1"] .spk:not(.s2), .cg2[data-lv="2"] .spk { opacity: .9; } .cg2[data-lv] .air path { stroke-dasharray: none; } }
@media (min-width: 900px) and (min-height: 700px) and (max-height: 820px) { .cg.cg2 { width: 230px; } }

/* ===== 하늘과 대기 2판: 진짜 대륙 지구 · 대기층 · CO₂ 분자 알갱이 · 햇빛과 열 화살표 · 눈금 온도계 (충쌤 11-16 "여기 지구 그래픽 다시") ===== */
.sky-scene { gap: 18px; flex-wrap: wrap; align-content: center; background:
  radial-gradient(1.5px 1.5px at 8% 22%, rgba(255,255,255,.55), transparent 60%), radial-gradient(1px 1px at 17% 71%, rgba(255,255,255,.4), transparent 60%),
  radial-gradient(1.5px 1.5px at 29% 12%, rgba(255,255,255,.35), transparent 60%), radial-gradient(1px 1px at 38% 86%, rgba(255,255,255,.45), transparent 60%),
  radial-gradient(1px 1px at 52% 7%, rgba(255,255,255,.4), transparent 60%), radial-gradient(1.5px 1.5px at 64% 90%, rgba(255,255,255,.35), transparent 60%),
  radial-gradient(1px 1px at 73% 16%, rgba(255,255,255,.5), transparent 60%), radial-gradient(1.5px 1.5px at 84% 66%, rgba(255,255,255,.4), transparent 60%),
  radial-gradient(1px 1px at 92% 30%, rgba(255,255,255,.45), transparent 60%), radial-gradient(1px 1px at 95% 84%, rgba(255,255,255,.3), transparent 60%),
  radial-gradient(1px 1px at 4% 52%, rgba(255,255,255,.3), transparent 60%), radial-gradient(1px 1px at 46% 95%, rgba(255,255,255,.3), transparent 60%),
  radial-gradient(circle at 50% 40%, #16224C, #060A1C 75%); }
.sk-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sk2 { position: relative; width: min(86vw, 360px); aspect-ratio: 360 / 260; flex: none; }
.sk-earth { position: absolute; left: 32.78%; top: 22.31%; width: 40%; height: auto; aspect-ratio: 1; }
.sk-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sk-svg .atm { opacity: 0; transition: opacity .7s; }
.sk2[data-lv="0"] .a0, .sk2[data-lv="1"] .a1, .sk2[data-lv="2"] .a2 { opacity: 1; }
.sk-svg .sun { fill: none; stroke: #FFD84D; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 9 6; animation: skflow 1.1s linear infinite; }
.sk-svg .ray path { fill: none; stroke: #FF6A5A; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity .5s; }
.sk-svg .ray .ret { opacity: 0; } .sk-svg .ray .esc { opacity: 1; }
.sk2[data-lv="1"] .r1 .ret, .sk2[data-lv="2"] .r0 .ret, .sk2[data-lv="2"] .r1 .ret { opacity: 1; }
.sk2[data-lv="1"] .r1 .esc, .sk2[data-lv="2"] .r0 .esc, .sk2[data-lv="2"] .r1 .esc { opacity: 0; }
@keyframes skflow { from { stroke-dashoffset: 15; } to { stroke-dashoffset: 0; } }
.sk-svg .mol { opacity: 0; transition: opacity .6s; } .sk-svg .mol.g0 { opacity: 1; }
.sk2[data-lv="1"] .mol.g1, .sk2[data-lv="2"] .mol.g1, .sk2[data-lv="2"] .mol.g2 { opacity: 1; }
.sk-svg .mo { fill: #E8392B; stroke: #7A1410; stroke-width: .6; } .sk-svg .mc { fill: #2B2B2E; stroke: #B8C0CC; stroke-width: .8; }
.sk-svg .molb { animation: skbob 3s ease-in-out infinite alternate; }
@keyframes skbob { from { transform: translate(-1.5px, 1.5px); } to { transform: translate(1.5px, -1.5px); } }
.sk-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; color: #DCE6F7; font-size: 12px; font-weight: 800; }
.sk-leg span { display: flex; align-items: center; gap: 6px; height: 22px; line-height: 22px; } .sk-leg svg { width: 30px; height: 14px; flex: none; }
.sk-leg .lm { width: 26px; }
.thermo.th2 { width: 74px; height: 164px; border-radius: 0; background: none; box-shadow: none; flex: none; }
.thermo.th2 svg { display: block; width: 100%; height: 100%; overflow: visible; }
.th2 .tg { fill: #F4F8FF; stroke: #B9C6DE; stroke-width: 2; } .th2 .tm-bg { fill: #DCE4F0; } .th2 .tb { fill: #F0483C; }
.th2 .tm { fill: #F0483C; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.52); transition: transform .7s cubic-bezier(.3,.7,.3,1); }
.th2[data-lv="0"] .tm { transform: scaleY(.28); } .th2[data-lv="2"] .tm { transform: scaleY(.88); }
.th2 .tk path { stroke: #DCE6F7; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.th2 text { fill: #DCE6F7; font-size: 12px; font-weight: 800; dominant-baseline: middle; }
.thermo.th2 i { display: none; }
@media (min-width: 900px) and (min-height: 820px) { .sk2 { width: 500px; } .thermo.th2 { width: 100px; height: 222px; } .th2 text { font-size: 11px; } .sk-leg { font-size: 14px; } .sky-scene { gap: 36px; } }
@media (max-width: 520px) { .sk2 { width: min(68vw, 250px); } .thermo.th2 { width: 58px; height: 128px; } .th2 text { font-size: 17px; } .sky-scene { gap: 4px; flex-wrap: nowrap; padding: 6px; } .sk-leg { font-size: 11px; gap: 2px 10px; } .sk-wrap { gap: 6px; padding-top: 30px; } }
@media (prefers-reduced-motion: reduce) { .sk-svg .sun, .sk-svg .ray path, .sk-svg .molb { animation: none !important; } }

/* ===== 하늘과 대기 3판: ppm 눈금 막대 · 실제 근거 기온 · 숫자가 따라 오르는 온도계 (충쌤 11-16 "많고 적음 단계 더 세분화 하고 지구 온도 실제 온도 반영해서 실시간으로올라가게") ===== */
.sky-tag.v3 { height: auto; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px; }
.sky-tag.v3 b { line-height: 16px; } .sky-tag.v3 small { font-size: 10px; font-weight: 800; line-height: 14px; opacity: .8; }
.sk-svg .mol, .sk-svg .mol.g0 { opacity: 0; } .sk-svg .mol.on { opacity: 1; }
.sk-svg .atm { transition: opacity .5s; }
.sk-svg .ray .ret { opacity: 0; } .sk-svg .ray .esc { opacity: 1; }
.sk-svg .ray.back .ret { opacity: 1; } .sk-svg .ray.back .esc { opacity: 0; }
.thermo.th3 { width: auto; height: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.thermo.th3 svg { width: 74px; height: 164px; flex: none; }
.th3 .tm { transition: none; } .th3 text { font-size: 12px; } .th3 .tu { font-size: 11px; opacity: .8; }
.sk-read { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; }
.sk-read b { font-size: 24px; font-weight: 900; line-height: 30px; font-variant-numeric: tabular-nums; color: #FFE08A; }
.thermo .sk-read span { position: static; transform: none; font-size: 12px; font-weight: 900; line-height: 18px; }
.sk-read small { font-size: 10px; font-weight: 700; line-height: 14px; color: #B9C6DE; white-space: nowrap; }
.sk-now { display: flex; align-items: center; justify-content: center; gap: 8px; height: 32px; max-width: 560px; margin: 0 auto 4px; color: #fff; font-weight: 900; }
.sk-now span { font-size: 13px; color: #B9C6DE; line-height: 32px; } .sk-now b { font-size: 24px; line-height: 32px; font-variant-numeric: tabular-nums; min-width: 62px; text-align: right; color: #FFE08A; }
.sk-now em { font-style: normal; font-size: 13px; line-height: 32px; } .sk-now i { font-style: normal; font-size: 13px; line-height: 22px; height: 22px; padding: 0 8px; border-radius: 4px; background: rgba(255,255,255,.14); display: flex; align-items: center; white-space: nowrap; }
.sk-sl { position: relative; max-width: 560px; margin: 0 auto 6px; padding-bottom: 44px; }
.sk-sl input { display: block; width: 100%; height: 28px; margin: 0; accent-color: #FFD36E; }
.sk-marks { position: absolute; left: 8px; right: 8px; top: 28px; height: 44px; }
.sk-mk { position: absolute; left: calc(var(--p) * 100%); top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0; border: 0; background: none; color: #DCE6F7; font: inherit; cursor: pointer; }
.sk-mk.first { transform: translateX(-8px); align-items: flex-start; } .sk-mk.last { transform: translateX(calc(-100% + 8px)); align-items: flex-end; }
.sk-mk u { display: block; width: 2px; height: 6px; background: #8FA9CC; text-decoration: none; } .sk-mk.first u { margin-left: 7px; } .sk-mk.last u { margin-right: 7px; }
.sk-mk b { font-size: 12px; font-weight: 900; line-height: 16px; font-variant-numeric: tabular-nums; }
.sk-mk span { font-size: 11px; font-weight: 800; line-height: 18px; height: 18px; padding: 0 5px; border-radius: 4px; display: flex; align-items: center; white-space: nowrap; color: #B9C6DE; }
.sk-mk.now span { background: #FFD36E; color: #4A2A00; } .sk-mk.on b { color: #FFE08A; }
@media (min-width: 900px) and (min-height: 820px) { .thermo.th3 svg { width: 100px; height: 222px; } .th3 text { font-size: 11px; } .sk-read b { font-size: 30px; line-height: 36px; } .sk-read span { font-size: 14px; } .sk-read small { font-size: 12px; line-height: 16px; } }
@media (min-width: 900px) and (max-height: 819px) { .sk2 { width: 270px; } .thermo.th3 svg { width: 60px; height: 133px; } .th3 text { font-size: 15px; } .sk-wrap { gap: 6px; } .sky-scene { gap: 28px; padding: 6px; } }
@media (max-width: 520px) { .sk2 { width: min(60vw, 215px); } .thermo.th3 svg { width: 52px; height: 115px; } .th3 text { font-size: 17px; } .sk-read b { font-size: 20px; line-height: 24px; } .sk-mk.minor span, .sk-now span { display: none; } .sk-wrap { padding-top: 44px; } .thermo.th3 { padding-top: 40px; gap: 4px; } }
@media (max-width: 520px) { .sk2 { width: min(56vw, 200px); } .sk-leg { flex-wrap: nowrap; font-size: 10px; gap: 8px; } .sk-leg span { gap: 3px; white-space: nowrap; } .sk-leg svg { width: 22px; } .sk-leg .lm { width: 20px; } .sk-read small { white-space: normal; width: 84px; text-align: center; } .sk-wrap { padding-top: 40px; } .thermo.th3 { padding-top: 36px; } .thermo.th3 svg { width: 46px; height: 102px; } .th3 text { font-size: 18px; } }

/* ===== 반죽 단면 2판: 알갱이 → 열 → CO₂ → 기포 → 부풂 (충쌤 11-16 "이 정보가 이 이미지에 시각화 되게 해줘, 글구 여기도 그래픽 업그레이드 해") ===== */
.cut.v2 { width: 300px; padding: 10px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cut.v2 .cut-t { display: flex; align-items: center; justify-content: center; height: 22px; line-height: 22px; font-size: 13px; }
.cut-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cut-svg .tray { fill: #8A93A6; }
.cut-svg .rise { transform-origin: 130px 150px; transform: scale(.94, .56); transition: transform 3.2s cubic-bezier(.3,.6,.3,1) 1.4s; }
.cut.go .cut-svg .rise { transform: scale(1, 1); }
.cut-svg .crust { fill: #EAD2A0; transition: fill 1.2s; } .cut.done .cut-svg .crust { fill: #B9772E; }
.cut-svg .crumb { transition: filter 1.2s; } .cut.done .cut-svg .crumb { filter: saturate(1.15) brightness(.97); }
.cut-svg .strands path { fill: none; stroke: #DDBE84; stroke-width: 1.2; stroke-linecap: round; opacity: .7; }
.cut-svg .bub { transform: scale(0); transition: transform 1.8s cubic-bezier(.3,.7,.3,1); }
.cut.go .cut-svg .bub { transform: scale(1); }
.cut-svg .bh { fill: url(#cutHo); } .cut-svg .bl { fill: none; stroke: #FFF7E2; stroke-width: 1.1; opacity: .85; }
.cut-svg .gr { fill: #fff; stroke: #9AA8B8; stroke-width: .7; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.2); transition: opacity .4s, transform .4s; }
.cut.soda .cut-svg .gr { opacity: 1; transform: scale(1.5, 2.2); }
.cut.go .cut-svg .gr { opacity: .55; transform: scale(1, 1); transition: opacity 2s 1s, transform 3.2s 1.4s; }
.cut-svg .cm { opacity: 0; transform: translate(0, 0) scale(.3); transition: opacity .5s, transform 1.6s cubic-bezier(.3,.7,.3,1); }
.cut.go .cut-svg .cm { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1); }
.cut-svg .mo { fill: #E8392B; stroke: #7A1410; stroke-width: .6; } .cut-svg .mc { fill: #2B2B2E; stroke: #B8C0CC; stroke-width: .8; }
.cut-svg .heat { opacity: 0; transition: opacity .6s; } .cut.heat .cut-svg .heat { opacity: 1; } .cut.heat.done .cut-svg .heat { opacity: 0; }
.cut-svg .heat path { fill: none; stroke: #FF6A3A; stroke-width: 2.4; stroke-linecap: round; animation: cutheat 1.2s linear infinite; }
@keyframes cutheat { from { transform: translateY(6px); opacity: 0; } 30% { opacity: .95; } to { transform: translateY(-8px); opacity: 0; } }
.cut-steps { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: nowrap; }
.cut-steps b { display: flex; align-items: center; justify-content: center; height: 24px; min-width: 24px; padding: 0 6px; border-radius: 4px; background: #EEF2F7; color: #9AA8B8; font-size: 12px; font-weight: 900; line-height: 24px; white-space: nowrap; transition: background .4s, color .4s; }
.cut-steps b.on { background: #FFD36E; color: #4A2A00; } .cut-steps em { font-style: normal; color: #B5823F; font-size: 14px; line-height: 24px; height: 24px; display: flex; align-items: center; }
@media (min-width: 900px) and (min-height: 820px) { .br-scene > .oven, .br-scene > .cut.v2 { zoom: 1.3; } .br-scene { gap: 36px; } }
@media (min-width: 900px) and (max-height: 819px) { .cut.v2 { width: 270px; padding: 6px 10px 8px; gap: 4px; } .br-scene { padding: 6px; } }
@media (max-width: 520px) { .br-scene > .oven { zoom: .5; } .br-scene > .cut.v2 { zoom: .7; padding: 4px 10px 6px; gap: 2px; } .br-scene { gap: 8px; padding: 4px; } }
@media (max-width: 520px) and (max-height: 700px) { .br-scene > .cut.v2 { zoom: .6; } .br-scene > .oven { zoom: .45; } }
@media (prefers-reduced-motion: reduce) { .cut-svg .rise, .cut-svg .bub, .cut-svg .cm, .cut-svg .gr { transition-duration: .01s !important; transition-delay: 0s !important; } .cut-svg .heat path { animation: none; opacity: .9; } }

/* ===== 원소 탐지기 그림 통일판 (충쌤 11-16 "원소탐지기 이미지다시 업그레이드") ===== */
.dv { display: block; height: 100%; width: auto; aspect-ratio: 100 / 132; flex: none; overflow: visible; }
.dv .dv-strap { fill: none; stroke: #2A2F3C; stroke-width: 3; stroke-linecap: round; }
.dv .dv-head { fill: #3A4152; stroke: #1E2330; stroke-width: 2.5; } .dv .dv-mesh circle { fill: #AEB8CC; }
.dv .dv-grip { fill: #E98A22; stroke: #1E2330; stroke-width: 3; stroke-linejoin: round; } .dv .dv-rib { fill: none; stroke: #9A5510; stroke-width: 2.4; stroke-linecap: round; }
.dv .dv-body { fill: #FFA53A; stroke: #1E2330; stroke-width: 4; } .dv .dv-lo { fill: #D97A1E; } .dv .dv-hi { fill: none; stroke: #FFD591; stroke-width: 3; stroke-linecap: round; }
.dv .dv-scr { fill: #0B2148; stroke: #1E2330; stroke-width: 2.5; } .dv .dv-glow { fill: #6EE7A8; opacity: 0; }
.dv .dv-sym { fill: #6EE7A8; font-size: 24px; font-weight: 900; text-anchor: middle; dominant-baseline: central; }
.dv .dv-b { fill: #2A4370; }
.dv .dv-btn { fill: #4B5468; stroke: #1E2330; stroke-width: 2; } .dv .dv-btn.y { fill: #FFE08A; }
.dv .dv-lring { fill: #1E2330; } .dv .dv-lamp { fill: #6B7385; }
[data-level="1"] .dv-b1, [data-level="2"] .dv-b1, [data-level="2"] .dv-b2 { fill: #3FE0A0; }
[data-level="3"] .dv-b1, [data-level="3"] .dv-b2, [data-level="3"] .dv-b3, [data-level="4"] .dv-b1, [data-level="4"] .dv-b2, [data-level="4"] .dv-b3, [data-level="4"] .dv-b4 { fill: #FFD23A; }
[data-level="5"] .dv-b { fill: #FF6A6A; }
[data-level="1"] .dv-lamp, [data-level="2"] .dv-lamp { fill: #3FE0A0; animation: dvlamp var(--blink, 1.2s) ease-in-out infinite; }
[data-level="3"] .dv-lamp, [data-level="4"] .dv-lamp { fill: #FFD23A; animation: dvlamp var(--blink, .8s) ease-in-out infinite; }
[data-level="5"] .dv-lamp { fill: #FF6A6A; animation: dvlamp var(--blink, .5s) ease-in-out infinite; }
[data-level="4"] .dv-glow, [data-level="5"] .dv-glow { animation: dvglow 1s ease-in-out infinite; }
/* 눈이 아프지 않게: 꺼졌다 켜지지 않고 밝기만 조금 오르내린다 */
@keyframes dvlamp { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes dvglow { 0%, 100% { opacity: 0; } 50% { opacity: .14; } }
@media (prefers-reduced-motion: reduce) { .dv .dv-lamp, .dv .dv-glow { animation: none !important; } }
/* 대화창 초상: 칸 높이의 80% (위아래 여백 10%씩), 가운데 */
.talk-face.who-det { background: radial-gradient(circle at 50% 40%, #2E5FA8, #123E7A 75%); }
.talk-face.who-det .dv { height: 80%; }
/* 오른쪽 아래 탐지기 창: 탐지기 그림 + 읽을거리 */
#det.dev.dv2 { display: flex; align-items: center; gap: 10px; width: auto; min-width: 186px; height: auto; padding: 8px 14px 8px 10px; border-radius: 10px; background: #16233F; box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(0,0,0,.3); color: #fff; }
#det.dev.dv2[hidden] { display: none; }
#det.dev.dv2 .det-pic { flex: none; height: 62px; display: flex; align-items: center; }
#det.dev.dv2 .det-col { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
#det.dev.dv2 .det-top { height: 20px; } #det.dev.dv2 .det-top b { color: #FFE08A; font-size: 13px; line-height: 20px; }
#det.dev.dv2 .det-scr { margin: 0; padding: 0; min-height: 0; background: none; display: block; }
#det.dev.dv2 .det-bars { display: none; }
#det.dev.dv2 .det-msg { display: flex; align-items: center; min-height: 22px; font-size: 13px; line-height: 1.25; color: #DDEBFF; }
@media (max-width: 520px) { #det.dev.dv2 { min-width: 0; width: auto; padding: 6px 10px 6px 8px; gap: 8px; } #det.dev.dv2 .det-pic { height: 50px; } #det.dev.dv2 .det-msg { font-size: 12px; } }
/* 반응 알림 */
.detector .dt-pic { flex: none; height: 72px; display: flex; align-items: center; }
/* EP.01 새는 곳 찾기 · EP.02 회의실 계기: 같은 탐지기 그림을 머리 줄에 */
.gdev.dv2, .rmeter.v2.dv2 { background: #FFB24A; box-shadow: 0 0 0 3px #1E2330, 0 -4px 0 #D97A1E inset, 0 8px 16px rgba(0,0,0,.3); color: #1E2330; }
.gdev.dv2 .gd-top, .rmeter.v2.dv2 .rd-top { height: 40px; gap: 8px; } .gdev.dv2 .gd-top b, .rmeter.v2.dv2 .rd-top b { color: #1E2330; line-height: 40px; }
.gd-pic { flex: none; height: 40px; display: flex; align-items: center; }
.gdev.dv2 .gd-lamp, .rmeter.v2.dv2 .rd-lamp { margin-left: auto; box-shadow: 0 0 0 2px #1E2330; }
.gdev.dv2[data-lamp="g"] .dv-lamp { fill: #3FE0A0; } .gdev.dv2[data-lamp="y"] .dv-lamp { fill: #FFD23A; } .gdev.dv2[data-lamp="r"] .dv-lamp { fill: #FF6A6A; }
@media (max-width: 520px) { .gdev.dv2 .gd-top, .rmeter.v2.dv2 .rd-top { height: 28px; } .gd-pic { height: 28px; } .gdev.dv2 .gd-top b, .rmeter.v2.dv2 .rd-top b { line-height: 28px; } }
.rmeter.v2.dv2 { background: #FFB24A !important; box-shadow: 0 0 0 3px #1E2330, 0 -4px 0 #D97A1E inset, 0 8px 16px rgba(0,0,0,.3) !important; color: #1E2330; } .rmeter.v2.dv2 .rd-grip, .rmeter.v2.dv2 .rd-head { display: none; } .rmeter.v2.dv2 .rd-top b { color: #1E2330 !important; } .rmeter.v2.dv2 .rd-lamp { box-shadow: 0 0 0 2px #1E2330 !important; }

/* ===== '알아낸 것' 띠 강조 · 가운데 떠오르기 · 노트 (충쌤 11-16 "이 부분이 너무 눈에 안띄어, 좀 더 잘 눈에 띄게 해줘") =====
   글씨 대비: 띠 #06331B / #CFF7DF = 12.6, 딱지 #FFFFFF / #0E5A33 = 8.3, 노트 단추 #06331B / #FFFFFF = 13.9 */
.pz-q.learned { min-height: 62px; background: linear-gradient(180deg, #DDFBE9, #C2F3D6); border-bottom: 4px solid #2FA866; }
.pz-q.learned .pz-qtext { color: #06331B; font-size: 21px; }
.pz-q.learned .pz-qtag { height: 36px; padding: 0 12px 0 8px; gap: 6px; background: #0E5A33; color: #fff; box-shadow: 0 2px 0 #06331B; }
.pz-qtag em { font-style: normal; line-height: 1; display: flex; align-items: center; }
.pz-bulb { flex: none; width: 22px; height: 22px; } .pz-bulb path { fill: #FFD84D; stroke: #8A5A00; stroke-width: 1.2; stroke-linejoin: round; } .pz-bulb .b2 { fill: none; stroke: #FFE9A0; stroke-width: 2; stroke-linecap: round; }
.pz-notes { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 14px; font-weight: 900; line-height: 34px; cursor: pointer; }
.pz-notes[hidden] { display: none; }
.pz-notes i { display: flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 4px; background: #FFD36E; color: #4A2A00; font-style: normal; font-size: 13px; line-height: 22px; }
.pz-q.learned .pz-notes { background: #fff; color: #06331B; box-shadow: 0 0 0 2px #2FA866; }
.pz-learnpop { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.lp-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(86%, 640px); padding: 22px 26px 26px; border-radius: 14px; background: linear-gradient(180deg, #E6FDEF, #C2F3D6); box-shadow: 0 0 0 4px #2FA866, 0 16px 40px rgba(0,0,0,.45); opacity: 0; }
.lp-tag { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 10px; border-radius: 6px; background: #0E5A33; color: #fff; font-size: 18px; font-weight: 900; }
.lp-tag em { font-style: normal; line-height: 40px; } .lp-tag .pz-bulb { width: 26px; height: 26px; }
.lp-card b { font-size: clamp(22px, 3.2vw, 32px); font-weight: 900; line-height: 1.4; color: #06331B; text-align: center; text-wrap: balance; word-break: keep-all; }
.lp-stars { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.lp-stars i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; background: #FFE08A; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: lpstar 1.3s ease-out var(--d) 1 both; }
.lp-stars i:nth-child(3n) { background: #fff; }
@keyframes lpstar { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-60px) scale(.2); } 25% { opacity: .95; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-150px - 60px * var(--r))) scale(var(--r)) rotate(90deg); } }
.pz-notebook { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,12,28,.72); }
.nb-in { display: flex; flex-direction: column; width: min(100%, 560px); max-height: 100%; border-radius: 12px; background: #F4FFF8; box-shadow: 0 0 0 4px #2FA866, 0 16px 40px rgba(0,0,0,.5); overflow: hidden; }
.nb-head { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px; background: #0E5A33; color: #fff; } .nb-head b { flex: 1; font-size: 18px; font-weight: 900; line-height: 52px; } .nb-head .pz-bulb { width: 26px; height: 26px; }
.nb-x { height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: #fff; color: #06331B; font: inherit; font-size: 14px; font-weight: 900; line-height: 34px; cursor: pointer; }
.nb-list { overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.nb-ep { margin: 4px 0 0; font-size: 13px; font-weight: 900; color: #0E5A33; line-height: 20px; }
.nb-it { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 2px #BFE9CF; color: #06331B; font-size: 16px; font-weight: 800; line-height: 1.4; word-break: keep-all; }
@media (max-width: 520px) { .pz-q.learned { min-height: 56px; } .pz-q.learned .pz-qtext { font-size: 17px; } .pz-q.learned .pz-qtag { height: 30px; padding: 0 8px 0 6px; } .pz-q.learned .pz-qtag em { font-size: 13px; } .pz-bulb { width: 18px; height: 18px; } .pz-notes { height: 30px; padding: 0 6px; font-size: 12px; line-height: 30px; } .lp-card { padding: 16px 16px 18px; } .nb-it { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .lp-stars i { animation: none; } }
.pz-q.learned { padding-top: 10px; padding-bottom: 6px; }

/* ===== CO₂ 소화 가상 실험 2판: 유리 비커 · 촛불 · 바닥부터 차오르는 CO₂ 층 (충쌤 11-16 "이것도 그래픽.. 업그레이드") ===== */
.fb-scene { background: linear-gradient(180deg, #DCE4F2, #B9C6DB); }
.vjar.v2 { width: 250px; height: auto; aspect-ratio: 300 / 262; border: 0; border-radius: 0; background: none; flex: none; }
.jar-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.jar-svg .tiles path { fill: none; stroke: rgba(255,255,255,.5); stroke-width: 1.5; }
.jar-svg .shelf { fill: #9AA9C2; opacity: .7; } .jar-svg .bt { fill: #A9B8D0; opacity: .6; } .jar-svg .bt.b2 { fill: #B9C9B6; }
.jar-svg .bench { fill: #B98B5E; } .jar-svg .bench-hi { fill: #D6AB7E; }
.jar-svg .glow { opacity: 1; transition: opacity .6s; }
.vjar.v2[data-o="2"] .glow { opacity: .7; } .vjar.v2[data-o="1"] .glow { opacity: .4; } .vjar.v2[data-o="0"] .glow { opacity: 0; } .vjar.v2.boost .glow { opacity: 1; transform: scale(1.15); transform-origin: 150px 132px; }
.jar-svg .fog { transform: translateY(0); transition: transform 1.4s cubic-bezier(.3,.7,.3,1); }
.vjar.v2[data-c="1"] .fog { transform: translateY(-36px); } .vjar.v2[data-c="2"] .fog { transform: translateY(-64px); } .vjar.v2[data-c="3"] .fog { transform: translateY(-100px); }
.jar-svg .fog path { animation: jarwave 3s ease-in-out infinite alternate; }
@keyframes jarwave { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
.jar-svg .jm { opacity: 0; transition: opacity .6s .6s; }
.vjar.v2[data-c="1"] .jm.c1, .vjar.v2[data-c="2"] .jm.c1, .vjar.v2[data-c="2"] .jm.c2, .vjar.v2[data-c="3"] .jm { opacity: 1; }
.jar-svg .jo { opacity: 0; transition: opacity .5s; }
.vjar.v2[data-o="1"] .jo.o0, .vjar.v2[data-o="2"] .jo.o0, .vjar.v2[data-o="2"] .jo.o1, .vjar.v2[data-o="3"] .jo { opacity: 1; }
.jar-svg .mo { fill: #E8392B; stroke: #7A1410; stroke-width: .6; } .jar-svg .mc { fill: #2B2B2E; stroke: #B8C0CC; stroke-width: .8; }
.jar-svg .jmb { animation: jarbob 3s ease-in-out infinite alternate; }
@keyframes jarbob { from { transform: translate(-1.5px, 1px); } to { transform: translate(1.5px, -1.5px); } }
.jar-svg .pool { fill: #FFFDF2; stroke: #E4D2A6; stroke-width: 1; } .jar-svg .drip { fill: #FFF8E6; stroke: #E4D2A6; stroke-width: .8; }
.jar-svg .wick2 { fill: none; stroke: #2B2B2E; stroke-width: 2.4; stroke-linecap: round; }
.jar-svg .flm-s { transform: scale(1); transform-box: fill-box; transform-origin: 50% 100%; transition: transform .7s cubic-bezier(.3,.7,.3,1), opacity .5s; }
.vjar.v2[data-o="2"] .flm-s { transform: scale(.78); } .vjar.v2[data-o="1"] .flm-s { transform: scale(.48); } .vjar.v2[data-o="0"] .flm-s { transform: scale(0); opacity: 0; }
.vjar.v2.boost .flm-s { transform: scale(1.25); }
.jar-svg .flm-w { transform-box: fill-box; transform-origin: 50% 100%; animation: jarflick .5s ease-in-out infinite alternate; }
.vjar.v2[data-o="1"] .flm-w { animation-duration: .22s; }
@keyframes jarflick { 0% { transform: scale(.95, .92) skewX(-4deg); } 50% { transform: scale(1.03, 1) skewX(2deg); } 100% { transform: scale(.98, 1.08) skewX(5deg); } }
.jar-svg .f3 { fill: #FF8A2A; } .jar-svg .f2 { fill: #FFC93C; } .jar-svg .f1 { fill: #FFF6C8; } .jar-svg .f0 { fill: #5AA8FF; opacity: .8; }
.jar-svg .smoke2 { fill: none; stroke: rgba(90,100,120,.75); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; opacity: 0; }
.vjar.v2[data-o="0"] .smoke2 { opacity: 1; animation: jarsmoke 2.6s ease-out .4s 1 forwards; }
@keyframes jarsmoke { 0% { stroke-dashoffset: 90; opacity: .9; } 60% { stroke-dashoffset: 0; opacity: .8; } 100% { stroke-dashoffset: 0; opacity: .35; } }
.jar-svg .pour path { fill: none; stroke: rgba(150,162,184,.9); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 26 300; stroke-dashoffset: 26; opacity: 0; }
.vjar.v2.pouring .pour path { opacity: 1; animation: jarpour .9s ease-in 1; }
@keyframes jarpour { from { stroke-dashoffset: 26; } to { stroke-dashoffset: -260; } }
.jar-svg .g-out { fill: none; stroke: rgba(255,255,255,.95); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.jar-svg .g-in { fill: rgba(225,240,255,.16); stroke: rgba(160,190,225,.6); stroke-width: 1.5; }
.jar-svg .g-rim { stroke: rgba(255,255,255,.95); stroke-width: 4; stroke-linecap: round; }
.jar-svg .g-hi { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 4; stroke-linecap: round; } .jar-svg .g-hi.h2, .jar-svg .g-hi.h3 { stroke-width: 2.5; opacity: .8; }
.jar-svg .g-tk path { stroke: rgba(70,95,140,.7); stroke-width: 1.6; stroke-linecap: round; }
/* 산소 계기: 원소 탐지기와 같은 주황 몸통 · 짙은 테 · 어두운 화면 */
.o2m.v2 { width: 190px; gap: 0; padding: 8px 10px 10px; border-radius: 12px; background: #FFB24A; box-shadow: 0 0 0 3px #1E2330, 0 -4px 0 #D97A1E inset, 0 8px 16px rgba(0,0,0,.25); color: #1E2330; font-size: 13px; }
.o2m.v2 .om-top { display: flex; align-items: center; gap: 8px; height: 36px; } .o2m.v2 .om-top b { line-height: 36px; font-weight: 900; } .o2m.v2 .gd-pic { height: 36px; }
.o2m.v2 .om-scr { margin-top: 6px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px; border-radius: 8px; background: #0B2148; }
.o2m.v2 .cg-lv { flex: 1; align-items: flex-end; height: 24px; gap: 5px; } .o2m.v2 .cg-lv i { height: 10px; border-radius: 2px; background: #2A4370; transition: background .4s; }
.o2m.v2 .cg-lv i:nth-child(2) { height: 17px; } .o2m.v2 .cg-lv i:nth-child(3) { height: 24px; } .o2m.v2 .cg-lv i.on { background: #FF8A7A; }
.o2m.v2 .om-w { min-width: 50px; display: flex; align-items: center; justify-content: flex-end; height: 24px; line-height: 24px; color: #FFE08A; font-weight: 900; }
@media (min-width: 900px) and (max-height: 819px) { .fb-scene > .vjar.v2, .fb-scene > .o2m.v2 { zoom: 1.1; } }
@media (max-width: 520px) { .vjar.v2 { width: 170px; } .o2m.v2 { width: 130px; padding: 6px 8px 8px; } .o2m.v2 .om-top b { font-size: 11px; } .o2m.v2 .gd-pic { display: none; } .fb-scene { gap: 8px; flex-wrap: nowrap; padding: 6px; } }
@media (prefers-reduced-motion: reduce) { .jar-svg .fog path, .jar-svg .jmb, .jar-svg .flm-w { animation: none !important; } .vjar.v2[data-o="0"] .smoke2 { animation: none; stroke-dashoffset: 0; opacity: .6; } }
.vjar.v2 { background: #E6ECF6; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(30,40,70,.18); } .jar-svg { overflow: hidden; } .jar-svg .tiles path { stroke: rgba(255,255,255,.85); }
.gasdots b { border-radius: 4px; }

/* ===== 발견 기록 줄 통일 (충쌤 11-16 "uiuxup 각 항목들이 통일감 있게"): 줄 높이 고정 · 아이콘 32px · 태그 폭 52px · 한 줄 키워드 ===== */
.lore-book.v2 { gap: 8px; }
.lore-book.v2 li { box-sizing: border-box; height: 52px; padding: 0 14px 0 10px; gap: 10px; align-items: center; font-size: 16px; line-height: 1.3; }
.lore-book.v2 .lr-ic { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; } .lore-book.v2 .lr-ic svg { display: block; width: 32px; height: 32px; }
.lore-book.v2 li b { box-sizing: border-box; flex: none; width: 52px; min-width: 0; height: 30px; padding: 0; border-radius: 6px; background: #3F5173; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 30px; }
.lore-book.v2 li span { flex: 1; min-width: 0; display: flex; align-items: center; word-break: keep-all; text-wrap: balance; }
.lore-book.small.v2 { gap: 6px; } .lore-book.small.v2 li { height: 44px; padding: 0 10px 0 8px; gap: 8px; font-size: 13px; }
.lore-book.small.v2 .lr-ic, .lore-book.small.v2 .lr-ic svg { width: 26px; height: 26px; } .lore-book.small.v2 li b { width: 44px; height: 26px; font-size: 12px; line-height: 26px; }
.lore-book.small.v2 li.lk b { background: #9AA8B8; }
@media (max-width: 520px) { .lore-book.v2 li { height: 54px; padding: 0 10px 0 8px; gap: 8px; font-size: 13.5px; } .lore-book.v2 li b { width: 44px; font-size: 13px; } .lore-book.v2 .lr-ic, .lore-book.v2 .lr-ic svg { width: 28px; height: 28px; } }

/* ===== 탐험 완료: 다음 화로 가기 / 끝내기 (충쌤 11-16) ===== */
.cl-nav { display: flex; gap: 12px; width: 100%; margin-top: 16px; }
.cl-nav .gbtn { flex: 1; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 12px; }
.cl-nav .gbtn b { font-size: 18px; font-weight: 900; line-height: 22px; } .cl-nav .gbtn small { font-size: 12px; font-weight: 800; line-height: 16px; opacity: .85; }
.cl-nav .gbtn:disabled { filter: grayscale(.6) brightness(.8); cursor: default; }
.cl-btns.sub { margin-top: 10px; } .cl-btns.sub .gbtn { min-height: 40px; font-size: 14px; box-shadow: 0 3px 0 #173E78, 0 0 0 2px rgba(255,255,255,.3) inset; background: linear-gradient(180deg, #3A6FB8, #25549A); }
.cl-soon { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 36px; margin: 14px 0 0; border-radius: 6px; background: rgba(255,255,255,.12); color: #DCE6F7; font-size: 14px; font-weight: 800; line-height: 36px; }
.cl-soon b { color: #FFE08A; } .cl-soon + .cl-nav { margin-top: 10px; }
@media (max-width: 520px) { .cl-nav { margin-top: 12px; gap: 8px; } .cl-nav .gbtn { min-height: 54px; } .cl-nav .gbtn b { font-size: 16px; } .cl-btns.sub .gbtn { min-height: 38px; } }
/* 카드 칩 바로 뒤에 쉼표·마침표가 오면 오른쪽 여백을 테두리(2px)만큼만 남긴다 (11-17) */
.cchip.np { margin-right: 3px; }
/* 숯불 계기판도 탐지기와 같은 주황 본체 · 짙은 회색 테 (11-17, 실험 계기를 한 가족으로) */
.cg-gauges.v2 { background: #FFB24A; box-shadow: 0 0 0 3px #1E2330, 0 -4px 0 #D97A1E inset, 0 8px 16px rgba(0,0,0,.3); color: #1E2330; border-radius: 12px; }
.cg-gauges.v2 .cgm-top { height: 36px; } .cg-gauges.v2 .cgm-top em { line-height: 36px; color: #1E2330; }
.cg-gauges.v2 .cgm-top .gd-pic { height: 36px; } .cg-gauges.v2 .cgm-led { display: none; }
.cg-gauges.v2 .cgm-scr { background: #0B2148; box-shadow: none; }
.cg-gauges.v2 .cg-lv i { background: #2A4370; } .cg-gauges.v2 .cg-lv i.on { background: #3FE0A0; } .cg-gauges.v2 .bar { background: #2A4370; }
@media (max-width: 520px) { .cg-gauges.v2 .cgm-top, .cg-gauges.v2 .cgm-top em { height: 28px; line-height: 28px; } .cg-gauges.v2 .cgm-top .gd-pic { height: 28px; } }
/* 드라이아이스 찾기: 탐침과 옆 계기도 같은 탐지기 가족(주황 본체 · 짙은 테 · 어두운 화면), 알약 라벨은 분자 알갱이로 (11-17) */
.probe.dv2 { width: 46px; height: 61px; right: -38px; border-radius: 0; background: none; box-shadow: none; }
.probe.dv2 .dv { height: 100%; filter: drop-shadow(0 3px 0 rgba(10,26,54,.35)); }
.probe.dv2[data-z="0"] { top: calc(16.6% - 30px); } .probe.dv2[data-z="1"] { top: calc(50% - 30px); } .probe.dv2[data-z="2"] { top: calc(83.3% - 30px); }
.dt-side { box-sizing: border-box; gap: 8px; width: 196px; padding: 10px; border-radius: 12px; background: #FFB24A; box-shadow: 0 0 0 3px #1E2330, 0 -4px 0 #D97A1E inset, 0 8px 16px rgba(0,0,0,.25); }
.dt-side .mag { border-radius: 8px; box-shadow: none; background: #0B2148; padding: 8px; }
.dt-side .mag > span { display: flex; align-items: center; justify-content: center; height: 18px; line-height: 18px; color: #B9C6DE; }
.dt-side .mag .mol { gap: 8px; } .dt-m { display: block; width: 30px; height: 15px; animation: bubin .3s ease-out; }
.dt-side .sig { background: #0B2148; color: #DDEBFF; height: 42px; padding: 0 10px; } .dt-side .sig span { line-height: 42px; }
.dt-side .sigb i { background: #2A4370; } .dt-side .sigb i.on { background: #3FE0A0; }
@media (max-width: 520px) { .cg-gauges.v2 .cgm-top .gd-pic { display: none; } .cg-gauges.v2 .cgm-top, .cg-gauges.v2 .cgm-top em { height: 20px; line-height: 20px; } .dt-side { width: 150px; padding: 8px; } }
.dt3-scene .dt-side { margin-left: 34px; }
@media (max-width: 520px) { .dt3-scene { flex-wrap: nowrap; gap: 6px; padding: 6px; } .dt3-scene .cbox { width: 132px; flex: none; } .dt3-scene .dt-side { margin-left: 30px; width: 136px; padding: 6px; gap: 6px; } .dt-side .mag .mol { min-height: 44px; gap: 5px; } .dt-m { width: 24px; height: 12px; } .dt-side .sig { height: 34px; padding: 0 6px; gap: 5px; font-size: 11px; } .dt-side .sig span { line-height: 34px; } .probe.dv2 { width: 36px; height: 48px; right: -30px; } .probe.dv2[data-z="0"] { top: calc(16.6% - 24px); } .probe.dv2[data-z="1"] { top: calc(50% - 24px); } .probe.dv2[data-z="2"] { top: calc(83.3% - 24px); } }
/* CO₂ 소화 실험: 층이 심지에 닿기 전에는 불꽃이 그대로(실제 실험과 같게, 11-17). data-o 는 3(충분) 아니면 0(없음)만 쓴다 */
.vjar.v2[data-o="0"] .flm-s { transition: transform .9s cubic-bezier(.4,0,.8,.4), opacity .5s .5s; }
.vjar.v2[data-c="2"] .flm-w { animation-duration: .34s; } .vjar.v2[data-c="3"] .flm-w { animation-duration: .16s; }
.o2m.v2 .om-scr.om-l { margin-top: 6px; height: 34px; justify-content: space-between; } .o2m.v2 .om-l span { color: #B9C6DE; line-height: 34px; } .o2m.v2 .om-l b { color: #FFE08A; line-height: 34px; font-weight: 900; }
@media (max-width: 520px) { .o2m.v2 .om-scr { height: 36px; padding: 0 8px; } .o2m.v2 .om-scr.om-l { height: 28px; } .o2m.v2 .om-l span, .o2m.v2 .om-l b { line-height: 28px; font-size: 12px; } }

/* ===== 키 안내 줄과 버튼 겹침 0 (11-17): 창의 내용·스크롤 영역이 키 안내 줄 위에서 끝난다 =====
   아래쪽에 투명 테두리를 키 안내 줄 높이만큼 두면 바탕은 끝까지 칠해지고, 내용은 그 위에서만 보이고 스크롤된다 */
.sheet, .clear, .detail, .title, .reveal, .dex, .pz-notebook { border-bottom: calc(var(--kb) + var(--safe-b)) solid transparent; }
.sheet { padding-bottom: 12px; } .clear { padding-bottom: 18px; } .detail { padding-bottom: 16px; } .title { padding-bottom: 20px; } .reveal { padding-bottom: 14px; }
.dex { padding-bottom: 0; } .dex-body { padding-bottom: 16px; }
/* CO₂ 소화 실험: 'O₂ 넣기' → '환기하기'(비커 위 부채질로 CO₂ 층 흩뜨리기, 11-17) */
.jar-svg .vfan .vh { stroke: #8A5A2B; stroke-width: 4; stroke-linecap: round; } .jar-svg .vfan .vp { fill: #F3E3B8; stroke: #B5823F; stroke-width: 2; stroke-linejoin: round; } .jar-svg .vfan .vr { stroke: #C9A268; stroke-width: 1; fill: none; }
.jar-svg .vfan-w { transform-origin: 262px 58px; transform: rotate(6deg); }
.vjar.v2.fanning .vfan-w { animation: vfan .3s ease-in-out 3; }
@keyframes vfan { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-16deg); } }
.jar-svg .vwind { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 12 60; stroke-dashoffset: 12; opacity: 0; }
.vjar.v2.fanning .vwind { opacity: 1; animation: vwind .45s linear 2; } .vjar.v2.fanning .vwind.w2 { animation-delay: .12s; }
@keyframes vwind { from { stroke-dashoffset: 12; } to { stroke-dashoffset: -72; } }
.vjar.v2.fanning .fog path { animation-duration: .5s; }
@media (prefers-reduced-motion: reduce) { .vjar.v2.fanning .vfan-w, .vjar.v2.fanning .vwind { animation: none; } }

/* 끝 화면 지도: 지나온 화(2026-11-23, 자물쇠 대신. 충쌤 "이거 왜 나 잠겨 있어? 앞에 다 플레이 했는데") */
.cl-map .nd.past .nd-ic { background: linear-gradient(180deg, #E8F7EE, #BDE8CF); color: #1F6B45; box-shadow: 0 0 0 3px #3FA06E, 0 4px 0 #2B7A52; font-weight: 900; }
.cl-map .nd.past b, .cl-map .nd.past small { color: #fff; opacity: .92; }
