.hidden { display: none !important; }
.wardrobe-collection { border-top: 1px solid var(--line); padding-top: 24px; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 21px; }
.collection-heading > p { max-width: 350px; margin: 0; font-size: 13px; }
.category-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.category-chip { padding: 7px 11px; color: var(--moss); font-size: 12px; background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: .18s ease; }
.category-chip:hover, .category-chip.active { color: var(--ink); background: #dfeaf6; border-color: #abc6e1; }
.wardrobe-empty { grid-column: 1 / -1; min-height: 220px; }
.storefront-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.storefront-card { border-radius: 6px; box-shadow: none; }
.storefront-card > img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #edf2f6; }
.storefront-card .garment-meta { padding: 10px 10px 12px; }
.storefront-card .product-kicker { display: block; overflow: hidden; color: var(--moss); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.storefront-card h3 { display: -webkit-box; min-height: 42px; margin: 5px 0 4px; overflow: hidden; font-size: 14px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.storefront-card .garment-meta > p:not(.garment-description) { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.storefront-card .garment-description { min-height: 39px; margin-top: 7px !important; font-size: 11px !important; }
.storefront-card .card-actions { gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0f4; }
.storefront-card .text-button, .storefront-card .texture-state { font-size: 9px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.garment-description { display: -webkit-box; margin-top: 10px !important; overflow: hidden; color: #48617c !important; font: 12px/1.65 "Microsoft YaHei UI", "PingFang SC", sans-serif !important; letter-spacing: 0 !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.garment-description--pending { color: var(--moss) !important; font-style: italic !important; }
.garment-description--failed { color: #9a5a31 !important; }
.texture-generate { color: var(--clay); }
.texture-generate:disabled { color: var(--muted); cursor: not-allowed; }
.texture-state { color: var(--moss); font: 10px "Cascadia Mono", monospace; letter-spacing: .04em; }
.texture-state--complete { color: #35705a; }
.texture-state--locked { color: #9a5a31; }
.texture-upload-option { display: grid; gap: 10px; padding: 16px; background: #edf4fb; border: 1px solid #c5d8eb; border-radius: 12px; }
.texture-option-title { margin: 0; color: var(--ink); font-size: 14px; font-weight: 750; }
.texture-upload-option > div > p:not(.texture-option-title), .texture-option-unavailable { margin: 4px 0 0; font-size: 12px; line-height: 1.65; }
.texture-option-unavailable { color: #9a5a31; }
.texture-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 10px; border-top: 1px solid #c5d8eb; cursor: pointer; }
.texture-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--clay); }
.texture-toggle span { color: var(--ink); font-size: 13px; font-weight: 750; }
.texture-toggle:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.garment-missing-image { display: grid; min-height: 190px; padding: 22px; place-items: center; color: var(--muted); font-size: 13px; text-align: center; background: #edf2f6; }
.source-note { margin-top: 8px !important; color: var(--moss) !important; }
.texture-selection { display: grid; gap: 22px; margin: 0 0 36px; padding: 24px; background: #e6eff8; border: 1px solid #c5d8eb; border-radius: 14px; }
.texture-selection > div > p:not(.eyebrow) { margin: 0; font-size: 13px; }
.candidate-job { padding-top: 18px; border-top: 1px solid #c5d8eb; }
.candidate-source { margin: 0 0 12px; color: var(--moss); font: 11px "Cascadia Mono", monospace; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 650px; }
.candidate-card { padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.candidate-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 10px; border-radius: 7px; }
.candidate-card .primary { width: 100%; }
.garment-candidate-modal { width: min(720px, calc(100vw - 36px)); max-width: none; padding: 0; overflow: hidden; background: #f8fbfe; border: 1px solid #c5d8eb; border-radius: 14px; box-shadow: 0 28px 70px rgba(20,39,61,.28); }
.garment-candidate-modal::backdrop { background: rgba(11,23,37,.62); backdrop-filter: blur(6px); }
.candidate-picker-shell { position: relative; padding: 28px; }
.candidate-picker-shell h2 { margin: 6px 0; }
.candidate-picker-shell > p:not(.eyebrow) { margin: 0 0 18px; color: var(--moss); font-size: 13px; }
.candidate-image-stage { position: relative; overflow: hidden; background: #dce8f3; border: 1px solid #c5d8eb; }
.candidate-image-stage > img { display: block; width: 100%; max-height: min(68vh, 620px); object-fit: contain; }
.detected-garment { position: absolute; z-index: 1; display: grid; place-items: center; padding: 4px; color: #fff; font-size: 11px; font-weight: 750; text-align: center; background: rgba(28,76,115,.25); border: 2px solid #eaf6ff; border-radius: 6px; cursor: pointer; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.detected-garment:hover, .detected-garment:focus-visible { background: rgba(43,117,172,.56); border-color: #fff; outline: 0; }
.garment-card--openable { cursor: zoom-in; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.garment-card--openable:hover, .garment-card--openable:focus-visible { transform: translateY(-4px); border-color: #9ebbd8; box-shadow: 0 18px 34px rgba(23,32,51,.14); outline: 0; }
.garment-detail-modal { width: min(1160px, calc(100vw - 48px)); height: min(700px, calc(100dvh - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; overflow: visible; color: #eef4fa; background: transparent; }
.garment-detail-modal::backdrop { background: rgba(8, 14, 24, .78); backdrop-filter: blur(10px); }
.garment-detail-shell { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(340px, .78fr); height: 100%; min-height: 0; overflow: hidden; background: #101a29; border: 1px solid rgba(208,224,241,.2); border-radius: 22px; box-shadow: 0 36px 100px rgba(0,0,0,.44); }
.detail-visual { position: relative; display: grid; min-height: 0; place-items: center; overflow: hidden; background: radial-gradient(circle at 20% 18%, #dbe9f8 0, #90aac4 41%, #1d344c 100%); }
.detail-visual > #detail-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; background: #e7eff7; }
.detail-image-fallback { display: grid; width: min(72%, 460px); aspect-ratio: 1 / 1; padding: 30px; place-content: center; gap: 10px; color: #d6e8f8; text-align: center; background: #29435e; border: 1px solid rgba(255,255,255,.24); border-radius: 14px; box-shadow: 0 26px 52px rgba(0,0,0,.22); }
.detail-visual > #detail-image[hidden], .detail-image-fallback[hidden] { display: none !important; }
.detail-image-fallback strong { font-size: 19px; }
.detail-image-fallback span { color: #b8cce0; font-size: 12px; line-height: 1.6; }
.detail-close { position: absolute; top: 16px; left: 16px; z-index: 1; display: grid; width: 38px; height: 38px; place-items: center; color: #fff; font-size: 26px; line-height: 1; background: rgba(10,19,31,.6); border: 1px solid rgba(255,255,255,.25); border-radius: 50%; cursor: pointer; backdrop-filter: blur(8px); }
.detail-copy { min-height: 0; padding: clamp(28px, 4vw, 52px); overflow-y: auto; overscroll-behavior: contain; background: #101a29; }
.detail-copy .eyebrow { color: #9bc8ef; }
.detail-copy h2 { color: #fff; font-size: clamp(31px, 3.3vw, 48px); line-height: 1.15; letter-spacing: -.055em; overflow-wrap: anywhere; }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.detail-title-row h2 { margin: 0; }
.detail-status-control { position: relative; flex: 0 0 auto; margin-top: 8px; }
.detail-status-button { display: grid; grid-template-columns: auto auto auto; gap: 6px; align-items: center; padding: 8px 9px; color: #d9edff; text-align: left; background: rgba(105,150,193,.16); border: 1px solid rgba(155,200,239,.38); border-radius: 8px; cursor: pointer; }
.detail-status-button > span { color: #91a6bc; font: 9px "Cascadia Mono", monospace; letter-spacing: .08em; }
.detail-status-button strong { color: #f5fbff; font-size: 12px; white-space: nowrap; }
.detail-status-button i { color: #9bc8ef; font-size: 13px; font-style: normal; }
.detail-status-button:hover, .detail-status-button:focus-visible { background: rgba(105,150,193,.32); border-color: #9bc8ef; outline: 0; }
.detail-status-menu { position: absolute; z-index: 3; top: calc(100% + 7px); right: 0; display: grid; min-width: 132px; padding: 5px; background: #1a2c43; border: 1px solid rgba(155,200,239,.36); border-radius: 8px; box-shadow: 0 14px 30px rgba(0,0,0,.28); }
.detail-status-menu[hidden] { display: none; }
.detail-status-menu button { padding: 8px 9px; color: #d9edff; font-size: 12px; text-align: left; background: transparent; border: 0; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.detail-status-menu button:hover, .detail-status-menu button:focus-visible { color: #fff; background: rgba(105,150,193,.36); outline: 0; }
.detail-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 31px 0 25px; background: rgba(203,222,239,.17); border: 1px solid rgba(203,222,239,.17); }
.detail-facts > div { display: grid; gap: 6px; min-height: 74px; padding: 13px; background: #142238; }
.detail-facts span, .detail-label { margin: 0; color: #91a6bc; font: 10px "Cascadia Mono", monospace; letter-spacing: .09em; }
.detail-facts strong { color: #f3f7fb; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.detail-section { padding-top: 19px; margin-top: 19px; border-top: 1px solid rgba(203,222,239,.17); }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-section-heading .detail-description-button { margin-top: 0; }
.detail-section-heading .detail-description-button + .detail-description-button { margin-left: 10px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.detail-tags span { padding: 5px 8px; color: #d5e7f8; font-size: 12px; background: rgba(105,150,193,.18); border: 1px solid rgba(155,200,239,.25); border-radius: 999px; }
.detail-notes { margin: 9px 0 0; color: #c3d0df; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.detail-description-button { margin-top: 12px; padding: 0; color: #cce7fc; font: inherit; font-size: 13px; background: transparent; border: 0; border-bottom: 1px solid #7eb3df; cursor: pointer; }
.detail-description-button:disabled { color: #91a6bc; border-color: transparent; cursor: wait; }
.detail-notes[contenteditable="true"] { padding: 8px 0; outline: 1px solid rgba(155,200,239,.48); outline-offset: 6px; }
.detail-description-edit-actions { display: flex; gap: 8px; margin-top: 14px; }
.detail-original-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.detail-empty-original { margin: 0; color: #91a6bc; font-size: 13px; }
.detail-original-button { padding: 9px 12px; color: #d9edff; font-size: 13px; font-weight: 700; background: rgba(105,150,193,.18); border: 1px solid rgba(155,200,239,.5); border-radius: 8px; cursor: pointer; }
.detail-original-button:hover, .detail-original-button:focus-visible { color: #fff; background: rgba(105,150,193,.38); border-color: #9bc8ef; outline: 0; }
.original-preview-shell { padding: 0; }
.original-preview-stage { background: #0a1019; border: 0; }
.original-preview-back { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 8px 10px; color: #d9edff; font: 700 13px "Microsoft YaHei UI", "PingFang SC", sans-serif; background: rgba(10,19,31,.72); border: 1px solid rgba(155,200,239,.45); border-radius: 7px; cursor: pointer; backdrop-filter: blur(8px); }
.original-preview-back:hover, .original-preview-back:focus-visible { color: #fff; background: rgba(105,150,193,.36); border-color: #9bc8ef; outline: 0; }
.detail-source-button { margin-top: 9px; padding: 0; color: #cce7fc; font-size: 14px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #7eb3df; cursor: pointer; }
.detail-actions { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(203,222,239,.17); }
.detail-delete { width: 100%; padding: 11px 14px; color: #ffd7d1; font-size: 13px; font-weight: 750; background: rgba(166, 55, 44, .18); border: 1px solid rgba(237, 130, 116, .54); border-radius: 8px; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.detail-delete:hover:not(:disabled), .detail-delete:focus-visible { background: rgba(190, 65, 51, .34); border-color: #ff998c; outline: 0; transform: translateY(-1px); }
.detail-delete:disabled { color: #a88b89; cursor: wait; opacity: .7; }
.detail-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding: 16px; background: rgba(20,34,56,.84); border: 1px solid rgba(155,200,239,.2); }
.detail-edit-form label { color: #d9edff; font-size: 12px; }
.detail-edit-form input, .detail-edit-form select, .detail-edit-form textarea { margin-top: 5px; color: #172033; }
.detail-edit-form label:last-of-type, .detail-edit-form label:nth-last-of-type(2) { grid-column: 1 / -1; }
.detail-edit-form > div { display: flex; gap: 8px; grid-column: 1 / -1; }
.detail-actions { display: flex; gap: 9px; }
.detail-actions .detail-delete { flex: 1; }
@media (max-width: 760px) { .collection-heading { align-items: start; flex-direction: column; gap: 3px; } .storefront-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .candidate-grid { grid-template-columns: 1fr; max-width: 340px; } }
@media (max-width: 760px) { .garment-detail-modal { width: min(100vw - 20px, 580px); height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); } .garment-detail-shell { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 42%) minmax(0, 1fr); } .detail-visual, .detail-visual > #detail-image { min-height: 0; max-height: none; } .detail-copy { padding: 28px 24px 34px; } .detail-title-row { gap: 12px; } .detail-status-control { margin-top: 3px; } .detail-status-button > span { display: none; } .detail-section-heading { align-items: flex-start; flex-direction: column; } .detail-edit-form { grid-template-columns: 1fr; } .original-preview-back { top: 10px; left: 10px; } }

/* Warm editorial detail view: the existing IDs remain stable for app.js. */
.garment-detail-modal { width: min(1240px, calc(100vw - 44px)); height: min(760px, calc(100dvh - 38px)); color: #36291f; }
.garment-detail-modal::backdrop { background: rgba(55, 42, 30, .46); backdrop-filter: blur(7px); }
.garment-detail-shell { grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr); background: #fffaf5; border: 1px solid #e5dcd2; border-radius: 18px; box-shadow: 0 32px 90px rgba(61, 43, 26, .26); }
.detail-visual { padding: clamp(42px, 6vw, 88px); background: radial-gradient(circle at 55% 36%, #fffdfa 0 20%, #f5ede5 55%, #ece0d5 100%); }
.detail-visual::before { position: absolute; inset: 22px; content: ""; border: 1px solid rgba(113, 84, 60, .14); border-radius: 13px; pointer-events: none; }
.detail-visual > #detail-image { position: relative; inset: auto; z-index: 1; width: min(82%, 520px); height: min(82%, 580px); min-height: 0; max-height: none; object-fit: contain; background: transparent; filter: drop-shadow(0 24px 21px rgba(67, 46, 26, .15)); }
.detail-image-fallback { position: relative; z-index: 1; width: min(74%, 430px); color: #765d49; background: #fffaf4; border: 1px dashed #cdbda9; border-radius: 12px; box-shadow: none; }
.detail-image-fallback span { color: #9a806a; }
.detail-visual-label, .detail-visual-caption { position: absolute; z-index: 2; color: #886e57; font: 700 9px "Cascadia Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.detail-visual-label { top: 34px; left: 37px; }.detail-visual-caption { right: 37px; bottom: 34px; letter-spacing: .06em; }
.detail-close { top: 24px; right: 25px; left: auto; z-index: 3; width: 34px; height: 34px; color: #604835; font-size: 22px; background: rgba(255,250,245,.83); border: 1px solid #d7c7b7; border-radius: 50%; box-shadow: 0 5px 12px rgba(83,57,36,.08); backdrop-filter: blur(6px); }
.detail-close:hover, .detail-close:focus-visible { color: #fff; background: #5b4432; border-color: #5b4432; outline: 0; }
.detail-copy { padding: clamp(28px, 4.2vw, 52px); background: #fffdfa; scrollbar-color: #c8b8a7 transparent; }
.detail-header { padding-bottom: 23px; border-bottom: 1px solid #e9e0d7; }.detail-copy .eyebrow { color: #9a785b; }.detail-copy h2 { color: #302117; font-size: clamp(33px, 3.25vw, 50px); font-weight: 680; letter-spacing: -.065em; }
.detail-status-control { margin-top: 4px; }.detail-status-button { color: #513b2a; background: #fff; border: 1px solid #d9c9b9; border-radius: 8px; box-shadow: 0 3px 8px rgba(79,57,39,.04); }.detail-status-button > span { color: #9d8068; }.detail-status-button strong { color: #4a3525; }.detail-status-button i { color: #79604b; }.detail-status-button:hover, .detail-status-button:focus-visible { background: #f7eee5; border-color: #a98566; outline: 0; }
.detail-status-menu { background: #fffdfa; border-color: #d9c9b9; border-radius: 9px; box-shadow: 0 14px 30px rgba(72,48,29,.15); }.detail-status-menu button { color: #5c4430; }.detail-status-menu button:hover, .detail-status-menu button:focus-visible { color: #342315; background: #f3e7da; outline: 0; }
.detail-card { border: 1px solid #e8ddd2; border-radius: 11px; background: rgba(255,255,255,.72); }.detail-facts { gap: 0; margin: 23px 0 13px; overflow: hidden; background: #e8ddd2; border-color: #e8ddd2; }.detail-facts > div { min-height: 70px; padding: 13px 14px; background: #fffdfa; }.detail-facts span, .detail-label { color: #95765e; font-size: 9px; }.detail-facts strong { color: #3a291c; font-size: 14px; }
.detail-section { margin-top: 13px; padding: 15px 16px; border-top: 0; }.detail-tags { margin-top: 9px; }.detail-tags span { color: #5d4430; background: #f9f0e7; border-color: #eadbcb; }.detail-notes { margin-top: 10px; padding: 11px 12px; color: #5c4635; font-size: 13px; line-height: 1.8; background: #fcf8f3; border: 1px solid #f0e6dc; border-radius: 8px; }.detail-notes[contenteditable="true"] { outline-color: #b68c69; outline-offset: 3px; }
.detail-section-heading .detail-description-button { margin-top: 0; }.detail-description-button { color: #7a5134; font-size: 12px; border-bottom-color: #b9987f; }.detail-description-button:hover { color: #422b1a; border-bottom-color: #422b1a; }.detail-description-button:disabled { color: #b7a596; }.detail-description-edit-actions { margin-top: 13px; }.detail-copy .primary { color: #fffaf4; background: #5a4030; }.detail-copy .primary:hover { background: #3f2b1e; }
.detail-empty-original { color: #9b8068; }.detail-original-button { color: #5c4430; background: #f8efe6; border-color: #dcc8b4; border-radius: 7px; }.detail-original-button:hover, .detail-original-button:focus-visible { color: #fff; background: #6a4b35; border-color: #6a4b35; outline: 0; }.detail-source-button { color: #765238; border-bottom-color: #c7a88d; }
.detail-texture-feedback { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 10px; color: #6d4932; font-size: 12px; font-weight: 600; line-height: 1.55; border: 1px solid #e4d5c5; border-radius: 8px; background: #fcf6f0; }
.detail-texture-feedback.is-error { color: #8b3027; border-color: #dfb5ad; background: #fff2f0; }
.detail-texture-feedback.is-error::before { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; content: "!"; color: #fff; font-size: 11px; font-weight: 800; line-height: 17px; text-align: center; background: #a54336; border-radius: 50%; }
.dialog-toast { position: absolute; top: 16px; left: 50%; z-index: 10; max-width: min(520px, calc(100% - 92px)); padding: 11px 15px; transform: translate(-50%, -160%); color: #fffdfa; line-height: 1.45; text-align: center; pointer-events: none; background: #3e2b1d; box-shadow: 0 12px 30px rgba(56, 37, 22, .24); }
.dialog-toast.show { transform: translate(-50%, 0); }
@media (max-width: 860px) { .dialog-toast { top: 11px; max-width: calc(100% - 66px); font-size: 12px; } }
.detail-edit-form { margin-top: 13px; padding: 16px; background: #f8f0e8; border-color: #e4d2c0; border-radius: 11px; }.detail-edit-form label { color: #644936; }.detail-edit-form input, .detail-edit-form select, .detail-edit-form textarea { color: #392819; background: #fffdfa; border-color: #ddcdbd; }.detail-actions { margin-top: 17px; padding-top: 17px; border-top-color: #e9dfd5; }.detail-actions .secondary { color: #5c4430; background: #fffdfa; border-color: #d7c5b3; }.detail-actions .secondary:hover { background: #f4e9de; border-color: #aa8769; }.detail-delete { color: #a44235; background: #fff7f5; border-color: #e4b7af; border-radius: 8px; }.detail-delete:hover:not(:disabled), .detail-delete:focus-visible { color: #fff; background: #a54336; border-color: #a54336; }
.original-preview-stage { background: #f1e7dc; }.original-preview-back { color: #5f4633; background: rgba(255,250,245,.9); border-color: #d8c5b2; }.original-preview-back:hover, .original-preview-back:focus-visible { color: #fff; background: #5e4330; border-color: #5e4330; }
@media (max-width: 860px) { .garment-detail-modal { width: min(100vw - 20px, 620px); height: calc(100dvh - 20px); }.garment-detail-shell { grid-template-columns: 1fr; grid-template-rows: minmax(250px, 39%) minmax(0, 1fr); }.detail-visual { padding: 44px 58px; }.detail-visual > #detail-image { width: min(63%, 360px); height: 78%; }.detail-visual-label { top: 20px; left: 24px; }.detail-visual-caption { right: 24px; bottom: 20px; }.detail-close { top: 15px; right: 16px; }.detail-copy { padding: 27px 23px 34px; }.detail-copy h2 { font-size: clamp(32px, 10vw, 46px); }.detail-status-button > span { display: none; }.detail-section-heading { align-items: flex-start; flex-direction: column; }.detail-edit-form { grid-template-columns: 1fr; } }

/* Denser dossier rhythm: image field left, item record right. */
.garment-detail-modal { width: min(1180px, calc(100vw - 42px)); height: min(720px, calc(100dvh - 34px)); }
.garment-detail-shell { grid-template-columns: 46% 54%; border-radius: 15px; }
.detail-visual { padding: 58px 50px 70px; background: #f8f4ef; border-right: 1px solid #ebe3db; }
.detail-visual::before { inset: 0; border: 0; border-radius: 0; background: linear-gradient(90deg, rgba(255,255,255,.16), transparent 24%); }
.detail-visual > #detail-image { width: min(76%, 350px); height: min(69%, 450px); filter: drop-shadow(0 18px 16px rgba(63,44,27,.12)); }
.detail-visual-label { top: 28px; left: 30px; color: #9b8069; font-size: 8px; }.detail-visual-caption { right: 30px; bottom: 26px; font-size: 8px; }
.detail-close { top: 17px; right: 18px; width: 30px; height: 30px; font-size: 19px; background: transparent; border-color: transparent; box-shadow: none; }
.detail-copy { padding: 27px 28px 34px; background: #fffdfa; }.detail-header { padding-bottom: 16px; }.detail-copy .eyebrow { margin-bottom: 6px; font-size: 9px; }.detail-copy h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; }
.detail-facts { margin: 18px 0 14px; }.detail-facts > div { min-height: 60px; padding: 10px 12px; }.detail-facts span, .detail-label { font-size: 8px; }.detail-facts strong { font-size: 13px; }.detail-status-button { padding: 7px 8px; }
.detail-section { margin-top: 12px; padding: 13px 14px; }.detail-section--styles { padding: 0; border: 0; background: transparent; }.detail-section--styles .detail-label { display: flex; align-items: center; justify-content: space-between; }.detail-section--styles .detail-label::after { content: "可在编辑中调整"; color: #a18670; font-weight: 400; letter-spacing: 0; }.detail-section--styles .detail-tags { margin-top: 8px; }.detail-tags { gap: 6px; }.detail-tags span { padding: 4px 8px; font-size: 11px; }
.detail-section--description { min-height: 126px; }.detail-notes { min-height: 56px; padding: 9px 10px; font-size: 12px; line-height: 1.65; }.detail-section--texture { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }.detail-section--texture .detail-label { grid-column: 1 / -1; }.detail-section--texture .detail-original-list { margin-top: 7px; }.detail-section--texture .detail-description-button { margin-top: 0; }
.detail-edit-form { margin-top: 12px; }.detail-actions { margin-top: 14px; padding-top: 14px; }.detail-delete { padding: 10px 12px; }
@media (max-width: 860px) { .garment-detail-modal { width: min(100vw - 18px, 620px); height: calc(100dvh - 18px); }.garment-detail-shell { grid-template-columns: 1fr; grid-template-rows: minmax(230px, 36%) minmax(0, 1fr); }.detail-visual { padding: 42px 45px 48px; border-right: 0; border-bottom: 1px solid #ebe3db; }.detail-visual > #detail-image { width: min(58%, 310px); height: min(74%, 300px); }.detail-copy { padding: 23px 20px 30px; }.detail-section--texture { grid-template-columns: 1fr; }.detail-section--texture .detail-description-button { margin-top: 9px; } }

/* Editing stays available without interrupting the garment dossier. */
.garment-edit-modal { width: min(680px, calc(100vw - 28px)); max-width: none; margin: auto; padding: 0; overflow: visible; color: #35271f; background: transparent; border: 0; }
.garment-edit-modal::backdrop { background: rgba(47, 35, 26, .38); backdrop-filter: blur(5px); }
.garment-edit-shell { position: relative; padding: 34px; background: #f7efe5; border: 1px solid #dfcbb8; border-radius: 20px; box-shadow: 0 24px 70px rgba(56, 39, 26, .22); }
.garment-edit-shell h2 { margin: 4px 42px 4px 0; font-size: clamp(1.45rem, 3vw, 1.9rem); color: #342218; }
.garment-edit-intro { margin: 0 0 24px; color: #7b6251; font-size: .9rem; }
.garment-edit-close { position: absolute; top: 18px; right: 18px; display: grid; width: 32px; height: 32px; padding: 0; place-items: center; color: #765640; background: transparent; border: 1px solid #decdbd; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.garment-edit-close:hover, .garment-edit-close:focus-visible { color: #fff; background: #684934; border-color: #684934; outline: 0; }
.garment-edit-shell .detail-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; }
.garment-edit-shell .detail-edit-form label { display: grid; gap: 8px; color: #614532; font-weight: 700; }
.garment-edit-shell .detail-edit-form input, .garment-edit-shell .detail-edit-form select { min-height: 48px; padding: 0 14px; color: #38271c; background: rgba(255, 253, 249, .88); border: 1px solid #dbc7b5; border-radius: 13px; }
.garment-edit-shell .detail-edit-form__wide { grid-column: 1 / -1; }
.garment-edit-shell .detail-edit-form__actions { display: flex; gap: 10px; padding-top: 2px; }
@media (max-width: 560px) { .garment-edit-shell { padding: 28px 20px 22px; border-radius: 17px; }.garment-edit-shell .detail-edit-form { grid-template-columns: 1fr; gap: 14px; }.garment-edit-shell .detail-edit-form__wide { grid-column: auto; }.garment-edit-shell .detail-edit-form__actions { flex-direction: column; } }

/* Minimal wardrobe browse: image-led, without card containers. */
body:has(.wardrobe-browser) { background: #fcfbf9; }
body:has(.wardrobe-browser) main { max-width: 1540px; padding-top: clamp(28px, 4vw, 58px); }
.wardrobe-browser { color: #332a24; }.wardrobe-browser-head { align-items: center; margin-bottom: 30px; padding-bottom: 18px; border-bottom: 1px solid #e9e4df; }.wardrobe-browser-head h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.045em; }.wardrobe-browser-head .page-head-actions { gap: 18px; }.wardrobe-browser-head .secondary, .wardrobe-browser-head .primary { padding: 6px 0; color: #5f5147; font: 11px "Cascadia Mono", monospace; letter-spacing: .05em; background: transparent; border: 0; border-radius: 0; box-shadow: none; }.wardrobe-browser-head .primary { color: #332a24; }.wardrobe-browser-head .primary:hover, .wardrobe-browser-head .secondary:hover { color: #a67342; background: transparent; transform: none; box-shadow: none; }
.wardrobe-browser .wardrobe-collection { padding-top: 0; border: 0; }.wardrobe-browser .collection-heading { align-items: baseline; margin-bottom: 0; }.wardrobe-browser .collection-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; letter-spacing: 0; }.wardrobe-browser .collection-heading .eyebrow { display: none; }.wardrobe-browser .category-filter { justify-content: center; gap: clamp(18px, 3vw, 42px); margin: -29px 0 24px; padding: 0 150px; }.wardrobe-browser .category-chip { padding: 3px 0; color: #766a61; font: 11px "Cascadia Mono", monospace; letter-spacing: .06em; background: transparent; border: 0; border-bottom: 1px solid transparent; border-radius: 0; }.wardrobe-browser .category-chip:hover, .wardrobe-browser .category-chip.active { color: #2f2722; background: transparent; border-color: #2f2722; }
.wardrobe-browser .storefront-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }.wardrobe-browser .storefront-card { min-width: 0; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }.wardrobe-browser .storefront-card > img, .wardrobe-browser .garment-missing-image { width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 5; background: #f3f0ed; border: 0; border-radius: 0; object-fit: cover; }.wardrobe-browser .storefront-card > img { transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .3s ease; }.wardrobe-browser .storefront-card:hover > img, .wardrobe-browser .storefront-card:focus-visible > img { filter: brightness(.97); transform: scale(.987); }.wardrobe-browser .garment-card--openable:hover, .wardrobe-browser .garment-card--openable:focus-visible { border: 0; box-shadow: none; outline: 0; transform: none; }.wardrobe-browser .garment-card--openable:focus-visible > img { outline: 2px solid #9d744c; outline-offset: -5px; }.wardrobe-browser .storefront-card .garment-meta { padding: 16px 18px 31px; }.wardrobe-browser .storefront-card h3 { min-height: 0; margin: 0 0 5px; overflow: hidden; color: #342b25; font-size: 14px; font-weight: 650; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }.wardrobe-browser .storefront-card .garment-meta > p { margin: 0; overflow: hidden; color: #7c6f65; font: 11px/1.45 "Cascadia Mono", monospace; letter-spacing: .02em; white-space: nowrap; text-overflow: ellipsis; }.wardrobe-browser .wardrobe-empty { min-height: 280px; background: #f4f1ee; border: 0; border-radius: 0; }
@media (max-width: 860px) { .wardrobe-browser .storefront-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.wardrobe-browser .category-filter { justify-content: flex-start; margin: 16px 0 19px; padding: 0; }.wardrobe-browser .collection-heading { margin-bottom: 0; } }
@media (max-width: 560px) { .wardrobe-browser-head { align-items: flex-start; gap: 15px; }.wardrobe-browser .storefront-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }.wardrobe-browser .storefront-card .garment-meta { padding: 11px 9px 23px; }.wardrobe-browser .storefront-card h3 { font-size: 13px; }.wardrobe-browser .category-filter { gap: 16px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }.wardrobe-browser .category-chip { flex: none; } }

/* The collection's primary action needs to be visible at a glance. */
.wardrobe-browser-head .page-head-actions {
  margin-left: auto;
}

.wardrobe-browser-head .page-head-actions .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  color: #fffdfa;
  font: 700 13px "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  letter-spacing: .03em;
  background: #342820;
  border: 1px solid #342820;
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(52, 40, 32, .15);
}

.wardrobe-browser-head .page-head-actions .primary:hover:not(:disabled) {
  color: #fffdfa;
  background: #8b5137;
  border-color: #8b5137;
  box-shadow: 0 12px 22px rgba(91, 55, 37, .2);
  transform: translateY(-1px);
}

.wardrobe-browser-head .page-head-actions .primary:focus-visible {
  outline: 3px solid rgba(166, 83, 61, .36);
  outline-offset: 3px;
}

.modal-form .garment-name-field {
  gap: 8px;
}

.modal-form .garment-name-field small {
  margin-top: 1px;
  color: #7b7068;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.wardrobe-browser .wardrobe-search { position: relative; width: min(480px, 100%); margin: 22px auto 8px; }
.wardrobe-browser .wardrobe-search .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wardrobe-browser .wardrobe-search input { width: 100%; min-height: 46px; padding: 0 42px 0 15px; color: #342b25; font: 13px "Microsoft YaHei UI", "PingFang SC", sans-serif; background: #fff; border: 1px solid #ddd5ce; border-radius: 999px; box-shadow: 0 5px 18px rgba(58,43,32,.05); }
.wardrobe-browser .wardrobe-search input:focus { border-color: #8b5137; outline: 3px solid rgba(166,83,61,.14); }
.wardrobe-search-clear { position: absolute; top: 50%; right: 11px; width: 25px; height: 25px; padding: 0; color: #806f63; font-size: 19px; line-height: 1; background: transparent; border: 0; border-radius: 50%; cursor: pointer; transform: translateY(-50%); }
.wardrobe-search-clear:hover, .wardrobe-search-clear:focus-visible { color: #342b25; background: #eee8e2; outline: 0; }
.wardrobe-browser .wardrobe-search-status { min-height: 18px; margin: 0 auto 8px; color: #806f63; font: 11px "Cascadia Mono", monospace; text-align: center; }
.wardrobe-browser .wardrobe-search-more { display: block; min-width: 132px; margin: 14px auto 32px; }
.wardrobe-browser .wardrobe-search-empty { grid-column: 1 / -1; min-height: 180px; }

@media (max-width: 560px) {
  .wardrobe-browser-head {
    width: 100%;
  }

  .wardrobe-browser-head .page-head-actions {
    width: 100%;
    margin-left: 0;
  }

  .wardrobe-browser-head .page-head-actions .primary {
    width: 100%;
    min-height: 52px;
  }

  .wardrobe-browser .wardrobe-search { margin-top: 18px; }
}
