/* ART16 Dark: native Gallery2 administration */
#gallery :is(#siteAdminForm,#itemAdminForm) > table {width:100%;}
#gallery :is(#siteAdminForm,#itemAdminForm) > table > tbody > tr {display:flex;align-items:flex-start;gap:20px;}
#gallery :is(#siteAdminForm,#itemAdminForm) > table > tbody > tr > td:first-child {flex:0 0 220px;width:220px;}
#gallery :is(#siteAdminForm,#itemAdminForm) > table > tbody > tr > td:last-child {flex:1 1 0;min-width:0;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar {width:auto;background:var(--art16-surface);border:1px solid var(--art16-border);border-radius:var(--art16-radius);padding:12px;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar h2 {font-size:18px;margin-bottom:12px;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar a {display:inline-block;padding:3px 0;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsContent {min-width:0;max-width:100%;overflow-wrap:anywhere;}
#gallery :is(#siteAdminForm,#itemAdminForm) input[type=submit],#gallery :is(#siteAdminForm,#itemAdminForm) button {border-radius:6px;padding:8px 12px;border:1px solid var(--art16-border);background:var(--art16-raised);color:var(--art16-text);cursor:pointer;}
#gallery :is(#siteAdminForm,#itemAdminForm) .gbTabBar {background:none;white-space:normal;display:flex;flex-wrap:wrap;gap:6px;padding:8px 0;}
#gallery :is(#siteAdminForm,#itemAdminForm) .gbTabBar span.o,#gallery :is(#siteAdminForm,#itemAdminForm) .gbTabBar span span {background:none;padding:6px;}
#gallery :is(#siteAdminForm,#itemAdminForm) .gbTabBar span.giSelected {border-bottom:2px solid var(--art16-accent);}
#gallery :is(#siteAdminForm,#itemAdminForm) .gbTabBar span.giSelected span {color:var(--art16-accent);}
@media(max-width:1023px){
 #gallery :is(#siteAdminForm,#itemAdminForm) > table > tbody > tr {flex-direction:column;gap:12px;}
 #gallery :is(#siteAdminForm,#itemAdminForm) > table > tbody > tr > td:first-child,#gallery :is(#siteAdminForm,#itemAdminForm) > table > tbody > tr > td:last-child {width:100%;flex:auto;box-sizing:border-box;min-width:0;}
 #gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar {box-sizing:border-box;max-width:100%;}
 #gallery :is(#siteAdminForm,#itemAdminForm) #gsContent {overflow-x:auto;}
}

/* ART16 Faces: theme-local component palette */
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) {
 font-family:var(--art16-font);background:var(--art16-surface)!important;color:var(--art16-text)!important;
 border-color:var(--art16-border)!important;border-radius:var(--art16-radius);min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere;
}
#gallery :is(.af-heading,.af-match-heading,.af-person-heading,.af-editor-heading,.af-album-tools-heading) {border-color:var(--art16-border);}
#gallery :is(.af-heading,.af-match-heading,.af-person-heading,.af-editor-heading,.af-album-tools-heading) h2 {color:var(--art16-text)!important;}
#gallery :is(.af-heading,.af-match-heading,.af-person-heading,.af-editor-heading,.af-album-tools-heading) span {color:var(--art16-muted);}
#gallery :is(.af-settings,.af-match-technical,.af-match-toolbar,.af-person-help,.af-editor-settings,.af-editor-save,.af-album-status,.af-album-assign,.af-person-actions[open],.art16faces-audit-panel,.af-editor-content) {background:var(--art16-raised)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(h2,h3,label,summary,p) {color:var(--art16-text)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) a {color:var(--art16-accent)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(input[type=text],input[type=search],input[type=number],select,textarea) {background:var(--art16-bg)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;max-width:100%;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) input:focus {outline-color:var(--art16-accent);}
#gallery :is(.af-match-card,.af-person-card,.art16-album-face-card,.art16-album-face-group) {background:var(--art16-raised)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;max-width:100%;}
#gallery :is(.af-match-card.af-match-uncertain,.af-person-card.af-suspect) {background:#342c20!important;border-color:#80683f!important;}
#gallery .af-match-card:has(input:checked) {outline:2px solid var(--art16-accent);background:#363429!important;}
#gallery :is(.af-match-tabs,.af-person-tabs,.af-album-tabs) a {background:var(--art16-raised)!important;border-color:var(--art16-border)!important;color:var(--art16-accent)!important;}
#gallery :is(.af-match-tabs a.af-active,.af-person-tabs strong,.af-album-tabs strong) {background:var(--art16-accent)!important;color:var(--art16-bg)!important;border-color:var(--art16-accent)!important;}
#gallery :is(.af-match-toolbar button,.af-editor-save input,.af-album-assign button) {background:var(--art16-accent)!important;color:var(--art16-bg)!important;border-color:var(--art16-accent)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) .gbDataTable {background:var(--art16-surface)!important;color:var(--art16-text)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) .gbDataTable th {background:var(--art16-raised)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) .gbDataTable td {background:var(--art16-surface)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;}
#gallery .af-directory tr.art16faces-person-row:hover td,#gallery .af-editor #art16faces-labels-table>tbody>tr:focus-within>td {background:var(--art16-raised)!important;}
#gallery .af-directory tr.art16faces-person-row button {background:var(--art16-raised)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;}
#gallery :is(.af-album-danger,.af-directory .af-person-actions button.af-remove-labels,.af-editor button[name*="[rejectSelected]"],.af-album-tools button[name*="[removeUnsigned]"]) {background:#392326!important;color:#f1afb4!important;border-color:#754147!important;}
#gallery .af-album-danger p {color:#f1afb4!important;}
#gallery .art16faces-audit-panel :is(h3,p,strong) {color:var(--art16-text)!important;}
#gallery .af-person-page strong:not(.af-person-tabs strong) {color:var(--art16-text)!important;}
#gallery :is(.af-match-toolbar div,.af-match-heading span) {color:var(--art16-muted);}
#gallery :is(.af-match-card,.af-person-card,.art16-album-face-card,.af-editor-photo) :is(img,canvas) {max-width:100%;}
@media(max-width:767px){
 #gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) {padding:12px;}
 #gallery :is(.af-match-card,.af-person-card) {width:min(100%,192px);}
 #gallery :is(.af-match-toolbar,.af-album-assign,.af-person-pagination) {flex-wrap:wrap;}
 #gallery :is(.af-match-toolbar button,.af-editor-save input,.af-album-assign button) {min-height:var(--art16-control-height);max-width:100%;white-space:normal;}
 #gallery .af-editor-photo img {height:auto;}
}

/* Compatibility with legacy inline component colors. */
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff;"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff\""],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:white"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#f4f7fb"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#f4f7fa"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#f8f9fb"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#f6f8fa"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#edf3f9"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#edf3f8"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#e7f0f8"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#e8eef4"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#eef1f4"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#f8f9fa"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#e4eef7"] {background:var(--art16-raised)!important;color:var(--art16-text)!important;border-color:var(--art16-border)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#1c2734"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#203044"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#162436"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#193047"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#172e42"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#1d2e40"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#203850"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#173047"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#263746"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#1c2d40"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#302319"] {color:var(--art16-text)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#405260"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#576574"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#514130"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#64748b"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#385468"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#555;"] {color:var(--art16-muted)!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff1cb"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff1ca"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff8e8"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#eed99e"] {background:#342c20!important;color:#efcf91!important;border-color:#80683f!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#6c3b04"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#543d00"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#803a00"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#805500"] {color:#efcf91!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff3f1"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#fff5f5"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#ffe6e6"] {background:#392326!important;color:#f1afb4!important;border-color:#754147!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#832b26"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#833a32"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#810e0e"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#702e27"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#7b1616"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#a32c32"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#a31313"] {color:#f1afb4!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="background:#e5f4e7"] {background:#203529!important;color:#b5d8bd!important;border-color:#41684e!important;}
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#286139"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#174628"],
#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(div,p,span,strong,caption,table,td,th,label,button,a)[style*="color:#246033"] {color:#b5d8bd!important;}

#gallery :is(.af-directory,.af-matches,.af-person-page,.af-editor,.af-album-tools) :is(button,input[type=submit])[style*="background:#145b90"] {background:var(--art16-accent)!important;color:var(--art16-bg)!important;border-color:var(--art16-accent)!important;}
#gallery .af-album-tools .art16-album-exclusion-icon {color:white!important;}
#gallery .af-editor .af-editor-photo span strong,#gallery .af-album-tools .art16-album-rectangle strong {background:#172e42!important;color:white!important;}
#gallery :is(.af-directory,.af-editor,.af-album-tools) :is(input,button):focus-visible {outline:2px solid var(--art16-accent);outline-offset:2px;}

/* Administrative navigation without legacy bitmap icons. */
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar ul {list-style:none;margin:0;padding:0;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar li {list-style:none;background-image:none!important;margin:0;padding:0;line-height:1.5;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar li a {display:block;background-image:none!important;padding:6px 9px!important;border-radius:5px;line-height:1.5;overflow-wrap:anywhere;text-decoration:none;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar li a::before {background-image:none!important;content:none!important;}
#gallery :is(#siteAdminForm,#itemAdminForm) #gsSidebar li a:hover {background:var(--art16-raised);color:var(--art16-accent);}
#gallery #gbSiteAdminLinks > li > span {display:block;color:var(--art16-muted);font-size:12px;font-weight:500;padding:14px 9px 5px;}
#gallery #gbSiteAdminLinks > li > ul {margin-bottom:6px;}
