/* ==========================================================================
   夯拉榜 · 从夯到拉排行榜生成器
   全局样式（首页 + 合规页共用）
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -180px, #FFE9D6 0%, rgba(255, 233, 214, 0) 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: env(safe-area-inset-bottom);
}
:root {
  --orange: #EA580C;
  --orange-deep: #C2410C;
  --orange-soft: #FFF1E6;
  --ink: #1C1815;
  --ink-2: #3E3731;
  --muted: #6E655D;
  --line: #E8E0D6;
  --line-strong: #D8CEC2;
  --bg: #FAF7F2;
  --panel: #FFFFFF;
  --tier-bg: #BFBFBF;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(28, 24, 21, .04);
  --shadow-md: 0 10px 30px -18px rgba(28, 24, 21, .35);
  --font: inherit;
}
img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); }
::selection { background: #FFD9BC; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(232, 224, 214, .8);
}
.header-inner {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #F97316, #C2410C);
  color: #fff; font-weight: 800; font-size: 21px; line-height: 1;
  box-shadow: 0 6px 14px -8px rgba(194, 65, 12, .9);
  padding-bottom: 1px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.brand-text small { font-size: 10.5px; color: var(--muted); margin-top: 2px; letter-spacing: .04em; }
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  padding: 8px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: #F1EAE1; color: var(--ink); text-decoration: none; }
.header-cta { margin-left: 8px; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 11px;
  border: 1px solid transparent;
  background: #F1EAE1; color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.25;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn-primary {
  background: linear-gradient(180deg, #F97316, #EA580C);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(234, 88, 12, .9);
}
.btn-primary:hover { background: linear-gradient(180deg, #FB8A32, #E9570A); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #FBF8F4; border-color: var(--line-strong); }
.btn-danger { background: #fff; border-color: #F4CBC5; color: #B91C1C; }
.btn-danger:hover { background: #FEF4F2; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 16px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover:not(:disabled) { background: #FBF8F4; border-color: var(--line-strong); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.link-danger {
  border: 0; background: none; padding: 0;
  color: #B91C1C; font-size: 12px; cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.link-danger:hover { text-decoration-style: solid; }
.link-danger:disabled { opacity: .4; cursor: not-allowed; }

/* ==========================================================================
   快速分类菜单
   ========================================================================== */
.tier-menu {
  position: fixed; z-index: 10000;
  min-width: 168px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 18px 48px -18px rgba(28, 24, 21, .45);
  display: flex; flex-direction: column; gap: 2px;
  animation: menu-in .12s ease-out;
}
.tier-menu[hidden] { display: none; }
.menu-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 11px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--ink); font-size: 13.5px; font-weight: 600;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background .12s;
}
.menu-item:hover, .menu-item:focus-visible { background: #F4EFE8; }
.menu-item.is-current { background: #FFF7F0; }
.menu-item .dot {
  width: 13px; height: 13px; border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, .16); flex: 0 0 auto;
}
.menu-item-text { flex: 1 1 auto; }
.menu-check { color: var(--orange); font-size: 12px; font-weight: 800; }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.menu-item.menu-danger { color: #B91C1C; font-weight: 500; }
.menu-item.menu-danger:hover, .menu-item.menu-danger:focus-visible { background: #FEF2F2; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   首屏
   ========================================================================== */
.hero { padding: 54px 0 10px; }
.hero-inner { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #F0E2D3;
  color: var(--orange-deep); font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  margin: 20px 0 0;
  font-size: clamp(38px, 6.2vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.01em;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #B91C1C 0%, #EA580C 48%, #F59E0B 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.mobile-br { display: none; }
.hero-sub {
  max-width: 640px; margin: 20px auto 0;
  color: var(--muted); font-size: 16.5px; line-height: 1.85;
}
.hero-actions {
  margin-top: 28px;
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
}
.hero-features {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 10px;
}
.hero-features li {
  font-size: 12.5px; color: #5C554E;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px;
}

/* ==========================================================================
   广告位
   ========================================================================== */
.ad-slot {
  position: relative;
  margin: 22px auto 10px;
  padding-top: 22px;
  width: 100%;
  min-height: 0;
}
.ad-tag {
  position: absolute; top: 0; left: 0;
  font-size: 10px; line-height: 1; letter-spacing: .12em;
  color: #A79B8F;
  border: 1px solid #E8E0D6; border-radius: 5px;
  padding: 4px 6px; background: rgba(255, 255, 255, .7);
}
.ad-body {
  min-height: 96px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-body ins { width: 100%; }
.ad-side { margin-top: 0; }
.ad-side.has-ad .ad-body { min-height: 250px; }
.ad-promo {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(120deg, #FFF7EF, #FFFCF8);
  border: 1px solid #F4E4D4;
  border-radius: 14px;
}
.ad-promo-icon { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.ad-promo strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.ad-promo p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.ad-promo a { font-weight: 600; }

/* ==========================================================================
   编辑器布局
   ========================================================================== */
.layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 14px;
  scroll-margin-top: 84px;
}
.col-left, .col-right { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel > h2, .panel-head h2 {
  margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: .01em;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.panel-hint { font-size: 11.5px; color: #9A9086; }
.count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px; margin-left: 4px;
  border-radius: 999px; background: #F3ECE3; color: var(--muted);
  font-size: 11.5px; font-weight: 700; vertical-align: 1px;
}

/* 分段控件 */
.segment {
  display: flex; gap: 4px; padding: 4px;
  background: #F4EFE8; border-radius: 12px; margin-bottom: 16px;
}
.seg-btn {
  flex: 1; padding: 9px 8px;
  border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.seg-btn:hover { color: var(--ink-2); }
.seg-btn.is-active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 24, 21, .1);
}

.field-label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 600; color: #4B443E;
}
textarea {
  width: 100%; min-height: 146px; resize: vertical;
  padding: 12px 14px;
  background: #fff; color: var(--ink);
  border: 1px solid #DED4C8; border-radius: 11px;
  font-size: 14px; line-height: 1.75;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea::placeholder { color: #B2A89E; }
textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .12); }
.field-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 6px; font-size: 11px; color: #A1968B;
}

/* 上传区 */
.dropzone {
  border: 1.5px dashed #D9CFC3; border-radius: 14px;
  background: #FCFAF7; padding: 30px 16px;
  text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--orange); background: #FFF8F1;
}
.dropzone .dz-icon { font-size: 32px; line-height: 1; margin-bottom: 10px; }
.dropzone .dz-title { margin: 0; font-size: 14px; font-weight: 600; }
.dropzone .hint { margin: 6px 0 0; font-size: 11.5px; color: #A1968B; line-height: 1.7; }

/* 待分类池 */
.pool {
  min-height: 160px; max-height: 330px; overflow-y: auto;
  display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start;
  padding: 12px;
  background: #FCFAF7;
  border: 1.5px dashed #E3DACF; border-radius: 14px;
  transition: border-color .15s, background .15s;
  scrollbar-width: thin;
}
.pool.drop-active { border-color: var(--orange); background: #FFF8F1; }
.empty {
  width: 100%; margin: auto; padding: 26px 8px;
  text-align: center; color: #A89E93;
}
.empty span { display: block; font-size: 26px; margin-bottom: 6px; opacity: .8; }
.empty p { margin: 0; font-size: 13.5px; font-weight: 600; color: #8C8176; }
.empty small { display: block; margin-top: 4px; font-size: 11.5px; color: #B2A89E; }
.pool-hint { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.6; color: #A1968B; }

/* 项目卡片 */
.item {
  position: relative;
  width: 84px; height: 84px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1.5px solid #1B1714;
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.item:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .4); }
.item:active { cursor: grabbing; }
.item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none; -webkit-user-drag: none;
}
.item-text {
  max-width: 100%; padding: 6px;
  font-size: 12px; line-height: 1.35; text-align: center;
  color: var(--ink); word-break: break-word; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  pointer-events: none;
}
.item-del {
  position: absolute; top: 3px; right: 3px; z-index: 3;
  width: 20px; height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(17, 24, 39, .78); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s;
}
.item:hover .item-del, .item:focus-within .item-del { opacity: 1; }
.item-del:hover { background: #DC2626; }
@media (hover: none) { .item-del { opacity: .92; } }
.hide-del .item-del { display: none; }

.drag-ghost {
  position: fixed; z-index: 9999; pointer-events: none;
  opacity: .95; transform: rotate(3deg) scale(1.05);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34);
  border-color: var(--orange) !important;
}
.dragging-src { opacity: .22; }
body.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* ==========================================================================
   排行榜
   ========================================================================== */
.board-panel { padding: 18px; }
.board-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
}
.board-title-wrap { flex: 1 1 240px; min-width: 0; }
.board-title {
  width: 100%; padding: 3px 7px; margin-left: -7px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent;
  font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: .01em;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.board-title::placeholder { color: #BFB4A8; font-weight: 600; }
.board-title:hover { border-color: #EFE7DD; background: #FDFBF8; }
.board-title:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(234, 88, 12, .1); }
.board-sub { display: block; margin-top: 3px; padding-left: 1px; font-size: 12px; color: #9A9086; }
.board-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-actions .btn { min-width: 0; }

.tier-list {
  background: var(--tier-bg);
  border: 2.5px solid #141210;
  border-radius: 14px;
  overflow: hidden;
}
.tier-row { display: flex; border-bottom: 2.5px solid #141210; }
.tier-row:last-child { border-bottom: 0; }
.tier-label {
  flex: 0 0 132px; width: 132px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 6px;
  border: 0; border-right: 2.5px solid #141210;
  font-family: inherit; font-size: 27px; font-weight: 800; line-height: 1.12;
  letter-spacing: .02em; text-align: center; word-break: break-word;
  cursor: text;
  transition: filter .15s;
}
.tier-label:hover { filter: brightness(.95); }
.tier-label-input {
  width: 100%; height: 46px; padding: 2px 4px;
  border: 2px solid var(--orange); border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink); font-size: 18px; font-weight: 800; text-align: center;
  outline: none;
}
.tier-content {
  flex: 1 1 auto; min-width: 0; min-height: 112px;
  display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start;
  padding: 12px;
  background: var(--tier-bg);
  transition: background .15s, box-shadow .15s;
}
.tier-content.drop-active { background: #D2CEC9; box-shadow: inset 0 0 0 3px var(--orange); }
.tier-ph { margin: auto; color: rgba(0, 0, 0, .3); font-size: 12.5px; pointer-events: none; }

.board-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-top: 11px; font-size: 12px; color: #9A9086;
}
.board-foot-right { display: inline-flex; align-items: center; gap: 14px; }
.board-note { margin: 4px 4px 0; text-align: right; font-size: 12px; color: #A1968B; }

/* ==========================================================================
   区块通用
   ========================================================================== */
.section { padding: 56px 0; scroll-margin-top: 84px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head h2, .prose > h2, .faq-wrap > h2 { margin: 6px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.section-head p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.section-kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--orange-deep); text-transform: uppercase;
}
.noscript-note { margin-top: 16px; padding: 12px 14px; background: #FFF8F1; border-radius: 10px; color: var(--muted); font-size: 13px; }

/* ==========================================================================
   模板
   ========================================================================== */
.template-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-top: 26px;
}
.template-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.template-card:hover {
  transform: translateY(-3px);
  border-color: #EADCCB;
  box-shadow: 0 18px 40px -28px rgba(60, 40, 20, .5);
}
.template-card-head { display: flex; align-items: center; gap: 10px; }
.template-card-head .tpl-emoji { font-size: 24px; line-height: 1; }
.template-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.template-card p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.tpl-preview {
  margin: 14px 0 16px;
  border: 1.5px solid #141210; border-radius: 10px; overflow: hidden;
  background: var(--tier-bg);
}
.tpl-row { display: flex; height: 30px; border-bottom: 1.5px solid #141210; }
.tpl-row:last-child { border-bottom: 0; }
.tpl-label {
  flex: 0 0 58px; display: flex; align-items: center; justify-content: center;
  border-right: 1.5px solid #141210;
  font-size: 10.5px; font-weight: 800; line-height: 1;
}
.tpl-dots { flex: 1; display: flex; align-items: center; gap: 4px; padding: 0 7px; }
.tpl-dots i {
  width: 12px; height: 12px; border-radius: 3px;
  background: #fff; border: 1px solid #141210; display: block;
}
.template-card .btn { margin-top: auto; }

/* ==========================================================================
   指南 / 正文
   ========================================================================== */
.guide-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
  gap: 44px; align-items: start;
}
.prose { max-width: 760px; }
.prose > h2 { margin-top: 6px; }
.prose h3 { margin: 30px 0 10px; font-size: 19px; font-weight: 700; }
.prose p { margin: 14px 0; font-size: 15.5px; line-height: 1.95; color: #46403A; }
.prose strong { color: var(--ink); font-weight: 700; }
.steps { margin: 12px 0; padding-left: 22px; }
.steps li { margin: 9px 0; font-size: 15px; line-height: 1.9; color: #46403A; }
.steps li::marker { color: var(--orange); font-weight: 700; }
.check-list { list-style: none; margin: 12px 0; padding: 0; }
.check-list li {
  position: relative; padding-left: 25px; margin: 9px 0;
  font-size: 15px; line-height: 1.9; color: #46403A;
}
.check-list li::before {
  content: "✓"; position: absolute; left: 2px; top: 0;
  color: var(--orange); font-weight: 800;
}
.feature-stack {
  position: sticky; top: 88px;
  display: grid; gap: 12px;
}
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  padding: 18px; box-shadow: var(--shadow-sm);
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 10px;
  border-radius: 11px; background: var(--orange-soft); font-size: 19px;
}
.feature-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.feature-card p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--muted); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.section-faq { padding-top: 10px; }
.faq-wrap { max-width: 820px; }
.faq-wrap > h2 { margin-bottom: 10px; }
.faq-wrap details { border-bottom: 1px solid var(--line); }
.faq-wrap summary {
  position: relative; padding: 17px 34px 17px 0;
  list-style: none; cursor: pointer;
  font-size: 15.5px; font-weight: 600; line-height: 1.5;
}
.faq-wrap summary::-webkit-details-marker { display: none; }
.faq-wrap summary::after {
  content: "+"; position: absolute; right: 4px; top: 13px;
  font-size: 21px; font-weight: 400; color: var(--orange);
  transition: transform .2s;
}
.faq-wrap details[open] summary::after { transform: rotate(45deg); }
.faq-wrap details p {
  margin: 0 0 18px; padding-right: 24px;
  font-size: 14px; line-height: 1.9; color: var(--muted);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: 56px; padding: 48px 0 18px;
  background: #171310; color: #C9C0B7;
}
.footer-grid {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.25fr;
  gap: 34px;
}
.footer-brand p { margin: 14px 0 0; font-size: 12.5px; line-height: 1.85; color: #9C9389; max-width: 340px; }
.footer-brand .footer-note { margin-top: 10px; font-size: 11.5px; color: #7E756C; }
.brand-light { color: #fff; }
.brand-light .brand-text small { color: #8E847A; }
.footer-col h3 { margin: 3px 0 12px; font-size: 12.5px; font-weight: 700; color: #fff; letter-spacing: .06em; }
.footer-col a { display: block; padding: 4px 0; font-size: 13px; color: #A89F95; text-decoration: none; }
.footer-col a:hover { color: #F97316; text-decoration: none; }
.footer-col p { margin: 0 0 10px; font-size: 12px; line-height: 1.8; color: #8E847A; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 11.5px; color: #7E756C;
}
.footer-links { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: #8E847A; text-decoration: none; }
.footer-links a:hover { color: #F97316; }


/* ==========================================================================
   弹窗 / Toast
   ========================================================================== */
dialog.dlg {
  width: calc(100% - 32px); max-width: 430px;
  padding: 0; border: 0; border-radius: 18px;
  background: #fff; color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}
dialog.dlg::backdrop { background: rgba(23, 19, 16, .52); backdrop-filter: blur(2px); }
dialog.dlg-wide { max-width: 560px; }
.dlg-body { padding: 24px; }
.dlg-body h2 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.dlg-body > p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.dlg-actions .btn { min-width: 76px; }
.share-row { display: flex; gap: 8px; margin-top: 16px; }
.share-input {
  flex: 1 1 auto; min-width: 0;
  padding: 10px 12px; border: 1px solid #DED4C8; border-radius: 10px;
  font-size: 12.5px; color: var(--ink-2); background: #FCFAF7;
  outline: none;
}
.share-input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .1); }
.share-note { margin: 10px 0 0; min-height: 18px; font-size: 11.5px; line-height: 1.65; color: #A1968B; }
.share-note.warn { color: #B45309; }

.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 120;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  background: #1C1815; color: #fff;
  border-radius: 999px;
  font-size: 13px; line-height: 1.4;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
  animation: toast-in .2s ease-out;
}
.toast[hidden] { display: none; }
.toast.warn { background: #9A3412; }
@keyframes toast-in { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ==========================================================================
   合规页 / 404
   ========================================================================== */
.page-hero {
  padding: 52px 0 26px;
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { max-width: 848px; }
.page-hero h1 { margin: 8px 0 0; font-size: clamp(30px, 4.5vw, 42px); font-weight: 900; letter-spacing: -.01em; }
.page-hero p { margin: 12px 0 0; max-width: 720px; color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.page-meta { margin-top: 12px; font-size: 12px; color: #A1968B; }
.legal { max-width: 800px; margin: 0 auto; padding: 40px 0 64px; }
.legal h2 { margin: 34px 0 10px; font-size: 20px; font-weight: 700; scroll-margin-top: 86px; }
.legal h3 { margin: 22px 0 8px; font-size: 15.5px; font-weight: 700; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.95; color: #4B443E; }
.legal p { margin: 10px 0; }
.legal ul, .legal ol { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 6px 0; }
.legal a { color: var(--orange-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal code { padding: 1px 5px; border-radius: 4px; background: #F5F0E9; font-size: .9em; }
.legal .callout {
  margin: 20px 0; padding: 14px 16px;
  background: #FFF8F1; border: 1px solid #F4E4D4; border-radius: 12px;
  font-size: 13.5px; line-height: 1.8; color: #6B4A2E;
}
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.legal-table th, .legal-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { color: var(--ink); font-weight: 600; background: #FCFAF7; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px auto 0; max-width: 800px; }
.contact-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.contact-card-wide { grid-column: 1 / -1; }
.contact-card-action { margin: 14px 0 0 !important; }
.contact-card h3 { margin: 0 0 8px; font-size: 15px; }
.contact-card p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.contact-card a { font-weight: 600; }
.not-found { padding: 100px 0 80px; text-align: center; }
.not-found .code {
  font-size: clamp(72px, 16vw, 140px); font-weight: 900; line-height: 1;
  background: linear-gradient(100deg, #B91C1C, #EA580C 50%, #F59E0B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.not-found h1 { margin: 8px 0 0; font-size: 26px; }
.not-found p { margin: 12px auto 0; max-width: 480px; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.not-found .btn { margin-top: 24px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1120px) {
  .layout { grid-template-columns: 360px minmax(0, 1fr); }
  .guide-grid { grid-template-columns: 1fr; gap: 28px; }
  .feature-stack { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .col-left { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .ad-side { display: none; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > .footer-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .wrap { padding: 0 18px; }
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero { padding: 38px 0 6px; }
  .hero-sub { font-size: 15px; }
  .hero-actions .btn { padding: 12px 20px; }
  .col-left { grid-template-columns: 1fr; }
  .feature-stack { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal { padding-top: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mobile-br { display: inline; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 44px); }
  .hero-features { gap: 6px; margin-top: 24px; }
  .hero-features li { font-size: 11.5px; padding: 6px 10px; }
  .section { padding: 40px 0; }
  .section-head h2, .prose > h2, .faq-wrap > h2 { font-size: 23px; }
  .panel { padding: 15px; border-radius: 14px; }
  .board-panel { padding: 12px; }
  .board-title { font-size: 19px; }
  .board-sub { font-size: 11px; }
  .board-actions { width: 100%; gap: 5px; }
  .board-actions .btn { flex: 1 1 auto; }
  .icon-btn { width: 32px; height: 32px; }
  .tier-list { border-width: 2px; border-radius: 11px; }
  .tier-row { border-bottom-width: 2px; }
  .tier-label { flex-basis: 76px; width: 76px; font-size: 18px; padding: 8px 4px; border-right-width: 2px; }
  .tier-content { min-height: 92px; padding: 8px; gap: 8px; }
  .item { width: 64px; height: 64px; border-radius: 8px; }
  .item-text { font-size: 10.5px; padding: 4px; -webkit-line-clamp: 3; }
  .pool { min-height: 120px; max-height: 260px; padding: 8px; gap: 8px; }
  .board-foot { font-size: 11.5px; }
  .board-foot-tip { display: none; }
  .board-foot-right { width: 100%; justify-content: space-between; }
  .board-note { text-align: left; }
  .template-grid { grid-template-columns: 1fr; }
  .ad-promo { padding: 14px; }
  .ad-side { display: none; }
  .dlg-actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-brand p { max-width: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .share-row { flex-wrap: wrap; }
  .share-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
@media print {
  .site-header, .site-footer, .ad-slot, .toast, .board-actions,
  .board-note, .hero-actions, .hero-features, .section { display: none !important; }
  body { background: #fff; }
  .layout { display: block; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .tier-list { break-inside: avoid; }
}
