:root { --bg:#151816; --panel:#1e2320; --line:#38403a; --fg:#d9dccf; --dim:#8f988b; --acc:#c9a24a; --acc2:#6f8f5f; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.top { display: flex; align-items: center; gap: 16px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #101311; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .5px; white-space: nowrap; }
.top .mark { color: var(--acc); font-family: "Courier New", monospace; font-weight: 700; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
button { background: #2a302b; color: var(--fg); border: 1px solid #485248; border-radius: 4px; padding: 5px 10px; cursor: pointer; font: inherit; }
button:hover { border-color: var(--acc); }
button.pri { background: #3d3a26; border-color: #6d6232; }
button.small { padding: 1px 7px; font-size: 12px; }
main { display: flex; height: calc(100% - 50px); min-height: 0; }
.editor { width: 430px; min-width: 340px; overflow-y: auto; padding: 10px 12px 30px; border-right: 1px solid var(--line); background: var(--panel); }
.preview { flex: 1; display: flex; flex-direction: column; min-width: 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; padding: 8px 10px 10px; }
legend { color: var(--acc); padding: 0 6px; font-weight: 600; }
label { display: block; margin: 6px 0 2px; color: var(--dim); font-size: 13px; }
label.chk { color: var(--fg); }
input[type=text], input[type=number], textarea, select { width: 100%; background: #121513; color: var(--fg); border: 1px solid #3c453e;
  border-radius: 4px; padding: 5px 7px; font: inherit; }
textarea { resize: vertical; font-family: "Courier New", "Noto Serif SC", monospace; }
input[type=range] { width: 100%; }
.seg { display: flex; gap: 6px; }
.seg label { flex: 1; margin: 0; text-align: center; border: 1px solid #3c453e; border-radius: 4px; padding: 5px 0; cursor: pointer; color: var(--fg); }
.seg input { display: none; }
.seg label:has(input:checked) { background: #3d3a26; border-color: var(--acc); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.row { display: flex; gap: 6px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
small { color: var(--dim); }
.codes { display: flex; gap: 3px; flex-wrap: wrap; margin: 3px 0; }
.codes button { padding: 0 6px; min-width: 26px; font: 12px monospace; }
.opt { border: 1px solid #333b35; border-radius: 5px; padding: 6px 8px; margin: 6px 0; background: #191d1a; }
.opt .hd { display: flex; justify-content: space-between; align-items: center; color: var(--acc); font-size: 12px; }
.opt textarea { min-height: 38px; }
.stage { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 24px;
  background-color: #2b2f2c; background-image: linear-gradient(45deg,#333833 25%,transparent 25%),linear-gradient(-45deg,#333833 25%,transparent 25%),
  linear-gradient(45deg,transparent 75%,#333833 75%),linear-gradient(-45deg,transparent 75%,#333833 75%);
  background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
#pv { image-rendering: auto; box-shadow: 0 6px 30px rgba(0,0,0,.5); cursor: grab; }
.pvbar { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--line); gap: 10px; }
.pvbar label { display: flex; gap: 6px; align-items: center; margin: 0; }
.pvbar select { width: auto; }
.warn { color: #e0b060; padding: 4px 12px 8px; font-size: 13px; min-height: 1em; }
.credits { color: var(--dim); font-size: 12px; margin-top: 14px; }
.credits a { color: var(--acc); }
body[data-type=event] .only-news, body[data-type=event] .only-super { display: none; }
body[data-type=news] .only-event, body[data-type=news] .only-super { display: none; }
body[data-type=super] .only-event, body[data-type=super] .only-news, body[data-type=super] .not-super { display: none; }
body:not([data-header=custom]) .only-custom-header { display: none; }
body:not([data-type=politics]) .only-politics { display: none; }
body:not([data-kind=tooltip]):not([data-kind=tfr_tooltip]):not([data-kind=peace]):not([data-kind=decisions]) .only-tt { display: none; }
body:not([data-kind=peace]) .only-peace { display: none; }
body:not([data-kind=loading]) .only-load { display: none; }
body:not([data-kind=countryinfo]) .only-ci { display: none; }
body:not([data-kind=closing]) .only-cl { display: none; }
body:not([data-kind=mainmenu]) .only-mm { display: none; }
body:not([data-kind=statelore]) .only-sl { display: none; }
body:not([data-kind=decisions]) .only-dec { display: none; }
body:not([data-kind=achievements]) .only-ach { display: none; }
body:not([data-kind=focus]):not([data-kind=tfr_focus]) .only-fc { display: none; }
body[data-kind=focus] .not-tt, body[data-kind=focus] .not-load, body[data-type=focus] .only-news, body[data-type=focus] .only-super, body[data-type=focus] .only-event { display: none; }
body[data-kind=tfr_focus] .not-tt, body[data-kind=tfr_focus] .not-load, body[data-type=tfr_focus] .only-news, body[data-type=tfr_focus] .only-super, body[data-type=tfr_focus] .only-event { display: none; }
body[data-kind=achievements] .not-tt, body[data-kind=achievements] .not-load, body[data-kind=achievements] .not-mm, body[data-type=achievements] .only-news, body[data-type=achievements] .only-super, body[data-type=achievements] .only-event { display: none; }
body[data-kind=decisions] .not-tt, body[data-kind=decisions] .not-load, body[data-kind=decisions] .not-mm, body[data-type=decisions] .only-news, body[data-type=decisions] .only-super, body[data-type=decisions] .only-event { display: none; }
.decgrp { border: 1px solid #3a4a44; border-radius: 4px; padding: 6px; margin: 6px 0; }
.decblk, .decrow { border-left: 2px solid #2f8a87; padding: 2px 0 2px 6px; margin: 6px 0; }
.dechead { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.dectools button { margin-left: 2px; }
.decwide { display: block; }
.decwide input, .decwide textarea { width: 100%; box-sizing: border-box; }
body[data-kind=statelore] .not-tt, body[data-kind=statelore] .not-load, body[data-type=statelore] .only-news, body[data-type=statelore] .only-super, body[data-type=statelore] .only-event { display: none; }
body[data-kind=mainmenu] .not-mm, body[data-kind=mainmenu] .not-tt, body[data-kind=mainmenu] .not-load, body[data-type=mainmenu] .only-news, body[data-type=mainmenu] .only-super, body[data-type=mainmenu] .only-event { display: none; }
body[data-kind=closing] .not-tt, body[data-kind=closing] .not-load, body[data-type=closing] .only-news, body[data-type=closing] .only-super, body[data-type=closing] .only-event { display: none; }
body[data-kind=countryinfo] .not-tt, body[data-kind=countryinfo] .not-load, body[data-type=countryinfo] .only-news, body[data-type=countryinfo] .only-super, body[data-type=countryinfo] .only-event { display: none; }
body[data-kind=loading] .not-load, body[data-type=loading] .only-news, body[data-type=loading] .only-super, body[data-type=loading] .only-event { display: none; }
body:not([data-ldcustom="1"]) .ld-custom { display: none; }
body[data-type=peace] .only-news, body[data-type=peace] .only-super, body[data-type=peace] .only-event { display: none; }
body[data-kind=peace] .not-tt { display: none; }
body:not([data-kind=tfr_politics]) .only-tfrpol { display: none; }
body[data-kind=politicsview] .not-polview { display: none; }
body:not([data-kind=politicsview]) .only-polview { display: none; }
body[data-kind=tfr_politicsview] .not-polview.tpv-keep { display: block; }
body[data-kind=tfr_politicsview] .not-tpv { display: none; }
body:not([data-kind=tfr_politicsview]) .only-tpv { display: none; }
body[data-kind=tfr_tooltip] .not-tt, body[data-kind=tooltip] .not-tt { display: none; }
body[data-type^=tfr] .only-event, body[data-type^=tfr] .only-news, body[data-type^=tfr] .only-super { display: none; }
body[data-type=politics] .not-politics, body[data-type=politics] .only-event, body[data-type=politics] .only-news, body[data-type=politics] .only-super { display: none; }
.pierow { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.pierow select { flex: 1; } .pierow input { width: 70px; }
.imgrow { display: flex; gap: 8px; align-items: center; margin: 4px 0; } .imgrow span { flex: 1; }
@media (max-width: 860px) {
  main { flex-direction: column; height: auto; }
  .editor { width: 100%; border-right: 0; }
  .stage { min-height: 60vh; }
}
.decgrp .grid2 > label { min-width: 0; }
.decgrp input[type=text], .decgrp input[type=number], .decgrp select, .decgrp textarea { max-width: 100%; box-sizing: border-box; }
.decgrp label > button { margin-top: 2px; }
/* UI 优化 2026-11-16 */
.typegrp { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 6px; }
.tg-h { flex: 0 0 34px; color: var(--dim); font: 600 12px "Courier New", monospace; padding-top: 6px; }
.seg.wrap { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 4px; }
.seg.wrap label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 4px; font-size: 13px; }
.seg.wrap label:hover { border-color: var(--acc); }
.editor { overflow-x: hidden; resize: horizontal; max-width: 70vw; }
.editor * { min-width: 0; }
.editor small { display: block; font-size: 12px; line-height: 1.5; margin: 2px 0 4px; }
.top { position: sticky; top: 0; z-index: 5; }
.editor::-webkit-scrollbar, .stage::-webkit-scrollbar { width: 10px; height: 10px; }
.editor::-webkit-scrollbar-thumb, .stage::-webkit-scrollbar-thumb { background: #3a423c; border-radius: 5px; }
.editor::-webkit-scrollbar-track, .stage::-webkit-scrollbar-track { background: transparent; }
fieldset { min-width: 0; }
.seg.wrap.tfr { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
/* 终末地终端风 2026-11-17（照用户 END 项目首页截图：纯黑、细网格、酸性黄、宽字距等宽字、HUD 读数）。body[data-theme=tno] 换 TNO 青 */
@font-face { font-family: "Aldrich"; src: url(fonts/Aldrich.woff2) format("woff2"); }
@font-face { font-family: "JB Mono"; src: url(fonts/JetBrainsMono.woff2) format("woff2"); }
@font-face { font-family: "InterV"; src: url(fonts/Inter.woff2) format("woff2"); font-weight: 100 900; }
:root { --bg:#000; --s1:#050505; --s2:#0b0b0b; --s3:#141414; --line:#1c1c1c; --line2:#2a2a2a; --grid:rgba(255,255,255,.035); --fg:#fff; --dim:#a1a1a1; --mute:#555;
  --acc:#D8F032; --acc-rgb:216,240,50; --ink:#000; --ease:cubic-bezier(.19,1,.22,1);
  --mono:"JB Mono", ui-monospace, Consolas, "Microsoft YaHei", monospace; --sans:"InterV", "Segoe UI", system-ui, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; }
body[data-theme=tno] { --acc:#4DB6B0; --acc-rgb:77,182,176; --bg:#020a0c; --s1:#04100f; --s2:#071615; --s3:#0b1f1e; --line:#0f2626; --line2:#1a3a3a; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 13px; -webkit-font-smoothing: antialiased; }
body { display: flex; flex-direction: column; height: 100vh; overflow: hidden;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px), linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 120px 120px; }
::selection { background: var(--acc); color: var(--ink); }
.trk { font-family: var(--mono); letter-spacing: .35em; text-transform: uppercase; }

/* 顶栏 */
.top { position: relative; z-index: 6; height: 56px; flex: 0 0 56px; padding: 0 20px 0 0; gap: 22px; flex-wrap: nowrap; background: rgba(0,0,0,.9); border-bottom: 1px solid var(--line); }
.top h1 { display: flex; align-items: center; gap: 14px; height: 100%; padding: 0 22px 0 0; font: 700 11px var(--mono); letter-spacing: .4em; color: var(--dim); }
.top h1::before { content: ""; width: 88px; height: 100%; flex: 0 0 88px; border-right: 1px solid var(--line);
  background: center/24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D8F032' stroke-width='1.6'%3E%3Cpath d='M12 2 21 7v10l-9 5-9-5V7z'/%3E%3C/svg%3E"); }
body[data-theme=tno] .top h1::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234DB6B0' stroke-width='1.6'%3E%3Cpath d='M12 2 21 7v10l-9 5-9-5V7z'/%3E%3C/svg%3E"); }
.top .mark { background: none; width: auto; height: auto; color: var(--acc); font: inherit; letter-spacing: inherit; }
.top .ttl { color: var(--dim); }
.crumb { display: flex; align-items: center; gap: 12px; height: 18px; padding-left: 22px; border-left: 1px solid var(--line); font: 11px var(--mono); letter-spacing: .3em; color: var(--mute); text-transform: uppercase; }
.crumb b { color: var(--fg); font-weight: 400; font-family: var(--mono); }
.crumb i { font-style: normal; color: var(--acc); }
.top .actions { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.grp { display: flex; gap: 6px; align-items: center; }
.grp.ghost { padding-right: 16px; border-right: 1px solid var(--line); }
.grp.ghost button { background: transparent; border-color: transparent; color: var(--mute); }
.grp.ghost button:hover { color: var(--fg); background: transparent; border-color: var(--line2); }
.sep { display: none; }
.fx-status { display: flex; align-items: center; gap: 10px; }
.fx-status .dot, .fx-status .clock { display: none; }
.fx-theme { width: 30px; height: 30px; padding: 0 !important; display: grid; place-items: center; clip-path: none !important; }
.fx-theme::after { content: ""; width: 8px; height: 8px; background: var(--acc); transform: rotate(45deg); box-shadow: 0 0 10px var(--acc); }

/* 按钮：宽字距等宽，主按钮实心黄切角，次按钮细边框 */
button { height: 32px; padding: 0 16px; background: transparent; color: var(--dim); border: 1px solid var(--line2); border-radius: 0; font: 500 11px var(--mono); letter-spacing: .25em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: color .3s, border-color .3s, background .3s, box-shadow .3s;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
button:hover { color: var(--fg); border-color: #555; background: rgba(255,255,255,.03); }
button:active { filter: brightness(.8); }
button:focus-visible { outline: 1px solid var(--acc); outline-offset: 2px; }
button.pri { background: var(--acc); color: var(--ink); border-color: var(--acc); font-weight: 700; letter-spacing: .35em; }
button.pri:hover { background: var(--acc); color: var(--ink); box-shadow: 0 0 24px rgba(var(--acc-rgb),.45); }
button.small { height: 24px; padding: 0 10px; font-size: 10px; letter-spacing: .2em; }

/* 三栏 */
main { flex: 1; height: auto; min-height: 0; display: flex; }
.rail { position: relative; flex: 0 0 196px; overflow-y: auto; padding: 22px 0 30px; border-right: 1px solid var(--line); background: rgba(0,0,0,.85); animation: fx-left 1.2s var(--ease) both; counter-reset: ty; }
.rail-h { font: 10px var(--mono); color: var(--mute); letter-spacing: .4em; text-transform: uppercase; padding: 0 22px 16px; }
.rail .typegrp { display: block; margin: 0 0 18px; }
.rail .tg-h { display: flex; align-items: center; gap: 10px; writing-mode: horizontal-tb; transform: none; border: 0; padding: 4px 22px 8px; font: 700 10px var(--mono); color: var(--acc); letter-spacing: .4em; }
.rail .tg-h::after { content: "//"; color: var(--mute); font-weight: 400; letter-spacing: 0; }
.rail .seg.wrap, .rail .seg.wrap.tfr { display: flex; flex-direction: column; gap: 0; }
.rail .seg label { letter-spacing: .05em; font-family: var(--sans); counter-increment: ty; flex: none; position: relative; display: flex; align-items: center; gap: 12px; height: 32px; margin: 0; padding: 0 14px 0 22px; border: 0; border-radius: 0;
  background: transparent; color: var(--mute); font-size: 12.5px; clip-path: none; overflow: visible; transition: color .3s, background .3s; box-shadow: none; }
.rail .seg label::before { content: counter(ty, decimal-leading-zero); position: static; width: auto; height: auto; transform: none; background: none; font: 10px var(--mono); color: #333; letter-spacing: .1em; transition: color .3s; }
.rail .seg label::after { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0; background: var(--acc); transform: translateY(-50%); transition: height .5s var(--ease); box-shadow: 0 0 8px var(--acc); }
.rail .seg label:hover { color: var(--fg); background: rgba(255,255,255,.02); }
.rail .seg label:hover::before { color: var(--dim); }
.rail .seg label:has(input:checked) { color: var(--fg); background: linear-gradient(90deg, rgba(var(--acc-rgb),.08), transparent 70%); font-weight: 500; }
.rail .seg label:has(input:checked)::before { color: var(--acc); }
.rail .seg label:has(input:checked)::after { height: 32px; }

.editor { flex: 0 0 auto; width: 440px; min-width: 340px; max-width: 60vw; padding: 0 0 40px; background: rgba(0,0,0,.88); border-right: 1px solid var(--line); box-shadow: none; resize: horizontal; animation: fx-in .9s var(--ease) .1s both; counter-reset: fs; }
.fx-hero { padding: 28px 26px 24px; border-bottom: 1px solid var(--line); animation: fx-in .9s var(--ease) both; }
.fx-hero .k { display: flex; align-items: center; gap: 18px; font: 700 10.5px var(--mono); letter-spacing: .45em; color: var(--acc); text-transform: uppercase; }
.fx-hero .k span:first-child { position: relative; padding-bottom: 8px; }
.fx-hero .k span:first-child::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--acc); animation: fx-draw 1.4s var(--ease) .3s forwards; }
.fx-hero .k em { font-style: normal; font-weight: 400; color: var(--mute); letter-spacing: .15em; padding-bottom: 8px; }
.fx-hero .big { margin: 18px 0 2px; font: 900 46px/1.02 var(--sans); letter-spacing: -.02em; color: #fff; }
.fx-hero .sub { font: 200 26px/1.1 var(--sans); color: #777; letter-spacing: -.01em; text-transform: uppercase; word-break: break-all; }
.fx-hero .sub b { font-weight: 800; color: var(--acc); }
fieldset { counter-increment: fs; position: relative; margin: 0; padding: 22px 26px 24px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; clip-path: none; animation: fx-in .7s var(--ease) both; }
fieldset::before, fieldset::after { display: none; }
legend { float: left; width: 100%; display: flex; align-items: baseline; gap: 12px; padding: 0 0 8px; margin: 0 0 18px; border: 0; background: none; position: relative;
  font: 700 12px var(--sans); letter-spacing: .4em; color: var(--acc); }
legend::before { content: counter(fs, decimal-leading-zero) " //"; font: 700 10.5px var(--mono); letter-spacing: .3em; color: var(--acc); opacity: .7; }
legend::after { content: ""; display: block; position: absolute; left: 0; bottom: 0; width: 56px; height: 2px; background: var(--acc); opacity: .9; transform-origin: left; transition: width .6s var(--ease); }
fieldset:hover legend::after { width: 120px; }
fieldset > :not(legend) { clear: both; }
label { display: block; color: var(--mute); font: 11px var(--mono); letter-spacing: .08em; margin: 0 0 12px; }
label > span:first-child { display: block; margin-bottom: 6px; }
label.chk { display: flex; align-items: center; gap: 8px; color: var(--dim); font: 12.5px var(--sans); letter-spacing: 0; }
label.chk > span:first-child, label.chk > input + span { display: inline; margin: 0; }
.grid2 { gap: 0 14px; }
small, .editor small { display: block; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line2); color: var(--dim); font: 11.5px/1.7 var(--sans); letter-spacing: .02em; background: rgba(255,255,255,.01); }
small::before { content: "[INFO] "; font: 700 10.5px var(--mono); color: var(--fg); letter-spacing: .05em; }
small:empty { display: none; }
#fontName, .pvbar small { border: 0; padding: 0; background: none; } #fontName::before { content: ""; }
input[type=text], input[type=number], textarea, select { width: 100%; background: #000; color: var(--fg); border: 1px solid var(--line2); border-radius: 0; padding: 7px 10px;
  font: 13px var(--sans); letter-spacing: 0; transition: border-color .3s, box-shadow .3s; }
input[type=text], input[type=number], select { height: 34px; }
input[type=text]:hover, input[type=number]:hover, textarea:hover, select:hover { border-color: #444; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--acc); box-shadow: inset 2px 0 0 var(--acc), 0 0 0 1px rgba(var(--acc-rgb),.15); }
textarea { line-height: 1.7; resize: vertical; }
.seg:not(.wrap) label { border: 1px solid var(--line2); background: #000; color: var(--mute); clip-path: none; border-radius: 0; transition: .3s; }
.seg:not(.wrap) label:has(input:checked) { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.opt, .decgrp, .decblk, .decrow { position: relative; background: rgba(255,255,255,.012); border: 1px solid var(--line2); border-radius: 0; }
.opt::before, .decgrp::before { content: ""; display: block; position: absolute; left: -1px; top: -1px; width: 10px; height: 10px; border-left: 1px solid var(--acc); border-top: 1px solid var(--acc); }
.decblk:hover, .decrow:hover, .opt:hover, .decgrp:hover { border-color: #3a3a3a; }
.opt .hd { font: 700 11px var(--mono); letter-spacing: .25em; color: var(--fg); }
.codes button { height: 22px; padding: 0 6px; font: 11px var(--mono); letter-spacing: 0; clip-path: none; text-transform: none; }
input[type=file] { color: var(--mute); font: 10.5px var(--mono); }
input[type=file]::file-selector-button { height: 26px; padding: 0 12px; margin-right: 10px; background: transparent; color: var(--dim); border: 1px solid var(--line2); border-radius: 0; cursor: pointer; font: 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; transition: .3s; }
input[type=file]::file-selector-button:hover { color: var(--fg); border-color: #555; }
.credits { padding: 18px 26px; color: var(--mute); font: 10.5px/1.7 var(--mono); }
a, .credits a { color: var(--acc); text-decoration: none; }

/* 预览 + HUD */
.preview { position: relative; flex: 1; background: transparent; animation: fx-in 1s var(--ease) .2s both; overflow: hidden; }
.pvbar { position: absolute; z-index: 5; left: 28px; top: 22px; display: flex; gap: 22px; align-items: center; height: auto; padding: 0; background: none; border: 0; box-shadow: none; transform: none;
  color: var(--mute); font: 10px var(--mono); letter-spacing: .3em; text-transform: uppercase; }
.pvbar label { display: flex; margin: 0; gap: 10px; align-items: center; color: var(--mute); font: inherit; letter-spacing: inherit; }
.pvbar label > span:first-child { margin: 0; }
.pvbar select { height: 26px; width: auto; padding: 0 8px; font: 11px var(--mono); }
.pvbar #status { display: flex; align-items: center; gap: 8px; color: var(--dim); }
.pvbar #status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 6px var(--acc); animation: fx-blink 1.4s step-end infinite; }
.pvbar #status:empty { display: none; }
.stage { position: absolute; inset: 62px 24px 108px 34px; height: auto; padding: 0; background: none; align-items: center; }
#pv { box-shadow: 0 0 0 1px var(--line2), 0 40px 100px -30px rgba(0,0,0,1); animation: fx-fade .7s ease-out both; }
#pv.fx-flash { animation: fx-glitch .35s steps(2) 1; }
.warn { position: absolute; left: 28px; top: 46px; z-index: 5; color: var(--acc); font: 11px var(--mono); letter-spacing: .1em; }
.fx-scan { display: none; }
.fx-corner { display: block; position: absolute; width: 18px; height: 18px; pointer-events: none; z-index: 3; border: 0 solid #333; }
.fx-corner.tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; } .fx-corner.tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.fx-corner.bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; } .fx-corner.br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }
.hud { position: absolute; z-index: 4; pointer-events: none; font: 9.5px var(--mono); letter-spacing: .25em; color: #444; text-transform: uppercase; }
.hud-tr { top: 26px; right: 30px; display: flex; flex-direction: row; gap: 14px; align-items: center; }
.hud-tr .v { color: var(--acc); font-size: 11px; letter-spacing: .05em; font-weight: 700; opacity: .85; }
.hud-tr .bar { width: 70px; height: 2px; background: #1a1a1a; } .hud-tr .bar i { display: block; height: 100%; background: var(--acc); opacity: .6; transition: width .6s var(--ease); }
.hud-tr .st { color: var(--dim); display: flex; gap: 8px; align-items: center; } .hud-tr .st::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); }
.hud-xy { color: var(--acc); font-size: 10px; letter-spacing: .1em; opacity: 0; transition: opacity .3s; }
.preview:hover .hud-xy { opacity: .9; }
.hud-br { right: 30px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hud-br .clk { display: flex; align-items: center; gap: 10px; color: #fff; font: 700 26px var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hud-br .clk::before { content: ""; width: 14px; height: 14px; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D8F032' stroke-width='2'%3E%3Cpath d='M2 12h4l3-8 6 16 3-8h4'/%3E%3C/svg%3E"); }
.hud-br .meters { display: flex; gap: 18px; padding: 10px 12px; border: 1px solid var(--line2); background: rgba(0,0,0,.6); }
.hud-br .m { width: 120px; display: flex; flex-direction: column; gap: 6px; color: #777; letter-spacing: .1em; }
.hud-br .m div { display: flex; justify-content: space-between; } .hud-br .m p { margin: 0; height: 3px; background: #1a1a1a; } .hud-br .m p i { display: block; height: 100%; background: var(--acc); transition: width .6s var(--ease); }
.hud-br .m + .m p i { background: #fff; }
.hud-bl { left: 28px; bottom: 24px; display: flex; flex-direction: column; gap: 4px; letter-spacing: .1em; text-transform: none; }
.hud-bl div { color: #3a3a3a; animation: fx-in .4s var(--ease) both; } .hud-bl div b { font-weight: 400; color: #555; margin-right: 10px; } .hud-bl div:last-child { color: #777; }
.hud-v { left: 14px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; letter-spacing: .6em; color: #2a2a2a; }

/* 开场 */
.fx-splash { position: fixed; inset: 0; z-index: 9999; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; cursor: pointer; user-select: none; font-family: var(--mono);
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px), linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 60px 60px; }
.fx-splash::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.3) 50%); background-size: 100% 3px; pointer-events: none; }
.fx-splash.out { animation: fx-outup .8s cubic-bezier(.16,1,.3,1) forwards; }
.fx-logo { position: relative; width: 96px; height: 96px; border: 1px solid #222; display: grid; place-items: center; animation: fx-pop .7s var(--ease) both; background: none; border-radius: 0; box-shadow: none; }
.fx-logo::before { content: ""; position: absolute; inset: 0; border: 1px dashed #444; border-radius: 50%; animation: fx-spin 20s linear infinite; }
.fx-logo::after { content: ""; position: absolute; inset: -10px; border: 1px dotted #2a2a2a; border-radius: 50%; animation: fx-spin 10s linear infinite reverse; }
.fx-logo b { font: 700 18px var(--mono); color: var(--acc); letter-spacing: 3px; text-shadow: 0 0 12px rgba(var(--acc-rgb),.5); }
.fx-title { font: 900 30px var(--sans); letter-spacing: .02em; color: #fff; }
.fx-sub { font-size: 10px; color: #555; letter-spacing: .4em; min-height: 1.4em; }
.fx-bar { width: 260px; height: 2px; background: #1a1a1a; position: relative; overflow: hidden; border-radius: 0; }
.fx-bar i { position: absolute; inset: 0; background: var(--acc); transform: scaleX(0); transform-origin: left; animation: fx-load 1.2s var(--ease) .2s forwards; box-shadow: 0 0 10px var(--acc); }
.fx-hint { display: block; font-size: 9px; color: #333; letter-spacing: .4em; animation: fx-blink 1.2s step-end infinite; }

@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes fx-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fx-left { from { opacity: 0; transform: translateX(-100%); } to { opacity: 1; transform: none; } }
@keyframes fx-fade { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
@keyframes fx-pop { from { opacity: 0; transform: scale(.5); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fx-load { to { transform: scaleX(1); } }
@keyframes fx-outup { to { transform: translateY(-100%); } }
@keyframes fx-draw { to { width: 72px; } }
@keyframes fx-glitch { 0% { transform: translateX(-3px); opacity: .7; } 50% { transform: translateX(3px); } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .fx-splash { display: none; } .fx-hero .k span:first-child::after { width: 72px; } }
@media (max-width: 1250px) { .rail { flex-basis: 160px; } .editor { width: 380px; } .hud-br .meters, .hud-bl, .hud-tr { display: none; } .top h1 .ttl { display: none; } }

/* 游戏原版滚动条 / 小按钮 / 勾选框（css/img 来自 gfxin：scroll_*、arrow_*_small、closebutton、generic_checkbox、checkbox_small4） */
::-webkit-scrollbar { width: 16px; height: 16px; background: transparent; }
::-webkit-scrollbar-track:vertical { background: linear-gradient(90deg, transparent 7px, var(--line) 7px, var(--line) 9px, transparent 9px); }
::-webkit-scrollbar-track:horizontal { background: linear-gradient(0deg, transparent 7px, var(--line) 7px, var(--line) 9px, transparent 9px); }
::-webkit-scrollbar-thumb { background: var(--line2); border: 2px solid transparent; background-clip: padding-box; border-radius: 3px; min-height: 16px; min-width: 16px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--acc); }
::-webkit-scrollbar-button:single-button { display: block; width: 16px; height: 16px; background: no-repeat center/16px 16px; }
::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url(img/sb_up.png); }
::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url(img/sb_down.png); }
::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url(img/sb_left.png); }
::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url(img/sb_right.png); }
::-webkit-scrollbar-button:single-button:hover { filter: brightness(1.3); }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-color: #4DB6B0 transparent; } }
button[data-a=up], button[data-a=down], button[data-a=del] { font-size: 0; width: 22px; height: 22px; padding: 0; border: 0; vertical-align: middle;
  background: transparent no-repeat center/contain; }
button[data-a=up] { background-image: url(img/btn_up.png); width: 18px; }
button[data-a=down] { background-image: url(img/btn_down.png); width: 18px; }
button[data-a=del] { background-image: url(img/btn_del.png); }
button[data-a=up]:hover, button[data-a=down]:hover, button[data-a=del]:hover { background-color: transparent; filter: brightness(1.35); }
button[data-a=up]:active, button[data-a=down]:active, button[data-a=del]:active { background-color: transparent; filter: brightness(.8); }
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 17px; height: 15px; margin: 0 4px -3px 0; border: 0; cursor: pointer;
  background: url(img/check.png) 0 0/34px 15px no-repeat; }
input[type=checkbox]:checked { background-position: -17px 0; }
input[type=checkbox]:hover { filter: brightness(1.3); }
input[type=radio] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0 4px -3px 0; border: 0; cursor: pointer;
  background: url(img/radio.png) 0 0/32px 16px no-repeat; }
input[type=radio]:checked { background-position: -16px 0; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 16px; background: linear-gradient(0deg, transparent 7px, var(--line) 7px, var(--line) 9px, transparent 9px); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: url(img/sb_drag.png) center/14px 14px; border: 0; cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: url(img/sb_drag.png) center/14px 14px; border: 0; }
input[type=range]::-moz-range-track { height: 2px; background: #4DB6B0; }

button[data-a]::before { display: none; } button[data-a] { clip-path: none; background-color: transparent !important; border: 0 !important; }

/* 可视化编辑 */
.ve-hl { position: absolute; z-index: 6; display: none; pointer-events: none; outline: 1px dashed var(--acc); outline-offset: 2px; background: rgba(var(--acc-rgb),.06); }
.ve-hl::after { content: attr(data-t); position: absolute; left: -3px; top: -22px; padding: 2px 6px; background: var(--acc); color: var(--ink); font: 700 10px var(--mono); letter-spacing: .15em; white-space: nowrap; }
.ve-ed { position: absolute; z-index: 7; margin: 0; padding: 6px 8px; background: rgba(0,0,0,.55) !important; color: #fff; border: 1px solid var(--acc) !important; box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.2), 0 12px 30px rgba(0,0,0,.8) !important; font: 14px var(--sans); line-height: 1.5; resize: both; }
.ve-src { border-color: var(--acc) !important; box-shadow: inset 2px 0 0 var(--acc) !important; }

/* ===== 易用性优化（2026-11-17）：分组折叠、HUD 精简可收起、自动保存时间、全屏预览 ===== */
.rail .tg-h { cursor: pointer; user-select: none; }
.rail .tg-h::before { content: "▾"; color: var(--mute); letter-spacing: 0; transition: transform .25s; }
.rail .typegrp.folded .tg-h::before { transform: rotate(-90deg); }
.rail .tg-h:hover { color: var(--fg); }
.rail .typegrp.folded .seg label:not(:has(input:checked)) { display: none; }
.hud-br { bottom: 44px; gap: 6px; }
.hud-br .clk { font-size: 13px; font-weight: 500; color: var(--dim); gap: 6px; }
.hud-br .clk::before { width: 10px; height: 10px; }
.hud-br .meters { padding: 6px 10px; gap: 12px; opacity: .7; }
.hud-br .m { width: 90px; }
.hud-bl div { opacity: .8; }
.hud-tog { position: absolute; z-index: 6; right: 30px; bottom: 14px; height: 22px; padding: 0 10px; font: 10px var(--mono); letter-spacing: .15em; background: rgba(0,0,0,.6); border: 1px solid var(--line2); color: var(--dim); cursor: pointer; }
.hud-tog:hover { color: var(--acc); border-color: var(--acc); }
.preview.hud-off .hud-br, .preview.hud-off .hud-bl, .preview.hud-off .hud-tr, .preview.hud-off .hud-v, .preview.hud-off .fx-corner { display: none; }
.pvbar #status { color: var(--fg); }
.pvbar #status::before { animation: fx-breath 2.4s ease-in-out infinite; }
@keyframes fx-breath { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
#btnFull { height: 26px; padding: 0 10px; font: 11px var(--mono); }
.preview:fullscreen { background: #000; }
.preview:fullscreen .stage { inset: 62px 24px 50px 24px; }
.preview .stage { bottom: 84px; }
.preview.hud-off .stage { bottom: 40px; }
/* 原地编辑：隐藏输入框收键盘/输入法，光标与选区按渲染排版画 */
.ve-ed.ve-in { position: absolute; z-index: 9; width: 2px; padding: 0; border: 0 !important; background: transparent !important; color: transparent; caret-color: transparent; box-shadow: none !important; outline: none; resize: none; overflow: hidden; opacity: 0; font-size: 14px; }
.ve-frame { position: absolute; z-index: 6; pointer-events: none; outline: 1px dashed rgba(var(--acc-rgb),.7); outline-offset: 3px; }
.ve-selbox { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.ve-sel { position: absolute; background: rgba(var(--acc-rgb),.38); }
.ve-caret { position: absolute; z-index: 8; width: 2px; margin-left: -1px; background: var(--acc); box-shadow: 0 0 0 1px rgba(0,0,0,.6); pointer-events: none; animation: ve-blink 1s step-end infinite; }
@keyframes ve-blink { 50% { opacity: 0; } }
