/* Shared footer geometry only. Native game colors and the approved banner remain intact. */
body:has(.cd-footer-compact) { margin: 0; }
body > .wrapper:has(.cd-footer-compact) {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto !important;
    --cd-footer-height: 76px;
}
body > .wrapper:has(.cd-footer-compact) > * { flex-shrink: 0; }
body > .wrapper:has(.cd-footer-compact) > div#mid {
    flex: 1 0 auto;
    margin-bottom: 0;
}
body:not(.cd-public):not(.cd-public-auth) > .wrapper:has(.cd-footer-compact) > div#mid {
    display: flow-root;
}
body:has(.cd-footer-compact) .footer-stopper { display: none; }
body div#footer.cd-site-footer.cd-footer-compact,
body footer.cd-footer.cd-site-footer.cd-footer-compact {
    box-sizing: border-box;
    position: relative;
    clear: both;
    inset: auto;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: var(--cd-footer-height, 76px);
    height: auto;
    margin: auto 0 0;
    padding: 0;
    border: 0;
    border-top: 1px solid #dedede;
    background: #f4f4f4;
    color: #666;
    font: 11px/18px Arial, Verdana, sans-serif;
    text-align: left;
}
/* Native entrypoints may include the shared footer inside #mid. The wrapper
   remains its containing block; padding reserves a row below every float. */
body:not(.cd-public):not(.cd-public-auth) div#mid:has(> #footer.cd-footer-compact) {
    box-sizing: border-box;
    min-height: calc(100vh - 172px);
    padding-bottom: var(--cd-footer-height, 76px);
}
body div#mid > div#footer.cd-site-footer.cd-footer-compact {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    margin: 0;
}
.cd-footer-compact .cd-footer-row {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 980px;
    max-width: 100%;
    min-width: 0;
    min-height: calc(var(--cd-footer-height, 76px) - 1px);
    margin: 0 auto;
    padding: 8px 12px;
}
body div#footer.cd-footer-compact .cd-footer-row { padding-right: 54px; }
.cd-footer-compact .cd-footer-wordmark { display: block; flex: 0 0 144px; line-height: 0; }
.cd-footer-compact .cd-footer-brand-logo {
    display: block;
    width: 144px;
    height: 48px;
    max-width: 100%;
    border: 0;
    object-fit: contain;
}
.cd-footer-compact .cd-footer-details { flex: 1 1 auto; min-width: 0; }
.cd-footer-compact .cd-footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 16px;
}
.cd-footer-compact .cd-footer-copyright { flex: 0 0 auto; white-space: nowrap; }
.cd-footer-compact .cd-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
}
body .cd-footer-compact .cd-footer-nav a,
body .cd-footer-compact .cd-footer-wordmark {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: 18px;
    white-space: nowrap;
    text-decoration: none;
}
.cd-footer-compact .cd-footer-nav a + a::before {
    content: "\00b7";
    display: inline-block;
    margin: 0 7px;
    color: #888;
}
.cd-footer-compact .cd-footer-engine {
    display: block;
    margin: 3px 0 0;
    color: inherit;
    font: inherit;
    font-size: 10px;
}
body .cd-footer-compact a:hover { text-decoration: underline; }
body .cd-footer-compact a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
body:is(.cd-public, .cd-public-auth) .cd-footer-compact {
    background: var(--dom-cream-dark, #eee);
    color: var(--dom-muted, #666);
    border-top-color: var(--dom-gold, #c7b183);
}
body.cd-public .cd-footer-compact .cd-footer-row { width: 1176px; padding-inline: 20px; }
@media (max-width: 800px) {
    body > .wrapper:has(.cd-footer-compact) { --cd-footer-height: 132px; }
    .cd-footer-compact .cd-footer-row {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: center;
        gap: 6px 12px;
    }
    .cd-footer-compact .cd-footer-wordmark { grid-column: 1; grid-row: 1; }
    .cd-footer-compact .cd-footer-brand-logo { width: 120px; height: 40px; }
    .cd-footer-compact .cd-footer-details,
    .cd-footer-compact .cd-footer-meta { display: contents; }
    .cd-footer-compact .cd-footer-copyright { grid-column: 2; grid-row: 1; }
    .cd-footer-compact .cd-footer-nav { grid-column: 1 / -1; grid-row: 2; }
    .cd-footer-compact .cd-footer-nav a + a::before { margin: 0 5px; }
    body .cd-footer-compact .cd-footer-nav a { white-space: normal; }
    .cd-footer-compact .cd-footer-engine { grid-column: 1 / -1; grid-row: 3; margin-top: 0; line-height: 15px; }
}
