/* ============================================================
   烧火灶台 — 统一风格模板「炭火少年」
   融合：暗黑炭火(主) + 年轻社区(少年层) + AI工具站(霓虹点缀)
   深色优先，浅色为木纸底色
   ============================================================ */

/* ---------- 变量：深色(炭黑) 默认 ---------- */
:root,
[data-theme="dark"] {
  --bg: #060A14;
  --bg-2: #0A1122;
  --card: #0E1830;
  --card-2: #13213D;
  --line: rgba(96, 158, 255, 0.14);
  --line-strong: rgba(96, 158, 255, 0.30);
  --text: #E8F0FF;
  --muted: #8BA0C4;
  --ash: #6B7FA6;
  --ember: #38BDF8;
  --flame: #3B82F6;
  --gold: #7DD3FC;
  --neon: #22D3EE;
  --sky: #38BDF8;
  --pink: #A78BFA;
  --marker: #5EEAD4;
  --ink: #03060E;
  --tech-grad: linear-gradient(135deg, #2563EB 0%, #06B6D4 55%, #8B5CF6 100%);
  --shadow: 0 12px 34px rgba(2, 8, 30, 0.55);
  --glow: 0 0 26px rgba(56, 189, 248, 0.38);
  --radius: 16px;
  --paper: rgba(56, 189, 248, 0.06);
  --glow1: rgba(37, 99, 235, 0.20);
  --glow2: rgba(6, 182, 212, 0.16);
  --grid-line: rgba(96, 158, 255, 0.05);
}

/* ---------- 变量：浅色(木纸) ---------- */
[data-theme="light"] {
  --bg: #EEF4FF;
  --bg-2: #E3EDFF;
  --card: #FFFFFF;
  --card-2: #F2F7FF;
  --line: #CFE0FB;
  --line-strong: #AEC8F5;
  --text: #0E1B33;
  --muted: #5B7196;
  --ash: #93A6C6;
  --ember: #0EA5E9;
  --flame: #2563EB;
  --gold: #BAE6FD;
  --neon: #0891B2;
  --sky: #0284C7;
  --pink: #7C3AED;
  --marker: #0EA5E9;
  --ink: #0E1B33;
  --tech-grad: linear-gradient(135deg, #2563EB 0%, #06B6D4 55%, #8B5CF6 100%);
  --shadow: 0 8px 22px rgba(30, 80, 160, 0.16);
  --glow: 0 0 18px rgba(37, 99, 235, 0.22);
  --paper: rgba(37, 99, 235, 0.06);
  --glow1: rgba(37, 99, 235, 0.14);
  --glow2: rgba(6, 182, 212, 0.10);
  --grid-line: rgba(37, 99, 235, 0.05);
}

/* ---------- 变量：烧火少年(炭火暖色 · 经典卡通) ---------- */
[data-theme="ember"] {
  --bg: #171310;
  --bg-2: #211912;
  --card: #261E16;
  --card-2: #2E241A;
  --line: rgba(255, 245, 230, 0.10);
  --line-strong: rgba(255, 245, 230, 0.20);
  --text: #F3EAD9;
  --muted: #A99A84;
  --ash: #817765;
  --ember: #F4A259;
  --flame: #E8642C;
  --gold: #F5C977;
  --neon: #46D6A0;
  --sky: #67E8F9;
  --pink: #F0A9C9;
  --marker: #FFE14D;
  --ink: #100C08;
  --tech-grad: linear-gradient(135deg, #E8642C 0%, #F4A259 55%, #E8642C 100%);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --glow: 0 0 22px rgba(232, 100, 44, 0.30);
  --radius: 16px;
  --paper: rgba(245, 201, 119, 0.06);
  --glow1: rgba(232, 100, 44, 0.16);
  --glow2: rgba(245, 201, 119, 0.12);
  --grid-line: rgba(245, 201, 119, 0.04);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 620px at 82% -8%, var(--glow1), transparent 60%),
    radial-gradient(900px 520px at -5% 0%, var(--glow2), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* 科技感网格底纹（固定、不拦截点击；颜色随主题变化） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 80%);
          mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 80%);
}

/* 烧火少年主题下，Logo 火苗恢复暖色 */
[data-theme="ember"] .logo svg rect { fill: #8A5A33; }
[data-theme="ember"] .logo svg path { fill: #E8642C; }
[data-theme="ember"] .logo svg path + path { fill: #F5C977; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--marker); color: #2A2014; }

/* ---------- 少年感字体(联网时启用，离线回退系统字体) ---------- */
.zcool { font-family: "ZCOOL KuaiLe", -apple-system, "PingFang SC", sans-serif; font-weight: 400; }

/* ---------- 涂鸦 / 手绘点缀 ---------- */
.doodle { pointer-events: none; position: absolute; opacity: 0.7; }

/* 马克笔高亮 */
.mark {
  background: linear-gradient(transparent 60%, var(--marker) 60%);
  padding: 0 2px;
  color: inherit;
  font-weight: 700;
}

/* 歪歪扭扭下划线 */
.squiggle { position: relative; white-space: nowrap; }
.squiggle::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: -4px; height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='7'%3E%3Cpath d='M0 4 Q5 0 10 4 T20 4 T30 4 T40 4' stroke='%2338BDF8' stroke-width='2' fill='none'/%3E%3C/svg%3E") repeat-x;
  background-size: 40px 7px;
}

/* ---------- 按钮 ---------- */
.btn-fire {
  background: var(--tech-grad);
  color: #fff; border: none; border-radius: 12px;
  padding: 9px 18px; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}
.btn-fire:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 6px 22px rgba(56, 189, 248, 0.6); }
.btn-ghost {
  background: transparent; color: var(--ember); border: 1.5px solid rgba(56, 189, 248, 0.55);
  border-radius: 12px; padding: 8px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.btn-ghost:hover { background: rgba(56, 189, 248, 0.14); transform: translateY(-2px); }
.btn-soft {
  background: var(--ember); color: #04101f; border: none; border-radius: 13px;
  padding: 9px 18px; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
  transition: transform 0.12s ease;
}
.btn-soft:hover { transform: translateY(-2px) rotate(1deg); }

/* ---------- 贴纸 / 徽章(少年层) ---------- */
.sticker {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: #2A2014;
  border: 2px solid var(--ink); border-radius: 22px;
  font-weight: 800; font-size: 13px; padding: 5px 14px;
  transform: rotate(-2.5deg);
  box-shadow: 3px 3px 0 var(--ink);
}
.sticker.alt { background: var(--neon); color: #08251C; }
.sticker.alt2 { background: var(--pink); color: #2A0E1C; }
.sticker.alt3 { background: var(--sky); color: #06222A; }

/* 撕纸胶带(半透明) */
.tape {
  position: absolute; width: 96px; height: 28px;
  background: rgba(244, 162, 89, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(1px);
}
[data-theme="light"] .tape { background: rgba(224, 122, 46, 0.30); }
.tape::before, .tape::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 8px;
  background: repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.25) 3px, rgba(255,255,255,0.25) 4px);
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 16px;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 19px; letter-spacing: 1px; }
.logo .slogan { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.nav-links { display: flex; gap: 2px; font-size: 14px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.nav-links a { padding: 7px 13px; border-radius: 11px; transition: background 0.15s, color 0.15s; }
.nav-links a:hover { background: var(--paper); color: var(--text); }
.nav-links a.active { color: var(--ember); background: var(--paper); }
.nav-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  transition: transform 0.15s ease, border-color 0.15s;
}
.theme-toggle:hover { transform: rotate(-12deg) scale(1.05); border-color: var(--line-strong); }

/* ---------- Hero ---------- */
.hero { padding: 60px 24px 30px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -150px; transform: translateX(-50%);
  width: 640px; height: 380px; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--glow1), transparent 64%);
}
.hero .inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero h1 { margin-top: 18px; font-size: clamp(32px, 6.5vw, 58px); font-weight: 900; line-height: 1.16; letter-spacing: 1px; }
.hero h1 .hl {
  background: linear-gradient(90deg, var(--ember), var(--gold), var(--flame));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 16px auto 0; color: var(--muted); font-size: 15.5px; max-width: 580px; }
.hero .cta { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .count { margin-top: 16px; font-size: 13px; color: var(--muted); }
.hero .count b { color: var(--ember); }

/* 今日引火 便签条 */
.kindle {
  position: relative; max-width: 720px; margin: 14px auto 0; padding: 16px 20px 16px 22px;
  background: var(--card); border: 1.5px dashed var(--ember); border-radius: 18px;
  display: flex; gap: 14px; align-items: flex-start;
  box-shadow: var(--shadow);
}
.kindle::before { content: "🔥"; position: absolute; left: -10px; top: -12px; font-size: 22px; transform: rotate(-12deg); }
.kindle .tag {
  flex-shrink: 0; font-size: 12px; font-weight: 800; color: #2A2014;
  background: var(--gold); padding: 4px 12px; border-radius: 20px;
  border: 1.5px solid var(--ink); transform: rotate(-2deg); box-shadow: 2px 2px 0 var(--ink);
}
.kindle .prompt { font-size: 14.5px; font-weight: 600; color: var(--text); }
.kindle .prompt small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- 板块标题 ---------- */
.section { padding: 36px 24px 6px; max-width: 1120px; margin: 0 auto; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section h2 { font-size: 22px; font-weight: 900; letter-spacing: 0.5px; display: flex; align-items: center; gap: 9px; }
.section h2 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 10px var(--flame); }
.section .sub { font-size: 12.5px; color: var(--muted); }
.section .filter { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.filter span {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); padding: 5px 13px; border-radius: 20px; cursor: pointer;
  transition: all 0.15s ease;
}
.filter span:hover { color: var(--text); border-color: var(--line-strong); }
.filter span.on { color: var(--ember); border-color: var(--ember); background: var(--paper); }

/* ---------- 瀑布流卡片(火棍) ---------- */
.masonry { max-width: 1120px; margin: 16px auto 0; padding: 0 24px; columns: 3; column-gap: 18px; }
@media (max-width: 920px) { .masonry { columns: 2; } }
@media (max-width: 560px) { .masonry { columns: 1; } }
.card {
  break-inside: avoid; margin-bottom: 18px; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
}
.card:hover { transform: translateY(-4px) rotate(-0.4deg); border-color: rgba(56, 189, 248, 0.5); box-shadow: var(--shadow), var(--glow); }
.card.picked { border-color: var(--flame); box-shadow: 0 0 0 2px var(--flame), var(--glow); }
.thumb { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; font-size: 46px; }
.thumb .flame {
  position: absolute; bottom: 9px; right: 11px; font-size: 17px;
  animation: flick 2.2s ease-in-out infinite;
}
@keyframes flick { 0%, 100% { transform: scale(1) rotate(-3deg); opacity: 0.92; } 50% { transform: scale(1.18) rotate(3deg); opacity: 1; } }
.card-body { padding: 13px 15px 15px; }
.card-body h3 { font-size: 15.5px; font-weight: 800; line-height: 1.4; }
.card-body .note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.card-foot { margin-top: 11px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-foot .tag { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 20px; }
.card-foot .tag.mine { color: var(--neon); border-color: rgba(70, 214, 160, 0.4); }
.card-foot .fire { margin-left: auto; font-size: 12.5px; font-weight: 800; color: var(--ember); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.card-foot .fire:hover { color: var(--flame); }

/* ---------- 公约 ---------- */
.pact { max-width: 1120px; margin: 44px auto; padding: 0 24px; }
.pact-in {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; position: relative; box-shadow: var(--shadow);
}
.pact-in h3 { font-size: 15px; color: var(--ember); letter-spacing: 1px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pact-in ul { list-style: none; }
.pact-in li { font-size: 13.5px; color: var(--muted); padding: 5px 0; }
.pact-in li b { color: var(--text); font-weight: 800; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 24px 30px; font-size: 13px; color: var(--muted); background: var(--bg-2); }
.foot-top { max-width: 1120px; margin: 0 auto; display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.foot-top .brand { flex: 1 1 320px; min-width: 260px; }
.foot-top .logo-sm { font-family: "ZCOOL KuaiLe", system-ui, sans-serif; font-size: 19px; color: var(--text); letter-spacing: .5px; }
.foot-top .tag { margin: 10px 0 6px; font-size: 15px; color: var(--ember); font-weight: 800; letter-spacing: .5px; }
.foot-top .sub { line-height: 1.7; font-size: 12.5px; }
.foot-cols { flex: 1 1 360px; display: flex; gap: 34px; flex-wrap: wrap; }
.foot-cols > div { display: flex; flex-direction: column; gap: 7px; }
.foot-cols b { color: var(--text); font-size: 12px; letter-spacing: 2px; margin-bottom: 3px; opacity: .8; }
.foot-cols a { color: var(--muted); font-weight: 700; }
.foot-cols a:hover { color: var(--ember); }
.foot-bottom { max-width: 1120px; margin: 26px auto 0; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; font-size: 12px; }
.foot-bottom b { color: var(--ember); }

/* ---------- 导航：更多下拉 ---------- */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; padding: 7px 13px; border-radius: 11px; font-weight: 700; color: var(--muted); user-select: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more:hover > summary { background: var(--paper); color: var(--text); }
.nav-more[open] > summary { color: var(--ember); background: var(--paper); }
.more-panel { position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; z-index: 40; }
.more-panel a { padding: 9px 12px; border-radius: 9px; color: var(--text); font-weight: 700; font-size: 13.5px; }
.more-panel a:hover { background: var(--paper); color: var(--ember); }
.more-panel a.active { color: var(--ember); background: var(--paper); }

/* ---------- 首页创作流转条 ---------- */
.flow { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.flow > span { font-weight: 800; letter-spacing: 2px; color: var(--ash); }
.flow a { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 8px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-weight: 800; font-size: 15px; text-decoration: none; transition: .15s; }
.flow a small { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: 1px; margin-top: 2px; }
.flow a:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-2px); }
.flow i { color: var(--ember); font-style: normal; font-size: 16px; }

/* ---------- 起锅页头 ---------- */
.hero-qi { background: radial-gradient(120% 120% at 80% 0%, var(--glow1), transparent 60%); }

/* ============================================================
   页面专属：柴房(个人主页)
   ============================================================ */
.profile { max-width: 1120px; margin: 0 auto; padding: 30px 24px 0; }
.profile-head {
  position: relative; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); overflow: hidden;
}
.profile-head .avatar {
  width: 92px; height: 92px; border-radius: 22px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--ember), var(--flame));
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 var(--ink); transform: rotate(-3deg);
}
.profile-head .info { flex: 1; min-width: 220px; }
.profile-head .info h1 { font-size: 24px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.profile-head .info .bio { margin-top: 6px; color: var(--muted); font-size: 14px; }
.profile-head .info .meta { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.profile-head .info .meta b { color: var(--ember); font-size: 16px; display: block; }
.stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat-pills .pill { font-size: 12px; font-weight: 700; color: var(--text); background: var(--card-2); border: 1px solid var(--line); padding: 5px 12px; border-radius: 20px; }

/* 柴房分栏 */
.wood-tabs { display: flex; gap: 8px; flex-wrap: wrap; max-width: 1120px; margin: 18px auto 0; padding: 0 24px; }
.wood-tabs .wt {
  font-size: 14px; font-weight: 800; color: var(--muted); cursor: pointer;
  padding: 9px 18px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--card);
  transition: all 0.15s ease;
}
.wood-tabs .wt:hover { color: var(--text); border-color: var(--line-strong); }
.wood-tabs .wt.on { color: #2A2014; background: var(--gold); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); transform: rotate(-1deg); }

/* ============================================================
   页面专属：星火集 / 烬书 / 集市 — 网格卡
   ============================================================ */
.grid { max-width: 1120px; margin: 18px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  cursor: pointer; position: relative;
}
.tile:hover { transform: translateY(-4px) rotate(-0.4deg); border-color: rgba(56, 189, 248, 0.5); box-shadow: var(--shadow), var(--glow); }
.tile .cover { height: 130px; display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative; }
.tile .cover .badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; color: #2A2014; background: var(--gold); padding: 3px 10px; border-radius: 20px; border: 1.5px solid var(--ink); }
.tile .body { padding: 14px 16px 16px; }
.tile .body h3 { font-size: 16px; font-weight: 800; }
.tile .body p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tile .body .foot { margin-top: 11px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tile .body .foot .fire { margin-left: auto; color: var(--ember); font-weight: 800; }

/* ============================================================
   页面专属：烤火间(论坛) — 漫画对话框
   ============================================================ */
.thread { max-width: 820px; margin: 18px auto 0; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; }
.post {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; position: relative; transition: border-color 0.15s;
}
.post:hover { border-color: var(--line-strong); }
.post .head { display: flex; align-items: center; gap: 11px; }
.post .ava { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: var(--card-2); border: 1px solid var(--line); flex-shrink: 0; }
.post .who { font-weight: 800; font-size: 14px; }
.post .who small { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: 12px; }
.post .kind { margin-left: auto; font-size: 11.5px; font-weight: 800; padding: 3px 11px; border-radius: 20px; }
.kind-team { background: rgba(70, 214, 160, 0.16); color: var(--neon); }
.kind-help { background: rgba(103, 232, 249, 0.14); color: var(--sky); }
.kind-fail { background: rgba(240, 169, 201, 0.16); color: var(--pink); }
.kind-swap { background: rgba(245, 201, 119, 0.16); color: var(--gold); }
.post .txt { margin-top: 11px; font-size: 14.5px; color: var(--text); }
.post .acts { margin-top: 12px; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.post .acts span { cursor: pointer; transition: color 0.15s; }
.post .acts span:hover { color: var(--ember); }

/* 围炉闲谈 气泡 */
.replies { margin-top: 12px; padding-left: 14px; border-left: 2px dashed var(--line-strong); display: flex; flex-direction: column; gap: 10px; }
.bubble {
  position: relative; background: var(--card-2); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 13px; font-size: 13.5px; max-width: 92%;
}
.bubble .nm { font-weight: 800; color: var(--ember); font-size: 12.5px; margin-right: 8px; }
.bubble::before { content: ""; position: absolute; left: -8px; top: 12px; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 8px solid var(--line); }

/* ============================================================
   页面专属：引火台(工具库)
   ============================================================ */
.tools { max-width: 1120px; margin: 18px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; position: relative; transition: transform 0.15s, border-color 0.15s;
}
.tool:hover { transform: translateY(-3px); border-color: rgba(244, 162, 89, 0.45); }
.tool .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--paper); margin-bottom: 12px; }
.tool h3 { font-size: 16px; font-weight: 800; }
.tool p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tool .go { margin-top: 12px; font-size: 12.5px; font-weight: 800; color: var(--ember); }

/* 灵感触发清单 / 便签 */
.prompts { max-width: 1120px; margin: 18px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.note {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; position: relative; transition: transform 0.15s;
}
.note:hover { transform: rotate(0.5deg) scale(1.02); }
.note .q { font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.note .by { margin-top: 10px; font-size: 11.5px; color: var(--muted); }

/* ============================================================
   玩法 / 名词 / 标签 页面
   ============================================================ */
.wrap { max-width: 920px; margin: 0 auto; padding: 30px 24px 0; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.block h2 { font-size: 20px; font-weight: 900; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.block h2 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ember); }
.block p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.terms-list { list-style: none; counter-reset: t; }
.terms-list li { font-size: 14px; color: var(--text); padding: 9px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 12px; }
.terms-list li:last-child { border-bottom: none; }
.terms-list li::before { counter-increment: t; content: counter(t); flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--ember); color: #2A2014; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 13px; }

.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gloss .item { background: var(--card-2); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; }
.gloss .item .k { font-weight: 900; font-size: 15px; color: var(--ember); }
.gloss .item .v { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 6px; }
.chip { font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--line); color: var(--text); background: var(--card-2); cursor: default; transition: all 0.15s; }
.chip:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-2px); }
.chip.c-media { border-color: rgba(103, 232, 249, 0.35); }
.chip.c-dir   { border-color: rgba(240, 169, 201, 0.4); }
.chip.c-style { border-color: rgba(70, 214, 160, 0.4); }

/* ============================================================
   递火棍 弹窗(演示)
   ============================================================ */
.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-mask.open { display: flex; }
.modal {
  width: 100%; max-width: 460px; background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow); position: relative;
  animation: pop 0.2s ease;
}
@keyframes pop { from { transform: scale(0.94) translateY(10px); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 19px; font-weight: 900; margin-bottom: 4px; }
.modal .desc { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.modal label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; color: var(--text); }
.modal input, .modal textarea, .modal select {
  width: 100%; background: var(--card); border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit; resize: vertical;
}
.modal input:focus, .modal textarea:focus, .modal select:focus { outline: none; border-color: var(--ember); }
.modal .row { display: flex; gap: 10px; margin-top: 20px; }
.modal .row button { flex: 1; }
.modal .close { position: absolute; top: 14px; right: 16px; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; background: none; border: none; }
.modal .close:hover { color: var(--flame); }

/* 提示气泡 */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ember); color: #2A2014; font-weight: 800; padding: 12px 22px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 200; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 通用页头 ---------- */
.page-head { text-align: center; padding: 46px 24px 6px; position: relative; }
.page-head h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 900; letter-spacing: 1px; }
.page-head h1 .hl { background: linear-gradient(90deg, var(--ember), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 12px auto 0; color: var(--muted); font-size: 14.5px; max-width: 600px; }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .nav { padding: 10px 14px; }
  .logo { font-size: 17px; }
  .nav-links { font-size: 13px; }
  .nav-links a { padding: 6px 9px; }
  .section, .masonry, .grid, .tools, .prompts, .thread, .profile, .wood-tabs, .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 40px 16px 20px; }
}

/* ============================================================
   卡片文件夹体系：整卡可点 + 详情页（build.py 生成）
   ============================================================ */
a.card, a.tile, a.post, a.note { display: block; color: inherit; }

.cardpage { max-width: 880px; margin: 0 auto; padding: 26px 24px 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.crumb a { color: var(--ember); font-weight: 800; }
.crumb a:hover { text-decoration: underline; }
.detail {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); position: relative;
}
.detail .cover-emoji { font-size: 84px; line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35)); }
.detail-cover {
  position: relative; height: 220px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--card-2), var(--bg-2));
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: 22px 24px 26px; }
.detail-body h1 { font-size: clamp(20px, 4vw, 27px); font-weight: 900; line-height: 1.3; }
.detail-body > .note { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.detail-meta { margin-top: 12px; font-size: 12.5px; color: var(--ash); display: flex; gap: 16px; flex-wrap: wrap; }
.detail-content { margin-top: 16px; border-top: 1.5px dashed var(--line-strong); padding-top: 16px; }
.detail-content p { color: var(--text); font-size: 14.5px; margin-bottom: 12px; line-height: 1.9; }
.detail-content p:last-child { margin-bottom: 0; }
.detail-tags { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-tags .tag { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); padding: 4px 12px; border-radius: 20px; }
.detail-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-replies { max-width: 880px; margin: 16px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.detail-replies .rp-t { font-size: 13px; font-weight: 900; color: var(--ember); letter-spacing: 1px; }
.related-h { max-width: 880px; margin: 34px auto 0; padding: 0 24px; font-size: 18px; font-weight: 900; display: flex; align-items: center; gap: 9px; }
.related-h .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 10px var(--flame); }
#related.masonry { max-width: 880px; margin-top: 14px; }
.backline { text-align: center; margin: 28px 0 6px; }
@media (max-width: 560px) {
  .cardpage { padding-left: 16px; padding-right: 16px; }
  .related-h { padding-left: 16px; padding-right: 16px; }
  .detail-cover { height: 170px; }
  .detail-body { padding: 18px 16px 22px; }
}

