
@font-face {
  font-family: 'Noto Sans SC';
  src: url('assets/fonts/NotoSansSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('assets/fonts/NotoSansSC-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('assets/fonts/NotoSansSC-Bold.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('assets/fonts/NotoSerifSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('assets/fonts/NotoSerifSC-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: block;
}


:root {
  --ui-bg: #0b0a0f;
  --ui-panel: #14131a;
  --ui-panel-2: #1b1a23;
  --ui-line: #2a2833;
  --ui-text: #e8e4ec;
  --ui-dim: #9b95a6;
  --ui-accent: #c92f4b;
  --ui-accent-rgb: 201, 47, 75;
  --ui-accent-2: #e0677c;
  --ui-accent-dark: #98203a;
  --ui-ok: #5cc08a;
  --ui-warn: #e0b45c;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ui-bg); color: var(--ui-text);
  font-family: 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 14px; overflow: hidden;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0e0d13; }
::-webkit-scrollbar-thumb { background: #332f3d; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #443e52; }


.appbar {
  height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 18px; background: linear-gradient(180deg, #17151e, #100f16);
  border-bottom: 1px solid var(--ui-line); position: relative; z-index: 20;
}
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }
.brand img { height: 34px; display: block; }
.brand h1 { font-size: 16px; margin: 0; letter-spacing: 2px; font-weight: 700; }
.brand p { margin: 2px 0 0; font-size: 10px; letter-spacing: 2px; color: var(--ui-dim); }
.appbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.share-note {
  display: none; flex: 1 1 auto; min-width: 0; text-align: center;
  font-size: 12px; letter-spacing: 3px; color: var(--ui-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 10px; pointer-events: none;
}
body.share-mode .share-note { display: block; }
@media (max-width: 1180px) { body.share-mode .share-note { display: none; } }
.save-state { font-size: 12px; color: var(--ui-dim); margin-right: 6px; }
.save-state.ok { color: var(--ui-ok); }

.btn {
  background: var(--ui-panel-2); border: 1px solid var(--ui-line); color: var(--ui-text);
  padding: 8px 14px; border-radius: 4px; letter-spacing: 1px; transition: .15s;
}
.btn:hover { background: #262432; border-color: #3b3748; }
.btn.primary { background: linear-gradient(100deg, var(--ui-accent), var(--ui-accent-dark)); border-color: transparent; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.danger { color: #ffb7c2; border-color: #5a2632; }
.btn.danger:hover { background: #2a1118; }
.btn[disabled] { opacity: .45; pointer-events: none; }


.layout { display: flex; height: calc(100% - 62px); }
.sidebar {
  width: 452px; min-width: 452px; background: var(--ui-panel);
  border-right: 1px solid var(--ui-line); display: flex; flex-direction: column;
}
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--ui-line); background: #100f16; }
.tab {
  padding: 6px 11px; border-radius: 4px; border: 1px solid transparent;
  background: transparent; color: var(--ui-dim); letter-spacing: 1px;
}
.tab:hover { color: var(--ui-text); background: rgba(255, 255, 255, .04); }
.tab.on { background: rgba(var(--ui-accent-rgb), .16); color: #fff; border-color: rgba(var(--ui-accent-rgb), .5); }
.panels { flex: 1; overflow-y: auto; padding: 16px 16px 70px; }
.panel { display: none; }
.panel.on { display: block; }


.group { margin-bottom: 22px; }
.group > h3 {
  font-size: 12px; letter-spacing: 3px; color: var(--ui-dim); font-weight: 400;
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ui-line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.field { margin-bottom: 12px; }
.field > label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ui-dim); margin-bottom: 6px; letter-spacing: 1px;
}
.field .val { color: var(--ui-accent-2); font-size: 12px; }
.inp, textarea.inp, select.inp {
  width: 100%; background: #0e0d14; border: 1px solid var(--ui-line);
  border-radius: 4px; padding: 8px 10px; outline: none; transition: .15s;
}
.inp:focus { border-color: rgba(var(--ui-accent-rgb), .7); box-shadow: 0 0 0 2px rgba(var(--ui-accent-rgb), .12); }
textarea.inp { resize: vertical; min-height: 74px; line-height: 1.7; }
input[type=range] { width: 100%; accent-color: var(--ui-accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ui-text); margin-bottom: 10px; cursor: pointer; }
.check input { accent-color: var(--ui-accent); width: 15px; height: 15px; }
.hint { font-size: 11px; color: #77718a; line-height: 1.65; margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--ui-line); background: #16151d; padding: 6px 10px;
  border-radius: 999px; font-size: 12px; letter-spacing: 1px; display: flex; align-items: center; gap: 7px;
}
.chip.on { border-color: rgba(var(--ui-accent-rgb), .8); background: rgba(var(--ui-accent-rgb), .15); }
.chip i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.chip:hover { background: #221f2b; }


.imgfield { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.imgthumb {
  width: 96px; height: 96px; flex: 0 0 96px; border: 1px solid var(--ui-line);
  border-radius: 4px; background:
    linear-gradient(45deg, #17161d 25%, transparent 25%, transparent 75%, #17161d 75%) 0 0/16px 16px,
    linear-gradient(45deg, #17161d 25%, transparent 25%, transparent 75%, #17161d 75%) 8px 8px/16px 16px,
    #100f16;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.imgthumb.tall { height: 128px; }
.imgthumb img { width: 100%; height: 100%; object-fit: contain; }
.imgthumb .none { font-size: 11px; color: #6a6478; }
.imgfield .col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.imgfield .btnrow { display: flex; gap: 8px; flex-wrap: wrap; }


.reset-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px; margin-bottom: 14px; border: 1px solid rgba(var(--ui-accent-rgb), .24);
  border-radius: 10px; background: linear-gradient(110deg, rgba(var(--ui-accent-rgb), .12), #13121a 55%);
}
.reset-bar > div:first-child { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 2px; }
.reset-bar b { font-size: 13px; letter-spacing: 1px; color: #fff; }
.reset-bar span { font-size: 10.5px; color: var(--ui-dim); line-height: 1.5; }
.reset-bar .btnrow { display: flex; gap: 6px; flex-wrap: wrap; }
.group > h3 .btn.sm { font-size: 10px; padding: 3px 7px; letter-spacing: .5px; }


.stage-toolbar {
  display: flex; flex-direction: column; gap: 10px; padding: 12px; margin-bottom: 14px;
  border: 1px solid rgba(var(--ui-accent-rgb), .24); border-radius: 10px;
  background: linear-gradient(110deg, rgba(var(--ui-accent-rgb), .12), #13121a 55%);
}
.stage-stats { display: flex; align-items: baseline; gap: 6px; font-size: 11px; letter-spacing: 1px; color: var(--ui-dim); }
.stage-stats b { font-size: 22px; line-height: 1; color: #fff; font-weight: 700; }
.stage-stats i { width: 1px; height: 14px; background: var(--ui-line); margin: 0 4px; align-self: center; }
.stage-toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.stage-toolbar .hint { margin: 0; }
.stage-toolbar-actions .btn { flex: 0 0 auto; }

.fold { border: 1px solid var(--ui-line); border-radius: 8px; background: #100f16; margin-bottom: 14px; overflow: hidden; }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12px; letter-spacing: 2px; color: var(--ui-dim); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: '+'; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ui-line); border-radius: 4px; font-size: 12px; color: var(--ui-accent-2);
}
.fold[open] > summary::before { content: '−'; }
.fold > summary span { margin-left: auto; font-size: 10px; letter-spacing: 1px; color: #6f6879; }
.fold[open] > summary { border-bottom: 1px solid rgba(255, 255, 255, .05); margin-bottom: 12px; }
.fold-body { padding: 0 12px 12px; }

.stagecard {
  border: 1px solid rgba(255, 255, 255, .10); border-top: 3px solid var(--stage-color, var(--ui-accent));
  border-radius: 10px; margin-bottom: 18px; background: #0d0c12; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.stagecard-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.stage-num {
  flex: 0 0 36px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04);
  color: var(--stage-color); font-size: 16px; font-weight: 700;
}
.stage-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stage-title b { font-size: 14px; color: #fff; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-title span { font-size: 10.5px; color: var(--ui-dim); letter-spacing: .5px; }
.stage-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.icon-btn {
  width: 24px; height: 24px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 5px; color: var(--ui-dim); font-size: 12px;
}
.icon-btn:hover { background: rgba(255, 255, 255, .07); border-color: var(--ui-line); color: #fff; }
.icon-btn.danger:hover { border-color: #6a2a38; color: #ffc0cb; background: #2a1118; }
.mini-btn {
  padding: 3px 7px; font-size: 10.5px; letter-spacing: .5px; background: transparent;
  border: 1px solid var(--ui-line); border-radius: 4px; color: var(--ui-dim);
}
.mini-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.mini-btn.danger:hover { border-color: #6a2a38; color: #ffc0cb; background: #2a1118; }

.stagecard-body { padding: 0 12px 12px; }
.stage-settings { margin-top: 12px; border: 1px dashed rgba(255, 255, 255, .10); border-radius: 8px; background: #0a0910; overflow: hidden; }
.stage-settings > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 10.5px; letter-spacing: 2px; color: #7d7688; }
.stage-settings > summary::-webkit-details-marker { display: none; }
.stage-settings > summary::before { content: '+'; width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ui-line); border-radius: 4px; font-size: 11px; color: var(--ui-accent-2); }
.stage-settings[open] > summary::before { content: '−'; }
.stage-settings > summary em { margin-left: auto; font-style: normal; font-size: 9.5px; letter-spacing: 0; color: #6f6879; }
.stage-settings[open] > summary { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.stage-settings-body { padding: 12px; }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 10.5px; letter-spacing: 2px; color: #7d7688; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settings-grid .field { margin-bottom: 0; }
.settings-grid .span2 { grid-column: 1 / -1; }
.settings-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.settings-colors .mini-label { flex: 0 0 auto; }
.settings-colors .colorchips { gap: 5px; }
.settings-colors .cchip { padding: 3px 7px; font-size: 10.5px; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .06); }
.mini-check { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ui-dim); letter-spacing: 0; cursor: pointer; white-space: nowrap; }
.mini-check input { accent-color: var(--ui-accent); width: 13px; height: 13px; }

.skills-head { display: flex; align-items: center; gap: 8px; margin: 16px 2px 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.skills-title { font-size: 10.5px; letter-spacing: 2px; color: #7d7688; }
.skills-count {
  min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(var(--ui-accent-rgb), .18); color: var(--ui-accent-2); font-size: 10px;
}
.skills-head .sp { flex: 1; }
.link-btn { padding: 2px 4px; background: none; border: 0; color: var(--ui-accent-2); font-size: 10.5px; letter-spacing: .5px; }
.link-btn:hover { text-decoration: underline; }

.skill-list { display: flex; flex-direction: column; gap: 8px; }
.skills-empty { margin: 4px 0; font-size: 11px; color: #6f6879; letter-spacing: 1px; }

.skillcard { border: 1px solid var(--ui-line); border-left: 3px solid var(--sk-color, var(--ui-accent)); border-radius: 7px; background: #0a0910; overflow: hidden; }
.skill-head { display: flex; align-items: center; gap: 6px; padding: 8px 9px; cursor: pointer; user-select: none; background: linear-gradient(90deg, rgba(255, 255, 255, .035), transparent 60%); }
.skillcard:not(.collapsed) .skill-head { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.skill-head:hover { background: linear-gradient(90deg, rgba(255, 255, 255, .07), transparent 60%); }
.sk-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--sk-color); box-shadow: 0 0 7px var(--sk-color); }
.sk-idx { font-size: 9.5px; letter-spacing: 1px; color: #77718a; white-space: nowrap; }
.sk-name { font-size: 12.5px; font-weight: 700; color: var(--sk-color); max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-badges { display: flex; align-items: center; gap: 3px; min-width: 0; max-width: 108px; overflow: hidden; }
.mini-badge { flex: 0 0 auto; padding: 1px 5px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .035); color: #b9b3c2; font-size: 9px; line-height: 14px; white-space: nowrap; }
.mini-badge.sfx { border-color: rgba(var(--ui-accent-rgb), .45); color: var(--ui-accent-2); }
.mini-badge.ex { border-color: #8a3a68; color: #ffb5de; background: rgba(240, 120, 190, .12); }
.mini-badge.choice { border-color: #405a9a; color: #b9c9ff; background: rgba(70, 100, 190, .12); }
.skill-head .sp { flex: 1; }
.skill-actions { display: flex; gap: 2px; align-items: center; opacity: .55; }
.skill-head:hover .skill-actions { opacity: 1; }
.chev {
  flex: 0 0 auto; width: 7px; height: 7px; border-right: 1.5px solid var(--ui-dim); border-bottom: 1.5px solid var(--ui-dim);
  transform: rotate(45deg) translate(-1px, -1px); transition: .15s;
}
.skillcard.collapsed .chev { transform: rotate(-45deg) translate(-1px, -1px); }
.skillcard.collapsed .skill-body { display: none; }
.skill-body { padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.sk-section { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sk-section:first-child { padding-top: 0; border-top: 0; }
.sk-section-title { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 9.5px; letter-spacing: 2px; color: #6f6879; }
.sk-section-title::before { content: ''; width: 10px; height: 1px; background: var(--ui-accent); opacity: .7; }
.tag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tagbox { padding: 8px; border: 1px solid var(--ui-line); border-radius: 6px; background: #0d0c12; transition: .15s; }
.tagbox.is-off { opacity: .55; border-style: dashed; }
.tagbox-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; font-size: 10px; letter-spacing: .5px; color: var(--ui-dim); }
.tagbox .inp { padding: 6px 8px; font-size: 12px; }
.skill-footer { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .06); }
.skill-footer select { flex: 0 1 170px; padding: 5px 8px; font-size: 12px; }
.skill-footer .sp { flex: 1; }

@media (max-width: 1280px) {
  .sk-badges { display: none; }
  .sk-name { max-width: 92px; }
}


.stage-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.colorchips { display: flex; gap: 6px; flex-wrap: wrap; }
.cchip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px;
  border-radius: 999px; border: 1px solid var(--ui-line); background: #14131a;
  font-size: 11px; letter-spacing: .5px; color: var(--ui-dim);
}
.cchip i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.cchip.on { color: #fff; border-color: rgba(var(--ui-accent-rgb), .75); background: rgba(var(--ui-accent-rgb), .14); }
.seg {
  display: inline-flex; border: 1px solid var(--ui-line); border-radius: 4px; overflow: hidden;
}
.seg button { background: transparent; border: 0; padding: 4px 9px; color: var(--ui-dim); font-size: 11px; }
.seg button.on { background: rgba(var(--ui-accent-rgb), .28); color: #fff; }
.inline-field { display: flex; align-items: center; gap: 6px; }
.inline-field .inp { padding: 5px 7px; }
.mini-label { font-size: 11px; color: #77718a; white-space: nowrap; }
.divider-lite { height: 1px; background: var(--ui-line); margin: 10px 0; }


.preview { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #0a090e; }
.preview-bar {
  height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 16px;
  border-bottom: 1px solid var(--ui-line); background: #100f16; font-size: 12px; color: var(--ui-dim);
}
.preview-bar .sp { flex: 1; }
.preview-bar select { background: #0e0d14; border: 1px solid var(--ui-line); border-radius: 4px; padding: 4px 8px; }
.preview-scroll { flex: 1; overflow: auto; padding: 26px 26px 90px; }
.preview-stage { margin: 0 auto; position: relative; }
#posterWrap {
  width: 1200px; transform-origin: top left;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}


.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: #1c1a24; border: 1px solid var(--ui-line); color: var(--ui-text);
  padding: 12px 20px; border-radius: 6px; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 100; font-size: 13px; letter-spacing: 1px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: #7a2a3a; color: #ffc9d4; }
.toast.ok { border-color: #2f6b4a; color: #c4f0d8; }

.overlay {
  position: fixed; inset: 0; background: rgba(6, 5, 9, .78); z-index: 90;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
}
.overlay.show { display: flex; }
.spinner {
  width: 46px; height: 46px; border: 3px solid rgba(var(--ui-accent-rgb), .25);
  border-top-color: var(--ui-accent); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay p { letter-spacing: 2px; color: #cfc9d8; }


body.poster-only .appbar,
body.poster-only .sidebar,
body.poster-only .preview-bar { display: none; }
body.poster-only .layout { height: 100%; }
body.poster-only .preview-scroll { padding: 0; }
body.poster-only #posterWrap { box-shadow: none; }

@media (max-width: 1280px) {
  .sidebar { width: 396px; min-width: 396px; }
}


.cropwrap { margin-bottom: 6px; }
.cropstage {
  position: relative; width: 100%; overflow: hidden; border-radius: 6px;
  border: 1px solid var(--ui-line); background: #0b0a10; user-select: none;
  touch-action: none;
}
.cropstage > img { width: 100%; height: 100%; display: block; opacity: .55; }
.croprect {
  position: absolute; border: 2px solid var(--ui-accent);
  box-shadow: 0 0 0 2000px rgba(5, 4, 8, .55);
  cursor: move;
}
.crop-handle {
  position: absolute; width: 14px; height: 14px; background: #fff;
  border: 2px solid var(--ui-accent); border-radius: 2px;
}
.crop-handle.nw { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-handle.ne { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-handle.sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-handle.se { right: -8px; bottom: -8px; cursor: nwse-resize; }


.earn { color: var(--ui-accent-2); border-color: rgba(var(--ui-accent-rgb), .45); }
.earn:hover { background: rgba(var(--ui-accent-rgb), .12); }
.donate-mask {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 5, 9, .78); backdrop-filter: blur(3px);
}
.donate-mask[hidden] { display: none; }
.donate-box {
  width: 560px; max-width: calc(100vw - 48px); max-height: calc(100vh - 64px); overflow: auto;
  background: linear-gradient(180deg, #17151e, #100f16);
  border: 1px solid rgba(var(--ui-accent-rgb), .35); border-radius: 10px;
  padding: 28px 30px 24px; text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.donate-box h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: 2px; }
.donate-sub { margin: 0 0 22px; font-size: 13px; line-height: 1.7; color: var(--ui-dim); }
.donate-qrs { display: flex; gap: 22px; justify-content: center; }
.donate-qrs figure { margin: 0; }
.donate-qrs img {
  width: 216px; height: 216px; object-fit: contain; display: block;
  background: #fff; border-radius: 8px; padding: 8px;
}
.donate-qrs figcaption { margin-top: 8px; font-size: 12px; letter-spacing: 2px; color: var(--ui-dim); }
.donate-tip { margin: 20px 0 18px; font-size: 11px; color: #7d7688; }
.donate-inline { display: flex; gap: 12px; margin: 10px 0; }
.donate-inline img {
  width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px;
  cursor: zoom-in;
}


.uis { position: relative; }
.uis-native { display: none; }
.uis-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: #0e0d14; border: 1px solid var(--ui-line); border-radius: 4px;
  padding: 8px 10px; color: var(--ui-text); text-align: left; transition: .15s;
}
.uis-btn:hover { border-color: #3b3748; background: #131219; }
.uis-btn:disabled { opacity: .5; pointer-events: none; }
.uis-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uis-caret {
  flex: 0 0 auto; width: 8px; height: 8px; margin-right: 2px;
  border-right: 2px solid var(--ui-dim); border-bottom: 2px solid var(--ui-dim);
  transform: rotate(45deg) translate(-2px, -2px); transition: .15s;
}
.uis-open .uis-btn { border-color: rgba(var(--ui-accent-rgb), .85); box-shadow: 0 0 0 2px rgba(var(--ui-accent-rgb), .12); }
.uis-open .uis-caret { transform: rotate(-135deg) translate(-2px, -2px); border-color: var(--ui-accent-2); }
.uis-pop {
  z-index: 200; padding: 4px; overflow-y: auto;
  overscroll-behavior: contain;
  background: #16151d; border: 1px solid var(--ui-line); border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
.uis-opt {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: 4px; padding: 8px 10px; color: var(--ui-text); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uis-opt:hover { background: rgba(255, 255, 255, .06); }
.uis-opt.is-sel { background: rgba(var(--ui-accent-rgb), .16); color: #fff; box-shadow: inset 2px 0 0 var(--ui-accent); }
.uis-compact { display: inline-block; width: auto; }
.uis-compact .uis-btn { padding: 3px 6px; gap: 6px; font-size: 12px; }
.uis-compact .uis-caret { width: 6px; height: 6px; }


.about-hero {
  text-align: center; padding: 18px 12px 22px; margin-bottom: 18px;
  border-bottom: 1px solid var(--ui-line);
  background: radial-gradient(160px 90px at 50% 20%, rgba(var(--ui-accent-rgb), .16), transparent 75%);
}
.about-hero img { width: 150px; display: block; margin: 0 auto 12px; }
.about-hero h2 { font-size: 19px; margin: 0; letter-spacing: 3px; font-weight: 700; }
.about-hero p { margin: 6px 0 0; font-size: 10px; letter-spacing: 2px; color: var(--ui-dim); }
.about-author {
  display: inline-flex; align-items: baseline; gap: 10px; margin-top: 16px;
  font-size: 12px; letter-spacing: 3px; color: var(--ui-dim);
  padding: 6px 16px; border: 1px solid rgba(var(--ui-accent-rgb), .45);
  border-radius: 999px; background: rgba(var(--ui-accent-rgb), .10);
}
.about-author strong {
  font-size: 16px; font-weight: 700; letter-spacing: 2px; color: #fff;
  text-shadow: 0 0 18px rgba(var(--ui-accent-rgb), .55);
}
.stat-block b { color: var(--ui-accent-2); font-size: 15px; padding: 0 2px; }


.tplrow { display: flex; gap: 8px; flex-wrap: wrap; }
.tplrow .btn { flex: 1 1 auto; }



.poster {
  position: relative;
  width: var(--page-w, 1200px);
  background: #080509;
  overflow: hidden;
  color: #e4dcdd;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  isolation: isolate;
}
.poster *, .poster *::before, .poster *::after { box-sizing: border-box; }


.p-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.p-bg-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(88% 42% at 14% 0%, rgba(var(--accent-rgb), .09) 0%, rgba(var(--accent-rgb), .015) 46%, transparent 63%),
    radial-gradient(58% 34% at 98% 34%, rgba(var(--accent-rgb), .10) 0%, transparent 64%),
    radial-gradient(48% 22% at 58% 0%, rgba(255, 95, 115, .06) 0%, transparent 70%),
    linear-gradient(180deg, #160409 0%, #1c060c 5%, #17060a 16%, #0f0509 40%, #0b0407 68%, #080509 100%);
}
.p-bg-base::before {
  content: ''; position: absolute; right: -22%; top: -10%; width: 78%; height: 62%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .36), transparent 72%);
  transform: rotate(-16deg);
}
.p-bg-base::after {
  content: ''; position: absolute; left: -18%; top: 24%; width: 64%; height: 44%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .09), transparent 70%);
  transform: rotate(18deg);
}
.p-bg-image {
  position: absolute; inset: 0; background-position: center; background-size: cover;
  opacity: var(--bg-image-opacity, .35);
}
.p-bg-glow {
  position: absolute; pointer-events: none; border-radius: 50%;
  filter: none; transform-origin: center;
}
.p-bg-glow.g1 {
  right: -18%; top: 20%; width: 72%; height: 55%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .52), rgba(var(--accent-rgb), .10) 55%, transparent 72%);
  transform: rotate(-14deg);
}
.p-bg-glow.g2 {
  left: 8%; top: 30%; width: 48%; height: 22%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .32), transparent 72%);
}
.p-bg-glow.g3 {
  right: -6%; top: -8%; width: 56%; height: 42%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .08), rgba(var(--accent-rgb), .02) 60%, transparent 75%);
  transform: rotate(-18deg);
}
.p-bg-title-glow {
  position: absolute; left: -4%; top: 22%; width: 52%; height: 28%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .42), transparent 72%);
}
.p-hero-texture {
  position: absolute; right: 0; top: 110px; width: 700px; height: 530px;
  background-size: cover; background-position: center; opacity: .42;
  pointer-events: none; z-index: 0;
}
.p-bg-veil {
  position: absolute; inset: 0; background: #000; opacity: var(--bg-darkness, .12);
}
.p-arcs {
  position: absolute; left: 0; top: 0; width: 100%; height: var(--hero-h, 1050px);
  opacity: .8; pointer-events: none;
}
.p-rings {
  position: absolute; left: -300px; top: -150px; width: 1010px; height: 1010px;
  opacity: calc(var(--rings-opacity, .55) * 1);
}
.p-rings2 {
  position: absolute; left: -390px; top: 390px; width: 1120px; height: 1120px;
  opacity: calc(var(--rings-opacity, .55) * .52);
}
.p-topword {
  position: absolute; left: -26px; top: -104px; z-index: 1;
  font-weight: 900; line-height: .82; letter-spacing: -.03em; white-space: nowrap;
  font-family: 'Noto Sans SC', sans-serif;
}
.p-grain {
  position: absolute; inset: 0; background-size: 180px 180px; background-repeat: repeat;
  opacity: var(--grain-opacity, .5);
}


.p-hero { position: relative; height: var(--hero-h, 1050px); z-index: 2; }

.p-micro {
  position: absolute; left: 36px; top: 32px; z-index: 4;
  font-size: 11px; font-weight: 700; letter-spacing: .52em; white-space: nowrap;
}
.p-logo { position: absolute; z-index: 6; height: auto; display: block; }

.p-title { position: absolute; top: var(--title-top, 315px); left: var(--title-left, 52px); z-index: 4; }
.p-title-en {
  font-size: var(--title-en-size, 46px); font-weight: 700; letter-spacing: .015em;
  line-height: .8; color: #f8f0f2;
  text-shadow: 0 0 20px rgba(var(--accent-rgb), .30);
}
.p-title-cn {
  margin: 7px 0 0; font-size: var(--title-cn-size, 112px); font-weight: 900;
  line-height: .92; letter-spacing: .035em; color: #fdf7f8; white-space: nowrap;
}
.p-title-cn-img { display: block; margin: 7px 0 0 -3px; height: auto; max-width: none; }
.p-title-cn.glitch {
  text-shadow:
    -2px 0 rgba(255, 42, 82, .40),
    2px 0 rgba(80, 190, 255, .18),
    0 0 30px rgba(255, 80, 110, .22);
}
.p-title-line {
  margin-top: 50px; width: var(--title-line-w, 310px); height: var(--title-line-h, 7px);
  background: linear-gradient(90deg, #fff 0%, #fff 42%, #f3d9df 68%, rgba(255, 255, 255, .05) 100%);
  box-shadow: 0 0 16px rgba(255, 255, 255, .20);
}


.p-mirage {
  position: absolute; right: -18px; top: 560px; z-index: 1;
  font-weight: 900; line-height: .9; letter-spacing: -.01em; white-space: nowrap;
  font-family: 'Noto Sans SC', sans-serif;
}


.p-portrait {
  position: absolute; left: var(--portrait-left, 73px); top: var(--portrait-top, 616px);
  width: var(--portrait-w, 386px); height: var(--portrait-h, 396px);
  overflow: hidden; z-index: 3;
  border: var(--portrait-border, 1px) solid rgba(240, 230, 234, .45);
  border-radius: var(--portrait-radius, 0);
  background: rgba(8, 4, 8, .35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 16px 50px rgba(0, 0, 0, .38);
}
.p-portrait > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform-origin: center; will-change: transform;
}
.p-portrait-tint { position: absolute; inset: 0; pointer-events: none; }
.p-portrait-fade { position: absolute; inset: 0; pointer-events: none; }
.p-portrait-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: rgba(var(--accent-rgb), .05);
  color: rgba(238, 228, 232, .55); font-size: 13px; letter-spacing: .12em;
}
.p-portrait-empty b { font-size: 15px; color: rgba(245, 236, 240, .72); }


.p-identity {
  position: absolute; right: var(--identity-right, 63px); top: var(--identity-top, 638px);
  z-index: 4; text-align: right;
}
.p-char-name {
  margin: 0; font-size: var(--name-size, 56px); font-weight: 900;
  line-height: 1.06; letter-spacing: .03em; color: #f8f1f3; white-space: nowrap;
  text-shadow: 0 0 .9px currentColor, 0 2px 14px rgba(0, 0, 0, .65), 0 0 26px rgba(var(--accent-rgb), .20);
}
.p-code {
  display: inline-block; margin-top: 8px; padding: 3px 18px 5px;
  font-size: var(--code-size, 34px); font-weight: 700; letter-spacing: .09em; line-height: 1.15;
  color: #fff; line-height: 1.2; white-space: nowrap;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .26), rgba(44, 6, 15, .95));
  border-top: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
}
.p-code-tri {
  position: absolute; right: 238px; top: calc(100% + 7px);
  width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-bottom: 14px solid rgba(var(--accent-rgb), .62);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .35));
}


.p-deco-square {
  position: absolute; right: 78px; top: 960px; width: 22px; height: 22px;
  background: rgba(var(--accent-rgb), .88);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .55);
  z-index: 2;
}
.p-wave {
  position: absolute; right: 56px; height: auto; z-index: 2;
  opacity: var(--wave-opacity, .55); pointer-events: none;
}


.p-panel {
  position: relative; z-index: 3;
  margin: 0 var(--panel-mx, 54px);
  padding: 0 var(--panel-px, 18px);
  border: 1px solid rgba(var(--accent-rgb), .42);
  border-radius: var(--panel-radius, 6px);
  background-color: rgba(9, 8, 9, .84);
  background-repeat: repeat;
  background-size: 8px 8px;
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, .50),
    0 0 46px rgba(var(--accent-rgb), .08);
}
.p-stage {
  display: grid; grid-template-columns: var(--stage-left-w, 288px) 1fr;
  padding: var(--stage-pt, 34px) 0 var(--stage-pb, 30px);
  min-height: var(--stage-min-h, 250px);
  border-bottom: 1px solid rgba(var(--accent-rgb), .26);
}
.p-stage:last-child { border-bottom: 0; }

.p-stage-left {
  position: relative;
  transform: translateX(var(--stage-shift, -16px));
  --group-h: calc(var(--stage-label-top, 205px) - var(--flare-top, 9px) + var(--stage-label-size, 28px));
  --label-offset: calc(var(--stage-label-top, 205px) - var(--flare-top, 9px));
}
.p-flare {
  position: absolute; display: block;
  left: calc((var(--stage-left-w, 288px) - var(--flare-size, 220px)) / 2);
  width: var(--flare-size, 220px); height: var(--flare-size, 220px);
  opacity: var(--flare-opacity, 1);
}
.p-stage-left.align-top .p-flare { top: calc(var(--flare-top, 9px) - var(--stage-pt, 34px) + var(--stage-offset, 0px)); }
.p-stage-left.align-center .p-flare { top: calc(50% - var(--group-h) / 2 + var(--stage-offset, 0px)); }
.p-stage-left.align-bottom .p-flare { top: calc(100% - var(--group-h) - 10px + var(--stage-offset, 0px)); }
.p-stage-label {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: var(--stage-label-size, 28px); font-weight: 700; line-height: 1;
  letter-spacing: .08em; color: #f8f1f4; white-space: nowrap;
  text-shadow: 0 0 .8px currentColor, 0 2px 10px rgba(0, 0, 0, .8);
}
.p-stage-left.align-top .p-stage-label { top: calc(var(--stage-label-top, 205px) - var(--stage-pt, 34px) + var(--stage-offset, 0px)); }
.p-stage-left.align-center .p-stage-label { top: calc(50% - var(--group-h) / 2 + var(--label-offset) + var(--stage-offset, 0px)); }
.p-stage-left.align-bottom .p-stage-label { top: calc(100% - var(--group-h) - 10px + var(--label-offset) + var(--stage-offset, 0px)); }

.p-stage-skills {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 10px; min-width: 0; padding-right: 28px;
}
.p-stage-skills.single { justify-content: center; }
.p-skill { min-width: 0; }
.p-skill-head {
  display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px;
  min-height: calc(28px * var(--tag-scale, 1));
}
.p-skill-name {
  margin: 0; font-size: var(--skill-name-size, 28px); font-weight: 700;
  line-height: 1.16; letter-spacing: .02em; white-space: nowrap;
  text-shadow: 0 0 .8px currentColor;
}
.p-sfx { margin-left: 2px; font-weight: 700; }
.p-cost {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  margin-left: 14px; height: calc(29px * var(--tag-scale, 1));
  padding: 0 calc(12px * var(--tag-scale, 1));
  border: 1.4px solid rgba(222, 212, 218, .55); border-radius: 999px;
  font-size: var(--cost-size, 20px); line-height: 1; color: #e8e1e4;
  background: rgba(0, 0, 0, .18); white-space: nowrap;
}
.p-head-spacer { flex: 1 1 auto; min-width: 14px; }
.p-ex {
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(23px * var(--tag-scale, 1)); padding: 0 calc(11px * var(--tag-scale, 1));
  margin-left: 10px; border-radius: 2px;
  font-size: calc(18px * var(--tag-scale, 1)); font-weight: 900; font-style: italic;
  letter-spacing: .06em; color: #2a0c16; white-space: nowrap;
  background: linear-gradient(100deg, #f9bfe3 0%, #f67cc8 52%, #f15bb3 100%);
  box-shadow: 0 0 12px rgba(245, 120, 200, .28);
}
.p-ex-img {
  display: block; height: calc(21px * var(--tag-scale, 1)); width: auto;
  margin-left: 10px; border-radius: 1px;
}
.p-choice-img {
  display: block; height: calc(20px * var(--tag-scale, 1)); width: auto;
  margin-left: 10px; border-radius: 1px;
  box-shadow: 0 0 10px rgba(90, 40, 60, .35);
}
.p-choice-text {
  display: inline-flex; align-items: center; height: calc(26px * var(--tag-scale, 1));
  margin-left: 10px; padding: 0 calc(9px * var(--tag-scale, 1));
  font-size: calc(15px * var(--tag-scale, 1)); font-weight: 700; letter-spacing: .08em;
  color: #fff; white-space: nowrap;
  background: linear-gradient(90deg, #2450a8 0 49%, #a83830 49% 100%);
}
.p-desc {
  margin: var(--desc-gap, 6px) 0 0;
  font-size: var(--desc-size, 23px); line-height: var(--desc-line, 36px);
  color: #e6dee1; letter-spacing: .025em;
}
.p-desc .hl {
  color: var(--term-color, inherit);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: calc(100% + 8px) 2px;
  background-position: -4px calc(100% - 1px);
  padding-bottom: 2px;
}
.poster.no-term-underline .p-desc .hl {
  background-image: none;
  padding-bottom: 0;
}
.poster.no-ul .p-desc .hl {
  background-image: none;
}
.p-desc .term-def {
  font-style: italic;
  color: #ddd5d9;
}
.p-desc .bullet-line { margin-left: 8px; }
.p-skill-empty { color: rgba(232, 224, 228, .38); font-size: 15px; letter-spacing: .1em; padding: 8px 0; }


.p-footer {
  position: relative; z-index: 3; text-align: center;
  padding: var(--footer-pt, 72px) 90px var(--footer-pb, 90px);
  background: linear-gradient(180deg, rgba(16, 15, 17, 0) 0%, #101012 18%, #151416 55%, #101011 100%);
}
.p-note {
  margin: 0; font-size: var(--footer-note-size, 21px);
  line-height: var(--footer-note-line, 30px); color: #bdb5bb; letter-spacing: .02em;
}
.p-copy {
  margin-top: var(--footer-copy-gap, 44px);
  font-size: var(--footer-note-size, 21px); color: #d9d2d6; letter-spacing: .05em;
}
.p-footer-grain {
  position: absolute; inset: 0; background-size: 180px 180px; opacity: .25;
  pointer-events: none; z-index: 0;
}
.p-footer > *:not(.p-footer-grain) { position: relative; z-index: 1; }
.p-custom-mark {
  position: absolute; right: 30px; bottom: 26px;
  font-size: 12px; letter-spacing: .06em; color: rgba(255, 255, 255, .42);
}
.p-share-line {
  margin-top: 14px; font-size: 12px; letter-spacing: .08em; color: rgba(255, 255, 255, .36);
}
