:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-muted: #fafafb;
  --text: #1d1d1f;
  --text-secondary: #424245;
  --text-tertiary: #6e6e73;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-pill: 999px;
  --container: 980px;
  --container-narrow: 720px;
  --header-height: 72px;
  --transition: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
}

textarea {
  resize: vertical;
}

::selection {
  background: rgba(37, 99, 235, 0.16);
}

.hidden {
  display: none !important;
}

.container,
.narrow-container {
  width: 100%;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container {
  max-width: calc(var(--container) + 48px);
}

.narrow-container {
  max-width: calc(var(--container-narrow) + 48px);
}

.main-content {
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: 80px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grid-2,
.grid-3,
.showcase-grid,
.admin-stat-grid,
.upload-dual,
.progress-steps,
.rating-pills,
.template-tags,
.template-actions,
.hero-actions,
.trust-strip,
.file-list,
.chip-group {
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.header-inner {
  height: 100%;
  max-width: calc(var(--container) + 48px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 70%, #60a5fa 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.segment-btn,
.chip-btn,
.rating-pill,
.thumb-item,
.admin-task-item,
.btn,
.nav-cta {
  -webkit-tap-highlight-color: transparent;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-soft);
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.nav-cta:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.hero {
  padding: 32px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-title {
  margin: 0;
  max-width: 840px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.hero-desc {
  margin: 0;
  max-width: 760px;
  color: var(--text-tertiary);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
}

.segment-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.segment-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.segment-btn:hover {
  color: var(--text);
}

.segment-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.showcase-card,
.template-card,
.card,
.download-hero,
.checklist-box,
.preview-box,
.feedback-card,
.admin-stat-card,
.admin-panel,
.token-banner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.showcase-card,
.template-card,
.card,
.download-hero,
.feedback-card,
.admin-panel {
  padding: 22px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.thumb-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.thumb-strip::-webkit-scrollbar {
  height: 6px;
}

.thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}

.thumb-item {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-soft);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.thumb-item:hover,
.thumb-item.active {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow-sm);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox.active {
  display: flex;
}

.lightbox img,
.lightbox video {
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.lightbox .close-btn,
.lightbox .prev-btn,
.lightbox .next-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), transform var(--transition);
}

.lightbox .close-btn:hover,
.lightbox .prev-btn:hover,
.lightbox .next-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.lightbox .close-btn {
  top: 20px;
  right: 20px;
}

.lightbox .prev-btn {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .next-btn {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .prev-btn:hover,
.lightbox .next-btn:hover {
  transform: translateY(-50%) scale(1.02);
}

.template-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.input,
.select,
.textarea,
.file-tag-select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
}

.textarea {
  min-height: 120px;
}

.input::placeholder,
.textarea::placeholder {
  color: #8e8e93;
}

.input:focus,
.select:focus,
.textarea:focus,
.file-tag-select:focus {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-btn,
.rating-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.chip-btn:hover,
.rating-pill:hover {
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--text);
}

.chip-btn.active,
.rating-pill.active {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--primary);
}

.upload-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.file-row > * {
  min-width: 0;
}

.file-tag-select {
  max-width: 180px;
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 16px;
  background-color: #fff;
}

.details-fold {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  overflow: hidden;
}

.details-fold summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.details-fold summary::-webkit-details-marker {
  display: none;
}

.details-fold[open] summary {
  border-bottom: 1px solid var(--border);
}

.details-fold > *:not(summary) {
  padding: 16px;
}

.token-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
}

.token-code {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.progress-step {
  position: relative;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 600;
}

.progress-step.done {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.16);
  color: var(--success);
}

.progress-step.current {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--primary);
}

.download-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checklist-box,
.preview-box {
  padding: 20px;
  background: var(--bg-muted);
}

.feedback-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rating-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
}

.notice-info {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.14);
  color: var(--primary);
}

.notice-warn {
  background: var(--warning-soft);
  border-color: rgba(217, 119, 6, 0.14);
  color: var(--warning);
}

.notice-danger {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.14);
  color: var(--danger);
}

.notice-success {
  background: var(--success-soft);
  border-color: rgba(22, 163, 74, 0.14);
  color: var(--success);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-received {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.badge-processing {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.badge-need_more {
  background: rgba(234, 179, 8, 0.14);
  color: #a16207;
}

.badge-completed {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.badge-failed {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #000;
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-lg {
  min-height: 52px;
  padding: 0 20px;
  font-size: 15px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 300;
  max-width: min(92vw, 560px);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.admin-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.admin-task-item:hover,
.admin-task-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-stat-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-panel {
  min-width: 0;
}

.mobile-sticky-cta {
  display: none;
}

.mobile-sticky-cta .btn {
  width: 100%;
}

:is(.showcase-card, .template-card, .card, .download-hero, .feedback-card, .admin-panel, .admin-stat-card, .checklist-box, .preview-box) > * {
  min-width: 0;
}

@media (max-width: 780px) {
  .container,
  .narrow-container,
  .header-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .main-content {
    padding-top: calc(var(--header-height) + 18px);
    padding-bottom: 96px;
  }

  .grid-2,
  .grid-3,
  .showcase-grid,
  .download-hero,
  .admin-stat-grid,
  .upload-dual,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    gap: 18px;
  }

  .admin-sidebar {
    position: static;
  }

  .progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-inner {
    gap: 12px;
  }

  .main-nav {
    gap: 6px;
  }

  .nav-link {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .nav-cta {
    min-height: 40px;
    padding: 0 14px;
  }

  .showcase-card,
  .template-card,
  .card,
  .download-hero,
  .feedback-card,
  .admin-panel {
    padding: 18px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox .close-btn {
    top: 14px;
    right: 14px;
  }

  .lightbox .prev-btn {
    left: 10px;
  }

  .lightbox .next-btn {
    right: 10px;
  }
}

@media (max-width: 720px) {
  .mobile-sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.88);
    border-top: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }
}

@media (max-width: 520px) {
  :root {
    --header-height: 64px;
  }

  .container,
  .narrow-container,
  .header-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .hero {
    padding-top: 22px;
    gap: 16px;
  }

  .hero-title {
    font-size: clamp(28px, 9vw, 38px);
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-actions,
  .template-actions,
  .trust-strip,
  .chip-group,
  .rating-pills {
    gap: 10px;
  }

  .segment-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .segment-btn {
    flex: 1 1 auto;
  }

  .thumb-item {
    width: 72px;
    height: 72px;
  }

  .token-banner {
    padding: 16px;
  }

  .progress-steps {
    grid-template-columns: 1fr;
  }

  .file-row {
    flex-direction: column;
    align-items: stretch;
  }

  .file-tag-select {
    max-width: none;
  }

  .btn,
  .nav-cta {
    width: 100%;
  }

  .hero-actions .btn,
  .template-actions .btn,
  .upload-dual .btn,
  .token-banner .btn {
    width: 100%;
  }

  .main-nav {
    display: none;
  }

  .site-header {
    height: auto;
    min-height: var(--header-height);
  }

  .header-inner {
    min-height: var(--header-height);
  }

  .showcase-card,
  .template-card,
  .card,
  .download-hero,
  .feedback-card,
  .admin-panel,
  .admin-stat-card,
  .checklist-box,
  .preview-box {
    border-radius: 18px;
  }

  .toast {
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}

/* ==========================================================================
   公开站组件桥接样式（对齐 app.js 语义类名，极简苹果风）
   ========================================================================== */
.page { width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 24px 64px; }
.section { margin-top: 48px; }
.section-head { margin-bottom: 20px; }
.section-head h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.section-head h2 { font-size: clamp(21px, 3vw, 26px); font-weight: 700; letter-spacing: -0.015em; margin-bottom: 6px; }
.section-head p { color: #6E6E73; font-size: 15px; }

.hero-card { background: #F5F5F7; border-radius: 24px; padding: 48px 28px; text-align: center; border: 1px solid rgba(0,0,0,0.06); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: #2563EB; background: rgba(37,99,235,0.08); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero-content h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: #1D1D1F; margin-bottom: 14px; }
.hero-subtitle { font-size: 16px; color: #424245; max-width: 620px; margin: 0 auto 24px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 20px; }
.trust-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: all 0.16s ease; white-space: nowrap; }
.button-primary { background: #2563EB; color: #FFFFFF; }
.button-primary:hover { background: #1D4ED8; }
.button-secondary { background: #FFFFFF; color: #1D1D1F; border-color: rgba(0,0,0,0.14); }
.button-secondary:hover { background: #F5F5F7; border-color: rgba(0,0,0,0.24); }
.button-text { background: transparent; color: #2563EB; padding: 0 10px; min-height: 36px; }
.button-block { width: 100%; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip, .chip-select { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.12); background: #FFFFFF; color: #1D1D1F; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; }
.chip:hover, .chip-select:hover { border-color: #2563EB; color: #2563EB; }
.chip.is-active, .chip-select.is-active { background: #2563EB; border-color: #2563EB; color: #FFFFFF; }
.chip-select input { display: none; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: #F5F5F7; color: #424245; border: 1px solid rgba(0,0,0,0.06); }

.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.showcase-card { background: #FFFFFF; border: 1px solid rgba(0,0,0,0.08); border-radius: 18px; padding: 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.04); display: flex; flex-direction: column; gap: 12px; }
.showcase-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.showcase-card-head h3 { font-size: 16px; font-weight: 600; color: #1D1D1F; line-height: 1.4; }
.showcase-card-head p { font-size: 13px; color: #6E6E73; margin-top: 2px; }
.showcase-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.showcase-image { display: flex; flex-direction: column; gap: 6px; padding: 6px; background: #F5F5F7; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; cursor: pointer; text-align: center; transition: transform 0.15s ease, border-color 0.15s ease; }
.showcase-image:hover { border-color: #2563EB; transform: translateY(-2px); }
.showcase-image img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; background: #FFFFFF; }
.showcase-image span { font-size: 12px; color: #424245; }
.showcase-desc { font-size: 13.5px; color: #424245; line-height: 1.55; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step-card { background: #F5F5F7; border-radius: 16px; padding: 20px; border: 1px solid rgba(0,0,0,0.06); }
.step-index { width: 30px; height: 30px; border-radius: 999px; background: #2563EB; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.step-card h3 { font-size: 16px; margin-bottom: 6px; }
.step-card p { font-size: 14px; color: #424245; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-list details, .card details { background: #FFFFFF; border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; padding: 14px 18px; }
.faq-list summary, details summary { cursor: pointer; font-weight: 600; font-size: 15px; color: #1D1D1F; }
.details-body { margin-top: 12px; font-size: 14px; color: #424245; line-height: 1.65; }

.templates-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.template-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.template-card-head h3 { font-size: 17px; font-weight: 600; }
.template-card-head p { font-size: 13px; color: #6E6E73; margin-top: 2px; }
.template-desc { font-size: 14px; color: #424245; line-height: 1.55; }
.template-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }

.selected-template-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.22); color: #1D4ED8; font-weight: 500; margin-bottom: 16px; }
.stack-form { display: flex; flex-direction: column; gap: 20px; }
.form-section { display: flex; flex-direction: column; gap: 12px; }
.form-section h2 { font-size: 17px; font-weight: 600; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 14px; font-weight: 500; color: #1D1D1F; }
.form-field input[type="text"], .form-field input[type="search"], .form-field select, .form-field textarea {
  width: 100%; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.14); background: #FFFFFF; color: #1D1D1F; font-family: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-button { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px dashed rgba(37,99,235,0.45); background: rgba(37,99,235,0.05); color: #1D4ED8; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.15s ease; }
.upload-button:hover { background: rgba(37,99,235,0.11); border-color: #2563EB; }
.file-summary { font-size: 13px; color: #6E6E73; }
.empty-state { padding: 20px; text-align: center; border-radius: 14px; background: #F5F5F7; color: #6E6E73; font-size: 14px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented-item { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.12); background: #FFFFFF; cursor: pointer; font-size: 14px; font-weight: 500; }
.segmented-item input { margin: 0; accent-color: #2563EB; }

.checklist { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #424245; }
.file-origin-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.file-origin-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: #F5F5F7; font-size: 14px; }

.lightbox-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox-dialog { position: relative; max-width: 920px; width: 100%; background: #1D1D1F; color: #FFFFFF; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 92vh; }
.lightbox-dialog img { max-height: 70vh; width: auto; max-width: 100%; margin: 0 auto; border-radius: 10px; object-fit: contain; }
.lightbox-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.site-footer { border-top: 1px solid rgba(0,0,0,0.08); padding: 24px 0; text-align: center; color: #6E6E73; font-size: 13px; margin-top: auto; }

@media (max-width: 640px) {
  .page { padding: 18px 16px 84px; }
  .hero-card { padding: 30px 18px; }
  .upload-actions, .segmented, .showcase-pair { grid-template-columns: 1fr; }
}
