*{box-sizing:border-box}body{margin:0;background:#111614;color:#e9eee6;font:14px/1.5 "Segoe UI","Microsoft YaHei",sans-serif}header{height:88px;display:flex;align-items:center;padding:0 30px;border-bottom:1px solid #354039;gap:18px;background:#17201c}small{font-size:10px;letter-spacing:.18em;color:#99ab9f}.mark{color:#c8dd9a;font-size:36px}h1{font-weight:500;font-size:23px;margin:3px 0}h1 span{font-size:15px;color:#a3b397;margin-left:10px}.state{margin-left:auto;font-size:12px;color:#c7d9a4;border:1px solid #566749;padding:7px 13px;border-radius:20px}main{height:calc(100vh - 88px);display:grid;grid-template-columns:minmax(0,1fr) 292px}.stage{position:relative;min-height:480px;background:radial-gradient(ellipse at 50% 45%,#65766d 0,#35443e 50%,#24322d 100%)}canvas{width:100%;height:100%;display:block;touch-action:none}.stage-label{position:absolute;left:27px;top:22px;display:flex;flex-direction:column;gap:5px;pointer-events:none}.stage-label span{font-size:13px;color:#d6e4d5}.bottom{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);display:flex;gap:3px;background:#17211ce6;padding:5px;border-radius:6px;border:1px solid #53604f}button{color:#dce8d3;background:transparent;border:0;padding:8px 14px;cursor:pointer;white-space:nowrap;border-radius:3px}button:hover{background:#3c4f39}aside{background:#19221e;border-left:1px solid #39463d;padding:24px;overflow:auto}aside section{padding-bottom:20px;margin-bottom:19px;border-bottom:1px solid #39463d}h2{font-weight:500;font-size:16px;margin:5px 0 16px}label{display:block;color:#b7c5b8;font-size:12px;margin:12px 0}select{display:block;margin-top:7px;width:100%;background:#25332b;color:#dce6d4;border:1px solid #495d47;padding:8px}input[type=range]{width:100%;accent-color:#b8cf8b;margin-top:12px}.check{display:flex;align-items:center;gap:7px}.check input{accent-color:#abc885}#meshes label{margin:8px 0;font-size:11px;display:flex;gap:7px;align-items:center}#meshes span{margin-left:auto;color:#87998b;font-variant-numeric:tabular-nums}p{font-size:11px;color:#93a597;line-height:1.7}.reference{width:100%;border-radius:4px}pre{font-size:10px;white-space:pre-wrap;word-break:break-word;color:#b8b7a5}summary{font-size:12px;color:#98ac99;cursor:pointer}@media(max-width:820px){main{grid-template-columns:1fr;height:auto}.stage{height:75vh}aside{border-left:0}.state{display:none}header{padding:0 18px}h1{font-size:20px}}
body.capture header,body.capture aside,body.capture .stage-label,body.capture .bottom{display:none}body.capture main{display:block;width:1280px;height:720px}body.capture .stage{width:1280px;height:720px;min-height:0}

.score{display:flex;align-items:baseline;gap:12px}.score b{font-size:29px;color:#d4e2ac;font-weight:400}.score span{font-size:11px;color:#9aac9d}.wide{width:100%;border:1px solid #53684c;margin-top:8px}dialog{background:#18221c;color:#e4ebdc;border:1px solid #627656;border-radius:9px;width:min(980px,95vw);padding:22px}dialog::backdrop{background:#060c09d9}dialog img{width:100%;height:auto}dialog>button{float:right}dialog p{font-size:12px}dialog h2{margin-bottom:18px}

@media(max-width:600px){.bottom{width:calc(100% - 24px);flex-wrap:wrap;justify-content:center;bottom:12px}.bottom button{padding:7px 10px;font-size:12px}.stage-label{left:18px;top:16px}dialog{padding:14px}dialog h2{font-size:14px}}

/* Live pipeline inspector: intentionally additive so the character viewer's
   existing controls and renderer-owned IDs keep their original layout. */
:root{--debug-bg:#101914;--debug-panel:#17231d;--debug-panel-raised:#1d2c23;--debug-line:#3e5545;--debug-line-soft:#2e4135;--debug-text:#dce9d7;--debug-muted:#91a79a;--debug-dim:#6b8273;--debug-lime:#c5db91;--debug-amber:#e6bd77;--debug-cyan:#92c5ad}
main{position:relative}
header .debug-toggle{margin-left:auto}header .debug-toggle+ .state{margin-left:0}
.debug-toggle{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #607851;border-radius:5px;color:#dbe7d2;background:#202d24;font-size:12px;letter-spacing:.04em;transition:background .18s ease,border-color .18s ease,color .18s ease}.debug-toggle:hover,.debug-toggle[aria-expanded="true"]{background:#334b37;border-color:#9ab978;color:#f0f5e8}.debug-toggle-led{width:7px;height:7px;border-radius:50%;background:#768d78;box-shadow:0 0 0 2px #26362b;transition:background .18s ease,box-shadow .18s ease}.debug-toggle[aria-expanded="true"] .debug-toggle-led{background:var(--debug-lime);box-shadow:0 0 0 2px #536a44,0 0 12px #bddf7a}.debug-toggle kbd{font-size:10px;color:#849987;padding:0;background:none}
.pipeline-debug-panel{position:absolute;z-index:20;top:18px;right:18px;width:min(480px,calc(100% - 36px));height:calc(100% - 36px);display:flex;flex-direction:column;overflow:hidden;color:var(--debug-text);background:linear-gradient(160deg,#1b2a21f5 0%,#111c16f7 70%);border:1px solid #58705a;border-radius:9px;box-shadow:0 22px 70px #07100bd9,0 0 0 1px #0d1710;backdrop-filter:blur(18px) saturate(1.08);opacity:1;transform:translateY(0) scale(1);visibility:visible;transition:opacity .2s ease,transform .2s ease,visibility .2s ease}.pipeline-debug-panel[aria-hidden="true"]{opacity:0;transform:translateY(10px) scale(.985);visibility:hidden;pointer-events:none}.pipeline-debug-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:21px 22px 16px;border-bottom:1px solid var(--debug-line-soft);background:linear-gradient(90deg,#26382ae5,#17231dd9)}.pipeline-debug-head h2{margin:4px 0 3px;font-size:19px;letter-spacing:.01em}.pipeline-debug-head small{color:#a6ba9e}.pipeline-debug-status{margin:0;color:var(--debug-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:340px}.pipeline-icon-button{width:30px;height:30px;padding:0;border:1px solid #4d654f;color:#b8cdb4;background:#203027;border-radius:4px;font-size:21px;line-height:25px}.pipeline-icon-button:hover{background:#36513a;color:#f1f5e9}
.pipeline-debug-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 22px;border-bottom:1px solid var(--debug-line-soft)}.pipeline-control-group{display:flex;align-items:center;gap:14px;min-width:0}.pipeline-check{display:grid;grid-template-columns:auto auto;column-gap:7px;row-gap:0;align-items:center;margin:0;color:#d4e3d1;font-size:11px;cursor:pointer}.pipeline-check input{grid-row:1 / span 2;margin:0;accent-color:var(--debug-lime)}.pipeline-check span{line-height:1.1}.pipeline-check small{grid-column:2;color:var(--debug-dim);font-size:9px;letter-spacing:.03em}.pipeline-reset{display:inline-flex;align-items:center;gap:4px;padding:6px 8px;border:1px solid #516b54;color:#c5d8bb;background:#1c2b22;border-radius:4px;font-size:10px}.pipeline-reset:hover{background:#304936;border-color:#92ae76}.pipeline-reset span{font-size:16px;line-height:10px;color:var(--debug-lime)}
.pipeline-timeline,.pipeline-frame-status,.pipeline-stage-section,.pipeline-inspector{padding:15px 22px;border-bottom:1px solid var(--debug-line-soft)}.pipeline-section-label{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#afc2ad;font-size:10px;letter-spacing:.12em;text-transform:uppercase}.pipeline-section-label output,.pipeline-section-label small{color:var(--debug-dim);font-size:10px;letter-spacing:.03em;text-transform:none}.pipeline-range-row{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;align-items:center;gap:8px;margin-top:11px}.pipeline-step-button{width:28px;height:30px;padding:0;border:1px solid #4a634e;color:#c5dab8;background:#1d2d23;border-radius:4px;font-size:23px;line-height:20px}.pipeline-step-button:not(:disabled):hover{background:#345039;border-color:#8eaa72}.pipeline-step-button:disabled{color:#53665a;opacity:.55;cursor:not-allowed}.pipeline-range-wrap{position:relative;padding:0 1px 11px}.pipeline-range-wrap input[type=range]{display:block;width:100%;height:18px;margin:0;accent-color:var(--debug-lime);cursor:pointer}.pipeline-range-wrap input[type=range]:disabled{opacity:.35;cursor:not-allowed}.pipeline-range-ticks{position:absolute;left:3px;right:3px;bottom:0;display:flex;justify-content:space-between;pointer-events:none}.pipeline-range-ticks i{width:1px;height:4px;background:#5e7562}.pipeline-range-ticks i:first-child,.pipeline-range-ticks i:last-child{height:6px;background:#a3bb86}
.pipeline-frame-status{display:grid;grid-template-columns:1fr 1fr;gap:16px}.pipeline-metric{min-width:0}.pipeline-metric>span{display:block;color:var(--debug-dim);font-size:10px;letter-spacing:.08em}.pipeline-metric strong{display:block;margin-top:4px;color:#dcebd2;font-size:14px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pipeline-metric small{display:block;margin-top:2px;color:#789082;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pipeline-progress{height:3px;margin-top:8px;overflow:hidden;background:#26392d;border-radius:99px}.pipeline-progress i{display:block;width:var(--sample-progress,0%);height:100%;background:linear-gradient(90deg,#8ea96f,#d0e59c);border-radius:inherit;transition:width .18s ease}
.pipeline-stage-section{display:flex;flex:1 1 auto;flex-direction:column;min-height:164px}.pipeline-stage-list{min-height:86px;margin-top:10px;overflow:auto;padding-right:3px;scrollbar-color:#536e57 transparent}.pipeline-stage-list::-webkit-scrollbar{width:5px}.pipeline-stage-list::-webkit-scrollbar-thumb{background:#4a654f;border-radius:9px}.pipeline-stage-group{padding:6px 5px 5px;color:#6f8979;font-size:9px;letter-spacing:.14em}.pipeline-stage-group:not(:first-child){margin-top:6px;border-top:1px solid #293c30}.pipeline-stage-item{width:100%;display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;margin:2px 0;padding:7px 8px;border:1px solid transparent;border-radius:5px;color:#bcd0bd;background:transparent;text-align:left}.pipeline-stage-item:hover{background:#25372a;border-color:#405c46}.pipeline-stage-item.is-selected{color:#eef5e9;background:linear-gradient(90deg,#35513a,#253b2d);border-color:#78975f;box-shadow:inset 3px 0 #c5db91}.pipeline-stage-index{color:#708979;font-size:10px;font-variant-numeric:tabular-nums}.pipeline-stage-item.is-selected .pipeline-stage-index{color:var(--debug-lime)}.pipeline-stage-copy{min-width:0}.pipeline-stage-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.pipeline-stage-meta{display:flex;gap:7px;margin-top:2px;overflow:hidden;color:#758c7c;font-size:9px;white-space:nowrap}.pipeline-stage-meta span{overflow:hidden;text-overflow:ellipsis}.pipeline-stage-badge{padding:2px 4px;border:1px solid #4c6952;border-radius:3px;color:#a5bc96;font-size:8px;line-height:1;white-space:nowrap}.pipeline-stage-badge.viewer-only{border-color:#657d6e;color:#aad0bc}.pipeline-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:126px;padding:12px;color:#82988a;text-align:center}.pipeline-empty-mark{display:block;margin-bottom:4px;color:#789c72;font-size:26px;line-height:1}.pipeline-empty strong{color:#b9ceb7;font-size:12px;font-weight:500}.pipeline-empty p{max-width:290px;margin:4px 0 0;color:#71877a;font-size:10px;line-height:1.6}.pipeline-empty code{padding:1px 3px;color:#a5c28f;background:#26382b;border-radius:2px;font-size:9px}
.pipeline-inspector{flex:0 0 auto;max-height:44%;overflow:auto;border-bottom:0;scrollbar-color:#536e57 transparent}.pipeline-selected-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:12px}.pipeline-selected-heading h3{margin:0;color:#edf4e9;font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pipeline-selected-heading p{margin:3px 0 0;color:#83a08b;font-size:10px}.pipeline-selected-heading output{color:var(--debug-amber);font-size:10px;white-space:nowrap}.pipeline-selected-description{margin:9px 0;color:#a7bba9;font-size:11px;line-height:1.55}.pipeline-output-label{margin:10px 0 13px;color:#8ea492;font-size:10px}.pipeline-output-label select{margin-top:5px;padding:7px 8px;border-color:#4b654e;background:#1b2d22;color:#dce9d6;font-size:11px}.pipeline-output-label select:disabled{color:#6e8374}.pipeline-io-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pipeline-sub-label{margin-bottom:5px;color:#718a7b;font-size:9px;letter-spacing:.12em;text-transform:uppercase}.pipeline-resource-list{display:flex;flex-direction:column;gap:5px;min-width:0}.pipeline-resource{padding:7px 8px;border:1px solid #304736;border-radius:4px;background:#15251b}.pipeline-resource strong{display:block;overflow:hidden;color:#c6d8c5;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.pipeline-resource span{display:block;margin-top:3px;overflow:hidden;color:#799184;font-size:9px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.pipeline-resource.viewer-only{border-color:#526d5c;background:#182a20}.pipeline-resource.viewer-only strong{color:#b5d2bf}.pipeline-muted{margin:0;color:#63796b;font-size:10px}.pipeline-state-details{margin-top:12px;padding-top:10px;border-top:1px solid #293d30}.pipeline-state-details summary{color:#8ba58f;font-size:10px}.pipeline-state-details pre{max-height:150px;margin:8px 0 0;padding:8px;overflow:auto;border:1px solid #2b4031;background:#102018;color:#9fb49f;font-size:9px;line-height:1.45}.pipeline-debug-panel button:focus-visible,.pipeline-debug-panel input:focus-visible,.pipeline-debug-panel select:focus-visible,.debug-toggle:focus-visible{outline:2px solid #d0e49e;outline-offset:2px}
body.capture header .debug-toggle,body.capture #pipeline-debug-panel{display:none}
@media(max-width:820px){header .debug-toggle{margin-left:auto}.pipeline-debug-panel{top:12px;right:12px;width:calc(100% - 24px);height:calc(100% - 24px)}}
@media(max-width:600px){.debug-toggle{padding:7px 9px}.debug-toggle kbd{display:none}.pipeline-debug-head{padding:17px 16px 13px}.pipeline-debug-toolbar,.pipeline-timeline,.pipeline-frame-status,.pipeline-stage-section,.pipeline-inspector{padding-left:16px;padding-right:16px}.pipeline-control-group{gap:9px}.pipeline-check{font-size:10px}.pipeline-io-grid{grid-template-columns:1fr}.pipeline-inspector{max-height:52%}}

/* Dock the inspector: its controls must never cover the inspected texture. */
.pipeline-debug-open main{grid-template-columns:minmax(0,1fr) 480px}
.pipeline-debug-open main>aside{display:none}
.pipeline-debug-open .stage{grid-column:1;grid-row:1;min-width:0}
.pipeline-debug-open .pipeline-debug-panel{position:relative;grid-column:2;grid-row:1;top:auto;right:auto;width:100%;height:100%;border-radius:0;border-top:0;border-right:0;box-shadow:none;backdrop-filter:none}
@media(max-width:1000px) and (min-width:821px){.pipeline-debug-open main{grid-template-columns:minmax(0,1fr) 400px}}
@media(max-width:820px){.pipeline-debug-open main{display:flex;flex-direction:column;height:auto}.pipeline-debug-open .stage{height:60vh;min-height:320px;flex:none}.pipeline-debug-open .pipeline-debug-panel{height:850px;max-height:95vh;flex:none;overflow:hidden;border-left:0;border-right:0}.pipeline-debug-panel[aria-hidden="true"]{display:none}}
@media(max-width:600px){header{gap:10px}header h1{font-size:17px}header h1 span{font-size:12px;margin-left:6px}.mark{font-size:28px}.pipeline-debug-head h2{font-size:17px}}

/* Character atlas surface. The inspector remains intentionally separate from
   the pale showcase so the real canvas never has to share its draw area with
   gallery controls. */
:root{
  --paper:#f6f0e6;
  --paper-soft:#fbf8f1;
  --paper-deep:#e9dfcf;
  --paper-line:#d5c6b1;
  --ink:#302a24;
  --ink-soft:#73695e;
  --ink-faint:#9b8f80;
  --gold:#b58a46;
  --gold-dark:#87652d;
  --olive:#77836c;
  --stage-ink:#493d30;
}

html{background:var(--paper)}
body.gallery-shell{
  min-width:320px;
  background:var(--paper);
  color:var(--ink);
  font-family:"Avenir Next","Segoe UI","Microsoft YaHei",sans-serif;
  font-size:14px;
}
body.gallery-shell button,
body.gallery-shell select,
body.gallery-shell input{font:inherit}
body.gallery-shell .site-header{
  position:relative;
  z-index:2;
  height:88px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:0 30px;
  color:var(--ink);
  background:rgba(251,248,241,.96);
  border-bottom:1px solid var(--paper-line);
  box-shadow:0 8px 28px rgba(80,61,35,.05);
}
body.gallery-shell .brand-lockup{display:flex;align-items:center;gap:14px;min-width:0}
body.gallery-shell .mark{
  display:grid;
  place-items:center;
  width:39px;
  height:39px;
  color:var(--gold);
  font-size:31px;
  line-height:1;
  transform:rotate(45deg);
}
body.gallery-shell .mark::first-letter{display:block}
body.gallery-shell .brand-copy{min-width:0}
body.gallery-shell .brand-copy small,
body.gallery-shell .section-kicker,
body.gallery-shell .drawer-kicker{
  display:block;
  color:var(--gold-dark);
  font-size:10px;
  letter-spacing:.18em;
  line-height:1.2;
}
body.gallery-shell h1,
body.gallery-shell h2,
body.gallery-shell h3{
  color:var(--ink);
  font-family:"Noto Serif SC","Songti SC","STSong","Microsoft YaHei",serif;
}
body.gallery-shell h1{margin:4px 0 0;font-size:22px;font-weight:500;letter-spacing:.02em;white-space:nowrap}
body.gallery-shell h1 span{margin-left:10px;color:var(--gold-dark);font-family:"Avenir Next","Segoe UI",sans-serif;font-size:13px;letter-spacing:.08em}
body.gallery-shell .header-context{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  color:var(--ink-faint);
  font-size:9px;
  letter-spacing:.15em;
  white-space:nowrap;
}
body.gallery-shell .header-context span{width:5px;height:5px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 3px rgba(181,138,70,.15)}
body.gallery-shell .state{
  flex:0 0 auto;
  margin-left:0;
  padding:7px 12px;
  color:var(--gold-dark);
  font-size:11px;
  border:1px solid #ccb889;
  border-radius:999px;
  background:#fffaf0;
}
body.gallery-shell > main{
  position:relative;
  height:calc(100vh - 88px);
  min-height:520px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 292px;
  background:var(--paper);
}
body.gallery-shell .stage{
  position:relative;
  min-width:0;
  min-height:480px;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  overflow:hidden;
  background:
    radial-gradient(circle at 72% 22%,rgba(255,255,255,.8),transparent 31%),
    linear-gradient(135deg,#e5dccd 0%,#f2ece2 43%,#ded3c2 100%);
}
body.gallery-shell .stage::before{
  position:absolute;
  inset:0;
  z-index:0;
  content:"";
  pointer-events:none;
  opacity:.32;
  background-image:linear-gradient(120deg,transparent 0 49.8%,rgba(141,112,70,.13) 50%,transparent 50.2%);
  background-size:390px 390px;
}
body.gallery-shell .stage-view{
  position:relative;
  z-index:1;
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(190px,.31fr) minmax(0,1fr);
}
body.gallery-shell .showcase-info{
  align-self:center;
  min-width:0;
  padding:34px 20px 30px 34px;
  color:var(--stage-ink);
}
body.gallery-shell .showcase-info .section-kicker{display:flex;align-items:center;gap:9px}
body.gallery-shell .showcase-info .section-kicker span{
  color:var(--gold-dark);
  font-family:"Avenir Next","Segoe UI",sans-serif;
  font-size:10px;
  letter-spacing:.08em;
}
body.gallery-shell .showcase-info h2{
  margin:12px 0 1px;
  color:#332a22;
  font-size:clamp(25px,2.6vw,38px);
  font-weight:500;
  line-height:1.15;
}
body.gallery-shell .showcase-variant{margin:0;color:var(--gold-dark);font-size:12px;letter-spacing:.05em}
body.gallery-shell .showcase-rule{display:flex;align-items:center;gap:5px;margin:17px 0 16px;color:var(--gold)}
body.gallery-shell .showcase-rule::before{width:66px;height:1px;background:currentColor;content:""}
body.gallery-shell .showcase-rule i{display:block;width:4px;height:4px;border:1px solid currentColor;transform:rotate(45deg)}
body.gallery-shell .showcase-description{max-width:220px;margin:0;color:#675b4e;font-size:12px;line-height:1.9}
body.gallery-shell .showcase-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:28px 0 0;padding:14px 0;border-top:1px solid rgba(148,116,68,.3);border-bottom:1px solid rgba(148,116,68,.3)}
body.gallery-shell .showcase-facts div{min-width:0}
body.gallery-shell .showcase-facts dt{color:var(--ink-faint);font-size:9px;letter-spacing:.14em}
body.gallery-shell .showcase-facts dd{margin:4px 0 0;color:#45382c;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.gallery-shell .showcase-hint{max-width:215px;margin:20px 0 0;color:#8c7e6d;font-size:10px;line-height:1.7}
body.gallery-shell .canvas-frame{
  position:relative;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 55% 41%,rgba(255,252,244,.86) 0%,rgba(243,236,224,.55) 40%,rgba(210,198,179,.34) 100%),
    linear-gradient(180deg,rgba(246,241,232,.2),rgba(201,191,174,.26));
  border-left:1px solid rgba(156,126,79,.2);
}
body.gallery-shell .canvas-frame::after{
  position:absolute;
  right:8%;
  bottom:13%;
  left:8%;
  height:1px;
  content:"";
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(157,124,74,.22),transparent);
}
body.gallery-shell canvas{position:relative;z-index:1;width:100%;height:100%;display:block;touch-action:none}
body.gallery-shell .stage-label{
  z-index:2;
  left:22px;
  top:19px;
  color:#685948;
}
body.gallery-shell .stage-label span{color:#514536;font-size:12px;letter-spacing:.03em}
body.gallery-shell .stage-label small{color:#9c8c78;letter-spacing:.08em}
body.gallery-shell .bottom{
  z-index:2;
  bottom:20px;
  left:50%;
  display:flex;
  gap:2px;
  padding:5px;
  background:rgba(55,44,32,.86);
  border:1px solid rgba(255,248,231,.42);
  border-radius:999px;
  box-shadow:0 8px 24px rgba(72,53,30,.16);
}
body.gallery-shell .bottom button,
body.gallery-shell aside button{
  color:#fffaf0;
  background:transparent;
  border:0;
  border-radius:999px;
}
body.gallery-shell .bottom button:hover,
body.gallery-shell aside button:hover{background:rgba(196,158,88,.3)}
body.gallery-shell .bottom button:focus-visible,
body.gallery-shell aside button:focus-visible,
body.gallery-shell .roster-panel button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
body.gallery-shell .roster-panel{
  position:relative;
  z-index:1;
  min-width:0;
  padding:13px 24px 16px;
  color:var(--ink);
  background:rgba(251,248,241,.95);
  border-top:1px solid var(--paper-line);
  box-shadow:0 -12px 28px rgba(88,65,36,.06);
}
body.gallery-shell .roster-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:9px}
body.gallery-shell .roster-head h2{margin:3px 0 0;font-size:16px;font-weight:500}
body.gallery-shell .roster-status{max-width:42%;margin:0;color:var(--ink-faint);font-size:10px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.gallery-shell .roster-band,.variant-band{min-width:0}
body.gallery-shell .roster-band-label,
body.gallery-shell .variant-band-label{display:flex;align-items:center;gap:9px;margin-bottom:6px;color:#5b4a38;font-size:10px;letter-spacing:.08em}
body.gallery-shell .roster-band-label small,
body.gallery-shell .variant-band-label small{color:var(--ink-faint);font-size:9px;letter-spacing:.1em}
body.gallery-shell .roster-list,
body.gallery-shell .variant-list{display:flex;min-width:0;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-color:#c5ad82 transparent}
body.gallery-shell .roster-list::-webkit-scrollbar,
body.gallery-shell .variant-list::-webkit-scrollbar{height:5px}
body.gallery-shell .roster-list::-webkit-scrollbar-thumb,
body.gallery-shell .variant-list::-webkit-scrollbar-thumb{background:#ccb88f;border-radius:99px}
body.gallery-shell .roster-card{
  flex:0 0 74px;
  min-height:73px;
  padding:4px;
  color:#574838;
  background:#f8f2e7;
  border:1px solid #d9cbb7;
  border-radius:8px;
  text-align:left;
}
body.gallery-shell .roster-card:hover{border-color:#bc9654;background:#fffaf2}
body.gallery-shell .roster-card.is-active{border-color:var(--gold);box-shadow:0 0 0 2px rgba(181,138,70,.2);background:#fffaf0}
body.gallery-shell .roster-card-portrait,
body.gallery-shell .variant-portrait{
  display:grid;
  place-items:center;
  overflow:hidden;
  color:#8c6b35;
  background:linear-gradient(135deg,#e9dcc7,#fffaf1);
  border-radius:5px;
}
body.gallery-shell .roster-card-portrait{height:46px}
body.gallery-shell .roster-card-portrait img{width:100%;height:100%;object-fit:cover}
body.gallery-shell .roster-card-name{display:block;margin:4px 2px 0;overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
body.gallery-shell .roster-card-meta{display:block;margin:1px 2px 0;color:var(--ink-faint);font-size:8px;letter-spacing:.04em}
body.gallery-shell .variant-band{margin-top:8px}
body.gallery-shell .variant-list{padding-top:1px}
body.gallery-shell .variant-pill{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:33px;
  padding:4px 10px 4px 5px;
  color:#5a4937;
  background:#f8f2e7;
  border:1px solid #d8c9b2;
  border-radius:999px;
  text-align:left;
}
body.gallery-shell .variant-pill:hover{border-color:#bd9758;background:#fffaf2}
body.gallery-shell .variant-pill.is-active{color:#3d3024;border-color:var(--gold);background:#fff9eb;box-shadow:0 0 0 2px rgba(181,138,70,.15)}
body.gallery-shell .variant-pill .variant-portrait{flex:0 0 24px;width:24px;height:24px;border-radius:50%}
body.gallery-shell .variant-pill .variant-portrait img{width:100%;height:100%;object-fit:cover}
body.gallery-shell .variant-copy{display:flex;flex-direction:column;min-width:0}
body.gallery-shell .variant-name{max-width:150px;overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
body.gallery-shell .variant-kind{color:var(--ink-faint);font-size:8px;letter-spacing:.07em}
body.gallery-shell aside{
  min-width:0;
  padding:20px 18px 28px;
  overflow:auto;
  color:var(--ink);
  background:#f0e8dc;
  border-left:1px solid var(--paper-line);
  scrollbar-color:#c5ad82 transparent;
}
body.gallery-shell aside .inspector-section{padding:0 0 18px;margin:0 0 18px;border-bottom:1px solid #d9cbb7}
body.gallery-shell aside .inspector-section > small{color:var(--gold-dark)}
body.gallery-shell aside h2{margin:5px 0 14px;color:#3f3429;font-size:16px;font-weight:500}
body.gallery-shell aside p{color:#766a5d;font-size:11px;line-height:1.7}
body.gallery-shell aside label{display:block;margin:11px 0;color:#66594a;font-size:11px}
body.gallery-shell aside select{
  display:block;
  width:100%;
  margin-top:6px;
  padding:8px;
  color:#4d4032;
  background:#faf6ed;
  border:1px solid #cdbd9f;
  border-radius:3px;
}
body.gallery-shell aside input[type=range]{width:100%;margin-top:10px;accent-color:var(--gold)}
body.gallery-shell aside .check{display:flex;align-items:center;gap:7px}
body.gallery-shell aside .check input{accent-color:var(--gold)}
body.gallery-shell #meshes label{display:flex;align-items:center;gap:7px;margin:8px 0;color:#66594a;font-size:10px}
body.gallery-shell #meshes span{margin-left:auto;color:#9a8974;font-variant-numeric:tabular-nums}
body.gallery-shell #stats{margin:10px 0 0;color:#887766}
body.gallery-shell .reference{width:100%;border:1px solid #d2c0a2;border-radius:5px}
body.gallery-shell .score{display:flex;align-items:baseline;gap:10px}
body.gallery-shell .score b{color:var(--gold-dark);font-size:28px;font-weight:500}
body.gallery-shell .score span{color:#8c7b66;font-size:10px}
body.gallery-shell .wide{width:100%;margin-top:8px;padding:9px 12px;color:#5e4930;border:1px solid #c7aa73;border-radius:4px;background:#faf1de}
body.gallery-shell .wide:hover{background:#f6e4bf}
body.gallery-shell .drawer-title{font-family:"Noto Serif SC","Songti SC","Microsoft YaHei",serif;font-size:16px}
body.gallery-shell .drawer-toggle{color:var(--ink-faint);font-size:9px}
body.gallery-shell .diagnostic-drawer{padding-top:0}
body.gallery-shell .diagnostic-drawer summary{color:#7e6e5c;font-size:11px;cursor:pointer}
body.gallery-shell .diagnostic-drawer pre{color:#6d665d;font-size:10px}
body.gallery-shell [data-original-only][hidden]{display:none!important}
body.gallery-shell [hidden]{display:none!important}

/* Keep the inspector dock outside the canvas at its established width. */
body.gallery-shell.pipeline-debug-open main{grid-template-columns:minmax(0,1fr) 480px}
body.gallery-shell.pipeline-debug-open main>aside{display:none}
body.gallery-shell.pipeline-debug-open .stage{grid-column:1;grid-row:1;min-width:0}
body.gallery-shell.pipeline-debug-open .pipeline-debug-panel{position:relative;grid-column:2;grid-row:1;top:auto;right:auto;width:100%;height:100%;border-radius:0;border-top:0;border-right:0;box-shadow:none;backdrop-filter:none}

@media(max-width:1100px) and (min-width:821px){
  body.gallery-shell .stage-view{grid-template-columns:minmax(168px,.3fr) minmax(0,1fr)}
  body.gallery-shell .showcase-info{padding-left:24px;padding-right:14px}
  body.gallery-shell .showcase-info h2{font-size:28px}
  body.gallery-shell.pipeline-debug-open main{grid-template-columns:minmax(0,1fr) 400px}
}
@media(max-width:820px){
  body.gallery-shell > main{height:auto;min-height:0;grid-template-columns:1fr}
  body.gallery-shell .stage{height:auto;min-height:0}
  body.gallery-shell .stage-view{grid-template-columns:minmax(165px,.34fr) minmax(0,1fr);min-height:540px}
  body.gallery-shell aside{border-left:0;border-top:1px solid var(--paper-line)}
  body.gallery-shell .header-context{display:none}
  body.gallery-shell.pipeline-debug-open main{display:flex;flex-direction:column;height:auto}
  body.gallery-shell.pipeline-debug-open .stage{height:60vh;min-height:320px;flex:none}
  body.gallery-shell.pipeline-debug-open .pipeline-debug-panel{height:850px;max-height:95vh;flex:none;overflow:hidden;border-left:0;border-right:0}
}
@media(max-width:600px){
  body.gallery-shell .site-header{height:74px;padding:0 16px;gap:10px}
  body.gallery-shell > main{height:auto}
  body.gallery-shell .mark{width:29px;height:29px;font-size:24px}
  body.gallery-shell h1{font-size:17px}
  body.gallery-shell h1 span{margin-left:6px;font-size:11px}
  body.gallery-shell .state{display:none}
  body.gallery-shell .stage-view{grid-template-columns:1fr;grid-template-rows:auto minmax(390px,60vh);min-height:0}
  body.gallery-shell .showcase-info{padding:20px 18px 16px}
  body.gallery-shell .showcase-info h2{margin-top:8px;font-size:27px}
  body.gallery-shell .showcase-description{max-width:310px}
  body.gallery-shell .showcase-facts{display:none}
  body.gallery-shell .showcase-hint{display:none}
  body.gallery-shell .canvas-frame{border-top:1px solid rgba(156,126,79,.2);border-left:0}
  body.gallery-shell .stage-label{left:17px;top:15px}
  body.gallery-shell .bottom{width:calc(100% - 22px);bottom:12px;flex-wrap:wrap;justify-content:center}
  body.gallery-shell .bottom button{padding:7px 10px;font-size:12px}
  body.gallery-shell .roster-panel{padding:12px 14px 15px}
  body.gallery-shell .roster-head{align-items:start;flex-direction:column;gap:3px}
  body.gallery-shell .roster-status{max-width:100%;text-align:left}
  body.gallery-shell .roster-card{flex-basis:70px}
  body.gallery-shell .drawer-toggle{display:none}
  body.gallery-shell.pipeline-debug-open .pipeline-debug-panel{height:850px;max-height:95vh}
}

/* The capture route stays a pure 1280 × 720 canvas surface. */
body.capture header,
body.capture aside,
body.capture .stage-label,
body.capture .bottom,
body.capture .showcase-info,
body.capture .roster-panel{display:none}
body.capture main{display:block;width:1280px;height:720px;min-height:0}
body.capture .stage{display:block;width:1280px;height:720px;min-height:0}
body.capture .stage-view,
body.capture .canvas-frame{display:block;width:100%;height:100%}

@media(max-width:1000px) and (min-width:821px){
  body.gallery-shell.pipeline-debug-open main{grid-template-columns:minmax(0,1fr) 400px}
}

/* Reassert the inspector's dark reading surface after the showcase typography
   rules above; its 480px dock is a separate tool, not part of the gallery. */
body.gallery-shell .pipeline-debug-panel h2{color:#edf4e9;font-family:"Segoe UI","Microsoft YaHei",sans-serif}
body.gallery-shell .pipeline-debug-panel h3{color:#edf4e9;font-family:"Segoe UI","Microsoft YaHei",sans-serif}

/* The settings rail is opt-in. Keeping it out of the grid while closed lets
   the canvas own the full showcase width and gives the renderer a real resize
   boundary whenever the rail is opened. */
body.gallery-shell .settings-toggle{
  display:inline-flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  padding:8px 12px;
  color:#5f4930;
  background:#fffaf0;
  border:1px solid #ceb98d;
  border-radius:5px;
  font-size:12px;
  letter-spacing:.04em;
}
body.gallery-shell .settings-toggle:hover,
body.gallery-shell .settings-toggle[aria-expanded="true"]{color:#3f3020;background:#f6e7c6;border-color:#ae8643}
body.gallery-shell .settings-toggle-mark{color:var(--gold-dark);font-size:16px;line-height:1}
body.gallery-shell > main.showcase-layout{grid-template-columns:minmax(0,1fr)}
body.gallery-shell > main.showcase-layout:not(.settings-open) > #settings-rail{display:none}
body.gallery-shell > main.showcase-layout.settings-open{grid-template-columns:minmax(0,1fr) 292px}
body.gallery-shell > main.showcase-layout.settings-open > #settings-rail{display:block}
body.gallery-shell .settings-drawer{height:100%;margin:0}
body.gallery-shell .settings-drawer > summary{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:9px;
  list-style:none;
  padding-bottom:17px;
  color:#3f3429;
  border-bottom:1px solid #d9cbb7;
  cursor:pointer;
}
body.gallery-shell .settings-drawer > summary::-webkit-details-marker{display:none}
body.gallery-shell .settings-drawer > summary::after{
  grid-column:3;
  content:"＋";
  color:var(--gold-dark);
  font-size:16px;
  line-height:1;
  transform:rotate(0);
  transition:transform .16s ease;
}
body.gallery-shell .settings-drawer[open] > summary::after{transform:rotate(45deg)}
body.gallery-shell .settings-body{padding-top:17px}
body.gallery-shell .settings-body .inspector-section:first-child{padding-top:0}
body.gallery-shell .settings-body .diagnostic-drawer{padding-bottom:18px}
body.gallery-shell .settings-toggle:focus-visible,
body.gallery-shell .settings-drawer > summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* The debugger intentionally supersedes the settings rail and keeps its
   existing two-column geometry. */
body.gallery-shell.pipeline-debug-open > main.showcase-layout,
body.gallery-shell.pipeline-debug-open > main.showcase-layout.settings-open{grid-template-columns:minmax(0,1fr) 480px}
body.gallery-shell.pipeline-debug-open > main.showcase-layout > #settings-rail{display:none}

@media(max-width:1100px) and (min-width:821px){
  body.gallery-shell.pipeline-debug-open > main.showcase-layout,
  body.gallery-shell.pipeline-debug-open > main.showcase-layout.settings-open{grid-template-columns:minmax(0,1fr) 400px}
}
@media(max-width:820px){
  body.gallery-shell > main.showcase-layout,
  body.gallery-shell > main.showcase-layout.settings-open{grid-template-columns:1fr}
  body.gallery-shell > main.showcase-layout:not(.settings-open) > #settings-rail{display:none}
  body.gallery-shell > main.showcase-layout.settings-open > #settings-rail{display:block}
  body.gallery-shell.pipeline-debug-open > main.showcase-layout,
  body.gallery-shell.pipeline-debug-open > main.showcase-layout.settings-open{display:flex;flex-direction:column;grid-template-columns:none}
  body.gallery-shell.pipeline-debug-open > main.showcase-layout > #settings-rail{display:none}
}
@media(max-width:600px){
  body.gallery-shell .settings-toggle{padding:7px 9px;font-size:11px}
  body.gallery-shell .settings-toggle-mark{font-size:14px}
}

/* Output resolution controls share one state event across the settings rail
   and the always-available debug toolbar. */
body.gallery-shell aside .resolution-control{margin:14px 0 12px}
body.gallery-shell aside .resolution-control select{margin-top:6px}
body.gallery-shell .resolution-note,
body.gallery-shell .asset-quality{
  display:block;
  margin:5px 0 0;
  color:#9a8974;
  font-size:9px;
  letter-spacing:.03em;
  line-height:1.5;
}
body.gallery-shell .asset-quality{margin-top:6px;color:#887766}
body.gallery-shell .pipeline-debug-toolbar{flex-wrap:wrap}
body.gallery-shell .pipeline-control-group{flex:1 1 150px}
body.gallery-shell .pipeline-resolution-control{
  display:grid;
  grid-template-columns:auto minmax(0,88px);
  align-items:center;
  column-gap:6px;
  row-gap:2px;
  flex:0 1 132px;
  min-width:0;
  margin:0;
  color:#b8cdb4;
  font-size:10px;
}
body.gallery-shell .pipeline-resolution-control select{
  width:100%;
  min-width:0;
  margin:0;
  padding:5px 6px;
  color:#dce9d7;
  background:#1b2c21;
  border:1px solid #4d654f;
  border-radius:4px;
  font-size:10px;
}
body.gallery-shell .pipeline-resolution-control small{
  grid-column:2;
  overflow:hidden;
  color:#789082;
  font-size:8px;
  letter-spacing:.02em;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.gallery-shell .pipeline-resolution-control select:focus-visible{outline:2px solid #d0e49e;outline-offset:2px}
@media(max-width:600px){
  body.gallery-shell .pipeline-resolution-control{flex-basis:132px}
}
@media (max-width: 640px) {
  #header-character-id { display: none; }
}
body.gallery-shell.pipeline-debug-open .stage-label {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(13, 25, 18, .8);
  max-width: calc(100% - 32px);
}
body.gallery-shell.pipeline-debug-open .stage-label span { color: #e2eadf; }
body.gallery-shell.pipeline-debug-open .stage-label small { color: #a6b6a4; }
.pipeline-io-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pipeline-io-grid > div, .pipeline-selected-heading > div { min-width: 0; }
.pipeline-selected-heading > div { flex: 1; }

/* Dark gallery surface: the canvas remains untouched so character colors come
   solely from the real renderer while the surrounding chrome gains depth. */
:root{
  --paper:#151a20;
  --paper-soft:#1d242b;
  --paper-deep:#252d35;
  --paper-line:#3b454e;
  --ink:#eee6d8;
  --ink-soft:#b5aa9a;
  --ink-faint:#7f8991;
  --gold:#c4a467;
  --gold-dark:#d6b878;
  --olive:#89968e;
  --stage-ink:#e9dfcf;
}
html{background:#101419}
body.gallery-shell{background:#151a20;color:var(--ink)}
body.gallery-shell .site-header{
  color:var(--ink);
  background:rgba(20,25,31,.97);
  border-bottom-color:#39434c;
  box-shadow:0 8px 30px rgba(3,7,11,.28);
}
body.gallery-shell .mark{color:var(--gold)}
body.gallery-shell .brand-copy small,
body.gallery-shell .section-kicker,
body.gallery-shell .drawer-kicker{color:var(--gold)}
body.gallery-shell h1,
body.gallery-shell h2,
body.gallery-shell h3{color:var(--ink)}
body.gallery-shell h1 span{color:var(--gold-dark)}
body.gallery-shell .header-context{color:#7d8992}
body.gallery-shell .header-context span{background:var(--gold);box-shadow:0 0 0 3px rgba(196,164,103,.16)}
body.gallery-shell .state{
  color:var(--gold-dark);
  background:#20272e;
  border-color:#675638;
}
body.gallery-shell > main{background:#151a20}
body.gallery-shell .stage{
  background:
    radial-gradient(circle at 68% 18%,rgba(112,130,138,.24),transparent 30%),
    radial-gradient(ellipse at 58% 93%,rgba(38,51,59,.84),transparent 60%),
    linear-gradient(135deg,#222a32 0%,#151b22 56%,#202830 100%);
}
body.gallery-shell .stage::before{
  opacity:.42;
  background-image:linear-gradient(120deg,transparent 0 49.8%,rgba(196,164,103,.08) 50%,transparent 50.2%);
}
body.gallery-shell .showcase-info{color:var(--stage-ink)}
body.gallery-shell .showcase-info h2{color:#f0e6d6}
body.gallery-shell .showcase-info .section-kicker span{color:var(--gold-dark)}
body.gallery-shell .showcase-variant{color:var(--gold-dark)}
body.gallery-shell .showcase-rule{color:var(--gold)}
body.gallery-shell .showcase-description{color:#b8aea0}
body.gallery-shell .showcase-facts{border-top-color:rgba(196,164,103,.3);border-bottom-color:rgba(196,164,103,.3)}
body.gallery-shell .showcase-facts dt{color:#879198}
body.gallery-shell .showcase-facts dd{color:#ddd1bf}
body.gallery-shell .showcase-hint{color:#9da0a0}
body.gallery-shell .canvas-frame{
  background:
    radial-gradient(ellipse at 55% 34%,rgba(90,111,121,.3) 0%,rgba(44,56,65,.18) 39%,transparent 70%),
    linear-gradient(180deg,#222b34 0%,#181f27 67%,#11171d 100%);
  border-left-color:#3d4851;
}
body.gallery-shell .canvas-frame::after{background:linear-gradient(90deg,transparent,rgba(196,164,103,.28),transparent)}
body.gallery-shell .stage-label{color:#d8cdbd}
body.gallery-shell .stage-label span{color:#e6dac8}
body.gallery-shell .stage-label small{color:#9ca7aa}
body.gallery-shell .bottom{
  background:rgba(20,25,29,.92);
  border-color:rgba(196,164,103,.5);
  box-shadow:0 10px 28px rgba(3,7,11,.42);
}
body.gallery-shell .bottom button,
body.gallery-shell aside button{color:#eee5d6}
body.gallery-shell .bottom button:hover,
body.gallery-shell aside button:hover{background:rgba(196,164,103,.2)}
body.gallery-shell .roster-panel{
  color:var(--ink);
  background:rgba(22,28,34,.97);
  border-top-color:#3b454e;
  box-shadow:0 -12px 30px rgba(3,7,11,.28);
}
body.gallery-shell .roster-head h2{color:#eee5d6}
body.gallery-shell .roster-status{color:#8e999e}
body.gallery-shell .roster-band-label,
body.gallery-shell .variant-band-label{color:#d5c4a4}
body.gallery-shell .roster-band-label small,
body.gallery-shell .variant-band-label small{color:#89939a}
body.gallery-shell .roster-list,
body.gallery-shell .variant-list{scrollbar-color:#6c5b3d transparent}
body.gallery-shell .roster-list::-webkit-scrollbar-thumb,
body.gallery-shell .variant-list::-webkit-scrollbar-thumb{background:#6c5b3d}
body.gallery-shell .roster-card{
  color:#e7ddcf;
  background:#252e36;
  border-color:#414d57;
}
body.gallery-shell .roster-card:hover{border-color:#b18f54;background:#2c3740}
body.gallery-shell .roster-card.is-active{border-color:var(--gold);background:#2a343d;box-shadow:0 0 0 2px rgba(196,164,103,.2)}
body.gallery-shell .roster-card-portrait,
body.gallery-shell .variant-portrait{color:#d0b574;background:linear-gradient(135deg,#303b44,#1b2228)}
body.gallery-shell .roster-card-meta{color:#909ba2}
body.gallery-shell .variant-pill{color:#e3d8c8;background:#242d35;border-color:#414d57}
body.gallery-shell .variant-pill:hover{border-color:#b18f54;background:#2c3740}
body.gallery-shell .variant-pill.is-active{color:#f0e5d2;border-color:var(--gold);background:#2b353e;box-shadow:0 0 0 2px rgba(196,164,103,.16)}
body.gallery-shell .variant-kind{color:#909ba2}
body.gallery-shell aside{
  color:var(--ink);
  background:#1b2229;
  border-left-color:#3b454e;
  scrollbar-color:#6c5b3d transparent;
}
body.gallery-shell aside .inspector-section{border-bottom-color:#354049}
body.gallery-shell aside .inspector-section > small{color:var(--gold)}
body.gallery-shell aside h2{color:#eee5d6}
body.gallery-shell aside p{color:#a69e93}
body.gallery-shell aside label{color:#c5b9a8}
body.gallery-shell aside select{
  color:#e7ddcf;
  background:#252e36;
  border-color:#4a5660;
}
body.gallery-shell aside input[type=range]{accent-color:var(--gold)}
body.gallery-shell aside .check input{accent-color:var(--gold)}
body.gallery-shell #meshes label{color:#c5b9a8}
body.gallery-shell #meshes span{color:#89959d}
body.gallery-shell #stats{color:#9c9890}
body.gallery-shell .asset-quality{color:#a7a096}
body.gallery-shell .reference{border-color:#4a5660}
body.gallery-shell .score b{color:var(--gold-dark)}
body.gallery-shell .score span{color:#9a9489}
body.gallery-shell .wide{color:#e7d5b3;border-color:#76603b;background:#2a302f}
body.gallery-shell .wide:hover{background:#363c38}
body.gallery-shell .settings-toggle{
  color:#e6d6b9;
  background:#222a31;
  border-color:#655335;
}
body.gallery-shell .settings-toggle:hover,
body.gallery-shell .settings-toggle[aria-expanded="true"]{color:#f3e5ca;background:#303a40;border-color:#b18f54}
body.gallery-shell .settings-drawer > summary{color:#eee5d6;border-bottom-color:#354049}
body.gallery-shell .settings-drawer > summary::after{color:var(--gold)}
body.gallery-shell .drawer-toggle{color:#89949b}
body.gallery-shell .diagnostic-drawer summary{color:#a69d91}
body.gallery-shell .diagnostic-drawer pre{color:#aaa39a}
body.gallery-shell .resolution-note{color:#9a9a94}
body.gallery-shell dialog{background:#1d252c;color:#eee5d6;border-color:#59634f}
body.gallery-shell dialog::backdrop{background:rgba(3,7,11,.86)}

/* Compact controls and truthful selected-asset loading state. */
body.gallery-shell .repo-link{
  flex:0 0 auto;
  color:#b8a174;
  font-size:10px;
  letter-spacing:.06em;
  text-decoration:none;
  white-space:nowrap;
}
body.gallery-shell .repo-link:hover{color:#f0dfb6;text-decoration:underline;text-underline-offset:3px}
body.gallery-shell .controls-help{
  max-width:min(430px,calc(100vw - 44px));
  color:#8e9b9f;
  font-size:9px;
  letter-spacing:.03em;
  line-height:1.45;
  white-space:normal;
}
body.gallery-shell .stage-label{max-width:calc(100% - 44px)}
body.gallery-shell .resource-progress{
  max-width:236px;
  margin-top:18px;
  padding:10px 11px 9px;
  color:#c8c0b3;
  background:rgba(16,22,28,.62);
  border:1px solid rgba(196,164,103,.28);
  border-radius:6px;
  box-shadow:0 10px 22px rgba(2,7,11,.18);
}
body.gallery-shell .resource-progress-head,
body.gallery-shell .resource-progress-status,
body.gallery-shell .resource-progress-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}
body.gallery-shell .resource-progress-kicker{
  color:#bda36c;
  font-size:8px;
  letter-spacing:.13em;
}
body.gallery-shell .resource-progress-head strong{
  min-width:0;
  overflow:hidden;
  color:#eee5d6;
  font-size:10px;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.gallery-shell .resource-progress-status{margin-top:7px;color:#d7c9b2;font-size:10px}
body.gallery-shell .resource-progress-status span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.gallery-shell .resource-progress-status span:last-child{color:#bda36c;font-variant-numeric:tabular-nums}
body.gallery-shell .resource-progress-track{
  height:4px;
  margin-top:7px;
  overflow:hidden;
  background:#2b353d;
  border-radius:99px;
}
body.gallery-shell .resource-progress-bar{
  width:0;
  height:100%;
  background:linear-gradient(90deg,#8b7550,#d7b875);
  border-radius:inherit;
  transition:width .2s ease;
}
body.gallery-shell .resource-progress-bar.is-indeterminate{
  width:42%;
  animation:resource-progress-sweep 1.25s ease-in-out infinite;
}
body.gallery-shell .resource-progress-foot{margin-top:6px;align-items:flex-start}
body.gallery-shell .resource-progress-detail{
  flex:1;
  min-width:0;
  overflow:hidden;
  color:#929da2;
  font-size:9px;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.gallery-shell .resource-progress-retry{
  flex:0 0 auto;
  padding:2px 6px;
  color:#f0d8a4;
  background:transparent;
  border:1px solid #806b43;
  border-radius:3px;
  font-size:9px;
}
body.gallery-shell .resource-progress-retry:hover{background:rgba(196,164,103,.2)}
body.gallery-shell .resource-progress.is-error{border-color:#9a5e56}
body.gallery-shell .resource-progress.is-error .resource-progress-status{color:#efb0a4}
body.gallery-shell .resource-progress.is-ready .resource-progress-status{color:#c8d89c}
@keyframes resource-progress-sweep{0%{transform:translateX(-120%)}100%{transform:translateX(320%)}}

body.gallery-shell .post-mode-control,
body.gallery-shell .pipeline-post-mode-control{position:relative}
body.gallery-shell .post-mode-note,
body.gallery-shell .pipeline-post-mode-control small{
  display:block;
  margin-top:5px;
  overflow:hidden;
  color:#9a9a94;
  font-size:9px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.gallery-shell .post-mode-control select{margin-top:6px}
body.gallery-shell .pipeline-post-mode-control{
  display:grid;
  grid-template-columns:auto minmax(0,92px);
  align-items:center;
  column-gap:6px;
  row-gap:2px;
  flex:0 1 140px;
  min-width:0;
  margin:0;
  color:#b8cdb4;
  font-size:10px;
}
body.gallery-shell .pipeline-post-mode-control select{
  width:100%;
  min-width:0;
  margin:0;
  padding:5px 6px;
  color:#dce9d7;
  background:#1b2c21;
  border:1px solid #4d654f;
  border-radius:4px;
  font-size:10px;
}
body.gallery-shell .pipeline-post-mode-control small{grid-column:2;margin-top:0;color:#789082;font-size:8px}
body.gallery-shell .post-mode-control select[aria-busy="true"],
body.gallery-shell .pipeline-post-mode-control select[aria-busy="true"]{border-color:#a1844f}
body.gallery-shell .pipeline-debug-panel{min-width:0;max-width:100%}

@media(max-width:820px){
  body.gallery-shell .repo-link{display:none}
  body.gallery-shell .resource-progress{max-width:100%;margin-top:14px}
  body.gallery-shell .pipeline-debug-panel{width:100%;max-width:100%}
  body.gallery-shell.pipeline-debug-open .stage{height:auto;min-height:0;overflow:visible}
  body.gallery-shell.pipeline-debug-open .stage-view{min-height:0}
}
@media(max-width:600px){
  body.gallery-shell .stage-label{left:17px;right:17px;max-width:none}
  body.gallery-shell .controls-help{max-width:100%;font-size:8px;letter-spacing:.01em}
  body.gallery-shell .resource-progress{margin-top:12px;padding:9px 10px 8px}
  body.gallery-shell .pipeline-post-mode-control{flex-basis:132px}
}
