﻿
:root {
    --ColorSurface:      rgb(255, 255, 255);
    --ColorCanvas:       rgb(250, 250, 250);
    --ColorHover:        rgb(235, 235, 235);
    --ColorInput:        rgb(250, 250, 250);
    --ColorBorder:       rgb(229, 229, 229);
    --ColorBorderStrong: rgb(209, 209, 209);
    --ColorDivider:      rgb(230, 230, 230);
    --ColorText:         rgb(10, 10, 10);
    --ColorTextSoft:     rgb(107, 107, 107);
    --ColorTextFaint:    rgb(155, 155, 155);
    --ColorIcons:        rgb(155, 155, 155);
    --ColorIconActive:   rgb(0, 0, 0);
    --ColorIconEnergetic: rgb(0, 0, 0);
    --ColorInk:          rgb(0, 0, 0);
    --ColorInkInverse:   rgb(255, 255, 255);
    --ColorDanger:       rgb(217, 45, 33);
    --ColorSuccess:      rgb(10, 145, 70);

    --SelectColor:       rgba(0, 0, 0, 0.25);
    --SliderTrackBg:     rgb(229, 229, 229);

    --RadiusSm:   10px;
    --RadiusMd:   15px;
    --RadiusLg:   20px;
    --RadiusFull: 999px;

    --SpaceXs: 5px;
    --SpaceSm: 10px;
    --SpaceMd: 15px;
    --SpaceLg: 20px;
    --SpaceXl: 30px;

    --FontUi:   "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    --FontMono: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --FontCode: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

    --SizeTextXs: 13px;
    --SizeTextSm: 15px;
    --SizeTextMd: 17px;
    --SizeTextXl: 23px;

    --SizeIconXs: 13px;
    --SizeIconSm: 15px;
    --SizeIconLg: 21px;

    --WeightRegular:  400;
    --WeightMedium:   500;
    --WeightSemibold: 600;

    --DurationFast: 150ms;
    --DurationBase: 300ms;
    --EaseOut: cubic-bezier(0.25, 1, 0.5, 1);

    --ShadowSm:    0px 1px 3px rgba(0, 0, 0, 0.10);
    --ShadowFloat: 0px 5px 20px rgba(10, 10, 10, 0.05);
    --ShadowLg:    0px 10px 30px rgba(0, 0, 0, 0.20);

    --LayoutSidebar: 260px;
    --LayoutContent: 720px;
}

[data-theme="dark"] {
    --ColorSurface:      rgb(20, 20, 20);
    --ColorCanvas:       rgb(10, 10, 10);
    --ColorHover:        rgb(35, 35, 35);
    --ColorInput:        rgb(33, 33, 33);
    --ColorBorder:       rgb(40, 40, 40);
    --ColorBorderStrong: rgb(60, 60, 60);
    --ColorDivider:      rgb(35, 35, 35);
    --ColorText:         rgb(245, 245, 245);
    --ColorTextSoft:     rgb(165, 165, 165);
    --ColorTextFaint:    rgb(115, 115, 115);
    --ColorIcons:        rgb(155, 155, 155);
    --ColorIconActive:   rgb(255, 255, 255);
    --ColorIconEnergetic: rgb(255, 255, 255);
    --ColorInk:          rgb(255, 255, 255);
    --ColorInkInverse:   rgb(10, 10, 10);
    --SelectColor:       rgba(255, 255, 255, 0.25);
    --SliderTrackBg:     rgb(50, 50, 50);
    --ShadowFloat:       0px 5px 20px rgba(0, 0, 0, 0.50);
}



*, *::before, *::after { box-sizing: border-box; margin: 0px; padding: 0px; }

html, body { height: 100%; }

body {
    font-family: var(--FontUi);
    font-size: var(--SizeTextMd);
    line-height: 1.5;
    color: var(--ColorText);
    background: var(--ColorSurface);
    -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

::selection { background: var(--SelectColor); color: inherit; }

.MessageUser .Bubble::selection,
.MessageUser .Bubble *::selection {
    background: rgba(255, 255, 255, 0.35);
    color: inherit;
}

button:focus-visible,
a:focus-visible { outline: 1px solid var(--ColorInk); outline-offset: 3px; }

::-webkit-scrollbar { width: 10px; height: 10px; }

::-webkit-scrollbar-thumb {
    background: var(--ColorBorderStrong);
    border-radius: var(--RadiusFull);
    border: 3px solid var(--ColorCanvas);
}

::-webkit-scrollbar-track { background: transparent; }

.Hidden { display: none !important; }

/* Role 1: Resting State — Passive icons at rest use ColorIcons for low visual noise. */
.Icon,
svg.Icon,
i[data-icon] {
    width: var(--SizeIconSm);
    height: var(--SizeIconSm);
    flex-shrink: 0;
    color: var(--ColorIcons);
    transition: color var(--DurationFast) var(--EaseOut);
}

/* Role 2: Engaged State — Transient interaction (:hover, :active, :focus, opened menu) and persistent assistant presence. */
button:hover .Icon,
button:active .Icon,
button:focus-visible .Icon,
button.Active .Icon,
a:hover .Icon,
a:active .Icon,
a:focus-visible .Icon,
.IconButton:hover .Icon,
.IconButton:active .Icon,
.IconButton:focus-visible .Icon,
.IconButton.Active .Icon,
.NavItem:hover .Icon,
.NavItem:active .Icon,
.NavItem:focus-visible .Icon,
.NavItem.Active .Icon,
.ChatItemAction:hover .Icon,
.ChatItemAction:active .Icon,
.ChatItemAction:focus-visible .Icon,
.ChatDropdownItem:hover .Icon,
.ChatDropdownItem:active .Icon,
.ChatDropdownItem:focus-visible .Icon,
.MetaAction:hover .Icon,
.MetaAction:active .Icon,
.MetaAction:focus-visible .Icon,
.SidebarQuickModeBtn:hover .Icon,
.SidebarQuickModeBtn:active .Icon,
.SidebarQuickModeBtn:focus-visible .Icon,
.CustomisationCard:hover .Icon,
.CustomisationCard:focus-visible .Icon,
.BackNavButton:hover .Icon,
.BackNavButton:focus-visible .Icon,
.ColorSwatch:hover .Icon,
.ColorSwatch.Active .Icon,
.AttachRemove:hover .Icon,
.AttachRemove:focus-visible .Icon,
.ChatItem.MenuOpen .ChatItemAction .Icon,
[aria-expanded="true"] .Icon,
.Icon:hover,
.Icon:active,
.EmptyTile .Icon,
.EmptyTile svg,
.AssistantAvatar .Icon,
.AssistantAvatar svg {
    color: var(--ColorIconActive);
}

/* Danger icons always use the danger pigment. */
.Danger .Icon,
.Danger:hover .Icon,
.Danger:active .Icon,
.Danger:focus-visible .Icon,
.ChatDropdownItem.Danger .Icon,
.ChatDropdownItem.Danger:hover .Icon,
.ChatDropdownItem.Danger:active .Icon,
.ButtonGhost.Danger .Icon,
.ButtonGhost.Danger:hover .Icon,
.ButtonGhost.Danger:active .Icon,
button.Danger .Icon,
button.Danger:hover .Icon,
button.Danger:active .Icon {
    color: var(--ColorDanger) !important;
}

/* Role 3: The Accent Inversion Rule — Elements painted with primary accent ColorInk use ColorInkInverse. */
body[data-view="Home"] .ChatItem.Active .Icon,
body[data-view="Home"] .ChatItem.Active:hover .Icon,
body[data-view="Home"] .ChatItem.Active .ChatItemAction .Icon,
body[data-view="Home"] .ChatItem.Active:hover .ChatItemAction .Icon,
body[data-view="Home"] .ChatItem.Active .ChatItemAction:hover .Icon,
body[data-view="Home"] .ChatItem.Active .ChatItemAction:active .Icon,
body[data-view="Home"] .ChatItem.Active .ChatItemAction.Active .Icon,
body[data-view="Home"] .ChatItem.Active .ChatPinBadge .Icon,
.ChatItem.Active .Icon,
.ChatItem.Active:hover .Icon,
.ChatItem.Active .ChatItemAction .Icon,
.ChatItem.Active:hover .ChatItemAction .Icon,
.ChatItem.Active .ChatItemAction:hover .Icon,
.ChatItem.Active .ChatItemAction:active .Icon,
.ChatItem.Active .ChatItemAction.Active .Icon,
.ChatItem.Active .ChatPinBadge .Icon,
.ButtonPrimary,
.ButtonPrimary .Icon,
.ButtonPrimary:hover .Icon,
.ButtonPrimary:active .Icon,
.ComposerSend,
.ComposerSend .Icon,
.ComposerSend:hover .Icon,
.ComposerSend:active .Icon,
.JumpPill,
.JumpPill .Icon,
.JumpPill:hover .Icon,
.Toast,
.Toast span,
.Toast .Icon,
.Toast:hover .Icon,
.BubbleUser,
.BubbleUser .Icon,
.BubbleUser:hover .Icon,
.UserAuthButton:hover .Icon,
.UserAvatar:not(.Guest),
.UserAvatar:not(.Guest) .Icon,
.AccountAvatar:not(.Guest),
.AccountAvatar:not(.Guest) .Icon {
    color: var(--ColorInkInverse) !important;
}

/* Role 4: Energetic Icons — Vibrant icons signifying active features, quick modes, starters, and widgets. */
.IconEnergetic,
.Icon.Energetic,
[data-icon-role="energetic"],
.ChatDropdownItem:not(.Danger) .Icon,
.StarterIcon .Icon,
.StarterRow:hover .StarterIcon .Icon,
.SidebarQuickModeBtn .Icon,
.SidebarQuickModeBtn:hover .Icon,
.MapWidgetTitle .Icon {
    color: var(--ColorIconEnergetic);
}

.App {
    display: flex;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
}

.Sidebar {
    width: var(--LayoutSidebar);
    flex-shrink: 0;
    height: 100%;
    background: var(--ColorCanvas);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--ColorDivider);
    position: relative;
    z-index: 1;
    transition: margin-left var(--DurationBase) var(--EaseOut);
}

body.SidebarCollapsed .Sidebar {
    margin-left: calc(-1 * var(--LayoutSidebar));
}

body.SidebarCollapsed .MenuButton {
    display: grid !important;
}

.SidebarHeader {
    height: auto;
    min-height: 120px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 15px var(--SpaceSm) 11px;
}

.SidebarHeaderDefault {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity var(--DurationBase) var(--EaseOut),
                transform var(--DurationBase) var(--EaseOut);
}

.SidebarHeaderActions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    flex-shrink: 0;
}

.SidebarSearchRow {
    position: absolute;
    inset: 0px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 13px;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity var(--DurationBase) var(--EaseOut),
                transform var(--DurationBase) var(--EaseOut);
}

.SidebarHeader.SearchActive .SidebarHeaderDefault {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.SidebarHeader.SearchActive .SidebarSearchRow {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0px);
}

.SidebarSearchBox {
    flex: 1;
    min-width: 0px;
    height: 35px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0px 11px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusFull);
    background: var(--ColorInput);
    color: var(--ColorTextSoft);
    transition: border-color var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut);
}

.SidebarSearchBox:focus-within {
    border-color: var(--ColorInk);
    box-shadow: 0px 0px 0px 2px var(--SelectColor);
    color: var(--ColorText);
}

.SidebarSearchBox .Icon {
    width: var(--SizeIconSm);
    height: var(--SizeIconSm);
    flex-shrink: 0;
}

.SidebarSearchInput {
    flex: 1;
    min-width: 0px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ColorText);
    font: inherit;
    font-size: var(--SizeTextXs);
    padding: 0px;
}

.SidebarSearchInput::placeholder {
    color: var(--ColorTextFaint);
}

.SidebarSearchClose {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border-radius: var(--RadiusFull);
    display: grid;
    place-items: center;
}

.SidebarBrand {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 65px;
    min-height: 65px;
}

.SidebarBrandLogo {
    height: 150px;
    min-height: 150px;
    width: auto;
    max-width: 235px;
    object-fit: contain;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity var(--DurationFast) var(--EaseOut);
}

/* Light mode displays the light logo and hides the dark logo. */
.SidebarBrandLogo.LogoDark {
    display: none;
}

.SidebarBrandLogo.LogoLight {
    display: block;
}

/* Dark mode displays the dark logo and hides the light logo. */
[data-theme="dark"] .SidebarBrandLogo.LogoDark {
    display: block;
}

[data-theme="dark"] .SidebarBrandLogo.LogoLight {
    display: none;
}


.ChatNav {
    flex: 1;
    min-height: 0px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 10px 10px;
    gap: 5px;
}

.ChatEmpty {
    padding: var(--SpaceLg) var(--SpaceMd);
    font-size: var(--SizeTextSm);
    color: var(--ColorTextFaint);
    text-align: center;
}

.ChatItem {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 5px 9px 5px 13px;
    border: none;
    border-radius: var(--RadiusSm);
    background: transparent;
    color: var(--ColorTextSoft);
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-height: 35px;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.ChatItem:not(.Active):hover,
body:not([data-view="Home"]) .ChatItem:hover {
    background: var(--ColorHover) !important;
    color: var(--ColorText) !important;
}

.ChatItem:not(.Active):hover .ChatItemName,
body:not([data-view="Home"]) .ChatItem:hover .ChatItemName {
    color: var(--ColorText) !important;
}

/* Base Active utility state */
.Active {
    /* Identifies currently active elements */
}

/* Explicit Active conversation styling */
.ChatItem.Active,
body[data-view="Home"] .ChatItem.Active {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
}

.ChatItem.Active:hover,
body[data-view="Home"] .ChatItem.Active:hover {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
}

.ChatItem.Active .ChatItemName,
body[data-view="Home"] .ChatItem.Active .ChatItemName,
.ChatItem.Active:hover .ChatItemName,
body[data-view="Home"] .ChatItem.Active:hover .ChatItemName {
    color: var(--ColorInkInverse) !important;
}

.ChatItem.Active .ChatItemAction,
body[data-view="Home"] .ChatItem.Active .ChatItemAction,
.ChatItem.Active:hover .ChatItemAction,
body[data-view="Home"] .ChatItem.Active:hover .ChatItemAction {
    color: var(--ColorInkInverse) !important;
}

.ChatItem.Active .ChatItemAction:hover,
body[data-view="Home"] .ChatItem.Active .ChatItemAction:hover {
    color: var(--ColorInkInverse) !important;
}

/* Outside Home view, conversations lose active highlight and stay dormant */
body:not([data-view="Home"]) .ChatItem.Active,
body:not([data-view="Home"]) .ChatItem.Active:hover {
    background: transparent !important;
    color: var(--ColorTextSoft) !important;
}

body:not([data-view="Home"]) .ChatItem.Active .ChatItemName,
body:not([data-view="Home"]) .ChatItem.Active:hover .ChatItemName {
    color: var(--ColorTextSoft) !important;
}

body:not([data-view="Home"]) .ChatItem.Active .ChatPinBadge {
    color: var(--ColorInk) !important;
}

body:not([data-view="Home"]) .ChatItem.Active .Icon {
    color: var(--ColorIcons) !important;
}

.ChatItemBody {
    flex: 1;
    min-width: 0px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ChatItemName {
    flex: 1;
    min-width: 0px;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ChatPinBadge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--ColorInk);
}

.ChatPinBadge .Icon {
    width: 11px;
    height: 11px;
}

body[data-view="Home"] .ChatItem.Active .ChatPinBadge {
    color: var(--ColorInkInverse);
}

/* Conversation actions are strictly hidden by default and visible only in Home on the active item. */
.ChatItemActions,
.ChatItemAction {
    display: none !important;
}

.ChatItemActions {
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.ChatItemAction {
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    padding: 0px;
    border: none;
    border-radius: 5px;
    background: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    z-index: 5;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

/* Strictly visible ONLY when on Home view AND the specific chat item is .Active */
body[data-view="Home"] .ChatItem.Active .ChatItemActions,
body[data-view="Home"] .ChatItem.Active .ChatItemActions.Active {
    display: flex !important;
}

body[data-view="Home"] .ChatItem.Active .ChatItemAction,
body[data-view="Home"] .ChatItem.Active .ChatItemAction.Active {
    display: block !important;
}

/* Explicit negative overrides guarantee actions cannot be visible when inactive, hovered, or outside Home */
.ChatItem:not(.Active) .ChatItemActions,
.ChatItem:not(.Active) .ChatItemAction,
.ChatItem:not(.Active) .ChatItemActions.Active,
.ChatItem:not(.Active) .ChatItemAction.Active,
.ChatItem:not(.Active):hover .ChatItemActions,
.ChatItem:not(.Active):hover .ChatItemAction,
.ChatItem:hover:not(.Active) .ChatItemActions,
.ChatItem:hover:not(.Active) .ChatItemAction,
body:not([data-view="Home"]) .ChatItemActions,
body:not([data-view="Home"]) .ChatItemAction,
body:not([data-view="Home"]) .ChatItem .ChatItemActions,
body:not([data-view="Home"]) .ChatItem .ChatItemAction,
body:not([data-view="Home"]) .ChatItem.Active .ChatItemActions,
body:not([data-view="Home"]) .ChatItem.Active .ChatItemAction {
    display: none !important;
}

.ChatItemAction:hover {
    background: var(--ColorHover);
    color: var(--ColorIconActive);
}

.ChatItemAction * {
    pointer-events: none;
}

.ChatItemAction .Icon {
    width: var(--SizeIconSm);
    height: var(--SizeIconSm);
    display: inline-block;
    vertical-align: middle;
}

.ChatDropdown {
    position: fixed;
    z-index: 300;
    width: 140px;
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorderStrong);
    border-radius: var(--RadiusSm);
    box-shadow: var(--ShadowFloat);
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: DropdownFadeIn 0.15s var(--EaseOut);
}

.ChatDropdown.Hidden {
    display: none !important;
}

.ChatDropdownItem {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 5px 9px;
    border: none;
    border-radius: calc(var(--RadiusSm) - 5px);
    background: transparent;
    color: var(--ColorText);
    font: inherit;
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightMedium);
    cursor: pointer;
    text-align: left;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.ChatDropdownItem:not(.Danger):hover {
    background: var(--ColorHover);
    color: var(--ColorText);
}

.ChatDropdownItem.Danger,
#ChatDropdownDelete {
    color: var(--ColorDanger) !important;
}

.ChatDropdownItem.Danger .Icon,
#ChatDropdownDelete .Icon,
.ChatDropdownItem.Danger span,
#ChatDropdownDelete span {
    color: var(--ColorDanger) !important;
}

.ChatDropdownItem.Danger:hover,
.ChatDropdownItem.Danger:active,
.ChatDropdown .ChatDropdownItem.Danger:hover,
.ChatDropdown .ChatDropdownItem.Danger:active,
#ChatDropdownDelete:hover,
#ChatDropdownDelete:active,
[data-has-custom-bg="true"] .ChatDropdownItem.Danger:hover,
[data-theme="dark"] .ChatDropdownItem.Danger:hover {
    background: rgba(217, 45, 33, 0.12) !important;
    color: var(--ColorDanger) !important;
    border-color: rgba(217, 45, 33, 0.30) !important;
}

.ChatDropdownItem.Danger:hover span,
.ChatDropdownItem.Danger:hover .Icon,
#ChatDropdownDelete:hover span,
#ChatDropdownDelete:hover .Icon {
    color: var(--ColorDanger) !important;
}

.ChatDropdownItem .Icon {
    width: var(--SizeIconXs);
    height: var(--SizeIconXs);
    flex-shrink: 0;
}

.ChatDropdownItem:not(.Danger) .Icon,
.ChatDropdownItem:not(.Danger):hover .Icon,
.ChatDropdownItem:not(.Danger):active .Icon,
.ChatDropdownItem:not(.Danger):focus-visible .Icon {
    color: var(--ColorIconEnergetic) !important;
}

.ChatDropdownDivider {
    height: 1px;
    background: var(--ColorDivider);
    margin: 3px 0px;
}

.ChatDropdownTime {
    padding: 3px 9px 5px;
    font-size: var(--SizeTextXs);
    color: var(--ColorTextFaint);
    text-align: center;
    white-space: nowrap;
}

@keyframes DropdownFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.ChatRenameInput {
    width: 100%;
    padding: 3px 5px;
    border: none;
    border-bottom: 2px solid var(--ColorInk);
    border-radius: 3px 3px 0px 0px;
    background: var(--SelectColor);
    color: var(--ColorText);
    font: inherit;
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightMedium);
    line-height: 1.5;
    outline: none;
    box-sizing: border-box;
}

.ChatRenameInput::selection {
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
}

body[data-view="Home"] .ChatItem.Active .ChatRenameInput {
    color: var(--ColorInkInverse) !important;
    border-bottom-color: var(--ColorInkInverse);
    background: rgba(255, 255, 255, 0.15);
}

body[data-view="Home"] .ChatItem.Active .ChatRenameInput::selection {
    background: rgba(255, 255, 255, 0.40);
    color: var(--ColorInkInverse);
}

.SidebarUserWidget {
    flex-shrink: 0;
    margin: 5px var(--SpaceXs) 0px;
    padding: 9px 11px;
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    border-radius: var(--RadiusSm);
    transition: background var(--DurationFast) var(--EaseOut),
                border-color var(--DurationFast) var(--EaseOut);
}

.SidebarUserWidget:hover {
    background: var(--ColorHover);
}

.UserWidgetInfo {
    flex: 1;
    min-width: 0px;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: default;
}

.UserAvatar {
    width: 33px;
    height: 33px;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    padding-top: 2px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: var(--WeightSemibold);
    flex-shrink: 0;
    overflow: hidden;
    user-select: none;
}

.UserAvatar.Guest {
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorderStrong);
    color: var(--ColorTextSoft);
}

.UserAvatar .Icon {
    width: 15px;
    height: 15px;
    margin-top: -2px;
}

.UserDetails {
    flex: 1;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.UserName {
    font-size: 13px;
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
    line-height: 1.15;
    margin: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.UserStatus {
    font-size: 11px;
    color: var(--ColorTextFaint);
    line-height: 1.15;
    margin: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.UserAuthButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: var(--RadiusSm);
    font: inherit;
    font-size: 11px;
    font-weight: var(--WeightMedium);
    cursor: pointer;
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    color: var(--ColorText);
    flex-shrink: 0;
    transition: background var(--DurationFast) var(--EaseOut),
                border-color var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.UserAuthButton:hover {
    border-color: var(--ColorInk);
    color: var(--ColorInk);
    background: var(--ColorHover);
}

.UserAuthButton.SignOut:hover {
    border-color: var(--ColorDanger);
    color: var(--ColorDanger);
}

.BottomNav {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: var(--SpaceXs);
    border-top: none !important;
}

.NavItem {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 9px 13px;
    border: none;
    border-radius: var(--RadiusSm);
    background: transparent;
    color: var(--ColorTextSoft);
    font: inherit;
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightMedium);
    text-align: left;
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.NavItem:not(.Active):hover { background: var(--ColorHover); color: var(--ColorText); }

.NavItem.Active,
.NavItem.Active:hover {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
}

.NavItem.Active *,
.NavItem.Active:hover * {
    color: var(--ColorInkInverse) !important;
}



.Main {
    flex: 1;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.CustomBgLayer {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0;
    transition: opacity var(--DurationBase) var(--EaseOut);
}

.CustomBgVideo {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0;
}

.Header {
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--SpaceMd);
    padding: 0px var(--SpaceLg);
    background: var(--ColorCanvas);
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.09);
    border-bottom: 1px solid var(--ColorDivider);
    position: relative;
    z-index: 10;
}

[data-theme="dark"] .Header {
    background: var(--ColorCanvas);
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--ColorDivider);
}

.HeaderTitle { font-size: var(--SizeTextMd); font-weight: var(--WeightSemibold); }

.HeaderSide { margin-left: auto; display: flex; align-items: center; gap: 9px; min-width: 0px; }

.IconButton {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--RadiusSm);
    background: transparent;
    color: var(--ColorTextSoft);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.IconButton:hover { background: var(--ColorHover); color: var(--ColorText); }

.MenuButton { display: none; }

.StatusChip {
    display: inline-flex;
    align-items: center;
    gap: var(--SpaceXs);
    padding: var(--SpaceXs) 11px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusFull);
    background: var(--ColorSurface);
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ColorTextSoft);
}

.StatusDot {
    width: 9px;
    height: 9px;
    border-radius: var(--RadiusFull);
    background: var(--ColorTextFaint);
}

.StatusChip[data-state="thinking"] { color: var(--ColorText) !important; }
.StatusChip[data-state="thinking"] .StatusDot {
    background: var(--ColorInk);
    animation: DotPulse 900ms var(--EaseOut) infinite;
}

.StatusChip[data-state="streaming"] { color: var(--ColorText) !important; }
.StatusChip[data-state="streaming"] .StatusDot { background: var(--ColorInk); }

@keyframes DotPulse {
    0%   { box-shadow: 0px 0px 0px 0px rgba(10, 10, 10, 0.35); }
    100% { box-shadow: 0px 0px 0px 9px rgba(10, 10, 10, 0); }
}



.View { display: none; flex: 1; min-height: 0px; flex-direction: column; }

.View.Active { display: flex; }

.ViewScroll { flex: 1; min-height: 0px; overflow-y: auto; }

.ViewInner {
    max-width: var(--LayoutContent);
    margin: 0px auto;
    padding: var(--SpaceXl) var(--SpaceLg) 60px;
    display: flex;
    flex-direction: column;
    gap: var(--SpaceXl);
}

.ViewHeading { font-size: var(--SizeTextXl); font-weight: var(--WeightSemibold); letter-spacing: -0.01em; }

.ViewSub { font-size: var(--SizeTextSm); color: var(--ColorTextSoft); margin-top: var(--SpaceXs); }

.ViewHeaderRow { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--SpaceMd); }

.Field { display: flex; flex-direction: column; gap: 9px; }

.FieldLabel {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightMedium);
}

.FieldHint { font-size: var(--SizeTextXs); color: var(--ColorTextFaint); line-height: 1.5; }
.FieldHintError { color: var(--ColorDanger); }
.FieldHintSuccess { color: var(--ColorSuccess); }

.Input, .Textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorInput);
    color: var(--ColorText);
    font: inherit;
    font-size: var(--SizeTextSm);
    outline: none;
    transition: border-color var(--DurationFast) var(--EaseOut);
}

.Input:focus, .Textarea:focus { border-color: var(--ColorInk); }

.InputMono, #ModelInput { font-family: var(--FontCode); }

.InputRow { display: flex; gap: 9px; align-items: stretch; }

.InputAffix {
    width: 43px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorInput);
    color: var(--ColorTextSoft);
    cursor: pointer;
    transition: border-color var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.InputAffix:hover { color: var(--ColorText); border-color: var(--ColorBorderStrong); }

.Textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: var(--RadiusFull);
    background: linear-gradient(to right, var(--ColorInk) 0%, var(--ColorInk) var(--RangeProgress, 50%), var(--SliderTrackBg) var(--RangeProgress, 50%), var(--SliderTrackBg) 100%);
    outline: none;
    cursor: pointer;
    vertical-align: middle;
    margin: 5px 0px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 19px;
    height: 19px;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    border: 2px solid var(--ColorSurface);
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform var(--DurationFast) var(--EaseOut);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 19px;
    height: 19px;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    border: 2px solid var(--ColorSurface);
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

input[type="range"]::-moz-range-track {
    height: 5px;
    border-radius: var(--RadiusFull);
    background: var(--SliderTrackBg);
}

input[type="range"]::-moz-range-progress {
    height: 5px;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
}

.RangeValue {
    font-family: var(--FontMono);
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightRegular);
    color: var(--ColorTextSoft);
}

.FormActions { display: flex; gap: 9px; }

.ButtonPrimary, .ButtonGhost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 15px;
    border-radius: var(--RadiusSm);
    font: inherit;
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightMedium);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut),
                border-color var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut),
                opacity var(--DurationFast) var(--EaseOut);
}

.ButtonPrimary {
    border: 1px solid var(--ColorInk);
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
}

.ButtonPrimary:hover { opacity: 0.9; }

.ButtonGhost {
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    color: var(--ColorText);
}

.ButtonGhost:hover { border-color: var(--ColorBorderStrong); background: var(--ColorHover); }

.ButtonGhost:disabled { opacity: 0.35; cursor: not-allowed; }

.ButtonGhost.Armed {
    border-color: var(--ColorDanger);
    background: var(--ColorDanger);
    color: var(--ColorInkInverse);
}

.ThemeSegment {
    position: relative;
    display: flex;
    align-items: center;
    padding: 5px;
    gap: 5px;
    background: var(--ColorCanvas);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    box-sizing: border-box;
}

.ThemeSegmentIndicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 15px) / 2);
    background: var(--ColorSurface);
    border: 2px solid var(--ColorInk);
    border-radius: calc(var(--RadiusMd) - 2px);
    box-shadow: var(--ShadowSm);
    pointer-events: none;
    z-index: 1;
    transform: translateX(0px);
    transition: transform 0.25s cubic-bezier(0.40, 0, 0.20, 1);
    box-sizing: border-box;
}

[data-active-theme="dark"] .ThemeSegmentIndicator {
    transform: translateX(calc(100% + 5px));
}

.ThemeSegmentButton {
    position: relative;
    z-index: 3;
    flex: 1;
    background: transparent;
    border: 2px solid transparent;
    border-radius: calc(var(--RadiusMd) - 2px);
    color: var(--ColorTextFaint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    transition: color 0.20s ease;
}

.ThemeSegmentButton:hover {
    color: var(--ColorText);
}

.ThemeSegmentButton.Active {
    color: var(--ColorText);
    font-weight: 600;
}

.SwatchGrid {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.ColorSwatch {
    width: 30px;
    height: 30px;
    border-radius: var(--RadiusFull);
    background-color: var(--SwatchColor);
    border: 2px solid var(--ColorBorder);
    cursor: pointer;
    position: relative;
    padding: 0px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.ColorSwatch:hover {
    transform: scale(1.15);
}

.ColorSwatch.Active {
    border-color: var(--ColorText);
    box-shadow: 0px 0px 0px 2px var(--ColorSurface), 0px 0px 0px 4px var(--SwatchColor);
}

.SwatchDivider {
    display: inline-block;
    width: 1px;
    height: 25px;
    background: var(--ColorDivider);
    margin: 0px 3px;
    flex-shrink: 0;
}

.AdvancedPigments {
    margin-top: 15px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorCanvas);
    overflow: hidden;
}

.ThemeShareActions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.ThemeShareActions .ButtonGhost {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.CustomisationCard {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--SpaceMd);
    padding: var(--SpaceMd) var(--SpaceLg);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorCanvas);
    color: var(--ColorText);
    cursor: pointer;
    text-align: left;
    transition: border-color var(--DurationFast) var(--EaseOut),
                background var(--DurationFast) var(--EaseOut),
                transform var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut);
}

.CustomisationCard:hover {
    border-color: var(--ColorBorderStrong);
    background: var(--ColorHover);
    transform: translateX(5px);
    box-shadow: var(--ShadowSm);
}

.CustomisationCard:active {
    transform: translateX(1px);
}

.CustomisationCardIcon {
    width: 35px;
    height: 35px;
    border-radius: var(--RadiusSm);
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorder);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: transform var(--DurationFast) var(--EaseOut);
}

.CustomisationCardIcon .Icon {
    color: var(--ColorIcons);
}

.CustomisationCard:hover .CustomisationCardIcon {
    transform: scale(1.05);
}

.CustomisationCard:hover .CustomisationCardIcon .Icon {
    color: var(--ColorIconActive);
}

.CustomisationCardContent {
    flex: 1;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.CustomisationCardTitle {
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
}

.CustomisationCardSub {
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
}

.CustomisationCardArrow {
    color: var(--ColorTextFaint);
    flex-shrink: 0;
    transition: transform var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.CustomisationCard:hover .CustomisationCardArrow {
    transform: translateX(5px);
    color: var(--ColorText);
}

.BackNavButton {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: var(--SizeTextXs);
    margin-bottom: var(--SpaceXs);
    transition: transform var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut),
                background var(--DurationFast) var(--EaseOut);
}

.BackNavButton:hover {
    transform: translateX(-3px);
}

.BackNavButton:hover .Icon,
.BackNavButton:hover i {
    transform: translateX(-3px);
}

.BackNavButton .Icon,
.BackNavButton i {
    transition: transform var(--DurationFast) var(--EaseOut);
}

.View[data-view-panel="Customisation"].Active {
    display: flex;
    animation: CustomisationSlideIn 0.25s var(--EaseOut) forwards;
}

@keyframes CustomisationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(45px);
    }
    100% {
        opacity: 1;
        transform: translateX(0px);
    }
}

@keyframes CustomisationSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0px);
    }
    100% {
        opacity: 0;
        transform: translateX(45px);
    }
}

@keyframes SettingsSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-35px);
    }
    100% {
        opacity: 1;
        transform: translateX(0px);
    }
}

@keyframes SettingsSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0px);
    }
    100% {
        opacity: 0;
        transform: translateX(-35px);
    }
}

.View.SlideOutLeft {
    display: flex !important;
    animation: SettingsSlideOut 0.15s ease-in forwards;
    pointer-events: none;
}

.View.SlideInLeft {
    display: flex !important;
    animation: SettingsSlideIn 0.25s var(--EaseOut) forwards;
}

.View.SlideOutRight {
    display: flex !important;
    animation: CustomisationSlideOut 0.15s ease-in forwards;
    pointer-events: none;
}

.View.SlideInRight {
    display: flex !important;
    animation: CustomisationSlideIn 0.25s var(--EaseOut) forwards;
}

.AdvancedPigmentsSummary {
    padding: 15px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    list-style: none;
}

.AdvancedPigmentsSummary::-webkit-details-marker {
    display: none;
}

.AdvancedPigmentsTitle {
    display: block;
    font-size: 15px;
    color: var(--ColorText);
}

.AdvancedPigmentsSub {
    display: block;
    font-size: 13px;
    color: var(--ColorTextFaint);
    margin-top: 3px;
}

.PigmentsGrid {
    padding: 15px;
    border-top: 1px solid var(--ColorBorder);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.PigmentRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.PigmentLabel {
    font-size: 13px;
    color: var(--ColorText);
}

.PigmentPickerWrap {
    display: flex;
    align-items: center;
    gap: 9px;
}

.PigmentColorInput {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid var(--ColorBorder);
    width: 30px;
    height: 30px;
    border-radius: var(--RadiusSm);
    padding: 0px;
    background: transparent;
    cursor: pointer;
}

.PigmentColorInput::-webkit-color-swatch-wrapper {
    padding: 0px;
}

.PigmentColorInput::-webkit-color-swatch {
    border: none;
    border-radius: calc(var(--RadiusSm) - 2px);
}

.PigmentHex {
    font-family: var(--FontMono);
    font-size: 13px;
    color: var(--ColorTextFaint);
    width: 65px;
}

.FieldLabelRight {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.PigmentResetBtn,
.FieldResetBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    padding: 0px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorCanvas);
    color: var(--ColorTextSoft);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--DurationFast) var(--EaseOut),
                border-color var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut),
                transform var(--DurationFast) var(--EaseOut);
}

.PigmentResetBtn:hover,
.FieldResetBtn:hover {
    background: var(--ColorHover);
    border-color: var(--ColorBorderStrong);
    color: var(--ColorText);
    transform: rotate(-45deg);
}

.PigmentResetBtn .Icon,
.FieldResetBtn .Icon,
.PigmentResetBtn svg,
.FieldResetBtn svg {
    width: 13px;
    height: 13px;
}

.Messages {
    flex: 1;
    min-height: 0px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

.MessageList {
    width: 100%;
    max-width: var(--LayoutContent);
    margin: 0px auto;
    padding: var(--SpaceXl) var(--SpaceLg);
    display: flex;
    flex-direction: column;
    gap: var(--SpaceLg);
}

.Message { animation: RiseIn var(--DurationBase) var(--EaseOut) both; }

.MessageUser {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--SpaceXs);
    width: 100%;
}

.MessageUser .Bubble {
    display: inline-block;
    width: fit-content;
    max-width: 80%;
    min-width: 0px;
    padding: 10px 15px;
    background: var(--ColorInput);
    color: var(--ColorInkInverse);
    border-radius: var(--RadiusMd) var(--RadiusMd) 5px var(--RadiusMd);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}

.MessageUser .Bubble.Editing {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    padding: 13px 15px;
}

.EditWrap {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    box-sizing: border-box;
}

.EditInput {
    width: 100%;
    box-sizing: border-box;
    color: var(--ColorText) !important;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--RadiusSm);
    padding: 10px 13px;
    font: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    overflow-y: hidden;
    min-height: 45px;
}

.EditInput:focus {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.20);
    box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.25);
}

.EditInput::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.EditActions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin-top: 3px;
}

.EditWrap .ButtonGhost {
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--RadiusSm);
    background: transparent;
    color: var(--ColorText);
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0;
    transition: background var(--DurationFast) var(--EaseOut);
}

.EditWrap .ButtonGhost:hover {
    background: rgba(255, 255, 255, 0.15);
}

.EditWrap .ButtonPrimary {
    padding: 10px 20px;
    border: 1px solid var(--ColorInkInverse);
    border-radius: var(--RadiusSm);
    background: var(--ColorInkInverse) !important;
    color: var(--ColorSurface) !important;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightSemibold);
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0;
    transition: opacity var(--DurationFast) var(--EaseOut),
                transform var(--DurationFast) var(--EaseOut);
}

.EditWrap .ButtonPrimary:hover {
    opacity: 0.90;
    transform: translateY(-1px);
}

[data-accent="White"] .EditInput {
    color: var(--ColorInkInverse) !important;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.25);
}

[data-accent="White"] .EditInput:focus {
    border-color: rgba(0, 0, 0, 0.65);
    background: rgba(0, 0, 0, 0.10);
    box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.15);
}

[data-accent="White"] .EditWrap .ButtonGhost {
    border-color: rgba(0, 0, 0, 0.35);
    color: var(--ColorInkInverse);
}

[data-accent="White"] .EditWrap .ButtonGhost:hover {
    background: rgba(0, 0, 0, 0.10);
}

.AttachedFilesList {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 9px;
}

.AttachedFilesList:last-child {
    margin-bottom: 0px;
}

.AttachedFileCard {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 15px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: var(--ColorInkInverse);
    max-width: 100%;
    box-sizing: border-box;
}

[data-accent="White"] .AttachedFileCard {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

.AttachedFileIcon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: inherit;
}

.AttachedFileIcon .Icon {
    width: 25px;
    height: 25px;
}

.AttachedFileInfo {
    display: flex;
    flex-direction: column;
    min-width: 0px;
    gap: 1px;
}

.AttachedFileName {
    font-size: var(--SizeTextSm);
    font-weight: 600;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.AttachedFileSize {
    font-size: var(--SizeTextXs);
    color: inherit;
    opacity: 0.85;
    white-space: nowrap;
}

.UserMessageText {
    display: inline-block;
    max-width: 100%;
    color: var(--ColorText);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.AttachedImage {
    max-width: 300px;
    max-height: 250px;
    border-radius: var(--RadiusSm);
    object-fit: contain;
    display: block;
}

.AttachedFilesList {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 9px;
}

.AttachedFileCard {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--RadiusSm);
    color: inherit;
    font-size: var(--SizeTextSm);
    max-width: 320px;
}

.AttachedFileCard .Icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.AttachedFileInfo {
    display: flex;
    flex-direction: column;
    min-width: 0px;
    overflow: hidden;
}

.AttachedFileName {
    font-weight: var(--WeightMedium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.AttachedFileSize {
    font-size: var(--SizeTextXs);
    opacity: 0.75;
    font-family: var(--FontMono);
}


.ComposerShell.DragOver {
    border-color: var(--ColorInk);
    box-shadow: 0px 0px 0px 1px var(--SelectColor);
}

.MessageAssistant {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.AssistantAvatar {
    display: none !important;
}

.AssistantBody {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    width: 100%;
    min-width: 0px;
    max-width: 100%;
}

.MessageAssistant .Bubble {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 9px 1px;
    background: transparent;
    border: none;
    border-radius: 0px;
    overflow-wrap: anywhere;
    font-size: 16.5px;
    line-height: 1.65;
}

.MessageAssistant .Bubble p {
    font-size: 16.5px;
    line-height: 1.65;
    margin: 0px 0px 11px;
}

.MessageAssistant .Bubble ul,
.MessageAssistant .Bubble ol {
    font-size: 16.5px;
    line-height: 1.65;
    margin: 0px 0px 11px;
    padding-left: 21px;
}

.MessageAssistant .Bubble li {
    margin-bottom: 5px;
}

.TypingBubble {
    display: inline-flex;
    align-items: center;
    gap: var(--SpaceXs);
    padding: 9px 1px;
    background: transparent;
    border: none;
    border-radius: 0px;
}

.TypingDot {
    width: var(--SpaceXs);
    height: var(--SpaceXs);
    border-radius: var(--RadiusFull);
    background: var(--ColorTextSoft);
    animation: DotBounce 900ms ease-in-out infinite;
}

.TypingDot:nth-child(3) { animation-delay: 150ms; }
.TypingDot:nth-child(3) { animation-delay: 300ms; }

.TypingTimer {
    margin-left: 9px;
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    color: var(--ColorTextFaint);
    font-variant-numeric: tabular-nums;
}

@keyframes DotBounce {
    0%, 60%, 100% { transform: translateY(0px); opacity: 0.35; }
    30%              { transform: translateY(-5px); opacity: 1; }
}

.StreamCaret {
    display: inline-block;
    width: 0.55em;
    height: 1.05em;
    margin-left: 3px;
    vertical-align: text-bottom;
    background: var(--ColorInk);
    border-radius: 1px;
    animation: CaretBlink 900ms linear infinite;
}

@keyframes CaretBlink {
    0%, 45%  { opacity: 1; }
    50%, 95% { opacity: 0; }
}

.Reasoning {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorCanvas);
}

.ReasoningHeader {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 13px;
    border: none;
    background: none;
    font: inherit;
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
    text-align: left;
    cursor: pointer;
}

.ReasoningHeader:hover { color: var(--ColorText); }

.ReasoningPulse {
    width: var(--SpaceXs);
    height: var(--SpaceXs);
    border-radius: var(--RadiusFull);
    background: var(--ColorTextFaint);
}

.Reasoning:not(.Settled) .ReasoningPulse {
    background: var(--ColorInk);
    animation: DotPulse 900ms var(--EaseOut) infinite;
}

.ReasoningChevron {
    margin-left: auto;
    display: grid;
    place-items: center;
    color: var(--ColorTextFaint);
    transition: transform var(--DurationBase) var(--EaseOut);
}

.ReasoningChevron .Icon { width: var(--SizeIconXs); height: var(--SizeIconXs); }

.Reasoning.Collapsed .ReasoningChevron { transform: rotate(-90deg); }

.ReasoningBody {
    max-height: 300px;
    overflow-y: auto;
    padding: 0px 13px 11px;
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    line-height: 1.5;
    color: var(--ColorTextSoft);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.Reasoning.Collapsed .ReasoningBody { display: none; }

.Meta {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0px var(--SpaceXs);
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    color: var(--ColorTextFaint);
}

.MetaFlag {
    padding: 1px 9px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusFull);
}

.MetaFlag.Warn { color: var(--ColorDanger); border-color: var(--ColorDanger); }

.MetaActions { display: inline-flex; gap: var(--SpaceXs); }

.MetaAction {
    display: grid;
    place-items: center;
    padding: 3px;
    border: none;
    border-radius: var(--SpaceXs);
    background: none;
    color: var(--ColorTextFaint);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.MetaAction:hover { background: var(--ColorHover); color: var(--ColorText); }

.MetaAction .Icon { width: var(--SizeIconXs); height: var(--SizeIconXs); }

.MessageError { display: flex; width: 100%; }

.ErrorCard {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    width: 100%;
    padding: 13px 15px;
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorder);
    border-left: 3px solid var(--ColorDanger);
    border-radius: var(--RadiusSm);
}

.ErrorIcon,
.ErrorIcon .Icon,
.MessageError .ErrorIcon,
.MessageError .ErrorIcon .Icon,
.MessageError .Icon {
    display: grid;
    place-items: center;
    margin-top: 3px;
    color: var(--ColorDanger) !important;
}

.ErrorTexts { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0px; }

.ErrorTitle { font-size: var(--SizeTextSm); font-weight: var(--WeightSemibold); }

.ErrorText { font-size: var(--SizeTextXs); color: var(--ColorTextSoft); line-height: 1.5; overflow-wrap: anywhere; }

.ErrorAction {
    padding: 0px;
    border: none;
    background: none;
    font: inherit;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    color: var(--ColorText);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    cursor: pointer;
}

@keyframes RiseIn {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: translateY(0px); }
}

.Bubble > :first-child { margin-top: 0px; }
.Bubble > :last-child  { margin-bottom: 0px; }

.Bubble p             { margin: 0px 0px 9px; }
.Bubble ul, .Bubble ol { margin: 0px 0px 9px; padding-left: 21px; }

.Bubble h4, .Bubble h5, .Bubble h6 { margin: 13px 0px 9px; font-weight: var(--WeightSemibold); line-height: 1.3; }
.Bubble h4 { font-size: var(--SizeTextMd); }
.Bubble h5 { font-size: var(--SizeTextSm); }
.Bubble h6 { font-size: var(--SizeTextXs); text-transform: uppercase; letter-spacing: 0.09em; }

.Bubble blockquote { margin: 0px 0px 9px; padding-left: 11px; border-left: 3px solid var(--ColorBorder); color: var(--ColorTextSoft); }

.Bubble hr { margin: 13px 0px; border: none; border-top: 1px solid var(--ColorBorder); }

.Bubble a { color: inherit; text-underline-offset: 3px; }

.InlineCode {
    padding: 1px var(--SpaceXs);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--SpaceXs);
    background: var(--ColorCanvas);
    font-family: var(--FontMono);
    font-size: 0.9em;
}

.CodeBlock {
    position: relative;
    margin: 15px 0px;
    padding: 0px;
    background: rgb(15, 15, 15);
    color: rgb(245, 245, 245);
    border: 1px solid rgb(40, 40, 40);
    border-radius: var(--RadiusSm);
    overflow: hidden;
}

[data-theme="dark"] .CodeBlock {
    background: rgb(0, 0, 0);
    border: 1px solid rgb(255, 255, 255);
}

.CodeHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.CodeLabel {
    position: static;
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    color: rgba(255, 255, 255, 0.70);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.CodeActions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.CodeCopy,
.CodeDownload {
    position: static;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--SpaceXs);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    opacity: 0.90;
    transition: opacity var(--DurationFast) var(--EaseOut),
                background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.CodeBlock:hover .CodeCopy,
.CodeBlock:hover .CodeDownload { opacity: 1; }
.CodeCopy:hover,
.CodeDownload:hover { background: rgba(255, 255, 255, 0.15); color: rgb(255, 255, 255); }
.CodeCopy .Icon,
.CodeDownload .Icon {
    width: var(--SizeIconXs);
    height: var(--SizeIconXs);
    color: rgba(255, 255, 255, 0.70) !important;
}

.CodeCopy:hover .Icon,
.CodeDownload:hover .Icon {
    color: rgb(255, 255, 255) !important;
}

.ProjectDownloadBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 11px;
    margin-top: 11px;
    padding: 9px 13px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorSurface);
}

.ProjectDownloadInfo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    color: var(--ColorText);
}

.ProjectDownloadInfo .Icon {
    width: var(--SizeIconSm);
    height: var(--SizeIconSm);
    color: var(--ColorIcons);
}

.ProjectDownloadBtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 11px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: transparent;
    color: var(--ColorText);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut),
                border-color var(--DurationFast) var(--EaseOut);
}

.ProjectDownloadBtn:hover {
    background: var(--ColorHover);
    border-color: var(--ColorBorderStrong);
}

.ProjectDownloadBtn .Icon {
    color: var(--ColorIcons);
}

.ProjectDownloadBtn:hover .Icon {
    color: var(--ColorIconActive);
}

.GeneratedImageCard {
    margin: 11px 0px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    overflow: hidden;
    background: var(--ColorSurface);
    max-width: 100%;
}

.GeneratedImageWrapper {
    position: relative;
    width: 100%;
    min-height: 240px;
    background: var(--ColorCanvas);
    display: flex;
    align-items: center;
    justify-content: center;
}

.GeneratedImage {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.GeneratedImageWrapper:hover .GeneratedImageOverlay {
    opacity: 1;
}

.GeneratedImageOverlay {
    position: absolute;
    bottom: 9px;
    right: 9px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity var(--DurationFast) var(--EaseOut);
}

.GeneratedImageBtn {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.70);
    color: rgb(255, 255, 255);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: var(--RadiusSm);
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background var(--DurationFast) var(--EaseOut);
}

.GeneratedImageBtn:hover {
    background: rgba(0, 0, 0, 0.90);
    border-color: rgba(255, 255, 255, 0.50);
}

.GeneratedImageBtn .Icon,
.GeneratedImageBtn:hover .Icon,
.GeneratedImageBtn:active .Icon {
    color: rgb(255, 255, 255) !important;
}

.GeneratedImageMeta {
    padding: 9px 11px;
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
    border-top: 1px solid var(--ColorBorder);
    display: flex;
    align-items: center;
    gap: 5px;
}

.CodeBlock code {
    display: block;
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
    line-height: 1.5;
    white-space: pre;
    padding: 0px 15px 15px;
    overflow-x: auto;
}

.SilentNote { color: var(--ColorTextFaint); font-style: italic; }



.EmptyState {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: var(--SpaceXl) var(--SpaceLg);
    text-align: center;
}

.EmptyTile {
    width: 45px;
    height: 45px;
    margin-bottom: var(--SpaceXs);
    display: grid;
    place-items: center;
    border-radius: var(--RadiusFull);
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorder);
    animation: RiseIn var(--DurationBase) var(--EaseOut) both;
}

.EmptyLogo {
    width: 25px;
    height: 25px;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.EmptyTile .Icon,
.EmptyTile svg,
.AssistantAvatar .Icon,
.AssistantAvatar svg {
    width: var(--SizeIconLg);
    height: var(--SizeIconLg);
    color: var(--ColorIconActive) !important;
}

.EmptyTitle {
    font-size: var(--SizeTextXl);
    font-weight: var(--WeightSemibold);
    letter-spacing: -0.01em;
    animation: RiseIn var(--DurationBase) var(--EaseOut) 90ms both;
}

.EmptyText {
    font-size: var(--SizeTextSm);
    color: var(--ColorTextSoft);
    animation: RiseIn var(--DurationBase) var(--EaseOut) 150ms both;
}

.EmptyStarters {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: min(480px, 100%);
    margin-top: 25px;
    animation: RiseIn var(--DurationBase) var(--EaseOut) 210ms both;
}

.StarterRow {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorSurface);
    color: var(--ColorText);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut),
                transform var(--DurationFast) var(--EaseOut);
}

.StarterRow:hover { border-color: var(--ColorInk); transform: translateY(-1px); box-shadow: var(--ShadowFloat); }

.StarterIcon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorCanvas);
    color: var(--ColorTextSoft);
}

.StarterTexts { display: flex; flex-direction: column; gap: 1px; }

.StarterTitle { font-size: var(--SizeTextSm); font-weight: var(--WeightMedium); }

.StarterDesc { font-size: var(--SizeTextXs); color: var(--ColorTextFaint); }

.StarterChevron { margin-left: auto; display: grid; place-items: center; color: var(--ColorTextFaint); }

.ComposerWrap { padding: var(--SpaceXs) var(--SpaceLg) var(--SpaceLg); }

.Composer { position: relative; max-width: var(--LayoutContent); margin: 0px auto; }

.ComposerShell {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 9px 9px 11px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusFull);
    background: var(--ColorInput);
    transition: border-color var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut);
}

.ComposerShell:focus-within {
    border-color: var(--ColorInk) !important;
    box-shadow: 0px 0px 0px 3px var(--SelectColor),
                0px 4px 15px rgba(0, 0, 0, 0.10) !important;
}

.ComposerShell.Listening {
    border-color: var(--ColorInk);
    animation: ListenPulse 1.3s var(--EaseOut) infinite;
}

.ComposerShell.DragOver {
    border-color: var(--ColorInk);
    box-shadow: 0px 0px 0px 3px rgba(10, 10, 10, 0.15);
}

@keyframes ListenPulse {
    0%   { box-shadow: 0px 0px 0px 0px rgba(10, 10, 10, 0.15); }
    100% { box-shadow: 0px 0px 0px 9px rgba(10, 10, 10, 0); }
}

.ComposerTool {
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--RadiusFull);
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--ColorTextSoft);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

.ComposerTool:hover { background: var(--ColorHover) !important; color: var(--ColorText) !important; }

.ComposerTool.Listening { background: var(--ColorInk) !important; color: var(--ColorInkInverse) !important; }

.ComposerInput {
    flex: 1;
    min-width: 0px;
    max-height: 165px;
    padding: 9px 0px;
    min-height: 45px;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--ColorText);
    font: inherit;
    font-size: var(--SizeTextMd);
    line-height: 1.5;
}

.ComposerInput::placeholder { color: var(--ColorTextFaint); }

.ComposerSend {
    width: 41px;
    height: 41px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
    cursor: pointer;
    transition: transform var(--DurationFast) var(--EaseOut),
                opacity var(--DurationFast) var(--EaseOut);
}

.ComposerSend:hover  { opacity: 0.9; transform: translateY(-1px); }
.ComposerSend:active { transform: scale(0.95); }
.ComposerSend .Icon  {
    width: var(--SizeIconSm);
    height: var(--SizeIconSm);
    color: var(--ColorInkInverse) !important;
}

.HintDot { color: var(--ColorBorderStrong); }

.JumpPill {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: var(--SpaceXs);
    padding: 9px 13px;
    border: none;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
    font: inherit;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity var(--DurationFast) var(--EaseOut);
}

.JumpPill.Show { opacity: 1; pointer-events: auto; }

@keyframes Pop {
    from { opacity: 0; transform: translateY(var(--SpaceXs)); }
    to   { opacity: 1; transform: translateY(0px); }
}

.AttachPreviews {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 0px 0px 9px;
}

.AttachPreviews:empty { display: none; }

.AttachChip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorSurface);
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
}

.AttachChip .Icon { color: var(--ColorIcons); flex-shrink: 0; }

.AttachChipName {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.AttachThumb {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.AttachRemove {
    display: grid;
    place-items: center;
    padding: 0px;
    margin-left: 3px;
    border: none;
    background: none;
    color: var(--ColorTextFaint);
    cursor: pointer;
    transition: color var(--DurationFast) var(--EaseOut);
}

.AttachRemove:hover { color: var(--ColorDanger); }
.AttachRemove .Icon { width: var(--SizeIconXs); height: var(--SizeIconXs); }

.ToastStack {
    position: fixed;
    bottom: 25px;
    left: 50%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    transform: translateX(-50%);
    pointer-events: none;
}

.Toast {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    color: var(--ColorInkInverse) !important;
    font-size: var(--SizeTextSm);
    box-shadow: 0px 15px 30px rgba(10, 10, 10, 0.15);
    animation: ToastIn var(--DurationBase) var(--EaseOut);
}

.Toast.Leaving { animation: ToastOut 200ms var(--EaseOut) both; }

@keyframes ToastIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0px); }
}

@keyframes ToastOut {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(15px); }
}

.ActionList {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorSurface);
}

.ActionRow {
    display: flex;
    align-items: center;
    gap: var(--SpaceMd);
    padding: var(--SpaceMd);
    border-bottom: 1px solid var(--ColorBorder);
}

.Bubble ul, .Bubble ol {
    margin-bottom: var(--SpaceMd);
    padding-left: var(--SpaceLg);
}

.Bubble li {
    margin-bottom: var(--SpaceXs);
}

.Bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--SpaceMd) 0px;
    font-size: var(--SizeTextSm);
}

.Bubble th, .Bubble td {
    padding: var(--SpaceSm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.Bubble th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.ActionRow:last-child { border-bottom: none; }

.ActionIcon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorCanvas);
    color: var(--ColorTextSoft);
}

.ActionTexts { display: flex; flex-direction: column; gap: 1px; min-width: 0px; }

.ActionTitle { font-size: var(--SizeTextSm); font-weight: var(--WeightMedium); }

.ActionDesc { font-size: var(--SizeTextXs); color: var(--ColorTextFaint); }

.ActionList .ButtonGhost { margin-left: auto; flex-shrink: 0; }

.InfoBlock { display: flex; flex-direction: column; gap: var(--SpaceMd); }

.InfoHeading { font-size: var(--SizeTextMd); font-weight: var(--WeightSemibold); }

.InfoText { font-size: var(--SizeTextSm); color: var(--ColorTextSoft); line-height: 1.5; }

.InfoRows {
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorSurface);
}

.InfoRow {
    display: flex;
    justify-content: space-between;
    gap: var(--SpaceMd);
    padding: 13px 15px;
    border-bottom: 1px solid var(--ColorBorder);
}

.InfoRow:last-child { border-bottom: none; }

.InfoKey   { font-size: var(--SizeTextSm); color: var(--ColorTextSoft); }
.InfoValue { font-family: var(--FontMono); font-size: var(--SizeTextSm); color: var(--ColorText); text-align: right; overflow-wrap: anywhere; }

.InfoRow.Warn .InfoValue { color: var(--ColorDanger); }

.ShortcutRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0px;
    border-bottom: 1px solid var(--ColorBorder);
    font-size: var(--SizeTextSm);
    color: var(--ColorTextSoft);
}

.ShortcutRow:last-child { border-bottom: none; }

.Keys { display: inline-flex; gap: var(--SpaceXs); }

.Key {
    padding: 1px var(--SpaceXs);
    border: 1px solid var(--ColorBorder);
    border-bottom-width: 3px;
    border-radius: var(--SpaceXs);
    background: var(--ColorSurface);
    color: var(--ColorText);
    font-family: var(--FontMono);
    font-size: var(--SizeTextXs);
}



@media (max-width: 900px) {
    .Sidebar {
        position: fixed;
        top: 0px;
        left: 0px;
        bottom: 0px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform var(--DurationBase) var(--EaseOut);
    }

    body.NavOpen .Sidebar {
        transform: translateX(0px);
        box-shadow: var(--ShadowFloat);
    }

    .NavBackdrop {
        position: fixed;
        inset: 0px;
        z-index: 25;
        display: block;
        background: rgba(10, 10, 10, 0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--DurationBase) var(--EaseOut);
    }

    body.NavOpen .NavBackdrop { opacity: 1; pointer-events: auto; }

    .MenuButton { display: grid; }

    .MessageList { padding: var(--SpaceLg); }

    .ComposerWrap { padding: 0px var(--SpaceMd) var(--SpaceMd); }

    .ChatItemActions,
    .ChatItemAction,
    .ChatItem:not(.Active) .ChatItemAction,
    .ChatItem:not(.Active) .ChatItemActions,
    .ChatItem:not(.Active) .ChatItemAction.Active,
    .ChatItem:not(.Active) .ChatItemActions.Active,
    .ChatItem:not(.Active):hover .ChatItemAction,
    .ChatItem:not(.Active):hover .ChatItemActions,
    body:not([data-view="Home"]) .ChatItemActions,
    body:not([data-view="Home"]) .ChatItemAction,
    body:not([data-view="Home"]) .ChatItem .ChatItemActions,
    body:not([data-view="Home"]) .ChatItem .ChatItemAction,
    body:not([data-view="Home"]) .ChatItem.Active .ChatItemActions,
    body:not([data-view="Home"]) .ChatItem.Active .ChatItemAction {
        display: none !important;
    }

    body[data-view="Home"] .ChatItem.Active .ChatItemAction,
    body[data-view="Home"] .ChatItem.Active .ChatItemAction.Active {
        display: block !important;
    }

    body[data-view="Home"] .ChatItem.Active .ChatItemActions,
    body[data-view="Home"] .ChatItem.Active .ChatItemActions.Active {
        display: flex !important;
    }

    .ChatItemAction {
        width: 35px;
        height: 35px;
        line-height: 35px;
    }

    .CodeCopy {
        opacity: 0.85;
    }

    .ModalCard {
        padding: 20px;
        margin: 15px;
        max-width: calc(100% - 30px);
    }

    .ModalActions {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



.WeatherWidget {
    background: linear-gradient(135deg, rgb(30, 30, 30) 0%, rgb(45, 45, 45) 100%);
    color: rgb(255, 255, 255);
    border-radius: var(--RadiusMd);
    padding: var(--SpaceLg);
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--SizeTextMd);
    max-width: 100%;
    width: 360px;
    margin: var(--SpaceMd) 0px;
    display: flex;
    flex-direction: column;
    gap: var(--SpaceLg);
    transition: transform var(--DurationBase) var(--EaseOut), box-shadow var(--DurationBase) var(--EaseOut);
}

.WeatherCurrent {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.WeatherForecast {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: var(--SpaceLg);
}

.ForecastDay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--SpaceXs);
    font-size: var(--SizeTextSm);
}

.ForecastIcon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
}

.ForecastIcon svg,
.ForecastIcon .Icon {
    width: 20px;
    height: 20px;
    color: rgb(255, 255, 255) !important;
    stroke: currentColor !important;
    opacity: 0.95;
}

.ForecastMax {
    font-weight: 600;
    color: rgb(255, 255, 255);
}

.ForecastMin {
    opacity: 0.65;
    margin-left: 5px;
    color: rgb(220, 220, 220);
}

.WeatherInfo {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.WeatherIcon {
    user-select: none;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.WeatherIcon svg,
.WeatherIcon .Icon {
    width: 75px;
    height: 75px;
    color: rgb(255, 255, 255) !important;
    stroke: currentColor !important;
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.40));
}

.WeatherWidget .Sun {
    color: rgb(255, 195, 50) !important;
    stroke: rgb(255, 195, 50) !important;
}

.WeatherWidget .CloudSun {
    color: rgb(255, 215, 90) !important;
    stroke: rgb(255, 215, 90) !important;
}

.WeatherWidget .CloudRain {
    color: rgb(125, 205, 255) !important;
    stroke: rgb(125, 205, 255) !important;
}

.WeatherWidget .CloudLightning {
    color: rgb(255, 215, 50) !important;
    stroke: rgb(255, 215, 50) !important;
}

.WeatherWidget .CloudSnow {
    color: rgb(200, 235, 255) !important;
    stroke: rgb(200, 235, 255) !important;
}

.WeatherWidget .Cloud {
    color: rgb(255, 255, 255) !important;
    stroke: rgb(255, 255, 255) !important;
}

.WeatherWidget:hover {
    transform: translateY(-3px);
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.35);
}

.WeatherWidget strong {
    font-size: var(--SizeTextXl);
    font-weight: var(--WeightSemibold);
    background: linear-gradient(90deg, rgb(160, 195, 253) 0%, rgb(195, 233, 250) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--SpaceXs);
    display: block;
}


/* It hides default datalist dropdown caret */
#ModelInput::-webkit-calendar-picker-indicator { display: none !important; }

.ModalBackdrop {
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    background: rgba(0, 0, 0, 0.50);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.20s ease;
}

.ModalBackdrop.Hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.ModalCard {
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusLg);
    box-shadow: var(--ShadowLg);
    width: 100%;
    max-width: 440px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: ModalScaleIn 0.20s var(--EaseOut);
}

.ModalTitle {
    margin: 0px;
    font-size: 19px;
    font-weight: 600;
    color: var(--ColorText);
}

.ModalText {
    margin: 0px;
    font-size: 15px;
    line-height: 1.50;
    color: var(--ColorTextFaint);
}

.ModalActions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

@keyframes ModalScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.AuthModalCard {
    max-width: 400px;
    width: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.AuthModalHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.AuthTabs {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--ColorCanvas);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    padding: 3px;
    gap: 3px;
    box-sizing: border-box;
}

.AuthTabIndicator {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 9px) / 2);
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorderStrong);
    border-radius: calc(var(--RadiusSm) - 3px);
    box-shadow: var(--ShadowSm);
    pointer-events: none;
    z-index: 1;
    transform: translateX(0px);
    transition: transform 0.25s var(--EaseOut);
    box-sizing: border-box;
}

[data-active-tab="signup"] .AuthTabIndicator {
    transform: translateX(calc(100% + 3px));
}

.AuthTab {
    position: relative;
    z-index: 3;
    flex: 1;
    padding: 5px 10px;
    border: none;
    border-radius: calc(var(--RadiusSm) - 3px);
    background: transparent;
    color: var(--ColorTextFaint);
    font: inherit;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    cursor: pointer;
    text-align: center;
    transition: color var(--DurationFast) var(--EaseOut);
}

.AuthTab:hover {
    color: var(--ColorText);
}

.AuthTab.Active {
    color: var(--ColorText);
    font-weight: var(--WeightSemibold);
}

.AuthForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.AuthFormActions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 5px;
}

.AuthSubmitBtn {
    width: 100%;
}

.AuthOtpView {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.OtpHeader {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.OtpTitle {
    font-size: 19px;
    font-weight: 600;
    color: var(--ColorText);
    margin-top: 5px;
}

.OtpSub {
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
    line-height: 1.50;
}

.OtpSub strong {
    color: var(--ColorText);
}

.OtpBoxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 10px 0px;
}

.OtpInput {
    width: 45px;
    height: 50px;
    border: 1px solid var(--ColorBorderStrong);
    border-radius: var(--RadiusSm);
    background: var(--ColorInput);
    color: var(--ColorText);
    font-family: var(--FontMono);
    font-size: 21px;
    font-weight: 600;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut),
                background var(--DurationFast) var(--EaseOut);
}

.OtpInput:focus {
    border-color: var(--ColorInk);
    box-shadow: 0px 0px 0px 1px var(--SelectColor);
}

.OtpBoxes.Invalid .OtpInput {
    border-color: var(--ColorDanger);
    color: var(--ColorDanger);
}

.OtpBoxes.Shake {
    animation: OtpShake 0.40s var(--EaseOut);
}

.OtpBoxes.Shake .OtpInput {
    border-color: var(--ColorDanger) !important;
    color: var(--ColorDanger) !important;
}

@keyframes OtpShake {
    0%   { transform: translateX(0px); }
    15%  { transform: translateX(-5px); }
    30%  { transform: translateX(5px); }
    45%  { transform: translateX(-5px); }
    60%  { transform: translateX(5px); }
    75%  { transform: translateX(-3px); }
    90%  { transform: translateX(3px); }
    100% { transform: translateX(0px); }
}

.OtpInput.Flip {
    animation: WordleFlip 0.50s var(--EaseOut) forwards;
}

@keyframes WordleFlip {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(90deg);
        border-color: var(--ColorSuccess);
        color: var(--ColorSuccess);
    }
    100% {
        transform: rotateX(0deg);
        border-color: var(--ColorSuccess);
        color: var(--ColorSuccess);
    }
}

.FieldLabelRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.FieldLink {
    padding: 0px;
    border: none;
    background: none;
    font: inherit;
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--DurationFast) var(--EaseOut);
}

.FieldLink:hover {
    color: var(--ColorText);
}

.AccountCard {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 15px 17px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorSurface);
    transition: border-color var(--DurationFast) var(--EaseOut);
}

.AccountCardHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.AccountCardIdentity {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0px;
}

.AccountAvatar {
    width: 33px;
    height: 33px;
    border-radius: var(--RadiusFull);
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    padding-top: 2px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: var(--WeightSemibold);
    flex-shrink: 0;
    overflow: hidden;
    user-select: none;
}

.AccountAvatar.Guest {
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorderStrong);
    color: var(--ColorTextSoft);
}

.AccountAvatar .Icon {
    width: 15px;
    height: 15px;
    margin-top: -2px;
}

.AccountCardInfo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0px;
}

.AccountCardTitle {
    font-size: 13px;
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
    line-height: 1.15;
    margin: 0px;
    word-break: break-all;
}

.AccountCardSub {
    font-size: 11px;
    color: var(--ColorTextFaint);
    line-height: 1.15;
    margin: 0px;
}

.ButtonPrimary.Danger {
    background: var(--ColorDanger);
    color: rgb(255, 255, 255);
    border-color: var(--ColorDanger);
}

.ButtonPrimary.Danger:hover {
    opacity: 0.90;
}

.ButtonGhost.Danger,
#SettingsDeleteAccountButton,
#RemoveCustomBgButton {
    color: var(--ColorDanger) !important;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.05);
}

.ButtonGhost.Danger .Icon,
#SettingsDeleteAccountButton .Icon,
#RemoveCustomBgButton .Icon,
.ButtonGhost.Danger span,
#SettingsDeleteAccountButton span,
#RemoveCustomBgButton span {
    color: var(--ColorDanger) !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.ButtonGhost.Danger:hover,
#SettingsDeleteAccountButton:hover,
#RemoveCustomBgButton:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: var(--ColorDanger) !important;
    border-color: rgba(239, 68, 68, 0.65) !important;
    box-shadow: none !important;
}

.ButtonGhost.Danger:hover span,
#SettingsDeleteAccountButton:hover span,
#RemoveCustomBgButton:hover span {
    background: transparent !important;
    color: var(--ColorDanger) !important;
    box-shadow: none !important;
}

.ModalTitle.DangerText {
    color: var(--ColorDanger);
}

.AuthResetView,
.AuthNewPasswordView,
.AuthChangeEmailView {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.AuthResetForm,
.AuthNewPasswordForm,
.AuthChangeEmailForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.AccountCardActions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding-top: 11px;
    border-top: 1px solid var(--ColorBorder);
    flex-wrap: wrap;
}

.CustomBgWrap {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.CustomBgActions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.CustomBgPreviewWrap {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorSurface);
}

.CustomBgPreview {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--RadiusSm);
    border: 1px solid var(--ColorBorder);
}

.CustomBgOpacityField {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.CustomBgBlurSection {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding-top: 15px;
    border-top: 1px solid var(--ColorBorder);
}

.CustomBgBlurHeader {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.CustomBgBlurTitle {
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
}

.CustomBgBlurSub {
    font-size: var(--SizeTextXs);
    color: var(--ColorTextFaint);
}

.CustomBgBlurGrid {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.CustomBgBlurRow {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Glassmorphic theme styles when a custom background is active */
[data-has-custom-bg="true"] .App {
    background: transparent;
}

[data-has-custom-bg="true"] .Main {
    background: transparent;
}

[data-has-custom-bg="true"] .Header {
    background: rgba(250, 250, 250, 0.45) !important;
    backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
    border-bottom: 1px solid var(--ColorDivider);
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .Header {
    background: rgba(10, 10, 10, 0.50) !important;
    backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
    border-bottom: 1px solid var(--ColorDivider);
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.35) !important;
}

[data-has-custom-bg="true"] .Sidebar {
    background: rgba(250, 250, 250, 0.45);
    backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%);
    border-right: 1px solid var(--ColorDivider);
}

[data-theme="dark"][data-has-custom-bg="true"] .Sidebar {
    background: rgba(10, 10, 10, 0.50);
    backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%);
    border-right: 1px solid var(--ColorDivider);
}

[data-has-custom-bg="true"] .SidebarHeader {
    background: transparent;
}

[data-has-custom-bg="true"] .SidebarSearchRow {
    background: transparent;
}

[data-has-custom-bg="true"] .SidebarSearchBox {
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.30);
}

[data-theme="dark"][data-has-custom-bg="true"] .SidebarSearchBox {
    background: rgba(20, 20, 20, 0.50);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

[data-has-custom-bg="true"] .SidebarUserWidget {
    background: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .SidebarUserWidget {
    background: rgba(20, 20, 20, 0.40) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

[data-has-custom-bg="true"] .NavItem {
    background: transparent !important;
    border: 1px solid transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    color: var(--ColorTextSoft);
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

[data-theme="dark"][data-has-custom-bg="true"] .NavItem {
    background: transparent !important;
    border: 1px solid transparent !important;
}

[data-has-custom-bg="true"] .NavItem:not(.Active):hover,
[data-has-custom-bg="true"] .NavItem:not(.Active):active {
    background: rgba(255, 255, 255, 0.40) !important;
    color: var(--ColorText) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .NavItem:not(.Active):hover,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem:not(.Active):active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgb(255, 255, 255) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
}

[data-has-custom-bg="true"] .NavItem.Active,
[data-has-custom-bg="true"] .NavItem.Active:hover,
[data-has-custom-bg="true"] .NavItem.Active:active,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem.Active,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem.Active:hover,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem.Active:active {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    box-shadow: 0px 4px 15px rgba(5, 155, 250, 0.40) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

[data-has-custom-bg="true"] .NavItem.Active *,
[data-has-custom-bg="true"] .NavItem.Active:hover *,
[data-has-custom-bg="true"] .NavItem.Active:active *,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem.Active *,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem.Active:hover *,
[data-theme="dark"][data-has-custom-bg="true"] .NavItem.Active:active * {
    color: var(--ColorInkInverse) !important;
}

[data-has-custom-bg="true"] .ChatItem:not(.Active) {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--RadiusSm);
    box-shadow: none !important;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut);
}

[data-theme="dark"][data-has-custom-bg="true"] .ChatItem:not(.Active) {
    background: transparent !important;
    border: 1px solid transparent !important;
}

[data-has-custom-bg="true"] .ChatItem:not(.Active):hover,
[data-has-custom-bg="true"] .ChatItem:not(.Active):active,
body:not([data-view="Home"])[data-has-custom-bg="true"] .ChatItem:hover,
body:not([data-view="Home"])[data-has-custom-bg="true"] .ChatItem:active {
    background: rgba(255, 255, 255, 0.35) !important;
    color: var(--ColorText) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(15px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(160%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ChatItem:not(.Active):hover,
[data-theme="dark"][data-has-custom-bg="true"] .ChatItem:not(.Active):active,
body:not([data-view="Home"])[data-theme="dark"][data-has-custom-bg="true"] .ChatItem:hover,
body:not([data-view="Home"])[data-theme="dark"][data-has-custom-bg="true"] .ChatItem:active {
    background: rgba(255, 255, 255, 0.10) !important;
    color: rgb(255, 255, 255) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(15px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(160%) !important;
}

body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active,
body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:hover,
body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:active,
[data-theme="dark"] body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active,
[data-theme="dark"] body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:hover,
[data-theme="dark"] body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:active,
body[data-view="Home"][data-theme="dark"][data-has-custom-bg="true"] .ChatItem.Active,
body[data-view="Home"][data-theme="dark"][data-has-custom-bg="true"] .ChatItem.Active:hover,
body[data-view="Home"][data-theme="dark"][data-has-custom-bg="true"] .ChatItem.Active:active {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    box-shadow: 0px 4px 15px rgba(5, 155, 250, 0.40) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active *,
body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:hover *,
body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:active *,
[data-theme="dark"] body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active *,
[data-theme="dark"] body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:hover *,
[data-theme="dark"] body[data-view="Home"][data-has-custom-bg="true"] .ChatItem.Active:active *,
body[data-view="Home"][data-theme="dark"][data-has-custom-bg="true"] .ChatItem.Active *,
body[data-view="Home"][data-theme="dark"][data-has-custom-bg="true"] .ChatItem.Active:hover *,
body[data-view="Home"][data-theme="dark"][data-has-custom-bg="true"] .ChatItem.Active:active * {
    color: var(--ColorInkInverse) !important;
}

/* Glassmorphic buttons with deep frosted blur by default */
[data-has-custom-bg="true"] .ButtonGhost,
[data-has-custom-bg="true"] .IconButton,
[data-has-custom-bg="true"] .ButtonGhost,
[data-has-custom-bg="true"] .ButtonPrimary,
[data-has-custom-bg="true"] .HeaderBtn,
[data-has-custom-bg="true"] .SidebarQuickModeBtn,
[data-has-custom-bg="true"] .SidebarUserWidget,
[data-has-custom-bg="true"] .ThemeSegment,
[data-has-custom-bg="true"] .FolderToggle,
[data-has-custom-bg="true"] .JumpPill,
[data-has-custom-bg="true"] .MetaAction,
[data-has-custom-bg="true"] .ChatItemAction,
[data-has-custom-bg="true"] .BackNavButton,
[data-has-custom-bg="true"] .PigmentResetBtn,
[data-has-custom-bg="true"] .FieldResetBtn,
[data-has-custom-bg="true"] .TagChip,
[data-has-custom-bg="true"] .ActionPill,
[data-has-custom-bg="true"] .SettingsTabBtn {
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ButtonGhost {
    background: rgba(255, 255, 255, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.05) !important;
    color: var(--ColorText) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost {
    background: rgba(25, 25, 30, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.20) !important;
    color: rgb(255, 255, 255) !important;
}

[data-has-custom-bg="true"] .ButtonGhost:not(.Danger):hover,
[data-has-custom-bg="true"] .ButtonGhost:not(.Danger):active {
    background: rgba(255, 255, 255, 0.50) !important;
    color: var(--ColorText) !important;
    border-color: rgba(255, 255, 255, 0.50) !important;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.10) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost:not(.Danger):hover,
[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost:not(.Danger):active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: rgb(255, 255, 255) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ButtonGhost.Danger,
[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost.Danger,
[data-has-custom-bg="true"] #SettingsDeleteAccountButton,
[data-theme="dark"][data-has-custom-bg="true"] #SettingsDeleteAccountButton,
[data-has-custom-bg="true"] #RemoveCustomBgButton,
[data-theme="dark"][data-has-custom-bg="true"] #RemoveCustomBgButton {
    background: rgba(239, 68, 68, 0.10) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(160%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(160%) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.10) !important;
    color: var(--ColorDanger) !important;
}

[data-has-custom-bg="true"] .ButtonGhost.Danger:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost.Danger:hover,
[data-has-custom-bg="true"] #SettingsDeleteAccountButton:hover,
[data-theme="dark"][data-has-custom-bg="true"] #SettingsDeleteAccountButton:hover,
[data-has-custom-bg="true"] #RemoveCustomBgButton:hover,
[data-theme="dark"][data-has-custom-bg="true"] #RemoveCustomBgButton:hover {
    background: rgba(239, 68, 68, 0.20) !important;
    border-color: rgba(239, 68, 68, 0.65) !important;
    box-shadow: 0px 2px 10px rgba(239, 68, 68, 0.15) !important;
    color: var(--ColorDanger) !important;
}

[data-has-custom-bg="true"] .ButtonPrimary {
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.40);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

[data-has-custom-bg="true"] .ButtonPrimary:hover {
    box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.25);
    filter: brightness(1.10);
}

[data-has-custom-bg="true"] .IconButton {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05) !important;
    color: var(--ColorText) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .IconButton {
    background: rgba(20, 20, 20, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.25) !important;
    color: var(--ColorText) !important;
}

[data-has-custom-bg="true"] .IconButton:hover,
[data-has-custom-bg="true"] .IconButton:active {
    background: rgba(255, 255, 255, 0.45) !important;
    color: var(--ColorText) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.10) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .IconButton:hover,
[data-theme="dark"][data-has-custom-bg="true"] .IconButton:active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: rgb(255, 255, 255) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25) !important;
}

[data-has-custom-bg="true"] .ComposerWrap {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ComposerWrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-has-custom-bg="true"] .ComposerShell {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px));
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px));
    border: 1px solid rgba(255, 255, 255, 0.35);
}

[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell {
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px));
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px));
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-has-custom-bg="true"] .ComposerShell:focus-within {
    background: rgba(255, 255, 255, 0.45) !important;
    border-color: var(--ColorInk) !important;
    box-shadow: 0px 0px 0px 3px var(--SelectColor),
                0px 8px 25px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell:focus-within {
    background: rgba(20, 20, 20, 0.55) !important;
    border-color: var(--ColorInk) !important;
    box-shadow: 0px 0px 0px 3px var(--SelectColor),
                0px 8px 25px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ComposerTool,
[data-theme="dark"][data-has-custom-bg="true"] .ComposerTool {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--ColorTextSoft) !important;
}

[data-has-custom-bg="true"] .ComposerTool:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ComposerTool:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--ColorText) !important;
    border: none !important;
    box-shadow: none !important;
}

[data-has-custom-bg="true"] .SidebarQuickModeBtn {
    background: rgba(255, 255, 255, 0.30) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .SidebarQuickModeBtn {
    background: rgba(20, 20, 20, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-has-custom-bg="true"] .Bubble {
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);
}

[data-has-custom-bg="true"] .BubbleUser,
[data-has-custom-bg="true"] .MessageUser .Bubble {
    background: var(--ColorInk);
    color: var(--ColorInkInverse);
}

[data-has-custom-bg="true"] .MessageAssistant .Bubble,
[data-has-custom-bg="true"] .BubbleAssistant,
[data-has-custom-bg="true"] .AccountCard,
[data-has-custom-bg="true"] .CustomisationCard,
[data-has-custom-bg="true"] .ModalCard,
[data-has-custom-bg="true"] .EmptyTile,
[data-has-custom-bg="true"] .StarterCard,
[data-has-custom-bg="true"] .StarterRow,
[data-has-custom-bg="true"] .ActionList,
[data-has-custom-bg="true"] .InfoRows,
[data-has-custom-bg="true"] .CustomBgPreviewWrap,
[data-has-custom-bg="true"] .CustomBgBlurSection,
[data-has-custom-bg="true"] .MemoryBox,
[data-has-custom-bg="true"] .ChatDropdown,
[data-has-custom-bg="true"] .ProfileCard {
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    background: rgba(255, 255, 255, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .MessageAssistant .Bubble,
[data-theme="dark"][data-has-custom-bg="true"] .BubbleAssistant,
[data-theme="dark"][data-has-custom-bg="true"] .AccountCard,
[data-theme="dark"][data-has-custom-bg="true"] .CustomisationCard,
[data-theme="dark"][data-has-custom-bg="true"] .ModalCard,
[data-theme="dark"][data-has-custom-bg="true"] .EmptyTile,
[data-theme="dark"][data-has-custom-bg="true"] .StarterCard,
[data-theme="dark"][data-has-custom-bg="true"] .StarterRow,
[data-theme="dark"][data-has-custom-bg="true"] .ActionList,
[data-theme="dark"][data-has-custom-bg="true"] .InfoRows,
[data-theme="dark"][data-has-custom-bg="true"] .CustomBgPreviewWrap,
[data-theme="dark"][data-has-custom-bg="true"] .CustomBgBlurSection,
[data-theme="dark"][data-has-custom-bg="true"] .MemoryBox,
[data-theme="dark"][data-has-custom-bg="true"] .ChatDropdown,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileCard {
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    background: rgba(20, 20, 20, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-has-custom-bg="true"] .MessageAssistant .Bubble {
    padding: 13px 19px !important;
    border-radius: var(--RadiusMd) !important;
}

[data-has-custom-bg="true"] .CustomBgBlurSection {
    padding: 15px !important;
    border-radius: var(--RadiusSm) !important;
}

[data-has-custom-bg="true"] .Input,
[data-has-custom-bg="true"] .Textarea,
[data-has-custom-bg="true"] .SidebarSearchBox {
    background: rgba(255, 255, 255, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .Input,
[data-theme="dark"][data-has-custom-bg="true"] .Textarea,
[data-theme="dark"][data-has-custom-bg="true"] .SidebarSearchBox {
    background: rgba(20, 20, 25, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) !important;
}

.SidebarSearchInput,
.SidebarSearchInput:focus,
[data-has-custom-bg="true"] .SidebarSearchInput,
[data-has-custom-bg="true"] .SidebarSearchInput:focus,
[data-theme="dark"][data-has-custom-bg="true"] .SidebarSearchInput,
[data-theme="dark"][data-has-custom-bg="true"] .SidebarSearchInput:focus {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

[data-has-custom-bg="true"] .Input:focus,
[data-has-custom-bg="true"] .Textarea:focus,
[data-has-custom-bg="true"] .EditInput:focus,
[data-has-custom-bg="true"] .OtpInput:focus,
[data-has-custom-bg="true"] .SidebarSearchBox:focus-within {
    background: rgba(255, 255, 255, 0.55) !important;
    border-color: rgba(0, 130, 250, 0.65) !important;
    box-shadow: 0px 0px 0px 3px rgba(0, 130, 250, 0.25),
                0px 4px 15px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    outline: none !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .Input:focus,
[data-theme="dark"][data-has-custom-bg="true"] .Textarea:focus,
[data-theme="dark"][data-has-custom-bg="true"] .EditInput:focus,
[data-theme="dark"][data-has-custom-bg="true"] .OtpInput:focus,
[data-theme="dark"][data-has-custom-bg="true"] .SidebarSearchBox:focus-within {
    background: rgba(20, 20, 25, 0.55) !important;
    border-color: rgba(0, 130, 250, 0.65) !important;
    box-shadow: 0px 0px 0px 3px rgba(0, 130, 250, 0.35),
                0px 4px 15px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    outline: none !important;
}

[data-has-custom-bg="true"] .AccountCardActions {
    border-top: 1px solid rgba(255, 255, 255, 0.20) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .AccountCardActions {
    border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
}

[data-has-custom-bg="true"] .AccountAvatar,
[data-theme="dark"][data-has-custom-bg="true"] .AccountAvatar {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
}

[data-has-custom-bg="true"] .AccountAvatar.Guest,
[data-theme="dark"][data-has-custom-bg="true"] .AccountAvatar.Guest {
    background: rgba(255, 255, 255, 0.10) !important;
    border-color: rgba(255, 255, 255, 0.20) !important;
    color: var(--ColorTextSoft) !important;
}

[data-has-custom-bg="true"] .StarterRow:hover,
[data-has-custom-bg="true"] .StarterRow:active {
    background: rgba(255, 255, 255, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.50) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .StarterRow:hover,
[data-theme="dark"][data-has-custom-bg="true"] .StarterRow:active {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):hover,
[data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):active {
    background: rgba(255, 255, 255, 0.35) !important;
    color: var(--ColorText) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):hover,
[data-theme="dark"][data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgb(255, 255, 255) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
}

/* Assistant icon color in dark mode with glassmorphism */
[data-theme="dark"][data-has-custom-bg="true"] .EmptyTile,
[data-theme="dark"][data-has-custom-bg="true"] .EmptyTile .Icon,
[data-theme="dark"][data-has-custom-bg="true"] .EmptyTile svg,
[data-theme="dark"][data-has-custom-bg="true"] .StarterIcon,
[data-theme="dark"][data-has-custom-bg="true"] .StarterIcon .Icon,
[data-theme="dark"][data-has-custom-bg="true"] .StarterIcon svg,
[data-theme="dark"][data-has-custom-bg="true"] .AssistantAvatar,
[data-theme="dark"][data-has-custom-bg="true"] .AssistantAvatar .Icon,
[data-theme="dark"][data-has-custom-bg="true"] .AssistantAvatar svg,
[data-theme="dark"][data-has-custom-bg="true"] .MessageAssistant .Icon,
[data-theme="dark"][data-has-custom-bg="true"] .MessageAssistant svg {
    color: var(--ColorIconActive) !important;
    stroke: var(--ColorIconActive) !important;
    fill: none;
}

/* Automatic text contrast adjustment for light background images */
[data-has-custom-bg="true"][data-bg-tone="light"] {
    --ColorText: rgb(10, 10, 10);
    --ColorTextSoft: rgb(45, 45, 45);
    --ColorTextFaint: rgb(75, 75, 75);
}

[data-has-custom-bg="true"][data-bg-tone="light"] .EmptyTitle,
[data-has-custom-bg="true"][data-bg-tone="light"] .HeaderTitle,
[data-has-custom-bg="true"][data-bg-tone="light"] .ViewHeading {
    color: rgb(10, 10, 10);
    text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.60);
}

[data-has-custom-bg="true"][data-bg-tone="light"] .EmptyText,
[data-has-custom-bg="true"][data-bg-tone="light"] .ViewSub {
    color: rgb(50, 50, 50);
    text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.50);
}

/* Automatic text contrast adjustment for dark background images */
[data-has-custom-bg="true"][data-bg-tone="dark"] {
    --ColorText: rgb(250, 250, 250);
    --ColorTextSoft: rgb(215, 215, 215);
    --ColorTextFaint: rgb(175, 175, 175);
}

[data-has-custom-bg="true"][data-bg-tone="dark"] .EmptyTitle,
[data-has-custom-bg="true"][data-bg-tone="dark"] .HeaderTitle,
[data-has-custom-bg="true"][data-bg-tone="dark"] .ViewHeading {
    color: rgb(255, 255, 255);
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.70);
}

[data-has-custom-bg="true"][data-bg-tone="dark"] .EmptyText,
[data-has-custom-bg="true"][data-bg-tone="dark"] .ViewSub {
    color: rgb(210, 210, 210);
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.60);
}

.FieldHeaderRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.ButtonGhost.Compact {
    padding: 3px 9px;
    font-size: 11px;
}

.MemoryBox {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 11px;
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    background: var(--ColorSurface);
}

.MemoryList {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 180px;
    overflow-y: auto;
}

.MemoryItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 5px 9px;
    border-radius: var(--RadiusSm);
    background: var(--ColorCanvas);
    border: 1px solid var(--ColorBorder);
}

.MemoryText {
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
    flex: 1;
    min-width: 0px;
    word-break: break-word;
}

.MemoryDeleteBtn {
    background: transparent;
    border: none;
    color: var(--ColorTextFaint);
    cursor: pointer;
    padding: 3px;
    display: grid;
    place-items: center;
    border-radius: var(--SpaceXs);
    transition: color var(--DurationFast) var(--EaseOut);
}

.MemoryDeleteBtn:hover {
    color: var(--ColorDanger);
}

.MemoryLockOverlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;
    border-radius: var(--RadiusSm);
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

[data-theme="dark"] .MemoryLockOverlay {
    background: rgba(255, 255, 255, 0.05);
}

.MemoryLockContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    max-width: 360px;
}

.MemoryLockContent .Icon {
    width: 25px;
    height: 25px;
    color: var(--ColorIcons);
}

.MemoryLockContent .MemoryText {
    text-align: center;
    color: var(--ColorTextSoft);
    font-size: var(--SizeTextSm);
}

.MemoryLockActions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 5px;
}

.MemoryAddRow {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.MemoryAddRow .Input {
    flex: 1;
}

.SidebarQuickModes {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--SpaceSm) var(--SpaceLg);
    border-bottom: 1px solid var(--ColorDivider);
}

.SidebarQuickModeBtn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0px var(--SpaceMd);
    gap: 9px;
    height: 35px;
    border-radius: var(--RadiusSm);
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    color: var(--ColorText);
    font-size: var(--SizeTextSm);
    font-weight: 500;
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut), border-color var(--DurationFast) var(--EaseOut);
}

.SidebarQuickModeBtn:hover {
    background: var(--ColorHover);
    border-color: var(--ColorDivider);
}

.SidebarQuickModeBtn .Icon {
    width: 15px;
    height: 15px;
}

.MapWidgetCard {
    margin: var(--SpaceSm) 0px;
    border-radius: var(--RadiusMd);
    overflow: hidden;
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}

.MapWidgetHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--SpaceMd);
    background: var(--ColorCanvas);
    border-bottom: 1px solid var(--ColorDivider);
    gap: var(--SpaceSm);
}

.MapWidgetTitle {
    display: flex;
    align-items: center;
    gap: var(--SpaceSm);
    font-weight: 600;
    font-size: var(--SizeTextSm);
    color: var(--ColorText);
}

.MapWidgetTitle .Icon {
    color: var(--ColorInk) !important;
}

.MapWidgetExternal {
    font-size: var(--SizeTextXs);
    color: var(--ColorInk);
    text-decoration: none;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: var(--RadiusSm);
    transition: background var(--DurationFast) var(--EaseOut), color var(--DurationFast) var(--EaseOut);
}

.MapWidgetExternal:hover {
    background: var(--ColorHover);
    text-decoration: none;
}

.MapWidgetFrame {
    width: 100%;
    height: 280px;
    border: none;
    display: block;
}

[data-has-custom-bg="true"] .MapWidgetCard {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px));
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px));
}

[data-theme="dark"][data-has-custom-bg="true"] .MapWidgetCard {
    background: rgba(20, 20, 20, 0.70);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-has-custom-bg="true"] .WeatherWidget {
    background: rgba(30, 30, 30, 0.75) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(160%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.PasswordInputWrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.PasswordInputWrap .Input {
    padding-right: 40px !important;
    width: 100%;
}

.PasswordToggleBtn {
    position: absolute;
    right: 9px;
    background: transparent;
    border: none;
    color: var(--ColorTextFaint);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 5px;
    border-radius: var(--RadiusSm);
    transition: color var(--DurationFast) var(--EaseOut);
}

.PasswordToggleBtn:hover {
    color: var(--ColorText);
}

.PasswordToggleBtn .Icon {
    width: 17px;
    height: 17px;
}

.VariantSwitcher {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 9px;
    padding: 1px 3px;
    border-radius: var(--RadiusSm);
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorder);
    user-select: none;
}

.VariantBtn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 3px;
    border-radius: var(--SpaceXs);
    color: var(--ColorTextSoft);
    transition: color var(--DurationFast) var(--EaseOut), background var(--DurationFast) var(--EaseOut);
}

.VariantBtn:hover:not(:disabled) {
    color: var(--ColorText);
    background: var(--ColorHover);
}

.VariantBtn:disabled {
    opacity: 0.35;
    cursor: default;
}

.VariantBtn .Icon {
    width: 13px;
    height: 13px;
}

.VariantCount {
    font-size: 11px;
    font-weight: var(--WeightMedium);
    color: var(--ColorTextSoft);
    padding: 0px 3px;
    font-variant-numeric: tabular-nums;
}

.ProfileSelectorWrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: var(--SpaceSm);
}

.ProfilePill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    height: 31px;
    border-radius: var(--RadiusSm);
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    color: var(--ColorText);
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut), border-color var(--DurationFast) var(--EaseOut);
}

.ProfilePill:hover {
    background: var(--ColorHover);
    border-color: var(--ColorDivider);
}

.ProfilePillIcon .Icon {
    width: 15px;
    height: 15px;
    color: var(--ColorIconEnergetic);
}

.ProfilePillCaret.Icon {
    width: 13px;
    height: 13px;
    color: var(--ColorTextFaint);
}

.ProfileDropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0px;
    min-width: 230px;
    background: var(--ColorSurface);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    box-shadow: var(--ShadowLg);
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 50;
    animation: DropdownFadeIn var(--DurationFast) var(--EaseOut);
}

.ProfileDropdown.Hidden {
    display: none !important;
}

.ProfileDropdownItem {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: var(--RadiusSm);
    border: none;
    background: transparent;
    color: var(--ColorText);
    font-size: var(--SizeTextXs);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background var(--DurationFast) var(--EaseOut);
}

.ProfileDropdownItem:not(.Active):hover {
    background: var(--ColorHover);
    border-color: var(--ColorBorderStrong);
}

.ProfileDropdownItem.Active,
.ProfileDropdownItem.Active:hover,
.ProfileDropdown .ProfileDropdownItem.Active,
.ProfileDropdown .ProfileDropdownItem.Active:hover {
    background: var(--ColorHover) !important;
    border: 1px solid var(--ColorBorder) !important;
    border-color: var(--ColorBorder) !important;
    font-weight: var(--WeightSemibold) !important;
    color: var(--ColorText) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .ProfileDropdownItem.Active,
[data-theme="dark"] .ProfileDropdownItem.Active:hover,
[data-theme="dark"] .ProfileDropdown .ProfileDropdownItem.Active,
[data-theme="dark"] .ProfileDropdown .ProfileDropdownItem.Active:hover {
    background: var(--ColorHover) !important;
    border: 1px solid var(--ColorBorderStrong) !important;
    border-color: var(--ColorBorderStrong) !important;
    font-weight: var(--WeightSemibold) !important;
    color: var(--ColorText) !important;
    box-shadow: none !important;
}

.ProfileDropdownItem .Icon {
    width: 15px;
    height: 15px;
    color: var(--ColorIconEnergetic);
}

.ProfileDropdownItemContent {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0px;
}

.ProfileDropdownItemName {
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
    line-height: 1.3;
}

.ProfileDropdownItemDesc {
    font-size: 11px;
    color: var(--ColorTextFaint);
    line-height: 1.3;
}

.ProfileDropdownItemIcon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ProfileDropdownItemCheck {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--ColorText);
}

.ProfileList {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ProfileCard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 15px;
    border-radius: var(--RadiusSm);
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    transition: border-color var(--DurationFast) var(--EaseOut);
}

.ProfileCard:hover {
    border-color: var(--ColorDivider);
}

.ProfileCardLeft {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0px;
}

.ProfileCardIcon {
    width: 35px;
    height: 35px;
    border-radius: var(--RadiusSm);
    background: var(--ColorCanvas);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ProfileCardIcon .Icon {
    width: 19px;
    height: 19px;
    color: var(--ColorIconEnergetic);
}

.ProfileCardText {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0px;
}

.ProfileCardTitle {
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
}

.ProfileCardDesc {
    font-size: var(--SizeTextXs);
    color: var(--ColorTextFaint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ProfileCardActions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ChatFolderItem {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

.ChatFolderHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 9px;
    border-radius: var(--RadiusSm);
    cursor: pointer;
    color: var(--ColorTextSoft);
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightSemibold);
    user-select: none;
    transition: background var(--DurationFast) var(--EaseOut), color var(--DurationFast) var(--EaseOut);
}

.ChatFolderHeader:hover {
    background: var(--ColorHover);
    color: var(--ColorText);
}

.ChatFolderTitleRow {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0px;
}

.ChatFolderChevron.Icon {
    width: 13px;
    height: 13px;
    transition: transform var(--DurationFast) var(--EaseOut);
}

.ChatFolderItem.Collapsed .ChatFolderChevron.Icon {
    transform: rotate(-90deg);
}

.ChatFolderItem.Collapsed .ChatFolderContents {
    display: none;
}

.ChatFolderIcon.Icon {
    width: 15px;
    height: 15px;
    color: var(--ColorIconEnergetic);
}

.ChatFolderName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ChatFolderCount {
    font-size: 11px;
    color: var(--ColorTextFaint);
    margin-left: 3px;
}

.ChatFolderActions {
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0;
    transition: opacity var(--DurationFast) var(--EaseOut);
}

.ChatFolderHeader:hover .ChatFolderActions {
    opacity: 1;
}

.ChatFolderActionBtn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--ColorTextFaint);
    padding: 3px;
    border-radius: var(--SpaceXs);
    display: grid;
    place-items: center;
}

.ChatFolderActionBtn:hover {
    color: var(--ColorText);
}

.ChatFolderActionBtn.Danger:hover {
    color: var(--ColorDanger);
}

.ChatFolderContents {
    margin-left: 15px;
    padding-left: 11px;
    border-left: 1.5px solid var(--ColorBorder);
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 3px;
    margin-bottom: 5px;
}

.ChatTagPills {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
}

.ChatTagPill {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 9px;
    background: var(--ColorHover);
    color: var(--ColorTextSoft);
    border: 1px solid var(--ColorBorder);
    line-height: 1.3;
}

.FolderSelectList {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 220px;
    overflow-y: auto;
}

.FolderSelectOption {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: var(--RadiusSm);
    border: 1px solid var(--ColorBorder);
    background: var(--ColorSurface);
    color: var(--ColorText);
    font-size: var(--SizeTextSm);
    cursor: pointer;
    transition: background var(--DurationFast) var(--EaseOut), border-color var(--DurationFast) var(--EaseOut);
}

.FolderSelectOption:hover {
    background: var(--ColorHover);
    border-color: var(--ColorDivider);
}

.FolderSelectOption.Active {
    border-color: var(--ColorInk);
    font-weight: var(--WeightSemibold);
}

.HeaderChatActions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.HeaderChatActions.Hidden {
    display: none !important;
}

.AllTagsList {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 250px;
    overflow-y: auto;
}

.AllTagItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    background: var(--ColorInput);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusSm);
    transition: background var(--DurationFast) var(--EaseOut);
}

.AllTagItem:hover {
    background: var(--ColorHover);
}

.AllTagItemInfo {
    display: flex;
    align-items: center;
    gap: 9px;
}

.AllTagItemName {
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightSemibold);
    color: var(--ColorText);
}

.AllTagItemCount {
    font-size: 11px;
    color: var(--ColorTextFaint);
}

.AllTagItemDelete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--ColorTextFaint);
    padding: 5px;
    border-radius: var(--SpaceXs);
    display: grid;
    place-items: center;
    transition: color var(--DurationFast) var(--EaseOut);
}

.AllTagItemDelete:hover {
    color: var(--ColorDanger);
}

.WebImageCard {
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    overflow: hidden;
    background: var(--ColorSurface);
}

.WebImageBadge {
    background: rgba(0, 130, 250, 0.15) !important;
    color: var(--ColorInk) !important;
    border: 1px solid rgba(0, 130, 250, 0.25) !important;
}

/* Enhanced vivid glassmorphism under custom background */
[data-has-custom-bg="true"] .Sidebar {
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .Sidebar {
    background: rgba(15, 15, 15, 0.40) !important;
    backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSidebarBlur, 25px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .Header {
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .Header {
    background: rgba(15, 15, 15, 0.40) !important;
    backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgHeaderBlur, 25px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ComposerWrap {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

[data-has-custom-bg="true"] .ComposerShell {
    background: rgba(255, 255, 255, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.10),
                inset 0px 1px 1px rgba(255, 255, 255, 0.60) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell {
    background: rgba(20, 20, 20, 0.50) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.35),
                inset 0px 1px 1px rgba(255, 255, 255, 0.20) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ComposerShell:focus-within {
    background: rgba(255, 255, 255, 0.50) !important;
    border-color: var(--ColorInk) !important;
    box-shadow: 0px 0px 0px 3px var(--SelectColor),
                0px 10px 35px rgba(0, 0, 0, 0.15),
                inset 0px 1px 1px rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell:focus-within {
    background: rgba(25, 25, 25, 0.60) !important;
    border-color: var(--ColorInk) !important;
    box-shadow: 0px 0px 0px 3px var(--SelectColor),
                0px 10px 35px rgba(0, 0, 0, 0.40),
                inset 0px 1px 1px rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(180%) !important;
}

/* Composer tool buttons (attachment, image, voice) blend seamlessly into the search bar */
.ComposerShell .ComposerTool,
[data-has-custom-bg="true"] .ComposerShell .ComposerTool,
[data-theme="dark"] .ComposerShell .ComposerTool,
[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell .ComposerTool {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--ColorTextSoft) !important;
    transition: background var(--DurationFast) var(--EaseOut),
                color var(--DurationFast) var(--EaseOut),
                transform var(--DurationFast) var(--EaseOut) !important;
}

.ComposerShell .ComposerTool:hover,
[data-has-custom-bg="true"] .ComposerShell .ComposerTool:hover,
[data-theme="dark"] .ComposerShell .ComposerTool:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell .ComposerTool:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--ColorText) !important;
    transform: translateY(-1px) !important;
}

[data-theme="light"] .ComposerShell .ComposerTool:hover,
[data-theme="light"][data-has-custom-bg="true"] .ComposerShell .ComposerTool:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--ColorText) !important;
    transform: translateY(-1px) !important;
}

.ComposerShell .ComposerTool:active,
[data-has-custom-bg="true"] .ComposerShell .ComposerTool:active,
[data-theme="dark"] .ComposerShell .ComposerTool:active,
[data-theme="dark"][data-has-custom-bg="true"] .ComposerShell .ComposerTool:active {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: scale(0.95) !important;
}

[data-theme="light"] .ComposerShell .ComposerTool:active,
[data-theme="light"][data-has-custom-bg="true"] .ComposerShell .ComposerTool:active {
    background: rgba(0, 0, 0, 0.10) !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: scale(0.95) !important;
}

[data-has-custom-bg="true"] .ComposerTool.Listening,
.ComposerShell .ComposerTool.Listening {
    background: rgba(239, 65, 65, 0.35) !important;
    border: 1px solid rgba(239, 65, 65, 0.70) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow: 0px 0px 15px rgba(239, 65, 65, 0.50) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

/* Composer send button glossy orb */
[data-has-custom-bg="true"] .ComposerSend,
.ComposerShell .ComposerSend {
    background: var(--ColorInk) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: var(--ColorInkInverse) !important;
    box-shadow: 0px 4px 15px var(--SelectColor),
                inset 0px 1px 1px rgba(255, 255, 255, 0.50) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    transition: transform var(--DurationFast) var(--EaseOut),
                filter var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ComposerSend,
[data-theme="dark"] .ComposerShell .ComposerSend {
    background: var(--ColorInk) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: var(--ColorInkInverse) !important;
    box-shadow: 0px 4px 15px var(--SelectColor),
                inset 0px 1px 1px rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .ComposerSend:hover,
.ComposerShell .ComposerSend:hover {
    filter: brightness(1.15) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0px 5px 20px var(--SelectColor),
                inset 0px 1px 1px rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
}

[data-has-custom-bg="true"] .ComposerSend:active,
.ComposerShell .ComposerSend:active {
    filter: brightness(0.95) !important;
    transform: scale(0.95) !important;
    box-shadow: 0px 2px 8px rgba(0, 130, 255, 0.35),
                inset 0px 1px 1px rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

/* Surfaces and cards blur definitions */
[data-has-custom-bg="true"] .MessageAssistant .Bubble,
[data-has-custom-bg="true"] .BubbleAssistant,
[data-has-custom-bg="true"] .Bubble,
[data-has-custom-bg="true"] .CustomisationCard,
[data-has-custom-bg="true"] .ModalCard,
[data-has-custom-bg="true"] .EmptyTile,
[data-has-custom-bg="true"] .StarterCard,
[data-has-custom-bg="true"] .StarterRow,
[data-has-custom-bg="true"] .ActionList,
[data-has-custom-bg="true"] .InfoRows,
[data-has-custom-bg="true"] .CustomBgPreviewWrap,
[data-has-custom-bg="true"] .CustomBgBlurSection,
[data-has-custom-bg="true"] .MemoryBox,
[data-has-custom-bg="true"] .ChatDropdown,
[data-has-custom-bg="true"] .ProfileCard,
[data-has-custom-bg="true"] .ProfileDropdown,
[data-has-custom-bg="true"] .WebImageCard,
[data-has-custom-bg="true"] .FolderSelectOption,
[data-has-custom-bg="true"] .AllTagItem {
    background: rgba(255, 255, 255, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .MessageAssistant .Bubble,
[data-theme="dark"][data-has-custom-bg="true"] .BubbleAssistant,
[data-theme="dark"][data-has-custom-bg="true"] .Bubble,
[data-theme="dark"][data-has-custom-bg="true"] .CustomisationCard,
[data-theme="dark"][data-has-custom-bg="true"] .ModalCard,
[data-theme="dark"][data-has-custom-bg="true"] .EmptyTile,
[data-theme="dark"][data-has-custom-bg="true"] .StarterCard,
[data-theme="dark"][data-has-custom-bg="true"] .StarterRow,
[data-theme="dark"][data-has-custom-bg="true"] .ActionList,
[data-theme="dark"][data-has-custom-bg="true"] .InfoRows,
[data-theme="dark"][data-has-custom-bg="true"] .CustomBgPreviewWrap,
[data-theme="dark"][data-has-custom-bg="true"] .CustomBgBlurSection,
[data-theme="dark"][data-has-custom-bg="true"] .MemoryBox,
[data-theme="dark"][data-has-custom-bg="true"] .ChatDropdown,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileCard,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileDropdown,
[data-theme="dark"][data-has-custom-bg="true"] .WebImageCard,
[data-theme="dark"][data-has-custom-bg="true"] .FolderSelectOption,
[data-theme="dark"][data-has-custom-bg="true"] .AllTagItem {
    background: rgba(20, 20, 20, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
}

/* User bubble stays glossy and translucent under custom bg */
[data-has-custom-bg="true"] .BubbleUser,
[data-has-custom-bg="true"] .MessageUser .Bubble {
    background: rgba(0, 125, 255, 0.85) !important;
    color: rgb(255, 255, 255) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
    box-shadow: 0px 4px 20px rgba(0, 125, 255, 0.30),
                inset 0px 1px 1px rgba(255, 255, 255, 0.50) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .BubbleUser,
[data-theme="dark"][data-has-custom-bg="true"] .MessageUser .Bubble {
    background: rgba(0, 135, 255, 0.75) !important;
    color: rgb(255, 255, 255) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0px 4px 20px rgba(0, 135, 255, 0.35),
                inset 0px 1px 1px rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(180%) !important;
}

/* Universal buttons blur in resting state */
[data-has-custom-bg="true"] .ButtonGhost,
[data-has-custom-bg="true"] .IconButton,
[data-has-custom-bg="true"] .ButtonPrimary,
[data-has-custom-bg="true"] .FieldResetBtn,
[data-has-custom-bg="true"] .PigmentResetBtn,
[data-has-custom-bg="true"] .SidebarQuickModeBtn,
[data-has-custom-bg="true"] .FolderToggle,
[data-has-custom-bg="true"] .JumpPill,
[data-has-custom-bg="true"] .MetaAction,
[data-has-custom-bg="true"] .ChatItemAction,
[data-has-custom-bg="true"] .BackNavButton,
[data-has-custom-bg="true"] .TagChip,
[data-has-custom-bg="true"] .ActionPill,
[data-has-custom-bg="true"] .SettingsTabBtn,
[data-has-custom-bg="true"] #TeachMeSidebarBtn,
[data-has-custom-bg="true"] #RecommendMeSidebarBtn,
[data-has-custom-bg="true"] .ChatFolderActionBtn,
[data-has-custom-bg="true"] .InputAffix,
[data-has-custom-bg="true"] .AllTagItemDelete,
[data-has-custom-bg="true"] .ProfileSelectorTrigger,
[data-has-custom-bg="true"] .ProfilePill {
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

[data-has-custom-bg="true"] .FieldResetBtn,
[data-has-custom-bg="true"] .PigmentResetBtn,
[data-has-custom-bg="true"] .InputAffix,
[data-has-custom-bg="true"] .ChatFolderActionBtn,
[data-has-custom-bg="true"] .AllTagItemDelete {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: var(--ColorText) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .FieldResetBtn,
[data-theme="dark"][data-has-custom-bg="true"] .PigmentResetBtn,
[data-theme="dark"][data-has-custom-bg="true"] .InputAffix,
[data-theme="dark"][data-has-custom-bg="true"] .ChatFolderActionBtn,
[data-theme="dark"][data-has-custom-bg="true"] .AllTagItemDelete {
    background: rgba(20, 20, 20, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgb(255, 255, 255) !important;
}

/* Universal non-flat rules for all elements over glass surfaces and custom background */
[data-has-custom-bg="true"] .ButtonGhost:hover,
[data-has-custom-bg="true"] .IconButton:hover,
[data-has-custom-bg="true"] .FieldResetBtn:hover,
[data-has-custom-bg="true"] .PigmentResetBtn:hover,
[data-has-custom-bg="true"] .ChatFolderActionBtn:hover,
[data-has-custom-bg="true"] .ChatFolderHeader:hover,
[data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):hover,
[data-has-custom-bg="true"] .ProfileDropdownItem:not(.Active):hover,
[data-has-custom-bg="true"] .FolderSelectOption:hover,
[data-has-custom-bg="true"] .AllTagItem:hover,
[data-has-custom-bg="true"] .StarterRow:hover,
[data-has-custom-bg="true"] .ActionPill:hover,
[data-has-custom-bg="true"] .TagChip:hover,
[data-has-custom-bg="true"] .ThemeSegment:hover,
[data-has-custom-bg="true"] .ProfileOption:hover,
[data-has-custom-bg="true"] .ChatItemAction:hover,
[data-has-custom-bg="true"] #TeachMeSidebarBtn:hover,
[data-has-custom-bg="true"] #RecommendMeSidebarBtn:hover,
[data-has-custom-bg="true"] .SidebarQuickModeBtn:hover,
.Sidebar .ChatItemAction:hover,
.Sidebar .ChatFolderHeader:hover,
.Sidebar .ChatFolderActionBtn:hover,
.Sidebar .AllTagItem:hover,
.Sidebar #TeachMeSidebarBtn:hover,
.Sidebar #RecommendMeSidebarBtn:hover,
.Sidebar .SidebarQuickModeBtn:hover,
.Header .IconButton:hover,
.Header .ProfilePill:hover,
.ChatDropdown .ChatDropdownItem:not(.Danger):hover,
.ProfileDropdown .ProfileDropdownItem:not(.Active):hover,
.ModalCard .ButtonGhost:hover,
.ModalCard .IconButton:hover {
    background: rgba(255, 255, 255, 0.50) !important;
    border-color: var(--ColorBorderStrong) !important;
    color: var(--ColorText) !important;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.09) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost:hover,
[data-theme="dark"][data-has-custom-bg="true"] .IconButton:hover,
[data-theme="dark"][data-has-custom-bg="true"] .FieldResetBtn:hover,
[data-theme="dark"][data-has-custom-bg="true"] .PigmentResetBtn:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ChatFolderActionBtn:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ChatFolderHeader:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):hover,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileDropdownItem:not(.Active):hover,
[data-theme="dark"][data-has-custom-bg="true"] .FolderSelectOption:hover,
[data-theme="dark"][data-has-custom-bg="true"] .AllTagItem:hover,
[data-theme="dark"][data-has-custom-bg="true"] .StarterRow:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ActionPill:hover,
[data-theme="dark"][data-has-custom-bg="true"] .TagChip:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ThemeSegment:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileOption:hover,
[data-theme="dark"][data-has-custom-bg="true"] .ChatItemAction:hover,
[data-theme="dark"][data-has-custom-bg="true"] #TeachMeSidebarBtn:hover,
[data-theme="dark"][data-has-custom-bg="true"] #RecommendMeSidebarBtn:hover,
[data-theme="dark"][data-has-custom-bg="true"] .SidebarQuickModeBtn:hover,
[data-theme="dark"] .Sidebar .ChatItemAction:hover,
[data-theme="dark"] .Sidebar .ChatFolderHeader:hover,
[data-theme="dark"] .Sidebar .ChatFolderActionBtn:hover,
[data-theme="dark"] .Sidebar .AllTagItem:hover,
[data-theme="dark"] .Sidebar #TeachMeSidebarBtn:hover,
[data-theme="dark"] .Sidebar #RecommendMeSidebarBtn:hover,
[data-theme="dark"] .Sidebar .SidebarQuickModeBtn:hover,
[data-theme="dark"] .Header .IconButton:hover,
[data-theme="dark"] .Header .ProfilePill:hover,
[data-theme="dark"] .ChatDropdown .ChatDropdownItem:not(.Danger):hover,
[data-theme="dark"] .ProfileDropdown .ProfileDropdownItem:not(.Active):hover,
[data-theme="dark"] .ModalCard .ButtonGhost:hover,
[data-theme="dark"] .ModalCard .IconButton:hover {
    background: rgba(255, 255, 255, 0.19) !important;
    border-color: var(--ColorBorderStrong) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(200%) !important;
}

/* Universal active click rules keeping glossy glass highlights */
[data-has-custom-bg="true"] .ButtonGhost:active,
[data-has-custom-bg="true"] .IconButton:active,
[data-has-custom-bg="true"] .FieldResetBtn:active,
[data-has-custom-bg="true"] .PigmentResetBtn:active,
[data-has-custom-bg="true"] .ChatFolderActionBtn:active,
[data-has-custom-bg="true"] .ChatFolderHeader:active,
[data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):active,
[data-has-custom-bg="true"] .ProfileDropdownItem:not(.Active):active,
[data-has-custom-bg="true"] .FolderSelectOption:active,
[data-has-custom-bg="true"] .AllTagItem:active,
[data-has-custom-bg="true"] .StarterRow:active,
[data-has-custom-bg="true"] .ActionPill:active,
[data-has-custom-bg="true"] .TagChip:active,
[data-has-custom-bg="true"] .ThemeSegment:active,
[data-has-custom-bg="true"] .ProfileOption:active,
[data-has-custom-bg="true"] .ChatItemAction:active,
[data-has-custom-bg="true"] #TeachMeSidebarBtn:active,
[data-has-custom-bg="true"] #RecommendMeSidebarBtn:active,
[data-has-custom-bg="true"] .SidebarQuickModeBtn:active,
.Sidebar .ChatItemAction:active,
.Sidebar .ChatFolderHeader:active,
.Sidebar .ChatFolderActionBtn:active,
.Sidebar .AllTagItem:active,
.Sidebar #TeachMeSidebarBtn:active,
.Sidebar #RecommendMeSidebarBtn:active,
.Sidebar .SidebarQuickModeBtn:active,
.Header .IconButton:active,
.Header .ProfilePill:active,
.ChatDropdown .ChatDropdownItem:not(.Danger):active,
.ProfileDropdown .ProfileDropdownItem:not(.Active):active,
.ModalCard .ButtonGhost:active,
.ModalCard .IconButton:active {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: scale(0.95) !important;
    box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.10) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

[data-theme="dark"][data-has-custom-bg="true"] .ButtonGhost:active,
[data-theme="dark"][data-has-custom-bg="true"] .IconButton:active,
[data-theme="dark"][data-has-custom-bg="true"] .FieldResetBtn:active,
[data-theme="dark"][data-has-custom-bg="true"] .PigmentResetBtn:active,
[data-theme="dark"][data-has-custom-bg="true"] .ChatFolderActionBtn:active,
[data-theme="dark"][data-has-custom-bg="true"] .ChatFolderHeader:active,
[data-theme="dark"][data-has-custom-bg="true"] .ChatDropdownItem:not(.Danger):active,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileDropdownItem:not(.Active):active,
[data-theme="dark"][data-has-custom-bg="true"] .FolderSelectOption:active,
[data-theme="dark"][data-has-custom-bg="true"] .AllTagItem:active,
[data-theme="dark"][data-has-custom-bg="true"] .StarterRow:active,
[data-theme="dark"][data-has-custom-bg="true"] .ActionPill:active,
[data-theme="dark"][data-has-custom-bg="true"] .TagChip:active,
[data-theme="dark"][data-has-custom-bg="true"] .ThemeSegment:active,
[data-theme="dark"][data-has-custom-bg="true"] .ProfileOption:active,
[data-theme="dark"][data-has-custom-bg="true"] .ChatItemAction:active,
[data-theme="dark"][data-has-custom-bg="true"] #TeachMeSidebarBtn:active,
[data-theme="dark"][data-has-custom-bg="true"] #RecommendMeSidebarBtn:active,
[data-theme="dark"][data-has-custom-bg="true"] .SidebarQuickModeBtn:active,
[data-theme="dark"] .Sidebar .ChatItemAction:active,
[data-theme="dark"] .Sidebar .ChatFolderHeader:active,
[data-theme="dark"] .Sidebar .ChatFolderActionBtn:active,
[data-theme="dark"] .Sidebar .AllTagItem:active,
[data-theme="dark"] .Sidebar #TeachMeSidebarBtn:active,
[data-theme="dark"] .Sidebar #RecommendMeSidebarBtn:active,
[data-theme="dark"] .Sidebar .SidebarQuickModeBtn:active,
[data-theme="dark"] .Header .IconButton:active,
[data-theme="dark"] .Header .ProfilePill:active,
[data-theme="dark"] .ChatDropdown .ChatDropdownItem:not(.Danger):active,
[data-theme="dark"] .ProfileDropdown .ProfileDropdownItem:not(.Active):active,
[data-theme="dark"] .ModalCard .ButtonGhost:active,
[data-theme="dark"] .ModalCard .IconButton:active {
    background: rgba(255, 255, 255, 0.13) !important;
    transform: scale(0.95) !important;
    box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(180%) !important;
}

/* Custom Background Live Blur Preview Widgets in Customisation Settings */
.ComposerBlurLivePreview,
.SurfaceBlurLivePreview,
.ButtonBlurLivePreview {
    position: relative;
    margin-top: 11px;
    padding: 15px 15px;
    border-radius: var(--RadiusMd);
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
}

.ComposerBlurLivePreview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    border-radius: var(--RadiusFull);
    background: rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(190%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgComposerBlur, 20px)) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.20),
                inset 0px 1px 1px rgba(255, 255, 255, 0.65);
    color: rgb(255, 255, 255);
}

[data-theme="dark"] .ComposerBlurLivePreview {
    background: rgba(15, 15, 15, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.35),
                inset 0px 1px 1px rgba(255, 255, 255, 0.25);
}

.ComposerBlurLiveIcon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    color: rgba(255, 255, 255, 0.90);
}

.ComposerBlurLiveText {
    flex: 1;
    margin-left: 9px;
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    color: rgba(255, 255, 255, 0.90);
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.30);
}

.ComposerBlurLiveSend {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: var(--RadiusFull);
    background: rgba(0, 135, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.60);
    color: rgb(255, 255, 255);
    box-shadow: 0px 2px 10px rgba(0, 135, 255, 0.40);
}

.SurfaceBlurLivePreview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 15px;
    border-radius: var(--RadiusMd);
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(190%) !important;
    -webkit-backdrop-filter: blur(var(--CustomBgSurfaceBlur, 20px)) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0px 8px 25px rgba(0, 0, 0.20),
                inset 0px 1px 1px rgba(255, 255, 255, 0.65);
    color: rgb(255, 255, 255);
}

[data-theme="dark"] .SurfaceBlurLivePreview {
    background: rgba(15, 15, 15, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.35),
                inset 0px 1px 1px rgba(255, 255, 255, 0.25);
}

.SurfaceBlurLiveTitle {
    font-size: var(--SizeTextSm);
    font-weight: var(--WeightSemibold);
    color: rgb(255, 255, 255);
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.40);
}

.SurfaceBlurLiveSub {
    font-size: var(--SizeTextXs);
    color: rgba(255, 255, 255, 0.85);
    margin-top: 3px;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.30);
}

.ButtonBlurLivePreview {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--RadiusMd);
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #a855f7 100%);
}

.ButtonPreviewSample {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: var(--RadiusFull);
    font-size: var(--SizeTextXs);
    font-weight: var(--WeightMedium);
    color: rgb(255, 255, 255);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(190%);
    -webkit-backdrop-filter: blur(var(--CustomBgButtonBlur, 25px)) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15),
                inset 0px 1px 1px rgba(255, 255, 255, 0.60);
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform var(--DurationFast) var(--EaseOut),
                background var(--DurationFast) var(--EaseOut),
                box-shadow var(--DurationFast) var(--EaseOut);
}

.ButtonPreviewSample.Active {
    background: rgba(255, 255, 255, 0.40);
    border-color: rgba(255, 255, 255, 0.70);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.25),
                inset 0px 1px 1px rgba(255, 255, 255, 0.85);
}

.ButtonPreviewSample:hover {
    background: rgba(255, 255, 255, 0.50);
    transform: translateY(-1px);
}

.ButtonPreviewSample:active {
    background: rgba(255, 255, 255, 0.20);
    transform: scale(0.95);
}

/* Ensure borders remain clearly visible on hover across interactive elements */
.SidebarQuickModeBtn,
#TeachMeSidebarBtn,
#RecommendMeSidebarBtn {
    border: 1px solid var(--ColorBorder) !important;
}

.SidebarQuickModeBtn:hover,
#TeachMeSidebarBtn:hover,
#RecommendMeSidebarBtn:hover,
.Sidebar .SidebarQuickModeBtn:hover,
.Sidebar #TeachMeSidebarBtn:hover,
.Sidebar #RecommendMeSidebarBtn:hover {
    border: 1px solid var(--ColorBorderStrong) !important;
    border-color: var(--ColorBorderStrong) !important;
}

.ChatItem {
    border: 1px solid transparent;
}

.ChatItem:not(.Active):hover {
    border: 1px solid var(--ColorBorder) !important;
    border-color: var(--ColorBorder) !important;
}

.IconButton:hover,
.ButtonGhost:hover,
.ProfilePill:hover,
.CustomisationCard:hover {
    border-color: var(--ColorBorderStrong) !important;
}

/* It styles the data management card and interactive rows. */
.DataManagementCard {
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    background: var(--ColorSurface);
    padding: 4px var(--SpaceMd);
    box-shadow: var(--ShadowSm);
}

.DataActionRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--SpaceMd);
    padding: 12px 0px;
}

.DataActionInfo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.DataActionTitle {
    font-size: var(--SizeTextSm);
    font-weight: 600;
    color: var(--ColorText);
}

.DataActionDesc {
    font-size: var(--SizeTextXs);
    color: var(--ColorTextSoft);
    line-height: 1.4;
}

.DataActionDivider {
    height: 1px;
    background: var(--ColorDivider);
}

.ButtonGhost.Danger {
    color: var(--ColorDanger) !important;
    border: 1px solid var(--ColorDanger) !important;
    border-color: var(--ColorDanger) !important;
}

.ButtonGhost.Danger .Icon {
    color: var(--ColorDanger) !important;
}

.ButtonGhost.Danger:hover {
    background: rgba(217, 45, 33, 0.12) !important;
    color: var(--ColorDanger) !important;
    border-color: var(--ColorDanger) !important;
}

.ButtonGhost.Danger:hover .Icon {
    color: var(--ColorDanger) !important;
}

.ButtonPrimary.Danger {
    background: var(--ColorDanger) !important;
    color: #ffffff !important;
    border-color: var(--ColorDanger) !important;
}

.ButtonPrimary.Danger:hover {
    filter: brightness(1.1) !important;
}

.ModalTitle.DangerTitle {
    color: var(--ColorDanger) !important;
}

/* Interactive Map Multi-Place Widget Styles */
.MapWidgetPlacesBar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px var(--SpaceMd);
    background: var(--ColorSurface);
    border-bottom: 1px solid var(--ColorDivider);
    overflow-x: auto;
    scrollbar-width: thin;
}

.MapPlaceChip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--RadiusFull);
    border: 1px solid var(--ColorBorder);
    background: var(--ColorCanvas);
    color: var(--ColorText);
    font-size: var(--SizeTextXs);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--DurationFast) var(--EaseOut);
}

.MapPlaceChip:hover {
    border-color: var(--ColorBorderStrong) !important;
    background: var(--ColorHover);
}

.MapPlaceChip.Active {
    background: var(--ColorInk) !important;
    color: var(--ColorInkInverse) !important;
    border-color: var(--ColorInk) !important;
    font-weight: 600;
}

.MapPlaceChip.Active .Icon {
    color: var(--ColorInkInverse) !important;
}

.MapPlaceChip .Icon {
    width: 12px;
    height: 12px;
    color: var(--ColorInk);
}

.MapAddPlaceBtn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: var(--RadiusFull);
    border: 1px dashed var(--ColorBorderStrong);
    background: transparent;
    color: var(--ColorTextSoft);
    font-size: var(--SizeTextXs);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--DurationFast) var(--EaseOut);
}

.MapAddPlaceBtn:hover {
    border-color: var(--ColorInk) !important;
    color: var(--ColorInk);
    background: var(--SelectColor);
}

.MapAddPlaceRow {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px var(--SpaceMd);
    background: var(--ColorCanvas);
    border-bottom: 1px solid var(--ColorDivider);
}

.MapAddPlaceRow.Hidden {
    display: none !important;
}

.MapAddPlaceInput {
    flex: 1;
    height: 30px;
    font-size: var(--SizeTextXs);
    padding: 0px 8px;
}

.MapWidgetCountBadge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--RadiusFull);
    background: var(--SelectColor);
    color: var(--ColorInk);
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.LegalConsentCard {
    max-width: 480px;
}

.LegalModalLink {
    color: var(--ColorInk);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.LegalModalLink:hover {
    opacity: 0.80;
}

.LegalModalNote {
    font-size: 13px;
    color: var(--ColorTextSoft);
}

.SessionBreakCard {
    max-width: 420px;
    text-align: center;
    align-items: center;
    padding: 30px 25px;
}

.SessionBreakIconWrap {
    width: 60px;
    height: 60px;
    border-radius: var(--RadiusFull);
    background: var(--ColorHover);
    display: grid;
    place-items: center;
    color: var(--ColorInk);
    margin-bottom: 5px;
}

.SessionBreakIconWrap .Icon {
    width: 25px;
    height: 25px;
    color: var(--ColorInk);
}

.BreakCountdownBox {
    width: 100%;
    background: var(--ColorCanvas);
    border: 1px solid var(--ColorBorder);
    border-radius: var(--RadiusMd);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 10px 0px;
}

.BreakCountdownLabel {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ColorTextFaint);
}

.BreakCountdownTime {
    font-family: var(--FontCode);
    font-size: 45px;
    font-weight: 600;
    line-height: 110%;
    color: var(--ColorText);
}

.BreakProgressTrack {
    width: 100%;
    height: 5px;
    background: var(--ColorBorder);
    border-radius: var(--RadiusFull);
    overflow: hidden;
    margin-bottom: 10px;
}

.BreakProgressBar {
    height: 100%;
    background: var(--ColorInk);
    border-radius: var(--RadiusFull);
    transition: width 1s linear;
}


