:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:#263c3e;background:#f3f5f3;font-synthesis:none;font-size:14px}*{box-sizing:border-box}body{margin:0}main{max-width:1520px;margin:30px auto;padding:0 32px}a{color:#537571;text-decoration:none;font-size:13px}header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:26px}.eyebrow{margin:26px 0 12px;letter-spacing:.17em;color:#6c8c84;font-size:11px}h1{font-size:30px;font-weight:600;letter-spacing:-.035em;margin:0 0 10px}.intro{color:#788783;line-height:1.7;margin:0}.toolbar,.camera-toolbar,.json-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}button,input,select,textarea{font:inherit}button{font-size:13px;padding:9px 13px;border:1px solid #d7e0db;background:#fff;color:#365950;border-radius:7px;cursor:pointer}button:hover{background:#edf4ef}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #4a8974;outline-offset:3px}.primary{background:#285e4d;color:white;border-color:#285e4d}.primary:hover{background:#214e40}.workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(380px,1fr);gap:22px;align-items:start}.panel{background:#fff;border:1px solid #dfe6e1;border-radius:12px;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #eaf0eb}h2{font-size:15px;font-weight:600;margin:0}#revision{font-size:12px;color:#7a8b82}.stage{min-height:400px;background:#f5f5f5;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:12px}#surface{position:relative;flex:none}.render-surface{position:absolute;left:0;top:0;transform-origin:top left}.render-surface canvas{display:block;touch-action:none}.overlay{position:absolute;top:0;left:0;pointer-events:none}.chart-overlay-frame{position:relative}.chart-label{position:absolute;white-space:nowrap;transform:translate(-50%,-50%);color:#435563}.chart-legend{position:absolute;right:12px;top:12px;display:flex;flex-direction:column;gap:6px;font-size:12px}.chart-legend span{display:flex;align-items:center;gap:7px}.chart-legend i{width:10px;height:10px;border-radius:2px}[hidden]{display:none!important}.camera-toolbar{justify-content:space-between;padding:16px 20px 0}.camera-toolbar span{font-size:11px;color:#7c8c83}.camera-toolbar button{padding:6px 10px;font-size:12px}#camera-status{font-size:12px;color:#7b887e;line-height:1.7;padding:0 20px}.preview-summary{border-top:1px solid #edf1ee;padding:10px 20px;display:flex;justify-content:space-between;gap:14px;font-size:12px;color:#587665}details{padding:16px 20px;border-top:1px solid #edf1ee}summary{cursor:pointer;font-size:12px;color:#648071}pre{font:11px/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f7f4;padding:12px;border-radius:6px;max-height:260px;overflow:auto}.tabs{display:flex;border-bottom:1px solid #e5ece6;padding:0 18px;gap:18px}.tabs button{background:none;border:0;border-radius:0;padding:20px 6px;color:#859088}.tabs [aria-selected=true]{border-bottom:2px solid #33785c;color:#275f46}#form-panel,#json-panel{padding:6px 22px 18px}.hint{font-size:11px;color:#7e8b83;line-height:1.8}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px}fieldset{border:0;padding:0;margin:20px 0 0;min-width:0}legend,h3{font-size:12px;font-weight:600;margin:0 0 16px;color:#385a48}h3{margin-top:24px;border-top:1px solid #edf1ee;padding-top:20px}label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#6b7f72}input:not([type=checkbox]),select{height:34px;padding:5px 9px;border:1px solid #dce4dc;background:#fbfcfb;border-radius:5px;color:#365343;width:100%;min-width:0}input[type=color]{padding:4px;cursor:pointer}input:disabled,select:disabled{opacity:.5}.check{flex-direction:row;align-items:center;gap:6px}input[type=checkbox]{accent-color:#3f7f59}#json-editor{width:100%;height:580px;resize:vertical;background:#f6f8f6;border:1px solid #dde5dd;border-radius:7px;padding:16px;color:#304f40;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2;white-space:pre;overflow:auto}.json-actions{margin-top:12px}#draft-status{margin-right:auto;font-size:11px;color:#7e887f}#draft-dot{color:#c38f34;font-size:10px}#diagnostics{padding:0 22px 14px;max-height:240px;overflow:auto;font-size:12px;line-height:1.6;overflow-wrap:anywhere}#diagnostics p{padding:10px 12px;background:#fff3ef;border-radius:5px;color:#9a4d3b;margin:0 0 6px}#diagnostics p.warning{color:#8e753c;background:#faf6e8}footer{display:flex;justify-content:space-between;gap:18px;color:#8c978f;font-size:11px;margin:22px 0;line-height:1.8}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}table{width:100%;border-collapse:collapse;font-size:12px;margin-top:14px}td,th{padding:7px 10px;text-align:left;border-bottom:1px solid #edf1ee;overflow-wrap:anywhere}#data-summary{overflow:auto;max-height:230px}#data-summary td{max-width:180px}@media(max-width:1000px){main{padding:0 20px}.workspace{grid-template-columns:1fr}.editor{max-width:none}#json-editor{height:500px}.stage{min-height:350px}header{align-items:start}h1{font-size:26px}}@media(max-width:600px){main{padding:0 12px;margin:20px auto}header{display:block}.toolbar{margin-top:18px}h1{font-size:23px}.stage{min-height:260px}.camera-toolbar{padding:12px;gap:12px}footer{flex-direction:column;gap:0}.preview-summary{flex-wrap:wrap;gap:0}.fields{gap:12px}.panel-heading,#form-panel,#json-panel{padding-left:16px;padding-right:16px}}

.preview-unavailable{padding:50px;max-width:560px;margin:40px auto;color:#8a7259;line-height:2;text-align:center}.render-surface[data-unavailable=true] canvas,.render-surface[data-unavailable=true] .overlay{visibility:hidden}
/* Hidden chart-specific labels must also override the grid label display rule. */
[data-kind][hidden] { display: none; }
#chart-example { margin-bottom: 0; }
.config-summary{margin:0;padding:12px 20px;color:#486657;font-size:12px;line-height:1.7;background:#f8faf7;border-bottom:1px solid #eaf0eb}
.example-section{padding-bottom:18px}
.example-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.example-choice{min-width:0}
.example-choice>.hint{margin:7px 0 0}
.example-choice>button{margin-top:9px;padding:7px 10px;max-width:100%}
@container(max-width:450px){.example-grid{grid-template-columns:1fr;gap:14px}}
.control-section{padding:18px 0}
.control-section>summary{font-size:14px;font-weight:600;color:#385a48}
.control-section[open]>summary{margin-bottom:18px}
h4{font-size:12px;font-weight:600;color:#506c5c;margin:22px 0 14px;padding-top:16px;border-top:1px solid #edf1ee}
@media(min-width:1001px){.preview{position:sticky;top:20px}}

/* Columns follow the actual editor width, including single-panel layouts. */
.editor{container-type:inline-size}
.fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.fields>label{min-width:0;line-height:1.5}
.fields>.check{min-height:34px;align-self:end}
@media(min-width:1001px){.workspace{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}}
@container(min-width:560px){.fields{grid-template-columns:repeat(4,minmax(0,1fr))}.fields>label:has(select){grid-column:span 2}}
@container(max-width:300px){.fields{grid-template-columns:minmax(0,1fr)}}
.number-control{display:flex;align-items:stretch;min-width:0;height:34px;border:1px solid #dce4dc;background:#fbfcfb;border-radius:5px;overflow:hidden}
.number-control input[type=number]{appearance:textfield;-moz-appearance:textfield;flex:1;width:0;height:32px;border:0;border-radius:0;padding:5px 6px}
.number-control input::-webkit-inner-spin-button,.number-control input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.number-control button{flex:none;width:23px;padding:0;border:0;border-left:1px solid #e1e8e1;border-radius:0;background:#f1f6f1;font-size:15px}
.number-control button:hover:not(:disabled){background:#dcecdf}
.number-control button:disabled{pointer-events:none}
.number-control:focus-within{outline:2px solid #4a8974;outline-offset:2px}
.number-control input:focus-visible,.number-control button:focus-visible{outline-offset:-2px}

.chart-label{font-weight:600;text-shadow:0 1px 2px #ffffff,0 -1px 2px #ffffff,1px 0 2px #ffffff,-1px 0 2px #ffffff}
.chart-legend{background:rgba(255,255,255,.8);padding:8px;border-radius:6px}

.chart-legend:empty{display:none}
#diagnostics .render-notes{margin:8px 0 0;padding:0;border:0}
#diagnostics .render-notes summary{font-size:12px;color:#6e7f72}
#diagnostics .render-notes p{margin:8px 0 0;background:#f6f8f3;color:#617362}
#diagnostics .render-notes small{display:block;color:#87938a;margin-top:4px;font:10px ui-monospace,monospace}

.material-assignments{max-height:320px;overflow:auto;margin-bottom:12px}.material-assignments td:first-child{max-width:180px}.material-assignments select{min-width:160px}.material-assignments th{position:sticky;top:0;background:#fff}
.color-categories{max-height:280px;overflow:auto}.color-categories th{position:sticky;top:0;background:#fff}.color-categories input[type=color]{width:72px;height:30px}
.palette-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:18px 0 8px;font-size:11px;color:#6b7f72}
.palette-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.palette-grid{max-height:340px;overflow:auto;align-content:start}
.palette-group{grid-column:1/-1;margin:10px 0 0;color:#648071;font-size:11px}
.palette-gradient,.chart-legend-gradient{display:block;width:100%;height:15px;border-radius:3px;box-shadow:inset 0 0 0 1px #00000018}
.chart-legend-gradient{width:150px;height:12px}
.chart-legend-bounds{display:flex!important;justify-content:space-between;width:150px;font-size:10px}
#color-domain{margin-top:12px}
.palette-card{width:100%;min-width:0;padding:9px 10px;text-align:left;background:#fbfcfb;border:1px solid #dce4dc}
.palette-card:hover{background:#f3f8f4}.palette-card.selected{border-color:#348266;background:#f0f8f2;box-shadow:inset 0 0 0 1px #348266}
.palette-card-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;min-width:0;margin-bottom:8px}
.palette-card-heading strong{font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.palette-card-heading small{flex:none;font-size:10px;color:#7e9184}
.palette-strip{display:flex;gap:2px;width:100%;height:15px}.palette-strip span{flex:1;min-width:0;border-radius:2px;box-shadow:inset 0 0 0 1px #00000018}.palette-strip .palette-unused{opacity:.3}
.current-colors{display:flex;align-items:center;gap:10px;margin-top:12px;font-size:11px;color:#64796b}.current-colors .palette-strip{max-width:330px}.current-colors small{font-size:10px}
@container(max-width:490px){.palette-grid{grid-template-columns:1fr}}

#data-panel{padding:12px 22px 22px}
.data-toolbar,.data-pagination{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0}
.data-toolbar .hint{margin-left:auto}
.data-table{overflow:auto;max-height:540px;border:1px solid #e1e9e2;border-radius:6px}
.data-table table{margin:0;min-width:100%}
.data-table th{position:sticky;top:0;background:#f7faf7;z-index:1;white-space:nowrap}
.data-table td{min-width:115px;max-width:230px;padding:5px}
.data-table td:first-child{min-width:42px;width:42px;text-align:center;color:#788b7a}
.data-table td:last-child{min-width:60px;width:60px;position:sticky;right:0;background:#fff;box-shadow:-4px 0 8px #ffffffd9}
.data-table th:last-child{position:sticky;right:0;z-index:2;min-width:60px}
.data-table input{min-width:105px}
.data-table button{padding:6px 8px;font-size:11px}
.data-pagination{justify-content:flex-end}
#data-import{border:1px solid #d5e5d8;background:#f8fbf8;border-radius:8px;padding:14px;margin:14px 0}
#data-import>p{margin:0 0 12px;color:#3c604a;font-size:12px}
.data-mapping{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:600px){#data-panel{padding:12px 16px}.data-mapping{grid-template-columns:1fr}}
