: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[data-kind=map] .only-tt, body[data-type=map] .only-tt { display: none; }  /* custom icons: every window but the map */
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='%23FFE600' 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='%23FFE600' 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; } }
/* 2026-11-29: only-event/news/super are TNO-only controls (photo frame / newspaper header / nuke style); hide them everywhere else */
body:not([data-type=event]) .only-event, body:not([data-type=news]) .only-news, body:not([data-type=super]) .only-super { display: none; }
body:not([data-kind=focustree]):not([data-kind=tfr_focustree]) .only-ft { display: none; }
body[data-kind=focustree] .not-tt, body[data-kind=focustree] .not-load, body[data-kind=focustree] .not-mm,
body[data-kind=tfr_focustree] .not-tt, body[data-kind=tfr_focustree] .not-load, body[data-kind=tfr_focustree] .not-mm { display: none; }
body:not([data-kind=tfr_focustree]) .ft-tfr-only { display: none; }
body[data-ftmode=tree] .ft-win { display: none; }
.ftrow .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }

/* 滚轮缩放：画布大于预览区时也能滚到四边（居中改用 margin:auto） */
#stage { justify-content: flex-start; align-items: flex-start; }
#pv { margin: auto; flex: none; }

/* 国策树右键菜单 */
.ft-menu { position: fixed; z-index: 1000; min-width: 170px; padding: 4px; background: #0d1210; border: 1px solid #3a423c; box-shadow: 0 8px 24px rgba(0,0,0,.6); display: flex; flex-direction: column; }
.ft-menu button { all: unset; padding: 6px 12px; font-size: 13px; color: #d6e0da; cursor: pointer; white-space: nowrap; }
.ft-menu button:hover { background: #1f2a24; color: #fff; }
body.ft-picking #pv { cursor: crosshair !important; }

/* 杂项法律 */
body:not([data-kind=assortedlaws]) .only-al { display: none; }
body[data-kind=assortedlaws] .not-tt, body[data-kind=assortedlaws] .not-load, body[data-kind=assortedlaws] .not-mm { display: none; }

/* 2026-11-30: 地图 page — only its own fieldset (and export settings hidden: the map has its own width) */
body:not([data-type=map]) .only-map { display: none !important; }
body[data-type=map] .editor > fieldset:not(.only-map) { display: none; }
body[data-type=map] #pv, body[data-type=map] #btnZip { display: none; }
body[data-type=map] .stage { overflow: hidden; }
#mapwrap { position: relative; margin: auto; flex: none; cursor: grab; touch-action: none; }
#mapwrap.drag { cursor: grabbing; }
#mapwrap canvas { display: block; }
#maplab { position: absolute; left: 0; top: 0; pointer-events: none; }

/* v41 地图 设置 panel (look parameters) */
details.maplook { margin-top: 8px; font: 12.5px var(--sans); color: var(--dim); }
details.maplook summary { cursor: pointer; color: var(--fg); }
details.maplook .lookrow { display: grid; grid-template-columns: 1fr 110px 64px; align-items: center; gap: 6px; margin: 3px 0; }
details.maplook .lookrow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.maplook .lookrow input[type=number] { width: 64px; padding: 2px 4px; }

details.maplook .lookrow input[type=checkbox] { justify-self: start; }

/* v62b 领土编辑 floating panel (js/maptags.js) — same look as the app (black, mono caps, sharp, accent corner) */
#mapwrap.mt-painting { cursor: crosshair; }
#mapwrap.mt-picking { cursor: copy; }
#btnTags.on { background: var(--acc); color: var(--ink); border-color: var(--acc); }
.mt-panel { position: absolute; top: 62px; right: 24px; z-index: 20; width: 340px; max-height: calc(100% - 100px); display: flex; flex-direction: column;
  background: rgba(0,0,0,.92); border: 1px solid var(--line2); border-radius: 0; box-shadow: 0 40px 100px -30px rgba(0,0,0,1); font: 12.5px var(--sans); color: var(--fg); }
.mt-panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 12px; height: 12px; border-left: 1px solid var(--acc); border-top: 1px solid var(--acc); pointer-events: none; }
.mt-panel[hidden], .mt-panel [hidden] { display: none !important; }
.mt-head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line2); cursor: move; user-select: none; }
.mt-head b { color: var(--acc); font: 700 11px var(--mono); letter-spacing: .3em; }
.mt-head b::before { content: "// "; color: var(--mute); }
.mt-panel button { height: 26px; padding: 0 10px; font: 500 10.5px var(--mono); letter-spacing: .15em; text-transform: none; clip-path: none; }
.mt-head button { width: 26px; padding: 0; letter-spacing: 0; }
.mt-sp { flex: 1; }
.mt-bodyw { display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: hidden; min-height: 0; }
.mt-cap { font: 10px var(--mono); letter-spacing: .25em; color: var(--mute); text-transform: uppercase; }
.mt-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.mt-tools button { height: 30px; padding: 0; margin-left: -1px; letter-spacing: .08em; }
.mt-tools button span { display: none; }
.mt-tools button.on { background: var(--acc); color: var(--ink); border-color: var(--acc); font-weight: 700; position: relative; z-index: 1; }
.mt-tools2 { display: flex; align-items: center; gap: 6px; }
.mt-tools2 button:disabled { opacity: .35; cursor: default; }
.mt-chk { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; color: var(--dim) !important; font: 12px var(--sans) !important; letter-spacing: 0 !important; }
.mt-brush { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.012); min-height: 18px; flex-wrap: wrap; position: relative; }
.mt-brush b { font-weight: 600; }
.mt-brush i, .mt-item i, .mt-hud i { display: inline-block; width: 10px; height: 10px; border: 0; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.mt-hud i { margin-right: 6px; vertical-align: -1px; }
.mt-tg { font: 10.5px var(--mono); letter-spacing: .1em; color: var(--mute); }
.mt-dim { color: var(--dim); font-size: 11.5px; }
.mt-edit { display: flex; flex-direction: column; gap: 6px; }
.mt-row { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 6px; }
.mt-row > span:first-child { font: 10px var(--mono); letter-spacing: .15em; color: var(--mute); }
.mt-panel input[type=text], .mt-panel input[type=number], .mt-panel select { height: 28px; padding: 0 8px; font-size: 12.5px; }
.mt-color { display: grid; grid-template-columns: 28px minmax(0,1.6fr) repeat(3, minmax(0,1fr)); gap: 4px; align-items: center; }
.mt-color input { flex: 0 0 auto; min-width: 0; box-sizing: border-box; }
.mt-color input[type=color] { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line2); background: #000; }
.mt-color .mt-hex { width: 100% !important; padding: 0 6px !important; font: 11.5px var(--mono) !important; }
.mt-color input[type=number] { width: 100% !important; padding: 0 4px !important; text-align: right; font: 11.5px var(--mono) !important; }
.mt-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-danger:hover { border-color: #ff5a4a; color: #ff5a4a; }
.mt-delbox { border: 1px solid var(--line2); border-left: 2px solid #ff5a4a; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; color: var(--dim); font-size: 12px; }
.mt-listhead { display: flex; gap: 6px; }
.mt-listhead input { flex: 1; }
.mt-listhead button { height: 28px; white-space: nowrap; }
.mt-new { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line2); border-left: 2px solid var(--acc); padding: 8px 10px; }
.mt-list { overflow-y: auto; min-height: 120px; max-height: 320px; flex: 1; border: 1px solid var(--line2); background: #000; }
.mt-item { display: grid; grid-template-columns: 10px 1fr auto 28px; align-items: center; gap: 8px; height: 26px; padding: 0 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.mt-item:hover { background: rgba(255,255,255,.03); }
.mt-item.on { background: rgba(var(--acc-rgb),.08); box-shadow: inset 2px 0 0 var(--acc); }
.mt-item .mt-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-item em { font: 9.5px var(--mono); font-style: normal; letter-spacing: .15em; color: var(--acc); margin-left: 6px; }
.mt-item .mt-n { text-align: right; font: 10.5px var(--mono); color: var(--mute); }
.mt-item.mt-gone { cursor: default; color: var(--dim); }
.mt-item.mt-gone button { height: 20px; padding: 0 6px; letter-spacing: .1em; }
.mt-sec { height: 24px; line-height: 24px; padding: 0 10px; font: 10px var(--mono); letter-spacing: .25em; color: var(--mute); border-bottom: 1px solid var(--line2); }
.mt-empty { padding: 10px; color: var(--mute); font: 11px var(--mono); }
.mt-foot { display: flex; align-items: center; gap: 8px; }
.mt-s { color: var(--dim); font: 10.5px/1.6 var(--mono); letter-spacing: .03em; }
.mt-foot .mt-s { flex: 1; }
.mt-help { color: var(--mute); font: 10.5px/1.7 var(--mono); border-top: 1px solid var(--line2); padding-top: 8px; }
.mt-hud { position: absolute; left: 8px; top: 8px; z-index: 3; pointer-events: none; padding: 6px 10px; font: 11px/1.6 var(--mono); letter-spacing: .05em;
  color: var(--fg); background: rgba(0,0,0,.85); border: 1px solid var(--line2); border-left: 2px solid var(--acc); max-width: 60%; }
body:not([data-type=map]) .mt-panel { display: none !important; }

/* v63c 领土编辑 entrance (same vocabulary as the page: fx-in rise + accent scan line + staggered rows, fx-glitch on the head) */
.mt-panel.mt-in { animation: mt-open .55s var(--ease) both; }
.mt-panel.mt-in::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--acc); box-shadow: 0 0 10px var(--acc); pointer-events: none; animation: mt-scan .6s var(--ease) both; }
.mt-panel.mt-in::before { animation: fx-pop .5s var(--ease) .1s both; }
.mt-panel.mt-in .mt-head b { animation: fx-glitch .35s steps(2) .15s both; }
.mt-panel.mt-in .mt-bodyw > * { animation: fx-in .5s var(--ease) both; }
.mt-panel.mt-in .mt-bodyw > :nth-child(1) { animation-delay: .08s; } .mt-panel.mt-in .mt-bodyw > :nth-child(2) { animation-delay: .12s; }
.mt-panel.mt-in .mt-bodyw > :nth-child(3) { animation-delay: .16s; } .mt-panel.mt-in .mt-bodyw > :nth-child(4) { animation-delay: .2s; }
.mt-panel.mt-in .mt-bodyw > :nth-child(5) { animation-delay: .24s; } .mt-panel.mt-in .mt-bodyw > :nth-child(6) { animation-delay: .28s; }
.mt-panel.mt-in .mt-bodyw > :nth-child(n+7) { animation-delay: .32s; }
.mt-panel.mt-in .mt-item { animation: fx-left .45s var(--ease) both; }
.mt-panel.mt-in .mt-item:nth-child(-n+12) { animation-delay: calc(.25s + var(--i, 0) * 25ms); }
.mt-panel.mt-out { animation: mt-close .22s ease-in both; pointer-events: none; }
.mt-tools button.on { transition: background .25s var(--ease), color .25s; }
@keyframes mt-open { from { opacity: 0; transform: translateY(12px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@keyframes mt-scan { from { top: 0; opacity: 1; } 80% { opacity: 1; } to { top: 100%; opacity: 0; } }
@keyframes mt-close { to { opacity: 0; transform: translateY(8px); clip-path: inset(0 0 100% 0); } }
@media (prefers-reduced-motion: reduce) { .mt-panel.mt-out { display: none; } }

/* 2026-12-03 领土编辑 UI pass: icon tools with key caps, section captions, brush card with share bar,
   list rows backed by a bar in the country's colour, change counters as chips, help as key caps */
.mt-panel { background: linear-gradient(180deg, rgba(var(--acc-rgb),.035), transparent 120px), var(--s1); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.mt-hc { font: 10px var(--mono); letter-spacing: .12em; color: var(--acc); padding: 2px 6px; border: 1px solid rgba(var(--acc-rgb),.35); }
.mt-hc:empty { display: none; }
.mt-cap { display: flex; align-items: center; gap: 8px; }
.mt-cap::before { content: ""; width: 6px; height: 6px; background: var(--acc); flex: none; }
.mt-cap::after { content: ""; flex: 1; height: 1px; background: var(--line2); order: 1; }
.mt-cap #mt_lcount { order: 2; color: var(--dim); letter-spacing: .1em; text-transform: none; }
.mt-cap .mt-sp { display: none; }
.mt-tools button { height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; }
.mt-tools button span { display: block; line-height: 0; color: var(--dim); transition: color .2s, transform .25s var(--ease); }
.mt-tools button:hover span { color: var(--acc); transform: translateY(-1px); }
.mt-tools button.on span { color: var(--ink); }
.mt-tools button em { font-style: normal; font-size: 11px; letter-spacing: .06em; }
.mt-tools button kbd { position: absolute; top: 3px; right: 4px; font: 8.5px var(--mono); color: var(--mute); border: 0; padding: 0; background: none; }
.mt-tools button.on kbd { color: rgba(0,0,0,.55); }
.mt-brush { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 10px 12px 14px; overflow: hidden;
  border-left: 2px solid var(--c, var(--line2)); background: linear-gradient(90deg, color-mix(in srgb, var(--c, #000) 16%, transparent), transparent 70%); }
.mt-brush > .mt-dim { grid-column: 1 / -1; }
.mt-brush .mt-sw { width: 34px; height: 34px; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 0 18px color-mix(in srgb, var(--c, #000) 60%, transparent); }
.mt-bn { display: flex; flex-direction: column; min-width: 0; justify-content: center; }
.mt-bn b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-bn .mt-dim { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-bs { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; font: 10.5px var(--mono); color: var(--dim); }
.mt-bs .mt-tg { color: var(--fg); padding: 1px 6px; border: 1px solid var(--line2); }
.mt-bs b { color: var(--fg); }
.mt-share { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--c, var(--acc)); transition: width .4s var(--ease); }
.mt-item { position: relative; background: linear-gradient(90deg, color-mix(in srgb, var(--c, #000) 13%, transparent) var(--p, 0%), transparent var(--p, 0%)); transition: background-color .15s; }
.mt-item i { width: 12px; height: 12px; }
.mt-item:hover { background-color: rgba(255,255,255,.04); }
.mt-item:hover .mt-tg { color: var(--fg); }
.mt-item.on .mt-nm { color: var(--acc); }
.mt-foot { flex-wrap: wrap; align-items: flex-start; }
.mt-foot .mt-s { display: flex; flex-wrap: wrap; gap: 4px; }
.mt-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 6px; border: 1px solid var(--line2); color: var(--mute); font: 10px var(--mono); }
.mt-chip b { color: var(--dim); font-weight: 600; }
.mt-chip.on { border-color: rgba(var(--acc-rgb),.45); color: var(--dim); }
.mt-chip.on b { color: var(--acc); }
.mt-help { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.mt-help kbd { display: inline-block; margin-right: 3px; padding: 0 5px; font: 9.5px/16px var(--mono); color: var(--fg); background: var(--s3); border: 1px solid var(--line2); border-bottom-width: 2px; }
.mt-help .mt-dim { flex-basis: 100%; font-size: 10.5px; }
.mt-bodyw > :not(.mt-list) { flex-shrink: 0; }  /* only the country list gives up height when the panel is short */

/* 2026-12-03：说明文字收成「i」按钮，鼠标移上去才弹出（js/tips.js）。文字仍在 small 里（i18n 照常改），只是不显示。 */
small.tip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin: 0 0 6px; padding: 0;
  border: 1px solid var(--line2); border-radius: 0; font-size: 0; line-height: 0; color: transparent; cursor: help; vertical-align: middle;
  background: rgba(255,255,255,.03); user-select: none; }
label small.tip { margin: 0 0 0 6px; }
small.tip::before { content: "i"; font: 700 10px/1 var(--mono); color: var(--dim); letter-spacing: 0; }
small.tip:hover, small.tip.on { border-color: var(--fg); }
small.tip:hover::before, small.tip.on::before { color: var(--fg); }
#tipPop { position: fixed; z-index: 9999; max-width: 340px; padding: 8px 12px; border: 1px solid var(--line2); background: #0d0d0d;
  color: var(--fg); font: 11.5px/1.7 var(--sans); letter-spacing: .02em; white-space: pre-line; pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.6); display: none; }

/* 2026-12-03 b：用户嫌领土编辑「AI 味太浓」——收回图标、键位角标、渐变、发光、色条、chip、键帽，回到平的黑底细线 */
.mt-panel { background: rgba(0,0,0,.94); box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.mt-panel::before, .mt-panel.mt-in::after { display: none; }
.mt-panel.mt-in, .mt-panel.mt-in .mt-bodyw > *, .mt-panel.mt-in .mt-item, .mt-panel.mt-in .mt-head b { animation: none; }
.mt-head b::before { content: ""; }
.mt-head b { color: var(--fg); letter-spacing: .15em; }
.mt-hc { color: var(--dim); border: 0; padding: 0; }
.mt-cap::before, .mt-cap::after { display: none; }
.mt-cap { letter-spacing: .1em; justify-content: space-between; }
.mt-tools button { height: 28px; flex-direction: row; gap: 0; }
.mt-tools button span, .mt-tools button kbd { display: none; }
.mt-tools button em { font-size: 12px; letter-spacing: 0; }
.mt-tools button.on { background: #1d1d1d; color: var(--fg); border-color: #666; font-weight: 600; }
.mt-brush { grid-template-columns: 18px 1fr auto; gap: 8px; padding: 8px 10px; border-left: 1px solid var(--line2); background: none; }
.mt-brush .mt-sw { width: 18px; height: 18px; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.mt-bn b { font-size: 13px; }
.mt-bs { flex-direction: row; align-items: center; gap: 8px; }
.mt-bs .mt-tg { border: 0; padding: 0; color: var(--dim); }
.mt-share { display: none; }
.mt-item { background: none; }
.mt-item.on { background: #151515; box-shadow: none; }
.mt-item.on .mt-nm { color: var(--fg); font-weight: 600; }
.mt-chip { border: 0; padding: 0; margin-right: 8px; }
.mt-chip.on b { color: var(--fg); }
.mt-help { display: block; line-height: 1.9; } .mt-help > span { margin-right: 10px; white-space: nowrap; } .mt-help .mt-dim { display: block; white-space: normal; }
.mt-help kbd { all: unset; color: var(--dim); }
.mt-help kbd + kbd::before { content: "/"; margin: 0 2px; color: var(--mute); }

/* 小按钮的切角太小，看起来像边框断了：小按钮不切角 */
button.small { clip-path: none; }

/* 2026-12-03 c：参考用户给的《终末地》加载画面——深灰底 + 很淡的等高线、左边一条黄竖条、白色粗标题、灰色小字、黄色只用在数字和选中项上 */
.mt-panel { background: url(img/contour.svg) 0 0 / 420px 420px, linear-gradient(180deg, #1b1b1b, #151515); border: 0; box-shadow: 0 12px 40px rgba(0,0,0,.55); padding-left: 4px; }
.mt-panel::before { display: block; content: ""; left: 0; top: 0; bottom: 0; width: 4px; height: auto; border: 0; background: #ffe600; animation: none !important; }
.mt-head { height: 44px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mt-head b { font: 800 15px var(--sans); letter-spacing: .04em; color: #fff; }
.mt-head b::after { content: "TERRITORY EDITOR"; margin-left: 8px; font: 500 8px var(--mono); letter-spacing: .12em; color: #6b6b6b; vertical-align: 2px; }
.mt-hc { font: 700 18px var(--sans); color: #ffe600; letter-spacing: 0; }
.mt-head button { border-color: transparent; color: #888; }
.mt-head button:hover { color: #fff; border-color: transparent; background: none; }
.mt-cap { font: 500 9px var(--mono); letter-spacing: .14em; color: #6b6b6b; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mt-cap #mt_lcount { color: #ffe600; font: 700 11px var(--sans); }
.mt-tools { border-bottom: 1px solid rgba(255,255,255,.1); }
.mt-tools button { border: 0; margin: 0; background: none; color: #8a8a8a; height: 30px; }
.mt-tools button:hover { color: #fff; background: none; }
.mt-tools button.on { background: none; color: #fff; border: 0; box-shadow: inset 0 -2px 0 #ffe600; }
.mt-panel button { border-color: rgba(255,255,255,.14); color: #bdbdbd; }
.mt-panel button:hover { border-color: #ffe600; color: #fff; background: none; }
.mt-panel input[type=text], .mt-panel input[type=number], .mt-panel select { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.1); }
.mt-brush { border: 0; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); padding: 10px 0; }
.mt-bn b { font: 800 16px var(--sans); color: #fff; }
.mt-bs b { color: #ffe600; font: 700 14px var(--sans); }
.mt-list { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.08); }
.mt-item { border-bottom-color: rgba(255,255,255,.05); }
.mt-item.on { background: rgba(255,230,0,.06); box-shadow: inset 2px 0 0 #ffe600; }
.mt-chip.on b { color: #ffe600; }
.mt-help { color: #6b6b6b; border-top-color: rgba(255,255,255,.08); font-size: 10px; }
.mt-help kbd { color: #a8a8a8; }
.mt-panel .mt-head button { border-color: transparent; color: #888; } .mt-panel .mt-head button:hover { color: #fff; border-color: transparent; }

/* 2026-12-03 d：领土编辑面板动画（用户：UI 可以，但动画太少不够生动）。都在 prefers-reduced-motion 下关掉 */
@keyframes mtd-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mtd-hide { to { clip-path: inset(0 0 0 100%); opacity: .4; } }
@keyframes mtd-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes mtd-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mtd-left { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes mtd-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mtd-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes mtd-drift { from { background-position: 0 0, 0 0; } to { background-position: 420px -420px, 0 0; } }
@keyframes mtd-scan { 0% { top: -40px; } 100% { top: 100%; } }
@keyframes mtd-bump { 0% { transform: scale(1.35); color: #fff; } 100% { transform: none; } }
@keyframes mtd-flash { 0% { background: rgba(255,230,0,.16); } 100% { background: transparent; } }
@keyframes mtd-under { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mtd-swatch { 0% { transform: scale(.3) rotate(-45deg); } 70% { transform: scale(1.15); } 100% { transform: none; } }

.mt-panel { animation: mtd-drift 90s linear infinite; overflow: hidden; }
.mt-panel::before { transform-origin: top; }
.mt-panel::after { display: block !important; content: ""; position: absolute; left: 0; top: -40px; width: 4px; height: 40px; pointer-events: none;
  background: linear-gradient(180deg, transparent, #fff8a0, transparent); opacity: .8; animation: mtd-scan 3.2s cubic-bezier(.6,0,.4,1) infinite; }
.mt-panel.mt-in { animation: mtd-reveal .5s cubic-bezier(.7,0,.2,1) both, mtd-drift 90s linear infinite; }
.mt-panel.mt-in::before { animation: mtd-bar .45s cubic-bezier(.7,0,.2,1) .05s both !important; }
.mt-panel.mt-in .mt-head b { animation: mtd-type .5s steps(8) .2s both; }
.mt-panel.mt-in .mt-head b::after { animation: mtd-blink .25s steps(1) .6s 3; }
.mt-panel.mt-in .mt-bodyw > * { animation: mtd-rise .45s cubic-bezier(.2,.7,.2,1) both; }
.mt-panel.mt-in .mt-bodyw > :nth-child(1) { animation-delay: .18s; } .mt-panel.mt-in .mt-bodyw > :nth-child(2) { animation-delay: .23s; }
.mt-panel.mt-in .mt-bodyw > :nth-child(3) { animation-delay: .28s; } .mt-panel.mt-in .mt-bodyw > :nth-child(4) { animation-delay: .33s; }
.mt-panel.mt-in .mt-bodyw > :nth-child(5) { animation-delay: .38s; } .mt-panel.mt-in .mt-bodyw > :nth-child(6) { animation-delay: .43s; }
.mt-panel.mt-in .mt-bodyw > :nth-child(n+7) { animation-delay: .48s; }
.mt-panel.mt-in .mt-item { animation: mtd-left .4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.35s + var(--i, 0) * 30ms); }
.mt-panel.mt-out { animation: mtd-hide .22s ease-in both; }

/* 工具：下划线从中间展开，悬停文字上浮 */
.mt-tools button { position: relative; transition: color .2s; }
.mt-tools button em { display: inline-block; transition: transform .2s cubic-bezier(.2,.7,.2,1); }
.mt-tools button:hover em { transform: translateY(-2px); }
.mt-tools button.on { box-shadow: none; }
.mt-tools button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #ffe600; transform-origin: center; animation: mtd-under .3s cubic-bezier(.2,.7,.2,1) both; }

/* 按钮：黄色从左边扫进来 */
.mt-panel button:not(.mt-tools button):not(.mt-head button) { background: linear-gradient(90deg, rgba(255,230,0,.14), rgba(255,230,0,.14)) no-repeat 0 0 / 0 100%;
  transition: background-size .25s cubic-bezier(.2,.7,.2,1), color .2s, border-color .2s; }
.mt-panel button:not(.mt-tools button):not(.mt-head button):hover { background-size: 100% 100%; }
.mt-panel button:active { transform: translateY(1px); }
.mt-head button { transition: color .2s, transform .2s; } .mt-panel .mt-head button:hover { transform: rotate(90deg); }
.mt-panel .mt-head #mt_min:hover { transform: none; }

/* 列表：悬停右移、左边色块变高；选中时黄条从中间长出来 */
.mt-item { transition: background-color .15s, padding-left .2s cubic-bezier(.2,.7,.2,1); }
.mt-item:hover { padding-left: 14px; }
.mt-item i { transition: transform .2s; } .mt-item:hover i { transform: scale(1.25); }
.mt-item.on { box-shadow: none; }
.mt-item.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: #ffe600; transform-origin: center; animation: mtd-bar .25s cubic-bezier(.2,.7,.2,1) both; }

/* 画笔换了国家：色块转进来、整块闪一下黄；数字变了跳一下（js/mt_anim.js 加类） */
.mt-brush.mtd-new { animation: mtd-flash .6s ease-out; }
.mt-brush.mtd-new .mt-sw { animation: mtd-swatch .4s cubic-bezier(.2,.7,.2,1); }
.mt-brush.mtd-new .mt-bn { animation: mtd-left .35s cubic-bezier(.2,.7,.2,1); }
.mtd-bump { display: inline-block; animation: mtd-bump .35s cubic-bezier(.2,.7,.2,1); }
.mt-foot .mt-s.mtd-new { animation: mtd-flash .6s ease-out; }
.mt-panel input:focus, .mt-panel select:focus { border-color: #ffe600; box-shadow: 0 0 0 1px rgba(255,230,0,.25); transition: border-color .2s, box-shadow .2s; }
.mt-new, .mt-delbox, .mt-edit { animation: mtd-rise .3s cubic-bezier(.2,.7,.2,1); }
.mt-hud { animation: mtd-left .25s cubic-bezier(.2,.7,.2,1); }

@media (prefers-reduced-motion: reduce) {
  .mt-panel, .mt-panel::after, .mt-panel *, .mt-panel *::before, .mt-panel *::after { animation: none !important; transition: none !important; }
  .mt-panel::after { display: none !important; }
}

/* 2026-12-03 e：整个网页按用户给的《终末地》加载画面参考：深灰底 + 很淡的等高线（慢漂）、左边黄竖条、纯黄 #FFE600、白色粗标题；
   再加全局动画（扫光、按钮黄色扫入、输入框聚焦、左栏悬停、分组标题、预览重绘淡入）。TNO 青主题只换底纹不换颜色。 */
body[data-theme=endfield] { --acc:#FFE600; --acc-rgb:255,230,0; --bg:#151515; --s1:#191919; --s2:#1d1d1d; --s3:#232323; --line:#262626; --line2:#333; --grid:rgba(255,255,255,.025); }
body { background-image: url(img/contour.svg), linear-gradient(to right, var(--grid) 1px, transparent 1px), linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 840px 840px, 120px 120px, 120px 120px; animation: e-drift 160s linear infinite; }
@keyframes e-drift { to { background-position: 840px -840px, 0 0, 0 0; } }
body::before { content: ""; position: fixed; left: 0; top: 0; bottom: 0; width: 4px; z-index: 50; background: var(--acc); pointer-events: none; transform-origin: top; animation: e-bar .8s cubic-bezier(.7,0,.2,1) .1s both; }
body::after { content: ""; position: fixed; left: 0; top: -60px; width: 4px; height: 60px; z-index: 51; pointer-events: none; background: linear-gradient(180deg, transparent, #fff, transparent); opacity: .7; animation: e-scan 4.5s cubic-bezier(.6,0,.4,1) 1s infinite; }
@keyframes e-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes e-scan { from { top: -60px; } to { top: 100%; } }
body[data-theme=endfield] .top { background: rgba(21,21,21,.92); }
body[data-theme=endfield] .rail { background: rgba(18,18,18,.88); }
body[data-theme=endfield] .editor { background: rgba(25,25,25,.82); }
body[data-theme=endfield] input[type=text], body[data-theme=endfield] input[type=number], body[data-theme=endfield] textarea, body[data-theme=endfield] select { background: rgba(0,0,0,.35); }

/* 标题更像参考图：白色粗体，编号小而黄 */
legend { color: #fff; font-weight: 800; }

/* 按钮：黄色从左扫入；按下下沉 */
button:not([data-a]):not(.pri):not(.fx-theme):not(.mt-tools button):not(.mt-head button) { background-image: linear-gradient(90deg, rgba(var(--acc-rgb),.14), rgba(var(--acc-rgb),.14));
  background-repeat: no-repeat; background-size: 0 100%; transition: background-size .3s var(--ease), color .2s, border-color .2s; }
button:not([data-a]):not(.pri):not(.fx-theme):not(.mt-tools button):not(.mt-head button):hover { background-size: 100% 100%; border-color: var(--acc); color: #fff; }
button:active { transform: translateY(1px); }
button.pri { position: relative; overflow: hidden; }
button.pri::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: e-shine 3.5s ease-in-out 2s infinite; pointer-events: none; }
@keyframes e-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

/* 输入框聚焦：黄边 + 底部黄线展开 */
input[type=text], input[type=number], textarea, select { transition: border-color .25s, box-shadow .25s, background-color .25s; }
input[type=text]:focus, input[type=number]:focus, textarea:focus, select:focus { outline: none; border-color: var(--acc); box-shadow: 0 2px 0 -1px var(--acc), 0 0 0 1px rgba(var(--acc-rgb),.18); }

/* 左栏：悬停右移，编号变黄 */
.rail .seg label { transition: color .25s, background .25s, padding-left .25s var(--ease); }
.rail .seg label:hover { padding-left: 30px; color: #fff; }
.rail .seg label:hover::before { color: var(--acc); }

/* 分组：进视野时上浮（只第一次），悬停时左边细黄线 */
fieldset { transition: background .3s; }
fieldset:hover { background: rgba(255,255,255,.012); }
fieldset::after { display: block !important; content: ""; position: absolute; left: 0; top: 22px; width: 2px; height: 0; background: var(--acc); transition: height .45s var(--ease); }
fieldset:hover::after { height: 28px; }

/* 复选框 / 下拉打开时小弹一下 */
input[type=checkbox] { transition: transform .15s; } input[type=checkbox]:active { transform: scale(.85); }

/* 预览每次重绘淡入一点（js/fx.js 不动，用 #pv 的 class，由 mt_anim.js 触发） */
#pv.e-shown { animation: none; } #pv.e-shown.fx-flash { animation: fx-glitch .35s steps(2) 1; }
/* 切窗口类型：编辑栏整体从右滑入 */
.editor.e-swap > * { animation: fx-in .45s var(--ease) both; }
.editor.e-swap > :nth-child(2) { animation-delay: .04s; } .editor.e-swap > :nth-child(3) { animation-delay: .08s; } .editor.e-swap > :nth-child(4) { animation-delay: .12s; }
.editor.e-swap > :nth-child(5) { animation-delay: .16s; } .editor.e-swap > :nth-child(n+6) { animation-delay: .2s; }
#tipPop { animation: e-tip .18s var(--ease); } @keyframes e-tip { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { body, body::after, button.pri::after, #pv, .editor > * { animation: none !important; } body::after { display: none; } }

/* 2026-12-03 f：手机端（≤860px）。原来手机上 body 固定一屏高且禁止滚动，预览被挤到编辑栏下面两千多像素处，滑不到，所以看着像“没渲染”；顶栏按钮也把页面撑到 1100+px 宽。
   现在：顶栏两行（按钮横向滑动）→ 窗口类型横向滑动条 → 预览固定在上方（可收起）→ 编辑栏在下面自己滚动。 */
@media (max-width: 860px) {
  html, body { height: 100%; }
  body { height: 100dvh; overflow: hidden; }
  body::before, body::after { width: 3px; }
  .top { height: auto; flex: 0 0 auto; flex-wrap: wrap; gap: 0; padding: 0; }
  .top h1 { height: 44px; padding-right: 12px; }
  .top h1::before { width: 52px; flex-basis: 52px; }
  .top h1 .ttl { display: inline; }
  .crumb { display: none; }
  .top .actions { order: 3; width: 100%; margin: 0; gap: 8px; padding: 6px 10px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
  .top .actions::-webkit-scrollbar { display: none; }
  .top .actions .grp, .top .actions button { flex: 0 0 auto; white-space: nowrap; }
  .fx-status { order: 2; margin-left: auto; padding-right: 10px; }
  main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; height: auto; overflow: hidden; }
  /* 窗口类型：横向滑动 */
  .rail { order: 1; flex: 0 0 auto; display: flex; align-items: center; gap: 0; padding: 0; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; animation: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-h { display: none; }
  .rail .typegrp { display: flex; align-items: center; margin: 0; flex: 0 0 auto; }
  .rail .tg-h { padding: 0 10px 0 14px; white-space: nowrap; }
  .rail .seg.wrap, .rail .seg.wrap.tfr { flex-direction: row; flex-wrap: nowrap; }
  .rail .seg label { height: 40px; padding: 0 12px; white-space: nowrap; flex: 0 0 auto; }
  .rail .seg label:hover { padding-left: 12px; }
  /* 预览在上 */
  .preview { order: 2; flex: 0 0 auto; height: 42dvh; min-height: 220px; border-bottom: 1px solid var(--line2); animation: none; }
  body.m-pvmin .preview { height: 38px; min-height: 0; }
  body.m-pvmin .preview .stage, body.m-pvmin .preview .warn { display: none; }
  .pvbar { left: 0 !important; right: 0; top: 0 !important; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 6px 10px !important; scrollbar-width: none; }
  .pvbar::-webkit-scrollbar { display: none; }
  .pvbar > * { flex: 0 0 auto; }
  .preview .stage, #stage { inset: 46px 6px 6px 6px !important; bottom: 6px !important; min-height: 0; padding: 0; touch-action: pan-x pan-y; }
  .preview > [class^=fx-c], .preview .fx-corner { display: none; }
  .hud-br, .hud-bl, .hud-tr, .hud-tl, .hud-v, .hud-tog { display: none !important; }
  /* 编辑栏在下面单独滚动 */
  .editor { order: 3; flex: 1 1 auto; width: 100% !important; max-width: none; min-width: 0; resize: none; overflow-y: auto; border-right: 0; padding-bottom: 60px; -webkit-overflow-scrolling: touch; }
  .fx-hero { padding: 16px 16px 12px; }
  .fx-hero .k { font-size: 10px; } .fx-hero .big { font-size: 30px; margin-top: 10px; } .fx-hero .sub { font-size: 20px; }
  .editor fieldset { padding-left: 16px; padding-right: 16px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  input[type=text], input[type=number], textarea, select { font-size: 16px; } /* iOS 小于 16px 会自动放大页面 */
  button { min-height: 34px; }
  .mt-panel { max-width: calc(100vw - 16px); }
  #tipPop { max-width: calc(100vw - 24px); }
  .m-pvtog { display: inline-flex !important; }
}
.m-pvtog { display: none; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
