:root{color-scheme:dark;font-family:Arial,Helvetica,sans-serif;background:#101727;color:#e5e9ef}*{box-sizing:border-box}body{margin:0;padding:32px 24px}main{max-width:1440px;margin:auto}header,.identity,.toolbar,.controls,.actions,.section-heading,.preview-heading,.model-toolbar,.results-heading{display:flex;align-items:center;gap:12px}header{justify-content:space-between;border-bottom:1px solid #343c49;padding-bottom:24px}.brand{font-size:12px;font-weight:700;letter-spacing:.14em;color:#8b9aad}h1{font-size:32px;font-weight:500;margin:8px 0 0}h2{font-size:23px;font-weight:500;margin:0}.badge{font-size:11px;color:#e8c67c;background:#362f21;padding:8px 11px;border-radius:4px}.page-nav{display:flex;gap:5px;flex-wrap:wrap;margin:22px 0}.page-nav a,button,select,input,textarea{background:#182333;border:1px solid var(--line,#39465a);color:#c0ccda;border-radius:4px;font:inherit}.page-nav a{padding:11px 18px;text-decoration:none;font-size:13px}.page-nav a[aria-current=page],button[aria-pressed=true]{background:#3a3827;color:#f4d65c;border-color:#9d8a35}button{cursor:pointer;padding:9px 12px;font-size:12px}button:hover,.page-nav a:hover{border-color:var(--gold,#efce47);color:#fff}button:disabled{opacity:.4;cursor:default}:focus-visible{outline:2px solid var(--gold,#efce47);outline-offset:2px}a{color:var(--gold,#efce47)}input,select,textarea{padding:10px;max-width:100%}label{font-size:12px;color:#a6b5c6}label select{display:block;margin-top:6px;min-width:100px}.toolbar{justify-content:space-between;flex-wrap:wrap}.actions{flex-wrap:wrap}.reset{color:#ed8f8f}.workspace{display:grid;grid-template-columns:minmax(600px,1.6fr) minmax(310px,1fr);gap:18px;align-items:stretch}.preview-panel,.browser,.saved-panel{border:1px solid var(--line,#39465a);border-radius:4px;background:var(--panel,#1f2b3b);padding:18px}.preview-heading,.section-heading,.results-heading{justify-content:space-between}.preview-heading>div{display:flex;gap:14px}.paperdoll{display:grid;grid-template-columns:114px minmax(0,1fr) 114px;min-height:570px;margin:18px -7px 6px}.slots{display:flex;flex-direction:column;gap:6px;z-index:1}.slot{display:grid;grid-template-columns:30px 1fr;gap:7px;align-items:center;width:100%;padding:7px;text-align:left;min-height:69px}.slot img{width:30px;height:30px;border:1px solid #596678;border-radius:3px}.slot small{display:block;color:#8a9bad;font-size:10px;margin-bottom:4px}.slot .item-name{font-size:11px;overflow-wrap:anywhere;line-height:1.3}.model-wrap{position:relative;min-width:0;align-self:center;width:100%;height:560px;overflow:hidden;background:radial-gradient(ellipse at 50% 75%,#31495a 0%,#202e40 45%,var(--panel,#1f2b3b) 75%)}#model{width:100%;height:100%}#model-status{position:absolute;inset:40% 10% auto;text-align:center;font-size:13px;line-height:1.6;color:#c2d0de;pointer-events:none}#model-status[hidden]{display:none}#model canvas{display:block;max-width:100%;touch-action:none}.model-toolbar{flex-wrap:wrap;font-size:11px;color:#91a0b0;justify-content:center;border-top:1px solid #343c49;padding-top:14px}.model-toolbar button{font-size:11px}.search-label{display:block;margin:18px 0 7px}#search{width:100%;font-size:13px}.filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.filters select{width:100%}.results-heading{font-size:11px;color:#91a0b0;border-bottom:1px solid #343c49;padding-bottom:12px}.results-heading>div{display:flex;gap:8px;align-items:center}.results-heading button{padding:5px 9px}.results{display:flex;flex-direction:column;min-height:480px}.result{display:flex;align-items:center;gap:10px;border-bottom:1px solid #2d3744;padding:8px 0}.result img{width:35px;height:35px;border:1px solid #445466;border-radius:3px}.result .try-item{border:0;background:none;text-align:left;flex:1;padding:3px;min-width:0}.result .try-item strong{display:block;font-size:12px;font-weight:500;line-height:1.5}.result .try-item small{color:#91a0b0;display:block;font-size:10px}.result.equipped{background:#283b4b}.result a{font-size:10px;padding:8px}.quality-0{color:var(--quality-0)}.quality-1{color:var(--quality-1)}.quality-2{color:var(--quality-2)}.quality-3{color:var(--quality-3)}.quality-4{color:var(--quality-4)}.quality-5{color:var(--quality-5)}#feedback{min-height:20px;font-size:12px;color:#a8b9c9;margin:14px 0}.notice{font-size:12px;line-height:1.6;color:#e8c67c;padding:12px;background:#302b22;border:1px solid #51432e;margin-top:14px}.saved-panel{margin-top:18px}#saved-outfits{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.saved-card{display:flex;gap:6px;align-items:center}.muted,footer{color:#91a0b0;font-size:11px;line-height:1.7}footer{margin:22px 0}dialog{background:var(--panel,#1f2b3b);color:#e5e9ef;border:1px solid #52667c;border-radius:6px;width:min(540px,calc(100vw - 32px));padding:24px}dialog::backdrop{background:#000a}dialog label{display:block;margin:18px 0 8px}dialog textarea,dialog input{width:100%;margin-bottom:18px}dialog textarea{font-family:monospace;resize:vertical}.preview-panel:fullscreen{padding:24px;background:#101727;overflow:auto}.preview-panel:fullscreen .paperdoll{max-width:1100px;margin:20px auto}.preview-panel:fullscreen .model-wrap{height:calc(100vh - 200px)}@media(max-width:1050px){.workspace{grid-template-columns:1fr}.model-wrap{max-width:520px;justify-self:center}.paperdoll{grid-template-columns:130px minmax(0,1fr) 130px}.results{min-height:0}}@media(max-width:580px){body{padding:20px 12px}.preview-panel,.browser{padding:12px}.page-nav a{padding:10px;font-size:11px}.paperdoll{grid-template-columns:82px minmax(0,1fr) 82px;min-height:470px;margin-left:0;margin-right:0}.model-wrap{height:470px}.slot{display:block;padding:5px;min-height:61px}.slot img{width:24px;height:24px;float:left;margin-right:5px}.slot .item-name{font-size:9px}.slot small{font-size:9px}.preview-heading{align-items:start}.preview-heading>div{flex-direction:column;gap:6px}.controls{width:100%}.badge{display:none}.model-toolbar span{width:100%;text-align:center}}

.header-status,.viewers{display:flex;align-items:center;gap:10px}.viewers{font-size:12px;color:#a6b5c6}.viewer-dot{width:6px;height:6px;border-radius:50%;background:#ed7272}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* Shared shell/palette comes from site-theme.css; keep only page layout here. */
.workspace>.panel{margin:0}.saved-panel.panel{margin-top:18px}.model-toolbar,.results-heading{border-color:var(--line)}.result{border-color:var(--line)}.result.equipped{background:#3a3827}.result a{color:var(--gold)}dialog{background:var(--panel);border-color:var(--line)}

.browser{display:flex;flex-direction:column;min-height:0}.browser .section-heading,.browser .search-label,.browser .filters,.browser .results-heading,.browser>input{flex-shrink:0}.browser .results{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.result{flex-shrink:0}@media(max-width:1050px){.browser{height:740px;max-height:90vh}}

/* Race selector */
.race-field{display:flex;flex-direction:column;gap:6px}.field-caption{font-size:12px;color:#a6b5c6}.field-caption strong{color:var(--gold,#e8c67c);font-weight:500;margin-left:6px}
.race-picker{display:flex;gap:6px;flex-wrap:wrap}.race-button{padding:0;width:46px;height:46px;border-radius:5px;background:#182333;overflow:hidden;display:flex;align-items:center;justify-content:center;opacity:.72}.race-button img{width:42px;height:42px;object-fit:cover;border-radius:4px;display:block}.race-button:hover{opacity:1}.race-button[aria-pressed=true]{opacity:1;background:#3a3827;border-color:#9d8a35;box-shadow:0 0 0 1px #9d8a35}

/* Equipment slots: same structure and sizes as the Gear Planner */
.paperdoll{grid-template-columns:150px minmax(0,1fr) 150px}.slots{gap:10px}
.slots .slot{display:block;position:relative;min-width:0;padding:0;border:0;background:transparent;min-height:0;overflow:visible}
.slots .slot>button{display:grid;grid-template-columns:minmax(0,1fr) 33px;grid-template-rows:auto auto;align-items:center;column-gap:6px;row-gap:3px;width:100%;min-height:48px;padding:0;border:0;background:transparent;text-align:left;overflow:visible}
#left-slots .slot>button{grid-template-columns:33px minmax(0,1fr)}
.slots .slot-copy{display:contents}
.slots .slot-icon{grid-column:2;grid-row:1;width:33px;height:33px;object-fit:cover;border-radius:3px;border:1px solid #536277;filter:grayscale(.75);opacity:.65;flex:none}
#left-slots .slot-icon{grid-column:1}
.slots .slot-name{grid-column:1;grid-row:1;min-height:33px;padding:2px;display:flex;align-items:center;justify-content:center;min-width:0;overflow-wrap:anywhere;font-size:9px;letter-spacing:.05em;text-transform:uppercase;text-align:center;border:1px solid #4a596e;border-radius:3px;background:#182333;color:#c1cbd8;margin:0}
#left-slots .slot-name{grid-column:2}
.slots .slot .item-name{grid-row:2;grid-column:1/-1;display:block;width:100%;text-align:center;font-size:11px;font-style:normal;line-height:1.3;overflow-wrap:anywhere;white-space:normal;margin:0}
.slots .slot>button[aria-pressed=true] .slot-name{border-color:#9d8a35;color:#f4d65c}
.slots .slot.has-item .slot-icon{filter:none;opacity:1}
.slot[data-quality="0"]{--item-quality:#9d9d9d}.slot[data-quality="1"]{--item-quality:#fff}.slot[data-quality="2"]{--item-quality:#1eff00}.slot[data-quality="3"]{--item-quality:#0070dd}.slot[data-quality="4"]{--item-quality:#a335ee}.slot[data-quality="5"]{--item-quality:#ff8000}
.slots .slot.has-item .slot-name,.slots .slot.has-item .slot-icon{border-color:var(--item-quality);box-shadow:0 0 5px color-mix(in srgb,var(--item-quality) 60%,transparent)}
.slots .slot:not(.has-item) .item-name{color:#8a9bad}

/* Item list rows: same layout as the Gear Planner picker */
.browser .results{background:#152030;scrollbar-color:#66758c #1b293c}
.result{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:9px;align-items:center;min-height:45px;padding:5px 10px;border-bottom:1px solid #2c384a;border-left:2px solid transparent}
.result img{width:30px;height:30px;border-radius:2px;border:1px solid #4a5a70;object-fit:cover}
.result:hover{background:#2b394e}.result.equipped{border-left-color:#e4bd39;background:#3b382b}
.result .try-item{display:block;width:100%;padding:0;border:0;background:none;text-align:left;min-width:0}
.item-row-name{display:flex;align-items:baseline;gap:7px;min-width:0;font-size:12px;font-weight:500}.item-row-name>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-level{font-size:10px;color:#8997ab;flex:none;font-weight:400}
.result .item-description{display:block;margin-top:3px;font-size:10px;color:#8c9bb0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1050px){.paperdoll{grid-template-columns:150px minmax(0,1fr) 150px}}
@media(max-width:580px){.paperdoll{grid-template-columns:104px minmax(0,1fr) 104px}.slots .slot-name{font-size:8px}.slots .slot-icon{width:26px;height:26px}.slots .slot>button{grid-template-columns:minmax(0,1fr) 26px}#left-slots .slot>button{grid-template-columns:26px minmax(0,1fr)}.slots .slot .item-name{font-size:9px}}

/* Race and body pickers sit apart from each other */
.toolbar .controls{gap:32px;align-items:flex-start}


/* Icons fill their buttons right up to the border */
.race-button{padding:0;overflow:hidden}.race-button img,.body-picker .race-button img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block}

/* Slot buttons match the Gear Planner exactly: 114px wide, 30px icon, 33px label box */
.paperdoll{grid-template-columns:114px minmax(0,1fr) 114px}
.slots .slot>button{grid-template-columns:minmax(0,1fr) 30px;min-height:49px}
#left-slots .slot>button{grid-template-columns:30px minmax(0,1fr)}
.slots .slot-icon{width:30px;height:30px}
.slots .slot-name{font-size:8px;letter-spacing:.05em}
.slots .slot .item-name{font-size:10px}
@media(max-width:1050px){.paperdoll{grid-template-columns:114px minmax(0,1fr) 114px}}
@media(max-width:580px){.paperdoll{grid-template-columns:104px minmax(0,1fr) 104px}}

/* Model area: bordered frame on the graph backdrop, keeping the glow at the bottom */
.model-wrap{border:1px solid #384658;border-radius:4px;background:radial-gradient(ellipse at 50% 75%,#31495a 0%,#202e40 45%,#182333 75%)}
.slots .slot>button{column-gap:9px}

/* Model frame: clear of the slot buttons, and as tall as the slot columns (top level with Head and Hands) */
.paperdoll{column-gap:12px}
.model-wrap{align-self:stretch;height:auto;min-height:560px}
.paperdoll .slots{align-self:start}

/* Optional model background. The default glow is replaced while a background image is active. */
.backdrop-field{display:flex;align-items:center;gap:8px}.backdrop-field select{min-width:130px;padding:5px 8px;font-size:12px}
.model-wrap.has-backdrop{background:var(--backdrop-image) center bottom/cover no-repeat,#182333}
@media(max-width:580px){.backdrop-field{width:100%;justify-content:space-between}}

/* Appearance and animation */
.look-panel{border-top:1px solid #343c49;margin-top:14px;padding-top:14px}
.look-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.look-heading h3{font-size:20px;font-weight:500;margin:0;color:var(--gold,#e8c67c)}
.look-heading .reset{background:transparent;border:0;padding:0;font-size:11px}.look-heading .reset:disabled{opacity:.35}
.look-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px 18px}
.look-option{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px}.look-name{color:#a6b5c6}
.look-stepper{display:flex;align-items:center;gap:6px}.look-stepper button{width:26px;height:26px;padding:0;font-size:16px;line-height:1;display:flex;align-items:center;justify-content:center}
.look-value{min-width:74px;text-align:center;color:#d4dfed;font-size:12px}
.anim-row{display:flex;align-items:center;gap:12px;margin-top:14px;flex-wrap:wrap}.anim-row label{display:flex;align-items:center;gap:8px;font-size:12px}.anim-row select{min-width:150px;max-width:240px;padding:5px 8px;font-size:12px}

/* Appearance: one button per option, [‹] Name ... number [›] */
.look-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px 14px}
.look-option{position:relative;display:block}
.look-pill{display:flex;align-items:stretch;height:32px;background:#182333;border:1px solid #39465a;border-radius:4px}
.look-pill.open,.look-pill:hover{border-color:#9d8a35}
.look-pill button{background:transparent;border:0;border-radius:0;color:#c0ccda;padding:0;margin:0}
.look-arrow{width:26px;flex:none;font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;color:#a6b5c6}.look-arrow:hover{color:#f4d65c;background:#223044}
.look-main{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 6px;text-align:left;font-size:12px}
.look-main:hover{background:#1f2e43}
.look-name{color:#d4dfed;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.look-value{color:#f4d65c;min-width:0;text-align:right;font-weight:600}
.look-menu{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:20;display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:4px;padding:8px;max-height:230px;overflow-y:auto;background:#182333;border:1px solid #52667c;border-radius:4px;box-shadow:0 6px 18px #0008}
.look-choice{height:28px;padding:0;font-size:12px;background:#223044;border:1px solid #39465a;color:#d4dfed}.look-choice:hover,.look-choice:focus-visible{border-color:#f4d65c;color:#fff}
.look-choice.selected{background:#3a3827;border-color:#9d8a35;color:#f4d65c}

/* Narrower appearance buttons (fixed width, not stretched to fill the row) */
.look-grid{grid-template-columns:repeat(auto-fill,164px);gap:10px 12px}
.look-menu{right:auto;min-width:100%;width:max-content;max-width:228px;grid-template-columns:repeat(5,34px)}
@media(max-width:580px){.look-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}}

/* Character panel header: Background, Hide head and Hide back share one vertical centre line */
.preview-heading>div{align-items:center}
.preview-heading>div>label{display:inline-flex;align-items:center;gap:6px;height:30px;margin:0}
.preview-heading>div>label input[type=checkbox]{margin:0}
.backdrop-field select{margin:0;height:30px;padding-top:0;padding-bottom:0}

/* Resets: Reset all matches the Gear Planner's red button; panel resets are small red text */
.reset-all{flex:none;color:#ff746c;border:1px solid #88413b;background:#352326;border-radius:4px;padding:9px 12px;white-space:nowrap}
.reset-all:hover{background:#4a292b;border-color:#c35c51;color:#ff746c}
.reset-all:focus-visible{outline:2px solid #ff998f;outline-offset:3px}
.panel-reset{background:transparent;border:0;border-radius:0;padding:0;color:#ff6b6b;font-size:11px;font-weight:400;line-height:1.5;white-space:nowrap}
.panel-reset:hover{color:#ff9a93;text-decoration:underline;border:0}.panel-reset:disabled{opacity:.35;text-decoration:none}
.preview-heading>div>.panel-reset{height:30px;margin-left:6px}

.result-links{display:flex;align-items:center;gap:8px}
/* The (i) always has its 16px slot, filled or not, so a late answer never moves the DB link. */
.info-slot{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex:none}
.info-i{width:16px;height:16px;border:1px solid #5b6b82;border-radius:50%;color:#8fa0b6;font:italic 700 11px/14px Georgia,serif;text-align:center;cursor:help;user-select:none;flex:none}
.info-i:hover,.info-i:focus-visible{border-color:#9d8a35;color:#f4d65c;outline:0}
.info-tip{position:fixed;z-index:50;width:min(280px,80vw);padding:9px 11px;background:#0e1623;border:1px solid #39465a;border-radius:6px;color:#c6d0dc;font:400 11px/1.55 Arial,sans-serif;box-shadow:0 8px 22px rgba(0,0,0,.45);pointer-events:none}
.info-tip[hidden]{display:none}

/* Saved outfits: name, a close button at the top right, and a snapshot taken from the default (reset) camera */
.saved-card{position:relative;display:block;width:148px}
.saved-card .saved-load{display:flex;flex-direction:column;align-items:stretch;gap:0;width:100%;padding:0;overflow:hidden;background:#1f2b3b;border:1px solid #39465a;border-radius:6px;text-align:left;cursor:pointer}
.saved-card .saved-load:hover,.saved-card .saved-load:focus-visible{border-color:#9d8a35}
.saved-preview{display:block;width:100%;aspect-ratio:132/144;background:#182333}
.saved-preview img{display:block;width:100%;height:100%;object-fit:cover}
.saved-name{display:block;padding:7px 9px 8px;font-size:12px;color:#efce47;line-height:1.25;overflow-wrap:anywhere;border-top:1px solid #39465a}
.saved-card .saved-remove{position:absolute;top:6px;right:6px;width:20px;height:20px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid #6a3a3a;border-radius:4px;background:#3a1f22;color:#ff8f86;font-size:14px;line-height:1;cursor:pointer}

/* Save, Share and Import / Export sit at the bottom right of the Appearance panel */
.anim-row{flex-wrap:wrap}
.anim-row .outfit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}

/* Background picker sits under the model toolbar, above Appearance */
.backdrop-row{display:flex;justify-content:flex-start;margin-top:14px}
.backdrop-row .backdrop-field{margin:0}

/* Background sits on the same row as the other viewer controls; Reset camera is a refresh icon at the viewer's top right */
.model-toolbar{justify-content:flex-end}
.model-toolbar .backdrop-field{width:auto;margin-right:auto}

/* Player-style transport: acute chevrons either side of play / pause */
.transport{display:inline-flex;align-items:center;gap:4px}
.tp-btn{width:32px;height:28px;padding:0;display:inline-flex;align-items:center;justify-content:center;color:#c0ccda}
.tp-btn svg{display:block}
.tp-btn:disabled{opacity:.45;cursor:default}
.tp-btn:not(:disabled):hover{color:#f4d65c;border-color:#9d8a35}
.tp-main{width:38px}

/* Background picker with class and race icons */
.bd-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.bd-picker{position:relative}
.bd-button{display:inline-flex;align-items:center;gap:8px;min-width:170px;height:30px;padding:0 10px;font-size:12px;text-align:left}
.bd-button .bd-label{flex:1}
.bd-caret{color:#8fa0b6;font-size:11px}
.bd-list{position:absolute;left:0;top:calc(100% + 4px);z-index:20;width:230px;max-height:330px;overflow:auto;padding:4px;background:#182333;border:1px solid #39465a;border-radius:6px;box-shadow:0 10px 26px rgba(0,0,0,.5)}
.bd-picker.up .bd-list{top:auto;bottom:calc(100% + 4px)}
.bd-list[hidden]{display:none}
.bd-group{padding:8px 8px 4px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#8fa0b6}
.bd-option{display:flex;align-items:center;gap:8px;width:100%;padding:4px 8px;border:0;border-radius:4px;background:none;color:#d7dfeb;font-size:12px;text-align:left;cursor:pointer}
.bd-option:hover,.bd-option:focus-visible{background:#2b394e;outline:0}
.bd-option[aria-selected="true"]{background:#3a3827;color:#f4d65c}
.bd-option img,.bd-button img{width:20px;height:20px;border-radius:3px;object-fit:cover;flex:none}
.bd-blank{width:20px;height:20px;flex:none}

/* Weapon display: wielded or sheathed, melee or ranged */
.weapon-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.seg{display:inline-flex}
.seg button{height:30px;padding:0 11px;font-size:11px;border-radius:0}
.seg button:first-child{border-radius:4px 0 0 4px}
.seg button:last-child{border-radius:0 4px 4px 0;margin-left:-1px}
.seg button[aria-pressed="true"]{background:#3a3827;border-color:#9d8a35;color:#f4d65c;position:relative;z-index:1}
.model-toolbar .weapon-controls{margin-right:0}

.bd-action{color:#c0ccda}
.bd-option.bd-action:hover{color:#f4d65c}

/* Scrub bar under the player controls */
.transport-wrap{display:inline-flex;flex-direction:column;align-items:stretch;gap:6px}
.transport-wrap .transport{justify-content:center}
.scrub{width:100%;min-width:118px;height:14px;margin:0;accent-color:#e4bd39;cursor:pointer}
.scrub:disabled{opacity:.45;cursor:default}

/* Viewer tools: photo, full screen and reset position, top right of the model */
.viewer-tools{position:absolute;top:8px;right:8px;z-index:3;display:flex;gap:6px}
.tool-btn{width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid #39465a;border-radius:4px;background:rgba(24,35,51,.85);color:#c0ccda;cursor:pointer}
.tool-btn:hover,.tool-btn:focus-visible{border-color:#9d8a35;color:#f4d65c;outline:0}
.shot-status{color:#6fe08f;font-size:12px;opacity:0;transition:opacity .25s}
.shot-status.show{opacity:1}

/* Minus / plus: hides the viewer buttons, leaving a small plus to bring them back */
.viewer-tools{align-items:center}
.tools-toggle{width:16px;height:16px;padding:0;display:flex;align-items:center;justify-content:center;border:0;background:none;color:#aab7c7;cursor:pointer}
.tools-toggle svg{display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.tools-toggle .stem{display:none}
.tools-toggle:hover,.tools-toggle:focus-visible{color:#f4d65c;outline:0}
.viewer-tools.collapsed .tool-btn{display:none}
.viewer-tools.collapsed .tools-toggle .stem{display:inline}

/* Save, Share and Import / Export sit at the top right of the Saved outfits panel */
.saved-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.saved-heading h2{margin:0}
.saved-heading .outfit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}

/* Reset-position glyph: arrow gap on the right */
.tool-btn .flip{display:block;font-size:17px;line-height:1;transform:rotate(90deg)}

/* One tidy row: Animation dropdown, player buttons and a scrub bar that fills the rest of the width */
.transport-wrap{display:flex;flex-direction:row;align-items:center;gap:12px;flex:1 1 220px;min-width:220px}
.transport-wrap .scrub{flex:1 1 auto;width:auto;min-width:100px}

/* The hide / show toggle sits on the same line whether the buttons are shown or hidden */
.viewer-tools .tools-toggle{align-self:flex-start}

/* Scrub bar: the track runs the full width, the thumb is a thin marker, and the gold fill follows the clock exactly */
.scrub{-webkit-appearance:none;appearance:none;--p:0;height:16px;background:transparent;accent-color:auto}
.scrub::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:linear-gradient(to right,#e4bd39 calc(1.5px + var(--p) * (100% - 3px)),#2c3b4f calc(1.5px + var(--p) * (100% - 3px)))}
.scrub::-webkit-slider-thumb{-webkit-appearance:none;width:3px;height:16px;margin-top:-5px;border:0;border-radius:2px;background:#f4d65c}
.scrub::-moz-range-track{height:6px;border-radius:3px;background:#2c3b4f}
.scrub::-moz-range-progress{height:6px;border-radius:3px;background:#e4bd39}
.scrub::-moz-range-thumb{width:3px;height:16px;border:0;border-radius:2px;background:#f4d65c}
.scrub{border:0;padding:0;margin:0;background:transparent;box-shadow:none}

/* Crop dialog for an uploaded background photo */
.crop-dialog{width:min(520px,calc(100vw - 24px))}
.crop-stage{display:flex;justify-content:center;margin:10px 0 12px}
.crop-stage canvas{display:block;max-width:100%;height:auto;background:#101727;border:1px solid #39465a;border-radius:2px;cursor:grab;touch-action:none}
.crop-stage canvas.dragging{cursor:grabbing}
.crop-zoom{display:flex;align-items:center;gap:12px;margin:0 0 14px;font-size:12px;color:#aab7c7}
.crop-zoom input{flex:1;width:auto;margin:0;border:0;padding:0;background:transparent}

/* Character-local race and body controls. */
.character-pickers{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 24px;margin:12px 0 16px}.character-pickers .race-picker{flex-wrap:wrap}.toolbar:empty,#feedback:empty{display:none}.result:has(.quality-0) img{border-color:var(--quality-0)}

.toolbar>.actions{margin-left:auto}
