scene{
  display:block;
  font-family:"PingFang SC","Microsoft YaHei",-apple-system,sans-serif;
  font-size:15px;
  line-height:1.55;
  color:#1a1a22;
  background:
    repeating-linear-gradient(0deg,transparent 0 22px,rgba(5,217,232,.05) 22px 23px),
    repeating-linear-gradient(90deg,transparent 0 22px,rgba(5,217,232,.05) 22px 23px),
    linear-gradient(160deg,#f2efe6 0%,#e8e6dd 50%,#ece9df 100%);
  padding:12px 11px;
  border-radius:10px;
  border:1px solid rgba(252,238,10,.5);
  box-shadow:0 0 0 1px rgba(255,42,109,.15),0 8px 28px rgba(0,0,0,.18);
  max-width:760px;
  margin:0 auto;
  position:relative;
  overflow:hidden;
}
scene::before{
  content:"";
  position:absolute;inset:0;
  background:
    radial-gradient(circle at 88% 8%,rgba(252,238,10,.12),transparent 30%),
    radial-gradient(circle at 8% 92%,rgba(255,42,109,.1),transparent 32%);
  pointer-events:none;
}
scene::after{
  content:"◣ NIGHT CITY OS";
  position:absolute;top:0;right:0;
  font-size:9px;letter-spacing:1px;font-weight:700;
  color:#1a1a22;background:#fcee0a;
  padding:2px 8px 3px;
  border-radius:0 0 0 8px;
  z-index:3;
}

/* ===== 对话三色 ===== */
scene a.mc,scene a.npc,scene a.msg{
  text-decoration:none;
  font-weight:700;
  border-radius:3px;
  padding:0 2px;
}
scene a.mc{
  color:#0098b3;
  border-left:3px solid #05d9e8;
  padding-left:5px;margin-left:1px;
  background:linear-gradient(90deg,rgba(5,217,232,.13),transparent 80%);
  text-shadow:0 0 6px rgba(5,217,232,.4);
}
scene a.npc{
  color:#d6155f;
  border-left:3px solid #ff2a6d;
  padding-left:5px;margin-left:1px;
  background:linear-gradient(90deg,rgba(255,42,109,.12),transparent 80%);
  text-shadow:0 0 6px rgba(255,42,109,.35);
}
scene a.msg{
  font-family:"Courier New",monospace;
  color:#8a6400;font-weight:700;
  background:linear-gradient(90deg,rgba(184,134,11,.14),rgba(184,134,11,.04));
  border:1px solid rgba(184,134,11,.45);
  border-left:3px solid #b8860b;
  padding:1px 6px 1px 5px;
  position:relative;
  display:inline;
  background-size:100% 8px;
}
scene a.msg::before{content:"📡 ";}

/* ===== 折叠面板通用 ===== */
scene details{
  margin:9px 0;
  background:linear-gradient(135deg,rgba(255,255,255,.65),rgba(236,233,223,.55));
  border:1px solid rgba(5,217,232,.4);
  border-left:3px solid #05d9e8;
  border-radius:6px;
  overflow:hidden;
  position:relative;
}
scene details>summary{
  cursor:pointer;
  list-style:none;
  font-weight:700;
  font-size:14px;
  letter-spacing:.5px;
  color:#06323a;
  padding:9px 12px 9px 30px;
  background:linear-gradient(90deg,rgba(5,217,232,.16),rgba(5,217,232,.02));
  position:relative;
  user-select:none;
  transition:background .25s,letter-spacing .25s;
}
scene details>summary::-webkit-details-marker{display:none;}
scene details>summary::before{
  content:"▶";
  position:absolute;left:11px;top:50%;
  transform:translateY(-50%);
  color:#05d9e8;font-size:10px;
  transition:transform .3s;
}
scene details[open]>summary::before{transform:translateY(-50%) rotate(90deg);}
scene details>summary:hover{
  background:linear-gradient(90deg,rgba(5,217,232,.3),rgba(5,217,232,.05));
  letter-spacing:1.5px;
}
scene details>summary::after{
  content:"";
  position:absolute;left:0;bottom:0;height:2px;width:0;
  background:linear-gradient(90deg,#05d9e8,#fcee0a,#ff2a6d);
  transition:width .4s ease;
}
scene details[open]>summary::after{width:100%;animation:flow 2.5s linear infinite;}
@keyframes flow{
  0%{filter:hue-rotate(0deg)brightness(1);}
  50%{filter:hue-rotate(40deg)brightness(1.3);}
  100%{filter:hue-rotate(0deg)brightness(1);}
}

/* 思维链 */
scene details.think-section{border-left-color:#9c6dff;opacity:.92;}
scene details.think-section>summary{
  background:linear-gradient(90deg,rgba(156,109,255,.16),transparent);
  color:#4a2a8a;
}
scene details.think-section>summary::before{color:#9c6dff;}
scene think{
  display:block;
  font-family:"Courier New",monospace;
  font-size:12.5px;
  line-height:1.7;
  color:#3a3550;
  white-space:pre-wrap;
  padding:10px 12px;
  background:rgba(156,109,255,.05);
}

/* ===== 章回标题 ===== */
scene b.chapter{
  display:block;
  text-align:center;
  margin:6px 0 12px;
  padding:14px 10px;
  background:linear-gradient(135deg,rgba(26,26,34,.95),rgba(20,28,40,.95));
  border:2px solid #fcee0a;
  border-radius:8px;
  position:relative;
  box-shadow:0 0 18px rgba(252,238,10,.35),inset 0 0 22px rgba(5,217,232,.12);
}
scene b.chapter::before{
  content:attr(data-round);
  position:absolute;top:-1px;left:-1px;
  font-size:10px;font-weight:700;letter-spacing:1px;
  color:#1a1a22;background:#fcee0a;
  padding:3px 9px;
  border-radius:7px 0 8px 0;
}
scene b.chapter z{
  display:inline-block;
  font-size:17px;font-weight:700;
  letter-spacing:2px;
  color:#fcee0a;
  text-shadow:2px 0 #ff2a6d,-2px 0 #05d9e8;
  animation:glitch 4s steps(2,end) infinite;
}
@keyframes glitch{
  0%,90%,100%{text-shadow:2px 0 #ff2a6d,-2px 0 #05d9e8;transform:translateX(0);}
  92%{text-shadow:-2px 0 #ff2a6d,2px 0 #05d9e8;transform:translateX(2px);}
  94%{text-shadow:2px 0 #05d9e8,-2px 0 #ff2a6d;transform:translateX(-2px);}
  96%{text-shadow:2px 0 #ff2a6d,-2px 0 #05d9e8;transform:translateX(1px);}
}

/* ===== Header HUD ===== */
scene x.header{
  display:block;
  margin:10px 0;
  padding:10px 12px;
  background:linear-gradient(110deg,rgba(5,217,232,.1),rgba(252,238,10,.08));
  border:1px solid rgba(5,217,232,.5);
  border-radius:6px;
  position:relative;
  overflow:hidden;
  font-size:13.5px;
}
scene x.header::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(transparent,rgba(5,217,232,.1) 50%,transparent);
  background-size:100% 6px;
  animation:scan 4s linear infinite;
  pointer-events:none;
}
@keyframes scan{0%{background-position:0 -40px;}100%{background-position:0 200px;}}
scene x.header p{margin:3px 0;position:relative;color:#13323a;font-weight:500;}

/* ===== 正文 ===== */
scene x.story{
  display:block;
  margin:12px 0;
  padding:13px 15px;
  background:linear-gradient(135deg,rgba(255,255,255,.7),rgba(242,239,230,.55));
  border-left:4px solid #fcee0a;
  border-radius:0 8px 8px 0;
  box-shadow:inset 0 0 16px rgba(252,238,10,.06);
}
scene x.story p{margin:0 0 12px;line-height:1.75;font-size:15.5px;color:#1c1c26;}
scene x.story p:last-child{margin-bottom:0;}

/* ===== 信息分区 <x> 通用 ===== */
scene details x{
  display:block;
  margin:8px 10px;
  padding:9px 11px;
  background:rgba(255,255,255,.55);
  border-radius:5px;
  border-left:3px solid rgba(5,217,232,.55);
  font-size:13.5px;
}
scene details x p{margin:4px 0;line-height:1.6;color:#22222e;}
scene details x b{color:#b8860b;font-weight:700;}

/* 分区配色区分 */
scene x.char-info{border-left-color:#05d9e8;}
scene x.attributes{border-left-color:#fcee0a;}
scene x.attributes b{color:#0098b3;}
scene x.abilities{border-left-color:#9c6dff;}
scene x.cyberware{border-left-color:#ff2a6d;}
scene x.cyberware b{color:#d6155f;}
scene x.inventory{border-left-color:#ff8c00;}
scene x.inventory b{color:#c25e00;}
scene x.reputation{
  border-left-color:#fcee0a;
  background:linear-gradient(90deg,rgba(252,238,10,.12),rgba(255,255,255,.5));
}
scene x.reputation b{color:#a17a00;}
scene x.relations{border-left-color:#05d9e8;}
scene x.assets{border-left-color:#ff2a6d;}
scene x.assets b{color:#d6155f;}
scene x.memory{border-left-color:#9c6dff;font-family:"Courier New",monospace;font-size:12.5px;}
scene x.memory b{color:#6a3dd0;}

/* NPC档案 */
scene x.npc-info{
  border-left-color:#ff2a6d;
  background:linear-gradient(135deg,rgba(255,42,109,.07),rgba(255,255,255,.55));
}
scene x.npc-info b{color:#d6155f;}

/* ===== 夜之城动态 ===== */
scene x.rumor{display:block;margin:8px 10px;padding:6px 8px;background:transparent;border:none;}
scene x.rumor t{
  display:block;
  font-weight:700;font-size:13px;letter-spacing:1px;
  color:#06323a;
  margin:11px 0 6px;padding:4px 9px;
  background:linear-gradient(90deg,rgba(5,217,232,.22),transparent);
  border-left:3px solid #05d9e8;
  border-radius:3px;
}
scene x.rumor n,scene x.rumor d,scene x.rumor m,scene x.rumor j,scene x.rumor l{
  display:block;
  margin:5px 0;padding:7px 10px;
  font-size:13px;line-height:1.5;
  border-radius:5px;
  transition:transform .2s,box-shadow .2s;
}
scene x.rumor n{background:rgba(255,42,109,.1);border-left:3px solid #ff2a6d;color:#3a1020;}
scene x.rumor d{background:rgba(156,109,255,.1);border-left:3px solid #9c6dff;color:#2a1a4a;font-family:"Courier New",monospace;font-size:12.5px;}
scene x.rumor m{background:rgba(184,134,11,.1);border-left:3px solid #b8860b;color:#3a2a00;}
scene x.rumor j{background:rgba(252,238,10,.14);border-left:3px solid #fcee0a;color:#3a3000;font-weight:600;}
scene x.rumor l{background:rgba(5,217,232,.1);border-left:3px solid #05d9e8;color:#0a2a32;}
scene x.rumor n:hover,scene x.rumor d:hover,scene x.rumor m:hover,
scene x.rumor j:hover,scene x.rumor l:hover{
  transform:translateX(4px);
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}

/* ===== 行动推荐 ===== */
scene x.action{border-left-color:#fcee0a;background:transparent;border:none;padding:4px 10px;}
scene x.action p{
  margin:7px 0;padding:9px 13px;
  background:linear-gradient(100deg,rgba(252,238,10,.1),rgba(5,217,232,.06));
  border:1px solid rgba(252,238,10,.4);
  border-radius:6px;
  font-size:13.5px;font-weight:600;color:#2a2616;
  cursor:pointer;
  position:relative;
  transition:all .25s;
}
scene x.action p::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:#fcee0a;transition:width .25s;
}
scene x.action p:hover{
  transform:translateY(-2px);
  background:linear-gradient(100deg,rgba(252,238,10,.2),rgba(5,217,232,.12));
  border-color:#05d9e8;
  box-shadow:0 4px 14px rgba(5,217,232,.25);
}
scene x.action p:hover::before{width:5px;background:#05d9e8;}

/* 移动端 */
@media(max-width:480px){
  scene{font-size:14px;padding:10px 8px;}
  scene x.story p{font-size:15px;}
  scene b.chapter z{font-size:15px;letter-spacing:1px;}
  scene details x,scene x.rumor{margin:6px 5px;}
}