/* ===== 串个珠 - 全局样式 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* ═══ 串个珠 Design Tokens v2 · Apple × MUJI × Jewelry ═══ */

  /* ── 基础色板 ── */
  --bg:               #F9F7F4;
  --brand:            #A08868;
  --accent:           #E8D5C4;
  --danger:           #C87562;

  /* ── 文字层级 ── */
  --text-primary:     #3D3530;
  --text-secondary:   #8A7E72;
  --text-tertiary:    #B5A99C;

  /* ── 背景层级 ── */
  --surface:          #FFFFFF;
  --surface-secondary:#FAF8F5;
  --surface-tertiary: #F3EFEA;

  /* ── 边框层级 ── */
  --border:           #EBE6E0;
  --border-light:     #EBE6E0;
  --border-medium:    #D5CDC4;

  /* ── 阴影 — 克制精致 ── */
  --shadow:   0 1px 4px rgba(61,53,48,0.04);
  --shadow-sm: 0 1px 3px rgba(61,53,48,0.05);
  --shadow-md: 0 4px 16px rgba(61,53,48,0.07);
  --shadow-lg: 0 8px 32px rgba(61,53,48,0.09);

  /* ── 品牌色扩展 ── */
  --brand-light: #D4C4AE;
  --brand-dark:  #7B674E;

  /* ── 间距 & 圆角 ── */
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;
  --radius-full:  999px;
  --margin:       16px;
  --card-padding: 12px;
  --tab-height:   56px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

html {
  height: 100%;
  overflow: hidden;
}
body {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== 页面容器 ===== */
.page {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 8px);
  scroll-behavior: smooth;
  scrollbar-width: none;
  animation: fadeIn 0.2s ease;
}
.page::-webkit-scrollbar { display: none; }
.page.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-content {
  padding: 0 var(--margin);
  flex: 1;
}

/* ===== 首页 ===== */
.home-header {
  padding: 32px var(--margin) 20px;
  text-align: center;
}
.brand-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.brand-logo svg { display: block; }
.brand-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 2px;
}
.brand-slogan {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 300;
}

/* DIY Banner */
.diy-banner {
  margin: 0 var(--margin) 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 50%, var(--brand-light) 100%);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.diy-banner:active { transform: scale(0.98); }
.diy-banner-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.15) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(232,213,196,0.2) 0%, transparent 50%);
}
.diy-banner-content {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  position: relative;
  gap: 16px;
}
.diy-banner-icon { flex-shrink: 0; }
.diy-banner-text { flex: 1; }
.diy-banner-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.diy-banner-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
}
.diy-banner-arrow {
  font-size: 24px;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

/* Section */
.section { margin-bottom: 24px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--margin);
  margin-bottom: 12px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.section-more {
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
}

/* 双列卡片 */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 var(--margin);
}
.gallery-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gallery-card:active { transform: scale(0.98); box-shadow: var(--shadow-lg); }
.gallery-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #F9F6F0 0%, #F0EBE3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.gallery-card-img canvas {
  width: 100%;
  height: 100%;
}
.gallery-card-info {
  padding: 10px var(--card-padding);
}
.gallery-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-card-author {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* 横向滚动 */
.hot-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--margin);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hot-scroll::-webkit-scrollbar { display: none; }
.hot-scroll { cursor: grab; user-select: none; }
.hot-item {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.hot-item:active { transform: scale(0.98); }
.hot-item-img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  background: var(--surface-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: var(--shadow-md);
}
.hot-item-name {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-item-price {
  font-size: 11px;
  color: var(--brand);
  font-weight: 500;
}

/* ===== 好物商城 ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--margin);
  flex-shrink: 0;
}
.page-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-body, #3A3530);
  letter-spacing: 0;
}
.page-action {
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
}

.search-bar {
  padding: 0 var(--margin) 12px;
  flex-shrink: 0;
}
.search-input {
  display: flex;
  align-items: center;
  background: var(--surface-tertiary, #F5F3F0);
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}
.search-icon { font-size: 14px; }
.search-input input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}
.search-input input::placeholder { color: var(--text-tertiary); }

.category-tabs, .filter-tabs {
  display: flex;
  gap: 8px;
  padding: 0 var(--margin) 12px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar, .filter-tabs::-webkit-scrollbar { display: none; }
.cat-tab, .filter-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface-tertiary, #F5F5F5);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab.active, .filter-tab.active {
  background: var(--brand);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.product-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:active { transform: scale(0.98); box-shadow: var(--shadow-lg); }
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface-tertiary, #F5F3F0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.product-card-info { padding: 10px var(--card-padding); }
.product-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.product-card-price {
  font-size: 14px;
  font-weight: 600;
  color: #E85D3F;
  margin-top: 4px;
}
.product-card-price .original {
  font-size: 11px;
  color: var(--text-tertiary);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

/* ===== DIY编辑器 ===== */
.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--margin);
  border-bottom: 1px solid var(--border-light, #EFEBE6);
  flex-shrink: 0;
  background: var(--surface, #fff);
}
.editor-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.editor-actions { display: flex; gap: 8px; }
.editor-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s;
}
.editor-btn:active { transform: scale(0.9); background: #f0f0f0; }

.canvas-container {
  flex: 1;
  position: relative;
  background: var(--surface-secondary, #FAFAFA);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
  box-shadow: inset 0 0 0 1px var(--border-light, #EFEBE6);
}
#bracelet-canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}
.canvas-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted, #B5B0A8);
  background: rgba(255,255,255,0.85);
  padding: 4px 12px;
  border-radius: 10px;
  pointer-events: none;
  transition: opacity 0.5s;
}

/* 空白与散珠阶段的轻量引导，作为画布的一部分而不是页面夹层。 */
.canvas-empty-guide {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary, #82786F);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.canvas-empty-guide[hidden] { display: none; }
.canvas-empty-guide::before { content: none; }
.canvas-empty-guide[hidden] { display: none; }

/* 画布内的状态动作：它服务于作品，而不是占用底部工具栏。 */
.canvas-bracelet-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.canvas-bracelet-btn:active { transform: scale(.97); box-shadow: none; }
.canvas-bracelet-btn[hidden] { display: none; }

/* 垃圾篓 */
.trash-zone {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(58, 53, 48, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #B5B0A8);
  transition: all 0.2s;
  z-index: 5;
}
.trash-zone.active {
  background: rgba(200, 90, 70, 0.10);
  color: var(--danger, #C85A46);
  transform: scale(1.25);
}

/* 素材选择区 — 美团点餐式布局 */
.material-section {
  display: none;
}

/* 顶部Tab栏（已隐藏，分类由左侧导航控制） */
.mat-top-tabs {
  display: none;
}
.mat-top-tabs::-webkit-scrollbar { display: none; }
.mat-top-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.mat-top-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 500;
}

/* 中间内容区（左导航 + 右内容） */
.mat-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* 左侧分类导航 */
.mat-side-nav {
  width: 68px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #F8F8F8;
  padding: 4px 0;
  scrollbar-width: none;
}
.mat-side-nav::-webkit-scrollbar { display: none; }
.mat-side-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  font-size: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.12s;
  gap: 1px;
  min-height: 48px;
}
.mat-side-item .side-icon { font-size: 16px; }
.mat-side-item .side-label { font-size: 9px; line-height: 1.2; text-align: center; }
.mat-side-item.active {
  color: var(--brand);
  background: var(--surface);
  border-left-color: var(--brand);
  font-weight: 500;
}

/* 右侧内容 */
.mat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 商品Grid */
.mat-grid {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  justify-items: center;
  align-content: start;
  scrollbar-width: none;
}
.mat-grid::-webkit-scrollbar { display: none; }
.mat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--surface-secondary, #FAFAFA);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
  width: 100%;
  max-width: 100px;
  box-sizing: border-box;
}
.mat-card:active { background: #F0F0F0; }
.mat-card-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}
.mat-card-name {
  font-size: 11px;
  color: var(--text-body, #333);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mat-card-size {
  font-size: 9px;
  color: #999;
}
.mat-card-price {
  font-size: 10px;
  color: var(--brand);
}

/* 底部固定汇总栏 */
.mat-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--margin);
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--surface, #fff);
  border-top: 1px solid var(--border-light, #EFEBE6);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.summary-info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}
.summary-item { white-space: nowrap; }
.summary-dot { color: #DDD; font-size: 10px; }
.summary-price { color: var(--brand); font-weight: 500; }
.summary-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full, 999px);
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
}
.summary-btn:active { opacity: 0.85; transform: scale(0.97); }
.summary-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: none;
  background: var(--border-light, #EFEBE6);
  color: var(--text-muted, #B5B0A8);
  transform: none;
}
.summary-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.summary-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--surface-tertiary, #F5F3F0);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-caption, #8A8580);
  transition: background 0.2s, color 0.2s;
}
.summary-icon-btn:active { background: var(--border-medium, #D9D0C6); color: var(--text-body, #3A3530); }

/* 移除旧的工具栏样式 */
.editor-toolbar { display: none; }

/* 底部工具栏 */
.editor-toolbar {
  padding: 10px var(--margin);
  padding-bottom: calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--border-light, #EFEBE6);
  flex-shrink: 0;
  background: var(--surface, #fff);
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wrist-adjust {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-tertiary, #F5F3F0);
  border-radius: 20px;
  padding: 6px 12px;
}
.wrist-label { font-size: 12px; color: var(--text-tertiary); }
.wrist-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #ddd;
  background: var(--surface);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform 0.1s ease;
}
.wrist-btn:active { transform: scale(0.9); }
.wrist-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  min-width: 36px;
  text-align: center;
}
.tool-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.tool-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--surface-tertiary, #F5F3F0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.tool-btn:active { transform: scale(0.9); }
.order-btn {
  height: 40px;
  padding: 0 16px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s ease;
  font-family: inherit;
}
.order-btn:active { transform: scale(0.95); }

/* ===== 购物袋 ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 12px;
}
.empty-icon { font-size: 48px; }
.empty-text {
  font-size: 15px;
  color: var(--text-tertiary);
}
.utility-empty-state { gap: 7px; }
.empty-subtext { font-size: 12px; color: var(--text-tertiary); }
.order-thumb-empty,
.order-card-fallback,
.design-thumb-empty {
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}
.btn-primary {
  padding: 10px 32px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:active { opacity: 0.85; transform: scale(0.97); }

/* ===== 我的 ===== */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 24px;
  background: linear-gradient(180deg, var(--surface-tertiary) 0%, var(--surface) 100%);
}
.profile-avatar { margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.profile-edit-hint { margin-top: 4px; color: var(--text-secondary); font-size: 11px; opacity: .7; }
.profile-avatar-row { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.profile-avatar-preview { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; }
.profile-avatar-upload { display: inline-flex; align-items: center; padding: 6px 16px; border: 1px dashed rgba(117,85,65,.24); border-radius: 20px; background: transparent; color: var(--brand-dark); font-size: 12px; cursor: pointer; }
.profile-avatar-upload:active { background: #f6f0ea; }

.order-entry {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.order-entry-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.order-icons {
  display: flex;
  justify-content: space-around;
}
.order-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  cursor: pointer;
}
.order-item span { font-size: 12px; color: var(--text-secondary); }
.order-item { position: relative; }
.order-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #E74C3C; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
}

.menu-list {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  transition: background 0.15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--surface-secondary); }
.menu-item span:first-of-type { flex: 1; }
.menu-arrow { color: var(--text-tertiary); font-size: 14px; }
.menu-badge { min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #E74C3C; color: #fff; font-size: 10px; font-weight: 700; margin-right: 6px; }

/* ===== 我的消息 ===== */
.msg-loading { text-align: center; padding: 40px 20px; color: var(--text-secondary); font-size: 13px; }
.msg-item { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.msg-item.unread { background: #fdf8f2; }
.msg-left { flex: 0 0 auto; display: flex; align-items: flex-start; padding-top: 3px; }
.msg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E74C3C; }
.msg-dot.read { background: transparent; }
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.msg-tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #e8e8e8; color: #666; }
.msg-tag.approved { background: #e8f5e9; color: #2e7d32; }
.msg-tag.rejected { background: #fce4ec; color: #c62828; }
.msg-content { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.msg-time { margin-top: 6px; font-size: 11px; color: var(--text-tertiary); }

/* ===== 底部Tab导航 ===== */
.tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--tab-height);
  padding-bottom: var(--safe-bottom);
  background: var(--surface, #fff);
  border-top: 1px solid var(--border-light, #EFEBE6);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  z-index: 100;
}
.tab-item {
  display: flex;
  flex: 1 1 25%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted, #B5B0A8);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  padding: 4px 12px;
}
.tab-item.active { color: var(--brand); }
.tab-item svg { display: block; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(61, 53, 48, 0.88);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  z-index: 999;
  pointer-events: none;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== 隐私政策弹窗 ===== */
.privacy-modal { position:fixed; inset:0; z-index:1300; display:flex; align-items:flex-end; justify-content:center; visibility:hidden; opacity:0; transition:visibility .2s,opacity .2s; }
.privacy-modal.open { visibility:visible; opacity:1; }
.privacy-backdrop { position:absolute; inset:0; background:rgba(43,29,21,.48); }
.privacy-dialog { position:relative; width:100%; max-width:600px; max-height:80vh; padding:24px var(--margin) calc(16px + env(safe-area-inset-bottom)); box-sizing:border-box; border-radius:25px 25px 0 0; background:#fffdfa; }
.privacy-dialog h3 { margin:0 0 16px; color:var(--text-primary); font-size:18px; text-align:center; }
.privacy-body { max-height:48vh; overflow-y:auto; padding:0 4px; color:var(--text-secondary); font-size:13px; line-height:1.8; }
.privacy-body p { margin:8px 0; }
.privacy-body strong { color:var(--text-primary); }
.privacy-actions { margin-top:16px; }
.privacy-actions button { width:100%; min-height:46px; border:0; border-radius:14px; background:var(--brand); color:#fff; font-size:14px; font-weight:600; cursor:pointer; }

/* ===== 结算确认页 ===== */
.checkout-section {
  margin-bottom: 16px;
}
.checkout-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #333);
  margin-bottom: 10px;
}
/* 地址列表 */
.address-list { margin-bottom: 8px; }
.address-card {
  background: var(--surface);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  box-shadow: var(--shadow, 0 1px 6px rgba(0,0,0,0.05));
  margin-bottom: 8px;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.address-card:not(.selected) {
  cursor: pointer;
}
.address-card:not(.selected):hover {
  border-color: #d0c8b8;
  background: #fdfaf5;
}
.address-card:not(.selected):active {
  background: #f8f2e8;
}
.address-card.selected {
  border-color: var(--brand, #8B7355);
  background: #FDFAF6;
}
.address-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand, #8B7355);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.address-card-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.address-radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d0d0d0;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.address-card.selected .address-radio-dot {
  border-color: var(--brand, #8B7355);
  background: var(--brand, #8B7355);
}
.address-card.selected .address-radio-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface);
}
.address-card-body { flex: 1; min-width: 0; }
.address-contact {
  font-size: 15px;
  color: var(--text-primary, #333);
  margin-bottom: 4px;
  font-weight: 500;
}
.address-contact .addr-phone {
  font-size: 13px;
  color: var(--text-tertiary, #999);
  margin-left: 8px;
  font-weight: 400;
}
.address-detail {
  font-size: 13px;
  color: var(--text-secondary, #666);
  line-height: 1.5;
}
.address-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light, #EFEBE6);
}
/* 默认地址标签 */
.addr-default-tag {
  display: inline-block;
  font-size: 10px;
  color: #fff;
  background: var(--brand, #8B7355);
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 500;
  vertical-align: middle;
}
/* 设为默认按钮 */
.address-action-btn.primary {
  color: var(--brand, #8B7355);
  font-weight: 600;
}

.address-action-btn {
  font-size: 12px;
  color: var(--brand, #8B7355);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 0;
  font-family: inherit;
}
.address-action-btn:active { opacity: 0.7; }
.address-action-btn.danger { color: #E85D3F; }

/* 新增地址按钮 */
.address-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1.5px dashed #d0c8b8;
  border-radius: var(--radius, 12px);
  color: var(--brand, #8B7355);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.address-add-btn:active { background: #faf8f5; }
.address-add-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--brand, #8B7355);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
}

/* 地址表单标题 */
.address-form-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #333);
  margin-bottom: 14px;
  text-align: center;
}
/* 地址表单 */
.address-form {
  background: var(--surface);
  border-radius: var(--radius, 12px);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin-bottom: 5px;
}
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-medium, #e5e5e5);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary, #333);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--brand, #8B7355); }
.form-group input::placeholder { color: #ccc; }
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-medium, #e5e5e5);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary, #333);
  outline: none;
  font-family: inherit;
  background: var(--surface);
  transition: border-color 0.15s;
  appearance: auto;
  cursor: pointer;
}
.form-group select:focus { border-color: var(--brand, #8B7355); }
.region-selects {
  display: flex;
  gap: 6px;
}
.region-selects select {
  flex: 1;
  min-width: 0;
}
.address-form-actions {
  display: flex;
  gap: 10px;
}
.address-cancel-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 22px;
  border: 1.5px solid #ddd;
  background: var(--surface);
  color: var(--text-secondary, #666);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.address-cancel-btn:active { background: #f5f5f5; }
.address-save-btn {
  flex: 2;
  padding: 11px 0;
  border-radius: 22px;
  border: none;
  background: var(--brand, #8B7355);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.address-save-btn:active { opacity: 0.85; }

/* 结算商品列表（可展开） */
.checkout-item {
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}
.checkout-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.checkout-item-header:active { background: #fafafa; }
.checkout-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.checkout-item-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.checkout-item-summary {
  flex: 1;
  min-width: 0;
}
.checkout-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #333);
  margin-bottom: 2px;
}
.checkout-item-brief {
  font-size: 11px;
  color: var(--text-tertiary, #999);
}
.checkout-item-arrow { display: none; }

/* 珠子明细面板 — 默认展开 */
.checkout-bead-detail {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border-light, #EFEBE6);
}
.bead-detail-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
  margin-top: 8px;
}
.bead-detail-table th {
  text-align: left;
  color: var(--text-tertiary, #999);
  font-weight: 400;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border-light, #EFEBE6);
  font-size: 11px;
}
.bead-detail-table td {
  padding: 6px 6px;
  color: var(--text-secondary, #666);
  border-bottom: 1px solid var(--border-light, #EFEBE6);
}
.bead-detail-table td:first-child { color: var(--text-primary, #333); font-weight: 500; }
.bead-detail-table td:last-child { text-align: right; color: var(--brand, #8B7355); font-weight: 500; }
.bead-detail-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 5px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* 价格汇总 */
.checkout-summary {
  background: var(--surface);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary, #666);
  padding: 4px 0;
}
.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #333);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border, #f0f0f0);
}
.checkout-summary-total span:last-child {
  color: #E85D3F;
  font-size: 20px;
}

/* ===== 订单列表 ===== */
.order-card {
  background: var(--surface);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.order-card:active { background: #fafafa; }
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light, #EFEBE6);
}
.order-card-no {
  font-size: 12px;
  color: var(--text-tertiary, #999);
}
.order-card-status {
  font-size: 13px;
  font-weight: 600;
  color: #2ECC71;
  display: flex; align-items: center; gap: 6px;
}
.dot-unprocessed {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #E74C3C;
  flex-shrink: 0; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(231,76,60,.18);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(231,76,60,.18); }
  50% { box-shadow: 0 0 0 7px rgba(231,76,60,.08); }
}
.order-card-body {
  display: flex;
  gap: 10px;
}
.order-card-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}
.order-card-info {
  flex: 1;
  min-width: 0;
}
.order-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-card-detail {
  font-size: 12px;
  color: var(--text-tertiary, #999);
  margin-top: 3px;
}
.order-card-price {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: #E85D3F;
  flex-shrink: 0;
  align-self: center;
}

/* ===== 订单详情 ===== */
.order-detail-status {
  text-align: center;
  padding: 24px 0 8px;
}
.order-detail-icon {
  font-size: 56px;
  margin-bottom: 8px;
}
.order-detail-status-text {
  font-size: 20px;
  font-weight: 700;
  color: #2ECC71;
}
.order-detail-status-sub {
  font-size: 13px;
  color: var(--text-tertiary, #999);
  margin-top: 4px;
}
.order-detail-card {
  background: var(--surface);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.order-detail-card .odc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #333);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light, #EFEBE6);
}
.odc-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary, #666);
  line-height: 1.6;
}
.odc-row .odc-label { color: var(--text-tertiary, #999); flex-shrink: 0; }
.odc-row .odc-value { text-align: right; }
.btn-copy-order-no {
  flex-shrink: 0;
  min-width: 36px; height: 26px;
  padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e0d8ce; border-radius: 6px;
  background: #faf8f5; cursor: pointer;
  font-size: 11px; line-height: 1;
  transition: all .15s ease;
}
.btn-copy-order-no:hover { background: #f0ebe0; border-color: #c4a47d; }
.btn-copy-order-no:active { transform: scale(0.92); }
.order-no-text { word-break: break-all; }
.odc-bead-list {
  padding: 4px 0;
}
.odc-bead-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light, #EFEBE6);
  font-size: 13px;
}
.odc-bead-item:last-child { border-bottom: none; }
.odc-bead-name { flex: 1; color: var(--text-primary, #333); }
.odc-bead-qty { color: var(--text-tertiary, #999); margin: 0 8px; }
.odc-bead-price { color: var(--brand, #8B7355); font-weight: 500; }
.order-detail-total {
  background: var(--surface);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: right;
  box-shadow: var(--shadow);
  font-size: 16px;
  color: var(--text-primary, #333);
}
.order-detail-total .odt-price {
  font-size: 24px;
  font-weight: 700;
  color: #E85D3F;
}

/* ===== 登录/注册 ===== */
.auth-logo { font-size: 56px; text-align: center; margin: 24px 0 8px; }
.auth-subtitle { text-align: center; font-size: 13px; color: var(--text-tertiary, #999); margin-bottom: 28px; }
.auth-form { padding: 0 8px; }
.auth-submit-btn {
  width: 100%;
  padding: 13px 0;
  border-radius: 24px;
  border: none;
  background: var(--brand, #8B7355);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: all 0.15s;
}
.auth-submit-btn:active { opacity: 0.85; }
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary, #999);
  margin-top: 16px;
}
.auth-switch span {
  color: var(--brand, #8B7355);
  font-weight: 500;
  cursor: pointer;
}

/* ===== 大图预览 ===== */
.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.img-lightbox-inner {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 80vh;
}
.img-lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.img-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.img-lightbox-close:active { background: rgba(0,0,0,0.7); }

/* 结算页缩略图可点击 */
.checkout-item-thumb { cursor: pointer; }

/* ===== 订单确认弹窗 ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.confirm-modal {
  width: calc(100% - 40px);
  max-width: 380px;
  max-height: 70vh;
  background: var(--surface);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  animation: confirmSlideUp 0.25s ease;
}
.confirm-modal-kicker {
  margin: 20px 16px 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
}
.confirm-modal-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  padding: 7px 16px 0;
  color: var(--text-primary, #333);
}
.confirm-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.confirm-order-status {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fff8eb;
  color: #9a6b20;
  font-size: 12px;
  text-align: center;
}
.confirm-order-status strong { color: #e58a16; }
/* 确认弹窗 — 地址区 */
.confirm-addr {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary, #666);
  line-height: 1.6;
}
.confirm-addr .confirm-addr-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #333);
}
/* 确认弹窗 — 商品列表 */
.confirm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light, #EFEBE6);
  font-size: 13px;
}
.confirm-item:last-child { border-bottom: none; }
.confirm-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary, #333);
}
.confirm-item-right {
  text-align: right;
  flex-shrink: 0;
  margin-left: 12px;
}
.confirm-item-price { color: #E85D3F; font-weight: 600; }
.confirm-item-qty { color: var(--text-tertiary, #999); font-size: 11px; }
.confirm-modal-total {
  text-align: right;
  padding: 12px 16px;
  font-size: 20px;
  font-weight: 700;
  color: #E85D3F;
  border-top: 1px solid var(--border-light, #EFEBE6);
}
.confirm-modal-hint {
  padding: 0 16px 12px;
  text-align: right;
  font-size: 11px;
  color: var(--text-tertiary, #999);
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}
.confirm-btn-cancel {
  flex: 1;
  padding: 12px 0;
  border-radius: 24px;
  border: 1.5px solid #ddd;
  background: var(--surface);
  color: var(--text-secondary, #666);
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.confirm-btn-cancel:active { background: #f5f5f5; }
.confirm-btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.confirm-btn-ok {
  flex: 2;
  padding: 12px 0;
  border-radius: 24px;
  border: none;
  background: var(--brand, #8B7355);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.confirm-btn-ok:active { opacity: 0.85; }
.confirm-btn-ok:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@keyframes confirmSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 响应式 ===== */
@media (max-width: 360px) {
  :root { --margin: 12px; }
  .brand-name { font-size: 20px; }
  .section-title { font-size: 16px; }
  .diy-banner-title { font-size: 17px; }
  .gallery-grid { gap: 8px; }
  .product-grid { gap: 8px; }
}

/* ===== 手串详情页 ===== */
.detail-preview {
  width: 100%;
  min-height: 300px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}
.detail-preview canvas {
  display: block;
  image-rendering: auto;
}

/* ===== 我的设计作品 ===== */
.my-designs-content { padding-bottom: 96px; }
.my-designs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.my-design-card {
  overflow: hidden;
  border: 1px solid #eee8df;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(72, 57, 40, 0.06);
}
.my-design-preview {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #faf8f4, #f3eee7);
  cursor: pointer;
}
.my-design-preview img { width: 100%; height: 100%; object-fit: contain; }
.my-design-preview span { font-size: 48px; }
.my-design-info { padding: 12px; }
.my-design-title { font-size: 15px; font-weight: 650; color: var(--text-primary, #333); }
.my-design-meta { margin-top: 5px; color: #777; font-size: 12px; }
.my-design-beads {
  height: 34px;
  margin-top: 5px;
  overflow: hidden;
  color: #aaa096;
  font-size: 11px;
  line-height: 17px;
}
.my-design-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: #aaa;
  font-size: 10px;
}
.my-design-bottom strong { color: #e85d3f; font-size: 15px; }
.my-design-actions { display: flex; gap: 8px; margin-top: 10px; }
.my-design-actions button {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid #d8ccbd;
  border-radius: 16px;
  background: var(--surface);
  color: var(--brand, #8b7355);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.my-design-actions button.danger { border-color: #f1d2cd; color: #cf6657; }
.summary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}
.design-empty { padding: 90px 20px; text-align: center; }
.design-empty-icon { font-size: 58px; }
.design-empty-title { margin-top: 16px; color: #333; font-size: 17px; font-weight: 600; }
.design-empty-desc { margin: 8px 0 20px; color: #999; font-size: 12px; }

/* Saved designs read as a quiet archive, with one clear next action. */
#page-designs .page-header { padding-top:15px; padding-bottom:14px; }
#page-designs .my-designs-content { padding-top:6px; }
#page-designs .my-designs-grid { gap:10px; }
#page-designs .my-design-card { border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-designs .my-design-preview { height:158px; background:#f1f3ef; }
#page-designs .my-design-preview img { object-fit:contain; }
#page-designs .my-design-info { padding:11px; }
#page-designs .my-design-title { font-size:14px; font-weight:600; }
#page-designs .my-design-meta { margin-top:4px; color:var(--text-secondary); font-size:11px; }
#page-designs .my-design-beads { height:30px; margin-top:4px; color:var(--text-tertiary); font-size:10px; line-height:15px; }
#page-designs .my-design-bottom { margin-top:7px; color:var(--text-tertiary); }
#page-designs .my-design-bottom strong { color:var(--brand-dark); font-size:14px; }
#page-designs .my-design-actions { display:grid; grid-template-columns:1fr auto auto; gap:4px; margin-top:10px; }
#page-designs .my-design-actions button { min-height:31px; padding:0 7px; border:0; border-radius:9px; color:var(--text-secondary); background:transparent; font-size:10px; }
#page-designs .my-design-actions button.primary { color:#fff; background:var(--brand); font-weight:600; }
#page-designs .my-design-actions button.danger { color:#a66b52; }
#page-designs .design-empty { padding:92px 20px; }
#page-designs .design-empty-icon { position:relative; width:46px; height:46px; margin:0 auto 14px; border:1px solid var(--border); border-radius:50%; background:#f1f4f0; }
#page-designs .design-empty-icon::before { content:""; position:absolute; inset:12px; border:5px dotted #6e8a7d; border-radius:50%; }
#page-designs .design-empty-title { margin-top:0; color:var(--text-primary); font-size:16px; }
#page-designs .design-empty-desc { color:var(--text-secondary); }
@media (max-width: 390px) {
  .my-designs-grid { grid-template-columns: 1fr; }
  .my-design-preview { height: 190px; }
}
.detail-info {
  padding: 0 16px;
}
.detail-info .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light, #EFEBE6);
  font-size: 14px;
}
.detail-info .detail-label {
  color: #999;
}
.detail-info .detail-value {
  color: #333;
  font-weight: 500;
}
.detail-total {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand, #8B7355);
  text-align: right;
  padding: 16px 0;
}
.detail-actions {
  display: flex;
  gap: 8px;
  padding: 16px;
}
.detail-btn-outline {
  flex: 1;
  padding: 12px 0;
  border-radius: var(--radius-full, 999px);
  border: 1.5px solid var(--brand-light, #C9B8A4);
  background: transparent;
  color: var(--brand);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.detail-btn-outline:active {
  background: var(--surface-tertiary, #F5F3F0);
  transform: scale(0.97);
}
.detail-btn-cart {
  flex: 1.5;
  padding: 12px 0;
  border-radius: var(--radius-full, 999px);
  border: none;
  background: var(--brand, #8B7355);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.detail-btn-cart:active {
  opacity: 0.85;
  transform: scale(0.97);
}
.detail-btn-buy {
  flex: 1.5;
  padding: 12px 0;
  border-radius: var(--radius-full, 999px);
  border: none;
  background: var(--brand-dark, #6B5B48);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.detail-btn-buy:active {
  opacity: 0.85;
  transform: scale(0.97);
}

/* ===== 购物袋 ===== */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius, 12px);
  margin-bottom: 10px;
  box-shadow: var(--shadow, 0 1px 6px rgba(0,0,0,0.05));
  position: relative;
}
.cart-item-preview {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F9F6F0 0%, #F0EBE3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 28px;
  position: relative;
  overflow: hidden;
}
.cart-item-preview canvas {
  width: 100%;
  height: 100%;
}
.cart-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cart-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #333);
  margin-bottom: 4px;
}
.cart-item-beads {
  font-size: 12px;
  color: var(--text-tertiary, #999);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.cart-item-meta {
  font-size: 12px;
  color: var(--text-tertiary, #999);
}
.cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: #E85D3F;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-medium, #e5e5e5);
  border-radius: 16px;
  overflow: hidden;
}
.cart-qty-btn {
  width: 32px;
  height: 28px;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text-secondary, #666);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.cart-qty-btn:active { background: #f0f0f0; }
.cart-qty-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}
.cart-qty-num {
  min-width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #333);
}
.cart-item-delete {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  font-size: 16px;
  color: #bbb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}
.cart-item-delete:active {
  color: #E85D3F;
  background: rgba(232,93,63,0.08);
}

/* 购物袋全选行 */
.cart-select-all {
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border, #F5F5F5);
}
.cart-check-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary, #666);
  user-select: none;
}
/* 复选框 */
.cart-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d0d0d0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}
.cart-checkbox.checked {
  border-color: var(--brand, #8B7355);
  background: var(--brand, #8B7355);
  color: #fff;
}
.cart-checkbox.partial {
  border-color: var(--brand, #8B7355);
  background: var(--surface);
  color: var(--brand, #8B7355);
}
/* 购物袋商品行的复选框 */
.cart-item .cart-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

/* 购物袋底部结算栏 */
.cart-footer {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border, #F5F5F5);
  padding: 12px var(--margin, 16px);
  padding-bottom: calc(12px + var(--safe-bottom, 0px));
  z-index: 10;
}
.cart-footer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-total {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary, #333);
}
.cart-total-label { color: var(--text-secondary, #666); }
.cart-total-price {
  color: #E85D3F;
  font-size: 20px;
}
.cart-total-price strong { font-weight: 700; }
.cart-checkout-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 24px;
  background: var(--brand, #8B7355);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.cart-checkout-btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}

/* 购物袋角标 */
.tab-icon-wrap {
  position: relative;
  display: inline-block;
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}

/* ===== 按钮基类（逐步迁移用） ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-full, 999px);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand, #8B7355);
  color: #fff;
}
.btn-primary:active { opacity: 0.85; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--brand-light, #C9B8A4);
  color: var(--brand, #8B7355);
}
.btn-outline:active { background: var(--surface-tertiary, #F5F3F0); }

.btn-ghost {
  background: var(--surface-tertiary, #F5F3F0);
  color: var(--text-body, #3A3530);
}
.btn-ghost:active { background: var(--border-light, #EFEBE6); }

.btn-sm {
  height: 36px;
  padding: 0 18px;
  font-size: 13px;
}

.btn-lg {
  height: 52px;
  padding: 0 32px;
  font-size: 17px;
}

/* ===== 卡片基类（逐步迁移用） ===== */
.card {
  background: var(--surface, #FFFFFF);
  border-radius: var(--radius, 12px);
  overflow: hidden;
}
.card-shadow {
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(58,53,48,0.06));
}
.card-bordered {
  border: 1px solid var(--border-light, #EFEBE6);
}

/* 现有卡片覆盖：使用新 token */
.gallery-card,
.product-card,
.order-card,
.address-card,
.cart-item {
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(58,53,48,0.06));
}
.gallery-card:active,
.product-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(58,53,48,0.08));
}

/* ═══════════════════════════════════════════
   DIY v2 · 开始页 + 画布布局 + 推荐 + 抽屉
   ═══════════════════════════════════════════ */

/* ── 开始页 ── */
/* #diy-start 和 .start-* 已删除 — 直接进入编辑态 */

/* ── 编辑态 ── */
#diy-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* 顶部栏 v2 */
.editor-topbar.v2 {
  padding: 10px var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--surface);
}

.topbar-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.editor-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.editor-save-status {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.topbar-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
}

/* 画布 v2 */
.canvas-container.v2 {
  flex: 1;
  position: relative;
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
  box-shadow: inset 0 0 0 1px var(--border-light);
}

/* 状态提示栏 */
.diy-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--margin);
  gap: 12px;
  flex-shrink: 0;
  min-height: 44px;
}

.diy-status-text {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.diy-status-progress {
  font-size: 12px;
  color: var(--brand);
  font-weight: 500;
  flex-shrink: 0;
}

/* 推荐区 */
.diy-recommend {
  flex-shrink: 0;
  padding: 0 0 8px;
}

.recommend-label {
  font-size: 12px;
  color: var(--text-caption);
  padding: 0 var(--margin) 8px;
  letter-spacing: 0.03em;
}

.recommend-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--margin);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.recommend-strip::-webkit-scrollbar { display: none; }

.rec-bead-card {
  flex-shrink: 0;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow-sm);
}

.rec-bead-card:active {
  transform: scale(0.94);
  box-shadow: var(--shadow-md);
}

.rec-bead-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.rec-bead-name {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-bead-price {
  font-size: 10px;
  color: var(--brand);
}

.rec-bead-reason {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* 底部操作栏 v2 */
.mat-summary.v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px var(--margin);
  padding-bottom: calc(10px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.summary-btn.secondary {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}

.summary-clear-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.summary-clear-btn:active {
  color: var(--danger);
  background: var(--surface-tertiary);
}

/* ── 底部珠子抽屉 ── */
.bead-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.bead-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.28s;
}

.bead-drawer.open .drawer-overlay {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 55vh;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgba(61,53,48,0.10);
}

.bead-drawer.open .drawer-panel {
  transform: translateY(0);
}

.drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--border-medium);
  border-radius: 2px;
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--margin) 0;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-tertiary);
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-tabs {
  display: flex;
  gap: 8px;
  padding: 10px var(--margin) 8px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.drawer-tabs::-webkit-scrollbar { display: none; }

.drawer-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-tertiary);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}

.drawer-tab.active {
  background: var(--brand);
  color: #fff;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.search-bar.sm {
  padding: 4px var(--margin) 10px;
  flex-shrink: 0;
}

.drawer-grid {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  justify-items: center;
  align-content: start;
  scrollbar-width: none;
}

.drawer-grid::-webkit-scrollbar { display: none; }

/* 抽屉内珠子卡片 — 复用 mat-card 但适配 4 列 */
.drawer-grid .mat-card {
  max-width: 80px;
}

/* DIY 编辑、设计详情、确认制作等沉浸式页面隐藏底部导航 */
body.hide-tab-bar .tab-bar { display: none; }
body.hide-tab-bar #page-diy { padding-bottom: 0; }
body.hide-tab-bar #page-detail { padding-bottom: 0; }
body.hide-tab-bar #page-checkout { padding-bottom: 0; }
body.hide-tab-bar #page-designs { padding-bottom: 0; }

/* 美团点餐式珠盒布局：左侧 L1 导航 + 右侧 L2 分组珠子 */
.drawer-meituan { display: flex; flex: 1; overflow: hidden; }
.drawer-level1-tabs { display:flex; gap:8px; padding:4px 12px 8px; overflow-x:auto; flex-shrink:0; scrollbar-width:none; }
.drawer-level1-tabs::-webkit-scrollbar { display:none; }
.drawer-level1-tab { flex:0 0 auto; border:0; border-radius:999px; padding:7px 13px; background:#f2ebe3; color:#76685d; font:inherit; font-size:12px; cursor:pointer; white-space:nowrap; }
.drawer-level1-tab.active { background:var(--brand, #765541); color:#fff; box-shadow:0 2px 7px rgba(89,61,45,.18); }
.drawer-level2-nav { width:82px; flex-shrink:0; overflow-y:auto; background:#f8f8f8; border-right:1px solid #eee; scrollbar-width:none; padding:4px 5px; }
.drawer-level2-nav::-webkit-scrollbar { display:none; }
.drawer-level2-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; width:100%; min-height:54px; padding:7px 2px; border:0; border-radius:10px; background:transparent; color:#76685d; font:inherit; font-size:11px; cursor:pointer; }
.drawer-level2-tab.active { background:#fff; color:var(--brand-dark, #593d2d); font-weight:600; box-shadow:inset 3px 0 0 var(--brand, #765541); }
.drawer-empty { padding:24px 0; color:var(--text-tertiary); text-align:center; font-size:12px; }
.drawer-nav { width: 90px; overflow-y: auto; background: #f8f8f8; flex-shrink: 0; scrollbar-width: none; border-right: 1px solid #eee; }
.drawer-nav::-webkit-scrollbar { display: none; }
.drawer-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 12px 4px; border: none; background: transparent; cursor: pointer; font-size: 11px; color: #666; gap: 4px; transition: all .15s; }
.drawer-nav-item .nav-icon { font-size: 20px; }
.drawer-nav-item .nav-text { line-height: 1.2; text-align: center; }
.drawer-nav-item .nav-count { font-size: 10px; color: #bbb; }
.drawer-nav-item.active { background: #fff; color: #333; font-weight: 600; box-shadow: inset 3px 0 0 var(--primary, #8B7355); }
.drawer-nav-item.active .nav-count { color: var(--primary, #8B7355); }
.drawer-content { flex: 1; overflow-y: auto; padding: 8px 10px; scrollbar-width: none; }
.drawer-content::-webkit-scrollbar { display: none; }
.l2-header { font-size: 14px; font-weight: 600; color: #333; padding: 6px 0 4px; margin-bottom: 6px; border-bottom: 1px solid #eee; }
.l2-beads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; justify-items: center; margin-bottom: 16px; }
.l2-beads .mat-card { max-width: 80px; width: 100%; }

/* ═══════════════════════════════════════════
   UI Revamp Sprint 01 · Healing commerce visual layer
   This block intentionally changes presentation only.
   ═══════════════════════════════════════════ */
:root {
  --bg: #f8f4ef;
  --surface: #fffdfa;
  --surface-secondary: #fdf8f2;
  --surface-tertiary: #f2ebe3;
  --brand: #765541;
  --brand-dark: #593d2d;
  --brand-light: #dcc5b0;
  --accent: #e9cdb9;
  --text-primary: #302821;
  --text-secondary: #76685d;
  --text-tertiary: #aa9c90;
  --border-light: #ebe0d5;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow-sm: 0 3px 12px rgba(86, 61, 43, .055);
  --shadow-md: 0 12px 28px rgba(86, 61, 43, .09);
  --shadow-lg: 0 18px 40px rgba(86, 61, 43, .12);
}

body {
  background:
    radial-gradient(circle at 18% -10%, rgba(238, 211, 190, .34), transparent 34%),
    var(--bg);
}

/* Home: a quiet brand entry with one clear invitation to create. */
.home-header { padding: 28px var(--margin) 12px; text-align: left; }
.brand-area { display: grid; grid-template-columns: 38px 1fr; column-gap: 10px; align-items: center; }
.brand-logo { grid-row: 1 / span 2; }
.brand-logo svg { width: 38px; height: 38px; }
.brand-name { font-size: 19px; letter-spacing: .12em; line-height: 1.1; }
.brand-slogan { font-size: 12px; line-height: 1.3; color: var(--text-secondary); }
.diy-banner {
  margin: 8px 0 32px;
  min-height: 168px;
  border-radius: 28px;
  background: linear-gradient(135deg, #694a37 0%, #9b7055 57%, #c99976 100%);
  box-shadow: 0 16px 30px rgba(93, 59, 42, .20);
}
.diy-banner::after {
  content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%; right: -48px; bottom: -92px;
}
.diy-banner-bg { background: radial-gradient(circle at 87% 20%, rgba(255,239,223,.4), transparent 24%), radial-gradient(circle at 20% 100%, rgba(48,24,14,.22), transparent 45%); }
.diy-banner-content { min-height: 168px; padding: 24px 22px; align-items: flex-start; gap: 14px; }
.diy-banner-orbit { padding-top: 6px; filter: drop-shadow(0 4px 10px rgba(36,15,7,.25)); }
.diy-banner-orbit svg { width: 52px; height: 52px; }
.diy-banner-text { align-self: center; }
.diy-banner-kicker { font-size: 11px; color: rgba(255,250,244,.74); letter-spacing: .08em; margin-bottom: 7px; }
.diy-banner-title { font-size: 22px; line-height: 1.3; margin-bottom: 8px; letter-spacing: 0; }
.diy-banner-sub { line-height: 1.5; color: rgba(255,249,243,.8); }
.diy-banner-arrow { align-self: flex-end; margin-left: auto; padding: 8px 11px; border: 1px solid rgba(255,255,255,.38); border-radius: 999px; font-size: 12px; color: #fff; }
.section { margin-bottom: 34px; }
.section-header { padding: 0; margin-bottom: 14px; }
.section-title { font-size: 19px; letter-spacing: 0; }
.section-more { color: var(--brand); padding: 6px 0; }
.gallery-grid, .hot-scroll { padding: 0; gap: 13px; }
.gallery-card, .hot-item-img { background: var(--surface); border: 1px solid rgba(121, 87, 63, .06); box-shadow: var(--shadow-sm); }
.gallery-card { border-radius: 18px; }
.gallery-card-img { background: radial-gradient(circle at 50% 30%, #fffdfa 0, #f6eee5 70%); }
.gallery-card-info { padding: 12px; }
.product-media {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.product-media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-media-fallback::after { content:""; width:34%; aspect-ratio:1; border:8px dotted rgba(81,111,98,.62); border-radius:50%; box-sizing:border-box; }
.hot-item-img,
.product-card-img,
.mat-card-swatch,
.rec-bead-swatch {
  background-color: #fffaf5;
}
.hot-item-img,
.product-card-img {
  position: relative;
  isolation: isolate;
}
.hot-item-img::before,
.product-card-img::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 18%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(92, 65, 48, .13), transparent 70%);
  filter: blur(4px);
  z-index: -1;
}
.product-card-img {
  background-size: 58% auto;
}
.hot-item-img {
  background-size: 68% auto;
}
.product-card-name,
.hot-item-name {
  letter-spacing: 0;
}
.mini-bracelet {
  position: relative;
  width: 128px;
  height: 104px;
  margin: auto;
}
.mini-bracelet::before {
  content: "";
  position: absolute;
  left: 21px;
  right: 21px;
  top: 19px;
  bottom: 19px;
  border: 1px solid rgba(132, 99, 77, .14);
  border-radius: 50%;
}
.mini-bracelet-shadow {
  position: absolute;
  left: 29px;
  right: 29px;
  bottom: 22px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(89, 61, 45, .14), transparent 68%);
  filter: blur(3px);
}
.mini-bead {
  position: absolute;
  left: calc(50% + var(--x));
  top: calc(50% + var(--y));
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 7px rgba(61, 43, 31, .13);
}
.mini-bracelet-fallback {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(118, 85, 65, .1);
  color: var(--brand);
  font-weight: 700;
}

/* Today inspiration: a soft surprise before the user enters the editor. */
.inspiration-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.inspiration-modal.open { pointer-events: auto; visibility: visible; }
.inspiration-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 35, 27, .38);
  opacity: 0;
  transition: opacity .24s ease;
}
.inspiration-modal.open .inspiration-modal-backdrop { opacity: 1; }
.inspiration-sheet {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background:
    radial-gradient(circle at 85% 4%, rgba(238, 207, 181, .58), transparent 28%),
    linear-gradient(180deg, #fffdf9, #f7eee6);
  box-shadow: 0 -10px 30px rgba(61, 40, 27, .14);
  transform: translateY(28px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
.inspiration-modal.open .inspiration-sheet { transform: translateY(0); opacity: 1; }
.inspiration-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(117, 82, 59, .08);
  color: #765543;
  font-size: 25px;
  line-height: 1;
}
.inspiration-eyebrow { color: #b17658; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.inspiration-sheet h2 { margin: 7px 36px 4px 0; color: #382a22; font-size: 24px; line-height: 1.25; }
.inspiration-intro { margin: 0; color: #8f796b; font-size: 13px; line-height: 1.6; }
.inspiration-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  margin: 18px 0 12px;
  border: 1px solid rgba(129, 92, 67, .08);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 26%, #fffefa 0, #f2e5d8 74%);
  overflow: hidden;
}
.inspiration-preview .mini-bracelet { transform: scale(1.23); }
.inspiration-copy { text-align: center; }
.inspiration-name { color: #3e2d24; font-size: 19px; font-weight: 700; letter-spacing: .05em; }
.inspiration-copy p { margin: 6px auto 0; max-width: 260px; color: #816c5f; font-size: 13px; line-height: 1.55; }
.inspiration-meta { margin-top: 8px; color: #ad8770; font-size: 12px; }
.inspiration-primary {
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #805a44, #ad7959);
  box-shadow: 0 9px 18px rgba(110, 72, 48, .19);
  color: #fffdf8;
  font-size: 16px;
  font-weight: 700;
}
.inspiration-primary:active { transform: scale(.98); }
.inspiration-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.inspiration-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(128, 90, 68, .08);
  color: #715242;
  font-size: 13px;
}
.inspiration-preferences { margin-top: 14px; padding: 13px; border-radius: 17px; background: rgba(255, 255, 255, .64); }
.inspiration-preferences > span { display: block; margin-bottom: 10px; color: #8d7565; font-size: 12px; text-align: center; }
.inspiration-preferences > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.inspiration-preferences button { border: 1px solid rgba(128, 90, 68, .12); border-radius: 999px; padding: 8px 12px; background: #fffdf9; color: #6d5140; font-size: 12px; }

/* Start state removed — enters editor directly. */

/* Editor: canvas is the stage; information sits quietly around it. */
.editor-topbar.v2 { padding: 10px var(--margin); background: rgba(255,253,250,.86); border-bottom: 0; }
.editor-btn { background: rgba(118,85,65,.07); color: var(--brand-dark); width: 38px; height: 38px; }
.editor-btn:active { background: rgba(118,85,65,.14); }
.topbar-price { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.canvas-container.v2 { position: relative; margin: 0 var(--margin); flex: 1; min-height: 290px; border-radius: 26px; background: #f8f5f0; box-shadow: inset 0 0 0 1px rgba(130, 98, 73, .09), 0 10px 24px rgba(81, 58, 43, .06); }
/* 素材四周自带留白；112% 缩放后珠盒实际外缘与画布的辅助圆重合。 */
.canvas-container.v2::before { content:""; position:absolute; inset:0; z-index:0; background: url('../uploads/diy/bead-tray-warm.png') center / 112% no-repeat; pointer-events:none; transform: scale(var(--tray-scale, 1)); transform-origin: center center; }
#bracelet-canvas { position:relative; z-index:1; display:block; width:100%; height:100%; }
.canvas-hint, .canvas-empty-guide { z-index:2; }
.canvas-hint { bottom: 13px; background: rgba(255,253,250,.76); backdrop-filter: blur(8px); color: var(--text-secondary); padding: 6px 11px; border-radius: 999px; }
.canvas-bracelet-btn { right: 14px; bottom: 14px; background: var(--brand); padding: 9px 15px; box-shadow: 0 6px 15px rgba(89,61,45,.22); }
.trash-zone { left: 14px; bottom: 14px; background: rgba(255,253,250,.77); backdrop-filter: blur(8px); }
.diy-status-bar { padding: 8px var(--margin) 6px; min-height: 30px; }
.diy-status-text { font-size: 13px; color: var(--text-secondary); }
.diy-status-text::before { content:"✦"; color: #bd8d62; margin-right: 7px; }
.diy-recommend { padding-bottom: 7px; }
.recommend-label { padding: 0 var(--margin) 8px; color: var(--text-secondary); font-size: 12px; letter-spacing: .04em; }
.recommend-strip { gap: 10px; padding: 0 var(--margin); }
.rec-bead-card { width: 92px; min-height: 68px; padding: 8px 6px; border: 1px solid rgba(117,85,65,.07); border-radius: 15px; box-shadow: var(--shadow-sm); }
.rec-bead-swatch { width: 36px; height: 36px; box-shadow: 0 4px 8px rgba(47,32,22,.15); }
.rec-bead-name { margin-top:5px; font-size:11px; }
.rec-bead-price, .rec-bead-reason { display:none; }
.wrist-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #e8ddd2;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.wrist-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(89,61,45,.15);
}
.wrist-modal { position:fixed; inset:0; z-index:1200; pointer-events:none; visibility:hidden; }
.wrist-modal.open { pointer-events:auto; visibility:visible; }
.wrist-modal-backdrop { position:absolute; inset:0; opacity:0; background:rgba(43,29,21,.38); transition:opacity .22s ease; }
.wrist-modal.open .wrist-modal-backdrop { opacity:1; }
.wrist-sheet { position:absolute; left:0; right:0; bottom:0; max-width:600px; margin:auto; box-sizing:border-box; padding:9px var(--margin) calc(18px + env(safe-area-inset-bottom)); border-radius:25px 25px 0 0; background:#fffdfa; box-shadow:0 -16px 45px rgba(61,39,26,.18); transform:translateY(104%); transition:transform .28s cubic-bezier(.2,.8,.2,1); }
.wrist-modal.open .wrist-sheet { transform:translateY(0); }
.wrist-sheet-handle { width:39px; height:4px; margin:0 auto 12px; border-radius:999px; background:#ddcfc2; }
.wrist-sheet-header { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.wrist-sheet-kicker { display:block; color:#ad7e56; font-size:11px; letter-spacing:.04em; }
.wrist-sheet h2 { margin:3px 0 0; color:var(--text-primary); font-size:21px; letter-spacing:.02em; }
.wrist-sheet-close { display:grid; place-items:center; width:31px; height:31px; border:0; border-radius:50%; color:var(--text-secondary); background:#f3ebe4; font-size:23px; line-height:1; cursor:pointer; }
.wrist-sheet-intro { margin:10px 0 16px; color:var(--text-secondary); font-size:12px; line-height:1.55; }
.wear-feeling-options { display:grid; gap:8px; }
.wear-feeling { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:50px; padding:9px 12px; color:var(--text-primary); border:1px solid #eadfd5; border-radius:13px; background:#fff; text-align:left; cursor:pointer; transition:.18s ease; }
.wear-feeling span { font-size:13px; font-weight:600; }
.wear-feeling small { color:var(--text-secondary); font-size:11px; white-space:nowrap; }
.wear-feeling em { display:inline-block; margin-left:4px; padding:2px 5px; border-radius:99px; color:#9b704d; background:#f5e6d7; font-size:10px; font-style:normal; font-weight:500; }
.wear-feeling.active { border-color:#b28560; background:#fdf6ee; box-shadow:inset 0 0 0 1px rgba(178,133,96,.16); }
.wear-feeling.active::before { content:'✓'; display:grid; place-items:center; width:17px; height:17px; margin-right:-6px; border-radius:50%; color:#fff; background:var(--brand); font-size:11px; order:3; }
.wrist-precise-row { display:flex; justify-content:space-between; align-items:flex-end; margin:18px 0 10px; }
.wrist-precise-row strong { display:block; color:var(--text-primary); font-size:13px; }
.wrist-precise-row span { display:block; margin-top:3px; color:var(--text-secondary); font-size:11px; }
.wrist-precise-row output { color:var(--brand-dark); font-size:22px; font-weight:650; }
.wrist-scale { display:flex; justify-content:space-between; margin-top:8px; color:var(--text-tertiary); font-size:10px; }
.wrist-confirm { width:100%; min-height:47px; margin-top:20px; border:0; border-radius:14px; color:#fff; background:var(--brand); box-shadow:0 7px 15px rgba(89,61,45,.20); font-size:14px; font-weight:600; cursor:pointer; }

/* 单圈模式的边界说明：这是作品规则，不是对用户设计的否定。 */
.design-limit-modal { position:fixed; inset:0; z-index:1250; visibility:hidden; pointer-events:none; }
.design-limit-modal.open { visibility:visible; pointer-events:auto; }
.design-limit-backdrop { position:absolute; inset:0; opacity:0; background:rgba(43,29,21,.42); transition:opacity .22s ease; }
.design-limit-modal.open .design-limit-backdrop { opacity:1; }
.design-limit-sheet { position:absolute; left:0; right:0; bottom:0; max-width:600px; margin:auto; padding:27px var(--margin) calc(24px + env(safe-area-inset-bottom)); box-sizing:border-box; border-radius:25px 25px 0 0; background:#fffdfa; box-shadow:0 -16px 45px rgba(61,39,26,.18); text-align:center; transform:translateY(104%); transition:transform .28s cubic-bezier(.2,.8,.2,1); }
.design-limit-modal.open .design-limit-sheet { transform:translateY(0); }
.design-limit-sheet h2 { margin:0; color:var(--text-primary); font-size:19px; line-height:1.35; }
.design-limit-sheet > p { margin:9px auto 0; max-width:340px; color:var(--text-secondary); font-size:12px; line-height:1.65; }
.design-limit-stats { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin-top:18px; overflow:hidden; border:1px solid var(--border); border-radius:14px; background:var(--border); }
.design-limit-stats span { padding:12px 8px; color:var(--text-secondary); background:var(--surface); font-size:11px; }
.design-limit-stats strong { display:block; margin-top:4px; color:var(--brand-dark); font-size:15px; }
.design-limit-sheet .design-limit-hint { margin-top:14px; font-size:11px; }
.design-limit-actions { display:grid; grid-template-columns:1fr 1.16fr; gap:10px; margin-top:20px; }
.design-limit-actions button { width:100%; min-height:48px; border-radius:14px; font-size:13px; font-weight:600; cursor:pointer; }
.design-limit-modal.is-hard-limit .design-limit-actions { grid-template-columns:1fr; }
.design-limit-modal.is-hard-limit .design-limit-secondary { min-height:50px; }
.design-limit-secondary { border:0; color:var(--brand-dark); background:#f2e9e1; }
.design-limit-primary { border:0; color:#fff; background:var(--brand); box-shadow:0 7px 15px rgba(89,61,45,.20); }

/* 完成设计命名弹窗 */
.design-name-modal { position:fixed; inset:0; z-index:1260; visibility:hidden; pointer-events:none; }
.design-name-modal.open { visibility:visible; pointer-events:auto; }
.design-name-backdrop { position:absolute; inset:0; opacity:0; background:rgba(43,29,21,.42); transition:opacity .22s ease; }
.design-name-modal.open .design-name-backdrop { opacity:1; }
.design-name-sheet { position:absolute; left:0; right:0; bottom:0; max-width:600px; margin:auto; padding:25px var(--margin) calc(22px + env(safe-area-inset-bottom)); box-sizing:border-box; border-radius:25px 25px 0 0; background:#fffdfa; box-shadow:0 -16px 45px rgba(61,39,26,.18); text-align:center; transform:translateY(104%); transition:transform .28s cubic-bezier(.2,.8,.2,1); }
.design-name-modal.open .design-name-sheet { transform:translateY(0); }
.design-name-sheet h2 { margin:0; color:var(--text-primary); font-size:19px; }
.design-name-sheet > .design-name-hint { margin:8px auto 0; max-width:310px; color:var(--text-secondary); font-size:12px; line-height:1.6; }
.design-name-field { display:flex; gap:8px; margin-top:16px; }
.design-name-input { flex:1; height:46px; padding:0 16px; border:1px solid rgba(117,85,65,.16); border-radius:12px; background:#f6f0ea; color:var(--text-primary); font-size:15px; outline:none; box-sizing:border-box; }
.design-name-input:focus { border-color:var(--brand); background:#fff; }
.design-name-input::placeholder { color:var(--text-secondary); }
.design-name-actions { display:grid; grid-template-columns:1fr 1.16fr; gap:8px; margin-top:18px; }
.design-name-actions button { min-height:46px; border-radius:14px; font-size:13px; font-weight:600; cursor:pointer; }
.design-name-secondary { border:0; color:var(--brand-dark); background:#f2e9e1; }
.design-name-primary { border:0; color:#fff; background:var(--brand); box-shadow:0 7px 15px rgba(89,61,45,.20); }

.mat-summary.v2 { display:block; padding:0 var(--margin) calc(10px + env(safe-area-inset-bottom, 0px)); background:rgba(255,253,250,.98); border-top:1px solid rgba(117,85,65,.08); }
.artwork-metrics { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); padding:8px 0 7px; border-bottom:1px solid rgba(117,85,65,.08); }
.artwork-metric { display:flex; min-width:0; flex-direction:column; gap:2px; align-items:center; justify-content:center; color:var(--text-secondary); font-size:10px; line-height:1.2; }
.artwork-metric strong { overflow:hidden; max-width:100%; color:var(--text-primary); font-size:12px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.artwork-metric b { font:inherit; }
.artwork-metric--weight { display:none; }
.artwork-metric--price strong { color:var(--brand-dark); }
.artwork-metric--link { padding:0; border:0; border-right:1px solid rgba(117,85,65,.09); background:transparent; cursor:pointer; font:inherit; }
.artwork-metric--link strong::after { content:''; }
.artwork-fit-status { display:flex; align-items:center; justify-content:center; gap:6px; min-height:20px; padding-top:6px; color:#71806a; font-size:12px; line-height:1.35; }
.artwork-fit-status[hidden] { display:none; }
.artwork-fit-icon { display:grid; place-items:center; width:15px; height:15px; border-radius:50%; color:#fff; background:#71806a; font-size:10px; font-weight:700; line-height:1; }
.artwork-fit-status.is-building { color:var(--text-secondary); }
.artwork-fit-status.is-building .artwork-fit-icon { color:var(--text-secondary); background:transparent; font-size:17px; font-weight:400; }
.artwork-fit-status.is-good { color:#71806a; }
.artwork-fit-status.is-relaxed { color:#9a7655; }
.artwork-fit-status.is-relaxed .artwork-fit-icon { background:#9a7655; }
.artwork-fit-status.is-adjust { color:#a66b52; }
.artwork-fit-status.is-adjust .artwork-fit-icon { background:#a66b52; }
.summary-actions { display:flex; align-items:center; gap:0; padding-top:9px; }
.summary-actions .summary-btn { width:100%; min-height:42px; padding:0 17px; border-radius:15px; font-size:14px; }
.summary-actions.has-finish-action { gap:8px; }
.summary-actions.has-finish-action .summary-btn { width:auto; flex:1; }
.summary-actions.has-finish-action .summary-btn.primary { flex:1.16; }
.summary-actions #canvas-primary-action-btn { font-size:12px; }
.summary-actions .summary-btn.secondary { flex:1; }
.summary-btn.secondary { background: #f1e8df; color: var(--brand-dark); }
.summary-btn.primary { background: var(--brand); color:#fff; box-shadow:0 7px 15px rgba(89,61,45,.20); }

/* 珠盒开启后参与页面排版，而非以弹窗遮挡作品。 */
#diy-editor .canvas-container.v2 {
  order: 1;
  flex: 1 1 auto;
  min-height: 245px;
}

#diy-editor .bead-drawer {
  position: relative;
  inset: auto;
  z-index: 1;
  order: 2;
  display: flex;
  flex: 0 0 0;
  min-height: 0;
  margin: 0 var(--margin);
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: flex-basis .32s cubic-bezier(.32,.72,0,1), margin .32s cubic-bezier(.32,.72,0,1), opacity .18s ease;
}

#diy-editor.is-beadbox-open .bead-drawer {
  flex-basis: clamp(245px, 36vh, 310px);
  margin-top: 10px;
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

#diy-editor.is-beadbox-closing .bead-drawer {
  flex-basis: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

#diy-editor .drawer-overlay {
  display: none;
}

#diy-editor .drawer-panel {
  position: static;
  width: 100%;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  transform: none;
  border: 1px solid rgba(117, 82, 59, .08);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(78, 51, 34, .07);
}

#diy-editor .drawer-handle,
#diy-editor .drawer-subtitle,
#diy-editor .drawer-recommendation {
  display: none;
}

#diy-editor .drawer-header {
  min-height: 46px;
  padding: 10px 14px 6px;
}

#diy-editor .drawer-title {
  font-size: 16px;
}

#diy-editor .drawer-close-btn {
  width: 30px;
  height: 30px;
}

#diy-editor .drawer-tabs {
  padding: 0 14px 8px;
}

#diy-editor .drawer-body {
  min-height: 0;
  padding: 0 14px 12px;
}

#diy-editor .mat-summary.v2 {
  order: 3;
  flex: 0 0 auto;
}
.wrist-recommendation { margin:0 0 15px; padding:9px 11px; border-radius:11px; color:#8a6245; background:#f7ede4; font-size:11px; line-height:1.45; }
.drawer-panel { max-height: 68vh; border-radius: 26px 26px 0 0; background: #fffdfa; box-shadow: 0 -14px 40px rgba(62,43,29,.14); }
.drawer-handle { width: 42px; background: #d8c8b8; margin-top: 11px; }
.drawer-header { padding-top: 9px; }
.drawer-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.drawer-subtitle {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}
.drawer-recommendation { padding: 0 var(--margin) 8px; }
.drawer-guide { padding: 9px 0 3px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.drawer-recommend-title { padding: 8px 0 7px; color: var(--text-secondary); font-size: 12px; letter-spacing: .04em; }
.drawer-recommend-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.drawer-recommend-list::-webkit-scrollbar { display: none; }
.drawer-rec-card { flex: 0 0 178px; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid rgba(117,85,65,.10); border-radius: 13px; background: #fff; color: var(--text-primary); text-align: left; }
.drawer-rec-swatch { flex: 0 0 31px; width: 31px; height: 31px; border-radius: 50%; box-shadow: 0 3px 8px rgba(47,32,22,.15); }
.drawer-rec-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.drawer-rec-copy b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-rec-copy small { overflow: hidden; color: var(--text-caption); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-rec-card em { color: var(--brand); font-size: 11px; font-style: normal; }
.drawer-close-btn { background: #f2e9e1; color: var(--brand-dark); }

.drawer-tab.active { background: var(--brand); box-shadow: 0 4px 10px rgba(89,61,45,.18); }

/* Own mode: the product is presented as an artwork before it is sold. */
#page-detail { background: radial-gradient(circle at 74% 0%, rgba(222,235,227,.72), transparent 29%), var(--bg); }
#page-detail .page-header { padding-top: 14px; }
#page-detail .page-title { font-size: 18px; }
#page-detail .page-content { padding: 2px var(--margin) 28px; }
.detail-preview { min-height:322px; margin:2px 0 17px; border-radius:22px; background:radial-gradient(circle at 50% 34%, #fff 0%, #f0f3ef 68%, #e0e8e1 100%); box-shadow:inset 0 0 0 1px var(--border); }
.detail-info { padding: 0 4px; }
.detail-artwork-intro { display:flex; gap:10px; align-items:flex-start; padding: 6px 4px 17px; }
.detail-artwork-mark { color:#bd8d62; font-size:18px; line-height:1.2; }
.detail-artwork-intro strong { display:block; font-size:16px; line-height:1.45; color:var(--text-primary); }
.detail-artwork-intro p { margin-top:4px; color:var(--text-secondary); font-size:12px; line-height:1.5; }
.detail-user-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px 16px; border-bottom: 1px solid rgba(117,85,65,.09); margin-bottom: 4px; }
.detail-user-avatar { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: var(--brand); display: grid; place-items: center; }
.detail-user-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-user-avatar-letter { color: #fff; font-size: 18px; font-weight: 600; }
.detail-user-info { display: flex; flex-direction: column; gap: 2px; }
.detail-user-info strong { font-size: 15px; color: var(--text-primary); }
.detail-user-info span { font-size: 11px; color: var(--text-tertiary); letter-spacing: .05em; }
.detail-section-label { padding: 11px 0 5px; color:var(--text-tertiary); font-size:11px; letter-spacing:.08em; }
.detail-info .detail-row { padding: 11px 0; border-bottom: 1px solid rgba(117,85,65,.09); }
.detail-info .detail-label { color:var(--text-secondary); }
.detail-info .detail-value { color:var(--text-primary); }
.detail-bead-list { border-top:1px solid rgba(117,85,65,.09); }
.detail-bead-row { display:flex; align-items:center; gap:9px; min-height:42px; border-bottom:1px solid rgba(117,85,65,.09); font-size:13px; }
.detail-bead-swatch { width:18px; height:18px; flex:0 0 auto; border:2px solid rgba(255,255,255,.9); border-radius:50%; box-shadow:0 1px 4px rgba(85,59,40,.2); }
.detail-bead-name { min-width:0; flex:1; overflow:hidden; color:var(--text-primary); text-overflow:ellipsis; white-space:nowrap; }
.detail-bead-count { color:var(--text-secondary); font-size:12px; }
.detail-bead-price { min-width:42px; color:var(--brand-dark); text-align:right; font-size:13px; }
.detail-service-note { margin-top: 15px; padding: 12px 14px; border-radius: 14px; background:#f2eae1; color:var(--text-secondary); font-size:12px; line-height:1.55; }
.detail-total { display:flex; align-items:baseline; justify-content:space-between; padding:19px 2px 10px; color:var(--brand-dark); font-size:24px; }
.detail-total span { color:var(--text-secondary); font-size:13px; font-weight:400; }
.detail-fit-status { display:flex; align-items:center; gap:5px; padding:10px 0; font-size:12px; color:var(--text-secondary); border-bottom:1px solid rgba(117,85,65,.09); }
.detail-fit-icon { display:grid; place-items:center; width:15px; height:15px; border-radius:50%; font-size:10px; font-weight:700; line-height:1; }
.detail-fit-status.fit-building { color:var(--text-secondary); }
.detail-fit-status.fit-building .detail-fit-icon { color:var(--text-secondary); background:transparent; font-size:15px; font-weight:400; }
.detail-fit-status.fit-good { color:#71806a; }
.detail-fit-status.fit-good .detail-fit-icon { color:#fff; background:#71806a; }
.detail-fit-status.fit-relaxed { color:#9a7655; }
.detail-fit-status.fit-relaxed .detail-fit-icon { color:#fff; background:#9a7655; }
.detail-fit-status.fit-adjust { color:#a66b52; }
.detail-fit-status.fit-adjust .detail-fit-icon { color:#fff; background:#a66b52; }
.gallery-detail-thumb { padding: 16px 0; }
.gallery-detail-thumb .mini-bracelet { transform: scale(1.6); }
.detail-actions { display:grid; grid-template-columns:1fr 1fr 1.3fr; gap:8px; padding:12px 0 4px; }
.detail-actions::after { content:''; grid-column:1/-1; }
.detail-btn-outline { grid-column:1/-1; padding:9px 0; border:0; color:var(--text-secondary); font-size:12px; }
.detail-btn-cart { padding:13px 6px; background:#edf2ee; color:var(--brand-dark); border-radius:14px; font-size:12px; white-space:nowrap; }
.detail-btn-buy { padding:13px 8px; background:var(--brand); border-radius:16px; box-shadow:0 8px 16px rgba(89,61,45,.20); font-size:13px; white-space:nowrap; }

/* ===== 作品身份与制作期待：不改变订单业务，只让创作结果一路被看见 ===== */
.cart-item-kicker,
.checkout-item-kicker,
.order-card-kicker {
  margin-bottom: 2px;
  color: #b18461;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.cart-item-preview,
.checkout-item-thumb,
.order-card-img {
  background: radial-gradient(circle at 50% 35%, #fffdf9 0, #f3e8dd 68%, #ead8c7 100%);
  box-shadow: inset 0 0 0 1px rgba(117, 85, 65, .07);
}

.cart-item-preview img,
.checkout-item-thumb img,
.order-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
}

.cart-item-title,
.checkout-item-title,
.order-card-name {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: .02em;
}

.cart-item {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(77, 54, 40, .06);
}

.checkout-section {
  margin-bottom: 18px;
}

.checkout-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.checkout-item,
.checkout-summary {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(77, 54, 40, .055);
}

.checkout-item-header {
  padding: 14px;
}

.checkout-item-thumb {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.checkout-item-title {
  font-size: 15px;
  font-weight: 700;
}

.order-card {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(77, 54, 40, .055);
}

.order-card-img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
}

.order-card-fallback {
  color: #b18461;
  font-size: 24px;
}

.order-card-kicker {
  margin-top: 1px;
}

.order-card-name {
  font-size: 15px;
  font-weight: 700;
}

.order-card-detail {
  margin-top: 4px;
  color: #9a8373;
}

.order-detail-status {
  padding: 26px 18px 20px;
  margin: 0 -2px 16px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0, rgba(255,255,255,.96), rgba(249,237,224,.92) 64%, rgba(239,220,202,.92));
  box-shadow: 0 12px 30px rgba(81, 56, 40, .07);
}

.order-detail-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  border-radius: 20px;
  color: #fffaf4;
  font-size: 27px;
  background: linear-gradient(135deg, #9b6b4d, #70503d);
  box-shadow: 0 10px 18px rgba(93, 62, 44, .22);
}

.order-detail-status-eyebrow {
  color: #af7d5d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.order-detail-status-text {
  color: #382b23;
  font-size: 21px;
  letter-spacing: .02em;
}

.order-detail-status-sub {
  max-width: 260px;
  margin: 7px auto 0;
  color: #876f60;
  line-height: 1.6;
}

.order-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: #b3a093;
  font-size: 10px;
}

.order-progress span {
  white-space: nowrap;
}

.order-progress .is-active {
  color: #875d45;
  font-weight: 700;
}

.order-progress i {
  width: 20px;
  height: 1px;
  background: #dac7b7;
}

.order-detail-card,
.order-detail-total {
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(77, 54, 40, .055);
}

@media (prefers-reduced-motion: reduce) {
  .dot-unprocessed { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── 顶部右侧 ── */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── 更多菜单 ── */
.more-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  visibility: hidden;
}
.more-menu.open {
  pointer-events: auto;
  visibility: visible;
}
.more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s;
}
.more-menu.open .more-overlay { opacity: 1; }

.more-panel {
  position: absolute;
  top: 52px;
  right: calc((100vw - 430px) / 2 + 12px);
  max-width: 430px;
  right: max(12px, calc((100vw - 430px) / 2 + 12px));
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 160px;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
}
@media (max-width: 430px) {
  .more-panel { right: 12px; }
}
.more-menu.open .more-panel {
  transform: translateY(0);
  opacity: 1;
}
.more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.12s;
}
.more-item:active { background: var(--surface-secondary); }

/* ── 散珠查看遮罩 ── */
.scatter-view-toast {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 180;
  background: rgba(61,53,48,0.88);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  pointer-events: none;
  animation: toastIn 0.3s ease;
}

/* Mobile DIY viewport fix
   The generic summary bar is sticky. Inside the editor that made it overlap
   the material drawer on short Android browser viewports. Keep every region
   in the editor flex flow and let only the material grid scroll. */
#page-diy {
  padding-bottom: 0;
  overflow: hidden;
}

#diy-editor {
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#diy-editor .mat-summary.v2 {
  position: relative;
  bottom: auto;
  z-index: 5;
}

#diy-editor .drawer-panel,
#diy-editor .drawer-meituan,
#diy-editor .drawer-nav,
#diy-editor .drawer-content {
  min-height: 0;
}

#diy-editor .drawer-panel {
  overflow: hidden;
}

#diy-editor .drawer-grid {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 430px) and (max-height: 800px) {
  #diy-editor.is-beadbox-open .canvas-container.v2 {
    flex: 1 1 0;
    min-height: 190px;
  }

  #diy-editor.is-beadbox-open .canvas-empty-guide {
    min-height: 32px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  #diy-editor.is-beadbox-open .bead-drawer {
    flex: 0 0 clamp(220px, 34dvh, 240px);
    max-height: 240px;
    margin-top: 6px;
  }

  #diy-editor.is-beadbox-open .drawer-header {
    min-height: 40px;
    padding-top: 6px;
    padding-bottom: 4px;
  }

  #diy-editor.is-beadbox-open .drawer-tabs {
    padding-bottom: 6px;
  }

  #diy-editor.is-beadbox-open .drawer-body {
    padding-bottom: 0;
  }

  #diy-editor.is-beadbox-open .search-bar.sm {
    padding-top: 2px;
    padding-bottom: 7px;
  }
}

/* ===== Design system 1.0 — unified presentation layer =====
   This layer is deliberately visual-only: it does not change selectors used
   by JavaScript, document structure, dimensions required by the canvas, or
   any event behavior. */
:root {
  --bg: #F9F7F4;
  --surface: #FFFFFF;
  --surface-secondary: #FAF8F5;
  --surface-tertiary: #F3EFEA;
  --text-primary: #3D3530;
  --text-secondary: #756A60;
  --text-tertiary: #A79B8F;
  --text-muted: #A79B8F;
  --text-caption: #A79B8F;
  --brand: #8B6F53;
  --brand-dark: #68503C;
  --brand-light: #E5D8CB;
  --accent: #C79062;
  --danger: #B85C50;
  --success: #6F8E72;
  --warning: #B98242;
  --info: #73869A;
  --border: #E8E1D9;
  --border-light: #E8E1D9;
  --border-medium: #D7CABB;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --shadow: 0 1px 4px rgba(61, 53, 48, .04);
  --shadow-sm: 0 1px 4px rgba(61, 53, 48, .04);
  --shadow-md: 0 6px 20px rgba(61, 53, 48, .08);
  --shadow-lg: 0 14px 36px rgba(61, 53, 48, .12);
}

body,
#page-detail {
  background: var(--bg);
}

/* Surfaces: let product photography and the bead canvas create depth. */
.gallery-card,
.product-card,
.cart-item,
.order-card,
.checkout-item,
.checkout-summary,
.address-card,
.detail-preview,
.drawer-panel,
.wrist-sheet,
.design-limit-sheet,
.design-name-sheet,
.inspiration-sheet {
  background-image: none;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.gallery-card,
.product-card,
.cart-item,
.order-card,
.checkout-item,
.checkout-summary,
.address-card { border-radius: var(--radius-sm); }

.detail-preview { border-radius: var(--radius-lg); }
.drawer-panel,
.wrist-sheet,
.design-limit-sheet,
.design-name-sheet,
.inspiration-sheet { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* One restrained brand action per view. */
.diy-banner,
.inspiration-primary,
.summary-btn.primary,
.cart-checkout-btn,
.detail-btn-buy,
.wrist-confirm,
.design-limit-primary,
.design-name-primary,
.address-save-btn,
.btn-primary {
  background: var(--brand);
  box-shadow: none;
}

.diy-banner {
  border: 0;
  border-radius: var(--radius-lg);
  min-height: 188px;
  background: var(--brand-light);
  box-shadow: none;
}
.diy-banner-bg,
.diy-banner::after { display: none; }
.diy-banner-content { min-height: 188px; padding: 26px 22px; }
.diy-banner-orbit {
  align-self: center;
  padding: 10px;
  border: 1px solid rgba(104, 80, 60, .18);
  border-radius: 50%;
  filter: none;
}
.diy-banner-orbit svg { width: 58px; height: 58px; }
.diy-banner-kicker { color: var(--brand-dark); font-weight: 500; letter-spacing: .04em; }
.diy-banner-title { color: var(--text-primary); font-size: 24px; line-height: 1.28; }
.diy-banner-sub { color: var(--text-secondary); }
.diy-banner-arrow {
  align-self: flex-end;
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn,
.btn-primary,
.cart-checkout-btn,
.detail-btn-cart,
.detail-btn-buy,
.wrist-confirm,
.design-limit-actions button,
.design-name-actions button,
.summary-actions .summary-btn {
  border-radius: var(--radius-md, 16px);
  min-height: 48px;
}

.detail-btn-cart,
.summary-btn.secondary,
.design-limit-secondary,
.design-name-secondary {
  background: var(--surface-tertiary);
  color: var(--brand-dark);
  box-shadow: none;
}

/* Navigation, form and filter hierarchy. */
.page-header,
.editor-topbar.v2,
.tab-bar,
.cart-footer,
.mat-summary.v2 {
  background: var(--surface);
  border-color: var(--border);
}

.search-input,
.form-group input,
.form-group select,
.design-name-input {
  background: var(--surface);
  border-color: var(--border);
  border-radius: var(--radius-sm);
}

.search-input:focus-within,
.form-group input:focus,
.form-group select:focus,
.design-name-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139, 111, 83, .12);
}

.cat-tab.active,
.category-tab.active,
.filter-tab.active,
.drawer-level1-tab.active,
.drawer-tab.active {
  background: var(--brand-light);
  color: var(--brand-dark);
  box-shadow: none;
}

.drawer-level2-nav,
.drawer-nav { background: var(--surface-secondary); border-color: var(--border); }
.drawer-level2-tab.active,
.drawer-nav-item.active {
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: inset 3px 0 0 var(--brand);
}

.canvas-container.v2,
.gallery-card-img,
.product-card-img,
.cart-item-preview,
.checkout-item-thumb,
.order-card-img {
  border-color: var(--border);
}

.canvas-container.v2 { box-shadow: inset 0 0 0 1px var(--border); }

/* Page-level hierarchy: photography stays soft, information remains quiet. */
.gallery-card-img,
.product-card-img,
.hot-item-img,
.cart-item-preview,
.checkout-item-thumb,
.order-card-img {
  background: var(--surface-secondary);
  box-shadow: none;
}

.gallery-card-info,
.product-card-info { padding: 12px; }
.gallery-card-title,
.product-card-name { font-weight: 600; }
.gallery-card-author,
.product-card-price .original { color: var(--text-tertiary); }

.tab-bar { box-shadow: 0 -1px 0 var(--border); }

/* Consistent type, feedback, and motion without altering interaction. */
.section-title,
.page-title,
.checkout-section-title,
.order-card-name,
.checkout-item-title { font-weight: 600; }

.product-card-price,
.cart-item-price,
.cart-total-price,
.detail-total,
.topbar-price { color: var(--brand-dark); }

.order-card-status.status-completed,
.artwork-fit-status.is-good { color: var(--success); }

@media (prefers-reduced-motion: no-preference) {
.gallery-card,
.product-card,
.summary-btn,
.cart-checkout-btn,
.detail-btn-buy { transition: transform .1s ease, background-color .18s ease, box-shadow .18s ease; }
}

/* ===== Experience sample: mineral atelier / home · studio · artwork ===== */
:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-secondary: #f3f2ed;
  --surface-tertiary: #eceae3;
  --text-primary: #282a2b;
  --text-secondary: #727675;
  --text-tertiary: #a8aaa3;
  --brand: #3b5c57;
  --brand-dark: #294541;
  --brand-light: #dbe9e3;
  --accent: #c99a67;
  --border: #e7e6df;
  --border-light: #ebeae4;
  --border-medium: #d8d7ce;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 18px rgba(40, 42, 43, .045);
  --shadow-md: 0 12px 30px rgba(40, 42, 43, .07);
}

/* Home is a small editorial cover: it gives the product a world before asking for a click. */
.home-header { padding: 20px var(--margin) 16px; text-align: left; }
.brand-area { display: flex; flex-direction: row; gap: 10px; align-items: center; }
.brand-logo { display:flex; flex: 0 0 auto; width:34px; height:34px; align-items:center; justify-content:center; border-radius:50%; background:#f0eee7; }
.brand-logo span { width:7px; height:7px; margin:0 -1px; border:1.5px solid #fff; border-radius:50%; background:var(--brand); }
.brand-logo span:nth-child(2) { background:#d6ad7a; transform:translateY(-4px); }
.brand-logo span:nth-child(3) { background:#a9c4bc; }
.brand-name { font-size:17px; font-weight:650; letter-spacing:.12em; line-height:1.1; }
.brand-slogan { margin-top:3px; font-size:10px; font-weight:400; letter-spacing:.02em; color:var(--text-secondary); }
.home-profile-trigger { display:grid; place-items:center; width:34px; height:34px; margin-left:auto; border:1px solid var(--border); border-radius:50%; color:var(--text-secondary); background:var(--surface); }
.diy-banner { min-height:0; margin:0 var(--margin) 14px; border-radius:22px; background:#101b1a; isolation:isolate; }
.diy-banner::before { content:none; }
.diy-banner-image { display:block; width:100%; height:auto; }
.diy-banner-content { min-height:310px; padding:25px 22px; align-items:flex-start; flex-direction:column; gap:0; }
.diy-banner-text { flex:0; align-self:flex-start; margin-top:8px; }
.diy-banner-kicker { color:rgba(255,255,255,.72); font-size:10px; font-weight:600; letter-spacing:.12em; }
.diy-banner-title { max-width:220px; margin:3px 0 10px; color:#fff; font-size:26px; font-weight:650; line-height:1.28; letter-spacing:.01em; }
.diy-banner-sub { max-width:205px; color:rgba(255,255,255,.72); font-size:12px; font-weight:400; line-height:1.55; }
.diy-banner-arrow { display:flex; align-items:center; gap:11px; align-self:flex-start; margin:18px 0 0; padding:11px 16px; border:1px solid rgba(255,255,255,.18); border-radius:999px; color:var(--brand-dark); background:#f1f5f1; box-shadow:0 5px 12px rgba(0,0,0,.12); font-size:13px; font-weight:650; }
.diy-banner-arrow span { font-size:17px; line-height:.8; }
.mood-row { display:flex; gap:8px; padding:0 var(--margin) 29px; overflow-x:auto; scrollbar-width:none; }
.mood-row button { flex:0 0 auto; padding:8px 12px; border:1px solid var(--border); border-radius:999px; color:var(--text-secondary); background:var(--surface); font:500 12px inherit; }
.mood-row button.active { border-color:#bfd4cb; color:var(--brand-dark); background:#edf4f0; }
#page-home .mood-row button { cursor:pointer; transition:background .25s ease, border-color .25s ease, color .25s ease; }
.section { margin-bottom:30px; }
.section-header { padding:0 var(--margin); margin-bottom:13px; }
.section-header > div { display:flex; flex-direction:column; gap:3px; }
.section-eyebrow { color:#a28a72; font-size:9px; font-weight:650; letter-spacing:.14em; }
.section-title { font-size:19px; font-weight:600; letter-spacing:.01em; }
.section-more { color:var(--text-secondary); font-size:12px; }
.section-more b { margin-left:2px; color:var(--brand); font-size:15px; }
.gallery-grid { gap:10px; }
.gallery-card { border:1px solid var(--border); box-shadow:none; border-radius:14px; }
.gallery-card-img { background:#f2f1eb; }
.gallery-card-info { padding:11px 12px 13px; }
.gallery-card-title { font-weight:600; }

/* The editor reads as a focused workbench. Utilities are quiet, the work is large. */
.editor-topbar.v2 { padding:10px var(--margin); border-bottom:0; }
.editor-title { font-size:15px; font-weight:600; }
.editor-save-status { color:var(--text-tertiary); }
.topbar-price { color:var(--brand-dark); font-size:14px; }
#diy-editor .canvas-container.v2 { margin:0 var(--margin); border-radius:20px; background:radial-gradient(circle at 50% 38%, #fff 0%, #f2f3ef 72%); box-shadow:inset 0 0 0 1px var(--border); }
.canvas-hint { bottom:14px; padding:5px 10px; color:var(--text-secondary); border:1px solid rgba(255,255,255,.85); background:rgba(255,255,255,.78); }
#diy-editor .mat-summary.v2 { margin-top:10px; padding:0 var(--margin) calc(12px + env(safe-area-inset-bottom, 0px)); background:rgba(255,255,255,.97); border-top:0; }
.artwork-metrics { padding:9px 0 8px; border-bottom-color:var(--border); }
.artwork-metric { color:var(--text-tertiary); font-size:9px; }
.artwork-metric strong { color:var(--text-primary); font-size:12px; }
.artwork-metric--price strong { color:var(--brand-dark); }
.summary-actions { padding-top:10px; }
.summary-actions .summary-btn { min-height:46px; border-radius:14px; font-weight:600; }
.summary-btn.secondary { background:#eef1ed; color:var(--brand-dark); }
.summary-btn.primary { background:var(--brand); }
#diy-editor .drawer-panel { border-color:var(--border); border-radius:18px; box-shadow:var(--shadow-md); }

/* The product page is a completion moment, not a sales specification. */
#page-detail { background:var(--bg); }
#page-detail .page-header { padding-top:12px; }
.detail-preview { position:relative; min-height:350px; margin:0 0 21px; border:1px solid var(--border); border-radius:22px; background:radial-gradient(circle at 50% 36%, #fff 0%, #f2f3ef 66%, #e4e8e0 100%); box-shadow:none; }
.detail-preview canvas { cursor:grab; touch-action:pan-y; user-select:none; -webkit-user-select:none; }
.detail-preview canvas.is-rotating { cursor:grabbing; }
.detail-rotate-hint {
  position:absolute;
  z-index:2;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  padding:6px 12px;
  border:1px solid rgba(66,103,96,.12);
  border-radius:999px;
  color:var(--text-secondary);
  background:rgba(255,255,255,.82);
  box-shadow:0 4px 14px rgba(47,70,64,.06);
  font-size:11px;
  line-height:1;
  white-space:nowrap;
  pointer-events:none;
  backdrop-filter:blur(8px);
}
.detail-artwork-intro { gap:12px; padding:1px 2px 19px; }
.detail-artwork-mark { display:grid; place-items:center; width:28px; height:28px; margin-top:1px; border-radius:50%; color:#fff; background:var(--brand); font-size:14px; }
.detail-artwork-eyebrow { display:block; margin-bottom:5px; color:#a28a72; font-size:9px; font-weight:650; letter-spacing:.14em; }
.detail-artwork-intro strong { font-size:19px; line-height:1.35; }
.detail-artwork-intro p { color:var(--text-secondary); font-size:12px; }
.detail-section-label { padding:10px 0 6px; color:var(--text-tertiary); font-size:10px; font-weight:600; letter-spacing:.11em; }
.detail-info .detail-row { padding:12px 0; border-bottom-color:var(--border); }
.detail-service-note { margin-top:16px; border-radius:14px; color:var(--text-secondary); background:#edf3ef; }
.detail-service-note b { color:var(--brand-dark); }
.detail-total { padding:21px 2px 11px; color:var(--brand-dark); font-size:15px; }
.detail-total strong { font-size:26px; font-weight:600; letter-spacing:-.02em; }
.detail-actions { grid-template-columns:auto 1fr 1.45fr; gap:8px; padding-top:8px; }
.detail-btn-save { padding:0 12px; border:1px solid var(--border); border-radius:14px; color:var(--text-secondary); background:var(--surface); font:500 12px inherit; }
.detail-btn-cart { padding:13px 8px; border:1px solid #c9d9d1; border-radius:14px; color:var(--brand-dark); background:#edf3ef; font-size:12px; }
.detail-btn-buy { padding:13px 9px; border-radius:14px; background:var(--brand); font-size:13px; box-shadow:none; }
.detail-btn-buy span { margin-left:5px; font-size:16px; }
.detail-btn-outline { padding:11px 0 4px; color:var(--text-secondary); }

@media (max-height: 760px) {
  .diy-banner-content { min-height:270px; }
  .detail-preview { min-height:290px; }
}

/* Editorial content turns the feed from a utility list into a place worth browsing. */
.home-collection { display:flex; width:calc(100% - 32px); min-height:126px; margin:0 16px 31px; overflow:hidden; border:1px solid var(--border); border-radius:18px; color:var(--text-primary); background:var(--surface); text-align:left; box-shadow:var(--shadow-sm); }
.home-collection-image { flex:0 0 41%; background:url('../uploads/editorial/mineral-morning-collection-v1.png') 68% 58% / cover no-repeat; }
.home-collection-copy { display:flex; min-width:0; flex:1; flex-direction:column; justify-content:center; padding:15px 13px; }
.home-collection-copy small { color:#9c856d; font-size:8px; font-weight:650; letter-spacing:.09em; white-space:nowrap; }
.home-collection-copy strong { margin-top:7px; font-size:16px; font-weight:600; letter-spacing:.01em; }
.home-collection-copy em { margin-top:4px; color:var(--text-secondary); font-size:10px; font-style:normal; line-height:1.45; }
.home-collection-copy b { margin-top:10px; color:var(--brand-dark); font-size:11px; font-weight:600; }
.home-collection-copy i { margin-left:4px; font-size:15px; font-style:normal; vertical-align:-1px; }
.home-collection:active { transform:scale(.985); }

.gallery-card-img { position:relative; }
.gallery-card-note { position:absolute; top:9px; left:9px; padding:4px 7px; border:1px solid rgba(255,255,255,.65); border-radius:999px; color:#5c665d; background:rgba(255,255,255,.72); font-size:9px; font-weight:600; letter-spacing:.04em; backdrop-filter:blur(5px); }
.gallery-card:nth-child(1) .gallery-card-img { background:linear-gradient(145deg,#ecefe9,#dbe4db); }
.gallery-card:nth-child(2) .gallery-card-img { background:linear-gradient(145deg,#f2ece6,#e3d6c7); }
.gallery-card:nth-child(3) .gallery-card-img { background:linear-gradient(145deg,#eef1f2,#d9e2e7); }
.gallery-card:nth-child(4) .gallery-card-img { background:linear-gradient(145deg,#f2eadb,#ead7b9); }
.gallery-card-author { color:var(--text-tertiary); }
.gallery-card-author span { margin:0 2px; color:#c4c5bf; }

#page-shop .page-header { padding-top:20px; padding-bottom:13px; }
.shop-kicker { margin-bottom:4px; color:#a28a72; font-size:9px; font-weight:650; letter-spacing:.14em; }
#page-shop .page-title { font-size:20px; }
#page-shop .search-bar { padding-bottom:16px; }
#page-shop .search-input { min-height:44px; border:1px solid var(--border); background:var(--surface); }
#page-shop .search-icon { position:relative; width:15px; height:15px; flex:0 0 15px; }
#page-shop .search-icon::before { content:""; position:absolute; top:1px; left:1px; width:8px; height:8px; border:1.6px solid #8b9891; border-radius:50%; }
#page-shop .search-icon::after { content:""; position:absolute; width:6px; height:1.6px; left:10px; top:11px; border-radius:2px; background:#8b9891; transform:rotate(45deg); transform-origin:left center; }
.category-tabs { padding-bottom:14px; }
.cat-tab, .filter-tab { border:1px solid transparent; background:var(--surface-secondary); }
.cat-tab.active, .filter-tab.active { border-color:#c7d9d1; background:#edf4f0; color:var(--brand-dark); }
.product-grid { gap:10px; }
.product-card { border:1px solid var(--border); border-radius:14px; box-shadow:none; }
.product-card-img { position:relative; background:#f3f3ee; }
.product-card-img.product-media { background-color:#f3f3ee; background-size:contain; background-repeat:no-repeat; background-position:center; }
.product-card-info { padding:11px 12px 13px; }
#page-shop .product-card-price { color:var(--brand-dark); }
.product-card-name { min-height:36px; overflow:hidden; font-size:13px; font-weight:600; line-height:1.4; }
.product-card-badge { display:inline-block; margin-right:4px; padding:2px 4px; border-radius:4px; color:#90765d; background:#f2ebe2; font-size:9px; font-weight:600; line-height:1; vertical-align:1px; }
.product-card-price { margin-top:5px; color:var(--brand-dark); font-size:15px; }
.product-card-price .original { margin-left:4px; }

/* Material detail preserves a deliberate choice between browsing and creating. */
.material-modal { position:fixed; inset:0; z-index:1300; visibility:hidden; pointer-events:none; }
.material-modal.open { visibility:visible; pointer-events:auto; }
.material-modal-backdrop { position:absolute; inset:0; opacity:0; background:rgba(26,35,33,.42); transition:opacity .24s ease; }
.material-modal.open .material-modal-backdrop { opacity:1; }
.material-sheet { position:absolute; right:0; bottom:0; left:0; max-width:430px; margin:auto; padding:18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius:24px 24px 0 0; background:var(--surface); box-shadow:0 -16px 46px rgba(29,37,35,.16); transform:translateY(105%); transition:transform .28s cubic-bezier(.2,.8,.2,1); }
.material-modal.open .material-sheet { transform:translateY(0); }
.material-close { display:grid; position:absolute; top:14px; right:16px; z-index:2; place-items:center; width:30px; height:30px; border:0; border-radius:50%; color:var(--text-secondary); background:rgba(255,255,255,.82); font-size:22px; line-height:1; }
.material-visual { display:grid; place-items:center; height:148px; margin:0 0 16px; border-radius:16px; color:var(--brand); background:#f1f2ed; font-size:50px; background-repeat:no-repeat; background-position:center; background-size:contain; }
.material-visual.has-image { background-color:#f4f4ef; }
.material-detail-kicker { color:#9c856d; font-size:9px; font-weight:650; letter-spacing:.13em; }
.material-detail-copy h2 { margin:6px 0 6px; color:var(--text-primary); font-size:19px; line-height:1.35; }
.material-detail-copy p { color:var(--text-secondary); font-size:12px; line-height:1.6; }
.material-detail-meta { display:flex; align-items:center; gap:6px; margin-top:11px; color:var(--text-tertiary); font-size:11px; }
.material-detail-meta strong { color:var(--brand-dark); font-size:15px; }
.material-detail-service { display:flex; flex-direction:column; gap:3px; margin-top:16px; padding:11px 12px; border-radius:12px; color:var(--text-secondary); background:#edf3ef; font-size:11px; line-height:1.45; }
.material-detail-service b { color:var(--brand-dark); font-size:11px; }
.material-add-btn { width:100%; min-height:48px; margin-top:14px; border:0; border-radius:14px; color:#fff; background:var(--brand); font:600 14px inherit; }
.material-add-btn span { margin-left:6px; font-size:18px; vertical-align:-1px; }
.material-continue-btn { display:block; margin:10px auto 0; border:0; color:var(--text-secondary); background:none; font:500 12px inherit; }

/* Checkout earns confidence by making the commitment legible before the price. */
#page-checkout .page-header { padding-top:12px; }
#page-checkout .page-content { padding-top:5px; padding-bottom:18px; }
.checkout-identity { display:flex; align-items:flex-start; gap:10px; margin:2px 0 23px; padding:14px; border:1px solid #d5e4dc; border-radius:16px; background:#edf4f0; }
.checkout-identity-mark { display:grid; flex:0 0 auto; place-items:center; width:27px; height:27px; border-radius:50%; color:#fff; background:var(--brand); font-size:13px; }
.checkout-identity small { display:block; color:#8a9b92; font-size:8px; font-weight:650; letter-spacing:.13em; }
.checkout-identity strong { display:block; margin-top:5px; color:var(--brand-dark); font-size:15px; line-height:1.35; }
.checkout-identity p { margin-top:3px; color:var(--text-secondary); font-size:11px; line-height:1.45; }
#page-checkout .checkout-section { margin-bottom:21px; }
#page-checkout .checkout-section-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; color:var(--text-primary); font-size:15px; font-weight:600; }
#page-checkout .checkout-section-title .section-more { color:var(--text-secondary); font-size:11px; }
#page-checkout .checkout-section-title .section-more b { color:var(--brand); font-size:14px; }
#page-checkout .address-card { border:1px solid var(--border); border-radius:14px; box-shadow:none; }
#page-checkout .address-card.selected { border-color:#bfd5ca; background:#fbfdfb; }
#page-checkout .address-card.selected::after { background:var(--brand); }
#page-checkout .checkout-item { border:1px solid var(--border); border-radius:14px; box-shadow:none; }
#page-checkout .checkout-item-header { min-height:76px; padding:12px; }
#page-checkout .checkout-item-thumb { width:54px; height:54px; border-radius:12px; background:#f1f3ef; }
#page-checkout .checkout-item-thumb img { object-fit:contain !important; }
#page-checkout .checkout-item-price { flex:0 0 auto; margin-right:2px; color:var(--brand-dark) !important; font-size:15px; font-weight:600; }
#page-checkout .checkout-bead-detail { padding:0 12px 10px; }
#page-checkout .bead-detail-table { margin-top:0; }
#page-checkout .checkout-item-subtotal { padding:9px 1px 1px; color:var(--text-secondary); font-size:12px; text-align:right; }
#page-checkout .checkout-item-subtotal strong { color:var(--brand-dark); font-size:14px; }
.checkout-reassurance { margin:0 0 21px; padding:15px 14px 13px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.checkout-reassurance-title { margin-bottom:12px; color:var(--text-primary); font-size:13px; font-weight:600; }
.checkout-reassurance-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.checkout-reassurance-grid div { display:flex; flex-direction:column; gap:5px; min-width:0; padding-right:5px; }
.checkout-reassurance-grid b { color:#a18b73; font-size:10px; letter-spacing:.06em; }
.checkout-reassurance-grid span { color:var(--text-secondary); font-size:10px; line-height:1.45; }
#page-checkout .checkout-summary { border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-checkout .checkout-summary-total { color:var(--brand-dark); }
#page-checkout .checkout-shipping { color:var(--brand) !important; font-weight:600; }
#page-checkout .cart-footer { border-top:1px solid var(--border); background:rgba(255,255,255,.97); }
#page-checkout .cart-checkout-btn { min-width:142px; background:var(--brand); }

/* Address management uses the same calm hierarchy as the making flow. */
#page-address .page-header { padding-top:15px; padding-bottom:14px; }
#page-address .page-content { padding-top:6px; }
#page-address .address-card { margin-bottom:10px; padding:15px 14px; border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-address .address-card:not(.selected):hover { border-color:#d4ded7; background:var(--surface); }
#page-address .address-card.selected { border-color:#bfd5ca; background:#fbfdfb; }
#page-address .address-card.selected::after { top:12px; right:13px; width:19px; height:19px; color:#fff; background:var(--brand); font-size:11px; }
#page-address .address-contact { color:var(--text-primary); font-size:14px; font-weight:600; }
#page-address .address-detail { color:var(--text-secondary); font-size:12px; line-height:1.55; }
#page-address .address-card-actions { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); }
#page-address .address-action-btn { color:var(--text-secondary); font-size:11px; }
#page-address .address-add-btn { min-height:48px; border:1px dashed #c8d8d0; border-radius:15px; color:var(--brand-dark); background:#f1f5f1; }
#page-address .address-add-btn:active { background:#e7efe9; }
#page-address .address-add-icon { display:grid; place-items:center; width:21px; height:21px; color:#fff; background:var(--brand); font-size:16px; }
#page-address .address-form { margin-top:12px; padding:16px 14px; border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-address .address-form-title { margin-bottom:16px; color:var(--text-primary); font-size:15px; text-align:left; }
#page-address .form-group label { color:var(--text-secondary); font-size:11px; }
#page-address .form-group input, #page-address .form-group select { min-height:45px; border:1px solid var(--border); border-radius:11px; background:var(--surface); }
#page-address .address-cancel-btn, #page-address .address-save-btn { min-height:46px; border-radius:13px; }

/* Orders keep the piece and its next state legible without bright status colors. */
#page-orders .page-header { padding-top:15px; padding-bottom:14px; }
#page-orders .page-content { padding-top:6px; }
#page-orders .order-card { margin-bottom:10px; padding:13px 14px; border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-orders .order-card:active { background:#fbfcfa; }
#page-orders .order-card-header { margin-bottom:10px; padding-bottom:9px; border-bottom-color:var(--border); }
#page-orders .order-card-no { color:var(--text-tertiary); font-size:10px; }
#page-orders .order-card-status { color:var(--brand-dark); font-size:12px; font-weight:600; }
#page-orders .dot-unprocessed { background:#b58d67; box-shadow:none; animation:none; }
#page-orders .order-card-img { width:58px; height:58px; border-radius:13px; background:#f1f3ef; }
#page-orders .order-card-info { align-self:center; }
#page-orders .order-card-kicker { color:#9b876f; font-size:9px; }
#page-orders .order-card-name { font-size:14px; font-weight:600; }
#page-orders .order-card-detail { margin-top:4px; color:var(--text-secondary); font-size:11px; }
#page-orders .order-card-price { align-self:center; color:var(--brand-dark); font-size:15px; }

/* Notifications are a calm record of updates, not a stream of alerts. */
#page-messages .page-header { padding-top:15px; padding-bottom:14px; }
#page-messages .page-content { padding-top:6px; }
#page-messages .msg-item { gap:10px; margin-bottom:8px; padding:14px 13px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
#page-messages .msg-item.unread { background:#f4f8f4; border-color:#d8e5dc; }
#page-messages .msg-left { padding-top:5px; }
#page-messages .msg-dot { width:7px; height:7px; background:var(--brand); box-shadow:0 0 0 3px #e2eee6; }
#page-messages .msg-dot.read { box-shadow:none; }
#page-messages .msg-header { margin-bottom:5px; }
#page-messages .msg-title { font-size:14px; font-weight:600; }
#page-messages .msg-tag { padding:2px 6px; border-radius:999px; color:var(--text-secondary); background:#edf1ed; font-size:9px; }
#page-messages .msg-tag.approved { color:var(--brand-dark); background:#e9f2ec; }
#page-messages .msg-tag.rejected { color:#8b695c; background:#f4ece8; }
#page-messages .msg-content { color:var(--text-secondary); font-size:12px; line-height:1.55; }
#page-messages .msg-time { margin-top:7px; font-size:10px; }

/* The inspiration sheet belongs to the same mineral studio, not a separate warm-brown theme. */
.inspiration-eyebrow { color:#819087; }
.inspiration-sheet h2 { color:var(--text-primary); }
.inspiration-intro, .inspiration-copy p { color:var(--text-secondary); }
.inspiration-preview { background:radial-gradient(circle at 50% 42%, #fff 0%, #edf2ee 72%); }
.inspiration-name { color:var(--text-primary); }
.inspiration-meta { color:#819087; }
.inspiration-actions button { border-color:var(--border); color:var(--text-secondary); background:var(--surface-secondary); }

/* The gallery proves taste through people and pieces, not a generic content grid. */
#page-gallery .page-header { padding-top:20px; padding-bottom:7px; }
.gallery-kicker { margin-bottom:4px; color:#a28a72; font-size:9px; font-weight:650; letter-spacing:.14em; }
#page-gallery .page-title { max-width:335px; font-size:20px; line-height:1.35; }
.gallery-intro { padding:0 var(--margin) 17px; color:var(--text-secondary); font-size:12px; line-height:1.5; }
#page-gallery .filter-tabs { padding-bottom:17px; }
#page-gallery .gallery-grid { padding-bottom:24px; }
.gallery-author-dot { display:inline-grid; place-items:center; width:16px; height:16px; margin-right:4px; border-radius:50%; color:#fff; background:var(--brand); font-size:8px; font-style:normal; }
.gallery-card-author i { margin:0 3px; color:#c4c5bf; font-style:normal; }
.gallery-empty { grid-column:1/-1; padding:44px 10px; color:var(--text-tertiary); font-size:13px; text-align:center; }
#page-gallery-detail .page-content { padding-top:2px; }
.gallery-piece-hero { display:grid; min-height:340px; place-items:center; margin:2px 0 19px; overflow:hidden; border:1px solid var(--border); border-radius:22px; background:radial-gradient(circle at 50% 36%, #fff 0%, #f2f3ef 66%, #e4e8e0 100%); }
.gallery-piece-hero img { max-width:100%; max-height:420px; object-fit:contain; }
.gallery-piece-hero .mini-bracelet { transform:scale(2.6); }
@media (min-width:420px) { .gallery-piece-hero { min-height:400px; } .gallery-piece-hero .mini-bracelet { transform:scale(3.1); } }
@media (min-width:540px) { .gallery-piece-hero { min-height:440px; } .gallery-piece-hero .mini-bracelet { transform:scale(3.5); } }
@media (min-width:768px) { .gallery-piece-hero { min-height:480px; } .gallery-piece-hero .mini-bracelet { transform:scale(3.8); } }
.gallery-detail-author { display:flex; align-items:center; gap:9px; padding:0 1px 14px; border-bottom:1px solid var(--border); }
.gallery-detail-avatar { display:grid; flex:0 0 auto; place-items:center; width:30px; height:30px; overflow:hidden; border-radius:50%; color:#fff; background:var(--brand); font-size:12px; font-weight:600; }
.gallery-detail-avatar img { width:100%; height:100%; object-fit:cover; }
.gallery-detail-author > div:nth-child(2) { display:flex; min-width:0; flex:1; flex-direction:column; gap:2px; }
.gallery-detail-author strong { color:var(--text-primary); font-size:13px; font-weight:600; }
.gallery-detail-author small { color:var(--text-tertiary); font-size:10px; }
.gallery-detail-author em { color:var(--text-secondary); font-size:10px; font-style:normal; }
.gallery-detail-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:14px 0 12px; overflow:hidden; border:1px solid var(--border); border-radius:15px; background:var(--surface); }
.gallery-detail-summary > div { display:flex; min-width:0; flex-direction:column; gap:5px; padding:13px 8px 12px; text-align:center; }
.gallery-detail-summary > div + div { border-left:1px solid var(--border); }
.gallery-detail-summary span { color:var(--text-tertiary); font-size:9px; }
.gallery-detail-summary strong { color:var(--text-primary); font-size:16px; font-weight:650; white-space:nowrap; }
.gallery-detail-summary small { margin-left:2px; color:var(--text-secondary); font-size:9px; font-weight:500; }
.gallery-fit-card { margin-bottom:11px; padding:15px 15px 14px; border-radius:15px; background:#edf3ef; }
.gallery-fit-card > span { display:block; margin-bottom:6px; color:var(--text-tertiary); font-size:9px; font-weight:600; letter-spacing:.1em; }
.gallery-fit-card strong { color:var(--brand-dark); font-size:15px; font-weight:650; }
.gallery-fit-card p { margin:6px 0 0; color:var(--text-secondary); font-size:11px; line-height:1.7; }
.gallery-fit-card.snug { background:#f2f2ed; }
.gallery-fit-card.relaxed { background:#f3eee8; }
#page-gallery-detail .detail-section-label { padding-top:13px; }
#page-gallery-detail .detail-bead-row { min-height:42px; }
#page-gallery-detail .detail-actions { grid-template-columns:1fr 1.45fr; }
#page-gallery-detail .detail-btn-outline { grid-column:1/-1; }

/* Personal space is an archive of pieces, not a stack of utility rows. */
#page-me { background:var(--bg); }
#page-me .profile-header { align-items:center; padding:27px var(--margin) 25px; background:radial-gradient(circle at 50% 0%, #e8f0ea 0, transparent 38%), var(--bg); text-align:center; }
#page-me .profile-avatar { width:64px; height:64px; margin-bottom:12px; overflow:hidden; border:3px solid #fff; border-radius:50%; box-shadow:0 6px 17px rgba(48,72,64,.11); }
#page-me .profile-name { font-size:20px; font-weight:600; }
#page-me .profile-edit-hint { margin-top:5px; color:var(--text-secondary); font-size:11px; opacity:1; }
#page-me .page-content { padding-bottom:25px; }
#page-me .order-entry { padding:16px 14px 15px; margin-bottom:13px; border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-me .order-entry-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; color:var(--text-primary); font-size:15px; font-weight:600; }
#page-me .order-entry-title button { border:0; color:var(--text-secondary); background:none; font:500 11px inherit; }
#page-me .order-entry-title b { margin-left:3px; color:var(--brand); font-size:14px; }
#page-me .order-icons { justify-content:space-between; }
#page-me .order-item { gap:6px; width:25%; color:var(--text-secondary); font-size:0; }
#page-me .order-icon { display:grid; place-items:center; width:33px; height:33px; border-radius:50%; color:var(--brand-dark); background:#edf3ef; }
#page-me .order-icon svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; }
#page-me .order-item span { color:var(--text-secondary); font-size:11px; }
#page-me .order-item .order-badge {
  top:-5px;
  right:calc(50% - 23px);
  min-width:20px;
  height:20px;
  padding:0 5px;
  border:2px solid #fff;
  border-radius:10px;
  color:#fff;
  background:var(--brand-dark);
  box-shadow:0 2px 6px rgba(31,62,56,.2);
  font-size:12px;
  font-weight:700;
  line-height:1;
}
#page-me .menu-list { border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-me .menu-item { gap:11px; padding:16px 14px; color:var(--text-primary); font-size:14px; }
#page-me .menu-arrow { color:#aab1ad; font-size:16px; }
#page-me #menu-logout { color:#8d6c5a; }

/* Authentication continues the studio atmosphere instead of dropping into a generic account form. */
#page-auth { background:radial-gradient(circle at 88% 0%, #e8f0ea 0, transparent 28%), var(--bg); }
#page-auth .page-header { background:transparent; }
#page-auth .page-content { max-width:430px; padding:0 24px 34px; }
.auth-hero { padding:18px 0 29px; text-align:left; }
.auth-mark { display:flex; align-items:center; height:38px; margin-bottom:18px; }
.auth-mark span { width:20px; height:20px; margin-left:-3px; border:2px solid var(--bg); border-radius:50%; background:#dce8df; box-shadow:0 4px 9px rgba(48,72,64,.08); }
.auth-mark span:nth-child(2) { width:24px; height:24px; background:#bcd2c5; }
.auth-mark span:nth-child(3) { width:18px; height:18px; background:#edf2ee; }
.auth-mark span:nth-child(4) { width:22px; height:22px; background:var(--brand); }
.auth-kicker { color:#819087; font-size:10px; font-weight:650; letter-spacing:.12em; }
#page-auth .auth-hero h1 { margin:7px 0 7px; color:var(--text-primary); font-size:24px; font-weight:600; letter-spacing:.01em; }
#page-auth .auth-subtitle { max-width:280px; margin:0; color:var(--text-secondary); font-size:12px; line-height:1.6; text-align:left; }
#page-auth .auth-form { padding:0; }
#page-auth .auth-form .form-group { margin-bottom:14px; }
#page-auth .auth-form .form-group label { margin-bottom:6px; color:var(--text-secondary); font-size:12px; }
#page-auth .auth-form .form-group input,
#page-auth .auth-form .form-group select { min-height:47px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.86); }
#page-auth .auth-submit-btn { min-height:49px; margin-top:6px; border-radius:14px; background:var(--brand); font-size:14px; box-shadow:none; }
#page-auth .auth-switch { margin-top:15px; color:var(--text-secondary); font-size:12px; }
#page-auth .auth-switch span { margin-left:4px; color:var(--brand-dark); font-weight:600; }

/* The bag keeps every item framed as a personal piece awaiting a making decision. */
#page-cart .page-header { padding-top:15px; padding-bottom:14px; }
#page-cart .page-title { font-size:18px; }
#page-cart .page-action { color:var(--text-secondary); font-size:12px; }
#page-cart .empty-state { padding:104px 22px; }
.cart-empty-mark { position:relative; width:52px; height:52px; margin:0 auto 8px; border:1px solid var(--border); border-radius:50%; background:#f1f4f0; }
.cart-empty-mark::before { content:""; position:absolute; top:19px; left:15px; width:20px; height:16px; border:1.7px solid #60736a; border-radius:3px 3px 5px 5px; }
.cart-empty-mark::after { content:""; position:absolute; top:13px; left:20px; width:10px; height:8px; border:1.7px solid #60736a; border-bottom:0; border-radius:7px 7px 0 0; }
#page-cart .empty-title { color:var(--text-primary); font-size:17px; font-weight:600; }
#page-cart .btn-primary { min-height:46px; padding:0 23px; border-radius:14px; background:var(--brand); font-size:13px; }
#page-cart #cart-list { display:flex; flex-direction:column; gap:10px; }
#page-cart .cart-item { margin:0; border:1px solid var(--border); border-radius:16px; box-shadow:none; }
#page-cart .cart-item-preview { border-radius:13px; background:radial-gradient(circle at 50% 40%, #fff 0, #f1f3ef 73%); }
.cart-piece-fallback { display:flex; align-items:center; justify-content:center; width:100%; height:100%; }
.cart-piece-fallback i { width:14px; height:14px; margin-left:-3px; border:2px solid #f1f3ef; border-radius:50%; background:var(--brand); }
.cart-piece-fallback i:nth-child(2) { width:18px; height:18px; background:#b8cfc3; }
.cart-piece-fallback i:nth-child(3) { background:#d9b98f; }
#page-cart .cart-item-kicker { color:#a28a72; }
#page-cart .cart-item-title { color:var(--text-primary); }
#page-cart .cart-item-meta { color:var(--text-secondary); }
#page-cart .cart-item-price { color:var(--brand-dark); }
#page-cart .cart-item-delete { color:var(--text-tertiary); background:transparent; }
#page-cart .cart-select-all { margin-top:13px; }
#page-cart .cart-footer { border-top:1px solid var(--border); background:rgba(255,255,255,.97); }
#page-cart .cart-total-label { color:var(--text-secondary); font-size:11px; }
#page-cart .cart-total-price { color:var(--brand-dark); }
#page-cart .cart-checkout-btn { min-width:138px; background:var(--brand); }

/* DIY keeps the workbench quiet: the bracelet is the visual focus and material selection is direct. */
#diy-editor .canvas-container.v2 {
  margin:0 var(--margin);
  border-radius:20px;
  background:radial-gradient(circle at 50% 34%, #ffffff 0%, #f2f3ef 72%);
  box-shadow:inset 0 0 0 1px var(--border);
}
#diy-editor .canvas-container.v2::before {
  inset:50% auto auto 50%;
  width:112%;
  height:auto;
  aspect-ratio:1;
  background-image:url('../uploads/diy/bead-tray-mineral-v2.png');
  background-size:100% 100%;
  background-position:center;
  background-repeat:no-repeat;
  transform:translate(-50%, -50%) scale(var(--tray-scale, 1));
  transform-origin:center;
  -webkit-mask-image:radial-gradient(circle at center, #000 0 61%, rgba(0,0,0,.98) 64%, rgba(0,0,0,.55) 68%, transparent 71%);
  mask-image:radial-gradient(circle at center, #000 0 61%, rgba(0,0,0,.98) 64%, rgba(0,0,0,.55) 68%, transparent 71%);
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  /* 白色底会直接融入渐变；木质托盘只获得极轻的环境色。 */
  mix-blend-mode:normal;
}
#diy-editor .canvas-empty-guide { padding:8px var(--margin) 0; color:var(--text-secondary); font-size:12px; }
#diy-editor .canvas-action-row {
  position:absolute;
  right:18px;
  bottom:16px;
  left:18px;
  z-index:7;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:30px;
  margin:0;
  padding:0;
}
#diy-editor .canvas-action-row[hidden] { display:none; }
#diy-editor .canvas-action-row .canvas-bracelet-btn {
  position:relative;
  right:auto;
  bottom:auto;
  min-height:30px;
  padding:5px 10px;
  margin-left:auto;
  border-radius:10px;
  font-size:11px;
  box-shadow:0 3px 9px rgba(47,78,70,.14);
}
#diy-editor .trash-zone {
  position:relative;
  bottom:auto;
  left:auto;
  width:auto;
  min-width:56px;
  height:28px;
  gap:5px;
  padding:0 9px;
  border:1px solid rgba(122,107,97,.14);
  border-radius:999px;
  color:#746a63;
  background:rgba(251,250,246,.88);
  box-shadow:0 3px 9px rgba(54,66,61,.07);
  font:600 10px inherit;
  overflow:visible;
  cursor:pointer;
  transition:border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
#diy-editor .trash-zone-icon {
  position:relative;
  display:block;
  width:11px;
  height:12px;
  border:1.4px solid currentColor;
  border-top:0;
  border-radius:0 0 3px 3px;
  color:#789087;
  box-sizing:border-box;
  transform:translateY(2px);
}
#diy-editor .trash-zone-icon::before {
  content:'';
  position:absolute;
  top:-4px;
  left:-3px;
  width:16px;
  height:3px;
  border-top:1.4px solid currentColor;
  border-bottom:1.4px solid currentColor;
  border-radius:2px;
  box-sizing:border-box;
}
#diy-editor .trash-zone-icon::after {
  content:'';
  position:absolute;
  top:3px;
  left:3px;
  width:1px;
  height:6px;
  border-radius:1px;
  background:currentColor;
  box-shadow:4px 0 0 currentColor;
}
#diy-editor .trash-zone-label { display:block; line-height:1; white-space:nowrap; }
#diy-editor .trash-zone.active {
  min-width:106px;
  border-color:#dec1b6;
  color:#a66b52;
  background:#fbf3ef;
  transform:none;
}
#diy-editor .trash-zone.active .trash-zone-icon { color:#a66b52; }
#diy-editor .trash-zone.active .trash-zone-label { font-size:0; }
#diy-editor .trash-zone.active .trash-zone-label::after { content:'松手移除'; font-size:11px; }

/* 清空珠盘确认：把破坏性操作包进一张温暖、可理解的小画面里。 */
.clear-design-modal {
  position:fixed;
  inset:0;
  z-index:1350;
  display:grid;
  place-items:center;
  padding:20px;
  visibility:hidden;
  pointer-events:none;
}
.clear-design-modal.open { visibility:visible; pointer-events:auto; }
.clear-design-backdrop {
  position:absolute;
  inset:0;
  opacity:0;
  background:rgba(28,43,39,.5);
  backdrop-filter:blur(5px);
  transition:opacity .22s ease;
}
.clear-design-modal.open .clear-design-backdrop { opacity:1; }
.clear-design-dialog {
  position:relative;
  width:min(100%, 326px);
  padding:12px 16px 16px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:25px;
  background:#fbfaf6;
  box-shadow:0 24px 60px rgba(25,43,38,.24);
  text-align:center;
  opacity:0;
  transform:translateY(14px) scale(.96);
  transition:opacity .22s ease, transform .26s cubic-bezier(.2,.8,.2,1);
}
.clear-design-modal.open .clear-design-dialog { opacity:1; transform:none; }
.clear-design-close {
  position:absolute;
  top:18px;
  right:20px;
  z-index:2;
  width:30px;
  height:30px;
  border:0;
  border-radius:50%;
  color:#6f7d77;
  background:rgba(255,255,255,.74);
  font:400 20px/1 inherit;
  cursor:pointer;
}
.clear-design-scene {
  position:relative;
  height:142px;
  overflow:hidden;
  border-radius:19px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(244,239,229,.24)),
    url('../uploads/diy/bead-tray-mineral-v2.png') center 48% / 142% no-repeat,
    #f0eee7;
}
.clear-design-ring {
  position:absolute;
  left:50%;
  top:50%;
  width:84px;
  height:84px;
  border:1px solid rgba(91,112,104,.2);
  border-radius:50%;
  transform:translate(-50%,-44%);
  box-shadow:0 11px 16px rgba(62,76,70,.09);
}
.clear-design-bead {
  position:absolute;
  width:23px;
  height:23px;
  border:1px solid rgba(255,255,255,.8);
  border-radius:50%;
  background:radial-gradient(circle at 34% 27%, #fff 0 10%, #e7b6af 34%, #c78f88 74%, #a9726e 100%);
  box-shadow:inset -3px -4px 6px rgba(102,57,53,.16), 0 5px 9px rgba(62,50,46,.12);
}
.clear-design-bead--one { left:31%; top:38%; }
.clear-design-bead--two { right:30%; top:27%; width:19px; height:19px; background:radial-gradient(circle at 34% 27%, #fff 0 12%, #d5d9d1 38%, #9cb0a6 100%); }
.clear-design-bead--three { right:24%; bottom:20%; width:17px; height:17px; opacity:.72; }
.clear-design-spark { position:absolute; left:25%; top:24%; color:#c49a69; font-size:14px; }
.clear-design-kicker { display:block; margin-top:15px; color:#879991; font-size:10px; font-weight:700; letter-spacing:.12em; }
.clear-design-dialog h2 { margin:5px 0 0; color:var(--text-primary); font-size:20px; font-weight:650; }
.clear-design-dialog p { max-width:275px; margin:8px auto 0; color:var(--text-secondary); font-size:12px; line-height:1.65; }
.clear-design-actions { display:grid; grid-template-columns:1fr 1.18fr; gap:9px; margin-top:17px; }
.clear-design-actions button { min-height:44px; border:0; border-radius:14px; font:600 13px inherit; cursor:pointer; }
.clear-design-cancel { color:var(--brand-dark); background:#e8eeea; }
.clear-design-confirm { color:#fff; background:var(--brand); box-shadow:0 7px 15px rgba(47,78,70,.18); }
.clear-design-actions button:active { transform:scale(.98); }
#diy-editor .artwork-metrics { grid-template-columns:repeat(4, minmax(0, 1fr)); padding:9px 0 8px; border-bottom-color:var(--border); }
#diy-editor .artwork-metric--weight { display:none; }
#diy-editor .drawer-header { min-height:48px; padding:10px 14px 8px; }
#diy-editor .drawer-subtitle { display:block; margin-top:2px; color:var(--text-tertiary); font-size:10px; }
#diy-editor .drawer-level1-tabs { padding:3px 12px 8px; }
#diy-editor .drawer-level1-tab { background:#eef1ed; color:var(--text-secondary); }
#diy-editor .drawer-level1-tab.active { background:var(--brand); box-shadow:none; }
#diy-editor .drawer-level2-tab.active { color:var(--brand-dark); box-shadow:inset 2px 0 0 var(--brand); }

/* One calm workspace palette: surrounding surfaces recede so the beads carry the color. */
#page-diy { background:#f4f4ef; }
#diy-editor .editor-topbar.v2 {
  background:#f4f4ef;
  border-bottom:1px solid rgba(59,92,87,.06);
}
#diy-editor .editor-btn { color:var(--brand-dark); background:#e8ede9; }
#diy-editor .topbar-price { color:var(--brand-dark); }
#diy-editor .canvas-container.v2 {
  border-color:#dde2dc;
  background:radial-gradient(circle at 50% 34%, #fbfcfa 0%, #edf0eb 74%);
}
#diy-editor .bead-drawer { background:transparent; }
#diy-editor .drawer-panel {
  border-color:#dde2dc;
  background:#f7f7f3;
  box-shadow:0 10px 28px rgba(41,69,65,.07);
}
#diy-editor .drawer-close-btn { color:var(--brand-dark); background:#e7ece8; }
#diy-editor .drawer-level1-tab { color:#697571; background:#e9eeea; }
#diy-editor .drawer-level1-tab.active { color:#fff; background:var(--brand); }
#diy-editor .drawer-meituan,
#diy-editor .drawer-content { background:#f7f7f3; }
#diy-editor .drawer-level2-nav { border-color:#dde2dc; background:#ecefea; }
#diy-editor .drawer-level2-tab { color:#697571; }
#diy-editor .drawer-level2-tab.active { color:var(--brand-dark); background:#f7f7f3; }
#diy-editor .l2-beads .mat-card { background:#ecefe9; }
#diy-editor .l2-beads .mat-card:active { background:#e2e8e2; }
#diy-editor .mat-card-size { color:#929a96; }
#diy-editor .mat-card-price { color:var(--brand-dark); }
#diy-editor .mat-summary.v2 {
  background:#f7f7f3;
  border-top:1px solid #dde2dc;
}
#diy-editor .artwork-metrics { border-bottom-color:#dde2dc; }
#diy-editor .summary-btn.secondary { color:var(--brand-dark); background:#e6ebe7; }

#diy-editor .drawer-level2-tab.active {
  background:rgba(255,255,255,.72);
  box-shadow:none;
}
#diy-editor .artwork-fit-status {
  display:block;
  box-sizing:border-box;
  min-height:74px;
  margin-top:9px;
  padding:10px 12px;
  border-radius:12px;
  color:#65736d;
  background:#edf2ee;
  font-size:11px;
  line-height:1.55;
}
#diy-editor .artwork-fit-icon { display:none; }
#diy-editor #artwork-fit-copy { display:flex; flex-direction:column; gap:2px; }
#diy-editor #artwork-fit-copy strong { color:var(--brand-dark); font-size:12px; font-weight:650; }
#diy-editor #artwork-fit-copy small { color:inherit; font-size:11px; line-height:1.55; }
#diy-editor .artwork-fit-status.is-building { color:#806f5d; background:#f2efe9; }
#diy-editor .artwork-fit-status.is-relaxed { color:#806f5d; background:#f4eee8; }
#diy-editor .artwork-fit-status.is-adjust { color:#8a6557; background:#f6ede9; }
#diy-editor .artwork-fit-status.is-setup { color:#65736d; background:#edf2ee; }
#diy-editor .fit-setup-action {
  margin-left:4px;
  padding:0;
  border:0;
  color:var(--brand);
  background:transparent;
  font:600 12px inherit;
  text-decoration:underline;
  text-underline-offset:3px;
}
#diy-editor .artwork-fit-status[hidden] {
  display:block;
  visibility:hidden;
  background:transparent;
}
#diy-editor .canvas-container.v2 .canvas-empty-guide {
  position:absolute;
  top:13px;
  left:50%;
  z-index:3;
  width:max-content;
  max-width:calc(100% - 32px);
  padding:6px 10px;
  border:1px solid rgba(221,226,220,.86);
  border-radius:999px;
  color:#68736f;
  background:rgba(251,252,250,.86);
  font-size:11px;
  line-height:1.35;
  text-align:center;
  transform:translateX(-50%);
}

/* ===== Design system 2.0 · full frontend consolidation ===== */
:root {
  --page-gutter:16px;
  --control-height:46px;
  --surface-green:#edf3ef;
  --surface-green-strong:#dce9e2;
  --surface-warm:#f3eee8;
  --ink-green:#294541;
  --focus-ring:0 0 0 3px rgba(59,92,87,.12);
}

html { background:#e9ece8; }
body { background:var(--bg); }
.page { background:linear-gradient(180deg,#faf9f6 0%,var(--bg) 24%,var(--bg) 100%); }
.page-content { width:100%; padding-right:var(--page-gutter); padding-left:var(--page-gutter); }
.page-header {
  position:sticky;
  top:0;
  z-index:30;
  min-height:62px;
  padding:12px var(--page-gutter);
  border-bottom:1px solid rgba(231,230,223,.86);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(16px);
}
.page-header .page-title { color:var(--text-primary); font-size:17px; font-weight:650; line-height:1.35; }
.page-action { color:var(--brand-dark); font-size:12px; font-weight:600; }
.editor-btn {
  display:grid;
  width:38px;
  height:38px;
  padding:0;
  place-items:center;
  border:1px solid var(--border);
  border-radius:50%;
  color:var(--brand-dark);
  background:var(--surface-secondary);
}
.editor-btn svg path { stroke:currentColor; }
.editor-btn:active { background:var(--surface-green); transform:scale(.96); }

button, input, select, textarea { font-family:inherit; }
button { -webkit-tap-highlight-color:transparent; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; margin-bottom:7px; color:var(--text-secondary); font-size:11px; font-weight:550; }
.form-group input,
.form-group select,
.design-name-input {
  width:100%;
  min-height:var(--control-height);
  padding:0 14px;
  border:1px solid var(--border);
  border-radius:12px;
  color:var(--text-primary);
  background:rgba(255,255,255,.9);
  outline:0;
}
.form-group input:focus,
.form-group select:focus,
.design-name-input:focus { border-color:#aac3b7; box-shadow:var(--focus-ring); }
.form-group input::placeholder,
.design-name-input::placeholder { color:#b0b2ad; }

.btn-primary,
.auth-submit-btn,
.address-save-btn,
.cart-checkout-btn,
.detail-btn-buy,
.summary-btn.primary,
.material-add-btn,
.confirm-btn-ok {
  border:0;
  border-radius:14px;
  color:#fff;
  background:var(--brand);
  box-shadow:none;
  font-weight:650;
}
.btn-primary:active,
.auth-submit-btn:active,
.address-save-btn:active,
.cart-checkout-btn:active,
.detail-btn-buy:active,
.summary-btn.primary:active,
.material-add-btn:active,
.confirm-btn-ok:active { opacity:.9; transform:scale(.985); }
.detail-btn-cart,
.summary-btn.secondary,
.address-cancel-btn,
.confirm-btn-cancel,
.design-name-secondary,
.design-limit-secondary {
  border:1px solid #cadad2;
  color:var(--brand-dark);
  background:var(--surface-green);
  box-shadow:none;
}

.empty-state { min-height:300px; padding:70px 24px; }
.utility-empty-state::before {
  content:"";
  width:43px;
  height:43px;
  margin-bottom:7px;
  border:6px dotted #a9beb3;
  border-radius:50%;
  box-sizing:border-box;
}
.empty-title { color:var(--text-primary); font-size:17px; font-weight:650; }
.empty-text { color:var(--text-secondary); font-size:13px; }
.empty-subtext { max-width:260px; color:var(--text-tertiary); line-height:1.6; text-align:center; }

.product-card,
.gallery-card,
.cart-item,
.checkout-item,
.checkout-summary,
.address-card,
.order-card,
.order-detail-card,
.order-detail-total,
.my-design-card,
.menu-list,
.order-entry {
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  box-shadow:none;
}

/* Material library */
#page-shop .page-header,
#page-gallery .page-header { position:relative; border-bottom:0; background:transparent; backdrop-filter:none; }
.shop-kicker,
.gallery-kicker,
.section-eyebrow,
.detail-artwork-eyebrow { color:#8b9b92; font-size:9px; font-weight:700; letter-spacing:.12em; }
#page-shop .search-bar { padding-top:2px; }
#page-shop .search-input { min-height:45px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.92); }
.category-tabs,
.filter-tabs { gap:7px; }
.cat-tab,
.filter-tab { padding:7px 13px; border:1px solid transparent; border-radius:999px; font-size:11px; }
.cat-tab.active,
.filter-tab.active { border-color:#c6d9cf; color:var(--brand-dark); background:var(--surface-green); }
.product-grid { gap:11px; padding-bottom:24px; }
.product-card { overflow:hidden; }
.product-card-img { aspect-ratio:1; height:auto; background-color:#f2f3ee; }
.product-card-info { padding:11px 11px 13px; }
.product-card-name { min-height:38px; color:var(--text-primary); font-size:13px; font-weight:650; }
.product-card-price { color:var(--brand-dark); font-size:15px; font-weight:650; }
.product-card-price .original { color:var(--text-tertiary); font-size:10px; font-weight:400; }
.product-card-badge { border-radius:999px; color:#816d58; background:var(--surface-warm); }

/* Finished artwork */
#page-detail .page-content,
#page-gallery-detail .page-content { padding-top:4px; padding-bottom:24px; }
.detail-preview,
.gallery-piece-hero { border:1px solid var(--border); border-radius:22px; box-shadow:none; }
.detail-artwork-intro { margin-bottom:12px; padding:15px; border:1px solid #d9e5de; border-radius:16px; background:var(--surface-green); }
.detail-artwork-mark { background:var(--brand); }
.detail-artwork-intro strong { color:var(--text-primary); font-size:18px; font-weight:650; }
.detail-info .detail-row { min-height:44px; padding:11px 1px; border-bottom:1px solid var(--border); }
.detail-info .detail-label { color:var(--text-secondary); font-size:12px; }
.detail-info .detail-value { color:var(--text-primary); font-size:12px; font-weight:600; }
.detail-fit-status,
.detail-service-note { border:0; border-radius:14px; background:var(--surface-green); line-height:1.65; }
.detail-total { border:0; background:transparent; }
.detail-actions { gap:8px; }
.detail-actions button { min-height:46px; }

/* 作品完成页：购买决策与辅助操作分层，避免三颗同权按钮互相抢注意力。 */
#page-detail .detail-actions {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:9px;
  width:100%;
  padding:9px 0 4px;
}
#page-detail .detail-primary-actions,
#page-detail .detail-secondary-actions,
#page-detail .detail-actions > .detail-btn-outline { grid-column:1 / -1; width:100%; }
#page-detail .detail-primary-actions { display:grid; grid-template-columns:minmax(0, 1fr); }
#page-detail .detail-primary-actions button { width:100%; min-width:0; min-height:52px; }
#page-detail .detail-btn-buy {
  padding:13px 16px;
  border-radius:16px;
  font-size:15px;
  letter-spacing:.01em;
}
#page-detail .detail-secondary-actions {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  gap:9px;
}
#page-detail .detail-secondary-actions button { min-width:0; min-height:56px; }
#page-detail .detail-btn-cart {
  padding:11px 8px;
  border:1px solid #cbdcd3;
  border-radius:15px;
  color:var(--brand-dark);
  background:transparent;
  font-size:13px;
  font-weight:600;
}
#page-detail .detail-secondary-actions .detail-btn-save {
  display:grid;
  grid-template-columns:30px minmax(0, 1fr);
  align-items:center;
  min-height:56px;
  padding:8px 10px;
  border:1px solid #bcd3c7;
  border-radius:15px;
  color:var(--brand-dark);
  background:linear-gradient(135deg,#eaf3ee 0%,#f7faf8 100%);
  box-shadow:0 5px 14px rgba(55,88,76,.08);
  text-align:left;
  transition:transform .16s ease, border-color .16s ease, background .16s ease;
}
#page-detail .detail-btn-save:active { transform:scale(.985); }
#page-detail .detail-save-icon {
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:50%;
  color:var(--brand);
  background:rgba(255,255,255,.82);
  font-size:17px;
  line-height:1;
}
#page-detail .detail-save-copy { display:block; min-width:0; }
#page-detail .detail-save-copy strong {
  display:block;
  overflow:hidden;
  color:var(--brand-dark);
  font:650 12px/1.3 inherit;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#page-detail .detail-save-copy small {
  display:block;
  margin-top:2px;
  overflow:hidden;
  color:#789087;
  font:500 9px/1.3 inherit;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#page-detail .detail-btn-save.is-saved {
  border-color:#a9c8b8;
  background:#e5f0e9;
}
#page-detail .detail-btn-save.is-saved .detail-save-icon {
  color:#fff;
  background:var(--brand);
}
#page-detail .detail-actions > .detail-btn-outline {
  min-height:32px;
  padding:5px 0 2px;
  border:0;
  color:var(--text-secondary);
  background:transparent;
  font-size:12px;
}

/* Cart and confirmation */
#page-cart .page-content { padding-top:8px; padding-bottom:22px; }
#page-cart .cart-item { padding:13px; }
#page-cart .cart-item-preview { border-radius:13px; background:radial-gradient(circle,#fff 0,#eef1ec 75%); }
#page-cart .cart-item-title { color:var(--text-primary); font-weight:650; }
#page-cart .cart-item-meta { line-height:1.55; }
#page-cart .cart-item-delete { color:#9a7567; }
.cart-checkbox { border-color:#cfd6d1; background:#fff; }
.cart-checkbox.checked { border-color:var(--brand); background:var(--brand); }
.cart-footer { padding-top:10px; border-top:1px solid var(--border); background:rgba(255,255,255,.96); backdrop-filter:blur(14px); }
.cart-total-label { color:var(--text-secondary); }
.cart-total-price { color:var(--brand-dark); }
.cart-checkout-btn { min-height:46px; }
#page-checkout .checkout-identity { border-color:#d4e2da; background:var(--surface-green); }
#page-checkout .checkout-section { margin-bottom:22px; }
#page-checkout .checkout-section-title { font-size:15px; }
#page-checkout .checkout-item,
#page-checkout .checkout-summary { border-radius:16px; }
.checkout-reassurance { background:#fbfbf8; }
.checkout-reassurance-grid b { color:var(--brand-dark); }

/* 结算作品预览与真实珠子清单。 */
#page-checkout .checkout-item-header {
  display:grid;
  grid-template-columns:104px minmax(0, 1fr) auto;
  align-items:center;
  gap:12px;
  min-height:128px;
  padding:12px;
}
#page-checkout .checkout-item-thumb {
  width:104px;
  height:104px;
  border-radius:17px;
  background:radial-gradient(circle at 50% 46%, #fff 0, #eef2ed 72%);
}
#page-checkout .checkout-item-thumb img {
  width:100%;
  height:100%;
  object-fit:contain !important;
  transform:scale(2.15);
  transform-origin:center;
}
#page-checkout .checkout-item-summary { align-self:center; }
#page-checkout .checkout-item-brief { line-height:1.55; white-space:normal; }
#page-checkout .checkout-bead-detail { padding:0 12px 11px; }
#page-checkout .bead-detail-table th,
#page-checkout .bead-detail-table td { padding:7px 5px; vertical-align:middle; }
#page-checkout .bead-detail-table th:last-child { text-align:right; }
#page-checkout .bead-detail-table td:first-child { width:37%; }
#page-checkout .bead-detail-name { display:flex; align-items:center; min-width:0; gap:7px; }
#page-checkout .bead-detail-name > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bead-detail-swatch.bead-detail-photo {
  width:26px;
  height:26px;
  margin:0;
  flex:0 0 26px;
  overflow:hidden;
  border:1px solid rgba(68,83,76,.10);
  background-position:center;
  background-size:cover;
  box-shadow:0 2px 6px rgba(50,68,60,.10);
}
.bead-detail-photo img { display:block; width:100%; height:100%; object-fit:cover; }
.bead-detail-quantity { margin-right:7px; color:var(--text-secondary); font-size:11px; font-weight:400; }
.bead-detail-table td:last-child strong { color:var(--brand-dark); font-size:12px; white-space:nowrap; }

@media (max-width:360px) {
  #page-checkout .checkout-item-header { grid-template-columns:94px minmax(0, 1fr) auto; gap:9px; }
  #page-checkout .checkout-item-thumb { width:94px; height:94px; }
}

/* 用真实珠子素材生成的无损作品预览。 */
.checkout-artwork-preview,
.artwork-preview-bracelet { position:relative; width:100%; height:100%; }
.checkout-artwork-preview { cursor:zoom-in; }
.artwork-preview-cord {
  position:absolute;
  left:50%;
  top:50%;
  width:var(--artwork-ring);
  height:var(--artwork-ring);
  transform:translate(-50%, -50%);
  border:1px solid rgba(121,104,88,.18);
  border-radius:50%;
}
.artwork-preview-bead {
  position:absolute;
  z-index:1;
  transform:translate(-50%, -50%);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.74);
  border-radius:50%;
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
  box-shadow:0 2px 5px rgba(56,47,39,.18);
}
.artwork-preview-empty {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  color:var(--text-tertiary);
  font-size:12px;
  white-space:nowrap;
}
.lightbox-open { overflow:hidden; }
.img-lightbox.artwork-mode {
  padding:16px;
  background:rgba(22,27,25,.76);
  backdrop-filter:blur(12px);
}
.img-lightbox.artwork-mode .img-lightbox-inner {
  display:block;
  width:min(420px, calc(100vw - 28px));
  max-width:none;
  max-height:none;
  padding:14px 14px 16px;
  border:1px solid rgba(255,255,255,.7);
  border-radius:26px;
  background:#f8f8f4;
  box-shadow:0 24px 70px rgba(9,17,14,.32);
}
.artwork-lightbox-eyebrow {
  padding:3px 44px 10px 4px;
  color:#87988f;
  font-size:10px;
  font-weight:700;
  letter-spacing:.14em;
}
.artwork-lightbox-stage {
  width:100%;
  aspect-ratio:1;
  overflow:hidden;
  border:1px solid #e0e6e1;
  border-radius:21px;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(51,64,57,.10) 0, rgba(51,64,57,0) 30%),
    radial-gradient(circle at 50% 42%, #fff 0, #f1f4ef 72%, #e6ece6 100%);
  box-shadow:inset 0 0 28px rgba(80,98,88,.05);
}
.artwork-lightbox-stage .artwork-preview-bracelet { transform:scale(.96); }
.artwork-lightbox-stage .artwork-preview-cord { border-color:rgba(105,91,77,.22); }
.artwork-lightbox-stage .artwork-preview-bead {
  border-width:2px;
  box-shadow:0 4px 10px rgba(47,40,34,.20);
}
.artwork-lightbox-meta {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:13px 4px 1px;
}
.artwork-lightbox-meta strong { color:var(--text-primary); font-size:17px; font-weight:650; }
.artwork-lightbox-meta span { color:var(--text-secondary); font-size:11px; white-space:nowrap; }
.img-lightbox.artwork-mode .img-lightbox-close {
  top:13px;
  right:13px;
  width:38px;
  height:38px;
  color:#fff;
  background:rgba(48,72,64,.88);
  font-size:18px;
}

/* Address and account */
#page-address .address-form { background:rgba(255,255,255,.82); }
#page-address .region-selects { gap:7px; }
#page-address .address-card-actions { justify-content:flex-end; gap:16px; }
#page-auth .page-header { background:transparent; backdrop-filter:none; }
#page-auth .auth-mark span { border-color:var(--bg); }
#page-auth .auth-form { padding:0; }
#page-auth .auth-submit-btn { min-height:49px; margin-top:5px; font-size:14px; }
#page-auth .auth-switch { color:var(--text-secondary); }

/* Personal archive, designs and notifications */
#page-me .profile-header { border-bottom:1px solid rgba(231,230,223,.7); }
#page-me .profile-avatar svg circle:first-child { fill:#dbe8e1; }
#page-me .profile-avatar svg circle:nth-child(2),
#page-me .profile-avatar svg ellipse { fill:var(--brand); }
#page-me .order-entry,
#page-me .menu-list { background:rgba(255,255,255,.9); }
#page-me .order-icon { border:1px solid #dce7e0; }
#page-me .menu-item { min-height:53px; }
#page-me .menu-item:active { background:var(--surface-green); }
#page-me .menu-badge { background:var(--brand); }
#page-designs .page-content,
#page-orders .page-content,
#page-messages .page-content { padding-top:10px; }
#page-designs .my-design-card { overflow:hidden; }
#page-designs .my-design-preview { background:radial-gradient(circle at 50% 38%,#fff 0,#eef1ec 76%); }
#page-designs .my-design-title { color:var(--text-primary); }
#page-designs .my-design-actions button.primary { background:var(--brand); }
#page-designs .my-design-actions button.danger { color:#956f61; }
#page-orders .order-card { background:rgba(255,255,255,.94); }
#page-orders .order-card-status { color:var(--brand-dark); }
#page-messages .msg-item { background:rgba(255,255,255,.94); }
#page-messages .msg-item.unread { border-color:#cfe0d6; background:#f0f6f2; }
#page-messages .msg-dot { background:var(--brand); }

/* Order detail and payment confirmation */
#page-order-detail .page-content { padding-top:8px; padding-bottom:24px; }
#page-order-detail .checkout-item-header {
  display:grid;
  grid-template-columns:104px minmax(0, 1fr) auto;
  align-items:center;
  gap:12px;
  min-height:128px;
  padding:12px;
}
#page-order-detail .checkout-item-thumb {
  width:104px;
  height:104px;
  border-radius:17px;
  background:radial-gradient(circle at 50% 46%, #fff 0, #eef2ed 72%);
}
#page-order-detail .checkout-item-summary { min-width:0; align-self:center; }
#page-order-detail .checkout-item-brief { line-height:1.55; white-space:normal; }
#page-order-detail .checkout-item-price { align-self:center; color:var(--brand-dark); font-size:15px; font-weight:650; }
#page-order-detail .checkout-bead-detail { padding:0 12px 14px; }
#page-order-detail .bead-detail-table { margin-top:0; }
#page-order-detail .bead-detail-table th,
#page-order-detail .bead-detail-table td {
  padding:8px 7px;
  vertical-align:middle;
}
#page-order-detail .bead-detail-table th:last-child { text-align:right; }
#page-order-detail .bead-detail-table td:first-child { width:38%; }
#page-order-detail .bead-detail-name {
  display:flex;
  align-items:center;
  min-width:0;
  gap:10px;
}
#page-order-detail .bead-detail-name > span:last-child {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#page-order-detail .checkout-item-subtotal {
  margin-top:10px;
  padding:13px 2px 1px;
  border-top:1px solid var(--border);
  color:var(--text-secondary);
  font-size:13px;
  line-height:1.45;
}
#page-order-detail .checkout-item-subtotal strong {
  color:var(--brand-dark);
  font-size:15px;
}
.order-detail-status {
  margin:0 0 14px;
  padding:22px 16px 19px;
  border:1px solid #d6e3dc;
  border-radius:20px;
  background:linear-gradient(145deg,#f7faf7,#e8f1eb);
  box-shadow:none;
}
.order-detail-icon { color:#fff; background:var(--brand); box-shadow:none; }
.order-detail-status-eyebrow { color:#83948b; }
.order-detail-status-text { color:var(--brand-dark); }
.order-detail-status-sub { color:var(--text-secondary); }
.order-progress { color:var(--text-tertiary); }
.order-progress .is-active { color:var(--brand-dark); }
.order-progress i { background:#cbd8d1; }
.order-detail-card,
.order-detail-total { padding:15px; border-radius:16px; }
.order-detail-card .odc-title { color:var(--text-primary); }
.odc-row { color:var(--text-secondary); }
.odc-bead-price,
.order-detail-total .odt-price { color:var(--brand-dark); }
.order-status-value { font-weight:650; }
.order-status-value.status-pending { color:#8b6c4d; }
.order-status-value.status-making { color:var(--brand-dark); }
.order-status-value.status-shipped { color:#5d7780; }
.order-status-value.status-completed { color:#5e7868; }
.btn-copy-order-no { border-color:var(--border); color:var(--brand-dark); background:var(--surface-green); }
.confirm-overlay { background:rgba(24,35,32,.52); backdrop-filter:blur(4px); }
.confirm-modal { border:1px solid rgba(255,255,255,.7); border-radius:22px; }
.confirm-modal-kicker { color:#87968e; }
.confirm-order-status { color:var(--brand-dark); background:var(--surface-green); }
.confirm-order-status strong { color:var(--brand-dark); }
.confirm-addr { background:var(--surface-secondary); }
.confirm-item-price,
.confirm-modal-total { color:var(--brand-dark); }
.confirm-modal-actions button { min-height:46px; border-radius:14px; }

/* Gallery and shared sheets */
#page-gallery .gallery-grid { gap:11px; }
#page-gallery .gallery-card { overflow:hidden; }
.gallery-card-title { color:var(--text-primary); }
.gallery-card-author { line-height:1.45; }
.gallery-card-note { color:var(--brand-dark); }
.material-modal-backdrop,
.design-name-backdrop,
.privacy-backdrop { background:rgba(24,35,32,.48); }
.material-sheet,
.inspiration-sheet,
.wrist-sheet,
.design-limit-sheet,
.design-name-sheet,
.privacy-dialog {
  border:1px solid rgba(255,255,255,.72);
  background:var(--surface);
  box-shadow:0 -18px 48px rgba(31,44,40,.16);
}
.material-close,
.wrist-sheet-close { color:var(--brand-dark); background:var(--surface-green); }
.profile-avatar-upload { border-color:#cbdad2; color:var(--brand-dark); }
.privacy-actions button { background:var(--brand); }

/* Bottom navigation */
.tab-bar {
  height:62px;
  border-top:1px solid rgba(219,222,216,.9);
  background:rgba(255,255,255,.94);
  box-shadow:0 -8px 24px rgba(40,52,48,.055);
  backdrop-filter:blur(16px);
}
.tab-item { min-width:0; gap:3px; padding:5px 9px; color:#a4aaa5; font-size:10px; }
.tab-item.active { color:var(--brand); }
.tab-item svg { width:22px; height:22px; }
.cart-badge { background:var(--brand); }
.toast { border:1px solid rgba(255,255,255,.12); background:rgba(35,47,43,.92); box-shadow:0 10px 30px rgba(0,0,0,.16); }

@media (max-width:360px) {
  :root { --page-gutter:13px; }
  .page-header { padding-right:13px; padding-left:13px; }
  #page-order-detail .checkout-item-header { grid-template-columns:94px minmax(0, 1fr) auto; gap:9px; }
  #page-order-detail .checkout-item-thumb { width:94px; height:94px; }
  .checkout-reassurance-grid { gap:5px; }
  .gallery-detail-summary strong { font-size:14px; }
}

/* ===== 首页：沉浸首屏 + 悬浮创作入口 ===== */
#page-home {
  background:#f8f7f3;
}
#page-home .home-immersive-hero {
  position:relative;
  min-height:386px;
  overflow:hidden;
  color:#fff;
  background:
    linear-gradient(90deg, rgba(11,25,23,.9) 0%, rgba(14,30,28,.65) 45%, rgba(10,18,18,.12) 100%),
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.28)),
    url('../uploads/home-hero-creation-v2.png') right top / auto 100% no-repeat;
  background-color:#0b1917;
}
#page-home .home-header--overlay {
  position:relative;
  z-index:1;
  padding:20px var(--page-gutter) 0;
}
#page-home .home-header--overlay .brand-area { gap:10px; }
#page-home .home-header--overlay .brand-logo { background:rgba(255,255,255,.14); }
#page-home .home-header--overlay .brand-logo span { border-color:rgba(255,255,255,.78); background:#d7e5dd; }
#page-home .home-header--overlay .brand-logo span:nth-child(2) { background:#d6ad7a; }
#page-home .home-header--overlay .brand-logo span:nth-child(3) { background:#a9c4bc; }
#page-home .home-header--overlay .brand-name { color:#fff; }
#page-home .home-header--overlay .brand-slogan { color:rgba(255,255,255,.64); }
#page-home .home-header--overlay .home-profile-trigger {
  border-color:rgba(255,255,255,.22);
  color:#fff;
  background:rgba(255,255,255,.1);
  backdrop-filter:blur(8px);
}
.home-hero-copy {
  position:absolute;
  left:var(--page-gutter);
  bottom:77px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.home-hero-copy p {
  margin-bottom:9px;
  color:rgba(230,239,235,.8);
  font-size:10px;
  font-weight:600;
  letter-spacing:.14em;
}
.home-hero-copy h1 {
  color:#fff;
  font-size:29px;
  font-weight:650;
  line-height:1.27;
  letter-spacing:.015em;
  text-shadow:0 2px 18px rgba(0,0,0,.23);
}
.home-hero-copy > span {
  margin-top:12px;
  color:rgba(255,255,255,.72);
  font-size:12px;
  letter-spacing:.04em;
}
#page-home .home-sheet {
  position:relative;
  z-index:2;
  min-height:calc(100vh - 350px);
  margin-top:-36px;
  padding:67px 0 0;
  border-radius:28px 28px 0 0;
  background:var(--surface);
  box-shadow:0 -7px 20px rgba(22,37,34,.08);
}
.home-start-cta {
  position:absolute;
  top:-48px;
  left:50%;
  display:flex;
  width:96px;
  height:96px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:0;
  border:4px solid rgba(255,255,255,.92);
  border-radius:50%;
  color:#fff;
  background:var(--brand);
  box-shadow:0 10px 24px rgba(31,62,56,.28);
  font-family:inherit;
  transform:translateX(-50%);
  transition:transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.home-start-cta span {
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  letter-spacing:.1em;
  opacity:.9;
}
.home-start-cta strong {
  margin-top:3px;
  font-size:18px;
  font-weight:650;
  line-height:1.15;
  letter-spacing:.06em;
}
.home-start-cta i { position:absolute; right:15px; bottom:13px; font-size:13px; font-style:normal; opacity:.75; }
.home-start-cta:active { background:var(--brand-dark); box-shadow:0 6px 15px rgba(31,62,56,.24); transform:translateX(-50%) scale(.95); }
.home-start-cta:focus-visible { outline:3px solid #d9e9e1; outline-offset:3px; }
.home-shortcuts {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  max-width:390px;
  margin:0 auto;
  padding:0 16px 25px;
}
.home-shortcuts button {
  display:flex;
  min-height:48px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 2px;
  border:0;
  border-right:1px solid var(--border);
  color:var(--text-secondary);
  background:transparent;
  font-family:inherit;
}
.home-shortcuts button:last-child { border-right:0; }
.home-shortcuts b { color:#9bb6ac; font-size:9px; font-weight:700; letter-spacing:.04em; }
.home-shortcuts span { color:var(--text-primary); font-size:11px; font-weight:600; white-space:nowrap; }
.home-shortcuts button:active { opacity:.58; }
#page-home .home-sheet-content {
  /* 最后一排作品要能完整越过固定底部导航，作者与使用次数不能被遮住。 */
  padding:0 var(--page-gutter) calc(var(--tab-height) + var(--safe-bottom) + 30px);
}
.home-sheet-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin:0 0 12px;
}
.home-sheet-heading span { color:var(--text-primary); font-size:16px; font-weight:650; letter-spacing:.02em; }
.home-sheet-heading p { color:var(--text-tertiary); font-size:10px; }
#page-home .mood-row {
  gap:7px;
  padding:0 0 24px;
  overflow:visible;
}
#page-home .mood-row button { padding:8px 11px; }
#page-home .home-inspiration-rail {
  display:flex;
  gap:11px;
  margin:0 calc(-1 * var(--page-gutter)) 30px;
  padding:0 var(--page-gutter) 3px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-padding-left:var(--page-gutter);
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  cursor:grab;
  user-select:none;
}
#page-home .home-inspiration-rail::-webkit-scrollbar { display:none; }
#page-home .home-inspiration-rail.is-dragging { cursor:grabbing; scroll-snap-type:none; }
.home-inspiration-card {
  display:grid;
  flex:0 0 min(84%, 330px);
  min-height:142px;
  grid-template-columns:41% 59%;
  overflow:hidden;
  padding:0;
  border:1px solid var(--border);
  border-radius:18px;
  color:var(--text-primary);
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  scroll-snap-align:start;
  text-align:left;
  transition:transform .15s ease, box-shadow .15s ease;
}
.home-inspiration-card:active { box-shadow:none; transform:scale(.985); }
.home-inspiration-visual {
  display:grid;
  min-width:0;
  place-items:center;
  overflow:hidden;
  background:#edf0ea;
}
.home-inspiration-card--gentle .home-inspiration-visual { background:#f4eded; }
.home-inspiration-card--bright .home-inspiration-visual { background:#edf2f2; }
.home-inspiration-visual .mini-bracelet { transform:scale(.88); }
.home-inspiration-copy {
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  padding:14px 12px 13px;
}
.home-inspiration-copy small {
  overflow:hidden;
  color:#84978d;
  font-size:8px;
  font-weight:650;
  letter-spacing:.08em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.home-inspiration-card--gentle .home-inspiration-copy small { color:#a18484; }
.home-inspiration-card--bright .home-inspiration-copy small { color:#758f95; }
.home-inspiration-copy strong {
  overflow:hidden;
  margin-top:7px;
  font-size:16px;
  font-weight:650;
  letter-spacing:.01em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.home-inspiration-copy em {
  display:-webkit-box;
  margin-top:4px;
  overflow:hidden;
  color:var(--text-secondary);
  font-size:10px;
  font-style:normal;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.home-inspiration-copy b { margin-top:9px; color:var(--brand-dark); font-size:10px; font-weight:650; }
.home-inspiration-copy i { margin-left:3px; font-size:14px; font-style:normal; vertical-align:-1px; }
#page-home .section { margin:0 calc(-1 * var(--page-gutter)) 0; }
#page-home .section-header { padding:0 var(--page-gutter); }

@media (max-width:360px) {
  #page-home .home-immersive-hero { min-height:362px; }
  .home-hero-copy h1 { font-size:26px; }
  .home-shortcuts { padding-right:8px; padding-left:8px; }
  .home-shortcuts span { font-size:10px; }
}
