.brand-library-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 0;
}

.brand-library-btn-row .btn {
  min-height: 38px;
  font-size: 0.98rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-sizing: border-box;
}

.brand-multiselect-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  transition: background 0.15s;
  font-size: 0.96rem;
  font-weight: 700;
  gap: 4px;
  padding: 0 8px;
}
.brand-multiselect-btn[aria-pressed="true"] {
  background: #19735f;
}
.brand-multiselect-btn:hover, .brand-multiselect-btn:focus-visible {
  background: #218c76;
}
.brand-multiselect-btn #brandMultiSelectIcon {
  font-size: 1.18em;
  margin-right: 2px;
  vertical-align: -2px;
}
.brand-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-library-header h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.icon-btn {
  border: none;
  background: transparent;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18rem;
  color: #6c5d46;
  cursor: pointer;
  transition: background 0.15s;
  margin-left: 2px;
}
.icon-btn:hover, .icon-btn:focus-visible {
  background: #f6ead7;
}
.icon-btn[aria-pressed="true"] {
  background: #e7f2ee;
  color: #19735f;
}
:root {
  --bg: #f5efe2;
  --bg-soft: #fffaf2;
  --card: rgba(255, 255, 255, 0.84);
  --text: #1d1d1f;
  --muted: #5f5a52;
  --accent: #1f6f5f;
  --accent-strong: #0f4f43;
  --outline: #cfc2ab;
  --warn: #a83f29;
  --shadow: 0 10px 26px rgba(31, 25, 15, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background: linear-gradient(175deg, var(--bg) 0%, #f0e6d4 44%, #efe7dd 100%);
  padding: 16px 14px 90px;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.52;
}

.bg-shape-a {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 35% 35%, #ffca73, #d77e49);
  top: -44px;
  right: -56px;
}

.bg-shape-b {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 40% 40%, #8bc2a8, #579d8f);
  left: -100px;
  bottom: 120px;
}

.app-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.hero {
  position: relative;
  background: linear-gradient(145deg, #244640 0%, #153a35 100%);
  color: #fef7ee;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  animation: rise-in 420ms ease;
}

.hero__eyebrow,
.hero__title,
.hero__subtitle {
  max-width: calc(100% - 104px);
}

.hero__eyebrow {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.86;
}

.hero__title {
  margin: 8px 0 4px;
  font-size: 1.9rem;
  line-height: 1.1;
}

.hero__subtitle {
  margin: 0 0 14px;
  color: rgba(254, 247, 238, 0.88);
  line-height: 1.5;
}

.view-tabs {
  display: inline-flex;
  gap: 6px;
  background: rgba(254, 247, 238, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 0;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  margin-top: 6px;
}

.hero-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.tab-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 34px;
  background: transparent;
  color: #fef7ee;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.is-active {
  background: #fef7ee;
  color: #1b433b;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}

.hero-actions > * {
  flex: 1 1 0;
  min-width: 0;
}

.hero-actions .btn,
.hero-actions .btn--menu {
  min-height: 34px;
  min-width: 0;
  padding: 0 8px;
  font-size: 0.78rem;
}

.hero-actions > .io-menu {
  min-width: 0;
}

.hero-actions > .io-menu > summary {
  width: 100%;
}

.hero-actions.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.io-menu {
  position: relative;
}

.io-menu summary {
  list-style: none;
}

.io-menu summary::-webkit-details-marker {
  display: none;
}

.btn--menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 94px;
  padding: 0 12px;
  border: 1px solid rgba(254, 247, 238, 0.5);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  text-align: center;
  line-height: 1;
}

.io-menu[open] .btn--menu {
  background: rgba(255, 255, 255, 0.22);
}

.io-menu__list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 3;
  min-width: 170px;
  border-radius: 10px;
  border: 1px solid #d9cab3;
  background: #fff9ef;
  box-shadow: 0 10px 24px rgba(25, 20, 10, 0.2);
  overflow: hidden;
}

.io-menu__item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 11px;
  color: #2f2a22;
  cursor: pointer;
}

.io-menu__item + .io-menu__item {
  border-top: 1px solid #efe4d0;
}

.io-menu__item:hover {
  background: #f7eddb;
}

.weather-widget {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  width: 88px;
  height: 88px;
  padding: 8px 8px 6px;
  flex: 0 0 auto;
}

.weather-widget__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.weather-widget__text {
  color: rgba(254, 247, 238, 0.96);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
}

.weather-widget__refresh {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  padding: 14px;
  background: var(--card);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow);
  animation: rise-in 520ms ease;
}

#wardrobePanel,
#filterPanel,
#listPanel,
#recommendPanel {
  min-width: 20rem;
}

#filterPanel {
  position: relative;
  z-index: 1001;
}

#listPanel {
  position: relative;
  z-index: 100;
}

.panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel__top h2 {
  margin: 0;
  font-size: 1.08rem;
}

.total-pill,
.result-pill {
  background: #fbf2e0;
  border: 1px solid var(--outline);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 4px 10px;
  white-space: nowrap;
}

.category-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(2.1cm, 1fr));
}

.category-card {
  border-radius: 12px;
  border: 1px solid var(--outline);
  padding: 0;
  background: linear-gradient(145deg, #fff7ea 0%, #fdf2de 100%);
  overflow: hidden;
  height: 2cm;
  aspect-ratio: auto;
}

.category-card__btn {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 4px;
  text-align: center;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.category-card__name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.category-card__count {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#filterForm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding-bottom: 2px;
  font-size: 0.74rem;
}

.filters-row > select {
  flex: 1;
  min-width: 55px;
  min-height: 30px;
}

.filters-row > .brand-filter-wrap {
  flex: 1;
  min-width: 55px;
}
#filterForm #searchInput {
  width: 100%;
  min-height: 30px;
}

#filterPanel h2 {
  font-size: 0.98rem;
}

#filterPanel input,
#filterPanel select {
  min-height: 30px;
  font-size: 0.74rem;
  padding: 5px 7px;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

#clearCurrentFilters,
#resetFilters {
  font-size: 0.74rem;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
}

.list-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-back-btn {
  min-height: 32px;
  font-size: 0.78rem;
  padding: 0 10px;
}

.category-view-label {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  background: #fffaf1;
  border: 1px solid #e2d3bc;
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--text);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid rgba(31, 111, 95, 0.45);
  outline-offset: 1px;
}

.brand-inline-logo {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  vertical-align: -0.12rem;
  margin-right: 0.28rem;
  border-radius: 2px;
  background: #fff;
  border: 1px solid #e5d7c1;
}

.brand-filter-wrap {
  position: relative;
  width: 100%;
  min-width: 55px;
  z-index: 1000;
}

.brand-filter-trigger {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--text);
  padding: 5px 7px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.brand-filter-trigger::after {
  content: "";
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #6c5d46;
}

.brand-filter-trigger[aria-expanded="true"]::after {
  border-top: 0;
  border-bottom: 6px solid #6c5d46;
}

.brand-filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9999;
  min-width: 100%;
  max-height: 190px;
  overflow-y: auto;
  background: #fffaf1;
  border: 1px solid #e2d3bc;
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(35, 27, 16, 0.12);
}

.brand-filter-option {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--text);
}

.brand-filter-option + .brand-filter-option {
  border-top: 1px solid #efe3d2;
}

.brand-filter-option:hover {
  background: #f6ead7;
}

.brand-filter-option--create {
  font-weight: 700;
  color: var(--accent-strong);
}

.brand-library-list {
  border: 1px solid #e2d3bc;
  border-radius: 10px;
  background: #fffaf1;
  max-height: 280px;
  overflow-y: auto;
}

.brand-library-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.brand-library-search-wrap {
  margin-bottom: 8px;
}

#brandLibrarySearchInput {
  width: 100%;
  min-height: 32px;
  font-size: 0.82rem;
  padding: 6px 9px;
}

#toggleBrandMultiSelectBtn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.brand-library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.brand-library-item + .brand-library-item {
  border-top: 1px solid #efe3d2;
}

.brand-library-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.brand-library-check {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
}

.brand-library-check[hidden] {
  display: none;
}

.brand-library-item-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-delete-btn {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.brand-filter-option img,
.brand-filter-trigger img {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #fff;
  border: 1px solid #e5d7c1;
}

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid var(--outline);
}

.clothes-list {
  display: grid;
  gap: 11px;
}

.clothing-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 11px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: #fff9ef;
  overflow: hidden;
  animation: card-pop 360ms ease;
}

.clothing-card__img {
  width: 100%;
  height: 100%;
  min-height: 98px;
  object-fit: contain;
  background: transparent;
}

.clothing-card__body {
  padding: 9px 9px 9px 0;
}

.clothing-card__category {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 2px 8px;
  background: #e7f2ee;
  color: #226453;
  margin-bottom: 4px;
}

.clothing-card__name {
  margin: 0 0 5px;
  font-size: 0.98rem;
}

.clothing-card__meta,
.clothing-card__price {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.clothing-card__price {
  color: var(--warn);
  margin-top: 4px;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.card-btn {
  min-height: 32px;
  border-radius: 8px;
  font-size: 0.82rem;
  padding: 0 10px;
}

.card-btn--danger {
  color: #8c311f;
  border-color: #d6a695;
  background: #fff0ea;
}

.empty {
  border: 1px dashed var(--outline);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff9ef;
}

.recommend-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.recommend-controls select {
  min-height: 30px;
  min-width: 96px;
  padding: 5px 7px;
  font-size: 0.74rem;
}

.recommend-controls button {
  font-size: 0.74rem;
  min-height: 30px;
  padding: 0 10px;
}

.recommend-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.recommend-card {
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: linear-gradient(135deg, #fff9ef 0%, #f8efdf 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.recommend-card__imgs {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  background: #f0e6d2;
}

.recommend-card__img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: transparent;
  display: block;
}

.recommend-card__body {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recommend-card__title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommend-card__line {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommend-card__line + .recommend-card__line {
  margin-top: 2px;
}

.recommend-card .card-actions {
  margin-top: 6px;
}

.recommend-card .card-btn {
  font-size: 0.72rem;
  min-height: 26px;
  padding: 0 8px;
}

.favorite-wrap {
  margin-top: 12px;
  border-top: 1px dashed #d8cbb5;
  padding-top: 12px;
}

.panel__top--sub h3 {
  margin: 0;
  font-size: 0.98rem;
}

#openManualLookBtn {
  margin-right: auto;
  min-height: 30px;
  min-width: 96px;
  padding: 5px 7px;
  font-size: 0.74rem;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: #fff9ef;
  color: var(--muted);
  cursor: pointer;
}

#openManualLookBtn:hover {
  filter: brightness(0.98);
}

.manual-look-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.manual-look-row__label {
  font-size: 0.85rem;
  color: #5f4520;
}

.manual-look-row__pick {
  min-height: 34px;
  border: 1px solid #dcc3a0;
  border-radius: 8px;
  background: #fff4de;
  color: #5f4520;
  font-size: 0.8rem;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.manual-look-row__img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #dec7a5;
  border-radius: 8px;
  background: transparent;
}

.manual-look-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.manual-look-picker-item {
  border: 1px solid #dec7a5;
  border-radius: 10px;
  background: #fffdf8;
  padding: 6px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.manual-look-picker-item img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}

.manual-look-picker-item span {
  font-size: 0.78rem;
  color: #5f4520;
}

.manual-look-picker-item small {
  font-size: 0.7rem;
  color: var(--muted);
}

.fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(145deg, var(--accent) 0%, #1b806f 100%);
  color: #fff;
  font-size: 1.7rem;
  box-shadow: 0 10px 20px rgba(15, 79, 67, 0.35);
  cursor: pointer;
}

.add-dialog {
  width: min(640px, 100%);
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: transparent;
}

.add-dialog::backdrop {
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(2px);
}

.dialog-card {
  border: 1px solid #d9cab2;
  border-radius: 16px;
  background: #fff9ef;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.dialog-card--mini {
  max-width: 420px;
  margin: 0 auto;
}

.dialog-card--wide {
  max-width: 760px;
  margin: 0 auto;
}

.conflict-compare {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conflict-item {
  border: 1px solid #e4d5bf;
  border-radius: 12px;
  padding: 10px;
  background: #fffdf8;
}

.conflict-item h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.conflict-item img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8dcc8;
}

.conflict-item p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.conflict-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.dialog-card__header,
.dialog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.dialog-card__header {
  border-bottom: 1px solid #e6d6be;
}

.dialog-card__header h3 {
  margin: 0;
}

.dialog-card__body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.image-upload-block {
  border: 1px dashed #d9c3a3;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(145deg, #fffdf8 0%, #fff4df 100%);
}

.image-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #cfb48c;
  background: linear-gradient(145deg, #fff0d2 0%, #f7dfb8 100%);
  color: #62491f;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.image-picker:hover {
  filter: brightness(0.98);
}

.dialog-card__footer {
  border-top: 1px solid #e6d6be;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #544f46;
  font-size: 1.5rem;
  cursor: pointer;
}

.preview-wrap {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed var(--outline);
  position: relative;
}

.preview-wrap--top {
  margin-top: 10px;
}

.image-gallery {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
}

.image-thumb {
  border: 1px solid #dec7a5;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  padding: 2px;
  position: relative;
}

.image-thumb img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: transparent;
}

.image-thumb__btn {
  margin-top: 4px;
  width: 100%;
  min-height: 22px;
  border: 1px solid #dcc3a0;
  border-radius: 6px;
  background: #fff4de;
  color: #5f4520;
  font-size: 0.7rem;
  cursor: pointer;
}

.image-thumb--cover {
  border-color: #19735f;
  box-shadow: 0 0 0 1px rgba(25, 115, 95, 0.25);
}

.image-thumb__delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  min-height: auto;
  padding: 0;
  border: 1px solid #d9534f;
  border-radius: 50%;
  background: #f8f9fa;
  color: #d9534f;
  font-size: 0.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.image-thumb__delete-btn:hover {
  background: #d9534f;
  color: #fff;
  transform: scale(1.1);
}

.preview-wrap {
  aspect-ratio: 2/3;
  width: 100%;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
}
.preview-wrap.show {
  display: flex;
}
.preview-wrap img {
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: transparent;
}

.preview-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 56px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 79, 67, 0.28);
}

.preview-edit-btn:hover,
.preview-edit-btn:focus-visible {
  background: var(--accent-strong);
}

.image-editor-dialog {
  max-width: 900px;
}

.image-editor-body {
  display: grid;
  gap: 10px;
}

.image-editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.editor-toolbar-main {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.editor-toolbar-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.editor-toolbar-crop,
.editor-toolbar-rotate {
  display: none;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--outline);
  margin-bottom: 8px;
}

.editor-toolbar-crop:not([hidden]),
.editor-toolbar-rotate:not([hidden]) {
  display: flex;
}

.image-editor-toolbar .btn,
.editor-toolbar-crop .btn,
.editor-toolbar-rotate .btn {
  min-height: 34px;
  padding: 0 12px;
}

.btn--editor {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn--editor[aria-pressed="true"] {
  background: var(--accent-strong);
}

.btn--editor-icon {
  width: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-btn-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn--editor:hover,
.btn--editor:focus-visible {
  background: var(--accent-strong);
}

.btn--editor:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.editor-eraser-control {
  display: none;
  height: 24px;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}

.editor-eraser-control:not([hidden]) {
  display: flex;
}

.slider-strip__label {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.slider-strip__value {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 34px;
  text-align: right;
  line-height: 1;
}

.editor-eraser-control input[type="range"] {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  /* vertical centering within the 24px strip */
  align-self: center;
}

.editor-eraser-control input[type="range"] {
  background: var(--outline);
}

.editor-eraser-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.12s;
}

.editor-eraser-control input[type="range"]::-webkit-slider-thumb {
  background: #c9693d;
  box-shadow: 0 1px 5px rgba(201, 105, 61, 0.35);
}

.editor-eraser-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.editor-eraser-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c9693d;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(201, 105, 61, 0.35);
}

#editorEraserSize {
  min-width: 34px;
  text-align: right;
  color: var(--muted);
  font-size: 0.72rem;
}

.add-unsaved-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff4e4;
  border: 1px solid #f0c97a;
  font-size: 0.88rem;
  color: #7a5200;
}

.add-unsaved-banner:not([hidden]) {
  display: flex;
}

.add-unsaved-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.add-unsaved-banner .btn--warn {
  background: #c0581a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.add-unsaved-banner .btn--warn:hover {
  background: #9e420e;
}

.editor-unsaved-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff4e4;
  border: 1px solid #f0c97a;
  font-size: 0.88rem;
  color: #7a5200;
}

.editor-unsaved-banner:not([hidden]) {
  display: flex;
}

.editor-unsaved-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.editor-unsaved-banner .btn--warn {
  background: #c0581a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.editor-unsaved-banner .btn--warn:hover {
  background: #9e420e;
}

.editor-unsaved-banner .btn--ghost {
  min-height: 32px;
  font-size: 0.82rem;
  padding: 0 12px;
}

.image-editor-hint {
  display: none;
}

.image-editor-canvas-wrap {
  border: 1px dashed var(--outline);
  border-radius: 12px;
  background: linear-gradient(145deg, #fffdf8 0%, #fff4df 100%);
  min-height: 220px;
  /* 去掉max-height和overflow，保证canvas完整显示 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.image-editor-canvas-wrap canvas {
  display: block;
  background: #f8f1e4;
  border-radius: 8px;
  /* 宽高由JS严格控制，防止缩放 */
  margin: 0 auto;
  box-sizing: content-box;
  transform-origin: center center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 760px) {
  body {
    padding: 22px 24px 34px;
  }

  .hero {
    padding: 20px;
  }

  .hero__eyebrow,
  .hero__title,
  .hero__subtitle {
    max-width: calc(100% - 116px);
  }

  .app-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .filters-row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .filters-row > select {
    flex: 1;
    min-width: 60px;
  }

  .filters-row > .brand-filter-wrap {
    flex: 1;
    min-width: 60px;
  }

  .filters-row > #searchInput {
    width: 100%;
  }

  .hero-top {
    flex-wrap: nowrap;
  }

  .hero-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .hero-actions {
    flex-wrap: nowrap;
    width: 100%;
  }

  .hero-actions > * {
    flex: 1 1 0;
  }

  .weather-widget {
    width: 96px;
    height: 96px;
    top: 14px;
    right: 14px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(2.1cm, 1fr));
    gap: 8px;
  }

  .recommend-controls,
  .recommend-list {
    max-width: 100%;
  }

  .fab {
    display: none;
  }
}
