/* 请柬坊 · 平台前台样式 */

:root {
  --paper: #f2efe7;
  --card: #fffdf7;
  --ink: #1f2422;
  --ink-2: #5c6360;
  --ink-3: #8b918d;
  --line: #ddd8cb;
  --accent: #3f5b4e;
  --accent-soft: #e7ede6;
  --gold: #a58a52;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 26px 50px -34px rgba(31, 36, 34, .45);
  --max: 1120px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(242, 239, 231, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark { font-family: var(--serif); font-size: 22px; letter-spacing: .14em; font-weight: 600; }
.brand-sub { font-size: 11px; letter-spacing: .18em; color: var(--ink-3); }
.head-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.head-nav a {
  padding: 7px 11px; font-size: 13.5px; color: var(--ink-2);
  border-bottom: 1px solid transparent;
}
.head-nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.head-cta {
  margin-left: 6px;
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  background: var(--accent); color: #fff; font-size: 13px; letter-spacing: .08em;
  border: none; cursor: pointer;
}
.head-cta:hover { background: #344c41; }

/* ---------- 首屏 ---------- */
.hero { padding-top: 54px; padding-bottom: 30px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: center; }
.hero-kicker {
  display: inline-block; margin: 0 0 18px;
  padding-bottom: 4px; border-bottom: 1px solid var(--gold);
  font-size: 12px; letter-spacing: .22em; color: var(--gold);
}
.hero h1 {
  margin: 0 0 20px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.35; letter-spacing: .02em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { margin: 0 0 26px; color: var(--ink-2); font-size: 15px; max-width: 34em; width: 100%; }
.hero-acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-size: 14px; letter-spacing: .08em; cursor: pointer;
  transition: transform .2s, background .2s;
}
.btn:hover { background: #344c41; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-stats { display: flex; gap: 26px; margin-top: 30px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.hero-stats span { font-size: 11.5px; letter-spacing: .12em; color: var(--ink-3); }

/* 首屏模板叠图 */
.hero-deck { position: relative; height: 420px; }
.hero-deck .deck-card {
  position: absolute; top: 0; width: 62%; max-width: 250px;
  background: var(--card); padding: 8px; box-shadow: var(--shadow);
  transition: transform .4s ease;
}
.hero-deck img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.deck-card:nth-child(1) { left: 0; transform: rotate(-7deg); z-index: 1; }
.deck-card:nth-child(2) { left: 22%; top: 18px; transform: rotate(2deg); z-index: 2; }
.deck-card:nth-child(3) { right: 0; top: 54px; transform: rotate(8deg); z-index: 3; }
.hero-deck:hover .deck-card:nth-child(1) { transform: rotate(-10deg) translateX(-6px); }
.hero-deck:hover .deck-card:nth-child(3) { transform: rotate(11deg) translateX(6px); }

/* ---------- 分类 ---------- */
.cat-bar { padding-top: 18px; padding-bottom: 8px; }
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 13.5px; cursor: pointer;
}
.cat-pill b { font-family: var(--serif); font-weight: 600; color: var(--accent); }
.cat-pill.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-pill.is-on b { color: #fff; }

/* ---------- 区块标题 ---------- */
.sec-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 44px 0 22px; }
.sec-heading h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .04em; }
.sec-heading p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.sec-more { font-size: 12.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 2px; }

/* ---------- 模板卡片 ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.tpl-card { display: block; background: var(--card); padding: 10px 10px 0; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.tpl-card:hover { transform: translateY(-4px); box-shadow: 0 32px 54px -30px rgba(31,36,34,.5); }
.tpl-cover { position: relative; overflow: hidden; }
.tpl-cover img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .5s ease; }
.tpl-card:hover .tpl-cover img { transform: scale(1.03); }
.tpl-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px; font-size: 11px; letter-spacing: .08em;
  background: rgba(255,253,247,.92); color: var(--accent);
}
.tpl-badge.vip { background: var(--gold); color: #fff; }
.tpl-body { padding: 12px 4px 14px; }
.tpl-title { margin: 0 0 4px; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.tpl-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.tpl-price { color: var(--accent); }

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 20px 0 10px; }
.step { padding: 22px 20px; border-top: 2px solid var(--accent); background: rgba(255,253,247,.6); }
.step i { font-style: normal; font-family: var(--serif); font-size: 26px; color: var(--accent); letter-spacing: .04em; }
.step h3 { margin: 8px 0 6px; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.step p { margin: 0; font-size: 13px; color: var(--ink-2); }

/* ---------- 专题 ---------- */
.feature {
  margin: 40px 0;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  background: var(--accent);
  color: #f3efe6;
}
.feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.feature-body { padding: 34px 32px; align-self: center; }
.feature-body span { font-size: 11.5px; letter-spacing: .2em; opacity: .75; }
.feature-body h2 { margin: 10px 0 12px; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.feature-body p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.9; opacity: .85; }
.feature-body .btn { border-color: #f3efe6; background: #f3efe6; color: var(--accent); }
.feature-body .btn:hover { background: #fff; }

/* ---------- 列表页 ---------- */
.page-head { padding: 38px 0 6px; }
.page-head h1 { margin: 0 0 8px; font-family: var(--serif); font-size: 30px; font-weight: 600; }
.page-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 26px; align-items: center; }
.search-box { display: flex; flex: 1 1 260px; min-width: 0; max-width: 380px; }
.search-box input {
  flex: 1 1 0; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--card); outline: none; font-size: 13.5px;
  color: var(--ink);
}
.search-box button { height: 40px; padding: 0 16px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-size: 13px; }

.pager { display: flex; gap: 6px; justify-content: center; margin: 36px 0 10px; }
.pager-btn { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--ink-2); }
.pager-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty { padding: 60px 0; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------- 模板详情 ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 44px; padding: 40px 0 10px; align-items: start; }
.detail-cover { background: var(--card); padding: 10px; box-shadow: var(--shadow); }
.detail-cover img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.detail-body h1 { margin: 0 0 10px; font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.4; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tag { font-size: 11.5px; padding: 3px 9px; border: 1px solid var(--line); color: var(--ink-2); }
.detail-intro { margin: 0 0 24px; color: var(--ink-2); font-size: 14px; }
.detail-list { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.detail-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.detail-list i { font-style: normal; color: var(--accent); }
.detail-acts { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 表单 / 编辑器 ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; padding: 30px 0 40px; }
.form-card { background: var(--card); border: 1px solid var(--line); padding: 24px 22px; }
.form-card h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.form-card p.hint { margin: 0 0 18px; font-size: 12.5px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; min-width: 0;
  padding: 11px 12px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); outline: none; border-radius: 0;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.7; }
.theme-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-pick label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 1px solid var(--line); font-size: 12.5px; cursor: pointer;
}
.theme-pick input { display: none; }
.theme-pick label.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.uploader { display: flex; gap: 10px; flex-wrap: wrap; }
.uploader .up-item {
  position: relative; width: 84px; padding: 4px; background: #fff; border: 1px solid var(--line);
}
.up-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.up-item button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; line-height: 1;
  border: none; background: var(--ink); color: #fff; font-size: 12px; cursor: pointer;
}
.up-add {
  width: 84px; aspect-ratio: 1 / 1; display: grid; place-items: center;
  border: 1px dashed var(--line); background: #fff; color: var(--ink-3); font-size: 12px; cursor: pointer; text-align: center;
}
.form-foot { display: flex; gap: 12px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.form-foot .tip { font-size: 12.5px; color: var(--accent); }

.preview-pane { position: sticky; top: 80px; }
.preview-frame {
  width: 100%; aspect-ratio: 9 / 16; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow);
}
.preview-cap { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ---------- 登录 / 我的 ---------- */
.auth-card { max-width: 400px; margin: 60px auto; background: var(--card); border: 1px solid var(--line); padding: 30px 26px; }
.auth-card h1 { margin: 0 0 6px; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.auth-card p { margin: 0 0 20px; font-size: 13px; color: var(--ink-3); }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card .btn { width: 100%; }
.auth-alt { margin-top: 16px; font-size: 13px; color: var(--ink-2); text-align: center; }
.auth-alt a { color: var(--accent); }

.my-list { display: grid; gap: 14px; }
.my-item { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); padding: 12px; align-items: center; }
.my-item img { width: 76px; aspect-ratio: 3 / 4; object-fit: cover; }
.my-item .meta { flex: 1 1 0; min-width: 0; }
.my-item h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.my-item p { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.my-item .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mini-btn { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-foot { margin-top: 60px; padding-top: 30px; padding-bottom: 26px; border-top: 1px solid var(--line); }
.foot-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { font-family: var(--serif); font-size: 18px; letter-spacing: .12em; }
.foot-note { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.foot-links { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.foot-legal { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; gap: 18px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.foot-legal a { display: inline-flex; align-items: center; gap: 4px; }
.foot-legal a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-deck { height: 320px; max-width: 420px; }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .feature { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 22px; }
  .detail-cover { max-width: 300px; }
  .editor-grid { grid-template-columns: 1fr; }
  .preview-pane { position: static; display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .head-nav a { padding: 7px 8px; font-size: 12.5px; }
  .brand-sub { display: none; }
  .hero-stats { gap: 18px; }
  .my-item { flex-wrap: wrap; }
  .my-item .acts { width: 100%; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .head-inner { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 8px 10px; }
  .head-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; }
  .head-nav a { white-space: nowrap; }
  .head-cta { height: 32px; padding: 0 12px; font-size: 12px; }
  .hero { padding-top: 32px; }
  .feature-body { padding: 24px 20px; }
  .sec-heading h2 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ===== 首页新版：搜索 / 版式 Tab / 横幅 / 分类九宫格 / 横向模板行 ===== */

.search-row { display: flex; align-items: center; gap: 12px; padding: 16px 0 6px; }
.search-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; background: #fbf9f3; border: 1px solid #e3ded1; border-radius: 999px; padding: 9px 16px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--ink); font-family: inherit; }
.search-box input::placeholder { color: #b3b8b3; letter-spacing: .04em; }
.grid-btn { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fbf9f3; border: 1px solid #e3ded1; flex: 0 0 auto; }

.tabs { display: flex; gap: 26px; padding: 8px 0 14px; font-size: 15px; }
.tabs a { color: #6b716c; padding-bottom: 5px; border-bottom: 2px solid transparent; letter-spacing: .06em; }
.tabs a:hover { color: var(--accent); }
.tabs a.is-on { color: #1f2422; border-color: #e2477a; font-weight: 600; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 8px; padding: 22px 20px; min-height: 146px; overflow: hidden; position: relative; text-decoration: none; }
.banner .bn-text { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; position: relative; z-index: 2; }
.banner .bn-sub { font-size: 12px; letter-spacing: .1em; opacity: .82; }
.banner strong { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: .06em; line-height: 1.3; }
.banner .bn-cta { margin-top: 6px; font-size: 12px; border: 1px solid currentColor; border-radius: 999px; padding: 5px 16px; color: inherit; }
.bn-rec { background: linear-gradient(115deg, #e9f2f8 0%, #eef4ef 60%, #f4efe6 100%); color: #2c4a56; }
.bn-page { background: linear-gradient(120deg, #f24a26 0%, #f9723b 70%, #f9a05a 100%); color: #fff; }
.bn-long { background: linear-gradient(120deg, #1f6ff0 0%, #3f92ff 70%, #66b8ff 100%); color: #fff; }
.bn-poster { background: linear-gradient(120deg, #7a63e8 0%, #9a7cf2 70%, #b79cf7 100%); color: #fff; }
.bn-covers { display: flex; gap: -6px; align-items: flex-end; flex: 0 0 auto; }
.bn-covers img { width: 62px; height: 82px; object-fit: cover; border-radius: 3px; box-shadow: 0 10px 18px -10px rgba(36,48,60,.55); margin-left: -14px; border: 2px solid rgba(255,255,255,.9); }
.bn-covers img:first-child { margin-left: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 10px; padding: 26px 0 6px; }
@media (max-width: 720px) { .cat-grid { gap: 14px 6px; } }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; }
.cat-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-size: 20px; font-weight: 600; box-shadow: 0 8px 16px -10px rgba(31,36,34,.55); transition: transform .2s ease; }
@media (max-width: 720px) { .cat-ico { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; } }
.cat-tile:hover .cat-ico { transform: translateY(-3px); }
.cat-name { font-size: 11.5px; color: #4d5450; letter-spacing: .04em; white-space: nowrap; }

.row-sec { margin-top: 34px; }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.row-head h2 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .04em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.row-head h2 small { font-family: var(--sans); font-size: 11.5px; font-weight: 400; color: #9aa09b; letter-spacing: .04em; }
.row-more { font-size: 12px; color: #7d837e; white-space: nowrap; }
.row-more:hover { color: var(--accent); }

.row-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.row-scroll::-webkit-scrollbar { height: 4px; }
.row-scroll::-webkit-scrollbar-thumb { background: #d8d3c5; border-radius: 4px; }
.tpl-card.sm { flex: 0 0 45%; max-width: 196px; padding: 8px 8px 10px; scroll-snap-align: start; }
@media (min-width: 860px) { .tpl-card.sm { flex: 0 0 calc((100% - 36px) / 4); max-width: none; } }
.tpl-card.sm .tpl-title { margin: 10px 2px 2px; font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-mini { margin: 0 2px; font-size: 11px; color: #9aa09b; }
.layout-badge { position: absolute; right: 8px; bottom: 8px; background: rgba(24,24,22,.72); color: #fff; font-size: 10.5px; letter-spacing: .08em; padding: 3px 8px; border-radius: 3px; }
.vip-tag { position: absolute; left: 8px; top: 8px; background: linear-gradient(135deg,#d8b25e,#f5dfa6); color: #4a3a12; font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 2px 7px; border-radius: 3px; }

/* ===== 列表页筛选条 ===== */
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0 18px; font-size: 12.5px; }
.fr-label { color: #9aa09b; letter-spacing: .08em; }
.fr-pill { padding: 4px 12px; border-radius: 999px; border: 1px solid #e3ded1; color: #5c6360; background: #fbf9f3; }
.fr-pill.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fr-sep { width: 1px; height: 14px; background: #e0dbcf; margin: 0 4px; }
@media (min-width: 780px) {
  .cat-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 20px 6px; padding: 30px 0 8px; }
  .cat-name { font-size: 12px; }
}

/* ===== 模板收藏按钮 ===== */
.fav-btn {
  position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; z-index: 3;
  background: rgba(255,255,255,.86); color: #8a908a; cursor: pointer;
  box-shadow: 0 4px 10px -6px rgba(0,0,0,.35); transition: transform .18s ease, color .18s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.fav-btn:hover { transform: scale(1.06); }
.fav-btn.is-on { color: #e2477a; }
.fav-btn.is-on svg path { fill: #e2477a; stroke: #e2477a; }
.fav-detail.is-on { color: #e2477a; border-color: #e2477a; }
.fav-heart-tip { font-size: 12px; color: #8b918d; }

/* ===== 收藏分组 / 历史 ===== */
.fav-groups { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 22px; }
.fav-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line, #e4e0d6); background: #fff; color: #52584f; font-size: 12.5px;
}
.fav-chip em { font-style: normal; font-size: 11px; color: #9aa095; }
.fav-chip.is-active { background: var(--ink, #2c302a); border-color: var(--ink, #2c302a); color: #fff; }
.fav-chip.is-active em { color: rgba(255,255,255,.7); }
.grp-add { display: flex; gap: 6px; }
.grp-add input {
  width: 190px; padding: 7px 11px; font-size: 12.5px; border-radius: 999px;
  border: 1px solid var(--line, #e4e0d6); background: #fff; color: #333;
}
.grp-add button {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line, #e4e0d6);
  background: #fff; font-size: 12.5px; color: #52584f; cursor: pointer;
}
.grp-add button:hover { border-color: var(--ink, #2c302a); color: var(--ink, #2c302a); }
.grp-del button { background: none; border: none; font-size: 12px; color: #a8564a; cursor: pointer; text-decoration: underline; }
.move-form { margin-top: 8px; }
.move-form select {
  width: 100%; padding: 6px 8px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--line, #e4e0d6); background: #fff; color: #52584f;
}
.his-acts { display: flex; justify-content: flex-end; margin: 0 0 16px; }
.his-acts .btn { font-size: 12.5px; padding: 8px 14px; }

/* ===== 站点公告 ===== */
.notice-bar { background: #3f5b4e; color: #f6f3ea; }
.notice-inner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; }
.notice-dot { width: 6px; height: 6px; border-radius: 50%; background: #e8d9a8; margin-top: 7px; flex: none; }
.notice-bar p { margin: 0; font-size: 12.5px; line-height: 1.7; letter-spacing: .02em; }
.notice-bar a { color: #f0e2b4; }

/* ===== 移动端体验优化 ===== */
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .brand-mark { font-size: 19px; letter-spacing: .1em; }
  .head-cta { height: 34px; padding: 0 14px; }
  .page-head h1 { font-size: 24px; line-height: 1.35; }
  .page-head p { font-size: 13px; }
  .form-card { padding: 18px 15px; }
  .form-card h2 { font-size: 17px; }
  .form-grid { gap: 12px; }
  input[type=text], input[type=tel], input[type=password], input[type=number],
  input[type=datetime-local], textarea, select { font-size: 16px; padding: 12px; }
  label.f { font-size: 13px; gap: 7px; }
  .form-foot { gap: 10px; margin-top: 18px; }
  .form-foot .btn, .form-foot .btn.ghost { flex: 1 1 100%; height: 48px; }
  .form-foot .tip { width: 100%; font-size: 12px; }
  .theme-pick label { padding: 9px 13px; font-size: 13px; }
  .uploader .up-item, .up-add { width: 72px; }
  .seg-item { padding: 13px 0; }
  .tpl-card .tpl-meta { font-size: 12px; }
}

/* 移动端底部保存条（仅编辑器） */
.mobile-save {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(242,239,231,.97);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
  gap: 10px;
}
.mobile-save button {
  flex: 1 1 0; height: 46px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 15px; letter-spacing: .08em;
}
.mobile-save .ghost { background: transparent; color: var(--ink); border-color: var(--line); }
@media (max-width: 900px) {
  .mobile-save { display: flex; }
  body.has-mobile-save { padding-bottom: 78px; }
}
