:root {
  --brand: #00b578;
  --brand-dark: #009965;
  --brand-light: #e8f8f2;
  --accent: #ff6a00;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #5c626b;
  --text-3: #8c95a3;
  --border: #e6eaf0;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00c482, #009a68);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 181, 120, 0.28);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-3);
}

/* 搜索框 */
.search-wrap {
  flex: 1;
  max-width: 660px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f2f4f8;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 3px 4px 3px 16px;
  transition: all 0.2s;
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 181, 120, 0.1);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-3);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 8px 10px;
  color: var(--text);
}

.search-clear {
  border: none;
  background: #dce1e8;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  margin-right: 6px;
}

.search-btn {
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-btn:hover {
  background: var(--brand-dark);
}

.hot-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-left: 14px;
  font-size: 12px;
}

.hot-label {
  color: var(--text-3);
}

.hot-tag {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
}

.hot-tag:hover {
  color: var(--brand);
  background: var(--brand-light);
}

/* 右侧按钮 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-outline {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d5f3e7;
  background: linear-gradient(135deg, #edfcf6, #e6f4ff);
  color: #0b6e4f;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 181, 120, 0.16);
}

.ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.badge-soon {
  font-size: 10px;
  background: var(--brand);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
}

/* 分类标签栏 */
.category-bar {
  border-top: 1px solid #f0f2f5;
  background: #fff;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 6px;
  padding-bottom: 6px;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.cat-tab:hover {
  background: #f3f6f9;
  color: var(--text);
}

.cat-tab.active {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
}

.cat-count {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-3);
  padding: 1px 6px;
  border-radius: 999px;
}

.cat-tab.active .cat-count {
  background: var(--brand);
  color: #fff;
}

/* 信任保障条 */
.trust-bar {
  background: linear-gradient(90deg, #effaf5, #f4f8ff);
  border-bottom: 1px solid #e4efe9;
}

.trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12px;
}

.trust-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: #166549;
  font-weight: 500;
}

.trust-tip {
  color: var(--text-2);
}

/* 主内容区 */
.main-content {
  padding-top: 18px;
  padding-bottom: 48px;
}

/* 多维筛选面板 */
.filter-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 7px 0;
}

.filter-row + .filter-row {
  border-top: 1px dashed #eef1f5;
}

.filter-label {
  width: 44px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  padding-top: 4px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  background: #f2f5f8;
  color: var(--text);
}

.filter-pill.active {
  background: var(--brand-light);
  border-color: #a9e6cf;
  color: var(--brand-dark);
  font-weight: 600;
}

.color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  display: inline-block;
}

/* 工具条 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.result-count {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #c5eadc;
  color: var(--brand-dark);
  padding: 2px 8px;
  border-radius: 999px;
}

.active-chip button {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-wrap {
  font-size: 13px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort-wrap select {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 6px;
  outline: none;
}

.btn-reset-all {
  border: none;
  background: transparent;
  color: var(--brand-dark);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* 模板网格 */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.tpl-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tpl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #bfead9;
}

.tpl-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eef1f5;
  overflow: hidden;
  cursor: pointer;
}

.tpl-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.tpl-card:hover .tpl-thumb-wrap img {
  transform: scale(1.04);
}

.tpl-badge-code {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.tpl-badge-pages {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
}

.tpl-hover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.12) 55%, transparent 100%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  transition: opacity 0.2s;
}

.tpl-card:hover .tpl-hover-mask {
  opacity: 1;
}

.mask-btn-preview {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.mask-btn-select {
  flex: 1;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.mask-btn-select:hover {
  background: var(--brand-dark);
}

.tpl-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tpl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.tpl-title:hover {
  color: var(--brand-dark);
}

.tpl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tpl-tag {
  font-size: 11px;
  color: var(--text-2);
  background: #f3f5f8;
  padding: 2px 7px;
  border-radius: 4px;
}

.tpl-foot {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #f2f4f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tpl-meta-cat {
  font-size: 12px;
  color: var(--text-3);
}

.tpl-copy-mini {
  border: 1px solid #c9ecde;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.tpl-copy-mini:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* 空状态 */
.empty-state {
  background: #fff;
  border: 1px dashed #d5dce6;
  border-radius: var(--radius);
  text-align: center;
  padding: 56px 24px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto 20px;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 18px 0;
  font-size: 12px;
  color: var(--text-3);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-sep {
  margin: 0 8px;
}

/* 弹窗通用 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  max-height: 92vh;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(15, 23, 42, 0.16);
}

/* 详情预览弹窗 */
.preview-dialog {
  width: min(1160px, 100%);
  height: min(760px, 90vh);
}

.preview-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  height: 100%;
}

.preview-left {
  background: #14181f;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stage-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 56px;
  overflow: hidden;
}

.stage-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.stage-watermark {
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-prev { left: 12px; }
.nav-next { right: 12px; }

.page-indicator {
  position: absolute;
  bottom: 14px;
  right: 16px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
}

.thumb-strip {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #0d1016;
  overflow-x: auto;
  flex-shrink: 0;
}

.thumb-item {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.65;
  transition: all 0.15s;
}

.thumb-item.active,
.thumb-item:hover {
  opacity: 1;
  border-color: var(--brand);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-right {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 32px;
}

.detail-code {
  background: #1f2329;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.detail-cat {
  font-size: 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.detail-title {
  font-size: 18px;
  line-height: 1.35;
}

.detail-desc {
  font-size: 13px;
  color: var(--text-2);
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f7f9fb;
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
}

.spec-item span {
  color: var(--text-3);
  display: block;
}

.spec-item strong {
  color: var(--text);
  font-weight: 600;
}

.detail-pricing {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pricing-from {
  color: var(--accent);
  font-size: 16px;
}

.sku-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}

.sku-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
}

.sku-row strong {
  color: var(--text);
}

.detail-guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: #166549;
}

.detail-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-lg {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
}

.btn-ai-secondary {
  width: 100%;
  border: 1px dashed #a8e4ce;
  background: #f3fcf8;
  color: #0b6e4f;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-ai-secondary:hover {
  background: #e5f8f0;
}

/* 小弹窗 */
.small-dialog {
  width: min(480px, 100%);
  padding: 26px;
}

.small-dialog h3 {
  font-size: 18px;
  margin-bottom: 14px;
}

.guide-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.guide-steps li strong {
  display: block;
  font-size: 14px;
  color: var(--brand-dark);
  margin-bottom: 3px;
}

.guide-steps li p {
  font-size: 13px;
  color: var(--text-2);
}

.guide-note {
  font-size: 12px;
  color: var(--text-2);
  background: #f5f7fa;
  padding: 10px 12px;
  border-radius: 8px;
}

.ai-badge-title {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-light);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.ai-intro {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.ai-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  max-width: 90vw;
  text-align: center;
}

/* 响应式 & 手机浏览器深度适配 */
@media (hover: none) {
  .tpl-hover-mask {
    display: none;
  }
  .tpl-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .tpl-card:hover .tpl-thumb-wrap img {
    transform: none;
  }
}

@media (max-width: 1120px) {
  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .container {
    padding: 0 12px;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 8px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 8px;
  }
  .brand-name {
    font-size: 16px;
  }
  .brand-sub {
    display: none;
  }
  .header-actions {
    margin-left: auto;
    gap: 6px;
  }
  .btn-outline,
  .btn-ai {
    font-size: 12px;
    padding: 6px 10px;
  }
  .badge-soon {
    display: none;
  }
  .search-wrap {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .search-box {
    padding: 2px 3px 2px 12px;
  }
  .search-box input {
    font-size: 13px;
    padding: 7px 8px;
  }
  .search-btn {
    font-size: 13px;
    padding: 7px 14px;
  }
  .hot-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-left: 4px;
    white-space: nowrap;
  }
  .hot-tags::-webkit-scrollbar {
    display: none;
  }
  .cat-tab {
    font-size: 13px;
    padding: 6px 12px;
  }
  .trust-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .trust-inner::-webkit-scrollbar {
    display: none;
  }
  .trust-items {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 14px;
    font-size: 11px;
  }
  .trust-tip {
    display: none;
  }
  .main-content {
    padding-top: 12px;
    padding-bottom: 32px;
  }
  .filter-panel {
    padding: 10px 12px;
    margin-bottom: 12px;
  }
  .filter-row {
    align-items: center;
    gap: 10px;
    padding: 5px 0;
  }
  .filter-label {
    width: 34px;
    font-size: 12px;
    padding-top: 0;
  }
  .filter-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }
  .filter-options::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    white-space: nowrap;
    font-size: 12px;
    padding: 4px 10px;
    flex-shrink: 0;
  }
  .toolbar {
    margin-bottom: 12px;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .tpl-hover-mask {
    display: none;
  }
  .tpl-badge-code {
    top: 6px;
    left: 6px;
    font-size: 10px;
    padding: 2px 6px;
  }
  .tpl-badge-pages {
    top: 6px;
    right: 6px;
    font-size: 10px;
    padding: 2px 5px;
  }
  .tpl-body {
    padding: 9px 10px 10px;
    gap: 6px;
  }
  .tpl-title {
    font-size: 13px;
  }
  .tpl-tags {
    gap: 4px;
  }
  .tpl-tag {
    font-size: 10px;
    padding: 1px 5px;
  }
  .tpl-copy-mini {
    font-size: 11px;
    padding: 4px 8px;
  }
  /* 手机端全屏预览弹窗 */
  .modal-backdrop {
    padding: 0;
  }
  .preview-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .preview-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 48% 52%;
  }
  .modal-close {
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }
  .stage-wrap {
    padding: 14px 12px;
  }
  .nav-arrow {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }
  .thumb-strip {
    padding: 8px 10px;
  }
  .thumb-item {
    width: 58px;
    height: 44px;
  }
  .preview-right {
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .detail-title {
    font-size: 16px;
  }
  .small-dialog {
    width: calc(100% - 28px);
    padding: 20px;
    border-radius: 14px;
  }
  .small-dialog .modal-close {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text);
    top: 12px;
  }
}
