#katomu-maintenance-banner {
    box-sizing: border-box;
    position: fixed;
    inset: 0 0 auto;
    z-index: 10020;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid #716248;
    background: #282319;
    color: #ffedcb;
    font: 500 14px/1.5 system-ui, sans-serif;
    text-align: center;
    overflow-wrap: anywhere;
}
#katomu-maintenance-banner[hidden] { display: none; }
#katomu-maintenance-banner[data-phase="succeeded"] { background: #173329; border-color: #376e59; color: #d7f7e4; }
/* Owner 2026-10-15: once the countdown ends the banner turns red until the update finishes. */
#katomu-maintenance-banner[data-phase="draining"],
#katomu-maintenance-banner[data-phase="deploying"] { background: #3a1517; border-color: #8f3439; color: #ffdede; }
body[data-maintenance-visible] { padding-top: var(--maintenance-banner-height) !important; }
body[data-maintenance-visible] #chat-screen,
body[data-maintenance-visible] #start-screen { height: calc(100dvh - var(--maintenance-banner-height)) !important; }
body[data-maintenance-visible][data-katomu-admin-icons] > aside {
    top: var(--maintenance-banner-height);
    max-height: calc(100dvh - var(--maintenance-banner-height));
}
body[data-maintenance-visible][data-fic-version] .site-header { top: var(--maintenance-banner-height); }
/* Owner 2026-10-15: the open chat sidebar and its overlay cover the banner. */
body[data-maintenance-visible] .sidebar-overlay { z-index: 10024; }
body[data-maintenance-visible] .chats-sidebar.open { z-index: 10025; }
.katomu-maintenance-status {
    position: absolute; width: 1px; height: 1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (max-width: 480px) {
    #katomu-maintenance-banner { text-align: left; font-size: 13px; }
}
#katomu-maintenance-personal-notice {
    position: fixed; z-index: 10030; inset: auto 16px max(16px, env(safe-area-inset-bottom, 0px));
    max-width: 560px; margin: 0 auto; padding: 14px 18px; border: 1px solid #716248;
    border-radius: 12px; background: #282319; color: #ffedcb; font: 14px/1.5 system-ui, sans-serif;
}
