:root {
    --user-profile-banner-aspect: 5 / 2;
    --community-banner-aspect: 16 / 9;
    --font-sans: "Inter", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", sans-serif;
    --chat-text-font: var(--font-sans);
    --chat-text-size: 1rem;
    --chat-line-height: 1.35;
    --chat-text-weight: 400;
    --chat-strong-weight: 700;
    --chat-content-column: 4.15rem;
    --chat-inline-emoji-size: 1.3em;
    --iridium-accent: #6677e8;
    --iridium-bg-base: #20232d;
    --iridium-bg-surface: #292d38;
    --bg-deep: #111319;
    --bg-sidebar: #1a1d25;
    --bg-base: var(--iridium-bg-base);
    --surface-panel: var(--iridium-bg-surface);
    --surface-raised: #303542;
    --surface-hover: #363b49;
    --surface-active: #3d4353;
    --popup-surface: var(--bg-deep);
    --popup-shadow: 0 .8rem 2rem #000a;
    --input-bg: #12151b;
    --border: #424857;
    --border-subtle: #2b2f3a;
    --text-strong: #f4f6fb;
    --text: #d8dce6;
    --text-muted: #a8afbd;
    --text-faint: #757e90;
    --accent: var(--iridium-accent);
    --accent-soft: #9ba7ff;
    --accent-deep: #7051ad;
    --scrollbar-thumb: #4b5160;
    --scrollbar-thumb-hover: #606879;
    --danger: #c94f58;
    --danger-text: #ff9da4;
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --radius-sm: .4rem;
    --radius-md: .65rem;
    --radius-lg: .9rem;
    --bottom-control-height: calc(3.7rem + 2px);
    --bottom-control-inset: .55rem;
    --desktop-community-rail-width: 4.75rem;
    --desktop-secondary-sidebar-width: 15.5rem;
    --desktop-profile-region-width: calc(var(--desktop-community-rail-width) + var(--desktop-secondary-sidebar-width));
    --layer-context-menu: 92;
    --layer-floating-media: 95;
    --layer-modal: 100;
}

.inline-emoji-token {
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: var(--chat-inline-emoji-size) !important;
    height: var(--chat-inline-emoji-size) !important;
    min-width: var(--chat-inline-emoji-size);
    min-height: var(--chat-inline-emoji-size);
    padding: 0 !important;
    margin: 0 .08em !important;
    border: 0;
    line-height: 1 !important;
    vertical-align: middle !important;
    background: transparent;
    flex: none;
}

.inline-emoji-token > .standard-emoji-artwork,
.inline-emoji-token > .community-emoji,
.inline-emoji-token > .community-emoji-placeholder,
.inline-emoji-token > img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0;
    padding: 0;
    object-fit: contain;
    background: transparent;
}

.display-name {
    font-weight: 400 !important;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg-deep); font-synthesis: none; }
button, input, textarea, select { font: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

@media (max-width: 860px) { :root { --chat-content-column: 3.5rem; } }
.iridium-textarea-scrollbar { scrollbar-width: auto; scrollbar-color: color-mix(in srgb, var(--surface-raised) 45%, black) transparent; }
.iridium-textarea-scrollbar::-webkit-scrollbar { width: 1rem; }
.iridium-textarea-scrollbar::-webkit-scrollbar-track, .iridium-textarea-scrollbar::-webkit-scrollbar-corner { background: transparent; }
.iridium-textarea-scrollbar::-webkit-scrollbar-thumb { min-height: 1.5rem; border: 3px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--surface-raised) 45%, black); background-clip: padding-box; }
.iridium-textarea-scrollbar::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--surface-raised) 58%, black); }
.iridium-textarea-scrollbar::-webkit-scrollbar-button,
.iridium-textarea-scrollbar::-webkit-scrollbar-button:single-button,
.iridium-textarea-scrollbar::-webkit-scrollbar-button:vertical:start:decrement,
.iridium-textarea-scrollbar::-webkit-scrollbar-button:vertical:end:increment { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }

/* Use the message-history scrollbar as Iridium's default on every scrollable surface. */
* { scrollbar-width: auto; scrollbar-color: color-mix(in srgb, var(--accent) 82%, transparent) transparent; }
*::-webkit-scrollbar { width: .9rem; height: .9rem; }
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb { min-width: 2rem; min-height: 2rem; border: 2px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--accent) 82%, transparent); background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--accent) 96%, white 4%); }
*::-webkit-scrollbar-button,
*::-webkit-scrollbar-button:single-button,
*::-webkit-scrollbar-button:vertical:start:decrement,
*::-webkit-scrollbar-button:vertical:end:increment,
*::-webkit-scrollbar-button:horizontal:start:decrement,
*::-webkit-scrollbar-button:horizontal:end:increment { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }

#blazor-error-ui { display: none; position: fixed; z-index: 1000; inset: auto 1rem 1rem; padding: .8rem 1rem; border: 1px solid #a54b4b; border-radius: .5rem; color: white; background: #7d3030; }
#blazor-error-ui .dismiss { position: absolute; right: .6rem; cursor: pointer; }
.blazor-error-boundary { padding: 1rem; color: white; background: #7d3030; }
.loading-progress { position: absolute; width: 5rem; height: 5rem; inset: 35vh 0 auto; margin: auto; }.loading-progress circle { fill: none; stroke: var(--surface-raised); stroke-width: .6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }.loading-progress circle:last-child { stroke: var(--accent); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8),500%; }.loading-progress-text { position: absolute; inset: calc(35vh + 2rem) 0 auto; text-align: center; }.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading"); }

/* Shared desktop Community sidebar interaction: the row retains its broad hit target while
   only the icon/name/action surface receives hover and active paint. */
@media (min-width:861px) {
    .sidebar-nav-row > .sidebar-nav-surface {
        box-sizing: border-box;
        min-width: 0;
        width: auto;
        max-width: none;
        display: flex;
        align-items: center;
        flex: 1 1 0;
        border-radius: .42rem;
        color: inherit;
        background: transparent;
        transition: color 100ms ease, background 100ms ease;
    }
    .sidebar-nav-row:hover > .sidebar-nav-surface {
        color: var(--text);
        background: color-mix(in srgb, var(--surface-hover) 72%, transparent);
    }
    .sidebar-nav-row.is-active > .sidebar-nav-surface {
        color: var(--text-strong);
        background: color-mix(in srgb, var(--surface-active) 88%, var(--accent) 12%);
    }
    .sidebar-nav-row.is-active:hover > .sidebar-nav-surface {
        color: var(--text-strong);
        background: color-mix(in srgb, var(--surface-active) 82%, var(--accent) 18%);
    }
}
