/* Leapinity 시뮬레이션 화면 모양
   - 색·글꼴·버튼·위아래 막대는 lp-brand.css(Leapinity 공통)를 써요. 여기는 이 사이트에만 필요한 모양.
   - 고유 색: 보라 #6d4aff (흰 글자 5.6:1) / 흰 바탕 글자 #5b3ff0 / 어두운 바탕 글자 #b4a3ff
   - style-src 'self' 라서 HTML 에 style="…" 을 쓰지 않아요 (자바스크립트 el.style 은 괜찮아요) */
:root {
  --lp-accent: #6d4aff; --lp-accent-ink: #5b3ff0; --lp-accent-ink-dark: #b4a3ff; --lp-on-accent: #fff;
  --c-soft: #efeaff; --c-muted: #565d7e; --c-line: #e1e4f0;
  --space: #03040f; --space-ink: #eef0fb;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-soft: #241d52; --c-muted: #b7bcd8; --c-line: #2a3263; color-scheme: dark; } }
:root[data-theme="dark"] { --c-soft: #241d52; --c-muted: #b7bcd8; --c-line: #2a3263; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.65; overflow-x: hidden; }
main { flex: 1; padding-bottom: 8px; }
a { color: var(--lp-accent-ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 2px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.3; word-break: keep-all; }
p, li, dd { word-break: keep-all; overflow-wrap: anywhere; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lp-card, #fff); color: var(--lp-ink); padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
.copy-helper { position: fixed; left: -9999px; top: 0; opacity: 0; }
.muted { color: var(--c-muted); }
.bar-link { min-height: 44px; }
.lp-wrap { padding-left: 16px; padding-right: 16px; }

/* 첫 화면 · 카테고리 */
.hero { padding-top: 40px; padding-bottom: 8px; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); margin: 8px 0 12px; }
.lead { font-size: 18px; color: var(--c-muted); max-width: 720px; }
.content { margin-top: 32px; }
.content h2 { font-size: 24px; margin: 0 0 14px; }
.page-head { padding-top: 24px; }
.page-head h1 { font-size: clamp(28px, 5vw, 40px); margin: 6px 0 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 14px; font-size: 14px; color: var(--c-muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; text-decoration: none; color: var(--lp-ink); min-height: 170px; transition: transform .2s var(--lp-ease); }
.cat-card:hover { transform: translateY(-3px); }
.cc-e { font-size: 40px; line-height: 1; }
.cat-card b { font-size: 22px; }
.cat-card span { color: var(--c-muted); }
.cat-card .cc-n, .cat-card .cc-ext { margin-top: auto; font-weight: 700; color: var(--lp-accent-ink); font-size: 14px; }
.sims { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sim-card { display: flex; align-items: center; gap: 14px; padding: 18px; text-decoration: none; color: var(--lp-ink); min-height: 96px; }
.sc-e { font-size: 36px; }
.sc-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sc-t b { font-size: 18px; }
.sc-t span { color: var(--c-muted); font-size: 14px; }
.sc-go { font-weight: 800; color: var(--lp-accent-ink); white-space: nowrap; }
.sc-soon { font-size: 13px; font-weight: 800; background: var(--c-soft); color: var(--lp-accent-ink); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.sim-card.soon { opacity: .9; }
.perks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.perks li { background: var(--c-soft); border-radius: 16px; padding: 14px 16px; }
.perks b { display: block; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.center { justify-content: center; }
.big-btn { min-height: 52px; padding: 0 22px; }
.nf { text-align: center; padding-top: 60px; }
.nf-emoji { font-size: 64px; margin: 0; }
.legal h2 { font-size: 19px; margin-top: 24px; }
.legal li { margin: 6px 0; }
.legal a { display: inline-block; min-height: 24px; }
.credit-list { font-size: 14px; }
.faq { border-bottom: 1px solid var(--c-line); }
.faq summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.more-link a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-cats { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; }
.foot-cats a, .lp-foot-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* 시뮬레이션 화면 */
.sim-head { padding-top: 8px; }
.sim-head h1 { font-size: clamp(26px, 5vw, 38px); margin: 4px 0 4px; }
.sim-lead { color: var(--c-muted); margin: 0 0 12px; }
.scene-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.scene-tab { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--c-line); background: var(--lp-ghost-bg); color: var(--lp-ink); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.scene-tab[aria-selected="true"] { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; }
.stage { position: relative; height: min(72vh, 680px); min-height: 380px; border-radius: 20px; overflow: hidden; background: var(--space); color: var(--space-ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.gl, .sky2d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gl[hidden], .sky2d[hidden] { display: none; }
.gl:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: -3px; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lab { position: absolute; left: 0; top: 0; padding-left: 9px; margin-top: -10px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000; opacity: 0; transition: opacity .2s; will-change: transform; }
.lab.on { opacity: 1; }
.lab.con { color: #c9c2ff; font-weight: 600; font-size: 12px; padding-left: 0; margin-left: -20px; }
.lab.star { color: #ffe9b8; font-size: 12px; }
.lab.you { color: #2dd4a7; font-size: 14px; }
.labels.no-con .lab.con { display: none; }
.hud { position: absolute; left: 12px; top: 10px; right: 64px; pointer-events: none; text-shadow: 0 1px 3px #000; }
.hud p { margin: 0; }
.hud-t { font-weight: 800; font-size: 17px; }
.hud-s { font-size: 13px; color: #d6daf0; }
.scalebar { position: absolute; left: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; text-shadow: 0 1px 3px #000; }
.sb-line { display: block; height: 6px; width: 80px; border: 2px solid #fff; border-top: 0; }
.sb-text { font-size: 13px; font-weight: 700; }
.is-sky .scalebar, .is-sky .labels { display: none; }
.zoom-btns { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; }
.zbtn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(15,20,56,.72); color: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }
.zbtn:hover { background: rgba(60,50,140,.85); }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; text-align: center; padding: 20px; font-weight: 700; background: var(--space); }
.loading[hidden] { display: none; }
.loading.on { display: flex; background: rgba(3,4,15,.55); }
.fade { position: absolute; inset: 0; margin: 0; background: #03040f; opacity: 0; pointer-events: none; transition: opacity .22s; }
.fade.on { opacity: 1; }
.info { position: absolute; right: 10px; top: 64px; bottom: 10px; width: min(340px, calc(100% - 20px)); overflow-y: auto; background: rgba(12,16,46,.94); border: 1px solid rgba(180,163,255,.35); border-radius: 16px; padding: 14px 16px; color: #eef0fb; touch-action: pan-y; user-select: text; -webkit-user-select: text; }
.info[hidden] { display: none; }
.info-x { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; border-radius: 10px; }
.info-x:hover { background: rgba(255,255,255,.1); }
.info-t { font-size: 20px; margin: 4px 44px 0 0; }
.info-en { margin: 0 0 8px; color: #c3c8e6; font-size: 14px; }
.info-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 14px; }
.info-dl dt { color: #b4a3ff; font-weight: 700; }
.info-dl dd { margin: 0; }
.info-desc { font-size: 15px; margin: 10px 0; }
.info-fig { margin: 0; }
.info-fig img { width: 100%; height: auto; border-radius: 10px; display: block; background: #111733; }
.info-fig figcaption { font-size: 12px; color: #c3c8e6; margin-top: 4px; }
@media (max-width: 600px) {
  .stage { height: 68vh; min-height: 360px; }
  .info { top: auto; left: 10px; width: auto; max-height: 58%; }
}
.panel { margin-top: 10px; }
.pn-row { margin: 0 0 8px; color: var(--c-muted); }
.pn-row b { color: var(--lp-ink); }
.tog[aria-pressed="true"] { background: var(--c-soft); border-color: var(--lp-accent); color: var(--lp-accent-ink); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.objs { margin-top: 12px; }
.objs[hidden] { display: none; }
.objs-h { margin: 0 0 6px; font-weight: 700; font-size: 14px; color: var(--c-muted); }
.objs-list { display: flex; flex-wrap: wrap; gap: 6px; }
.obj-btn { min-height: 44px; padding: 0 12px; font-size: 14px; }
.sky-loc { margin: 0 0 10px; font-size: 13px; color: var(--c-muted); }
.sky-loc[data-state="fail"]::before { content: "ℹ️ "; }
.sky-ctl { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; color: var(--c-muted); }
.fld .lp-input, .fld select { min-height: 44px; }
.fld-wide { flex: 1 1 220px; }
.fld input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--lp-accent); }
.sky-list { margin-top: 10px; font-size: 15px; }
.sky-list ul { padding-left: 20px; margin: 4px 0; }
.next-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.next-btn { width: 100%; min-height: 48px; justify-content: flex-start; text-align: left; white-space: normal; }
.explain h3 { font-size: 19px; margin: 22px 0 6px; }

/* 수업 모드: 프로젝터용 큰 화면 */
.class-mode body { font-size: 19px; }
.class-mode .stage { height: 80vh; }
.class-mode .scene-tab, .class-mode .lp-btn { min-height: 54px; font-size: 18px; }
.class-mode .lab { font-size: 18px; }
.class-mode .lab.con { font-size: 16px; }
.class-mode .hud-t { font-size: 24px; }
.class-mode .hud-s, .class-mode .sb-text { font-size: 17px; }
.class-mode .zbtn { width: 56px; height: 56px; font-size: 28px; }
.class-mode .info { width: min(460px, calc(100% - 20px)); font-size: 18px; }
.class-mode .info-t { font-size: 26px; }
.class-mode .info-dl, .class-mode .info-desc { font-size: 18px; }

/* 가벼운 모드: 움직임 효과 줄이기 */
.lite .lab { transition: none; }
.lite .fade { transition: none; }
@media (prefers-reduced-motion: reduce) { .lab, .fade, .cat-card { transition: none; } }

/* 광고 자리 (지금은 숨김) */
.ad-slot[hidden] { display: none; }
/* Leapinity 의 다른 도구 */
.lp-more { margin-top: 40px; }
.lp-more-h { font-size: 20px; }
.lp-more-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lp-more-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--lp-card, #fff); border: 1px solid var(--c-line); text-decoration: none; color: var(--lp-ink); min-height: 64px; }
.lp-more-ic { width: 40px; height: 40px; flex: 0 0 auto; }
.lp-more-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lp-more-txt span { font-size: 13px; color: var(--c-muted); }
.lp-more-go { color: var(--c-muted); font-size: 22px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #161c3d; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot-cats a, .lp-foot-links a, .crumbs a, .bar-link { min-width: 44px; justify-content: center; }
.obj-btn { min-width: 44px; justify-content: center; }

/* 과학 실험실 (물리·화학) */
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.lab-view { min-width: 0; }
.lab-stage { height: min(56vh, 500px); min-height: 300px; touch-action: pan-y; }
.gbox { position: relative; height: 190px; margin-top: 8px; border-radius: 16px; overflow: hidden; background: #0b1030; }
.lab-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lab-modes[hidden], .gbox[hidden], .lab-custom[hidden], .lab-wide[hidden] { display: none; }
.lab-ctrls { display: flex; flex-direction: column; gap: 4px; }
.lab-ctrls .fld b { color: var(--lp-ink); }
.lab-h { font-size: 17px; margin: 4px 0 0; }
.lab-read { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 15px; background: var(--c-soft); border-radius: 14px; padding: 12px 14px; }
.lab-read dt { font-weight: 700; color: var(--lp-ink); }
.lab-read dd { margin: 0; color: var(--lp-ink); font-variant-numeric: tabular-nums; }
.lab-note { margin: 0; color: var(--c-muted); font-size: 15px; }
@media (max-width: 900px) { .lab-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .lab-stage { height: 52vh; min-height: 280px; } .gbox { height: 170px; } .lab-read { grid-template-columns: 1fr; } .lab-read dd { margin-bottom: 4px; } }
.class-mode .lab-stage { height: 70vh; }
.class-mode .gbox { height: 260px; }
.class-mode .lab-read, .class-mode .lab-note { font-size: 19px; }
.class-mode .lab-grid { grid-template-columns: minmax(0, 1fr) 420px; }
@media (max-width: 900px) { .class-mode .lab-grid { grid-template-columns: minmax(0, 1fr); } }

/* 화학: 주기율표 · 분자 만들기 */
.lab-wide { margin-top: 14px; }
.ptable-wrap { overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.ptable { display: grid; grid-template-columns: repeat(18, minmax(46px, 1fr)); grid-template-rows: repeat(7, auto) 10px auto auto; gap: 3px; min-width: 880px; }
.pt-el, .pt-gap { min-height: 52px; border-radius: 8px; border: 1.5px solid rgba(0,0,0,.12); color: #12142a; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 2px; font: inherit; cursor: pointer; }
.pt-gap { cursor: default; font-size: 11px; font-weight: 700; opacity: .85; }
.pt-el:hover { filter: brightness(1.07); }
.pt-el[aria-pressed="true"] { outline: 3px solid var(--lp-accent-ink); outline-offset: 1px; z-index: 1; }
.pt-n { font-size: 10px; font-weight: 700; color: #2a2f4a; }
.pt-s { font-size: 17px; font-weight: 800; }
.pt-k { font-size: 10px; font-weight: 700; color: #2a2f4a; white-space: nowrap; }
.c-alkali { background: #ffb8b8; } .c-alkaline { background: #ffd6a3; } .c-transition { background: #bfe0ff; } .c-post { background: #d3d7ea; }
.c-metalloid { background: #c2eed2; } .c-nonmetal { background: #fff0a0; } .c-halogen { background: #b3efe9; } .c-noble { background: #e2cfff; }
.c-lanthanide { background: #ffcfe8; } .c-actinide { background: #f6c8b6; }
.pt-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pt-legend li { color: #12142a; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.pt-src { font-size: 13px; margin: 8px 0 0; }
.lab-tip { margin: 0 0 8px; font-size: 14px; color: var(--c-muted); }
.mol-pal { gap: 6px; }
.mol-atom { min-width: 64px; flex-direction: column; gap: 0; line-height: 1.1; padding: 4px 10px; min-height: 52px; }
.mol-atom b { font-size: 18px; }
.mol-atom span { font-size: 11px; color: var(--c-muted); }
.mol-made { margin-top: 8px; }
.mol-made summary { min-height: 44px; display: flex; align-items: center; gap: 4px; cursor: pointer; font-weight: 700; }
.mol-made-list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--c-muted); }
.mol-made-list li.done { color: var(--lp-ink); font-weight: 700; }
.class-mode .pt-s { font-size: 20px; } .class-mode .pt-el { min-height: 60px; }
/* 📐 수학: 그래프 실험실 · 3D 도형 실험실 */
.gx-list { display: flex; flex-direction: column; gap: 8px; }
.gx-row { display: flex; gap: 6px; align-items: flex-start; }
.gx-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gx-in { width: 100%; min-height: 44px; font-size: 16px; font-family: inherit; }
.gx-in.bad { border-color: #d6336c; }
.gx-sw { flex: 0 0 auto; width: 34px; min-height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #12142a; font-weight: 800; }
.gx-del { min-width: 44px; padding: 0 10px; }
.gx-err { margin: 2px 0 0; font-size: 13px; color: var(--lp-ink); font-weight: 600; }
.gx-err:empty { display: none; }
.gx-keys { display: flex; flex-wrap: wrap; gap: 4px; }
.gx-key { min-width: 44px; padding: 0 8px; font-weight: 800; }
.gx-pre { gap: 6px; }
.gx-explain { margin: 8px 0 0; font-size: 15px; background: var(--c-soft); border-radius: 14px; padding: 10px 12px; color: var(--lp-ink); }
.vtab-opts .fld { flex: 1 1 120px; }
.vtab-wrap { overflow-x: auto; margin-top: 8px; border-radius: 14px; border: 1px solid var(--c-line); }
.vtab { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 15px; }
.vtab th, .vtab td { padding: 6px 12px; text-align: right; border-bottom: 1px solid var(--c-line); white-space: nowrap; color: var(--lp-ink); }
.vtab thead th { background: var(--c-soft); }
.vtab tbody th { font-weight: 700; }
.qz-box { display: flex; flex-direction: column; gap: 8px; }
.qz-score { font-weight: 800; font-size: 17px; margin: 0; color: var(--lp-ink); }
.qz-q { margin: 0; font-size: 16px; color: var(--lp-ink); font-weight: 700; }
.qz-ch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qz-ch .lp-btn { justify-content: center; font-size: 16px; }
.qz-ch .lp-btn[data-r="ok"] { outline: 3px solid #2f9e44; outline-offset: 1px; }
.qz-ch .lp-btn[data-r="no"] { outline: 3px solid #d6336c; outline-offset: 1px; }
.qz-res { margin: 0; font-size: 15px; color: var(--lp-ink); }
.qz-res:empty { display: none; }
.sh-pal { gap: 6px; }
.class-mode .gx-in, .class-mode .vtab { font-size: 20px; }
.rv-pad { width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 14px; touch-action: manipulation; cursor: crosshair; }

/* 글자 모양 v2 (2026-11-08): 허브·FicePal 과 같게 */
.hero h1, .page-head h1 { font-weight: var(--lp-title-w, 800); letter-spacing: var(--lp-hero-track, -.035em); line-height: var(--lp-hero-lh, 1.15); }
.lead { font-weight: var(--lp-lead-w, 600); letter-spacing: var(--lp-lead-track, -.01em); }
.cat-card b { font-weight: var(--lp-title-w, 800); letter-spacing: var(--lp-card-track, -.02em); line-height: 1.3; }

/* 🪐 외계 행성 (우주 여행 · 가까운 별) */
.lab.exo { color: #ffd98a; font-size: 12px; }
.exo-picks:not([hidden]) { margin-top: 8px; }
.exo-h { font-size: 16px; margin: 12px 0 6px; }
.exo-orbits { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 4px; background: rgba(255,255,255,.04); border-radius: 12px; }
.exo-note { font-size: 12px; color: #c3c8e6; margin: 4px 0 8px; }
.exo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.exo-list li { background: rgba(255,255,255,.06); border-radius: 10px; padding: 6px 10px; }
.exo-list b { display: block; color: #ffd98a; }
.class-mode .exo-list, .class-mode .exo-note { font-size: 16px; }
.lab.dso { color: #ffb3d6; font-size: 11px; font-weight: 600; }
.class-mode .lab.dso, .class-mode .lab.exo { font-size: 15px; }

/* 🕸️ 거대 구조 이름표 */
.lab.st-cluster { color: #ffb8dc; font-size: 12px; }
.lab.st-super { color: #9fe0ff; font-size: 13px; }
.lab.st-wall { color: #ffe08a; font-size: 13px; }
.lab.st-void { color: #c3c8e6; font-size: 12px; font-style: italic; }
.lab.st-group { color: #2dd4a7; }
.lab.model { color: #b9b4d8; font-size: 12px; font-style: italic; }
.web-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.web-key .k-cl { color: #c2337a; } .web-key .k-super { color: #0b6f9e; } .web-key .k-wall { color: #8a6100; } .web-key .k-void { color: var(--c-muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .web-key .k-cl { color: #ff9ccf; } :root:not([data-theme="light"]) .web-key .k-super { color: #7fd6ff; } :root:not([data-theme="light"]) .web-key .k-wall { color: #ffd166; } }
:root[data-theme="dark"] .web-key .k-cl { color: #ff9ccf; } :root[data-theme="dark"] .web-key .k-super { color: #7fd6ff; } :root[data-theme="dark"] .web-key .k-wall { color: #ffd166; }
.class-mode .lab.st-super, .class-mode .lab.st-wall, .class-mode .lab.st-cluster, .class-mode .lab.st-void { font-size: 16px; }

/* ===== 흰 배경 기준 (2026-11-08, _leapinity-style/흰배경-기준.md) — 틀(위쪽 줄·카드·단추·바탕)만. 3D 화면은 어두운 우주 그대로 ===== */
:root {
  --lp-bg: #ffffff; --lp-bg-soft: #ffffff; --lp-card: #ffffff; --lp-line: #eceef3; --lp-ink: #111827; --lp-soft: #5b6475; --lp-mute: #6b7385;
  --lp-chip: #f7f8fb; --lp-bar-bg: rgba(255,255,255,.88); --lp-bar-line: #eceef3; --lp-ghost-bg: #ffffff; --lp-ghost-line: #e3e6ee; --lp-ghost-hover: #f7f8fb;
  --lp-foot-bg: #f7f8fb; --lp-foot-rule: #eceef3; --lp-shadow: none; --lp-r: 18px;
  --c-soft: #f4f2ff; --c-muted: #5b6475; --c-line: #eceef3; --w-bg2: #f7f8fb; --w-tint: #f4f2ff; --w-hover: #cfd3ff;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --lp-bg: #0b1020; --lp-bg-soft: #0b1020; --lp-card: #121a33; --lp-line: #1e2747; --lp-ink: #eef1fb; --lp-soft: #a9b1cc; --lp-mute: #8f98b8;
  --lp-chip: #111831; --lp-bar-bg: rgba(11,16,32,.88); --lp-bar-line: #1e2747; --lp-ghost-bg: #121a33; --lp-ghost-line: #26305a; --lp-ghost-hover: #1a2145;
  --lp-foot-bg: #111831; --lp-foot-rule: #1e2747; --c-soft: #1a2145; --c-muted: #a9b1cc; --c-line: #1e2747; --w-bg2: #111831; --w-tint: #1a2145; --w-hover: #3a4380;
} }
:root[data-theme="dark"] {
  --lp-bg: #0b1020; --lp-bg-soft: #0b1020; --lp-card: #121a33; --lp-line: #1e2747; --lp-ink: #eef1fb; --lp-soft: #a9b1cc; --lp-mute: #8f98b8;
  --lp-chip: #111831; --lp-bar-bg: rgba(11,16,32,.88); --lp-bar-line: #1e2747; --lp-ghost-bg: #121a33; --lp-ghost-line: #26305a; --lp-ghost-hover: #1a2145;
  --lp-foot-bg: #111831; --lp-foot-rule: #1e2747; --c-soft: #1a2145; --c-muted: #a9b1cc; --c-line: #1e2747; --w-bg2: #111831; --w-tint: #1a2145; --w-hover: #3a4380;
}
.lp-body { background: var(--lp-bg); background-image: none; }
.lp-bar { background: var(--lp-bar-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: none; }
.lp-bar-in { min-height: 64px; }
.lp-brand { font-size: 17px; letter-spacing: -.02em; }
.lp-brand i { background: var(--lp-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.ico { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--w-tint); }
.ico svg { width: 28px; height: 28px; display: block; }
.ico-s { width: 36px; height: 36px; border-radius: 11px; }
.ico-s svg { width: 22px; height: 22px; }
.bar-link svg { width: 20px; height: 20px; }
.lp-btn { border-radius: 12px; }
.lp-btn-ghost { background: var(--lp-ghost-bg); border-color: var(--lp-ghost-line); }
.lp-btn-accent, .lp-btn-grad { background: var(--lp-ink); color: var(--lp-bg); }
.lp-btn-grad::after { display: none; }
.lp-theme-btn { border-radius: 12px; }
.lp-card { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 18px; box-shadow: none; }
a.lp-card:hover { border-color: var(--w-hover); transform: none; }
.cat-card { padding: 20px; gap: 8px; min-height: 0; }
.cat-card b { font-size: 18px; letter-spacing: -.02em; }
.cat-card span:not(.ico):not(.cc-n):not(.cc-ext) { font-size: 14px; line-height: 1.5; }
.cat-card .cc-n, .cat-card .cc-ext { font-size: 13px; color: var(--c-muted); background: var(--w-bg2); border-radius: 8px; padding: 3px 9px; align-self: flex-start; }
.sim-card { padding: 18px; min-height: 0; }
.sc-t b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.hero { text-align: center; padding-top: 56px; padding-bottom: 16px; }
.hero .lead, .hero-cat .lead { margin-left: auto; margin-right: auto; }
.hero h1, .page-head h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); }
.hero-cat { text-align: center; padding-top: 40px; }
.hero-cat h1 { font-size: clamp(32px, 5.5vw, 50px); }
.lead { font-size: 16px; font-weight: 400; color: var(--c-muted); line-height: 1.6; letter-spacing: 0; }
.lp-eyebrow { background: var(--w-bg2); border: 1px solid var(--lp-line); border-radius: 99px; padding: 6px 14px; font-size: 13px; color: var(--c-muted); }
.perks li { background: var(--w-bg2); border: 1px solid var(--lp-line); }
.content h2 { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.panel, .opts { color: var(--lp-ink); }
/* 장면·실험 고르기 단추와 시뮬레이션 제목: 이모지 대신 Leapinity 그림 (빌드 때 HTML 에 넣음) */
.scene-tab { display: inline-flex; align-items: center; gap: 7px; }
.scene-tab .tab-ic { flex: none; display: block; width: 20px; height: 20px; }
.scene-tab[aria-selected="true"] .tab-ic { background: #ffffff; border-radius: 6px; padding: 1px; }
.sim-head h1 { display: flex; align-items: center; gap: 12px; }
.ico-h { width: 44px; height: 44px; border-radius: 13px; }
.ico-h svg { width: 26px; height: 26px; }
@media (max-width: 420px) { .ico-h { width: 38px; height: 38px; border-radius: 12px; } .ico-h svg { width: 22px; height: 22px; } }

/* 📱 휴대폰 쓰기 편하게 (2026-11-08) */
.objs summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
.objs summary::-webkit-details-marker { display: none; }
.objs summary::before { content: '▸'; font-size: 14px; transition: transform .15s; }
.objs[open] summary::before { transform: rotate(90deg); }
.objs summary span { font-weight: 600; }
.zbtn-full { font-size: 20px; }
.stage.full { position: fixed; inset: 0; z-index: 60; height: 100vh; height: 100dvh; min-height: 0; border-radius: 0; }
.stage-full, .stage-full body { overflow: hidden; }
.info-x { position: sticky; top: -8px; float: right; margin: -8px -10px 0 6px; background: rgba(255,255,255,.12); border-radius: 99px; z-index: 1; }
.info-t { margin-right: 0; }
@media (max-width: 600px) {
  .stage { height: 62vh; height: 62svh; min-height: 340px; }
  .stage.full { height: 100dvh; }
  .info { max-height: 50%; padding: 12px 14px; }
  .info-desc { font-size: 14px; }
  .hud { right: 60px; }
  .hud-s { font-size: 12px; }
  .scene-tabs { scroll-snap-type: x proximity; }
  .scene-tab { scroll-snap-align: start; padding: 0 12px; }
}
@media (max-width: 400px) {
  .bar-link { font-size: 0; gap: 0; padding: 0 10px; }
  .lp-brand { min-width: 0; }
}
.btn-row[hidden], .exo-picks[hidden] { display: none; }
@media (max-width: 600px) {
  .panel .btn-row, .opts { gap: 6px; }
  .panel .btn-row .lp-btn, .opts .lp-btn { padding: 0 11px; font-size: 14px; min-width: 44px; }
  .pn-row { font-size: 14px; }
}
/* 태양계 수업(달의 위상·일식과 월식): 📌 핵심 정리 상자, 바로 가기 단추 */
.key-box { margin-top: 16px; padding: 16px 18px; border-radius: 20px; background: var(--c-soft); border: 1.5px solid var(--c-line); }
.key-box h2 { margin: 0 0 8px; font-size: 19px; }
.key-box ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 16px; line-height: 1.6; word-break: keep-all; }
.key-box .key-src { margin: 10px 0 0; font-size: 13px; color: var(--c-muted); }
.solar-jump { gap: 6px; }
.solar-jump .lp-btn { padding: 0 12px; font-size: 14px; min-width: 48px; }
.class-mode .key-box ul { font-size: 20px; }
.class-mode .key-box h2 { font-size: 24px; }
.class-mode .solar-jump .lp-btn { font-size: 17px; }
@media (max-width: 600px) { .key-box { padding: 14px; } .key-box ul { font-size: 15px; padding-left: 18px; } }

/* 광고 자리 (lp-ads.js) — 광고가 꺼져 있으면 hidden 이라 자리를 차지하지 않아요. 시뮬레이션 화면 위에는 두지 않아요. */
.lp-ad[hidden] { display: none; }
.lp-ad { display: block; max-width: 728px; margin: 24px auto; padding: 0 16px; min-height: 0; text-align: center; overflow: hidden; }
.lp-ad::before { content: '광고'; display: block; margin-bottom: 6px; font-size: 12px; color: var(--c-muted); text-align: center; }

/* 카테고리 설명(무엇을 배우나 · 교과서 단원 · 쓰는 법, scripts/cat-guide.mjs) — 흰 배경 기준: 얇은 설명 글 + 1px 테두리 카드 */
.cat-guide h2 { margin-bottom: 8px; }
.cg-about { margin: 0 0 14px; max-width: 760px; font-size: 16px; font-weight: 400; line-height: 1.7; color: var(--c-muted); word-break: keep-all; overflow-wrap: anywhere; }
.cg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.cg-card { padding: 18px 20px; min-width: 0; }
.cg-card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.cg-units, .cg-steps { margin: 0; display: grid; gap: 10px; font-size: 15px; font-weight: 400; line-height: 1.6; color: var(--c-muted); word-break: keep-all; overflow-wrap: anywhere; }
.cg-units { list-style: none; padding: 0; }
.cg-units b { display: block; color: var(--lp-ink); font-weight: 700; }
.cg-steps { padding-left: 20px; }
.cg-note { margin: 12px 0 0; font-size: 13px; color: var(--c-muted); line-height: 1.6; word-break: keep-all; }
@media (max-width: 420px) { .cg-card { padding: 16px; } .cg-units, .cg-steps { font-size: 15px; } }

/* ── 대개편 1단계 (2026-11-14): 실험 주소 탭 · 진도 도장 · QR · 학년·단원 표 · 인생 14세 이상 ── */
a.scene-tab { text-decoration: none; }
a.scene-tab:focus-visible { outline: 3px solid var(--lp-accent); outline-offset: 2px; }
.next-btn.done { border-color: #1f9d55; }
.next-btn.done::after { content: " ✅"; }
.sc-done, .lab-progress.has-done { color: #1a7f45; font-weight: 700; font-size: 13px; }
.lab-unit { display: block; margin-top: 4px; font-size: 13px; color: var(--c-muted); }
.unit-tag { font-size: 14px; }
.try-list { padding-left: 22px; }
.cc-age { display: inline-block; margin-top: 6px; padding: 2px 8px; border: 1px solid var(--c-line); border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--c-muted); }
.grade-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grade-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.grade-table th, .grade-table td { border: 1px solid var(--c-line); padding: 8px 10px; vertical-align: top; text-align: left; }
.grade-table thead th { background: var(--lp-ghost-bg); }
.grade-table tbody th { white-space: nowrap; width: 3.5em; }
.gt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gt-list a { display: inline-block; min-height: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 480px) { .grade-table { font-size: 14px; } .grade-table th, .grade-table td { padding: 6px; } }
.qr-btn { display: none; }
.class-mode .qr-btn { display: inline-flex; }
.qr-dlg { border: 1px solid var(--c-line); border-radius: 18px; padding: 18px; max-width: min(92vw, 720px); background: #ffffff; color: #111; text-align: center; }
.qr-dlg::backdrop { background: rgba(10, 14, 40, .6); }
.qr-dlg h2 { margin: 0 0 10px; font-size: 20px; }
.qr-cv { display: block; margin: 0 auto; max-width: 100%; height: auto; image-rendering: pixelated; }
.qr-url { margin: 10px 0; font-weight: 700; font-size: 18px; overflow-wrap: anywhere; color: #111; }

/* 🎲📊 수학: 확률 실험실 · 통계 실험실 (2026-11-14) */
.fx-box { margin: 14px 0; padding: 12px 16px; border-radius: 14px; background: var(--c-soft); border-left: 4px solid var(--lp-accent); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.fx-box p { margin: 0; }
.pb-cap { caption-side: top; text-align: left; padding: 8px 12px; font-weight: 700; color: var(--lp-ink); }
.pb-grid td, .pb-grid th { text-align: center; padding: 6px 8px; }
.pb-grid td.pb-seven { background: var(--c-soft); font-weight: 800; }
.pb-grid td.pb-hit { outline: 3px solid var(--lp-accent); outline-offset: -3px; }
.st-in { width: 100%; min-height: 96px; resize: vertical; font-variant-numeric: tabular-nums; }
.st-pre { gap: 6px; }
.st-pre .lp-btn { font-size: 14px; }
.st-msg { margin: 0; }
.st-stem th, .st-stem td { text-align: left; }
.st-stem td { letter-spacing: .25em; white-space: normal; word-break: break-all; }
.st-steps dd { overflow-wrap: anywhere; }
.st-dev { margin-top: 8px; }
.class-mode .fx-box { font-size: 20px; }

/* 🔌 전기 회로 · 🌊 파동과 소리: 공식 상자, 안전 안내, 부품 상자 */
.formula-box .formula-list { list-style: none; padding: 0; gap: 10px; }
.formula-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.formula-list code { font: 800 18px/1.5 Pretendard, "Malgun Gothic", sans-serif; color: var(--lp-ink); background: var(--lp-bg, #fff); border: 1.5px solid var(--c-line); border-radius: 10px; padding: 2px 10px; white-space: nowrap; }
.formula-list span { min-width: 0; }
.safety { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; border: 2px solid #f0a040; font-weight: 700; font-size: 15px; line-height: 1.6; word-break: keep-all; }
.ckt-tools { gap: 6px; }
.ckt-tools .lp-btn { min-height: 44px; padding: 0 12px; }
.class-mode .formula-list code { font-size: 22px; }
/* 계절의 변화: 식 상자, 위치 안내 한 줄 */
.formula { margin: 8px 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--c-soft); border: 1.5px solid var(--c-line); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; word-break: keep-all; }
.formula p { margin: 0 0 6px; line-height: 1.7; }
.formula p:last-child { margin-bottom: 0; }
.formula .muted { font-size: 14px; }
.geo-note { min-height: 1.4em; }
.class-mode .formula { font-size: 20px; }
/* ✅ 단원 확인 퀴즈 (2026-11-14) */
.quiz-list { padding-left: 22px; display: grid; gap: 14px; }
.quiz-q fieldset { border: 1px solid var(--c-line); border-radius: 14px; padding: 10px 12px; margin: 0; min-width: 0; }
.quiz-q legend { font-weight: 700; padding: 0 4px; }
.quiz-c { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.quiz-c input { width: 22px; height: 44px; margin: 0; flex: none; accent-color: var(--lp-accent); }
.quiz-q.no .quiz-c.right, .quiz-q.ok .quiz-c.right { background: rgba(31, 157, 85, .12); font-weight: 700; }
.quiz-q.ok legend::after { content: " ✅"; }
.quiz-q.no legend::after { content: " ❌"; }
.quiz-why { margin: 8px 4px 4px; font-size: 15px; }
.quiz-go { margin-top: 6px; }
.quiz-result { font-weight: 800; font-size: 17px; }
