:root {
  --bg: #f7f4ee;
  --bg-soft: #efeae0;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfaf3;
  --ink: #2a2d35;
  --ink-soft: #5a5e68;
  --ink-mute: #8a8e98;
  --line: #e3ddd0;
  --line-soft: #ece7da;
  --bronze: #b58a4b;
  --bronze-light: #d6b277;
  --bronze-soft: #f1e4c7;
  --cinnabar: #a8331f;
  --cinnabar-soft: #f3d9d2;
  --jade: #5b8c7b;
  --jade-soft: #d6e5dd;
  --indigo: #3d5a80;
  --indigo-soft: #d6dfe9;
  --p0: #a8331f;
  --p1: #b58a4b;
  --p2: #6b7785;
  --p3: #a8a39a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 15px;
}
h1,h2,h3,h4 { font-family: "Source Han Serif CN","Noto Serif SC","Songti SC",serif; font-weight: 600; letter-spacing: .5px; }
a { color: inherit; text-decoration: none; }

/* Navbar */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(247,244,238,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-family: "Source Han Serif CN",serif; font-size: 1.05rem; font-weight: 600; letter-spacing: 2px; }
.nav-brand .dot { color: var(--cinnabar); }
.nav-links { display: flex; gap: 8px; }
.nav-link { padding: 6px 14px; font-size: .88rem; color: var(--ink-soft); border-radius: 16px; transition: all .2s; cursor: pointer; }
.nav-link:hover { background: var(--bronze-soft); color: var(--bronze); }
.nav-link.active { background: var(--ink); color: #fff; }

/* Hero */
.hero { max-width: 1280px; margin: 0 auto; padding: 80px 32px 60px; }
.hero-tag { display: inline-block; padding: 4px 12px; background: var(--bronze-soft); color: var(--bronze); font-size: .78rem; border-radius: 12px; margin-bottom: 20px; letter-spacing: 1px; }
.hero-title { font-size: 2.8rem; line-height: 1.3; margin-bottom: 16px; }
.hero-title .accent { color: var(--cinnabar); }
.hero-sub { font-size: 1.05rem; color: var(--ink-soft); max-width: 720px; margin-bottom: 32px; line-height: 1.8; }
.hero-meta { display: flex; gap: 32px; font-size: .85rem; color: var(--ink-mute); margin-bottom: 40px; }
.hero-meta strong { color: var(--ink); font-weight: 500; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: var(--ink); color: #fff; border-radius: 24px; font-size: .92rem; transition: all .2s; cursor: pointer; }
.hero-cta:hover { background: var(--cinnabar); transform: translateY(-1px); }
.hero-cta .arrow { transition: transform .2s; }
.hero-cta:hover .arrow { transform: translateX(3px); }

/* Section */
section { max-width: 1280px; margin: 0 auto; padding: 40px 32px; scroll-margin-top: 70px; }
.sec-head { margin-bottom: 20px; }
.sec-num { color: var(--bronze); font-size: .85rem; letter-spacing: 4px; margin-bottom: 8px; font-family: "Source Han Serif CN",serif; }
.sec-title { font-size: 2rem; margin-bottom: 12px; }
.sec-desc { font-size: .98rem; color: var(--ink-soft); max-width: 760px; line-height: 1.8; }

/* Layout section - compact */
.layout-stack { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.layout-core { text-align: center; padding: 16px 20px; background: linear-gradient(135deg,#2a2d35,#1f2229); color: #fff; border-radius: 10px; }
.layout-core h3 { color: var(--bronze-light); font-size: .95rem; margin-bottom: 4px; }
.layout-core p { color: rgba(255,255,255,.6); font-size: .82rem; margin-bottom: 8px; }
.layout-layers { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.layout-layer { padding: 4px 12px; background: rgba(214,178,119,.12); border: 1px solid rgba(214,178,119,.3); color: var(--bronze-light); border-radius: 6px; font-size: .75rem; }
.arrow-down { text-align: center; color: var(--bronze); font-size: 1.1rem; margin: 6px 0; }
.layout-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.layout-node { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg-card); }
.layout-node .role { display: inline-block; padding: 2px 6px; font-size: .65rem; border-radius: 6px; margin-bottom: 4px; }
.layout-node.supply .role { background: var(--jade-soft); color: var(--jade); }
.layout-node.consume .role { background: var(--bronze-soft); color: var(--bronze); }
.layout-node.spread .role { background: var(--indigo-soft); color: var(--indigo); }
.layout-node h4 { font-size: .88rem; margin-bottom: 4px; }
.layout-node .action { color: var(--ink-soft); font-size: .75rem; margin-bottom: 4px; }
.layout-node .flow { color: var(--ink-mute); font-size: .7rem; padding-top: 4px; border-top: 1px dashed var(--line); }

/* Flywheel */
.flywheel-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 40px; }
#flywheelChart { height: 380px; }
.flywheel-text h4 { font-size: 1.15rem; margin-bottom: 16px; }
.flywheel-text p { color: var(--ink-soft); margin-bottom: 12px; font-size: .92rem; }
.flywheel-text .tag { display: inline-block; padding: 2px 10px; background: var(--cinnabar-soft); color: var(--cinnabar); font-size: .78rem; border-radius: 10px; margin-right: 6px; margin-bottom: 6px; }

/* Cap Tabs */
.cap-tabs { display: flex; gap: 8px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.cap-tab { padding: 12px 24px; font-size: .95rem; color: var(--ink-mute); cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; }
.cap-tab:hover { color: var(--ink); }
.cap-tab.active { color: var(--ink); border-bottom-color: var(--cinnabar); font-weight: 500; }
.cap-pane { display: none; }
.cap-pane.active { display: block; animation: fadeIn .3s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.kb-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.kb-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; transition: all .2s; }
.kb-card:hover { border-color: var(--bronze); }
.kb-card .kb-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.kb-card .kb-value { font-size: .85rem; color: var(--bronze); margin-bottom: 16px; }
.kb-layer { padding: 10px 14px; background: var(--bg-soft); border-left: 3px solid var(--bronze); border-radius: 6px; margin-bottom: 8px; font-size: .83rem; color: var(--ink-soft); }
.kb-layer .lv { color: var(--cinnabar); font-weight: 500; margin-right: 6px; }
.kb-card .kb-source { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .78rem; color: var(--ink-mute); }
.kb-card .kb-source strong { color: var(--ink-soft); }

.skill-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.skill-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; position: relative; transition: all .2s; }
.skill-card:hover { border-color: var(--bronze); transform: translateY(-2px); }
.skill-card .skill-name { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.skill-card .skill-desc { font-size: .82rem; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.6; }
.skill-meta { font-size: .75rem; color: var(--ink-mute); padding-top: 12px; border-top: 1px dashed var(--line); }
.skill-meta div { margin-bottom: 4px; }
.skill-meta strong { color: var(--ink-soft); }
.skill-feasible { position: absolute; top: 16px; right: 16px; font-size: .7rem; padding: 2px 8px; border-radius: 10px; }
.skill-feasible.high { background: var(--jade-soft); color: var(--jade); }
.skill-feasible.mid { background: var(--bronze-soft); color: var(--bronze); }
.skill-feasible.low { background: var(--cinnabar-soft); color: var(--cinnabar); }

/* Agent Grid */
.agent-filters { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 28px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-group .filter-label { font-size: .82rem; color: var(--ink-mute); margin-right: 4px; }
.filter-chip { padding: 4px 12px; font-size: .8rem; background: var(--bg-soft); border: 1px solid transparent; color: var(--ink-soft); border-radius: 14px; cursor: pointer; transition: all .15s; }
.filter-chip:hover { background: var(--bronze-soft); color: var(--bronze); }
.filter-chip.active { background: var(--ink); color: #fff; }

.agent-section-label { font-family: "Source Han Serif CN",serif; font-size: 1.1rem; margin: 24px 0 8px; display: flex; align-items: center; gap: 12px; }
.agent-section-label::before { content: ''; width: 4px; height: 18px; background: var(--cinnabar); border-radius: 2px; }
.agent-section-label .count { font-size: .78rem; color: var(--ink-mute); font-family: -apple-system,sans-serif; font-weight: normal; }

/* Agent section - split layout */
.agent-split { display: grid; grid-template-columns: 380px 1fr; gap: 20px; min-height: 600px; }
.agent-left { max-height: 75vh; overflow-y: auto; padding-right: 8px; }
.agent-left::-webkit-scrollbar { width: 4px; }
.agent-left::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.agent-right { position: sticky; top: 80px; max-height: 80vh; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.agent-right::-webkit-scrollbar { width: 4px; }
.agent-right::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.scene-block { margin-bottom: 12px; }
.scene-label { font-family: "Source Han Serif CN",serif; font-size: .9rem; color: var(--ink); margin-bottom: 6px; padding-left: 12px; border-left: 3px solid var(--cinnabar); }
.scene-desc { font-size: .78rem; color: var(--ink-mute); line-height: 1.5; margin-bottom: 8px; display: none; }

.agent-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 7px 12px; border-radius: 8px; cursor: pointer; transition: all .15s; gap: 8px; margin-bottom: 2px; font-size: .82rem; }
.agent-row:hover { background: var(--bg-soft); }
.agent-row.active { background: var(--bronze-soft); border: 1px solid var(--bronze); }
.agent-row .ar-left { display: flex; align-items: center; gap: 8px; }
.agent-row .ar-name { font-weight: 500; color: var(--ink); white-space: nowrap; }
.agent-row .ar-right { display: flex; align-items: center; gap: 6px; justify-self: start; }
.agent-row .ar-end { font-size: .7rem; padding: 1px 6px; border-radius: 8px; background: var(--bg-soft); color: var(--ink-mute); }
.agent-row .ar-user { font-size: .7rem; color: var(--ink-mute); }
.agent-row .ar-badge { font-size: .65rem; padding: 1px 6px; border-radius: 8px; }
.agent-row .ar-badge.online { background: var(--jade); color: #fff; }
.agent-row .ar-badge.P0 { background: var(--cinnabar); color: #fff; }
.agent-row .ar-badge.P1 { background: var(--bronze); color: #fff; }
.agent-row .ar-badge.P2 { background: #ece7da; color: var(--ink-soft); }
.agent-row .ar-badge.P3 { background: #f0ede5; color: var(--ink-mute); }

/* Right panel detail */
.right-detail h3 { font-size: 1.2rem; margin-bottom: 4px; }
.right-detail .rd-position { font-size: .85rem; color: var(--ink-soft); margin-bottom: 16px; line-height: 1.6; }
.right-detail .rd-section { margin-bottom: 14px; }
.right-detail .rd-label { font-size: .72rem; color: var(--bronze); letter-spacing: 1px; margin-bottom: 6px; font-weight: 500; }
.right-detail .rd-content { font-size: .85rem; color: var(--ink); line-height: 1.6; }
.right-detail .io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.right-detail .io-box { padding: 10px 12px; background: var(--bg-soft); border-radius: 6px; font-size: .8rem; line-height: 1.5; }
.right-detail .io-box.input { border-left: 3px solid var(--jade); }
.right-detail .io-box.output { border-left: 3px solid var(--cinnabar); }
.right-detail .io-box .io-lab { font-size: .68rem; color: var(--ink-mute); margin-bottom: 4px; }
.right-detail .skill-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.right-detail .skill-chip { padding: 2px 8px; background: var(--bronze-soft); color: var(--bronze); border-radius: 10px; font-size: .72rem; }
.right-detail .diff-box { font-size: .85rem; color: var(--ink); line-height: 1.6; }
.right-detail .radar-chart { height: 200px; margin-top: 8px; }
.right-detail .flow-wrapper { margin-top: 12px; }

/* Hide old agent-grid styles in this context */
.agent-grid { display: none; }

/* Coop toggle cards */
.coop-toggle-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; cursor: pointer; transition: all .2s; }
.coop-toggle-card:hover { border-color: var(--bronze); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(181,138,75,.08); }

/* Workspace tab */
.ws-tab { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.45); cursor: pointer; padding: 7px 18px; border-radius: 20px; transition: all .3s cubic-bezier(.25,.1,.25,1); border: 1px solid transparent; white-space: nowrap; }
.ws-tab:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.05); }
.ws-tab.active { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); font-weight: 600; }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 16px; }
.agent-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; cursor: pointer; transition: all .2s; position: relative; overflow: hidden; }
.agent-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--p2); }
.agent-card[data-priority="P0"]::before { background: var(--p0); }
.agent-card[data-priority="P1"]::before { background: var(--p1); }
.agent-card[data-priority="P2"]::before { background: var(--p2); }
.agent-card[data-priority="P3"]::before { background: var(--p3); }
.agent-card[data-priority="online"]::before { background: var(--jade); }
.agent-card:hover { border-color: var(--bronze); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(181,138,75,.12); }
.agent-card.expanded { border-color: var(--bronze); background: var(--bg-card-hover); }
.agent-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.agent-card-head .name { font-size: 1.05rem; font-weight: 600; font-family: "Source Han Serif CN",serif; }
.priority-badge { font-size: .72rem; padding: 2px 8px; border-radius: 10px; font-weight: 500; flex-shrink: 0; margin-left: 8px; }
.priority-badge.P0 { background: var(--cinnabar); color: #fff; }
.priority-badge.P1 { background: var(--bronze); color: #fff; }
.priority-badge.P2 { background: #ece7da; color: var(--ink-soft); }
.priority-badge.P3 { background: #f0ede5; color: var(--ink-mute); }
.priority-badge.online { background: var(--jade); color: #fff; }
.agent-card .one-line { font-size: .85rem; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.6; }
.agent-card .know-how { font-size: .78rem; color: var(--ink-mute); padding: 8px 10px; background: var(--bg-soft); border-radius: 6px; margin-bottom: 12px; line-height: 1.55; }
.agent-card .know-how .label { color: var(--bronze); font-weight: 500; margin-right: 4px; }
.agent-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.user-tag { font-size: .74rem; color: var(--ink-mute); }
.expand-hint { font-size: .74rem; color: var(--bronze); cursor: pointer; }

/* Detail Panel */
.agent-detail { grid-column: 1 / -1; background: var(--bg-card); border: 1px solid var(--bronze); border-radius: 16px; padding: 24px; display: none; animation: detailIn .35s; }
.agent-detail.show { display: block; }
@keyframes detailIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-head .left h3 { font-size: 1.3rem; margin-bottom: 4px; }
.detail-head .position { color: var(--ink-soft); font-size: .88rem; max-width: 600px; }
.detail-head .position .accent { color: var(--cinnabar); font-weight: 500; }
.detail-close { background: var(--bg-soft); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--ink-soft); font-size: 1.2rem; transition: all .2s; }
.detail-close:hover { background: var(--cinnabar); color: #fff; }
.detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-block { margin-bottom: 12px; }
.detail-block .blk-title { font-size: .75rem; color: var(--bronze); letter-spacing: 2px; margin-bottom: 6px; font-weight: 500; }
.detail-block .blk-content { font-size: .88rem; color: var(--ink); line-height: 1.6; }
.detail-block ul { padding-left: 16px; color: var(--ink-soft); }
.detail-block li { margin-bottom: 2px; font-size: .85rem; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-chip { padding: 3px 10px; background: var(--bronze-soft); color: var(--bronze); border-radius: 12px; font-size: .75rem; }
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.io-box { padding: 10px 12px; background: var(--bg-soft); border-radius: 8px; font-size: .82rem; line-height: 1.5; }
.io-box .io-lab { font-size: .7rem; color: var(--ink-mute); margin-bottom: 4px; letter-spacing: 1px; }
.io-box.input { border-left: 3px solid var(--jade); }
.io-box.output { border-left: 3px solid var(--cinnabar); }
.diff-box { padding: 10px 14px; background: linear-gradient(135deg,#fdf8ec,#faf3e0); border-radius: 8px; font-size: .85rem; line-height: 1.6; border: 1px solid var(--bronze-soft); }
.radar-chart { height: 220px; }
.detail-section-title { grid-column: 1 / -1; font-family: "Source Han Serif CN",serif; font-size: 1rem; margin: 8px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 10px; }
.detail-section-title::before { content: '◆'; color: var(--cinnabar); font-size: .8rem; }
.flow-wrapper { grid-column: 1 / -1; margin-top: 6px; }
.flow-wrapper .flow-hint { font-size: .82rem; color: var(--ink-mute); margin-bottom: 14px; }

/* Chatflow embed (dark) */
.chat-container { background: #1f2229; border-radius: 12px; padding: 24px; border: 1px solid #2a2d35; }
.chat-bubble { margin-bottom: 16px; display: flex; gap: 10px; }
.chat-bubble.user { justify-content: flex-end; }
.chat-bubble.agent { justify-content: flex-start; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; flex-shrink: 0; }
.chat-bubble.user .chat-avatar { background: #3a3e48; color: #ccc; }
.chat-bubble.agent .chat-avatar { background: var(--bronze-light); color: #1f2229; font-weight: bold; }
.chat-content { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: .85rem; line-height: 1.7; color: #e8e8e8; }
.chat-bubble.user .chat-content { background: #2a3a4a; border-bottom-right-radius: 4px; }
.chat-bubble.agent .chat-content { background: #2a2d35; border-bottom-left-radius: 4px; border: 1px solid #3a3e48; }
.chat-content table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .78rem; }
.chat-content th { background: rgba(214,178,119,.12); color: var(--bronze-light); padding: 6px 8px; text-align: left; border-bottom: 1px solid #3a3e48; }
.chat-content td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.05); color: #b0b3bb; }
.chat-content .highlight { color: var(--bronze-light); font-weight: 500; }
.chat-content .ref { color: #6fb39e; font-size: .75rem; }
.chat-content h4 { color: var(--bronze-light); margin: 8px 0 4px; font-size: .88rem; font-family: "Source Han Serif CN",serif; }
.chat-content ul { padding-left: 16px; color: #b0b3bb; }
.chat-content li { margin-bottom: 4px; }

/* Phone frame (mini-program) */
.phone-frame { width: 320px; margin: 0 auto; background: #1f2229; border-radius: 24px; padding: 20px 16px; border: 2px solid #2a2d35; }
.phone-frame::before { content: ''; display: block; width: 80px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; margin: 0 auto 16px; }
.share-card { background: linear-gradient(135deg,#14171c,#1f2229); border-radius: 12px; overflow: hidden; border: 1px solid #2a2d35; }
.share-card-header { padding: 16px; text-align: center; }
.share-card-header .icon { font-size: 2.5rem; margin-bottom: 8px; }
.share-card-header h3 { color: var(--bronze-light); font-size: 1rem; margin-bottom: 4px; font-family: "Source Han Serif CN",serif; }
.share-card-header p { color: #8a8e98; font-size: .75rem; }
.share-card-body { padding: 16px; background: rgba(0,0,0,.2); }
.share-card-body .result-label { color: var(--bronze); font-size: .7rem; letter-spacing: 1px; margin-bottom: 8px; }
.share-card-body .result-text { color: #e8e8e8; font-size: .9rem; line-height: 1.6; margin-bottom: 12px; }
.share-card-body .result-quote { color: var(--bronze-light); font-style: italic; font-size: .85rem; border-left: 2px solid var(--bronze); padding-left: 10px; margin: 12px 0; }
.share-card-footer { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #2a2d35; }
.share-card-footer .qr { width: 40px; height: 40px; background: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: .5rem; color: #333; }
.share-card-footer .brand { color: #8a8e98; font-size: .7rem; }
.dialog-interface { padding: 12px; }
.dialog-msg { margin-bottom: 10px; display: flex; gap: 8px; align-items: flex-start; }
.dialog-msg .avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .65rem; flex-shrink: 0; }
.dialog-msg .avatar.relic { background: var(--bronze-light); color: #1f2229; }
.dialog-msg .avatar.user-avatar { background: #3a3e48; color: #ccc; }
.dialog-msg .msg-bubble { background: rgba(0,0,0,.3); padding: 8px 12px; border-radius: 10px; font-size: .8rem; color: #e8e8e8; max-width: 220px; }
.dialog-msg.from-relic .msg-bubble { border: 1px solid #3a3e48; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.mini-grid .mini-card { text-align: center; padding: 10px; background: rgba(0,0,0,.2); border-radius: 8px; border: 1px solid #2a2d35; }
.mini-grid .mini-card .emoji { font-size: 1.5rem; margin-bottom: 4px; }
.mini-grid .mini-card .label { font-size: .7rem; color: #8a8e98; }

/* Section 4: Coop */
.coop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.token-flywheel { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
#tokenChart { height: 360px; }
.coop-side { display: flex; flex-direction: column; gap: 16px; }
.token-rule { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.token-rule .rule-name { font-size: .82rem; color: var(--bronze); letter-spacing: 2px; margin-bottom: 8px; }
.token-rule .rule-desc { font-size: .9rem; line-height: 1.7; }
.activity-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 32px; }
.activity-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.activity-card .act-type { font-size: .78rem; color: var(--cinnabar); letter-spacing: 1px; margin-bottom: 6px; }
.activity-card h4 { font-size: 1.05rem; margin-bottom: 12px; }
.activity-card .act-form { color: var(--ink-soft); font-size: .85rem; margin-bottom: 12px; }
.activity-card .act-eg { font-size: .82rem; color: var(--ink-soft); padding: 10px 12px; background: var(--bg-soft); border-radius: 6px; margin-bottom: 12px; line-height: 1.6; }
.activity-card .act-reward { font-size: .8rem; color: var(--bronze); }
.platform-timeline { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.platform-timeline h4 { margin-bottom: 14px; font-size: 1rem; }
.timeline-track { position: relative; padding: 20px 0; }
.timeline-line { position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline-stages { display: grid; grid-template-columns: repeat(3,1fr); position: relative; }
.timeline-stage { text-align: center; position: relative; }
.timeline-stage .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bronze); margin: 0 auto 12px; position: relative; z-index: 2; border: 3px solid var(--bg-card); box-shadow: 0 0 0 2px var(--bronze); }
.timeline-stage .stage-name { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.timeline-stage .stage-items { list-style: none; font-size: .82rem; color: var(--ink-soft); line-height: 1.7; }
.timeline-stage .stage-items li::before { content: '·'; color: var(--bronze); margin-right: 6px; }

/* Phase */
.phase-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 48px; }
.phase-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.phase-card.p0 { border-top: 3px solid var(--p0); }
.phase-card.p1 { border-top: 3px solid var(--p1); }
.phase-card.p2 { border-top: 3px solid var(--p2); }
.phase-card.p3 { border-top: 3px solid var(--p3); }
.phase-card .phase-name { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.phase-card .phase-time { font-size: .78rem; color: var(--ink-mute); margin-bottom: 16px; }
.phase-card .phase-section { margin-bottom: 14px; }
.phase-card .phase-section .lab { font-size: .72rem; color: var(--bronze); letter-spacing: 1px; margin-bottom: 6px; }
.phase-card .phase-section .item { display: inline-block; padding: 2px 8px; background: var(--bg-soft); font-size: .78rem; border-radius: 10px; margin: 2px 4px 2px 0; color: var(--ink-soft); }
.matrix-wrap { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.matrix-wrap h4 { font-size: 1.1rem; margin-bottom: 6px; }
.matrix-wrap .matrix-hint { font-size: .85rem; color: var(--ink-mute); margin-bottom: 20px; }
#matrixChart { height: 580px; }
.value-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 40px; }
.value-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: all .3s; }
.value-card .num { font-family: "Source Han Serif CN",serif; font-size: 2.2rem; color: var(--bronze); margin-bottom: 6px; line-height: 1; }
.value-card h4 { font-size: 1rem; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: .88rem; line-height: 1.7; }
.value-card.hover-reveal p { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .3s, opacity .3s; margin: 0; }
.value-card.hover-reveal:hover p { max-height: 120px; opacity: 1; margin-top: 8px; }
.value-card.hover-reveal:hover { border-color: var(--bronze); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(181,138,75,.1); }
footer { text-align: center; padding: 40px; color: var(--ink-mute); font-size: .82rem; border-top: 1px solid var(--line); margin-top: 60px; }

@media(max-width:960px){
  .hero-title{font-size:2rem}
  .layout-grid,.kb-grid,.skill-grid,.coop-grid,.activity-grid,.phase-grid,.value-grid,.flywheel-wrap,.timeline-stages,.detail-body,.io-grid{grid-template-columns:1fr!important}
  .nav-links{display:none}
  section{padding:50px 20px}
}
