/* Neutral charcoal palette, shared by the fitting room and appearance controls. */
:root{--bg:#0d0d0d;--panel:#111;--ink:#ddd;--muted:#969696;--gold:#ddd;--line:#ffffff14;--mint:#aaa;--tera-cyan:#ddd;--tera-line:#555}
.topbar{height:56px;min-height:56px;padding:0 24px;background:#1a1a1a;border-bottom-color:#303030;gap:12px;flex-wrap:nowrap}
.top-actions{width:auto;margin-left:auto;gap:8px;justify-content:flex-end;flex-wrap:nowrap}
.top-actions>button{padding:8px 12px;font-size:12px}
.language-switch{border-color:#383838;border-radius:6px}
.language-switch button{background:#161616;color:#999;padding:8px;font-size:10px}
.language-switch button[aria-pressed=true]{background:#333;color:#eee;box-shadow:none}
.primary,.preset-save-form .primary{background:#dedede;border-color:#dedede;color:#171717}
.primary:hover,.preset-save-form .primary:hover{background:#f2f2f2;border-color:#f2f2f2}
.workspace{height:calc(100dvh - 56px)}
.stage{background:#0d0d0d}.stage:before{display:none}
.stage-top #model-label,.stage-hint,.reset,.panel-footer,.color-heading span,.appearance-id{color:#888}
.camera-controls,.view-actions>button{background:#1a1a1ae6;border-color:#333;box-shadow:none}
.camera-controls button{color:#999}.camera-controls button.active{background:#333;color:#eee}
.view-actions>button[aria-pressed=true]{color:#eee;border-color:#888;background:#2a2a2a}
.view-actions{position:relative;align-items:flex-start}
.rotation-speed{position:absolute;right:0;bottom:calc(100% + 12px);width:210px;padding:14px;background:#1a1a1a;border:1px solid #444;border-radius:9px;box-shadow:0 8px 24px #0008}
.rotation-speed[hidden]{display:none}.rotation-speed label{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:#bbb;margin-bottom:10px}
.rotation-speed output{color:#eee;font-variant-numeric:tabular-nums}
.rotation-speed input{display:block;width:100%;margin:0;height:20px;accent-color:#ddd;cursor:pointer}
.rotation-speed .range-end{display:flex;justify-content:space-between;font-size:9px;color:#888;margin-top:5px}
.editor-panel,.fitting-room{background:#111;color:#ddd;border-color:#303030}
.panel-heading h2{color:#eee}.tabs button{color:#999}
.tabs button.active{border-bottom-color:#aaa;color:#eee;background:#ffffff05}
.settings .section-note,.empty,.count-label{color:#999}
.detail-banner,.lighting-options button,.shape-levels button{background:#1d1d1d;color:#aaa;border-color:#333}
.detail-banner.active,.lighting-options button.selected,.shape-levels button.active{background:#303030;border-color:#777;color:#eee}
.detail-banner:hover,.lighting-options button:hover{background:#272727;border-color:#555}
.detail-banner:focus-visible{outline-color:#aaa}
.detail-reset .group-reset{color:#aaa;border-color:#3a3a3a}
.tera-slider .slider-label{color:#ccc}.tera-slider .slider-label .tera-value{color:#eee}.tera-slider .range-end{color:#888}
.tera-slider input[type=range]::-webkit-slider-runnable-track{background:linear-gradient(90deg,#aaa calc(var(--value)*100%),#3a3a3a calc(var(--value)*100%))}
.tera-slider input[type=range]::-moz-range-track{background:#3a3a3a}
.tera-slider input[type=range]::-moz-range-progress{background:#aaa}
.tera-slider input[type=range]::-webkit-slider-thumb{background:#eee}
.tera-slider input[type=range]::-moz-range-thumb{background:#eee}
.tera-slider input:focus-visible{outline-color:#aaa}
.settings{scrollbar-color:#444 transparent}
.tile{background:#1d1d1d;border-color:#333}.tile.selected{background:#303030;border-color:#aaa}
.tile strong,.tile small{color:#999}.tile.has-icon strong,.tile.has-icon small{background:#111c;color:#ddd}
.swatch.selected{border-color:#eee;box-shadow:0 0 0 2px #ffffff20}
.swatch{overflow:hidden;background:#1a1a1a}
.swatch img{display:block;width:100%;height:100%;object-fit:cover;border-radius:2px}
.color-heading{align-items:center;gap:8px}.color-heading h3{margin:0}
.color-actions{display:flex;align-items:center;gap:10px;flex:none}
.color-reset{font-size:10px;padding:5px 8px;background:#191919;border-color:#444;color:#bbb}
.color-reset:disabled{opacity:.4;cursor:default}
.preset-save-form label{color:#aaa}.preset-save-form input{background:#161616;border-color:#444;color:#eee;border-radius:6px}
.saved-preset{background:#191919;border-color:#333;border-radius:8px}
.saved-actions button{color:#ccc;border-color:#444}.saved-actions .preset-card-download{background:#303030;border-color:#666;color:#eee}
.preset-summary,.preset-photo figcaption{color:#999}.preset-costume,.preset-details pre{color:#ccc}
.preset-photo a{background:#101010;border-color:#333}.preset-photo a:hover{border-color:#777}
.preset-details{border-color:#333}.preset-details summary{color:#aaa}
.loading{background:#0d0d0df5;color:#ddd}.loading small{color:#999}.spinner{border-color:#444;border-top-color:#ddd}
.toast{background:#222;border-color:#444;color:#ddd}
.fitting-room:before{display:none}.fitting-heading{background:none;border-bottom:1px solid #ffffff08}
.fitting-heading span{color:#888}.fitting-heading h1{color:#eee;text-shadow:none}
.fitting-preview{width:auto;height:auto;display:flex;justify-content:space-around;gap:12px;margin:18px 14px 20px}
.fitting-slot{position:relative;left:auto;right:auto;top:auto;flex:none}
.fitting-slot-button:not(.equipped) img{filter:grayscale(1)}
.fitting-slot-button.equipped{border-color:#888;background:#1a1a1a;box-shadow:none;border-radius:5px}
.fitting-slot>span{color:#aaa;text-shadow:none}
.fitting-remove{background:#222;border-color:#555;color:#ddd;border-radius:4px}
.fitting-clear,.fitting-clear:hover{background:#222;border:1px solid #444;border-radius:6px;color:#ddd;text-shadow:none}
.fitting-clear:hover{background:#2c2c2c}
.fitting-dye{margin:12px 14px 12px;flex:none;min-height:30px;border:1px solid #555;border-radius:6px;background:#202020;color:#ddd;font-size:11px;cursor:pointer}
.fitting-dye:hover{background:#2c2c2c}.fitting-dye[hidden]{display:none}
.dye-item{padding:14px 0;border-bottom:1px solid #333}.dye-item:last-child{border-bottom:0}
.dye-item .group-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}
.dye-item h4{font-size:12px;line-height:1.5;color:#ddd;margin:0;overflow-wrap:anywhere}
.dye-item .group-reset{flex:none;max-width:100px;font-size:10px;line-height:1.4;color:#aaa;border:1px solid #444;background:#191919;border-radius:5px;padding:6px 8px;cursor:pointer}
.dye-item .group-reset:disabled{opacity:.45;cursor:default}
.dye-color-row{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#bbb;font-size:12px;margin-bottom:12px}
.dye-color-row input[type=color]{width:58px;height:32px;padding:3px;border:1px solid #555;background:#1d1d1d;border-radius:5px;cursor:pointer}
.dye-rgb{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:18px}
.dye-rgb label{display:flex;align-items:center;gap:6px;color:#999;font-size:10px}
.dye-rgb input{width:100%;min-width:0;background:#1a1a1a;color:#ddd;border:1px solid #444;border-radius:5px;padding:7px 3px;text-align:center;font-variant-numeric:tabular-nums}
.dye-item .tera-slider{margin-bottom:0}
.fitting-tools input,.fitting-tools select{background:#161616;border-color:#444;border-radius:5px;box-shadow:none;color:#ccc}
.fitting-tools select{background:linear-gradient(45deg,transparent 50%,#aaa 50%) calc(100% - 13px) 14px/5px 5px no-repeat,linear-gradient(135deg,#aaa 50%,transparent 50%) calc(100% - 8px) 14px/5px 5px no-repeat,#161616}
.fitting-tools input::placeholder{color:#888}
#fitting-search-button{position:relative;background:#282828;border:1px solid #444;height:30px;border-radius:5px}
#fitting-search-button:before{content:'';position:absolute;width:11px;height:11px;border:2px solid #bbb;border-radius:50%;top:6px;left:17px}
#fitting-search-button:after{content:'';position:absolute;width:7px;height:2px;background:#bbb;transform:rotate(45deg);top:19px;left:29px}
#fitting-search-button:hover{filter:none;background:#333}
.fitting-item-label{background:#1a1a1a;border-block:1px solid #2a2a2a;text-shadow:none;color:#aaa}
.fitting-category,.fitting-category:hover{filter:grayscale(1)}
.fitting-category.active{box-shadow:0 0 0 1px #aaa;border-radius:3px}
.fitting-items{border-color:#333;background:#0d0d0d;scrollbar-color:#444 #111;border-radius:5px}
.fitting-item{background:#191919;border-color:#383838;box-shadow:none;border-radius:3px}
.fitting-item:hover{border-color:#888;background:#2b2b2b;box-shadow:none}
.fitting-item.selected{border-color:#ccc;box-shadow:inset 0 0 0 1px #aaa}
.fitting-item.selected:after{color:#eee;background:#222c}.fitting-items .empty,.fitting-count{color:#888}
.fitting-room button:focus-visible,.fitting-room input:focus-visible,.fitting-room select:focus-visible{outline-color:#aaa}
@media(max-width:940px){.workspace{height:auto}.fitting-room,.stage{height:calc(100dvh - 56px)}}
@media(max-width:700px){.topbar{height:56px;min-height:56px;padding:0 12px}.top-actions>button{font-size:10px;padding:8px}.fitting-room,.stage{height:calc(100dvh - 56px)}}
@media(max-width:580px){.stage{height:58dvh}.fitting-room{height:780px}}
