/* Warlord command screen: a visual layer, no game rules or save changes. */
:root{--war-gold:#d7b778;--war-dark:#1c2028;--war-red:#843c30}
.site-wrap{background:transparent!important}
#app>.topline{color:#e6d4ae!important;border-bottom:1px solid #a78b564d}
.game-layout>article{border:1px solid #b99c62;background:var(--surface);padding:18px;box-shadow:0 12px 40px #0005;min-width:0}
.chapter-head{position:relative;isolation:isolate;min-height:156px!important;margin:-18px -18px 0!important;padding:28px 26px!important;background:linear-gradient(90deg,#0a1819eb,#1e222a88 60%,#1c202855),url('assets/scene-battle.jpg') center 43%/cover!important;border-bottom:3px solid #bb9857;overflow:hidden;color:#f8e9c7!important;display:flex!important;align-items:center!important}
.chapter-head:before{content:'三 國 志';position:absolute;right:22px;top:8px;font:900 62px/1.5 var(--serif);color:#ead29d1c;z-index:-1;pointer-events:none}
.chapter-head:after{content:'';position:absolute;inset:8px;border:1px solid #d6b97b55;pointer-events:none}
.chapter-head h2{color:#fff0d2!important;font:800 25px/1.3 var(--serif)!important;text-shadow:0 2px 8px #000}
.chapter-head .age-number{font:800 54px/1 var(--serif)!important;color:#e4c280!important}.chapter-head>span:last-child{font:700 18px var(--serif);color:#ead6ac}
.game-layout>article>.progress{height:5px!important;background:#2e323a!important;margin:0 -18px 14px!important}.game-layout>article>.progress>div{background:linear-gradient(90deg,#7c382d,#dfbb71)!important}
.faction-theme-banner{position:relative;background:linear-gradient(110deg,#21252de8,#282c34d9),url('assets/scene-council.jpg') center/cover!important;border:1px solid #bea16b!important;border-top:4px solid var(--faction-accent,#ba985a)!important;box-shadow:0 8px 22px #0004!important;border-radius:2px!important;color:#f2dfb7!important}
.faction-theme-banner .faction-banner-title strong,.faction-theme-banner .faction-banner-office strong{color:#fff0d0!important;font-family:var(--serif)}.faction-theme-banner .faction-banner-title p,.faction-theme-banner .faction-banner-kicker,.faction-theme-banner .faction-banner-office>span{color:#ddc89f!important}
.choice-category-tabs{padding:8px!important;gap:6px!important;background:#22262e!important;border:1px solid #b29661!important;border-radius:2px!important;box-shadow:inset 0 0 0 3px #c9a97017!important}
.choice-category-tabs [role="tab"]{position:relative;border:1px solid #8f7a54!important;border-radius:0!important;color:#efdfbe!important;background:linear-gradient(#43474f,#2f333b)!important;font-weight:700;min-height:48px;text-shadow:0 1px 2px #0006}
.choice-category-tabs [role="tab"][aria-selected="true"]{background:linear-gradient(#a4523b,#723226)!important;color:#fff6de!important;border-color:#f0cb82!important;box-shadow:inset 0 0 0 3px #e9c48230!important}
.choice-subtabs{border-bottom:2px solid #aa8b55;padding-bottom:6px!important}.choice-subtab[aria-selected="true"]{background:#30343c!important;color:#f9e5b7!important;border-color:#a68b54!important}
.routine-choice-card,.choices .choice[data-choice]{border-radius:2px!important}
.routine-choice-card{border:1px solid #af9668!important;background:var(--surface)!important;box-shadow:3px 4px 0 #7f673b19!important}
.choices .choice[data-choice]:not(:disabled){background:linear-gradient(110deg,#b79d6515,transparent 80%)!important;border-left:5px solid #92713a!important}
.choices .choice[data-choice] .choice-num{border-radius:0!important;background:#32363e!important;color:#f4dfaa!important;border:1px solid #b99a60!important;font-family:var(--serif)!important;box-shadow:inset 0 0 0 3px #d1ad6418}
.choices .choice[data-choice] .choice-arrow{border-radius:3px!important;background:#74372b!important;color:#f7e3b5!important;border-color:#bb985f!important}
.choices .choice[data-choice]:disabled{background:#7a7e8612!important;border-color:#8e929a!important;border-left:5px solid #787c84!important;box-shadow:none!important}
.annual-action-slots{gap:8px!important}.annual-action-slot{border-radius:2px!important;border-top:3px solid #aa8950!important;box-shadow:inset 0 0 0 2px #b2945c13}
@media(min-width:801px){
.game-layout{grid-template-columns:270px minmax(0,1fr)!important;gap:24px!important;align-items:start!important}
.game-layout>.character-panel{display:block!important;background:linear-gradient(180deg,#2e323a,#1b1f27)!important;border:1px solid #c7a970!important;padding:18px!important;color:#f1e3c4!important;box-shadow:0 12px 30px #0005!important}
.character-panel .character-identity{display:flex!important;flex-direction:column!important;align-items:center!important;gap:7px!important;text-align:center!important;padding-bottom:14px!important;border-bottom:1px solid #a58a58!important}
.character-panel .character-identity>.character-portrait{float:none!important;order:-1;width:100%!important;max-width:230px!important;margin:0 0 8px!important;padding:5px!important;background:#171b23!important;border:3px double #dfbf7a!important}
.character-panel .character-portrait img{width:100%!important;height:auto!important;aspect-ratio:1!important;object-fit:cover!important;filter:none!important}
.character-panel .char-name{color:#ffe6a7!important;font:800 29px/1.3 var(--serif)!important}.character-panel .char-label,.character-panel .char-title,.character-panel .courtesy-name,.character-panel .character-origin{color:#e0d0ac!important}.character-panel .stat-row,.character-panel .health-line{color:#f1e2c0!important}.character-panel .stat-track{background:#ffffff20!important}.character-panel .stat-fill{background:linear-gradient(90deg,#a68449,#edcf89)!important}.character-panel .text-button{color:#f2dca8!important}.character-panel .character-portrait .text-button{background:#41454d!important}.character-panel .birth-identity,.character-panel .trait-identity{color:var(--ink)}
}
@media(max-width:800px){
.game-layout>article{padding:10px;border-radius:3px}.chapter-head{min-height:88px!important;margin:-10px -10px 0!important;padding:14px 16px!important}.chapter-head h2{font-size:17px!important}.chapter-head .age-number{font-size:34px!important}.chapter-head:before{font-size:36px;right:14px}.chapter-head>span:last-child{font-size:13px}.game-layout>article>.progress{margin:0 -10px 10px!important}.choice-category-tabs{padding:5px!important;gap:4px!important}.choice-category-tabs [role="tab"]{min-height:42px;font-size:12px!important}.character-mobile-summary{background:linear-gradient(110deg,#30343c,#20242c);border:1px solid #c4a66b;padding:10px;color:#f4e2ba}.character-mobile-summary strong,.character-mobile-summary .text-button,.character-brief-stats{color:#f4e2ba!important}.character-brief-portrait{border:2px solid #dfbd78!important;box-shadow:0 3px 10px #0005}.character-brief-heading>div>span{color:#dfd4b7!important}
}
:root[data-color-mode="dark"] .game-layout>article{background:#1e222a!important}
.choice-category-tabs .choice-jump-heading,.choice-category-tabs .choice-jump-heading strong{color:#eedbb0!important}
.focus-play-stage{border:2px solid #bda06a!important;border-radius:3px!important;box-shadow:0 20px 80px #0009!important}
.focus-play-head{background:linear-gradient(90deg,#21252ded,#343840c9),url('assets/scene-battle.jpg') center/cover!important;color:#f7e4b8!important;border-bottom:2px solid #b79556!important}
.focus-play-head button{background:#3b3f47!important;color:#fff0cf!important;border:1px solid #b59862!important;border-radius:3px!important}.focus-play-identity strong{font-family:var(--serif);color:#ffedbf!important}
.focus-play-story{background:linear-gradient(140deg,#b1946012,transparent),var(--surface-inset)!important;border-right:2px solid #a78b55!important}.focus-play-story .event-top{border:2px solid #b69a63;box-shadow:0 5px 12px #0002}.focus-play-story .event-title{border-left:4px solid #9b4635;padding-left:10px}
.focus-choice-option{border-radius:2px!important;border-left:4px solid #ac8c51!important;box-shadow:inset 0 0 0 2px #b8985b12!important}.focus-choice-option[aria-pressed="true"]{background:#f2e5ca!important;color:#352e20!important;border:2px solid #a18146!important;border-left:5px solid #8d392c!important}
.focus-play-footer{background:#252931!important;border-top:2px solid #aa8c54!important}.focus-play-footer .annual-action-slot{background:#eceddf!important;color:#2f333b!important}
:root[data-color-mode="dark"] .focus-choice-option[aria-pressed="true"]{background:#3a3e46!important;color:#ffe9bc!important}
@media(max-width:800px){.character-mobile-summary .character-brief-stats b,.character-mobile-summary .character-brief-health b,.character-mobile-summary .character-brief-stats span{color:#fff0c9!important}.character-mobile-summary .character-brief-health{color:#dcc99d!important}}
/* Atlas and archive use the command-screen materials without changing mobile geometry. */
.atlas-page-title,#app:has(.hall-intro)>.page-title{color:#f5e3bd!important;text-shadow:0 2px 8px #0008}
.atlas-page-title .page-title{color:#f5e3bd!important}.atlas-page-title .page-description,.atlas-page-title>.text-button{color:#dfcda8!important}
.atlas-card,.conquest-card.illustrated-map{border:1px solid #bea16b!important;border-radius:3px!important;box-shadow:0 8px 25px #0005,inset 0 0 0 3px #d1ad621c!important;overflow:hidden}
.atlas-heading,.conquest-heading{background:linear-gradient(110deg,#23272f,#3a3e46)!important;color:#f5e1b5!important;border-bottom:2px solid #b49456!important}
.atlas-heading strong,.atlas-heading span,.conquest-heading h2,.conquest-heading h3,.conquest-heading strong,.conquest-heading span{color:#f5e1b5!important}
.atlas-stage,.conquest-stage{box-shadow:inset 0 0 0 4px #9d814335!important}
.atlas-controls,.conquest-controls{border-color:#b49660!important;background:#2a2e36!important;color:#f8e6bd!important}.atlas-controls button,.conquest-controls button{color:#f8e6bd!important;background:#393d45!important;border-color:#ad905c!important}
.atlas-legend{border-top:1px solid #ad905d!important;background:var(--surface-inset)!important}
.atlas-region-summary,.conquest-detail{border:1px solid #b49966!important;border-radius:3px!important;box-shadow:inset 0 0 0 3px #bca06814,0 4px 12px #0002!important;background-image:linear-gradient(115deg,#b99b6010,transparent)!important}
.region-chip{border-radius:3px!important;border-color:#a38c62!important}.region-chip.active{background:#74392d!important;color:#fff1d0!important;border-color:#c9a66a!important}
.hall-intro{position:relative;isolation:isolate;background:linear-gradient(100deg,#22262ef5,#30343cce),url('assets/scene-court.jpg') center 42%/cover!important;color:#f4e0b7!important;border:1px solid #c5a56a!important;border-radius:3px!important;box-shadow:inset 0 0 0 4px #c6a76b20,0 6px 20px #0004!important}
.hall-intro h2,.hall-intro .honor-score strong{color:#ffe7ae!important;font-family:var(--serif)}.hall-intro p,.hall-intro .eyebrow,.hall-intro .hall-muted,.hall-intro .honor-score>span{color:#dfccaa!important}
.hall-intro:after{content:'英雄榜';position:absolute;right:15%;top:50%;transform:translateY(-50%);font:900 58px/1 var(--serif);color:#dfbd7415;z-index:-1;pointer-events:none}
.hall-actions>.secondary,.hall-field-help .text-button{color:#f5e4bf!important;background:#33373f!important;border:1px solid #a58b59!important}.hall-field-help .text-button{padding-inline:8px}
.hall-card{border-radius:3px!important;box-shadow:inset 0 0 0 3px #b99b5c15,0 4px 12px #0002!important}.hall-card .hall-face{border:2px solid #ba9c61!important;box-shadow:0 2px 7px #0003}.hall-stat-panel{border-color:#b39a68!important;background-image:linear-gradient(135deg,#b59b5e14,transparent)!important}.hall-stat-panel>span{color:var(--ink);border-bottom-color:#b59a65!important}.hall-stat-row i>b{background:linear-gradient(90deg,#80764d,#bda563)!important}
.hall-card.hall-rank-gold{box-shadow:inset 0 0 0 3px #fff3cb,inset 0 0 0 4px #c5985366,0 5px 18px #b88c3440!important}.hall-card.hall-rank-purple{box-shadow:inset 0 0 0 3px #f6edff,inset 0 0 0 4px #9d7ac466,0 5px 18px #895dbd30!important}
@media(max-width:600px){.hall-intro:after{font-size:32px;right:28%}.atlas-card,.conquest-card.illustrated-map,.hall-card{box-shadow:inset 0 0 0 2px #b99b5c13,0 2px 6px #0002!important}.hall-field-help .text-button{padding-block:6px}}
#career-personnel>.choice-subtabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}#career-personnel>.choice-subtabs .choice-subtab{min-width:0;padding-inline:5px;white-space:nowrap}#career-personnel>.personnel-subpanel{margin-top:8px}#career-personnel>.personnel-subpanel>.personnel-review,#career-personnel>.personnel-subpanel>.career-transfer{margin:0;grid-column:1/-1;min-width:0}#career-personnel>.personnel-subpanel[hidden]{display:none!important}
@media(max-width:600px){#career-personnel>.choice-subtabs .choice-subtab{font-size:11px;letter-spacing:-.04em;gap:3px;padding-inline:3px}}
#career-recruitment>.choice-subtabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}#career-recruitment>.choice-subtabs .choice-subtab{white-space:nowrap;min-width:0;padding-inline:5px}#career-recruitment>.choice-tab-panel>.recruitment-review,#career-recruitment>.choice-tab-panel>.scouting-review{margin-top:8px}.recruitment-tab-empty{padding:14px;border:1px solid var(--line);color:var(--muted);font-size:12px}
@media(max-width:600px){#career-recruitment>.choice-subtabs .choice-subtab{font-size:12px;gap:4px;letter-spacing:-.02em}}
/* Keep nested recruitment navigation compact on phones only. */
@media(max-width:600px){
 #career-management.choice-tab-panel{margin-block:6px}
 #career-management>.career-management-content:not(:has(*)){display:none}
 #career-management>.choice-subtabs{margin-bottom:5px;padding:4px!important}
 #career-recruitment{padding-block:0!important;margin-block:0!important}
 #career-recruitment>.choice-subtabs{margin-block:0 5px;padding:4px!important}
 #career-recruitment>.choice-subtabs .choice-subtab{min-height:36px;padding-block:6px}
 #career-recruitment>.choice-tab-panel{margin-block:0;padding-block:0}
 #career-recruitment>.choice-tab-panel>.recruitment-review,
 #career-recruitment>.choice-tab-panel>.scouting-review{margin-block:0}
 #career-recruitment .recruitment-tab-empty{margin:0;padding:9px 10px}
}
@media(max-width:600px){#career-management>.career-management-content{padding:0}}
/* Square command tabs: jade main menu, blue category, plum detail. */
.choice-subtabs{--tier-base:#223c50;--tier-end:#182b3b;--tier-selected:#416982;--tier-selected-end:#2d5068;--tier-border:#8da7b8;border-radius:0!important;background:#142633!important;border-color:#728b9a!important}
.choice-tab-parent .choice-tab-parent>.choice-subtabs{--tier-base:#49364f;--tier-end:#302737;--tier-selected:#795c7e;--tier-selected-end:#5a415f;--tier-border:#b9a0bc;background:#2b2130!important;border-color:#96809b!important}
.choice-subtabs .choice-subtab{border-radius:0!important;background:linear-gradient(var(--tier-base),var(--tier-end))!important;color:#f2e9d6!important;border:1px solid var(--tier-border)!important;font-weight:700;text-shadow:0 1px 2px #0006;box-shadow:none!important}
.choice-subtabs .choice-subtab[aria-selected="true"]{background:linear-gradient(var(--tier-selected),var(--tier-selected-end))!important;color:#fff4d9!important;border-color:#eed095!important;box-shadow:inset 0 -3px 0 #dfbb74,inset 0 0 0 2px #e7cf9e20!important}
.choice-subtabs .choice-tab-count{color:inherit;background:#ffffff16;border-radius:2px}
/* Result screens keep the action outcome separate from optional world reports. */
.result-world-details{margin-block:12px;padding:0!important}
.result-world-details>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;cursor:pointer;font-weight:700;color:var(--ink)}
.result-world-details>summary b{font-size:11px;white-space:nowrap;color:var(--muted)}
.result-world-details>.world-result-entry{margin:0 12px;padding:10px 0}
.result-world-details>.world-result-entry>summary{cursor:pointer;font-weight:700;font-size:13px}
@media(max-width:600px){.result-world-details>summary{padding:10px;font-size:12px}.result-world-details>.world-result-entry{margin-inline:10px}}
.result-narrative-details{margin:10px 0;border:1px solid var(--line);background:var(--surface-inset)}
.result-narrative-details>summary{padding:10px 12px;font-size:12px;font-weight:700;cursor:pointer;color:var(--ink)}
.result-narrative-details>h3,.result-narrative-details>p{margin:10px 12px;font-size:13px;line-height:1.6}
/* Light mode character information uses opaque paper, never dark-panel text colors. */
:root:not([data-color-mode="dark"]) .game-layout>.character-panel{background:#f5f3ea!important;color:#2f333b!important;--ink:#2f333b;--muted:#5a5e66;--red:#813e30;--green:#4a4e56;--surface:#f5f3ea;--surface-inset:#e6eaf2;--light:#f5f3ea}
:root:not([data-color-mode="dark"]) .character-panel :is(.char-name,.char-label,.char-title,.courtesy-name,.character-origin,.stat-row,.health-line,.birth-identity,.trait-identity,.origin-trait){color:#2f333b!important;text-shadow:none!important}
:root:not([data-color-mode="dark"]) .character-panel :is(.birth-identity,.trait-identity,.origin-trait,.income-panel){background:#f5f3ea!important}
:root:not([data-color-mode="dark"]) .character-panel :is(.birth-identity,.trait-identity,.origin-trait,.income-panel) :is(p,small,span){color:#5a5e66!important}
:root:not([data-color-mode="dark"]) .character-panel :is(.birth-identity,.trait-identity,.origin-trait,.income-panel) strong{color:#2f333b!important}
:root:not([data-color-mode="dark"]) .character-panel .text-button{color:#4a4e56!important}
:root:not([data-color-mode="dark"]) .character-panel .character-portrait .text-button{background:#e6eaf2!important;color:#2f333b!important}
:root:not([data-color-mode="dark"]) .character-panel .ability-radar{background:#e6eaf2!important}
:root:not([data-color-mode="dark"]) .character-panel .ability-radar :is(figcaption,figcaption strong,p){color:#3e424a!important}
:root:not([data-color-mode="dark"]) .character-panel :is(.radar-label,.radar-number){fill:#3e424a!important}
:root:not([data-color-mode="dark"]) .character-panel .stat-track{background:#d5d9e1!important}
:root:not([data-color-mode="dark"]) .character-panel .stat-fill{background:linear-gradient(90deg,#595d65,#848890)!important}
:root:not([data-color-mode="dark"]) .character-mobile-summary .text-button{color:#f4e2ba!important}
/* Quiet woven backdrop; no full-page illustration. */
body{background-color:#e3e7ef!important;background-image:repeating-linear-gradient(45deg,transparent 0 22px,#787c8409 22px 23px),repeating-linear-gradient(-45deg,transparent 0 22px,#787c8409 22px 23px),radial-gradient(ellipse at top,#f6f3e8,#dde1e9 80%)!important;background-size:auto!important;background-attachment:fixed!important}
:root[data-color-mode="dark"] body{background-color:#151921!important;background-image:repeating-linear-gradient(45deg,transparent 0 22px,#c4ab6c08 22px 23px),repeating-linear-gradient(-45deg,transparent 0 22px,#c4ab6c08 22px 23px),radial-gradient(ellipse at top,#32363e,#151921 80%)!important}
:root:not([data-color-mode="dark"]) #app>.topline,:root:not([data-color-mode="dark"]) .atlas-page-title,:root:not([data-color-mode="dark"]) .atlas-page-title .page-title,:root:not([data-color-mode="dark"]) #app:has(.hall-intro)>.page-title{color:#41454d!important;text-shadow:none!important}
/* Brocade command banners keep the existing card geometry. */
.choices .choice[data-choice]:not(:disabled){background:linear-gradient(110deg,#e3e7ef,#eff0de 70%,#dadee6)!important;border:1px solid #9a8453!important;border-left:5px solid #767a82!important;box-shadow:inset 0 0 0 3px #faf2d94d,0 3px 7px #21252d1a!important}
:root[data-color-mode="dark"] .choices .choice[data-choice]:not(:disabled){background:linear-gradient(110deg,#3a3e46,#31353d 70%,#41454d)!important}
.choices .choice[data-choice] .choice-arrow{position:relative;display:flex!important;align-items:center!important;justify-content:center!important;flex-shrink:0!important;width:34px!important;min-width:34px!important;height:44px!important;padding:0 0 5px!important;border:0!important;border-radius:0!important;clip-path:polygon(0 0,100% 0,100% 100%,50% 84%,0 100%);background:linear-gradient(90deg,#73342b,#a6533d 48%,#79382c)!important;color:#fff0c8!important;box-shadow:inset 3px 0 #d5b46b,inset -3px 0 #d5b46b,inset 0 3px #ebcd85!important;font-size:25px!important;line-height:1!important;text-shadow:0 1px 3px #30160d}
.choices .choice[data-choice]:disabled .choice-arrow{background:linear-gradient(90deg,#62666e,#797d85,#62666e)!important;box-shadow:inset 3px 0 #9b9fa7,inset -3px 0 #9b9fa7,inset 0 3px #b4b8c0!important}
.choices .choice[data-choice] .choice-num{background:linear-gradient(#474b53,#31353d)!important;border:3px double #cfb579!important;box-shadow:inset 0 0 0 2px #1b1f27!important;color:#ffe4a1!important}
@media(max-width:600px){.choices .choice[data-choice] .choice-arrow{width:28px!important;min-width:28px!important;height:36px!important;font-size:22px!important;padding-bottom:4px!important}}
.choices .choice[data-choice]:disabled .choice-arrow{font-size:10px!important;letter-spacing:-.06em;white-space:nowrap}
/* Separate battle replay control from the result date line. */
.result-box>.map-replay-open{display:block;width:max-content;max-width:100%;margin:0 0 14px!important}
.result-box>.map-replay-open+.event-eyebrow{display:block;margin-top:0}
/* Separate focus-mode instructions, cards and execution controls. */
.focus-choice-detail-pane>.focus-context-note,.focus-choice-detail-pane .story-choice-group>.focus-context-note{margin:0 0 12px!important;border:1px solid var(--line);border-radius:3px;background:var(--surface-inset)}
.focus-choice-detail-pane .focus-context-note>summary{padding:10px 12px!important;line-height:1.5}
.focus-choice-detail-pane .focus-context-note>p{margin:8px 12px!important;line-height:1.65}
.focus-choice-detail-pane .choices{margin-block:12px!important}
.focus-choice-detail-pane .routine-choice-detail>summary{padding-block:10px!important}
.focus-choice-detail-pane>.focus-context-note:last-child{margin-top:12px!important;margin-bottom:0!important}
.focus-choice-actions{padding-top:12px!important;border-top:1px solid var(--line);margin-top:10px!important}
.focus-play-footer{gap:10px!important;padding-block:12px!important}
.focus-play-footer .focus-crew-open{margin:0!important;min-height:36px;padding:8px 12px}
.focus-play-footer .focus-action-status{gap:8px!important}
@media(max-width:700px){.focus-choice-detail-pane .choices{margin-block:8px!important}.focus-choice-actions{padding-top:8px!important;margin-top:8px!important}.focus-play-footer{gap:8px!important;padding-block:10px!important}}
/* Personnel review: explicit paired surfaces and text for each color mode. */
.personnel-review{--promotion-ink:#33373f;background:#f4f2e8!important;color:#33373f!important}
.personnel-review .personnel-review-role{background:#e4e8f0!important;border-color:#a1a5ad!important;color:#33373f!important}
.personnel-review :is(h3,strong,p,small,summary,.personnel-review-state,.personnel-review-bonus){color:#3e424a!important;opacity:1!important}
.personnel-review-role>div>b{color:#744020!important;background:#fff5d5;padding:2px 7px;border-radius:3px;font-weight:800}
.personnel-review button{background:#41454d!important;color:#fff0ca!important;border-color:#ac965f!important}
.personnel-review button:disabled{background:#d6dae2!important;color:#575b63!important;opacity:1!important}
:root[data-color-mode="dark"] .personnel-review{--promotion-ink:#efe5ca;background:#242830!important;color:#efe5ca!important}
:root[data-color-mode="dark"] .personnel-review .personnel-review-role{background:#383c44!important;border-color:#8c9098!important;color:#efe5ca!important}
:root[data-color-mode="dark"] .personnel-review :is(h3,strong,p,small,summary,.personnel-review-state,.personnel-review-bonus){color:#e4ddc3!important}
:root[data-color-mode="dark"] .personnel-review-role>div>b{color:#ffe19a!important;background:#453c28!important}
/* Readable recruitment/transfer reviews, independent of inherited faction ink. */
:is(.recruitment-review,.career-transfer){--promotion-ink:#33373f;--promotion-muted:#595d65;background:#f4f2e8!important;color:#33373f!important}
:is(.recruitment-review-candidate,.career-transfer-candidate){background:#fdfaf0!important;color:#33373f!important;border-color:#a7abb3!important}
:is(.recruitment-review,.career-transfer) :is(h3,h4,p,small,summary,.personnel-review-state,.personnel-review-bonus,.career-transfer-chance-label){color:#484c54!important;opacity:1!important}
:is(.recruitment-review-candidate-heading,.career-transfer-candidate-heading)>strong{color:#713d22!important;background:#f7ebc6;border-radius:3px;padding:2px 7px}
:is(.recruitment-review-candidate-heading,.career-transfer-candidate-heading)>strong small{color:inherit!important}
.career-transfer :is(.promotion-office,.promotion-check){background:#e6eaf2!important;color:#33373f!important}
:is(.recruitment-review,.career-transfer) .is-missing,:is(.recruitment-review,.career-transfer) .career-transfer-warning,:is(.recruitment-review,.career-transfer) .recruitment-review-warning{color:#7b3427!important;background:#f4e2d9!important}
.career-transfer button.secondary{background:#41454d!important;color:#fff0ca!important;border-color:#ac965f!important}
:is(.recruitment-review,.career-transfer) button:disabled{opacity:1!important;background:#d6dae2!important;color:#50545c!important;border-color:#979ba3!important}
:root[data-color-mode="dark"] :is(.recruitment-review,.career-transfer){--promotion-ink:#efe5ca;--promotion-muted:#d4cfbb;background:#242830!important;color:#efe5ca!important}
:root[data-color-mode="dark"] :is(.recruitment-review-candidate,.career-transfer-candidate){background:#383c44!important;color:#efe5ca!important;border-color:#8c9098!important}
:root[data-color-mode="dark"] :is(.recruitment-review,.career-transfer) :is(h3,h4,p,small,summary,strong,b,.personnel-review-state,.personnel-review-bonus,.career-transfer-chance-label){color:#e8e1cc!important}
:root[data-color-mode="dark"] :is(.recruitment-review-candidate-heading,.career-transfer-candidate-heading)>strong{color:#ffe19a!important;background:#453c28!important}
:root[data-color-mode="dark"] .career-transfer :is(.promotion-office,.promotion-check){background:#383c44!important;color:#efe5ca!important}
:root[data-color-mode="dark"] :is(.recruitment-review,.career-transfer) :is(.is-missing,.career-transfer-warning,.recruitment-review-warning){color:#ffd2bb!important;background:#4a302a!important}
:root[data-color-mode="dark"] :is(.recruitment-review,.career-transfer) button:disabled{background:#3a3e46!important;color:#cfd3db!important}

/* Neutral interface foundation: allegiance retains its own faction variables. */
:root{--paper:#ecebe7;--light:#f6f4ee;--surface:#f6f4ee;--surface-raised:#ffffff;--surface-inset:#e6e8eb}
:root[data-color-mode="dark"]{--paper:#141820!important;--light:#202630!important;--ink:#eee9dd!important;--muted:#bcc2cb!important;--line:#505968!important;--surface:#202630;--surface-raised:#2b3340;--surface-inset:#181e28}
.header{background:linear-gradient(110deg,#181d27,#303846)!important}
:root[data-faction="free"]{--faction-banner:#303846!important;--faction-accent:#b69b67!important}
.header nav .nav-btn:not(.active){background:#303846!important}
.game-section-links .focus-mode-enter{background:linear-gradient(135deg,#414956,#222b39)!important}
.tab-year-context>summary{background:linear-gradient(100deg,var(--faction-banner,#303846),#2c323e)!important}

/* Shared controls stay neutral at every breakpoint; faction and feedback hues are separate. */
:root:not([data-color-mode="dark"]){--paper:#ecebe7!important;--light:#f6f4ee!important;--ink:#2c323c!important;--muted:#5c6370!important;--line:#bdc2ca!important}
:root:not([data-color-mode="dark"]) body{--ink:#2c323c;--muted:#5c6370}
.header nav{background:#242b36!important}
.primary,.prologue-actions .prologue-next,.yr-next-button,.life-finale>footer>.primary{background:linear-gradient(135deg,#414956,#252d39)!important;color:#fff0ce!important;border-color:#ad9563!important}
.creation-resume,.yr-mobile-summary,.yr-mobile-pages{background:#252d39!important;color:#eee5cf!important}

:root{--green:#465568} :root[data-color-mode="dark"] body{--green:#bac6d7}
:root:not([data-color-mode="dark"]) .ability-radar{background:#e6e8ec!important}
/* Experience reports are neutral panels; only semantic labels retain colour. */
.choice-report .experience-gain,.choice-report .forecast-fixed{background:#e5e8ee!important;border-color:#a9b2bf!important;color:#334155!important}
:root[data-color-mode="dark"] .choice-report .experience-gain,:root[data-color-mode="dark"] .choice-report .forecast-fixed{background:#29313f!important;border-color:#657185!important;color:#e1e6ef!important}
.atlas-pan-hint{background:#26303c!important;color:#f0e5cc!important}

@media(max-width:700px){.character-brief-heading>div{min-width:0;flex:1}.character-brief-heading .character-brief-birth{display:flex;align-items:center;gap:5px;font-size:10px!important;letter-spacing:-.04em;white-space:nowrap}.character-brief-birth>span+span{border-left:1px solid var(--line);padding-left:5px}.character-brief-heading .character-brief-career{font-size:10px!important}.character-brief-health{flex-shrink:0}}

/* Compact command ledger: three action seals alongside the year-end button. */
.focus-action-status>span{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:2px;border:1px solid #9c895f;background:linear-gradient(135deg,#354052,#242d3b);color:#f7e7bf;box-shadow:inset 0 0 0 2px #d5b47718}
.focus-action-status>span small{font-size:inherit;color:inherit}.focus-action-status>span b{color:#f5d18b;font-variant-numeric:tabular-nums}.focus-action-status>span.is-used{background:linear-gradient(135deg,#47403a,#302e30);border-color:#8c8069}.focus-action-status>span.is-used b{color:#cec5b4}
.focus-crew-open{width:100%;margin:0 0 10px!important;min-height:36px}
@media(max-width:700px){
.focus-play-footer:has(>.focus-action-status){display:grid!important;grid-template-columns:minmax(0,1fr) 94px;align-items:stretch;gap:5px!important;padding:7px 8px!important}
.focus-play-footer>.focus-action-status{grid-column:1;grid-row:1;width:100%;gap:4px!important}
.focus-play-footer>.focus-action-status>span{min-width:0;min-height:42px;flex-direction:column;gap:1px;padding:4px 1px;font-size:10px;line-height:1.25;white-space:nowrap}
.focus-play-footer>.focus-action-status>span b{font-size:12px}
.focus-play-footer>.focus-year-finish{grid-column:2;grid-row:1;width:100%!important;min-width:0;min-height:42px;padding:5px!important;font-size:11px!important;white-space:nowrap;border:1px solid #c6a66b;box-shadow:inset 0 0 0 2px #d9ba7a25}
.focus-play-footer>.focus-year-status{grid-column:1/-1;grid-row:2;margin:0;font-size:10px}
}
/* Three annual action seals, shared by full and focused play. */
.annual-action-slot,.focus-action-status>span{position:relative;isolation:isolate;overflow:hidden;--slot-face:#34465c;--slot-end:#202d3d;--slot-trim:#c9b17e;border:1px solid var(--slot-trim)!important;border-radius:3px!important;background:linear-gradient(130deg,var(--slot-face),var(--slot-end))!important;color:#f7edd8!important;box-shadow:inset 0 0 0 2px #0c14234d,inset 0 0 0 3px #d4bc7c30,0 2px 5px #10172324!important}
.annual-action-slot:nth-child(2),.focus-action-status>span:nth-child(2){--slot-face:#514057;--slot-end:#322a3d;--slot-trim:#c9afce}
.annual-action-slot:nth-child(3),.focus-action-status>span:nth-child(3){--slot-face:#5c4734;--slot-end:#3a3029;--slot-trim:#d4b386}
.annual-action-slot::before,.focus-action-status>span::before{content:'行';position:absolute;right:5px;top:50%;transform:translateY(-50%);font:900 34px/1 var(--serif);color:#f6dda323;pointer-events:none;z-index:-1}
.annual-action-slot:nth-child(2)::before,.focus-action-status>span:nth-child(2)::before{content:'政'}
.annual-action-slot:nth-child(3)::before,.focus-action-status>span:nth-child(3)::before{content:'緣'}
.annual-action-slot::after,.focus-action-status>span::after{content:'';position:absolute;inset:4px;pointer-events:none;border-top:1px solid #e7d4a54d;border-bottom:1px solid #e7d4a52e;z-index:-1}
.annual-action-slot strong,.annual-action-slot>span,.annual-action-slot small,.focus-action-status>span small{color:#f7edd8!important;text-shadow:0 1px 2px #0007}
.annual-action-slot.is-used,.focus-action-status>span.is-used{--slot-face:#393d44;--slot-end:#292d34;--slot-trim:#8e8a7d}
.annual-action-slot.is-used strong,.annual-action-slot.is-used>span,.focus-action-status>span.is-used small{color:#d4d1c9!important}
.focus-action-status>span b{color:#ffe1a2!important}.focus-action-status>span.is-used b{color:#c8c4ba!important}
@media(max-width:700px){.annual-action-slot::before{font-size:30px;right:3px}.focus-action-status>span::before{font-size:29px;right:2px}.annual-action-slot::after,.focus-action-status>span::after{inset:3px}}
/* A closed seal replaces the locked arrow, including legacy arrow text. */
.choices .choice[data-choice]:disabled .choice-arrow{font-size:0!important;line-height:1!important;display:flex!important;flex-direction:column;gap:1px;padding:0 0 5px!important;background:linear-gradient(90deg,#41434b,#62616a 50%,#41434b)!important;color:#eee0bf!important;box-shadow:inset 2px 0 #a99a77,inset -2px 0 #a99a77,inset 0 2px #c7b78d!important}
.choices .choice[data-choice]:disabled .choice-arrow::before{content:'閉'!important;position:static!important;transform:none!important;width:auto!important;height:auto!important;border:0!important;font:800 21px/1 var(--serif)!important;color:inherit!important}
.choices .choice[data-choice]:disabled .choice-arrow::after{content:'잠김';position:static;font:600 8px/1 var(--sans);letter-spacing:0;color:#e1d6bf}
@media(max-width:600px){.choices .choice[data-choice]:disabled .choice-arrow::before{font-size:18px!important}.choices .choice[data-choice]:disabled .choice-arrow::after{font-size:7px}}
/* Probability seals: cool ink surfaces, never a gold fill. */
.routine-success-rate,.focus-option-rate,.personnel-review-role>div>b,:is(.recruitment-review-candidate-heading,.career-transfer-candidate-heading)>strong{display:inline-flex!important;align-items:center;gap:4px;background:#e1e7ef!important;color:#293e58!important;border:1px solid #8393a9!important;border-radius:2px!important;padding:2px 5px!important;white-space:nowrap;box-shadow:inset 0 0 0 1px #ffffff80!important}
.routine-success-rate::before,.focus-option-rate::before,.personnel-review-role>div>b::before,:is(.recruitment-review-candidate-heading,.career-transfer-candidate-heading)>strong::before{content:'成';display:inline-flex;align-items:center;justify-content:center;flex:0 0 15px;width:15px;height:17px;border:1px solid currentColor;font:800 12px/1 var(--serif);color:inherit;opacity:.85}
:root[data-color-mode="dark"] :is(.routine-success-rate,.focus-option-rate,.personnel-review-role>div>b,.recruitment-review-candidate-heading>strong,.career-transfer-candidate-heading>strong){background:#29394e!important;color:#e2eaf5!important;border-color:#788da9!important;box-shadow:inset 0 0 0 1px #adc3e51c!important}
:root[data-color-mode="dark"] :is(.recruitment-review-candidate-heading,.career-transfer-candidate-heading)>strong small{color:inherit!important}
.choice-growth-preview>.ability-badge,.focus-option-growth>.ability-badge{background:#edf0f5!important}
:root[data-color-mode="dark"] :is(.choice-growth-preview,.focus-option-growth)>.ability-badge{background:#29313f!important}
@media(max-width:600px){.routine-success-rate,.focus-option-rate{gap:3px;padding:1px 4px!important}.routine-success-rate::before,.focus-option-rate::before{flex-basis:12px;width:12px;height:14px;font-size:10px}}
/* Keep both locked-seal lines above the banner notch. */
.choices .choice[data-choice]:disabled .choice-arrow{box-sizing:border-box!important;width:40px!important;min-width:40px!important;flex-basis:40px!important;height:54px!important;min-height:54px!important;padding:4px 2px 11px!important;gap:3px!important;overflow:visible!important;letter-spacing:0!important;align-self:center!important}
.choices .choice[data-choice]:disabled .choice-arrow::before{flex:0 0 auto!important;font-size:22px!important;line-height:1!important}
.choices .choice[data-choice]:disabled .choice-arrow::after{flex:0 0 auto!important;font-size:9px!important;line-height:1!important;white-space:nowrap!important}
@media(max-width:600px){.choices .choice[data-choice]:disabled .choice-arrow{width:36px!important;min-width:36px!important;flex-basis:36px!important;height:48px!important;min-height:48px!important;padding:3px 2px 10px!important;gap:2px!important}.choices .choice[data-choice]:disabled .choice-arrow::before{font-size:20px!important}.choices .choice[data-choice]:disabled .choice-arrow::after{font-size:8px!important}}
/* Compact trust/suspicion seals; explanatory rules remain in the detail view. */
.relationship-meters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 4px}
.relationship-meter{display:flex;align-items:center;gap:9px;min-width:0;padding:10px;border:1px solid #7b8fa9;border-radius:3px;background:linear-gradient(135deg,#edf1f7,#dfe5ee);box-shadow:inset 0 0 0 2px #ffffff70}
.relationship-meter-seal{display:grid;place-items:center;flex:0 0 30px;height:34px;border:3px double #7187a0;font:800 23px/1 var(--serif);color:#3e5674}
.relationship-meter-body{min-width:0;flex:1}.relationship-meter-title{display:flex;justify-content:space-between;align-items:baseline;gap:4px;color:#2e4058;font-size:12px;white-space:nowrap}.relationship-meter-title strong{font-size:17px;color:inherit}.relationship-meter-title small{font-size:9px;font-weight:400;color:inherit}
.relationship-meter-track{height:6px;background:#bdc8d7;margin-top:7px;border-radius:2px;overflow:hidden}.relationship-meter-track i{display:block;height:100%;background:linear-gradient(90deg,#476583,#91accb)}
.relationship-meter-suspicion{border-color:#ad897d;background:linear-gradient(135deg,#f4eeeb,#e9dfdc)}.relationship-meter-suspicion .relationship-meter-seal{border-color:#ab7c70;color:#854e40}.relationship-meter-suspicion .relationship-meter-title{color:#713f35}.relationship-meter-suspicion .relationship-meter-track{background:#d6beb7}.relationship-meter-suspicion .relationship-meter-track i{background:linear-gradient(90deg,#915446,#ca9080)}
:root[data-color-mode="dark"] .relationship-meter{background:linear-gradient(135deg,#2d3b4e,#202b3a);box-shadow:inset 0 0 0 2px #a7c3e212}.relationship-meter-title{font-weight:600}
:root[data-color-mode="dark"] .relationship-meter-title,:root[data-color-mode="dark"] .relationship-meter-seal{color:#dce7f6}:root[data-color-mode="dark"] .relationship-meter-track{background:#182434}
:root[data-color-mode="dark"] .relationship-meter-suspicion{background:linear-gradient(135deg,#49332f,#322827)}:root[data-color-mode="dark"] .relationship-meter-suspicion .relationship-meter-title,:root[data-color-mode="dark"] .relationship-meter-suspicion .relationship-meter-seal{color:#efd4cb}:root[data-color-mode="dark"] .relationship-meter-suspicion .relationship-meter-track{background:#271e1c}
@media(max-width:600px){.relationship-meters{gap:6px;margin-top:7px}.relationship-meter{padding:8px 6px;gap:6px}.relationship-meter-seal{flex-basis:24px;height:29px;font-size:20px}.relationship-meter-title{font-size:11px}.relationship-meter-title strong{font-size:15px}.relationship-meter-title small{font-size:8px}.relationship-meter-track{margin-top:5px}}
/* Open and closed commands share one banner silhouette and typography. */
.choices .choice[data-choice]:not(:disabled) .choice-arrow{box-sizing:border-box!important;width:40px!important;min-width:40px!important;flex-basis:40px!important;height:54px!important;min-height:54px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px!important;padding:4px 2px 11px!important;overflow:visible!important;letter-spacing:0!important;font-size:0!important;line-height:1!important;background:linear-gradient(90deg,#354459,#526881 50%,#354459)!important;color:#e8eef7!important;box-shadow:inset 2px 0 #a2b3c9,inset -2px 0 #a2b3c9,inset 0 2px #c7d5e6!important}
.choices .choice[data-choice]:not(:disabled) .choice-arrow::before{content:'進'!important;position:static!important;transform:none!important;width:auto!important;height:auto!important;border:0!important;flex:0 0 auto!important;font:800 22px/1 var(--serif)!important;color:inherit!important}
.choices .choice[data-choice]:not(:disabled) .choice-arrow::after{content:'진행';position:static;flex:0 0 auto;font:600 9px/1 var(--sans);letter-spacing:0;color:#e1e8f3;white-space:nowrap}
@media(max-width:600px){.choices .choice[data-choice]:not(:disabled) .choice-arrow{width:36px!important;min-width:36px!important;flex-basis:36px!important;height:48px!important;min-height:48px!important;padding:3px 2px 10px!important;gap:2px!important}.choices .choice[data-choice]:not(:disabled) .choice-arrow::before{font-size:20px!important}.choices .choice[data-choice]:not(:disabled) .choice-arrow::after{font-size:8px!important}}
