:root {
    --page-background: #0d0d0d;
    --sidebar-background: #171717;
    --sidebar-hover: #252525;
    --panel-background: #1c1c1c;
    --assistant-background: #121212;
    --toolbar-background: #171717;
    --border-color: #303030;
    --primary-text: #f4f4f4;
    --secondary-text: #9b9b9b;
    --muted-text: #707070;
    --accent: #ffffff;
    --success: #5fce82;
    --sidebar-width: 280px;
    --assistant-width: 420px;
}

* {
    box-sizing: border-box;
}

/* Dark application scrollbars */

* {
    scrollbar-width: thin;
    scrollbar-color: #454545 #151515;
}

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

::-webkit-scrollbar-track {
    background: #151515;
}

::-webkit-scrollbar-thumb {
    min-height: 40px;
    border: 2px solid #151515;
    border-radius: 999px;
    background: #454545;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #5c5c5c;
    }

    ::-webkit-scrollbar-thumb:active {
        background: #707070;
    }

::-webkit-scrollbar-corner {
    background: #151515;
}

html,
body,
form {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: var(--page-background);
    color: var(--primary-text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

.app-shell {
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex: 0 0 var(--sidebar-width);
    flex-direction: column;
    width: var(--sidebar-width);
    height: 100%;
    padding: 14px;
    background: var(--sidebar-background);
    border-right: 1px solid var(--border-color);
    transition: width 0.22s ease, flex-basis 0.22s ease, padding 0.22s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 6px 0 14px 8px;
}

.sidebar-collapse-button {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: transparent;
    color: var(--primary-text);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .sidebar-collapse-button:hover {
        background: var(--sidebar-hover);
        border-color: #444444;
    }

    .sidebar-collapse-button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.sidebar-collapse-icon {
    display: block;
    font-size: 25px;
    line-height: 1;
    transition: transform 0.22s ease;
}

.sidebar.is-collapsed {
    flex-basis: 64px;
    width: 64px;
    padding-right: 14px;
    padding-left: 14px;
}

    .sidebar.is-collapsed .sidebar-header {
        justify-content: center;
        padding-right: 0;
        padding-left: 0;
    }

    .sidebar.is-collapsed .brand-icon,
    .sidebar.is-collapsed .brand-text,
    .sidebar.is-collapsed .assistant-selector,
    .sidebar.is-collapsed .new-chat-button,
    .sidebar.is-collapsed .sidebar-section,
    .sidebar.is-collapsed .youtube-sidebar-controls,
    .sidebar.is-collapsed .sidebar-notification,
    .sidebar.is-collapsed .sidebar-footer {
        display: none;
    }

    .sidebar.is-collapsed .sidebar-collapse-button {
        margin-left: 0;
    }

    .sidebar.is-collapsed .sidebar-collapse-icon {
        transform: rotate(180deg);
    }

.sidebar-notification {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    overflow: hidden;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #111111;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    opacity: 1;
    transition: opacity 190ms ease;
    will-change: opacity;
}

.sidebar-notification.is-fading {
    opacity: 0;
}

.sidebar-notification.is-hidden {
    display: none;
}

.sidebar-notification-viewport {
    max-width: 100%;
    overflow: hidden;
}

.sidebar-notification-track {
    display: block;
    width: max-content;
    max-width: none;
    transform: translateX(0);
    will-change: transform;
}

.sidebar-notification-primary,
.sidebar-notification-secondary {
    width: max-content;
    max-width: none;
    color: var(--primary-text);
    font-size: 11px;
    font-weight: 650;
    line-height: 16px;
    white-space: nowrap;
}

.sidebar-notification-secondary {
    margin-top: 1px;
    color: var(--secondary-text);
    font-weight: 500;
}

.sidebar-notification-secondary:empty {
    display: none;
}

.sidebar-notification-action {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5d9cff;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.sidebar-notification-action:hover:not(:disabled) {
    color: #a7c9ff;
    text-decoration-thickness: 2px;
}

.sidebar-notification-action:focus-visible {
    outline: 2px solid #5d9cff;
    outline-offset: 2px;
    border-radius: 2px;
}

.sidebar-notification-action:disabled {
    cursor: default;
    opacity: 0.65;
}

.sidebar-notification-action.is-hidden {
    display: none;
}

.youtube-sidebar-controls {
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 9px;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #111111;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.youtube-sidebar-controls.is-hidden {
    display: none;
}

.youtube-sidebar-player-region {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid #2f2f2f;
    border-radius: 8px;
    background: #070707;
}

.youtube-sidebar-player-region.is-hidden,
.youtube-sidebar-controls.is-popout-open .youtube-sidebar-player-region {
    display: none;
}

.youtube-music-player-shell {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.youtube-music-player-shell.is-hidden {
    display: none;
}

.youtube-music-player-shell iframe,
.youtube-music-player-shell > div {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.youtube-sidebar-popout-hitarea {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.youtube-sidebar-popout-hitarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

.youtube-sidebar-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.youtube-sidebar-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #3a3a3a;
    border-radius: 50%;
    background: #202020;
    color: var(--primary-text);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.youtube-sidebar-control:hover:not(:disabled) {
    border-color: #4b4b4b;
    background: #292929;
    transform: translateY(-1px);
}

.youtube-sidebar-control:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.youtube-sidebar-control:disabled {
    cursor: default;
    opacity: 0.32;
}

.youtube-sidebar-control svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.youtube-sidebar-control-primary {
    width: 36px;
    height: 36px;
    border-color: color-mix(in srgb, var(--accent) 62%, transparent);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--primary-text);
}

.youtube-sidebar-control-primary:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent) 90%, transparent);
    background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.youtube-sidebar-control-primary svg {
    width: 17px;
    height: 17px;
}

.youtube-sidebar-controls.is-popout-open .youtube-sidebar-buttons {
    gap: 9px;
}

.youtube-sidebar-controls.is-popout-open .youtube-sidebar-control {
    width: 34px;
    height: 34px;
}

.youtube-sidebar-controls.is-popout-open .youtube-sidebar-control svg {
    width: 16px;
    height: 16px;
}

.youtube-sidebar-controls.is-popout-open .youtube-sidebar-control-primary {
    width: 42px;
    height: 42px;
}

.youtube-sidebar-controls.is-popout-open .youtube-sidebar-control-primary svg {
    width: 19px;
    height: 19px;
}

.youtube-sidebar-icon-play {
    display: none;
}

.youtube-sidebar-control-primary.is-paused .youtube-sidebar-icon-play {
    display: block;
}

.youtube-sidebar-control-primary.is-paused .youtube-sidebar-icon-pause {
    display: none;
}

.youtube-sidebar-shuffle.is-active {
    border-color: rgba(116, 174, 116, 0.62);
    background: rgba(85, 135, 85, 0.18);
    color: #a9cfa9;
}

.youtube-sidebar-title-viewport {
    width: 100%;
    margin-top: 7px;
    overflow: hidden;
    color: #f0a2a2;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    white-space: nowrap;
    transition: color 0.16s ease;
}

.youtube-sidebar-controls.is-playing .youtube-sidebar-title-viewport {
    color: #9fc79f;
}

.youtube-sidebar-controls.is-stopped .youtube-sidebar-title-viewport {
    color: #f0a2a2;
}

.youtube-sidebar-title-track {
    display: block;
    width: max-content;
    min-width: 100%;
    text-align: center;
    transform: translateX(0);
    will-change: transform;
}

.brand-icon {
    display: block;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    margin-right: 12px;
    border-radius: 11px;
    object-fit: cover;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
}

.brand-status {
    margin-top: 3px;
    color: var(--secondary-text);
    font-size: 12px;
}

.assistant-selector {
    margin-bottom: 12px;
}

.assistant-selector-label {
    display: block;
    margin: 0 0 7px 2px;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.assistant-select {
    width: 100%;
    min-height: 42px;
    padding: 0 38px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background-color: var(--panel-background);
    color: var(--primary-text);
    cursor: pointer;
}

    .assistant-select:hover {
        border-color: #444444;
    }

    .assistant-select:focus {
        border-color: #5d9cff;
        box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
    }

.new-chat-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .new-chat-button:hover {
        background: var(--sidebar-hover);
    }

    .new-chat-button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.new-chat-icon {
    display: inline-block;
    width: 24px;
    font-size: 22px;
    line-height: 1;
}

.sidebar-section {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    margin-top: 24px;
}

.sidebar-section-title {
    padding: 0 10px 10px;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.conversation-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.conversation-view-toggle:hover { color: var(--primary-text); }
.conversation-view-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 1px;
    border-radius: 5px;
    font-size: 17px;
    line-height: 1;
    transform: translateY(-1px);
}
.conversation-view-toggle:hover .conversation-view-menu-icon,
.conversation-view-toggle[aria-expanded="true"] .conversation-view-menu-icon {
    background: rgba(255, 255, 255, 0.08);
}
.conversation-view-menu {
    position: absolute;
    z-index: 5000;
    margin: 25px 0 0 10px;
    min-width: 130px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #242424;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.conversation-view-menu.is-hidden { display: none; }
.conversation-view-menu button {
    display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px;
    background: transparent; color: var(--primary-text); cursor: pointer; text-align: left;
}
.conversation-view-menu button:hover { background: var(--sidebar-hover); }

.conversation-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.empty-conversations {
    padding: 12px 10px;
    color: var(--muted-text);
    font-size: 13px;
}

.conversation-row {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    margin: 0 0 4px;
    border-radius: 8px;
}

    .conversation-row:hover,
    .conversation-row:focus-within {
        background: var(--sidebar-hover);
    }

    .conversation-row:has(.conversation-item[aria-current="true"]) {
        background: #2a2a2a;
    }

.conversation-selection-checkbox {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0 0 0 9px;
    accent-color: var(--accent);
    cursor: pointer;
}

.conversation-select-all-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 0 0 4px;
    padding: 0 10px 0 9px;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.conversation-select-all-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.conversation-row.has-selection-checkbox .conversation-item {
    padding-left: 7px;
}

.conversation-delete-checked-button {
    color: #ff8d8d !important;
}

.conversation-delete-checked-button[hidden] {
    display: none !important;
}

.conversation-item {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 38px 8px 10px;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--primary-text);
    cursor: pointer;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .conversation-item:hover,
    .conversation-item[aria-current="true"] {
        background: transparent;
    }

    .conversation-item:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: -2px;
    }

.conversation-menu-button {
    position: absolute;
    top: 50%;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0;
    transform: translateY(-50%);
}

    .conversation-row:hover .conversation-menu-button,
    .conversation-row:focus-within .conversation-menu-button,
    .conversation-menu-button[aria-expanded="true"] {
        opacity: 1;
    }

    .conversation-menu-button:hover {
        background: rgba(255, 255, 255, 0.08);
        color: var(--primary-text);
    }

    .conversation-menu-button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 1px;
    }

.conversation-menu {
    position: fixed;
    z-index: 6000;
    top: auto;
    right: auto;
    display: flex;
    min-width: 126px;
    padding: 6px;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--panel-background);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

    .conversation-menu.is-hidden {
        display: none;
    }

.conversation-menu-action {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--primary-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

    .conversation-menu-action:hover,
    .conversation-menu-action:focus-visible {
        background: var(--sidebar-hover);
        outline: none;
    }

    .conversation-menu-action.is-danger {
        color: #ff8d8d;
    }

.conversation-row.is-editing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 5px;
    background: #2a2a2a;
}

.conversation-rename-input {
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--page-background);
    color: var(--primary-text);
    font: inherit;
}

    .conversation-rename-input:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(111, 139, 255, 0.18);
    }

.conversation-rename-save,
.conversation-rename-cancel {
    height: 30px;
    padding: 0 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--secondary-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.conversation-rename-save {
    color: var(--accent);
}

    .conversation-rename-save:hover,
    .conversation-rename-cancel:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .conversation-rename-save:disabled,
    .conversation-rename-cancel:disabled {
        cursor: pointer;
        opacity: 0.55;
    }


.sidebar-footer {
    flex: 0 0 auto;
    padding-top: 12px;
}

.sidebar-account-display-name {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    overflow: hidden;
    color: var(--secondary-text);
    line-height: 1.15;
}

.sidebar-account-avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #202020;
    color: var(--primary-text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.sidebar-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-account-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.sidebar-account-name {
    min-width: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account-email-wrapper {
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer-button {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

    .sidebar-footer-button:hover {
        background: var(--sidebar-hover);
    }

    .sidebar-footer-button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.sidebar-footer-button-danger {
    margin-top: 4px;
    color: #f0a2a2;
}

    .sidebar-footer-button-danger:hover {
        background: rgba(185, 55, 55, 0.18);
        color: #ffc0c0;
    }

    .sidebar-footer-button-danger:disabled {
        cursor: wait;
        opacity: 0.65;
    }

.main-content {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    background: var(--page-background);
    overflow: hidden;
}

.workspace-panel {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    height: 100%;
    padding: 20px;
    overflow: hidden;
}

.welcome-panel {
    width: min(520px, calc(100% - 40px));
    padding: 42px;
    text-align: center;
}

.welcome-brand-icon {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 22px;
    border-radius: 24px;
    object-fit: cover;
}

.welcome-panel h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.welcome-panel p {
    margin: 14px 0 0;
    color: var(--secondary-text);
    font-size: 16px;
    line-height: 1.6;
}

.assistant-stage {
    display: flex;
    flex: 0 0 var(--assistant-width);
    flex-direction: column;
    width: var(--assistant-width);
    height: 100%;
    background: var(--assistant-background);
    border-left: 1px solid var(--border-color);
    transition: width 0.22s ease, flex-basis 0.22s ease;
}

.assistant-stage-header {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 16px 20px 16px 14px;
    border-bottom: 1px solid var(--border-color);
}

.assistant-stage-identity {
    min-width: 0;
    margin-left: auto;
    text-align: right;
}

.assistant-stage-title {
    font-size: 16px;
    font-weight: 700;
}

.assistant-stage-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 5px;
    color: var(--secondary-text);
    font-size: 12px;
}

.assistant-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(95, 206, 130, 0.35);
}

.assistant-collapse-button {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .assistant-collapse-button:hover {
        background: var(--sidebar-hover);
        border-color: #444444;
    }

    .assistant-collapse-button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.assistant-collapse-icon {
    display: block;
    font-size: 25px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.22s ease;
}

.assistant-visual-container {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

    .assistant-visual-container::before {
        position: absolute;
        top: 10%;
        right: 10%;
        bottom: 10%;
        left: 10%;
        border: 1px solid rgba(255, 255, 255, 0.025);
        border-radius: 50%;
        content: "";
    }

.assistant-placeholder {
    position: relative;
    width: 210px;
    height: 410px;
    opacity: 0.72;
    animation: assistant-idle 4.5s ease-in-out infinite;
}

.assistant-placeholder-head {
    position: absolute;
    z-index: 2;
    top: 15px;
    left: 50%;
    width: 112px;
    height: 132px;
    border: 2px solid var(--border-color);
    border-radius: 48% 48% 44% 44%;
    background: var(--panel-background);
    transform: translateX(-50%);
}

    .assistant-placeholder-head::before,
    .assistant-placeholder-head::after {
        position: absolute;
        top: 58px;
        width: 8px;
        height: 3px;
        border-radius: 999px;
        background: var(--secondary-text);
        content: "";
        opacity: 0.55;
    }

    .assistant-placeholder-head::before {
        left: 31px;
    }

    .assistant-placeholder-head::after {
        right: 31px;
    }

.assistant-placeholder-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 210px;
    height: 275px;
    border: 2px solid var(--border-color);
    border-radius: 90px 90px 24px 24px;
    background: var(--panel-background);
    transform: translateX(-50%);
}

    .assistant-placeholder-body::before {
        position: absolute;
        top: 52px;
        left: 50%;
        width: 72px;
        height: 1px;
        background: var(--border-color);
        content: "";
        transform: translateX(-50%);
    }


.assistant-avatar-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* No-backdrop state: a dark, colorful CSS void with extremely slow gas drift. */
.assistant-avatar-space-gas {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 48%, rgba(13, 20, 43, 0.20), transparent 30%),
        linear-gradient(180deg, #010208 0%, #02030a 52%, #000106 100%);
    opacity: 1;
    transition: opacity 0.35s ease;
}

.assistant-avatar-space-gas::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(ellipse at 50% 48%, transparent 0 24%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.84) 100%);
}

.space-gas-cloud {
    position: absolute;
    width: 96%;
    height: 88%;
    left: 2%;
    top: 6%;
    border-radius: 46%;
    opacity: 0.30;
    filter: blur(58px) saturate(1.28);
    mix-blend-mode: screen;
    transform-origin: center;
    will-change: transform, opacity;
}

.space-gas-cloud-a {
    width: 82%;
    height: 72%;
    left: 9%;
    top: 14%;
    background:
        radial-gradient(ellipse at 29% 38%, rgba(24, 105, 184, 0.68) 0%, rgba(24, 105, 184, 0.21) 18%, transparent 43%),
        radial-gradient(ellipse at 68% 61%, rgba(96, 38, 151, 0.60) 0%, rgba(96, 38, 151, 0.18) 21%, transparent 47%);
    animation: space-gas-drift-a 108s ease-in-out infinite alternate;
}

.space-gas-cloud-b {
    width: 74%;
    height: 68%;
    left: 13%;
    top: 16%;
    opacity: 0.24;
    filter: blur(70px) saturate(1.34);
    background:
        radial-gradient(ellipse at 70% 31%, rgba(0, 151, 191, 0.56) 0%, rgba(0, 151, 191, 0.16) 19%, transparent 44%),
        radial-gradient(ellipse at 33% 73%, rgba(121, 40, 137, 0.52) 0%, rgba(121, 40, 137, 0.14) 22%, transparent 48%);
    animation: space-gas-drift-b 142s linear infinite;
}

.space-gas-cloud-c {
    width: 64%;
    height: 60%;
    left: 18%;
    top: 20%;
    opacity: 0.19;
    filter: blur(82px) saturate(1.18);
    background:
        radial-gradient(ellipse at 48% 50%, rgba(193, 55, 137, 0.36) 0%, rgba(72, 77, 184, 0.18) 24%, transparent 52%);
    animation: space-gas-breathe 96s ease-in-out infinite alternate;
}

.space-gas-cloud-d {
    width: 70%;
    height: 66%;
    left: 15%;
    top: 17%;
    opacity: 0.15;
    filter: blur(48px);
    background:
        conic-gradient(from 40deg at 50% 50%,
            transparent 0deg 62deg,
            rgba(27, 92, 177, 0.28) 88deg,
            transparent 118deg 210deg,
            rgba(126, 40, 148, 0.25) 241deg,
            transparent 278deg 360deg);
    animation: space-gas-turn 172s linear infinite;
}

/* Wispy orbital trails keep the void clouds reading as slowly turning gas. */
.space-gas-cloud::before,
.space-gas-cloud::after {
    position: absolute;
    inset: 9% 7%;
    border-radius: 50%;
    content: "";
    opacity: 0.34;
    background:
        conic-gradient(from 12deg,
            transparent 0deg 24deg,
            rgba(72, 182, 255, 0.26) 42deg,
            transparent 68deg 146deg,
            rgba(177, 76, 226, 0.22) 169deg,
            transparent 198deg 282deg,
            rgba(53, 218, 211, 0.18) 302deg,
            transparent 326deg 360deg);
    -webkit-mask: radial-gradient(ellipse, transparent 0 48%, #000 56% 61%, transparent 69%);
    mask: radial-gradient(ellipse, transparent 0 48%, #000 56% 61%, transparent 69%);
    filter: blur(8px);
    transform-origin: center;
    animation: space-gas-trail-spin 188s linear infinite;
}

.space-gas-cloud::after {
    inset: 18% 13%;
    opacity: 0.24;
    background:
        conic-gradient(from 194deg,
            transparent 0deg 36deg,
            rgba(207, 72, 183, 0.22) 58deg,
            transparent 82deg 176deg,
            rgba(46, 148, 231, 0.24) 202deg,
            transparent 230deg 318deg,
            rgba(117, 74, 204, 0.19) 339deg,
            transparent 360deg);
    -webkit-mask: radial-gradient(ellipse, transparent 0 39%, #000 47% 52%, transparent 62%);
    mask: radial-gradient(ellipse, transparent 0 39%, #000 47% 52%, transparent 62%);
    filter: blur(6px);
    animation-duration: 241s;
    animation-direction: reverse;
}

.space-gas-cloud-b::before { animation-duration: 223s; animation-direction: reverse; }
.space-gas-cloud-b::after { animation-duration: 277s; animation-direction: normal; }
.space-gas-cloud-c::before { opacity: 0.26; animation-duration: 259s; }
.space-gas-cloud-d::before,
.space-gas-cloud-d::after { opacity: 0.20; }

.assistant-avatar-viewport.has-backdrop .assistant-avatar-space-gas {
    opacity: 0;
}

@keyframes space-gas-drift-a {
    0% { transform: translate3d(-13%, 6%, 0) rotate(-7deg) scale(0.88); }
    50% { transform: translate3d(12%, -7%, 0) rotate(5deg) scale(1.02); }
    100% { transform: translate3d(-5%, 11%, 0) rotate(15deg) scale(0.93); }
}

@keyframes space-gas-drift-b {
    0% { transform: translate3d(14%, -8%, 0) rotate(0deg) scale(0.90); }
    50% { transform: translate3d(-13%, 9%, 0) rotate(-11deg) scale(1.05); }
    100% { transform: translate3d(14%, -8%, 0) rotate(-22deg) scale(0.90); }
}

@keyframes space-gas-breathe {
    0% { transform: translate3d(-9%, -5%, 0) scale(0.82); opacity: 0.10; }
    100% { transform: translate3d(10%, 7%, 0) scale(1.10); opacity: 0.23; }
}

@keyframes space-gas-turn {
    0% { transform: translate3d(-5%, 3%, 0) rotate(0deg) scale(0.86); }
    100% { transform: translate3d(6%, -4%, 0) rotate(360deg) scale(1.02); }
}

@keyframes space-gas-trail-spin {
    0% { transform: rotate(0deg) scaleX(1.04) scaleY(0.92); }
    50% { transform: rotate(180deg) scaleX(0.94) scaleY(1.06); }
    100% { transform: rotate(360deg) scaleX(1.04) scaleY(0.92); }
}

/* No-backdrop floor: a faint grid concentrated beneath the avatar and fading into the void. */
.assistant-avatar-void-grid {
    position: absolute;
    z-index: 0;
    left: calc(50% + var(--avatar-void-grid-x-shift, 0px));
    bottom: -18%;
    width: min(48vw, 690px);
    height: 43%;
    pointer-events: none;
    opacity: 0.31;
    background-image:
        linear-gradient(rgba(76, 174, 255, 0.38) 1px, transparent 1px),
        linear-gradient(90deg, rgba(76, 174, 255, 0.38) 1px, transparent 1px);
    background-size: 28px 28px;
    transform: translate3d(-50%, var(--avatar-void-grid-y-shift, 0px), 0) perspective(520px) rotateX(67deg);
    transform-origin: center top;
    -webkit-mask-image:
        radial-gradient(ellipse at 50% 4%, #000 0%, rgba(0, 0, 0, 0.90) 12%, rgba(0, 0, 0, 0.42) 43%, transparent 88%),
        linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.82) 30%, rgba(0, 0, 0, 0.34) 74%, transparent 100%);
    mask-image:
        radial-gradient(ellipse at 50% 4%, #000 0%, rgba(0, 0, 0, 0.90) 12%, rgba(0, 0, 0, 0.42) 43%, transparent 88%),
        linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.82) 30%, rgba(0, 0, 0, 0.34) 74%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    filter: drop-shadow(0 0 9px rgba(60, 156, 255, 0.24));
    transition: opacity 0.35s ease;
}

.assistant-avatar-void-grid::before {
    position: absolute;
    left: 50%;
    top: -4px;
    width: 30%;
    height: 10px;
    content: "";
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(112, 202, 255, 0.44), transparent 72%);
    filter: blur(5px);
}

.assistant-avatar-viewport.has-backdrop .assistant-avatar-void-grid {
    opacity: 0;
}


/* Brief energy motes race from the avatar toward the viewer along grid tracks. */
.void-grid-particle {
    position: absolute;
    top: 3%;
    width: 3px;
    height: 44px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
        rgba(192, 239, 255, 0),
        rgba(139, 220, 255, 0.95) 32%,
        rgba(88, 170, 255, 0.72) 68%,
        rgba(88, 170, 255, 0));
    box-shadow:
        0 0 5px rgba(116, 215, 255, 0.88),
        0 0 12px rgba(69, 137, 255, 0.58);
    filter: blur(0.15px);
    will-change: transform, opacity;
}

.void-grid-particle-a { left: 33.5%; animation: void-grid-shot 11.3s linear 0.8s infinite; }
.void-grid-particle-b { left: 42.0%; animation: void-grid-shot 16.7s linear 4.9s infinite; }
.void-grid-particle-c { left: 49.4%; animation: void-grid-shot 13.1s linear 8.2s infinite; }
.void-grid-particle-d { left: 57.8%; animation: void-grid-shot 18.9s linear 2.6s infinite; }
.void-grid-particle-e { left: 65.9%; animation: void-grid-shot 14.6s linear 11.1s infinite; }
.void-grid-particle-f { left: 73.7%; animation: void-grid-shot 21.2s linear 6.7s infinite; }


/* Sideways pulses skim across the grid's cross-lines. */
.void-grid-particle-horizontal {
    position: absolute;
    left: 7%;
    width: 46px;
    height: 3px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(to right,
        rgba(192, 239, 255, 0),
        rgba(139, 220, 255, 0.96) 34%,
        rgba(116, 139, 255, 0.74) 70%,
        rgba(116, 139, 255, 0));
    box-shadow:
        0 0 5px rgba(116, 215, 255, 0.90),
        0 0 12px rgba(89, 111, 255, 0.56);
    filter: blur(0.15px);
    will-change: transform, opacity;
}

.void-grid-particle-g { top: 18%; animation: void-grid-shot-horizontal 13.8s linear 1.7s infinite; }
.void-grid-particle-h { top: 29%; animation: void-grid-shot-horizontal-reverse 18.1s linear 7.3s infinite; }
.void-grid-particle-i { top: 41%; animation: void-grid-shot-horizontal 15.6s linear 10.4s infinite; }
.void-grid-particle-j { top: 54%; animation: void-grid-shot-horizontal-reverse 21.4s linear 3.9s infinite; }
.void-grid-particle-k { top: 67%; animation: void-grid-shot-horizontal 17.2s linear 13.1s infinite; }
.void-grid-particle-l { top: 79%; animation: void-grid-shot-horizontal-reverse 23.6s linear 8.8s infinite; }

@keyframes void-grid-shot-horizontal {
    0%, 80% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scaleX(0.35);
    }
    80.4% {
        opacity: 0.90;
        transform: translate3d(8px, 0, 0) scaleX(0.75);
    }
    82.5% {
        opacity: 0.74;
        transform: translate3d(calc(min(48vw, 690px) * 0.72), 0, 0) scaleX(1.22);
    }
    83.2%, 100% {
        opacity: 0;
        transform: translate3d(calc(min(48vw, 690px) * 0.82), 0, 0) scaleX(0.52);
    }
}

@keyframes void-grid-shot-horizontal-reverse {
    0%, 77% {
        opacity: 0;
        transform: translate3d(calc(min(48vw, 690px) * 0.82), 0, 0) scaleX(0.35);
    }
    77.4% {
        opacity: 0.88;
        transform: translate3d(calc(min(48vw, 690px) * 0.76), 0, 0) scaleX(0.72);
    }
    79.6% {
        opacity: 0.72;
        transform: translate3d(10px, 0, 0) scaleX(1.18);
    }
    80.3%, 100% {
        opacity: 0;
        transform: translate3d(-18px, 0, 0) scaleX(0.50);
    }
}

@keyframes void-grid-shot {
    0%, 76% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scaleY(0.35);
    }
    76.4% {
        opacity: 0.92;
        transform: translate3d(0, 8px, 0) scaleY(0.7);
    }
    78.6% {
        opacity: 0.78;
        transform: translate3d(0, 420px, 0) scaleY(1.25);
    }
    79.3%, 100% {
        opacity: 0;
        transform: translate3d(0, 505px, 0) scaleY(0.55);
    }
}

.assistant-avatar-backdrop {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center center;
    will-change: transform;
}

.assistant-avatar-backdrop.is-hidden {
    display: none;
}

/* Ambient CSS-only data distortion layered over every avatar backdrop. */
.assistant-avatar-glitch-overlay {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.52;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(116, 198, 255, 0.018) 0,
            rgba(116, 198, 255, 0.018) 1px,
            transparent 1px,
            transparent 4px
        );
    mix-blend-mode: screen;
    visibility: hidden;
}

.assistant-avatar-viewport.has-backdrop .assistant-avatar-glitch-overlay {
    visibility: visible;
}

.assistant-avatar-glitch-overlay::before,
.assistant-avatar-glitch-overlay::after {
    position: absolute;
    inset: -12% -8%;
    content: "";
    opacity: 0;
    will-change: transform, opacity, clip-path;
}

.assistant-avatar-glitch-overlay::before {
    background:
        linear-gradient(90deg,
            transparent 0 8%,
            rgba(56, 188, 255, 0.22) 8% 17%,
            transparent 17% 43%,
            rgba(174, 91, 255, 0.18) 43% 58%,
            transparent 58% 100%);
    filter: blur(0.4px);
    animation: avatar-backdrop-glitch-slice 9.5s steps(1, end) infinite;
}

.assistant-avatar-glitch-overlay::after {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 34px,
            rgba(119, 219, 255, 0.12) 34px 36px,
            transparent 36px 71px
        );
    animation: avatar-backdrop-glitch-pulse 13s steps(1, end) 2.1s infinite;
}

@keyframes avatar-backdrop-glitch-slice {
    0%, 72%, 74.5%, 87%, 89.5%, 100% {
        opacity: 0;
        clip-path: inset(48% 0 48% 0);
        transform: translate3d(0, 0, 0);
    }

    72.3% {
        opacity: 0.42;
        clip-path: inset(18% 0 70% 0);
        transform: translate3d(-2.8%, 0, 0);
    }

    72.8% {
        opacity: 0.24;
        clip-path: inset(64% 0 24% 0);
        transform: translate3d(3.6%, 0, 0);
    }

    73.4% {
        opacity: 0.34;
        clip-path: inset(39% 0 51% 0);
        transform: translate3d(-1.7%, 0, 0);
    }

    87.4% {
        opacity: 0.2;
        clip-path: inset(76% 0 15% 0);
        transform: translate3d(2.2%, 0, 0);
    }

    88.2% {
        opacity: 0.3;
        clip-path: inset(27% 0 61% 0);
        transform: translate3d(-3.2%, 0, 0);
    }
}

@keyframes avatar-backdrop-glitch-pulse {
    0%, 55%, 57%, 91%, 93%, 100% {
        opacity: 0;
        clip-path: inset(50% 0 50% 0);
        transform: translate3d(0, 0, 0) skewX(0deg);
    }

    55.3% {
        opacity: 0.18;
        clip-path: inset(8% 0 83% 0);
        transform: translate3d(1.8%, 0, 0) skewX(-2deg);
    }

    56.1% {
        opacity: 0.28;
        clip-path: inset(52% 0 36% 0);
        transform: translate3d(-2.4%, 0, 0) skewX(1deg);
    }

    91.4% {
        opacity: 0.16;
        clip-path: inset(31% 0 60% 0);
        transform: translate3d(-1.4%, 0, 0) skewX(2deg);
    }

    92.2% {
        opacity: 0.24;
        clip-path: inset(70% 0 20% 0);
        transform: translate3d(2.7%, 0, 0) skewX(-1deg);
    }
}

/* Glitch 2: compact pixel blocks that briefly flutter across the backdrop. */
.assistant-avatar-pixel-glitch {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: screen;
    visibility: hidden;
}

.assistant-avatar-viewport.has-backdrop .assistant-avatar-pixel-glitch {
    visibility: visible;
}

.pixel-glitch-cluster {
    position: absolute;
    width: 4px;
    height: 4px;
    opacity: 0;
    background: rgba(107, 224, 255, 0.72);
    box-shadow:
        5px 0 rgba(107, 224, 255, 0.52),
        10px 0 rgba(188, 112, 255, 0.46),
        15px 0 rgba(107, 224, 255, 0.34),
        0 5px rgba(188, 112, 255, 0.44),
        5px 5px rgba(107, 224, 255, 0.68),
        15px 5px rgba(107, 224, 255, 0.40),
        20px 5px rgba(188, 112, 255, 0.32),
        5px 10px rgba(107, 224, 255, 0.40),
        10px 10px rgba(188, 112, 255, 0.56),
        15px 10px rgba(107, 224, 255, 0.30);
    filter: drop-shadow(0 0 3px rgba(89, 202, 255, 0.30));
    transform-origin: center;
    will-change: transform, opacity, filter;
}

.pixel-glitch-cluster-a {
    top: 18%;
    left: 14%;
    animation: avatar-pixel-flutter-a 11.7s steps(1, end) infinite;
}

.pixel-glitch-cluster-b {
    top: 36%;
    right: 17%;
    animation: avatar-pixel-flutter-b 14.3s steps(1, end) 1.8s infinite;
}

.pixel-glitch-cluster-c {
    bottom: 24%;
    left: 31%;
    animation: avatar-pixel-flutter-c 16.1s steps(1, end) 4.2s infinite;
}

.pixel-glitch-cluster-d {
    top: 61%;
    right: 34%;
    animation: avatar-pixel-flutter-d 12.9s steps(1, end) 6.4s infinite;
}

@keyframes avatar-pixel-flutter-a {
    0%, 67%, 70.4%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scale(1); filter: none; }
    67.3% { opacity: .62; transform: translate3d(-7px, 2px, 0) scaleX(1.35); }
    67.8% { opacity: .28; transform: translate3d(5px, -3px, 0) scaleY(.65); }
    68.4% { opacity: .74; transform: translate3d(-2px, 4px, 0) scale(1.1); filter: blur(.35px); }
    69.1% { opacity: .20; transform: translate3d(9px, 1px, 0) scaleX(.72); }
    69.7% { opacity: .48; transform: translate3d(1px, -2px, 0) scaleY(1.4); }
}

@keyframes avatar-pixel-flutter-b {
    0%, 42%, 45.6%, 83%, 85.2%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scale(1); }
    42.4% { opacity: .54; transform: translate3d(8px, -1px, 0) scaleX(1.6); }
    43.1% { opacity: .76; transform: translate3d(-5px, 4px, 0) scale(.8); }
    44.0% { opacity: .24; transform: translate3d(3px, -4px, 0) scaleY(1.55); }
    44.8% { opacity: .60; transform: translate3d(-9px, 2px, 0) scaleX(.65); }
    83.4% { opacity: .42; transform: translate3d(-4px, -2px, 0) scale(1.15); }
    84.2% { opacity: .68; transform: translate3d(7px, 3px, 0) scaleX(1.45); }
}

@keyframes avatar-pixel-flutter-c {
    0%, 73%, 76.8%, 100% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
    73.3% { opacity: .46; transform: translate3d(-3px, 6px, 0) rotate(-2deg) scaleX(1.5); }
    74.0% { opacity: .72; transform: translate3d(8px, -2px, 0) rotate(1deg) scaleY(.7); }
    74.7% { opacity: .18; transform: translate3d(-10px, 1px, 0) scale(.75); }
    75.3% { opacity: .64; transform: translate3d(4px, 4px, 0) scaleY(1.35); }
    76.0% { opacity: .30; transform: translate3d(1px, -5px, 0) scaleX(1.25); }
}

@keyframes avatar-pixel-flutter-d {
    0%, 51%, 54.5%, 91%, 93.1%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scale(1); }
    51.4% { opacity: .68; transform: translate3d(6px, 3px, 0) scaleX(.7); }
    52.0% { opacity: .26; transform: translate3d(-8px, -2px, 0) scaleY(1.6); }
    52.8% { opacity: .58; transform: translate3d(2px, 5px, 0) scale(1.25); }
    53.6% { opacity: .32; transform: translate3d(10px, -4px, 0) scaleX(1.45); }
    91.4% { opacity: .52; transform: translate3d(-5px, 1px, 0) scaleY(.8); }
    92.2% { opacity: .70; transform: translate3d(4px, -3px, 0) scaleX(1.3); }
}

@media (prefers-reduced-motion: reduce) {
    .assistant-avatar-glitch-overlay::before,
    .assistant-avatar-glitch-overlay::after,
    .pixel-glitch-cluster,
    .space-gas-cloud,
    .space-gas-cloud::before,
    .space-gas-cloud::after,
    .void-grid-particle {
        animation: none;
    }
}

.assistant-avatar-viewport canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}


.assistant-avatar-scene-curtain {
    position: absolute;
    z-index: 4;
    inset: 0;
    background: #000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.assistant-avatar-scene-curtain.is-active {
    opacity: 1;
}

.assistant-avatar-scene-curtain.no-transition {
    transition: none;
}

.assistant-avatar-loading {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-text);
    font-size: 12px;
    pointer-events: none;
}

.assistant-avatar-loading.is-hidden {
    display: none;
}

.assistant-avatar-viewport.has-avatar {
    background: radial-gradient(circle at 50% 38%, rgba(93, 116, 154, 0.18), transparent 52%);
}

.assistant-visual-message {
    position: absolute;
    right: 20px;
    bottom: 20px;
    left: 20px;
    color: var(--muted-text);
    font-size: 12px;
    text-align: center;
}

.assistant-stage.is-collapsed {
    flex-basis: 64px;
    width: 64px;
}

    .assistant-stage.is-collapsed .assistant-stage-header {
        justify-content: flex-start;
        padding-right: 14px;
        padding-left: 14px;
    }

    .assistant-stage.is-collapsed .assistant-stage-identity,
    .assistant-stage.is-collapsed .assistant-visual-container {
        display: none;
    }

    .assistant-stage.is-collapsed .assistant-collapse-icon {
        transform: rotate(180deg);
    }

/* Avatar-focused display mode occupies only the flexible chat-content region. */
.assistant-stage.is-display-expanded,
.assistant-stage.is-display-expanded.is-collapsed {
    flex-basis: 0;
    width: 0;
    min-width: 0;
    border-left: 0;
    overflow: hidden;
    transition: none;
}

.assistant-stage.is-display-expanded .assistant-stage-header {
    display: none;
}

.avatar-display-overlay {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: none;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 17px 17px 0 0;
    background: var(--assistant-background);
}

.chat-panel.is-avatar-display-mode .avatar-display-overlay {
    display: flex;
}

.chat-panel.is-avatar-display-mode .chat-messages {
    visibility: hidden;
    pointer-events: none;
}

.chat-panel.is-avatar-display-mode .chat-scroll-bottom-button {
    display: none !important;
}

.avatar-display-overlay .assistant-visual-container {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 17px 17px 0 0;
    background: var(--assistant-background);
}

.chat-panel.is-avatar-display-mode .assistant-avatar-viewport,
.chat-panel.is-avatar-display-mode .assistant-avatar-backdrop {
    background-color: var(--assistant-background);
}

.avatar-display-mode-button {
    position: absolute;
    z-index: 20;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(68, 68, 68, 0.26);
    border-radius: 9px;
    background: rgba(20, 20, 20, 0.16);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-display-mode-button:hover,
.avatar-display-mode-button:focus-visible {
    border-color: #444444;
    background: rgba(28, 28, 28, 0.54);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.avatar-display-mode-button:active {
    transform: translateY(1px);
}

.avatar-display-mode-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.avatar-display-mode-icon {
    display: block;
    width: 27px;
    height: 25px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    opacity: 0.34;
    transition: opacity 0.15s ease;
}

.avatar-display-mode-button:hover .avatar-display-mode-icon,
.avatar-display-mode-button:focus-visible .avatar-display-mode-icon {
    opacity: 1;
}

.avatar-display-mode-icon-layout {
    display: none;
    width: 32px;
    height: 30px;
}

.avatar-display-mode-button[aria-pressed="true"] .avatar-display-mode-icon-focus {
    display: none;
}

.avatar-display-mode-button[aria-pressed="true"] .avatar-display-mode-icon-layout {
    display: block;
}

@keyframes assistant-idle {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}



.assistant-settings-overlay {
    display: contents;
}

.assistant-settings-overlay.is-open {
    position: fixed;
    inset: 0;
    z-index: 10850;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(8, 8, 8, 0.48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    animation: assistant-settings-fade-in 180ms ease both;
}

.assistant-settings-overlay.is-open.is-closing {
    animation: assistant-settings-fade-out 180ms ease both;
    pointer-events: none;
}

.assistant-settings-overlay.is-open .profile-wizard {
    width: min(920px, calc(100vw - 20px));
    height: min(860px, calc(100vh - 20px));
    margin: 0;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
    animation: assistant-settings-panel-in 180ms ease both;
}

.assistant-settings-overlay.is-open.is-closing .profile-wizard {
    animation: assistant-settings-panel-out 180ms ease both;
}

.profile-wizard.is-closing {
    animation: assistant-settings-panel-out 180ms ease both;
    pointer-events: none;
}

@keyframes assistant-settings-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes assistant-settings-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes assistant-settings-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes assistant-settings-panel-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.992);
    }
}

.profile-wizard {
    display: flex;
    flex-direction: column;
    width: min(920px, 100%);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
    overflow: hidden;
}

.wizard-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 20px;
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border-color);
}

.wizard-logo {
    display: block;
    flex: 0 0 auto;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    object-fit: cover;
}

.wizard-header-text {
    min-width: 0;
}

.wizard-eyebrow,
.wizard-step-kicker {
    color: #71b7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wizard-header h1 {
    margin: 6px 0 0;
    font-size: 26px;
}

.wizard-header p {
    margin: 9px 0 0;
    color: var(--secondary-text);
    line-height: 1.55;
}

.wizard-edit-only[hidden] {
    display: none !important;
}

.wizard-progress {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.12);
}

.wizard-progress-step {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted-text);
    cursor: default;
}

.wizard-progress-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--assistant-background);
    font-size: 12px;
    font-weight: 700;
}

.wizard-progress-label {
    font-size: 13px;
    font-weight: 700;
}

.wizard-progress-step.is-active {
    color: var(--primary-text);
}

    .wizard-progress-step.is-active .wizard-progress-number {
        border-color: #5d9cff;
        background: #1d4f85;
    }

.wizard-progress-step.is-complete {
    color: var(--secondary-text);
}

    .wizard-progress-step.is-complete .wizard-progress-number {
        border-color: var(--success);
        background: rgba(95, 206, 130, 0.14);
        color: var(--success);
    }

.wizard-progress-step.is-complete.is-active {
    color: var(--primary-text);
}

    .wizard-progress-step.is-complete.is-active .wizard-progress-number {
        border-color: #5d9cff;
        background: #1d4f85;
        color: var(--primary-text);
    }

.wizard-progress-line {
    flex: 1 1 auto;
    height: 1px;
    margin: 0 14px;
    background: var(--border-color);
}

.wizard-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 26px 32px 30px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.wizard-step {
    display: none;
}

    .wizard-step.is-active {
        display: block;
    }

.wizard-step-heading {
    margin-bottom: 26px;
}

    .wizard-step-heading h2 {
        margin: 7px 0 0;
        font-size: 23px;
    }

    .wizard-step-heading p {
        margin: 9px 0 0;
        color: var(--secondary-text);
        line-height: 1.55;
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-field {
    min-width: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.assistant-visual-upload-note {
    margin: -8px 0 20px;
    padding: 12px 14px;
    border: 1px solid rgba(93, 156, 255, 0.28);
    border-radius: 10px;
    background: rgba(93, 156, 255, 0.08);
    color: #b8c9e6;
    font-size: 13px;
    line-height: 1.5;
}

.assistant-clothing-upload-panel {
    display: grid;
    gap: 14px;
    margin: -8px 0 0;
}

.assistant-clothing-slot-field {
    padding: 16px;
    border: 1px solid rgba(93, 156, 255, 0.38);
    border-radius: 10px;
    background: rgba(93, 156, 255, 0.08);
}

.assistant-clothing-upload-header {
    padding: 16px;
    border: 1px solid transparent;
    background: transparent;
    text-align: center;
}

.assistant-clothing-upload-title {
    color: #c6d7f2;
    font-size: 15px;
    font-weight: 700;
}

.assistant-clothing-upload-title span {
    color: #9eb3d3;
    font-weight: 500;
}

.assistant-clothing-upload-header p {
    margin: 5px 0 0;
    color: var(--secondary-text);
    font-size: 12px;
    line-height: 1.45;
}

.assistant-clothing-upload-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.assistant-clothing-slot-field {
    min-width: 0;
}

.assistant-primary-asset-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 8px;
}

.assistant-primary-asset-heading label {
    margin: 0;
}

.assistant-clothing-field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 14px;
}

.assistant-clothing-item-type-label {
    min-width: 0;
    overflow: hidden;
    color: #d6e3f5;
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-clothing-section-label,
.assistant-clothing-input-label {
    display: block;
    margin: 0 0 6px;
    color: #aebfda;
    font-size: 12px;
    font-weight: 700;
}

.assistant-clothing-file-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 45px;
    justify-content: flex-end;
}

.assistant-clothing-exists {
    color: #58d68d;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.assistant-clothing-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 102, 102, 0.62);
    border-radius: 50%;
    background: rgba(139, 37, 37, 0.22);
    color: #ff7a7a;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.assistant-clothing-delete {
    width: 22px;
    height: 22px;
}

.assistant-clothing-delete:hover {
    border-color: #ff7a7a;
    background: rgba(180, 46, 46, 0.36);
    color: #ffd1d1;
}

.assistant-clothing-delete:disabled {
    cursor: wait;
    opacity: 0.55;
}

.assistant-clothing-exists[hidden],
.assistant-clothing-delete[hidden] {
    display: none;
}

.assistant-clothing-upload-rows {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.assistant-clothing-upload-row {
    display: grid;
    grid-template-columns: minmax(230px, 0.92fr) minmax(270px, 1fr) 42px 42px 34px;
    align-items: start;
    gap: 12px;
}

.assistant-clothing-upload-row:not(:first-child) .assistant-clothing-input-label {
    display: none;
}

.assistant-clothing-upload-column,
.assistant-clothing-description-column,
.assistant-clothing-share-column,
.assistant-clothing-nsfw-column,
.assistant-clothing-equip-column {
    min-width: 0;
}

.assistant-clothing-share-column,
.assistant-clothing-nsfw-column,
.assistant-clothing-equip-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.assistant-clothing-share-column > .assistant-clothing-input-label,
.assistant-clothing-nsfw-column > .assistant-clothing-input-label,
.assistant-clothing-equip-column > .assistant-clothing-input-label {
    width: max-content;
    text-align: right;
}

.assistant-clothing-upload-column input[type="file"],
.assistant-clothing-description-column input[type="text"] {
    width: 100%;
}

.assistant-clothing-file-control,
.assistant-avatar-upload-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px;
    align-items: stretch;
    gap: 8px;
}

.assistant-clothing-file-control input[type="file"],
.assistant-avatar-upload-control input[type="file"] {
    min-width: 0;
}

.assistant-shared-select-button {
    min-width: 68px;
    padding: 0 10px;
    border: 1px solid rgba(116, 198, 255, 0.45);
    border-radius: 10px;
    background: rgba(33, 113, 174, 0.22);
    color: #dff2ff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.assistant-shared-select-button:hover:not(:disabled) {
    border-color: rgba(116, 198, 255, 0.75);
    background: rgba(33, 113, 174, 0.34);
}

.assistant-shared-select-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.assistant-clothing-description {
    margin: 0;
}

.assistant-clothing-description.is-invalid {
    border-color: #ff7474;
    background: rgba(130, 27, 27, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 83, 83, 0.16);
}

.assistant-clothing-description-error {
    display: block;
    margin: 6px 2px 0;
    color: #ff9a9a;
    font-size: 12px;
    line-height: 1.35;
}

.assistant-clothing-description-error[hidden] {
    display: none;
}

.assistant-clothing-equip-control {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    width: 34px;
    min-height: 44px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.assistant-clothing-equip-control:has(input:disabled) {
    cursor: default;
    opacity: 0.56;
}

.assistant-clothing-equip-control input[type="checkbox"] {
    appearance: none;
    display: grid;
    place-content: center;
    width: 22px;
    min-height: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    transform: translate(-2px, 1px);
    border: 1px solid #5f6d80;
    border-radius: 6px;
    background: #20242a;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease;
}

.assistant-clothing-equip-control input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid #0e1d13;
    border-bottom: 2px solid #0e1d13;
    transform: rotate(-45deg) scale(0);
    transform-origin: center;
    transition: transform 0.1s ease;
}

.assistant-clothing-equip-control input[type="checkbox"]:checked {
    border-color: #58d68d;
    background: #58d68d;
}

.assistant-clothing-equip-control input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) scale(1);
}

.assistant-clothing-equip-control input[type="checkbox"]:disabled {
    cursor: default;
}

.assistant-clothing-upload-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
}

.assistant-clothing-upload-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7fa9df;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

.assistant-clothing-upload-link:hover:not(:disabled) {
    color: #b9d4f6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.assistant-clothing-upload-link:focus-visible {
    outline: 2px solid rgba(93, 156, 255, 0.7);
    outline-offset: 3px;
    border-radius: 2px;
}

.assistant-clothing-upload-link:disabled {
    color: #5f6875;
    cursor: default;
    opacity: 0.72;
}

.assistant-wardrobe-picker {
    margin: 0;
    border: 1px solid rgba(111, 151, 207, 0.32);
    border-radius: 8px;
    background: rgba(10, 24, 43, 0.38);
    overflow: hidden;
}

.assistant-wardrobe-picker > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 8px 10px;
    color: #c8d7ed;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.assistant-wardrobe-picker > summary::-webkit-details-marker {
    display: none;
}

.assistant-wardrobe-picker > summary::before {
    content: "›";
    flex: 0 0 auto;
    color: #84a9db;
    font-size: 18px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.16s ease;
}

.assistant-wardrobe-picker[open] > summary::before {
    transform: rotate(90deg);
}

.assistant-wardrobe-picker > summary > span:first-of-type {
    flex: 1 1 auto;
}

.assistant-wardrobe-count {
    flex: 0 0 auto;
    color: #8fa6c5;
    font-size: 11px;
    font-weight: 600;
}

.assistant-wardrobe-items {
    border-top: 1px solid rgba(111, 151, 207, 0.24);
}

.assistant-wardrobe-empty {
    margin: 0;
    padding: 11px 12px;
    color: #8296b3;
    font-size: 12px;
    line-height: 1.4;
}

.assistant-wardrobe-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 7px 9px 7px 12px;
    border-bottom: 1px solid rgba(111, 151, 207, 0.16);
}

.assistant-wardrobe-item:last-child {
    border-bottom: 0;
}

.assistant-wardrobe-item.is-equipped {
    background: rgba(55, 135, 92, 0.13);
}

.assistant-wardrobe-item-name-group {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.assistant-wardrobe-item-name {
    min-width: 0;
    overflow: hidden;
    color: #d5e0f1;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-wardrobe-item-nsfw {
    flex: 0 0 auto;
    color: #ff6f6f;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.assistant-wardrobe-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.assistant-wardrobe-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid rgba(118, 153, 201, 0.45);
    border-radius: 7px;
    background: rgba(21, 48, 80, 0.72);
    color: #bcd0ea;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.assistant-wardrobe-action:hover {
    border-color: #7fa9df;
    background: rgba(35, 76, 122, 0.9);
    color: #ffffff;
}

.assistant-wardrobe-equip.is-equipped,
.assistant-wardrobe-equip:disabled {
    border-color: rgba(88, 214, 141, 0.62);
    background: rgba(40, 117, 72, 0.28);
    color: #58d68d;
}

.assistant-wardrobe-action:disabled {
    cursor: default;
    opacity: 0.82;
}

.assistant-wardrobe-delete {
    border-color: rgba(255, 102, 102, 0.48);
    background: rgba(120, 31, 31, 0.2);
    color: #ff8585;
}

.assistant-wardrobe-delete:hover {
    border-color: #ff7a7a;
    background: rgba(162, 41, 41, 0.35);
    color: #ffd2d2;
}

@media (max-width: 760px) {
    .assistant-clothing-upload-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .assistant-clothing-share-column,
    .assistant-clothing-nsfw-column,
    .assistant-clothing-equip-column {
        display: block;
    }

    .assistant-clothing-upload-actions {
        flex-wrap: wrap;
        gap: 10px 18px;
    }
}

.assistant-appearance-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.assistant-upload-field input[type="file"] {
    min-height: 44px;
    padding: 6px 8px;
    cursor: pointer;
}

.assistant-backdrop-upload-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
}

.assistant-backdrop-upload-control input[type="file"] {
    min-width: 0;
}

.assistant-backdrop-paste-button {
    min-width: 76px;
    padding: 0 16px;
    border: 1px solid rgba(116, 198, 255, 0.45);
    border-radius: 10px;
    background: rgba(33, 113, 174, 0.22);
    color: #dff2ff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.assistant-backdrop-paste-button:hover {
    border-color: rgba(116, 198, 255, 0.75);
    background: rgba(33, 113, 174, 0.34);
}

.assistant-backdrop-paste-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.assistant-upload-field input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    padding: 0 12px;
    border: 1px solid #3c5f8d;
    border-radius: 7px;
    background: #193b63;
    color: #f4f8ff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.assistant-upload-field input[type="file"]::file-selector-button:hover {
    background: #214d7f;
}

.assistant-upload-help {
    margin: 8px 2px 0;
    color: var(--secondary-text);
    font-size: 12px;
    line-height: 1.45;
}

.assistant-upload-help strong {
    color: #c9d8ef;
    font-weight: 700;
}

.speaking-style-field {
    padding-top: 0;
}

.voice-field-heading {
    position: relative;
    display: block;
    margin-bottom: 8px;
}

    .voice-field-heading label {
        margin: 0;
    }

    .voice-field-heading .speech-preview-button {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

.speech-preview-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5d9cff;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

    .speech-preview-button svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
        pointer-events: none;
    }

    .speech-preview-button:hover:not(:disabled) {
        background: rgba(93, 156, 255, 0.13);
        color: #82b3ff;
        transform: translateY(-50%) scale(1.05);
    }

    .speech-preview-button:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 2px;
    }

    .speech-preview-button.is-playing {
        background: rgba(93, 156, 255, 0.18);
        color: #82b3ff;
    }

    .speech-preview-button:disabled {
        cursor: default;
        opacity: 0.58;
        transform: translateY(-50%);
    }

.form-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-text);
    font-size: 13px;
    font-weight: 700;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    background: #151515;
    color: var(--primary-text);
}

.form-field input,
.form-field select {
    min-height: 44px;
    padding: 0 12px;
}

.form-field textarea {
    min-height: 110px;
    padding: 12px;
    resize: vertical;
    line-height: 1.5;
}

    .form-field input::placeholder,
    .form-field textarea::placeholder {
        color: #656565;
    }

    .form-field input:focus,
    .form-field textarea:focus,
    .form-field select:focus {
        border-color: #5d9cff;
        box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
    }

.trait-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.trait-option {
    display: flex !important;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #151515;
    color: var(--primary-text) !important;
    cursor: pointer;
}

    .trait-option:hover {
        border-color: #444444;
    }

    .trait-option input {
        width: 16px;
        height: 16px;
        min-height: 0;
        margin: 0;
        padding: 0;
        accent-color: #5d9cff;
    }

.wizard-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.12);
}

.wizard-footer-spacer {
    flex: 1 1 auto;
}

.wizard-button {
    min-width: 112px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    cursor: pointer;
}

    .wizard-button:disabled {
        cursor: default;
        opacity: 0.4;
    }

.wizard-button-secondary {
    border: 1px solid var(--border-color);
    background: transparent;
}

    .wizard-button-secondary:not(:disabled):hover {
        background: var(--sidebar-hover);
    }

.wizard-button-primary {
    border: 1px solid #5d9cff;
    background: rgba(24, 67, 111, 0.72);
    color: #ffffff;
    border: 1px solid rgba(103, 166, 230, 0.18);
}

    .wizard-button-primary:hover {
        background: #3582d1;
    }

.assistant-content-settings {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.12);
}

.assistant-content-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.assistant-content-subsettings {
    display: grid;
    gap: 12px;
    padding: 14px 0 0 18px;
    border-top: 1px solid var(--border-color);
}

.assistant-content-setting-title {
    color: var(--primary-text);
    font-weight: 700;
}

.assistant-content-setting-description {
    margin-top: 4px;
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.45;
}

.assistant-slide-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 25px;
    cursor: pointer;
}

.assistant-slide-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.assistant-slide-switch-track {
    position: absolute;
    inset: 0;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #242424;
    transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.assistant-slide-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #d7d7d7;
    transition: transform 150ms ease, background 150ms ease;
}

.assistant-slide-switch input:checked + .assistant-slide-switch-track {
    border-color: #5d9cff;
    background: #1d4f85;
}

.assistant-slide-switch input:checked + .assistant-slide-switch-track::after {
    transform: translateX(21px);
    background: #ffffff;
}

.assistant-slide-switch input:focus-visible + .assistant-slide-switch-track {
    outline: 2px solid #71b7ff;
    outline-offset: 2px;
}

.assistant-slide-switch input:disabled + .assistant-slide-switch-track {
    opacity: 0.4;
}

.assistant-slide-switch:has(input:disabled) {
    cursor: default;
}

.wizard-content.is-memory-step {
    overflow-y: hidden;
}

.wizard-content.is-memory-step .wizard-step[data-step="5"].is-active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wizard-content.is-memory-step .assistant-memory-manager {
    flex: 1 1 auto;
    height: auto;
}

.assistant-memory-manager {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    display: grid;
    gap: 16px;
}

.assistant-memory-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #151515;
}

.assistant-memory-select-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 0 3px;
    color: var(--primary-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.assistant-memory-select-all input,
.assistant-memory-checkbox {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #5d9cff;
}

.assistant-memory-select-all input:disabled,
.assistant-memory-checkbox:disabled {
    cursor: default;
    opacity: 0.55;
}

.assistant-memory-selection-summary {
    color: var(--muted-text);
    font-size: 12px;
}

.assistant-memory-delete-button {
    min-height: 34px;
    margin-left: auto;
    padding: 0 12px;
    border: 1px solid rgba(238, 104, 104, 0.46);
    border-radius: 9px;
    background: rgba(128, 31, 31, 0.2);
    color: #ffb0b0;
    font-weight: 700;
    cursor: pointer;
}

.assistant-memory-delete-button:hover:not(:disabled) {
    background: rgba(160, 42, 42, 0.32);
}

.assistant-memory-delete-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.assistant-memory-pending-notice {
    padding: 11px 13px;
    border: 1px solid rgba(238, 104, 104, 0.3);
    border-radius: 10px;
    background: rgba(128, 31, 31, 0.12);
    color: #ffc1c1;
    font-size: 13px;
    line-height: 1.45;
}

.assistant-memory-list {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    gap: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.assistant-memory-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #151515;
}

.assistant-memory-row.is-pending-deletion {
    border-color: rgba(238, 104, 104, 0.34);
    background: rgba(128, 31, 31, 0.08);
}

.assistant-memory-selection {
    padding-top: 2px;
}

.assistant-memory-content {
    min-width: 0;
}

.assistant-memory-row-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.assistant-memory-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.assistant-memory-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid rgba(93, 156, 255, 0.3);
    border-radius: 999px;
    background: rgba(93, 156, 255, 0.1);
    color: #9fc8ff;
    font-size: 11px;
    font-weight: 700;
}

.assistant-memory-status-badge {
    border-color: rgba(255, 196, 91, 0.34);
    background: rgba(255, 196, 91, 0.09);
    color: #ffd68a;
}

.assistant-memory-deletion-badge {
    border-color: rgba(238, 104, 104, 0.38);
    background: rgba(238, 104, 104, 0.1);
    color: #ffb0b0;
}

.assistant-memory-undo-button {
    margin-left: auto;
    padding: 3px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9fc8ff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.assistant-memory-undo-button:hover {
    background: rgba(93, 156, 255, 0.12);
}

.assistant-memory-subject {
    margin: 11px 0 0;
    font-size: 15px;
}

.assistant-memory-text {
    margin: 8px 0 0;
    color: var(--secondary-text);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.assistant-memory-row.is-pending-deletion .assistant-memory-subject,
.assistant-memory-row.is-pending-deletion .assistant-memory-text {
    opacity: 0.64;
    text-decoration: line-through;
}

.assistant-memory-metadata {
    margin-top: 10px;
    color: var(--muted-text);
    font-size: 11px;
}

.assistant-memory-empty {
    padding: 28px 18px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--muted-text);
    text-align: center;
}

.assistant-memory-save-note {
    margin: 0;
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.45;
}

.wizard-complete-message {
    padding: 40px;
    text-align: center;
}

    .wizard-complete-message h2 {
        margin: 0;
        font-size: 26px;
    }

    .wizard-complete-message p {
        margin: 12px 0 0;
        color: var(--secondary-text);
        line-height: 1.6;
    }

.form-field .number-control {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #151515;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-field .number-control:focus-within {
        border-color: #5d9cff;
        box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
    }

    .form-field .number-control .number-control-input {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        margin: 0;
        padding: 0 10px;
        border: 0;
        border-radius: 0;
        outline: none;
        background: transparent;
        color: var(--primary-text);
        text-align: center;
        box-shadow: none;
        appearance: textfield;
        -moz-appearance: textfield;
    }

        .form-field .number-control .number-control-input:focus {
            border: 0;
            outline: none;
            box-shadow: none;
        }

        .form-field .number-control .number-control-input::-webkit-inner-spin-button,
        .form-field .number-control .number-control-input::-webkit-outer-spin-button {
            margin: 0;
            appearance: none;
            -webkit-appearance: none;
        }

    .form-field .number-control .number-control-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        min-height: 42px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        outline: none;
        background: #202020;
        color: var(--secondary-text);
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

        .form-field .number-control .number-control-button:first-child {
            border-right: 1px solid var(--border-color);
        }

        .form-field .number-control .number-control-button:last-child {
            border-left: 1px solid var(--border-color);
        }

        .form-field .number-control .number-control-button:hover {
            background: var(--sidebar-hover);
            color: var(--primary-text);
        }

        .form-field .number-control .number-control-button:active {
            background: #303030;
        }

        .form-field .number-control .number-control-button:focus-visible {
            position: relative;
            z-index: 1;
            outline: 2px solid #5d9cff;
            outline-offset: -3px;
        }

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 240px;
        --assistant-width: 340px;
    }

    .assistant-placeholder {
        width: 180px;
        height: 360px;
    }

    .assistant-placeholder-head {
        width: 98px;
        height: 116px;
    }

    .assistant-placeholder-body {
        width: 180px;
        height: 245px;
    }
}

@media (max-width: 860px) {
    :root {
        --assistant-width: 280px;
    }

    .sidebar {
        flex-basis: 220px;
        width: 220px;
    }

    .welcome-panel {
        padding: 32px 24px;
    }

        .welcome-panel h1 {
            font-size: 30px;
        }
}

@media (max-width: 760px) {
    .chat-scroll-bottom-button {
        bottom: 140px;
    }

    html,
    body,
    form {
        min-height: 100%;
        height: auto;
    }

    body {
        overflow: auto;
    }

    .app-shell {
        min-height: 100vh;
        height: auto;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        flex-direction: column-reverse;
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }

    .workspace-panel {
        flex: 1 1 auto;
        min-height: 55vh;
        height: auto;
        overflow: visible;
    }

    .welcome-panel {
        padding: 28px 20px;
    }

        .welcome-panel h1 {
            font-size: 29px;
        }

    .assistant-stage {
        flex: 0 0 auto;
        width: 100%;
        height: 45vh;
        min-height: 320px;
        border-bottom: 1px solid var(--border-color);
        border-left: 0;
    }

    .assistant-stage-header {
        min-height: 62px;
        padding: 12px 16px;
    }

    .assistant-placeholder {
        width: 130px;
        height: 220px;
    }

    .assistant-placeholder-head {
        top: 8px;
        width: 72px;
        height: 82px;
        border-width: 1px;
    }

        .assistant-placeholder-head::before,
        .assistant-placeholder-head::after {
            top: 36px;
            width: 6px;
            height: 2px;
        }

        .assistant-placeholder-head::before {
            left: 20px;
        }

        .assistant-placeholder-head::after {
            right: 20px;
        }

    .assistant-placeholder-body {
        width: 130px;
        height: 150px;
        border-width: 1px;
        border-radius: 55px 55px 18px 18px;
    }

        .assistant-placeholder-body::before {
            top: 31px;
            width: 48px;
        }

    .assistant-visual-message {
        right: 12px;
        bottom: 10px;
        left: 12px;
    }

    .assistant-stage.is-collapsed {
        width: 100%;
        height: 62px;
        min-height: 62px;
    }

        .assistant-stage.is-collapsed .assistant-stage-header {
            min-height: 62px;
        }

        .assistant-stage.is-collapsed .assistant-collapse-button {
            margin-left: auto;
        }

    .profile-wizard {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        margin: 0;
        border-radius: 14px;
    }

    .wizard-header {
        align-items: flex-start;
        padding: 22px 20px;
    }

    .wizard-logo {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .wizard-header h1 {
        font-size: 22px;
    }

    .wizard-progress {
        padding: 16px 20px;
    }

    .wizard-progress-label {
        display: none;
    }

    .wizard-progress-line {
        margin: 0 8px;
    }

    .wizard-content {
        flex: 0 0 auto;
        min-height: 0;
        padding: 24px 20px 28px;
        overflow: visible;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .trait-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-footer {
        padding: 16px 20px;
    }

    .workspace-panel {
        display: block;
        padding: 12px;
        overflow: visible;
    }
}

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

/* Login page */

.login-page {
    min-height: 100vh;
    overflow: auto;
    background: radial-gradient( circle at 50% 18%, rgba(93, 156, 255, 0.08), transparent 34% ), var(--page-background);
}

.login-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 32px 20px;
    overflow: hidden;
}

.login-panel {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    padding: 34px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: linear-gradient( 180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0) ), var(--panel-background);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.login-brand {
    display: flex;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.login-brand-icon {
    display: block;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    margin-right: 14px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.login-brand-copy {
    min-width: 0;
}

.login-brand-name {
    color: var(--primary-text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.login-brand-status {
    margin-top: 5px;
    color: var(--secondary-text);
    font-size: 12px;
    line-height: 1.4;
}

.login-heading {
    padding: 30px 0 25px;
}

.login-eyebrow {
    color: #71b7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.login-heading h1 {
    margin: 7px 0 0;
    color: var(--primary-text);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.login-heading p {
    margin: 11px 0 0;
    color: var(--secondary-text);
    font-size: 14px;
    line-height: 1.6;
}

.login-form {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.login-field {
    margin-bottom: 18px;
}

    .login-field label {
        display: block;
        margin-bottom: 8px;
        color: var(--secondary-text);
        font-size: 13px;
        font-weight: 700;
    }

    .login-field input {
        width: 100%;
        min-height: 48px;
        padding: 0 14px;
        border: 1px solid var(--border-color);
        border-radius: 11px;
        outline: none;
        background: #151515;
        color: var(--primary-text);
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    }

        .login-field input::placeholder {
            color: #626262;
        }

        .login-field input:hover {
            border-color: #444444;
        }

        .login-field input:focus {
            border-color: #5d9cff;
            background: #171717;
            box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
        }

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
    padding: 0 18px;
    border: 1px solid #5d9cff;
    border-radius: 11px;
    background: #2e74bb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

    .login-button:hover:not(:disabled) {
        border-color: #71b7ff;
        background: #3582d1;
    }

    .login-button:active:not(:disabled) {
        transform: translateY(1px);
    }

    .login-button:focus-visible {
        outline: 2px solid #8cc5ff;
        outline-offset: 3px;
    }

    .login-button:disabled {
        cursor: wait;
        opacity: 0.65;
    }

.login-message {
    margin: 0 0 16px;
    padding: 11px 12px;
    border: 1px solid rgba(240, 103, 103, 0.35);
    border-radius: 10px;
    background: rgba(240, 103, 103, 0.08);
    color: #ff9d9d;
    font-size: 13px;
    line-height: 1.45;
}

    .login-message[hidden] {
        display: none;
    }

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
    padding-top: 21px;
    border-top: 1px solid var(--border-color);
    color: var(--muted-text);
    font-size: 12px;
    text-align: center;
}

.login-status-indicator {
    display: inline-block;
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(95, 206, 130, 0.36);
}

.login-background-mark {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 740px;
    height: 740px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    isolation: isolate;
}

    /* Very soft atmospheric bloom behind the eclipse. */
    .login-background-mark::before {
        position: absolute;
        z-index: -4;
        inset: 8%;
        border-radius: 50%;
        background: radial-gradient( circle, transparent 0 46%, rgba(43, 117, 163, 0.055) 54%, rgba(77, 79, 150, 0.05) 61%, rgba(116, 48, 107, 0.028) 67%, transparent 76% );
        filter: blur(34px) saturate(0.85);
        content: "";
        animation: login-bloom-pulse 8s ease-in-out infinite;
    }

    /* Broken outer corona with only a few restrained highlights. */
    .login-background-mark::after {
        position: absolute;
        z-index: -3;
        inset: 5%;
        border-radius: 47% 53% 50% 50% / 52% 47% 53% 48%;
        background: radial-gradient(circle at 51% 3%, rgba(255, 231, 179, 0.28) 0 1.5%, transparent 6%), radial-gradient(circle at 84% 27%, rgba(116, 103, 180, 0.16) 0 2%, transparent 8%), radial-gradient(circle at 18% 63%, rgba(52, 142, 172, 0.18) 0 2.5%, transparent 9%), conic-gradient( from 18deg, rgba(37, 144, 167, 0.18) 0deg, transparent 45deg, rgba(73, 88, 151, 0.14) 88deg, rgba(124, 57, 125, 0.12) 132deg, transparent 178deg, rgba(150, 102, 61, 0.09) 220deg, transparent 258deg, rgba(46, 132, 120, 0.16) 312deg, rgba(37, 144, 167, 0.18) 360deg );
        -webkit-mask: radial-gradient(circle, transparent 0 60%, #000 64% 68%, transparent 74%);
        mask: radial-gradient(circle, transparent 0 60%, #000 64% 68%, transparent 74%);
        opacity: 0.58;
        filter: blur(18px) saturate(0.82) brightness(0.82);
        content: "";
        animation: login-corona-spin 28s linear infinite;
        will-change: transform;
    }

.login-aurora {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    transform-origin: center;
    will-change: transform;
}

/* Thin, broken aurora ribbon with muted color. */
.login-aurora-primary {
    z-index: -2;
    width: 82%;
    height: 82%;
    border-radius: 48% 52% 46% 54% / 54% 48% 52% 46%;
    background: radial-gradient(circle at 52% 2%, rgba(255, 235, 194, 0.34) 0 1.2%, transparent 5%), radial-gradient(circle at 89% 37%, rgba(111, 71, 140, 0.16) 0 1.5%, transparent 6%), radial-gradient(circle at 24% 78%, rgba(36, 128, 148, 0.19) 0 2%, transparent 7%), conic-gradient( from 4deg, rgba(43, 154, 174, 0.28) 0deg, rgba(53, 96, 151, 0.18) 42deg, transparent 76deg, rgba(94, 66, 139, 0.2) 112deg, rgba(133, 54, 111, 0.16) 148deg, transparent 190deg, rgba(157, 108, 60, 0.12) 224deg, transparent 266deg, rgba(53, 137, 117, 0.22) 314deg, rgba(43, 154, 174, 0.28) 360deg );
    -webkit-mask: radial-gradient(circle, transparent 0 59%, #000 63% 66%, transparent 71%);
    mask: radial-gradient(circle, transparent 0 59%, #000 63% 66%, transparent 71%);
    filter: blur(8px) saturate(0.82) brightness(0.78);
    opacity: 0.64;
    animation: login-aurora-spin 22s linear infinite;
}

/* Broader, barely visible counter-rotating veil. */
.login-aurora-secondary {
    z-index: -1;
    width: 91%;
    height: 86%;
    border-radius: 53% 47% 56% 44% / 44% 57% 43% 56%;
    background: conic-gradient( from 104deg, transparent 0 9%, rgba(43, 131, 159, 0.13) 15%, transparent 26%, rgba(86, 65, 138, 0.12) 35%, rgba(119, 50, 105, 0.09) 44%, transparent 57%, rgba(142, 101, 62, 0.07) 67%, transparent 78%, rgba(43, 124, 105, 0.12) 89%, transparent 100% );
    -webkit-mask: radial-gradient(ellipse at center, transparent 0 59%, #000 64% 68%, transparent 76%);
    mask: radial-gradient(ellipse at center, transparent 0 59%, #000 64% 68%, transparent 76%);
    filter: blur(18px) saturate(0.72) brightness(0.72);
    opacity: 0.48;
    animation: login-aurora-counterspin 34s linear infinite;
}

/* Dark eclipsed globe. */
.login-eclipse-core {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    display: block;
    width: 60%;
    height: 60%;
    border: 1px solid rgba(154, 185, 214, 0.045);
    border-radius: 50%;
    background: radial-gradient( circle at 42% 35%, rgba(25, 34, 46, 0.27), rgba(7, 9, 13, 0.985) 58%, #020304 80% );
    box-shadow: 0 -3px 12px rgba(255, 226, 174, 0.10), 0 0 26px rgba(62, 127, 173, 0.10), 0 0 64px rgba(77, 52, 126, 0.08);
    transform: translate(-50%, -50%);
}

@keyframes login-aurora-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1, 0.975);
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.015, 0.99);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1, 0.975);
    }
}

@keyframes login-aurora-counterspin {
    0% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1.01, 0.97);
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(0.985, 1.015);
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1.01, 0.97);
    }
}

@keyframes login-corona-spin {
    0% {
        transform: rotate(0deg) scale(0.995, 1.015);
    }

    50% {
        transform: rotate(180deg) scale(1.015, 0.99);
    }

    100% {
        transform: rotate(360deg) scale(0.995, 1.015);
    }
}

@keyframes login-bloom-pulse {
    0%, 100% {
        opacity: 0.42;
        transform: scale(0.99);
    }

    50% {
        opacity: 0.58;
        transform: scale(1.015);
    }
}

@media (max-width: 520px) {
    .login-shell {
        align-items: flex-start;
        padding: 18px 12px;
    }

    .login-panel {
        margin-top: 4vh;
        padding: 26px 22px;
        border-radius: 16px;
    }

    .login-brand-icon {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }

    .login-heading {
        padding: 26px 0 22px;
    }

        .login-heading h1 {
            font-size: 25px;
        }

    .login-background-mark {
        width: 540px;
        height: 540px;
    }
}

/* Workspace states, assistant initialization, and chat */

.is-hidden {
    display: none !important;
}

.workspace-panel {
    position: relative;
}

.initialization-panel {
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 24px;
    background: rgba(8, 8, 8, 0.34);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
}

.chat-panel {
    width: 100%;
    min-height: 0;
    margin: 0;
}

.initialization-panel {
    height: 100%;
}

.chat-panel {
    align-self: stretch;
    height: auto;
}

.initialization-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

    .initialization-panel.is-leaving {
        opacity: 0;
        transform: translateY(-8px);
    }

.initialization-card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    padding: 42px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.initialization-logo {
    display: block;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    border-radius: 18px;
}

.initialization-card h1 {
    margin: 7px 0 0;
    font-size: 28px;
}

.initialization-card > p {
    margin: 12px 0 0;
    color: var(--secondary-text);
    line-height: 1.55;
}

.initialization-spinner {
    width: 34px;
    height: 34px;
    margin: 24px auto 0;
    border: 3px solid rgba(93, 156, 255, 0.2);
    border-top-color: #5d9cff;
    border-radius: 50%;
    animation: assistant-initialization-spin 0.85s linear infinite;
}

@keyframes assistant-initialization-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .initialization-spinner {
        animation-duration: 1.8s;
    }
}

.initialization-progress {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.initialization-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #151515;
    color: var(--muted-text);
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.initialization-check {
    color: transparent;
    font-weight: 700;
}

.initialization-item.is-complete {
    border-color: rgba(95, 206, 130, 0.38);
    background: rgba(95, 206, 130, 0.07);
    color: var(--primary-text);
}

    .initialization-item.is-complete .initialization-check {
        color: var(--success);
    }

.chat-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
}

    .chat-panel.is-entering {
        animation: chat-enter 0.35s ease both;
    }

@keyframes chat-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.chat-title {
    font-size: 16px;
    font-weight: 700;
}

.chat-subtitle {
    margin-top: 5px;
    color: var(--secondary-text);
    font-size: 12px;
}

.chat-content-region {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.chat-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 28px 24px;
    overflow-y: auto;
}

    .chat-messages > .chat-message:first-child {
        margin-top: auto;
    }

    .chat-messages::-webkit-scrollbar-button {
        display: none;
        width: 0;
        height: 0;
    }


.chat-history-loading-dock {
    position: sticky;
    top: 10px;
    z-index: 8;
    display: flex;
    height: 0;
    justify-content: center;
    overflow: visible;
    pointer-events: none;
}

    .chat-history-loading-dock.is-hidden {
        display: none;
    }

.chat-history-loading-panel {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(21, 21, 21, 0.96);
    color: var(--secondary-text);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
}

.chat-empty-state {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    text-align: center;
}

.chat-empty-logo {
    width: 78px;
    height: 78px;
    border-radius: 20px;
}

.chat-empty-state h2 {
    margin: 18px 0 0;
    color: var(--primary-text);
    font-size: 25px;
}

.chat-empty-state p {
    margin: 9px 0 0;
}

.chat-message {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0 0 18px;
}

    .chat-message-user,
    .chat-message.user {
        align-items: flex-end;
    }

    .chat-message-assistant,
    .chat-message.assistant {
        align-items: flex-start;
    }

.chat-message-bubble,
.chat-bubble {
    width: 88%;
    max-width: none;
    padding: 13px 16px;
    border-radius: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.chat-message-user .chat-message-bubble,
.chat-message.user .chat-bubble,
.chat-message.user .chat-message-bubble {
    background: #2e74bb;
    color: #ffffff;
}

.chat-message-assistant .chat-message-bubble,
.chat-message.assistant .chat-bubble,
.chat-message.assistant .chat-message-bubble {
    border: 1px solid var(--border-color);
    background: #151515;
    color: var(--primary-text);
}

.chat-message-timestamp {
    display: none;
    width: 88%;
    margin: 0 0 6px;
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.timestamps-enabled .chat-message-timestamp {
    display: block;
}

.chat-message.user .chat-message-timestamp {
    margin-right: 10px;
    text-align: right;
}

.chat-message.assistant .chat-message-timestamp {
    margin-left: 10px;
    text-align: left;
}

.chat-message.user .chat-bubble.is-collapsible {
    position: relative;
    overflow: hidden;
}

.chat-user-message-content {
    min-height: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-message.user .chat-bubble.is-collapsible
.chat-user-message-content {
    max-height: var(--user-message-expanded-height, 280px);
    overflow: hidden;
    transition: max-height 0.28s ease;
}

.chat-message.user .chat-bubble.is-collapsible.is-collapsed
.chat-user-message-content {
    max-height: 280px;
    -webkit-mask-image: linear-gradient( to bottom, #000 0%, #000 28%, rgba(0, 0, 0, 0.92) 42%, rgba(0, 0, 0, 0.62) 62%, rgba(0, 0, 0, 0.24) 82%, transparent 100%);
    mask-image: linear-gradient( to bottom, #000 0%, #000 28%, rgba(0, 0, 0, 0.92) 42%, rgba(0, 0, 0, 0.62) 62%, rgba(0, 0, 0, 0.24) 82%, transparent 100%);
}

.chat-message.user .chat-bubble.is-collapsible.is-expanded
.chat-user-message-content {
    -webkit-mask-image: none;
    mask-image: none;
}

.chat-message-collapse-button {
    position: absolute;
    z-index: 2;
    right: 50%;
    bottom: 10px;
    display: inline-flex;
    min-width: 104px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: rgba(18, 47, 78, 0.9);
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
    transform: translateX(50%);
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
    backdrop-filter: blur(6px);
}

    .chat-message-collapse-button[hidden] {
        display: none;
    }

    .chat-message-collapse-button:hover {
        border-color: rgba(255, 255, 255, 0.48);
        background: rgba(21, 57, 94, 0.98);
        transform: translateX(50%) translateY(-1px);
    }

    .chat-message-collapse-button:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 2px;
    }

    .chat-message-collapse-button:active {
        transform: translateX(50%) translateY(0);
    }

.chat-message.is-pending .chat-message-bubble,
.chat-message.is-pending .chat-bubble {
    color: var(--secondary-text);
}

.generated-image-card {
    display: grid;
    gap: 10px;
    margin: 0;
}

.generated-image-button {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    line-height: 0;
    cursor: zoom-in;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

    .generated-image-button:hover {
        border-color: #5d9cff;
        transform: translateY(-1px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    }

    .generated-image-button:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 3px;
    }

.generated-chat-image {
    display: block;
    width: auto;
    max-width: min(100%, 360px);
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
}

.chat-user-image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}

.chat-user-image-grid .generated-image-button {
    flex: 0 0 auto;
}

.chat-user-image-grid .generated-chat-image {
    width: 112px;
    height: 112px;
    max-width: 112px;
    max-height: 112px;
    object-fit: cover;
}

.generated-image-caption {
    white-space: pre-wrap;
    color: var(--secondary-text);
    font-size: 13px;
    line-height: 1.45;
}

.chat-message-link {
    color: #7db7ff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

    .chat-message-link:hover {
        color: #acd2ff;
    }

    .chat-message-link:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 2px;
        border-radius: 3px;
    }

.chat-message-link {
    display: inline-block;
    max-width: min(100%, 72ch);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.chat-bubble-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-bubble-action-button {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #5d9cff;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

    .chat-bubble-action-button svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
        pointer-events: none;
    }

    .chat-bubble-action-button:hover:not(:disabled) {
        background: rgba(93, 156, 255, 0.13);
        color: #82b3ff;
        transform: scale(1.05);
    }

    .chat-bubble-action-button:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 2px;
    }

    .chat-bubble-action-button.is-confirmed {
        background: rgba(95, 206, 130, 0.14);
        color: var(--success);
    }

    .chat-bubble-action-button.is-speaking {
        background: rgba(46, 160, 85, 0.28);
        color: #8ff0ad;
        animation: chat-speak-pulse 1.2s ease-in-out infinite;
    }

    .chat-bubble-action-button.is-speech-stopped {
        background: rgba(194, 52, 52, 0.3);
        color: #ff9d9d;
        transition: background-color 1.5s ease, color 1.5s ease;
    }

@keyframes chat-speak-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.chat-bubble-action-button:disabled {
    cursor: default;
    opacity: 0.58;
    transform: none;
}

.chat-processing-time {
    display: inline-flex;
    height: 32px;
    align-items: center;
    margin-left: auto;
    padding: 0 2px 0 10px;
    color: rgba(220, 228, 241, 0.62);
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
}


.chat-action-tooltip {
    position: fixed;
    z-index: 30000;
    max-width: min(420px, calc(100vw - 20px));
    max-height: min(46vh, 420px);
    overflow-y: auto;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--toolbar-background);
    color: var(--primary-text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48),
                inset 0 1px 0 rgba(255, 255, 255, 0.035);
    font-size: 0.78rem;
    line-height: 1.42;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.chat-action-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chat-action-tooltip.is-below {
    transform: translateY(-3px);
}

.chat-action-tooltip.is-below.is-visible {
    transform: translateY(0);
}

.image-viewer-open {
    overflow: hidden;
}

.image-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(8, 8, 8, 0.48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

.image-viewer-panel {
    display: flex;
    width: min(1100px, 96vw);
    max-height: 92vh;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.image-viewer-header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

    .image-viewer-header h2 {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px;
    }

.preview-header-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.preview-download-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #151515;
    color: var(--primary-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

    .preview-download-button:hover {
        border-color: #5d9cff;
        background: #1d1d1d;
        color: var(--primary-text);
    }

    .preview-download-button:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 2px;
    }

.image-viewer-close {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #151515;
    color: var(--primary-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

    .image-viewer-close:hover {
        border-color: #5d9cff;
        background: #1d1d1d;
    }

    .image-viewer-close:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 2px;
    }

.image-viewer-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    background: #0d0d0d;
}

.image-viewer-image {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 130px);
    object-fit: contain;
    border-radius: 10px;
}

.preview-footer {
    display: flex;
    min-height: 52px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 7px 12px 7px 18px;
    border-top: 1px solid var(--border-color);
    background: var(--panel-background);
}

.image-viewer-footer {
    justify-content: space-between;
}

.image-viewer-caption {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    color: var(--secondary-text);
    font-size: 13px;
    line-height: 1.45;
}

.preview-footer-download {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: #6aa7ff;
    text-decoration: none;
}

.preview-footer-download:hover,
.preview-footer-download:focus-visible {
    border-color: #4f9cff;
    background: rgba(79, 156, 255, 0.10);
    color: #a8c9ff;
    outline: none;
}

.preview-footer-download svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-viewer-footer {
    justify-content: space-between;
}

.document-viewer-footer .preview-footer-download {
    margin-left: auto;
}

.document-viewer-line-count {
    min-width: 0;
    color: var(--secondary-text);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Document preview editor toolbar */
.document-editor-toolbar {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--border-color);
    background: #151515;
}

.document-editor-toolbar-row {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
}

.document-editor-toolbar-primary {
    justify-content: space-between;
}

.document-editor-toolbar-secondary {
    min-height: 42px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    background: #131313;
}

.document-editor-toolbar-group {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.document-editor-toolbar-edit-group {
    flex: 1 1 auto;
}

.document-editor-tool-button {
    display: inline-flex;
    min-height: 31px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.105);
    border-radius: 8px;
    background: #202020;
    color: #d7d7d7;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.document-editor-tool-button:hover:not(:disabled),
.document-editor-tool-button:focus-visible:not(:disabled) {
    border-color: rgba(79, 156, 255, 0.72);
    background: rgba(49, 116, 202, 0.20);
    color: #e7f1ff;
    outline: none;
}

.document-editor-tool-button:disabled {
    opacity: .34;
    cursor: default;
}

.document-editor-tool-button.is-active {
    border-color: rgba(79, 156, 255, 0.72);
    background: rgba(49, 116, 202, 0.26);
    color: #dbeaff;
}

.document-editor-edit-button.is-active {
    border-color: rgba(118, 183, 124, 0.72);
    background: rgba(54, 109, 61, 0.32);
    color: #daf2dd;
}

.document-editor-tool-button.is-dirty {
    border-color: rgba(79, 156, 255, 0.78);
    background: rgba(49, 116, 202, 0.18);
    color: #dbeaff;
}

.document-editor-icon-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.document-editor-icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-editor-toolbar-separator {
    width: 1px;
    height: 23px;
    margin: 0 3px;
    background: rgba(255, 255, 255, 0.10);
}

.document-editor-status {
    min-width: 0;
    overflow: hidden;
    color: rgba(222, 222, 222, 0.60);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-editor-status.is-error {
    color: #ef9b9b;
}

.document-preview-search {
    display: flex;
    min-width: min(520px, 48vw);
    max-width: min(620px, 52vw);
    flex: 0 1 620px;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;
    background: #1d1d1d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.document-preview-search-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 31px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    outline: none;
    background: #111;
    color: #f3f3f3;
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 12px;
}

.document-preview-search-input::placeholder {
    color: rgba(225, 225, 225, 0.46);
}

.document-preview-search-input:focus {
    border-color: rgba(180, 180, 180, 0.62);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.055);
}

.document-preview-search-button {
    display: inline-flex;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    background: #242424;
    color: #c8c8c8;
    cursor: pointer;
}

.document-preview-search-button:hover:not(:disabled),
.document-preview-search-button:focus-visible:not(:disabled) {
    border-color: rgba(79, 156, 255, 0.72);
    background: rgba(49, 116, 202, 0.20);
    color: #e7f1ff;
    outline: none;
}

.document-preview-search-button:disabled {
    opacity: .38;
    cursor: default;
}

.document-preview-search-case-button {
    width: 34px;
    flex-basis: 34px;
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
}

.document-preview-search-case-button.is-active,
.document-preview-diff-button.is-active {
    border-color: rgba(79, 156, 255, 0.72);
    background: rgba(49, 116, 202, 0.28);
    color: #dbeaff;
}

.document-preview-search-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-preview-search-count {
    min-width: 54px;
    color: rgba(235, 235, 235, 0.72);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.document-viewer-search-match {
    padding: 0 1px;
    border-radius: 2px;
    background: rgba(244, 208, 97, 0.42);
    color: inherit;
}

.document-viewer-search-match.is-active {
    background: #f4cf61;
    color: #101010;
    box-shadow: 0 0 0 2px rgba(244, 207, 97, 0.18);
}

.document-viewer-panel {
    width: min(1180px, 96vw);
    height: min(860px, 92vh);
    user-select: none;
}

.document-viewer-text,
.document-viewer-editor,
.document-preview-search-input {
    user-select: text;
}

.document-viewer-body {
    position: relative;
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    background: #0d0d0d;
}

.document-viewer-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

.document-viewer-text-shell {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    background: #0d0d0d;
}

.document-viewer-text-shell.has-line-numbers {
    position: relative;
    isolation: isolate;
    /* Keep the gutter paint in the scroll viewport even after the line-number
       element itself has scrolled beyond its initial flex height. */
    background:
        linear-gradient(
            to right,
            #101010 0,
            #101010 57px,
            rgba(255, 255, 255, 0.075) 57px,
            rgba(255, 255, 255, 0.075) 58px,
            #0d0d0d 58px,
            #0d0d0d 100%);
}

.document-viewer-line-numbers {
    position: sticky;
    z-index: 20;
    left: 0;
    box-sizing: border-box;
    min-width: 58px;
    min-height: 100%;
    flex: 0 0 auto;
    /* A row flex container stretches children to the viewport height by default.
       That left the overflowing line-number content visible after the gutter
       background had ended. Let the read-only gutter size itself to its full
       content height so its opaque background/border always stays above text. */
    align-self: flex-start;
    margin: 0;
    padding: 22px 11px 32px 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.075);
    background: #101010;
    color: rgba(214, 222, 234, 0.42);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    text-align: right;
    white-space: pre;
    user-select: none;
    pointer-events: none;
}

.document-viewer-line-numbers-content {
    display: block;
    min-height: 100%;
}

.document-viewer-line-number {
    display: block;
    height: 1.55em;
    line-height: 1.55;
    color: inherit;
}

.document-viewer-line-number.is-hovered,
.document-viewer-line-number.is-selected {
    color: #f2a23a;
}

.document-viewer-line-number.is-selected {
    background: rgba(242, 162, 58, 0.10);
}

.document-viewer-line-number.is-diff-active {
    color: #f3c45e;
    background: rgba(243, 196, 94, 0.10);
}

.document-viewer-text {
    min-width: 100%;
    min-height: 0;
    flex: 1 0 auto;
    box-sizing: border-box;
    margin: 0;
    padding: 22px 24px 32px;
    overflow: visible;
    background: #0d0d0d;
    color: var(--primary-text);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


.document-viewer-editor {
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    flex: 1 1 auto;
    box-sizing: border-box;
    margin: 0;
    padding: 22px 24px 32px;
    resize: none;
    border: 0;
    outline: none;
    overflow: auto;
    background: #0d0d0d;
    color: var(--primary-text);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre;
    overflow-wrap: normal;
    tab-size: 4;
}

.document-viewer-text-shell.has-line-numbers .document-viewer-editor {
    position: relative;
    z-index: 0;
    width: calc(100% - 58px);
    min-width: calc(100% - 58px);
}

.document-viewer-editor.is-wrapped {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.document-viewer-text-shell.has-line-numbers .document-viewer-text {
    position: relative;
    z-index: 0;
    min-width: calc(100% - 58px);
    white-space: pre;
    overflow-wrap: normal;
}

.document-viewer-text-shell.has-line-numbers .document-viewer-diff-line {
    white-space: pre;
}

.document-viewer-diff-line {
    display: block;
    width: calc(100% + 48px);
    height: 1.55em;
    min-height: 1.55em;
    box-sizing: border-box;
    margin: 0 -24px;
    padding: 0 24px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.document-viewer-diff-line.is-changed {
    background: rgba(236, 180, 60, 0.12);
    box-shadow: inset 3px 0 0 rgba(236, 180, 60, 0.88);
}

.document-viewer-diff-line.is-deletion-anchor {
    background: rgba(224, 93, 93, 0.085);
    box-shadow: inset 3px 0 0 rgba(224, 93, 93, 0.88);
}

.document-viewer-diff-line.is-counterpart-added,
.document-viewer-diff-line.is-counterpart-modified,
.document-viewer-diff-line.is-counterpart-removed {
    opacity: .52;
}

.document-viewer-diff-line.is-counterpart-added {
    background: rgba(91, 173, 105, 0.15);
    box-shadow: inset 3px 0 0 rgba(91, 173, 105, 0.82);
}

.document-viewer-diff-line.is-counterpart-modified {
    background: rgba(236, 180, 60, 0.14);
    box-shadow: inset 3px 0 0 rgba(236, 180, 60, 0.88);
}

.document-viewer-diff-line.is-counterpart-removed {
    background: rgba(224, 93, 93, 0.10);
    box-shadow: inset 3px 0 0 rgba(224, 93, 93, 0.88);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.document-viewer-line-number.is-ghost {
    color: rgba(183, 183, 183, 0.22);
}

.document-viewer-diff-line.is-active {
    background: rgba(243, 196, 94, 0.25);
    box-shadow:
        inset 3px 0 0 #f3c45e,
        inset 0 1px 0 rgba(243, 196, 94, 0.12),
        inset 0 -1px 0 rgba(243, 196, 94, 0.12);
}

.document-viewer-status {
    margin: auto;
    padding: 28px;
    color: var(--secondary-text);
    font-size: 13px;
    text-align: center;
}


.chat-request-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    color: var(--secondary-text);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.chat-request-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #5d9cff;
    border-radius: 50%;
    animation: chat-request-spin 0.75s linear infinite;
}

@keyframes chat-request-spin {
    to {
        transform: rotate(360deg);
    }
}


.chat-scroll-bottom-button {
    position: absolute;
    z-index: 8;
    right: 50%;
    bottom: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 34px;
    padding: 0;
    border: 1px solid #5f5f5f;
    border-radius: 999px;
    background: rgba(58,58,58,.96);
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
    transform: translateX(50%);
    transition: opacity .20s ease, transform .20s ease, background-color .20s ease, border-color .20s ease;
}

    .chat-scroll-bottom-button:hover {
        background: rgba(78,78,78,.98);
        border-color: #7a7a7a;
    }

    .chat-scroll-bottom-button:focus-visible {
        outline: 2px solid #5d9cff;
        outline-offset: 2px;
    }

    .chat-scroll-bottom-button.is-hidden {
        pointer-events: none;
        opacity: 0;
        transform: translate(50%, 8px);
    }

.chat-transcript-copy-button {
    position: absolute;
    right: 20px;
    bottom: 82px;
    z-index: 9;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: var(--toolbar-background);
    color: var(--secondary-text);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.chat-transcript-copy-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-transcript-copy-button:hover {
    border-color: #4a4a4a;
    background: #252525;
    color: var(--primary-text);
}

.chat-transcript-copy-button:active {
    transform: translateY(1px);
}

.chat-transcript-copy-button:focus-visible {
    border-color: #5d9cff;
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.14), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.chat-transcript-copy-button.is-confirmed {
    border-color: rgba(95, 206, 130, 0.7);
    color: #a6f4bc;
}

/* ===========================================
   Chat action strip, resource tools, and emojis
   =========================================== */

.chat-action-strip {
    position: relative;
    z-index: 4;
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.12);
}

.chat-tool-bar {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
}

.chat-tool-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: var(--toolbar-background);
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

    .chat-tool-button:hover {
        border-color: #4a4a4a;
        background: #252525;
        color: var(--primary-text);
    }

    .chat-tool-button:active {
        transform: translateY(1px);
    }

    .chat-tool-button:focus-visible {
        border-color: #5d9cff;
        box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.14);
    }

    .chat-tool-button.is-active,
    .chat-tool-button[aria-pressed="true"] {
        border-color: #5d9cff;
        background: rgba(46, 116, 187, 0.24);
        color: #ffffff;
        box-shadow: inset 0 0 0 1px rgba(93, 156, 255, 0.18);
    }

    .chat-tool-button.is-speaking {
        border-color: #42b866;
        background: rgba(46, 160, 85, 0.3);
        color: #a6f4bc;
        box-shadow: inset 0 0 0 1px rgba(98, 221, 133, 0.22);
    }

    .chat-tool-button.is-speech-stopped {
        border-color: #d95555;
        background: rgba(194, 52, 52, 0.32);
        color: #ffaaaa;
        box-shadow: inset 0 0 0 1px rgba(255, 118, 118, 0.18);
        transition: background-color 1.5s ease, border-color 1.5s ease, color 1.5s ease, box-shadow 1.5s ease;
    }

.chat-emoji-region {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    margin-left: auto;
}

.chat-emoji-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.chat-emoji-favorites {
    display: grid;
    grid-template-columns: repeat(5, 34px);
    gap: 6px;
}

.chat-emoji-button,
.chat-emoji-expand-button,
.chat-emoji-collapse-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: var(--toolbar-background);
    color: var(--primary-text);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.chat-emoji-expand-button,
.chat-emoji-collapse-button {
    font-size: 14px;
    font-weight: 700;
}

    .chat-emoji-button:hover,
    .chat-emoji-expand-button:hover,
    .chat-emoji-collapse-button:hover {
        border-color: #4a4a4a;
        background: #292929;
    }

    .chat-emoji-button:active,
    .chat-emoji-expand-button:active,
    .chat-emoji-collapse-button:active {
        transform: translateY(1px);
    }

    .chat-emoji-button:focus-visible,
    .chat-emoji-expand-button:focus-visible,
    .chat-emoji-collapse-button:focus-visible {
        border-color: #5d9cff;
        box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.14);
    }

.chat-emoji-button.is-current-favorite {
    border-color: rgba(93, 156, 255, 0.68);
    background: rgba(46, 116, 187, 0.2);
}

.chat-emoji-more {
    display: grid;
    grid-template-columns: repeat(10, 34px);
    gap: 6px;
    width: max-content;
    max-width: calc(100vw - 48px);
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #111111;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

    .chat-emoji-more.is-hidden {
        display: none;
    }

.chat-emoji-region.is-expanded {
    width: max-content;
    max-width: 100%;
}

    .chat-emoji-region.is-expanded .chat-emoji-bar {
        width: 100%;
    }

    .chat-emoji-region.is-expanded .chat-emoji-more {
        align-self: flex-end;
    }

.chat-emoji-collapse-button {
    display: none;
}

.chat-emoji-region.is-expanded .chat-emoji-collapse-button {
    display: inline-flex;
}

.chat-composer {
    position: relative;
    z-index: 10040;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 48px minmax(0, 1fr) 186px;
    align-items: start;
    gap: 8px;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.12);
}


.chat-image-upload-control {
    position: relative;
    width: 48px;
    height: 48px;
}

.chat-image-upload-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    background: #151515;
    color: var(--primary-text);
    font-size: 19px;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.chat-image-upload-button:hover {
    border-color: #5d9cff;
    background: #1b1b1b;
}

.chat-image-upload-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #5d9cff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-image-upload-button:focus-visible,
.chat-image-upload-button.is-drag-over,
.chat-composer textarea.is-drag-over {
    border-color: #5d9cff;
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.chat-image-upload-button.has-image {
    border-color: #5d9cff;
}

.chat-image-upload-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    display: none;
    min-width: 16px;
    height: 16px;
    box-sizing: border-box;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #5d9cff;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    box-shadow: 0 0 0 2px #151515;
}

.chat-image-upload-button.has-image .chat-image-upload-indicator {
    display: inline-flex;
}

.chat-image-remove-button {
    position: absolute;
    z-index: 3;
    top: -6px;
    left: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 2px solid #151515;
    border-radius: 50%;
    background: #d93636;
    color: #fff;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.chat-image-remove-button::before,
.chat-image-remove-button::after,
.chat-attachment-remove-item::before,
.chat-attachment-remove-item::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    border-radius: 1px;
    background: #ffffff;
    transform-origin: center;
}

.chat-image-remove-button::before,
.chat-attachment-remove-item::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.chat-image-remove-button::after,
.chat-attachment-remove-item::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.chat-image-remove-button.is-hidden {
    display: none;
}

.chat-image-remove-button:hover {
    background: #f04a4a;
    outline: none;
}

.chat-image-remove-button:focus-visible {
    background: #f04a4a;
    outline: 2px solid #5d9cff;
    outline-offset: 2px;
}

.chat-attachment-remove-overlay {
    position: fixed;
    z-index: 13000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 8, 8, 0.48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

.chat-attachment-remove-overlay.is-hidden {
    display: none;
}

.chat-attachment-remove-panel {
    width: min(92vw, 460px);
    max-height: min(76vh, 560px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--panel-background);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.chat-attachment-remove-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.chat-attachment-remove-header h2 {
    margin: 0;
    font-size: 17px;
}

.chat-attachment-remove-close-button {
    display: inline-flex;
    width: auto;
    height: auto;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
}

.chat-attachment-remove-close-button:hover,
.chat-attachment-remove-close-button:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
}

.chat-attachment-remove-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
    max-height: min(60vh, 440px);
    padding: 14px;
    overflow-y: auto;
}

.chat-attachment-remove-card {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.chat-attachment-remove-preview {
    position: relative;
    min-width: 0;
    aspect-ratio: 4 / 3;
}

.chat-attachment-remove-thumbnail,
.chat-attachment-document-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
}

.chat-attachment-remove-thumbnail {
    object-fit: cover;
}

.chat-attachment-document-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--secondary-text);
}

.chat-attachment-document-thumbnail svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-attachment-document-extension {
    max-width: calc(100% - 14px);
    overflow: hidden;
    color: var(--primary-text);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-attachment-remove-item {
    position: absolute;
    z-index: 2;
    top: -6px;
    left: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid var(--panel-background);
    border-radius: 50%;
    background: #d93636;
    color: #fff;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.chat-attachment-remove-item:hover {
    background: #f04a4a;
}

.chat-attachment-remove-item:focus-visible {
    outline: 2px solid #5d9cff;
    outline-offset: 2px;
}

.chat-attachment-remove-name {
    min-width: 0;
    overflow: hidden;
    color: var(--secondary-text);
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .chat-input-shell {
        position: relative;
        width: 100%;
        min-width: 0;
    }

    .chat-input-shell textarea {
        display: block;
    }

    .chat-context-meter {
        position: absolute;
        z-index: 2;
        right: 2px;
        bottom: 2px;
        left: 2px;
        height: 3px;
        overflow: hidden;
        border-radius: 0 0 8px 8px;
        background: rgba(255, 255, 255, 0.035);
        pointer-events: none;
    }

    .chat-context-meter-fill {
        display: block;
        width: 0%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #245f9b, #48a6ff);
        transition: width 180ms ease, background 160ms ease;
    }

    .chat-context-meter.is-warning .chat-context-meter-fill {
        background: linear-gradient(90deg, #8b5726, #cf8a42);
    }

    .chat-context-meter.is-critical .chat-context-meter-fill {
        background: linear-gradient(90deg, #7a2929, #c55252);
    }

    .chat-composer textarea {
        width: 100%;
        box-sizing: border-box;
        max-height: 180px;
        min-height: 48px;
        height: 48px;
        padding: 12px;
        overflow-y: auto;
        resize: none;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        outline: none;
        background: #151515;
        color: var(--primary-text);
        line-height: 1.35;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .chat-composer textarea::-webkit-scrollbar {
            display: none;
            width: 0;
            height: 0;
        }

        .chat-composer textarea:focus {
            border-color: #5d9cff;
            box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
        }


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chat-submit-control {
    position: relative;
    display: flex;
    flex: 0 0 148px;
    width: 148px;
    height: 48px;
    overflow: visible;
    border: 1px solid #5d9cff;
    border-radius: 10px;
    background: #2e74bb;
}

.chat-send-button,
.chat-mic-button,
.chat-mic-settings-button {
    box-sizing: border-box;
    margin: 0;
    border: 0;
    color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.chat-send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 3 1 0;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 9px 0 0 9px;
    background: #2e74bb;
    font-weight: 700;
}

    .chat-send-button:hover:not(:disabled) {
        background: #3582d1;
    }

    .chat-send-button:disabled {
        cursor: default;
        opacity: 0.42;
    }

.chat-mic-region {
    position: relative;
    display: flex;
    flex: 1 1 0;
    min-width: 36px;
    height: 46px;
    flex-direction: column;
    overflow: visible;
    border-left: 1px solid rgba(255, 255, 255, 0.34);
}

.chat-mic-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 27px;
    padding: 0;
    border-radius: 0 9px 0 0;
    background: #2e74bb;
    font-size: 16px;
    line-height: 1;
}

    .chat-mic-button:hover,
    .chat-mic-settings-button:hover {
        background: #3582d1;
    }

    .chat-mic-button.is-listening {
        background: #238a4b;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
        animation: chat-mic-pulse 1.15s ease-in-out infinite;
    }

    .chat-mic-button.is-transcribing {
        background: #8a6a23;
        cursor: wait;
        animation: chat-mic-pulse 0.8s ease-in-out infinite;
    }

.chat-mic-settings-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 17px;
    width: 100%;
    min-width: 0;
    height: 17px;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 0 0 9px 0;
    background: #245f9b;
    font-size: 10px;
    line-height: 1;
}

.chat-mic-device-menu {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 20050;
    width: 360px;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #202020;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
    color: var(--primary-text);
}

    .chat-mic-device-menu label {
        display: block;
        margin-bottom: 7px;
        font-size: 12px;
        font-weight: 700;
    }

    .chat-mic-device-menu select {
        width: 100%;
        padding: 8px 9px;
        border: 1px solid var(--border-color);
        border-radius: 7px;
        background: #151515;
        color: var(--primary-text);
    }

    .chat-mic-device-menu p {
        margin: 8px 0 0;
        color: var(--secondary-text);
        font-size: 11px;
        line-height: 1.35;
    }

@keyframes chat-mic-pulse {
    0%, 100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.28);
    }
}

.chat-send-button.is-warming-up {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.72;
}

.initialization-requirements {
    margin: 22px 0 0;
    padding-left: 22px;
    color: var(--secondary-text);
    text-align: left;
}

@media (max-width: 760px) {
    .initialization-panel {
        height: 100dvh;
        min-height: 100dvh;
    }

    .chat-panel {
        align-self: stretch;
        width: 100%;
        height: 70vh;
        min-height: 520px;
        margin: 0;
        border-radius: 14px;
    }

    .initialization-card {
        padding: 28px 22px;
    }

    .chat-messages {
        padding: 20px 14px;
    }

    .chat-action-strip {
        align-items: flex-start;
        gap: 10px;
        padding: 10px 12px;
    }

    .chat-tool-bar {
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .chat-tool-button {
        min-height: 32px;
        padding: 5px 8px;
    }

        .chat-tool-button span {
            display: none;
        }

    .chat-emoji-favorites {
        grid-template-columns: repeat(5, 32px);
        gap: 4px;
    }

    .chat-emoji-button,
    .chat-emoji-expand-button,
    .chat-emoji-collapse-button {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .chat-emoji-more {
        grid-template-columns: repeat(10, 32px);
        gap: 4px;
        max-width: calc(100vw - 24px);
        overflow-x: auto;
    }

    .chat-composer {
        gap: 7px;
        padding: 9px 10px 10px;
    }

    .chat-message {
        margin-bottom: 14px;
    }

    .chat-message-bubble,
    .chat-bubble,
    .chat-message-timestamp {
        width: 92%;
        max-width: none;
        padding: 12px 14px;
        border-radius: 13px;
    }

    .chat-message-collapse-button {
        min-width: 100px;
        min-height: 33px;
    }
}


/* Phase 5: clickable wizard navigation */
.wizard-progress-step:hover,
.wizard-progress-step:focus-visible {
    color: var(--primary-text);
}

.wizard-progress-step:focus-visible {
    outline: 2px solid #5d9cff;
    outline-offset: 5px;
    border-radius: 8px;
}

@media (max-width: 720px) {
    .image-viewer-overlay {
        padding: 12px;
    }

    .image-viewer-panel {
        width: 100%;
        max-height: 96vh;
        border-radius: 14px;
    }

    .image-viewer-body {
        padding: 10px;
    }

    .image-viewer-image {
        max-height: calc(96vh - 124px);
    }
}



/* ===========================================
   Undocked avatar subtitles
   =========================================== */

.avatar-subtitles-tool-button {
    display: none;
}

.chat-panel.is-avatar-display-mode .avatar-subtitles-tool-button {
    display: inline-flex;
}

.avatar-subtitle-overlay {
    --avatar-subtitle-font-size: clamp(12px, 1.12vw, 18px);
    --avatar-subtitle-line-box: 1.18em;
    --avatar-subtitle-row-step: 1.42em;
    --avatar-subtitle-row-shift: -1.42em;
    --avatar-subtitle-stage-height: 2.60em;
    --avatar-subtitle-incoming-top: 2.84em;
    --avatar-subtitle-roll-duration: 0.30s;
    --avatar-subtitle-fade-duration: 0.36s;
    font-size: var(--avatar-subtitle-font-size);
    position: absolute;
    z-index: 19;
    left: 50%;
    bottom: 46px;
    width: min(86%, 900px);
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.38s ease;
}

.chat-panel.is-avatar-display-mode .avatar-subtitle-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.avatar-processing-status {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    font-size: clamp(12px, 1.12vw, 18px);
    font-weight: 600;
    line-height: 1.18;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.98),
        0 0 8px rgba(0, 0, 0, 0.92),
        0 0 18px rgba(0, 0, 0, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.chat-panel.is-avatar-display-mode .avatar-processing-status.is-visible {
    opacity: 1;
    visibility: visible;
}

.avatar-processing-status .chat-request-spinner {
    border-color: rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    will-change: transform;
}

.chat-panel.is-avatar-display-mode .avatar-subtitle-overlay.is-visible.is-fading {
    opacity: 0;
}

.avatar-subtitle-overlay.is-fading-top .avatar-subtitle-line-top {
    opacity: 0;
    transition: opacity var(--avatar-subtitle-fade-duration) ease;
}

.avatar-subtitle-overlay.is-fading-bottom .avatar-subtitle-line-bottom {
    opacity: 0;
    transition: opacity var(--avatar-subtitle-fade-duration) ease;
}

.avatar-subtitle-stage {
    position: relative;
    height: var(--avatar-subtitle-stage-height);
    overflow: hidden;
    font-size: inherit;
}

.avatar-subtitle-line {
    position: absolute;
    left: 0;
    width: 100%;
    min-width: 0;
    height: var(--avatar-subtitle-line-box);
    overflow: hidden;
    color: #ffffff;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.18;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.98),
        0 0 8px rgba(0, 0, 0, 0.92),
        0 0 18px rgba(0, 0, 0, 0.72);
    opacity: 1;
    transform: translateY(0);
    transition:
        transform var(--avatar-subtitle-roll-duration) ease,
        opacity var(--avatar-subtitle-roll-duration) ease;
    will-change: transform, opacity;
}

.avatar-subtitle-line-top {
    top: 0;
}

.avatar-subtitle-line-bottom {
    top: var(--avatar-subtitle-row-step);
}

.avatar-subtitle-line-incoming {
    top: var(--avatar-subtitle-incoming-top);
    opacity: 0;
}

.avatar-subtitle-overlay.is-rolling .avatar-subtitle-line-top {
    opacity: 0;
    transform: translateY(var(--avatar-subtitle-row-shift));
}

.avatar-subtitle-overlay.is-rolling .avatar-subtitle-line-bottom,
.avatar-subtitle-overlay.is-rolling .avatar-subtitle-line-incoming {
    transform: translateY(var(--avatar-subtitle-row-shift));
}

.avatar-subtitle-overlay.is-rolling .avatar-subtitle-line-incoming {
    opacity: 1;
}

.avatar-subtitle-overlay.is-resetting .avatar-subtitle-line {
    transition: none !important;
}

/* Auto Listen */
.chat-tool-button.is-auto-listening {
    border-color: #5d9cff;
    background: rgba(46, 116, 187, 0.24);
    color: #ffffff;
}

#autoVisionButton.is-auto-listening,
#autoVisionButton[aria-pressed="true"].is-auto-listening {
    border-color: #42b866;
    background: rgba(46, 160, 85, 0.3);
    color: #a6f4bc;
    box-shadow: inset 0 0 0 1px rgba(98, 221, 133, 0.22);
}

.chat-tool-button.is-auto-recording,
.chat-tool-button.is-auto-processing {
    border-color: #42b866;
    background: rgba(46, 160, 85, 0.3);
    color: #a6f4bc;
    box-shadow: inset 0 0 0 1px rgba(98, 221, 133, 0.22);
}

.chat-tool-button.is-auto-music {
    border-color: #a66cff;
    background: rgba(126, 67, 190, 0.32);
    color: #d9bcff;
    box-shadow: inset 0 0 0 1px rgba(179, 119, 255, 0.24);
}

.chat-tool-button.is-auto-recording,
.chat-tool-button.is-auto-processing {
    animation: none;
}

.chat-tool-button.is-auto-sent {
    border-color: #42b866;
    background: rgba(46, 160, 85, 0.3);
    color: #a6f4bc;
    box-shadow: inset 0 0 0 1px rgba(98, 221, 133, 0.22);
    transition: background-color 1.5s ease, border-color 1.5s ease, color 1.5s ease, box-shadow 1.5s ease;
}


/* Assets manager */
.sidebar-assets-entry {
    flex: 0 0 auto;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-assets-button {
    color: inherit;
}

.sidebar.is-collapsed .sidebar-assets-entry {
    display: none;
}

.chat-tool-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.chat-tool-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-tool-row-prompts {
    flex-wrap: wrap;
}

.account-overlay {
    position: fixed;
    inset: 0;
    z-index: 10920;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(8, 8, 8, 0.48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    animation: assets-overlay-in 180ms ease both;
}

.account-overlay.is-closing {
    animation: assets-overlay-out 180ms ease both;
    pointer-events: none;
}

.account-panel {
    display: flex;
    width: min(860px, 96vw);
    max-height: min(860px, 92vh);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
    animation: assets-panel-in 180ms ease both;
}

.account-overlay.is-closing .account-panel {
    animation: assets-panel-out 180ms ease both;
}

.account-header {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px 14px 22px;
    border-bottom: 1px solid var(--border-color);
}

.account-header h2 {
    margin: 0;
    font-size: 20px;
}

.account-header p {
    margin: 5px 0 0;
    color: var(--secondary-text);
    font-size: 12px;
}

.account-close-button {
    display: inline-flex;
    width: auto;
    height: auto;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--primary-text);
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
}

.account-close-button:hover,
.account-close-button:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
}

.account-body {
    display: grid;
    gap: 18px;
    min-height: 0;
    padding: 20px 22px 24px;
    overflow: auto;
}

.account-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.025);
    background: #141414;
}

.account-tab-button {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: transparent;
    color: var(--muted-text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.account-tab-button:hover:not(:disabled),
.account-tab-button:focus-visible {
    color: var(--primary-text);
    background: rgba(255, 255, 255, 0.035);
}

.account-tab-button.is-active {
    border-color: var(--border-color);
    background: #1a1a1a;
    color: #ffffff;
}

.account-tab-panel {
    display: grid;
    gap: 18px;
}

.account-tab-panel[hidden] {
    display: none !important;
}

.account-playlist-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.account-playlist-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.account-playlist-new-button,
.account-playlist-clear-most-button {
    flex: 0 0 auto;
}

.account-playlist-list {
    display: grid;
    gap: 14px;
}

.account-playlist-card {
    display: grid;
    gap: 13px;
    padding: 14px;
    border: 1px solid #303030;
    border-radius: 11px;
    background: #101010;
}

.account-playlist-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.account-playlist-name-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.account-playlist-name-field input,
.account-playlist-add-song input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background: #0c0c0c;
    color: var(--primary-text);
    font: inherit;
}

.account-playlist-name-field input:focus,
.account-playlist-add-song input:focus {
    border-color: rgba(93, 156, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.account-playlist-card-actions,
.account-playlist-song-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-playlist-action-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #1e1e1e;
    color: var(--secondary-text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.account-playlist-action-button:hover:not(:disabled) {
    background: #292929;
    color: #fff;
}

.account-playlist-song-list {
    display: grid;
    gap: 7px;
}

.account-playlist-song-list.is-collapsed {
    display: none;
}

.account-playlist-collapse-row {
    display: flex;
    justify-content: center;
    min-height: 22px;
}

.account-playlist-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-height: 22px;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--secondary-text);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.account-playlist-collapse-toggle:hover,
.account-playlist-collapse-toggle:focus-visible {
    background: transparent;
    color: var(--primary-text);
}

.account-playlist-song-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 7px 8px 7px 11px;
    border: 1px solid #292929;
    border-radius: 8px;
    background: #151515;
}

.account-playlist-song-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.account-playlist-song-text strong,
.account-playlist-song-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-playlist-song-text strong {
    color: var(--primary-text);
    font-size: 13px;
}

.account-playlist-song-text span {
    color: var(--muted-text);
    font-size: 11px;
}

.account-playlist-song-empty,
.account-playlist-empty {
    padding: 14px;
    border: 1px dashed #333;
    border-radius: 9px;
    color: var(--muted-text);
    font-size: 12px;
    text-align: center;
}

.account-playlist-add-song {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.account-playlist-includes {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #292929;
    border-radius: 9px;
    background: #121212;
}

.account-playlist-includes-heading {
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.account-playlist-includes-list {
    display: grid;
    gap: 7px;
}

.account-playlist-includes-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 8px 6px 11px;
    border: 1px solid #292929;
    border-radius: 8px;
    background: #171717;
}

.account-playlist-includes-row strong {
    min-width: 0;
    overflow: hidden;
    color: var(--primary-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-playlist-includes-empty {
    padding: 8px 10px;
    color: var(--muted-text);
    font-size: 12px;
}

.account-playlist-add-included {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.account-playlist-add-included select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 34px 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background: #0c0c0c;
    color: var(--primary-text);
    font: inherit;
}

.account-playlist-add-included select:focus {
    border-color: rgba(93, 156, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.account-status {
    padding: 11px 13px;
    border: 1px solid rgba(93, 156, 255, 0.32);
    border-radius: 10px;
    background: rgba(93, 156, 255, 0.1);
    color: #b9d8ff;
    font-size: 13px;
    line-height: 1.45;
}

.account-status.is-error {
    border-color: rgba(238, 104, 104, 0.42);
    background: rgba(128, 31, 31, 0.14);
    color: #ffc1c1;
}

.account-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #151515;
}

.account-section-heading h3 {
    margin: 0;
    font-size: 15px;
}

.account-section-heading p {
    margin: 5px 0 0;
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.45;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-name-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.account-field-full {
    grid-column: 1 / -1;
}

.account-m365-tenant-field {
    align-self: start;
}

.account-field label {
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.account-field input,
.account-field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: #101010;
    color: var(--primary-text);
    font: inherit;
}

.account-field input:focus,
.account-field select:focus {
    border-color: rgba(93, 156, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.account-field input:disabled,
.account-field select:disabled {
    cursor: wait;
    opacity: 0.65;
}

.account-field input[type="date"] {
    color-scheme: dark;
}

.account-time-zone-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.account-avatar-editor {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.account-avatar-preview-wrap {
    position: relative;
    width: 88px;
    height: 88px;
}

.account-avatar-delete {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 2;
}

.account-avatar-preview {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #101010;
    color: var(--primary-text);
    font-size: 25px;
    font-weight: 800;
}

.account-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-avatar-upload-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.account-avatar-upload-control input[type="file"] {
    min-width: 0;
    min-height: 44px;
    padding: 6px 8px;
    cursor: pointer;
}

.account-avatar-field input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    padding: 0 12px;
    border: 1px solid #3c5f8d;
    border-radius: 7px;
    background: #193b63;
    color: #f4f8ff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-avatar-field input[type="file"]::file-selector-button:hover {
    background: #214d7f;
}

.account-avatar-help {
    color: var(--muted-text);
    font-size: 11px;
    line-height: 1.4;
}

.account-secondary-action {
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #202020;
    color: var(--primary-text);
    font-weight: 700;
    cursor: pointer;
}

.account-secondary-action:hover:not(:disabled) {
    background: #292929;
}

.account-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    background: #141414;
}

.account-button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}

.account-button:disabled,
.account-secondary-action:disabled {
    cursor: default;
    opacity: 0.55;
}

.account-button-secondary {
    border: 1px solid var(--border-color);
    background: #202020;
    color: var(--primary-text);
}

.account-button-secondary:hover:not(:disabled) {
    background: #292929;
}

.account-button-primary {
    border: 1px solid rgba(103, 166, 230, 0.28);
    background: #2f74bb;
    color: #ffffff;
}

.account-button-primary:hover:not(:disabled) {
    background: #3582d1;
}

.assets-overlay {
    position: fixed;
    inset: 0;
    z-index: 10900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(8,8,8,.48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    animation: assets-overlay-in 180ms ease both;
}

.assets-overlay.is-closing {
    animation: assets-overlay-out 180ms ease both;
    pointer-events: none;
}

.assets-panel {
    animation: assets-panel-in 180ms ease both;
}

.assets-overlay.is-closing .assets-panel {
    animation: assets-panel-out 180ms ease both;
}

@keyframes assets-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes assets-overlay-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes assets-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes assets-panel-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.992);
    }
}

.assets-panel {
    display: flex;
    width: min(1180px,96vw);
    height: min(780px,92vh);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
    box-shadow: 0 28px 90px rgba(0,0,0,.48);
}

.assets-header {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

    .assets-header h2 {
        margin: 0;
        font-size: 18px;
    }

    .assets-header p {
        margin: 4px 0 0;
        color: var(--secondary-text);
        font-size: 12px;
    }

.assets-close-button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #151515;
    color: var(--primary-text);
    font-size: 28px;
    cursor: pointer;
}

.assets-layout {
    display: grid;
    grid-template-columns: 220px minmax(0,1fr);
    min-height: 0;
    flex: 1 1 auto;
}

.assets-filter-panel {
    padding: 20px 16px;
    overflow: auto;
    border-right: 1px solid var(--border-color);
    background: #151515;
}

    .assets-filter-panel h3 {
        margin: 0 0 10px;
        font-size: 13px;
    }

.assets-filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 2px;
    color: var(--secondary-text);
    cursor: pointer;
}

    .assets-filter-option input, .asset-select-checkbox, .assets-select-all input {
        accent-color: #5d9cff;
    }

.assets-image-subfilters {
    padding-left: 20px;
}

.assets-filter-suboption {
    padding-top: 5px;
    padding-bottom: 5px;
}

.assets-filter-divider {
    height: 1px;
    margin: 16px 0;
    background: var(--border-color);
}

.assets-danger-action {
    width: 100%;
    margin: 0 0 8px;
    padding: 8px 9px;
    border: 1px solid #6d3333;
    border-radius: 8px;
    background: #1b1b1b;
    color: #ffaaaa;
    cursor: pointer;
    text-align: center;
}

    .assets-danger-action:hover:not(:disabled) {
        background: #242424;
    }

    .assets-danger-action:disabled {
        opacity: .42;
        cursor: not-allowed;
    }

.assets-content {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

.assets-toolbar {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.assets-select-all {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: 4px;
    white-space: nowrap;
    color: var(--secondary-text);
}

.assets-status {
    min-height: 22px;
    padding: 10px 16px 0;
    color: var(--secondary-text);
    font-size: 13px;
}

.assets-list {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding: 6px 16px 18px;
}

.asset-row {
    display: grid;
    grid-template-columns: auto 82px minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-color);
}

.asset-thumbnail-button {
    width: 82px;
    height: 62px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #0d0d0d;
    cursor: pointer;
}

.asset-thumbnail-button.asset-document-thumbnail-button {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

    .asset-thumbnail-button.asset-document-thumbnail-button:hover .asset-document-thumbnail,
    .asset-thumbnail-button.asset-document-thumbnail-button:focus-visible .asset-document-thumbnail {
        transform: scale(1.04);
        opacity: 1;
    }

.asset-workspace-selection-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.asset-thumbnail-button.asset-workspace-thumbnail-button {
    cursor: default;
}

.asset-thumbnail-button.asset-workspace-thumbnail-button:hover .asset-workspace-thumbnail,
.asset-thumbnail-button.asset-workspace-thumbnail-button:focus-visible .asset-workspace-thumbnail {
    transform: none;
}

.asset-workspace-thumbnail {
    color: #4f9cff;
}

.asset-media-thumbnail {
    display: flex;
    width: 54px;
    height: 54px;
    margin: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    opacity: 0.9;
}

.asset-media-thumbnail svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.asset-media-thumbnail span {
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.asset-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.asset-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

    .asset-info strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
    }

    .asset-info span {
        color: var(--secondary-text);
        font-size: 12px;
    }

    .asset-info .asset-retention {
        color: #c9a86a;
        font-size: 11px;
    }

.asset-row-actions {
    display: flex;
    gap: 8px;
}

.asset-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #1b1b1b;
    color: var(--primary-text);
    text-decoration: none;
    cursor: pointer;
    font-size: 12px;
}

.asset-action-danger {
    border-color: #6d3333;
    color: #ffaaaa;
}

body.assets-open,
body.account-open {
    overflow: hidden;
}

@media (max-width:760px) {
    .assets-overlay {
        padding: 10px;
    }

    .assets-panel {
        width: 100%;
        height: 96vh;
        border-radius: 14px;
    }

    .assets-layout {
        grid-template-columns: 1fr;
    }

    .assets-filter-panel {
        display: grid;
        grid-template-columns: repeat(3,1fr);
        gap: 0 8px;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

        .assets-filter-panel h3,
        .assets-filter-divider,
        .assets-danger-action {
            grid-column: 1 / -1;
        }

        .assets-filter-panel h3 {
            margin-top: 8px;
        }

    .assets-toolbar {
        display: flex;
    }

    .asset-row {
        grid-template-columns: auto 64px minmax(0,1fr);
    }

    .asset-thumbnail-button {
        width: 64px;
        height: 54px;
    }

    .asset-row-actions {
        grid-column: 2 / -1;
    }

    .chat-tool-row {
        overflow-x: auto;
        max-width: 100%;
        padding-bottom: 2px;
    }
}

.chat-messages.is-smooth-scrolling {
    scroll-behavior: smooth;
}

/* Web email confirmation card */
.email-draft-bubble {
    width: min(100%, 720px);
}

.email-draft-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(127, 127, 127, 0.35);
    border-radius: 14px;
    background: rgba(127, 127, 127, 0.08);
}

.email-draft-title {
    margin: 0;
    font-size: 1.05rem;
}

.email-draft-field {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.email-draft-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.email-draft-actions button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 9px;
    cursor: pointer;
}

.email-draft-send {
    border: 1px solid transparent;
    background: var(--accent-color, #2563eb);
    color: #fff;
}

.email-draft-cancel {
    border: 1px solid rgba(127, 127, 127, 0.45);
    background: transparent;
    color: inherit;
}

.email-draft-actions.is-success {
    font-weight: 600;
}

@media (max-width: 600px) {
    .email-draft-field {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}


/* Registration and maintenance pages */
.login-secondary-action {
    margin-top: 18px;
    color: var(--secondary-text);
    font-size: 13px;
    text-align: center;
}

.login-secondary-action a,
.maintenance-login-link {
    color: #8cc5ff;
    text-decoration: none;
}

.login-secondary-action a:hover {
    text-decoration: underline;
}

.login-message.is-success {
    border-color: rgba(95, 206, 130, 0.38);
    background: rgba(95, 206, 130, 0.09);
    color: #8ce1a7;
}

.register-shell {
    align-items: flex-start;
    padding-top: 48px;
    padding-bottom: 48px;
}

.register-panel {
    width: min(700px, 100%);
}

.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.register-span-two {
    grid-column: 1 / -1;
}

.register-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 18px;
    color: var(--secondary-text);
    font-size: 13px;
    line-height: 1.45;
}

.register-consent input {
    margin-top: 2px;
}

/* Local CAPTCHA, registration completion, and email verification */
.registration-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.captcha-card {
    margin: 0 0 18px;
    padding: 15px;
    border: 1px solid #323a48;
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(93, 156, 255, 0.06), rgba(255, 255, 255, 0.012)), #12151b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.captcha-card[hidden],
.registration-complete[hidden],
.captcha-image[hidden],
.login-resend-verification-button[hidden],
.verification-login-link[hidden],
.verification-working[hidden] {
    display: none !important;
}

.captcha-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.captcha-title {
    color: var(--primary-text);
    font-size: 14px;
    font-weight: 700;
}

.captcha-copy {
    margin-top: 4px;
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.4;
}

.captcha-refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #3c4656;
    border-radius: 9px;
    background: #1b2029;
    color: #c8d0dc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.captcha-refresh-button:hover:not(:disabled) {
    border-color: #5d9cff;
    background: #222a36;
    color: #ffffff;
}

.captcha-refresh-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.captcha-image-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 340px);
    min-height: 96px;
    margin: 0 auto 13px;
    overflow: hidden;
    border: 1px solid #303a49;
    border-radius: 12px;
    background: #0d1118;
}

.captcha-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 92px;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.captcha-loading {
    padding: 20px;
    color: var(--muted-text);
    font-size: 12px;
    text-align: center;
}

.captcha-loading[hidden] {
    display: none;
}

.captcha-answer-field {
    width: min(100%, 340px);
    margin: 0 auto;
}

.captcha-answer-field input {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-family: Consolas, "Courier New", monospace;
    font-size: 18px;
    font-weight: 700;
}

.login-captcha-card {
    margin-top: 2px;
}

.login-resend-verification-button {
    width: 100%;
    min-height: 42px;
    margin: -4px 0 14px;
    padding: 0 14px;
    border: 1px solid #3a4657;
    border-radius: 10px;
    background: #181d25;
    color: #8cc5ff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.login-resend-verification-button:hover:not(:disabled) {
    border-color: #5d9cff;
    background: #202733;
    color: #ffffff;
}

.login-resend-verification-button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.registration-complete {
    padding: 10px 0 2px;
    text-align: center;
}

.registration-complete-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border: 1px solid rgba(93, 156, 255, 0.48);
    border-radius: 18px;
    background: rgba(46, 116, 187, 0.16);
    color: #8cc5ff;
    font-size: 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.registration-complete.is-warning .registration-complete-icon {
    border-color: rgba(255, 180, 93, 0.5);
    background: rgba(255, 180, 93, 0.1);
    color: #ffc27c;
}

.registration-complete h2 {
    margin: 0;
    color: var(--primary-text);
    font-size: 25px;
}

.registration-complete p {
    margin: 12px auto 0;
    max-width: 520px;
    color: var(--secondary-text);
    font-size: 14px;
    line-height: 1.6;
}

.registration-email-address {
    margin: 17px auto 20px;
    padding: 11px 13px;
    border: 1px solid #303844;
    border-radius: 10px;
    background: #13171d;
    color: #d9e8fb;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.registration-resend-button {
    margin-top: 0;
}

.registration-complete .login-message {
    margin-top: 16px;
    text-align: left;
}

.verification-panel {
    width: min(480px, 100%);
}

.verification-heading {
    padding-bottom: 20px;
}

.verification-working {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 72px;
    margin-bottom: 18px;
    padding: 15px;
    border: 1px solid #303844;
    border-radius: 12px;
    background: #13171d;
    color: var(--secondary-text);
    font-size: 13px;
}

.verification-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: #5d9cff;
    border-radius: 50%;
    animation: verification-spinner-rotation 0.75s linear infinite;
}

.verification-login-link {
    text-decoration: none;
}

@keyframes verification-spinner-rotation {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 520px) {
    .captcha-header {
        align-items: stretch;
        flex-direction: column;
    }

    .captcha-refresh-button {
        align-self: flex-end;
    }
}

.maintenance-state {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: #151515;
    color: var(--secondary-text);
    font-size: 13px;
}

.maintenance-pulse,
.maintenance-footer-indicator {
    display: inline-block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffb45d;
    box-shadow: 0 0 10px rgba(255, 180, 93, 0.45);
}

.maintenance-pulse {
    animation: maintenance-pulse 1.1s ease-in-out infinite;
}

.maintenance-login-link {
    text-decoration: none;
}

@keyframes maintenance-pulse {
    0%, 100% { opacity: 0.42; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.18); }
}

@media (max-width: 620px) {
    .register-grid {
        grid-template-columns: 1fr;
    }

    .register-span-two {
        grid-column: auto;
    }
}


.chat-tool-tag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    margin: 0 0.08em;
    vertical-align: -0.08em;
    font-size: 1.05em;
    line-height: 1;
    cursor: default;
}


/* Safe rich-text formatting for assistant chat messages. */
.chat-message.assistant .chat-bubble > p,
.generated-image-caption > p {
    margin: 0 0 0.9em;
}

.chat-message.assistant .chat-bubble > p:last-child,
.generated-image-caption > p:last-child {
    margin-bottom: 0;
}

.chat-message.assistant .chat-bubble h1,
.chat-message.assistant .chat-bubble h2,
.chat-message.assistant .chat-bubble h3,
.chat-message.assistant .chat-bubble h4,
.chat-message.assistant .chat-bubble h5,
.chat-message.assistant .chat-bubble h6,
.generated-image-caption h1,
.generated-image-caption h2,
.generated-image-caption h3,
.generated-image-caption h4,
.generated-image-caption h5,
.generated-image-caption h6 {
    margin: 1.05em 0 0.45em;
    color: var(--primary-text);
    line-height: 1.25;
}

.chat-message.assistant .chat-bubble h1:first-child,
.chat-message.assistant .chat-bubble h2:first-child,
.chat-message.assistant .chat-bubble h3:first-child,
.generated-image-caption h1:first-child,
.generated-image-caption h2:first-child,
.generated-image-caption h3:first-child {
    margin-top: 0;
}

.chat-message.assistant .chat-bubble h1 { font-size: 1.38em; }
.chat-message.assistant .chat-bubble h2 { font-size: 1.24em; }
.chat-message.assistant .chat-bubble h3 { font-size: 1.12em; }
.chat-message.assistant .chat-bubble h4,
.chat-message.assistant .chat-bubble h5,
.chat-message.assistant .chat-bubble h6 { font-size: 1em; }

.chat-message.assistant .chat-bubble ul,
.chat-message.assistant .chat-bubble ol,
.generated-image-caption ul,
.generated-image-caption ol {
    margin: 0.55em 0 0.9em;
    padding-left: 1.55em;
    white-space: normal;
}

.chat-message.assistant .chat-bubble li,
.generated-image-caption li {
    margin: 0.25em 0;
}

.chat-message.assistant .chat-bubble blockquote,
.generated-image-caption blockquote {
    margin: 0.75em 0;
    padding: 0.15em 0 0.15em 0.85em;
    border-left: 3px solid rgba(93, 156, 255, 0.62);
    color: var(--secondary-text);
}

.chat-message.assistant .chat-bubble hr,
.generated-image-caption hr {
    margin: 1em 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.chat-narration {
    color: rgba(184, 216, 255, 0.9);
    font-style: italic;
}

.chat-inline-code {
    padding: 0.13em 0.36em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.055);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
    white-space: break-spaces;
}

.chat-code-block {
    position: relative;
    margin: 0.85em 0;
    padding: 13px 15px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: #0f0f0f;
    white-space: pre;
}

.chat-code-block[data-language]:not([data-language=""]) {
    padding-top: 30px;
}

.chat-code-block[data-language]:not([data-language=""])::before {
    content: attr(data-language);
    position: absolute;
    top: 7px;
    right: 10px;
    color: var(--muted-text);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.chat-code-block code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
    line-height: 1.5;
}

.chat-citation-number {
    display: inline;
    color: #8dbdff;
    font-weight: 700;
    white-space: nowrap;
}

.chat-message.user .chat-bubble-actions {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.chat-message.user .chat-bubble-action-button {
    color: rgba(255, 255, 255, 0.88);
}

.chat-message.user .chat-bubble-action-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
}

.chat-message.user .chat-user-webcam-source {
    color: rgba(255, 255, 255, 0.88);
}

.chat-message.user .chat-user-webcam-source:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
}

.chat-message.user .chat-user-webcam-source.is-active-evidence {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.chat-message.user .chat-user-webcam-source-panel {
    color: rgba(255, 255, 255, 0.88);
}

/* Per-response memory and history evidence */
.chat-context-evidence-button {
    color: #5d9cff;
}

.chat-context-evidence-button.is-active-evidence {
    background: rgba(93, 156, 255, 0.18);
    color: #a7c9ff;
    box-shadow: inset 0 0 0 1px rgba(93, 156, 255, 0.32);
}

.chat-youtube-evidence-button {
    color: #5d9cff;
}

.chat-youtube-evidence-button.is-active-evidence {
    background: rgba(93, 156, 255, 0.18);
    color: #a7c9ff;
    box-shadow: inset 0 0 0 1px rgba(93, 156, 255, 0.32);
}

.chat-context-evidence-panel {
    flex: 0 0 100%;
    width: 100%;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.chat-context-evidence-panel[data-evidence-kind="youtube"] {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 6px;
}

.chat-context-evidence-heading {
    margin-bottom: 6px;
    color: #82b3ff;
    font-weight: 650;
}

.chat-web-evidence-panel {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 6px;
}

.chat-web-evidence-query {
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 0.8rem;
}

.chat-web-evidence-link {
    color: #82b3ff;
    text-decoration: none;
}

.chat-web-evidence-link:hover,
.chat-web-evidence-link:focus-visible {
    color: #b8d3ff;
    text-decoration: underline;
}

.chat-web-evidence-url {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.58);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.chat-web-evidence-divider {
    height: 1px;
    margin: 14px 0 0;
    background: rgba(130, 179, 255, 0.2);
}

.chat-context-evidence-section-heading {
    margin: 14px 0 6px;
    color: #82b3ff;
    font-weight: 650;
}

.chat-context-evidence-heading + .chat-context-evidence-section-heading {
    margin-top: 0;
}

.chat-context-evidence-section-list {
    margin-bottom: 0;
}

.chat-context-evidence-list {
    margin: 0;
    padding-left: 20px;
}

.chat-context-evidence-list li + li {
    margin-top: 7px;
}

.chat-context-evidence-text {
    white-space: pre-wrap;
}

.chat-wardrobe-change-table {
    display: grid;
    gap: 6px;
    width: 100%;
}

.chat-wardrobe-change-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 5px;
}

.chat-wardrobe-change-slot {
    color: #82b3ff;
    font-weight: 650;
}

.chat-wardrobe-change-item {
    min-width: 0;
    overflow-wrap: anywhere;
}

.chat-wardrobe-change-arrow {
    color: #5d9cff;
    font-weight: 700;
}

.chat-memory-forget,
.chat-memory-forget-choice {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5d9cff;
    font: inherit;
    cursor: pointer;
}

.chat-memory-forget:hover,
.chat-memory-forget-choice:hover {
    color: #a7c9ff;
    text-decoration: underline;
}

.chat-memory-forget-confirmation {
    white-space: nowrap;
}

.chat-memory-forget-choice:disabled {
    cursor: wait;
    opacity: 0.6;
}

.chat-bubble { position: relative; }
.chat-message-delete {
    flex: 0 0 auto;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
}
.chat-message-delete-confirmation {
    display: inline-flex;
    flex: 1 1 360px;
    align-items: center;
    align-self: center;
    min-height: 32px;
    margin-left: 4px;
    font-size: 12px;
    color: var(--muted-text);
}
.chat-message-delete-confirmation button {
    border: 0;
    background: transparent;
    color: #4da3ff;
    cursor: pointer;
    padding: 0 2px;
    font: inherit;
}
.chat-message.user .chat-message-delete-confirmation {
    color: rgba(255, 255, 255, 0.78);
}
.chat-message.user .chat-message-delete-confirmation button {
    color: #ffffff;
}


@media (max-width: 760px) {
    .avatar-display-mode-button {
        display: none;
    }
}


/* Account password layout and active-assistant NSFW label */
.assistant-select-shell {
    position: relative;
}

.assistant-select-shell .assistant-select {
    color: transparent;
    padding-right: 74px;
}

.assistant-select-shell .assistant-select option {
    color: var(--primary-text);
    background: #1b1b1b;
}

.assistant-select-shell::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--primary-text);
    border-bottom: 2px solid var(--primary-text);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.assistant-select-display {
    position: absolute;
    inset: 0 74px 0 16px;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.assistant-select-display-name {
    overflow: hidden;
    color: var(--primary-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-select-nsfw {
    position: static;
    flex: 0 0 auto;
    transform: none;
    color: #ff5f63;
    font-weight: 700;
}

/* Asset share controls sit beside the existing check/download actions. */
.assistant-asset-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 3px;
    border: 1px solid rgba(116, 198, 255, 0.55);
    border-radius: 50%;
    background: rgba(33, 113, 174, 0.22);
    color: #83c8f5;
    cursor: pointer;
}

.assistant-asset-share-button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.assistant-asset-share-button:hover {
    border-color: rgba(116, 198, 255, 0.85);
    background: rgba(33, 113, 174, 0.36);
    color: #dff2ff;
}

.assistant-asset-share-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.assistant-asset-share-button[hidden] {
    display: none;
}

/* Wardrobe rows use the same share glyph as Avatar, but their action buttons are square. */
.assistant-wardrobe-share-button {
    width: 27px;
    height: 27px;
    padding: 4px;
    border-radius: 7px;
}

.assistant-wardrobe-share-button svg {
    width: 15px;
    height: 15px;
}

/* Match the wardrobe download controls exactly. */
.assistant-clothing-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(88, 214, 141, 0.62);
    border-radius: 50%;
    background: rgba(34, 109, 67, 0.22);
    color: #58d68d;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.assistant-clothing-download:hover {
    border-color: #58d68d;
    background: rgba(42, 139, 83, 0.36);
    color: #d8ffe7;
}

.assistant-clothing-download:disabled {
    cursor: wait;
    opacity: 0.55;
}

.assistant-clothing-download[hidden] {
    display: none;
}

.account-password-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-password-action-field {
    display: grid;
    align-content: end;
    padding-top: 19px;
}

.account-password-action-field .account-secondary-action {
    width: 100%;
    height: 42px;
    min-height: 42px;
}

/* Keep browser autofill from painting the current-password field light. */
.account-field input:-webkit-autofill,
.account-field input:-webkit-autofill:hover,
.account-field input:-webkit-autofill:focus,
.account-field input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--primary-text);
    -webkit-box-shadow: 0 0 0 1000px #101010 inset;
    box-shadow: 0 0 0 1000px #101010 inset;
    caret-color: var(--primary-text);
    transition: background-color 9999s ease-out 0s;
}

.account-footer {
    justify-content: space-between;
}

@media (max-width: 700px) {
    .account-password-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-password-action-field {
        padding-top: 0;
    }
}


.chat-mic-settings-divider {
    height: 1px;
    margin: 12px 0;
    background: var(--border-color);
}

.chat-mic-checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 0 !important;
    cursor: pointer;
}

    .chat-mic-checkbox-row input {
        margin: 0;
    }

.chat-mic-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}

    .chat-mic-settings-grid label {
        margin: 0;
        color: var(--secondary-text);
        font-size: 11px;
        font-weight: 600;
    }

    .chat-mic-settings-grid .chat-mic-number-control {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        width: 100%;
        min-height: 34px;
        margin-top: 5px;
        border: 1px solid var(--border-color);
        border-radius: 7px;
        background: #151515;
        overflow: hidden;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

        .chat-mic-settings-grid .chat-mic-number-control:focus-within {
            border-color: #5d9cff;
            box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
        }

        .chat-mic-settings-grid .chat-mic-number-control input {
            width: 100%;
            min-width: 0;
            min-height: 32px;
            margin: 0;
            padding: 0 6px;
            border: 0;
            border-radius: 0;
            outline: none;
            background: transparent;
            color: var(--primary-text);
            text-align: center;
            box-shadow: none;
            box-sizing: border-box;
            appearance: textfield;
            -moz-appearance: textfield;
        }

            .chat-mic-settings-grid .chat-mic-number-control input:focus {
                border: 0;
                outline: none;
                box-shadow: none;
            }

            .chat-mic-settings-grid .chat-mic-number-control input::-webkit-inner-spin-button,
            .chat-mic-settings-grid .chat-mic-number-control input::-webkit-outer-spin-button {
                margin: 0;
                appearance: none;
                -webkit-appearance: none;
            }

        .chat-mic-settings-grid .chat-mic-number-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            min-width: 32px;
            min-height: 32px;
            margin: 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            outline: none;
            background: #202020;
            color: var(--secondary-text);
            font-size: 17px;
            line-height: 1;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }

            .chat-mic-settings-grid .chat-mic-number-button:first-child {
                border-right: 1px solid var(--border-color);
            }

            .chat-mic-settings-grid .chat-mic-number-button:last-child {
                border-left: 1px solid var(--border-color);
            }

            .chat-mic-settings-grid .chat-mic-number-button:hover:not(:disabled) {
                background: var(--sidebar-hover);
                color: var(--primary-text);
            }

            .chat-mic-settings-grid .chat-mic-number-button:active:not(:disabled) {
                background: #303030;
            }

            .chat-mic-settings-grid .chat-mic-number-button:focus-visible {
                position: relative;
                z-index: 1;
                outline: 2px solid #5d9cff;
                outline-offset: -3px;
            }

        .chat-mic-settings-grid .chat-mic-number-control:has(input:disabled) {
            opacity: 0.45;
        }

        .chat-mic-settings-grid .chat-mic-number-control input:disabled,
        .chat-mic-settings-grid .chat-mic-number-button:disabled {
            cursor: not-allowed;
        }

.chat-mic-settings-reset {
    width: 100%;
    margin-top: 12px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #2a2a2a;
    color: var(--primary-text);
    cursor: pointer;
}

    .chat-mic-settings-reset:hover {
        background: #333;
    }

@media (max-width: 520px) {
    .chat-mic-device-menu {
        width: min(360px, calc(100vw - 28px));
    }

    .chat-mic-settings-grid {
        grid-template-columns: 1fr;
    }
}

.chat-output-volume-label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.chat-output-volume-slider,
.chat-mic-range-slider {
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    background: transparent;
    accent-color: #2f7ac2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.chat-output-volume-slider {
    margin: 0 0 4px;
}

.chat-output-volume-slider::-webkit-slider-runnable-track,
.chat-mic-range-slider::-webkit-slider-runnable-track {
    height: 7px;
    border: 1px solid #050505;
    border-radius: 999px;
    background: #101010;
}

.chat-output-volume-slider::-webkit-slider-thumb,
.chat-mic-range-slider::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    background: #2f7ac2;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    appearance: none;
    -webkit-appearance: none;
}

.chat-output-volume-slider::-moz-range-track,
.chat-mic-range-slider::-moz-range-track {
    height: 7px;
    border: 1px solid #050505;
    border-radius: 999px;
    background: #101010;
}

.chat-output-volume-slider::-moz-range-progress,
.chat-mic-range-slider::-moz-range-progress {
    height: 7px;
    border-radius: 999px;
    background: #2f7ac2;
}

.chat-output-volume-slider::-moz-range-thumb,
.chat-mic-range-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 0;
    border-radius: 50%;
    background: #2f7ac2;
}

.chat-mic-range-setting {
    display: block;
}

.chat-mic-full-width-range-setting {
    width: 100%;
    margin-top: 12px;
}

.chat-mic-range-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-mic-range-control {
    display: flex;
    align-items: center;
    min-height: 34px;
    margin-top: 5px;
    padding: 0 9px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #151515;
    box-sizing: border-box;
}

.chat-mic-range-control:focus-within {
    border-color: #5d9cff;
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.chat-mic-range-control.is-disabled {
    opacity: 0.45;
}

.chat-mic-range-slider:disabled {
    cursor: not-allowed;
}

.chat-music-toggle-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 12px;
    align-items: center;
}

.chat-music-toggle-row .chat-mic-checkbox-row {
    margin-bottom: 0;
}


.chat-audio-debug {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.chat-audio-debug-heading,
.chat-audio-debug-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chat-audio-debug-heading {
    margin-bottom: 10px;
    color: var(--primary-text);
    font-size: 12px;
    font-weight: 700;
}

.chat-audio-debug-heading span:last-child {
    color: var(--secondary-text);
    font-size: 10px;
    font-weight: 500;
}

.chat-audio-debug-row + .chat-audio-debug-row {
    margin-top: 8px;
}

.chat-audio-debug-label {
    margin-bottom: 4px;
    color: var(--secondary-text);
    font-size: 11px;
}

.chat-audio-debug-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #111;
}

.chat-audio-debug-track > span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #245f9b, #48a6ff);
    transition: width 35ms linear, background 120ms ease;
}

#audioDebugVoiceBar.is-voice-triggered {
    background: linear-gradient(90deg, #2e8f4d, #67d98a);
}

#audioDebugMusicBar.is-music-triggered {
    background: linear-gradient(90deg, #6f3cab, #b06cff);
}

/* Webcam / Auto Vision */
.chat-submit-control {
    flex-basis: 186px;
    width: 186px;
}

.chat-send-button,
.chat-camera-button,
.chat-camera-settings-button {
    box-sizing: border-box;
    margin: 0;
    border: 0;
    color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.chat-send-button {
    border-radius: 0;
}

.chat-camera-region {
    position: relative;
    display: flex;
    flex: 1 1 0;
    min-width: 36px;
    height: 46px;
    flex-direction: column;
    overflow: visible;
    border-right: 1px solid rgba(255, 255, 255, 0.34);
}

.chat-camera-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 27px;
    padding: 0;
    border-radius: 9px 0 0 0;
    background: #2e74bb;
    font-size: 16px;
    line-height: 1;
}

.chat-camera-settings-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 17px;
    width: 100%;
    min-width: 0;
    height: 17px;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 0 0 0 9px;
    background: #245f9b;
    font-size: 10px;
    line-height: 1;
}

.chat-camera-button:hover:not(:disabled),
.chat-camera-settings-button:hover {
    background: #3582d1;
}

.chat-camera-button:disabled {
    cursor: default;
    opacity: 0.42;
}

.chat-camera-button.is-capturing {
    background: #8a6a23;
    cursor: wait;
}

.chat-camera-slider-label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.chat-camera-motion-debug {
    margin-top: 14px;
}

.chat-camera-motion-debug .chat-audio-debug-track > span {
    width: 0;
}


/* Compact three-column audio settings layout. */
.chat-mic-device-menu:not(.chat-camera-device-menu) {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
    gap: 0;
    width: min(940px, calc(100vw - 20px));
    padding: 0;
}

.chat-mic-device-menu:not(.chat-camera-device-menu):not(.is-hidden) {
    display: grid;
}

.chat-mic-settings-column {
    display: flex;
    min-width: 0;
    min-height: 100%;
    padding: 12px;
    flex-direction: column;
    box-sizing: border-box;
}

.chat-mic-settings-column + .chat-mic-settings-column {
    border-left: 1px solid var(--border-color);
}

.chat-mic-settings-column .chat-mic-settings-divider {
    margin: 12px 0;
}

.chat-mic-settings-column .chat-mic-settings-grid {
    margin-top: 12px;
}

.chat-mic-settings-column > .chat-mic-settings-grid:first-of-type {
    margin-top: 8px;
}

.chat-mic-section-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-color);
}

.chat-mic-levels-column .chat-mic-settings-divider {
    margin: 14px 0 12px;
}

.chat-mic-spectrum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-mic-spectrum-grid .chat-mic-range-label {
    white-space: nowrap;
}

.chat-music-control-row {
    display: grid;
    grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.35fr);
    align-items: end;
    gap: 12px;
    margin-top: 10px;
}

.chat-music-control-row .chat-music-toggle-row,
.chat-music-control-row .chat-mic-full-width-range-setting {
    margin: 0;
}

.chat-music-control-row .chat-mic-checkbox-row {
    min-height: 34px;
}

.chat-mic-output-column #micVoiceDetectButton,
.chat-mic-output-column #micMusicDetectButton {
    margin-top: 12px;
}

.chat-mic-diagnostics-column #micSettingsResetButton {
    margin-top: auto;
}

.chat-mic-diagnostics-column > .chat-mic-settings-divider {
    margin: 22px 0 18px;
}

.chat-mic-misc-title {
    margin-bottom: 14px;
}

.chat-misc-music-control-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
    margin-top: 4px;
    margin-bottom: 22px;
}

.chat-voice-trigger-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.chat-voice-trigger-row label {
    margin: 0;
}

.chat-mic-diagnostics-column .chat-audio-debug {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.chat-mic-diagnostics-column #micSettingsResetButton {
    margin-bottom: 0;
}


/* Smart Hub */
.smart-hub-overlay{position:fixed;inset:0;z-index:7000;display:flex;align-items:center;justify-content:center;padding:22px;background:rgba(5,8,13,.58);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.smart-hub-overlay.is-hidden{display:none}.smart-hub-panel{width:min(1120px,96vw);height:min(820px,92vh);display:flex;flex-direction:column;background:#171717;border:1px solid #343434;border-radius:18px;box-shadow:0 28px 80px rgba(0,0,0,.55);overflow:hidden}.smart-hub-header{display:flex;justify-content:space-between;gap:18px;padding:22px 24px 14px}.smart-hub-header h2{margin:0;font-size:24px}.smart-hub-header p{margin:4px 0 0;color:#929292}.smart-hub-close{border:0;background:transparent;color:#ddd;font-size:31px;cursor:pointer}.smart-hub-tabs{display:flex;gap:6px;padding:10px 18px 0;border-top:1px solid rgba(255,255,255,.025);background:#141414;overflow-x:auto}.smart-hub-tab-button{min-height:38px;padding:0 15px;border:1px solid transparent;border-bottom:0;border-radius:9px 9px 0 0;background:transparent;color:#929292;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.smart-hub-tab-button:hover,.smart-hub-tab-button:focus-visible{color:#fff;background:rgba(255,255,255,.035)}.smart-hub-tab-button.is-active{border-color:#343434;background:#1a1a1a;color:#fff}.smart-hub-toolbar button,.smart-hub-card button{border:1px solid #343434;background:#202020;color:#ddd;border-radius:9px;padding:9px 13px;cursor:pointer}.smart-hub-toolbar{display:flex;align-items:center;justify-content:space-between;padding:11px 20px;border-top:1px solid #292929;border-bottom:1px solid #292929}.smart-hub-toolbar-actions{display:flex;gap:8px}.smart-hub-toggle{display:flex;align-items:center;gap:8px;color:#bbb}.smart-hub-status{min-height:0;padding:8px 20px;color:#9fcdf5}.smart-hub-content{flex:1;overflow:auto;padding:12px 20px 24px}.smart-hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.smart-hub-card{background:#1d1d1d;border:1px solid #303030;border-radius:13px;padding:15px}.smart-hub-card h3{margin:0 0 6px;font-size:16px}.smart-hub-meta{font-size:12px;color:#909090;margin-bottom:12px}.smart-hub-card-actions{display:flex;flex-wrap:wrap;gap:7px}.smart-hub-card .danger{color:#ff8f8f}.smart-hub-power.on{color:#81e6a4}.smart-hub-power.off{color:#aaa}.smart-hub-light-controls{display:grid;grid-template-columns:1fr 52px;gap:9px;align-items:center;margin:11px 0}.smart-hub-light-controls input[type=range]{width:100%}.smart-hub-light-controls input[type=color]{width:52px;height:32px;padding:2px;border:1px solid #444;background:#151515;border-radius:7px}.smart-hub-empty{padding:38px;text-align:center;color:#888}.smart-hub-modal-form{display:grid;gap:10px}.smart-hub-modal-form input,.smart-hub-modal-form select{width:100%;box-sizing:border-box;background:#111;border:1px solid #3b3b3b;color:#eee;border-radius:8px;padding:9px}.smart-hub-member-list{display:grid;gap:5px;margin-top:9px}.smart-hub-member-list label{display:flex;gap:8px;align-items:center;color:#bbb}
@media(max-width:700px){.smart-hub-overlay{padding:0;align-items:stretch}.smart-hub-panel{width:100vw;height:100vh;max-height:none;border-radius:0;border:0}.smart-hub-header{padding:16px 16px 10px}.smart-hub-tabs{padding:8px 12px 0}.smart-hub-tab-button{flex:1 0 auto;min-width:100px}.smart-hub-toolbar{padding:10px 12px;gap:10px}.smart-hub-content{padding:10px 12px 20px}.smart-hub-grid{grid-template-columns:1fr}.smart-hub-toolbar{align-items:flex-start}.smart-hub-toolbar-actions{margin-left:auto}}


/* Smart Hub polish */
.smart-hub-light-row{margin:11px 0}.smart-hub-light-row.is-compact{display:grid;grid-template-columns:minmax(90px,1fr) minmax(140px,1.35fr);gap:10px;align-items:center;margin:8px 0}.smart-hub-light-name{font-size:12px;color:#b9b9b9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.smart-hub-light-controls{display:grid;grid-template-columns:minmax(100px,1fr) 34px;gap:10px;align-items:center;margin:0}.smart-hub-color-swatch{width:34px!important;height:34px!important;min-width:34px;padding:0!important;border-radius:7px!important;background:var(--sh-color,#fff)!important;border:1px solid #555!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);cursor:pointer}.smart-hub-member-lights{margin:12px 0 2px;padding-top:8px;border-top:1px solid #2e2e2e}.smart-hub-editor-overlay{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;padding:22px;background:rgba(5,8,13,.68);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.smart-hub-editor-panel{width:min(560px,94%);max-height:min(720px,88vh);display:flex;flex-direction:column;background:#181818;border:1px solid #383838;border-radius:15px;box-shadow:0 24px 70px rgba(0,0,0,.58);overflow:hidden}.smart-hub-editor-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px;border-bottom:1px solid #292929}.smart-hub-editor-header h3{margin:0;font-size:18px}.smart-hub-editor-header button{border:0;background:transparent;color:#ddd;font-size:28px;cursor:pointer}.smart-hub-editor-body{overflow:auto;padding:16px 20px;display:grid;gap:14px}.smart-hub-editor-field{display:grid;gap:6px;color:#bbb;font-size:13px}.smart-hub-editor-field input,.smart-hub-editor-field select{width:100%;box-sizing:border-box;background:#111;border:1px solid #3b3b3b;color:#eee;border-radius:8px;padding:10px}.smart-hub-editor-section{margin:0;padding:12px;border:1px solid #303030;border-radius:10px}.smart-hub-editor-section legend{padding:0 6px;color:#d6d6d6;font-size:13px}.smart-hub-editor-section .smart-hub-member-list{max-height:190px;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 12px}.smart-hub-editor-empty{color:#777;font-size:12px}.smart-hub-editor-actions{display:flex;justify-content:flex-end;gap:8px;padding:13px 20px 18px;border-top:1px solid #292929}.smart-hub-editor-actions button,.smart-hub-color-footer button{border:1px solid #3a3a3a;background:#222;color:#ddd;border-radius:8px;padding:9px 14px;cursor:pointer}.smart-hub-editor-actions button.primary,.smart-hub-color-footer button.primary{border-color:#347ebd;background:#173653;color:#fff}.smart-hub-color-popover{position:fixed;z-index:7300;width:220px;padding:12px;background:#171717;border:1px solid #3a3a3a;border-radius:12px;box-shadow:0 20px 55px rgba(0,0,0,.62)}.smart-hub-color-title{font-size:13px;font-weight:600;color:#e6e6e6;margin:0 0 10px}.smart-hub-sv-picker{--sh-hue:hsl(0 100% 50%);position:relative;width:220px;height:220px;border-radius:7px;cursor:crosshair;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--sh-hue));box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);touch-action:none}.smart-hub-sv-picker span{position:absolute;width:12px;height:12px;border:2px solid #fff;border-radius:50%;box-shadow:0 1px 4px #000;transform:translate(-50%,-50%);pointer-events:none}.smart-hub-hue-slider{width:100%;height:18px;margin:11px 0 8px;appearance:none;-webkit-appearance:none;background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);border-radius:10px;outline:none}.smart-hub-hue-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:22px;border-radius:5px;border:2px solid #fff;background:#222;box-shadow:0 1px 4px #000}.smart-hub-hue-slider::-moz-range-thumb{width:14px;height:20px;border-radius:5px;border:2px solid #fff;background:#222;box-shadow:0 1px 4px #000}.smart-hub-color-footer{display:flex;align-items:center;justify-content:flex-end;gap:7px}.smart-hub-color-preview{width:30px;height:30px;border-radius:6px;border:1px solid #555;margin-right:auto}.smart-hub-panel{position:relative}
@media(max-width:700px){.smart-hub-light-row.is-compact{grid-template-columns:1fr}.smart-hub-editor-overlay{padding:10px}.smart-hub-editor-panel{width:100%;max-height:92vh}.smart-hub-editor-section .smart-hub-member-list{grid-template-columns:1fr}.smart-hub-color-popover{width:204px}.smart-hub-sv-picker{width:204px;height:204px}}


/* Smart Hub polish: filtering, master lights, color picker sizing */
.smart-hub-filter-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 20px;border-bottom:1px solid #292929;background:rgba(0,0,0,.08);color:#929292;font-size:12px}.smart-hub-filter-actions{display:flex;gap:7px;flex-wrap:wrap}.smart-hub-filter-actions button{min-width:48px;border:1px solid #343434;background:#202020;color:#bbb;border-radius:8px;padding:7px 11px;cursor:pointer}.smart-hub-filter-actions button.is-active{border-color:#3d90d8;background:#173653;color:#fff}.smart-hub-master-light{display:grid;grid-template-columns:minmax(90px,1fr) minmax(140px,1.35fr);gap:10px;align-items:center;margin:12px 0;padding:10px 0;border-top:1px solid #303030}.smart-hub-master-light .smart-hub-light-name{color:#e3e3e3;font-weight:700}.smart-hub-color-popover{width:244px!important;box-sizing:border-box!important;background:#171717!important}.smart-hub-sv-picker{width:100%!important;height:auto!important;aspect-ratio:1/1;box-sizing:border-box}.smart-hub-hue-slider{box-sizing:border-box;display:block}.smart-hub-editor-field select{min-height:40px;color-scheme:dark}.smart-hub-editor-field select option{background:#151515;color:#eee}
@media(max-width:700px){.smart-hub-filter-toolbar{padding:8px 12px}.smart-hub-master-light{grid-template-columns:1fr}.smart-hub-color-popover{width:min(244px,calc(100vw - 24px))!important}}

/* Smart Hub indexed filters + color preset polish */
.smart-hub-filter-toolbar{align-items:flex-start}.smart-hub-filter-actions{display:grid;grid-template-columns:repeat(12,minmax(34px,1fr));gap:6px;flex:1}.smart-hub-filter-actions button{min-width:34px;padding:7px 8px}.smart-hub-color-popover{width:272px!important;padding:14px!important;display:grid;gap:10px;overflow:hidden}.smart-hub-color-title{margin:0}.smart-hub-color-preset-label{display:grid;gap:5px;font-size:12px;color:#a9a9a9}.smart-hub-color-preset{width:100%;box-sizing:border-box;background:#111;border:1px solid #3b3b3b;color:#eee;border-radius:8px;padding:8px 10px;color-scheme:dark}.smart-hub-color-preset option{background:#151515;color:#eee}.smart-hub-sv-picker{width:100%!important;aspect-ratio:1/1;height:auto!important}.smart-hub-hue-slider{margin:0!important}.smart-hub-color-footer{margin-top:0}
@media(max-width:900px){.smart-hub-filter-actions{grid-template-columns:repeat(8,minmax(34px,1fr))}}
@media(max-width:700px){.smart-hub-filter-toolbar{align-items:stretch;flex-direction:column;gap:7px}.smart-hub-filter-actions{grid-template-columns:repeat(7,minmax(32px,1fr));width:100%}.smart-hub-color-popover{width:min(272px,calc(100vw - 24px))!important}}


/* Smart Hub compact alphabetical index */
.smart-hub-filter-toolbar{display:block!important;padding:6px 20px!important;border-bottom:1px solid #292929;background:rgba(0,0,0,.08);overflow:hidden}
.smart-hub-filter-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:1px!important;width:100%;overflow-x:auto;scrollbar-width:thin}
.smart-hub-filter-actions button{flex:1 0 22px!important;min-width:22px!important;height:28px;padding:0 3px!important;border:0!important;background:transparent!important;color:#999!important;border-radius:5px!important;font-size:11px;line-height:28px;cursor:pointer}
.smart-hub-filter-actions button:hover{background:#242424!important;color:#eee!important}
.smart-hub-filter-actions button.is-active{background:#173653!important;color:#fff!important;box-shadow:inset 0 0 0 1px #3d90d8}
.smart-hub-filter-actions button[data-sh-list-filter="all"]{flex-basis:30px!important;min-width:30px!important;font-weight:600}
@media(max-width:700px){.smart-hub-filter-toolbar{padding:5px 12px!important}.smart-hub-filter-actions button{flex:0 0 24px!important}.smart-hub-filter-actions button[data-sh-list-filter="all"]{flex-basis:32px!important}}

/* Smart Hub status navigation + single light-section divider */
.smart-hub-card .smart-hub-card-title-link{appearance:none;-webkit-appearance:none;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;padding:0;margin:0;cursor:pointer;text-align:left;box-shadow:none}
.smart-hub-card .smart-hub-card-title-link:hover{border:0;background:transparent;color:inherit;text-decoration:none;box-shadow:none}
.smart-hub-master-light + .smart-hub-member-lights{border-top:0!important;padding-top:0!important}

.smart-hub-white-preset{max-width:132px;box-sizing:border-box;background:#151515;border:1px solid #3a3a3a;color:#e8e8e8;border-radius:7px;padding:6px 8px;color-scheme:dark}.smart-hub-white-preset option{background:#151515;color:#e8e8e8}.smart-hub-light-controls .smart-hub-white-preset{flex:0 1 132px}

/* Smart Hub final cleanup */
.smart-hub-white-preset{transition:background-color .16s ease,border-color .16s ease,color .16s ease}
.smart-hub-white-preset.tone-soft{background:#4a3422!important;border-color:#72543a!important;color:#ffe2bd!important}
.smart-hub-white-preset.tone-white{background:#353535!important;border-color:#555!important;color:#f5f5f5!important}
.smart-hub-white-preset.tone-daylight{background:#24384b!important;border-color:#41627f!important;color:#e3f2ff!important}
.smart-hub-card{position:relative}
.smart-hub-device-help{position:absolute;right:11px;bottom:10px;z-index:2;display:inline-flex;align-items:center;justify-content:center}
.smart-hub-help-icon{display:inline-flex;width:18px;height:18px;align-items:center;justify-content:center;border:1px solid #454545;border-radius:50%;background:#191919;color:#9c9c9c;font-size:11px;font-weight:700;line-height:1;cursor:help;transition:border-color .15s ease,color .15s ease,background .15s ease}
.smart-hub-device-help:hover .smart-hub-help-icon,.smart-hub-device-help:focus .smart-hub-help-icon{border-color:#4b87b8;background:#1c2b38;color:#cfe9ff}
.smart-hub-help-tooltip{position:absolute;z-index:40;right:0;bottom:27px;width:max-content;min-width:220px;max-width:min(320px,calc(100vw - 36px));display:grid;gap:7px;padding:10px 12px;border:1px solid #3a3a3a;border-radius:9px;background:#171717;box-shadow:0 14px 38px rgba(0,0,0,.55);opacity:0;visibility:hidden;transform:translateY(4px);pointer-events:none;transition:opacity .24s ease,transform .24s ease,visibility 0s linear .24s;color:#ddd;font-size:12px}
.smart-hub-device-help:hover .smart-hub-help-tooltip,.smart-hub-device-help:focus .smart-hub-help-tooltip,.smart-hub-device-help:focus-within .smart-hub-help-tooltip{opacity:1;visibility:visible;transform:translateY(0);transition-delay:0s}.smart-hub-device-help.is-tooltip-expired .smart-hub-help-tooltip{opacity:0!important;visibility:hidden!important;transform:translateY(4px)!important}
.smart-hub-help-tooltip span{display:grid;grid-template-columns:66px minmax(0,1fr);gap:8px;align-items:start}
.smart-hub-help-tooltip strong{color:#8f8f8f;font-weight:600}
.smart-hub-schedule-panel{width:min(620px,94%)}
.smart-hub-schedule-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.smart-hub-schedule-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.smart-hub-schedule-days label{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:0 5px;border:1px solid #303030;border-radius:7px;background:#151515;color:#bbb;font-size:12px;cursor:pointer}
.smart-hub-schedule-days input{accent-color:#3d90d8}
.smart-hub-schedule-panel input[type=time]{color-scheme:dark}
.assets-close-button{width:auto!important;height:auto!important;min-width:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--primary-text)!important;font-size:31px!important;line-height:1!important;box-shadow:none!important}
.assets-close-button:hover,.assets-close-button:focus{background:transparent!important;border:0!important;box-shadow:none!important;color:#fff!important}
@media(max-width:700px){.smart-hub-schedule-row{grid-template-columns:1fr}.smart-hub-schedule-days{grid-template-columns:repeat(4,minmax(0,1fr))}.smart-hub-help-tooltip{right:-4px;min-width:210px}.assets-close-button{flex:0 0 auto!important;width:auto!important;height:auto!important}}
.smart-hub-status-toolbar{display:flex;align-items:center;justify-content:center;min-height:38px;padding:0 20px;border-bottom:1px solid #292929;background:rgba(0,0,0,.08)}
.smart-hub-status-toolbar.is-hidden{display:none}
.smart-hub-status-toolbar .smart-hub-status{width:100%;min-height:0;padding:8px 0;text-align:center;color:#9fcdf5}
.smart-hub-card button.is-working,.smart-hub-toolbar button.is-working,.smart-hub-editor-actions button.is-working,.smart-hub-color-popover button.is-working{display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:wait;opacity:.82}
.smart-hub-button-spinner{display:inline-block;width:13px;height:13px;box-sizing:border-box;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:smartHubButtonSpin .7s linear infinite;flex:0 0 13px}
@keyframes smartHubButtonSpin{to{transform:rotate(360deg)}}
@media(max-width:700px){.smart-hub-status-toolbar{padding:0 12px;min-height:36px}}

.smart-hub-member-devices{margin:12px 0 2px;padding-top:4px;border-top:1px solid #2e2e2e}.smart-hub-member-device{padding:8px 0;border-bottom:1px solid #282828}.smart-hub-member-device:last-child{border-bottom:0}.smart-hub-member-device-summary{display:flex;align-items:center;justify-content:space-between;gap:10px}.smart-hub-member-device-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#d0d0d0}.smart-hub-member-device-meta{font-size:11px;color:#888;white-space:nowrap}.smart-hub-member-device-controls .smart-hub-light-row{margin:6px 0 0}.smart-hub-member-device-controls .smart-hub-light-controls{margin:0}
@media(max-width:700px){.smart-hub-member-device-summary{align-items:flex-start;flex-direction:column;gap:3px}.smart-hub-member-device-meta{white-space:normal}}

/* Smart Hub mixed-light aggregate controls: keep RGB and white-tone selectors square and inline. */
.smart-hub-master-light .smart-hub-light-controls{display:flex!important;grid-template-columns:none!important;align-items:center;gap:10px}
.smart-hub-master-light .smart-hub-light-controls input[type=range]{flex:1 1 auto;min-width:0;width:auto!important}
.smart-hub-master-light .smart-hub-light-controls .smart-hub-color-swatch,.smart-hub-master-light .smart-hub-light-controls .smart-hub-white-preset-square{flex:0 0 34px}
.smart-hub-white-preset.smart-hub-white-preset-square{width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;padding:0 2px!important;border-radius:7px!important;overflow:hidden;cursor:pointer;color-scheme:dark;font-size:0}
.smart-hub-white-preset.smart-hub-white-preset-square option{font-size:13px;color:#e8e8e8;background:#151515}


/* Smart Hub aggregate layout: give the master slider the remaining card width. */
.smart-hub-master-light{grid-template-columns:max-content minmax(0,1fr)!important;column-gap:14px}


/* Smart Hub / account close-button alignment */
@media (min-width: 701px) {
    .smart-hub-close {
        position: relative;
        top: -8px;
        right: -8px;
        line-height: 1;
    }
}


/* Smart Hub custom prompts */
.smart-hub-prompt-grid{grid-template-columns:1fr!important}.smart-hub-prompt-grid .smart-hub-card{width:100%;box-sizing:border-box}.smart-hub-prompt-summary{display:grid;gap:6px;margin:10px 0 13px}.smart-hub-prompt-summary-row{padding:8px 10px;border:1px solid #2c2c2c;border-radius:8px;background:#181818;color:#bdbdbd;font-size:12px;line-height:1.4}.smart-hub-prompt-panel{width:min(860px,94%);max-height:min(780px,90vh)}.smart-hub-prompt-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#d6d6d6;font-size:13px;font-weight:700}.smart-hub-prompt-editor-heading button,.smart-hub-prompt-action-header button{border:1px solid #3a3a3a;background:#222;color:#ddd;border-radius:8px;padding:7px 11px;cursor:pointer}.smart-hub-prompt-actions{display:grid;gap:10px}.smart-hub-prompt-action{padding:13px;border:1px solid #303030;border-radius:11px;background:#151515}.smart-hub-prompt-action-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px;color:#e1e1e1}.smart-hub-prompt-action-header .danger{color:#ff8f8f}.smart-hub-prompt-action-grid{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(180px,1.4fr) minmax(100px,.65fr) minmax(120px,.8fr);gap:10px}.smart-hub-prompt-light-options{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(210px,1fr);gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid #2d2d2d}.smart-hub-prompt-brightness{display:grid;gap:7px;color:#bbb;font-size:13px}.smart-hub-prompt-brightness>label{display:flex;align-items:center;gap:7px}.smart-hub-prompt-range{display:grid;grid-template-columns:minmax(120px,1fr) 46px;gap:8px;align-items:center}.smart-hub-prompt-range input[type=range]{width:100%}.smart-hub-prompt-range span{color:#9fcdf5;font-size:12px;text-align:right}.smart-hub-prompt-color-field{align-content:start}.smart-hub-prompt-color-controls{display:grid;grid-template-columns:minmax(150px,1fr) 34px;gap:8px;align-items:center}.smart-hub-prompt-color-controls select{min-height:40px}.smart-hub-prompt-color-controls .smart-hub-color-swatch:disabled{opacity:.32;cursor:default}.smart-hub-prompt-action input[type=checkbox]{accent-color:#3d90d8}
@media(max-width:760px){.smart-hub-prompt-panel{width:100%;max-height:94vh}.smart-hub-prompt-action-grid{grid-template-columns:1fr 1fr}.smart-hub-prompt-light-options{grid-template-columns:1fr}.smart-hub-prompt-summary-row{font-size:11px}}
@media(max-width:480px){.smart-hub-prompt-action-grid{grid-template-columns:1fr}.smart-hub-prompt-editor-heading{align-items:flex-start}.smart-hub-prompt-color-controls{grid-template-columns:minmax(0,1fr) 34px}}

/* Administration */
.administration-overlay {
    position: fixed;
    inset: 0;
    z-index: 10930;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(8, 8, 8, 0.48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    animation: assets-overlay-in 180ms ease both;
}

.administration-overlay.is-hidden {
    display: none;
}

.administration-overlay.is-closing {
    animation: assets-overlay-out 180ms ease both;
    pointer-events: none;
}

.administration-panel {
    display: flex;
    width: min(1120px, 96vw);
    height: min(840px, 92vh);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--panel-background);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
    animation: assets-panel-in 180ms ease both;
}

.administration-overlay.is-closing .administration-panel {
    animation: assets-panel-out 180ms ease both;
}

.administration-header {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px 14px 22px;
    border-bottom: 1px solid var(--border-color);
}

.administration-header h2 {
    margin: 0;
    font-size: 20px;
}

.administration-header p {
    margin: 5px 0 0;
    color: var(--secondary-text);
    font-size: 12px;
}

.administration-close-button {
    display: inline-flex;
    width: auto;
    height: auto;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--primary-text);
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
}

.administration-close-button:hover,
.administration-close-button:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
}

.administration-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.025);
    background: #141414;
}

.administration-tab-button {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: transparent;
    color: var(--muted-text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.administration-tab-button:hover:not(:disabled),
.administration-tab-button:focus-visible {
    color: var(--primary-text);
    background: rgba(255, 255, 255, 0.035);
}

.administration-tab-button.is-active {
    border-color: var(--border-color);
    background: #1a1a1a;
    color: var(--primary-text);
}

.administration-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
    background: #1a1a1a;
}

.administration-status {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(32, 79, 120, 0.13);
    color: #9fcdf5;
    font-size: 12px;
}

.administration-status.is-error {
    background: rgba(116, 38, 38, 0.14);
    color: #ff9c9c;
}

.administration-status.is-success {
    background: rgba(44, 110, 65, 0.13);
    color: #8ce1a7;
}

.administration-tab-panel {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
}

.administration-users-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #292929;
    background: #171717;
}

.administration-search-field {
    display: grid;
    width: min(360px, 100%);
    gap: 6px;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.administration-search-field input,
.administration-activity-filter input {
    width: 100%;
    min-width: 0;
    min-height: 39px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    outline: none;
    background: #111;
    color: #eee;
    color-scheme: dark;
    font: inherit;
}

.administration-search-field input:focus,
.administration-activity-filter input:focus {
    border-color: rgba(93, 156, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.administration-users-layout {
    display: grid;
    min-height: 0;
    height: calc(100% - 76px);
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}

.administration-user-list-shell {
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid #303030;
    background: #151515;
}

.administration-user-count {
    padding: 11px 13px;
    border-bottom: 1px solid #292929;
    color: #929292;
    font-size: 12px;
}

.administration-user-list {
    display: grid;
    align-content: start;
    max-height: calc(100% - 39px);
    overflow: auto;
    padding: 8px;
    gap: 6px;
}

.administration-user-row {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.administration-user-row:hover,
.administration-user-row:focus-visible {
    border-color: #343434;
    background: #202020;
}

.administration-user-row.is-active {
    border-color: #3d79ad;
    background: #173653;
}

.administration-user-row-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.administration-user-name {
    overflow: hidden;
    color: #eee;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-user-email,
.administration-user-status {
    overflow: hidden;
    color: #8f8f8f;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-user-detail {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 18px;
}

.administration-empty-state {
    display: grid;
    min-height: 230px;
    place-items: center;
    padding: 32px;
    color: #777;
    text-align: center;
}

.administration-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.administration-detail-header h3 {
    margin: 0;
    font-size: 20px;
}

.administration-detail-header p {
    margin: 5px 0 0;
    color: #929292;
    font-size: 12px;
}

.administration-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.administration-badge,
.administration-global-badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    background: #202020;
    color: #bcbcbc;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.administration-badge.is-admin,
.administration-global-badge {
    border-color: rgba(61, 144, 216, 0.55);
    background: #173653;
    color: #e9f5ff;
}

.administration-badge.is-active {
    border-color: rgba(80, 181, 112, 0.42);
    background: rgba(30, 94, 49, 0.28);
    color: #9ae6b1;
}

.administration-badge.is-warning {
    border-color: rgba(207, 160, 69, 0.45);
    background: rgba(112, 75, 21, 0.25);
    color: #f0c979;
}

.administration-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.administration-summary-card {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #303030;
    border-radius: 9px;
    background: #171717;
}

.administration-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: #858585;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.administration-summary-card strong {
    display: block;
    overflow: hidden;
    color: #ddd;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.administration-card {
    display: grid;
    align-content: start;
    gap: 11px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #303030;
    border-radius: 11px;
    background: #171717;
}

.administration-card.is-wide {
    grid-column: 1 / -1;
}

.administration-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.administration-card-heading h4 {
    margin: 0;
    color: #e3e3e3;
    font-size: 14px;
}

.administration-card-heading p,
.administration-card-note {
    margin: 4px 0 0;
    color: #858585;
    font-size: 11px;
    line-height: 1.45;
}

.administration-permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.administration-permission-option {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: #121212;
    color: #bbb;
    font-size: 12px;
    cursor: pointer;
}

.administration-permission-option input {
    margin: 0;
    accent-color: #2f74bb;
}

.administration-permission-option:has(input:checked) {
    border-color: rgba(61, 144, 216, 0.45);
    background: rgba(23, 54, 83, 0.55);
    color: #e4f2ff;
}

.administration-action-row,
.administration-suspension-actions,
.administration-activity-filter,
.administration-activity-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.administration-secondary-button,
.administration-action-button,
.administration-danger-button,
.administration-button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #202020;
    color: #ddd;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.administration-secondary-button:hover:not(:disabled),
.administration-action-button:hover:not(:disabled),
.administration-button-secondary:hover:not(:disabled) {
    background: #292929;
    color: #fff;
}

.administration-action-button.is-primary,
.administration-button-primary {
    border-color: rgba(103, 166, 230, 0.28);
    background: #2f74bb;
    color: #fff;
}

.administration-action-button.is-primary:hover:not(:disabled),
.administration-button-primary:hover:not(:disabled) {
    background: #3582d1;
}

.administration-danger-button {
    border-color: rgba(226, 92, 92, 0.32);
    background: rgba(105, 34, 34, 0.23);
    color: #ff9a9a;
}

.administration-danger-button:hover:not(:disabled) {
    border-color: rgba(241, 104, 104, 0.56);
    background: rgba(131, 39, 39, 0.36);
    color: #ffc0c0;
}

.administration-action-button:disabled,
.administration-danger-button:disabled,
.administration-secondary-button:disabled,
.administration-button:disabled {
    cursor: default;
    opacity: 0.48;
}

.administration-suspension-actions button.is-active {
    border-color: #3d90d8;
    background: #173653;
    color: #fff;
}

.administration-assistant-list,
.administration-activity-list {
    display: grid;
    gap: 7px;
}

.administration-assistant-row,
.administration-activity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    background: #121212;
}

.administration-assistant-row strong,
.administration-activity-row strong {
    display: block;
    overflow: hidden;
    color: #d7d7d7;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-assistant-row span,
.administration-activity-row span {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #818181;
    font-size: 10px;
}

.administration-activity-result {
    color: #8ce1a7;
    font-weight: 700;
}

.administration-activity-result.is-failure {
    color: #ff9a9a;
}

.administration-activity-filter input {
    width: auto;
    min-width: 150px;
}

.administration-activity-summary {
    color: #858585;
    font-size: 11px;
}

.administration-avatar-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 8px;
}

.administration-avatar-intro h3,
.administration-section-heading h3 {
    margin: 0;
    font-size: 16px;
}

.administration-avatar-intro p,
.administration-section-heading p {
    margin: 5px 0 0;
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.45;
}

.administration-avatar-section {
    margin: 12px 20px 18px;
    padding: 15px;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #171717;
}

.administration-section-heading {
    margin-bottom: 14px;
}

.administration-section-heading-with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.administration-section-heading-with-action > div {
    min-width: 0;
}

.administration-speech-preview-button {
    flex: 0 0 auto;
}

.administration-speech-preview-button:hover:not(:disabled) {
    transform: scale(1.05);
}

.administration-speech-preview-button:disabled {
    transform: none;
}

.administration-tuning-group {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid #2a2a2a;
}

.administration-tuning-group:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.administration-tuning-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.administration-tuning-group-heading h4 {
    margin: 0;
    color: #d6d6d6;
    font-size: 13px;
}

.administration-tuning-group-heading span {
    color: #707b86;
    font-family: Consolas, monospace;
    font-size: 10px;
}

.administration-morph-target-status {
    margin-top: 9px;
    padding: 8px 10px;
    border: 1px solid #293c4f;
    border-radius: 8px;
    background: #111820;
    color: #8fbae0;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.administration-morph-target-status.is-warning {
    border-color: #5a4930;
    background: #1d1810;
    color: #d1ad70;
}

.administration-slider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}

.administration-slider-grid-layers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.administration-slider-control {
    display: grid;
    min-width: 0;
    gap: 7px;
    padding: 10px 11px;
    border: 1px solid #2f2f2f;
    border-radius: 9px;
    background: #121212;
}

.administration-slider-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #bdbdbd;
    font-size: 12px;
    font-weight: 700;
}

.administration-slider-value-input {
    width: 72px;
    min-width: 72px;
    height: 28px;
    box-sizing: border-box;
    padding: 4px 7px;
    border: 1px solid #3b4f63;
    border-radius: 6px;
    outline: none;
    background: #0f1720;
    color: #9fcdf5;
    font: inherit;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    appearance: textfield;
    -moz-appearance: textfield;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.administration-slider-value-input::-webkit-outer-spin-button,
.administration-slider-value-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.administration-slider-value-input:hover {
    border-color: #4d6680;
    background: #121d28;
}

.administration-slider-value-input:focus {
    border-color: #2f74bb;
    background: #111d29;
    box-shadow: 0 0 0 2px rgba(47, 116, 187, 0.22);
}

.administration-slider-control input[type="range"] {
    --administration-range-fill: 50%;
    width: min(100%, 235px);
    height: 18px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: none;
    background: linear-gradient(to right, #2f74bb 0 var(--administration-range-fill), #303030 var(--administration-range-fill) 100%);
    border-radius: 10px;
    cursor: pointer;
}

.administration-slider-control input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 22px;
    -webkit-appearance: none;
    border: 2px solid #fff;
    border-radius: 5px;
    background: #222;
    box-shadow: 0 1px 4px #000;
}

.administration-slider-control input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 5px;
    background: #222;
    box-shadow: 0 1px 4px #000;
}

.administration-mask-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}

.administration-mask-control {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    border: 1px solid #2f2f2f;
    border-radius: 9px;
    background: #121212;
    color: #bdbdbd;
    cursor: pointer;
}

.administration-mask-control:hover {
    border-color: #3b3b3b;
    background: #151515;
}

.administration-mask-control input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 1px 0 0;
    accent-color: #2f74bb;
    cursor: pointer;
}

.administration-mask-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.administration-mask-copy strong {
    color: #d2d2d2;
    font-size: 12px;
}

.administration-mask-copy small {
    color: #858585;
    font-size: 11px;
    line-height: 1.4;
}

.administration-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    background: #141414;
}

.administration-footer-spacer {
    flex: 1 1 auto;
}

body.administration-open {
    overflow: hidden;
}

.administration-avatar-dock {
    display: flex;
    width: min(420px, 36vw);
    min-width: 330px;
    height: 100%;
    flex: 0 0 auto;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--border-color);
    background: #151515;
    box-shadow: -18px 0 46px rgba(0, 0, 0, 0.28);
}

.administration-avatar-dock.is-hidden {
    display: none;
}

.administration-avatar-dock-header {
    display: flex;
    min-height: 66px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px 12px 18px;
    border-bottom: 1px solid var(--border-color);
    background: #141414;
}

.administration-avatar-dock-header h2 {
    margin: 0;
    color: var(--primary-text);
    font-size: 17px;
}

.administration-avatar-dock-header p {
    margin: 4px 0 0;
    color: var(--secondary-text);
    font-size: 11px;
}

.administration-avatar-dock-status {
    flex: 0 0 auto;
}

.administration-avatar-dock-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    background: #1a1a1a;
}

.administration-avatar-dock-body .administration-tab-panel {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
}

.administration-avatar-dock-body .administration-avatar-intro {
    padding: 15px 14px 6px;
}

.administration-avatar-dock-body .administration-avatar-section {
    margin: 10px 14px 14px;
    padding: 13px;
}

.administration-avatar-dock-body .administration-section-heading-with-action {
    align-items: center;
}

.administration-avatar-dock-body .administration-slider-grid,
.administration-avatar-dock-body .administration-slider-grid-layers,
.administration-avatar-dock-body .administration-mask-grid {
    grid-template-columns: 1fr;
}

.administration-avatar-dock-body .administration-slider-control input[type="range"] {
    width: 100%;
}

.administration-avatar-dock-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: 0 0 auto;
    padding: 11px 12px;
    border-top: 1px solid var(--border-color);
    background: #141414;
}

.administration-avatar-dock-footer .administration-button {
    width: 100%;
}

.administration-avatar-dock-footer .administration-button-primary {
    grid-column: 1 / -1;
}

body.administration-avatar-dock-open .workspace-panel {
    padding-right: 14px;
}

/* ===========================================
   Automated benchmark
   =========================================== */

.benchmark-progress-toolbar {
    position: relative;
    z-index: 5;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 9px 20px;
    border-top: 1px solid rgba(93, 156, 255, 0.24);
    border-bottom: 1px solid rgba(93, 156, 255, 0.14);
    background: rgba(23, 54, 83, 0.72);
}

.benchmark-progress-copy {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 12px;
}

.benchmark-progress-copy strong {
    flex: 0 0 auto;
    color: #e9f5ff;
    font-size: 12px;
    font-weight: 800;
}

.benchmark-progress-copy span {
    overflow: hidden;
    color: #a9c9e6;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.benchmark-progress-cancel-button {
    min-height: 32px;
    flex: 0 0 auto;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    color: #e5edf4;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.benchmark-progress-cancel-button:hover:not(:disabled),
.benchmark-progress-cancel-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.benchmark-progress-cancel-button:disabled {
    cursor: default;
    opacity: 0.5;
}

.administration-benchmark-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 8px;
}

.administration-benchmark-intro h3 {
    margin: 0;
    font-size: 16px;
}

.administration-benchmark-intro p {
    margin: 5px 0 0;
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.45;
}

.administration-benchmark-card {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 14px;
    margin: 12px 20px 18px;
    padding: 15px;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #171717;
}

.administration-benchmark-status {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 11px;
    border: 1px solid rgba(93, 156, 255, 0.2);
    border-radius: 8px;
    background: rgba(32, 79, 120, 0.12);
    color: #9fcdf5;
    font-size: 12px;
    line-height: 1.45;
}

.administration-benchmark-status.is-error {
    border-color: rgba(226, 92, 92, 0.28);
    background: rgba(116, 38, 38, 0.14);
    color: #ff9c9c;
}


.administration-benchmark-form {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
    gap: 12px;
}

.administration-benchmark-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.administration-benchmark-form label span small {
    color: #777;
    font-weight: 500;
}

.administration-benchmark-form input,
.administration-benchmark-form textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    outline: none;
    background: #111;
    color: #eee;
    color-scheme: dark;
    font: inherit;
    resize: vertical;
}

.administration-benchmark-form input:focus,
.administration-benchmark-form textarea:focus {
    border-color: rgba(93, 156, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.administration-benchmark-form input:read-only:not(:disabled),
.administration-benchmark-form textarea:read-only:not(:disabled) {
    border-color: #343434;
    background: #181818;
    color: #cfcfcf;
    cursor: default;
    box-shadow: none;
}

.administration-benchmark-form input:disabled,
.administration-benchmark-form textarea:disabled {
    opacity: 0.55;
}

.administration-benchmark-actions,
.administration-benchmark-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.administration-benchmark-results-card {
    justify-items: stretch;
}

.administration-benchmark-results-layout {
    display: grid;
    min-height: 360px;
    grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
}

.administration-benchmark-session-list,
.administration-benchmark-session-detail {
    min-width: 0;
    border: 1px solid #303030;
    border-radius: 10px;
    background: #121212;
}

.administration-benchmark-session-list {
    display: grid;
    align-content: start;
    gap: 1px;
    overflow: auto;
}

.administration-benchmark-results-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.administration-benchmark-session-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: stretch;
    border-bottom: 1px solid #282828;
    background: transparent;
}

.administration-benchmark-session-item:last-child {
    border-bottom: 0;
}

.administration-benchmark-session-item:hover,
.administration-benchmark-session-item.is-active {
    background: rgba(47, 116, 187, 0.16);
}

.administration-benchmark-session-item.is-active {
    box-shadow: inset 3px 0 0 #3d90d8;
}

.administration-benchmark-session-check {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #282828;
    cursor: pointer;
}

.administration-benchmark-session-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #2f74bb;
    cursor: pointer;
}

.administration-benchmark-session-check input:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.administration-benchmark-session-row {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    background: transparent;
    color: #d7d7d7;
    text-align: left;
    cursor: pointer;
}

.administration-benchmark-session-row strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-benchmark-session-row span,
.administration-benchmark-session-row small {
    color: #8f8f8f;
    font-size: 11px;
}

.administration-benchmark-session-detail {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 15px;
    overflow: auto;
}

.administration-benchmark-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.administration-benchmark-detail-heading h3,
.administration-benchmark-detail-section h4 {
    margin: 0;
    color: #e7e7e7;
}

.administration-benchmark-detail-heading h3 {
    font-size: 15px;
}

.administration-benchmark-detail-heading p {
    margin: 5px 0 0;
    color: #858585;
    font-size: 11px;
    line-height: 1.45;
}

.administration-benchmark-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.administration-benchmark-summary-grid > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    background: #171717;
}

.administration-benchmark-summary-grid span,
.administration-benchmark-model-card span {
    color: #7f7f7f;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.administration-benchmark-summary-grid strong {
    overflow-wrap: anywhere;
    color: #ddd;
    font-size: 11px;
}

.administration-benchmark-detail-section {
    display: grid;
    gap: 9px;
}

.administration-benchmark-detail-section h4 {
    font-size: 13px;
}

.administration-benchmark-table-shell {
    overflow-x: auto;
    border: 1px solid #2f2f2f;
    border-radius: 8px;
}

.administration-benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.administration-benchmark-table th,
.administration-benchmark-table td {
    padding: 8px 9px;
    border-bottom: 1px solid #292929;
    color: #bdbdbd;
    text-align: right;
    white-space: nowrap;
}

.administration-benchmark-table thead th {
    background: #181818;
    color: #8f8f8f;
    font-size: 10px;
    text-transform: uppercase;
}

.administration-benchmark-table th:first-child,
.administration-benchmark-table td:first-child,
.administration-benchmark-table tbody th {
    text-align: left;
}

.administration-benchmark-table tr:last-child th,
.administration-benchmark-table tr:last-child td {
    border-bottom: 0;
}

.administration-benchmark-model-list {
    display: grid;
    gap: 8px;
}

.administration-benchmark-model-card {
    display: grid;
    gap: 4px;
    padding: 9px 10px;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    background: #171717;
}

.administration-benchmark-model-card strong {
    overflow-wrap: anywhere;
    color: #ddd;
    font-size: 11px;
}

.administration-benchmark-model-card small {
    color: #8f8f8f;
    font-size: 10px;
}

.administration-benchmark-model-card code {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #9fcdf5;
    font-size: 10px;
    line-height: 1.4;
    white-space: normal;
}

.administration-benchmark-compare-card {
    justify-items: stretch;
}

.administration-benchmark-compare-controls {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.administration-benchmark-compare-controls label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
}

.administration-benchmark-compare-controls select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 30px 9px 10px;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    outline: none;
    background: #111;
    color: #eee;
    color-scheme: dark;
    font: inherit;
}

.administration-benchmark-compare-controls select:focus {
    border-color: rgba(93, 156, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.administration-benchmark-compare-layout {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.administration-benchmark-compare-layout > .administration-empty-state {
    grid-column: 1 / -1;
}

.administration-benchmark-compare-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #303030;
    border-radius: 10px;
    background: #121212;
}

.administration-benchmark-compare-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.administration-benchmark-compare-panel-header > div {
    min-width: 0;
}

.administration-benchmark-compare-panel-header span {
    color: #7f7f7f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.administration-benchmark-compare-panel-header h4 {
    margin: 3px 0 0;
    overflow: hidden;
    color: #e5e5e5;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-benchmark-compare-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.administration-benchmark-compare-meta > div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid #292929;
    border-radius: 7px;
    background: #171717;
}

.administration-benchmark-compare-meta span {
    color: #777;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.administration-benchmark-compare-meta strong {
    overflow-wrap: anywhere;
    color: #d4d4d4;
    font-size: 10px;
}

.administration-benchmark-delta {
    display: inline-block;
    margin-left: 5px;
    font-size: 9px;
    font-weight: 800;
}

.administration-benchmark-delta.is-gain {
    color: #72d99c;
}

.administration-benchmark-delta.is-loss {
    color: #ff8f8f;
}

.administration-benchmark-delta.is-neutral {
    color: #8f8f8f;
}

/* Shared Aethon range style: match the Audio control panel everywhere. */
.administration-slider-control input[type="range"],
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider) {
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    accent-color: #2f7ac2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.administration-slider-control input[type="range"]::-webkit-slider-runnable-track,
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider)::-webkit-slider-runnable-track {
    height: 7px;
    border: 1px solid #050505;
    border-radius: 999px;
    background: #101010;
}

.administration-slider-control input[type="range"]::-webkit-slider-thumb,
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider)::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    background: #2f7ac2;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    appearance: none;
    -webkit-appearance: none;
}

.administration-slider-control input[type="range"]::-moz-range-track,
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider)::-moz-range-track {
    height: 7px;
    border: 1px solid #050505;
    border-radius: 999px;
    background: #101010;
}

.administration-slider-control input[type="range"]::-moz-range-progress,
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider)::-moz-range-progress {
    height: 7px;
    border-radius: 999px;
    background: #2f7ac2;
}

.administration-slider-control input[type="range"]::-moz-range-thumb,
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider)::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 0;
    border-radius: 50%;
    background: #2f7ac2;
}

.administration-slider-control input[type="range"]:disabled,
.smart-hub-panel input[type="range"]:not(.smart-hub-hue-slider):disabled {
    cursor: default;
    opacity: 0.48;
}



/* Manage Assistant memory filters and protected deletion */
.assistant-memory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.assistant-memory-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid #343434;
    border-radius: 999px;
    background: #171717;
    color: #777777;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.66;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        opacity 0.15s ease;
}

.assistant-memory-filter:hover {
    border-color: #4a4a4a;
    color: #bdbdbd;
    opacity: 0.9;
}

.assistant-memory-filter.is-active {
    border-color: rgba(93, 156, 255, 0.42);
    background: rgba(35, 82, 128, 0.38);
    color: #d9ebff;
    opacity: 1;
}

.assistant-memory-filter:focus-visible {
    outline: 2px solid #5d9cff;
    outline-offset: 2px;
}

.wizard-button-danger {
    margin: 0;
    border: 1px solid rgba(238, 104, 104, 0.42);
    background: rgba(128, 31, 31, 0.34);
    color: #ffb0b0;
}

.wizard-button-danger:not(:disabled):hover {
    border-color: rgba(241, 104, 104, 0.7);
    background: rgba(151, 39, 39, 0.52);
    color: #ffffff;
}

.wizard-footer #deleteAssistantButton {
    margin: 0 14px 0 0;
    transform: translateY(1px);
}

.assistant-asset-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10960;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 8, 8, 0.50);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    backdrop-filter: blur(10px) saturate(125%);
    animation: assistant-settings-fade-in 160ms ease both;
}

.assistant-asset-dialog-overlay.is-hidden {
    display: none;
}

.assistant-asset-dialog-panel {
    width: min(480px, calc(100vw - 36px));
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(27, 27, 27, 0.94);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
    animation: assistant-settings-panel-in 160ms ease both;
}

.assistant-asset-dialog-eyebrow {
    color: #83c8f5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.assistant-asset-dialog-panel h2 {
    margin: 7px 0 0;
    font-size: 21px;
}

.assistant-asset-dialog-panel > p {
    margin: 10px 0 0;
    color: var(--secondary-text);
    font-size: 13px;
    line-height: 1.55;
}

.assistant-asset-dialog-options {
    display: grid;
    gap: 9px;
    margin-top: 18px;
}

.assistant-asset-dialog-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    margin: 0 !important;
    padding: 11px 12px;
    border: 1px solid rgba(111, 151, 207, 0.28);
    border-radius: 10px;
    background: rgba(12, 24, 39, 0.45);
    cursor: pointer;
}

.assistant-asset-dialog-option input {
    margin: 3px 0 0;
}

.assistant-asset-dialog-option span {
    display: grid;
    gap: 3px;
}

.assistant-asset-dialog-option strong {
    color: #e6edf7;
    font-size: 13px;
}

.assistant-asset-dialog-option small {
    color: #91a3bb;
    font-size: 11px;
    line-height: 1.4;
}

.assistant-asset-dialog-email {
    display: grid !important;
    gap: 7px;
    margin: 14px 0 0 !important;
}

.assistant-asset-dialog-email > span {
    color: #d7d7d7;
    font-size: 12px;
    font-weight: 700;
}

.assistant-asset-dialog-email input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid #3a3a3a;
    border-radius: 9px;
    background: #101010;
    color: var(--primary-text);
    font: inherit;
}

.assistant-asset-dialog-email input:focus {
    border-color: #5d9cff;
    outline: none;
}

.assistant-asset-dialog-email input:disabled {
    opacity: 0.5;
}

.assistant-asset-dialog-error {
    margin-top: 9px;
    color: #ff9d9d;
    font-size: 12px;
}

.assistant-asset-dialog-error[hidden] {
    display: none;
}

.assistant-asset-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.assistant-shared-browser-overlay {
    position: fixed;
    inset: 0;
    z-index: 10960;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 10, 13, 0.54);
    -webkit-backdrop-filter: blur(12px) saturate(125%);
    backdrop-filter: blur(12px) saturate(125%);
    animation: assistant-settings-fade-in 160ms ease both;
}

.assistant-shared-browser-overlay.is-hidden {
    display: none;
}

.assistant-shared-browser-panel {
    width: min(1120px, calc(100vw - 48px));
    height: min(780px, calc(100vh - 48px));
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(112, 139, 174, 0.56);
    border-radius: 18px;
    background: rgba(16, 20, 25, 0.96);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
    animation: assistant-settings-panel-in 160ms ease both;
}

.assistant-shared-browser-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #10151b;
    touch-action: none;
    user-select: none;
}

.assistant-shared-browser-backdrop {
    position: absolute;
    inset: -1px;
    z-index: 0;
    background:
        linear-gradient(rgba(8, 12, 17, 0.16), rgba(8, 12, 17, 0.24)),
        url("../Images/ChangingRoom.png") center center / cover no-repeat,
        #10151b;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: 50% 50%;
    will-change: transform;
    pointer-events: none;
}

#assistantSharedAvatarCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.assistant-shared-browser-viewport.is-interacting #assistantSharedAvatarCanvas {
    cursor: grabbing;
}

.assistant-shared-browser-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    padding: 9px 13px;
    border: 1px solid rgba(122, 153, 195, 0.3);
    border-radius: 10px;
    background: rgba(10, 15, 21, 0.72);
    color: #d8e8fb;
    font-size: 13px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.assistant-shared-browser-loading.is-hidden {
    display: none;
}

.assistant-shared-browser-topbar {
    position: absolute;
    z-index: 8;
    top: 18px;
    left: 50%;
    width: min(260px, calc(100% - 380px));
    transform: translateX(-50%);
    display: grid;
    justify-items: center;
}

.assistant-shared-browser-title {
    color: rgba(235, 244, 255, 0.82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.88);
}

.assistant-shared-browser-avatar-picker,
.assistant-shared-picker {
    position: relative;
    width: 100%;
}

.assistant-shared-browser-avatar-picker {
    padding-bottom: 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(112, 139, 174, 0.28);
}

.assistant-shared-browser-clothing {
    position: absolute;
    z-index: 7;
    top: 22px;
    bottom: 72px;
    left: 18px;
    width: 270px;
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 12px;
    overflow-y: auto;
    border: 1px solid rgba(112, 139, 174, 0.34);
    border-radius: 14px;
    background: rgba(13, 18, 24, 0.62);
    -webkit-backdrop-filter: blur(11px) saturate(120%);
    backdrop-filter: blur(11px) saturate(120%);
    scrollbar-width: thin;
}

.assistant-shared-browser-clothing-list {
    display: grid;
    align-content: start;
    gap: 9px;
}

.assistant-shared-browser-clothing-list.is-disabled {
    opacity: 0.48;
}

.assistant-shared-picker-label {
    display: block;
    margin: 0 0 5px 3px;
    color: rgba(223, 235, 248, 0.82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.035em;
}

.assistant-shared-picker-trigger {
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 12px;
    border: 1px solid rgba(110, 149, 198, 0.5);
    border-radius: 10px;
    background: rgba(15, 29, 45, 0.82);
    color: #eef6ff;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.assistant-shared-browser-avatar-picker .assistant-shared-picker-trigger {
    min-height: 40px;
    font-size: 13px;
}

.assistant-shared-picker-trigger:hover:not(:disabled),
.assistant-shared-picker.is-open .assistant-shared-picker-trigger {
    border-color: rgba(116, 198, 255, 0.82);
    background: rgba(22, 49, 76, 0.9);
}

.assistant-shared-picker-trigger:disabled {
    cursor: default;
    opacity: 0.58;
}

.assistant-shared-picker-trigger-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-shared-picker-chevron {
    color: #8ebee6;
    font-size: 12px;
    transition: transform 120ms ease;
}

.assistant-shared-picker.is-open .assistant-shared-picker-chevron {
    transform: rotate(180deg);
}

.assistant-shared-picker-menu {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid rgba(111, 151, 202, 0.54);
    border-radius: 10px;
    background: rgba(9, 16, 24, 0.97);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
}

.assistant-shared-picker-menu[hidden] {
    display: none;
}

.assistant-shared-picker-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 34px;
    padding: 3px 5px 3px 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #dce9f7;
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.assistant-shared-picker-option:hover {
    background: rgba(43, 82, 124, 0.42);
}

.assistant-shared-picker-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(123, 154, 190, 0.48);
    border-radius: 5px;
    color: transparent;
    font-size: 13px;
    font-weight: 900;
}

.assistant-shared-picker-option.is-selected .assistant-shared-picker-check {
    border-color: rgba(88, 214, 141, 0.74);
    background: rgba(40, 117, 72, 0.34);
    color: #58d68d;
}

.assistant-shared-picker-option-copy {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-shared-picker-option-copy small {
    margin-left: 5px;
    color: #ff8a8a;
    font-size: 10px;
    font-weight: 800;
}

.assistant-shared-picker-plus {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    padding: 0;
    border: 1px solid rgba(116, 198, 255, 0.44);
    border-radius: 7px;
    background: rgba(33, 113, 174, 0.18);
    color: #a7cdec;
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.assistant-shared-picker-plus:hover:not(:disabled) {
    border-color: rgba(88, 214, 141, 0.66);
    color: #bdf4d2;
}

.assistant-shared-picker-plus.is-queued {
    border-color: rgba(88, 214, 141, 0.78);
    background: rgba(40, 117, 72, 0.34);
    color: #58d68d;
    box-shadow: 0 0 0 1px rgba(88, 214, 141, 0.14) inset;
}

.assistant-shared-picker-plus:disabled {
    opacity: 0.25;
    cursor: default;
}

.assistant-shared-browser-actions {
    position: absolute;
    z-index: 8;
    right: 18px;
    bottom: 18px;
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(112, 139, 174, 0.3);
    border-radius: 12px;
    background: rgba(11, 16, 22, 0.66);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.assistant-shared-browser-status {
    position: absolute;
    z-index: 8;
    left: 306px;
    right: 190px;
    bottom: 25px;
    color: rgba(229, 239, 250, 0.88);
    font-size: 12px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.assistant-shared-browser-status.is-error {
    color: #ff9d9d;
}

@media (max-width: 820px) {
    .assistant-shared-browser-overlay {
        padding: 10px;
    }

    .assistant-shared-browser-panel {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        min-height: 0;
    }

    .assistant-shared-browser-topbar {
        top: 10px;
        width: calc(100% - 28px);
    }

    .assistant-shared-browser-clothing {
        top: auto;
        left: 10px;
        right: 10px;
        bottom: 72px;
        width: auto;
        max-height: 46%;
    }

    .assistant-shared-browser-clothing-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assistant-shared-browser-status {
        left: 10px;
        right: 160px;
        bottom: 20px;
        text-align: left;
    }
}

.assistant-delete-overlay {
    position: fixed;
    inset: 0;
    z-index: 10950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 8, 8, 0.50);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    backdrop-filter: blur(10px) saturate(125%);
    animation: assistant-settings-fade-in 160ms ease both;
}

.assistant-delete-overlay.is-hidden {
    display: none;
}

.assistant-delete-panel {
    width: min(460px, calc(100vw - 36px));
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(27, 27, 27, 0.94);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);
    animation: assistant-settings-panel-in 160ms ease both;
}

.assistant-delete-eyebrow {
    color: #ff8f8f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.assistant-delete-panel h2 {
    margin: 7px 0 0;
    font-size: 21px;
}

.assistant-delete-panel > p {
    margin: 10px 0 0;
    color: var(--secondary-text);
    font-size: 13px;
    line-height: 1.55;
}

.assistant-delete-password-field {
    display: grid;
    gap: 7px;
    margin: 20px 0 8px;
}

.assistant-delete-password-field span {
    color: #d7d7d7;
    font-size: 12px;
    font-weight: 700;
}

.assistant-delete-password-field input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid #3a3a3a;
    border-radius: 9px;
    background: #101010;
    color: var(--primary-text);
    font: inherit;
}

.assistant-delete-password-field input:focus {
    border-color: #5d9cff;
    outline: none;
}

.assistant-delete-error {
    margin-top: 8px;
    color: #ff9d9d;
    font-size: 12px;
}

.assistant-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.assistant-delete-actions .wizard-button-danger {
    margin-right: 0;
}

.administration-role-button {
    width: 100%;
}

.administration-benchmark-test-grid {
    display: grid;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-auto-rows: 64px;
    gap: 8px;
    margin: 14px 0;
}

.administration-benchmark-test-grid label {
    display: flex;
    min-width: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #303030;
    border-radius: 9px;
    background: #151515;
    color: #d7d7d7;
    font-size: 12px;
    cursor: pointer;
}

.administration-benchmark-test-grid input {
    margin-top: 1px;
    accent-color: #5d9cff;
}

.administration-benchmark-test-grid small {
    color: #8f8f8f;
}

/* Administration avatar sidebar polish */
.administration-avatar-section-chevron {
    display: none;
}

.administration-avatar-sidebar-only {
    display: none;
}

body.administration-avatar-dock-open .administration-avatar-sidebar-only {
    display: grid;
}

body.administration-avatar-dock-open
    .administration-avatar-section-disclosure {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 5px;
    min-height: 24px;
    cursor: pointer;
    user-select: none;
}

body.administration-avatar-dock-open
    .administration-avatar-section-disclosure > .administration-avatar-section-chevron {
    grid-column: 1;
    grid-row: 1;
}

body.administration-avatar-dock-open
    .administration-avatar-section-disclosure > h3,
body.administration-avatar-dock-open
    .administration-avatar-section-disclosure > div > h3 {
    grid-column: 2;
    grid-row: 1;
}

body.administration-avatar-dock-open
    .administration-section-heading-with-action.administration-avatar-section-disclosure > div {
    display: contents;
}

body.administration-avatar-dock-open
    .administration-avatar-section-disclosure > p,
body.administration-avatar-dock-open
    .administration-avatar-section-disclosure > div > p {
    grid-column: 2 / -1;
    grid-row: 2;
    margin: 0;
}

body.administration-avatar-dock-open
    .administration-avatar-section-disclosure > .administration-speech-preview-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

body.administration-avatar-dock-open
    .administration-avatar-section-disclosure:focus-visible {
    outline: 2px solid #5d9cff;
    outline-offset: 4px;
    border-radius: 5px;
}

body.administration-avatar-dock-open
    .administration-avatar-section-chevron {
    display: inline-flex;
    width: 14px;
    flex: 0 0 14px;
    align-items: center;
    justify-content: center;
    color: #8e8e8e;
    font-size: 21px;
    line-height: 1;
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.15s ease, color 0.15s ease;
}

body.administration-avatar-dock-open
    .administration-avatar-section:not(.is-collapsed)
    .administration-avatar-section-chevron {
    transform: rotate(90deg);
    color: #c8c8c8;
}

/* Collapsing exists only in the undocked Avatar tuning sidebar. */
body.administration-avatar-dock-open
    .administration-avatar-section.is-collapsed
    > :not(.administration-section-heading) {
    display: none !important;
}

body.administration-avatar-dock-open
    .administration-avatar-section.is-collapsed
    > .administration-section-heading p,
body.administration-avatar-dock-open
    .administration-avatar-section.is-collapsed
    > .administration-section-heading .administration-speech-preview-button {
    display: none !important;
}

body.administration-avatar-dock-open
    .administration-avatar-section.is-collapsed
    > .administration-section-heading {
    margin-bottom: 0;
}

.administration-avatar-test-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid #292929;
    border-radius: 9px;
    background: #141414;
}

.administration-avatar-test-toolbar > .administration-avatar-test-field:only-child {
    grid-column: 1 / -1;
}

.administration-avatar-test-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
    color: #888888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.administration-avatar-test-field select {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 9px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: #1b1b1b;
    color: #e3e3e3;
    font-size: 12px;
}

.administration-tuning-group-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.administration-style-speech-preview-button {
    flex: 0 0 auto;
}

.administration-style-speech-preview-button:hover:not(:disabled) {
    transform: scale(1.05);
}

.administration-style-speech-preview-button:disabled {
    transform: none;
}

.avatar-processing-status-copy {
    display: inline-flex;
    align-items: baseline;
    line-height: inherit;
    white-space: nowrap;
    backface-visibility: hidden;
}

.avatar-processing-status-elapsed {
    display: inline-flex;
    align-items: baseline;
    width: auto;
    margin-left: 0.25ch;
    line-height: inherit;
    vertical-align: baseline;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    text-align: left;
    contain: layout paint;
}

.chat-panel.is-avatar-display-mode .avatar-processing-status-elapsed {
    transform: translateY(2px);
}

.avatar-processing-status-elapsed[hidden] {
    display: none;
}

#avatarProcessingStatusElapsedValue {
    display: inline-block;
    min-width: 0;
    line-height: inherit;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.chat-panel.is-avatar-display-mode #avatarProcessingStatusElapsedValue {
    transform: translateY(2px);
}


/* 2026-08-27: parental controls, Administration invitations, Shared preview polish */
.assistant-parental-lock-note {
    padding: 9px 11px;
    border: 1px solid rgba(93, 156, 255, 0.28);
    border-radius: 8px;
    background: rgba(34, 84, 135, 0.14);
    color: #abcdf0;
    font-size: 12px;
    line-height: 1.45;
}

.account-parental-subtabs {
    display: inline-flex;
    justify-self: start;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #111111;
}

.account-parental-subtab {
    min-height: 32px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted-text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.account-parental-subtab:hover:not(:disabled),
.account-parental-subtab:focus-visible {
    background: rgba(255, 255, 255, 0.045);
    color: var(--primary-text);
}

.account-parental-subtab.is-active {
    background: #252525;
    color: #ffffff;
    box-shadow: 0 0 0 1px #343434 inset;
}

.account-parental-subtab-panel {
    display: grid;
    gap: 18px;
}

.account-parental-subtab-panel[hidden] {
    display: none !important;
}

.account-parental-master-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.account-parent-list {
    display: grid;
    gap: 8px;
}

.account-parent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 9px 13px;
    border: 1px solid #303030;
    border-radius: 9px;
    background: #121212;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.account-parent-row:hover {
    border-color: #444444;
    background: #171717;
}

.account-parent-row.is-selected {
    border-color: rgba(93, 156, 255, 0.52);
    background: rgba(35, 82, 128, 0.25);
    box-shadow: 0 0 0 1px rgba(93, 156, 255, 0.08) inset;
}

.account-parent-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.account-parent-copy strong,
.account-parent-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-parent-copy strong {
    color: var(--primary-text);
    font-size: 13px;
}

.account-parent-copy span {
    color: var(--muted-text);
    font-size: 11px;
}

.account-parental-content-settings {
    margin-top: 13px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.account-parental-content-settings.is-disabled {
    opacity: 0.48;
}

.account-parental-content-setting > div:first-child {
    min-width: 0;
}

.account-parental-lock-pill {
    min-height: 28px;
    padding: 4px 10px;
    font-weight: 700;
}

.account-parental-lock-pill:disabled {
    cursor: default;
}

.account-parental-content-subsettings {
    margin-top: 2px;
}

.account-parent-actions {
    justify-content: flex-start;
    margin-top: -2px;
}

.account-parental-usage-settings {
    display: grid;
    gap: 8px;
}

.account-parental-usage-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 52px;
    padding: 9px 12px;
    border: 1px solid #303030;
    border-radius: 9px;
    background: #121212;
}

.account-parental-usage-copy {
    display: grid;
    gap: 2px;
}

.account-parental-usage-copy strong {
    color: var(--primary-text);
    font-size: 13px;
}

.account-parental-usage-copy small {
    color: var(--muted-text);
    font-size: 11px;
}

.account-parental-usage-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.account-parental-duration-field,
.account-parental-duration-field.chat-mic-settings-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 178px;
    margin: 0;
}

.account-parental-duration-field .chat-mic-number-control {
    width: 126px;
    margin: 0;
}

.account-parental-duration-field > span {
    color: var(--muted-text);
    font-size: 11px;
    font-weight: 600;
}

.account-parental-schedule {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.account-parental-schedule-row {
    display: grid;
    grid-template-columns: 54px minmax(92px, 1fr) auto minmax(92px, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 9px;
    border: 1px solid #303030;
    border-radius: 9px;
    background: #121212;
}

.account-parental-schedule-row > span {
    color: var(--muted-text);
    font-size: 11px;
}

.account-parental-day-pill {
    width: 50px;
    min-height: 28px;
    padding-inline: 7px;
}

.account-parental-time-input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    outline: none;
    background: #0d0d0d;
    color: var(--primary-text);
    color-scheme: dark;
    font: inherit;
    font-size: 12px;
}

.account-parental-time-input:focus {
    border-color: #5d9cff;
    box-shadow: 0 0 0 3px rgba(93, 156, 255, 0.12);
}

.account-parental-time-input:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.account-managed-child-list {
    display: grid;
    gap: 14px;
}

.account-managed-child-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #101010;
}

.account-managed-child-heading,
.account-managed-child-schedule-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-managed-child-heading .account-parent-copy {
    min-width: 0;
}

.account-managed-child-master {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.account-managed-child-section {
    display: grid;
    gap: 9px;
    padding-top: 11px;
    border-top: 1px solid #292929;
}

.account-managed-child-section h4,
.account-managed-child-schedule-heading h4 {
    margin: 0;
    color: var(--primary-text);
    font-size: 13px;
}

.account-managed-child-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.account-managed-child-actions .account-secondary-action {
    min-width: 154px;
}

.parent-auth-panel {
    position: relative;
}

.parent-auth-close-button {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 1;
}

.parent-auth-panel .assistant-delete-password-field + .assistant-delete-password-field {
    margin-top: 12px;
}

.administration-invitations-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 7px;
}

.administration-invitations-intro h3 {
    margin: 0 0 4px;
    color: var(--primary-text);
}

.administration-invitations-intro p {
    margin: 0;
    color: var(--muted-text);
    font-size: 12px;
    line-height: 1.5;
}

.administration-invitation-card {
    display: grid;
    gap: 16px;
    margin: 12px 22px 18px;
    padding: 17px;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #121212;
}

.administration-invitation-setting-row {
    display: grid;
    grid-template-columns: minmax(320px, 430px) auto;
    align-items: start;
    justify-content: start;
    gap: 32px;
    padding: 12px 13px;
    border: 1px solid #303030;
    border-radius: 9px;
    background: #171717;
}

.administration-invitation-setting-copy {
    display: grid;
    gap: 4px;
}

.administration-invitation-setting-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 34px;
}

.administration-invitation-setting-copy strong,
.administration-invitation-number-field > span,
.administration-invitation-email-field > span {
    color: var(--primary-text);
    font-size: 13px;
    font-weight: 700;
}

.administration-invitation-setting-copy small {
    color: var(--muted-text);
    font-size: 11px;
    line-height: 1.4;
}

.administration-invitation-number-field,
.administration-invitation-number-field.chat-mic-settings-grid {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    min-height: 34px;
}

.administration-invitation-number-field .chat-mic-number-control {
    width: 170px;
    margin-top: 0;
}

.administration-invitation-actions {
    display: flex;
    justify-content: flex-end;
}

.administration-invitation-generate-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.administration-invitation-generate-row .administration-button {
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
}

.administration-invitation-email-field {
    display: grid;
    gap: 6px;
}

.administration-invitation-email-field input {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background: #0c0c0c;
    color: var(--primary-text);
    caret-color: var(--primary-text);
    font: inherit;
}

.administration-invitation-email-field input:focus {
    border-color: rgba(93, 156, 255, .72);
    box-shadow: 0 0 0 3px rgba(93, 156, 255, .12);
}

.administration-invitation-email-field input:-webkit-autofill,
.administration-invitation-email-field input:-webkit-autofill:hover,
.administration-invitation-email-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--primary-text);
    -webkit-box-shadow: 0 0 0 1000px #0c0c0c inset;
    transition: background-color 9999s ease-out 0s;
}

.administration-invitation-list {
    display: grid;
    gap: 7px;
}

.administration-invitation-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 82px;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 9px 11px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: #0e0e0e;
}

.administration-invitation-list-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.administration-invitation-list-identity strong,
.administration-invitation-list-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.administration-invitation-list-identity strong {
    color: var(--primary-text);
    font-size: 12px;
}

.administration-invitation-list-identity span,
.administration-invitation-days {
    color: var(--muted-text);
    font-size: 11px;
}

.administration-invitation-state {
    justify-self: end;
    min-width: 62px;
    padding: 4px 8px;
    border: 1px solid #383838;
    border-radius: 999px;
    color: #a7a7a7;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.administration-invitation-state.is-pending {
    border-color: rgba(93, 156, 255, 0.42);
    background: rgba(35, 82, 128, 0.28);
    color: #cfe5ff;
}

.administration-invitation-state.is-used {
    border-color: rgba(88, 214, 141, 0.38);
    background: rgba(40, 117, 72, 0.22);
    color: #bdf4d2;
}

.administration-invitation-empty {
    padding: 11px;
    border: 1px dashed #343434;
    border-radius: 8px;
    color: var(--muted-text);
    font-size: 11px;
    text-align: center;
}


/* Document attachments and Assistant Assets document thumbnails. */
.chat-document-attachment-list {
    display: grid;
    width: 100%;
    gap: 2px;
    margin: 8px 0 2px;
}

.chat-document-attachment-row {
    display: grid;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

    .chat-document-attachment-row:hover .chat-document-attachment-name,
    .chat-document-attachment-row:focus-visible .chat-document-attachment-name {
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    .chat-document-attachment-row:focus-visible {
        outline: 1px solid rgba(93, 156, 255, 0.7);
        outline-offset: 2px;
    }

.chat-document-attachment-icon {
    position: relative;
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: currentColor;
    opacity: 0.9;
}

.chat-document-attachment-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
}

.chat-document-attachment-extension {
    max-width: 32px;
    margin-top: -2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.47rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.035em;
}

.chat-document-attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    line-height: 1.25;
}

.chat-assistant-document-list {
    margin-top: 10px;
}

.asset-document-thumbnail {
    display: flex;
    width: 62px;
    height: 62px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    opacity: 0.92;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.asset-document-thumbnail svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
}

.asset-document-thumbnail span {
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.64rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.045em;
}

/* Conversation workspace */
.sidebar-workspace-entry {
    flex: 0 0 auto;
}

.sidebar-workspace-divider {
    height: 1px;
    margin: 0;
    background: var(--border-color);
}

.sidebar-workspace-button {
    margin: 8px 0;
}

.sidebar-workspace-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.sidebar-workspace-button:disabled:hover {
    background: transparent;
}

.sidebar.is-collapsed .sidebar-workspace-entry {
    display: none;
}

.project-workspace-drawer {
    display: flex;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    background: var(--sidebar-background);
    border-right: 0 solid var(--border-color);
    transition: width 0.24s ease, flex-basis 0.24s ease, opacity 0.18s ease, border-width 0.24s ease;
}

.project-workspace-drawer.is-open {
    flex-basis: 360px;
    width: 360px;
    opacity: 1;
    border-right-width: 1px;
}

.project-workspace-header {
    flex: 0 0 auto;
    padding: 17px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}

.project-workspace-heading {
    margin-bottom: 10px;
    color: var(--primary-text);
    font-size: 15px;
    font-weight: 700;
}

.project-workspace-location-group {
    display: grid;
    gap: 2px;
    margin-bottom: 8px;
}

.project-workspace-path {
    overflow: hidden;
    color: var(--secondary-text);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.project-workspace-vs-path {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.project-workspace-vs-path-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--secondary-text);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-workspace-checksums {
    display: grid;
    gap: 2px;
    margin: 7px 0 8px;
}

.project-workspace-checksum {
    min-width: 0;
    overflow: hidden;
    color: var(--secondary-text);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.16s ease;
}

.project-workspace-checksum.is-match {
    color: #9fc79f;
}

.project-workspace-checksum.is-different {
    color: #f0a2a2;
}

.project-workspace-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 1px 0 0;
}

.project-workspace-tool-button-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 31px;
}

.project-workspace-pending-indicator {
    position: absolute;
    z-index: 7;
    top: -5px;
    right: -5px;
    display: inline-flex;
    width: 14px;
    height: 14px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #d64848;
    color: #ffffff;
    cursor: help;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--panel-bg, #171717);
}

.project-workspace-pending-indicator::before {
    content: "i";
    transform: translateY(-0.25px);
}

.project-workspace-pending-indicator::after {
    position: absolute;
    z-index: 20;
    top: calc(100% + 7px);
    left: 0;
    width: max-content;
    max-width: min(300px, calc(100vw - 40px));
    padding: 7px 9px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #101010;
    color: var(--primary-text);
    content: attr(data-tooltip);
    font-family: inherit;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    white-space: pre-line;
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.project-workspace-pending-indicator:hover::after,
.project-workspace-pending-indicator:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.project-workspace-pending-indicator:focus-visible {
    outline: 1px solid #ff9b9b;
    outline-offset: 2px;
}

.project-workspace-tool-button {
    display: inline-flex;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: #6aa7ff;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

.project-workspace-tool-button:hover:not(:disabled),
.project-workspace-tool-button:focus-visible:not(:disabled) {
    border-color: #4f9cff;
    background: rgba(79, 156, 255, 0.10);
    color: #a8c9ff;
    outline: none;
}

.project-workspace-tool-button:disabled {
    opacity: 0.38;
    cursor: default;
}

.project-workspace-tool-button.is-remove {
    color: #dc7474;
}

.project-workspace-tool-button.is-remove:hover:not(:disabled),
.project-workspace-tool-button.is-remove:focus-visible:not(:disabled) {
    border-color: #d96464;
    background: rgba(217, 100, 100, 0.10);
    color: #f0a0a0;
}

.project-workspace-tool-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-workspace-vs-copy {
    display: inline-flex;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: #6aa7ff;
    cursor: pointer;
}

.project-workspace-vs-copy:hover,
.project-workspace-vs-copy:focus-visible {
    border-color: #4f9cff;
    color: #9bc2ff;
}

.project-workspace-vs-copy:disabled {
    opacity: .45;
    cursor: default;
}

.project-workspace-vs-copy svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.project-workspace-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.project-workspace-link:hover {
    color: #8ab6ff;
}

.project-workspace-link:disabled {
    color: var(--secondary-text);
    cursor: default;
    opacity: 0.65;
}

.project-workspace-remove-link {
    margin-left: 10px;
}

.project-workspace-status {
    margin-top: 7px;
    color: var(--secondary-text);
    font-size: 11px;
    line-height: 1.35;
}

.project-workspace-status:empty {
    display: none;
    margin-top: 0;
}

.project-workspace-status-summary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.project-workspace-status-spinner {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: project-workspace-spin 0.8s linear infinite;
}

.project-workspace-status-path {
    margin-top: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
    opacity: 0.9;
}

@keyframes project-workspace-spin {
    to {
        transform: rotate(360deg);
    }
}

.project-workspace-trees {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.project-workspace-tree-section {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.project-workspace-tree-section + .project-workspace-tree-section {
    border-top: 1px solid var(--border-color);
}

.project-workspace-tree-header {
    flex: 0 0 auto;
    padding: 9px 13px 8px;
    color: var(--secondary-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-workspace-tree-counts {
    flex: 0 0 auto;
    padding: 0 13px 7px;
    color: var(--secondary-text);
    font-size: 11px;
    line-height: 1.25;
}

.project-workspace-file-search {
    position: relative;
    flex: 0 0 auto;
    padding: 0 10px 7px;
}

.project-workspace-file-search-control {
    width: 100%;
    height: 30px;
    padding: 5px 28px 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    outline: none;
    overflow: hidden;
    background: var(--sidebar-background);
    color: var(--primary-text);
    font: inherit;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}

.project-workspace-file-search-control:empty::before {
    content: attr(data-placeholder);
    color: var(--secondary-text);
    pointer-events: none;
}

.project-workspace-file-search-control:focus {
    border-color: rgba(87, 154, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(87, 154, 255, 0.18);
}

.project-workspace-file-search-clear {
    position: absolute;
    top: 4px;
    right: 14px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-blue);
    font: inherit;
    font-size: 17px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}

.project-workspace-file-search-clear:hover,
.project-workspace-file-search-clear:focus-visible {
    color: var(--primary-text);
}

.project-workspace-tree {
    min-height: 0;
    flex: 1 1 auto;
    padding: 2px 7px 10px;
    overflow: auto;
}

.project-workspace-empty {
    padding: 10px 8px;
    color: var(--secondary-text);
    font-size: 12px;
    line-height: 1.4;
}

.project-workspace-row {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 29px;
    align-items: center;
    gap: 6px;
    padding: 3px 7px 3px calc(7px + (var(--workspace-depth, 0) * 14px));
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--primary-text);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.project-workspace-row:hover,
.project-workspace-row:focus-visible {
    background: var(--sidebar-hover);
    outline: none;
}

.project-workspace-row.is-ignored {
    opacity: 0.5;
}

.project-workspace-row.is-selected {
    background: var(--sidebar-hover);
    outline: 1px solid rgba(106, 167, 255, 0.28);
    outline-offset: -1px;
}

.project-workspace-row.is-context-selected {
    background: var(--sidebar-hover);
    outline: 1px solid rgba(106, 167, 255, 0.36);
    outline-offset: -1px;
}

.project-workspace-row.is-search-match {
    background: rgba(224, 145, 45, 0.13);
    box-shadow: inset 2px 0 0 #e0912d;
}

.project-workspace-row.is-search-match .project-workspace-row-name {
    color: #f0a33a;
}

.project-workspace-row.is-different {
    background: rgba(223, 167, 64, 0.16);
    box-shadow: inset 2px 0 0 #dfa740;
}

.project-workspace-row.is-different:hover,
.project-workspace-row.is-different:focus-visible {
    background: rgba(223, 167, 64, 0.24);
}

.project-workspace-row.is-changed {
    background: rgba(55, 124, 255, 0.20);
    box-shadow: inset 2px 0 0 var(--accent);
}

.project-workspace-row.is-changed:hover,
.project-workspace-row.is-changed:focus-visible {
    background: rgba(55, 124, 255, 0.29);
}

.project-workspace-row-chevron {
    display: inline-flex;
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    align-items: center;
    justify-content: center;
    color: #8fb8ff;
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.12s ease;
}

.project-workspace-row-chevron svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-workspace-row-chevron.is-expanded {
    transform: rotate(90deg);
}

.project-workspace-row-icon {
    position: relative;
    display: inline-flex;
    width: 16px;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    font-size: 11px;
}

.project-workspace-row.is-folder .project-workspace-row-icon {
    color: #4f9cff;
}

.project-workspace-removal-badge {
    position: absolute;
    top: calc(50% - 5px);
    left: calc(50% - 4px);
    z-index: 5;
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    color: #ff5f5f;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9));
}

.project-workspace-removal-badge svg {
    width: 13px;
    height: 13px;
}

.project-workspace-row.is-pending-removal .project-workspace-row-name {
    opacity: 0.72;
}

.project-workspace-row-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-workspace-rename-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    min-width: 0;
    min-height: 29px;
    align-items: center;
    gap: 4px;
    padding: 3px 7px 3px calc(36px + (var(--workspace-depth, 0) * 14px));
    border-radius: 6px;
    background: var(--sidebar-hover);
    outline: 1px solid rgba(106, 167, 255, 0.36);
    outline-offset: -1px;
}

.project-workspace-rename-input {
    min-width: 0;
    height: 24px;
    padding: 0 6px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    background: var(--page-background);
    color: var(--primary-text);
    font: inherit;
    font-size: 12px;
}

.project-workspace-rename-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(111, 139, 255, 0.18);
}

.project-workspace-rename-save,
.project-workspace-rename-cancel {
    height: 24px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--secondary-text);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}

.project-workspace-rename-save {
    color: var(--accent);
}

.project-workspace-rename-save:hover,
.project-workspace-rename-cancel:hover {
    text-decoration: underline;
}

.project-workspace-rename-save:disabled,
.project-workspace-rename-cancel:disabled {
    opacity: 0.55;
    cursor: default;
}

.project-workspace-context-menu {
    position: fixed;
    z-index: 10050;
    display: grid;
    min-width: 184px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--sidebar-background);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.project-workspace-context-item {
    width: 100%;
    padding: 7px 9px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--primary-text);
    font: inherit;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.project-workspace-context-item:hover,
.project-workspace-context-item:focus-visible {
    background: var(--sidebar-hover);
    outline: none;
}

.project-workspace-context-submenu {
    position: relative;
}

.project-workspace-context-submenu-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-workspace-context-submenu-chevron {
    font-size: 15px;
    line-height: 1;
    opacity: 0.72;
}

.project-workspace-context-submenu-panel {
    position: absolute;
    top: -5px;
    left: 100%;
    z-index: 1;
    display: none;
    min-width: 210px;
    overflow: visible;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--sidebar-background);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.project-workspace-context-submenu:hover > .project-workspace-context-submenu-panel {
    display: grid;
}

.project-workspace-context-submenu-panel.is-scrollable {
    max-height: min(70vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.project-workspace-context-submenu.is-submenu-left > .project-workspace-context-submenu-panel {
    right: 100%;
    left: auto;
}

.project-workspace-context-item.is-destructive {
    color: #e5a5a5;
}

.project-workspace-context-separator {
    height: 1px;
    margin: 4px 3px;
    background: var(--border-color);
}

@media (max-width: 760px) {
    .sidebar-workspace-entry,
    .project-workspace-drawer {
        display: none !important;
    }
}

.chat-workspace-evidence-panel {
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 6px;
}

.chat-workspace-evidence-link {
    display: block;
    margin: 4px 0;
    color: #82b3ff;
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 0.78rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.chat-workspace-evidence-link:hover,
.chat-workspace-evidence-link:focus-visible {
    color: #b8d3ff;
    text-decoration: underline;
}

.chat-workspace-evidence-zip {
    margin-top: 4px;
    padding-top: 0;
    border-top: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 650;
}

.sidebar-workspace-entry + .sidebar-assets-entry {
    border-top: 0;
}

@media (max-width: 700px) {
    .document-preview-search {
        left: 10px;
        right: 10px;
        min-width: 0;
        max-width: none;
    }
}

.account-m365-connection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #101010;
}

.account-m365-identity {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.account-m365-identity strong {
    font-size: 14px;
}

.account-m365-identity small {
    color: var(--muted-text);
    line-height: 1.4;
}

.account-m365-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

/* Reusable rich-text controls. The signature editor is the first consumer; these
   classes are intentionally generic so document preview editing can reuse them. */
.rich-text-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: #101010;
}

.rich-text-toolbar-button {
    min-width: 34px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #171717;
    color: var(--primary-text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.rich-text-toolbar-button:hover,
.rich-text-toolbar-button:focus-visible {
    border-color: #5e91d6;
    background: #202020;
}

.rich-text-toolbar-separator {
    width: 1px;
    height: 24px;
    margin: 0 2px;
    background: var(--border-color);
}

.rich-text-editor {
    min-height: 150px;
    padding: 12px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0 0 9px 9px;
    outline: none;
    background: #0c0c0c;
    color: var(--primary-text);
    font: inherit;
    line-height: 1.45;
}

.rich-text-editor:focus {
    border-color: #5e91d6;
}

.rich-text-editor:empty::before {
    color: var(--muted-text);
    content: attr(data-placeholder);
    pointer-events: none;
}

.account-m365-signature-tabs {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    justify-self: start;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #0c0c0c;
}

.account-m365-signature-tab {
    min-height: 34px;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--secondary-text);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.account-m365-signature-tab.is-active {
    background: #202020;
    color: var(--primary-text);
}

.account-m365-signature-panel {
    margin-top: 10px;
}

.account-m365-signature-panel[hidden] {
    display: none;
}

.account-m365-signature-plain {
    box-sizing: border-box;
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: #0c0c0c;
    color: var(--primary-text);
    font: inherit;
    line-height: 1.45;
}

.account-m365-signature-plain:focus {
    border-color: #5e91d6;
}

.account-m365-signature-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.account-m365-monitor-form {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 10px;
}

.account-m365-monitor-form select,
.account-m365-monitor-form input {
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: #0c0c0c;
    color: var(--primary-text);
    font: inherit;
}

.account-m365-monitor-list {
    display: grid;
    gap: 8px;
}

.account-m365-monitor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #101010;
}

.account-m365-monitor-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.account-m365-monitor-copy strong {
    font-size: 12px;
}

.account-m365-monitor-copy span {
    overflow: hidden;
    color: var(--secondary-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-m365-monitor-remove {
    flex: 0 0 auto;
}

.chat-microsoft365-evidence-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    font-family: "Segoe UI", Arial, sans-serif;
}

@media (max-width: 900px) {
    .document-editor-toolbar-primary {
        align-items: stretch;
        flex-direction: column;
    }

    .document-preview-search {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex-basis: auto;
    }

    .document-editor-toolbar-row {
        overflow-x: auto;
    }
}

.document-viewer-text-shell.is-editing {
    overflow: hidden;
}

.document-viewer-text-shell.is-editing .document-viewer-line-numbers {
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    overflow: hidden;
    background: #101010;
}

.document-viewer-text-shell.is-editing .document-viewer-line-numbers-content {
    will-change: transform;
}

/* Mobile phone-unlock/passkey login. Hidden on desktop and unsupported devices. */
.login-auth-switcher {
    width: 100%;
    margin-bottom: 18px;
}

.login-auth-switcher .login-field {
    margin-bottom: 0;
}

.login-auth-tabs,
.login-auth-swipe-hint,
.login-phone-unlock-panel {
    display: none;
}

.login-auth-viewport,
.login-auth-track,
.login-auth-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.phone-unlock-enrollment {
    margin: 2px 0 18px;
    padding: 16px;
    border: 1px solid rgba(93, 156, 255, 0.38);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(93, 156, 255, 0.09), rgba(255, 255, 255, 0.012)), #12151b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.phone-unlock-enrollment[hidden],
.login-button[hidden] {
    display: none !important;
}

.phone-unlock-enrollment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    border: 1px solid rgba(93, 156, 255, 0.46);
    border-radius: 11px;
    background: rgba(46, 116, 187, 0.16);
    color: #8cc5ff;
    font-size: 19px;
    font-weight: 800;
}

.phone-unlock-enrollment-title {
    color: var(--primary-text);
    font-size: 15px;
    font-weight: 700;
}

.phone-unlock-enrollment-copy p {
    margin: 7px 0 5px;
    color: var(--secondary-text);
    font-size: 13px;
    line-height: 1.5;
}

.phone-unlock-enrollment-copy small {
    display: block;
    color: var(--muted-text);
    font-size: 11px;
    line-height: 1.45;
}

.phone-unlock-enrollment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 15px;
}

.phone-unlock-secondary-button,
.phone-unlock-primary-button {
    min-height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.phone-unlock-secondary-button {
    border: 1px solid #3a4657;
    background: #181d25;
    color: #c8d0dc;
}

.phone-unlock-primary-button {
    border: 1px solid #5d9cff;
    background: #2e74bb;
    color: #ffffff;
}

.phone-unlock-secondary-button:hover:not(:disabled) {
    border-color: #536174;
    background: #202733;
}

.phone-unlock-primary-button:hover:not(:disabled) {
    border-color: #71b7ff;
    background: #3582d1;
}

.phone-unlock-secondary-button:disabled,
.phone-unlock-primary-button:disabled {
    cursor: wait;
    opacity: 0.6;
}
