/* ==========================================================================
   拼豆图纸生成-i拼豆 - Sweet Kawaii Craft Studio (终极全端响应式系统)
   色彩体系：草莓果酱粉 (#FF5E7E) + 薰衣草紫 (#8B5CF6) + 香草奶油白 (#FAF8F5) + 暖可可棕 (#2D2321)
   完美适配：320px ~ 2560px 全屏幕尺寸 · iPhone 刘海屏与 Safe Area 深度适配 · 0 布局错位
   ========================================================================== */

:root {
  /* 甜系马卡龙色彩体系 */
  --primary: #FF5E7E;
  --primary-hover: #E84365;
  --primary-light: #FFF0F3;
  --primary-glow: rgba(255, 94, 126, 0.25);
  --primary-gradient: linear-gradient(135deg, #FF5E7E 0%, #FF85A1 100%);
  
  --secondary: #8B5CF6;
  --secondary-hover: #7C3AED;
  --secondary-light: #F5F3FF;
  --secondary-gradient: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);

  --accent-matcha: #10B981;
  --accent-matcha-light: #ECFDF5;
  --accent-butter: #F59E0B;
  --accent-butter-light: #FEF3C7;
  --accent-sky: #0EA5E9;
  --accent-sky-light: #E0F2FE;
  --accent-peach: #FB7185;

  /* 背景与柔和中性色 */
  --bg-page: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F4EFEA;
  --bg-elevated: #FFFFFF;
  --bg-dark: #231B1A;
  --bg-dark-card: #2E2422;

  --text-title: #2D2321;
  --text-body: #524340;
  --text-muted: #857470;
  --text-light: #B0A09C;

  --border-subtle: #EFE6DF;
  --border-medium: #DFD3CA;
  --border-bold: #2D2321;

  /* 软糖大圆角与柔光分层阴影体系 */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(45, 35, 33, 0.04);
  --shadow-card: 0 12px 34px -8px rgba(255, 94, 126, 0.08), 0 2px 8px rgba(45, 35, 33, 0.03);
  --shadow-hover: 0 20px 44px -10px rgba(255, 94, 126, 0.16), 0 4px 12px rgba(45, 35, 33, 0.05);
  --shadow-glow: 0 12px 28px -4px var(--primary-glow);

  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container-width: 1200px;

  /* 兼容与别名系统 */
  --bg-card: var(--bg-surface);
  --border-color: var(--border-subtle);
  --accent-green: var(--accent-matcha);
  --accent-yellow: var(--accent-butter);
  --accent-purple: var(--secondary);
  --accent-amber: var(--accent-butter);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(255, 94, 126, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(139, 92, 246, 0.04) 0%, transparent 40%),
    radial-gradient(#E8DFD8 1.2px, transparent 1.2px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
}

/* 移动端底部留白与 iPhone Home Indicator 安全边距 */
@media (max-width: 768px) {
  body {
    padding-bottom: max(76px, calc(76px + env(safe-area-inset-bottom, 0px)));
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

img, svg, video, canvas, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  max-width: 100%;
}

/* 容器与布局 */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.section {
  padding: 44px 0;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .section {
    padding: 84px 0;
  }
}

.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 32px;
  padding: 0 8px;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 56px;
  }
}

.section-tag, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  border: 1.5px solid rgba(255, 94, 126, 0.18);
  box-shadow: 0 2px 10px rgba(255, 94, 126, 0.15);
  max-width: 100%;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(255, 94, 126, 0.25);
}

.badge-secondary {
  background: var(--secondary-light);
  color: var(--secondary);
  border-color: rgba(139, 92, 246, 0.25);
}

.badge-warning {
  background: var(--accent-butter-light);
  color: #B45309;
  border-color: rgba(245, 158, 11, 0.25);
}

.badge-success {
  background: var(--accent-matcha-light);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.25);
}

.section-title {
  font-size: clamp(22px, 5.5vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-title);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.section-desc {
  font-size: clamp(14px, 3.6vw, 17px);
  color: var(--text-muted);
  line-height: 1.75;
  word-break: break-word;
}

/* 顶部导航栏 (Frosted Glass Header) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1.5px solid rgba(239, 230, 223, 0.85);
  transition: all 0.3s ease;
  width: 100%;
  padding-top: env(safe-area-inset-top, 0px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
  min-width: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .nav-wrap {
    height: 74px;
    gap: 20px;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.4px;
  color: var(--text-title);
  flex-shrink: 0;
  min-width: max-content;
  text-decoration: none;
}

@media (min-width: 768px) {
  .brand-logo {
    gap: 12px;
    font-size: 21px;
    letter-spacing: -0.6px;
  }
}

.brand-logo span {
  white-space: nowrap;
  display: inline-block;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(255, 94, 126, 0.25);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover .brand-icon {
  transform: scale(1.08) rotate(6deg);
}

@media (min-width: 768px) {
  .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
    gap: 14px;
  }
}

@media (min-width: 1200px) {
  .nav-menu {
    gap: 22px;
  }
}

.nav-link {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-body);
  position: relative;
  padding: 8px 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 1200px) {
  .nav-link {
    font-size: 15px;
    padding: 8px 0;
  }
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
}

/* 下拉菜单 (Dropdown Menu for Desktop) */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(45, 35, 33, 0.12), 0 2px 8px rgba(255, 94, 126, 0.08);
  min-width: 220px;
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-title);
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(3px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-actions .btn-primary {
  display: none;
}

@media (min-width: 768px) {
  .nav-actions .btn-primary {
    display: inline-flex;
  }
}

/* 按钮体系 (Soft Bouncy Candy Buttons & 全端自适应) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 800;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  touch-action: manipulation;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  min-height: 40px;
}

@media (min-width: 768px) {
  .btn {
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    min-height: 46px;
  }
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: 0 8px 20px -2px var(--primary-glow);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 32px -4px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-title);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--primary-light);
  border-color: rgba(255, 94, 126, 0.3);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.btn-pill {
  border-radius: var(--radius-full);
}

.btn-sm {
  padding: 6px 12px;
  font-size: clamp(11px, 3vw, 13px);
  min-height: 32px;
  gap: 4px;
}

@media (min-width: 768px) {
  .btn-sm {
    padding: 7px 16px;
    font-size: 13px;
    min-height: 36px;
  }
}

.btn-lg {
  padding: 12px 20px;
  font-size: clamp(14px, 3.8vw, 16px);
  min-height: 46px;
}

@media (min-width: 768px) {
  .btn-lg {
    padding: 16px 32px;
    font-size: 17px;
    min-height: 52px;
  }
}

.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  color: var(--text-title);
  touch-action: manipulation;
}

@media (min-width: 1024px) {
  .mobile-toggle {
    display: none;
  }
}

/* 移动端抽屉导航 (支持 100dvh 与弹性滚动) */
.mobile-drawer {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  background: rgba(250, 248, 245, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  padding: 16px 14px max(32px, env(safe-area-inset-bottom, 20px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-bottom: 2px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .mobile-drawer {
    top: 74px;
    height: calc(100vh - 74px);
    height: calc(100dvh - 74px);
    padding: 24px 24px max(36px, env(safe-area-inset-bottom, 24px));
    gap: 12px;
  }
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  font-size: 14px;
  font-weight: 800;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-title);
}

.mobile-drawer a:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(4px);
  background: var(--primary-light);
}

/* 英雄区 (Hero Section) */
.hero {
  padding: 20px 0 40px;
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .hero {
    padding: 50px 0 80px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.hero-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 16px;
  max-width: 100%;
}

@media (min-width: 768px) {
  .hero-badge {
    padding: 7px 16px;
    font-size: 13px;
    margin-bottom: 20px;
  }
}

.hero-badge span.dot {
  width: 8px;
  height: 8px;
  background: var(--accent-matcha);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(24px, 6.5vw, 48px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.6px;
  margin-bottom: 14px;
  color: var(--text-title);
  word-break: break-word;
}

.hero-title .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

.hero-desc {
  font-size: clamp(14px, 3.8vw, 17px);
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 24px;
  word-break: break-word;
}

@media (min-width: 768px) {
  .hero-desc {
    margin-bottom: 36px;
    max-width: 620px;
  }
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  width: 100%;
}

@media (min-width: 576px) {
  .hero-cta-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 36px;
  }
}

.hero-cta-group .btn {
  width: 100%;
}

@media (min-width: 576px) {
  .hero-cta-group .btn {
    width: auto;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 18px;
  border-top: 1.5px solid var(--border-subtle);
  text-align: center;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-stats {
    gap: 20px;
    padding-top: 32px;
    text-align: left;
  }
}

.stat-item {
  min-width: 0;
  overflow: hidden;
}

.stat-item h4 {
  font-size: clamp(17px, 4.5vw, 28px);
  font-weight: 900;
  color: var(--text-title);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-title) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.stat-item p {
  font-size: clamp(10px, 2.8vw, 13px);
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 现代工坊生成器卡片 */
.generator-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 12px;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .generator-card {
    border-radius: var(--radius-xl);
    padding: 28px;
  }
}

.generator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border-subtle);
  gap: 6px;
}

.generator-header h3 {
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .generator-header h3 {
    font-size: 19px;
    gap: 8px;
  }
}

.generator-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 576px) {
  .generator-controls {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
  }
}

.control-group label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-select, .control-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-title);
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

select.control-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857470' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
}

.control-select:focus, .control-input:focus {
  border-color: var(--primary);
  background: #FFF;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.canvas-preview-box {
  background: #EFE9E2;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-image: 
    radial-gradient(#D8CDC2 22%, transparent 22%),
    radial-gradient(#D8CDC2 22%, transparent 22%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
  box-shadow: inset 0 2px 8px rgba(45,35,33,0.06);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .canvas-preview-box {
    padding: 20px;
    min-height: 290px;
  }
}

.canvas-preview-box canvas {
  max-width: 100%;
  height: auto;
  max-height: 240px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(45,35,33,0.18);
  image-rendering: pixelated;
  display: block;
}

@media (min-width: 768px) {
  .canvas-preview-box canvas {
    max-height: 320px;
  }
}

.preset-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.preset-selector::-webkit-scrollbar {
  display: none;
}

.preset-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-body);
  white-space: nowrap;
}

.preset-chip.active, .preset-chip:hover {
  background: var(--primary-gradient);
  color: #FFF;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-2px);
}

.palette-stat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-title);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .palette-stat-bar {
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 16px;
  }
}

/* 核心特性与优势网格 (Feature Grid System) */
.hero-content {
  min-width: 0;
  width: 100%;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.feature-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (min-width: 768px) {
  .feature-card {
    border-radius: var(--radius-xl);
    padding: 28px 24px;
  }
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 94, 126, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.feature-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-title);
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

@media (min-width: 768px) {
  .feature-title {
    font-size: 19px;
    margin-bottom: 10px;
  }
}

.feature-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .feature-text {
    font-size: 14.5px;
  }
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.bento-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (min-width: 768px) {
  .bento-card {
    border-radius: var(--radius-xl);
    padding: 34px 28px;
  }
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 94, 126, 0.3);
}

.bento-card.highlight {
  background: linear-gradient(180deg, #FFF0F3 0%, #FFFFFF 100%);
  border-color: rgba(255, 94, 126, 0.25);
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.bento-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-title);
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

@media (min-width: 768px) {
  .bento-title {
    font-size: 20px;
    margin-bottom: 10px;
  }
}

.bento-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .bento-desc {
    font-size: 14.5px;
  }
}

/* 图纸卡片网格 (双列等高严密对齐) */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .pattern-grid {
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .pattern-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1024px) {
  .pattern-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
  }
}

.pattern-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@media (min-width: 768px) {
  .pattern-card {
    border-radius: var(--radius-lg);
  }
}

.pattern-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 94, 126, 0.35);
}

.pattern-thumb-wrap {
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #FAF8F5 0%, #FFF0F3 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

@media (min-width: 768px) {
  .pattern-thumb-wrap {
    padding: 16px;
  }
}

.pattern-thumb-wrap img.pattern-img-real {
  width: 85%;
  height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(45,35,33,0.08));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  image-rendering: pixelated;
}

.pattern-card:hover .pattern-thumb-wrap img.pattern-img-real {
  transform: scale(1.1) rotate(3deg);
  filter: drop-shadow(0 10px 22px rgba(255,94,126,0.2));
}

.pattern-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(45, 35, 33, 0.85);
  color: #FFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .pattern-badge {
    top: 10px;
    left: 10px;
    font-size: 11px;
    padding: 3px 9px;
  }
}

.cute-badge-float {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  border: 1px solid rgba(255, 94, 126, 0.2);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .cute-badge-float {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 3px 9px;
  }
}

.pattern-body {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

@media (min-width: 768px) {
  .pattern-body {
    padding: 18px 16px;
  }
}

.pattern-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-title);
  margin-bottom: 6px;
  line-height: 1.35;
  word-break: break-word;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .pattern-title {
    font-size: 15px;
    margin-bottom: 8px;
  }
}

.pattern-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.meta-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .meta-chip {
    font-size: 11px;
    padding: 3px 8px;
  }
}

.pattern-btn {
  margin-top: auto;
  width: 100%;
  padding: 7px 4px;
  font-size: 11px;
  border-radius: var(--radius-full);
}

@media (min-width: 768px) {
  .pattern-btn {
    padding: 9px 12px;
    font-size: 13px;
  }
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 36px;
  width: 100%;
}

@media (min-width: 640px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 56px;
  }
}

.article-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 94, 126, 0.35);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 992px) {
  .article-layout {
    grid-template-columns: 1fr 320px;
    gap: 44px;
  }
}

.article-content {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 14px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

@media (min-width: 768px) {
  .article-content {
    border-radius: var(--radius-xl);
    padding: 48px 40px;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.article-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
  }
}

.article-header h1 {
  font-size: clamp(20px, 5vw, 36px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-title);
  word-break: break-word;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

@media (min-width: 768px) {
  .article-meta-bar {
    gap: 16px;
    font-size: 13.5px;
  }
}

.article-body {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-body);
  word-break: break-word;
}

@media (min-width: 768px) {
  .article-body {
    font-size: 16.5px;
  }
}

.article-body h2 {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 900;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border-subtle);
  color: var(--text-title);
}

.article-body h3 {
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 900;
  margin: 22px 0 10px;
  color: var(--text-title);
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul, .article-body ol {
  margin-bottom: 18px;
  padding-left: 18px;
}

.article-body li {
  margin-bottom: 8px;
}

.callout-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13.5px;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .callout-box {
    border-left-width: 5px;
    padding: 20px 22px;
    font-size: 15.5px;
  }
}

.callout-box.warning {
  background: var(--accent-butter-light);
  border-left-color: var(--accent-butter);
}

.callout-box.tip {
  background: var(--accent-matcha-light);
  border-left-color: var(--accent-matcha);
}

.step-card {
  background: var(--bg-page);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .step-card {
    padding: 22px;
    margin-bottom: 20px;
  }
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary-gradient);
  color: #FFF;
  font-weight: 900;
  font-size: 12px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 4px 10px var(--primary-glow);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 14px;
    margin-right: 10px;
  }
}

/* 侧边栏 */
.sidebar-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .sidebar-sticky {
    top: 96px;
    gap: 24px;
  }
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 14px;
}

@media (min-width: 768px) {
  .sidebar-card {
    padding: 24px 20px;
  }
}

.sidebar-card h3 {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border-subtle);
  color: var(--text-title);
}

.qr-promo-card {
  text-align: center;
  background: linear-gradient(180deg, #FFF0F3 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(255, 94, 126, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 14px;
}

@media (min-width: 768px) {
  .qr-promo-card {
    border-radius: var(--radius-xl);
    padding: 28px 20px;
  }
}

.qr-promo-card img.qr-img {
  width: 140px;
  height: 140px;
  margin: 12px auto;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 16px rgba(45,35,33,0.08);
}

@media (min-width: 768px) {
  .qr-promo-card img.qr-img {
    width: 170px;
    height: 170px;
    margin: 16px auto;
  }
}

/* 色号对照查询器 */
.color-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  width: 100%;
}

@media (min-width: 768px) {
  .color-search-box {
    gap: 14px;
    margin-bottom: 28px;
  }
}

.color-search-input {
  flex-grow: 1;
  padding: 10px 14px;
  font-size: 13.5px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
  min-width: 0;
}

@media (min-width: 768px) {
  .color-search-input {
    padding: 14px 22px;
    font-size: 16px;
  }
}

.color-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  width: 100%;
}

@media (min-width: 768px) {
  .color-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
  }
}

.color-tile {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 0;
}

@media (min-width: 768px) {
  .color-tile {
    border-radius: var(--radius-md);
    padding: 12px;
  }
}

.color-tile:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.color-swatch {
  width: 100%;
  height: 36px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(45,35,33,0.08);
  margin-bottom: 6px;
  box-shadow: inset 0 1px 3px rgba(45,35,33,0.1);
}

@media (min-width: 768px) {
  .color-swatch {
    height: 50px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
  }
}

.color-code {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--text-title);
}

@media (min-width: 768px) {
  .color-code {
    font-size: 13.5px;
  }
}

.color-name {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

@media (min-width: 768px) {
  .color-name {
    font-size: 11.5px;
  }
}

/* 竞品评测表格 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  background: var(--bg-surface);
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .table-wrap {
    margin: 28px 0;
    border-radius: var(--radius-lg);
  }
}

.comparison-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

@media (min-width: 768px) {
  .comparison-table {
    font-size: 14.5px;
  }
}

.comparison-table th, .comparison-table td {
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .comparison-table th, .comparison-table td {
    padding: 14px 18px;
  }
}

.comparison-table th {
  background: var(--bg-subtle);
  font-weight: 900;
  color: var(--text-title);
  white-space: nowrap;
}

.comparison-table tr.highlight-row {
  background: #FFF0F3;
  font-weight: 800;
}

.check-icon {
  color: var(--accent-matcha);
  font-weight: 900;
}

.cross-icon {
  color: #EF4444;
  font-weight: 900;
}

/* FAQ 手风琴 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

@media (min-width: 768px) {
  .faq-list {
    gap: 14px;
  }
}

.faq-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 800;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: var(--text-title);
}

@media (min-width: 768px) {
  .faq-question {
    padding: 18px 22px;
    font-size: 16px;
  }
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.75;
  display: none;
}

@media (min-width: 768px) {
  .faq-answer {
    padding: 0 22px 18px;
    font-size: 14.5px;
    line-height: 1.8;
  }
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.25s ease;
  font-size: 11px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* 微信小程序弹窗 */
.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 27, 26, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.qr-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal-dialog {
  background: var(--bg-surface);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(45, 35, 33, 0.35);
  width: 100%;
  max-width: min(380px, calc(100vw - 28px));
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 14px;
  text-align: center;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .qr-modal-dialog {
    border-radius: var(--radius-xl);
    max-width: 440px;
    padding: 34px 26px;
    max-height: 90vh;
    max-height: 90dvh;
  }
}

.qr-modal-dialog h3 {
  font-size: clamp(16px, 4.5vw, 22px);
  line-height: 1.35;
  word-break: break-word;
}

.qr-modal-dialog p {
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1.5;
  word-break: break-word;
}

.qr-modal-dialog .modal-qr-img {
  width: min(170px, 48vw);
  height: auto;
  aspect-ratio: 1/1;
}

.qr-modal-dialog .btn {
  width: 100%;
  font-size: clamp(12px, 3.4vw, 14px);
  padding: 10px 12px;
  line-height: 1.4;
}

.qr-modal-backdrop.open .qr-modal-dialog {
  transform: scale(1);
}

.qr-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-title);
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .qr-close-btn {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
}

.qr-close-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: rotate(90deg);
}

.modal-qr-img {
  width: 170px;
  height: 170px;
  margin: 12px auto;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(45,35,33,0.1);
  display: block;
}

@media (min-width: 768px) {
  .modal-qr-img {
    width: 210px;
    height: 210px;
    margin: 16px auto;
    border-radius: var(--radius-lg);
  }
}

/* 移动端吸底栏 */
.mobile-bottom-bar {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--border-subtle);
  padding: 8px 12px max(8px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 20px rgba(45,35,33,0.06);
}

@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none;
  }
}

.bottom-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.bottom-bar-info img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(255,94,126,0.2);
  flex-shrink: 0;
}

.bottom-bar-info h4 {
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-bar-info p {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 页脚 */
.site-footer {
  margin-top: auto;
  background: var(--bg-dark);
  color: #D6C7C4;
  padding: 44px 0 28px;
  border-top: 1.5px solid #382B29;
  width: 100%;
}

@media (min-width: 768px) {
  .site-footer {
    padding: 68px 0 44px;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 44px;
    margin-bottom: 52px;
  }
}

.footer-brand h3 {
  color: #FFF;
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 10px;
}

@media (min-width: 768px) {
  .footer-brand h3 {
    font-size: 22px;
    margin-bottom: 14px;
  }
}

.footer-brand p {
  font-size: 13px;
  color: #B5A4A1;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    max-width: 360px;
  }
}

.footer-col h4 {
  color: #FFF;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .footer-col h4 {
    font-size: 15px;
    margin-bottom: 18px;
  }
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

@media (min-width: 768px) {
  .footer-links {
    gap: 12px;
  }
}

.footer-links a {
  color: #B5A4A1;
  font-size: 12.5px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .footer-links a {
    font-size: 14px;
  }
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: #8C7B78;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    padding-top: 26px;
    gap: 16px;
    font-size: 13px;
    text-align: left;
  }
}

/* Toast 提示 */
.toast-msg {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-dark);
  color: #FFF;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 800;
  z-index: 2000;
  box-shadow: 0 12px 32px rgba(45,35,33,0.3);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* 按钮自适应组通用类 */
.btn-group-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* 针对 <=480px 小屏手机的响应式精细优化 */
@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .section {
    padding: 28px 0;
  }

  .hero-stats {
    gap: 4px;
  }

  .generator-card {
    padding: 14px 10px;
  }

  .pattern-grid {
    gap: 8px;
  }

  .pattern-card .pattern-body {
    padding: 8px 6px;
  }

  .meta-chip {
    font-size: 9px;
    padding: 1.5px 5px;
  }

  .pattern-title {
    font-size: 12.5px;
  }

  .bottom-bar-inner {
    gap: 6px;
  }

  .bottom-bar-info img {
    width: 32px;
    height: 32px;
  }

  .bottom-bar-info h4 {
    font-size: 12.5px;
  }

  .bottom-bar-info p {
    font-size: 10px;
  }
}

/* 针对 <=340px 极小屏 (iPhone SE 1st gen) 保护 */
@media (max-width: 340px) {
  .brand-logo {
    font-size: 13.5px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .pattern-grid {
    grid-template-columns: 1fr;
  }
}

