/* The management window owns the material; containers never paint an inset mat. */
html body dialog#modal[open]:has(.affairs-panel){
 display:block!important;width:min(900px,calc(100vw - 24px))!important;
 height:min(760px,calc(100dvh - 24px))!important;max-height:calc(100dvh - 24px)!important;
 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;overflow:hidden!important;
}
html body dialog#modal[open]:has(.affairs-panel) #modal-content{
 display:block!important;height:100%!important;max-height:100%!important;
 overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;
 background:transparent!important;box-shadow:none!important;
}
html body dialog#modal[open]:has(.affairs-panel) .modal-top{
 position:static!important;inset:auto!important;transform:none!important;
 background:transparent!important;box-shadow:none!important;
}
html body dialog#modal[open]:has(.affairs-panel) .window-reading-body,
html body dialog#modal[open] .affairs-panel,
html body dialog#modal[open] .affairs-content{
 display:block!important;height:auto!important;max-height:none!important;min-height:0!important;
 overflow:visible!important;background:transparent!important;box-shadow:none!important;
}
html body dialog#modal[open] .affairs-panel :is(section,article,nav,details,summary,div){
 background-color:transparent!important;box-shadow:none!important;
}
html body dialog#modal[open] .affairs-panel :is(.affairs-tabs,.affairs-meters){display:grid!important;margin-bottom:12px}
html body dialog#modal[open] .affairs-panel :is(button,select){
 background:transparent!important;box-shadow:none!important;border:3px solid transparent!important;
 border-image:url('assets/ui-window-lacquer-1029.webp') 180 fill / 7px / 0 stretch!important;
 border-radius:0!important;color:#eee0c4!important;
}
html body dialog#modal[open] .affairs-panel button[aria-pressed=true]{
 border-image-source:url('assets/ui-window-bronze-charcoal-1029.webp')!important;color:#ffe3a0!important;
}
html body dialog#modal[open] .affairs-panel :is(article,.affairs-promise){
 background:transparent!important;border:4px solid transparent!important;
 border-image:url('assets/ui-window-bronze-charcoal-1029.webp') 180 fill / 9px / 0 stretch!important;
 border-radius:0!important;
}
html body dialog#modal[open] .affairs-content{padding-bottom:14px!important}
@media(max-width:700px){
 html body dialog#modal[open]:has(.affairs-panel){border-width:7px!important;border-image-width:18px!important}
 html body dialog#modal[open]:has(.affairs-panel) .window-reading-body{padding:0 12px 12px!important}
}
