:root {
  --ink: #202522;
  --muted: #68716b;
  --paper: #f4f3ee;
  --white: #fffefa;
  --line: #d9ddd7;
  --coral: #e4684f;
  --yellow: #e6c84f;
  --green: #24524a;
  --mint: #a8d3bf;
  --blue: #49748f;
  --violet: #765d77;
  --sans: "Manrope", "Noto Sans SC", sans-serif;
  --mono: "DM Mono", "Noto Sans SC", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.layout { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; width: min(1340px, calc(100% - 80px)); height: 74px; margin: auto; border-bottom: 1px solid var(--line); background: rgba(244, 243, 238, .94); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 245px; }
.brand strong { display: block; font-size: 15px; font-weight: 800; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.brand-mark { position: relative; display: inline-block; width: 28px; height: 28px; }
.brand-mark i { position: absolute; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; }
.brand-mark i:nth-child(1) { top: 1px; left: 1px; background: var(--coral); }
.brand-mark i:nth-child(2) { top: 14px; left: 2px; background: var(--yellow); }
.brand-mark i:nth-child(3) { top: 7px; left: 15px; background: #75a68c; }
.site-header > nav { display: flex; align-items: center; gap: 31px; height: 100%; }
.site-header > nav a { position: relative; padding: 27px 0 25px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.site-header > nav a:hover, .site-header > nav a.active { color: var(--ink); }
.site-header > nav a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: var(--coral); content: ""; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 245px; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; padding: 0; background: transparent; color: var(--ink); }
.icon-button svg { width: 14px; height: 14px; }
.icon-button:hover { border-color: var(--ink); background: var(--white); }
.profile-button { border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 11px; font-weight: 800; }

.overline { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.overline::before { display: inline-block; width: 25px; height: 1px; margin: 0 9px 3px 0; background: var(--coral); content: ""; vertical-align: middle; }
.directory-head { min-height: 285px; padding: 62px 0 50px; }
.directory-title { display: grid; grid-template-columns: minmax(400px, .9fr) minmax(340px, .72fr); align-items: end; justify-content: space-between; gap: 80px; margin-top: 34px; }
.directory-title h1 { margin: 0; font-size: 58px; font-weight: 800; line-height: 1; }
.directory-title p { max-width: 560px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.module-list { display: grid; gap: 30px; padding-bottom: 96px; }
.module-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); min-height: 330px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
a.module-row { transition: box-shadow .25s ease, transform .25s ease; }
a.module-row:hover, a.module-row:focus-visible { outline: 0; box-shadow: 9px 11px 0 rgba(32, 37, 34, .1); transform: translateY(-4px); }
.module-row:nth-child(even) { grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr); }
.module-media, .module-graphic { position: relative; min-height: 330px; overflow: hidden; }
.module-media { background: #193f3a; }
.module-media::after { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(17, 42, 38, .05), rgba(17, 42, 38, .52)); content: ""; }
.module-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.module-row:hover .module-media img { transform: scale(1.025); }
.media-number { position: absolute; z-index: 2; top: 22px; left: 24px; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .64); color: #fff; font-family: var(--mono); font-size: 10px; }
.media-play { position: absolute; z-index: 2; right: 28px; bottom: 26px; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--yellow); color: var(--ink); }
.media-play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.module-copy { display: flex; flex-direction: column; justify-content: center; padding: 55px 58px; }
.module-copy > p { margin: 0 0 17px; color: var(--coral); font-family: var(--mono); font-size: 9px; }
.module-copy h2 { margin: 0 0 17px; font-size: 35px; line-height: 1.2; }
.module-copy > span { max-width: 480px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.module-copy b { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 38px; border-bottom: 1px solid currentColor; padding-bottom: 3px; font-size: 11px; }
.module-copy b svg { width: 14px; height: 14px; }
.is-pending { color: #3d4641; }
.is-pending .module-copy b { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.structure-module { background: #edf0e7; }
.structure-module .module-copy > p { color: #5e765c; }
.microscopic-module { background: #f1ebdf; }
.microscopic-module .module-copy > p { color: #9a623e; }
.tools-module { background: #eee9ef; }
.tools-module .module-copy > p { color: var(--violet); }
.module-graphic .media-number { color: var(--ink); border-color: rgba(32, 37, 34, .3); }
.crystal-graphic { background-image: linear-gradient(rgba(72, 102, 84, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 102, 84, .12) 1px, transparent 1px); background-size: 46px 46px; }
.crystal-graphic::before, .crystal-graphic::after { position: absolute; top: 50%; left: 50%; width: 195px; height: 195px; border: 1px solid rgba(55, 81, 66, .42); content: ""; transform: translate(-50%, -50%) rotate(24deg) skewY(-9deg); }
.crystal-graphic::after { transform: translate(-50%, -50%) rotate(114deg) skewY(-9deg); }
.crystal-graphic > i { position: absolute; z-index: 2; width: 32px; height: 32px; border: 1px solid rgba(32, 37, 34, .2); border-radius: 50%; background: var(--mint); box-shadow: inset -7px -7px 12px rgba(30, 76, 60, .16); }
.crystal-graphic > i:nth-of-type(1) { top: 25%; left: 33%; }
.crystal-graphic > i:nth-of-type(2) { top: 25%; right: 30%; background: #e2826c; }
.crystal-graphic > i:nth-of-type(3) { bottom: 25%; left: 33%; background: #e2826c; }
.crystal-graphic > i:nth-of-type(4) { right: 30%; bottom: 25%; }
.crystal-graphic > i:nth-of-type(5) { top: 48%; left: 47%; width: 40px; height: 40px; background: #e2826c; }
.crystal-graphic > i:nth-of-type(6) { top: 14%; left: 49%; }
.crystal-graphic > i:nth-of-type(7) { bottom: 12%; left: 49%; }
.crystal-graphic > i:nth-of-type(8) { top: 48%; right: 17%; background: #e2826c; }
.particle-graphic { background: #315d54; }
.particle-graphic::before { position: absolute; inset: 0; opacity: .22; background-image: radial-gradient(circle, rgba(255,255,255,.65) 1px, transparent 1.5px); background-size: 35px 35px; content: ""; }
.particle-graphic > i { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: #ef8468; box-shadow: 0 0 0 6px rgba(255,255,255,.06); }
.particle-graphic > i:nth-of-type(1) { top: 26%; left: 27%; }
.particle-graphic > i:nth-of-type(2) { top: 57%; left: 43%; background: #7eb8c9; }
.particle-graphic > i:nth-of-type(3) { top: 20%; right: 22%; background: var(--yellow); }
.particle-graphic > i:nth-of-type(4) { right: 30%; bottom: 18%; width: 26px; height: 26px; background: #7eb8c9; }
.particle-graphic > i:nth-of-type(5) { bottom: 21%; left: 18%; width: 26px; height: 26px; background: var(--yellow); }
.particle-graphic > i:nth-of-type(6) { top: 44%; left: 58%; width: 25px; height: 25px; }
.tool-graphic { display: flex; align-items: center; justify-content: center; gap: 25px; background-image: linear-gradient(rgba(112, 83, 113, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 83, 113, .1) 1px, transparent 1px); background-size: 42px 42px; }
.tool-graphic > svg { width: 68px; height: 68px; stroke-width: 1.2; color: var(--violet); }

.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 35px; color: var(--muted); font-size: 10px; font-weight: 700; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; }
.gallery-head { padding: 44px 0 42px; }
.gallery-title-row { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(330px, 460px); align-items: end; gap: 70px; }
.gallery-title-row h1 { margin: 20px 0 0; font-size: 52px; line-height: 1.04; }
.gallery-title-row > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.gallery-stats { display: flex; gap: 0; margin-top: 42px; border-top: 1px solid var(--line); padding-top: 22px; }
.gallery-stats span { display: flex; align-items: baseline; gap: 7px; min-width: 160px; border-right: 1px solid var(--line); margin-right: 23px; }
.gallery-stats strong { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.gallery-stats small { color: var(--muted); font-size: 9px; }
.gallery-toolbar { position: sticky; top: 74px; z-index: 20; border-block: 1px solid var(--line); background: rgba(244, 243, 238, .96); backdrop-filter: blur(12px); }
.toolbar-inner { display: grid; grid-template-columns: minmax(250px, 340px) minmax(500px, 1fr) auto; align-items: center; gap: 28px; min-height: 76px; }
.search-field { display: flex; align-items: center; min-width: 0; height: 40px; border: 1px solid #cfd4cf; background: var(--white); }
.search-field > svg { flex: 0 0 15px; width: 15px; height: 15px; margin-left: 13px; color: var(--muted); }
.search-field input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 10px; background: transparent; color: var(--ink); font-size: 11px; }
.search-field button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; padding: 0; background: transparent; color: var(--muted); opacity: 0; pointer-events: none; }
.search-field.has-value button { opacity: 1; pointer-events: auto; }
.search-field button svg { width: 14px; height: 14px; }
.book-filters { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; }
.book-filters button { flex: 0 0 auto; height: 36px; border: 0; border-bottom: 2px solid transparent; padding: 0 12px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
.book-filters button:hover, .book-filters button.active { border-bottom-color: var(--coral); color: var(--ink); }
.result-count { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.film-library { min-height: 480px; padding: 48px 0 90px; }
.film-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px 24px; }
.film-card { min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 21px; background: transparent; }
.film-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #234c45; }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.22); font-size: 76px; font-weight: 800; }
.film-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .3s ease, transform .45s ease; }
.film-cover img.is-missing { visibility: hidden; }
.film-cover::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 35, 31, .01), rgba(13, 35, 31, .45)); content: ""; }
.film-cover:hover img, .film-cover:focus-visible img { filter: saturate(1.08); transform: scale(1.025); }
.film-cover:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.film-order { position: absolute; z-index: 2; top: 13px; left: 13px; display: grid; place-items: center; min-width: 34px; height: 27px; border: 1px solid rgba(255,255,255,.78); background: rgba(255,254,250,.9); color: var(--ink); font-family: var(--mono); font-size: 9px; }
.film-book { position: absolute; z-index: 2; top: 13px; right: 13px; border: 1px solid rgba(255,255,255,.68); padding: 4px 7px; background: rgba(24, 44, 40, .66); color: #fff; font-family: var(--mono); font-size: 8px; backdrop-filter: blur(5px); }
.film-duration { position: absolute; z-index: 2; right: 12px; bottom: 11px; padding: 3px 6px; background: rgba(20, 25, 22, .78); color: #fff; font-family: var(--mono); font-size: 8px; }
.film-play { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 254, 250, .92); color: var(--green); transform: translate(-50%, -50%); transition: background .2s ease, transform .2s ease; }
.film-cover:hover .film-play { background: var(--yellow); transform: translate(-50%, -50%) scale(1.08); }
.film-play svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; }
.film-meta { margin: 15px 0 7px; color: var(--muted); font-family: var(--mono); font-size: 8px; }
.film-title { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.film-title h2 { min-width: 0; margin: 0; font-size: 16px; line-height: 1.45; }
.film-title svg { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 4px; color: var(--coral); transition: transform .2s ease; }
.film-title:hover svg { transform: translate(2px, -2px); }
.empty-state { display: grid; place-items: center; min-height: 330px; border: 1px solid var(--line); padding: 50px; background: var(--white); text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state svg { width: 31px; height: 31px; margin-bottom: 18px; color: var(--coral); }
.empty-state strong { font-size: 18px; }
.empty-state span { margin-top: 6px; color: var(--muted); font-size: 11px; }

.experiment-detail { min-height: calc(100vh - 170px); padding: 42px 0 88px; }
.detail-loading { display: grid; min-height: 480px; place-items: center; color: var(--muted); }
.detail-breadcrumb { display: flex; align-items: center; gap: 8px; width: fit-content; margin-bottom: 42px; color: var(--muted); font-size: 10px; font-weight: 700; }
.detail-breadcrumb svg { width: 14px; height: 14px; }
.detail-header { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 70px; align-items: end; margin-bottom: 38px; }
.detail-kicker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; color: var(--coral); font-family: var(--mono); font-size: 9px; }
.detail-header h1 { max-width: 800px; margin: 0; font-size: 42px; line-height: 1.2; }
.detail-header > p { margin: 0; border-left: 3px solid var(--yellow); padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.85; }
.detail-stage { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; }
.detail-video { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--green); }
.detail-video::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(14, 35, 31, .62)); content: ""; }
.detail-video img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.detail-video:hover img { transform: scale(1.02); }
.detail-video .film-play { width: 68px; height: 68px; }
.detail-video .film-play svg { width: 24px; height: 24px; }
.detail-video-source { position: absolute; z-index: 2; right: 24px; bottom: 21px; left: 24px; color: #fff; font-family: var(--mono); font-size: 9px; }
.detail-side { display: flex; flex-direction: column; border-top: 4px solid var(--coral); padding-top: 23px; }
.detail-side h2 { margin: 0 0 18px; font-size: 20px; }
.detail-facts { display: grid; margin: 0; }
.detail-facts div { display: grid; grid-template-columns: 74px 1fr; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.detail-facts dt { color: var(--muted); font-size: 9px; }
.detail-facts dd { min-width: 0; margin: 0; font-size: 10px; overflow-wrap: anywhere; }
.knowledge-link { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: auto; border: 1px solid #b8cfc4; padding: 15px 16px; background: #e7f0eb; color: var(--green); font-size: 10px; font-weight: 800; }
.knowledge-link:hover { border-color: var(--green); background: #dfece6; }
.knowledge-link svg { flex: 0 0 16px; width: 16px; height: 16px; }
.knowledge-unavailable { margin-top: auto; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 10px; }
.detail-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; border-top: 1px solid var(--line); padding-top: 22px; }
.detail-nav a { display: grid; gap: 3px; max-width: 43%; color: var(--muted); font-size: 9px; }
.detail-nav a:last-child { margin-left: auto; text-align: right; }
.detail-nav strong { color: var(--ink); font-size: 11px; }
.detail-not-found { display: grid; place-items: center; min-height: 480px; text-align: center; }
.detail-not-found h1 { margin: 0 0 9px; font-size: 32px; }
.detail-not-found p { margin: 0 0 25px; color: var(--muted); }
.detail-not-found a { border-bottom: 1px solid var(--ink); font-size: 11px; }

.structure-head { padding: 20px 0 24px; }
.structure-back-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; border: 1px solid #b8c8bf; border-radius: 6px; padding: 8px 13px; background: #f4f7f4; color: var(--ink); font-size: 10px; font-weight: 800; }
.structure-back-button:hover { border-color: var(--green); background: #e7f0eb; color: var(--green); }
.structure-back-button svg { width: 15px; height: 15px; }
.structure-head h1 { margin: 12px 0 0; font-size: 45px; line-height: 1.05; }
.structure-workbench { border-block: 1px solid #d3dcd6; background: #e8ede9; }
.workbench-grid { display: grid; grid-template-columns: 205px minmax(0, 1fr) 250px; grid-template-rows: 590px auto; min-height: 750px; }
.category-panel { border-right: 1px solid rgba(64, 83, 73, .15); padding: 28px 22px 25px 0; }
.category-panel > p { margin: 0 0 22px; color: #6c7a73; font-family: var(--mono); font-size: 8px; }
.category-panel > div { display: grid; gap: 7px; }
.category-panel button { position: relative; display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 63px; border: 0; border-left: 3px solid transparent; padding: 10px 11px; background: transparent; color: #68766f; text-align: left; }
.category-panel button:hover, .category-panel button[aria-pressed="true"] { border-left-color: var(--coral); background: rgba(255, 254, 250, .62); color: var(--ink); }
.category-panel button span { color: var(--coral); font-family: var(--mono); font-size: 8px; }
.category-panel button strong { font-size: 11px; line-height: 1.4; }
.category-panel button small { color: #7f8d86; font-family: var(--mono); font-size: 8px; }
.three-stage { position: relative; min-width: 0; height: 590px; overflow: hidden; background: #e8ede9; }
#structure-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#structure-canvas:active { cursor: grabbing; }
.three-stage-title { position: absolute; z-index: 3; top: 27px; left: 28px; display: grid; pointer-events: none; }
.three-stage-title span { color: var(--coral); font-family: var(--mono); font-size: 18px; font-weight: 500; }
.three-stage-title strong { margin-top: 5px; font-size: 11px; }
.three-controls { position: absolute; z-index: 4; top: 22px; right: 23px; display: flex; gap: 8px; }
.model-control { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(32, 37, 34, .2); border-radius: 50%; padding: 0; background: rgba(255, 254, 250, .78); color: var(--ink); backdrop-filter: blur(5px); }
.model-control svg { width: 17px; height: 17px; }
.model-control:hover, .model-control.active { border-color: var(--ink); background: var(--ink); color: var(--white); }
.model-control:disabled { border-color: rgba(32,37,34,.1); background: rgba(255,255,255,.32); color: rgba(32,37,34,.26); cursor: default; }
.structure-legend { position: absolute; z-index: 3; bottom: 22px; left: 28px; display: flex; flex-wrap: wrap; gap: 8px 17px; max-width: 62%; color: #64726b; font-family: var(--mono); font-size: 8px; pointer-events: none; }
.structure-legend span { display: flex; align-items: center; gap: 6px; }
.structure-legend i { width: 10px; height: 10px; border: 1px solid rgba(32,37,34,.18); border-radius: 50%; background: var(--legend-color); box-shadow: inset -2px -2px 3px rgba(0,0,0,.12); }
.three-stage-status { position: absolute; z-index: 3; right: 25px; bottom: 20px; margin: 0; color: #64726b; font-family: var(--mono); font-size: 8px; pointer-events: none; }
.model-panel { min-width: 0; border-left: 1px solid rgba(64, 83, 73, .15); padding: 27px 0 24px 21px; overflow: hidden; }
.model-panel-head { display: flex; justify-content: space-between; margin: 0 0 18px; padding-right: 5px; color: #53615a; font-size: 10px; font-weight: 800; }
.model-panel-head small { color: var(--coral); font-family: var(--mono); font-size: 9px; }
#structure-select { display: none; width: 100%; height: 42px; border: 1px solid #bdc9c2; padding: 0 12px; background: rgba(255,254,250,.78); color: var(--ink); font-size: 11px; }
.model-list { display: grid; max-height: 505px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #aebdb5 transparent; }
.model-list button { display: grid; grid-template-columns: 25px 54px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 57px; border: 0; border-top: 1px solid rgba(64, 83, 73, .13); padding: 9px 5px; background: transparent; color: #66736c; text-align: left; }
.model-list button:last-child { border-bottom: 1px solid rgba(64, 83, 73, .13); }
.model-list button:hover, .model-list button.active { background: rgba(255,254,250,.68); color: var(--ink); }
.model-list button.active { box-shadow: inset 3px 0 var(--yellow); }
.model-list button span { color: #849189; font-family: var(--mono); font-size: 8px; }
.model-list button strong { font-family: var(--mono); font-size: 11px; }
.model-list button small { min-width: 0; font-size: 9px; line-height: 1.4; }
.structure-summary { grid-column: 1 / -1; display: grid; grid-template-columns: 205px minmax(0, 1fr) 430px; gap: 35px; border-top: 1px solid rgba(64, 83, 73, .17); padding: 31px 0 36px; }
.summary-index { margin: 3px 0 0; color: var(--coral); font-family: var(--mono); font-size: 8px; }
.structure-summary h2 { margin: 0 0 9px; font-size: 22px; line-height: 1.3; }
.structure-summary > div > p { max-width: 600px; margin: 0; color: #65716a; font-size: 10px; line-height: 1.8; }
.structure-summary dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: 0; }
.structure-summary dl div { border-top: 2px solid rgba(64,83,73,.18); padding-top: 10px; }
.structure-summary dt { color: #77847d; font-size: 8px; }
.structure-summary dd { margin: 4px 0 0; color: var(--ink); font-family: var(--mono); font-size: 10px; }

.footer { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer > div:first-child { display: flex; gap: 12px; }
.footer strong { color: var(--ink); }
.footer-links { display: flex; align-items: center; gap: 26px; }
.footer-links button { border: 0; padding: 0; background: transparent; color: inherit; font-size: inherit; }
.footer-links a:hover, .footer-links button:hover { color: var(--ink); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 12px 15px; background: var(--ink); color: var(--white); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .site-header > nav { gap: 17px; }
  .brand, .header-tools { min-width: 190px; }
  .directory-title { gap: 45px; }
  .module-row, .module-row:nth-child(even) { grid-template-columns: 1fr 1fr; }
  .module-copy { padding: 42px; }
  .toolbar-inner { grid-template-columns: minmax(230px, 300px) 1fr; gap: 18px; padding-block: 14px; }
  .result-count { grid-column: 2; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-stage { grid-template-columns: minmax(0, 1fr) 260px; }
  .workbench-grid { grid-template-columns: 180px minmax(0, 1fr) 220px; }
  .structure-summary { grid-template-columns: 180px minmax(0, 1fr) 350px; }
}

@media (max-width: 820px) {
  .layout, .site-header { width: min(100% - 36px, 680px); }
  .site-header { height: auto; min-height: 68px; flex-wrap: wrap; padding: 11px 0; gap: 8px; }
  .brand { min-width: auto; }
  .site-header > nav { order: 3; width: 100%; height: 33px; justify-content: space-between; overflow-x: auto; gap: 18px; }
  .site-header > nav a { flex: 0 0 auto; padding: 6px 0 8px; font-size: 11px; }
  .header-tools { min-width: auto; }
  .directory-head { min-height: 250px; padding-top: 45px; }
  .directory-title { grid-template-columns: 1fr; gap: 25px; }
  .directory-title h1 { font-size: 48px; }
  .directory-title p { max-width: 540px; }
  .module-row, .module-row:nth-child(even) { grid-template-columns: 1fr; }
  .module-row:nth-child(even) .module-copy { order: 2; }
  .module-row:nth-child(even) .module-graphic { order: 1; }
  .module-media, .module-graphic { min-height: 280px; }
  .module-copy { padding: 40px; }
  .module-copy h2 { font-size: 31px; }
  .gallery-title-row { grid-template-columns: 1fr; gap: 25px; }
  .gallery-title-row h1 { font-size: 45px; }
  .gallery-toolbar { top: 111px; }
  .toolbar-inner { grid-template-columns: 1fr; gap: 9px; padding: 13px 0 11px; }
  .result-count { grid-column: auto; }
  .film-library { padding-top: 36px; }
  .detail-header { grid-template-columns: 1fr; gap: 22px; }
  .detail-header > p { max-width: 530px; }
  .detail-stage { grid-template-columns: 1fr; }
  .detail-side { min-height: 290px; }
  .structure-head h1 { font-size: 41px; }
  .workbench-grid { grid-template-columns: 1fr; grid-template-rows: auto 520px auto auto; width: 100%; }
  .category-panel { border-right: 0; border-bottom: 1px solid rgba(64,83,73,.15); padding: 18px; }
  .category-panel > p { margin-bottom: 10px; }
  .category-panel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-panel button { grid-template-columns: 25px minmax(0,1fr); min-height: 52px; }
  .category-panel button small { display: none; }
  .three-stage { height: 520px; }
  .model-panel { border-top: 1px solid rgba(64,83,73,.15); border-left: 0; padding: 20px 18px 22px; }
  #structure-select { display: block; }
  .model-list { display: none; }
  .structure-summary { grid-column: 1; grid-template-columns: 1fr; gap: 17px; padding: 28px 18px 34px; }
  .structure-summary dl { max-width: 560px; }
}

@media (max-width: 540px) {
  .directory-title h1 { font-size: 42px; }
  .module-list { gap: 22px; }
  .module-copy { padding: 32px 26px 36px; }
  .module-copy h2 { font-size: 28px; }
  .module-media, .module-graphic { min-height: 235px; }
  .gallery-head { padding-top: 30px; }
  .gallery-title-row h1 { font-size: 39px; }
  .gallery-stats { flex-wrap: wrap; gap: 15px 0; }
  .gallery-stats span { min-width: 135px; }
  .gallery-toolbar { position: static; }
  .book-filters { margin-inline: -4px; }
  .book-filters button { padding-inline: 9px; }
  .film-grid { grid-template-columns: 1fr; gap: 32px; }
  .film-card { padding-bottom: 18px; }
  .detail-header h1 { font-size: 33px; }
  .detail-video .film-play { width: 56px; height: 56px; }
  .detail-video-source { right: 16px; bottom: 14px; left: 16px; }
  .detail-nav a { max-width: 47%; }
  .structure-head { padding: 16px 0 20px; }
  .structure-head h1 { margin-top: 10px; font-size: 34px; }
  .category-panel > div { grid-template-columns: 1fr; }
  .category-panel button { grid-template-columns: 27px minmax(0,1fr) auto; min-height: 43px; padding-block: 5px; }
  .category-panel button small { display: block; }
  .workbench-grid { grid-template-rows: auto 460px auto auto; }
  .three-stage { height: 460px; }
  .three-stage-title { top: 19px; left: 18px; }
  .three-stage-title span { font-size: 15px; }
  .three-controls { top: 15px; right: 15px; gap: 5px; }
  .model-control { width: 36px; height: 36px; }
  .model-control svg { width: 15px; height: 15px; }
  .structure-legend { bottom: 16px; left: 18px; max-width: calc(100% - 36px); gap: 6px 12px; }
  .three-stage-status { display: none; }
  .structure-summary dl { grid-template-columns: 1fr; gap: 11px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 15px; }
}

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

.visual-page-head { padding: 20px 0 24px; }
.visual-back-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; border: 1px solid #b8c8bf; border-radius: 6px; padding: 8px 13px; background: #f4f7f4; color: var(--ink); font-size: 10px; font-weight: 800; }
.visual-back-button:hover { border-color: var(--green); background: #e7f0eb; color: var(--green); }
.visual-back-button svg { width: 15px; height: 15px; }
.visual-page-head h1 { margin: 12px 0 0; font-size: 45px; line-height: 1.05; }

.microscopic-workspace { border-block: 1px solid #d3dcd6; background: #eef1ed; }
.microscopic-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr) 250px; min-height: 620px; }
.micro-modes { border-right: 1px solid rgba(64,83,73,.15); padding: 24px 18px 24px 0; }
.micro-modes { scrollbar-width: none; }
.micro-modes::-webkit-scrollbar { display: none; }
.micro-modes button { display: grid; grid-template-columns: 25px 20px minmax(0,1fr); align-items: center; gap: 9px; width: 100%; min-height: 66px; border: 0; border-left: 3px solid transparent; padding: 10px 10px; background: transparent; color: #68766f; text-align: left; }
.micro-modes button:hover, .micro-modes button[aria-pressed="true"] { border-left-color: var(--coral); background: rgba(255,254,250,.72); color: var(--ink); }
.micro-modes button > span { color: var(--coral); font-family: var(--mono); font-size: 8px; }
.micro-modes button svg { width: 17px; height: 17px; }
.micro-modes button strong { font-size: 11px; line-height: 1.35; }
.micro-stage { position: relative; min-width: 0; height: 620px; overflow: hidden; background: #f0f3ef; }
#micro-canvas { display: block; width: 100%; height: 100%; }
.micro-stage-heading { position: absolute; z-index: 3; top: 22px; left: 25px; display: grid; gap: 4px; max-width: calc(100% - 50px); pointer-events: none; }
.micro-stage-heading strong { color: var(--ink); font-size: 13px; }
.micro-stage-heading span { color: var(--coral); font-family: var(--mono); font-size: 11px; }
.micro-legend { position: absolute; z-index: 3; bottom: 20px; left: 25px; display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 70%; color: #5e6c65; font-size: 9px; pointer-events: none; }
.micro-legend span { display: inline-flex; align-items: center; gap: 6px; }
.micro-legend i { width: 9px; height: 9px; border: 1px solid rgba(32,37,34,.18); border-radius: 50%; background: var(--micro-color); }
.micro-status { position: absolute; z-index: 3; right: 22px; bottom: 18px; max-width: 42%; margin: 0; color: #5e6c65; font-size: 9px; text-align: right; pointer-events: none; }
.micro-panel { display: grid; align-content: start; gap: 32px; border-left: 1px solid rgba(64,83,73,.15); padding: 24px 0 28px 22px; }
.micro-panel section { min-width: 0; }
.micro-panel h2 { margin: 0 0 15px; color: #4f5d56; font-size: 10px; }
#micro-controls { display: grid; gap: 12px; }
.micro-range { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; border-bottom: 1px solid rgba(64,83,73,.14); padding: 0 0 16px; }
.micro-range span { color: #5f6d66; font-size: 10px; }
.micro-range output { color: var(--coral); font-family: var(--mono); font-size: 10px; }
.micro-range input { grid-column: 1 / -1; width: 100%; accent-color: var(--green); }
.micro-wide-button, .micro-reset-button, .micro-button-pair button, .micro-button-stack button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border: 1px solid #b8c7bf; border-radius: 5px; padding: 8px 11px; background: rgba(255,254,250,.65); color: var(--ink); font-size: 10px; font-weight: 700; }
.micro-wide-button:hover, .micro-wide-button[aria-pressed="true"], .micro-button-pair button:hover, .micro-button-stack button:hover { border-color: var(--green); background: var(--green); color: var(--white); }
.micro-reset-button { border-color: transparent; background: transparent; color: #68766f; }
.micro-reset-button:hover { background: rgba(255,254,250,.68); color: var(--ink); }
.micro-wide-button svg, .micro-reset-button svg, .micro-button-pair svg, .micro-button-stack svg { width: 15px; height: 15px; }
.micro-button-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.micro-button-stack { display: grid; gap: 8px; }
#micro-stats { display: grid; gap: 0; margin: 0; }
#micro-stats div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(64,83,73,.13); padding: 11px 0; }
#micro-stats dt { color: #68766f; font-size: 9px; }
#micro-stats dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 500; }

.tools-page-head { padding-bottom: 22px; }
.tools-toolbar { position: sticky; top: 74px; z-index: 20; border-block: 1px solid var(--line); background: rgba(244,243,238,.96); backdrop-filter: blur(12px); }
.tools-toolbar-inner { display: grid; grid-template-columns: 260px minmax(0,1fr) auto; align-items: center; gap: 24px; min-height: 70px; }
.tool-search { display: flex; align-items: center; min-width: 0; height: 40px; border: 1px solid #c7cec8; border-radius: 5px; background: var(--white); }
.tool-search > svg { flex: 0 0 16px; width: 16px; margin-left: 12px; color: #67736d; }
.tool-search input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 0 10px; background: transparent; color: var(--ink); font-size: 11px; }
.tool-search button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; padding: 0; background: transparent; color: #6d7772; }
.tool-search button[hidden] { visibility: hidden; display: grid; }
.tool-search button svg { width: 14px; height: 14px; }
.tool-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-filters button { min-height: 32px; border: 1px solid transparent; border-radius: 5px; padding: 6px 10px; background: transparent; color: #68716b; font-size: 9px; font-weight: 700; }
.tool-filters button:hover, .tool-filters button[aria-pressed="true"] { border-color: #b8c7bf; background: #e5ece8; color: var(--green); }
.tools-toolbar output { color: #68716b; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.tool-library { padding: 38px 0 65px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.tool-card { --tool-tone: #496f68; --tool-soft: #dfeae5; display: grid; grid-template-columns: 180px minmax(0,1fr); min-height: 260px; overflow: hidden; border: 1px solid #d4d9d4; border-radius: 6px; background: var(--white); transition: border-color .2s ease, transform .2s ease; }
.tool-card:hover { border-color: #aebbb3; transform: translateY(-2px); }
.tool-card-visual { position: relative; display: grid; place-items: center; min-height: 260px; overflow: hidden; background: var(--tool-soft); color: var(--tool-tone); }
.tool-card-visual::before { position: absolute; inset: 20px; border: 1px solid color-mix(in srgb, var(--tool-tone) 25%, transparent); border-radius: 50%; content: ""; }
.tool-card-visual > span { position: absolute; top: 16px; left: 17px; font-family: var(--mono); font-size: 9px; }
.tool-card-visual > svg { position: relative; z-index: 2; width: 58px; height: 58px; stroke-width: 1.35; }
.tool-card-visual b { position: absolute; width: 13px; height: 13px; border: 2px solid var(--tool-tone); border-radius: 50%; background: var(--white); }
.tool-card-visual b:nth-of-type(1) { top: 24%; right: 22%; }
.tool-card-visual b:nth-of-type(2) { right: 19%; bottom: 25%; width: 9px; height: 9px; }
.tool-card-visual b:nth-of-type(3) { bottom: 18%; left: 20%; width: 17px; height: 17px; }
.tool-card-body { display: flex; min-width: 0; flex-direction: column; padding: 24px 25px 22px; }
.tool-card-meta { display: flex; justify-content: space-between; gap: 12px; color: #758079; font-size: 8px; }
.tool-card-meta span:last-child { text-align: right; }
.tool-card h2 { margin: 14px 0 8px; font-size: 22px; line-height: 1.2; }
.tool-card p { margin: 0; color: #606b65; font-size: 10px; line-height: 1.75; }
.tool-card ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 16px 0 0; padding: 0; }
.tool-card li { border: 1px solid #d8ddd8; border-radius: 4px; padding: 4px 7px; color: #68716b; font-size: 8px; }
.tool-card a { display: inline-flex; align-items: center; gap: 7px; width: fit-content; margin-top: auto; padding-top: 18px; color: var(--tool-tone); font-size: 10px; font-weight: 800; }
.tool-card a:hover { color: var(--ink); }
.tool-card a svg { width: 14px; height: 14px; }
.tool-tone-coral { --tool-tone: #b55342; --tool-soft: #f0dcd5; }
.tool-tone-green { --tool-tone: #336c5e; --tool-soft: #dce9e2; }
.tool-tone-blue { --tool-tone: #426f8a; --tool-soft: #dce7ed; }
.tool-tone-yellow { --tool-tone: #8a7122; --tool-soft: #f1e8bd; }
.tool-tone-violet { --tool-tone: #725976; --tool-soft: #e8dfe9; }
.tool-tone-rust { --tool-tone: #8a5943; --tool-soft: #eadfd8; }
.tool-tone-teal { --tool-tone: #39747a; --tool-soft: #dbe9e8; }
.tool-empty { display: grid; place-items: center; min-height: 320px; color: #6b756f; text-align: center; }
.tool-empty[hidden], .tool-grid[hidden] { display: none; }
.tool-empty svg { width: 35px; height: 35px; margin-bottom: 12px; }
.tool-empty strong { font-size: 13px; }

@media (max-width: 1080px) {
  .tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .microscopic-grid { grid-template-columns: 165px minmax(0,1fr); }
  .micro-panel { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(64,83,73,.15); border-left: 0; padding: 24px 20px 28px; }
  .micro-panel section { max-width: 540px; }
}

@media (max-width: 820px) {
  .visual-page-head h1 { font-size: 41px; }
  .microscopic-grid { grid-template-columns: 1fr; width: 100%; }
  .micro-modes { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(64,83,73,.15); padding: 12px 18px; }
  .micro-modes button { flex: 0 0 155px; min-height: 48px; }
  .micro-stage { height: 540px; }
  .micro-panel { grid-column: 1; }
  .tools-toolbar { top: 111px; }
  .tools-toolbar-inner { grid-template-columns: 1fr; gap: 9px; padding-block: 12px; }
  .tools-toolbar output { grid-column: auto; }
}

@media (max-width: 540px) {
  .visual-page-head { padding: 16px 0 20px; }
  .visual-page-head h1 { margin-top: 10px; font-size: 34px; }
  .micro-stage { height: 510px; }
  .micro-stage-heading { top: 18px; left: 18px; }
  .micro-stage-heading span { font-size: 9px; }
  .micro-legend { bottom: 15px; left: 17px; max-width: calc(100% - 34px); gap: 6px 12px; }
  .micro-status { right: 17px; bottom: 49px; max-width: calc(100% - 34px); }
  .micro-panel { grid-template-columns: 1fr; gap: 25px; }
  .tools-toolbar { position: static; }
  .tool-library { padding-top: 25px; }
  .tool-card { grid-template-columns: 1fr; }
  .tool-card-visual { min-height: 145px; }
  .tool-card-visual::before { inset: -28px 50px; }
  .tool-card-body { min-height: 235px; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card, .micro-modes button, .micro-wide-button, .micro-reset-button, .micro-button-pair button, .micro-button-stack button { transition: none; }
}
