/* 공통 실험 탐색 메뉴. */
:root { --explorer-width: 268px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 10px 18px; border-radius: 8px; background: var(--text); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--physics); outline-offset: 3px; }
.has-explorer > main, .has-explorer > .site-footer { width: calc(100% - var(--explorer-width)); margin-left: var(--explorer-width); }
.has-explorer > main.container { max-width: calc(var(--max) + 48px); margin-right: auto; }
.experiment-explorer { position: fixed; inset: 0 auto 0 0; z-index: 9; display: flex; flex-direction: column; width: var(--explorer-width); max-width: 100vw; padding: 26px 18px 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; touch-action: pan-y pinch-zoom; scrollbar-width: thin; scrollbar-gutter: stable; border-right: 1px solid var(--line); background: #fcfcfc; }
.experiment-explorer > * { flex-shrink: 0; min-width: 0; max-width: 100%; }
.experiment-explorer summary > :first-child { flex-shrink: 0; }
.explorer-brand { display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; margin: 0 6px 26px; border-radius: 6px; }
.explorer-brand img { display: block; flex: none; width: 36px; height: 36px; }
.explorer-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 6px 20px; }
.explorer-eyebrow { display: block; margin-bottom: 5px; color: #6d737a; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.explorer-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 19px; letter-spacing: -.03em; }
.explorer-heading h2 span { padding: 1px 7px; color: #555; background: #ededed; border-radius: 6px; font-size: 11px; font-weight: 600; }
.explorer-close, .explorer-clear { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; color: #656b74; background: transparent; font: inherit; font-size: 22px; cursor: pointer; }
.explorer-close { display: none; }
.explorer-search-field { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 9px 0 12px; border: 1px solid #dddfe3; border-radius: 9px; background: #fff; color: #707782; }
.explorer-search-field:focus-within { border-color: var(--physics); box-shadow: 0 0 0 3px var(--physics-soft); }
.explorer-search-field svg { flex: none; }
.explorer-search-field input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: 13px; }
.explorer-search-field input::-webkit-search-cancel-button { display: none; }
.explorer-search-hint { margin: 8px 3px 22px; color: #707782; font-size: 11px; }
.explorer-home { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin-bottom: 12px; padding: 9px 11px; border-radius: 8px; color: var(--text-sub); font-size: 13px; font-weight: 600; }
.explorer-home[aria-current], .explorer-home:hover { background: #efeff1; color: var(--text); }
.explorer-category { --explorer-accent: var(--physics); --explorer-soft: var(--physics-soft); margin-bottom: 5px; }
.explorer-category.chemistry { --explorer-accent: var(--chemistry); --explorer-soft: var(--chemistry-soft); }
.explorer-category.biology { --explorer-accent: var(--biology); --explorer-soft: var(--biology-soft); }
.explorer-category.earth { --explorer-accent: var(--earth); --explorer-soft: var(--earth-soft); }
.experiment-explorer summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 11px; border-radius: 8px; list-style: none; font-size: 14px; font-weight: 600; cursor: pointer; }
.experiment-explorer summary::-webkit-details-marker { display: none; }
.experiment-explorer summary:hover { background: #efeff1; }
.explorer-category[open] > summary { background: var(--explorer-soft); }
.explorer-category-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--explorer-accent); }
.explorer-count { margin-left: auto; color: #707782; font-size: 11px; font-weight: 500; }
.explorer-chevron { display: inline-block; margin-left: auto; color: #707782; font-size: 18px; line-height: 1; }
.explorer-count + .explorer-chevron { margin-left: 2px; }
details[open] > summary > .explorer-chevron { transform: rotate(90deg); }
.explorer-topics { margin: 4px 0 10px 14px; padding-left: 9px; border-left: 1px solid #e4e5e8; }
.explorer-category-all { display: block; padding: 10px 8px; color: #606874; font-size: 12px; }
.explorer-category-all:hover { text-decoration: underline; }
.explorer-topic > summary { min-height: 36px; padding: 7px 8px; color: #545d68; font-size: 12px; font-weight: 600; }
.explorer-experiments { padding: 0 0 6px 8px; }
.explorer-experiment { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; margin: 2px 0; border-radius: 7px; color: #606874; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.explorer-experiment:hover { color: var(--text); background: #efeff1; }
.explorer-experiment[aria-current="page"] { color: #1748c1; background: var(--physics-soft); font-weight: 700; box-shadow: inset 2px 0 #2f6bff; }
.explorer-experiment small { color: #707782; font-size: 10px; font-weight: 400; }
.explorer-result-count { margin: 0 10px 12px; color: #6d737a; font-size: 12px; }
.explorer-result-count b { margin-left: 3px; color: var(--text); }
.explorer-empty { padding: 20px 8px; font-size: 13px; }
.explorer-empty p { margin-top: 8px; color: #707782; font-size: 12px; }
.explorer-bottom { margin-top: auto; padding: 30px 8px 0; }
.explorer-note { display: block; margin-bottom: 10px; color: #707782; font-size: 11px; }
.explorer-bottom > div { display: flex; gap: 14px; color: #606874; font-size: 12px; }
.explorer-bottom a:hover { color: var(--text); text-decoration: underline; }
.explorer-launcher, .explorer-backdrop { display: none; }
.site-footer .footer-links { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; width: 100%; padding-top: 16px; border-top: 1px solid var(--line); color: #646b73; font-size: 12px; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-links a[href*="/privacy"] { color: var(--text); font-weight: 700; }

/* 운영 문서 */
.discovery-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 20px 0 10px; }
.discovery-controls label { display: grid; gap: 7px; color: var(--text-mute); font-size: 11px; }
.discovery-controls select { min-width: 140px; min-height: 36px; padding: 7px 32px 7px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text-sub); font: inherit; font-size: 12px; }
.discovery-reset { min-height: 36px; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-sub); font: inherit; font-size: 11px; cursor: pointer; }
.discovery-reset:hover:enabled { color: var(--text); background: var(--surface); }
.discovery-reset:disabled { opacity: .4; cursor: default; }
.discovery-count { margin-left: auto; padding-block: 8px; color: var(--text-mute); font-size: 11px; }
.discovery-note { margin-bottom: 24px; color: var(--text-mute); font-size: 11px; line-height: 1.7; }
.exp-facts { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--text-sub); font-size: 11px; }
.exp-facts span + span { color: var(--text-mute); }
.discovery-empty { grid-column: 1 / -1; padding: 40px 20px; border: 1px dashed var(--line-strong); border-radius: 9px; text-align: center; }
.discovery-empty h2 { margin-bottom: 8px; color: var(--text-sub); font-size: 16px; font-weight: 500; }
.discovery-empty p { margin-bottom: 20px; color: var(--text-mute); font-size: 12px; }
@media (max-width: 600px) {
  .discovery-controls { gap: 10px; }
  .discovery-controls label { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .discovery-controls select { width: 100%; min-width: 0; }
  .discovery-count { margin-left: auto; padding-block: 8px; }
}
.info-page { padding-top: 50px; padding-bottom: 80px; }
.info-page .info-inner { max-width: 760px; margin: 0 auto; }
.info-crumb { margin-bottom: 22px; font-size: 13px; color: #707782; }
.info-page h1 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.035em; line-height: 1.3; }
.info-lead { color: var(--text-sub); font-size: 17px; }
.info-date { margin-top: 18px; color: #707782; font-size: 13px; }
.info-summary { margin-top: 28px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.info-page section { margin-top: 36px; scroll-margin-top: 120px; }
.info-page h2 { margin-bottom: 12px; font-size: 21px; letter-spacing: -.02em; }
.info-page h3 { margin: 20px 0 8px; font-size: 16px; }
.info-page p + p { margin-top: 12px; }
.info-page section p, .info-page li { color: var(--text-sub); font-size: 15px; line-height: 1.9; }
.info-page ul, .info-page ol { padding-left: 22px; }
.info-page li + li { margin-top: 5px; }
.info-page a:not(.info-crumb a) { color: #1748c1; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.info-page .info-toc { display: flex; gap: 10px 20px; flex-wrap: wrap; margin-top: 24px; font-size: 13px; }
.info-page .info-table-wrap { overflow-x: auto; }
.info-page table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 13px; text-align: left; }
.info-page th, .info-page td { min-width: 100px; padding: 13px; border: 1px solid var(--line); vertical-align: top; }
.info-page th { background: var(--surface); font-weight: 600; }
.info-page td { color: var(--text-sub); }
.info-page details { padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-page details summary { cursor: pointer; font-weight: 600; }
.info-page details p { margin-top: 12px; }
.info-contact { display: grid; gap: 8px; margin-top: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.info-contact dt { font-size: 12px; color: #707782; }
.info-contact dd { margin-bottom: 4px; font-size: 15px; }

@media (min-width: 1001px) and (max-width: 1280px) {
  body { --explorer-width: 208px; }
  .has-explorer .lab-grid { grid-template-columns: 1fr; }
  .has-explorer .col-left { position: static; }
  .has-explorer .exp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-explorer .stepper { overflow-x: auto; }
  .has-explorer .stepper .label { display: none; }
  .has-explorer .stepper .current .label { display: inline; }
}
@media (max-width: 1000px) {
  .has-explorer > main, .has-explorer > .site-footer { width: 100%; margin-left: auto; }
  .explorer-launcher { position: sticky; top: 0; z-index: 9; display: block; padding: 8px 20px; border-bottom: 1px solid var(--line); background: #fcfcfc; }
  .explorer-open-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 4px 0; color: var(--text); border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
  .explorer-shortcut { margin-left: auto; color: #707782; font-size: 11px; font-weight: 400; }
  .experiment-explorer { z-index: 30; width: min(320px, calc(100vw - 40px)); visibility: hidden; transform: translateX(-100%); background: #fcfcfc; }
  .explorer-open { overflow: hidden; }
  .explorer-open .experiment-explorer { visibility: visible; transform: translateX(0); }
  .explorer-backdrop { position: fixed; inset: 0; z-index: 29; display: block; background: rgba(17, 24, 39, .36); }
  .explorer-close { display: grid; }
  .explorer-search-field input { font-size: 16px; }
  .explorer-experiment { min-height: 42px; justify-content: center; font-size: 13px; }
}
@media (max-width: 420px) {
  .info-page { padding-top: 32px; }
  .info-summary, .info-contact { padding: 18px; }
}

/* 언어 선택과 운영 안내는 모든 페이지의 푸터에서 제공한다. */
.language-switcher { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.language-switcher a { padding: 6px 8px; border-radius: 4px; color: var(--text-mute); white-space: nowrap; }
.language-switcher a:hover { color: var(--text); background: var(--surface); }
.language-switcher a[aria-current="true"] { color: var(--text); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--text-mute); }
.language-switcher > svg { flex: none; width: 14px; height: 14px; margin-right: 4px; color: var(--text-mute); }
html:is([lang="en"], [lang="es"]) .lab-workspace .stepper button { font-size: 9px; }
html:is([lang="en"], [lang="es"]) .lab-workspace .scene-head b { overflow-wrap: anywhere; }
html:is([lang="en"], [lang="es"]) .lab-workspace .scene-head span { flex-shrink: 0; }
html:is([lang="en"], [lang="es"]) .lab-workspace .controls > .actions .btn { white-space: normal; line-height: 1.25; }
@media (max-width: 700px) {
  html:is([lang="en"], [lang="es"]) .lab-workspace .stepper .current .label { max-width: 64px; font-size: 8px; line-height: 1.15; }
  html:is([lang="en"], [lang="es"]) .lab-workspace .lab-head h1 { font-size: 13px; line-height: 1.3; }
  html:is([lang="en"], [lang="es"]) .lab-workspace .workspace-tabs { gap: 12px; }
  html:is([lang="en"], [lang="es"]) .lab-workspace .workspace-tabs button { font-size: 9px; }
}

@media (max-width: 700px) {
  html:is([lang="en"], [lang="es"]) .lab-workspace .meters { max-height: 92px; overflow-y: auto; scrollbar-width: thin; }
  html:is([lang="en"], [lang="es"]) .lab-workspace .scene-head b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html:is([lang="en"], [lang="es"]) .lab-workspace .scene-head span { flex-shrink: 1; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.site-footer > .container { position: relative; display: block; max-width: 1120px; padding: 12px 48px 0; }
.footer-info > summary { display: none; }
.footer-details { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 64px; }
.footer-symbol { display: inline-flex; margin-bottom: 14px; border-radius: 4px; }
.footer-symbol img { display: block; width: 28px; height: 28px; }
.footer-about p { max-width: 320px; margin-bottom: 12px; color: var(--text-sub); font-size: 13px; line-height: 1.7; }
.footer-contact { margin-bottom: 6px; min-width: 0; }
.footer-contact a { color: var(--text-mute); font-size: 11px; overflow-wrap: anywhere; }
.footer-contact a:hover { color: var(--text); }
.footer-owner { color: var(--text-mute); font-size: 10px; }
.site-footer .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; width: 100%; border: 0; padding: 0; font-size: 12px; }
.footer-group { display: grid; justify-items: start; align-content: start; gap: 10px; min-width: 0; }
.footer-group h2 { margin: 0 0 4px; color: var(--text-sub); font-size: 11px; font-weight: 500; }
.footer-group a { color: var(--text-mute); line-height: 1.6; overflow-wrap: anywhere; }
.site-footer .footer-group a[href*="/privacy"] { color: var(--text-mute); font-weight: 400; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.footer-meta { color: var(--text-mute); font-size: 10px; }
@media (max-width: 1280px) {
  .site-footer > .container { padding-inline: 32px; }
}
@media (max-width: 600px) {
  .site-footer > .container { padding-inline: 20px; }
  .footer-details { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .site-footer .footer-links { gap: 20px; }
  .footer-bottom { justify-content: flex-start; gap: 8px; margin-top: 24px; }
  .footer-bottom .language-switcher { order: -1; flex-basis: 100%; margin-left: -8px; }
}

/* 메뉴는 정적 HTML로 표시하고 실험의 DOM 이동 중간 프레임만 건너뛴다. */
html { overflow-x: clip; background: #08090b; }
.workspace-pending body[data-workspace] > main { visibility: hidden; }
@view-transition { navigation: auto; }
::view-transition-group(root) { animation: none; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
