.tnx-guest-banner {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    box-sizing: border-box;
    width: 100%;
    padding: .85rem 1rem;
    text-align: center;
    line-height: 1.6;
    color: var(--text-color, #eee);
    background: var(--bg-color, #1a1a1a);
    border-bottom: 1px solid var(--border-color, #888);
    box-shadow: 0 0 0 transparent;
    overflow-wrap: anywhere;
}
.tnx-guest-banner-glow { animation: tnx-guest-glow 5s ease-out; }
:root { --tnx-guest-banner-height: 0px; }
body { padding-top: var(--tnx-guest-banner-height); }
body > header { top: var(--tnx-guest-banner-height); }
body > main { min-height: calc(100vh - var(--tnx-guest-banner-height)); }
body > main:has(> .calendar-page) { min-height: 0; }
body > main:has(> .interactive-table-page) { height: calc(100dvh - var(--tnx-guest-banner-height)); min-height: 0; }
body .calendar-page { height: calc(100dvh - 2rem - var(--tnx-guest-banner-height)); }
body.data-canvas-page, body.file-viewer-page { box-sizing: border-box; }
body.index-page .chat-container { min-height: calc(100vh - 2rem - var(--tnx-guest-banner-height)); }
body.index-page .chat-empty-state { top: var(--tnx-guest-banner-height); }
body.index-page .clean-button { top: calc(10px + var(--tnx-guest-banner-height)); }
body.index-page .storage-trim-notice { top: calc(max(1rem, env(safe-area-inset-top, 0px)) + var(--tnx-guest-banner-height)); }
.tnx-guest-banner[hidden] { display: none; }
.tnx-guest-banner a { white-space: normal; font-weight: 600; }
/* Keep login-only cards at half opacity even with the reduced-opacity preference. */
.menu-item[data-tnx-guest-return],
.menu-item[data-tnx-guest-auth="login"] {
    opacity: var(--tnx-guest-login-card-opacity, .5) !important;
}
@keyframes tnx-guest-glow {
    from { box-shadow: 0 0 24px 5px color-mix(in srgb, var(--link-color) 75%, transparent); }
    to { box-shadow: 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .tnx-guest-banner-glow { animation: none; }
}
/* The question before adding guest items lists one local item per line. */
#tnx-modal-message.tnx-guest-import-message { white-space: pre-line; text-align: left; }
#tnx-modal-message.tnx-guest-import-message .tnx-modal-list {
    display: inline-block;
    box-sizing: border-box;
    width: 100%;
    white-space: normal;
    vertical-align: bottom;
}
#tnx-modal-message.tnx-guest-import-message .tnx-modal-list > span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* Match the calendar team-member scrollbox, keeping the question and actions outside. */
#tnx-modal-message.tnx-guest-import-message .tnx-modal-scrollbox {
    max-height: min(calc(16em + .7rem + 2px), 35vh);
    padding: .35rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
