/* One lacquer frame per map; transparent rails expose that same material. */
html body .room-experience .palace-card-deck.castle-map-deck{
 box-sizing:border-box;border:8px solid transparent!important;
 border-image:var(--window-frame) 180 fill / 18px / 0 stretch!important;
 background:#171a19!important;border-radius:0!important;box-shadow:none!important;
}
html body .room-experience .castle-map-card,
html body .room-experience .castle-map-card :is(.conquest-layout,.conquest-stage,.castle-map-addresses,.residence-map-locations,.castle-province-brief,.map-display-toolbar,.conquest-map-controls,.map-art-layer-switch,.castle-map-regions){
 background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important;border-radius:0!important;
}
html body .room-experience .castle-map-card :is(.castle-map-regions,.conquest-map-controls,.map-art-layer-switch,.map-marker-tabs) button,
html body .room-experience .castle-map-card .province-browser-open{
 box-sizing:border-box;background:transparent!important;border:3px solid transparent!important;
 border-image:var(--window-frame) 180 fill / 7px / 0 stretch!important;box-shadow:none!important;border-radius:0!important;
 color:#e9d6ad!important;min-height:34px;height:auto;line-height:1.25;
}
html body .room-experience .castle-map-card button[aria-pressed=true]{color:#ffe7ad!important;text-shadow:0 0 7px #cfaa4544}
html body #modal:has(.affairs-panel){border:10px solid transparent!important;border-image:var(--window-frame) 180 fill / 24px / 0 stretch!important;background:#171a19!important}
html body #modal:has(.affairs-panel) .modal-top{background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important}
html body #modal .affairs-selectors select,html body .province-picker select{
 background:transparent!important;border:3px solid transparent!important;border-image:var(--group-frame) 180 fill / 7px / 0 stretch!important;
 color:#eee0c4!important;border-radius:0!important;box-shadow:none!important;padding:10px 30px 10px 12px!important;
}
html body .map-expand-toggle{display:none}
@media(max-width:700px){
 html body .room-experience.mobile-hud-layout.mobile-hud-layout.has-affairs-hud[data-facility="map"]:not(.has-enlarged-type){grid-template-rows:44px 212px 0 minmax(0,1fr) 42px 54px!important}
 html body .room-experience .palace-card-deck.castle-map-deck{border-width:5px!important;border-image-width:12px!important}
 html body .room-experience .castle-map-card .map-display-toolbar{gap:3px!important;padding:3px!important}
 html body .room-experience .castle-map-card .castle-map-regions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px!important}
 html body .room-experience .castle-map-card .castle-map-regions button{font-size:12px!important;min-height:32px;padding:5px!important}
 html body .room-experience .castle-map-card .map-expand-toggle{display:block;min-height:34px;padding:5px 9px;pointer-events:auto}
 html body .room-experience .castle-map-deck.is-map-expanded{position:fixed!important;inset:6px!important;width:calc(100% - 12px)!important;height:calc(100% - 12px)!important;z-index:1000!important;margin:0!important}
}
html body dialog#modal[open]:has(.affairs-panel) .modal-top{background:transparent!important}
html body .room-experience .castle-map-card .map-expand-toggle{
 background:transparent!important;border:3px solid transparent!important;
 border-image:var(--window-frame) 180 fill / 7px / 0 stretch!important;box-shadow:none!important;color:#ead6ae!important;border-radius:0!important;
}
html body .room-experience .castle-map-card .residence-map-key{background:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important}
html body .province-browser-dialog :is(button,.province-browser-city),html body .castle-province-brief .province-browser-city{
 background:transparent!important;border:3px solid transparent!important;border-image:var(--window-frame) 180 fill / 6px / 0 stretch!important;border-radius:0!important;box-shadow:none!important;color:#ead6ae!important;
}
@media(min-width:380px) and (max-width:700px){html body .room-experience .castle-map-card .castle-map-regions{grid-template-columns:repeat(6,minmax(0,1fr))}html body .room-experience .castle-map-card .castle-map-regions button{font-size:10px!important;padding:3px 1px!important}}
/* Shared secondary controls use the same artwork, never a colored inset mat. */
html body :is(.target-picker-close,.castle-city-sheet .conquest-choice-link,.map-replay button){
 background:transparent!important;border:3px solid transparent!important;
 border-image:var(--window-frame) 180 fill / 7px / 0 stretch!important;
 border-radius:0!important;box-shadow:none!important;color:#ead6ae!important;padding:8px 12px!important;
}
html body .action-scene-skip,html body .action-scene-top i{
 background:transparent!important;border:3px solid transparent!important;border-image:var(--window-frame) 180 fill / 7px / 0 stretch!important;box-shadow:none!important;border-radius:0!important;
}
html body .action-scene-dialogue{background:transparent!important;border:8px solid transparent!important;border-image:var(--group-frame) 180 fill / 14px / 0 stretch!important;box-shadow:none!important;border-radius:0!important}
/* Preserve owner identification without a second rectangular border. */
html body .province-browser-city::before{content:'';position:absolute;left:5px;top:9px;bottom:9px;width:3px;background:var(--province-city-owner,#a58c5f);pointer-events:none}
