:root { color-scheme: dark; font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif; background: #0a0d0f; color: #eef2f1; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body:not(.index-page) { overflow: hidden; background: radial-gradient(circle at 70% 30%, #17231f 0%, #090c0e 58%, #050708 100%); }
#viewer { position: fixed; inset: 0; }
canvas { display: block; }
canvas.measuring { cursor: crosshair; }
.panel { position: fixed; top: 20px; left: 20px; width: min(380px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(10,14,15,.88); box-shadow: 0 22px 60px rgba(0,0,0,.45); backdrop-filter: blur(18px); }
.panel header { padding-right: 78px; }
#panel-toggle { position: absolute; top: 14px; right: 14px; padding: 7px 10px; font-size: 12px; z-index: 2; }
.panel.collapsed { width: auto; padding: 10px; overflow: visible; }
.panel.collapsed > :not(#panel-toggle) { display: none; }
.panel.collapsed #panel-toggle { position: static; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.back-link { display: inline-block; color: #78d6ae; font-size: 12px; text-decoration: none; }
.header-actions button { padding: 6px 9px; font-size: 11px; }
.eyebrow { margin: 0 0 6px; color: #8ea39b; font-size: 12px; letter-spacing: .08em; }
h1 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
h2 { margin: 18px 0 8px; color: #dbe2df; font-size: 13px; }
#status, #measure-status { margin: 8px 0 0; color: #afbbb7; font-size: 12px; line-height: 1.45; }
.legend { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 18px 0; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.dot.context { color: #b7c0bd; background: currentColor; }.dot.wood { color: #8b5a2b; background: currentColor; }.dot.crown { color: #39d353; background: currentColor; }
.controls { display: grid; gap: 9px; padding: 14px 0; border-block: 1px solid rgba(255,255,255,.09); }
.guide-controls { grid-template-columns: 1fr 1fr; }
.guide-controls label:first-child { grid-column: 1 / -1; font-weight: 700; }
.controls label, .measure-controls label { font-size: 13px; color: #dbe2df; }
.controls label[for] { display: flex; justify-content: space-between; margin-top: 4px; }
input[type="checkbox"] { accent-color: #39d353; } input[type="range"] { width: 100%; accent-color: #39d353; }
.buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.measure-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; padding: 10px 0 2px; }
.measure-controls #measure-status { grid-column: 1 / -1; }
button { padding: 9px 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: #1a211f; color: #f1f4f3; cursor: pointer; }
button:hover, button[aria-pressed="true"] { background: #273d34; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.metrics div { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.045); }
dt { color: #879991; font-size: 11px; } dd { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.hint { margin: 16px 0 0; color: #788882; font-size: 11px; line-height: 1.5; }
.scene-label { position: fixed; z-index: 4; transform: translate(-50%, -50%); padding: 4px 7px; border: 1px solid; border-radius: 7px; background: rgba(4,8,9,.84); color: white; font-size: 11px; pointer-events: none; white-space: nowrap; }
.index-page { min-height: 100%; overflow: auto; background: radial-gradient(circle at 70% 20%, #183229 0%, #09100d 55%, #050706 100%); }
.index-shell { width: min(1060px, calc(100% - 36px)); margin: 0 auto; padding: 64px 0; }
.index-shell > p:not(.eyebrow) { color: #9fb0aa; }
.tree-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 30px; }
.tree-card { display: grid; gap: 12px; padding: 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.05); transition: .18s ease; }
.tree-card:hover { transform: translateY(-2px); background: rgba(57,211,83,.10); border-color: rgba(57,211,83,.45); }
.tree-card-link { display: grid; gap: 7px; color: white; text-decoration: none; }
.tree-card span { color: #9ed6be; }.tree-card small { color: #84958e; }
.tree-card button { justify-self: start; padding: 7px 10px; color: #bdebd7; font-size: 11px; }
@media (max-width: 640px) { .panel { top: 10px; left: 10px; width: calc(100vw - 20px); max-height: 55vh; padding: 16px; } h1 { font-size: 22px; } .guide-controls { grid-template-columns: 1fr; } .guide-controls label:first-child { grid-column: auto; } }
