:root{--paper:#faf7f2;--ink:#332f2c;--muted:#7c746b;--line:#e6ddd1;--accent:#955c4b;--sage:#596b60}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans TC","Microsoft JhengHei",sans-serif;font-size:14px;line-height:1.6}button,input,summary{font:inherit}button,a,input,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #a46748;outline-offset:3px}[hidden]{display:none!important}.heart-app{max-width:1440px;margin:0 auto;padding:32px}.intro{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:26px}.eyebrow{font-size:10px;letter-spacing:1.7px;color:var(--accent);font-weight:700;margin:0 0 8px}.intro h1{font-size:clamp(25px,3vw,37px);font-family:Georgia,"Noto Serif TC",serif;letter-spacing:.5px;font-weight:600;line-height:1.3;margin:4px 0 12px}.intro p:last-child{margin:0;color:var(--muted)}a{color:var(--accent)}.back{font-size:12px;white-space:nowrap;text-decoration:none;border-bottom:1px solid var(--line);padding-bottom:5px}.workspace{display:grid;grid-template-columns:278px minmax(0,1fr);gap:24px;align-items:start}.controls{background:#fffdfa;border:1px solid var(--line);border-radius:16px;padding:22px}.controls section+section{border-top:1px solid var(--line);margin-top:22px;padding-top:19px}h2{font-size:15px;font-weight:650;margin:0 0 12px}.presets,.views{display:grid;grid-template-columns:1fr 1fr;gap:8px}.presets button,.views button,.play-controls button,.model-heading button{border:1px solid var(--line);border-radius:8px;background:#fffdfa;color:var(--ink);padding:9px 6px;line-height:1.4;font-size:12px;transition:background .15s}.presets button.active{background:var(--sage);border-color:var(--sage);color:#fff}.presets button:hover,.views button:hover,.model-heading button:hover{background:#eee8e0}.presets button.active:hover{background:#4c5e53}.check{display:flex;gap:9px;align-items:center;min-height:33px;font-size:12px;cursor:pointer}.check input{accent-color:var(--sage);width:15px;height:15px;margin:0}.vessel-options{padding:3px 0 8px 24px;color:var(--muted)}.vessel-options summary{cursor:pointer;font-size:11px;margin-bottom:4px}.vessel-options .check{font-size:11px}.range-label{display:flex;justify-content:space-between;font-size:12px;margin:15px 0 7px}output{font-variant-numeric:tabular-nums;color:var(--accent);font-weight:650}input[type=range]{width:100%;accent-color:var(--accent);cursor:pointer;margin:0;height:22px}.hint{font-size:11px;color:var(--muted);line-height:1.7;margin:8px 0 0}.model-area{border:1px solid var(--line);border-radius:18px;background:#f7f2eb;overflow:hidden;position:sticky;top:18px}.model-heading{display:flex;justify-content:space-between;align-items:center;padding:22px 25px 0}.model-heading h2{font-family:Georgia,"Noto Serif TC",serif;font-size:20px;margin:1px 0}.model-heading p{color:var(--muted);font-size:11px;margin:4px 0}.model-heading button{padding:8px 12px}#viewport{height:clamp(580px,76vh,920px);position:relative;background:radial-gradient(ellipse at 50% 45%,#fffdf9 0%,#f7f2eb 72%);touch-action:none}#viewport canvas{display:block;width:100%;height:100%;cursor:grab}#viewport canvas:active{cursor:grabbing}#labels{position:absolute;inset:0;pointer-events:none;z-index:3}.structure-label{position:absolute;transform:translate(-50%,-50%);font-size:10px;line-height:1.4;padding:4px 7px;background:rgba(255,253,249,.93);border:1px solid #d8c9b8;border-radius:5px;color:#5c483c;white-space:nowrap;pointer-events:auto;box-shadow:0 1px 4px #6f514012}.structure-label.selected{background:#596b60;color:#fff;border-color:#596b60}.structure-label small{display:block;font-size:8px;letter-spacing:.5px;opacity:.7}.orientation{position:absolute;left:22px;top:20px;color:#9e9183;font-size:9px;line-height:1.9;pointer-events:none}.canvas-hint{position:absolute;bottom:15px;left:0;right:0;text-align:center;font-size:10px;color:#a28d7a;pointer-events:none}#loadingStatus{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--paper);z-index:5;color:var(--accent)}#loadingStatus.error{padding:35px;line-height:1.8;text-align:center}.legend{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;padding:8px 16px 18px;font-size:10px;color:var(--muted)}.legend span{display:flex;align-items:center;gap:6px}.legend i{width:7px;height:7px;border-radius:50%}.info-card{border-top:1px solid var(--line);background:#fffdfa;padding:20px 25px;min-height:137px}.info-card h2{font-size:18px;margin:4px 0 7px}.info-card p{color:#6d635b;margin:0;font-size:12px;line-height:1.8}.about-model{margin:22px 0;color:var(--muted);font-size:11px}.about-model summary{cursor:pointer}.about-model p{max-width:1000px}.play-controls{display:flex;gap:8px;margin-top:12px}.play-controls button{flex:1}.play-controls button:first-child{background:var(--sage);color:white}.step-text{font-size:12px;color:var(--sage);line-height:1.7;margin:8px 0 0}.views button[aria-pressed=true]{background:#e5ece4;border-color:#879b82}@media(min-width:1500px){.heart-app{padding:40px 32px}}@media(max-width:900px){.heart-app{padding:24px 18px}.workspace{grid-template-columns:235px minmax(0,1fr);gap:16px}.controls{padding:17px}#viewport{height:480px}.structure-label{font-size:9px}.model-heading{padding:18px 16px 0}.info-card{padding:18px 16px}}@media(max-width:650px){.heart-app{padding:20px 12px}.intro{margin-bottom:20px;display:block}.intro h1{font-size:27px}.intro p:last-child{font-size:12px}.back{display:inline-block;margin-top:13px}.workspace{display:flex;flex-direction:column;gap:15px}.controls,.model-area{width:100%}.model-area{order:-1;position:static}.controls{padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:22px}.controls section+section{border:0;padding:0;margin:0}.controls section:nth-child(2){grid-column:2;grid-row:1/span 2}.controls section:nth-child(3){grid-column:1}.controls #animationPanel{grid-column:1/-1;border-top:1px solid var(--line);padding-top:18px}.presets,.views{gap:6px}.presets button,.views button{font-size:11px;padding:9px 3px}.check{font-size:11px}#viewport{height:440px}.model-heading h2{font-size:18px}.model-heading p{font-size:10px}.structure-label{font-size:9px;padding:3px 5px}.orientation{left:12px;font-size:8px}.legend{gap:13px;padding-bottom:14px}.info-card{min-height:138px}.vessel-options{padding-left:15px}.about-model{padding:0 7px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto;transition:none}}
.label-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.label-lines polyline{fill:none;stroke:#bca996;stroke-width:1;opacity:.72;stroke-linejoin:round}.structure-label{box-shadow:0 2px 7px #6f514013}@media(max-width:650px){.structure-label{max-width:91px}.structure-label small{font-size:7px;white-space:normal}}
.zoom-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.zoom-controls button{border:1px solid var(--line);border-radius:8px;background:#fffdfa;color:var(--ink);padding:9px 6px;font:inherit;font-size:12px;cursor:pointer}.zoom-controls button:hover{background:#eee8e0}.zoom-controls #focusStructure{grid-column:1/-1;background:var(--sage);color:white;border-color:var(--sage)}@media(max-width:650px){.controls section:has(.zoom-controls){grid-column:1/-1;border-top:1px solid var(--line);padding-top:18px}}
.model-toolbar{position:absolute;right:14px;top:12px;z-index:6;display:flex;gap:5px;padding:5px;border:1px solid var(--line);border-radius:12px;background:rgba(255,253,249,.97);box-shadow:0 3px 12px #584a3612;touch-action:manipulation}.model-toolbar button{width:48px;min-height:49px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px;border:1px solid transparent;border-radius:7px;background:transparent;color:#574b43;font:inherit;cursor:pointer;touch-action:manipulation}.model-toolbar button span{font-size:10px;line-height:1.3}.model-toolbar button:hover{background:#eee8e0}.model-toolbar button[aria-pressed=true]{background:var(--sage);color:#fff;border-color:var(--sage)}.mobile-gesture{display:none}@media(max-width:650px){.model-toolbar{right:9px;top:10px}.model-toolbar button{width:44px;min-height:48px}.desktop-gesture{display:none}.mobile-gesture{display:inline}.canvas-hint{bottom:8px;line-height:1.6}.controls .zoom-controls #zoomIn,.controls .zoom-controls #zoomOut{display:none}}
.label-lines polyline{stroke:#87664d;stroke-width:1.65;opacity:1}.label-lines polyline.selected{stroke:#3f7356;stroke-width:2.4}.anatomy-target{fill:#fffaf3;stroke:#87664d;stroke-width:1.7}.anatomy-target.selected{fill:#76a588;stroke:#31543d;stroke-width:2.1}.structure-label{border-color:#bba68f;color:#49382b}.structure-label.selected{outline:2px solid #8ba58e;outline-offset:2px}
.quick-mode{margin:12px 22px 0;display:flex;align-items:center;gap:10px;font-size:11px}.quick-mode select{flex:1;min-width:0;font:inherit;font-size:12px;padding:9px;border:1px solid var(--line);border-radius:7px;background:#fffdfa;color:var(--ink)}#motionNote{padding:0 22px 12px}@media(max-width:650px){.quick-mode{margin:10px 12px 0}.quick-mode select{min-height:42px}#motionNote{padding:0 12px 12px}}

#viewport{touch-action:pan-y}#viewport canvas{pointer-events:none;touch-action:pan-y}.model-interaction{position:absolute;inset:0;z-index:2;cursor:grab;clip-path:inset(40%);touch-action:none}.model-interaction:active{cursor:grabbing}.ecg-panel{padding:9px 18px;background:#f4f7f0;border-top:1px solid var(--line)}.ecg-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}.ecg-heading span{margin-left:10px;color:#4b785b;font-size:10px}.ecg-heading button{font:inherit;font-size:10px;padding:6px 10px;background:white;border:1px solid #ccd9c8;border-radius:7px;color:#42664e}.ecg-chart{width:100%;height:62px;display:block;margin:4px 0}.ecg-chart text{font:11px sans-serif;fill:#67836b}.ecg-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:10px;color:#42664e}.ecg-controls label{display:flex;align-items:center;gap:6px;font-size:10px}.ecg-controls input{width:95px}.ecg-controls output{white-space:nowrap;color:#42664e}.ecg-note{font-size:9px;margin:4px 0 0;color:#7b8376}@media(max-width:650px){.ecg-panel{padding:8px 12px}.ecg-chart{height:48px}.ecg-controls{display:block}.ecg-controls label{margin-top:3px}.ecg-controls input{flex:1}}
