:root {
  color-scheme: dark;
  --bg: #090b0b; --panel: #111514; --line: #292f2c; --ink: #f1f3ee; --muted: #8b9690; --accent: #c9f4db;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
button, a, summary { touch-action: manipulation; }
button:hover { color: #fff; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .4; cursor: default; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.mono, .small-label, .eyebrow, .scene-tag, .key-hint, .prototype-badge, .timeline-labels, .experiment-footer, .tiny-tag { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.masthead { height: 76px; border-bottom: 1px solid var(--line); padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #0c0f0e; }
.brand { display: flex; gap: 12px; align-items: center; font-size: 15px; letter-spacing: -.03em; font-weight: 650; min-height: 44px; }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.brand-divider { display: inline-block; margin: 0 13px; color: #46534b; font-weight: 400; }
.brand-lab { font-weight: 400; color: #a4afa8; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.prototype-badge { font-size: 10px; color: #a4afa8; display: flex; align-items: center; gap: 7px; letter-spacing: .03em; }
.prototype-badge i { height: 5px; width: 5px; background: #b9d5b6; border-radius: 50%; }
.studio-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; border: 1px solid #39443d; border-radius: 7px; background: #19211d; height: 36px; padding: 0 10px; }
.studio-toggle svg { width: 16px; height: 16px; }
.key-hint { font-size: 10px; padding: 2px 4px; border: 1px solid #46514b; border-radius: 3px; color: #9caaa1; margin-left: 8px; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 304px; min-height: calc(100svh - 76px); }
body.studio-hidden .workspace { grid-template-columns: minmax(0,1fr); }
body.studio-hidden .studio { display: none; }
#experiment { min-width: 0; display: flex; flex-direction: column; }
.scene { position: relative; isolation: isolate; min-height: 570px; height: calc(100svh - 234px); overflow: hidden; flex: 1; background: #090b0b; }
.scene canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; z-index: -1; touch-action: pan-y; }
.scene-top { position: absolute; top: 30px; left: 32px; right: 32px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.eyebrow { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #b6c0b8; display: flex; align-items: center; gap: 12px; }
.index { font-size: 10px; color: #83988b; border: 1px solid #39483e; padding: 4px 5px; border-radius: 3px; letter-spacing: 0; }
.scene-tag { font-size: 9px; color: #657269; text-transform: uppercase; letter-spacing: .06em; }
.axis { position: absolute; top: 43%; left: 22px; display: flex; flex-direction: column; gap: 16px; font: 10px ui-monospace, monospace; color: #748179; pointer-events: none; }
.axis i { height: 58px; width: 1px; background: #2c3b31; align-self: center; }
.scene-bottom { position: absolute; bottom: 43px; left: 48px; right: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; pointer-events: none; }
.small-label { font-size: 8px; letter-spacing: .12em; color: #829488; }
.scene-bottom p { margin: 10px 0 0; font-size: 20px; letter-spacing: -.04em; font-weight: 450; }
.pointer-hint { font-size: 10px; color: #87988d; display: flex; align-items: center; gap: 6px; }
.pointer-hint svg { width: 17px; height: 17px; }
.transport { margin: 0 32px; padding: 17px 16px 15px; border: 1px solid #2b352f; border-radius: 10px; background: #101713; position: relative; }
.transport-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.transport-title { display: flex; align-items: center; gap: 9px; flex: 1; color: #cad8ce; font-size: 11px; }
.icon-button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; background: #202a23; color: #bacebe; flex-shrink: 0; font-size: 20px; }
.icon-button:hover { background: #2c3b30; }
.icon-button svg { width: 16px; height: 16px; }
.transport-heading > .mono { font-size: 10px; color: #85988b; }
.text-button { font-size: 10px; color: #95ad9d; padding: 4px 0; display: inline-flex; align-items: center; gap: 5px; }
.text-button:hover { color: #d8f5df; }
.transport-heading > .text-button { margin-left: 8px; }
.text-button > span { font-size: 17px; line-height: 10px; }
.timeline-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 8px; color: #657b6b; }
.timeline-labels b { font-weight: 400; color: #a2b7a8; margin-left: 5px; }
.experiment-footer { display: flex; justify-content: space-between; gap: 16px; padding: 16px 34px 20px; font-size: 8px; color: #6f8375; letter-spacing: .035em; }
.footer-separator { margin: 0 6px; color: #3c5041; }
.studio { border-left: 1px solid var(--line); background: #111613; min-width: 0; max-height: calc(100svh - 76px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #34483a transparent; padding: 26px 20px 0; }
.studio-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.studio-heading .small-label { font-size: 8px; color: #899c8e; }
.studio h2 { font-size: 16px; letter-spacing: -.04em; font-weight: 500; margin: 7px 0 0; display: flex; align-items: center; gap: 9px; }
.status-dot { height: 5px; width: 5px; background: #bce7c7; border-radius: 50%; box-shadow: 0 0 7px #bce7c733; }
.studio-heading > .icon-button { background: none; color: #768b7d; width: 24px; height: 24px; font-size: 22px; font-weight: 200; }
.control-section { padding: 0 0 22px; margin-bottom: 20px; border-bottom: 1px solid #2a362d; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 14px; }
h3 { font-size: 11px; letter-spacing: .015em; font-weight: 500; color: #c6d4ca; margin: 0; }
.section-heading > .mono { font-size: 8px; color: #738a79; }
.materials { border: 0; padding: 0; margin: 0; display: grid; gap: 5px; }
.material { border: 1px solid transparent; border-radius: 6px; padding: 8px; display: flex; align-items: center; gap: 11px; position: relative; cursor: pointer; background: #151c17; min-height: 53px; }
.material:hover { background: #1c281f; }
.material:has(input:checked) { border-color: #617a64; background: #233027; }
.material:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.material input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.material b { font-size: 10px; font-weight: 500; display: block; color: #d2ddd5; }
.material small { font-size: 8px; color: #83998a; display: block; margin-top: 4px; line-height: 1.35; }
.swatch { height: 32px; width: 32px; flex-shrink: 0; border-radius: 5px; box-shadow: inset 0 0 0 1px #ffffff20; }
.swatch-silk { background: repeating-linear-gradient(117deg,#ffffff00 0 2px,#ffffff2c 2px 3px),conic-gradient(from 20deg,#686469,#c4acd8,#def1da,#94c2b4,#7f739b,#d8b8a4,#686469); }
.swatch-security { background: repeating-radial-gradient(ellipse at 30% 70%,#e9b41677 0 1px,#13380722 2px 4px),linear-gradient(130deg,#06140b,#d2ab0a 40%,#12e432 52%,#163b08 78%); }
.swatch-foil { background: repeating-conic-gradient(from 0deg,#ffffff77 0 5%,#ffffff00 0 25%) 0 0/5px 5px,linear-gradient(140deg,#a50f18,#ffd30e,#21a242,#32cbef,#6a20cb); }
.swatch-chrome { background: repeating-linear-gradient(140deg,#132221,#789293 19%,#e5e4d9 22%,#78888b 27%,#132221 33%); }
.swatch-opal { background: conic-gradient(from 45deg,#b5d9c4,#e4d6e9,#aed1db,#ede8c8,#b5d9c4); }
.radio-mark { margin-left: auto; width: 10px; height: 10px; border: 1px solid #4c6253; border-radius: 50%; flex-shrink: 0; }
.material:has(input:checked) .radio-mark { border-color: #c7e5d0; border-width: 3px; background: #304e38; }
.range-label { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #9db1a4; margin: 17px 0 9px; }
.range-label output { font: 9px ui-monospace, monospace; color: #c0d2c6; }
input[type=range] { display: block; width: 100%; appearance: none; -webkit-appearance: none; margin: 0; height: 18px; background: transparent; cursor: pointer; accent-color: #bde0c5; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right,#9ab9a1 0 var(--fill,50%),#344438 var(--fill,50%) 100%); border-radius: 5px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; border-radius: 50%; background: #d4edda; margin-top: -3.5px; box-shadow: 0 0 0 3px #d4edda0a; }
input[type=range]::-moz-range-track { height: 2px; background: #344438; }
input[type=range]::-moz-range-progress { height: 2px; background: #9ab9a1; }
input[type=range]::-moz-range-thumb { width: 9px; height: 9px; border: 0; background: #d4edda; border-radius: 50%; }
#progress { --fill: 0%; height: 16px; }
#progress::-webkit-slider-runnable-track { height: 3px; }
#progress::-webkit-slider-thumb { width: 10px; height: 10px; }
.switch-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; cursor: pointer; position: relative; font-size: 10px; color: #9fb2a6; min-height: 22px; }
.switch-row > span:first-child { flex: 1; }
.switch-row > input { position: absolute; right: 0; width: 28px; height: 18px; opacity: 0; cursor: pointer; }
.switch { width: 26px; height: 14px; border: 1px solid #405146; border-radius: 20px; background: #26332a; position: relative; pointer-events: none; }
.switch:after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #869b8e; top: 2px; left: 2px; transition: transform .15s; }
.switch-row input:checked + .switch { background: #b0cdb7; border-color: #b0cdb7; }
.switch-row input:checked + .switch:after { background: #223728; transform: translateX(12px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 3px; }
.tiny-tag { color: #83a18d; font-size: 6px; letter-spacing: .02em; border: 1px solid #3b5041; border-radius: 3px; padding: 3px 4px; white-space: nowrap; }
.field-label { display: block; font-size: 9px; color: #90a697; margin: 13px 0 8px; }
select, textarea { width: 100%; border: 1px solid #384c3e; border-radius: 5px; background: #18231c; color: #cbdbd0; padding: 10px; font-size: 10px; }
select { min-height: 36px; cursor: pointer; }
textarea { resize: vertical; min-height: 64px; line-height: 1.6; }
.control-note { font-size: 9px; line-height: 1.7; color: #7a9483; margin: 16px 0 0; }
.file-drop { display: flex; flex-direction: column; align-items: center; position: relative; cursor: pointer; gap: 7px; margin-top: 12px; border: 1px dashed #49624f; padding: 17px 8px; background: #17251b; border-radius: 5px; text-align: center; }
.file-drop > span { font-size: 20px; color: #c1ddc9; }
.file-drop b { font-size: 10px; font-weight: 400; color: #afc5b6; }
.file-drop small { font-size: 8px; color: #7c9a86; }
.file-drop input { width: 100%; position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.source-details { border-bottom: 0; margin-bottom: 0; }
.source-details summary { font-size: 10px; color: #9eb3a5; cursor: pointer; list-style: none; display: flex; justify-content: space-between; min-height: 30px; align-items: center; }
.source-details summary::-webkit-details-marker { display: none; }
.source-details[open] summary > span { transform: rotate(45deg); }
.diagnostics { font-size: 8px; line-height: 1.7; color: #84a28e; display: block; margin-top: 15px; overflow-wrap: anywhere; }
.fallback { position: absolute; inset: 15% 10%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 15px; }
.fallback p { font-size: clamp(50px,10vw,140px); font-weight: 750; letter-spacing: -.07em; line-height: .93; margin: 0; color: #f1f4e9; }
.fallback > span { font-size: 12px; color: #9ca99e; max-width: 350px; line-height: 1.6; }
.fallback-label { font-family: ui-monospace, monospace; text-transform: uppercase; font-size: 9px !important; letter-spacing: .12em; }
body[data-renderer=fallback] .scene canvas { display: none; }
body[data-renderer=fallback] .scene-bottom { display: none; }
@media(min-width:1700px) {
  .studio { padding-inline: 24px; } .workspace { grid-template-columns: minmax(0,1fr) 330px; } .scene { min-height: 650px; } .scene-bottom { left: 64px; right: 64px; }
}
@media(max-width:1050px) {
  .scene-tag { display: none; } .scene-bottom { left: 30px; right: 30px; } .pointer-hint { font-size: 8px; } .scene-bottom .small-label { font-size: 6px; }
  .scene-bottom p { font-size: 18px; } .masthead { padding-inline: 22px; } .header-actions { gap: 14px; } .transport { margin-inline: 20px; }
  .scene-top { left: 24px; right: 24px; } .experiment-footer { padding-inline: 22px; } .brand-divider { margin-inline: 8px; }
}
@media(max-width:760px) {
  .masthead { height: 64px; padding-inline: 18px; } .brand { font-size: 13px; gap: 8px; } .brand svg { width: 25px; height: 25px; }
  .brand-divider { margin-inline: 7px; } .brand-lab { font-size: 11px; } .prototype-badge { display: none; } .studio-toggle { font-size: 11px; height: 34px; } .key-hint { display: none; }
  .workspace { display: flex; flex-direction: column; min-height: calc(100svh - 64px); }
  .studio { border-left: 0; border-top: 1px solid var(--line); padding: 24px; max-height: none; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .studio-heading { grid-column: 1/-1; margin-bottom: 22px; } .control-section { margin-bottom: 18px; } .source-details { grid-column: 1/-1; }
  .scene { height: calc(100svh - 220px); min-height: 510px; flex: auto; } .scene-top { top: 25px; left: 22px; }
  .scene-bottom { bottom: 32px; left: 26px; right: 26px; } .scene-bottom .small-label { font-size: 7px; max-width: 180px; display: block; line-height: 1.8; }
  .pointer-hint { max-width: 100px; line-height: 1.6; } .axis { left: 12px; top: 40%; gap: 12px; font-size: 8px; } .axis i { height: 34px; }
  .transport { margin-inline: 18px; padding: 13px 13px 11px; } .transport-title { font-size: 10px; } .transport-heading { gap: 8px; margin-bottom: 7px; }
  .timeline-labels { font-size: 7px; } .timeline-labels b { margin-left: 3px; } .experiment-footer { font-size: 7px; padding: 14px 21px 17px; } .scene-bottom p { font-size: 20px; }
}
@media(max-width:440px) {
  .studio { display: block; padding: 24px; } .scene { min-height: 490px; } .brand-lab, .brand-divider { display: none; }
  .transport-heading > .mono { font-size: 8px; } .transport-title { gap: 7px; } .transport-heading > .text-button { margin-left: 0; }
  .scene-top .eyebrow { font-size: 8px; letter-spacing: .06em; } .scene-bottom { left: 22px; right: 22px; }
  .timeline-labels { font-size: 6px; } .timeline-labels b { font-size: 7px; } .experiment-footer { font-size: 6px; gap: 7px; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* The hero contains only the requested headline and optical effect. */
.masthead,.scene-top,.axis,.scene-bottom{display:none!important}
.workspace,body.studio-hidden .workspace{display:block;min-height:100svh}
.scene{height:100svh;min-height:100svh}
.studio{--studio-padding:20px;position:fixed;z-index:30;top:12px;right:12px;bottom:auto;width:304px;height:min(720px,calc(100svh - 24px));min-width:min(280px,calc(100vw - 24px));min-height:min(220px,calc(100svh - 24px));max-width:calc(100vw - 24px);max-height:calc(100svh - 24px);display:flex;flex-direction:column;padding:0;border:1px solid #303b33;border-radius:10px;overflow:hidden}
.studio .studio-heading{flex-shrink:0;gap:12px;margin:0;padding:20px var(--studio-padding) 18px}
.studio-move{flex:1;min-width:0;cursor:grab;touch-action:none;user-select:none;border-radius:4px}
.studio-move:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
.studio.is-moving .studio-move{cursor:grabbing}
.studio-content{flex:1;min-height:0;overflow:auto;padding:0 var(--studio-padding) 30px;scrollbar-width:thin;scrollbar-color:#34483a transparent}
.studio-content .config-actions{margin-top:0}
.studio-resize{position:absolute;right:2px;bottom:2px;display:flex;align-items:center;justify-content:center;width:24px;height:24px;color:#92ac9b;cursor:nwse-resize;touch-action:none;border-radius:4px;background:#111613}
.studio-resize svg{width:17px;height:17px}
.studio-resize:focus-visible{outline-offset:-2px}
.stats-list{margin:0}
.stats-list>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:12px;align-items:baseline;padding:10px 0;border-bottom:1px solid #2a362d}
.stats-list dt{font-size:10px;line-height:1.5;color:#9fb2a6}
.stats-list dd{margin:0;font:9px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;color:#d1dfd5;text-align:right;overflow-wrap:anywhere}
.stats-section{border-bottom:0;margin-bottom:0}
@media(max-width:760px){.studio{--studio-padding:24px}}
@media(min-width:1700px){.studio{--studio-padding:24px}}
body.studio-hidden .studio{display:none}
.studio-toggle{position:fixed;z-index:31;right:18px;bottom:18px;width:32px;height:32px;justify-content:center;padding:0;font-size:17px;opacity:.5}
body:not(.studio-hidden) .studio-toggle{visibility:hidden}
.studio .transport{margin:0 0 22px;padding:10px}
.studio .experiment-footer{padding:12px 0;font-size:8px}
.timeline-stages{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:10px}
.timeline-stages button{border:1px solid #344438;border-radius:4px;padding:6px 2px;font-size:8px;color:#a9bdaf;background:#18231c}
.timeline-stages button[aria-pressed=true]{background:#33483a;border-color:#94b49d;color:#e1f1e5}
.config-actions{position:sticky;top:0;z-index:3;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 0;margin:-8px 0 20px;background:#111613;border-bottom:1px solid #2a362d}
.copy-config{min-height:34px;padding:8px 12px;border:1px solid #49614e;border-radius:6px;background:#223128;color:#d7e5db;font-size:11px;font-weight:500;white-space:nowrap}
.copy-config:hover{background:#2c4032}
.copy-status{flex-basis:100%;font-size:9px;line-height:1.5;color:#aac8b4}
.copy-status:empty{display:none}
#config-text{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:9px;white-space:pre;overflow:auto;margin-bottom:18px}
.preset-control{margin-bottom:22px}
.preset-row{display:flex;align-items:center;gap:12px}
.preset-row select{flex:1;min-width:0}
.preset-row .text-button{white-space:nowrap;min-height:32px}
.debug-section{padding-bottom:16px;margin-bottom:16px}
.debug-section > summary{display:flex;align-items:center;justify-content:space-between;min-height:32px;margin:0;cursor:pointer;list-style:none}
.debug-section > summary::-webkit-details-marker{display:none}
.debug-section[open] > summary{margin-bottom:12px}
.section-chevron{font-size:16px;color:#8fa897;transform:rotate(-90deg)}
.debug-section[open] > summary > .section-chevron{transform:none}
.option-heading,.option-toggle,.progress-control{display:flex;align-items:center;gap:8px}
.option-heading{margin:13px 0 6px;min-height:24px}
.option-heading > label,.option-heading > .field-label{flex:1;min-width:0;margin:0}
.option-heading .range-label{gap:8px}
.option-heading .range-label output{flex-shrink:0}
.option-heading > .mono{flex:1;font-size:8px;color:#738a79}
.material-heading{margin-top:0;margin-bottom:8px}
.option-reset{flex-shrink:0;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #35473b;border-radius:4px;color:#9bb7a4;font-size:16px;line-height:1;background:#18231c}
.option-reset:hover{background:#2c4032;border-color:#6c8a75}
.option-toggle{margin-top:14px}
.option-toggle .switch-row{flex:1;min-width:0;margin-top:0}
.progress-control input{flex:1;min-width:0}
.studio .debug-section .transport{margin:0}

.placement-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0 8px}
