/* ===== 全局基底 (替代 body/root) ===== */
w { display:block; font-family:system-ui, -apple-system, "Microsoft YaHei", sans-serif; color:#2c2c2c; max-width:900px; margin:0 auto; line-height:1.7; font-size:13px; }
m { display:block; padding:15px; font-size:15px;font-family:system-ui, -apple-system, "Microsoft YaHei", sans-serif; color:#2c2c2c; max-width:900px; margin:0 auto; line-height:1.7;  }
m p { margin:.5em 0; }
pnl { display:block; margin:20px 0; }

/* ===== 折叠面板通用 ===== */
details { margin:8px 0; border-radius:6px; overflow:hidden; box-shadow:0 2px 5px rgba(0,0,0,.08); }
summary { padding:10px 15px; color:#fff; font-weight:bold; cursor:pointer; user-select:none; transition:.2s; }
summary:hover { filter:brightness(1.1); }
details>div { padding:12px 15px; background:#fafafa; border-top:1px solid #eee; }

/* 头部渐变 (c1情况, c2玩家, c3NPC, c4关系, c5记忆, c6弹幕) */
.c1 summary { background:linear-gradient(135deg,#ff6b6b,#ee5a52); }
.c2 summary { background:linear-gradient(135deg,#4facfe,#00f2fe); }
.c3 summary { background:linear-gradient(135deg,#f093fb,#f5576c); }
.c4 summary { background:linear-gradient(135deg,#fa709a,#fee140); }
.c5 summary { background:linear-gradient(135deg,#667eea,#764ba2); }
.c6 summary { background:linear-gradient(135deg,#a1c4fd,#c2e9fb); color:#333; }

/* ===== 通用卡片块 (nc=NPC卡, rs=关系, ms=记忆, ab=提示框) ===== */
nc, rs, ms, ab { display:block; background:#fff; padding:10px 12px; border-radius:6px; margin:6px 0; font-size:12.5px; box-sizing:border-box; }

/* NPC专区 (ns=分块, nt=标题, ng=网格) */
nc { padding:12px; border-left:4px solid #f5576c; }
ns { display:block; padding-bottom:8px; border-bottom:1px dashed #eee; margin-bottom:8px; }
ns:last-child { border-bottom:0; margin-bottom:0; padding-bottom:0; }
nt { display:block; color:#f5576c; font-weight:bold; font-size:13px; margin-bottom:4px; }
ng { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:4px 12px; }

/* 侧边条颜色区分 */
rs { border-left:4px solid #fa709a; }
ab { border-left:4px solid #2196f3; background:#e3f2fd; color:#1565c0; }

/* ===== 玩家与表格 ===== */
ms { font-size:12px; }
table { width:100%; border-collapse:collapse; margin-top:6px; }
th, td { padding:6px 8px; text-align:left; border-bottom:1px solid #eee; }
th { background:#f0f0f0; color:#555; font-weight:bold; font-size:11.5px; }
tr:hover { background:#fafafa; }

/* pg=玩家网格, k=键名 */
pg { display:grid; grid-template-columns:130px 1fr; gap:6px 12px; font-size:12.5px; }
k { color:#4facfe; font-weight:bold; }

/* ===== 状态条与小组件 (sb=底槽, sf=填充) ===== */
sb { display:inline-block; width:100px; height:8px; background:#eee; border-radius:4px; margin:0 6px; vertical-align:middle; overflow:hidden; }
sf { display:block; height:100%; border-radius:4px; transition:.3s; }
.e { background:linear-gradient(90deg,#ff6b6b,#ee5a52); }
.c { background:linear-gradient(90deg,#4facfe,#00f2fe); }
.s { background:linear-gradient(90deg,#f093fb,#f5576c); }
.d { background:linear-gradient(90deg,#fa709a,#fee140); }

/* 关系标签 (rl=标签, l1~l6=色彩映射) */
rl { font-size:.85em; padding:1px 6px; border-radius:3px; color:#fff; margin-right:4px; }
.l1{background:#e91e63} .l2{background:#ffc107;color:#333} .l3{background:#9c27b0}
.l4{background:#ff9800} .l5{background:#03a9f4} .l6{background:#8bc34a}

/* ===== 动态无背景横向弹幕组件 ===== */
dm { 
    display: block; 
    position: relative; 
    background: #ffffff; /* 可改为 transparent 彻底透明 */
    border: 1px solid #eee;
    padding: 10px; 
    border-radius: 8px; 
    margin: 12px 0; 
    height: 110px; /* 固定高度，容纳多行弹幕无碰撞流动 */
    overflow: hidden; 
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
di { 
    position: absolute; 
    white-space: nowrap; 
    display: flex;
    align-items: center;
    background: rgba(240, 240, 240, 0.85); /* 浅色半透明气泡 */
    color: #333; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 11.5px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-left: 3px solid #4facfe;
    /* 默认平移到容器最右侧外，执行循环滚动动画 */
    transform: translateX(100%);
    animation: danmuMove 8s linear infinite; 
}
/* 区分部分弹幕颜色 */
di.hot { border-left-color: #ff6b6b; background: rgba(255, 240, 240, 0.9); color: #d9383a; }
di sub { font-size: 9px; color: #888; margin-right: 4px; }

/* 弹幕轨道高度分配 (top) 与发射延迟延迟 (animation-delay) */
.t1 { top: 10px; animation-delay: 0s; }
.t2 { top: 42px; animation-delay: 2.5s; }
.t3 { top: 74px; animation-delay: 1s; }
.t4 { top: 10px; animation-delay: 4.5s; }
.t5 { top: 42px; animation-delay: 6s; }
.t6 { top: 74px; animation-delay: 3.5s; }

/* 从右向左滚动动画：从整体右侧外偏移 到 整体左侧外偏移 */
@keyframes danmuMove {
    0% { transform: translateX(1000px); }
    100% { transform: translateX(-100%); }
}