:root {
  color-scheme: dark;
  --bg: #080a0d;
  --surface: #14191f;
  --surface-raised: #1a2027;
  --surface-soft: #101419;
  --input: #11171d;
  --text: #f4f5f6;
  --muted: #a7b0b9;
  --weak: #737e89;
  --border: #29313a;
  --button: #28313b;
  --accent: #d9e0e5;
  --success: #91b7a1;
  --radius: 16px;
  --dock-height: 120px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #d7e0e8; outline-offset: 3px; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 18px); }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 32px; min-height: 76px; padding: 12px max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid rgba(255,255,255,.055); background: rgba(8,10,13,.96); }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #3a444e; border-radius: 12px; color: #e4e8eb; }
.brand-mark svg { width: 25px; height: 25px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-size: 17px; font-weight: 650; letter-spacing: .06em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .13em; }
.top-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link { min-height: 42px; padding: 0 17px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 14px; }
.nav-link:hover, .nav-link.active { background: #1b2229; color: var(--text); }
.avatar-button { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%; background: #202832; font-size: 13px; }
.main-content { width: min(100% - 48px, 1080px); margin: 0 auto; }
.page { display: none; padding: 42px 0 38px; animation: page-in .16s ease-out; }
.page.active { display: block; }
@keyframes page-in { from { opacity: .7; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 8px 0 30px; }
.eyebrow { margin: 0 0 11px; color: var(--weak); font-size: 10px; font-weight: 650; letter-spacing: .18em; line-height: 1.5; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(29px, 4.5vw, 43px); font-weight: 620; letter-spacing: -.045em; line-height: 1.22; }
h1 span { color: #aeb8c1; }
h2 { margin-bottom: 0; font-size: 21px; font-weight: 620; letter-spacing: -.025em; }
.subheading { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid #39434e; border-radius: 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.primary-button { background: #dbe1e6; color: #101419; border-color: #dbe1e6; }
.primary-button:hover { background: #fff; }
.secondary-button { background: #202831; color: var(--text); border-color: var(--border); }
.plus-glyph { font-size: 19px; font-weight: 400; line-height: 1; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 43px; }
.summary-card { min-height: 118px; padding: 21px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.summary-label { color: var(--muted); font-size: 12px; }
.summary-value { display: flex; align-items: baseline; gap: 7px; margin-top: 11px; }
.summary-value strong { font-size: 31px; font-weight: 610; letter-spacing: -.045em; }
.summary-value span { color: var(--muted); font-size: 12px; }
.progress-track { overflow: hidden; height: 4px; margin-top: 12px; border-radius: 10px; background: #2c333b; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #b5c0c9; }
.content-section { margin-top: 0; margin-bottom: 43px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.text-button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 8px 0 3px 8px; }
.text-button span { margin-left: 5px; }
.text-button:hover { color: var(--text); }
.section-note { color: var(--weak); font-size: 11px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.category-tile { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; transition: background .14s ease, border-color .14s ease; }
.category-tile:hover, .category-tile.selected { border-color: #59636d; background: #1b222a; }
.category-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid #323b44; border-radius: 12px; color: #c6cfd6; }
.category-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.category-meta { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.category-meta strong { font-size: 13px; font-weight: 580; }
.category-meta small { color: var(--weak); font-size: 11px; }
.clothing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.clothing-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.clothing-visual { position: relative; display: grid; overflow: hidden; aspect-ratio: 1 / 1.03; place-items: center; background: #1b2026; }
.clothing-visual.tone-1 { background: #1d2429; }
.clothing-visual.tone-2 { background: #25272a; }
.clothing-visual.tone-3 { background: #20252c; }
.clothing-visual.tone-4 { background: #282622; }
.clothing-visual img { width: 100%; height: 100%; object-fit: cover; }
.garment-art { width: 59%; max-width: 120px; height: 66%; color: #aeb7be; opacity: .86; filter: drop-shadow(0 7px 5px rgba(0,0,0,.16)); }
.garment-art path, .garment-art rect, .garment-art circle, .garment-art line { vector-effect: non-scaling-stroke; }
.favorite-toggle { position: absolute; top: 10px; right: 10px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(9,12,15,.68); color: #e0e4e8; font-size: 18px; line-height: 1; }
.favorite-toggle.is-favorite { color: #f1c3c5; }
.item-detail-button { display: block; width: 100%; padding: 13px 13px 15px; border: 0; background: transparent; text-align: left; }
.item-name { display: block; overflow: hidden; margin-bottom: 7px; font-size: 13px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.item-meta .location-pin { flex: 0 0 auto; color: var(--weak); }
.prototype-note { display: flex; align-items: center; gap: 8px; margin: 2px 0 5px; color: var(--weak); font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #7f9f8a; }
.page-heading { margin: 10px 0 28px; }
.page-heading h1 { margin-bottom: 9px; }
.category-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 38px; }
.category-list .category-tile { min-height: 72px; }
.filtered-results { padding-top: 25px; border-top: 1px solid var(--border); }
.filtered-results .section-heading { align-items: center; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.profile-avatar { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #48535e; border-radius: 50%; background: #252d36; font-size: 16px; }
.profile-card strong { font-size: 15px; }
.profile-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.demo-pill { margin-left: auto; padding: 6px 9px; border: 1px solid #38434c; border-radius: 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.settings-list { overflow: hidden; margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.settings-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 77px; padding: 13px 17px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; }
.settings-row:last-child { border-bottom: 0; }
.settings-row:hover { background: #1b2229; }
.settings-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border: 1px solid #323b44; border-radius: 11px; color: #c8d0d7; font-size: 19px; }
.settings-row > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.settings-row strong { font-size: 13px; font-weight: 570; }
.settings-row small { color: var(--muted); font-size: 11px; }
.settings-row b { color: var(--weak); font-size: 21px; font-weight: 400; }
.privacy-note { margin-top: 17px; padding: 17px 18px; border: 1px solid #2b353e; border-radius: 13px; background: #10151a; }
.privacy-note strong { font-size: 12px; font-weight: 570; }
.privacy-note p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.bottom-dock { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; min-height: calc(var(--dock-height) + env(safe-area-inset-bottom)); padding: 10px max(24px, calc((100vw - 760px) / 2)) calc(10px + env(safe-area-inset-bottom)); background: var(--bg); }
.dock-add-button { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #d9e0e5; }
.dock-add-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dock-add-button:hover, .dock-add-button[aria-expanded="true"] { background: #303943; border-color: #64717d; }
.search-form { display: flex; flex-direction: column; gap: 4px; width: min(100%, 760px); min-width: 0; min-height: 58px; flex: 1; padding: 8px 10px; border: 1px solid #343d46; border-radius: 28px; background: #151a20; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: width .18s ease, flex-basis .18s ease, border-color .14s ease; }
.search-form:focus-within { border-color: #59646f; }
.search-form textarea { display: block; align-self: center; width: 100%; min-width: 0; min-height: 38px; max-height: 144px; margin-block: auto; padding: 8px 5px 3px; border: 0; outline: 0; resize: none; overflow-x: hidden; overflow-y: hidden; background: transparent; color: var(--text); font-size: 17px; line-height: 1.45; text-align: center; }
.search-form textarea::placeholder { color: #929ca6; opacity: 1; }
.search-actions { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; }
.action-spacer { flex: 1 1 auto; }
.dock-hint { color: #707b86; font-size: 10px; user-select: none; }
/* 空输入时收拢为一行；输入内容后自动展开为上下两层。 */
.search-form:has(#wardrobe-query:placeholder-shown) { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 44px; align-items: center; gap: 7px; min-height: 58px; width: min(calc(100% - 44px), 700px); max-width: 700px; flex: 0 1 calc(100% - 44px); margin-inline: auto; padding: 5px 9px; border-radius: 30px; }
.search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query { grid-column: 2; grid-row: 1; align-self: center; min-height: 40px; max-height: 40px; margin-block: auto; padding: 0 3px; font-size: 17px; line-height: 40px; text-align: center; }
.search-form:has(#wardrobe-query:placeholder-shown) .search-actions { display: contents; }
.search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button { grid-column: 1; grid-row: 1; }
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button { grid-column: 3; grid-row: 1; }
.search-form:has(#wardrobe-query:placeholder-shown) .send-button { grid-column: 4; grid-row: 1; width: 38px; height: 38px; border-radius: 50%; justify-self: center; }
.search-form:has(#wardrobe-query:placeholder-shown) .dock-hint,
.search-form:has(#wardrobe-query:placeholder-shown) .action-spacer { display: none; }
.search-form textarea::placeholder { color: #77818b; }
.icon-button { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #d9e0e5; }
.mic-button { border: 0; background: transparent; }
.icon-button:hover { background: #252d35; }
.icon-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.send-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.send-button { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: #d9e0e5; color: #14191f; }
.send-button:hover { background: white; }
.person-popover { position: absolute; bottom: calc(100% - 3px + env(safe-area-inset-bottom)); left: max(24px, calc((100vw - 1080px) / 2)); width: min(310px, calc(100vw - 32px)); padding: 17px; border: 1px solid #39434c; border-radius: 16px; background: #171d23; box-shadow: 0 16px 48px rgba(0,0,0,.42); }
.popover-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.popover-heading strong { font-size: 13px; }
.popover-heading button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 22px; }
.person-options { display: flex; flex-wrap: wrap; gap: 8px; }
.person-option { min-height: 39px; padding: 0 13px; border: 1px solid #37414a; border-radius: 11px; background: #20272f; color: var(--muted); font-size: 12px; }
.person-option.selected { border-color: #8c9aa6; background: #dbe1e6; color: #12171c; }
.add-member-button { width: 100%; margin-top: 13px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--muted); text-align: left; font-size: 12px; }
.search-query-banner { margin-bottom: 18px; padding: 15px 17px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: #e2e6e9; font-size: 14px; line-height: 1.6; }
.search-results { display: grid; gap: 12px; }
.search-result-row { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.search-result-row .clothing-visual { width: 82px; height: 86px; flex: 0 0 auto; border-radius: 10px; }
.search-result-copy { min-width: 0; flex: 1; }
.search-result-copy strong { display: block; margin-bottom: 7px; font-size: 14px; }
.search-result-copy p { margin: 0 0 5px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.search-result-copy p:last-child { margin-bottom: 0; }
.empty-state { padding: 46px 18px; border: 1px dashed #39434d; border-radius: 16px; text-align: center; }
.empty-symbol { margin-bottom: 12px; color: #9ba7b1; font-size: 34px; }
.empty-state h2 { margin-bottom: 9px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.hidden { display: none !important; }
.app-dialog { width: min(560px, calc(100% - 28px)); max-height: min(88dvh, 760px); overflow-y: auto; padding: 24px; border: 1px solid #39434c; border-radius: 20px; background: #14191f; color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.app-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.dialog-header .eyebrow { margin-bottom: 6px; }
.dialog-header h2 { font-size: 23px; }
.close-dialog { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: #20272e; color: var(--muted); font-size: 23px; line-height: 1; }
.photo-upload { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 142px; margin-bottom: 18px; border: 1px dashed #48535e; border-radius: 14px; background: #10151a; text-align: center; cursor: pointer; }
.upload-symbol { display: grid; width: 34px; height: 34px; margin-bottom: 9px; place-items: center; border: 1px solid #3d4852; border-radius: 11px; color: #d1d9df; font-size: 22px; }
.photo-upload strong { font-size: 12px; font-weight: 570; }
.photo-upload small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.photo-upload input { width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; color: #d2d8dd; font-size: 12px; }
.form-grid input, .form-grid select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #303a43; border-radius: 11px; background: #0e1318; color: var(--text); font-size: 13px; }
.form-grid input::placeholder { color: #6e7983; }
.wide-field { grid-column: 1 / -1; }
.form-hint { margin: 13px 0 0; color: var(--weak); font-size: 10px; line-height: 1.7; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.info-body { color: var(--muted); font-size: 13px; line-height: 1.8; }
.info-body ul { padding-left: 20px; }
.info-body li { margin: 6px 0; }
.toast { position: fixed; z-index: 60; bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 15px); left: 50%; max-width: calc(100vw - 32px); padding: 11px 16px; transform: translate(-50%, 8px); border: 1px solid #414c56; border-radius: 12px; background: #242c34; color: #f1f3f5; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1200px) { .main-content { width: min(100% - 64px, 1080px); } }
@media (max-width: 820px) {
  .topbar { min-height: 68px; gap: 16px; padding: 10px 20px; }
  .top-nav { gap: 1px; }
  .nav-link { min-height: 39px; padding: 0 11px; font-size: 13px; }
  .main-content { width: calc(100% - 40px); }
  .page { padding-top: 30px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clothing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
  .bottom-dock { padding-right: 20px; padding-left: 20px; }
  .person-popover { left: 20px; }
}
@media (max-width: 560px) {
  :root { --dock-height: 120px; }
  .app-shell { padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 20px); }
  .topbar { min-height: 64px; gap: 8px; padding: 9px 14px; }
  .brand { gap: 7px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 10px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 9px; letter-spacing: .08em; }
  .top-nav { gap: 0; }
  .nav-link { min-height: 36px; padding: 0 8px; border-radius: 9px; font-size: 12px; }
  .avatar-button { display: none; }
  .main-content { width: calc(100% - 30px); }
  .page { padding-top: 27px; }
  .welcome-row { align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .welcome-row h1 { font-size: clamp(27px, 7.5vw, 34px); }
  .welcome-row .eyebrow { font-size: 9px; letter-spacing: .14em; }
  .welcome-row .subheading { max-width: 260px; font-size: 12px; }
  .add-top { min-height: 40px; margin-top: 22px; padding: 0 10px; border-radius: 10px; font-size: 11px; }
  .add-top .plus-glyph { font-size: 16px; }
  .summary-grid { gap: 10px; margin-bottom: 32px; }
  .summary-card { min-height: 103px; padding: 16px; border-radius: 14px; }
  .summary-value strong { font-size: 28px; }
  .content-section { margin-bottom: 34px; }
  .section-heading { margin-bottom: 14px; }
  h2 { font-size: 19px; }
  .category-grid { gap: 9px; }
  .category-tile { min-height: 69px; gap: 9px; padding: 11px 10px; border-radius: 12px; }
  .category-icon { width: 35px; height: 35px; border-radius: 10px; }
  .category-icon svg { width: 21px; height: 21px; }
  .category-meta strong { font-size: 12px; }
  .category-meta small { font-size: 10px; }
  .clothing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item-detail-button { padding: 11px 10px 13px; }
  .item-name { font-size: 12px; }
  .item-meta { font-size: 10px; }
  .favorite-toggle { top: 8px; right: 8px; width: 31px; height: 31px; }
  .prototype-note { align-items: flex-start; line-height: 1.6; }
  .prototype-note .status-dot { margin-top: 4px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 32px; }
  .category-list { grid-template-columns: 1fr; gap: 8px; margin-bottom: 30px; }
  .category-list .category-tile { min-height: 65px; }
  .profile-card { gap: 11px; padding: 15px; }
  .profile-avatar { width: 44px; height: 44px; }
  .demo-pill { padding: 5px 7px; font-size: 9px; }
  .settings-row { min-height: 72px; gap: 11px; padding: 12px; }
  .settings-icon { width: 36px; height: 36px; }
  .settings-row small { max-width: 245px; line-height: 1.5; }
  .bottom-dock { min-height: calc(var(--dock-height) + env(safe-area-inset-bottom)); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .dock-add-button { width: 42px; height: 42px; border-radius: 50%; }
  .search-form { min-height: 58px; gap: 3px; padding: 7px 8px; border-radius: 25px; }
  .search-form textarea { min-height: 38px; padding: 8px 4px 3px; font-size: 17px; text-align: center; }
  .search-actions { min-height: 40px; gap: 8px; }
  .dock-hint { font-size: 10px; }
  .search-form:has(#wardrobe-query:placeholder-shown) { grid-template-columns: 42px minmax(0,1fr) 42px 42px; gap: 5px; min-height: 56px; padding: 4px 7px; border-radius: 28px; }
  .search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query { align-self: center; min-height: 40px; max-height: 40px; margin-block: auto; padding: 0 3px; font-size: 16px; line-height: 40px; text-align: center; }
  .icon-button { width: 42px; height: 42px; border-radius: 50%; }
  .dock-add-button svg, .icon-button svg, .send-button svg { width: 24px; height: 24px; }
  .send-button { width: 38px; height: 38px; margin-left: 0; border-radius: 50%; }
  .person-popover { display: none; }
  .app-dialog { padding: 19px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .wide-field { grid-column: auto; }
  .dialog-actions .primary-button, .dialog-actions .secondary-button { flex: 1; }
  .search-result-row { gap: 11px; padding: 9px; }
  .search-result-row .clothing-visual { width: 74px; height: 78px; }
}
@media (max-width: 370px) {
  .brand-copy small { display: none; }
  .topbar { gap: 5px; padding-right: 9px; padding-left: 9px; }
  .nav-link { padding: 0 6px; font-size: 11px; }
  .main-content { width: calc(100% - 24px); }
  .welcome-row { flex-direction: column; align-items: flex-start; }
  .add-top { margin-top: 0; }
  .bottom-dock { padding-right: 8px; padding-left: 8px; }
  .dock-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.detail-preview { display:flex; align-items:center; gap:14px; margin-bottom:18px; padding:12px; border:1px solid var(--border); border-radius:13px; background:#10151a; }
.detail-preview .clothing-visual { width:78px; height:82px; flex:0 0 auto; border-radius:10px; }
.detail-name { display:block; margin-bottom:8px; color:var(--text); font-size:15px; font-weight:600; }
.detail-badge { display:inline-flex; padding:5px 8px; border:1px solid #35404a; border-radius:7px; color:var(--muted); font-size:10px; }
.detail-list { margin:0; border:1px solid var(--border); border-radius:13px; overflow:hidden; }
.detail-list > div { display:grid; grid-template-columns:88px minmax(0,1fr); gap:12px; padding:12px 13px; border-bottom:1px solid var(--border); }
.detail-list > div:last-child { border-bottom:0; }
.detail-list dt { color:var(--weak); font-size:12px; }
.detail-list dd { min-width:0; margin:0; color:#e2e6e9; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.result-arrow { color:var(--weak); font-size:23px; }


/* 搜索输入框精简：文字区与操作区分行，图标列固定，输入前后不横向跳位。 */
.search-form {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px 40px;
  grid-template-rows: minmax(34px, auto) 38px;
  align-items: center;
  gap: 2px 5px;
  min-height: 0;
  padding: 5px 7px;
}
.search-form textarea,
.search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  min-height: 34px;
  max-height: 112px;
  margin: 0;
  padding: 3px 4px;
  line-height: 1.4;
  text-align: center;
}
.search-form:has(#wardrobe-query:placeholder-shown) {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px 40px;
  grid-template-rows: 40px;
  gap: 4px;
  width: min(calc(100% - 44px), 700px);
  min-height: 50px;
  padding: 4px 6px;
}
.search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
  grid-column: 2;
  grid-row: 1;
  min-height: 36px;
  max-height: 36px;
  margin: 0;
  padding: 0 2px;
  font-size: 16px;
  line-height: 36px;
  text-align: center;
}
.search-form .search-actions { display: contents; }
.search-form .dock-add-button { grid-column: 1; grid-row: 2; justify-self: center; }
.search-form .mic-button { grid-column: 3; grid-row: 2; justify-self: center; }
.search-form .send-button { grid-column: 4; grid-row: 2; justify-self: center; width: 34px; height: 34px; }
.search-form .send-button svg { width: 18px; height: 18px; }
.search-form .action-spacer,
.search-form .dock-hint { display: none; }
.search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button { grid-row: 1; }
.search-form:has(#wardrobe-query:placeholder-shown) .send-button { grid-row: 1; width: 34px; height: 34px; }
.search-form:has(#wardrobe-query:placeholder-shown) .send-button svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .search-form {
    grid-template-columns: 38px minmax(0, 1fr) 38px 38px;
    grid-template-rows: minmax(32px, auto) 36px;
    gap: 2px 4px;
    padding: 4px 5px;
    border-radius: 23px;
  }
  .search-form textarea,
  .search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
    min-height: 32px;
    max-height: 108px;
    padding: 2px 3px;
    font-size: 16px;
    line-height: 1.4;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) {
    grid-template-columns: 38px minmax(0, 1fr) 38px 38px;
    grid-template-rows: 36px;
    gap: 3px;
    min-height: 46px;
    padding: 3px 5px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
    min-height: 34px;
    max-height: 34px;
    padding: 0 2px;
    font-size: 16px;
    line-height: 34px;
  }
  .search-form .dock-add-button,
  .search-form .mic-button { width: 36px; height: 36px; }
  .search-form .dock-add-button svg,
  .search-form .mic-button svg { width: 22px; height: 22px; }
  .search-form .send-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .send-button { width: 32px; height: 32px; }
  .search-form .send-button svg,
  .search-form:has(#wardrobe-query:placeholder-shown) .send-button svg { width: 17px; height: 17px; }
}


/* 输入内容后从输入框左侧开始显示；仅空状态提示语保持居中。 */
.search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
  text-align: left;
}


/* 输入状态左右留白加大，避免文字贴近搜索框边缘。 */
.search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
  padding-left: 12px;
  padding-right: 12px;
}
@media (max-width: 560px) {
  .search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
    padding-left: 10px;
    padding-right: 10px;
  }
}


/* 输入文字适度放大，多行展开时增加上下内边距，避免文字贴近上边框。 */
.search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
  font-size: 18px;
  line-height: 1.5;
  padding-top: 9px;
  padding-bottom: 9px;
}
@media (max-width: 560px) {
  .search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
    font-size: 17px;
    line-height: 1.5;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}


/* 底部搜索区悬浮在页面内容上方，不再铺设黑色底板或输入框底色。 */
.bottom-dock {
  background: transparent;
}
.search-form,
.search-form:focus-within {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}


/* 保留搜索输入框清晰可见的边框，但不恢复黑色底板。 */
.search-form,
.search-form:focus-within {
  border: 1px solid #46515c;
  background: transparent;
  box-shadow: none;
}
.search-form:focus-within {
  border-color: #7b8996;
}


/* 输入框恢复低对比度灰色底板；底部悬浮容器本身仍保持透明。 */
.search-form,
.search-form:focus-within {
  background: #20262d;
  border: 1px solid #46515c;
  box-shadow: none;
}
.search-form:focus-within {
  background: #232a32;
  border-color: #7b8996;
}


/* 输入框改为更深的近黑色底板，与页面背景拉开层次；聚焦时仅轻微提亮。 */
.search-form,
.search-form:focus-within {
  background: #101419;
  border-color: #39434d;
  box-shadow: none;
}
.search-form:focus-within {
  background: #12171d;
  border-color: #66727e;
}


/* 底部输入框：单行保持紧凑，仅多行时随内容增高，并与手机边缘留出稳定间距。 */
.bottom-dock {
  padding-right: max(16px, calc((100vw - 700px) / 2));
  padding-left: max(16px, calc((100vw - 700px) / 2));
}
.search-form,
.search-form:has(#wardrobe-query:placeholder-shown) {
  width: 100%;
  max-width: 660px;
  min-width: 0;
  flex: 1 1 auto;
  margin-inline: auto;
}
.search-form textarea,
.search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
  box-sizing: border-box;
  min-height: 32px;
  max-height: 112px;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.5;
}
.search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 32px;
}
@media (max-width: 560px) {
  .bottom-dock {
    padding-right: 16px;
    padding-left: 16px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) {
    width: 100%;
    min-height: 46px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    line-height: 30px;
  }
  .search-form textarea,
  .search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
    min-height: 30px;
    max-height: 108px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 17px;
    line-height: 1.5;
  }
}
@media (max-width: 370px) {
  .bottom-dock {
    padding-right: 12px;
    padding-left: 12px;
  }
}


/* 最终收口：空输入更矮；单行输入保持一行高度，真正换行后再增高；手机两侧留足空间。 */
.bottom-dock {
  box-sizing: border-box;
  padding-left: max(22px, calc((100vw - 660px) / 2));
  padding-right: max(22px, calc((100vw - 660px) / 2));
}
.search-form {
  box-sizing: border-box;
  width: 100%;
  max-width: 620px;
  min-width: 0;
  margin-inline: auto;
}
.search-form #wardrobe-query {
  box-sizing: border-box;
  display: block;
  min-height: 30px;
  max-height: 108px;
  padding: 2px 10px;
  font-size: 17px;
  line-height: 25px;
}
.search-form:has(#wardrobe-query:placeholder-shown) {
  min-height: 40px;
  padding: 3px 5px;
  grid-template-rows: 32px;
  gap: 3px;
}
.search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
  height: 30px !important;
  min-height: 30px;
  max-height: 30px;
  padding: 0 6px;
  line-height: 30px;
}
@media (max-width: 560px) {
  .bottom-dock {
    padding-left: 22px;
    padding-right: 22px;
  }
  .search-form {
    max-width: none;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) {
    min-height: 40px;
    grid-template-columns: 32px minmax(0, 1fr) 32px 32px;
    grid-template-rows: 32px;
    gap: 2px;
    padding: 3px 4px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
    height: 30px !important;
    min-height: 30px;
    max-height: 30px;
    padding: 0 4px;
    font-size: 16px;
    line-height: 30px;
  }
  .search-form .dock-add-button,
  .search-form .mic-button {
    width: 30px;
    height: 30px;
  }
  .search-form .dock-add-button svg,
  .search-form .mic-button svg {
    width: 19px;
    height: 19px;
  }
  .search-form .send-button {
    width: 28px;
    height: 28px;
  }
  .search-form .send-button svg {
    width: 16px;
    height: 16px;
  }
}
@media (max-width: 370px) {
  .bottom-dock {
    padding-left: 18px;
    padding-right: 18px;
  }
}


/* 微调：输入单行略微加高；语音按钮与发送箭头之间留出更明显的间距。 */
.search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
  min-height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
  line-height: 25px;
}
.search-form {
  column-gap: 8px;
}
.search-form:has(#wardrobe-query:placeholder-shown) {
  column-gap: 6px;
}
@media (max-width: 560px) {
  .search-form:has(#wardrobe-query:not(:placeholder-shown)) #wardrobe-query {
    min-height: 34px;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 25px;
  }
  .search-form {
    column-gap: 8px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) {
    column-gap: 6px;
  }
}


/* 空输入状态：收窄外框、略增高度；三个操作按钮统一尺寸与间距。 */
.search-form:has(#wardrobe-query:placeholder-shown) {
  width: min(calc(100% - 64px), 520px);
  max-width: 520px;
  min-height: 50px;
  grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
  grid-template-rows: 40px;
  column-gap: 8px;
  row-gap: 0;
  padding: 4px 8px;
  border-radius: 25px;
}
.search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
  height: 38px !important;
  min-height: 38px;
  max-height: 38px;
  line-height: 38px;
  padding: 0 4px;
}
.search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button,
.search-form:has(#wardrobe-query:placeholder-shown) .send-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  justify-self: center;
}
.search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button svg,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button svg,
.search-form:has(#wardrobe-query:placeholder-shown) .send-button svg {
  width: 19px;
  height: 19px;
}
@media (max-width: 560px) {
  .search-form:has(#wardrobe-query:placeholder-shown) {
    width: calc(100% - 64px);
    max-width: 520px;
    min-height: 50px;
    grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
    grid-template-rows: 40px;
    column-gap: 8px;
    row-gap: 0;
    padding: 4px 8px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) #wardrobe-query {
    height: 38px !important;
    min-height: 38px;
    max-height: 38px;
    line-height: 38px;
    padding: 0 4px;
    font-size: 16px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .mic-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .send-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button svg,
  .search-form:has(#wardrobe-query:placeholder-shown) .mic-button svg,
  .search-form:has(#wardrobe-query:placeholder-shown) .send-button svg {
    width: 19px;
    height: 19px;
  }
}
@media (max-width: 370px) {
  .search-form:has(#wardrobe-query:placeholder-shown) {
    width: calc(100% - 48px);
    column-gap: 5px;
    grid-template-columns: 32px minmax(0, 1fr) 32px 32px;
  }
  .search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .mic-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .send-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
}


/* 底部输入区：加号与麦克风图标略微放大，并加粗线条；按钮触控尺寸与发送按钮保持不变。 */
.search-form .dock-add-button svg,
.search-form .mic-button svg,
.search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button svg,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.4;
}


/* 微调底部麦克风位置：向左靠近输入文字区，按钮尺寸保持不变。 */
.search-form .mic-button,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button {
  transform: translateX(-7px);
}


/* 增大加号与麦克风的触控区域；窄屏同步调整网格，避免挤压或重叠。 */
.search-form .dock-add-button,
.search-form .mic-button,
.search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
}

.search-form .mic-button,
.search-form:has(#wardrobe-query:placeholder-shown) .mic-button {
  transform: translateX(-10px);
}

@media (max-width: 520px) {
  .search-form:has(#wardrobe-query:placeholder-shown) {
    grid-template-columns: 42px minmax(0, 1fr) 42px 42px;
  }
}

@media (max-width: 370px) {
  .search-form:has(#wardrobe-query:placeholder-shown) {
    grid-template-columns: 36px minmax(0, 1fr) 36px 36px;
  }
  .search-form .dock-add-button,
  .search-form .mic-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .dock-add-button,
  .search-form:has(#wardrobe-query:placeholder-shown) .mic-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}
