@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Noto+Sans+KR:wght@400;500;600&display=swap');
:root{font-family:'DM Sans','Noto Sans KR',sans-serif;color:#263e35;background:#ebe9e3;--bg:#ebe9e3;--panel:#f6f5f0;--ink:#263e35;--muted:#667066;--line:#d6d9ce;--accent:#304e40;--hover:#e2e6dc;color-scheme:light}html[data-theme=dark]{--bg:#242b29;--panel:#2c3430;--ink:#e7ebdd;--muted:#b0bbaa;--line:#475145;--accent:#dae4cb;--hover:#38423a;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button{color:var(--ink);background:transparent;border:1px solid var(--line);border-radius:24px;min-height:42px;padding:9px 15px;font-size:.875rem;font-weight:500;cursor:pointer;transition:background .18s,color .18s,opacity .18s}button:hover{background:var(--hover)}button:disabled{opacity:.45;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #ac7047;outline-offset:4px}button.primary{background:var(--ink);border-color:var(--ink);color:var(--panel)}a{color:inherit}[hidden]{display:none!important}.app-header{height:86px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:24px;background:var(--panel)}.brand-group{display:flex;gap:22px;align-items:center}.brand{font-family:Georgia,serif;font-size:2rem;line-height:1;letter-spacing:.18em;text-decoration:none;position:relative}.brand-dot{font-family:Arial,sans-serif;font-size:.65rem;position:absolute;top:-3px;right:-8px;letter-spacing:0}.brand-credit{font-size:.75rem;color:var(--muted);white-space:nowrap}.brand-credit a{text-decoration:none}.header-actions{display:flex;gap:8px;align-items:center}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 306px;min-height:calc(100svh - 86px)}.scene-column{min-width:0;position:sticky;top:0;align-self:start}.d3-stage{height:calc(100svh - 128px);min-height:560px;position:relative;overflow:hidden}.d3-stage canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.d3-stage canvas:active{cursor:grabbing}.scene-title{position:absolute;top:34px;left:34px;pointer-events:none}.eyebrow{font-size:.6875rem;letter-spacing:.14em;font-weight:500}.scene-title .eyebrow{color:var(--muted)}h1{font-size:clamp(1.4rem,2.25vw,2.3rem);line-height:1.3;letter-spacing:-.07em;font-weight:400;margin:15px 0 0}h1 em{font-style:normal;font-weight:500}.scene-tools{position:absolute;top:27px;right:25px;display:flex;gap:4px}.scene-tools button{white-space:nowrap;background:var(--panel);min-width:40px;padding:8px 10px;font-size:.8125rem}.scene-bottom{position:absolute;bottom:26px;left:34px;right:28px;display:flex;justify-content:space-between;align-items:end;gap:16px;pointer-events:none}.scene-instruction{display:flex;flex-direction:column;gap:7px;font-size:.875rem}.scene-instruction small{font-size:.75rem;color:var(--muted);max-width:360px;line-height:1.6}.wind-button{pointer-events:auto;background:var(--panel);white-space:nowrap}.scene-status{display:flex;justify-content:space-between;gap:10px;padding:11px 26px;border-top:1px solid var(--line);font-size:.6875rem;line-height:20px;color:var(--muted)}.d3-file-name{max-width:38%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.studio-controls{border-left:1px solid var(--line);padding:28px 23px 22px;background:var(--panel);min-width:0}.controls-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.controls-heading button{border:0;padding:3px 0;min-height:28px;font-size:.75rem;font-weight:400;color:var(--muted)}.control-section{border-bottom:1px solid var(--line);padding:0 0 21px;margin-bottom:21px}.section-caption{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:13px}.section-caption h2{font-size:.9375rem;font-weight:500;margin:0}.section-caption>span{font-size:.6875rem;color:var(--muted)}.material-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:18px}.material-picker button{border-radius:9px;padding:5px;display:flex;flex-direction:column;gap:8px;align-items:center;font-size:.8125rem;padding-bottom:9px}.material-picker button[aria-pressed=true]{border-color:var(--ink);background:var(--hover)}.swatch{display:block;width:100%;height:51px;border-radius:5px;background-color:#899785}.swatch.satin{background:linear-gradient(125deg,#6c816f 3%,#d8dec8 28%,#71806d 52%,#a6b097 69%,#62755f)}.swatch.cotton{background:repeating-linear-gradient(0deg,#8d9b84 0 1px,#879580 1px 3px)}.swatch.canvas{background:repeating-linear-gradient(90deg,#ffffff18 0 1px,transparent 1px 4px),repeating-linear-gradient(0deg,#00000016 0 1px,transparent 1px 4px),#97a18a}.field{margin-top:15px;min-width:0}.field label{font-size:.8125rem;display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;color:var(--muted)}.field output{font-variant-numeric:tabular-nums;font-size:.75rem;color:var(--ink)}.inline-field{display:flex;justify-content:space-between;gap:12px;align-items:center}.inline-field label{margin:0}.field input[type=range]{width:100%;height:18px;margin:0;accent-color:var(--accent);cursor:ew-resize}.field select{width:100%;font-size:.875rem;min-height:40px;border:1px solid var(--line);background:var(--bg);border-radius:6px;padding:7px 10px;color:var(--ink)}input[type=color]{border:1px solid var(--line);padding:3px;width:43px;height:28px;background:none;border-radius:4px}input[type=checkbox]{width:32px;height:18px;accent-color:var(--accent)}.segmented{display:flex;gap:4px}.segmented button{flex:1;border-radius:7px;font-size:.8125rem;min-height:39px}.segmented button[aria-pressed=true]{background:var(--ink);color:var(--panel);border-color:var(--ink)}summary{font-size:.9375rem;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:space-between;list-style:none}summary::-webkit-details-marker{display:none}summary:after{content:'+';font-size:1rem;color:var(--muted)}details[open]>summary:after{content:'−'}summary span{font-size:.6875rem;font-weight:400;color:var(--muted);margin-left:auto;margin-right:12px}.offset-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.small-actions{display:flex;gap:8px;justify-content:space-between;margin-top:14px}.small-actions button,.text-button{border:0;border-radius:5px;padding:6px 1px;min-height:28px;font-size:.75rem;color:var(--muted)}.text-button{margin-top:10px}.capture-actions button{border:1px solid var(--line);padding:8px;min-height:37px;flex:1}.studio-footnote{font-size:.6875rem;line-height:1.7;color:var(--muted);margin:0}.d3-loading{position:absolute;inset:0;background:var(--bg);display:flex;gap:20px;align-items:center;justify-content:center;z-index:5;font-size:.875rem;padding:30px;max-width:100%;text-align:center}.loading-orbit{border:1px solid var(--line);border-top-color:var(--ink);width:24px;height:24px;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.drop-overlay{position:absolute;inset:16px;border:2px dashed var(--ink);background:var(--panel);opacity:.94;z-index:8;display:grid;place-items:center;border-radius:12px;font-size:1.125rem;pointer-events:none}.toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%);z-index:30;max-width:calc(100vw - 40px);padding:13px 23px;color:var(--panel);background:var(--ink);border-radius:8px;font-size:.875rem;text-align:center;box-shadow:0 5px 30px #0002}.exit-immersive{position:fixed;top:24px;right:24px;z-index:20;background:var(--panel)}body.immersive .app-header,body.immersive .studio-controls,body.immersive .scene-status,body.immersive .scene-title,body.immersive .scene-tools{display:none}body.immersive .workspace{display:block}body.immersive .d3-stage{height:100svh;min-height:0}body.immersive .exit-immersive{display:block!important}body.immersive .scene-instruction{opacity:0;transition:opacity .3s}body.immersive .d3-stage:hover .scene-instruction{opacity:1}
@media(min-width:1500px){.workspace{grid-template-columns:minmax(0,1fr) 340px}.studio-controls{padding-left:30px;padding-right:30px}.scene-title{left:48px;top:42px}}
@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr) 268px}.studio-controls{padding:24px 18px}.app-header{padding:0 22px}.brand-credit{display:none}.scene-title{left:22px;top:25px}.scene-title .eyebrow{font-size:.625rem}.scene-tools{top:20px;right:16px;flex-wrap:wrap;width:100px}.scene-tools button{flex:1}.scene-bottom{left:22px;right:18px;bottom:25px}.scene-instruction small{max-width:230px}.scene-status{padding-left:20px;padding-right:18px;flex-wrap:wrap;gap:0}.d3-file-name{max-width:100%}}
@media(max-width:670px){.app-header{height:72px;padding:0 18px;gap:12px}.brand{font-size:1.55rem}.header-actions{gap:5px}.header-actions button{font-size:.75rem;padding:8px 10px;min-height:39px}.header-actions [data-immersive]{display:none}.workspace{display:flex;flex-direction:column;min-height:0}.scene-column{position:relative}.d3-stage{height:62svh;min-height:440px;max-height:680px}.scene-title{top:25px;left:22px}h1{font-size:1.45rem;margin-top:11px}.scene-title .eyebrow{font-size:.625rem}.scene-tools{right:15px;top:22px}.scene-tools button{min-height:42px}.scene-bottom{left:20px;right:18px;bottom:20px;align-items:center}.scene-instruction{font-size:.8125rem;gap:4px}.scene-instruction small{font-size:.625rem;max-width:205px}.wind-button{font-size:.75rem;padding:10px 12px;min-height:44px}.scene-status{font-size:.625rem;padding:9px 20px;line-height:18px}.scene-status>span{max-width:100%}.studio-controls{border-left:0;border-top:1px solid var(--line);padding:27px 22px;display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.controls-heading{grid-column:1/-1;margin-bottom:24px}.control-section{min-width:0}.material-picker{gap:6px}.material-picker button{font-size:.75rem}.section-caption{align-items:start;flex-direction:column;gap:3px}.section-caption>span{font-size:.625rem}.studio-footnote{grid-column:1/-1}.capture-actions{flex-wrap:wrap}.capture-actions button{flex:1 1 100%}summary{font-size:.875rem}summary span{display:none}.field label{font-size:.8125rem}.segmented{flex-direction:column}.segmented button{min-height:42px}.small-actions{flex-wrap:wrap}.small-actions button{min-height:36px}.field input[type=range]{height:26px}.scene-tools button{white-space:nowrap;background:var(--panel)}}
@media(max-width:380px){.header-actions [data-snapshot]{font-size:0;padding:8px 11px}.header-actions [data-snapshot]:after{content:'저장';font-size:.75rem}.studio-controls{padding:24px 18px;gap:0 18px}.material-picker{gap:4px}.swatch{height:43px}.scene-title .eyebrow{max-width:140px;display:block;line-height:1.6}.scene-bottom{gap:8px}.scene-instruction small{max-width:170px}.wind-button{padding:9px}.scene-instruction>span{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.export-dialog{max-width:min(900px,94vw);max-height:94svh;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink)}.export-dialog::backdrop{background:#14201ccc;backdrop-filter:blur(5px)}.export-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:16px}.export-heading h2{font:500 1rem/1.5 'DM Sans','Noto Sans KR',sans-serif;margin:0}.export-media img,.export-media video{display:block;max-width:100%;max-height:65svh;object-fit:contain;margin:auto;border-radius:5px}.export-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.export-actions a{border:1px solid var(--line);border-radius:24px;padding:9px 16px;font-size:.875rem;text-decoration:none}.export-actions a:first-child{background:var(--ink);color:var(--panel)}.export-dialog p{font-size:.75rem;color:var(--muted);margin-bottom:0}
.performance-panel{position:absolute;left:26px;bottom:110px;max-width:330px;background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:13px 16px;pointer-events:none;font-variant-numeric:tabular-nums;box-shadow:0 3px 20px #0000000a}.performance-title{display:flex;justify-content:space-between;gap:16px;font-size:.6875rem;color:var(--muted);margin-bottom:12px}.performance-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px}.performance-grid>div{display:flex;flex-direction:column;gap:2px}.performance-grid strong{font-size:1.1rem;font-weight:500}.performance-grid span{font-size:.625rem;color:var(--muted)}.performance-panel p{font-size:.625rem;color:var(--muted);margin:12px 0 0}.option-note{font-size:.625rem;color:var(--muted)}.option-description{font-size:.6875rem;line-height:1.65;color:var(--muted);margin:12px 0 0}.benchmark-result{font-size:.75rem;border-top:1px solid var(--line);padding-top:12px;margin-top:12px;line-height:1.7;font-variant-numeric:tabular-nums}.benchmark-result table{width:100%;border-collapse:collapse;margin-top:6px}.benchmark-result td,.benchmark-result th{text-align:right;padding:3px;font-weight:400}.benchmark-result th:first-child,.benchmark-result td:first-child{text-align:left}.benchmark-result small{font-size:.625rem;color:var(--muted)}@media(max-width:670px){.physics-options{grid-column:1/-1}.performance-panel{left:18px;bottom:100px;max-width:220px;padding:10px 12px}.performance-grid{gap:8px 16px}.performance-grid strong{font-size:.95rem}.performance-panel p{font-size:.6rem}.performance-title{font-size:.625rem}}body.immersive .performance-panel{bottom:110px}
