/* ==========================================================================
   小熊的甜心裙匣 · Bear's Lolibox（正式私人网站样式）
   美乐蒂草莓牛奶淡粉 × 奶油白 × 焦糖可可棕
   ========================================================================== */

:root {
  --bg-milk: #FFF9FB;
  --bg-blush-soft: #FFF1F6;
  --surface-white: #FFFFFF;
  --melody-pink: #F8B3C9;
  --melody-pink-mid: #F18FB1;
  --melody-pink-strong: #E26A94;
  --melody-rose-deep: #C44572;
  --melody-blush: #FFE9F0;
  --melody-blush-deep: #FFD8E6;
  --border-pink: #F5DCE5;
  --border-strong: #EDC3D2;
  --cocoa-ink: #4A333B;
  --cocoa-body: #5E434D;
  --cocoa-muted: #846570;
  --mint-bg: #E9F7F1;
  --mint-border: #C4E9D9;
  --mint-ink: #277355;
  --butter-bg: #FFF5DC;
  --butter-border: #F5DFAC;
  --butter-ink: #9E6818;
  --lilac-bg: #F4EEFF;
  --lilac-border: #DECFF8;
  --lilac-ink: #6746A8;

  --shadow-soft: 0 8px 24px rgba(226, 106, 148, 0.10);
  --shadow-card-hover: 0 12px 28px rgba(226, 106, 148, 0.18);
  --shadow-float: 0 14px 36px rgba(196, 69, 114, 0.18);

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-sans: "Quicksand", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: var(--melody-blush-deep);
  color: var(--cocoa-ink);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--cocoa-ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(248, 179, 201, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(255, 224, 236, 0.32) 0%, transparent 46%),
    var(--bg-milk);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2.5px solid var(--melody-rose-deep);
  outline-offset: 2px;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #F1C9D8;
  border-radius: 99px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   美乐蒂奶油小熊 PIN 锁屏
   ========================================================================== */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(248, 179, 201, 0.35) 0%, transparent 48%),
    radial-gradient(circle at 80% 80%, rgba(255, 219, 233, 0.45) 0%, transparent 48%),
    var(--bg-milk);
}

.lock-screen[hidden] {
  display: none;
}

.lock-card {
  width: min(390px, 100%);
  border-radius: 30px;
  background: var(--surface-white);
  border: 1.5px solid var(--border-pink);
  box-shadow: 0 22px 60px rgba(217, 87, 134, 0.18);
  overflow: hidden;
  animation: popIn 0.25s var(--ease-out);
}

.lock-card-inner {
  padding: 26px 26px 30px;
  text-align: center;
}

.lock-mascot {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 26px;
  background: linear-gradient(145deg, #FFF5F8 0%, #FFE7F0 100%);
  border: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(226, 106, 148, 0.16);
}

.lock-title {
  margin: 0;
  font-size: 22px;
  color: var(--cocoa-ink);
}

.lock-sub {
  margin: 6px 0 20px;
  font-size: 13px;
  color: var(--cocoa-muted);
}

.pin-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-milk);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.38em;
  color: var(--melody-rose-deep);
  transition: all 0.18s ease;
}

.pin-input::placeholder {
  font-size: 14px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #AE8E9A;
}

.pin-input:focus {
  outline: none;
  border-color: var(--melody-rose-deep);
  background: var(--surface-white);
  box-shadow: 0 0 0 4px rgba(248, 179, 201, 0.35);
}

.lock-err {
  min-height: 22px;
  margin: 8px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #C93A62;
}

.lock-tip {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--cocoa-muted);
}

/* ==========================================================================
   应用主壳体
   ========================================================================== */
.app-shell {
  position: relative;
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.mobile-top-header,
.mobile-tabbar,
.mobile-fab {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 256px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 16px 18px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-pink);
  overflow-y: auto;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #FFF5F8 0%, #FFEAF1 100%);
  border: 1px solid var(--border-pink);
  margin-bottom: 18px;
}

.brand-mascot {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-white);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(226, 106, 148, 0.14);
}

.brand-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--cocoa-ink);
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--melody-rose-deep);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--cocoa-body);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.18s var(--ease-out);
  text-align: left;
}

.side-nav-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.side-nav-btn .btn-icon {
  width: 19px;
  height: 19px;
}

.side-nav-btn:hover {
  background: var(--bg-blush-soft);
  color: var(--melody-rose-deep);
}

.side-nav-btn.is-active {
  background: linear-gradient(135deg, #F497B8 0%, #E26A94 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(226, 106, 148, 0.28);
}

.nav-count-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  background: var(--melody-blush);
  color: var(--melody-rose-deep);
}

.side-nav-btn.is-active .nav-count-pill {
  background: rgba(255, 255, 255, 0.26);
  color: #FFFFFF;
}

.sidebar-summary {
  margin-top: auto;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-milk);
  border: 1px dashed var(--border-strong);
}

.sidebar-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-muted);
  margin-bottom: 8px;
}

.sidebar-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  margin-bottom: 5px;
  color: var(--cocoa-body);
}

.sidebar-summary-row strong {
  color: var(--melody-rose-deep);
  font-size: 13.5px;
}

.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.sidebar-tool-btn {
  width: 100%;
  justify-content: center;
  padding: 8px 12px !important;
  font-size: 12.5px !important;
}

.btn-primary-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #EE7CA4 0%, #D95786 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(217, 87, 134, 0.30);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.btn-primary-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(217, 87, 134, 0.38);
}

.sidebar-add-btn {
  width: 100%;
}

.app-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  background: linear-gradient(90deg, #FFF2F7 0%, #FFF8EA 100%);
  border-bottom: 1px solid var(--border-pink);
  font-size: 13px;
  flex-wrap: wrap;
}

.demo-banner[hidden] {
  display: none;
}

.demo-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cocoa-body);
}

.demo-pill {
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--melody-blush);
  color: var(--melody-rose-deep);
  font-weight: 700;
  font-size: 11.5px;
}

.main-view {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 28px 56px;
}

/* ==========================================================================
   蕾丝装饰 & 资产概览大卡
   ========================================================================== */
.lace-strip {
  height: 10px;
  width: 100%;
  background-image: radial-gradient(circle at 10px 0, transparent 6px, #FFE4EE 6.5px, #FFE4EE 8px, transparent 8.5px);
  background-size: 20px 10px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  color: var(--cocoa-ink);
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--cocoa-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-white);
  color: var(--melody-rose-deep);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.16s var(--ease-out);
  white-space: nowrap;
}

.btn-soft:hover {
  background: var(--melody-blush);
  border-color: var(--melody-pink-strong);
}

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, #EE7CA4 0%, #D95786 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 5px 14px rgba(217, 87, 134, 0.24);
  transition: all 0.16s var(--ease-out);
  white-space: nowrap;
}

.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(217, 87, 134, 0.34);
}

.icon-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-pink);
  background: var(--surface-white);
  color: var(--melody-rose-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s var(--ease-out);
  flex-shrink: 0;
}

.icon-circle-btn:hover {
  background: var(--melody-blush);
}

.hero-dashboard {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF5F9 60%, #FFEBF2 100%);
  border: 1px solid var(--border-pink);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 18px;
}

.hero-dashboard-inner {
  padding: 16px 20px 18px;
}

.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-box {
  padding: 13px 15px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #F6E1EA;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.metric-box.is-clickable {
  cursor: pointer;
}

.metric-box.is-clickable:hover {
  border-color: var(--melody-pink-strong);
  transform: translateY(-2px);
}

.metric-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--cocoa-ink);
  line-height: 1.18;
}

.metric-value.is-rose {
  color: var(--melody-rose-deep);
}

.metric-value.is-butter {
  color: var(--butter-ink);
}

.metric-sub {
  font-size: 11.5px;
  color: var(--cocoa-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wear-progress-track {
  height: 7px;
  width: 100%;
  border-radius: 99px;
  background: var(--melody-blush);
  overflow: hidden;
  margin-top: 2px;
}

.wear-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #F592B5 0%, #D95786 100%);
  transition: width 0.4s var(--ease-out);
}

/* 近期尾款提醒条 */
.due-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #FFF8E6 0%, #FFF2F7 100%);
  border: 1px solid var(--butter-border);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--cocoa-ink);
  flex-wrap: wrap;
}

.due-alert-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* ==========================================================================
   四态切换器 & 筛选面板
   ========================================================================== */
.status-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  box-shadow: 0 4px 14px rgba(226, 106, 148, 0.08);
  gap: 3px;
  flex-wrap: wrap;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--cocoa-muted);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--melody-rose-deep);
}

.seg-btn.is-active {
  background: linear-gradient(135deg, #F392B5 0%, #E06792 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(224, 103, 146, 0.26);
}

.seg-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--melody-blush);
  color: var(--melody-rose-deep);
}

.seg-btn.is-active .seg-count {
  background: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

.view-mode-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--cocoa-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.view-toggle-btn.is-active {
  background: var(--melody-blush);
  color: var(--melody-rose-deep);
}

.filter-panel {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.filter-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 190px;
}

.search-box .search-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--cocoa-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-pink);
  background: var(--bg-milk);
  color: var(--cocoa-ink);
  transition: all 0.18s ease;
}

.search-input::placeholder {
  color: #A48590;
}

.search-input:focus {
  outline: none;
  border-color: var(--melody-pink-strong);
  background: var(--surface-white);
  box-shadow: 0 0 0 3px rgba(248, 179, 201, 0.35);
}

.select-pill {
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-pink);
  background: var(--bg-milk);
  color: var(--cocoa-ink);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.filter-chips-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-muted);
  margin-right: 2px;
  white-space: nowrap;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-pink);
  background: var(--surface-white);
  color: var(--cocoa-body);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.16s var(--ease-out);
  white-space: nowrap;
}

.chip-btn:hover {
  border-color: var(--melody-pink-strong);
  color: var(--melody-rose-deep);
  background: var(--bg-blush-soft);
}

.chip-btn.is-active {
  background: linear-gradient(135deg, #F392B5 0%, #DF6691 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(223, 102, 145, 0.24);
}

.chip-btn.is-unworn-pill {
  border-style: dashed;
  border-color: #EB93B2;
  background: #FFF4F8;
  color: var(--melody-rose-deep);
}

.chip-btn.is-unworn-pill.is-active {
  border-style: solid;
  background: linear-gradient(135deg, #E86894 0%, #C44572 100%);
  color: #FFFFFF;
}

.chip-btn.is-tried-pill {
  border-color: var(--lilac-border);
  background: #F8F4FF;
  color: var(--lilac-ink);
}

.chip-btn.is-tried-pill.is-active {
  background: linear-gradient(135deg, #9A7DD4 0%, #7354B2 100%);
  border-color: transparent;
  color: #FFFFFF;
}

/* ==========================================================================
   单品卡片（含日牌/国牌角标、三态徽章、双快捷操作）
   ========================================================================== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), border-color 0.22s ease;
  cursor: pointer;
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--melody-pink-mid);
  box-shadow: var(--shadow-card-hover);
}

.item-visual-wrap {
  position: relative;
  aspect-ratio: 1 / 0.94;
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #FFF4F8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}

.item-art-svg {
  width: 86%;
  height: 86%;
  object-fit: contain;
  transition: transform 0.25s var(--ease-out);
}

.item-custom-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.item-card:hover .item-art-svg {
  transform: scale(1.04);
}

.badge-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(232, 114, 155, 0.92);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
}

.badge-wear {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.badge-wear .btn-icon {
  width: 12px;
  height: 12px;
}

.badge-wear.is-unworn {
  background: #FFF1F6;
  color: var(--melody-rose-deep);
  border: 1px dashed #E2759C;
}

.badge-wear.is-tried {
  background: var(--lilac-bg);
  color: var(--lilac-ink);
  border: 1px solid var(--lilac-border);
}

.badge-wear.is-worn {
  background: var(--mint-bg);
  color: var(--mint-ink);
  border: 1px solid var(--mint-border);
}

.badge-wear.is-stale {
  background: var(--butter-bg);
  color: var(--butter-ink);
  border: 1px solid var(--butter-border);
}

.badge-wear.is-preorder {
  background: var(--butter-bg);
  color: var(--butter-ink);
  border: 1px solid var(--butter-border);
}

.badge-wear.is-sold {
  background: #F4F0F2;
  color: #745B64;
  border: 1px solid #DFD2D7;
}

.item-body {
  padding: 12px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.item-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
}

.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.origin-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.45;
}

.origin-badge.is-jp {
  background: #FCE8F3;
  color: #AD356B;
  border: 1px solid #F4C4DF;
}

.origin-badge.is-cn {
  background: #FFF0E5;
  color: #AE5528;
  border: 1px solid #F6D2B8;
}

.item-brand {
  font-weight: 700;
  color: var(--cocoa-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-age-tag {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-blush-soft);
  color: var(--cocoa-muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.item-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--cocoa-ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-tags-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.spec-pill {
  padding: 2px 7px;
  border-radius: 6px;
  background: #FBF3F6;
  border: 1px solid var(--border-pink);
  color: var(--cocoa-body);
  font-size: 11px;
  font-weight: 600;
}

.item-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #F4DFE7;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.item-price {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--melody-rose-deep);
  line-height: 1.1;
}

.item-cpw {
  font-size: 11px;
  font-weight: 600;
  color: var(--cocoa-muted);
}

.item-cpw.is-unworn-hint {
  color: #C76186;
}

.item-cpw.is-tried-hint {
  color: var(--lilac-ink);
}

.card-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.quick-try-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--lilac-border);
  background: var(--lilac-bg);
  color: var(--lilac-ink);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.16s var(--ease-out);
  white-space: nowrap;
}

.quick-try-btn:hover {
  background: var(--lilac-ink);
  border-color: transparent;
  color: #FFFFFF;
}

.quick-wear-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-blush-soft);
  color: var(--melody-rose-deep);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.16s var(--ease-out);
  white-space: nowrap;
}

.quick-wear-btn:hover {
  background: linear-gradient(135deg, #EE7CA4 0%, #D95786 100%);
  border-color: transparent;
  color: #FFFFFF;
}

.preorder-finance {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #FFFBF0;
  border: 1px solid var(--butter-border);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sold-finance {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #F4FBF8;
  border: 1px solid var(--mint-border);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preorder-row {
  display: flex;
  justify-content: space-between;
  color: var(--cocoa-body);
}

.card-action-full {
  margin-top: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, #F085AC 0%, #DC5D8B 100%);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
}

.wish-hearts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--melody-pink-strong);
}

.wish-hearts .btn-icon {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   明细数据表
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  box-shadow: var(--shadow-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th {
  text-align: left;
  padding: 12px 13px;
  background: var(--bg-blush-soft);
  color: var(--cocoa-muted);
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-pink);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #F9EBF0;
  vertical-align: middle;
  font-size: 13px;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: #FFF7FA;
}

.table-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-milk);
  border: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px;
  overflow: hidden;
}

/* ==========================================================================
   穿搭灵感、穿搭日历、衣橱分析
   ========================================================================== */
.outfit-layout,
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 20px;
  align-items: start;
}

.collage-card,
.outfit-side-card,
.calendar-card,
.ootd-detail-card,
.panel-card {
  border-radius: var(--radius-xl);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}

.collage-board {
  position: relative;
  border-radius: var(--radius-lg);
  background-color: #FFF7FA;
  background-image: radial-gradient(#F6CBD9 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1.5px solid var(--border-pink);
  padding: 16px;
  min-height: 380px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}

.collage-title-badge {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
}

.collage-title-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--cocoa-ink);
}

.collage-title-en {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--melody-rose-deep);
}

.collage-slot {
  position: relative;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
}

.collage-slot:hover {
  border-color: var(--melody-pink-strong);
  background: #FFFFFF;
}

.collage-slot.slot-main {
  grid-row: 1 / 3;
  padding-top: 42px;
}

.collage-slot-img {
  width: 100%;
  height: 100%;
  max-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-slot.slot-sub .collage-slot-img {
  max-height: 118px;
}

.collage-slot-caption {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cocoa-body);
  text-align: center;
}

.collage-slot-unworn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--melody-blush);
  color: var(--melody-rose-deep);
  font-size: 10.5px;
  font-weight: 700;
}

.collage-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.collage-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cocoa-body);
  cursor: pointer;
}

.toggle-switch input {
  accent-color: var(--melody-rose-deep);
  width: 16px;
  height: 16px;
}

.outfit-side-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.outfit-slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outfit-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-milk);
  border: 1px solid var(--border-pink);
}

.outfit-slot-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.outfit-tip-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-blush-soft);
  color: var(--cocoa-body);
  font-size: 13px;
  line-height: 1.55;
}

.saved-outfits-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.saved-fit-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.saved-fit-card:hover {
  border-color: var(--melody-pink-strong);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calendar-month-title {
  font-size: 18px;
  font-weight: 700;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-muted);
  margin-bottom: 8px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  min-height: 58px;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-milk);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.cal-day.is-empty {
  background: transparent;
  cursor: default;
}

.cal-day.has-log {
  background: #FFEBF2;
  border-color: #F4C4D5;
}

.cal-day.is-selected {
  background: linear-gradient(135deg, #F392B5 0%, #DF6691 100%);
  color: #FFFFFF;
}

.cal-day-num {
  font-weight: 700;
  font-size: 13px;
}

.cal-day-dot {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--melody-rose-deep);
}

.cal-day.is-selected .cal-day-dot {
  background: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

.ootd-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.ootd-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-milk);
  border: 1px solid var(--border-pink);
  cursor: pointer;
}

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

.panel-card.span-2 {
  grid-column: 1 / -1;
}

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

.panel-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.panel-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--cocoa-muted);
}

.origin-compare-bar {
  display: flex;
  height: 14px;
  width: 100%;
  border-radius: 99px;
  overflow: hidden;
  background: var(--bg-blush-soft);
  margin: 12px 0;
}

.origin-compare-jp {
  background: linear-gradient(90deg, #EB73A5 0%, #C44572 100%);
}

.origin-compare-cn {
  background: linear-gradient(90deg, #F6B98E 0%, #E28759 100%);
}

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

.origin-stat-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-milk);
  border: 1px solid var(--border-pink);
}

.idle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.idle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-milk);
  border: 1px solid var(--border-pink);
}

.idle-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.idle-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.donut-legend {
  flex: 1;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.legend-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
}

.bar-track {
  height: 9px;
  border-radius: 99px;
  background: var(--bg-blush-soft);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #F8B3C9 0%, #DF6590 100%);
}

/* ==========================================================================
   抽屉、弹窗、花边相框、同系列与抽签
   ========================================================================== */
.overlay-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}

.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(74, 51, 59, 0.36);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  animation: fadeIn 0.18s ease;
}

.backdrop[hidden] {
  display: none;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(470px, 95vw);
  background: var(--surface-white);
  box-shadow: -12px 0 36px rgba(74, 51, 59, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideLeft 0.24s var(--ease-out);
}

.modal {
  position: relative;
  width: min(580px, 94vw);
  max-height: 88vh;
  border-radius: var(--radius-xl);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.22s var(--ease-out);
}

.dialog-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #FFFBFD;
}

.dialog-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
}

.dialog-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.dialog-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--border-pink);
  background: #FFFBFD;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-frame-stage {
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: radial-gradient(circle at 50% 45%, #FFFFFF 0%, #FFF3F8 100%);
  margin-bottom: 14px;
}

.detail-frame-stage .item-art-svg {
  width: 185px;
  height: 185px;
}

.detail-frame-stage .item-custom-photo {
  max-height: 240px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.detail-frame-stage.frame-none {
  border: 1px solid var(--border-pink);
}

.detail-frame-stage.frame-lace {
  border: 3px dashed #F1A3BF;
  box-shadow: inset 0 0 0 6px #FFFFFF, inset 0 0 0 8px #FAD5E3;
  background: #FFF8FB;
}

.detail-frame-stage.frame-pearl {
  border: 4px dotted #E79AB6;
  box-shadow: inset 0 0 0 5px #FFFDFB, 0 8px 22px rgba(231, 154, 182, 0.18);
}

.detail-frame-stage.frame-melody {
  border: 2px solid #EE8BAE;
  background-color: #FFF4F8;
  background-image: radial-gradient(#F8B9CF 2px, transparent 2px);
  background-size: 16px 16px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.85);
}

.frame-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.info-cell {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-milk);
  border: 1px solid var(--border-pink);
}

.info-cell-label {
  font-size: 11.5px;
  color: var(--cocoa-muted);
  margin-bottom: 2px;
}

.info-cell-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--cocoa-ink);
}

.series-box {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #FFF7FA;
  border: 1px dashed var(--border-strong);
}

.series-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.series-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  cursor: pointer;
}

.series-row:hover {
  border-color: var(--melody-pink-strong);
}

.wear-timeline {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-blush-soft);
  font-size: 12.5px;
}

.lucky-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.lucky-pick-box {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 35%, #FFFFFF 0%, #FFF3F8 100%);
  border: 1.5px solid var(--border-pink);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lucky-pick-box .item-art-svg {
  width: 112px;
  height: 112px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.span-2 {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cocoa-body);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-milk);
  color: var(--cocoa-ink);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--melody-pink-strong);
  background: var(--surface-white);
}

.radio-pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.radio-pill-btn {
  flex: 1;
  min-width: 78px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-pink);
  background: var(--bg-milk);
  color: var(--cocoa-body);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

.radio-pill-btn.is-active {
  border-color: var(--melody-rose-deep);
  background: var(--melody-blush);
  color: var(--melody-rose-deep);
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1.5px var(--border-strong);
}

.swatch-dot.is-active {
  box-shadow: 0 0 0 2.5px var(--melody-rose-deep);
  transform: scale(1.1);
}

.upload-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-milk);
  border: 1px dashed var(--border-strong);
}

.preview-mini {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  background: var(--surface-white);
  border: 1px solid var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  overflow: hidden;
}

.ootd-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.ootd-pick-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-pink);
  background: var(--bg-milk);
  text-align: left;
}

.ootd-pick-card.is-picked {
  border-color: var(--melody-rose-deep);
  background: var(--melody-blush);
}

.empty-state {
  padding: 40px 20px;
  border-radius: var(--radius-xl);
  background: var(--surface-white);
  border: 1.5px dashed var(--border-strong);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state h3 {
  margin: 4px 0 0;
  font-size: 16.5px;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
  color: var(--cocoa-muted);
}

.toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  z-index: 250;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: #4A333B;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(74, 51, 59, 0.28);
  animation: popIn 0.2s var(--ease-out);
  white-space: nowrap;
}

/* ==========================================================================
   移动端 & iPhone PWA 原生自适应
   ========================================================================== */
@media (max-width: 1120px) {
  .items-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .outfit-layout,
  .calendar-layout,
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar {
    display: none;
  }
  .mobile-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-pink);
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .mobile-mascot {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: var(--bg-blush-soft);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-brand-name {
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.2;
  }
  .mobile-brand-sub {
    font-size: 11px;
    color: var(--cocoa-muted);
  }
  .demo-banner {
    padding: 10px 14px;
    font-size: 12px;
  }
  .main-view {
    padding: 14px 14px calc(104px + env(safe-area-inset-bottom, 0px));
  }
  .page-title {
    font-size: 21px;
  }
  .hero-dashboard-inner {
    padding: 12px 13px 14px;
  }
  .metric-value {
    font-size: 18.5px;
  }
  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .item-body {
    padding: 9px 10px 10px;
  }
  .item-name {
    font-size: 13px;
  }
  .item-price {
    font-size: 14.5px;
  }
  .item-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .card-quick-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .idle-list,
  .saved-outfits-grid,
  .origin-compare-cols,
  .lucky-stage,
  .form-grid,
  .ootd-pick-grid {
    grid-template-columns: 1fr;
  }
  .drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 90vh;
    border-radius: 26px 26px 0 0;
    animation: slideUp 0.24s var(--ease-out);
  }
  .mobile-tabbar {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    padding: 6px 8px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-pink);
    box-shadow: var(--shadow-float);
    justify-content: space-around;
  }
  .mobile-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    min-width: 64px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: var(--cocoa-muted);
    font-size: 11px;
    font-weight: 700;
  }
  .mobile-tab-btn .btn-icon {
    width: 20px;
    height: 20px;
  }
  .mobile-tab-btn.is-active {
    background: var(--melody-blush);
    color: var(--melody-rose-deep);
  }
  .mobile-fab {
    display: inline-flex;
    position: fixed;
    right: 18px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    z-index: 51;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #F183AA 0%, #D95786 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 22px rgba(217, 87, 134, 0.38);
  }
  .toast-container {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideLeft {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
