/* Golden Heritage Tree, isolated from the cosmic homepage. */
header #sync{display:none!important}
#saveToast{position:fixed;right:18px;bottom:18px;z-index:30;max-width:min(360px,90vw);border:1px solid #d5bc83;border-radius:13px;padding:12px 16px;background:#152237;color:#fff1d7;box-shadow:0 8px 28px #0007;font-size:13px;pointer-events:none}
#saveToast[data-state="error"]{border-color:#f18d8d;background:#43232d;color:#ffe2e2}
.gold-tree{min-width:0;display:grid;gap:8px;color:#f7e9d1}
.gold-tree .gt-tools,.gold-tree .gt-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.gold-tree button{font-size:12px;padding:7px 9px;min-height:34px;border-radius:8px;background:#182436;border:1px solid #bca16c55;color:#f6e4c4;white-space:nowrap}
.gold-tree button:hover,.gold-tree button:focus-visible{border-color:#ffda8d;background:#53432d;outline:2px solid #e8c88455}
.gold-tree button.active,.gold-tree button.primary{background:linear-gradient(#f4d58c,#cba363);color:#201a12;border-color:#f4d58c;font-weight:600}
.gold-tree button:disabled{opacity:.4;cursor:not-allowed}
.gt-zoom{font-size:11px;min-width:37px;text-align:center}
.gt-search{display:flex;gap:5px;align-items:center;flex-wrap:wrap;font-size:11px;color:#e1d0ac}
.gt-search select{max-width:200px;min-width:100px;padding:6px;font-size:12px;background:#192338;color:#f6e8d2}
.gt-stage{position:relative;min-width:0;border:1px solid #d8b97555;border-radius:14px;background:#0d1725;overflow:hidden}
.gold-tree .tree.gt-viewport{padding:0;margin:0;width:100%;height:clamp(285px,43vh,560px);max-height:none;min-height:0;overflow:auto;touch-action:none;cursor:grab;border:0;border-radius:12px;background:#0d1725;overscroll-behavior:contain;scrollbar-color:#a68755 #202938}
.gold-tree .gt-viewport:active{cursor:grabbing}
.gold-tree .tree .gt-svg{display:block;max-width:none!important;max-height:none!important;margin:0;flex:none}
.gt-node{cursor:pointer;outline:none}.gt-node:hover>rect,.gt-node:focus-visible>rect{stroke:#ffe7a5;stroke-width:3px}
.gold-tree .gt-map{position:absolute;right:9px;bottom:10px;width:95px;height:65px;min-height:0;padding:4px;border:1px solid #bfa06c;background:#101b2dee;opacity:.9}
.gt-map svg{width:100%;height:100%;display:block;pointer-events:none}
.gt-note{font-size:11px;color:#c9bca8;margin:0;line-height:1.6}.gt-warning{font-size:12px;color:#ffd0b9;padding:8px;border:1px solid #e28c7755;border-radius:8px;margin:0;background:#5b2b2b66}
.gt-actions{min-height:0}.gt-actions:empty{display:none}.gt-actions strong{font-size:13px;color:#ffdfa0;flex-basis:100%}
#workWindow.expanded .gold-tree .gt-viewport{height:clamp(320px,66vh,1100px)}
@media(max-width:800px){.gold-tree button{min-height:40px;font-size:11px;padding:6px 8px}.gt-search select{max-width:150px}.gold-tree .tree.gt-viewport{height:clamp(260px,42dvh,550px)}.gold-tree .gt-map{width:73px;height:52px}#saveToast{bottom:10px;right:10px}}
@media print{html,body{background:white!important;overflow:visible!important;height:auto!important}header,#cosmicScene,#cosmicHub,#nav,#saveToast,#dlg,.work-head,.gene-sidebar,.gene-summary,.gene-heading,.gt-tools,.gt-map,.gt-actions,.gt-note,.gt-warning,.gene-content>.card,#main>h1{display:none!important}#workWindow,#main,.gene-layout,.gene-middle,.gene-content,.gold-tree,.gt-stage,.gold-tree .tree.gt-viewport{display:block!important;position:static!important;transform:none!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;background:white!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.gold-tree .tree .gt-svg{width:100%!important;height:auto!important;max-height:none!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}}

.gt-search input[type=search]{width:120px;min-width:80px;padding:6px 8px;font-size:12px;border-radius:8px}

/* Responsive panning — prevent inherited smooth-scroll and text selection during drag. */
.gold-tree .gt-viewport{scroll-behavior:auto!important;user-select:none;-webkit-user-select:none;overflow-anchor:none;scrollbar-gutter:stable;contain:layout paint}
.gold-tree .gt-viewport.gt-dragging,.gold-tree .gt-viewport.gt-dragging .gt-node{cursor:grabbing}
.gt-art-node:hover>circle,.gt-art-node:focus-visible>circle{stroke:#ffe8a0;stroke-width:3px}

.gt-store{border:1px solid #c8a76b55;border-radius:10px;padding:8px;background:#151f2e;font-size:12px}.gt-store-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.gt-store-form label{display:flex;align-items:center;gap:4px}.gt-store-form select{max-width:170px;padding:6px;color:#fff0d4;background:#172339;border:1px solid #c8a76b55;border-radius:7px}.gt-store a{color:#f3d18b}.gt-style-status{margin:4px 0 0;color:#f3d18b}.gt-style-status:empty{display:none}.gt-halo,.gt-firefly{animation:gtSpark 2.4s ease-in-out infinite alternate;pointer-events:none}@keyframes gtSpark{from{opacity:.18}to{opacity:.9}}@media(prefers-reduced-motion:reduce){.gt-halo,.gt-firefly{animation:none}}@media print{.gt-store{display:none!important}.gt-preview .gt-stage{display:none!important}.gt-preview:after{content:'PREVIEW — Unlock to export';color:#222}}
.gt-living-form .gt-effect-panel{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;min-width:0;flex:1 1 100%;border:1px solid #c8a76b55;border-radius:10px;padding:10px}.gt-effect-panel legend{color:#f3d18b;font-weight:600}.gt-effect-panel input[type=checkbox]{width:16px;height:16px;accent-color:#cba363}.gt-effect-panel input[type=range]{max-width:130px;accent-color:#cba363}.gt-art-preview{display:flex;align-items:center;gap:10px;flex:1 1 100%}.gt-art-preview[hidden]{display:none}.gt-art-preview img{width:160px;max-width:42%;border-radius:8px}.gt-svg image{pointer-events:none}.gt-svg .gt-node image{pointer-events:auto}@media(max-width:600px){.gt-living-form .gt-effect-panel{gap:12px}.gt-effect-panel label{min-height:34px}.gt-art-preview img{width:130px}}
.gold-tree.gt-photo-mode .tree.gt-viewport{height:clamp(360px,64vh,850px)}.gt-art-preview img{width:108px}.gt-living-form .gt-effect-panel{padding:7px 10px}.gt-living-form .gt-effect-panel label{font-size:12px}.gt-living-form .gt-art-preview{flex:0 1 auto}.gt-living-form .gt-art-preview span{max-width:150px}@media(max-width:800px){.gold-tree.gt-photo-mode .tree.gt-viewport{height:clamp(260px,50dvh,550px)}}
/* 5.8: GPU surface shares the exact SVG coordinate system. Portraits remain accessible SVG. */
.gt-art-foreign,.gt-art-gpu{pointer-events:none;overflow:hidden}.gt-art-gpu{width:100%;height:100%}.gt-art-gpu canvas{width:100%!important;height:100%!important;display:block}.gt-art-enhanced .gt-photo-effects{visibility:hidden}.gt-season-gallery{display:flex;gap:8px;flex:1 1 100%;overflow:auto;padding:3px}.gt-season-gallery[hidden]{display:none}.gt-season-gallery button{display:grid;gap:4px;flex:0 0 110px;text-align:center;padding:4px;white-space:normal}.gt-season-gallery button[aria-pressed=true]{border-color:#ffdc91;background:#564728;box-shadow:0 0 0 1px #e9cc86}.gt-season-gallery img{width:100%;height:auto;aspect-ratio:16/9;border-radius:5px;object-fit:cover}.gt-renderer-status{font-size:10px;color:#ddc28a;padding:3px 7px;border:1px solid #bca16c55;border-radius:5px}.gt-art-enhanced .gt-halo{filter:drop-shadow(0 0 5px #f4cf71)}@media print{.gt-art-foreign{display:none!important}.gt-art-enhanced .gt-photo-effects{visibility:visible}}
.gt-store,.gt-store-form,.gt-season-gallery,.gt-art-preview,.gt-effect-panel{min-width:0;max-width:100%;box-sizing:border-box}.gt-season-gallery{width:100%}.gt-tools,.gt-search{min-width:0}.gt-search input[type=search],.gt-search select{max-width:100%}@media(max-width:600px){.gt-search{flex-wrap:wrap}.gt-season-gallery button{flex-basis:82px}.gt-living-form .gt-effect-panel{width:100%;gap:6px 12px}.gt-store-form{gap:6px}.gt-living-form .gt-effect-panel label{min-height:28px}.gt-art-preview{flex-wrap:wrap}}

.ht-frame-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%;text-align:center}.ht-frame-gallery svg{display:block;width:100%;height:auto}.ht-frame-gallery small{display:block;color:#d8c69c}.gt-frame-panel{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border:1px solid #b99b6055;border-radius:9px;min-width:0;max-width:100%;padding:9px}.gt-frame-panel legend{color:#f2d28b;font-weight:600}.gt-frame-panel small{width:100%;color:#d3c4a5}.gt-frame-swatches{width:220px;max-width:100%}.gt-frame-swatches:empty{display:none}

/* 5.10.5: golden aura is a shape path, not a circular overlay. */
.gt-golden-portrait{pointer-events:none}.gt-golden-portrait .gt-halo{animation-name:gtGoldenPulse;filter:none}@keyframes gtGoldenPulse{from{opacity:.56}to{opacity:1}}@media(prefers-reduced-motion:reduce){.gt-golden-portrait .gt-halo{animation:none}}
