/* Official references in the five outfit workspaces. Images retain full framing. */
.hzg-set-layout .hzg-upload-grid{align-items:start}
.hzg-col{min-width:0;display:flex;flex-direction:column;gap:6px}
.hzg-col-head{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:26px;font-size:12px;color:var(--ink-soft,#5a524b);white-space:nowrap}
.hzg-col-head>span{flex:none}
.hzg-set-layout .hzg-col-head .hzg-set-entry{flex:none;border:1px solid #e0a487;background:#fff1e8;color:#b8481f;border-radius:999px;padding:2px 9px;font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;cursor:pointer;white-space:nowrap}
.hzg-set-card{position:relative;min-width:0}
.hzg-set-card .hzg-set-del{z-index:1;border:0;padding:0}
.hzg-set-card:hover .hzg-set-del,.hzg-set-card:focus-within .hzg-set-del{opacity:1}
.hzg-set-batch{display:flex;gap:16px;flex-wrap:wrap;margin:4px 0 14px}
.hzg-set-batch button{border:0;background:transparent;color:#b8481f;padding:4px 0;font:inherit;font-size:13px;cursor:pointer}
.hzg-group-note .hzg-set-aspect{flex:none;position:relative}
html .hzg-group-note .hzg-aspect-trigger{width:auto;min-height:40px;padding:6px 12px;border-radius:12px;gap:6px;white-space:nowrap}
html .hzg-group-note .hzg-set-aspect .dc-setting-menu{left:auto;right:0;top:calc(100% + 8px);width:240px;max-width:240px;padding:8px;gap:6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-radius:14px}
html .hzg-group-note .hzg-set-aspect .dc-setting-option{min-height:34px;padding:4px 6px;font-size:13px;border-radius:10px;text-align:center;white-space:nowrap}
html .hzg-group-note .hzg-set-aspect .dc-setting-option:first-child{grid-column:1/-1}
.hzg-gen-bar .compact-generation-buttons{margin-bottom:12px}
.hzg-gen-bar>.field:not(.compact-generation-buttons){margin-bottom:10px}
.hzg-gen-bar .dc-setting-menu{top:auto;bottom:calc(100% + 8px)}
.hzg-set-photo{position:relative;display:block;width:100%;aspect-ratio:1;padding:0;border:1px solid #d7b7a1;border-radius:12px;overflow:hidden;background:#f4f0eb;cursor:pointer;min-width:0}
.hzg-set-photo img{display:block;width:100%;height:100%;object-fit:contain}
.hzg-set-photo span{position:absolute;left:0;right:0;bottom:0;padding:4px 8px;font-size:11px;color:#fff;background:#0000008c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.hzg-set-own{font-size:12px}
.hzg-set-bar,.hzg-set-face,.hzg-set-actions,.hzg-set-aspect{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}
.hzg-set-bar{gap:6px 14px;margin:2px 0 8px;color:var(--ink-dim,#736b64)}
.hzg-set-face button,.hzg-set-own{border:1px solid #d7b7a1;background:#fff7ee;color:#a54d2c;border-radius:8px;padding:5px 9px;font:inherit;cursor:pointer}
.hzg-set-face img{width:24px;height:28px;object-fit:contain;border-radius:4px}
.hzg-set-face button{padding:3px 6px}
.hzg-set-aspect select{background:var(--surface,#fff);color:var(--ink,#302b27);border:1px solid #d7b7a1;border-radius:6px;padding:3px;font:inherit}
.hzg-set-dialog{width:min(860px,calc(100vw - 32px));max-height:90vh;box-sizing:border-box;margin:auto;padding:22px;border:1px solid #d8cec3;border-radius:18px;background:#fffdf9;color:#302b27;box-shadow:0 24px 70px #0003;overflow:auto}
.hzg-set-dialog::backdrop{background:#241a135c}
.hzg-set-dialog header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.hzg-set-dialog h3{margin:0;font-size:20px}
.hzg-set-dialog p{font-size:13px;line-height:1.6;color:#736b64;margin:8px 0 12px}
.hzg-set-dialog button{cursor:pointer;font:inherit}
.hzg-set-dialog button:disabled{cursor:default;opacity:.45}
.hzg-set-dialog button:focus-visible,.hzg-col button:focus-visible,.hzg-set-batch button:focus-visible{outline:2px solid #b85d3e;outline-offset:2px}
.hzg-set-dialog header>button,.hzg-set-actions button,.hzg-set-dialog footer>button:first-child,.hzg-set-dialog-body>button{border:0;background:transparent;color:#a54d2c;padding:5px}
.hzg-set-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:18px}
.hzg-set-actions{justify-content:space-between;margin:12px 0}
.hzg-set-categories{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.hzg-set-categories button{border:1px solid #d8cec3;background:transparent;color:inherit;border-radius:8px;padding:6px 12px}
.hzg-set-categories button[aria-pressed=true]{border-color:#b85d3e;background:#fbefe5;color:#914729}
.hzg-set-catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.hzg-set-catalog button{display:flex;flex-direction:column;text-align:left;gap:5px;min-width:0;padding:0 0 10px;border:1px solid #d8cec3;border-radius:10px;overflow:hidden;background:transparent;color:inherit}
.hzg-set-catalog b,.hzg-set-catalog small{padding:0 10px}
.hzg-set-catalog img{width:100%;aspect-ratio:1;object-fit:contain;background:#f4f0eb}
.hzg-set-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.hzg-set-grid>div{border:1px solid #d8cec3;border-radius:9px;overflow:hidden}
.hzg-set-grid>div[data-selected=true]{border-color:#b85d3e}
.hzg-set-grid>div[data-selected=true] label{background:#fbefe5;color:#914729}
.hzg-set-grid button{display:block;width:100%;padding:0;border:0;background:transparent}
.hzg-set-grid img{display:block;width:100%;aspect-ratio:3/4;object-fit:contain;background:#f4f0eb}
.hzg-set-grid label{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 4px;font-size:13px;cursor:pointer}
.hzg-set-grid input{accent-color:#b85d3e}
.hzg-set-full-preview{display:block;width:100%;max-height:64vh;object-fit:contain}
.hzg-set-empty{padding:40px;text-align:center}
html[data-theme=dark] .hzg-set-photo{background:#211e1b;border-color:#67584b}
html[data-theme=dark] .hzg-set-dialog,html[data-theme=dark] .hzg-set-aspect select{background:#292520;color:#f3eee7;border-color:#67584b}
html[data-theme=dark] .hzg-set-dialog p{color:#b8afa3}
html[data-theme=dark] .hzg-set-photo img,html[data-theme=dark] .hzg-set-catalog img,html[data-theme=dark] .hzg-set-grid img{background:#211e1b}
html[data-theme=dark] .hzg-set-grid>div[data-selected=true]{border-color:#e5b69a}
html[data-theme=dark] .hzg-set-grid>div[data-selected=true] label,html[data-theme=dark] .hzg-set-categories button[aria-pressed=true],html[data-theme=dark] .hzg-set-layout .hzg-col-head .hzg-set-entry,html[data-theme=dark] .hzg-set-face button,html[data-theme=dark] .hzg-set-own{background:#463329;color:#f2c6aa;border-color:#94654b}
@media(max-width:600px){.hzg-set-dialog{padding:16px}.hzg-set-grid,.hzg-set-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-theme=dark] .hzg-col-head{color:#cfc5b8}
html[data-theme=dark] .hzg-set-batch button{color:#f2c6aa}
/* 套图五项：框内按钮只在鼠标移到图片上（或键盘聚焦）时出现；已确认的局部选区仍常显提示。 */
html .hzg-set-layout .slot.has-img :is(.slot-del,.slot-sync,.slot-local-edit,.slot-repl){opacity:0;pointer-events:none;transition:opacity .15s ease}
html .hzg-set-layout .slot.has-img:is(:hover,:focus-within) :is(.slot-del,.slot-sync,.slot-local-edit,.slot-repl),html .hzg-set-layout .slot.has-img .slot-local-edit.active{opacity:1;pointer-events:auto}
/* 套图五项的框内按钮：两枚完整文字小标签固定左下/右下并排，字号随框宽缩放（约 100px 框时 9px），窄框也不重叠。删除为深色圆钮白叉。 */
html .hzg-set-layout .slot.has-img{container-type:inline-size}
html .hzg-set-layout .slot.has-img :is(.slot-local-edit,.slot-sync,.slot-repl){box-sizing:border-box;top:auto;bottom:4px;width:auto;height:auto;min-height:0;max-width:none;padding:3px 4px;border:0;border-radius:5px;background:rgba(24,19,15,.74);color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);backdrop-filter:blur(6px);font-family:inherit;font-size:clamp(8px,9cqw,11px);font-weight:600;line-height:1.15;letter-spacing:0;white-space:nowrap;display:block;overflow:visible;transform:none}
html .hzg-set-layout .slot.has-img :is(.slot-local-edit,.slot-repl){left:4px;right:auto}
html .hzg-set-layout .slot.has-img .slot-repl{width:auto;height:auto;place-items:initial;font-size:0}
html .hzg-set-layout .slot.has-img .slot-repl::before{content:"更换";font-size:clamp(8px,9cqw,11px)}
html .hzg-set-layout .slot.has-img .slot-sync{right:4px;left:auto}
html .hzg-set-layout .slot.has-img :is(.slot-local-edit,.slot-sync,.slot-repl):hover,html .hzg-set-layout .slot.has-img .slot-local-edit.active{background:#b8481f;color:#fff;transform:none}
html :is(.hzg-set-layout .slot.has-img .slot-del,.hzg-set-card .hzg-set-del){top:6px;right:6px;width:24px;height:24px;padding:0;border:1.5px solid rgba(255,255,255,.9);border-radius:50%;background:rgba(24,19,15,.78);color:transparent;font-size:0;box-shadow:0 1px 5px rgba(0,0,0,.35);backdrop-filter:none}
html :is(.hzg-set-layout .slot.has-img .slot-del,.hzg-set-card .hzg-set-del)::before,html :is(.hzg-set-layout .slot.has-img .slot-del,.hzg-set-card .hzg-set-del)::after{content:"";position:absolute;left:50%;top:50%;width:11px;height:2px;border-radius:1px;background:#fff;transform:translate(-50%,-50%) rotate(45deg)}
html :is(.hzg-set-layout .slot.has-img .slot-del,.hzg-set-card .hzg-set-del)::after{transform:translate(-50%,-50%) rotate(-45deg)}
html :is(.hzg-set-layout .slot.has-img .slot-del,.hzg-set-card .hzg-set-del):hover{background:#e5484d;border-color:#fff}
/* 套图五项整组排版（8px 网格）：组与组 16px 上下留白 + 细分隔线；行间 12px；小按钮统一 28px 高，输入框与比例 40px 高。 */
html .hzg-task-list:has(>.hzg-set-layout){gap:0;margin:0}
html .hzg-task-list>.field.hzg-task-card.hzg-set-layout{margin:0;padding:16px 0;border:0;border-bottom:1px solid var(--glass-bd);border-radius:0;background:transparent;box-shadow:none}
html .hzg-task-list>.field.hzg-task-card.hzg-set-layout:first-child{padding-top:8px}
html .hzg-task-card.hzg-set-layout>.field-label{display:flex;align-items:center;min-height:28px;margin:0 0 8px;gap:8px;font-size:14px;line-height:1.4}
html .hzg-set-layout .hzg-task-actions{margin-left:auto}
html .hzg-set-layout .hzg-task-remove{min-height:28px;height:28px;padding:0 10px;gap:4px;border-radius:8px;font-family:inherit;font-size:12px;font-weight:600;line-height:1;letter-spacing:0}
html .hzg-set-layout .uploads.extras.hzg-upload-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
html .hzg-set-layout .hzg-col{gap:6px}
html .hzg-set-layout .hzg-col-head{min-height:24px;line-height:24px}
html .hzg-set-layout .hzg-set-bar{margin:8px 0 0;gap:8px;min-height:28px}
html .hzg-set-layout .hzg-set-face{gap:8px}
html .hzg-set-layout :is(.hzg-set-face button,.hzg-set-own){box-sizing:border-box;height:28px;padding:0 10px;border-radius:8px;font-family:inherit;font-size:12px;font-weight:500;line-height:26px}
html .hzg-set-layout .hzg-extra-row{margin:12px 0 0;min-height:28px;gap:8px}
html .hzg-set-layout .hzg-extra-pills{gap:8px}
html .hzg-set-layout .hzg-extra-pills .pill{box-sizing:border-box;height:28px;padding:0 10px!important;border-radius:8px;font-size:12px!important;display:inline-flex;align-items:center}
html .hzg-task-list .hzg-set-layout .hzg-group-note{margin:12px 0 0;gap:8px;align-items:stretch}
html .hzg-set-layout .hzg-group-note input{box-sizing:border-box;height:40px!important;padding:0 44px 0 12px!important;border-radius:10px!important;font-size:13px!important;line-height:38px!important}
html .hzg-set-layout .hzg-group-note .hzg-aspect-trigger{box-sizing:border-box;height:40px!important;min-height:40px!important;padding:0 12px!important;border-radius:10px!important}
html .hzg-set-batch{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0;padding:12px 0 16px}
html .hzg-set-layout .hzg-extra-row .hzg-set-add{flex:none;margin-left:auto;box-sizing:border-box;height:28px;padding:0 12px;border:1px solid #e0a487;border-radius:999px;background:#fff1e8;color:#b8481f;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}
html .hzg-set-layout .hzg-extra-row .hzg-set-add:hover{background:#b8481f;border-color:#b8481f;color:#fff}
html[data-theme=dark] .hzg-set-layout .hzg-extra-row .hzg-set-add{background:#463329;color:#f2c6aa;border-color:#94654b}

/* 列标题行随格宽缩放：约 100px 的格子里「模特图 + 官方套图」也能一行放下。 */
html .hzg-set-layout .hzg-col{container-type:inline-size}
html .hzg-set-layout .hzg-col-head{gap:4px;font-size:clamp(10px,11cqw,12px)}
html .hzg-set-layout .hzg-col-head .hzg-set-entry{padding:1px clamp(4px,5cqw,9px);font-size:clamp(10px,10.5cqw,12px)}
