.texture-size-editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;padding:16px;background:var(--soft,#f3f5f0);border:1px solid var(--line,#dce3d9);border-radius:12px;margin:16px 0 24px}
.texture-size-preview{position:relative;align-self:center;min-width:0}
.texture-size-preview canvas{display:block;width:100%;height:auto;aspect-ratio:5/3;border:1px solid #d6dfd3;border-radius:8px;background:#e6ece3}
.texture-size-preview>span{position:absolute;inset:0 0 24px;display:grid;place-items:center;padding:16px;text-align:center;font-size:12px;color:#52665a}
.texture-size-preview small{display:block;margin-top:8px;text-align:center;font-size:11px;color:#52665a}
.texture-size-controls{min-width:0}.texture-size-controls>strong{font-size:14px}.texture-size-controls>p{font-size:12px;line-height:1.5;margin:6px 0 12px;color:#52665a}
.texture-mapping-control{display:grid;gap:6px;margin-bottom:14px;font-size:12px;color:var(--ink)}.texture-mapping-control select{width:100%;min-width:0;min-height:44px;padding:9px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit}
.texture-size-zoom{display:flex;gap:8px}.texture-size-zoom .button{flex:1;min-width:0;padding:8px 12px}
.texture-size-fields{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:end;margin-top:12px}
.texture-size-fields label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#52665a}.texture-size-fields>span{line-height:44px;color:#52665a}
.texture-size-fields input{width:100%;min-width:0;height:44px;padding:8px;border:1px solid #c7d3c5;border-radius:7px;background:white;font:inherit;font-size:14px;color:var(--ink)}
.texture-size-fields input[aria-invalid=true]{border-color:#b24940}.texture-size-controls>small{display:block;font-size:11px;color:#52665a;margin-top:7px}
.texture-size-controls>.texture-size-error{color:#a33830}.texture-size-controls .texture-rotation{margin-top:12px}
.texture-size-editor .button{min-height:44px}.texture-size-editor :focus-visible{outline:2px solid #538571;outline-offset:2px}
.texture-repeat-summary{display:block;font-size:11px;line-height:1.6;color:#52665a}.texture-row .material-actions>.text-button{min-height:44px}
.texture-picker-pagination{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.texture-picker-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;bottom:-26px;padding:16px 0 8px;background:white;border-top:1px solid var(--line);margin-top:20px}.texture-picker-footer>span{font-size:11px;line-height:1.5;color:#52665a;max-width:360px}.texture-picker-footer>.dialog-actions{margin:0;flex-wrap:nowrap}
.texture-picker button:disabled,.texture-pagination button:disabled{cursor:default}
.texture-picker [hidden],.texture-pagination [hidden],.texture-size-editor [hidden]{display:none!important}
.texture-dialog .texture-card{display:block;padding:0;overflow:hidden;border-color:var(--line)}
.texture-card-header{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:14px;min-height:88px;padding:14px 16px;cursor:pointer;list-style:none;transition:background .15s}
.texture-card-header::-webkit-details-marker{display:none}
.texture-card-header:hover{background:var(--soft)}
.texture-card-header:focus-visible{outline:2px solid var(--green);outline-offset:-3px;border-radius:11px}
.texture-card-header .texture-swatch{width:56px;height:56px;flex:none}
.texture-card-info{display:grid;gap:3px;min-width:0}
.texture-card .texture-name{display:block;font-size:14px;font-weight:600}
.texture-card .texture-status{display:block;font-size:12px;margin:0;overflow-wrap:anywhere;color:#52665a}
.texture-card .texture-status.pending{color:var(--green);font-weight:500}
.texture-card .texture-status.invalid{color:#a33830}
.texture-card .texture-repeat-summary{font-size:12px}
.texture-card-toggle{display:flex;gap:12px;align-items:center;font-size:12px;color:var(--green)}
.texture-card-toggle::after{content:'';width:7px;height:7px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin-top:-4px;transition:transform .15s}
.texture-card[open]>.texture-card-header{background:var(--soft);border-bottom:1px solid var(--line)}
.texture-card[open] .texture-card-toggle::after{transform:rotate(225deg);margin-top:4px}
.texture-card.has-changes{border-color:#769d88}
.texture-card.has-error{border-color:#b24940}
.texture-card-settings{min-width:0;border:0;padding:16px;margin:0}
.texture-card-settings .material-modes{margin:0 0 16px}
.texture-card-settings .material-color-editor{max-width:320px}
.texture-image-actions{display:flex;gap:8px;flex-wrap:wrap}
.texture-image-actions .button{min-height:44px;padding:10px 14px;font-size:13px}
.texture-candidate-label{display:grid;gap:6px;min-width:0;font-size:12px;color:#52665a;margin-top:14px}
.texture-card .texture-select{margin:0;min-height:44px;font-size:13px;text-overflow:ellipsis}
.texture-card .texture-size-editor{margin:16px 0 0;background:white}
.texture-card .texture-direction-hint{font-size:12px;line-height:1.6;color:#52665a;margin:12px 0 0}
.texture-dialog>p{font-size:13px;line-height:1.6}
.texture-dialog #texture-message:empty{display:none}
.texture-dialog .texture-filters{margin-top:16px}
.texture-dialog .texture-match-settings{padding:8px 0 0;color:#52665a}
.texture-dialog .texture-match-settings summary{min-height:44px;align-content:center;cursor:pointer}
.texture-dialog .texture-pagination{margin:8px 0}
.texture-card [hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.texture-card-header,.texture-card-toggle::after{transition:none}}
@media(max-width:600px){
  .texture-dialog .texture-card-header{grid-template-columns:48px minmax(0,1fr) 14px;gap:10px;padding:12px}
  .texture-card-header .texture-swatch{width:48px;height:48px}
  .texture-card .texture-name{font-size:13px}
  .texture-card-toggle{font-size:0;gap:0}
  .texture-card-settings{padding:12px}
  .texture-image-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .texture-image-actions .button{width:100%}
  .texture-card .texture-select,.texture-mapping-control select{font-size:16px}
  .texture-dialog .texture-footer{bottom:-16px}
  .texture-dialog .texture-footer-actions{display:flex;flex-wrap:nowrap;gap:8px}
  .texture-dialog .texture-footer-actions>.button{flex:1;min-width:0;width:auto;padding:10px 12px}
  .texture-dialog .texture-footer-actions>[hidden]{display:none!important}
}
@media(max-width:600px){.texture-size-editor{grid-template-columns:minmax(0,1fr);gap:14px;padding:12px}.texture-size-preview{width:min(100%,320px);justify-self:center}.texture-size-fields input{font-size:16px}.texture-picker-footer{flex-wrap:wrap;bottom:-22px}.texture-picker-footer>.dialog-actions{width:100%}.texture-picker-footer .button{flex:1;padding:10px 12px}.texture-picker-footer>span{max-width:none}.texture-picker h2{padding-right:24px}.texture-size-controls .texture-rotation{justify-content:space-between}}
