
@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; }


.plate-note {
  margin-bottom: 14px; padding: 10px 12px; line-height: 1.7; font-size: 11px;
  color: #cfc7d8; border: 1px solid rgba(var(--ui-accent-rgb), .35); border-radius: 8px;
  background: rgba(var(--ui-accent-rgb), .09);
}
[data-plate-show] { display: none; }
.plate-active [data-plate-show] { display: block; }
.plate-active [data-plate-hide] { display: none; }


.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; }


.themegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.themechip {
  display: flex; align-items: center; gap: 5px; padding: 7px 8px;
  border: 1px solid var(--ui-line); border-radius: 7px; background: #0f0e15;
  color: var(--ui-dim); text-align: left; transition: .15s; overflow: hidden;
}
.themechip:hover { border-color: #3b3748; background: #17151f; }
.themechip.on { border-color: rgba(var(--ui-accent-rgb), .85); background: rgba(var(--ui-accent-rgb), .13); color: #fff; }
.themechip .th-main { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px; box-shadow: 0 0 8px rgba(255, 255, 255, .18); }
.themechip .th-mini { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.themechip b { font-size: 10.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.entrycard {
  border: 1px solid rgba(255, 255, 255, .10); border-left: 3px solid rgba(var(--ui-accent-rgb), .85);
  border-radius: 9px; background: #0d0c12; margin-bottom: 14px; overflow: hidden;
}
.entrycard-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(90deg, rgba(var(--ui-accent-rgb), .10), transparent 70%);
}
.entry-num {
  flex: 0 0 30px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid rgba(255, 255, 255, .16);
  color: var(--ui-accent-2); font-size: 12px; letter-spacing: 1px;
}
.entrycard-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.entrycard-title b { font-size: 14px; letter-spacing: 1px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entrycard-title span { font-size: 10.5px; color: var(--ui-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entrycard-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.entrycard-body { padding: 12px; }


.helplist { margin: 0; padding-left: 20px; color: var(--ui-text); font-size: 12.5px; line-height: 1.9; }
.helplist li { margin-bottom: 6px; }
.helplist b { color: var(--ui-accent-2); font-weight: 500; }


input[type=number].inp { -moz-appearance: textfield; }
input[type=number].inp::-webkit-outer-spin-button,
input[type=number].inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }


input[type=color].inp { background: #0e0d14; cursor: pointer; }
input[type=color].inp::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color].inp::-webkit-color-swatch { border: 1px solid var(--ui-line); border-radius: 3px; }


.entrycard-body textarea.inp { min-height: 110px; }



.poster {
  position: relative;
  width: var(--page-w, 1200px);
  height: var(--page-h, 1600px);
  overflow: hidden;
  background: #0d1015;
  color: #e8edf2;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}


.p-bg { position: absolute; inset: 0; overflow: hidden; }

.p-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(760px 620px at 76% 16%, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 70%),
    radial-gradient(900px 720px at 24% 82%, rgba(112, 142, 168, 0.09), rgba(0, 0, 0, 0) 76%),
    radial-gradient(1100px 900px at 50% 50%, rgba(34, 43, 52, 0.30), rgba(0, 0, 0, 0) 75%),
    linear-gradient(155deg, #171b20 0%, #12161a 42%, #0e1116 100%);
}

.p-bg-image { position: absolute; inset: 0; background-size: cover; background-position: center; }

.p-haze {
  position: absolute;
  display: block;
  transform-origin: 60% 40%;
  pointer-events: none;
}

.p-diag {
  position: absolute; inset: 0;
  background:
    linear-gradient(118deg, rgba(0, 0, 0, 0) 39%, rgba(0, 0, 0, 0.20) 39.3%, rgba(0, 0, 0, 0.03) 62%, rgba(0, 0, 0, 0) 62.4%),
    linear-gradient(118deg, rgba(255, 255, 255, 0) 54%, rgba(255, 255, 255, 0.030) 54.4%, rgba(255, 255, 255, 0) 82%);
  pointer-events: none;
}

.p-tex {
  position: absolute; inset: 0;
  background-size: 640px 640px;
  background-repeat: repeat;
  opacity: 0.85;
  pointer-events: none;
}

.p-noise {
  position: absolute; inset: 0;
  background-size: 180px 180px;
  background-repeat: repeat;
  pointer-events: none;
}

.p-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 6, 9, 0.10) 0%, rgba(4, 6, 9, 0) 14%, rgba(4, 6, 9, 0) 82%, rgba(3, 5, 8, 0.22) 100%),
    radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.30) 100%);
  pointer-events: none;
}
.p-dark { position: absolute; inset: 0; pointer-events: none; }


.p-hud { position: absolute; display: block; pointer-events: none; }
.p-warning { position: absolute; left: 10px; width: 36px; height: 415px; display: block; pointer-events: none; }
.p-ring { position: absolute; display: block; pointer-events: none; }


.p-title {
  position: absolute;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.p-logo {
  position: absolute;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.p-sub {
  position: absolute;
  right: 40px;
  top: 286px;
  font-size: 17px;
  letter-spacing: 1.4px;
  color: rgba(199, 210, 220, 0.62);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}


.p-nametab { position: absolute; inset: 0; pointer-events: none; }
.p-namebar { position: absolute; display: block; box-shadow: 0 0 18px rgba(0, 0, 0, 0.25); }
.p-nameplate {
  position: absolute;
  display: inline-flex;
  align-items: center;
  background: #030507;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.p-cname {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}


.p-code {
  position: absolute;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(223, 230, 236, 0.94);
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}
.p-code span { line-height: 1; }

.p-height {
  position: absolute;
  width: 150px;
  height: 44px;
  color: rgba(206, 215, 223, 0.94);
  font-size: 14px;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}
.p-height-txt { position: absolute; left: 0; top: 1px; }
.p-height-v { position: absolute; width: 1px; height: 27px; background: rgba(202, 216, 228, 0.45); }
.p-height-h { position: absolute; height: 1px; background: rgba(202, 216, 228, 0.34); }
.p-height-dot { position: absolute; width: 4px; height: 4px; background: rgba(224, 234, 242, 0.85); }


.p-frame {
  position: absolute;
  border-style: solid;
  border-color: rgba(196, 214, 228, 0.52);
  box-sizing: content-box;
}
.p-portrait-wrap { position: absolute; inset: 0; overflow: hidden; background: rgba(8, 11, 15, 0.35); }
.p-portrait {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform-origin: center top;
  display: block;
}
.p-portrait-tint, .p-portrait-fade { position: absolute; inset: 0; pointer-events: none; }
.p-portrait-empty {
  position: absolute; inset: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed rgba(190, 205, 220, 0.28);
  color: rgba(190, 205, 220, 0.48);
  font-size: 13px; letter-spacing: 1px;
}
.p-portrait-empty b { font-size: 15px; font-weight: 500; letter-spacing: 2px; }
.p-portrait-empty span { font-size: 11.5px; }

.p-corner {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(222, 233, 241, 0.9);
  box-shadow: 0 0 5px rgba(200, 220, 235, 0.55);
}
.p-corner.tl { left: -2px; top: -2px; }
.p-corner.tr { right: -2px; top: -2px; }
.p-corner.bl { left: -2px; bottom: -2px; }
.p-corner.br { right: -2px; bottom: -2px; }

.p-frame-en {
  position: absolute;
  right: 7px; bottom: 6px;
  font-size: 11px;
  letter-spacing: 2.2px;
  color: rgba(210, 222, 232, 0.84);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}


.p-entries { position: absolute; width: 660px; }
.p-entry { position: relative; }

.p-entry-head {
  position: relative;
  width: var(--header-w, 428px);
  height: var(--header-h, 75px);
  box-sizing: border-box;
  background: rgba(4, 6, 9, 0.42);
  border: 1px solid rgba(196, 212, 224, 0.32);
  display: flex;
  align-items: center;
}

.p-entry-title {
  margin: 0;
  padding-left: var(--entry-title-pad, 75px);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
}

.p-badge {
  position: absolute;
  display: block;
  pointer-events: none;
  z-index: 5;
}

.p-entry-body {
  margin: var(--body-mt, 33px) 0 0 var(--body-ml, 44px);
  width: var(--body-w, 530px);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: var(--body-size, 30px);
  line-height: var(--body-line, 65px);
  color: #e4e9ee;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  word-break: break-word;
}


.p-copyright {
  position: absolute;
  left: 0; right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 13.5px;
  letter-spacing: 1px;
  color: rgba(214, 224, 233, 0.86);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.p-custom-mark {
  position: absolute;
  left: 30px;
  bottom: 22px;
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: rgba(200, 212, 222, 0.55);
}

.p-share-line {
  position: absolute;
  left: 0; right: 0;
  bottom: 5px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.6px;
  color: rgba(205, 216, 226, 0.42);
}


body.poster-only .poster { margin: 0; }
