/* Material-led interface: decorations stay inside the existing hit areas. */
:root{--icon-medallion:url('assets/ui-icon-medallion-v1.webp');--home-entry:url('assets/ui-home-entry-v1.webp')}
.cloth-color-defs{position:absolute;pointer-events:none}
html body .city-experience .palace-command.palace-command[data-recruitment-faction-art]:before{background-image:var(--silk-pennant)!important;filter:var(--faction-cloth-filter)!important}
html body .palace-command[data-recruitment-faction-art]>strong{white-space:nowrap;font-size:clamp(14px,1.5vw,21px)!important;letter-spacing:0}
html body .city-experience .palace-command:not(.is-locked):after{display:none!important}
html body .city-experience .palace-command.command-1:before{background-image:url('assets/ui-silk-pennant-red-v1.webp')!important}
html body .city-experience .palace-command.command-2:before{background-image:url('assets/ui-silk-pennant-purple-v1.webp')!important}
html body .city-building .city-plaque{min-width:260px;padding:30px 36px;gap:8px}
html body .city-building .city-plaque strong{font-size:20px;letter-spacing:.5px}
html body .city-building .city-plaque strong i{display:inline;font-size:20px;margin-right:7px}
html body .city-building .city-plaque small{font-size:12px}
html body .city-experience .city-home{left:46%;bottom:13%;width:140px;max-width:none;height:122px;min-height:0;transform:none;background:var(--home-entry) center/100% 100% no-repeat;filter:drop-shadow(0 4px 3px #0008);display:flex;align-items:center;justify-content:center;padding:35px 15px 12px}
html body .city-home-building{display:none}
html body .city-home .city-home-plaque{display:flex;flex-direction:column;width:auto;max-width:none;min-height:0;padding:0;margin:0;background:none;gap:5px}
html body .city-home .city-home-plaque i{display:none}
html body .city-home .city-home-plaque strong{font-size:17px}
html body .city-home .city-home-plaque small{font-size:12px}
html body :is(.room-seal,.palace-command-art>i,.palace-order-brief>i,.report-heading>i,.room-guide>i){background:var(--icon-medallion) center/100% 100% no-repeat!important;border:0!important;box-shadow:none!important;clip-path:none!important;display:grid;place-items:center;padding:4px;box-sizing:border-box;color:#f5d69b}
html body .room-seal{padding:10px!important;min-width:54px;min-height:54px;line-height:1!important;flex-shrink:0}
html body .room-guide>i{width:58px;height:78px;flex:0 0 58px;padding:14px 12px!important;letter-spacing:2px;line-height:1.2}
html body :is(.palace-slot>i,.palace-room>i,.room-return>i){background:var(--icon-medallion) center/100% 100% no-repeat;display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;padding:7px;box-sizing:border-box;color:#efd093;filter:drop-shadow(0 2px 2px #0008)}
html body :is(.palace-slot>i,.palace-room>i,.room-return>i) svg{width:100%;height:100%;filter:drop-shadow(0 1px 1px #000)}
html body :is(.palace-slot>i,.palace-room>i,.room-return>i){background:none;padding:1px}
html body img.palace-facility-icon{display:block;width:100%!important;height:100%!important;object-fit:contain;filter:drop-shadow(0 2px 1px #0009)}
html body button[data-palace-menu="settings"]{font-size:0!important;background-image:url('assets/ui-icon-settings-v1.webp');background-position:center;background-size:28px;background-repeat:no-repeat}
html body .choice-state-label.is-locked:before{content:'';display:inline-block;width:22px;height:22px;vertical-align:middle;background:url('assets/ui-icon-lock-v1.webp') center/contain no-repeat}
html body .palace-blocked-reason{background-image:url('assets/ui-icon-lock-v1.webp');background-position:12px center;background-size:30px;background-repeat:no-repeat;padding-left:50px!important}
html body .room-action-report .report-rewards>div:before{display:none!important;content:none!important}
html body .palace-authority{background-image:url('assets/ui-icon-authority-v1.webp');background-position:center 6px;background-size:40px;background-repeat:no-repeat}
html body .palace-authority{background-image:var(--bronze-frame)!important;background-size:100% 100%!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:10px!important;box-sizing:border-box}
html body .palace-authority .authority-regalia-art{display:block;width:100%;height:62px;min-height:0;object-fit:contain}
html body .palace-authority .authority-han{font-size:11px;line-height:1.2;color:#dfc492;white-space:nowrap}
html body .command-authority-insignia>svg{display:none!important}
html body .command-authority-insignia:before{content:'';display:block;width:100%;height:88px;background:url('assets/ui-authority-staff-v1.webp') center/contain no-repeat;flex:none}
html body .command-authority-insignia.authority-jia-jie-yue:before{background-image:url('assets/ui-icon-authority-v1.webp')}
html body .palace-sheet[data-content="person"] .person-compact .command-authority-insignia:before{grid-column:1;grid-row:1/3;width:100%;height:46px;align-self:center;position:static;margin:0}
html body .office-regalia-heading>svg{display:none}
html body .office-regalia-heading:before{content:'';display:inline-block;width:32px;height:32px;background:url('assets/ui-icon-authority-v1.webp') center/contain no-repeat;vertical-align:middle}
@media(max-width:700px){html body .palace-authority .authority-regalia-art{height:32px}html body .palace-authority{padding:6px!important;gap:2px}html body .palace-authority .authority-han{font-size:9px}}
html body .growth-graph[data-stat="might"]{--ability-art:url('assets/ui-icon-military-v1.webp')}
html body .growth-graph[data-stat="intellect"]{--ability-art:url('assets/ui-icon-archive-v1.webp')}
html body .growth-graph[data-stat="leadership"]{--ability-art:url('assets/ui-icon-court-v1.webp')}
html body .growth-graph[data-stat="charm"]{--ability-art:url('assets/ui-icon-guests-v1.webp')}
html body .growth-graph[data-stat="wealth"]{--ability-art:url('assets/ui-icon-reward-v1.webp')}
html body .growth-graph{background-image:var(--ability-art),linear-gradient(135deg,#24394cdd,#111d2cee)!important;background-size:48px,cover!important;background-position:right 12px bottom 30px,center!important;background-repeat:no-repeat!important}
html body .palace-sheet :is(details,.palace-order-brief,.palace-blocked-reason,.choice-growth,.choice-path,.growth-probability,.requirement-card,.effect-card,.path-experience){border-image:var(--bronze-frame) 180 / 6px / 0 stretch;background-color:#142638;box-shadow:inset 0 0 24px #0005}
html body .palace-sheet summary{padding:12px 16px;box-sizing:border-box}
html body .palace-sheet :is(.palace-blocked-reason,.palace-order-brief){padding:14px 18px}
html body .palace-sheet :is(button,select){border-image:var(--bronze-frame) 180 / 5px / 0 stretch}
html body .palace-sheet>header{background:linear-gradient(90deg,#172c40,#0e1928);border-image:var(--bronze-frame) 180 / 5px / 0 stretch;padding:14px 20px}
html body .palace-sheet:has(.residence-picker){width:min(1040px,calc(100vw - 24px))!important;height:min(780px,calc(100dvh - 24px))!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}
html body .palace-sheet:has(.residence-picker) .palace-sheet-body{height:100%!important;box-sizing:border-box;overflow:hidden!important}
.residence-picker{grid-template-columns:minmax(0,1.6fr) minmax(220px,1fr);grid-template-rows:auto auto auto auto auto 1fr auto;height:100%;min-height:0;gap:10px 18px}
.residence-picker-map{grid-column:1;grid-row:1/8;min-height:0;overflow:hidden;border:1px solid #ab8e5f}
.residence-picker>:not(.residence-picker-map){grid-column:2;min-width:0}
.residence-picker-map .conquest-card{height:100%;min-height:0;padding:0!important;margin:0!important;background:#0d1d2c}
.residence-picker-map :is(.conquest-layout,.conquest-stage){height:100%;min-height:0;display:block!important}
.residence-picker-map .conquest-svg{width:100%!important;height:100%!important;max-height:none!important;min-height:0!important}
.residence-picker-map .conquest-card>:not(.conquest-layout),.residence-picker-map .conquest-layout>:not(.conquest-stage),.residence-picker-map .conquest-stage>:not(svg){display:none!important}
.residence-picker-map .residence-unavailable{opacity:.5}
.residence-picker-map .residence-destination:not(.residence-unavailable) .conquest-flag{stroke:#ffe2a0;stroke-width:2}
html body .palace-sheet :is(.choice-report,.growth-report,.fixed-report,.experience-report,.choice-detail-intro,.choice-requirement,.political-chance,.patronage-choice,.origin-trait,.world-strip,.trait-card,.career-requirements){border-image:var(--bronze-frame) 180 / 5px / 0 stretch;background-color:#142638;box-shadow:inset 0 0 20px #0005;padding:12px 16px;box-sizing:border-box}
html body :is(.card-corner-seal,.choice-report-heading>i,.report-section-title>span[aria-hidden],.creation-symbol,.prologue-symbol){background:var(--icon-medallion) center/100% 100% no-repeat!important;border:0!important;clip-path:none!important;box-shadow:none!important;display:inline-grid;place-items:center;padding:7px;box-sizing:border-box}
html body :is(.palace-playing,.game-frame-active) :is(input:not([type=range]):not([type=checkbox]),select){border-image:var(--bronze-frame) 180 / 4px / 0 stretch}
html body :is(.menu-settings-panel,.creation-card,.prologue-identity,.hall-entry,.register-person,.register-path){box-shadow:inset 0 0 30px #0006,0 5px 15px #0005}
html body .palace-sheet :is(.forecast-fixed,.growth-forecast,.experience-chip,.requirement-chip){border-image:var(--bronze-frame) 180 / 4px / 0 stretch}
html body .residence-picker-art{height:120px}
@media(max-width:700px){
 html body .city-building .city-plaque{width:min(46vw,190px);min-width:0;max-width:none;padding:24px 18px;gap:6px}
 html body .city-building .city-plaque strong{font-size:16px;letter-spacing:0}
 html body .city-building .city-plaque strong i{font-size:15px;margin-right:5px}
 html body .city-building .city-plaque small{font-size:10px}
 html body .city-experience .city-home{left:50%;bottom:11%;width:130px;height:112px;transform:translateX(-50%);padding:34px 16px 12px}
 html body .city-home .city-home-plaque strong{font-size:14px}
 html body .city-home .city-home-plaque small{font-size:10px}
 html body .palace-slot>i{padding:5px}
 html body .room-guide>i{background:none!important;padding:0!important;display:block!important}
 html body .room-experience .room-guide{width:62px;min-width:62px;height:44px;min-height:44px;max-height:44px;grid-template-rows:20px 12px;padding:5px;gap:2px}
 html body .room-guide>i{width:auto;height:20px;min-height:0;line-height:20px;font-size:15px;letter-spacing:1px}
 html body .room-experience:has(.room-guide) .palace-person>span>strong{padding-right:72px}
 html body .room-seal{min-width:42px;min-height:42px;padding:8px!important}
 html body .palace-slot>i{width:24px;height:24px;flex-basis:24px;padding:4px}
 html body .palace-footer .palace-slot{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:3px!important;padding:3px!important;min-height:0;height:100%;box-sizing:border-box}
 html body .palace-slot>span{display:flex!important;flex-direction:column!important;gap:1px;line-height:1.2;font-size:10px}
 html body .palace-slot>span>b{font-size:11px;line-height:1.2}
 .residence-picker{display:flex;flex-direction:column;gap:6px}
 .residence-picker-map{flex:1;min-height:120px}
 html body .residence-picker-art{display:block;height:clamp(56px,10dvh,84px);flex:0 0 auto;object-position:center}
 html body .residence-picker-benefits{padding:8px 10px;font-size:12px;line-height:1.4}
 html body .residence-picker-reason{font-size:12px;line-height:1.35}
 html body .residence-picker-cost{font-size:13px}
 html body .residence-picker select{font-size:15px;min-height:36px}
 html body .palace-sheet:has(.residence-picker) .palace-sheet-body{padding:10px!important;flex:1;overflow:hidden!important}
}
@media(min-width:701px){
 html body .city-experience .city-home{left:50%;transform:translateX(-50%);width:172px;height:146px;padding:44px 20px 16px}
 html body .city-experience:not(.is-lobby) .palace-rooms{width:180px!important;left:24px!important}
 html body .city-experience:not(.is-lobby) .palace-rooms>button{width:180px!important;min-width:180px!important;max-width:180px!important;padding:12px 24px!important;display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important}
 html body .city-experience:not(.is-lobby) .palace-rooms>button>i{position:static!important;width:32px;height:32px;transform:none!important;justify-self:center;margin:0!important}
 html body .city-experience:not(.is-lobby){grid-template-columns:212px minmax(0,1fr)!important}
}
html body .city-home-plaque,html body .city-relocation{justify-items:center;text-align:center}
html body :is(.room-seal,.palace-command-art>i,.report-heading>i,.room-action-report>header>i,.room-annual-report>header>i){display:grid!important;place-content:center!important;place-items:center!important;text-align:center!important;font-style:normal;line-height:1!important;letter-spacing:0!important;padding:9px!important;background:var(--icon-medallion) center/100% 100% no-repeat!important;border:0!important;box-sizing:border-box}
html body .palace-command-art>i{width:42px!important;height:42px!important;font-size:22px!important;min-width:42px}
html body .palace-command-art{container-type:size;container-name:command-art}
@container command-art (max-height: 50px){html body .palace-command-art>i{width:28px!important;min-width:28px!important;height:28px!important;font-size:16px!important;padding:5px!important;bottom:3px!important}}
@container command-art (max-height: 30px){html body .palace-command-art.palace-command-art>i{display:none!important}}
html body .city-relocation{background:var(--silk-pennant) center/100% 100% no-repeat!important;border:0!important;border-image:none!important;width:132px;min-width:132px;height:142px;padding:22px 18px 30px!important;bottom:8px;gap:6px;align-content:center}
html body .city-relocation strong{font-size:16px;white-space:nowrap}
html body .city-relocation small{font-size:11px;line-height:1.4}
html body .city-experience .city-home{bottom:23%}
@media(min-width:701px){html body .city-experience:not(.is-lobby) .palace-rooms{--facility-height:clamp(48px,calc((100dvh - 340px)/6),92px);gap:8px}html body .city-experience:not(.is-lobby) .palace-rooms>button{height:var(--facility-height)!important;min-height:var(--facility-height)!important;max-height:var(--facility-height)!important;padding-top:16px!important;padding-bottom:16px!important}}
@media(max-width:700px){html body .city-relocation{width:108px;min-width:108px;height:116px;padding:20px 15px 25px!important;bottom:4px}html body .city-relocation strong{font-size:13px}html body .city-relocation small{font-size:10px}html body .city-experience .city-home{bottom:23%}}
@media(max-width:700px){html body .city-relocation{left:50%;transform:translateX(-50%);min-width:136px;max-width:150px}html body .city-outside-toggle{min-width:62px;font-size:12px;padding:7px 8px;right:6px}}

/* Keep glyphs inside the usable centre of the artwork, not its ornamental rim. */
html body :is(.card-corner-seal,.choice-report-heading>i,.report-section-title>span[aria-hidden]){width:40px!important;height:44px!important;min-width:40px!important;flex:0 0 40px!important;padding:10px!important;font-size:20px!important;line-height:1!important;letter-spacing:0!important;transform:none!important;display:inline-grid!important;place-items:center!important;font-style:normal}
html body .routine-choice-card .routine-choice-detail>summary>.card-corner-seal{top:50%!important;right:12px!important;transform:translateY(-50%)!important}
html body .routine-choice-detail>summary{min-height:50px;padding-right:60px!important;box-sizing:border-box}
html body .choice-report-heading{min-height:46px;align-items:center}
html body .city-lobby.is-outskirts :is(.city-home,.city-relocation),html body .room-lobby.is-outskirts :is(.city-home,.city-relocation){display:none!important}
html body .city-relocation small{white-space:nowrap;font-size:11px!important;line-height:1.3}
html body .city-relocation strong{font-size:14px!important;white-space:nowrap;letter-spacing:0}
html body .city-experience.is-lobby .residence-regalia{display:block!important}
html body .room-experience .residence-hanging.hanging-right{display:block!important;left:auto!important;right:14px!important;width:84px!important;height:248px!important;opacity:1;filter:drop-shadow(0 5px 7px #0008)}
html body .residence-hanging>img{display:block;width:100%;height:100%;object-fit:contain}
html body .residence-hanging>strong{position:absolute;left:25%;right:25%;top:30%;height:39%;display:flex;flex-direction:column;align-items:center;justify-content:center;writing-mode:vertical-rl;letter-spacing:3px;font:700 29px/1.2 var(--serif);color:#fff1c6;text-shadow:0 2px 3px #000}
@media(min-width:701px){
 html body .city-experience.city-experience:not(.is-lobby) .palace-rooms{width:206px!important;left:24px!important;--facility-height:clamp(52px,calc((100dvh - 290px)/6),106px);gap:6px}
 html body .city-experience.city-experience:not(.is-lobby) .palace-rooms>button{width:206px!important;min-width:206px!important;max-width:206px!important;padding:18px 30px!important;grid-template-columns:34px minmax(0,1fr)!important;gap:10px!important}
 html body .city-experience.city-experience:not(.is-lobby) .palace-rooms>button>i{width:30px!important;height:30px!important;justify-self:center}
 html body .city-experience.city-experience:not(.is-lobby){grid-template-columns:240px minmax(0,1fr)!important}
}
@media(max-width:700px){html body .room-experience .residence-hanging.hanging-right{width:38px!important;height:114px!important;right:3px!important}html body .residence-hanging>strong{font-size:15px;letter-spacing:1px}}
html body .city-experience .residence-regalia{z-index:4!important;pointer-events:none}
@media(max-width:700px){html body .city-experience .residence-regalia{top:210px!important}}
/* Mobile city controls occupy explicit rows below the HUD. */
html body .city-relocation{width:110px!important;min-width:110px!important;max-width:110px!important;height:98px!important;padding:18px 12px 24px!important}
html body .city-relocation strong{font-size:12px!important}
@media(max-width:700px){
 html body .city-experience.is-lobby .room-door.city-building{left:25%!important;top:calc(var(--mobile-sites-top,165px) + var(--mobile-site-row,110px)*var(--mobile-row,0))!important;width:48%!important;height:var(--mobile-site-row,110px)!important;transform:none!important;margin-left:-24%!important}
 html body .city-experience.is-lobby :is(.door-court,.door-map){left:75%!important}
 html body .city-experience.is-lobby :is(.door-guests,.door-map){--mobile-row:1}
 html body .city-experience.is-lobby .door-archive{--mobile-row:2}
 html body .city-experience.is-lobby .city-building .city-plaque{left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:100%!important;max-width:184px!important;min-width:0!important;padding:19px 15px!important;gap:3px}
 html body .city-experience.is-lobby .city-plaque strong{font-size:15px!important}
 html body .city-experience.is-lobby .city-plaque strong i{font-size:14px!important;margin-right:3px}
 html body .city-experience.is-lobby .city-home{left:75%!important;top:calc(var(--mobile-sites-top,165px) + var(--mobile-site-row,110px)*2.5)!important;bottom:auto!important;width:112px!important;height:96px!important;padding:28px 12px 10px!important;transform:translate(-50%,-50%)!important}
 html body .city-experience.is-lobby .city-relocation{left:25%!important;bottom:4px!important;width:104px!important;min-width:104px!important;max-width:104px!important;height:70px!important;padding:10px 12px 18px!important;gap:2px}
 html body .city-relocation small{font-size:10px!important}
 html body .city-experience.is-lobby .city-outside-toggle{right:8px!important;bottom:12px!important;min-height:44px!important}
 html body .city-experience .residence-regalia{top:var(--mobile-banner-top,205px)!important}
 html body .room-experience .residence-hanging.hanging-right{height:48px!important;width:20px!important;right:7px!important}
 html body .residence-hanging>strong{font-size:10px!important;letter-spacing:0}
}
@media(max-width:700px){html body .city-experience.is-lobby .city-building .city-plaque{box-sizing:border-box!important;width:calc(100% - 6px)!important}}
@media(max-width:700px){html body .city-experience.is-lobby .room-door.city-building:is(.door-court,.door-map){left:75%!important}}
html body .person-dossier{padding:16px!important;box-sizing:border-box;min-width:0}
html body .person-dossier>:is(h4,p,.dossier-stats,.dossier-skill,.dossier-caption){max-width:100%;box-sizing:border-box}
html body .person-dossier h4{padding:8px 2px;margin:12px 0 8px}
@media(max-width:700px){
 html body .city-experience.is-lobby .door-court{left:50%!important}
 html body .city-experience.is-lobby .room-door.city-building.door-court{left:75%!important}
 html body .city-experience.is-lobby .city-home{left:50%!important;top:auto!important;bottom:4px!important;width:100px!important;height:76px!important;transform:translateX(-50%)!important;padding:22px 8px 8px!important}
 html body .city-home .city-home-plaque strong{font-size:13px!important}
 html body .city-home .city-home-plaque small{display:none}
 html body .city-experience.is-lobby .city-relocation{left:17%!important;width:94px!important;min-width:94px!important;max-width:94px!important;height:70px!important;bottom:4px!important}
 html body .city-experience.is-lobby .city-outside-toggle{right:3%!important;width:27%!important;min-width:0!important;height:54px!important;bottom:10px!important;padding:8px!important;font-size:12px!important}
 html body .city-experience .palace-upper:has(.palace-authority) .palace-faction-status{width:calc(100% - 68px)!important;max-width:calc(100% - 68px)!important}
 html body .city-experience .palace-upper>.palace-authority{position:absolute!important;left:auto!important;right:0!important;top:var(--authority-row-top,108px)!important;width:62px!important;height:48px!important;min-height:0!important;max-height:48px!important;padding:4px!important;gap:1px!important;transform:none!important;margin:0!important}
 html body .city-experience .palace-authority .authority-regalia-art{height:20px!important;width:28px!important}
 html body .city-experience .palace-authority strong{font-size:12px!important;line-height:14px!important}
 html body .city-experience .palace-authority :is(.authority-han,small){display:none!important}
 html body .city-experience:has(.palace-authority) .palace-person{width:100%!important;max-width:100%!important;margin:0!important}
}
@media(max-width:700px){html body .city-experience:has(.palace-authority) .faction-status-cell:before{font-size:9px!important;letter-spacing:-.3px}html body .city-experience:has(.palace-authority) .palace-faction-status{column-gap:2px!important;padding-inline:4px!important}}
