/* light.css —— 正向页面样式（主页可直接到达的页面）
   哥特紫罗兰主题 + 十三人角色主色（CSS 变量 --acc 驱动）
   含：星空粒子、滚动显现、终末地式 Lore 轮播、动效体系
   动效由 main.js 增强；无 JS 时以 CSS 动画兜底 */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    background: linear-gradient(180deg, #171126 0%, #14101c 40%, #191228 100%);
    background-attachment: fixed;
    color: #d8d2e8;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI Symbol", sans-serif;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 40px);
    line-height: 1.95;
    position: relative;
}

/* —— 星空粒子画布（main.js 驱动，铺满视口、置于内容之下） —— */
#stars {
    position: fixed; inset: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none; opacity: .75;
}

/* —— 封面虚化背景（body.bgcover 启用：index 与角色页可用） —— */
body.bgcover::before {
    content: ""; position: fixed; inset: -60px; z-index: -3;
    background: url("img/cover.jpg") center 22%/cover no-repeat;
    filter: blur(16px) brightness(.4) saturate(.9);
    transform: scale(1.08);
    animation: bgdrift 70s ease-in-out infinite alternate;
}
body.bgcover::after { /* 紫色雾霭叠加，避免背景"糊成一片黑" */
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(ellipse at 18% 12%, rgba(150,90,220,.20), transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(230,120,170,.14), transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(20,14,32,.35), rgba(14,10,22,.72) 100%);
    animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes bgdrift {
    from { transform: scale(1.08) translate(0, 0); }
    to   { transform: scale(1.16) translate(-2.2%, -1.6%); }
}
@keyframes aurora {
    from { opacity: .85; }
    50%  { opacity: 1; }
    to   { opacity: .8; }
}

/* —— 基础排版 —— */
p { margin: 1em 0; }
h1 {
    color: var(--acc, #c9a7f5);
    letter-spacing: 2px; line-height: 1.4;
    text-shadow: 0 0 14px color-mix(in srgb, var(--acc, #965adc) 45%, transparent);
}
h2 {
    color: var(--acc, #a678d4);
    border-left: 4px solid var(--acc, #7b4fa1);
    padding: 2px 0 2px 12px;
    margin-top: 34px; margin-bottom: 14px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--acc, #7b4fa1) 16%, transparent), transparent 70%);
}
h3 { color: #9c86c9; margin-top: 24px; }
a { color: #b48ee0; text-decoration: none; border-bottom: 1px dotted transparent; transition: color .2s, border-color .2s; }
a:hover { color: #e3c8ff; border-bottom-color: #e3c8ff; }
ul, ol { padding-left: 26px; }
li { margin: 8px 0; }
dt { color: var(--acc, #c9a7f5); font-weight: bold; margin-top: 14px; }
dd { margin: 4px 0 10px 22px; color: #bfb3d6; }
blockquote {
    margin: 20px 8px; padding: 14px 20px;
    border-left: 4px solid var(--acc, #8a5fb5);
    background: rgba(122,79,161,.10);
    border-radius: 0 10px 10px 0;
    color: #cbb9e8; font-style: italic;
}
table {
    border-collapse: collapse; width: 100%; margin: 16px 0;
    background: rgba(255,255,255,.02); table-layout: fixed; word-break: break-word;
}
th, td { border: 1px solid #3a2b52; padding: 9px 14px; text-align: left; vertical-align: top; }
th { background: #241a38; color: var(--acc, #c9a7f5); width: 22%; }
tr:nth-child(even) td { background: rgba(123,79,161,.06); }
details {
    margin: 14px 0; padding: 10px 16px;
    border: 1px solid #3a2b52; border-radius: 10px;
    background: rgba(36,26,56,.5);
}
summary { cursor: pointer; color: var(--acc, #b48ee0); font-weight: bold; }
details[open] summary { border-bottom: 1px dashed #3a2b52; padding-bottom: 4px; margin-bottom: 6px; }

/* —— 自适应图片 —— */
img { max-width: 100%; height: auto; border-radius: 10px; display: inline-block; }
figure { margin: 20px 0; text-align: center; }
figcaption { color: #6f6486; font-size: 13px; margin-top: 8px; }
.pic { text-align: center; margin: 20px 0; }
.pic img { box-shadow: 0 4px 22px rgba(120,70,190,.35); border: 1px solid #3a2b52; }

/* —— 交错式大标题 —— */
.stagger { text-align: center; margin: 10px 0 4px; line-height: 1.3; }
.stagger .ln { display: block; font-weight: bold; }
.stagger .big {
    font-size: clamp(28px, 7vw, 52px); letter-spacing: 4px;
    background: linear-gradient(120deg, #e3c8ff, #9a6fd0, #e3c8ff);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.stagger .ln:nth-child(1) { text-align: left;  padding-left: 8%; }
.stagger .ln:nth-child(2) { text-align: right; padding-right: 8%; }
.stagger .sub { font-size: clamp(14px, 3.2vw, 20px); color: #9c86c9; letter-spacing: 2px; margin-top: 8px; }

/* —— 标题下流动星光分割线 —— */
.sheen { position: relative; overflow: hidden; }
.sheen::after {
    content: ""; position: absolute; left: -40%; top: 0; bottom: 0; width: 30%;
    background: linear-gradient(100deg, transparent, rgba(227,200,255,.14), transparent);
    animation: sheen 5.5s ease-in-out infinite;
}
@keyframes sheen { 0%,60% { left: -40%; } 100% { left: 120%; } }

/* —— 滚动显现（main.js 添加 .reveal 后生效；无 JS 时默认可见） —— */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* —— 导航瓷贴 —— */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; }
.tile {
    display: block; border: 1px solid #3a2b52; border-radius: 12px; padding: 16px;
    background: rgba(36,26,56,.5); text-decoration: none;
    transition: border-color .25s, background .25s, transform .25s, box-shadow .25s;
}
.tile:hover { border-color: var(--acc, #7b4fa1); background: rgba(58,43,82,.6); transform: translateY(-3px); box-shadow: 0 10px 26px rgba(120,70,190,.35); }
.tile strong { color: var(--acc, #c9a7f5); display: block; margin-bottom: 4px; font-size: 16px; }
.tile span { color: #8a7aa8; font-size: 13px; }

/* ============================================================
   终末地式 Lore 轮播（.lore）
   左：大图立绘（角色主色光晕） 右：编号/名字/魔法/台词/档案
   底部：◀  N/13 ▶ 计数器 + 进度条（第14格为隐藏彩蛋"细缝"）
   ============================================================ */
.lore {
    position: relative; margin: 22px 0 10px;
    border: 1px solid #3a2b52; border-radius: 18px;
    background: linear-gradient(160deg, #221936 0%, #120d1d 100%);
    overflow: hidden;
}
.lore::before { /* 斜纹水印，呼应终末地进度条纹理 */
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
    background: repeating-linear-gradient(115deg, #fff 0 2px, transparent 2px 14px);
}
.lore .lstage { position: relative; }
.lore .lslide {
    display: none; gap: 22px; padding: 22px 20px 18px;
    align-items: center;
}
.lore .lslide.on { display: flex; animation: slidein .55s cubic-bezier(.2,.7,.3,1) both; }
@keyframes slidein { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
.lore .lphoto { flex: 0 0 42%; text-align: center; }
.lore .lphoto img {
    width: 100%; max-width: 320px; height: 380px; object-fit: cover; object-position: top center;
    border-radius: 14px; border: 1px solid var(--acc, #3a2b52);
    box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 10px 36px color-mix(in srgb, var(--acc, #7b4fa1) 45%, transparent);
    transition: transform .4s, box-shadow .4s;
}
.lore .lphoto:hover img { transform: scale(1.02); }
.lore .linfo { flex: 1; min-width: 0; }
.lore .lno { font-family: Consolas, monospace; font-size: 13px; letter-spacing: 3px; color: var(--acc, #9c86c9); }
.lore .lname { font-size: clamp(22px, 4vw, 30px); font-weight: bold; color: #e3c8ff; letter-spacing: 2px; margin: 2px 0 0; }
.lore .lname a { color: inherit; border-bottom: none; }
.lore .lname a:hover { text-shadow: 0 0 12px var(--acc, #c9a7f5); }
.lore .ljp { color: #7d6f9a; font-size: 13px; margin: 0 0 10px; }
.lore .lrow { font-size: 13px; color: #8a7aa8; margin: 2px 0; }
.lore .lrow b { color: var(--acc, #c9a7f5); font-weight: normal; }
.lore .lmag {
    display: inline-block; margin: 8px 0; padding: 3px 14px;
    border: 1px solid var(--acc, #4a3568); border-radius: 999px;
    color: var(--acc, #e3c8ff); font-size: 14px;
    background: color-mix(in srgb, var(--acc, #7b4fa1) 12%, transparent);
}
.lore .ldesc { color: #bfb3d6; font-size: 14px; margin: 6px 0 12px; }
.lore .lbtn {
    display: inline-block; padding: 8px 26px; border-radius: 999px;
    border: 1px solid var(--acc, #7b4fa1); color: #1a1226; font-weight: bold;
    background: linear-gradient(120deg, var(--acc, #a678d4), color-mix(in srgb, var(--acc, #a678d4) 65%, #fff 12%));
    text-decoration: none; border-bottom: 1px solid transparent;
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.lore .lbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px color-mix(in srgb, var(--acc, #7b4fa1) 55%, transparent); filter: brightness(1.1); color: #1a1226; }

/* 底部控制条：◀ 1/13 ▶ + 进度刻度 */
.lore .lctrl {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    padding: 10px 16px 4px; border-top: 1px solid #2c2144; position: relative; z-index: 2;
}
.lore .larrow {
    width: 40px; height: 40px; line-height: 36px; text-align: center; border-radius: 50%;
    border: 1px solid #4a3568; background: rgba(20,14,32,.85); color: #c9a7f5;
    font-size: 18px; cursor: pointer; user-select: none;
    transition: background .2s, color .2s, transform .2s;
}
.lore .larrow:hover { background: #3a2b52; color: #fff; transform: scale(1.08); }
.lore .lcount { font-family: Consolas, monospace; font-size: 15px; letter-spacing: 2px; color: #9c86c9; min-width: 64px; text-align: center; }
.lore .lticks { display: flex; gap: 6px; justify-content: center; padding: 6px 0 14px; position: relative; z-index: 2; }
.lore .lticks i { width: 26px; height: 5px; border-radius: 3px; background: #2c2144; cursor: pointer; transition: background .25s, box-shadow .25s; }
.lore .lticks i:hover { background: #4a3568; }
.lore .lticks i.act { background: var(--acc, #c9a7f5); box-shadow: 0 0 8px color-mix(in srgb, var(--acc, #c9a7f5) 80%, transparent); }
/* 隐藏的第 14 格：进度条末端一根几乎看不见的"细缝" */
.lore .lticks i.ghost { width: 4px; background: #171126; }
.lore .lticks i.ghost:hover { background: #2c2144; }
.lore .lticks i.ghost.act { background: #6f5a8e; }
.lore .lslide.s14 .lphoto img { filter: hue-rotate(180deg) saturate(.8) brightness(.9); }

/* —— 隐蔽符号 —— */
.secret {
    color: #6f5a8e; opacity: .5; text-decoration: none; font-size: 13px;
    border-bottom: none; padding: 0 3px;
    font-family: "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
    transition: opacity .25s, color .25s, text-shadow .25s;
}
.secret:hover { opacity: 1; color: #e3c8ff; text-shadow: 0 0 8px rgba(200,150,255,.8); }
.secret2 { color: inherit; text-decoration: none; border-bottom: 1px dotted #6f6486; transition: color .2s, border-color .2s; }
.secret2:hover { color: #c9a7f5; border-bottom-color: #c9a7f5; }
.foot { color: #6f6486; font-size: 13px; }
hr { border: none; border-top: 1px solid #3a2b52; margin: 30px 0; }
.tag {
    display: inline-block; background: #241a38; border: 1px solid #4a3568;
    border-radius: 999px; padding: 2px 12px; margin: 4px 4px 4px 0; font-size: 13px; color: #b48ee0;
}
.card { border: 1px solid #3a2b52; border-radius: 12px; padding: 14px 18px; margin: 16px 0; background: rgba(36,26,56,.45); }
.nav { text-align: center; margin: 14px 0; }
.nav a { margin: 0 8px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.cols > div { flex: 1 1 260px; }
kbd { background: #241a38; border: 1px solid #4a3568; border-bottom-width: 3px; border-radius: 6px; padding: 0 8px; font-family: Consolas, monospace; color: #e3c8ff; }
audio { width: 100%; margin: 10px 0; }

/* —— 角色页头部色条 —— */
.head { border-bottom: 1px solid color-mix(in srgb, var(--acc, #3a2b52) 60%, #3a2b52); padding-bottom: 10px; margin-bottom: 18px; }
.head p { color: #9c86c9; }

/* ============================================================
   通用动效组件库（所有页面引用 light.css 即自动生效）
   ============================================================ */

/* —— 主标题永久动效：三层叠加（流光 + 呼吸辉光 + 逐字浮动） —— */
.stagger .big { position: relative; }
.stagger .big::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--acc, #c9a7f5), transparent);
    background-size: 220% 100%;
    animation: underline 4.5s linear infinite;
    opacity: .85;
}
@keyframes underline { from { background-position: 220% 0; } to { background-position: -220% 0; } }
.stagger .sub { position: relative; animation: floaty 5.5s ease-in-out infinite; }
.stagger .ln:nth-child(3).sub { animation-delay: .4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); letter-spacing: 2px; } 50% { transform: translateY(-5px); letter-spacing: 3.5px; } }
/* 主标题（重制版，替换旧"逐字上下浮动"）：
   入场=逐字 3D 翻转浮现（main.js 拆 .typeword 为 span.tw，逐字延迟）；
   常驻=银紫纵向渐变缓慢流动 + 多层光晕呼吸。
   注意：入场只用 transform/opacity，呼吸只用 filter/background-position，
   避免两条动画争用同一属性相互覆盖。 */
.stagger .big { text-shadow: none; }
.stagger .big.typeword { background: none; color: var(--acc, #c9a7f5); perspective: 620px; }
.tw {
    display: inline-block; opacity: 0;
    background: linear-gradient(180deg, #f8efff 0%, #ddc2f8 40%, #a678d4 82%, #cdb0ee 100%);
    background-size: 100% 220%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: twin 1.15s cubic-bezier(.16,.84,.3,1.12) both,
               twglow 6.5s ease-in-out infinite;
}
@keyframes twin {
    0%   { opacity: 0; transform: translateY(28px) rotateX(-74deg) scale(.88); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: none; }
}
@keyframes twglow {
    0%,100% { filter: drop-shadow(0 0 6px rgba(170,120,230,.22)); background-position: 0 0; }
    50%     { filter: drop-shadow(0 0 16px rgba(205,155,255,.5)) drop-shadow(0 3px 34px rgba(120,80,200,.28)); background-position: 0 100%; }
}
/* 中日文标语交替浮现（index 副标题）：grid 堆叠两行，交替淡入淡出
   注意：.sw 基础 opacity:0 + fill-mode both——否则带 delay 的第二行在延迟期间
   会按基础样式可见，首屏与第一行重叠（此前BUG根源） */
.subswap { display: inline-grid; place-items: center; }
.subswap .sw { grid-area: 1 / 1; opacity: 0; animation: sw 9s ease-in-out infinite both; }
.subswap .sw.jp { animation-delay: 4.5s; }
@keyframes sw {
    0%   { opacity: 0; transform: translateY(10px); filter: blur(4px); }
    8%,42% { opacity: 1; transform: none; filter: none; }
    50%,100% { opacity: 0; transform: translateY(-10px); filter: blur(4px); }
}
/* 标题下的天平徽记旋转 */
.crest { display: inline-block; font-size: 20px; letter-spacing: 10px; color: #9c86c9;
    animation: crest 9s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(180,140,240,.6)); }
@keyframes crest { 0%,100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(7deg) scale(1.12); } }

/* —— 图片 Ken Burns 缓推（.kb 类，配合 figure/.pic 使用） —— */
.kb { overflow: hidden; border-radius: 12px; }
.kb > img { animation: kenburns 22s ease-in-out infinite alternate; will-change: transform; }
@keyframes kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.12) translate(-2.5%, 2%); }
}
/* 图片悬停：色彩复原 + 微缩放 */
.pic img, figure img { transition: transform .5s cubic-bezier(.2,.7,.3,1), filter .5s, box-shadow .5s; }
.pic img:hover, figure img:hover { transform: scale(1.025) translateY(-3px); box-shadow: 0 14px 40px color-mix(in srgb, var(--acc, #7b4fa1) 55%, transparent); }

/* —— 卡片 3D 倾斜跟随鼠标（main.js 给 .tilt 计算 --rx/--ry） —— */
.tilt { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform .18s ease-out, box-shadow .3s, border-color .3s; transform-style: preserve-3d; }
.tilt:hover { box-shadow: 0 18px 44px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--acc, #7b4fa1) 40%, transparent); }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(320px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.20), transparent 60%); }
.tilt:hover .glare { opacity: 1; }

/* —— 分割线扫光（hr.sweep） —— */
hr.sweep { position: relative; overflow: hidden; border: none; height: 1px;
    background: linear-gradient(90deg, transparent, #4a3568 20%, #4a3568 80%, transparent); }
hr.sweep::after { content: ""; position: absolute; top: -1px; height: 3px; width: 22%;
    background: linear-gradient(90deg, transparent, var(--acc, #c9a7f5), transparent);
    filter: blur(1px); animation: sweep 4.2s ease-in-out infinite; }
@keyframes sweep { 0% { left: -25%; } 100% { left: 105%; } }

/* —— 滚动显现加强：阶梯延迟 + 方向变体 —— */
.js .reveal-l { opacity: 0; transform: translateX(-30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1); }
.js .reveal-r { opacity: 0; transform: translateX(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1); }
.js .reveal-z { opacity: 0; transform: scale(.9); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1); }
.js .reveal-l.in, .js .reveal-r.in, .js .reveal-z.in { opacity: 1; transform: none; }
.js .stagger-in > * { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.js .stagger-in.in > * { opacity: 1; transform: none; }
.js .stagger-in.in > *:nth-child(1) { transition-delay: .05s; }
.js .stagger-in.in > *:nth-child(2) { transition-delay: .16s; }
.js .stagger-in.in > *:nth-child(3) { transition-delay: .27s; }
.js .stagger-in.in > *:nth-child(4) { transition-delay: .38s; }
.js .stagger-in.in > *:nth-child(5) { transition-delay: .49s; }
.js .stagger-in.in > *:nth-child(6) { transition-delay: .60s; }
.js .stagger-in.in > *:nth-child(7) { transition-delay: .71s; }
.js .stagger-in.in > *:nth-child(8) { transition-delay: .82s; }

/* —— 章节序号大字（终末地式：左侧竖排编号） —— */
.secno { display: flex; align-items: baseline; gap: 12px; margin-top: 40px; }
.secno .n { font-family: Consolas, monospace; font-size: clamp(30px, 6vw, 46px); font-weight: bold; line-height: 1;
    color: transparent; -webkit-text-stroke: 1.4px color-mix(in srgb, var(--acc, #a678d4) 75%, transparent);
    letter-spacing: 1px; }
.secno h2 { margin: 0; border-left: none; padding-left: 0; background: none; }
.secno::after { content: ""; flex: 1; height: 1px; align-self: center;
    background: linear-gradient(90deg, color-mix(in srgb, var(--acc, #a678d4) 60%, transparent), transparent); }

/* —— 资料条（stat strip，横向滚入） —— */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 18px 0; }
.stat { position: relative; overflow: hidden; border: 1px solid #3a2b52; border-radius: 12px; padding: 12px 8px;
    text-align: center; background: rgba(36,26,56,.55); }
.stat b { display: block; font-size: clamp(16px, 3.4vw, 21px); color: var(--acc, #e3c8ff); letter-spacing: 1px; }
.stat span { font-size: 12px; color: #8a7aa8; letter-spacing: 1px; }
.stat::after { content: ""; position: absolute; inset: auto 0 -100% 0; height: 100%;
    background: linear-gradient(0deg, color-mix(in srgb, var(--acc, #7b4fa1) 26%, transparent), transparent);
    transition: bottom .45s cubic-bezier(.2,.7,.3,1); }
.stat:hover::after { bottom: 0; }

/* —— 标签云（萌点）：弹入 + 悬停上色 —— */
.tags { margin: 14px 0; }
.tag { position: relative; transition: transform .25s, background .25s, color .25s, box-shadow .25s; }
.tag:hover { transform: translateY(-3px) rotate(-1.5deg); background: color-mix(in srgb, var(--acc, #7b4fa1) 30%, #241a38);
    color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--acc, #7b4fa1) 45%, transparent); }

/* —— 时间线（人物经历） —— */
.tl { position: relative; margin: 22px 0 22px 6px; padding-left: 26px;
    border-left: 2px solid color-mix(in srgb, var(--acc, #7b4fa1) 45%, #3a2b52); }
.tl::before { content: ""; position: absolute; left: -2px; top: 0; width: 2px; height: 100%;
    background: linear-gradient(180deg, var(--acc, #c9a7f5), transparent); transform-origin: top;
    animation: timeline 2.4s ease-out both; }
@keyframes timeline { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.tl .ti { position: relative; margin: 0 0 20px; }
.tl .ti::before { content: ""; position: absolute; left: -33px; top: 9px; width: 11px; height: 11px; border-radius: 50%;
    background: #171126; border: 2px solid var(--acc, #a678d4);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc, #a678d4) 60%, transparent); animation: pulsedot 2.8s ease-out infinite; }
@keyframes pulsedot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc, #a678d4) 60%, transparent); }
    70%,100% { box-shadow: 0 0 0 12px transparent; } }
.tl .ti h3 { margin: 0 0 6px; color: var(--acc, #c9a7f5); }
.tl .ti p { margin: 6px 0; color: #c3b6dc; }

/* —— 台词块（引言）：左侧竖线生长 + 引号淡入 —— */
.quote { position: relative; margin: 24px 6px; padding: 16px 20px 16px 46px;
    border-left: 3px solid var(--acc, #a678d4); border-radius: 0 14px 14px 0;
    background: linear-gradient(120deg, color-mix(in srgb, var(--acc, #7b4fa1) 16%, transparent), rgba(36,26,56,.4)); }
.quote::before { content: "「"; position: absolute; left: 12px; top: 6px; font-size: 26px; color: var(--acc, #c9a7f5); opacity: .8; }
.quote .who { display: block; margin-top: 8px; font-size: 13px; color: #8a7aa8; text-align: right; letter-spacing: 1px; }

/* —— 双栏图文（左文右图 / 右文左图） —— */
.spot { display: flex; gap: 22px; align-items: center; margin: 24px 0; }
.spot > .txt { flex: 1; min-width: 0; }
.spot > .ph { flex: 0 0 40%; text-align: center; }
.spot > .ph img { width: 100%; max-width: 300px; border-radius: 14px; border: 1px solid #3a2b52;
    box-shadow: 0 12px 34px color-mix(in srgb, var(--acc, #7b4fa1) 40%, transparent); }
.spot.flip { flex-direction: row-reverse; }

/* —— 图片画廊（缩略图条 + 点击放大） —— */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 18px 0; }
.gal img { width: 100%; height: 120px; object-fit: cover; object-position: top; border-radius: 10px; cursor: zoom-in;
    border: 1px solid #3a2b52; transition: transform .35s, filter .35s, box-shadow .35s; filter: saturate(.85); }
.gal img:hover { transform: scale(1.05); filter: saturate(1.15) brightness(1.08); box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.lightbox { position: fixed; inset: 0; z-index: 99; display: none; place-items: center;
    background: rgba(8,5,14,.92); backdrop-filter: blur(6px); padding: 20px; cursor: zoom-out; }
.lightbox.on { display: grid; animation: fadein .3s ease both; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 70px rgba(0,0,0,.7); }

/* —— 折叠面板美化（details 展开动画） —— */
details { transition: border-color .3s, background .3s; }
details:hover { border-color: var(--acc, #7b4fa1); }
details[open] > * { animation: panelin .5s ease both; }
@keyframes panelin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
summary::after { content: "▾"; float: right; transition: transform .3s; color: var(--acc, #b48ee0); }
details[open] summary::after { transform: rotate(180deg); }

/* —— 表格行悬停高亮 —— */
tbody tr, table tr { transition: background .25s; }
table tr:hover td { background: color-mix(in srgb, var(--acc, #7b4fa1) 12%, transparent); }

/* —— 返回/导航链接箭头滑动 —— */
.nav a, p.nav a { position: relative; padding-left: 2px; transition: padding-left .25s, color .25s; }
.nav a:hover { padding-left: 8px; }

/* —— 滚动进度条（main.js 注入 #scrollbar） —— */
#scrollbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60;
    background: linear-gradient(90deg, var(--acc, #a678d4), #f2a9c9);
    box-shadow: 0 0 12px color-mix(in srgb, var(--acc, #a678d4) 80%, transparent); }

/* —— 回到顶部浮动按钮 —— */
#totop { position: fixed; right: 16px; bottom: 18px; z-index: 60; width: 42px; height: 42px;
    display: none; place-items: center; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--acc, #4a3568); background: rgba(23,17,38,.85); color: var(--acc, #c9a7f5);
    font-size: 18px; transition: transform .25s, background .25s, color .25s; }
#totop.on { display: grid; animation: fadein .4s ease both; }
#totop:hover { transform: translateY(-4px); background: var(--acc, #7b4fa1); color: #fff; }

/* ============================================================
   月代雪专属：华丽两段式解锁
   ============================================================ */
body.yuki-page { --acc: #a8c4e8; }
.yuki-gate { text-align: center; padding: 12vh 10px 8vh; position: relative; }
/* 背景冰晶光晕 */
.yuki-gate::before {
    content: ""; position: absolute; left: 50%; top: 42%; width: 620px; height: 620px; max-width: 92vw; max-height: 92vw;
    transform: translate(-50%, -50%); pointer-events: none;
    background: radial-gradient(circle, rgba(150,190,255,.16) 0%, rgba(120,160,230,.07) 40%, transparent 70%);
    animation: halo 8s ease-in-out infinite alternate;
}
@keyframes halo { from { opacity: .5; transform: translate(-50%,-50%) scale(.9); } to { opacity: 1; transform: translate(-50%,-50%) scale(1.12); } }
/* 落雪画布 */
#snow { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .9; }
.yuki-gate .yg-line {
    display: block; font-size: clamp(17px, 3.6vw, 25px); color: #9db6d8; letter-spacing: 4px;
    margin: 30px 0; font-style: italic;
    opacity: 0; transform: translateY(20px) scale(.96); filter: blur(6px);
    transition: opacity 1.5s ease, transform 1.5s cubic-bezier(.2,.7,.3,1), filter 1.5s ease, color .4s, text-shadow .4s;
    text-shadow: 0 0 20px rgba(120,160,230,.35);
}
.yuki-gate .yg-line:nth-child(1) { transition-delay: .4s; }
.yuki-gate .yg-line:nth-child(2) { transition-delay: 1.9s; }
.yuki-gate .yg-line:nth-child(3) { transition-delay: 3.4s; }
.yuki-gate .yg-line:nth-child(4) { transition-delay: 4.9s; }
.yuki-gate.lit .yg-line { opacity: 1; transform: none; filter: none; }
.yuki-gate.lit .yg-line:hover { color: #e6f0ff; text-shadow: 0 0 26px rgba(180,215,255,.95), 0 0 60px rgba(120,170,255,.5); }
/* 逐字冰晶闪烁（main.js 拆分 .yg-line 为 span.gw） */
.gw { display: inline-block; animation: gw 4.2s ease-in-out infinite; }
@keyframes gw { 0%,100% { opacity: .92; text-shadow: 0 0 12px rgba(140,180,240,.3); }
    50% { opacity: 1; text-shadow: 0 0 22px rgba(190,225,255,.85); } }
/* 第一击：引号对话弹入 */
.yuki-gate .yg-reply { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 1.4s cubic-bezier(.2,.7,.3,1), opacity 1s ease .3s; }
.yuki-gate.replied .yg-reply { max-height: 300px; opacity: 1; }
.yuki-gate .yr-line {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    margin: 26px 0; font-size: clamp(17px, 3.6vw, 24px); color: #cfe0f5; font-weight: bold; letter-spacing: 3px;
    opacity: 0; transform: translateY(14px) scale(.94);
}
.yuki-gate .yr-line .quo {
    font-size: clamp(34px, 7vw, 52px); color: #8fa9cf; font-family: Georgia, serif; line-height: .8;
    text-shadow: 0 0 18px rgba(150,190,255,.6); animation: quofloat 5s ease-in-out infinite;
}
@keyframes quofloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.yuki-gate.replied .yr-line { animation: replyin 1.1s cubic-bezier(.2,.8,.25,1) both; }
.yuki-gate.replied .yr-line:nth-child(2) { animation-delay: 1.1s; }
@keyframes replyin {
    0% { opacity: 0; transform: translateY(16px) scale(.92); filter: blur(5px); }
    60% { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: none; }
}
/* 提示与点击涟漪 */
.yuki-gate .yg-hint { margin-top: 7vh; font-size: 12px; color: #4a6280; letter-spacing: 5px; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: .3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
.ripple { position: fixed; z-index: 98; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    border: 2px solid rgba(190,220,255,.9); pointer-events: none; animation: ripple .95s ease-out forwards; }
@keyframes ripple { to { width: 260px; height: 260px; margin: -130px 0 0 -130px; opacity: 0; border-width: 1px; } }
/* 第二击：碎片化消散 */
.yuki-gate.shatter .yg-line { animation: shatter 1.5s cubic-bezier(.4,0,.7,.2) both; }
.yuki-gate.shatter .yg-line:nth-child(2) { animation-delay: .12s; }
.yuki-gate.shatter .yg-line:nth-child(3) { animation-delay: .24s; }
.yuki-gate.shatter .yg-line:nth-child(4) { animation-delay: .36s; }
@keyframes shatter {
    0% { opacity: 1; transform: none; filter: none; }
    40% { opacity: 1; transform: scale(1.06); filter: brightness(1.8) blur(0); }
    100% { opacity: 0; transform: translateY(-46px) scale(.86) rotate(2deg); filter: blur(14px); }
}
#yuki-file { display: none; }
#yuki-file.open { display: block; }
#yuki-file.open .head h1 { animation: titlein 1.6s cubic-bezier(.2,.7,.3,1) both; }
@keyframes titlein { from { opacity: 0; letter-spacing: 26px; filter: blur(12px); } to { opacity: 1; letter-spacing: 4px; filter: none; } }
#yuki-file.open .yg-block { opacity: 0; transform: translateY(26px); animation: blockin .9s ease both; }
#yuki-file.open .yg-block:nth-of-type(1) { animation-delay: .5s; }
#yuki-file.open .yg-block:nth-of-type(2) { animation-delay: .8s; }
#yuki-file.open .yg-block:nth-of-type(3) { animation-delay: 1.1s; }
#yuki-file.open .yg-block:nth-of-type(4) { animation-delay: 1.4s; }
#yuki-file.open .yg-block:nth-of-type(5) { animation-delay: 1.7s; }
@keyframes blockin { to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   动效扩展库 II（新增类型，全站自动/按需生效）
   ============================================================ */

/* —— h2 下划线展开 + 字符上浮（滚动进入视口时触发一次） —— */
h2 { display: inline-block; position: relative; }
h2::after { content: ""; position: absolute; left: 12px; right: 0; bottom: -4px; height: 2px;
    background: linear-gradient(90deg, var(--acc, #a678d4), transparent);
    transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2,.7,.3,1) .15s; }
h2.in::after { transform: scaleX(1); }

/* —— 文字乱码解码（main.js 对 .scramble 生效） —— */
.scramble { display: inline-block; }

/* —— 图片故障风悬停（RGB 分离 + 抖动） —— */
.glitch { position: relative; }
.glitch:hover > img { animation: glitchshake .45s steps(2, end) 2; }
.glitch::before, .glitch::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: inherit; pointer-events: none; opacity: 0; mix-blend-mode: screen; }
.glitch:hover::before { opacity: .5; animation: glitchr .4s steps(2, end) 2; }
.glitch:hover::after { opacity: .5; animation: glitchb .4s steps(2, end) 2; }
@keyframes glitchshake { 25% { transform: translate(2px, -1px) skewX(1.5deg); } 50% { transform: translate(-2px, 1px); } 75% { transform: translate(1px, 1px) skewX(-1.5deg); } }
@keyframes glitchr { 0% { box-shadow: inset 4px 0 0 rgba(255,0,80,.35); } 100% { box-shadow: inset -4px 0 0 rgba(255,0,80,.35); } }
@keyframes glitchb { 0% { box-shadow: inset -4px 0 0 rgba(0,180,255,.35); } 100% { box-shadow: inset 4px 0 0 rgba(0,180,255,.35); } }

/* —— 呼吸霓虹描边卡片 —— */
.glowborder { position: relative; border-radius: 14px; }
.glowborder::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    border: 1px solid transparent;
    background: conic-gradient(from var(--ga, 0deg), transparent 0 55%, var(--acc, #a678d4) 72%, transparent 88%) border-box;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: gorot 6s linear infinite; opacity: .9; }
@property --ga { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes gorot { to { --ga: 360deg; } }

/* —— 翻面卡片（悬停 3D 翻转看背面，用于角色页萌点） —— */
.flipcard { position: relative; perspective: 1100px; }
.flipcard .fc-inner { transition: transform .8s cubic-bezier(.3,.8,.3,1); transform-style: preserve-3d; }
.flipcard:hover .fc-inner { transform: rotateY(180deg); }
.flipcard .fc-front, .flipcard .fc-back { backface-visibility: hidden; }
.flipcard .fc-back { position: absolute; inset: 0; transform: rotateY(180deg); overflow: auto; }

/* —— 走马灯情报条（终末地式滚动公告） —— */
.ticker { overflow: hidden; border: 1px solid #3a2b52; border-radius: 999px; background: rgba(36,26,56,.6);
    margin: 14px 0; position: relative; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 46px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, #171126, transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, #171126, transparent); }
.ticker .tk { display: flex; width: max-content; padding: 6px 0; color: #9c86c9; font-size: 13px; letter-spacing: 1px;
    animation: tkmove 34s linear infinite; }
.ticker .tk > span { white-space: nowrap; }
.ticker:hover .tk { animation-play-state: paused; }
@keyframes tkmove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* —— 按钮磁吸 + 流光掠过 —— */
.lbtn, .tile { position: relative; overflow: hidden; }
.lbtn::after, .tile::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
    transform: skewX(-20deg); animation: btnsheen 4.6s ease-in-out infinite; pointer-events: none; }
@keyframes btnsheen { 0%,62% { left: -60%; } 100% { left: 130%; } }

/* —— 全局点击涟漪（main.js 注入 .clickrip，light 主题色） —— */
.clickrip { position: fixed; z-index: 97; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--acc, #a678d4) 70%, transparent); pointer-events: none;
    animation: crip .8s ease-out forwards; }
@keyframes crip { to { width: 130px; height: 130px; margin: -65px 0 0 -65px; opacity: 0; } }

/* —— 光标星尘尾迹（main.js 注入 .dust） —— */
.dust { position: fixed; z-index: 96; width: 5px; height: 5px; border-radius: 50%; pointer-events: none;
    background: var(--acc, #c9a7f5); box-shadow: 0 0 8px var(--acc, #c9a7f5);
    animation: dustfade 1s ease-out forwards; }
@keyframes dustfade { to { opacity: 0; transform: translateY(14px) scale(.2); } }

/* —— 数字滚动计数（main.js 对 .stat b 生效） —— */
.stat b { font-variant-numeric: tabular-nums; }

/* —— 花瓣/光点飘落画布（index 专属 #petals） —— */
#petals { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .8; }

/* —— 页面开场帷幕（main.js 注入 #curtain） —— */
#curtain { position: fixed; inset: 0; z-index: 999; pointer-events: none;
    background: linear-gradient(180deg, #0d0916, #1a1128);
    animation: curtain 1.5s ease-in forwards; }
@keyframes curtain { to { opacity: 0; visibility: hidden; } }
#curtain::after { content: "✦ ⚖ "; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    color: #6f5a8e; font-size: 26px; letter-spacing: 14px; animation: curtmark 1.5s ease both; }
@keyframes curtmark { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }

/* —— 引言逐词淡入（main.js 拆 .wordin 为 span.wd） —— */
.wordin .wd { display: inline-block; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.wordin.in .wd { opacity: 1; transform: none; }

/* —— 视差层（main.js 根据滚动位移 [data-para]） —— */
[data-para] { will-change: transform; }

/* ============================================================
   动效扩展库 III（第三批新增类型）
   ============================================================ */

/* —— 打字机光标（.typeline 悬停后逐字打印，main.js 配合） —— */
.typeline { overflow: hidden; white-space: nowrap; border-right: 2px solid var(--acc, #c9a7f5);
    width: 0; animation: typew 4s steps(40) .6s forwards, caret .8s step-end infinite; }
@keyframes typew { to { width: 100%; } }
@keyframes caret { 50% { border-color: transparent; } }

/* —— 波浪文字（main.js 把 .waveword 拆成 span.wv，逐字上下起伏） —— */
.wv { display: inline-block; animation: wv 2.6s ease-in-out infinite; }
@keyframes wv { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-7px); } 60% { transform: translateY(2px); } }

/* —— 霓虹呼吸文字（hsl 色相缓慢流转，全站标题可用 .neonhue） —— */
.neonhue { animation: neonhue 9s linear infinite; }
@keyframes neonhue { from { filter: hue-rotate(0deg) drop-shadow(0 0 8px rgba(180,140,240,.5)); }
    to { filter: hue-rotate(360deg) drop-shadow(0 0 8px rgba(180,140,240,.5)); } }

/* —— 表格行"扫描点亮"：滚动入场时逐行亮起 —— */
.js table tr { opacity: 0; transform: translateX(-10px); transition: opacity .5s ease, transform .5s ease, background .25s; }
.js table.in tr { opacity: 1; transform: none; }
.js table.in tr:nth-child(1) { transition-delay: .05s; }
.js table.in tr:nth-child(2) { transition-delay: .13s; }
.js table.in tr:nth-child(3) { transition-delay: .21s; }
.js table.in tr:nth-child(4) { transition-delay: .29s; }
.js table.in tr:nth-child(5) { transition-delay: .37s; }
.js table.in tr:nth-child(6) { transition-delay: .45s; }
.js table.in tr:nth-child(7) { transition-delay: .53s; }
.js table.in tr:nth-child(8) { transition-delay: .61s; }

/* —— 图片"显影"悬停：老照片从模糊到清晰（悬停瞬间触发，不常驻模糊） —— */
.develop:hover > img { animation: developflash .9s ease; }
@keyframes developflash {
    0% { filter: blur(8px) sepia(.55) contrast(.85); }
    60% { filter: blur(2px) sepia(.2) contrast(.95); }
    100% { filter: none; }
}

/* —— 立体书翻页悬停（.bookpic 图片像书页一样 3D 翻开） —— */
.bookpic { perspective: 1200px; }
.bookpic > img { transform-origin: left center; transition: transform .8s cubic-bezier(.3,.8,.3,1), box-shadow .8s; }
.bookpic:hover > img { transform: rotateY(-24deg); box-shadow: 24px 12px 46px rgba(0,0,0,.5); }

/* —— 链接悬停：下划线墨水渗透展开 —— */
a { background-image: linear-gradient(var(--acc, #c9a7f5), var(--acc, #c9a7f5)); background-size: 0% 1px;
    background-position: 0 100%; background-repeat: no-repeat; transition: background-size .45s cubic-bezier(.2,.7,.3,1), color .25s; }
a:hover { background-size: 100% 1px; }

/* —— 滚动横向漂移装饰带（.driftband 内容左右缓慢摇摆） —— */
.driftband { animation: driftb 12s ease-in-out infinite alternate; }
@keyframes driftb { from { transform: translateX(-14px); } to { transform: translateX(14px); } }

/* —— 聚光灯悬停（.spotlight 跟随鼠标的高光斑，main.js 写入 --mx/--my） —— */
.spotlight { position: relative; overflow: hidden; }
.spotlight::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255,240,220,.14), transparent 60%); }
.spotlight:hover::after { opacity: 1; }

/* —— 徽章旋转入场（.badge 悬停旋转放大） —— */
.badge { display: inline-block; transition: transform .6s cubic-bezier(.3,1.4,.4,1); }
.badge:hover { transform: rotate(360deg) scale(1.25); }

/* —— 文字投影跟随（标题悬停时彩色硬阴影偏移滑动） —— */
.headingshadow { text-shadow: 3px 3px 0 color-mix(in srgb, var(--acc, #a678d4) 60%, transparent);
    transition: text-shadow .35s ease; }
.headingshadow:hover { text-shadow: 6px 2px 0 rgba(240,160,200,.55), -3px 4px 0 rgba(120,200,240,.4); }

/* ============================================================
   动效扩展库 IV（第四批：全局氛围 + 现代质感）
   ============================================================ */

/* —— 全局鼠标环境光（main.js 注入 #mouselight，光晕缓慢跟随光标） —— */
#mouselight { position: fixed; left: 0; top: 0; width: 540px; height: 540px; border-radius: 50%;
    z-index: -1; pointer-events: none; will-change: transform;
    background: radial-gradient(circle, color-mix(in srgb, var(--acc, #b48ee0) 14%, transparent), transparent 62%); }

/* —— h1 入场：字距收拢 + 去模糊（main.js 自动挂 .h1in） —— */
.js h1.h1in { animation: h1in 1.3s cubic-bezier(.2,.8,.25,1) both; }
@keyframes h1in {
    0%   { opacity: 0; letter-spacing: 16px; filter: blur(10px); transform: translateY(10px); }
    100% { opacity: 1; letter-spacing: 2px; filter: none; transform: none; }
}

/* —— 资料卡旋转光环（.stat 悬停时一圈锥形光扫过边缘，overflow 裁切） —— */
.stat::before { content: ""; position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1;
    transform: translate(-50%, -50%) rotate(0deg); opacity: 0; transition: opacity .45s; pointer-events: none;
    background: conic-gradient(transparent 0 38%, color-mix(in srgb, var(--acc, #a678d4) 55%, transparent) 50%, transparent 62% 100%); }
.stat:hover::before { opacity: .8; animation: orbit360 5.5s linear infinite; }
.stat b, .stat span { position: relative; z-index: 1; }
@keyframes orbit360 { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* —— 瓷贴玻璃拟态（backdrop blur + 内高光，悬停浮起） —— */
.tile { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 12px rgba(0,0,0,.25);
    transition: transform .35s cubic-bezier(.2,.8,.3,1), border-color .3s, background .3s, box-shadow .35s; }
.tile:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 14px 34px rgba(120,70,190,.4); }

/* —— 引言块悬停：引号放大 + 左侧光带呼吸 —— */
.quote { transition: border-color .4s, background .4s, transform .4s; }
.quote::before { transition: transform .45s cubic-bezier(.3,1.5,.4,1), color .4s; }
.quote:hover::before { transform: scale(1.6) translateY(-3px); color: #e3c8ff; }
.quote:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--acc, #7b4fa1) 16%, transparent), transparent);
    transform: translateX(4px); }

/* —— 徽记轨道粒子（.crest 两颗光点反向环绕） —— */
.crest { position: relative; }
.crest::before, .crest::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px;
    border-radius: 50%; background: var(--acc, #c9a7f5); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--acc, #c9a7f5) 70%, transparent);
    margin: -2.5px 0 0 -2.5px; pointer-events: none; }
.crest::before { animation: crestorbit 6s linear infinite; }
.crest::after { animation: crestorbit 9s linear infinite reverse; opacity: .7; }
@keyframes crestorbit {
    from { transform: rotate(0deg) translateX(46px); }
    to   { transform: rotate(360deg) translateX(46px); }
}

/* —— details 展开：内容滑动淡入 —— */
details[open] > *:not(summary) { animation: dtslide .55s cubic-bezier(.2,.8,.3,1) both; }
@keyframes dtslide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* —— 画廊图片遮罩揭示入场（main.js 给 .gal 挂 stagger-in） —— */
.js .gal.stagger-in > img { clip-path: inset(0 100% 0 0); opacity: 0; transform: none;
    transition: clip-path .8s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
.js .gal.stagger-in.in > img { clip-path: inset(0 0 0 0); opacity: 1; }


/* —— 全局细节：选区色 / 滚动条 / 键盘焦点环 —— */
::selection { background: color-mix(in srgb, var(--acc, #7b4fa1) 55%, transparent); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #14101c; }
::-webkit-scrollbar-thumb { background: linear-gradient(#5a3f7d, #2c2140); border-radius: 6px; border: 2px solid #14101c; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(#7b4fa1, #3a2b52); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--acc, #b48ee0) 80%, transparent); outline-offset: 3px; border-radius: 4px; }

/* —— h2 悬停：文字渐变流动 —— */
h2 { transition: letter-spacing .4s; }
h2:hover { letter-spacing: 3px; }

/* —— 小屏适配 —— */
@media (max-width: 640px) {
    body { line-height: 1.85; }
    th { width: 30%; }
    .lore .lslide { flex-direction: column; padding: 18px 14px 14px; }
    .lore .lphoto { flex: none; width: 100%; }
    .lore .lphoto img { height: 320px; max-width: 260px; }
    .lore .lticks i { width: 16px; }
    .spot { flex-direction: column; }
    .spot > .ph { flex: none; width: 100%; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .gal { grid-template-columns: repeat(2, 1fr); }
    .gal img { height: 100px; }
    .secno { flex-wrap: wrap; }
    .secno::after { display: none; }
}

/* ============================================================
   通用入场帷幕（gate）——仿月代雪两段式：先文字表演，点击后档案展开
   结构：.gate > .g-line(.sp) + .g-reply > .gr-line + .g-hint；正文包在 #gate-file
   主题类挂在 body 上：th-ice / th-blood / th-cold / th-dawn / th-violet
   ============================================================ */
html.gate-on { overflow: hidden; }
.gate {
    position: fixed; inset: 0; z-index: 59; overflow: auto;
    display: none; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 8vh 22px; cursor: pointer;
}
html.js .gate { display: flex; }
#gate-file { display: block; }
html.js #gate-file { display: none; }
html.js #gate-file.open { display: block; }
.gate .g-line {
    display: block; margin: 16px 0; font-size: clamp(15px, 2.4vw, 20px);
    letter-spacing: 3px; opacity: 0; transform: translateY(14px); filter: blur(6px);
    transition: opacity 1.3s ease, transform 1.3s cubic-bezier(.2,.8,.3,1), filter 1.3s ease;
}
.gate .g-line:nth-child(1) { transition-delay: .5s; }
.gate .g-line:nth-child(2) { transition-delay: 2.1s; }
.gate .g-line:nth-child(3) { transition-delay: 3.7s; }
.gate .g-line:nth-child(4) { transition-delay: 5.3s; }
.gate .g-line:nth-child(5) { transition-delay: 6.9s; }
.gate .g-line .sp { font-size: .8em; opacity: .65; margin-right: .6em; letter-spacing: 1px; }
.gate.lit .g-line { opacity: 1; transform: none; filter: none; }
/* 逐字微光（复用 .gw 关键帧） */
.gate .g-line .gw { opacity: 0; animation: gw 4.2s ease-in-out infinite, gwin .5s ease both; animation-delay: 0s, var(--gd, 0s); }
@keyframes gwin { to { opacity: 1; } }
.gate .g-reply { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 1.4s cubic-bezier(.2,.7,.3,1), opacity 1s ease .3s; width: 100%; }
.gate.replied .g-reply { max-height: 420px; opacity: 1; }
.gate .gr-line { margin: 12px 0; font-size: clamp(16px, 2.6vw, 22px); font-weight: bold; letter-spacing: 2px; }
.gate .gr-line .quo { font-size: 1.5em; vertical-align: -.15em; opacity: .55; }
.gate.replied .gr-line { animation: replyin 1.1s cubic-bezier(.2,.8,.25,1) both; }
.gate.replied .gr-line:nth-child(2) { animation-delay: 1.1s; }
.gate.replied .gr-line:nth-child(3) { animation-delay: 2.2s; }
@keyframes replyin { from { opacity: 0; transform: translateY(16px) scale(.96); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
.gate .g-hint { margin-top: 7vh; font-size: 12px; letter-spacing: 5px; opacity: 0; transition: opacity 1.2s ease 8.4s; animation: breathe 3s ease-in-out infinite; }
.gate.lit .g-hint { opacity: .8; }
/* 碎片化消散 */
.gate.shatter .g-line { animation: gshatter 1.5s cubic-bezier(.4,0,.7,.2) both; }
.gate.shatter .g-line:nth-child(2) { animation-delay: .1s; }
.gate.shatter .g-line:nth-child(3) { animation-delay: .2s; }
.gate.shatter .g-line:nth-child(4) { animation-delay: .3s; }
.gate.shatter .g-line:nth-child(5) { animation-delay: .4s; }
.gate.shatter .g-reply { animation: gshatter 1.2s ease both; }
@keyframes gshatter {
    to { opacity: 0; transform: translateY(-46px) rotate(5deg) scale(1.5); filter: blur(14px); }
}
/* —— gate 主题配色 —— */
body.th-ice  .gate .g-line, body.th-ice  .gate .gr-line { color: #a8c4e8; text-shadow: 0 0 18px rgba(140,180,240,.5); }
body.th-ice  .gate .g-hint { color: #4a6280; }
body.th-blood .gate .g-line  { color: #b05a52; text-shadow: 0 0 18px rgba(170,40,40,.5); }
body.th-blood .gate .g-line .sp { color: #6a3535; }
body.th-blood .gate .gr-line { color: #d08a7a; }
body.th-blood .gate .g-hint  { color: #6a3a3a; }
body.th-cold .gate .g-line   { color: #6f86b8; text-shadow: 0 0 18px rgba(70,110,190,.5); }
body.th-cold .gate .g-line .sp { color: #3d4f75; }
body.th-cold .gate .gr-line  { color: #9ab4dc; }
body.th-cold .gate .g-hint   { color: #3a4658; }
body.th-dawn .gate .g-line   { color: #e8b888; text-shadow: 0 0 18px rgba(255,170,90,.45); }
body.th-dawn .gate .g-line .sp { color: #a0704a; }
body.th-dawn .gate .gr-line  { color: #ffcf9e; }
body.th-dawn .gate .g-hint   { color: #a06a4a; }
body.th-violet .gate .g-line { color: #b89adc; text-shadow: 0 0 18px rgba(150,100,220,.5); }
body.th-violet .gate .g-line .sp { color: #6a5090; }
body.th-violet .gate .gr-line { color: #e3c8ff; }
body.th-violet .gate .g-hint { color: #6a5090; }

/* ============================================================
   多套主题背景（body 类驱动，替代全站同一张封面虚化）
   ============================================================ */
/* —— 监狱 / 世界设定：苔绿铁栏 —— */
body.th-prison { background: linear-gradient(180deg, #0d1512 0%, #101a14 45%, #0a100d 100%); background-attachment: fixed; }
body.th-prison::before {
    content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% -12%, rgba(142,207,138,.15), transparent 55%),
        radial-gradient(ellipse at 50% 115%, rgba(60,110,80,.14), transparent 60%);
    animation: aurora 24s ease-in-out infinite alternate;
}
body.th-prison::after {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .5;
    background: repeating-linear-gradient(90deg, transparent 0 96px, rgba(10,20,14,.55) 96px 106px);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
/* —— 玩法 / 审判庭：绯红审判光 —— */
body.th-verdict { background: linear-gradient(180deg, #170a10 0%, #1c0d13 50%, #12070c 100%); background-attachment: fixed; }
body.th-verdict::before {
    content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 118%, rgba(255,120,90,.13), transparent 52%),
        radial-gradient(ellipse at 12% 8%, rgba(200,60,70,.10), transparent 50%);
    animation: aurora 20s ease-in-out infinite alternate;
}
body.th-verdict::after {
    content: ""; position: fixed; left: 50%; top: -14%; bottom: -14%; width: 46%; z-index: -2;
    transform: translateX(-50%); pointer-events: none;
    background: linear-gradient(180deg, rgba(255,150,110,.10), rgba(255,110,80,.05) 55%, transparent);
    clip-path: polygon(40% 0, 60% 0, 92% 100%, 8% 100%);
    filter: blur(14px);
    animation: beamsway 9s ease-in-out infinite alternate;
}
@keyframes beamsway { from { transform: translateX(-50%) skewX(-3deg); opacity: .7; } to { transform: translateX(-50%) skewX(3deg); opacity: 1; } }
/* —— 故事 / 轮回：紫罗兰星云 —— */
body.th-story { background: linear-gradient(180deg, #150f26 0%, #1b1230 48%, #120c20 100%); background-attachment: fixed; }
body.th-story::before {
    content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background:
        radial-gradient(ellipse at 22% 18%, rgba(166,120,212,.17), transparent 52%),
        radial-gradient(ellipse at 80% 70%, rgba(110,80,200,.14), transparent 55%),
        radial-gradient(ellipse at 55% 108%, rgba(220,160,255,.08), transparent 50%);
    animation: aurora 30s ease-in-out infinite alternate;
}
body.th-story::after {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        radial-gradient(1.6px 1.6px at 12% 24%, rgba(230,210,255,.8), transparent 60%),
        radial-gradient(1.3px 1.3px at 68% 12%, rgba(200,180,255,.65), transparent 60%),
        radial-gradient(1.8px 1.8px at 84% 62%, rgba(235,220,255,.75), transparent 60%),
        radial-gradient(1.2px 1.2px at 32% 78%, rgba(210,190,255,.6), transparent 60%),
        radial-gradient(1.5px 1.5px at 52% 44%, rgba(240,230,255,.7), transparent 60%);
    animation: twinkle 6.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .95; } }
/* —— 角色页：主色极光（跟随 --acc，每页不同色相） —— */
body.th-acc::before {
    content: ""; position: fixed; inset: -8%; z-index: -3; pointer-events: none;
    background:
        radial-gradient(ellipse at 28% 12%, color-mix(in srgb, var(--acc, #a678d4) 24%, transparent), transparent 55%),
        radial-gradient(ellipse at 78% 82%, color-mix(in srgb, var(--acc, #a678d4) 15%, transparent), transparent 60%),
        linear-gradient(180deg, #171126, #14101c 50%, #191228);
    animation: aurshift 26s ease-in-out infinite alternate;
}
@keyframes aurshift { from { transform: scale(1) translate(0, 0); filter: hue-rotate(0deg); } to { transform: scale(1.1) translate(-2%, -1.5%); filter: hue-rotate(26deg); } }
/* —— 月代雪页：冰蓝极光（覆盖原 th-ice 需求） —— */
body.yuki-page::before {
    content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(150,190,240,.16), transparent 55%),
        radial-gradient(ellipse at 50% 112%, rgba(110,150,220,.12), transparent 60%),
        linear-gradient(180deg, #0c1220, #0e1626 50%, #0a0f1a);
    animation: aurora 28s ease-in-out infinite alternate;
}
/* —— 灭世终幕：血月 + 灰烬 —— */
body.th-apoc { background: radial-gradient(ellipse at 72% 14%, #2a0a10 0%, #12050a 55%, #070305 100%); background-attachment: fixed; }
body.th-apoc::before {
    content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background: radial-gradient(circle at 72% 14%, rgba(230,60,50,.20), rgba(140,20,30,.07) 26%, transparent 46%);
    animation: bloodmoon 8s ease-in-out infinite alternate;
}
@keyframes bloodmoon { from { opacity: .55; } to { opacity: 1; } }
body.th-apoc::after {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(2.2px 2.2px at 18% 30%, rgba(255,120,90,.5), transparent 60%),
        radial-gradient(1.8px 1.8px at 62% 18%, rgba(200,80,70,.45), transparent 60%),
        radial-gradient(2.6px 2.6px at 82% 58%, rgba(255,140,110,.4), transparent 60%),
        radial-gradient(1.6px 1.6px at 38% 72%, rgba(220,100,80,.4), transparent 60%);
    animation: ashfall 14s linear infinite;
}
@keyframes ashfall { from { transform: translateY(-6%); opacity: .8; } to { transform: translateY(6%); opacity: .3; } }

/* —— 小屏适配 —— */
@media (max-width: 640px) {
    .gate .g-line { letter-spacing: 2px; margin: 12px 0; }
    body.th-prison::after { background: repeating-linear-gradient(90deg, transparent 0 64px, rgba(10,20,14,.5) 64px 70px); }
}
