/* v11 只收口到一套清晰的视觉层级：明亮绢帛、暖金木牌、足够的字号和稳定坐标。 */
:root{--v11-paper:#fbf0cf;--v11-paper-2:#ead49b;--v11-ink:#3f260f;--v11-gold:#d49a36;--v11-gold-deep:#825015;--v11-red:#7d291b;--v11-line:rgba(126,75,20,.55)}
button,.btn,.big-btn{border:1px solid #8c571b!important;border-radius:4px!important;color:#40260e!important;background:linear-gradient(180deg,#fff4cb 0%,#edca80 44%,#c89037 100%)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85),inset 0 -3px 0 rgba(103,57,12,.18),0 3px 8px rgba(60,35,8,.2)!important;text-shadow:0 1px 0 rgba(255,248,218,.8)!important;transition:filter .14s ease,transform .08s ease,box-shadow .14s ease!important}
button::before,.btn::before{content:'';position:absolute;inset:3px;border:1px solid rgba(126,76,19,.28);border-radius:2px;pointer-events:none}
button,.btn{position:relative}
button:hover,.btn:hover{filter:brightness(1.09) saturate(1.05)!important;box-shadow:inset 0 1px 0 #fff8dc,inset 0 -3px 0 rgba(103,57,12,.18),0 5px 13px rgba(70,40,8,.28)!important}
button:active,.btn:active{transform:translateY(1px)!important;box-shadow:inset 0 2px 5px rgba(80,42,5,.25)!important}
button:disabled,.btn:disabled{filter:grayscale(.45)!important;opacity:.55!important}

/* 主导航的字号和重量是全局标准，不再由各页自行缩小。 */
#action-rail[data-scene="palace"],#action-rail[data-scene="visit"]{width:196px!important}
#action-rail[data-scene="palace"]>button,#action-rail[data-scene="visit"]>button{min-height:58px!important;font-size:clamp(20px,1.45vw,24px)!important;font-weight:800!important;letter-spacing:5px!important}
#action-rail[data-scene="court"]>button{font-size:clamp(18px,1.45vw,22px)!important;font-weight:800!important}
#rail-flyout{width:174px!important}#rail-flyout button{min-width:158px!important;font-size:18px!important}

/* 奏折选项始终同一横排，文字可在按钮内换行。 */
.court-v9 .court-memorial,.court-v9 .court-decision{width:min(96%,1420px)!important}
.court-v9 .court-memorial-choices{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;grid-template-columns:none!important;gap:12px!important}
.court-v9 .court-memorial-choices button{min-width:0!important;min-height:70px!important;padding:12px 14px!important;font-size:clamp(18px,1.55vw,23px)!important;line-height:1.35!important}

/* 天下页两侧都要填满，左图 68%，右侧信息 32%。 */
#screen-root[data-v11-screen="worldMap"],#screen-root[data-v11-screen="diplomacy"]{overflow:hidden!important}
.world-page{height:100%!important;grid-template-rows:64px minmax(0,1fr)!important}
.world-page>header{padding:8px 18px!important}.world-page>header h2{font-size:28px!important}.world-page>header button{min-width:190px!important;font-size:17px!important}
.world-page main{height:100%!important;padding:10px!important}
.world-page main>.panel-body,.v9-map-split>.panel-body{grid-template-columns:minmax(0,68fr) minmax(340px,32fr)!important;height:100%!important;gap:12px!important}
.world-page #map-wrap,.v9-map-split #map-wrap{display:block!important;width:100%!important;height:100%!important;background:linear-gradient(145deg,#eee0b8,#cbd8ad)!important;border:2px solid #a8732b!important}
.world-page #map-canvas,.v9-map-split #map-canvas{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:fill!important}
.world-page #map-info,.v9-map-split #map-info,.world-page .map-side{height:100%!important;padding:20px!important;background:linear-gradient(145deg,rgba(255,247,218,.98),rgba(232,207,151,.98))!important;border:2px solid #a8732b!important;overflow:auto!important;font-size:17px!important}
.world-focus{min-height:100%!important;display:flex!important;flex-direction:column!important;gap:16px!important}.world-focus header h2{font-size:32px!important}.world-focus header span{font-size:18px!important}.world-focus header p{margin:5px 0 0;font-size:15px}.world-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.world-stats b{display:flex!important;flex-direction:column!important;gap:4px!important;font-size:19px!important;padding:13px 8px!important}.world-stats small{font-size:12px!important;font-weight:400!important;color:#79552a!important}.world-focus>p{font-size:17px!important;line-height:1.8!important}.world-resources,.world-city-detail{padding:12px 14px;border:1px solid rgba(154,102,37,.45);background:rgba(255,250,229,.55)}.world-resources h3,.world-city-detail h3{margin:0 0 10px;font-size:19px}.world-resources>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.world-resources span{display:flex;justify-content:space-between;padding:7px 8px;background:rgba(255,255,255,.42);font-size:14px}.world-resources b{font-size:15px}.world-city-detail p{margin:7px 0;font-size:15px;line-height:1.6}.world-diplomacy{margin-top:auto!important}.world-diplomacy button{font-size:17px!important;min-height:54px!important}

/* 普通页面的内容至少撑满主画布，避免居中小卡片。 */
#screen-root[data-v11-screen]>.v7-page,#screen-root[data-v11-screen]>.panel,#screen-root[data-v11-screen]>.screen-panel{width:100%!important;height:100%!important;max-width:none!important;min-height:0!important}
.v7-page{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}.v7-content{min-height:0!important;height:100%!important;padding:14px 18px!important;overflow:auto!important}.v7-page .panel-body{min-height:0!important;flex:1 1 auto!important}.v7-page h2,.panel-title{font-size:clamp(23px,2vw,30px)!important}
.empty-state{min-height:220px!important;display:grid!important;place-content:center!important;text-align:center!important;font-size:18px!important}.empty-state b{font-size:23px!important}.empty-state.compact{min-height:150px!important}
.city-summary-list,.local-list,.delegate-list,.training-list,.chronicle{height:100%!important;display:grid!important;grid-auto-rows:minmax(64px,auto)!important;align-content:stretch!important;gap:9px!important}.city-row,.delegate-list>article,.training-list>article{min-height:64px!important;padding:12px 16px!important;font-size:16px!important}.city-row-name b,.delegate-list b,.training-list b{font-size:19px!important}.city-row-stats,.delegate-list span,.training-list span{font-size:14px!important}
.action-grid,.target-grid,.relation-grid,.family-grid{width:100%!important;height:100%!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))!important;grid-auto-rows:minmax(118px,1fr)!important;gap:12px!important;align-content:stretch!important}.action-grid>*,.target-grid>article,.relation-grid>article,.family-grid>article{padding:15px!important;font-size:16px!important}.target-grid button,.action-grid button{min-height:48px!important;font-size:16px!important}
.build-dashboard,.route-summary{min-height:90px!important}.build-actions{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:12px!important}.build-actions>*{min-height:110px!important}.page-tabs{min-height:54px!important}.page-tabs button{min-height:48px!important;font-size:17px!important}.page-turn button{min-height:46px!important;font-size:16px!important}
#screen-root[data-v11-screen="draft"]>.panel,#screen-root[data-v11-screen="inspect"]>.panel,#screen-root[data-v11-screen="tax"]>.panel{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}#screen-root[data-v11-screen="draft"] .panel-body,#screen-root[data-v11-screen="inspect"] .panel-body,#screen-root[data-v11-screen="tax"] .panel-body{height:100%!important;padding:22px!important;font-size:17px!important}#screen-root[data-v11-screen="draft"] input,#screen-root[data-v11-screen="tax"] input{min-height:46px!important;font-size:18px!important}
#screen-root[data-v11-screen="intrigue"] .target-grid,#screen-root[data-v11-screen="treaties"] .target-grid,#screen-root[data-v11-screen="training"] .training-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:minmax(150px,1fr)!important}#screen-root[data-v11-screen="intrigue"] .target-grid>article,#screen-root[data-v11-screen="treaties"] .target-grid>article{display:flex!important;flex-direction:column!important;justify-content:space-between!important}#screen-root[data-v11-screen="intrigue"] .target-grid article>div,#screen-root[data-v11-screen="treaties"] .target-grid article>div{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}

/* 宫外：背景自身是唯一坐标系，对话与右侧操作不再改变热点位置。 */
.visit-scene{position:relative!important;isolation:isolate!important;width:100%!important;height:100%!important;min-height:0!important;padding:18px 222px 18px 22px!important;overflow:hidden!important}
.visit-scene:not(.place) .visit-head{position:absolute!important;left:24px!important;top:18px!important;z-index:6!important}.visit-head h2{font-size:30px!important}.visit-head span{font-size:15px!important}
.visit-spot{position:absolute!important;transform:translate(-50%,-50%)!important;width:clamp(138px,11vw,184px)!important;min-height:64px!important;padding:10px 12px!important;z-index:4!important}.visit-spot b{font-size:20px!important}.visit-spot span{font-size:13px!important;line-height:1.35!important}
.visit-note{position:absolute!important;left:24px!important;top:100px!important;max-width:360px!important;font-size:15px!important}
#action-rail[data-scene="visit"]{right:calc(var(--log-w) + 22px)!important;top:82px!important;bottom:18px!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;gap:10px!important}
body:has(.visit-scene.place) #action-rail[data-scene="visit"]{display:none!important}
.visit-scene.place .visit-head{position:absolute!important;left:22px!important;right:222px!important;top:18px!important;height:70px!important}.visit-scene.place .visit-desc{position:absolute!important;left:22px!important;right:222px!important;top:94px!important;margin:0!important;font-size:17px!important;line-height:1.7!important;max-width:820px!important}
.visit-scene.place .visit-acts-col{position:absolute!important;right:22px!important;top:94px!important;bottom:18px!important;width:190px!important;max-height:none!important;display:flex!important;flex-direction:column!important;gap:10px!important;overflow:auto!important}.visit-scene.place .place-act-btn{flex:0 0 auto!important;width:100%!important;min-height:58px!important;font-size:18px!important}
.visit-dialog-reserve,.visit-dialog-reserve.is-active{position:absolute!important;left:22px!important;right:232px!important;bottom:18px!important;width:auto!important;height:auto!important;min-height:150px!important;max-height:46%!important;padding:14px 16px!important;background:linear-gradient(180deg,rgba(255,247,216,.97),rgba(228,201,144,.97))!important;border:2px solid #9b6625!important;color:var(--v11-ink)!important;overflow:hidden!important}
.visit-person-picker{display:flex!important;align-items:flex-end!important;gap:10px!important;overflow:auto!important}.visit-person-choice{flex:0 1 210px!important;min-width:170px!important;min-height:64px!important;padding:9px 12px!important}.visit-person-choice b{font-size:17px!important}.visit-person-choice span,.visit-person-choice small{font-size:13px!important}
.visit-conversation{height:100%!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:8px!important}.visit-conversation h3{font-size:21px!important}.visit-monologue,.visit-reply{font-size:16px!important;line-height:1.75!important;overflow:auto!important}.visit-answer-list{display:flex!important;gap:8px!important;max-height:none!important;overflow:visible!important}.visit-answer-list .dialogue-answer{flex:1 1 0!important;min-width:0!important;min-height:48px!important;padding:8px 10px!important;font-size:15px!important}.dialogue-read-footer{display:flex!important;justify-content:flex-end!important}.dialogue-read-footer button{min-width:138px!important;min-height:48px!important;font-size:16px!important}

/* 内廷与候选人物页：不再用小字堆砌，入宫前经历是唯一传记区。 */
.annual-resume{display:none!important}.harem-top .tip,.harem-summary .tip{font-size:15px!important}.candidate-modal{width:min(1240px,calc(100vw - 28px))!important;height:min(800px,calc(100dvh - 20px))!important}.candidate-view{grid-template-columns:minmax(300px,36%) minmax(0,1fr)!important}.candidate-profile{font-size:16px!important}.candidate-profile h2{font-size:34px!important}.candidate-label,.cand-sumline{font-size:16px!important}.candidate-attrs article{min-height:84px!important}.candidate-attrs span{font-size:14px!important}.candidate-attrs b{font-size:27px!important}.trait-line.big{font-size:16px!important}.cand-block.pre-palace{margin-bottom:72px!important}.cand-block.pre-palace h4{font-size:20px!important}.cand-block.pre-palace p{font-size:16px!important;line-height:1.85!important;text-align:justify!important}
#screen-root[data-v11-screen="harem"] .v7-content{height:100%!important;display:flex!important;flex-direction:column!important;min-height:0!important}#screen-root[data-v11-screen="harem"] .location-banner{flex:0 0 auto!important}#screen-root[data-v11-screen="harem"] .consort-grid{flex:1 1 auto!important;min-height:0!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(480px,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(250px,1fr)!important;gap:14px!important}#screen-root[data-v11-screen="harem"] .consort-card{height:100%!important;min-height:250px!important;display:grid!important;grid-template-columns:minmax(150px,30%) minmax(0,1fr)!important}#screen-root[data-v11-screen="harem"] .portrait-slot{width:100%!important;height:100%!important;max-height:none!important}#screen-root[data-v11-screen="harem"] .portrait-slot img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center top!important}#screen-root[data-v11-screen="harem"] .consort-data{padding:18px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}#screen-root[data-v11-screen="harem"] .consort-data h3{font-size:26px!important}#screen-root[data-v11-screen="harem"] .card-actions{margin-top:auto!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}#screen-root[data-v11-screen="harem"] .card-actions button{min-width:0!important;min-height:46px!important;font-size:16px!important}

@media(max-width:1100px){
  #action-rail[data-scene="palace"],#action-rail[data-scene="visit"]{width:164px!important}
  #action-rail[data-scene="palace"]>button,#action-rail[data-scene="visit"]>button{font-size:19px!important}
  .world-page main>.panel-body,.v9-map-split>.panel-body{grid-template-columns:minmax(0,64fr) minmax(300px,36fr)!important}
}
@media(max-width:700px){
  #action-rail[data-scene="palace"],#action-rail[data-scene="visit"]{width:108px!important;right:calc(var(--log-w) + 7px)!important}
  #action-rail[data-scene="palace"]>button,#action-rail[data-scene="visit"]>button{min-height:50px!important;font-size:16px!important;letter-spacing:1px!important}
  #action-rail[data-scene="court"]>button{font-size:clamp(13px,3.4vw,16px)!important}
  .court-v9 .court-memorial-choices{gap:4px!important}.court-v9 .court-memorial-choices button{min-height:54px!important;padding:6px 3px!important;font-size:clamp(12px,3.35vw,15px)!important;word-break:break-all!important}
  .world-page{grid-template-rows:52px minmax(0,1fr)!important}.world-page>header h2{font-size:22px!important}.world-page>header button{min-width:130px!important;font-size:14px!important}
  .world-page main>.panel-body,.v9-map-split>.panel-body{grid-template-columns:1fr!important;grid-template-rows:minmax(0,59%) minmax(0,41%)!important}.world-page #map-info,.world-page .map-side{padding:8px!important;font-size:13px!important;overflow:hidden!important}.world-focus{gap:5px!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto minmax(38px,1fr)!important}.world-focus>header{padding:6px 10px!important}.world-focus header h2{font-size:20px!important;margin:1px 0!important}.world-focus header span,.world-focus header p{font-size:11px!important}.world-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}.world-stats b{font-size:12px!important;padding:5px 2px!important}.world-stats small{font-size:9px!important}.world-resources,.world-city-detail{display:none!important}.world-diplomacy{grid-template-columns:repeat(4,minmax(0,1fr))!important;align-self:end!important;gap:4px!important}.world-diplomacy button{min-width:0!important;min-height:38px!important;padding:3px 1px!important;font-size:11px!important}
  .visit-scene{padding:8px 122px 8px 8px!important}.visit-scene:not(.place) .visit-head{left:10px!important;top:8px!important}.visit-head h2{font-size:22px!important}.visit-note{left:10px!important;top:72px!important;max-width:240px!important;font-size:12px!important}.visit-spot{width:84px!important;min-width:0!important;max-width:84px!important;min-height:48px!important;padding:5px 2px!important}.visit-spot b{font-size:14px!important}.visit-spot span{display:none!important}
  .visit-scene.place .visit-head{left:9px!important;right:124px!important;top:8px!important}.visit-scene.place .visit-desc{left:9px!important;right:124px!important;top:66px!important;font-size:13px!important;line-height:1.45!important}.visit-scene.place .visit-acts-col{right:8px!important;top:70px!important;bottom:8px!important;width:106px!important;gap:6px!important}.visit-scene.place .place-act-btn{min-height:48px!important;font-size:14px!important;padding:5px!important}
  .visit-dialog-reserve,.visit-dialog-reserve.is-active{left:8px!important;right:122px!important;bottom:8px!important;min-height:128px!important;max-height:54%!important;padding:8px!important}.visit-person-picker{display:grid!important;grid-template-columns:1fr!important}.visit-person-choice{min-width:0!important;min-height:50px!important}.visit-answer-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.visit-answer-list .dialogue-answer{font-size:12px!important;min-height:42px!important}.visit-monologue,.visit-reply{font-size:13px!important;line-height:1.5!important}
  .candidate-modal{width:calc(100vw - 8px)!important;height:calc(100dvh - 8px)!important}.candidate-view{grid-template-columns:minmax(126px,35%) minmax(0,1fr)!important}.candidate-profile h2{font-size:22px!important}.candidate-label,.cand-sumline{font-size:12px!important}.candidate-attrs article{min-height:58px!important}.candidate-attrs b{font-size:19px!important}.cand-block.pre-palace h4{font-size:15px!important}.cand-block.pre-palace p{font-size:12px!important;line-height:1.55!important}
  #topbar{grid-template-rows:repeat(2,33px)!important;min-height:72px!important;max-height:72px!important}#topbar>span{font-size:11px!important}
  #screen-root[data-v11-screen="harem"] .v7-content{height:100%!important}#screen-root[data-v11-screen="harem"] .consort-grid{grid-template-columns:1fr!important;grid-template-rows:none!important;grid-auto-rows:minmax(230px,1fr)!important}#screen-root[data-v11-screen="harem"] .consort-card{grid-template-columns:minmax(105px,34%) minmax(0,1fr)!important}#screen-root[data-v11-screen="harem"] .consort-data{padding:7px!important}#screen-root[data-v11-screen="harem"] .consort-data h3{font-size:18px!important}#screen-root[data-v11-screen="harem"] .card-actions{gap:3px!important}#screen-root[data-v11-screen="harem"] .card-actions button{min-height:42px!important;padding:4px 1px!important;font-size:12px!important}
  #screen-root[data-v11-screen="hr"] .hr-split{grid-template-columns:minmax(126px,39%) minmax(0,61%)!important;grid-template-rows:minmax(0,1fr)!important;height:100%!important;overflow:hidden!important}#screen-root[data-v11-screen="hr"] .hr-list{height:100%!important;overflow:auto!important}#screen-root[data-v11-screen="hr"] .hr-split>main{position:relative!important;height:100%!important;min-height:0!important;overflow:hidden!important}#screen-root[data-v11-screen="hr"] .hr-detail{position:relative!important;height:100%!important;min-height:0!important;padding:7px 7px 126px!important;overflow:auto!important}#screen-root[data-v11-screen="hr"] .hr-detail header h2{font-size:20px!important}#screen-root[data-v11-screen="hr"] .hr-detail header p{font-size:11px!important}#screen-root[data-v11-screen="hr"] .hr-detail .candidate-attrs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important}#screen-root[data-v11-screen="hr"] .hr-detail .candidate-attrs article{min-height:54px!important;padding:4px!important}#screen-root[data-v11-screen="hr"] .hr-detail .candidate-attrs b{font-size:20px!important}#screen-root[data-v11-screen="hr"] .hr-actions{position:absolute!important;left:5px!important;right:5px!important;bottom:5px!important;z-index:4!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;padding:5px!important;background:rgba(248,232,190,.96)!important;border:1px solid #a8732b!important}#screen-root[data-v11-screen="hr"] .hr-actions button{min-width:0!important;min-height:46px!important;padding:4px 2px!important;font-size:12px!important}
  .v7-content{padding:7px!important}.empty-state{min-height:130px!important}.action-grid,.target-grid,.relation-grid,.family-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(92px,1fr)!important;gap:6px!important}#screen-root[data-v11-screen="intrigue"] .target-grid,#screen-root[data-v11-screen="treaties"] .target-grid,#screen-root[data-v11-screen="training"] .training-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(108px,1fr)!important}.city-summary-list,.local-list,.delegate-list,.training-list{grid-auto-rows:minmax(54px,auto)!important}.city-row,.delegate-list>article,.training-list>article{min-height:54px!important;padding:7px!important}.city-row-name b,.delegate-list b,.training-list b{font-size:15px!important}.city-row-stats,.delegate-list span,.training-list span{font-size:11px!important}
}
