/* 浅色主题：白/灰背景 + 黑色主字 + 深蓝重点 */
:root{
  --bg:#f0f2f5;
  --panel:#ffffff;
  --panel2:#f0f2f5;
  --title-bg:#e4e6eb;
  --title-bg-top:#dce0e8;
  --text:#1a1a1a;
  --muted:#5c5c6d;
  --border:rgba(0,0,0,.08);
  --accent:#1d4ed8;
  --accent2:#2563eb;
  --accent-soft:rgba(29,78,216,.1);
  --accent2-soft:rgba(37,99,235,.08);
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --radius:16px;
  --radius2:12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background: var(--bg);
}

/* 全局：*markdown* 斜体统一为斜体+灰色 */
em{font-style:italic; color:var(--muted)}

a{color:inherit; text-decoration:none}
.container{width:min(1400px, 98vw); margin:0 auto}
.muted{color:var(--muted)}

.sticky-header{
  position:sticky; top:0; z-index:10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar{flex-shrink:0}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; padding:6px 0}
.brand{display:flex; gap:8px; align-items:center}
.brand-dot{width:8px; height:8px; border-radius:50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft)}
.brand-title{font-weight:700; font-size:14px; line-height:1.25}
.brand-title .badge-v3{font-size:10px; padding:2px 5px; margin-left:4px; vertical-align:middle}
.brand-sub{font-size:11px; color:var(--muted)}

.footer{margin:30px 0 20px; height:auto; min-height:0; padding:0}
.footer-inner{color:var(--muted); font-size:12px; padding:8px 0}

.h1{font-size:22px; margin:0; line-height:1.3}
.badge-v3{font-size:12px; padding:3px 8px; border-radius:6px; background:var(--accent-soft); border:1px solid var(--accent); color:var(--accent); font-weight:700; margin-left:6px}
.page-head{display:flex; align-items:flex-start; gap:20px; padding:14px 0 12px}
.page-head-in-sticky{margin:0; padding:4px 0 8px}
.page-head-in-sticky .page-head-row{margin-bottom:0; gap:10px 16px; line-height:1.3}
.page-head-left{flex:1; min-width:0}
.page-head-row{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px}
.page-head-meta{display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; font-size:12px; color:var(--muted); line-height:1.3}
.page-head-meta .user-select,.page-head-meta .worldview-select{margin-left:2px; padding:3px 6px; font-size:12px; border-radius:6px; border:1px solid var(--border); background:var(--panel); color:var(--text)}
.page-head-main{display:flex; align-items:flex-start; gap:20px; margin-top:6px}
.page-head-main .worldview-setting-wrap{flex:1; min-width:0}
.page-head-actions{flex-shrink:0; display:flex; flex-wrap:wrap; gap:4px; align-items:center; justify-content:flex-end}
.page-head-actions .btn{
  padding:4px 8px;
  font-size:12px;
  border-radius:999px;
}
.narrative-pending-hint{font-size:12px; margin-left:8px; vertical-align:middle}
.llm-notice{font-size:12px; color:var(--muted); margin-top:6px; padding:6px 10px; background:var(--accent-soft); border:1px solid rgba(29,78,216,.25); border-radius:8px; max-width:560px}
.worldview-setting-wrap{margin-top:6px}
.worldview-setting-label{font-size:11px; margin-bottom:2px; color:var(--muted)}
.worldview-setting-content{
  font-size:12px;
  line-height:1.5;
  color:var(--text);
  padding:8px 12px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:8px;
  white-space:pre-wrap;
  word-break:break-word;
  max-height:100px;
  overflow-y:auto;
}

.btn{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 16px;
  font-weight:600;
  background: var(--panel);
  color:var(--text);
  cursor:pointer;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  font-size:14px;
}
.btn:hover{border-color: var(--accent); box-shadow: var(--shadow)}
.btn:disabled{opacity:.6; cursor:not-allowed}
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}
.btn-tab{margin-right:6px}
.btn-tab.active{background: var(--accent-soft); border-color: var(--accent)}

.scenes-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap:16px;
  padding: 8px 0 30px;
}
@media (max-width: 900px){
  .scenes-grid{grid-template-columns:1fr}
}

.scene-card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.scene-card.active{border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft)}
.scene-head{
  padding:14px 16px;
  background: var(--panel2);
  border-bottom:1px solid var(--border);
}
.scene-title{font-weight:800; font-size:16px; margin-bottom:4px}
.scene-chars{font-size:12px; color:var(--muted)}
.scene-body{flex:1; padding:14px 16px; display:flex; flex-direction:column; gap:14px; min-height:200px}
.scene-script{
  border-bottom:1px solid var(--border);
  padding-bottom:14px;
}
.scene-script-label{font-size:12px; color:var(--accent); font-weight:700; margin-bottom:8px}
.scene-script-content{font-size:13px; line-height:1.6; color:var(--text); white-space:pre-wrap}
.scene-script-empty{font-size:12px; font-style:italic; color:var(--muted)}
.scene-chat{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:300px;
  overflow-y:auto;
}
.scene-chat-label{font-size:12px; color:var(--accent2); font-weight:700; margin-bottom:4px}
.scene-chat-empty{font-size:12px; font-style:italic; color:var(--muted); padding:8px 0}
.chat-msg{
  font-size:13px;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--border);
  background: var(--panel2);
  line-height:1.5;
  white-space:pre-wrap;
}
.chat-msg.user{
  align-self:flex-end;
  border-color: rgba(37,99,235,.3);
  background: var(--accent2-soft);
}
.chat-msg.character{
  border-color: rgba(29,78,216,.3);
  background: var(--accent-soft);
}
.chat-msg-meta{font-size:11px; color:var(--muted); margin-top:4px; font-family: var(--mono)}
.scene-input-area{
  padding:12px 16px;
  border-top:1px solid var(--border);
  background: var(--panel2);
  display:flex;
  gap:8px;
}
.scene-input{
  flex:1;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline:none;
  font-size:13px;
}
.scene-input:focus{border-color: var(--accent)}
.scene-send{
  padding:8px 14px;
  border-radius:8px;
  border:1px solid var(--border);
  background: var(--panel);
  color:var(--text);
  cursor:pointer;
  font-weight:600;
  font-size:13px;
}
.scene-send:hover{border-color: var(--accent)}
.scene-send:disabled{opacity:.6; cursor:not-allowed}

/* 地图展现：三层（底图 / 建筑 / 角色） */
.map-wrap{margin-bottom:16px; border:1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow:hidden}
.map-title{padding:12px 14px; font-weight:700; font-size:14px; line-height:1.3; border-bottom:1px solid var(--border); background: var(--title-bg)}
.map-container{position:relative; width:100%; min-height:200px; background: var(--bg)}
.map-container.aspect-9-16{aspect-ratio:9/16; padding-bottom:0}
.map-container.aspect-16-9{aspect-ratio:16/9; padding-bottom:0}
.map-container:not(.aspect-9-16):not(.aspect-16-9){padding-bottom:56.25%}
.map-layer{position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none}
.map-layer-characters{pointer-events:auto}
.map-layer-bg{background-size:contain; background-position:center; background-repeat:no-repeat}
.map-layer-buildings .map-building{position:absolute; width:32px; height:32px; margin-left:-16px; margin-top:-16px; background-size:contain; background-position:center; background-repeat:no-repeat}
.map-layer-characters .map-character{position:absolute; width:28px; height:28px; margin-left:-14px; margin-top:-14px; transition:left .25s ease, top .25s ease, transform .25s ease; z-index:2}
.map-layer-characters .map-character img{width:100%; height:100%; border-radius:50%; border:2px solid var(--accent); object-fit:cover; display:block}
.map-layer-characters .map-character .map-char-name{position:absolute; left:50%; transform:translateX(-50%); bottom:-16px; white-space:nowrap; font-size:10px; font-weight:700; color:#fff; text-shadow:0 0 3px rgba(0,0,0,.9), 0 1px 2px rgba(0,0,0,.8), 0 0 6px rgba(0,0,0,.6)}
/* 玩家：仅颜色区分，头像边框与名字用高亮色 */
.map-layer-characters .map-character.map-character-player img{border-color:#3b82f6; box-shadow:0 0 0 1px rgba(255,255,255,.4)}
.map-layer-characters .map-character.map-character-player .map-char-name{color:#93c5fd; font-weight:700; text-shadow:0 0 3px rgba(0,0,0,.9), 0 1px 2px rgba(0,0,0,.8)}

/* 主界面：上 角色计划横板 | 下 地图|帖子|对话 */
.page-content#page-main{display:flex; flex-direction:column; gap:16px; min-height:70vh}
.plans-row{
  width:100%;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow:hidden;
  flex-shrink:0;
}
.plans-row .feed-title{border-bottom:1px solid var(--border); padding:12px 14px; font-weight:700; font-size:14px; background: var(--title-bg-top)}
.plans-list{flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:10px}
.plans-list-horizontal{
  flex-direction:row;
  flex-wrap:wrap;
  gap:10px;
  padding:12px 14px;
  min-height:0;
}
.plan-card{
  padding:10px 12px;
  border-radius: var(--radius2);
  border:1px solid var(--border);
  background: var(--panel2);
  font-size:12px;
  flex-shrink:0;
  min-width:180px;
  max-width:260px;
}
.plan-name{font-weight:700; color:var(--accent2); margin-bottom:6px}
.plan-badge{font-size:10px; color:var(--muted); font-weight:500; margin-left:4px}
.plan-card-player{border-color:var(--accent); background:var(--accent-soft)}
.plan-line{color:var(--muted); margin:2px 0}
.plan-progress-row{border-top:1px solid var(--border); padding:10px 14px; background:var(--panel2)}
.plan-progress-title{font-size:11px; font-weight:700; color:var(--muted); margin-bottom:6px}
.plan-progress-list{display:flex; flex-wrap:wrap; gap:10px 16px}
.plan-progress-item{font-size:12px; color:var(--text)}

/* 下排：地图 | 场景帖子 | 对话（从左到右） */
.main-layout.three-cols.bottom-row{
  display:flex;
  flex-direction:row;
  gap:20px;
  padding:0 0 30px;
  min-height:60vh;
  width:100%;
  flex:1;
  min-height:0;
}
.main-layout.three-cols.bottom-row .map-wrap.map-in-row{
  flex:0 0 auto;
  width:300px;
  min-width:260px;
  max-width:340px;
  margin-bottom:0;
  align-self:flex-start;
}
.main-layout.three-cols.bottom-row .middle-feed{
  flex:1 1 400px;
  min-width:320px;
  max-width:720px;
  display:flex;
  flex-direction:column;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow:hidden;
}
.middle-feed .feed-title{border-bottom:1px solid var(--border); padding:12px 14px; font-weight:700; font-size:14px; background: var(--title-bg)}
.middle-feed .posts-list{flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:12px}

/* 左帖子流 + 右对话窗布局（兼容） */
.main-layout{
  display:flex;
  gap:20px;
  padding:16px 0 30px;
  min-height:70vh;
}
.left-feed{
  width:340px;
  min-width:280px;
  display:flex;
  flex-direction:column;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow:hidden;
}
.feed-title{
  padding:12px 14px;
  font-weight:700;
  font-size:14px;
  line-height:1.3;
  border-bottom:1px solid var(--border);
  background: var(--title-bg);
}
.posts-list{
  flex:1;
  overflow-y:auto;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.posts-empty{
  padding:24px 12px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}
.post-card{
  position:relative;
  border:1px solid var(--border);
  border-radius: var(--radius2);
  padding:12px 14px;
  padding-top:36px;
  background: var(--panel2);
}
.post-card-latest{border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft)}
/* 时间在每张帖子右上角，与后端 8 时间点对齐 */
.post-card-time-bar{
  position:absolute;
  top:10px;
  right:14px;
  display:flex;
  align-items:baseline;
  gap:8px;
}
.post-card-time-bar .post-card-time{color:var(--accent2); font-weight:800; font-size:14px}
.post-card-time-bar .post-card-tick{color:var(--muted); font-size:12px}
.post-card-time-label{color:var(--muted); font-size:12px; font-weight:600}
.post-card-time{color:var(--accent2); font-weight:800; font-size:15px}
.post-card-tick{color:var(--muted); font-size:12px}
.post-card-body{font-size:12px; color:var(--muted); margin-bottom:8px}
/* 过去时间段剧情：独立区块 */
.post-card-global-narrative{
  margin-bottom:14px;
  padding:10px 12px 12px;
  background:var(--panel2);
  border-radius:10px;
  border-left:4px solid var(--muted);
}
.post-card-global-narrative .post-card-timeline-past{margin-top:0; margin-bottom:6px; border-left:none; padding-left:0}
.post-card-global-narrative .post-card-narrative-text{font-size:12px; line-height:1.55; color:var(--text)}
/* 当前时间：独立区块，与过去剧情明确区隔 */
.post-card-head{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  align-items:baseline;
  margin-bottom:12px;
  padding:10px 12px;
  border-radius:10px;
  background:var(--accent2-soft);
  border:1px solid rgba(29,78,216,.2);
  border-left:4px solid var(--accent2);
  font-size:13px;
}
.post-card-scene-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px}
.post-card-scene{font-weight:600; color:var(--text); flex:1; min-width:0}
.post-card-scene-head .btn-join{flex-shrink:0}
.post-card-scenes-wrap{margin-top:4px}
.post-card-scenes-title{margin-bottom:6px}
.post-card-scene-block{margin:10px 0; padding:8px 0; border-bottom:1px solid var(--border)}
.post-card-scene-block:last-of-type{border-bottom:none}
.scene-video-wrap{margin:8px 0 12px; border-radius:var(--radius2); overflow:hidden; max-width:360px}
.scene-video-wrap video{width:100%; display:block; border-radius:var(--radius2); background:var(--panel2)}
.scene-image-wrap img{width:100%; display:block; border-radius:var(--radius2); background:var(--panel2); vertical-align:top}
.post-card-timeline-label{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; margin:10px 0 6px}
.post-card-timeline-past{color:var(--muted); border-left:3px solid var(--muted); padding-left:8px}
.post-card-timeline-now{color:var(--accent2); border-left:3px solid var(--accent2); padding-left:8px}
.post-card-timeline-label:first-of-type{margin-top:4px}
.post-card-event-summary{font-size:12px; color:var(--text); margin:4px 0 0 8px; line-height:1.55; word-wrap:break-word; overflow-wrap:break-word}
.post-card-event-summary em{font-style:italic; color:var(--muted)}
.post-card-event-summary strong{font-weight:700; color:var(--accent2)}
.post-card-script{font-size:12px; margin:6px 0 0 8px; line-height:1.55; display:flex; flex-direction:column; gap:4px}
.post-card-script-line{word-wrap:break-word; overflow-wrap:break-word}
.post-card-script-speaker{font-weight:700; color:var(--accent); margin-right:4px}
.post-card-script-narration{font-weight:600; color:var(--text); margin-right:4px; font-style:normal}
.post-card-script-line-narrator .post-card-script-content{color:var(--muted); font-style:italic}
.post-card-script-content{color:var(--text)}
.post-card-script em{font-style:italic; color:var(--muted)}
.post-card-script strong{font-weight:700}
.post-card-text-adaptive{word-wrap:break-word; overflow-wrap:break-word; white-space:pre-wrap}
.post-card-memories{font-size:11px; color:var(--muted); margin-top:8px; padding-top:6px; border-top:1px dashed var(--border); word-wrap:break-word; white-space:pre-wrap}
.post-card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--border);
}
.btn-join{
  padding:6px 12px;
  font-size:12px;
  border-radius:8px;
  border:1px solid var(--accent);
  background: var(--accent-soft);
  color:var(--accent2);
  cursor:pointer;
  font-weight:600;
}
.btn-join:hover{background: rgba(29,78,216,.15)}

.right-chat{
  flex:1 0 280px;
  min-width:260px;
  max-width:400px;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  display:flex;
  flex-direction:column;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow:hidden;
  align-self:flex-start;
}
.right-chat-dual{
  flex:1 0 320px;
  min-width:320px;
  max-width:520px;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow-y:auto;
}
.right-chat-dual .chat-panel{
  display:flex;
  flex-direction:column;
  min-height:180px;
  flex:1;
  border:1px solid var(--border);
  border-radius: var(--radius2);
  overflow:hidden;
  background: var(--panel2);
}
.right-chat-dual .chat-panel .chat-messages-wrap{
  max-height:220px;
}
.chat-panel-head{
  padding:12px 14px;
  font-weight:700;
  font-size:14px;
  line-height:1.3;
  border-bottom:1px solid var(--border);
  background: var(--title-bg);
  flex-shrink:0;
}
.chat-messages-wrap{
  flex:0 1 auto;
  min-height:0;
  max-height:380px;
  overflow-y:auto;
  padding:10px 12px;
}
/* 右侧对话区消息列表：与左中栏字体统一 */
.chat-messages{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.chat-messages .msg{
  max-width:85%;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  line-height:1.45;
  font-size:12px;
  background: var(--panel2);
  white-space:pre-wrap;
}
.chat-messages .msg.user{
  align-self:flex-end;
  border-color: rgba(37,99,235,.4);
  background: var(--accent2-soft);
  border-left-width: 3px;
}
.chat-messages .msg.user .msg-player-name{ color: var(--accent2); font-weight: 700; margin-right: 6px; }
.chat-messages .msg.character{
  align-self:flex-start;
  border-color: rgba(29,78,216,.25);
  background: var(--panel2);
}
.chat-messages .msg.character .msg-character-name{ color: var(--accent); font-weight: 700; margin-right: 6px; }
.chat-messages .msg.narrator{
  align-self:stretch;
  max-width:100%;
  border:none;
  background:transparent;
  padding:0;
  margin:4px 0;
  border-radius:0;
  font-style:italic;
  color:var(--muted);
}
.chat-scene-desc, .chat-scene-script { margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border); font-size: 12px; }
.chat-scene-desc-label, .chat-scene-script-label { font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.chat-scene-script-label { color: var(--text); border-left: 3px solid var(--accent2); padding-left: 8px; margin: 10px 0 6px; }
.chat-scene-script-label:first-child { margin-top: 0; }
.chat-scene-desc-text { line-height: 1.45; }
.chat-scene-script-list { display: flex; flex-direction: column; gap: 4px; line-height: 1.55; }
.chat-scene-script-line { display: flex; align-items: flex-start; gap: 4px; word-wrap: break-word; overflow-wrap: break-word; }
.chat-scene-script-speaker { flex-shrink: 0; min-width: 5em; color: var(--accent); font-weight: 700; }
.chat-scene-script-content { flex: 1; min-width: 0; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; color: var(--text); }
.chat-scene-script-line-narrator .chat-scene-script-narration { flex-shrink: 0; min-width: 5em; font-weight: 600; color: var(--text); font-style: normal; }
.chat-scene-script-line-narrator .chat-scene-script-content { color: var(--muted); font-style: italic; }
.chat-scene-script-content em{font-style:italic; color:var(--muted)}
.chat-scene-script-content strong{font-weight:700}

.chat-messages .msg.narrator .msg-narrator-label{
  font-weight:600;
  color:var(--muted);
  margin-right:6px;
  font-style:italic;
}
.chat-messages .msg em{font-style:italic; color:var(--muted)}
.chat-messages .msg strong{font-weight:700}
.chat-messages .msg-meta{
  margin-top:4px;
  font-size:10px;
  color:var(--muted);
  font-family: var(--mono);
}
.chat-placeholder{
  color:var(--muted);
  font-size:12px;
  padding:12px 0;
}
.chat-input-area{
  padding:8px 12px;
  min-height:auto;
  height:auto;
  border-top:1px solid var(--border);
  background: var(--panel2);
  display:flex;
  gap:8px;
  flex-shrink:0;
  align-items:center;
}
.chat-input{
  flex:1;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--border);
  background: var(--bg);
  color:var(--text);
  outline:none;
  font-size:12px;
}
.chat-input:focus{border-color: var(--accent)}
.chat-input:disabled{opacity:.6; cursor:not-allowed}
.chat-send{
  padding:8px 14px;
  border-radius:8px;
  border:1px solid var(--border);
  background: var(--panel);
  color:var(--text);
  cursor:pointer;
  font-weight:600;
  font-size:12px;
}
.chat-send:hover{border-color: var(--accent)}

.msg-character-name{font-weight:700; color:var(--accent2); margin-right:6px; font-size:12px}

/* 角色设定页：玩家设定 + 角色设定，含头像 */
.characters-page-inner{display:flex; flex-direction:column; gap:24px; padding:0 0 24px}
.players-section{border:1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow:hidden}
.players-section .feed-title{border-bottom:1px solid var(--border); padding:12px 14px; font-weight:700; font-size:14px; background: var(--title-bg)}
.players-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:16px; padding:16px}
.player-card{display:flex; align-items:flex-start; gap:14px; padding:14px; border:1px solid var(--border); border-radius: var(--radius2); background: var(--panel2)}
.player-card-body{flex:1; min-width:0}
.player-card-identity{font-size:12px; color:var(--muted); margin-top:4px; line-height:1.4}
.characters-section{border:1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow:hidden}
.characters-section .feed-title{border-bottom:1px solid var(--border); padding:12px 14px; font-weight:700; font-size:14px; background: var(--title-bg)}
.characters-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:16px; padding:16px}
.character-card{display:flex; align-items:flex-start; gap:14px; padding:16px; border:1px solid var(--border); border-radius: var(--radius); background: var(--panel); font-size:13px}
.character-card-avatar{flex-shrink:0; width:52px; height:52px; border-radius:50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:20px; color:var(--text); position:relative; overflow:hidden}
.character-card-avatar img{position:absolute; left:0; top:0; width:100%; height:100%; object-fit:cover; display:block}
.character-card-avatar .avatar-initial{display:flex; align-items:center; justify-content:center; width:100%; height:100%}
.character-card-body{flex:1; min-width:0}
.character-card-name{font-weight:800; font-size:16px; margin-bottom:4px}
.character-card-meta{color:var(--muted); font-size:12px; margin-bottom:8px}
.character-card-tagline{color:var(--accent2); margin-bottom:8px}
.character-card-desc,.character-card-goal{color:var(--text); line-height:1.5; margin-top:6px}
.character-card-memories{margin-top:12px; padding-top:10px; border-top:1px solid var(--border)}
.character-card-memories-label{font-size:11px; font-weight:700; color:var(--muted); margin-bottom:6px}
.character-card-memories-empty{font-size:12px; color:var(--muted); font-style:italic}
.character-card-memories-list{margin:0; padding-left:18px; font-size:12px; color:var(--text); line-height:1.5}
.character-card-memory-item{margin-bottom:4px}
.character-card-memory-item:last-child{margin-bottom:0}
.history-list{padding:16px 0; display:flex; flex-direction:column; gap:12px}
.history-card{padding:12px 14px; border:1px solid var(--border); border-radius: var(--radius2); background: var(--panel2)}
.history-card-entry{font-size:13px; color:var(--text); line-height:1.6; margin-bottom:8px}
.history-card-meta{display:flex; flex-wrap:wrap; gap:12px 20px; font-size:11px; color:var(--muted); padding-top:8px; border-top:1px solid var(--border)}
.history-card-importance{font-weight:600}
.history-card-characters{}
.history-card-name{font-weight:700; color:var(--accent2); margin-bottom:6px}
.history-card-text{font-size:13px; color:var(--text); line-height:1.5}
