:root {
  --page-bg: #f5f5f7;
  --panel: #ffffff;
  --text: #1d1d1f;
  --soft: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --line-soft: #e5e5e7;
  --accent: #0071e3;
  --accent-ink: #0055a5;
  --accent-soft: #eaf3fe;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 22px 58px -28px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "SF Pro TC", "PingFang TC", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #1d1d1f;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-cta:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(70px, 8vw, 116px) 24px clamp(68px, 7vw, 104px);
  background: var(--panel);
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hero-count {
  display: block;
  font-size: clamp(88px, 14vw, 148px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-sub {
  display: block;
  margin-top: 6px;
  font-size: clamp(34px, 5.6vw, 58px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-lede {
  max-width: 620px;
  margin: 26px auto 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 19px);
}

.hero-search {
  position: relative;
  max-width: 850px;
  margin: 40px auto 0;
}

.search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--faint);
  pointer-events: none;
}

.hero-search input {
  width: 100%;
  padding: 19px 24px 19px 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input::placeholder { color: var(--faint); }

.hero-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.popular-label {
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
}

.chip {
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--page-bg);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Collection ---------- */
.collection {
  padding: clamp(56px, 7vw, 96px) 24px clamp(80px, 8vw, 120px);
}

.collection-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.collection-header h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.result-count {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.filter {
  padding: 9px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel);
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter .count {
  margin-left: 3px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.7;
}

.filter:hover {
  border-color: var(--line);
  color: var(--text);
}

.filter.is-active {
  background: #1d1d1f;
  border-color: #1d1d1f;
  color: #fff;
}

.filter.is-active .count { opacity: 0.75; }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.24s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.24s cubic-bezier(0.25, 1, 0.5, 1),
    border-color 0.24s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), 0 30px 70px -30px rgba(0, 0, 0, 0.3);
}

.preview {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: var(--page-bg);
}

.open-hint {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.card:hover .open-hint {
  opacity: 1;
  transform: translateY(0);
}

/* generated mini site preview */
.mock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 9% 12% 0;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.card:hover .mock { transform: scale(1.03); }

.mock-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  background: #f3f3f5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mock-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6d6da;
}

.mock-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px 12px;
  color: #fff;
  text-align: center;
}

.mock-emoji { font-size: 22px; line-height: 1; }

.mock-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mock-pill {
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.mock-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
}

.mock-body i {
  height: 100%;
  min-height: 16px;
  border-radius: 5px;
  background: #eeeef0;
}

/* ---------- Card body ---------- */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-category {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
}

.template-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e8f3ff;
  padding: 4px 9px;
  color: #0066cc;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.card-desc {
  margin: 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.card-link .icon { transition: transform 0.2s ease; }

.card:hover .card-link .icon { transform: translate(2px, -2px); }

.empty {
  margin: 48px auto 0;
  max-width: 520px;
  text-align: center;
  color: var(--soft);
  font-size: 15px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 24px 56px;
  background: var(--panel);
  border-top: 1px solid var(--line-soft);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  color: var(--soft);
  font-size: 14px;
}

.footer-inner p { margin: 0; }

.footer-inner nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.footer-inner a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-inner a:hover { color: var(--text); }

.footer-inner small { color: var(--faint); }

/* ---------- Chat FAB ---------- */
.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.chat-fab:hover { transform: translateY(-2px); }

.chat-dot {
  position: absolute;
  top: 9px;
  left: 30px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30d158;
  border: 2px solid #1d1d1f;
}

/* ---------- RWD ---------- */
@media (max-width: 1068px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 734px) {
  .hero { padding: 66px 18px 74px; }
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 22px;
  }
  .card { border-radius: 16px; }
  .header-inner { padding: 12px 18px; }
  .collection { padding-left: 18px; padding-right: 18px; }
}
