.todo-avatar { display: block; position: relative; width: 100%; height: 280px; min-width: 0; contain: layout paint; }
.todo-avatar canvas { display: block; width: 100%; height: 100%; outline-offset: -4px; }
.todo-avatar[interactive] canvas { touch-action: none; cursor: grab; }
.todo-avatar[interactive] canvas:active { cursor: grabbing; }
.todo-avatar-fallback { width: 100%; height: 100%; object-fit: contain; }
.member-portrait > .todo-avatar { height: 245px; }
.auth-signed > .todo-avatar { max-width: 300px; margin-inline: auto; }
.hub-avatar-preview > .todo-avatar { width: 100%; height: 100%; min-height: 220px; transform: scaleX(-1); }
.todo-stage { padding: 20px; overflow: hidden; }
.todo-stage > .todo-avatar { height: 380px; width: 100%; max-width: 520px; }
.todo-stage > h2 { margin: 0; }
.todo-orbit-help { text-align: center; }
.todo-color-controls { display: flex; gap: 12px; align-items: stretch; margin: 8px 0; }
.todo-color-controls input[type="color"] { flex: 0 0 58px; width: 58px; height: 46px; padding: 4px; cursor: pointer; border: 1px solid #d6ced8; border-radius: 10px; background: white; }
.todo-color-controls input[type="text"], .todo-color-controls #todo-color-hex { min-width: 0; width: 160px; margin: 0; font-family: ui-monospace, monospace; }
.todo-save-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.todo-save-state { min-height: 1.5em; font-size: 14px; color: #64566b; }
.todo-next { display: flex; gap: 14px; border-top: 1px solid #ece5ee; margin-top: 28px; padding-top: 24px; }
.todo-next > span { display: grid; place-items: center; height: 40px; width: 40px; flex: 0 0 40px; border-radius: 12px; background: #f4edf7; }
.todo-next svg { width: 20px; height: 20px; }
.todo-next h3 { font-size: 17px; margin: 0 0 8px; }
.todo-next p { margin: 0; }
.profile-color-dot { width: 36px; height: 36px; display: block; border-radius: 50%; border: 3px solid white; outline: 1px solid #ded5e2; margin-bottom: 8px; }
.profile-details { max-width: 720px; margin-block: 28px; }
.recovery-panel { max-width: 520px; }
.creator-badge { display: inline-block; padding: 5px 9px; border-radius: 8px; background: #ffe4ef; color: #9b1649; font-size: 13px; font-weight: 600; }
.member-search { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.member-search input { flex: 1; min-width: 160px; margin: 0; }
.member-directory { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; }
.member-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; color: #302c3b; border: 1px solid #e5dfe8; border-radius: 14px; text-decoration: none; }
.member-card:hover { background: #fff8fc; border-color: #e6a5c0; }
.member-card > span:not(.member-swatch),.member-card > small { color: #6a6170; }
.member-card .creator-badge { align-self: start; color: #9b1649; }
.member-swatch { display: block; width: 42px; height: 42px; border-radius: 50%; border: 3px solid white; outline: 1px solid #e2d9e6; }
.member-pager { display: flex; gap: 12px; justify-content: end; margin-top: 24px; }
.public-member { display: grid; grid-template-columns: minmax(180px,320px) 1fr; align-items: center; gap: 24px; }
.todo-portrait { display: block; position: relative; width: 100%; height: 280px; min-width: 0; min-height: 0; contain: layout paint; }
.todo-portrait > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.todo-portrait > .quiet-label { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; }
.member-card > .todo-portrait { height: 190px; flex: 0 0 190px; }
.member-card > .todo-portrait .quiet-label { font-size: 13px; }
.member-appearance { min-width: 0; }
#member-avatar-stage { height: 300px; }
#member-avatar-stage > .todo-portrait,#member-avatar-stage > .todo-avatar { height: 100%; }
.member-view-toggle { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.member-view-toggle .button { font-weight: 500; font-size: 14px; padding: 10px 14px; }
.member-view-toggle [aria-pressed="true"] { color: #c6004d; background: #ffe5ef; box-shadow: inset 0 0 0 1px #ff8ab7; }
.member-view-toggle .button:focus-visible { outline: 3px solid #ff006c; outline-offset: 3px; }
#member-view-help { text-align: center; font-size: 13px; margin-bottom: 0; }
.hat-workspace { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(250px,1fr); gap: 24px; align-items: start; }
.hat-stage { min-width: 0; padding: 18px; }
.hat-stage > .todo-avatar { width: 100%; height: clamp(280px,40vw,520px); }
.hat-stage > p { font-size: 14px; color: #655a6b; }
.hat-stage > #hat-mode-help { min-height: 3em; line-height: 1.5; }
.hat-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.hat-toolbar button,.hat-draft { border: 1px solid #d8cedb; background: white; color: #44364b; border-radius: 9px; padding: 10px 12px; cursor: pointer; }
.hat-toolbar button[aria-pressed="true"] { background: #ffe6f0; color: #a5124b; border-color: #ef86af; }
.hat-toolbar button:focus-visible,.hat-draft:focus-visible,.member-card:focus-visible { outline: 3px solid #ff006c; outline-offset: 3px; }
.hat-toolbar button:disabled { opacity: .5; cursor: default; }
.hat-snap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 18px 0; }
.hat-snap label { display: flex; gap: 5px; align-items: center; margin: 0; font-size: 14px; }
.hat-snap input[type="number"] { width: 76px; padding: 8px; margin: 0; }
.hat-snap input[type="checkbox"] { width: auto; }
.hat-options > label { display: block; font-weight: var(--weight-label); margin-top: 14px; }
.hat-options > input { width: 100%; min-width: 0; }
.hat-options > small { display: block; color: #6a6170; line-height: 1.5; }
.hat-options input[type="file"] { padding: 10px; border: 1px solid #ded6e2; border-radius: 9px; font-size: 14px; background: #fbfafc; }
.hat-options input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 12px; border: 1px solid #d8cedb; border-radius: 7px; background: white; color: #44364b; font: inherit; cursor: pointer; }
.hat-options input[type="file"]:disabled { opacity: .55; }
.hat-options #hat-model-name,.hat-options #hat-texture-name { margin: 8px 0 14px; font-size: 14px; overflow-wrap: anywhere; color: #655a6b; }
.hat-options details { margin: 22px 0; }
.hat-options summary { cursor: pointer; font-weight: var(--weight-label); }
.hat-options fieldset { border: 0; padding: 12px 0; }
.hat-axis-inputs { display: flex; gap: 8px; }
.hat-axis-inputs label { width: 33.333%; min-width: 0; }
.hat-axis-inputs input { width: 100%; min-width: 0; }
.hat-draft { width: 100%; text-align: left; margin-bottom: 8px; }
@media (max-width: 900px) { .hat-workspace { grid-template-columns: 1fr; } .public-member { grid-template-columns: 1fr; } .public-member > div:first-child { max-width: 320px; } }
.recovery-panel .text-link { margin-top: 20px; display: inline-flex; }
@media (max-width: 740px) { .todo-stage { position: static; } .todo-stage > .todo-avatar { height: 300px; } .todo-save-actions .button { flex: 1 1 auto; } .member-portrait > .todo-avatar { height: 190px; } }
.hat-publish-actions,.hat-view-toggle,#hat-publication{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.hat-options textarea{width:100%;resize:vertical;min-height:90px;border:1px solid #d7cadc;border-radius:8px;padding:12px;font:inherit;background:#fbfafc;color:inherit}
.hat-catalog-panel{margin-top:22px}
.hat-catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin:20px 0}
.hat-card{display:flex;flex-direction:column;align-items:flex-start;min-width:0;border:1px solid #e1dce5;border-radius:16px;padding:14px;background:#fff}
.hat-card>a:first-child{width:100%;text-decoration:none;color:inherit}
.hat-card img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:12px;background:#f5f6fa}
.hat-card h2{font-size:21px;margin:14px 0 4px;overflow-wrap:anywhere}
.hat-author{font-size:14px;color:var(--muted,#696374)}
.hat-card p{font-size:15px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:12px 0 16px;min-height:45px}
.hat-card button{margin-top:auto}
.hat-detail-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:36px}
.hat-large-preview{aspect-ratio:1;max-height:640px;background:#f5f6fa;border-radius:16px;overflow:hidden}
.hat-large-preview>img,.hat-large-preview>todo-avatar{display:block;width:100%;height:100%;object-fit:contain}
.hat-detail-info{padding:20px 0}.hat-detail-info h2{font-size:36px;line-height:1.15;overflow-wrap:anywhere}
.hat-description{white-space:pre-line;overflow-wrap:anywhere;line-height:1.6;margin:24px 0}
.hat-view-toggle button[aria-pressed="true"]{color:#bf0053;border-color:#ff006c;background:#ffe7f0}
.todo-hats{border-top:1px solid #e1dce5;padding-top:18px;margin-top:24px}
.wardrobe-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:16px 0}
.wardrobe-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}
.wardrobe-section-heading h3{margin:0;font-size:20px;font-weight:600}
.hat-slot-count,.hat-ownership{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#f1eff5;color:#655b70;font-size:12px;font-weight:500}
.hat-ownership{margin-bottom:14px}.hat-ownership.is-worn{background:#e3f5ed;color:#27634b}
.hat-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hat-slot{min-width:0;border:1px solid #e0dce7;border-radius:14px;background:#f9f8fc;overflow:hidden;text-align:center}
.hat-slot a{display:block;text-decoration:none;color:inherit;padding:10px 8px 5px}
.hat-slot img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:8px}
.hat-slot strong{display:block;font-size:13px;font-weight:500;line-height:1.35;overflow-wrap:anywhere}
.hat-slot.is-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:158px;padding:12px 6px;border-style:dashed;background:#fff;text-decoration:none;color:#81748d}
.hat-slot.is-empty>span{font-size:27px;font-weight:400;margin-bottom:6px;color:#cf0058}.hat-slot small{font-size:11px;margin-top:5px}
.hat-slot-remove{width:100%;padding:9px 4px;background:transparent;border:0;color:#b0004c;font:inherit;font-size:12px;cursor:pointer}
.hat-slot-remove:hover{background:#ffe7f0}.hat-slot-remove:disabled{opacity:.5;cursor:wait}
.wardrobe-reset{color:#a33c60!important;background:#fff3f6!important}
.inventory-layout{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.6fr);gap:24px;align-items:start}
.inventory-look{position:sticky;top:24px;text-align:center;min-width:0}.inventory-look>todo-avatar{height:320px;width:100%;display:block}
.inventory-look .wardrobe-actions{justify-content:center}.inventory-look .quiet-label{text-align:left}
.inventory-shelf{min-width:0}.inventory-shelf .hat-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.inventory-empty{grid-column:1/-1;padding:32px 16px;text-align:center;color:#75697d}.inventory-empty h2,.inventory-empty h3{color:#27232d}
.avatar-reset-dialog{width:min(440px,calc(100vw - 32px));padding:28px;border:1px solid #e0dce7;border-radius:20px;background:#fff;color:#27232d;box-shadow:0 20px 90px #21142c30;font:inherit}
.avatar-reset-dialog::backdrop{background:#21142c66}.avatar-reset-dialog h2{margin-top:0;font-size:25px;font-weight:600}.avatar-reset-dialog p{font-size:15px;line-height:1.6;color:#75697d}
#catalog-status{min-height:1.5em;color:#586558;font-size:14px}#catalog-status.is-error{color:#b0004c}
@media(max-width:900px){.inventory-layout{grid-template-columns:1fr}.inventory-look{position:static}.inventory-look>todo-avatar{height:290px}.inventory-look .hat-slots{max-width:430px;margin:auto}}
@media(max-width:420px){.hat-slots{gap:6px}.hat-slot.is-empty{min-height:120px}.inventory-shelf .hat-catalog-grid{gap:9px}.inventory-shelf{padding:14px!important}}
.wardrobe-hat{display:flex;align-items:center;gap:12px;margin:12px 0}.wardrobe-hat>a{display:flex;gap:12px;align-items:center;flex:1;color:inherit}
.wardrobe-hat img{border-radius:12px;background:#f5f6fa}
@media(max-width:1100px){.hat-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:740px){.hat-detail-layout{grid-template-columns:1fr;gap:12px}.hat-detail-info{padding:0}.hat-catalog-grid{gap:12px}.hat-card{padding:10px}.hat-card h2{font-size:18px}}
