/* 大董文心 —— 全站样式 v2（宣纸·水墨·朱砂 文化解构；PC / H5 自适应，浅色主题） */
:root {
  --bg: #f6f2e9;
  --bg-2: #efe9db;
  --panel: #fffdf8;
  --ink: #26221d;
  --muted: #77705f;
  --line: #e3dccb;
  --accent: #a63a2b;      /* 朱砂 */
  --accent-deep: #7e2b1f;
  --accent-soft: #f6e8e2;
  --azure: #2f4f56;       /* 黛青 */
  --azure-soft: #e6edec;
  --gold: #9a7b3f;        /* 鎏金 */
  --gold-soft: #f3ecdb;
  --ok: #3c7a4e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(38, 34, 29, .07), 0 6px 18px rgba(38, 34, 29, .06);
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink); font-size: 15px; line-height: 1.75;
  background:
    radial-gradient(1200px 500px at 85% -100px, rgba(166, 58, 43, .05), transparent 60%),
    radial-gradient(900px 420px at -100px 30%, rgba(47, 79, 86, .06), transparent 60%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 30%, var(--bg-2) 100%);
  background-attachment: fixed;
}
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: .5px; }
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; resize: vertical; background: var(--panel); }
input[type=text], input[type=tel], input[type=number], select {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(166, 58, 43, .25); border-color: var(--accent); }

.btn {
  display: inline-block; border: none; border-radius: 8px; padding: 9px 20px;
  background: var(--ink); color: #f6f2e9; font-size: 14px; letter-spacing: 1px;
  transition: transform .12s, box-shadow .12s, opacity .15s;
}
.btn:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(38, 34, 29, .22); }
.btn.primary { background: linear-gradient(160deg, #b84433, var(--accent-deep)); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.card::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(154, 123, 63, .45), transparent);
  border-radius: 2px;
}
.tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); margin-right: 6px; border: 1px solid rgba(166, 58, 43, .18); }
.tag.gray { background: #efe9dc; color: var(--muted); border-color: var(--line); }
.tag.gold { background: var(--gold-soft); color: var(--gold); border-color: rgba(154, 123, 63, .25); }
.tag.azure { background: var(--azure-soft); color: var(--azure); border-color: rgba(47, 79, 86, .2); }
.muted { color: var(--muted); font-size: 13px; }
.hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

/* 印章 */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 6px; flex: none;
  background: linear-gradient(160deg, #b84433, var(--accent-deep));
  color: #fff; font-family: var(--serif); font-weight: 700;
  font-size: 14px; line-height: 1.15; text-align: center; letter-spacing: 1px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 8px rgba(126, 43, 31, .35);
  writing-mode: vertical-rl; padding: 4px;
}
.seal.lg { width: 64px; height: 64px; font-size: 19px; border-radius: 8px; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex: none; color: #d8d2c6;
  background: linear-gradient(180deg, #211d19 0%, #2c2620 100%);
  display: flex; flex-direction: column; padding: 20px 0;
  border-right: 3px solid var(--accent);
}
.sidebar .logo { display: flex; gap: 12px; align-items: center; padding: 0 18px 16px; border-bottom: 1px solid #3c352d; }
.sidebar .logo .name { font-family: var(--serif); font-size: 20px; color: #f6f2e9; letter-spacing: 3px; }
.sidebar .logo small { display: block; font-family: var(--serif); font-size: 11px; color: #9a8f7c; letter-spacing: 2px; margin-top: 2px; }
.sidebar nav { flex: 1; padding: 12px 10px; }
.sidebar nav a { display: block; padding: 9px 14px; border-radius: 8px; color: #c9c2b4; font-size: 14px; margin: 2px 0; transition: background .15s; }
.sidebar nav a.active, .sidebar nav a:hover { background: rgba(166, 58, 43, .28); color: #fff; }
.sidebar .me { padding: 12px 18px 0; border-top: 1px solid #3c352d; font-size: 13px; }
.main { flex: 1; min-width: 0; padding: 26px 30px 70px; max-width: 1080px; }
.view { display: none; }
.view.active { display: block; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.view h2 { font-size: 24px; margin-bottom: 4px; }
.view h2::after { content: ""; display: block; width: 42px; height: 3px; background: var(--accent); margin-top: 6px; border-radius: 2px; }
.view .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* ===== 落地页 ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(246, 242, 233, .92); backdrop-filter: blur(6px); z-index: 10; }
.hero { text-align: center; padding: 92px 20px 56px; position: relative; overflow: hidden; }
.hero-carousel { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: heroCycle 24s infinite; }
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 8s; }
.hero-slide:nth-child(3) { animation-delay: 16s; }
@keyframes heroCycle { 0% { opacity: 0; transform: scale(1.04); } 6% { opacity: 1; transform: scale(1); } 32% { opacity: 1; } 42% { opacity: 0; transform: scale(1.02); } 100% { opacity: 0; } }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246, 242, 233, .86) 0%, rgba(246, 242, 233, .74) 55%, rgba(246, 242, 233, .95) 100%); }
.hero > *:not(.hero-carousel) { position: relative; z-index: 1; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(480px 180px at 18% 20%, rgba(166, 58, 43, .08), transparent 70%),
    radial-gradient(520px 200px at 82% 65%, rgba(47, 79, 86, .09), transparent 70%);
}
.hero .seal-hero { margin: 0 auto 22px; width: 72px; height: 72px; font-size: 22px; border-radius: 9px; }
.hero h1 { font-size: 52px; letter-spacing: 12px; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .slogan { color: var(--muted); margin: 18px 0 8px; font-size: 18px; font-family: var(--serif); letter-spacing: 3px; }
.hero .motto { color: var(--gold); font-size: 13px; letter-spacing: 6px; margin-bottom: 30px; }
.hero .actions .btn { margin: 0 8px; padding: 12px 36px; font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; }
.feature-grid .card h3 { font-size: 17px; margin-bottom: 6px; color: var(--accent-deep); }

/* 五步流程 */
.flow-wrap { max-width: 1080px; margin: 0 auto; padding: 10px 20px 50px; }
.flow { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; }
.flow-step { flex: 1 1 180px; position: relative; padding: 20px 16px 16px; margin: 10px 14px 10px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.flow-step .no {
  width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #b84433, var(--accent-deep)); color: #fff;
  font-family: var(--serif); font-size: 18px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(126, 43, 31, .3);
}
.flow-step h4 { font-family: var(--serif); font-size: 16px; margin-bottom: 4px; }
.flow-step p { font-size: 12px; color: var(--muted); }
.flow-step:not(:last-child)::after {
  content: "➤"; position: absolute; right: -20px; top: 42%; color: var(--gold); font-size: 13px; z-index: 1;
}
@media (max-width: 900px) { .flow-step:not(:last-child)::after { display: none; } }

/* 媒体资源（落地页深色带） */
.media-band { background: linear-gradient(180deg, #241f1a, #332b23); color: #e9e1d2; padding: 56px 20px; }
.media-band h2 { text-align: center; font-size: 28px; color: #f6f2e9; letter-spacing: 4px; }
.media-band .band-sub { text-align: center; color: #a89b83; margin: 8px 0 30px; font-family: var(--serif); letter-spacing: 2px; }
.media-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; max-width: 1080px; margin: 0 auto 26px; }
.media-stats .stat { background: rgba(255, 253, 248, .05); border: 1px solid rgba(233, 225, 210, .15); border-radius: 10px; }
.media-stats .stat b { font-size: 30px; color: #e8b46a; font-family: var(--serif); }
.media-stats .stat span { display: block; font-size: 12px; color: #a89b83; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; max-width: 1080px; margin: 0 auto; }
.media-chip { background: rgba(255, 253, 248, .07); border: 1px solid rgba(233, 225, 210, .18); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.media-chip b { color: #f6f2e9; display: block; font-family: var(--serif); }
.media-chip span { color: #b3a78f; font-size: 11px; }
.media-band .band-cta { text-align: center; margin-top: 28px; }

/* 大董是谁 */
.dong-band { position: relative; overflow: hidden; padding: 56px 20px 44px; margin-top: 30px; }
.dong-carousel { position: absolute; inset: 0; z-index: 0; }
.dong-carousel .hero-slide { animation-duration: 27s; }
.dong-veil { background: linear-gradient(180deg, rgba(246, 242, 233, .95) 0%, rgba(246, 242, 233, .84) 45%, rgba(246, 242, 233, .97) 100%); }
.dong-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }
.dong-card { display: flex; gap: 22px; padding: 30px; }
.dong-card .seal.lg { margin-top: 4px; }
.dong-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.dong-stats .stat { background: var(--bg); border: 1px dashed var(--line); }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; max-width: 1080px; margin: 0 auto; padding: 0 20px 60px; }
a.price-card { color: inherit; text-decoration: none; display: block; }
a.price-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(38, 34, 29, .13); transition: transform .15s, box-shadow .15s; }
.price-card { text-align: center; padding: 24px 14px; position: relative; }
.price-card.hot { border-color: var(--accent); }
.price-card.joint { border: 2px solid var(--gold); box-shadow: 0 6px 22px rgba(154, 123, 63, .18); }
.price-card.joint .serif { color: var(--gold); }
.price-card.joint::before { content: "双平台"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #fff; font-size: 12px; padding: 1px 12px; border-radius: 999px; }
.price-card.hot::before { content: "主推"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 12px; padding: 1px 12px; border-radius: 999px; }
.price-card .amount { font-size: 30px; color: var(--accent); font-weight: 700; }
.price-card .amount small { font-size: 13px; color: var(--muted); font-weight: 400; }
.price-card ul { list-style: none; margin-top: 10px; font-size: 13px; color: var(--muted); }
.price-card ul li { padding: 2px 0; }

/* ===== 登录浮层 ===== */
.overlay { position: fixed; inset: 0; background: rgba(28, 24, 20, .6); display: flex; align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(3px); }
.login-box { width: 368px; max-width: 92vw; }
.login-box .tabs { display: flex; gap: 18px; margin-bottom: 14px; }
.login-box .tabs span { cursor: pointer; padding-bottom: 4px; color: var(--muted); }
.login-box .tabs span.on { color: var(--accent); border-bottom: 2px solid var(--accent); }
.login-box .row { margin-bottom: 10px; }
.login-box .code-row { display: flex; gap: 8px; }
.login-box .err { color: var(--accent); font-size: 13px; min-height: 18px; }
.login-divider { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0; }

/* ===== 对话 ===== */
.chat-box { height: 460px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.msg { margin-bottom: 14px; display: flex; }
.msg .bubble { max-width: 82%; padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: linear-gradient(160deg, #b84433, var(--accent-deep)); color: #fff; border-top-right-radius: 2px; }
.msg.ai .bubble { background: var(--gold-soft); border-top-left-radius: 2px; }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; transition: all .12s; }
.chip.on { background: var(--ink); color: #f6f2e9; border-color: var(--ink); }

/* ===== 解析 ===== */
.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.dim { padding: 16px; }
.dim .score { font-size: 26px; font-weight: 700; color: var(--accent); }
.dim .bar { height: 5px; background: var(--line); border-radius: 4px; margin: 8px 0; }
.dim .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 4px; }
.dim p { font-size: 13px; color: var(--muted); }
.tree, .tree ul { list-style: none; padding-left: 18px; border-left: 1px dashed var(--line); }
.tree > li { border-left: none; padding-left: 0; }
.tree li { position: relative; padding: 4px 0 4px 12px; }
.tree li::before { content: ""; position: absolute; left: -1px; top: 16px; width: 10px; border-top: 1px dashed var(--line); }
.tree .node-label { font-size: 14px; }
.tree .node-label b { color: var(--accent); }
#relgraph svg { max-width: 100%; background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); }

/* ===== 三稿 ===== */
.draft-tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.draft-pane { display: none; }
.draft-pane.on { display: block; }
.draft-pane .content { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-height: 200px; }

/* ===== 表格 ===== */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
table.list th { background: var(--gold-soft); font-weight: 600; font-family: var(--serif); }
table.list tr:hover td { background: rgba(154, 123, 63, .05); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { text-align: center; padding: 16px 8px; }
.stat .num { font-size: 28px; font-weight: 700; color: var(--accent); font-family: var(--serif); }
.stat .lbl { font-size: 12px; color: var(--muted); }

/* ===== 会员 ===== */
.plan-current { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.banner { background: var(--accent-soft); border: 1px solid #e3c4ba; color: var(--accent-deep); border-radius: 8px; padding: 9px 14px; font-size: 13px; margin: 10px 0; }
.banner.ok { background: #e9f2ea; border-color: #c2d8c6; color: var(--ok); }
.banner.gold { background: var(--gold-soft); border-color: #ddcda4; color: var(--gold); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: r .7s linear infinite; vertical-align: -2px; }
@keyframes r { to { transform: rotate(360deg); } }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.right { margin-left: auto; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* 支付弹窗 */
#pay-qr { display: block; width: 240px; max-width: 80vw; margin: 12px auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.pay-methods { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.pay-methods .chip.on { background: var(--accent); border-color: var(--accent); }
.pay-amount { text-align: center; font-size: 30px; color: var(--accent); font-weight: 700; font-family: var(--serif); }
.pay-tip { text-align: center; font-size: 13px; color: var(--muted); min-height: 38px; }

/* 表格内小按钮（后台确认收款等） */
button.mini {
  padding: 4px 12px; font-size: 12px; line-height: 1.6;
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  letter-spacing: .5px;
}
button.mini:hover { filter: brightness(1.08); }
button.mini:disabled { background: #b9b1a4; cursor: default; }

/* 发布页：合计与支付条（吸底） */
.pub-sum {
  position: sticky; bottom: 10px; z-index: 6;
  border: 2px solid var(--accent); box-shadow: 0 8px 24px rgba(64, 42, 34, .18);
}
#pub-art-title, #pub-art-content, #we-content { width: 100%; box-sizing: border-box; }

/* ===== H5 适配 ===== */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 8px 10px; overflow-x: auto; border-right: none; border-bottom: 3px solid var(--accent); }
  .sidebar .logo { border: none; padding: 0 10px; }
  .sidebar .logo .name { font-size: 16px; white-space: nowrap; }
  .sidebar .logo .seal { width: 32px; height: 32px; font-size: 11px; }
  .sidebar .logo small { display: none; }
  .sidebar nav { display: flex; padding: 0; }
  .sidebar nav a { white-space: nowrap; padding: 6px 10px; font-size: 13px; }
  .sidebar .me { border: none; padding: 0 8px; white-space: nowrap; }
  .main { padding: 16px 14px 60px; }
  .hero { padding: 60px 16px 40px; }
  .hero h1 { font-size: 34px; letter-spacing: 6px; }
  .chat-box { height: 380px; }
  .dong-card { flex-direction: column; }
}

/* ================= 首页装修模块（后台「网站装修」） ================= */
#home-blocks { max-width: 1080px; margin: 0 auto; padding: 6px 20px 10px; }
.hb-divider { display: flex; justify-content: center; margin: 2px 0; }
.hb-divider svg { width: min(560px, 86%); height: 30px; }
.hb-block { margin: 10px 0 18px; }
.hb-notice { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, rgba(216,185,122,.14), rgba(216,185,122,.05)); border: 1px solid rgba(216,185,122,.45); border-radius: 14px; padding: 16px 20px; }
.hb-notice-seal { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 10px; font-weight: 700; }
.hb-notice b { font-size: 15px; }
.hb-notice p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.hb-sub { margin: 2px 0 8px; font-size: 13px; }
.hb-richtext, .hb-image { background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.hb-richtext h3, .hb-image h3 { font-size: 18px; margin-bottom: 6px; }
.hb-richtext p { margin: 8px 0; line-height: 1.9; font-size: 14px; }
.hb-image img { width: 100%; border-radius: 10px; margin: 10px 0; display: block; }
.hb-linkbanner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: linear-gradient(120deg, var(--accent), #a8442e); color: #fff; border-radius: 14px; padding: 18px 24px; }
.hb-linkbanner b { font-size: 16px; letter-spacing: 1px; }
.hb-linkbanner span { opacity: .92; font-size: 13px; }
.hb-linkbanner .hb-btn { background: #fff; color: var(--accent); border: none; }
.hb-btn { margin-top: 10px; display: inline-block; }

/* ================= 发布 · 媒介比价网式筛选条与底部合计栏 ================= */
.frow { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; font-size: 13px; }
.frow:last-child { border-bottom: none; }
.flabel { color: #8a8378; flex: 0 0 76px; padding-top: 3px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchips .chip { cursor: pointer; font-size: 12px; padding: 3px 12px; }
.pub-fixedbar { position: sticky; bottom: 8px; z-index: 6; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 8px 22px rgba(43,38,34,.14); }
.pub-notice { color: #c0392b; font-size: 13px; line-height: 1.9; background: #fdf3f0; border: 1px solid #f2c9be; border-radius: 8px; padding: 9px 14px; }
