/* ============================================================
   Rere OS · Pages (V3 · 内容流 + 全屏聊天)
   ============================================================ */

/* ============================================================
   Pages 容器
   ============================================================ */
.pages {
  position: relative;
  flex: 1;
  z-index: 1;
  overflow: hidden;
}
.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--e-out);
}
.page.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Top Header（日期 / 天气 / Rere 头像）
   ============================================================ */
.top-header {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  flex: 0 0 auto;
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.top-header .date-block {
  flex: 1;
  min-width: 0;
}
.top-header .date {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.top-header .greet {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.top-header .greet em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-weather {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--dur-fast);
}
.top-weather:active { transform: scale(0.95); }
.top-weather .ic { font-size: 13px; line-height: 1; }

.rere-mini {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--e-spring);
}
.rere-mini:active { transform: scale(0.92); }
.rere-mini img {
  width: 100%; height: 100%; object-fit: cover;
}
.rere-mini::after {
  content: '';
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #34C759;
  border: 2px solid var(--card-bg);
}
.rere-mini .heart {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 22px;
}

/* ============================================================
   Home Scroll · 内容流
   ============================================================ */
.home-scroll {
  flex: 1 1 0;
  height: 0;                /* 配合 flex:1 1 0，让 flex 布局分配实际高度 */
  overflow-y: scroll;       /* scroll 而非 auto，iOS Safari 更可靠 */
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  padding: 0 18px 80px;   /* 给底部输入条留位置 */
  scrollbar-width: none;
  touch-action: pan-y;      /* iOS Safari: 只允许纵向滚动 */
  overscroll-behavior: contain;  /* 防止滚动穿透到父级 */
}
.home-scroll::-webkit-scrollbar { display: none; }

/* —— Hero 卡（早安卡）—— */
.hero-card {
  margin-bottom: 16px;
  padding: 22px 22px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #FFE5C2 0%, #FFD4B8 60%, #FFC2A6 100%);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(255, 107, 107, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.6), transparent 70%);
  pointer-events: none;
}
.hero-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
}
.hero-card .text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark);
  position: relative;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.hero-card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.hero-card .mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.hero-card .mood-pill .e { font-size: 13px; }
.hero-card .city-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-dark);
}

/* —— Section Header —— */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 10px;
}
.sec-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}
.sec-head .more {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

/* —— 穿搭 3 缩略横滑 —— */
.outfit-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -18px;
  padding: 0 18px 4px;
  scroll-snap-type: x mandatory;
}
.outfit-row::-webkit-scrollbar { display: none; }
.outfit-thumb {
  flex: 0 0 78%;
  scroll-snap-align: start;
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-floating);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.outfit-thumb .grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 3fr 2fr;
  gap: 4px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #FFFFFF;
}
.outfit-thumb .grid4 .it {
  position: relative;
  background: #FFFFFF;
  overflow: hidden;
}
.outfit-thumb .grid4 .it img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.outfit-thumb .reason {
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.5;
  padding: 0 4px 4px;
}
.outfit-thumb .reason .star {
  color: var(--primary);
  margin-right: 4px;
}

/* —— 通用 Plan 卡（饮食/训练/出行）—— */
.plan-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--e-out);
}
.plan-card:active { transform: scale(0.98); }
.plan-card.diet {
  background: linear-gradient(135deg, #FFF1E0, #FFE0C2);
}
.plan-card.workout {
  background: linear-gradient(135deg, #FFE5DD, #FFCCC2);
}
.plan-card.travel {
  background: linear-gradient(135deg, #E8F0FF, #D4E0F0);
}
.plan-card .ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(74, 43, 41, 0.06);
}
.plan-card .body {
  flex: 1;
  min-width: 0;
}
.plan-card .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(74, 43, 41, 0.55);
  text-transform: uppercase;
}
.plan-card .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 2px 0;
}
.plan-card .desc {
  font-size: 12.5px;
  color: var(--text-dark);
  opacity: 0.7;
  line-height: 1.45;
}
.plan-card .arr {
  color: var(--text-dark);
  opacity: 0.4;
  font-size: 18px;
  flex-shrink: 0;
}

/* ============================================================
   Bottom Quick Chat（底部一直贴着的输入条）
   ============================================================ */
.qc-bar {
  position: relative;
  z-index: 30;
  flex: 0 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 234, 209, 0.95) 30%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.qc-input {
  flex: 1;
  height: 42px;
  padding: 0 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(74, 43, 41, 0.06);
  font-size: 14px;
  color: var(--text-dark);
  cursor: text;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(74, 43, 41, 0.05);
  font-weight: 500;
}
.qc-input.placeholder { color: var(--text-light); font-weight: 400; }
.qc-input .heart {
  color: var(--primary);
  font-size: 13px;
}
.qc-mic {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(74, 43, 41, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(74, 43, 41, 0.05);
}
.qc-mic svg { width: 18px; height: 18px; }
.qc-bar.dim { opacity: 0.5; pointer-events: none; }

/* ============================================================
   Tab Bar (扁平 3 Tab，不再凹陷)
   ============================================================ */
.tabbar {
  position: relative;
  z-index: 35;
  flex: 0 0 auto;
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(255, 248, 242, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(74, 43, 41, 0.06);
}
.tab-item {
  flex: 1;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 600;
  transition: color var(--dur-fast);
  letter-spacing: 0.05em;
}
.tab-item .icon {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-item .icon svg { width: 100%; height: 100%; }
.tab-item.active {
  color: var(--primary);
}
.tab-item.active .icon { transform: scale(1.05); }

/* ============================================================
   Closet Page (V3 · Aesty 风)
   ============================================================ */
.closet-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.closet-head {
  padding: 14px 20px 6px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.closet-head h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}
.closet-head .ct {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

/* —— 4 sub-tab 切换 —— */
.closet-subtabs {
  display: flex;
  gap: 6px;
  padding: 6px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.closet-subtabs::-webkit-scrollbar { display: none; }
.cs-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--dur-fast);
}
.cs-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

/* —— 子页 —— */
.cs-pages {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.cs-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid);
}
.cs-page.active { opacity: 1; pointer-events: auto; }

/* —— 衣橱筛选 —— */
.closet-filter {
  flex-shrink: 0;
  padding: 6px 16px 10px;
}
.cf-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}
.cf-row::-webkit-scrollbar { display: none; }
.cf-cat {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  white-space: nowrap;
  transition: all var(--dur-fast);
}
.cf-cat.active {
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(74, 43, 41, 0.06);
}
.cf-color {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 4px rgba(74, 43, 41, 0.10);
  transition: transform var(--dur-fast);
}
.cf-color.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--primary), 0 2px 6px rgba(74, 43, 41, 0.15);
}
.cf-color.all {
  background: conic-gradient(#F472B6, #FBCFA0, #5D7FA7, #A67B4D, #2A2A2E, #F472B6);
}

/* —— 主网格 (Aesty 风：白底卡 + 抠图悬浮 + 间隔大) —— */
.aesty-grid {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  scrollbar-width: none;
  align-content: start;
}
.aesty-grid::-webkit-scrollbar { display: none; }

.aesty-card {
  height: 240px;
  border-radius: 22px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow:
    0 8px 20px rgba(74, 43, 41, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--e-out);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  position: relative;
}
.aesty-card:active { transform: scale(0.97); }

.aesty-card .img-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
}
.aesty-card .img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aesty-card .img-area::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.0) 60%, rgba(255,252,248,0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

.aesty-card .color-dots {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 3px;
  z-index: 2;
}
.aesty-card .color-dots .d {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(74, 43, 41, 0.15);
}
.aesty-card .cat-tag {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.05em;
  z-index: 2;
}
.aesty-card .meta {
  padding: 8px 12px 12px;
  background: #FFFFFF;
  position: relative;
  z-index: 2;
}
.aesty-card .meta .name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aesty-card .meta .freq {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

.aesty-empty {
  grid-column: span 2;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 13px;
}

/* —— 添加按钮（卡片样式）—— */
.aesty-add {
  height: 240px;
  border-radius: 22px;
  border: 1.5px dashed rgba(255, 107, 107, 0.4);
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--dur-fast);
}
.aesty-add:active {
  background: rgba(255, 107, 107, 0.08);
  transform: scale(0.97);
}
.aesty-add .plus {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* ============================================================
   穿搭实验台（Aesty 风：画板 + 拖拽 + 衣物面板）
   ============================================================ */
.studio {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}
.studio-canvas-wrap {
  flex: 1;
  margin: 0 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF5EA 100%);
  box-shadow: 0 8px 24px rgba(74, 43, 41, 0.08);
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.studio-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  gap: 6px;
}
.studio-slot {
  width: 70%;
  aspect-ratio: 1.4;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-slot.t { aspect-ratio: 1.6; }       /* 上装 */
.studio-slot.b { aspect-ratio: 1.6; }       /* 下装 */
.studio-slot.c {                            /* 外套，叠在上装上 */
  position: absolute;
  top: 6%;
  left: -8%;
  width: 86%;
  aspect-ratio: 1.6;
  z-index: 0;
  opacity: 0.92;
}
.studio-slot.s { width: 50%; aspect-ratio: 1.5; }   /* 鞋 */
.studio-slot.a {                            /* 配饰，浮顶 */
  position: absolute;
  top: 0;
  right: -10%;
  width: 35%;
  aspect-ratio: 1;
  z-index: 3;
}
.studio-slot.empty {
  border-radius: 16px;
  border: 1.5px dashed rgba(74, 43, 41, 0.15);
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}
.studio-slot.empty.absolute { display: none; }
.studio-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(74, 43, 41, 0.10));
}
.studio-slot .x {
  position: absolute;
  top: -2px; right: -2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(74, 43, 41, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 5;
  cursor: pointer;
  display: none;
}
.studio-slot.has .x { display: flex; }

.studio-toolbar {
  flex-shrink: 0;
  padding: 12px 16px 8px;
  display: flex;
  gap: 8px;
}
.studio-btn {
  flex: 1;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 107, 107, 0.15);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all var(--dur-fast);
}
.studio-btn:active { transform: scale(0.96); }
.studio-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* —— 底部衣物面板（横滑选） —— */
.studio-tray {
  flex-shrink: 0;
  padding: 6px 0 80px;
}
.studio-tray-tabs {
  display: flex;
  gap: 14px;
  padding: 0 18px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.studio-tray-tabs::-webkit-scrollbar { display: none; }
.studio-tray-tab {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  padding: 4px 0;
  position: relative;
}
.studio-tray-tab.active { color: var(--primary); }
.studio-tray-tab.active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 16px; height: 2px;
  border-radius: 1px;
  background: var(--primary);
}
.studio-tray-row {
  display: flex;
  gap: 10px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.studio-tray-row::-webkit-scrollbar { display: none; }
.studio-tray-item {
  flex: 0 0 80px;
  height: 80px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(74, 43, 41, 0.08);
  overflow: hidden;
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
  transition: transform var(--dur-fast);
}
.studio-tray-item:active { transform: scale(0.94); }
.studio-tray-item.in-use {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.studio-tray-item img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ============================================================
   我的搭配（保存的 Look 列表）
   ============================================================ */
.looks-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  scrollbar-width: none;
  align-content: start;
}
.looks-list::-webkit-scrollbar { display: none; }

.look-card {
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF, #FFF5EA);
  box-shadow: 0 8px 20px rgba(74, 43, 41, 0.08);
  position: relative;
  cursor: pointer;
  transition: transform var(--dur-fast);
  isolation: isolate;
}
.look-card:active { transform: scale(0.97); }
.look-card .composite {
  position: relative;
  width: 100%;
  height: 75%;
  background: linear-gradient(180deg, #FFFCF8, #FFF0E5);
}
.look-card .composite .layer {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(74, 43, 41, 0.10));
}
.look-card .composite .layer.coat   { width: 70%; height: 50%; top: 18%; left: 4%;   z-index: 1; opacity: 0.9; }
.look-card .composite .layer.top    { width: 50%; height: 40%; top: 14%; left: 26%;  z-index: 2; }
.look-card .composite .layer.bottom { width: 45%; height: 35%; top: 50%; left: 28%;  z-index: 2; }
.look-card .composite .layer.shoe   { width: 35%; height: 22%; top: 76%; left: 15%;  z-index: 3; }
.look-card .composite .layer.acc    { width: 30%; height: 25%; top: 8%;  right: 6%;  z-index: 4; }
.look-card .meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid rgba(74, 43, 41, 0.04);
}
.look-card .meta .reason {
  font-size: 11px;
  color: var(--text-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.look-card .meta .date {
  font-size: 9px;
  color: var(--text-light);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

/* ============================================================
   统计页
   ============================================================ */
.stats-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 100px;
  scrollbar-width: none;
}
.stats-wrap::-webkit-scrollbar { display: none; }
.stat-row {
  margin-bottom: 14px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.stat-row .ttl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}
.color-bars { display: flex; flex-direction: column; gap: 8px; }
.color-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-bar .sw {
  width: 18px; height: 18px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(74, 43, 41, 0.08);
}
.color-bar .lb { width: 50px; font-size: 12px; color: var(--text-dark); }
.color-bar .bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(74, 43, 41, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.color-bar .bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.color-bar .pct {
  font-size: 11px;
  color: var(--text-light);
  width: 32px;
  text-align: right;
  font-weight: 600;
}

.cold-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 4px;
}
.cold-list::-webkit-scrollbar { display: none; }
.cold-item {
  flex: 0 0 90px;
  text-align: center;
}
.cold-item .img-wrap {
  width: 90px; height: 110px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFCF8, #FFF0E5);
  overflow: hidden;
  margin-bottom: 6px;
}
.cold-item img { width: 100%; height: 100%; object-fit: cover; }
.cold-item .nm {
  font-size: 11px;
  color: var(--text-dark);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cold-item .age {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ============================================================
   Me Page（个人 + 设置）
   ============================================================ */
.me-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.me-head {
  padding: 30px 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.me-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 6px 14px rgba(255, 107, 107, 0.3);
}
.me-head .info { flex: 1; }
.me-head .info .n {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}
.me-head .info .m {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}
.me-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}
.me-stat {
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  text-align: center;
}
.me-stat .v {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}
.me-stat .l {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
  letter-spacing: 0.1em;
}
.me-list {
  flex: 1;
  padding: 0 20px 100px;
  overflow-y: auto;
  scrollbar-width: none;
}
.me-list::-webkit-scrollbar { display: none; }
.me-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  margin-bottom: 8px;
}
.me-row .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.10);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.me-row .ico svg { width: 18px; height: 18px; }
.me-row .body { flex: 1; }
.me-row .body .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}
.me-row .body .s {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}
.me-row .arr {
  color: var(--text-light);
  font-size: 16px;
  opacity: 0.4;
}

/* ============================================================
   Chat 全屏（V3 · Grok 风）
   ============================================================ */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-grad-start) 0%, var(--bg-grad-end) 100%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  max-width: 460px;
  margin: 0 auto;
  transform: translateY(100%);
  transition: transform var(--dur-mid) var(--e-out);
  overflow: hidden;
}
.chat-overlay.show { transform: translateY(0); }

.co-head {
  flex: 0 0 auto;
  padding: 14px 16px 12px;
  padding-top: calc(14px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 234, 209, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.co-head .av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(255, 107, 107, 0.3);
}
.co-head .av img { width: 100%; height: 100%; object-fit: cover; }
.co-head .info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 10px;
  transition: background var(--dur-fast);
}
.co-head .info:active { background: rgba(255, 255, 255, 0.5); }
.co-head .info .n {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.co-head .info .n .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 6px #34C759;
}
.co-head .info .n .caret {
  font-size: 10px;
  color: var(--text-light);
  margin-left: 2px;
  transition: transform var(--dur-fast);
}
.co-head .info.open .caret { transform: rotate(180deg); }
.co-head .info .s {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.co-head .info .s .model-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  background: rgba(255, 107, 107, 0.10);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.02em;
}

/* —— 模型选择器面板 —— */
.model-picker {
  position: absolute;
  top: 100%;
  left: 8px;
  right: 8px;
  margin-top: 4px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(74, 43, 41, 0.18), 0 0 0 1px rgba(74, 43, 41, 0.04);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition: all var(--dur-mid) var(--e-spring);
  max-height: 60dvh;
  overflow-y: auto;
  scrollbar-width: none;
}
.model-picker::-webkit-scrollbar { display: none; }
.model-picker.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.mp-head {
  padding: 14px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.mp-row {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  margin: 0 6px 4px;
  transition: background var(--dur-fast);
  cursor: pointer;
}
.mp-row:active { background: rgba(255, 107, 107, 0.06); }
.mp-row.active {
  background: linear-gradient(135deg, rgba(255,107,107,.10), rgba(255,179,128,.10));
}
.mp-row .icn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--mp-color, #4285F4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  flex-shrink: 0;
}
.mp-row .meta {
  flex: 1;
  min-width: 0;
}
.mp-row .ttl {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mp-row .ttl .tag {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.mp-row .desc {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.mp-row .check {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0;
}
.mp-row.active .check { opacity: 1; }
.mp-foot {
  padding: 10px 16px 14px;
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  border-top: 1px solid rgba(74, 43, 41, 0.05);
  margin-top: 6px;
}
.co-head .ico-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dark);
  flex-shrink: 0;
}
.co-head .ico-btn svg { width: 18px; height: 18px; }

/* —— 模式 chips —— */
.co-modes {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 6px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 234, 209, 0.5);
}
.co-modes::-webkit-scrollbar { display: none; }
.co-mode {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--dur-fast);
}
.co-mode.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

/* —— 消息流（不用气泡）—— */
.co-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 0;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.co-body::-webkit-scrollbar { display: none; }

.msg {
  padding: 0 20px;
  animation: msg-in 0.42s var(--e-out);
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 用户消息：右对齐 + 弱底色块 */
.msg.user {
  display: flex;
  justify-content: flex-end;
}
.msg.user .body {
  max-width: 80%;
  padding: 10px 14px;
  background: rgba(255, 107, 107, 0.10);
  border: 1px solid rgba(255, 107, 107, 0.18);
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dark);
  font-weight: 500;
}
.msg.user .body img {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin: -2px;
}
.msg.user .body.image-bubble {
  padding: 4px;
}

/* Rere 消息：纯文本块 + 头像 */
.msg.rere {
  display: flex;
  gap: 10px;
}
.msg.rere .av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  flex-shrink: 0;
  margin-top: 2px;
  overflow: hidden;
}
.msg.rere .av img { width: 100%; height: 100%; object-fit: cover; }
.msg.rere .body {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark);
  font-weight: 400;
  padding-right: 10px;
}
.msg.rere .body p { margin-bottom: 8px; }
.msg.rere .body p:last-child { margin-bottom: 0; }
.msg.rere .body b {
  color: var(--primary);
  font-weight: 600;
}
.msg.rere .body em {
  font-style: italic;
  color: var(--text-dark);
  opacity: 0.85;
}
.msg.rere .body .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.7s infinite;
  border-radius: 1.5px;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* —— 字符 fade-in（流式打字时给每个字加） —— */
.tk {
  display: inline-block;
  animation: tk-in 0.18s var(--e-out);
}
@keyframes tk-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* —— typing 指示器 —— */
.msg.typing {
  display: flex;
  gap: 10px;
  padding: 0 20px;
}
.msg.typing .dots {
  display: inline-flex;
  gap: 4px;
  padding: 12px 0;
  margin-left: 38px;
}
.msg.typing .dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: typing 1.2s infinite;
}
.msg.typing .dots span:nth-child(2) { animation-delay: 0.15s; }
.msg.typing .dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
  30%           { opacity: 1; transform: scale(1.15); }
}

/* —— follow-up chips（每条 Rere 回复后挂在下方） —— */
.followups {
  margin: 6px 20px 0;
  margin-left: 58px;  /* 对齐 Rere 文本 */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fu-chip {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 107, 107, 0.20);
  border-radius: 999px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast);
}
.fu-chip:active {
  background: var(--primary);
  color: #fff;
}
.fu-chip.retry {
  background: rgba(255, 107, 107, 0.10);
  color: var(--primary);
  font-weight: 700;
}
.fu-chip.retry:active {
  background: var(--primary);
  color: #fff;
}

/* —— Nudge 主动气泡（贴在输入区上方）—— */
.co-nudge {
  position: relative;
  margin: 0 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 107, 107, 0.20);
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-dark);
  font-style: italic;
  display: none;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.10);
}
.co-nudge.show {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: msg-in 0.4s var(--e-out);
}
.co-nudge .x {
  margin-left: auto;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
}

/* —— 输入区（学 Grok）—— */
.co-input-wrap {
  flex: 0 0 auto;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 234, 209, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 107, 107, 0.08);
}

/* 已选图片预览 */
.co-attach {
  display: none;
  margin-bottom: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  align-items: center;
  gap: 10px;
}
.co-attach.show { display: flex; }
.co-attach img {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.co-attach .x {
  width: 24px; height: 24px;
  background: rgba(74, 43, 41, 0.7);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
}
.co-attach .info {
  flex: 1;
  font-size: 12px;
  color: var(--text-dark);
}

.co-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #fff;
  padding: 6px 6px 6px 14px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(74, 43, 41, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.co-input textarea {
  flex: 1;
  padding: 8px 0;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.4;
  font-family: inherit;
  color: var(--text-dark);
  background: transparent;
  max-height: 120px;
  min-height: 24px;
}
.co-input textarea::placeholder { color: var(--text-light); }
.co-input .tool {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  flex-shrink: 0;
  transition: all var(--dur-fast);
}
.co-input .tool:active { background: rgba(255, 107, 107, 0.1); color: var(--primary); }
.co-input .tool svg { width: 20px; height: 20px; }
.co-input .send {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
  transition: transform var(--dur-fast);
  opacity: 0.5;
}
.co-input .send.active { opacity: 1; }
.co-input .send:active { transform: scale(0.92); }
.co-input .send svg { width: 18px; height: 18px; }

/* 录音中状态 */
.co-input.recording {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--primary);
}
.co-input.recording .recording-ind {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}
.co-input.recording .recording-ind .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: rec-pulse 0.8s infinite;
}
@keyframes rec-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* —— 底部快捷场景（首次或空状态出现）—— */
.co-empty-scenes {
  display: none;
  padding: 0 20px 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.co-empty-scenes.show { display: flex; }
.co-empty-scene {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(74, 43, 41, 0.06);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur-fast);
}
.co-empty-scene:active { background: var(--primary); color: #fff; }

/* —— 抽屉（会话）—— */
.co-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(74, 43, 41, 0.4);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid);
  z-index: 5;
}
.co-drawer-mask.show { opacity: 1; pointer-events: auto; }

.co-drawer {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 280px;
  background: #fff;
  border-radius: 0 24px 24px 0;
  box-shadow: 8px 0 32px rgba(74, 43, 41, 0.18);
  transform: translateX(-100%);
  transition: transform var(--dur-mid) var(--e-out);
  display: flex;
  flex-direction: column;
  z-index: 6;
}
.co-drawer.show { transform: translateX(0); }
.co-drawer-head {
  padding: calc(20px + env(safe-area-inset-top)) 18px 12px;
}
.co-drawer-head h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.co-new-chat {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 14px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}
.co-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 20px;
  scrollbar-width: none;
}
.co-drawer-list::-webkit-scrollbar { display: none; }
.dr-row {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 4px;
  cursor: pointer;
}
.dr-row.active {
  background: rgba(255, 107, 107, 0.10);
}
.dr-row .t {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dr-row .m {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.dr-row.active .t { color: var(--primary); font-weight: 600; }

/* ============================================================
   Detail Sheet（计划详情 / 衣物详情 / 天气详情，沿用）
   ============================================================ */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(74, 43, 41, 0.35);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid);
  z-index: 100;
}
.mask.show { opacity: 1; pointer-events: auto; }

.detail-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border-radius: 28px 28px 0 0;
  z-index: 105;
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
  transition: transform var(--dur-mid) var(--e-out);
  box-shadow: 0 -10px 40px rgba(74, 43, 41, 0.2);
  overflow: hidden;
}
.detail-sheet.show { transform: translate(-50%, 0); }
.detail-head {
  position: relative;
  padding: 18px 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(74, 43, 41, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-head .grip {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 4px;
  border-radius: 2px;
  background: rgba(74, 43, 41, 0.18);
}
.detail-head h2 {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}
.detail-head .close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 248, 242, 0.7);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
}
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: none;
}
.detail-body::-webkit-scrollbar { display: none; }

.plan-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 10px;
}
.plan-item .time {
  flex-shrink: 0;
  padding: 5px 10px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--primary);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  height: fit-content;
}
.plan-item .body { flex: 1; min-width: 0; }
.plan-item .ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.plan-item .desc {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.55;
}

.detail-foot {
  flex-shrink: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(74, 43, 41, 0.06);
  background: var(--card-bg);
}
.detail-foot .btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}

/* —— 天气详情 —— */
.weather-detail .big-temp {
  text-align: center;
  padding: 20px 0;
}
.weather-detail .num {
  font-size: 88px;
  font-weight: 200;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.04em;
}
.weather-detail .cond {
  font-size: 16px;
  color: var(--text-light);
  margin-top: 4px;
}
.weather-detail .hl {
  font-size: 13px;
  color: var(--text-dark);
  margin-top: 4px;
  font-weight: 500;
}
.weather-section {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}
.weather-section .ttl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}
.hourly-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hourly-row::-webkit-scrollbar { display: none; }
.hourly-item {
  flex-shrink: 0;
  text-align: center;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.hourly-item .h { font-size: 11px; color: var(--text-light); }
.hourly-item .ic { font-size: 18px; }
.hourly-item .t { font-weight: 600; color: var(--text-dark); }
.daily-row {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(74, 43, 41, 0.05);
}
.daily-row:last-child { border-bottom: none; }
.daily-row .d { color: var(--text-dark); font-weight: 500; }
.daily-row .ic { text-align: center; font-size: 16px; }
.daily-row .t { text-align: right; color: var(--text-dark); font-weight: 500; }

/* Reason Dialog（保留） */
.dlg-mask {
  position: fixed;
  inset: 0;
  background: rgba(74, 43, 41, 0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.dlg-mask.show { opacity: 1; pointer-events: auto; }
.dlg {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: 24px;
  text-align: center;
  transform: scale(0.85);
  transition: transform var(--dur-mid) var(--e-spring);
  box-shadow: 0 20px 60px rgba(74, 43, 41, 0.3);
}
.dlg-mask.show .dlg { transform: scale(1); }
.dlg h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.dlg p {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 18px;
  font-weight: 400;
}
.dlg .actions {
  display: flex;
  gap: 10px;
}
.dlg .btn {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.dlg .btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}
.dlg .btn.ghost {
  background: rgba(74, 43, 41, 0.06);
  color: var(--text-dark);
}
