:root {
  --bg: #070b14; --bg2: #0d1424; --panel: rgba(14, 21, 38, 0.86); --line: rgba(140, 170, 220, 0.14);
  --text: #e7edf7; --muted: #8b9ab3; --accent: #5ee0c8; --accent2: #7aa2ff;
  --bone: #efe6d2; --bone-d: #a8977a; --mus: #d9464e; --mus-d: #7d1d24;
  --left: 268px; --right: 380px; --top: 58px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }

/* ---------- mise en page ---------- */
#top { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.95), rgba(7, 11, 20, 0.7)); border-bottom: 1px solid var(--line); z-index: 20; backdrop-filter: blur(10px); }
.brand { font-size: 17px; letter-spacing: 0.02em; white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 800; }
.search-wrap { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
#search { width: 100%; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--text); outline: none; transition: 0.2s; }
#search:focus { border-color: var(--accent); background: rgba(94, 224, 200, 0.06); box-shadow: 0 0 0 4px rgba(94, 224, 200, 0.12); }
#results { position: absolute; top: 44px; left: 0; right: 0; max-height: 60vh; overflow: auto; background: #0e1628; border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: 0.18s; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
#results.on { opacity: 1; transform: none; pointer-events: auto; }
.res { display: grid; grid-template-columns: 10px 1fr; column-gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; border-radius: 8px; }
.res i { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; grid-row: span 2; }
.res small { color: var(--muted); font-size: 11.5px; }
.res.on, .res:hover { background: rgba(122, 162, 255, 0.12); }
.none { padding: 10px; color: var(--muted); }
.seg { display: flex; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; color: var(--muted); transition: 0.2s; }
.seg button.on { background: var(--accent); color: #04211c; font-weight: 700; }
.icon-btn { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 9px; width: 34px; height: 34px; display: none; }

#left { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--left); overflow: auto; padding: 14px; border-right: 1px solid var(--line); background: var(--panel); z-index: 10; backdrop-filter: blur(12px); }
#left h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 6px 0 10px; }
#left section { margin-bottom: 18px; }
.grid-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid-btns button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); padding: 8px; border-radius: 9px; font-size: 13px; transition: 0.18s; }
.grid-btns.small button { font-size: 12px; padding: 6px; }
.grid-btns button:hover { border-color: rgba(94, 224, 200, 0.5); }
.grid-btns button.on { background: rgba(94, 224, 200, 0.14); border-color: var(--accent); color: #c9fff4; }
#layers { display: flex; flex-direction: column; gap: 5px; }
#layers button { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 13px; transition: 0.2s; }
#layers i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: 0 0 10px var(--c); transition: 0.2s; }
#layers small { color: var(--muted); font-size: 11px; }
#layers button[data-state="off"] { opacity: 0.5; }
#layers button[data-state="off"] i { background: transparent; box-shadow: none; border: 1.5px solid var(--c); }
#layers button[data-state="ghost"] i, #layers button[data-state="semi"] i { opacity: 0.45; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.toggle { text-align: left; border: 1px solid var(--line); background: none; padding: 7px 10px; border-radius: 9px; font-size: 13px; color: var(--muted); }
.toggle::before { content: ""; display: inline-block; width: 26px; height: 14px; border-radius: 8px; background: #2a3550; margin-right: 10px; vertical-align: -2px; transition: 0.2s; box-shadow: inset -12px 0 0 2px #2a3550, inset 0 0 0 2px #2a3550; background: #8b9ab3; }
.toggle.on { color: var(--text); }
.toggle.on::before { background: var(--accent); box-shadow: inset 12px 0 0 2px var(--accent), inset 0 0 0 2px var(--accent); background: #04211c; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg-a { background: #ff4d5e; } .lg-v { background: #4d8dff; } .lg-n { background: #f5c542; } .lg-l { background: #5bd47a; }

#stage { position: fixed; top: var(--top); bottom: 0; left: var(--left); right: var(--right); overflow: hidden; touch-action: none; cursor: grab;
  background: radial-gradient(ellipse at 50% 40%, #13203a 0%, #0a1020 55%, #060910 100%); }
#stage.grabbing { cursor: grabbing; }
.grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); animation: gridmove 40s linear infinite; }
@keyframes gridmove { to { background-position: 46px 46px, 46px 46px; } }
#svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud { position: absolute; z-index: 5; }
.zoom { right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); padding: 6px; border-radius: 14px; backdrop-filter: blur(8px); }
.zoom button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-size: 18px; }
.zoom button:hover { border-color: var(--accent); }
#zoomLevel { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: var(--panel); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); white-space: nowrap; pointer-events: none; }
#tip { position: absolute; top: 0; left: 0; z-index: 6; pointer-events: none; background: rgba(10, 16, 30, 0.95); border: 1px solid var(--line); padding: 7px 11px; border-radius: 10px; font-size: 13px; max-width: 240px;
  opacity: 0; transition: opacity 0.12s; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
#tip.on { opacity: 1; }
#tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
#tip small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

#panel { position: fixed; top: var(--top); bottom: 0; right: 0; width: var(--right); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); z-index: 10; backdrop-filter: blur(12px); }
#tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
#tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; color: var(--muted); font-size: 13px; }
#tabs button.on { background: rgba(122, 162, 255, 0.14); color: var(--text); }
#tabs .icon-btn { flex: 0 0 34px; }
.panes { flex: 1; overflow: auto; }
.pane { display: none; padding: 16px; }
.pane.on { display: block; }
.card h2 { margin: 6px 0 4px; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }
.card .sub { color: var(--c, var(--accent)); font-weight: 600; margin-bottom: 6px; }
.kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.badge { padding: 3px 8px; border-radius: 20px; border: 1px solid var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); letter-spacing: 0.04em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.lead { color: #c9d4e6; line-height: 1.6; font-size: 14.5px; }
.fn { border-left: 3px solid var(--c, var(--accent)); background: rgba(255, 255, 255, 0.035); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 14px 0; }
.fn h4, .rel { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c, var(--accent)); }
.fn p { margin: 0; line-height: 1.6; font-size: 14.5px; }
dl { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 12px 0; }
dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 10px; }
dd { margin: 2px 0 0; line-height: 1.5; font-size: 14px; }
.where { font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line); padding: 9px 12px; border-radius: 10px; margin: 12px 0; line-height: 1.6; }
.where.ok { border-style: solid; }
.where button, .muted button { border: 0; background: none; color: var(--accent); padding: 0; text-decoration: underline; }
.rel { margin-top: 18px !important; color: var(--muted) !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); border-radius: 20px; padding: 4px 10px; font-size: 12.5px; transition: 0.15s; }
.chip:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.stat { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 24px; font-weight: 800; }
.stat span { font-size: 12px; color: var(--muted); }
.hint, .muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.pane h2 { margin-top: 4px; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; padding: 8px 2px; font-size: 13px; font-weight: 600; color: #c9d4e6; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary small { color: var(--muted); font-weight: 400; }
.item { display: grid; grid-template-columns: 9px 1fr auto auto; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 8px; text-align: left; font-size: 13.5px; }
.item i { width: 8px; height: 8px; border-radius: 50%; }
.item small { color: var(--muted); font-size: 11.5px; }
.item em { color: var(--muted); font-style: normal; font-size: 12px; }
.item:hover { background: rgba(255, 255, 255, 0.05); }
.item.on { background: rgba(94, 224, 200, 0.12); }
.enc-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.enc-cats button { border: 1px solid var(--line); background: none; border-radius: 20px; padding: 5px 10px; font-size: 12.5px; }
.enc-cats button.on { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.enc-cats small { color: var(--muted); }
#encFilter { width: 100%; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); outline: none; margin-bottom: 4px; }
.anim-in > * { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim-in > *:nth-child(2) { animation-delay: 0.04s; } .anim-in > *:nth-child(3) { animation-delay: 0.08s; } .anim-in > *:nth-child(4) { animation-delay: 0.12s; }
.anim-in > *:nth-child(5) { animation-delay: 0.16s; } .anim-in > *:nth-child(6) { animation-delay: 0.2s; } .anim-in > *:nth-child(n+7) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- intro ---------- */
#intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at center, #0f1a33, #04060c 70%); transition: opacity 0.9s, visibility 0.9s; cursor: pointer; }
#intro.gone { opacity: 0; visibility: hidden; }
.intro-inner { text-align: center; }
.intro-kicker { color: var(--accent); letter-spacing: 0.4em; text-transform: uppercase; font-size: 12px; animation: rise 0.8s both; }
#intro h1 { font-size: clamp(40px, 7vw, 86px); margin: 12px 0; font-weight: 800; letter-spacing: -0.03em; }
#intro h1 span { display: inline-block; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; background: linear-gradient(120deg, #fff, #9fe9da 60%, #7aa2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#intro h1 span:nth-child(2) { animation-delay: 0.12s; } #intro h1 span:nth-child(3) { animation-delay: 0.24s; }
#intro p { color: var(--muted); animation: rise 0.9s 0.4s both; }
.intro-bar { width: 220px; height: 2px; background: rgba(255, 255, 255, 0.1); margin: 22px auto 0; overflow: hidden; border-radius: 2px; }
.intro-bar i { display: block; height: 100%; background: var(--accent); animation: load 1.7s cubic-bezier(0.6, 0, 0.2, 1) forwards; transform-origin: left; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- SVG : scènes et calques ---------- */
.scene { visibility: hidden; opacity: 0; pointer-events: none; transform-box: view-box; transform-origin: 300px 750px; transition: opacity 0.3s, transform 0.33s cubic-bezier(0.6, 0, 0.4, 1); }
.scene.active { visibility: visible; opacity: 1; pointer-events: auto; }
.scene.flip-out { transform: scaleX(0.02); opacity: 0.4; }
.scene.flip-in { animation: flipin 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes flipin { from { transform: scaleX(0.02); } to { transform: scaleX(1); } }
.layer { transition: opacity 0.55s ease, visibility 0.55s; }
.layer[data-state="on"] { opacity: 1; }
.layer[data-state="semi"] { opacity: 0.45; }
.layer[data-state="ghost"] { opacity: 0.16; pointer-events: none; }
.layer[data-state="off"] { opacity: 0; visibility: hidden; pointer-events: none; }
.layer[data-layer="peau"] { pointer-events: none; }
[data-id] { cursor: pointer; }

.skin { fill: rgba(120, 160, 200, 0.07); stroke: rgba(160, 200, 240, 0.55); stroke-width: 1.2; }
.bone { fill: url(#gBone); stroke: var(--bone-d); stroke-width: 0.8; stroke-linejoin: round; }
.hole { fill: #0b1222; stroke: rgba(120, 100, 80, 0.6); stroke-width: 0.6; pointer-events: none; }
.socket { fill: #cbbd9e; }
.ridge { fill: none; stroke: rgba(150, 130, 100, 0.5); stroke-width: 1; pointer-events: none; }
.ridge-b { fill: none; stroke: #c9b994; stroke-width: 4; stroke-linecap: round; }
.suture { fill: none; stroke: #8f7f62; stroke-width: 0.8; stroke-dasharray: 2 1.5; pointer-events: none; }
.sbone path { fill: none; stroke-linecap: round; }
.sb-o { stroke: var(--bone-d); }
.sb-c { stroke: #f3ead6; }
.cart .sb-c { stroke: #b8d9e0; } .cart .sb-o { stroke: #7a9aa1; }
.sb-ghost { opacity: 0.28; }
.sb-ghostgrp { opacity: 0.35; }
.sb-ghostfill { opacity: 0.4; }
.rib path { fill: none; stroke-linecap: round; }
.tooth { fill: #fffdf6; stroke: #b9ab8c; stroke-width: 0.5; }
.teeth { cursor: pointer; }

.mus .m { fill: url(#gMus); stroke: var(--mus-d); stroke-width: 0.7; stroke-linejoin: round; }
.mus .fib { fill: none; stroke: rgba(255, 210, 200, 0.28); stroke-width: 0.45; pointer-events: none; }
.mus .mline { fill: none; stroke: rgba(255, 230, 220, 0.55); stroke-width: 1.2; pointer-events: none; }
.diaph-s { fill: none; stroke: #c33b45; stroke-linecap: round; }
.tendon { fill: #ece3cf; stroke: #a69878; stroke-width: 0.6; }
.lig .lg { fill: none; stroke: #9ee6d8; stroke-linecap: round; }
.lig.cruc .lg { stroke: #6fe0ff; }
.menis { fill: #bfe9e1; stroke: #6ab8aa; stroke-width: 0.5; }
.disc { fill: #8fd8ea; stroke: #4c9db3; stroke-width: 0.5; }
.membrane { fill: rgba(150, 230, 215, 0.2); stroke: rgba(150, 230, 215, 0.6); stroke-width: 0.6; }
.retin { fill: rgba(150, 230, 215, 0.45); stroke: #6ab8aa; stroke-width: 0.6; }
.lineal { fill: #e8f6f2; }
.joint { fill: rgba(95, 212, 196, 0.12); stroke: #5fd4c4; stroke-width: 1.2; stroke-dasharray: 3 2; animation: spin 14s linear infinite; transform-box: fill-box; transform-origin: center; }

.org { fill: var(--c); stroke: color-mix(in srgb, var(--c) 55%, #000); stroke-width: 0.8; fill-opacity: 0.9; }
.tube { fill: none; stroke: var(--c); stroke-linecap: round; stroke-linejoin: round; }
.fissure, .heart-l, .gyri { fill: none; stroke: rgba(0, 0, 0, 0.28); stroke-width: 1; pointer-events: none; }
.gyri { stroke: rgba(120, 40, 40, 0.35); }
.rings { stroke: rgba(80, 100, 110, 0.6); stroke-width: 1.2; pointer-events: none; }
.loops { fill: none; stroke: rgba(150, 70, 60, 0.45); stroke-width: 1.3; pointer-events: none; }
.node { fill: #5bd47a; stroke: #2f8a48; stroke-width: 0.6; }
.eye-w { fill: #f4f7fb; stroke: #9aa7b8; stroke-width: 0.6; }
.eye-i { fill: #4f8fbf; } .eye-p { fill: #0b1222; }
.heart { transform-box: fill-box; transform-origin: 55% 55%; animation: beat 1.05s ease-in-out infinite; }
[data-id="poumon-droit"], [data-id="poumon-gauche"] { transform-box: fill-box; transform-origin: 50% 0%; animation: breathe 4.2s ease-in-out infinite; }
.ganglion { fill: #f5c542; stroke: #a67d12; stroke-width: 0.5; }

.nv .nv-b { fill: none; stroke: #e9b830; stroke-linecap: round; stroke-linejoin: round; }
.nv .nv-p { fill: none; stroke: #fff4c2; stroke-linecap: round; stroke-dasharray: 2 16; animation: flow 1.4s linear infinite; pointer-events: none; }
.nv.dash .nv-b { stroke-dasharray: 4 3; }
.vs path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.vs-a .vs-b { stroke: #e8394c; } .vs-a .vs-p { stroke: #ffd0d5; }
.vs-v .vs-b { stroke: #3d7cf2; } .vs-v .vs-p { stroke: #cfe0ff; }
.vs-pa .vs-b { stroke: #5a74e8; } .vs-pa .vs-p { stroke: #dfe5ff; }
.vs-pv .vs-b { stroke: #ff5d6c; } .vs-pv .vs-p { stroke: #ffe0e3; }
.vs-l .vs-b { stroke: #5bd47a; } .vs-l .vs-p { stroke: #e0ffe8; }
.vs .vs-p { stroke-dasharray: 3 12; animation: flow 1.1s linear infinite; pointer-events: none; opacity: 0.9; }

@keyframes flow { to { stroke-dashoffset: -18; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.055); } 24% { transform: scale(0.99); } 34% { transform: scale(1.03); } 50% { transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, 1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* survol et sélection */
.hov, .hov path { filter: brightness(1.25); }
#svg.has-sel .scene.active .layer [data-id]:not(.sel) { opacity: 0.38; transition: opacity 0.4s; }
.sel { filter: url(#fGlow); }
.sel.bone, .sel > .bone, .sel .m, .sel.org, .sel .org { stroke: #fff; stroke-width: 1.6; }
.sel .sb-c, .sel .nv-b, .sel .vs-b, .sel .lg { filter: brightness(1.3); }
.sel.joint { stroke: #fff; fill: rgba(95, 212, 196, 0.35); }
.sel .m { fill: #ff7a80; }
.sel.bone { fill: #fff8e6; }
.sel { animation: selpulse 1.6s ease-in-out infinite; }
.heart.sel { animation: beat 1.05s ease-in-out infinite; }
@keyframes selpulse { 50% { filter: url(#fGlow) brightness(1.2); } }
.region-flash { fill: rgba(94, 224, 200, 0.06); stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 6 5; animation: march 1s linear infinite, fadeflash 3.2s ease forwards; pointer-events: none; }
@keyframes march { to { stroke-dashoffset: -22; } }
@keyframes fadeflash { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0.25; } }

/* étiquettes */
.lbl { fill: #fff; font-weight: 600; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(5, 9, 18, 0.88); stroke-width: 0.35em; stroke-linejoin: round; cursor: pointer; animation: lblin 0.35s ease both; }
.lbl:hover { fill: var(--c); }
.lbl.lsel { fill: var(--accent); }
@keyframes lblin { from { opacity: 0; } }

/* intro : tracé des os puis apparition des tissus */
body.intro .bone, body.intro .sbone path, body.intro .vert path { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; animation: draw 1.4s cubic-bezier(0.5, 0, 0.2, 1) forwards, fillin 0.8s ease forwards; animation-delay: calc(var(--d, 0s) + 1.4s), calc(var(--d, 0s) + 2.3s); stroke: #9fe9da; }
body.intro .mus, body.intro .org, body.intro .nv, body.intro .vs, body.intro .lig, body.intro .tendon, body.intro .heart, body.intro .eye, body.intro .teeth { opacity: 0; animation: tissue 0.9s ease forwards; animation-delay: calc(var(--d, 0s) + 2.4s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; } }
@keyframes tissue { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.noanim *, body.noanim *::before { animation: none !important; transition: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { :root { --right: 340px; --left: 230px; } }
@media (max-width: 860px) {
  :root { --left: 0px; --right: 0px; --top: 54px; }
  .brand { display: none; }
  .icon-btn { display: inline-grid; place-items: center; }
  #left { width: 270px; transform: translateX(-100%); transition: transform 0.3s; }
  body.left-open #left { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5); }
  #panel { width: 100%; top: auto; height: 55vh; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; }
  body.panel-open #panel { transform: none; }
  .hint { display: none; }
}
