/* ============================================================
   红色记忆馆 · 回忆录智能体  设计系统
   墨黑 × 中国红 × 金  |  玻璃拟态  |  圆 18px
   ============================================================ */
:root{
  --ink:#0C0909; --ink-2:#150E0E; --ink-3:#1F1515; --ink-4:#2A1C1C;
  --red:#D83A33; --red-2:#C8161D; --red-deep:#8F1118; --red-soft:#F7E9E7;
  --gold:#D9A441; --gold-2:#C8893A; --gold-light:#F2C97D;
  --paper:#FBF7F0; --paper-2:#F4ECDD;
  --white:#fff;
  --g50:#FAF7F4; --g100:#F1EBE4; --g200:#E3D8CC; --g400:#A89886;
  --g600:#6E5F50; --g800:#352B23;
  --grad-red:linear-gradient(135deg,#E54840 0%,#C8161D 55%,#9B1419 100%);
  --grad-gold:linear-gradient(135deg,#F2C97D 0%,#D9A441 55%,#B97F26 100%);
  --grad-warm:linear-gradient(135deg,#F2C97D 0%,#D83A33 100%);
  --grad-ink:linear-gradient(160deg,#1F1515 0%,#0C0909 100%);
  --radius:18px; --radius-sm:12px; --radius-lg:26px;
  --ease:cubic-bezier(.22,.61,.36,1);
  --shadow-s:0 4px 16px rgba(40,12,10,.08);
  --shadow-m:0 12px 36px rgba(40,12,10,.12);
  --shadow-l:0 30px 80px rgba(20,5,4,.45);
  --font:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",sans-serif;
  --serif:"Songti SC","STSong","SimSun",serif;
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{font-family:var(--font);background:var(--paper);color:var(--g800);line-height:1.65;-webkit-font-smoothing:antialiased;overflow-x:hidden;}
a{text-decoration:none;color:inherit;}
button{font-family:var(--font);}
::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-thumb{background:rgba(120,60,50,.25);border-radius:8px;border:2px solid transparent;background-clip:padding-box;}
::-webkit-scrollbar-thumb:hover{background:rgba(120,60,50,.45);background-clip:padding-box;}
.wrap{max-width:1200px;margin:0 auto;padding:0 24px;}
.sec{padding:110px 0;position:relative;}

/* ---------- 通用按钮 ---------- */
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 24px;border-radius:11px;font-size:14.5px;font-weight:500;border:none;cursor:pointer;transition:.25s var(--ease);white-space:nowrap;}
.btn svg{width:17px;height:17px;}
.btn-red{background:var(--grad-red);color:#fff;box-shadow:0 8px 24px rgba(200,22,29,.32);}
.btn-red:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(200,22,29,.45);}
.btn-gold{background:var(--grad-gold);color:#3a2506;box-shadow:0 8px 22px rgba(201,137,58,.35);}
.btn-gold:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(201,137,58,.45);}
.btn-ghost{background:rgba(255,255,255,.07);color:#fff;border:1px solid rgba(255,255,255,.2);}
.btn-ghost:hover{background:rgba(255,255,255,.15);}
.btn-outline{background:transparent;color:var(--red-deep);border:1.5px solid rgba(200,22,29,.35);}
.btn-outline:hover{border-color:var(--red-2);background:var(--red-soft);}
.btn-sm{padding:8px 15px;font-size:13px;border-radius:9px;}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important;}

/* ============================================================
   首页 · 导航
   ============================================================ */
.nav{position:fixed;top:0;left:0;right:0;z-index:100;transition:.3s var(--ease);border-bottom:1px solid transparent;}
.nav.scrolled{background:rgba(12,9,9,.85);backdrop-filter:blur(20px);border-bottom-color:rgba(255,255,255,.07);}
.nav-in{display:flex;align-items:center;justify-content:space-between;height:72px;}
.brand{display:flex;align-items:center;gap:12px;font-size:21px;font-weight:700;letter-spacing:.04em;color:#fff;}
.brand-mark{width:42px;height:42px;border-radius:12px;background:var(--grad-red);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(200,22,29,.5),inset 0 0 0 1px rgba(255,255,255,.25);flex-shrink:0;}
.brand-mark svg{width:23px;height:23px;color:#fff;}
.brand small{display:block;font-size:10px;font-weight:400;letter-spacing:.22em;color:var(--gold-light);margin-top:1px;}
.nav-links{display:flex;gap:34px;align-items:center;}
.nav-links a{font-size:14px;color:rgba(255,255,255,.7);transition:.2s;}
.nav-links a:hover{color:#fff;}

/* ============================================================
   首页 · 英雄区
   ============================================================ */
.hero{position:relative;min-height:100vh;display:flex;align-items:center;padding:130px 0 90px;color:#fff;overflow:hidden;background:linear-gradient(180deg,rgba(10,7,7,.66) 0%,rgba(12,8,8,.38) 42%,rgba(12,9,9,.85) 100%),url('../img/hero-redarmy.jpg') center 32%/cover no-repeat,var(--grad-ink);}
.hero-deco{position:absolute;inset:0;pointer-events:none;}
.hero-glow{position:absolute;width:760px;height:760px;border-radius:50%;top:-260px;left:50%;transform:translateX(-50%);background:radial-gradient(circle,rgba(216,58,51,.32),transparent 62%);}
.hero-glow-2{position:absolute;width:520px;height:520px;border-radius:50%;bottom:-200px;right:-120px;background:radial-gradient(circle,rgba(217,164,65,.18),transparent 65%);}
.grid-lines{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:64px 64px;mask-image:radial-gradient(ellipse 75% 70% at 50% 35%,#000 25%,transparent 100%);}
.hero-stars{position:absolute;inset:0;}
.hero-mountain{position:absolute;bottom:-2px;left:0;right:0;width:100%;opacity:.9;}
.hero-in{position:relative;z-index:3;text-align:center;width:100%;}
.badge{display:inline-flex;align-items:center;gap:9px;padding:7px 17px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.15);font-size:13px;color:rgba(255,255,255,.88);backdrop-filter:blur(10px);}
.badge i{width:7px;height:7px;border-radius:50%;background:var(--gold-light);box-shadow:0 0 10px var(--gold-light);animation:pulse 2s infinite;}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:.35;}}
.hero h1{font-size:clamp(38px,6.2vw,76px);line-height:1.12;font-weight:900;letter-spacing:-.02em;margin:30px 0 0;font-family:var(--serif);}
.hero h1 .grad{background:linear-gradient(120deg,#F2C97D 0%,#E54840 45%,#C8161D 100%);-webkit-background-clip:text;background-clip:text;color:transparent;background-size:200% 200%;animation:gradShift 8s ease-in-out infinite;}
@keyframes gradShift{0%,100%{background-position:0% 50%;}50%{background-position:100% 50%;}}
.hero-sub{font-size:clamp(15px,1.5vw,18px);color:rgba(255,255,255,.66);max-width:620px;margin:26px auto 0;}
.hero-btns{display:flex;gap:14px;justify-content:center;margin-top:40px;flex-wrap:wrap;}
.hero-btns .btn{padding:14px 30px;font-size:15.5px;}

/* 英雄区内的采访预览面板 */
.hero-panel{max-width:720px;margin:58px auto 0;border-radius:22px;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.02));backdrop-filter:blur(14px);box-shadow:var(--shadow-l);text-align:left;}
.panel-top{display:flex;align-items:center;gap:8px;padding:14px 20px;border-bottom:1px solid rgba(255,255,255,.08);}
.dot{width:11px;height:11px;border-radius:50%;}
.dot.r{background:#ff5f57;}.dot.y{background:#febc2e;}.dot.g{background:#28c840;}
.panel-top .tab{margin-left:10px;font-size:12.5px;color:rgba(255,255,255,.5);}
.panel-body{padding:22px 24px;display:flex;flex-direction:column;gap:14px;}
.hp-row{display:flex;gap:12px;align-items:flex-start;}
.hp-avatar{width:34px;height:34px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:#fff;}
.hp-avatar.ai{background:var(--grad-red);}
.hp-avatar.el{background:var(--grad-gold);color:#3a2506;}
.hp-bubble{font-size:13.5px;line-height:1.7;color:rgba(255,255,255,.85);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);padding:11px 15px;border-radius:4px 14px 14px 14px;}
.hp-bubble .emo{color:var(--gold-light);font-size:11.5px;margin-right:6px;}
.hp-typing{display:inline-flex;gap:4px;padding:14px 18px;}
.hp-typing i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.5);animation:blink 1.3s infinite;}
.hp-typing i:nth-child(2){animation-delay:.2s;}.hp-typing i:nth-child(3){animation-delay:.4s;}
@keyframes blink{0%,60%,100%{opacity:.25;transform:translateY(0);}30%{opacity:1;transform:translateY(-3px);}}

/* ============================================================
   首页 · 数据条
   ============================================================ */
.strip{background:var(--ink-2);padding:56px 0;border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06);}
.strip-in{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;text-align:center;}
.stat .n{font-size:clamp(28px,3.2vw,42px);font-weight:900;font-variant-numeric:tabular-nums;background:var(--grad-warm);-webkit-background-clip:text;background-clip:text;color:transparent;}
.stat .l{font-size:13px;color:rgba(255,255,255,.5);margin-top:6px;}

/* ============================================================
   首页 · 区块标题
   ============================================================ */
.sec-head{text-align:center;max-width:720px;margin:0 auto 60px;}
.eyebrow{font-size:12.5px;font-weight:700;letter-spacing:.2em;background:var(--grad-red);-webkit-background-clip:text;background-clip:text;color:transparent;}
.sec-head h2{font-size:clamp(28px,3.6vw,46px);font-weight:800;letter-spacing:-.01em;margin-top:14px;line-height:1.2;font-family:var(--serif);color:var(--g800);}
.sec-head p{font-size:15.5px;color:var(--g600);margin-top:14px;}
.sec-head.dark h2{color:#fff;}
.sec-head.dark p{color:rgba(255,255,255,.6);}
.sec-head .eyebrow.gold{background:var(--grad-gold);-webkit-background-clip:text;background-clip:text;color:transparent;}

/* ---------- 四大能力卡片 ---------- */
.feat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;}
.f-card{padding:34px 32px;border-radius:var(--radius);background:#fff;border:1px solid var(--g200);box-shadow:var(--shadow-s);transition:.35s var(--ease);position:relative;overflow:hidden;}
.f-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--grad-red);transform:scaleX(0);transform-origin:left;transition:.4s var(--ease);}
.f-card:hover{transform:translateY(-6px);box-shadow:var(--shadow-m);}
.f-card:hover::before{transform:scaleX(1);}
.f-icon{width:54px;height:54px;border-radius:15px;display:flex;align-items:center;justify-content:center;margin-bottom:20px;color:#fff;background:var(--grad-red);box-shadow:0 8px 20px rgba(200,22,29,.3);}
.f-icon.gold{background:var(--grad-gold);color:#3a2506;box-shadow:0 8px 20px rgba(201,137,58,.3);}
.f-icon svg{width:26px;height:26px;}
.f-card h3{font-size:19px;font-weight:700;margin-bottom:10px;}
.f-card p{font-size:14.5px;color:var(--g600);line-height:1.75;}
.f-tag{display:inline-block;margin-top:16px;font-size:12px;color:var(--red-deep);background:var(--red-soft);padding:4px 12px;border-radius:999px;}
.f-tag.gold{background:#F9EFD9;color:#8a5a17;}

/* ---------- 工作流（深色） ---------- */
.flow{background:var(--ink);color:#fff;overflow:hidden;}
.flow::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 55% 50% at 15% 0%,rgba(200,22,29,.25),transparent 70%),radial-gradient(ellipse 50% 50% at 90% 100%,rgba(217,164,65,.15),transparent 70%);}
.flow-in{position:relative;display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
.step{padding:30px 24px;border-radius:var(--radius);background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.09);position:relative;transition:.35s var(--ease);}
.step:hover{background:rgba(255,255,255,.08);transform:translateY(-5px);}
.step:not(:last-child)::after{content:'';position:absolute;top:46px;right:-11px;width:9px;height:9px;border-top:2px solid rgba(217,164,65,.8);border-right:2px solid rgba(217,164,65,.8);transform:rotate(45deg);z-index:2;}
.step .num{width:34px;height:34px;border-radius:10px;background:var(--grad-red);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;box-shadow:0 4px 14px rgba(200,22,29,.4);}
.step h3{font-size:16.5px;font-weight:700;margin:16px 0 9px;}
.step p{font-size:13px;color:rgba(255,255,255,.55);line-height:1.7;}
.step .tool{margin-top:13px;font-size:11.5px;color:var(--gold-light);}

/* ---------- 产出 ---------- */
.out-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;}
.o-card{border-radius:var(--radius);overflow:hidden;background:#fff;border:1px solid var(--g200);box-shadow:var(--shadow-s);transition:.35s var(--ease);display:flex;flex-direction:column;}
.o-card:hover{transform:translateY(-6px);box-shadow:var(--shadow-m);}
.o-cover{height:150px;display:flex;align-items:center;justify-content:center;position:relative;}
.o-cover.r{background:var(--grad-red);}
.o-cover.g{background:var(--grad-gold);}
.o-cover.k{background:var(--grad-ink);}
.o-cover.p{background:linear-gradient(135deg,#8F1118,#3a0a0d);}
.o-cover svg{width:48px;height:48px;color:#fff;opacity:.95;}
.o-cover.g svg{color:#3a2506;}
.o-body{padding:22px;flex:1;display:flex;flex-direction:column;}
.o-body h3{font-size:16.5px;font-weight:700;margin-bottom:7px;}
.o-body p{font-size:13px;color:var(--g600);line-height:1.7;flex:1;}
.o-body span{margin-top:14px;font-size:12px;color:var(--red-deep);font-weight:500;display:inline-flex;align-items:center;}
.o-body span svg{width:13px;height:13px;margin-right:4px;}
.queue-item i svg{width:11px;height:11px;}

/* ---------- 技术底座 ---------- */
.tech{background:var(--g50);}
.tech-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.t-card{padding:26px;border-radius:var(--radius);background:#fff;border:1px solid var(--g200);display:flex;gap:18px;align-items:flex-start;transition:.3s var(--ease);}
.t-card:hover{box-shadow:var(--shadow-m);transform:translateY(-3px);}
.t-ico{width:46px;height:46px;border-radius:12px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;color:#fff;}
.t-card h4{font-size:15.5px;font-weight:700;}
.t-card p{font-size:13px;color:var(--g600);margin-top:5px;line-height:1.65;}

/* ---------- CTA ---------- */
.cta{background:var(--ink);color:#fff;text-align:center;position:relative;overflow:hidden;padding:130px 0;}
.cta::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 60% 60% at 50% 0%,rgba(200,22,29,.35),transparent 70%);}
.cta-glowline{position:absolute;left:50%;top:0;transform:translateX(-50%);width:1px;height:120px;background:linear-gradient(180deg,transparent,var(--gold-light));opacity:.6;}
.cta-in{position:relative;}
.cta h2{font-size:clamp(28px,4.2vw,52px);font-weight:900;line-height:1.2;font-family:var(--serif);}
.cta p{font-size:16px;color:rgba(255,255,255,.65);margin:20px auto 0;max-width:540px;}
.cta .btn{margin-top:34px;padding:15px 36px;font-size:16px;}

/* ---------- 页脚 ---------- */
.foot{background:var(--ink-2);color:rgba(255,255,255,.45);padding:46px 0;font-size:13px;}
.foot-in{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;}
.foot-links{display:flex;gap:24px;}
.foot-links a:hover{color:var(--gold-light);}

/* ---------- 滚动显现 ---------- */
[data-reveal]{opacity:0;transform:translateY(28px);transition:opacity .8s var(--ease),transform .8s var(--ease);}
[data-reveal].in{opacity:1;transform:none;}
[data-delay="1"]{transition-delay:.08s;}[data-delay="2"]{transition-delay:.16s;}
[data-delay="3"]{transition-delay:.24s;}[data-delay="4"]{transition-delay:.32s;}
[data-delay="5"]{transition-delay:.4s;}

/* ============================================================
   应用外壳 · 侧边栏 + 顶栏
   ============================================================ */
.shell{display:flex;min-height:100vh;background:var(--g50);}
.sidebar{width:248px;background:var(--grad-ink);color:#fff;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;z-index:50;border-right:1px solid rgba(255,255,255,.06);}
.sb-brand{display:flex;align-items:center;gap:9px;padding:22px 16px 20px;font-weight:700;font-size:16.5px;border-bottom:1px solid rgba(255,255,255,.07);white-space:nowrap;}
.sb-brand .brand-mark{width:38px;height:38px;}
.sb-brand .brand-mark svg{width:21px;height:21px;}
.sb-nav{padding:16px 12px;flex:1;display:flex;flex-direction:column;gap:4px;overflow-y:auto;}
.sb-label{font-size:10.5px;letter-spacing:.18em;color:rgba(255,255,255,.35);padding:10px 12px 6px;}
.sb-item{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:11px;font-size:14px;color:rgba(255,255,255,.6);transition:.2s;cursor:pointer;}
.sb-item svg{width:18px;height:18px;flex-shrink:0;}
.sb-item:hover{background:rgba(255,255,255,.06);color:#fff;}
.sb-item.active{background:linear-gradient(135deg,rgba(229,72,64,.95),rgba(159,17,24,.95));color:#fff;box-shadow:0 6px 18px rgba(200,22,29,.35);}
.sb-item .badge-num{margin-left:auto;font-size:11px;background:rgba(255,255,255,.12);padding:1px 8px;border-radius:999px;}
.sb-elder{margin:10px 14px 16px;padding:14px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);}
.sb-elder-top{display:flex;align-items:center;gap:10px;}
.sb-elder-av{width:38px;height:38px;border-radius:50%;background:var(--grad-gold);color:#3a2506;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;flex-shrink:0;}
.sb-elder-name{font-size:13.5px;font-weight:600;}
.sb-elder-sub{font-size:11px;color:rgba(255,255,255,.5);margin-top:2px;}
.sb-elder .mini-progress{height:5px;border-radius:4px;background:rgba(255,255,255,.1);margin-top:11px;overflow:hidden;}
.sb-elder .mini-progress span{display:block;height:100%;background:var(--grad-gold);border-radius:4px;}
.sb-elder .pct{font-size:11px;color:var(--gold-light);margin-top:6px;text-align:right;}

.main{flex:1;margin-left:248px;min-width:0;display:flex;flex-direction:column;}
.topbar{height:70px;background:rgba(255,255,255,.85);backdrop-filter:blur(16px);border-bottom:1px solid var(--g200);display:flex;align-items:center;gap:16px;padding:0 30px;position:sticky;top:0;z-index:40;}
.tb-title{font-size:17px;font-weight:700;}
.tb-title small{display:block;font-size:11.5px;font-weight:400;color:var(--g400);margin-top:1px;}
.tb-search{margin-left:auto;display:flex;align-items:center;gap:8px;background:var(--g100);border-radius:10px;padding:8px 14px;width:230px;}
.tb-search svg{width:15px;height:15px;color:var(--g400);}
.tb-search input{border:none;background:transparent;outline:none;font-size:13px;width:100%;font-family:var(--font);}
.tb-status{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--g600);background:var(--g100);padding:7px 13px;border-radius:999px;}
.tb-status i{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px #22c55e;}
.content{padding:30px;flex:1;}

/* ============================================================
   工作台
   ============================================================ */
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;}
.kpi{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);padding:22px 24px;position:relative;overflow:hidden;transition:.3s var(--ease);}
.kpi:hover{box-shadow:var(--shadow-m);transform:translateY(-3px);}
.kpi-top{display:flex;align-items:center;justify-content:space-between;}
.kpi-ico{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;}
.kpi-ico svg{width:21px;height:21px;}
.kpi-ico.r{background:var(--red-soft);color:var(--red-deep);}
.kpi-ico.g{background:#F9EFD9;color:var(--gold-2);}
.kpi-ico.k{background:#F0EBE6;color:#5a4a3a;}
.kpi-ico.p{background:#F3E8E6;color:#7a3a35;}
.kpi .v{font-size:30px;font-weight:800;margin-top:14px;font-variant-numeric:tabular-nums;}
.kpi .l{font-size:12.5px;color:var(--g400);}
.kpi .trend{position:absolute;right:20px;bottom:20px;font-size:11.5px;color:#16a34a;font-weight:600;}

.dash-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;margin-top:22px;}
.panel{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);overflow:hidden;}
.panel-h{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--g100);}
.panel-h h3{font-size:15.5px;font-weight:700;}
.panel-h a{font-size:12.5px;color:var(--red-deep);cursor:pointer;}
.panel-c{padding:20px 22px;}

/* 阶段进度 */
.stage-row{margin-bottom:18px;}
.stage-row:last-child{margin-bottom:0;}
.stage-top{display:flex;justify-content:space-between;font-size:13.5px;margin-bottom:7px;}
.stage-top b{font-weight:600;}
.stage-top span{color:var(--g400);font-size:12px;font-variant-numeric:tabular-nums;}
.stage-bar{height:8px;border-radius:6px;background:var(--g100);overflow:hidden;}
.stage-bar i{display:block;height:100%;border-radius:6px;background:var(--grad-red);transition:width 1s var(--ease);}
.stage-bar i.gold{background:var(--grad-gold);}
.stage-bar i.dim{background:linear-gradient(135deg,#B9A892,#9a8670);}

/* 动态日志 */
.log{display:flex;flex-direction:column;gap:18px;}
.log-item{display:flex;gap:13px;position:relative;}
.log-dot{width:30px;height:30px;border-radius:9px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:var(--red-soft);color:var(--red-deep);}
.log-dot.gold{background:#F9EFD9;color:var(--gold-2);}
.log-dot.gray{background:var(--g100);color:var(--g600);}
.log-dot svg{width:15px;height:15px;}
.log-body{font-size:13px;line-height:1.65;flex:1;}
.log-body b{font-weight:600;}
.log-body p{color:var(--g600);}
.log-body time{font-size:11.5px;color:var(--g400);}

.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:4px;}
.quick{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:16px;border-radius:13px;border:1px solid var(--g200);background:var(--g50);cursor:pointer;transition:.25s;font-size:13px;font-weight:600;color:var(--g800);}
.quick:hover{border-color:rgba(200,22,29,.4);background:#fff;box-shadow:var(--shadow-s);}
.quick svg{width:19px;height:19px;color:var(--red-deep);}

/* ============================================================
   智能采访
   ============================================================ */
.iv-wrap{display:grid;grid-template-columns:1fr 290px;gap:20px;height:calc(100vh - 70px - 60px);min-height:560px;}
.chat{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden;}
.chat-h{padding:16px 22px;border-bottom:1px solid var(--g100);display:flex;align-items:center;gap:13px;}
.chat-h .hp-avatar{width:40px;height:40px;}
.chat-h h3{font-size:15px;font-weight:700;}
.chat-h p{font-size:12px;color:var(--g400);}
.chat-h .tag-r{margin-left:auto;font-size:11.5px;color:var(--red-deep);background:var(--red-soft);padding:4px 12px;border-radius:999px;}
.chat-h .tag-r.live{color:#11603b;background:#e3f5ea;display:inline-flex;align-items:center;gap:6px;}
.chat-h .tag-r.live::before{content:'';width:6px;height:6px;border-radius:50%;background:#22c55e;box-shadow:0 0 7px #22c55e;}
.m-bubble.pending{padding:12px 15px;}
.tool-btn.on{background:var(--red-soft);border-color:rgba(200,22,29,.4);color:var(--red-deep);}
.chat-body{flex:1;overflow-y:auto;padding:26px;display:flex;flex-direction:column;gap:22px;background:linear-gradient(180deg,#fdfbf8,#faf6ef);}
.msg{display:flex;gap:12px;max-width:82%;animation:msgIn .4s var(--ease);}
@keyframes msgIn{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
.msg .m-av{width:38px;height:38px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:#fff;}
.msg.ai .m-av{background:var(--grad-red);}
.msg.elder .m-av{background:var(--grad-gold);color:#3a2506;}
.msg.sys{align-self:center;max-width:100%;}
.msg.sys span{font-size:12px;color:var(--g400);background:var(--g100);padding:5px 14px;border-radius:999px;}
.m-main{display:flex;flex-direction:column;gap:6px;min-width:0;}
.m-name{font-size:11.5px;color:var(--g400);}
.m-bubble{padding:13px 17px;font-size:14px;line-height:1.75;border-radius:4px 16px 16px 16px;background:#fff;border:1px solid var(--g200);box-shadow:0 2px 8px rgba(60,30,20,.05);}
.msg.elder{align-self:flex-end;flex-direction:row-reverse;}
.msg.elder .m-bubble{background:linear-gradient(160deg,#3A2418,#241410);color:#f3e9dc;border-color:transparent;border-radius:16px 4px 16px 16px;}
.msg.elder .m-name{text-align:right;}
.m-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.emo-tag{font-size:11px;color:#8a5a17;background:#F9EFD9;padding:2px 9px;border-radius:999px;display:inline-flex;align-items:center;gap:4px;}
.emo-tag::before{content:'♥';font-size:9px;}
.audio-link{font-size:11px;color:var(--g400);display:inline-flex;align-items:center;gap:4px;cursor:pointer;}
.audio-link:hover{color:var(--red-deep);}
.audio-link svg{width:12px;height:12px;}

.chat-foot{border-top:1px solid var(--g100);padding:16px 20px;background:#fff;}
.plan-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:12px;}
.plan-chip{flex-shrink:0;font-size:12px;background:var(--g100);color:var(--g600);padding:6px 13px;border-radius:999px;display:flex;align-items:center;gap:7px;}
.plan-chip b{color:var(--red-deep);font-weight:600;}
.plan-chip.now{background:var(--red-soft);color:var(--red-deep);}
.chat-input{display:flex;gap:10px;align-items:center;}
.mic-btn{width:46px;height:46px;border-radius:50%;border:none;cursor:pointer;background:var(--grad-red);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px rgba(200,22,29,.4);transition:.25s;flex-shrink:0;position:relative;}
.mic-btn:hover{transform:scale(1.06);}
.mic-btn.rec{background:var(--grad-ink);animation:micPulse 1.4s infinite;}
@keyframes micPulse{0%,100%{box-shadow:0 0 0 0 rgba(200,22,29,.5);}50%{box-shadow:0 0 0 12px rgba(200,22,29,0);}}
.mic-btn svg{width:21px;height:21px;}
.text-in{flex:1;display:flex;align-items:center;background:var(--g100);border-radius:13px;padding:0 16px;}
.text-in input{flex:1;border:none;background:transparent;outline:none;padding:13px 0;font-size:14px;font-family:var(--font);}
.send-btn{border:none;background:transparent;color:var(--red-deep);cursor:pointer;padding:6px;display:flex;}
.send-btn svg{width:20px;height:20px;}
.chat-tools{display:flex;gap:6px;}
.tool-btn{width:40px;height:40px;border-radius:11px;border:1px solid var(--g200);background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--g600);transition:.2s;}
.tool-btn:hover{border-color:var(--red-2);color:var(--red-deep);}
.tool-btn svg{width:18px;height:18px;}
.tool-btn.on{background:var(--red-soft);border-color:rgba(200,22,29,.4);color:var(--red-deep);}

/* 采访侧栏 */
.iv-side{display:flex;flex-direction:column;gap:18px;overflow-y:auto;}
.side-card{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);overflow:hidden;flex-shrink:0;}
.side-card .panel-h{padding:15px 18px;}
.side-card .panel-c{padding:16px 18px;}
.queue-item{display:flex;gap:10px;font-size:12.5px;line-height:1.6;padding:9px 0;border-bottom:1px dashed var(--g200);}
.queue-item:last-child{border-bottom:none;}
.queue-item i{width:20px;height:20px;border-radius:6px;background:var(--red-soft);color:var(--red-deep);font-style:normal;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.queue-item.done i{background:var(--g100);color:var(--g400);}
.queue-item.done{color:var(--g400);text-decoration:line-through;}
.queue-item.now i{background:var(--grad-red);color:#fff;}
.queue-item.now{color:var(--g800);font-weight:600;}
.planner-note{font-size:12px;line-height:1.7;color:var(--g600);background:var(--g50);border-left:3px solid var(--gold);border-radius:0 10px 10px 0;padding:11px 14px;}
.planner-note b{color:var(--g800);}

/* ============================================================
   记忆库
   ============================================================ */
.filter-row{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:22px;align-items:center;}
.filter-chip{font-size:12.5px;padding:7px 15px;border-radius:999px;border:1px solid var(--g200);background:#fff;color:var(--g600);cursor:pointer;transition:.2s;}
.filter-chip:hover{border-color:var(--red-2);}
.filter-chip.on{background:var(--grad-red);color:#fff;border-color:transparent;box-shadow:0 5px 15px rgba(200,22,29,.3);}
.filter-chip .n{opacity:.6;font-size:11px;margin-left:4px;}
.mem-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;}
.mem-card{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);padding:22px 24px;transition:.3s var(--ease);position:relative;}
.mem-card:hover{box-shadow:var(--shadow-m);transform:translateY(-3px);}
.mem-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;}
.mem-stage{font-size:11.5px;color:var(--red-deep);background:var(--red-soft);padding:3px 11px;border-radius:999px;}
.mem-id{font-size:11px;color:var(--g400);font-variant-numeric:tabular-nums;}
.tuple{display:grid;grid-template-columns:56px 1fr;gap:7px 12px;font-size:13px;margin-bottom:13px;}
.tuple dt{color:var(--g400);font-size:12px;padding-top:1px;}
.tuple dd{color:var(--g800);}
.mem-quote{font-size:12.5px;color:var(--g600);font-style:italic;background:var(--g50);border-radius:10px;padding:11px 14px;line-height:1.7;position:relative;padding-left:30px;}
.mem-quote::before{content:"\201C";position:absolute;left:10px;top:6px;font-size:22px;color:var(--gold);font-family:var(--serif);font-style:normal;}
.mem-foot{display:flex;justify-content:space-between;align-items:center;margin-top:13px;font-size:11.5px;color:var(--g400);}
.mem-foot .src{display:inline-flex;align-items:center;gap:5px;cursor:pointer;}
.mem-foot .src:hover{color:var(--red-deep);}
.mem-foot .src svg{width:12px;height:12px;}

/* ============================================================
   人生时间轴
   ============================================================ */
.tl-wrap{position:relative;padding-left:8px;}
.tl-line{position:absolute;left:23px;top:8px;bottom:8px;width:2px;background:linear-gradient(180deg,var(--red-2),var(--gold));}
.tl-node{position:relative;padding:0 0 30px 64px;}
.tl-node:last-child{padding-bottom:0;}
.tl-dot{position:absolute;left:14px;top:4px;width:20px;height:20px;border-radius:50%;background:#fff;border:3px solid var(--red-2);box-shadow:0 0 0 5px var(--red-soft);z-index:2;}
.tl-node.gold .tl-dot{border-color:var(--gold-2);box-shadow:0 0 0 5px #F9EFD9;}
.tl-year{font-size:13px;font-weight:800;color:var(--red-deep);font-variant-numeric:tabular-nums;}
.tl-card{margin-top:8px;background:#fff;border:1px solid var(--g200);border-radius:var(--radius-sm);padding:18px 20px;transition:.3s;}
.tl-card:hover{box-shadow:var(--shadow-s);}
.tl-card h4{font-size:15px;font-weight:700;margin-bottom:6px;}
.tl-card p{font-size:13px;color:var(--g600);line-height:1.7;}
.tl-card .tags{margin-top:10px;display:flex;gap:7px;flex-wrap:wrap;}
.tl-card .tags span{font-size:11px;background:var(--g100);color:var(--g600);padding:2px 10px;border-radius:999px;}

/* ============================================================
   荣誉档案
   ============================================================ */
.honor-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.honor-card{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);overflow:hidden;transition:.3s var(--ease);}
.honor-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-m);}
.honor-top{height:120px;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;}
.honor-top.red{background:linear-gradient(140deg,#E54840,#9B1419);}
.honor-top.gold{background:linear-gradient(140deg,#F2C97D,#B97F26);}
.honor-top.dark{background:linear-gradient(140deg,#2A1C1C,#0C0909);}
.honor-medal{width:66px;height:66px;}
.honor-body{padding:20px 22px;}
.honor-date{font-size:11.5px;color:var(--gold-2);font-weight:700;letter-spacing:.05em;}
.honor-body h4{font-size:16px;font-weight:700;margin:7px 0 7px;}
.honor-body p{font-size:12.5px;color:var(--g600);line-height:1.7;}
.honor-foot{display:flex;gap:8px;margin-top:13px;}
.honor-foot span{font-size:11px;background:var(--g100);padding:3px 10px;border-radius:999px;color:var(--g600);}

.story-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:30px;}
.story-card{border-radius:var(--radius);overflow:hidden;position:relative;min-height:250px;color:#fff;display:flex;flex-direction:column;justify-content:flex-end;padding:24px;transition:.35s var(--ease);cursor:pointer;}
.story-card:hover{transform:translateY(-6px);box-shadow:var(--shadow-m);}
.story-card::before{content:'';position:absolute;inset:0;z-index:0;}
.story-card.s1::before{background:linear-gradient(160deg,#5c1410,#1a0605 80%);}
.story-card.s2::before{background:linear-gradient(160deg,#7a2d12,#240d05 80%);}
.story-card.s3::before{background:linear-gradient(160deg,#4a3a18,#1a1206 80%);}
.story-card>*{position:relative;z-index:1;}
.story-card .sc-flag{font-size:11px;letter-spacing:.2em;color:var(--gold-light);}
.story-card h4{font-size:18px;font-weight:700;margin:9px 0 8px;font-family:var(--serif);}
.story-card p{font-size:12.5px;color:rgba(255,255,255,.7);line-height:1.7;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}

/* ============================================================
   回忆录阅读器
   ============================================================ */
.book-wrap{display:grid;grid-template-columns:240px 1fr;gap:22px;align-items:start;}
.book-toc{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);padding:16px;position:sticky;top:100px;}
.book-toc h4{font-size:12px;letter-spacing:.15em;color:var(--g400);padding:6px 10px 10px;font-weight:600;}
.toc-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;font-size:13px;color:var(--g600);cursor:pointer;transition:.2s;line-height:1.5;}
.toc-item:hover{background:var(--g100);}
.toc-item.on{background:var(--red-soft);color:var(--red-deep);font-weight:600;}
.toc-item i{font-style:normal;font-size:11px;color:var(--g400);width:18px;text-align:center;flex-shrink:0;}
.toc-item.on i{color:var(--red-deep);}
.toc-item.locked{opacity:.45;cursor:not-allowed;}
.book-page{background:#fff;border:1px solid var(--g200);border-radius:var(--radius);box-shadow:var(--shadow-s);overflow:hidden;}
.book-tools{display:flex;gap:9px;padding:14px 22px;border-bottom:1px solid var(--g100);align-items:center;}
.book-tools .tt{font-size:12.5px;color:var(--g400);}
.book-tools .sp{margin-left:auto;display:flex;gap:9px;}
.book-content{padding:56px 64px 64px;max-width:820px;margin:0 auto;}
.book-content .bk-eyebrow{text-align:center;font-size:12px;letter-spacing:.3em;color:var(--gold-2);font-weight:700;}
.book-content h2{text-align:center;font-family:var(--serif);font-size:30px;font-weight:900;margin:16px 0 8px;color:var(--ink-2);}
.book-content .bk-sub{text-align:center;font-size:12.5px;color:var(--g400);margin-bottom:38px;}
.book-content p{font-family:var(--serif);font-size:16px;line-height:2.1;color:#2c211a;text-indent:2em;margin-bottom:18px;text-align:justify;}
.book-content .bk-sep{text-align:center;color:var(--gold);margin:26px 0;letter-spacing:1em;text-indent:0;font-size:14px;}
.book-content .bk-photo{margin:26px 0;text-indent:0;text-align:center;}
.bk-photo .ph-frame{height:180px;border-radius:12px;background:linear-gradient(135deg,#3a2418,#1a0e0a);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.4);font-size:12px;letter-spacing:.2em;}
.bk-photo figcaption{font-size:12px;color:var(--g400);margin-top:9px;font-family:var(--font);}
.book-content .bk-note{text-indent:0;background:#FDF6E7;border:1px solid #F0DFAE;border-radius:10px;padding:13px 17px;font-size:12.5px;color:#7c5a18;font-family:var(--font);line-height:1.7;margin-bottom:20px;display:flex;gap:9px;}
.book-content .bk-note svg{width:16px;height:16px;flex-shrink:0;margin-top:2px;}

/* ============================================================
   Toast 提示
   ============================================================ */
.toast-wrap{position:fixed;right:26px;bottom:26px;z-index:200;display:flex;flex-direction:column;gap:11px;}
.toast{background:var(--ink-2);color:#fff;font-size:13.5px;padding:13px 19px;border-radius:12px;box-shadow:var(--shadow-l);display:flex;align-items:center;gap:10px;animation:toastIn .35s var(--ease);border:1px solid rgba(255,255,255,.1);}
.toast svg{width:17px;height:17px;color:var(--gold-light);}
@keyframes toastIn{from{opacity:0;transform:translateX(30px);}to{opacity:1;transform:none;}}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width:1100px){
  .kpi-grid{grid-template-columns:repeat(2,1fr);}
  .out-grid,.honor-grid,.story-grid{grid-template-columns:repeat(2,1fr);}
  .flow-in{grid-template-columns:repeat(3,1fr);}
  .flow-in .step:last-child{grid-column:span 2;}   /* 5卡=3+2填满 */
  .step:nth-child(3)::after{display:none;}
  .tech-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:900px){
  .sidebar{transform:translateX(-100%);transition:.3s var(--ease);}
  .sidebar.open{transform:none;}
  .main{margin-left:0;}
  .iv-wrap{grid-template-columns:1fr;height:auto;}
  .iv-side{order:-1;}
  .dash-grid{grid-template-columns:1fr;}
  .feat-grid,.mem-grid,.book-wrap{grid-template-columns:1fr;}
  .book-toc{position:static;}
  .strip-in{grid-template-columns:repeat(2,1fr);gap:30px;}
  .nav-links{display:none;}
  .tb-search{display:none;}
  .book-content{padding:36px 26px 40px;}
  .flow-in{grid-template-columns:1fr 1fr;}
  .flow-in .step:last-child{grid-column:1 / -1;}   /* 5卡=2+2+1全宽填满 */
  .step::after{display:none!important;}
  .tech-grid{grid-template-columns:1fr;}
}
@media (max-width:600px){
  .kpi-grid,.out-grid,.honor-grid,.story-grid,.flow-in{grid-template-columns:1fr;}
  .content{padding:18px;}
  .hero-btns .btn{width:100%;justify-content:center;}
}
.menu-fab{display:none;}
@media (max-width:900px){
  .menu-fab{display:flex;}
}

/* ============================================================
   打印（导出 PDF）
   ============================================================ */
@media print{
  .sidebar,.topbar,.book-toc,.book-tools{display:none!important;}
  .main{margin:0;}
  .content{padding:0;}
  .book-page{border:none;box-shadow:none;}
  body{background:#fff;}
}

/* ============================================================
   语音播报增强（老人可访问性：不识字也能听）
   ============================================================ */
.tool-btn.speaking{
  color:var(--gold-light);
  border-color:rgba(242,201,125,.5);
  animation:speakingPulse 1.3s ease-in-out infinite;
}
@keyframes speakingPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(242,201,125,.5);}
  50%{box-shadow:0 0 0 9px rgba(242,201,125,0);}
}
/* AI 消息上的「播报」按钮加大，方便老人点重听 */
.msg.ai .audio-link{
  font-size:13px;
  padding:3px 12px;
  border-radius:999px;
  background:rgba(200,22,29,.08);
  border:1px solid rgba(200,22,29,.22);
  cursor:pointer;
  transition:.25s var(--ease);
}
.msg.ai .audio-link:hover{background:var(--red-soft);}

/* ---------- 卡片跳章 + 章节朗读 ---------- */
[data-chap].clickable, .clickable { cursor: pointer; transition: transform .2s, box-shadow .2s; }
[data-chap]:hover, [data-chap].clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(200,30,30,.18); }
.card-go {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(200,30,30,.25);
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--r500, #C8161D); font-weight: 600;
}
.card-go svg { width: 14px; height: 14px; }
.tl-node .card-go { margin-top: 10px; }
.story-card .card-go { border-top-color: rgba(255,255,255,.18); color: rgba(255,255,255,.92); }
.honor-card .card-go { margin-top: 10px; }

/* 章节朗读按钮 */
#chapReadBtn { display: inline-flex; align-items: center; gap: 6px; }
#chapReadBtn.on { background: var(--r500, #C8161D); color: #fff; border-color: var(--r500, #C8161D); }
#chapReadBtn svg { width: 16px; height: 16px; }

/* 章节底部上一章 / 下一章大按钮 */
.chap-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(0,0,0,.08);
}
.chap-nav-btn {
  flex: 1; max-width: 280px; padding: 14px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600;
}
.chap-nav-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .chap-nav { flex-direction: column; }
  .chap-nav-btn { max-width: 100%; }
}

/* ============================================================
   A. 视觉放大（全局，面向老一辈）
   ============================================================ */
html { font-size: 17px; }
body { font-size: 16px; line-height: 1.72; }
.btn { font-size: 15.5px; min-height: 42px; padding: 11px 22px; }
.btn-sm { font-size: 14px; min-height: 38px; padding: 9px 16px; }
.btn svg { width: 18px; height: 18px; }
.nav-links a { font-size: 15px; }
.tb-title { font-size: 19px; }
.tb-title small { font-size: 13px; }
.sb-item { font-size: 15.5px; padding: 12px 18px; }
.sb-item svg { width: 19px; height: 19px; }
.mem-card, .honor-card, .story-card { padding: 18px 20px; }
.tl-card { padding: 16px 22px; }
.tuple dd, .mem-quote, .tl-card p, .honor-body p, .story-card p { font-size: 15.5px; line-height: 1.78; }
.tuple dt { font-size: 13px; }
.mem-quote { font-size: 16px; }
.book-content p { font-size: 17px; line-height: 2.02; text-indent: 2em; }
.book-content h2 { font-size: 26px; }
.bk-eyebrow, .eyebrow { letter-spacing: .04em; }
.hero h1 { font-size: clamp(34px, 5.5vw, 52px); }
.hero-sub { font-size: 17px; line-height: 1.8; }
.kpi .v { font-size: 30px; }
.kpi .l { font-size: 14px; }
.elder-toggle { display: inline-flex; align-items: center; gap: 6px; }
.elder-toggle svg { width: 16px; height: 16px; }
.elder-toggle.on { background: var(--red-2, #C8161D); color: #fff; border-color: var(--red-2, #C8161D); }

/* ============================================================
   B. 长辈模式（叠加在 A 之上，body.elder-mode）
   ============================================================ */
body.elder-mode { font-size: 19.5px; line-height: 1.9; }
body.elder-mode .btn { font-size: 17.5px; min-height: 52px; padding: 13px 24px; }
body.elder-mode .btn-sm { font-size: 16px; min-height: 46px; padding: 11px 18px; }
body.elder-mode .btn svg { width: 20px; height: 20px; }
body.elder-mode .nav-links a { font-size: 17px; }
body.elder-mode .tb-title { font-size: 23px; }
body.elder-mode .tb-title small { font-size: 14.5px; }
body.elder-mode .sb-item { font-size: 18.5px; padding: 15px 18px; }
body.elder-mode .sb-item svg { width: 22px; height: 22px; }
body.elder-mode .sb-elder-name { font-size: 17px; }
body.elder-mode .mem-card,
body.elder-mode .honor-card,
body.elder-mode .story-card { padding: 24px 26px; }
body.elder-mode .tl-card { padding: 22px 26px; }
body.elder-mode .tuple dd,
body.elder-mode .mem-quote,
body.elder-mode .tl-card p,
body.elder-mode .honor-body p,
body.elder-mode .story-card p { font-size: 19.5px; line-height: 2.02; }
body.elder-mode .tuple dt { font-size: 15px; }
body.elder-mode .mem-quote { font-size: 20px; }
body.elder-mode .book-content p { font-size: 21px; line-height: 2.18; }
body.elder-mode .book-content h2 { font-size: 30px; }
body.elder-mode .hero h1 { font-size: clamp(40px, 7vw, 60px); }
body.elder-mode .hero-sub { font-size: 19.5px; line-height: 1.85; }
body.elder-mode .kpi .v { font-size: 34px; }
body.elder-mode .kpi .l { font-size: 15.5px; }
body.elder-mode .topbar { padding: 16px 24px; }
/* 长辈模式隐藏顶部搜索框（老人用不上，减少干扰） */
body.elder-mode .tb-search { display: none; }
/* 长辈模式隐藏顶部"已连接"状态行（信息过载） */
body.elder-mode .tb-status { display: none; }
/* 卡片间距加大，避免误触 */
body.elder-mode .mem-grid,
body.elder-mode .honor-grid,
body.elder-mode .story-grid { gap: 22px; }
body.elder-mode .tl-node { margin-bottom: 30px; }
/* 触屏滚动条加大 */
body.elder-mode * { scrollbar-width: thin; }


/* ============================================================
   章节简介 + 用户上传图片（穿插在故事中）
   ============================================================ */
.bk-summary {
  margin: 18px 0 26px;
  padding: 16px 20px;
  background: linear-gradient(90deg, rgba(200,22,29,.04), rgba(200,137,58,.06));
  border-left: 4px solid var(--red-2, #C8161D);
  border-radius: 4px 8px 8px 4px;
}
.bk-summary-h {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--red-2, #C8161D);
  font-weight: 700;
  margin-bottom: 6px;
}
.bk-summary p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--g700, #2a2a2a);
  text-indent: 2em;
}
.chap-upload {
  margin: 20px 0 26px;
  padding: 16px 20px;
  border: 1.5px dashed var(--g200, #d8d8d8);
  border-radius: 8px;
  text-align: center;
  background: var(--bg-soft, #faf8f5);
}
.chap-upload-btn {
  font-size: 15.5px;
  padding: 10px 22px;
}
.chap-upload-hint {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--g500, #888);
  line-height: 1.6;
}
.bk-photo-user {
  margin: 22px auto;
  position: relative;
  text-align: center;
}
.bk-photo-user img {
  max-width: 100%;
  max-height: 460px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  display: block;
  margin: 0 auto;
}
.bk-photo-user .img-del {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red-2, #C8161D);
  color: #fff;
  border: 2px solid #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bk-photo-user .img-del:hover { background: #a01217; }
.bk-photo-user figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--g600, #555);
  font-style: italic;
  line-height: 1.6;
  padding: 6px 14px;
  border-radius: 4px;
  outline: none;
  min-height: 1.5em;
}
.bk-photo-user figcaption.ph::before {
  content: attr(data-ph);
  color: var(--g400, #aaa);
  font-style: normal;
}
.bk-photo-user figcaption:focus {
  background: rgba(200,137,58,.08);
  box-shadow: 0 0 0 2px rgba(200,137,58,.3);
}
/* 长辈模式：放大简介 + 上传按钮 + 图片说明 */
body.elder-mode .bk-summary { padding: 22px 26px; }
body.elder-mode .bk-summary-h { font-size: 15px; }
body.elder-mode .bk-summary p { font-size: 19px; line-height: 2; }
body.elder-mode .chap-upload { padding: 22px 26px; }
body.elder-mode .chap-upload-btn { font-size: 18px; padding: 14px 28px; min-height: 52px; }
body.elder-mode .chap-upload-hint { font-size: 14.5px; }
body.elder-mode .bk-photo-user figcaption { font-size: 16px; }


/* ============================================================
   战友留言墙
   ============================================================ */
.wall-hero {
  margin: 0 0 36px;
  padding: 56px 0 44px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(200,22,29,.10), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(200,137,58,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-soft,#faf6f2) 0%, #fff 100%);
  border-bottom: 1px solid var(--g100,#eee);
  text-align: center;
}
.wall-hero .eyebrow { display: inline-block; }
.wall-hero h2 {
  font-size: 34px;
  margin: 14px 0 16px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--red-2,#C8161D), var(--gold-2,#C8893A));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wall-hero-p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--g600,#555);
  max-width: 720px;
  margin: 0 auto 24px;
  text-indent: 2em;
}
.wall-filters {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.wall-filter {
  padding: 7px 18px;
  font-size: 13.5px;
  border-radius: 18px;
  border: 1px solid var(--g200,#d8d8d8);
  background: #fff;
  color: var(--g600,#555);
  cursor: pointer;
  transition: all .2s;
}
.wall-filter:hover { border-color: var(--red-2,#C8161D); color: var(--red-2,#C8161D); }
.wall-filter.on {
  background: var(--red-2,#C8161D);
  border-color: var(--red-2,#C8161D);
  color: #fff;
}
.wall-form-sec { margin: 28px 0; text-align: center; }
.wall-form-toggle {
  font-size: 16px;
  padding: 12px 28px;
  min-height: 48px;
}
.wall-form {
  margin: 20px auto 0;
  max-width: 720px;
  text-align: left;
  background: #fff;
  padding: 24px 28px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.wall-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wall-form-row label,
.wall-form label {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--g600,#555);
  font-weight: 500;
}
.wall-form input,
.wall-form select,
.wall-form textarea {
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 14.5px;
  border: 1px solid var(--g200,#d8d8d8);
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  background: #fff;
}
.wall-form input:focus,
.wall-form select:focus,
.wall-form textarea:focus {
  border-color: var(--red-2,#C8161D);
  box-shadow: 0 0 0 3px rgba(200,22,29,.1);
}
.wall-form textarea { resize: vertical; min-height: 100px; }
.wall-form-content { margin-bottom: 14px; }
.wall-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.wall-form-actions button { padding: 10px 22px; }
.wall-form-note { font-size: 12.5px; color: var(--g500,#888); }

.wall-grid-sec { padding: 8px 0 40px; }
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.wall-loading, .wall-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--g500,#888);
  font-size: 14.5px;
}
.wall-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 22px 18px;
  box-shadow: 0 3px 12px rgba(0,0,0,.05);
  border-top: 4px solid var(--g200,#d8d8d8);
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.wall-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.09); }
.wall-card.cat-salute { border-top-color: var(--red-2,#C8161D); }
.wall-card.cat-memory { border-top-color: var(--gold-2,#C8893A); }
.wall-card.cat-find    { border-top-color: #2a7de1; }
.wall-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12.5px;
}
.wall-card-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-soft,#faf6f2);
  color: var(--g700,#2a2a2a);
}
.cat-salute .wall-card-tag { background: rgba(200,22,29,.10); color: var(--red-2,#C8161D); }
.cat-memory .wall-card-tag { background: rgba(200,137,58,.12); color: var(--gold-2,#C8893A); }
.cat-find .wall-card-tag { background: rgba(42,125,225,.10); color: #2a7de1; }
.wall-card-time { color: var(--g500,#888); }
.wall-card-body {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--g700,#2a2a2a);
  margin: 0 0 14px;
  text-indent: 2em;
  word-break: break-word;
}
.wall-card-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--g600,#555);
  padding-top: 10px;
  border-top: 1px dashed var(--g100,#eee);
}
.wall-card-name { font-weight: 600; color: var(--g800,#1a1a1a); }
.wall-card-relation { color: var(--g500,#888); }

/* 长辈模式：留言墙放大 */
body.elder-mode .wall-hero h2 { font-size: 26px; }
body.elder-mode .wall-hero-p { font-size: 17px; line-height: 2; }
body.elder-mode .wall-filter { font-size: 15px; padding: 9px 22px; }
body.elder-mode .wall-form-toggle { font-size: 18px; min-height: 52px; padding: 14px 28px; }
body.elder-mode .wall-form { padding: 26px 30px; }
body.elder-mode .wall-form input,
body.elder-mode .wall-form select,
body.elder-mode .wall-form textarea { font-size: 16px; padding: 11px 14px; }
body.elder-mode .wall-card { padding: 24px 26px 22px; }
body.elder-mode .wall-card-body { font-size: 17px; line-height: 2; }
body.elder-mode .wall-card-name { font-size: 15px; }
body.elder-mode .wall-card-top { font-size: 14px; }
body.elder-mode .wall-grid { gap: 26px; }

/* 移动端 */
@media (max-width: 720px) {
  .wall-hero { padding: 36px 0 28px; }
  .wall-hero h2 { font-size: 24px; }
  .wall-hero-p { font-size: 14px; }
  .wall-form { padding: 18px 20px; }
  .wall-form-row { flex-direction: column; gap: 10px; }
  .wall-form-row label, .wall-form label { min-width: 100%; }
  .wall-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   手机版适配（v36，2026-09-28）
   重点：采访页首屏直达聊天窗、聊天窗固定视口高度、顶栏瘦身、
        消息气泡加宽、侧栏抽屉加遮罩、首页/回忆录/留言墙紧凑化
   ============================================================ */
@media (max-width: 720px) {
  /* ---------- 全局 ---------- */
  html { font-size: 16px; }
  body { font-size: 15px; }
  .content { padding: 14px 12px 28px; }

  /* ---------- 顶栏：去状态、缩标题 ---------- */
  .topbar { padding: 0 14px; height: 58px; gap: 10px; }
  .tb-title { font-size: 16px; }
  .tb-title small { font-size: 11.5px; }
  .tb-status { display: none; }              /* 手机上没空间放"已连接" */
  .elder-toggle span { display: none; }      /* 只留图标，省空间 */
  .elder-toggle { padding: 8px; }

  /* ---------- 采访页（核心） ---------- */
  .iv-wrap {
    grid-template-columns: 1fr;
    height: calc(100vh - 58px - 28px);      /* 固定视口高度，输入框常驻可见 */
    min-height: 0;
    gap: 0;
  }
  /* 侧栏（任务队列/规划笔记）不再压在聊天上面：折叠为聊天窗下方的紧凑条 */
  .iv-side {
    order: 2;
    flex-direction: row;
    overflow: visible;
    gap: 0;
    display: none;                           /* 默认隐藏，省出首屏给聊天 */
  }
  /* 首屏只留聊天窗，让老人一进来就看到对话 */
  .chat { height: 100%; border-radius: 14px; }
  .chat-h { padding: 10px 14px; gap: 10px; }
  .chat-h .hp-avatar { width: 34px; height: 34px; }
  .chat-h h3 { font-size: 14px; }
  .chat-h p { font-size: 11px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-h .tag-r { font-size: 10.5px; padding: 3px 9px; }
  .chat-body { padding: 14px 12px; gap: 16px; }
  .chat-foot { padding: 10px 10px 12px; }
  .plan-strip { padding-bottom: 8px; }
  .plan-chip { font-size: 11px; padding: 5px 11px; }
  .chat-input { gap: 7px; }
  .mic-btn { width: 52px; height: 52px; }    /* 麦克风加大，方便老人点 */
  .mic-btn svg { width: 24px; height: 24px; }
  .text-in input { font-size: 16px; padding: 11px 0; }   /* ≥16px 防 iOS 聚焦自动放大 */
  .tool-btn { width: 38px; height: 38px; }
  .tool-btn svg { width: 17px; height: 17px; }
  /* 消息气泡：加宽 + 头像缩小，正文占比更大 */
  .msg { max-width: 92%; gap: 8px; }
  .msg .m-av { width: 30px; height: 30px; font-size: 12px; }
  .m-bubble { padding: 11px 13px; font-size: 15px; line-height: 1.7; }
  .m-name { font-size: 11px; }

  /* ---------- 首页 ---------- */
  .hero { min-height: 86vh; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero-sub { font-size: 15px; padding: 0 6px; }
  .hero-btns { gap: 10px; }
  .hero-panel { margin-top: 34px; }
  .hero-panel .hp-bubble { font-size: 12.5px; }
  .strip { padding: 26px 0; }
  .strip-in { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat .n { font-size: 26px; }
  .sec { padding: 44px 0; }
  .feat-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }              /* 导航收起，保留 brand+长辈模式+立即体验 */
  .nav-in { padding: 12px 16px; }

  /* ---------- 记忆库 / 时间轴 / 荣誉 ---------- */
  .mem-grid { grid-template-columns: 1fr; }
  .tuple dd, .mem-quote, .tl-card p, .honor-body p, .story-card p { font-size: 15px; }
  .tl-wrap { padding-left: 6px; }
  .tl-node { margin-bottom: 22px; }
  .filter-chip { padding: 8px 14px; font-size: 13px; }

  /* ---------- 回忆录：目录折叠为横向滚动条 ---------- */
  .book-toc {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
  }
  .book-toc h4 { display: none; }
  .toc-item {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 8px 14px;
    border: 1px solid var(--g200, #e5e0d8);
    background: #fff;
  }
  .toc-item.on { background: var(--red-2, #C8161D); color: #fff; border-color: transparent; }
  .book-page { padding: 20px 16px 30px; }
  .book-tools { flex-direction: column; align-items: flex-start; gap: 10px; }
  .book-tools .sp { flex-wrap: wrap; gap: 8px; }
  .book-content p { font-size: 16px; line-height: 1.95; }

  /* ---------- 工作台 ---------- */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi { padding: 16px 14px; }
  .kpi .v { font-size: 26px; }
  .dash-grid { grid-template-columns: 1fr; }

  /* ---------- 留言墙 ---------- */
  .wall-hero { padding: 32px 0 24px; }
  .wall-hero h2 { font-size: 24px; }
  .wall-form { padding: 16px 16px; }
  .wall-grid { grid-template-columns: 1fr; }

  /* ---------- 通用弹窗（采访模式选择等） ---------- */
  #ivChoiceOv > div { margin: 0 6px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 27px; }
  .stat .n { font-size: 22px; }
  .chat-h p { max-width: 38vw; }
}

/* ---------- 手机端侧栏抽屉：点菜单键弹出 + 遮罩 ---------- */
.sb-mask {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(20,12,6,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
body.sb-open .sb-mask { opacity: 1; pointer-events: auto; }
@media (max-width: 720px) {
  .sidebar { box-shadow: 8px 0 40px rgba(0,0,0,.3); }
  body:not(.sb-open) .sidebar { transform: translateX(-100%); }
  body.sb-open .sidebar { transform: none; }
}

/* ============================================================
   红色地图（v39）
   ============================================================ */
.rm-wrap { max-width: 1200px; margin: 0 auto; }
.rm-stage {
  position: relative;
  background: linear-gradient(160deg, #fdf9f2, #f7f0e4);
  border: 1px solid var(--g200, #e5e0d8);
  border-radius: 16px;
  height: min(78vh, 860px);
  min-height: 560px;
  overflow: hidden;
}
.rm-prov-name {
  font-size: 18px;
  font-weight: 700;
  fill: #55432c;
  paint-order: stroke;
  stroke: rgba(255,255,255,.95);
  stroke-width: 3.5px;
  pointer-events: none;
  opacity: .92;
  transition: opacity .2s;
}
.rm-prov-name.rm-name-dim { opacity: .18; }
.rm-prov-name.rm-name-on { opacity: 1; fill: #7a1f1f; }
@media (max-width: 720px) {
  .rm-prov-name { font-size: 30px; }
}
.rm-prov {
  fill: #e9dfd0;
  stroke: #fdf9f2;
  stroke-width: 1.6;
  cursor: pointer;
  transition: fill .25s;
  paint-order: stroke;
}
.rm-prov:hover {
  stroke: #b8382e;
  stroke-width: 2;
}
.rm-prov:hover { fill: #dcc9a8; }
.rm-prov.rm-has { fill: #e3b98f; }              /* 有红色记忆的省：暖金 */
.rm-prov.rm-has:hover { fill: #d4a271; }
.rm-prov.rm-active { fill: #b8382e !important; stroke: #7a1f1f; stroke-width: 1.2; }
.rm-prov.rm-dim { fill: #efe9de; opacity: .55; }

.rm-city { cursor: pointer; }
.rm-city circle {
  fill: #c82229;
  stroke: #fff;
  stroke-width: 1.6;
  animation: rmPulse 1.8s infinite;
}
@keyframes rmPulse {
  0%,100% { opacity: 1; }
  50% { opacity: .55; }
}
.rm-city text {
  font-size: 14px;
  fill: #7a3a30;
  paint-order: stroke;
  stroke: rgba(255,255,255,.92);
  stroke-width: 2.6px;
  font-weight: 600;
  pointer-events: none;
}
.rm-city:hover circle { fill: #8f1d1d; r: 6.5; }
.rm-city.rm-city-on circle { fill: #3a2418; r: 7; }
.rm-city.rm-city-on text { fill: #7a1f1f; }

.rm-panel {
  position: absolute;
  top: 14px; right: 14px;
  width: min(360px, 46%);
  max-height: calc(100% - 28px);
  overflow-y: auto;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--g200, #e5e0d8);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 10px 34px rgba(80,40,10,.16);
}
.rm-panel-h { font-size: 16.5px; font-weight: 700; color: #7a1f1f; margin-bottom: 8px; }
.rm-panel-intro { font-size: 13.5px; line-height: 1.75; color: #6b5f52; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.rm-chip {
  padding: 6px 13px; font-size: 12.5px; border-radius: 999px;
  border: 1px solid #dcc9a8; background: #faf5ea; color: #5a4632;
  cursor: pointer; transition: .2s;
}
.rm-chip:hover { border-color: #b8382e; color: #b8382e; }
.rm-sec { margin-top: 12px; }
.rm-sec-h { font-size: 13px; font-weight: 700; color: #8a5a17; margin-bottom: 6px; }
.rm-list { margin: 0; padding-left: 18px; }
.rm-list li { font-size: 13.5px; line-height: 1.8; color: #444; }
.rm-cta {
  margin-top: 16px; padding: 10px 12px;
  background: rgba(200,22,29,.06);
  border: 1px dashed rgba(200,22,29,.35);
  border-radius: 10px; font-size: 13px; color: #5a4632;
}
.rm-cta a { color: #b8382e; font-weight: 600; text-decoration: none; }

/* 手机端：面板改为底部抽屉 */
@media (max-width: 720px) {
  .rm-stage { height: 54vh; min-height: 340px; }
  .rm-panel {
    left: 10px; right: 10px; top: auto; bottom: 10px;
    width: auto; max-height: 46%;
  }
  .rm-city text { font-size: 22px; }
  .rm-city circle { r: 8; }
}

.rm-city-label {
  fill: #3a2410;
  paint-order: stroke;
  stroke: rgba(255,255,255,.95);
  font-weight: 700;
  pointer-events: none;
}
.rm-city circle {
  fill: #d81e06;
}
.rm-city:hover text { fill: #8f1d1d; }

/* 市名常显（分界清晰后不乱）；选中城市名字变红 */
.rm-city-label-hidden { opacity: 1; }
.rm-city.rm-city-on .rm-city-label-hidden { fill: #b8382e; }
