/* Original artwork is reused intact. Browser layouts remain responsive and keyboard accessible. */
:root{--bg:#11131e;--panel:#202037;--panel-2:#292943;--line:#796d4b;--gold:#ffe4a0;--gold-muted:#b39b5e;--text:#f5eacf;--muted:#c0b79c;font-family:"Microsoft YaHei",sans-serif;font-size:15px}
body{background:#0c0d15}
button,select,input{border-radius:1px}
button{background:linear-gradient(#38384f,#202037);border:1px solid #a58e55;box-shadow:inset 0 0 0 1px #111322;color:#fff0bf;min-height:38px}
button:hover{background:#49415a;border-color:#ffe4a0}
button:disabled{opacity:.5;box-shadow:none}
select,input[type=number]{background:#141524;color:var(--text);border:1px solid #988356;padding:8px}
.app{max-width:none;padding:0 12px 0;height:100dvh}
.topbar{min-height:64px;padding:8px 4px;gap:16px;border-bottom:3px double #9b8554;background:#191a2b}
.brand strong{font-size:23px}.brand small{font-size:11px;color:#ceba80}.brand-seal{height:42px;width:38px;background:#6d2020}
.scenario-controls select{background:#151725;border-color:#8a7750;border-radius:0;padding:7px;min-width:100px}
.calendar>span{font-size:20px}.calendar small{font-size:11px}
.session-bar{padding:7px 4px;min-height:42px;font-size:12px;border-bottom:1px solid #63583d}
.system-menu{position:relative;flex-shrink:0;z-index:20}
.system-menu>summary{cursor:pointer;list-style:none;padding:8px 18px;color:#ffe6a1;background:#302b3d;border:1px solid #a18a51;min-width:150px;text-align:center}
.system-menu>summary::after{content:" ▾"}
.system-menu>div{position:absolute;right:0;top:100%;width:270px;display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important;background:#1c1b2e;padding:12px;border:2px ridge #b59a5d;box-shadow:0 10px 25px #000b}
.system-menu button{min-height:40px;font-size:13px}
.play-guide{margin:0;padding:9px 14px;background:#343044;color:#ffedba;border-bottom:1px solid #897348;font-size:13px;line-height:1.6;flex-shrink:0}
.play-guide::before{content:"军师提示　";color:#f6cf74;font-weight:bold}
.campaign-controls{padding:8px 4px;gap:8px}
.campaign-controls strong{padding:5px 12px;border-left:4px solid #c3a05a;font-size:15px}
.campaign-controls button{font-size:13px}
#end-domestic,#manual-battle,#world-play{background:#5b332d;border-color:#c49a5f;color:#fff1bb}
.workspace{grid-template-columns:minmax(0,1fr) 360px;gap:10px;padding:10px 0 5px}
.map-panel,.inspector{border:3px ridge #a08c57;border-radius:0;background:#191b2d}
.map-heading{padding:7px 14px;background:#222238;border-bottom:2px ridge #8b784e}
.eyebrow{font-size:12px;letter-spacing:2px}.map-heading h1{font-size:23px}
.map-wrap{background:#101723}
.map-footer{background:#222238;border-color:#8b784e;font-size:12px}
.map-summary{font-size:12px}.map-options{background:#181d2ae8;border-radius:0}
.map-toolbar button{background:#242339e8;border-radius:0}
.inspector-top{padding:10px 12px 0;background:#272338}
.search{border-radius:0;background:#121422;border-color:#796a49}
.tabs button{font-size:15px;padding:10px 8px}
.detail{padding:16px 14px;background:linear-gradient(#202036ee,#181b2bf5)}
.city-title h2{font-size:32px;color:#ffe4a0}.city-title{margin-bottom:12px}
.stat-grid{border-radius:0;margin-bottom:12px;border-color:#88754a}.stat{background:#2d2b41;padding:10px}.stat small{font-size:12px;color:#d2c8ae}.stat strong{font-size:21px}
.section-heading{font-size:15px;color:#ffe1a1;border-bottom:2px ridge #927c4b;margin-top:16px}
.list-button{background:#27283d;border-radius:0;border-color:#57506a}
.list-button strong{font-size:15px}.list-button small{font-size:12px}.portrait{border-radius:0;image-rendering:pixelated}
.general-hero .portrait{width:80px;height:100px;object-fit:contain}.chip{background:#302d40;font-size:12px}
.actor-select{font-size:13px}.actor-select select{font-size:14px;border-radius:0;background:#191a2c;border-color:#9b8651}
.action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.action-grid button{font-size:15px;min-height:42px}
.notice,.action-result{font-size:13px;line-height:1.7;background:#181b2b;color:#ded0ae}.notice{border-color:#b59755}
.inspector-foot{background:#232337;color:#bfb59b;font-size:11px}
.page-footer{font-size:10px;min-height:24px}.campaign-journal{padding:5px 12px;font-size:12px}.campaign-journal[open]{max-height:25vh;overflow:auto}
.new-game{border:4px ridge #b99a59;border-radius:0;background:linear-gradient(#181523df,#181523ee),url('assets/images/shape/menu/titlebg2.png') center/cover;color:#f5eacf;box-shadow:0 15px 80px #000c;padding:22px}
.new-game::backdrop{background:#070812cf;backdrop-filter:none}
.new-game h1,.new-game h2{font-family:KaiTi,STKaiti,serif;color:#ffe7a6}
.new-game p{color:#d6ccb5}.new-game header{border-color:#a08a56}
.new-game[data-step="0"]{width:min(960px,96vw);aspect-ratio:4/3;max-height:94dvh;background:url('assets/images/shape/menu/titlebg.png') center/100% 100% no-repeat;padding:0;overflow:hidden}
.new-game[data-step="0"] header,.new-game[data-step="0"] #new-game-content>p,.new-game[data-step="0"] footer{display:none}
.new-game[data-step="0"] #new-game-content{position:absolute;inset:0;display:block}
.new-game[data-step="0"] #new-game-content>button{position:absolute;top:36.875%;left:30.156%;width:20%;height:7.292%;min-height:0;padding:0;margin:0;border:0;box-shadow:none;background:url('assets/images/shape/menu/main01a.png') center/100% 100%;color:transparent;text-shadow:none}
.new-game[data-step="0"] #new-game-content>button:nth-child(2){left:51.563%;top:37.292%;width:19.531%;height:6.875%;background-image:url('assets/images/shape/menu/main02a.png')}
.new-game[data-step="0"] #new-game-content>button:nth-child(3){top:44.167%;left:30.938%;background-image:url('assets/images/shape/menu/main03a.png')}
.new-game[data-step="0"] #new-game-content>button:nth-child(4){top:44.167%;left:51.563%;width:19.531%;height:6.875%;background-image:url('assets/images/shape/menu/main04a.png')}
.new-game[data-step="0"] #new-game-content>button:hover{background-image:url('assets/images/shape/menu/main01b.png')}
.new-game[data-step="0"] #new-game-content>button:nth-child(2):hover{background-image:url('assets/images/shape/menu/main02b.png')}
.new-game[data-step="0"] #new-game-content>button:nth-child(3):hover{background-image:url('assets/images/shape/menu/main03b.png')}
.new-game[data-step="0"] #new-game-content>button:nth-child(4):hover{background-image:url('assets/images/shape/menu/main04b.png')}
.new-game[data-step="0"] #new-game-error{position:absolute;bottom:13%;left:15%;right:15%;background:#220c0ce8}
.king-grid button{display:flex;align-items:center;gap:12px;min-height:72px}
.king-grid .portrait{width:48px;height:60px;object-fit:contain}.king-grid strong,.king-grid small{display:block}.king-grid strong{font-size:19px;color:#ffe7a6}.king-grid small{font-size:12px;margin-top:5px;color:#c9bea4}
.manual-battle-dialog{background:#161727;border:4px ridge #a38e54;color:#f5eacf;padding:14px}
.manual-battle-dialog h2{font-family:KaiTi,serif;font-size:25px;color:#ffe1a1}
.battle-toolbar{justify-content:flex-end;border-bottom:1px solid #83744d;padding-bottom:8px}
.battle-stats{background:#21213b;border:3px ridge #ad9457;color:#f9e8af;padding:12px}
.battle-commands,.battle-skills{padding:8px;background:#22233b;border:2px ridge #9f8953;gap:6px}
.battle-commands button,.battle-skills button{font-size:14px;min-height:38px;padding:6px 12px}
.battle-skills::before{content:"武将技";font-family:KaiTi,serif;font-size:20px;color:#ffdc8e;margin-right:10px}
.battle-play-guide{font-size:12px;line-height:1.6;color:#d8c9a7;margin:4px 0}
.battle-body>label{padding:10px;background:#25243c;border-left:3px solid #b69c60}
.battle-body>label select{margin-left:auto;max-width:75%}
.battle-dialogue{background:#181c36f5;border:4px ridge #ad9254;border-radius:0}
.classic-dialogue{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;background:#0009;padding:24px;box-sizing:border-box}
.classic-dialogue[open]{display:flex;align-items:flex-end;justify-content:center}
.classic-speech{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;width:min(820px,100%);padding:20px;background:#1c2036f5;color:#fff0c2;border:5px ridge #b89c5d;box-shadow:0 8px 40px #000;font:19px/1.8 KaiTi,STKaiti,serif}
.classic-speech .portrait{width:90px;height:112px;object-fit:contain;grid-row:1/4}
.classic-speech strong{font-size:23px;color:#ffe09b}.classic-speech button{justify-self:end;grid-column:2;font:16px "Microsoft YaHei",sans-serif}
.prisoner-portrait{width:96px;height:120px;object-fit:contain;image-rendering:pixelated;border:3px ridge #b89c5d;float:left;margin:0 18px 18px 0}
.classic-dialogue-panel{display:flex;align-items:center;gap:18px;width:min(960px,100%);min-height:210px;padding:22px;background:#151729f5 url('assets/images/shape/menu/d3_2a.png') center/100% 100% no-repeat;color:#fff0c2;box-shadow:0 8px 40px #000;font:20px/1.8 KaiTi,STKaiti,serif}
.classic-dialogue-portrait{flex:0 0 15%;display:grid;place-items:center}.classic-dialogue-portrait .portrait{width:90%;height:150px;object-fit:contain;border:0;background:transparent}
.classic-dialogue-speech{flex:1;min-width:0;padding:0 12px}.classic-dialogue-speaker{font-size:24px;color:#ffe09b}.classic-dialogue-continue{display:block;margin:12px 0 0 auto;font:15px "Microsoft YaHei",sans-serif}
.prisoner-card{display:flex;align-items:center;gap:20px;padding:20px;background:#191c31 url('assets/images/shape/menu/d12a.png') center/100% 100% no-repeat;min-height:150px}
.prisoner-card .portrait{width:14%;min-width:60px;height:100px;object-fit:contain;margin-right:20px;border:0;background:transparent}.prisoner-help{line-height:1.9;color:#e7d8b4}
body[data-phase="domestic"] .inspector::before{content:"";display:block;flex:0 0 130px;background:url('assets/images/shape/policy/palais01.png') center 52%/cover;border-bottom:3px ridge #a38e54}
.new-game[data-step="1"]{width:min(960px,96vw);aspect-ratio:4/3;max-height:94dvh;background:url('assets/images/shape/menu/titlebg2.png') center/100% 100%;padding:0;overflow:hidden}
.new-game[data-step="1"] header{display:none}
.new-game[data-step="1"] #new-game-content{position:absolute;top:19.167%;left:36.406%;width:27.188%;height:47.083%;display:block;padding:0;background:url('assets/images/shape/menu/c3_a.png') center/100% 100%}
.new-game[data-step="1"] #new-game-content>button{position:absolute;left:18.966%;top:24.779%;width:68.966%;height:13.274%;background:#100f16c9;border:0;box-shadow:none;text-align:center;min-height:0;padding:0;margin:0;font:clamp(11px,1.5vw,19px) KaiTi,STKaiti,serif;color:#ffe5a0}
.new-game[data-step="1"] #new-game-content>button:nth-child(2){top:40.708%}
.new-game[data-step="1"] #new-game-content>button:nth-child(3){top:56.637%}
.new-game[data-step="1"] #new-game-content>button:nth-child(4){top:72.566%}
.new-game[data-step="1"] #new-game-content>button:nth-child(5){top:88.496%}
.new-game[data-step="1"] #new-game-content>button:hover{background:#786238b9;color:white}
.new-game[data-step="1"] footer{position:absolute;bottom:3%;left:6%;right:6%;margin:0}
.new-game[data-step="1"] #new-game-error{position:absolute;bottom:13%;right:6%;max-width:36%}
.native-battle-hud{position:relative;display:block;flex-shrink:0;width:100%;height:190px;margin:0;background:#080b26 url('assets/images/shape/menu/war0d.png') center/100% 100% no-repeat;border:0;padding:0}
.native-combatant{position:absolute;top:0;bottom:0;width:43%;left:0;font-size:13px}
.native-combatant.enemy{left:auto;right:0}
.native-hud-portrait{position:absolute;left:1%;top:8%;width:37%;height:83%;display:block;overflow:hidden}
.native-hud-portrait .portrait{position:absolute;inset:0;width:100%;height:100%;max-height:100%;object-fit:contain;border:0;background:transparent}
.native-combatant.enemy .native-hud-portrait{left:auto;right:1%}
.native-hud-name{position:absolute;left:42%;top:3%;font:22px KaiTi,serif;color:#ffecb5;white-space:nowrap}
.native-combatant.enemy .native-hud-name{left:auto;right:42%}
.native-hud-hp,.native-hud-mp,.native-hud-soldiers,.native-hud-charge{position:absolute;left:47%;width:48%;white-space:nowrap;line-height:1.3;font-size:13px}
.native-combatant.enemy :is(.native-hud-hp,.native-hud-mp,.native-hud-soldiers,.native-hud-charge){left:auto;right:47%;text-align:right}
.native-hud-hp{top:38%}.native-hud-mp{top:56%}.native-hud-soldiers{top:74%}.native-hud-charge{top:87%}
.native-hud-hp progress,.native-hud-mp progress{display:block;width:100%;height:7px;accent-color:#c54d3e}
.native-hud-mp progress{accent-color:#5996d5}.native-hud-hp span,.native-hud-mp span{display:block;font-variant-numeric:tabular-nums}
.native-hud-time{position:absolute;top:73%;left:38%;width:24%;font-size:13px;text-align:center;color:#ffe3a0}
.native-selection-matchup{display:grid;grid-template-columns:1fr auto 1fr;gap:20px;padding:20px;background:#181b30;border:3px ridge #a28b56}
.native-selection-combatant{display:grid;grid-template-columns:80px 1fr;gap:8px 16px;align-items:center}
.native-selection-combatant .portrait{grid-row:1/3;width:80px;height:100px;object-fit:contain}
.native-selection-combatant strong{font:24px KaiTi,serif;color:#ffe1a1}
.native-selection-combatant p{margin:0;font-size:14px;line-height:1.8}
.native-selection-versus{align-self:center;font:34px KaiTi,serif;color:#e0b864}
.native-selection-help{color:#e8d7ac;line-height:1.8;padding:8px 12px;border-left:3px solid #ac9053}
@media(max-width:700px){.native-battle-hud{height:165px}.native-hud-name{font-size:17px}.native-hud-hp,.native-hud-mp,.native-hud-soldiers,.native-hud-charge,.native-hud-time{font-size:10px}.native-hud-portrait .portrait{width:95%}.native-selection-matchup{gap:8px;padding:10px}.native-selection-combatant{display:flex;flex-direction:column;align-items:flex-start}.native-selection-combatant .portrait{width:60px;height:75px}.native-selection-combatant strong{font-size:20px}.native-selection-combatant p{font-size:12px}}
@media(max-height:1000px) and (min-width:761px){body[data-phase="domestic"] .inspector::before{display:none}.detail{padding-top:12px}.section-heading{margin-top:12px}}
@media(max-width:600px){
 .new-game[data-step="0"]{min-height:400px;aspect-ratio:auto;background-size:auto 100%;background-position:center}
 .new-game[data-step="0"] #new-game-content{inset:38% 10% auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#15203be8;padding:12px}
 .new-game[data-step="0"] #new-game-content>button:nth-child(n){position:static;width:auto;height:auto;min-height:44px;font-size:14px;color:#fff0bc;background:#26324b;border:1px solid #b59b5e}
 .new-game[data-step="0"] #new-game-content>button:nth-child(n):hover{background-image:none}
 .new-game[data-step="1"]{min-height:480px;aspect-ratio:auto;padding:20px}
 .new-game[data-step="1"] #new-game-content{position:static;width:100%;height:auto;display:grid;gap:10px;background:#191727dc;padding:15px;margin:35px 0 75px}
 .new-game[data-step="1"] #new-game-content>button:nth-child(n){position:static;width:100%;height:auto;min-height:48px;font-size:19px;border:1px solid #af955a;background:#242136}
 .new-game[data-step="1"] footer{bottom:15px;left:20px;right:20px}
 .classic-dialogue-panel{gap:8px;min-height:190px;font-size:17px;padding:16px 10px}
 .classic-dialogue-portrait{flex-basis:18%}.classic-dialogue-portrait .portrait{height:85px}
}
@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr) 310px}.topbar{gap:8px}.brand small{display:none}.scenario-controls{gap:8px}.scenario-controls label{font-size:11px}.calendar{min-width:75px;padding-left:8px}.play-guide{font-size:12px}}
@media(max-width:760px){body{overflow:auto}.app{height:auto;min-height:100dvh}.workspace{display:flex;flex-direction:column}.topbar{flex-wrap:wrap}.scenario-controls{order:4}.map-panel{height:50dvh;min-height:320px}.session-bar{flex-direction:row;align-items:center}.session-bar>span{font-size:11px}.system-menu>div{width:260px}.system-menu>summary{padding:8px;font-size:12px;min-width:130px}.detail{overflow:visible}.play-guide{padding:9px}.king-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.king-grid button{gap:6px;padding:7px}.king-grid .portrait{width:36px;height:48px}.classic-dialogue{padding:10px}.classic-speech{padding:12px;grid-template-columns:64px minmax(0,1fr);font-size:17px}.classic-speech .portrait{width:60px;height:80px}.new-game[data-step="0"]{width:96vw}}
