/* Shared window surfaces. A disclosure is text on the parent material, not a panel. */
html body dialog#modal[open] .modal-top{
 position:static!important;background:transparent!important;box-shadow:none!important;
}
html body :is(dialog#modal,.palace-sheet,.castle-city-sheet,.province-browser-dialog,.conquest-target-dialog) :is(details,summary,fieldset){
 background:transparent!important;border:0!important;border-image:none!important;
 box-shadow:none!important;border-radius:0!important;
}
html body :is(dialog#modal,.palace-sheet) :is(.faction-details,.faction-economy-details,.faction-detail-grid,.faction-detail-note,.modal-copy,.window-reading-body,.affairs-panel,.affairs-content,.affairs-house,.affairs-news){
 background:transparent!important;box-shadow:none!important;
}
html body :is(dialog#modal,.palace-sheet) .faction-economy-details{padding:8px 0!important;margin-top:12px!important}
html body :is(dialog#modal,.palace-sheet) .faction-economy-details>summary{padding:10px 8px!important;min-height:44px}
/* Actual controls have an authored surface even outside the original card lists. */
html body :is(dialog#modal,.palace-sheet,.castle-city-sheet,.province-browser-dialog,.conquest-target-dialog) :is(button,input:not([type=range]):not([type=checkbox]):not([type=radio]),select){
 background:transparent!important;border:3px solid transparent!important;
 border-image:url('assets/ui-window-lacquer-1029.webp') 180 fill / 7px / 0 stretch!important;
 box-shadow:none!important;border-radius:0!important;color:#eee0c4;
}
html body :is(dialog#modal,.palace-sheet) :is(button[aria-pressed=true],button[aria-selected=true]){
 border-image-source:url('assets/ui-window-bronze-charcoal-1029.webp')!important;color:#ffe3a0!important;
}
/* The same enclosing artwork applies regardless of which management tab is open. */
html body dialog#modal[data-window-surface=affairs]{
 border:10px solid transparent!important;
 border-image:url('assets/ui-window-lacquer-1029.webp') 180 fill / 24px / 0 stretch!important;
 background:transparent!important;box-shadow:none!important;
}
html body dialog#modal[data-window-surface=affairs] :is(#modal-content,.window-reading-body,.modal-top){background:transparent!important;box-shadow:none!important}
html body dialog#modal[data-window-surface=affairs] .modal-top{position:static!important}
@media(max-width:700px){html body dialog#modal[data-window-surface=affairs]{border-width:7px!important;border-image-width:18px!important}}

/* Separate artwork from the scroll surface for iOS dialog compositing. */
html body dialog#modal[open][data-window-surface=affairs]{isolation:isolate;border-image:none!important}
html body dialog#modal[open][data-window-surface=affairs]>.affairs-window-material{
 display:block!important;position:absolute!important;inset:0!important;
 width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
 opacity:1!important;z-index:0!important;pointer-events:none!important;
 transform:none!important;filter:none!important;
}
html body dialog#modal[open][data-window-surface=affairs]>#modal-content{position:relative!important;z-index:1!important}

html body dialog#modal[open][data-window-surface=affairs]>.affairs-window-material{
 box-sizing:border-box!important;border:18px solid transparent!important;
 border-image:url('assets/ui-window-lacquer-1029.webp') 180 fill / 18px / 0 stretch!important;

 background-image:url('assets/ui-window-lacquer-1029.webp')!important;
 background-position:center!important;background-size:300% 300%!important;
 background-clip:padding-box!important;
}
