/* =============================================================================
   CLEAN FLOATING UI - No filters, clean shapes, semi-transparent
   ============================================================================= */

:root {
    --ui-bg: rgba(20, 20, 28, 0.75);
    --ui-bg-hover: rgba(30, 30, 42, 0.85);
    --ui-highlight: rgba(255, 255, 255, 0.14);
    --ui-border: rgba(255, 255, 255, 0.08);
    --ui-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --ui-transition: all 0.2s ease;
    --ui-accent: #5a0dd6;
    --ui-accent-2: #4900c2;
    --ui-text: #c8c8c8;
    --ui-muted: #a1a1aa;

    /* Liquid frost tokens: light edge reflex only (heavy inset stacks read as a thick black frame). */
    --c-glass: #bbbbbc;
    --c-light: #fff;
    --c-dark: #000;
    --glass-reflex-dark: 1.2;
    --glass-reflex-light: 0.9;
    --glass-saturation: 150%;
    --liquid-glass-shadow:
        inset 0 1px 0 color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 55%), transparent),
        inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 14%), transparent),
        0 12px 40px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] {
    --ui-bg: rgba(229, 223, 213, 0.98);
    --ui-bg-hover: rgba(214, 206, 196, 0.98);
    --ui-highlight: rgba(40, 32, 24, 0.14);
    --ui-border: rgba(40, 32, 24, 0.22);
    --ui-shadow: 0 2px 12px rgba(40, 32, 24, 0.16);
    --ui-accent: #5a0dd6;
    --ui-accent-2: #4900c2;
    --ui-text: #1a1714;
    --ui-muted: rgba(40, 32, 24, 0.62);
    --chrome-surface: #d4cec4;
    --chrome-surface-2: #e5dfd5;
}

[data-theme="stealth-float"] {
    --ui-bg: rgba(18, 18, 22, 0.62);
    --ui-bg-hover: rgba(18, 18, 22, 0.78);
    --ui-highlight: rgba(255, 255, 255, 0.14);
    --ui-border: rgba(255, 255, 255, 0.14);
    --ui-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);
    --glass-reflex-dark: 1.2;
    --glass-reflex-light: 0.85;
    --glass-saturation: 120%;
    --panel-fill-alpha: 0.62;
}

[data-theme="stealth-glass"] {
    --c-glass: #bbbbbc;
    --c-light: #fff;
    --c-dark: #000;
    --glass-reflex-dark: 1.4;
    --glass-reflex-light: 0.55;
    --glass-saturation: 155%;
}

[data-theme="stealth"] {
    --ui-bg: rgba(30, 18, 48, 0.82);
    --ui-bg-hover: rgba(53, 31, 82, 0.9);
    --ui-highlight: rgba(90, 13, 214, 0.22);
    --ui-border: rgba(196, 142, 255, 0.22);
    --ui-shadow: 0 4px 18px rgba(12, 4, 26, 0.55);
    --chrome-surface: #0e0a16;
    --chrome-surface-2: #1a1228;
}

[data-theme="dark"] {
    --ui-bg: rgba(20, 20, 28, 0.75);
    --ui-bg-hover: rgba(30, 30, 42, 0.85);
    --ui-highlight: rgba(255, 255, 255, 0.14);
    --ui-border: rgba(255, 255, 255, 0.08);
    --ui-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --chrome-surface: #111111;
    --chrome-surface-2: #1a1a1a;
}

/* Theme text and icon colors for browser chrome */
[data-theme="dark"] body,
[data-theme="dark"] .status-bar,
[data-theme="dark"] .tab,
[data-theme="dark"] .tab-title,
[data-theme="dark"] #address-bar,
[data-theme="dark"] .status-item,
[data-theme="dark"] .nav-btn,
[data-theme="dark"] .new-tab-btn,
[data-theme="dark"] #menu-btn,
[data-theme="dark"] #layout-toggle {
    color: #ffffff !important;
}

[data-theme="light"] body,
[data-theme="light"] .status-bar,
[data-theme="light"] .tab,
[data-theme="light"] .tab-title,
[data-theme="light"] #address-bar,
[data-theme="light"] .status-item,
[data-theme="light"] .nav-btn,
[data-theme="light"] .new-tab-btn,
[data-theme="light"] #menu-btn,
[data-theme="light"] #layout-toggle {
    color: #1a1714 !important;
}

[data-theme="light"] .tab.active,
[data-theme="light"] .tab.active .tab-title,
[data-theme="light"] .tab.active .tab-audio-btn,
html[data-theme="light"] .tab.active,
html[data-theme="light"] .tab.active .tab-title,
html[data-theme="light"] .tab.active .tab-audio-btn,
html.theme-light .tab.active,
html.theme-light .tab.active .tab-title,
html.theme-light .tab.active .tab-audio-btn {
    color: #ffffff !important;
}

[data-theme="light"] .glass-control-btn {
    color: rgba(28, 25, 22, 0.9) !important;
    background: rgba(236, 232, 224, 0.96) !important;
    border-color: rgba(55, 48, 40, 0.16) !important;
}

[data-theme="light"] .glass-control-btn:hover {
    color: #0f172a !important;
}

/* Light toolbar icon tint lives in styles.css (shared with per-icon dark colors). */

[data-theme="stealth"] body,
[data-theme="stealth"] .status-bar,
[data-theme="stealth"] .tab,
[data-theme="stealth"] .tab-title,
[data-theme="stealth"] #address-bar,
[data-theme="stealth"] .status-item,
[data-theme="stealth"] .nav-btn,
[data-theme="stealth"] .new-tab-btn,
[data-theme="stealth"] #menu-btn,
[data-theme="stealth"] #layout-toggle {
    color: #f5f3ff !important;
}

[data-theme="stealth"] .glass-control-btn {
    color: #f5f3ff !important;
    background: rgba(36, 26, 56, 0.92) !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
}

[data-theme="stealth"] .tab.active {
    color: #ffffff !important;
}

[data-theme="dark"] .browser-container::before {
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.9) 0%, rgba(10, 10, 15, 0.5) 40%, transparent 100%);
}

[data-theme="dark"] .browser-container::after {
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, rgba(10, 10, 15, 0.5) 40%, transparent 100%);
}

/* =============================================================================
   UI SCRIM - Gradient feathering at top/bottom for better contrast with blur
   ============================================================================= */

.browser-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, 
        rgba(10, 10, 15, 0.9) 0%, 
        rgba(10, 10, 15, 0.5) 40%,
        transparent 100%);
    z-index: 100000;
    pointer-events: none;
    display: block;
}

.browser-container.bottom-layout::before {
    display: none !important;
}

.browser-container::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, 
        rgba(10, 10, 15, 0.9) 0%, 
        rgba(10, 10, 15, 0.5) 40%,
        transparent 100%);
    z-index: 100000;
    pointer-events: none;
    display: none;
}

.browser-container.bottom-layout::after {
    display: none !important;
    background: none !important;
    height: 0 !important;
    opacity: 0 !important;
    content: none !important;
}

/* Never paint the bottom scrim over home/search (reads as a solid black bar). */
html.welcome-visible .browser-container::after,
body.welcome-visible .browser-container::after,
html.welcome-visible.bottom-layout-html .browser-container::after,
body.welcome-visible.bottom-layout-body .browser-container::after,
html.welcome-visible .browser-container.bottom-layout::after,
body.welcome-visible .browser-container.bottom-layout::after,
.browser-container.bottom-layout:has(.web-content.showing-welcome)::after,
.browser-container.bottom-layout:has(#welcome-screen:not(.is-hidden):not([hidden]))::after,
html.bottom-layout-html:has(.web-content.showing-welcome) .browser-container::after,
html.bottom-layout-html:has(#welcome-screen:not(.is-hidden):not([hidden])) .browser-container::after,
body.bottom-layout-body:has(.web-content.showing-welcome) .browser-container::after,
body.bottom-layout-body:has(#welcome-screen:not(.is-hidden):not([hidden])) .browser-container::after {
    display: none !important;
    background: none !important;
    height: 0 !important;
    opacity: 0 !important;
    content: none !important;
}

/* Light theme adjustments for scrim */
[data-theme="light"] .browser-container::before {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.3) 60%,
        transparent 100%);
}

[data-theme="light"] .browser-container::after {
    background: linear-gradient(to top, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.3) 60%,
        transparent 100%);
}

[data-theme="stealth"] .browser-container::before {
    background: linear-gradient(to bottom, rgba(19, 8, 35, 0.94) 0%, rgba(31, 13, 55, 0.58) 42%, transparent 100%);
}

[data-theme="stealth"] .browser-container::after {
    background: linear-gradient(to top, rgba(19, 8, 35, 0.94) 0%, rgba(31, 13, 55, 0.58) 42%, transparent 100%);
}

/* Stealth Glass: no scrim. Any translucent gradient over the DWM key color
   (#010103) shifts those pixels off-key and turns the glass into an opaque
   haze, so the feathering layers are removed entirely for this theme. */
html[data-theme="stealth-glass"] .browser-container::before,
html[data-theme="stealth-glass"] .browser-container::after,
html.theme-stealth-glass .browser-container::before,
html.theme-stealth-glass .browser-container::after {
    display: none !important;
    background: none !important;
}

/* =============================================================================
   TITLEBAR - Minimal floating controls, no solid bar
   ============================================================================= */

.glass-titlebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--titlebar-height, 40px);
    /* Chrome band only. Floating overlays (menus, AI, Stealth Glass) must
       sit above this or they get trapped under the tab strip. */
    z-index: 100003;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    /* Controls sit in-flow at the end of this row; no ghost gutter needed. */
    padding: 0 8px;
    gap: 6px;
    background: transparent !important;
    /* Top dock: the bar itself receives empty-space caption drags. Interactive
       children stay clickable. Bottom dock overrides to pointer-events:none so
       empty band does not steal hits from the toolbar above the dock. */
    -webkit-app-region: no-drag;
    pointer-events: auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    user-select: none !important;
    -webkit-user-select: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* hidden+visible collapses to auto per CSS and grows a classic Windows
       scrollbar (up/down arrows) that strobes beside the close button. */
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.glass-titlebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Page load progress along the edge of the tab strip */
.tab-loading-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 2px;
    overflow: hidden;
    pointer-events: none !important;
    -webkit-app-region: no-drag !important;
    opacity: 0;
    z-index: 30;
    transition: opacity 0.18s ease;
    background: transparent;
}

.tab-loading-bar.is-active {
    opacity: 1;
}

.tab-loading-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 0;
    background: linear-gradient(90deg, #7b5cff 0%, #a78bff 55%, #c4b5fd 100%);
    box-shadow: 0 0 8px rgba(123, 92, 255, 0.45);
    transition: width 0.16s linear;
    will-change: width;
}

.tab-loading-bar.is-active .tab-loading-bar-fill {
    animation: tab-loading-sheen 1.1s linear infinite;
}

@keyframes tab-loading-sheen {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.18); }
    100% { filter: brightness(1); }
}

.bottom-layout-html .tab-loading-bar,
.bottom-layout-body .tab-loading-bar,
html.bottom-layout-html .tab-loading-bar,
body.bottom-layout-body .tab-loading-bar {
    top: 0;
    bottom: auto;
    height: 2px;
    /* Overlay the content edge; never reserve an idle empty lane. */
    background: transparent !important;
}

html.bottom-layout-html .tab-loading-bar:not(.is-active),
body.bottom-layout-body .tab-loading-bar:not(.is-active) {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    height: 0 !important;
}

.tab-loading-bar[hidden],
.tab-loading-bar[aria-hidden="true"] {
    display: none !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.tab-loading-bar.is-active:not([hidden]) {
    display: block !important;
    height: 2px !important;
    visibility: visible !important;
}

/* Bottom dock: match the title strip to its tab row so the progress bar does
   not reveal an opaque cap when it disappears. Tab chips retain their own
   vertical breathing room inside the row. */
html.bottom-layout-html .glass-titlebar,
body.bottom-layout-body .glass-titlebar {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

html.longer-tabs.bottom-layout-html .glass-titlebar,
html.bottom-layout-html.longer-tabs .glass-titlebar,
body.longer-tabs.bottom-layout-body .glass-titlebar,
body.bottom-layout-body.longer-tabs .glass-titlebar {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
}

html.bottom-layout-html .glass-titlebar > .tabs-container,
html.bottom-layout-html .glass-titlebar > .new-tab-btn,
html.bottom-layout-html .glass-titlebar > .glass-title-section,
html.bottom-layout-html .glass-titlebar > .tab-strip-scroll-btn,
html.bottom-layout-html .glass-titlebar > .tab-strip-drag-region,
body.bottom-layout-body .glass-titlebar > .tabs-container,
body.bottom-layout-body .glass-titlebar > .new-tab-btn,
body.bottom-layout-body .glass-titlebar > .glass-title-section,
body.bottom-layout-body .glass-titlebar > .tab-strip-scroll-btn,
body.bottom-layout-body .glass-titlebar > .tab-strip-drag-region {
    align-self: center !important;
    margin-top: 0 !important;
}

html.bottom-layout-html:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.bottom-layout-body:not(.vertical-tabs) .glass-titlebar > .tabs-container {
    align-items: center !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
}

/* Home/search is solid chrome HTML. Never feather a black band above the dock. */
html.welcome-visible .browser-container.bottom-layout::after,
html.welcome-visible.bottom-layout-html .browser-container::after,
body.welcome-visible .browser-container.bottom-layout::after,
body.welcome-visible.bottom-layout-body .browser-container::after,
.browser-container.bottom-layout:has(.web-content.showing-welcome)::after,
html.bottom-layout-html:has(.web-content.showing-welcome) .browser-container::after,
body.bottom-layout-body:has(.web-content.showing-welcome) .browser-container::after,
html.welcome-visible.bottom-layout-html .browser-container::after,
html.welcome-visible .browser-container.bottom-layout::after,
body.welcome-visible.bottom-layout-body .browser-container::after {
    display: none !important;
    background: none !important;
    height: 0 !important;
    opacity: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    .tab-loading-bar,
    .tab-loading-bar-fill {
        transition: none !important;
        animation: none !important;
    }
}

.glass-titlebar,
.glass-titlebar * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.glass-titlebar * {
    -webkit-app-region: no-drag;
    pointer-events: auto;
}

/* Top dock: same hit model as bottom. Parent ignores hits; interactive
   chrome and the drag filler opt back in so tabs stay clickable. */
.glass-titlebar > .tabs-container,
.glass-titlebar > .new-tab-btn,
.glass-titlebar > .glass-title-section,
.glass-titlebar > .tab-strip-scroll-btn,
.glass-titlebar > .tab-strip-drag-region,
.glass-titlebar .tab,
.glass-titlebar .glass-title-logo,
.glass-titlebar .glass-window-controls,
.glass-titlebar .glass-control-btn {
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
}

.glass-titlebar > .tab-strip-drag-region {
    -webkit-app-region: no-drag !important;
}

.glass-title-section {
    display: flex !important;
    align-items: center;
    gap: 6px;
    /* Never give up space to the overflowing tab strip or scroll arrows; pins
       and the home logo must stay fully visible when the bar is full. */
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: auto;
    min-width: 0;
    width: auto;
    max-width: min(78vw, 1100px);
    margin: 0;
    padding: 0;
    -webkit-app-region: no-drag;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden;
}

/* Tabs prefer content width, but must shrink inside the padded titlebar so they
   never paint under the window controls. Overflow scrolls; arrows appear via JS.
   Keep 2px inline padding so subpixel scrollWidth rounding cannot clip the
   right border stroke off the last tab. Native scrollbars are never shown;
   the strip uses the chevron buttons and drag-pan only. */
.glass-titlebar > .tabs-container {
    flex: 0 1 auto !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 2px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    align-items: center !important;
    gap: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.glass-titlebar > .tabs-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.tab-strip-drag-region {
    flex: 1 1 auto !important;
    min-width: 24px !important;
    align-self: stretch !important;
    -webkit-app-region: no-drag !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 0 !important;
}

/* Horizontal tab strip alignment inside the glass titlebar. The tabs container
   grows to claim the free space so justify-content can center or right-align
   the tabs; the trailing drag region collapses to its min width. Vertical tabs
   are excluded so the sidebar layout is never affected. */
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container,
html.bottom-layout-html body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container,
html.bottom-layout-html body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tabs-container {
    flex: 1 1 auto !important;
    max-width: 100% !important;
}

/* Justify inside the tabs container, at every layout (bottom / chrome preset). */
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container:not(.tabs-center-overflow),
body.tabs-align-center:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container:not(.tabs-center-overflow),
html.bottom-layout-html body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container:not(.tabs-center-overflow),
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tabs-container:not(.tabs-center-overflow),
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tabs-container:not(.tabs-center-overflow),
body.tabs-align-center:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tabs-container:not(.tabs-center-overflow) {
    justify-content: center !important;
}
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.tabs-align-right:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
html.bottom-layout-html body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.tabs-align-right:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tabs-container:not(.tab-strip-overflow) {
    justify-content: flex-end !important;
}

/* Tabs shrink toward min-width as the strip fills, then scroll. max-width
   keeps a few tabs from stretching across the bar so center / right justify
   still has leftover space to pack against. Pinned chips stay content-sized. */
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab:not(.pinned),
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab:not(.pinned),
body.tabs-align-center:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container > .tab:not(.pinned),
body.tabs-align-right:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container > .tab:not(.pinned),
html.bottom-layout-html body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab:not(.pinned),
html.bottom-layout-html body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab:not(.pinned) {
    flex: 0 1 var(--min-tab-width, 120px) !important;
    width: auto !important;
    min-width: var(--tab-shrink-floor, 60px) !important;
    max-width: var(--max-tab-width, 240px) !important;
}
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab.pinned,
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab.pinned,
body.tabs-align-center:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container > .tab.pinned,
body.tabs-align-right:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container > .tab.pinned,
html.bottom-layout-html body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab.pinned,
html.bottom-layout-html body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container > .tab.pinned {
    flex: 0 0 auto !important;
    width: auto !important;
}

/* Collapse the trailing drag filler so tabs can use the full strip width for
   center / right justify. Blank space inside the flex-grown tabs container
   still receives strip context-menu hits. */
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tab-strip-drag-region {
    flex: 0 0 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container {
    justify-content: center !important;
}

body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container.tabs-center-overflow,
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container.tab-strip-overflow {
    justify-content: flex-start !important;
}

body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container {
    justify-content: flex-end !important;
}

body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container.tab-strip-overflow {
    justify-content: flex-start !important;
}

.glass-titlebar > .new-tab-btn,
.tabs-container > .new-tab-btn,
#new-tab-btn {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 5 !important;
    margin: 0 0 0 2px !important;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
    cursor: pointer !important;
}

/* Full tab strip: + docks beside the scroll arrows (same 24px chip), outside
   the scrolling viewport, so tabs cannot paint behind or through it. */
html:not(.vertical-tabs) body:not(.vertical-tabs) .glass-titlebar > .new-tab-btn.tab-strip-new-tab-docked,
html:not(.vertical-tabs) body:not(.vertical-tabs) .glass-titlebar > #new-tab-btn.tab-strip-new-tab-docked {
    order: 35;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    margin: 0 0 0 4px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid var(--ui-border, rgba(255, 255, 255, 0.12)) !important;
    border-radius: 6px !important;
    background: var(--ui-bg, rgba(30, 30, 42, 0.85)) !important;
    box-shadow: none !important;
    font-size: 16px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    z-index: 6 !important;
    isolation: isolate !important;
}

html:not(.vertical-tabs) body:not(.vertical-tabs) .glass-titlebar > .new-tab-btn.tab-strip-new-tab-docked:hover,
html:not(.vertical-tabs) body:not(.vertical-tabs) .glass-titlebar > #new-tab-btn.tab-strip-new-tab-docked:hover {
    background: var(--ui-bg-hover, rgba(60, 60, 80, 0.9)) !important;
    transform: none !important;
    filter: none !important;
}

html.longer-tabs:not(.vertical-tabs) body:not(.vertical-tabs) .glass-titlebar > .new-tab-btn.tab-strip-new-tab-docked,
html.longer-tabs:not(.vertical-tabs) body:not(.vertical-tabs) .glass-titlebar > #new-tab-btn.tab-strip-new-tab-docked,
body.longer-tabs:not(.vertical-tabs) .glass-titlebar > .new-tab-btn.tab-strip-new-tab-docked,
body.longer-tabs:not(.vertical-tabs) .glass-titlebar > #new-tab-btn.tab-strip-new-tab-docked {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
}

/* Left-aligned strip on bottom / off-bar docks: keep a live trailing drag
   filler for blank-strip hits. Center / right align intentionally exclude this
   so the tabs container can claim the full free space and truly center or end
   the tab pack (with + after the last tab) instead of sharing the row 50/50
   with the drag region (which looked like a left-indented pack). */
body.window-controls-pos-top-left:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
body.window-controls-pos-top-right:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
body.window-controls-pos-between-tabs:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
html.bottom-layout-html:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
body.bottom-layout-body:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
body.chrome-layout-tools-dock-body:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
body.chrome-layout-tabs-top-url-bottom-body:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region,
body.chrome-layout-url-top-tabs-bottom-body:not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tab-strip-drag-region {
    flex: 1 1 auto !important;
    min-width: 24px !important;
    width: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* Left-aligned pinned modes: tabs stay content-sized so + sits after the last
   tab and the drag region fills the rest. Center / right keep flex:1 1 auto from
   the alignment rules above so justify-content can use the full strip. */
body.window-controls-pos-top-left:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.window-controls-pos-top-right:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.window-controls-pos-between-tabs:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.bottom-layout-body:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
html.bottom-layout-html:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.chrome-layout-tools-dock-body:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.chrome-layout-tabs-top-url-bottom-body:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow),
body.chrome-layout-url-top-tabs-bottom-body:not(.vertical-tabs):not(.tabs-align-center):not(.tabs-align-right) .glass-titlebar > .tabs-container:not(.tab-strip-overflow) {
    flex: 0 1 auto !important;
}

/* Center / right on every dock: tabs container owns the free strip width so
   justify-content centers or ends the content-sized tab pack (including +).
   Must beat bottom-layout / chrome-layout flex shrink-wrap rules. */
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tabs-container,
html.bottom-layout-html body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tabs-container,
html.bottom-layout-html body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).window-controls-pos-top-left .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).window-controls-pos-top-right .glass-titlebar > .tabs-container,
body.tabs-align-center:not(.vertical-tabs).window-controls-pos-between-tabs .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).window-controls-pos-top-left .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).window-controls-pos-top-right .glass-titlebar > .tabs-container,
body.tabs-align-right:not(.vertical-tabs).window-controls-pos-between-tabs .glass-titlebar > .tabs-container {
    flex: 1 1 auto !important;
    max-width: 100% !important;
}

/* Collapse trailing drag for center / right on every dock so it cannot steal
   half the row and left-indent the centered pack. Blank space inside the
   flex-grown tabs container still receives strip context-menu hits. */
body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).bottom-layout-body .glass-titlebar > .tab-strip-drag-region,
html.bottom-layout-html body.tabs-align-center:not(.vertical-tabs) .glass-titlebar > .tab-strip-drag-region,
html.bottom-layout-html body.tabs-align-right:not(.vertical-tabs) .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).window-controls-pos-top-left .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).window-controls-pos-top-right .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).window-controls-pos-between-tabs .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).window-controls-pos-top-left .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).window-controls-pos-top-right .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).window-controls-pos-between-tabs .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tools-dock-body .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-tabs-top-url-bottom-body .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-center:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tab-strip-drag-region,
body.tabs-align-right:not(.vertical-tabs).chrome-layout-url-top-tabs-bottom-body .glass-titlebar > .tab-strip-drag-region {
    flex: 0 0 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.glass-title-logo {
    width: 24px;
    height: 24px;
    padding: 3px;
    border-radius: 6px;
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
    transition: background-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    transform: translateZ(0);
}

.glass-title-logo:hover {
    background: var(--ui-bg-hover);
    transform: translateZ(0) scale(1.05);
}

.pinned-group-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: min(70vw, 920px);
    overflow-x: auto;
    overflow-y: hidden;
    margin-left: 4px;
    padding: 0 4px 0 2px;
    -webkit-app-region: no-drag;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.pinned-group-bar::-webkit-scrollbar,
.pinned-group-rail-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.pinned-group-bar[hidden] {
    display: none !important;
}

.pinned-group-rail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}

.pinned-group-rail-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(56vw, 720px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 4px 2px 2px;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.pinned-group-rail-tabs .tab {
    flex: 0 0 auto !important;
    min-width: 96px !important;
    max-width: 200px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Standalone pinned tabs share the left rail with pinned groups. They stay
   compact (icon-forward) and never stretch into the centered strip. */
.pinned-tabs-rail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: min(46vw, 620px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 2px 2px;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.pinned-tabs-rail::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.pinned-tabs-rail .tab {
    flex: 0 0 auto !important;
    min-width: 40px !important;
    max-width: 180px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.pinned-group-bar-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    height: 26px;
    max-width: 120px;
    padding: 0 8px 0 6px;
    border: 1px solid color-mix(in srgb, var(--tab-group-color, #4285f4) 70%, #1a1a1a);
    border-radius: 6px;
    border-left: 3px solid var(--tab-group-color, #4285f4);
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 22%, #1c1c1c);
    color: #f2f4f8;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    -webkit-app-region: no-drag;
}

.pinned-group-bar-chip:hover {
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 32%, #242424);
    border-color: var(--tab-group-color, #4285f4);
}

.pinned-group-bar-chip.is-open {
    border-color: var(--tab-group-color, #4285f4);
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 38%, #1a1a1a);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tab-group-color, #4285f4) 55%, transparent);
}

.pinned-group-bar-icon {
    color: var(--tab-group-color, #4285f4);
    font-size: 11px;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}

.pinned-group-bar-icon-img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.pinned-group-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 84px;
}

.pinned-group-bar-chip.unnamed {
    gap: 0;
    padding: 0 7px 0 6px;
}

.pinned-group-bar-chip.unnamed .pinned-group-bar-label {
    display: none;
}

.pinned-group-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px 10px;
}

.pinned-group-icon-swatch,
.tab-context-menu button.pinned-group-icon-swatch {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f2f4f8 !important;
}

.pinned-group-icon-swatch:hover,
.tab-context-menu button.pinned-group-icon-swatch:hover {
    border-color: rgba(255, 255, 255, 0.28) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

/* Default dock: in-flow trailing flex item so tabs / scroll arrows can never
   paint over min / max / close when the strip overflows. Corner bubble modes
   re-apply position:fixed below. */
.glass-window-controls {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    order: 50;
    z-index: 30 !important;
    display: flex;
    align-items: center;
    align-self: center;
    gap: 4px;
    margin: 0 0 0 4px;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
    cursor: pointer !important;
    isolation: isolate;
    padding: 4px 8px;
    border-radius: 8px;
    opacity: 1;
    filter: none;
    transform: none;
}

.glass-titlebar > .tab-strip-scroll-btn {
    order: 40;
    z-index: 6;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
}

.glass-titlebar > #tab-strip-scroll-left {
    order: 5;
}

.glass-titlebar > .glass-title-section {
    order: 1;
}

.glass-titlebar > .tabs-container {
    order: 10;
}

.glass-titlebar > .tab-strip-drag-region {
    order: 20;
}

/* Bottom layout: keep controls in-flow on the tab strip (same as top dock). */
.browser-container.bottom-layout .glass-window-controls,
body.bottom-layout-body .glass-window-controls,
html.bottom-layout-html .glass-window-controls {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
}

html.bottom-layout-html .glass-window-controls::before,
body.bottom-layout-body .glass-window-controls::before,
.browser-container.bottom-layout .glass-window-controls::before {
    display: none !important;
    content: none !important;
}

/* ------------------------------------------------------------------ */
/* Repositionable window controls (min / max / close).                */
/* Placement is chosen via right-click; body carries the mode class.  */
/* ------------------------------------------------------------------ */

/* Top-left / top-right: detach onto a frosted pill bubble, mirroring
   the minimal URL bubble material. Fixed to the chosen corner.
   Explicitly beat bottom-layout fade/position rules. */
body.window-controls-pos-top-left .glass-window-controls,
body.window-controls-pos-top-right .glass-window-controls,
html.bottom-layout-html body.window-controls-pos-top-left .glass-window-controls,
html.bottom-layout-html body.window-controls-pos-top-right .glass-window-controls,
body.bottom-layout-body.window-controls-pos-top-left .glass-window-controls,
body.bottom-layout-body.window-controls-pos-top-right .glass-window-controls,
.browser-container.bottom-layout body.window-controls-pos-top-left .glass-window-controls,
body.window-controls-pos-top-left .browser-container.bottom-layout .glass-window-controls,
body.window-controls-pos-top-right .browser-container.bottom-layout .glass-window-controls {
    position: fixed !important;
    top: 14px !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 100004 !important;
    display: flex !important;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(18, 18, 22, 0.62);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    isolation: isolate;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
}

body.window-controls-pos-top-left .glass-window-controls,
html.bottom-layout-html body.window-controls-pos-top-left .glass-window-controls,
body.bottom-layout-body.window-controls-pos-top-left .glass-window-controls,
body.window-controls-pos-top-left .browser-container.bottom-layout .glass-window-controls {
    left: 14px !important;
    right: auto !important;
}

body.window-controls-pos-top-right .glass-window-controls,
html.bottom-layout-html body.window-controls-pos-top-right .glass-window-controls,
body.bottom-layout-body.window-controls-pos-top-right .glass-window-controls,
body.window-controls-pos-top-right .browser-container.bottom-layout .glass-window-controls {
    right: 14px !important;
    left: auto !important;
}

/* Explicit placement modes own visibility; kill bottom-layout hover pads. */
body.window-controls-pos-top-left .glass-window-controls::before,
body.window-controls-pos-top-right .glass-window-controls::before,
body.window-controls-pos-between-tabs .glass-window-controls::before,
body.window-controls-pos-default .glass-window-controls::before {
    content: none !important;
    display: none !important;
}

/* Corner bubble buttons drop their own chrome so only the pill frames them. */
body.window-controls-pos-top-left .glass-window-controls .glass-control-btn,
body.window-controls-pos-top-right .glass-window-controls .glass-control-btn {
    width: 20px;
    height: 20px;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:first-child,
body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:first-child {
    border-radius: 999px 8px 8px 999px !important;
}

body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:last-child,
body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:last-child {
    border-radius: 8px 999px 999px 8px !important;
}

body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:hover,
body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

body.window-controls-pos-top-left .glass-window-controls .glass-control-btn.glass-close:hover,
body.window-controls-pos-top-right .glass-window-controls .glass-control-btn.glass-close:hover {
    background: rgba(232, 17, 35, 0.85) !important;
    border-color: rgba(232, 17, 35, 0.9) !important;
    color: #fff !important;
}

/* Between ghost icon and tabs: in-flow inside the titlebar (not fixed). */
body.window-controls-pos-between-tabs .glass-window-controls,
html.bottom-layout-html body.window-controls-pos-between-tabs .glass-window-controls,
body.bottom-layout-body.window-controls-pos-between-tabs .glass-window-controls,
body.window-controls-pos-between-tabs .browser-container.bottom-layout .glass-window-controls {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
    order: 2;
    margin: 0 2px !important;
    padding: 2px 4px;
    z-index: 6 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
}

body.window-controls-pos-between-tabs .glass-window-controls .glass-control-btn {
    width: 20px;
    height: 16px;
}

/* Corner / between-tabs placements leave the strip at the normal 8px inset
   (controls are either off-bar or mid-row, not a trailing fixed overlay). */
body.window-controls-pos-top-left .glass-titlebar,
body.window-controls-pos-top-right .glass-titlebar,
body.window-controls-pos-between-tabs .glass-titlebar,
html.window-controls-pos-top-left .glass-titlebar,
html.window-controls-pos-top-right .glass-titlebar,
html.window-controls-pos-between-tabs .glass-titlebar,
html.bottom-layout-html.window-controls-pos-top-left .glass-titlebar,
html.bottom-layout-html.window-controls-pos-top-right .glass-titlebar,
html.bottom-layout-html.window-controls-pos-between-tabs .glass-titlebar,
body.bottom-layout-body.window-controls-pos-top-left .glass-titlebar,
body.bottom-layout-body.window-controls-pos-top-right .glass-titlebar,
body.bottom-layout-body.window-controls-pos-between-tabs .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-left:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-right:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-between-tabs:not(.chrome-widget-collapsed) .glass-titlebar,
body[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-left:not(.chrome-widget-collapsed) .glass-titlebar,
body[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-right:not(.chrome-widget-collapsed) .glass-titlebar,
body[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-between-tabs:not(.chrome-widget-collapsed) .glass-titlebar {
    padding-right: 8px !important;
}


/* Window controls placement context menu (separate from tab strip menu). */
#window-controls-context-menu .tab-menu-label,
#email-toolbar-context-menu .tab-menu-label,
#profile-toolbar-context-menu .tab-menu-label {
    padding: 6px 12px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.62;
}

#window-controls-context-menu button[data-pos].is-active,
#email-toolbar-context-menu button[data-email-provider].is-active,
#profile-toolbar-context-menu button[data-profile-action="switch"].is-active,
#profile-toolbar-context-menu button[data-profile-action="open"].is-active {
    font-weight: 600;
}

#window-controls-context-menu button[data-pos].is-active::after,
#email-toolbar-context-menu button[data-email-provider].is-active::after,
#profile-toolbar-context-menu button[data-profile-action="switch"].is-active::after,
#profile-toolbar-context-menu button[data-profile-action="open"].is-active::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

#profile-toolbar-context-menu {
    border-radius: var(--stealth-cut-panel, 22px 4px 4px 4px) !important;
}

#profile-toolbar-context-menu > button {
    border-radius: var(--stealth-cut-sm, 8px 2px 2px 2px) !important;
}

#profile-toolbar-context-menu > button[data-profile-action="switch"],
#profile-toolbar-context-menu > button[data-profile-action="open"] {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding-left: 12px !important;
}

#profile-toolbar-context-menu > button[data-profile-action="switch"]:disabled,
#profile-toolbar-context-menu > button[data-profile-action="open"]:disabled {
    opacity: 0.85;
    cursor: default;
}

#profile-toolbar-context-menu .profile-toolbar-menu-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
}

#profile-toolbar-context-menu .profile-toolbar-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#profile-toolbar-context-menu .profile-toolbar-menu-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.glass-control-btn {
    width: 20px;
    height: 16px;
    min-width: 20px;
    min-height: 16px;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
    z-index: 2 !important;
    position: relative !important;
    outline: none !important;
    transform: translateZ(0);
    visibility: visible !important;
    opacity: 1 !important;
}

.glass-control-btn svg {
    width: 10px;
    height: 10px;
    pointer-events: none !important;
}

.glass-control-btn:hover {
    background: var(--ui-bg-hover);
    color: #fff;
    transform: translateZ(0) scale(1.05);
}

.glass-control-btn:focus {
    outline: none !important;
}

.glass-control-btn:active {
    transform: translateZ(0) scale(0.95);
}

.glass-control-btn.glass-close:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 0.5);
}

[data-theme="light"] .glass-control-btn {
    color: rgba(0, 0, 0, 0.7);
}

/* =============================================================================
   LAYOUT - Adjust for minimal titlebar
   ============================================================================= */

.chrome-titlebar {
    display: none !important;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.browser-container,
.top-bar,
.status-bar,
.glass-titlebar,
.web-content {
    box-sizing: border-box;
    max-width: 100%;
}

/* =============================================================================
   INVISIBLE BARS - FORCE 100% transparent, NO backgrounds whatsoever
   ============================================================================= */

/* Tab Bar - REMOVED (Merged into Titlebar) */
/* .tab-bar styles removed */

.top-bar,
.top-bar.top-bar,
html body .browser-container .top-bar {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    height: 32px !important;
    min-height: 0 !important;
    padding: 2px 6px !important;
    z-index: 100004 !important;
}

/* Ctrl+wheel per-control zoom: unlock the 32px strip so scaled icons/logo
   are not clipped under the tab bar. */
html body .browser-container .top-bar:has(.chrome-ui-scaled),
html body .browser-container .top-bar:has([data-ui-zoom]:not([data-ui-zoom="1"])),
html body .browser-container .top-bar.chrome-toolbar-fit,
html.chrome-ui-zoomed body .browser-container .top-bar:has(.chrome-ui-scaled),
html.chrome-ui-zoomed body .browser-container .top-bar.chrome-toolbar-fit {
    height: auto !important;
    min-height: 32px !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Labeled toolbar must expand; never keep the 32px lock or labels/icons
   collide with the tab strip / get covered by the content HWND. */
html body.toolbar-labels .top-bar,
html body.toolbar-labels .browser-container .top-bar {
    height: 52px !important;
    min-height: 52px !important;
    padding: 2px 6px 14px 6px !important;
    overflow: visible !important;
}

html body.toolbar-labels .browser-container .top-bar:has(.chrome-ui-scaled),
html body.toolbar-labels .browser-container .top-bar:has([data-ui-zoom]:not([data-ui-zoom="1"])),
html body.toolbar-labels .browser-container .top-bar.chrome-toolbar-fit {
    height: auto !important;
    min-height: 52px !important;
    max-height: none !important;
}

html body.toolbar-labels:not(.bottom-layout-body) .status-bar,
html body.toolbar-labels .browser-container:not(.bottom-layout) .status-bar {
    top: 92px !important;
}

.status-bar,
.status-bar.status-bar,
html body .browser-container .status-bar {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 2px 6px !important;
    z-index: 100002 !important;
}

/* Opaque chrome docks for solid themes (not Stealth Glass).
   glass-titlebar is a body sibling of .browser-container, so dock rules must
   target .glass-titlebar directly (never only under .browser-container). */
html[data-theme="light"] body,
html.theme-light body,
body.theme-light {
    background: #d4cec4 !important;
    color: #1a1714 !important;
}
html[data-theme="light"] .browser-container::before,
html.theme-light .browser-container::before {
    background: linear-gradient(to bottom, rgba(212,206,196,0.98) 0%, rgba(212,206,196,0.55) 40%, transparent 100%) !important;
}
html[data-theme="light"] .browser-container::after,
html.theme-light .browser-container::after {
    background: linear-gradient(to top, rgba(212,206,196,0.98) 0%, rgba(212,206,196,0.55) 40%, transparent 100%) !important;
}
html[data-theme="light"] .top-bar,
html[data-theme="light"] .status-bar,
html[data-theme="light"] .glass-titlebar,
html[data-theme="light"] body .browser-container .top-bar,
html[data-theme="light"] body .browser-container .status-bar,
html[data-theme="light"] .browser-container:not(.bottom-layout) .top-bar,
html[data-theme="light"] .browser-container:not(.bottom-layout) .status-bar,
html[data-theme="light"] .browser-container.bottom-layout .top-bar,
html[data-theme="light"] .browser-container.bottom-layout .status-bar,
html[data-theme="light"].bottom-layout-html .glass-titlebar,
html[data-theme="light"].bottom-layout-html .top-bar,
html[data-theme="light"].bottom-layout-html .status-bar,
html.bottom-layout-html[data-theme="light"] .glass-titlebar,
html.bottom-layout-html[data-theme="light"] .top-bar,
html.bottom-layout-html[data-theme="light"] .status-bar,
body.bottom-layout-body[data-theme="light"] .glass-titlebar,
body.bottom-layout-body[data-theme="light"] .top-bar,
body.bottom-layout-body[data-theme="light"] .status-bar,
html.theme-light .top-bar,
html.theme-light .status-bar,
html.theme-light .glass-titlebar,
html.theme-light body .browser-container .top-bar,
html.theme-light body .browser-container .status-bar,
html.theme-light.bottom-layout-html .glass-titlebar,
html.theme-light.bottom-layout-html .top-bar,
html.theme-light.bottom-layout-html .status-bar {
    background: #d4cec4 !important;
    background-color: #d4cec4 !important;
    background-image: none !important;
    border-color: #a89f90 !important;
}
html[data-theme="light"] .tab,
html[data-theme="light"] .nav-btn,
html[data-theme="light"] .status-item,
html[data-theme="light"] .address-bar-container,
html[data-theme="light"] .new-tab-btn,
html[data-theme="light"] #menu-btn,
html[data-theme="light"] #layout-toggle,
html[data-theme="light"] .toolbar-icon-btn,
html[data-theme="light"] .glass-control-btn,
html[data-theme="light"] .instant-answer-button,
html[data-theme="light"] .volume-button-knob,
html.theme-light .tab,
html.theme-light .nav-btn,
html.theme-light .status-item,
html.theme-light .address-bar-container,
html.theme-light .new-tab-btn,
html.theme-light #menu-btn,
html.theme-light #layout-toggle,
html.theme-light .toolbar-icon-btn,
html.theme-light .glass-control-btn,
html.theme-light .instant-answer-button,
html.theme-light .volume-button-knob {
    background: #e5dfd5 !important;
    background-color: #e5dfd5 !important;
    border-color: #a89f90 !important;
    color: #1a1714 !important;
    box-shadow: 0 1px 2px rgba(40, 32, 24, 0.1) !important;
}
html[data-theme="light"] .tab.active,
html.theme-light .tab.active {
    background: rgba(73, 0, 194, 0.85) !important;
    border-color: rgba(73, 0, 194, 0.65) !important;
    color: #ffffff !important;
}
html[data-theme="light"] .tab.active .tab-title,
html[data-theme="light"] .tab.active .tab-audio-btn,
html.theme-light .tab.active .tab-title,
html.theme-light .tab.active .tab-audio-btn {
    color: #ffffff !important;
}
html[data-theme="light"] #address-bar,
html.theme-light #address-bar {
    color: #1a1714 !important;
}
html[data-theme="light"] #address-bar::placeholder,
html.theme-light #address-bar::placeholder {
    color: #6b655c !important;
    opacity: 1 !important;
}

/* Must beat "html body .browser-container .top-bar { background: none }" or
   the URL/icon strip paints transparent when chrome is top-docked. Bottom
   dock already had a more specific .bottom-layout rule; top dock did not. */
html[data-theme="dark"] .top-bar,
html[data-theme="dark"] .status-bar,
html[data-theme="dark"] .glass-titlebar,
html[data-theme="dark"] body .browser-container .top-bar,
html[data-theme="dark"] body .browser-container .status-bar,
html[data-theme="dark"] body .browser-container .glass-titlebar,
html[data-theme="dark"] .browser-container:not(.bottom-layout) .top-bar,
html[data-theme="dark"] .browser-container:not(.bottom-layout) .status-bar,
html[data-theme="dark"] .browser-container.bottom-layout .top-bar,
html[data-theme="dark"] .browser-container.bottom-layout .status-bar,
html[data-theme="dark"] .browser-container.bottom-layout .glass-titlebar,
html.theme-dark .top-bar,
html.theme-dark .status-bar,
html.theme-dark .glass-titlebar,
html.theme-dark body .browser-container .top-bar,
html.theme-dark body .browser-container .status-bar,
html.theme-dark body .browser-container .glass-titlebar {
    background: #111111 !important;
    background-color: #111111 !important;
    background-image: none !important;
}
html[data-theme="dark"] .tab,
html[data-theme="dark"] .nav-btn,
html[data-theme="dark"] .status-item,
html[data-theme="dark"] .address-bar-container,
html[data-theme="dark"] .new-tab-btn,
html[data-theme="dark"] #menu-btn,
html[data-theme="dark"] #layout-toggle,
html[data-theme="dark"] .toolbar-icon-btn,
html.theme-dark .tab,
html.theme-dark .nav-btn,
html.theme-dark .status-item,
html.theme-dark .address-bar-container,
html.theme-dark .new-tab-btn,
html.theme-dark #menu-btn,
html.theme-dark #layout-toggle,
html.theme-dark .toolbar-icon-btn {
    background: #1a1a1a !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

html[data-theme="stealth"] .top-bar,
html[data-theme="stealth"] .status-bar,
html[data-theme="stealth"] .glass-titlebar,
html[data-theme="stealth"] body .browser-container .top-bar,
html[data-theme="stealth"] body .browser-container .status-bar,
html[data-theme="stealth"] body .browser-container .glass-titlebar,
html[data-theme="stealth"] .browser-container:not(.bottom-layout) .top-bar,
html[data-theme="stealth"] .browser-container:not(.bottom-layout) .status-bar,
html[data-theme="stealth"] .browser-container.bottom-layout .top-bar,
html[data-theme="stealth"] .browser-container.bottom-layout .status-bar,
html[data-theme="stealth"] .browser-container.bottom-layout .glass-titlebar,
html.theme-stealth .top-bar,
html.theme-stealth .status-bar,
html.theme-stealth .glass-titlebar,
html.theme-stealth body .browser-container .top-bar,
html.theme-stealth body .browser-container .status-bar,
html.theme-stealth body .browser-container .glass-titlebar {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
    background-image: none !important;
}
html[data-theme="stealth"] .tab,
html[data-theme="stealth"] .nav-btn,
html[data-theme="stealth"] .status-item,
html[data-theme="stealth"] .address-bar-container,
html[data-theme="stealth"] .new-tab-btn,
html[data-theme="stealth"] #menu-btn,
html[data-theme="stealth"] #layout-toggle,
html[data-theme="stealth"] .toolbar-icon-btn,
html.theme-stealth .tab,
html.theme-stealth .nav-btn,
html.theme-stealth .status-item,
html.theme-stealth .address-bar-container,
html.theme-stealth .new-tab-btn,
html.theme-stealth #menu-btn,
html.theme-stealth #layout-toggle,
html.theme-stealth .toolbar-icon-btn {
    background: #1a1228 !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
    color: #f5f3ff !important;
}

html.security-bar-hidden .status-bar,
html.security-bar-hidden .status-bar.status-bar,
html body.security-bar-hidden .browser-container .status-bar,
body.security-bar-hidden .status-bar,
.browser-container.security-bar-hidden .status-bar {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

/* Kill ALL container backgrounds - tabs-container, browser-menu, etc */
.tabs-container,
.browser-menu,
.nav-controls,
.extension-toolbar,
.volume-control-container,
.screenshot-toggle-container,
.instant-answer-container,
.security-toggle-container,
.downloads-toggle-container {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Stealth logo button chrome only; wordmark keeps its animated gradient */
.stealth-logo-btn {
    background: none !important;
}

.stealth-logo-btn:hover,
.stealth-logo-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08) !important;
}

#stealth-logo-btn .stealth-logo {
    background: transparent !important;
    background-image: none !important;
}

body > #stealth-logo-menu,
body > #stealth-logo-menu.show {
    z-index: 2147483647 !important;
    pointer-events: auto !important;
    min-height: 0 !important;
    height: auto !important;
    width: auto !important;
}

body > #stealth-logo-menu button[hidden],
body > #stealth-logo-menu #stealth-resume-protection-item[hidden],
body > #stealth-logo-menu #stealth-resume-separator[hidden] {
    display: none !important;
}

/* =============================================================================
   FLOATING UI ELEMENTS - Smaller, more compact
   ============================================================================= */

.tab {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.1s ease-out !important;
    height: 22px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--ui-text, #ffffff) !important;
}

.tab:hover {
    background: var(--ui-highlight, rgba(255, 255, 255, 0.14)) !important;
    background-color: var(--ui-highlight, rgba(255, 255, 255, 0.14)) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    transform: none !important;
}

.tab.active:hover {
    background: rgba(73, 0, 194, 0.92) !important;
    background-color: rgba(73, 0, 194, 0.92) !important;
    background-image: none !important;
    border-color: rgba(73, 0, 194, 0.75) !important;
    transform: none !important;
}

.tab.active {
    background: rgba(73, 0, 194, 0.85) !important;
    border-color: rgba(73, 0, 194, 0.65) !important;
}

.tab.grouped,
.tab.grouped:hover,
.tab.grouped.active,
.tab.colored,
.tab.colored:hover,
.tab.colored.active {
    border: 1px solid var(--tab-group-color, #4285f4) !important;
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 28%, #1c1c1c) !important;
    background-color: color-mix(in srgb, var(--tab-group-color, #4285f4) 28%, #1c1c1c) !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important;
    outline: none !important;
}

.tab.grouped:hover,
.tab.colored:hover {
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 34%, #242424) !important;
    background-color: color-mix(in srgb, var(--tab-group-color, #4285f4) 34%, #242424) !important;
    border-color: var(--tab-group-color, #4285f4) !important;
}

.tab.grouped.active,
.tab.grouped.active:hover,
.tab.colored.active,
.tab.colored.active:hover {
    border-color: var(--tab-group-color, #4285f4) !important;
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 42%, #1a1a1a) !important;
    background-color: color-mix(in srgb, var(--tab-group-color, #4285f4) 42%, #1a1a1a) !important;
}

.new-tab-btn {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.1s ease-out !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.new-tab-btn:hover {
    background: var(--ui-bg-hover) !important;
}

/* Nav controls wrapper - completely transparent, buttons float individually */
.nav-controls {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex !important;
    gap: 4px !important;
}

/* Each nav button is its own floating glass element */
.nav-btn {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.1s ease-out !important;
    height: 24px !important;
    min-width: 28px !important;
    padding: 2px 6px !important;
    color: var(--ui-text, #ffffff) !important;
}

.nav-btn:hover {
    background: var(--ui-bg-hover) !important;
}

.address-bar-container {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    transition: border-color 0.1s ease-out !important;
    padding: 0 4px !important;
    flex: 1 1 auto !important;
    min-width: 180px !important;
    /* Match .nav-btn / toolbar icon height so top and bottom docks share
       the same vertical rhythm (no taller URL field with empty gap under icons). */
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    gap: 4px !important;
    overflow: hidden !important;
}

/* Dragging a floating glass panel over the dock must not focus the URL bar. */
body.floating-panel-dragging .address-bar-container,
body.floating-panel-dragging #address-bar,
body.floating-panel-dragging #url-suggestions {
    pointer-events: none !important;
}

/* Drag over a live page: keep baked frost panels from flipping to a live
   backdrop that cannot sample a sibling HWND. AI is Liquid Ice only. */
body.floating-panel-dragging .page-frost-host:not(.page-frost-over-chrome):not(#ai-assistant-window):not(.liquid-ice-host) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Keep frost/ambient opacity stable through the gesture so drop does not
   cross-fade the glass stack and flash the panel or toolbar. */
body.floating-panel-dragging .page-frost-image,
body.floating-panel-dragging .page-frost-ambient {
    transition: none !important;
}

body.address-bar-fixed-width .address-bar-container {
    position: relative;
    flex: 0 0 var(--short-address-bar-width, 420px) !important;
    width: var(--short-address-bar-width, 420px) !important;
    min-width: 120px !important;
    max-width: var(--short-address-bar-width, 420px) !important;
}

.top-bar #address-bar,
.address-bar-container #address-bar {
    padding: 0 4px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    line-height: 22px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
}

.top-bar .security-indicator,
.address-bar-container .security-indicator {
    padding: 0 2px !important;
    height: 22px !important;
    box-sizing: border-box !important;
}

.top-bar .address-bar-action,
.address-bar-container .address-bar-action,
.top-bar #copy-url-btn,
.top-bar .bookmark-button {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    flex: 0 0 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.top-bar #go-icon,
.top-bar #url-ai-icon,
.address-bar-container #go-icon,
.address-bar-container #url-ai-icon {
    width: 17px !important;
    height: 16px !important;
    min-width: 17px !important;
    min-height: 16px !important;
    flex: 0 0 17px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.top-bar .url-send-toggle,
.address-bar-container .url-send-toggle {
    height: 20px !important;
    margin: 0 1px 0 0 !important;
    box-sizing: border-box !important;
}

.top-bar .toolbar-icon-btn,
.top-bar .instant-answer-button {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    min-height: 25px !important;
    box-sizing: border-box !important;
}

.top-bar {
    align-items: center !important;
}

.toolbar-icon-btn {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.toolbar-icon-btn:hover {
    background: var(--ui-bg-hover) !important;
}

#pip-toggle-btn.is-disabled,
#pip-toggle-btn[aria-disabled="true"] {
    opacity: 0.38 !important;
    cursor: not-allowed !important;
    filter: grayscale(1);
}

#pip-toggle-btn.is-disabled:hover,
#pip-toggle-btn[aria-disabled="true"]:hover {
    background: var(--ui-bg) !important;
}

#pip-toggle-btn.is-disabled img,
#pip-toggle-btn[aria-disabled="true"] img {
    filter: brightness(0) saturate(100%) invert(55%) !important;
}

#security-toggle-container,
.security-toggle-container,
#downloads-toggle-container,
.downloads-toggle-container,
#link-scan-toggle-container:not(.feature-off):not([hidden]):not(.appearance-hidden),
#link-scan-toggle-container.is-feature-on,
.link-scan-toggle-container:not(.feature-off):not([hidden]):not(.appearance-hidden),
.link-scan-toggle-container.is-feature-on,
#settings-toggle-container:not([hidden]):not(.appearance-hidden),
.settings-toggle-container:not([hidden]):not(.appearance-hidden),
#history-toggle-container:not([hidden]):not(.appearance-hidden),
.history-toggle-container:not([hidden]):not(.appearance-hidden),
#password-toggle-container:not([hidden]):not(.appearance-hidden),
.password-toggle-container:not([hidden]):not(.appearance-hidden),
#screenshot-toggle-container,
.screenshot-toggle-container {
    display: flex !important;
    visibility: visible !important;
}

#security-toggle-btn,
#downloads-toggle-btn,
#link-scan-toggle-btn,
#settings-toggle-btn,
#password-toggle-btn,
#payment-toggle-btn,
#screenshot-toggle-btn {
    display: inline-flex !important;
    visibility: visible !important;
}

.address-bar-container:focus-within {
    border-color: rgba(124, 58, 237, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2), var(--ui-shadow) !important;
}

/* Elements inside address bar - transparent, part of the address bar glass */
.security-indicator,
#go-icon,
#url-ai-icon,
#copy-url-btn,
.bookmark-button,
.address-bar-action,
.address-input-wrapper {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.address-bar-container .url-send-toggle {
    background: rgba(124, 58, 237, 0.12) !important;
    border: 1px solid rgba(124, 58, 237, 0.28) !important;
}

.address-bar-container .url-send-toggle .url-send-thumb {
    background: #7c3aed;
}

.address-bar-container .url-send-toggle[data-mode="ai"] .url-send-thumb {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.status-bar-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.status-item {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
    margin: 0 1px !important;
    padding: 0 6px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    overflow: hidden !important;
    transition: background-color 0.1s ease-out !important;
    color: var(--ui-text, #ffffff) !important;
}

.status-item:hover {
    background: var(--ui-bg-hover) !important;
}

/* VPN/Tor power buttons must not use the 24px toolbar .nav-btn size or the
   chips grow past the 22px status strip and get their top border clipped. */
.status-bar .status-item .nav-btn,
.status-bar .status-item #vpn-toggle,
.status-bar .status-item #tor-toggle,
.status-bar .status-item #tor-circuit-settings-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    font-size: 9px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.status-bar .status-item #tor-circuit-settings-btn[hidden],
.status-bar #tor-circuit-settings-btn[hidden] {
    display: none !important;
}

.status-bar .status-item .status-icon,
.status-bar .status-item .status-icon img,
.status-bar .status-item .status-icon i {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;
}

#menu-btn,
#layout-toggle {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.1s ease-out !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    padding: 0 8px !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 2147483647 !important;
    touch-action: manipulation;
    -webkit-app-region: no-drag !important;
    isolation: isolate;
}

#menu-btn:hover,
#layout-toggle:hover {
    background: var(--ui-bg-hover) !important;
    transform: none !important;
    z-index: 2147483647 !important;
}

html[data-theme="stealth-glass"] #menu-btn,
html[data-theme="stealth-glass"] #layout-toggle,
html.theme-stealth-glass #menu-btn,
html.theme-stealth-glass #layout-toggle {
    /* Must stay off the DWM color key or clicks fall through the chrome HWND. */
    background: rgba(255, 255, 255, 0.14) !important;
}

/* Browser menu container - transparent */
.browser-menu {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Volume control - floating glass */
.volume-control-container {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
}

.volume-button-knob {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Extension toolbar - transparent container */
.extension-toolbar {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.instant-answer-button {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.1s ease-out !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
}

.instant-answer-button:hover {
    background: rgba(0, 184, 184, 0.75) !important;
    border-color: rgba(0, 184, 184, 0.5) !important;
}

.instant-answer-button img {
    width: 16px !important;
    height: 16px !important;
}

#ai-assistant-btn img {
    width: 12px !important;
    height: 12px !important;
}

#crypto-toolbar-btn img {
    width: 17px !important;
    height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
}

#stocks-toolbar-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

#social-toolbar-btn img {
    width: 17px !important;
    height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
}

#split-tunnel-toolbar-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

#proxy-toolbar-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

#vpn-toolbar-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

#tor-toolbar-btn img {
    width: 13px !important;
    height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
}

/* =============================================================================
   DROPDOWNS
   ============================================================================= */

.url-suggestions {
    background: var(--ui-bg, rgba(20, 20, 28, 0.92)) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 12px !important;
    box-shadow:
        var(--ui-shadow, 0 8px 28px rgba(0, 0, 0, 0.45)),
        inset 0 1px 0 var(--ui-highlight, rgba(255, 255, 255, 0.08)) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    isolation: isolate;
    -webkit-font-smoothing: subpixel-antialiased;
}

.url-suggestions.open-above {
    border-radius: 12px 12px 0 0 !important;
}

.url-suggestions:not(.open-above) {
    border-radius: 0 0 12px 12px !important;
}

.url-suggestion {
    background: transparent !important;
    border-bottom: 1px solid var(--ui-border) !important;
}

.url-suggestion:hover,
.url-suggestion.selected {
    background: var(--ui-bg-hover, rgba(30, 30, 42, 0.95)) !important;
}

.menu-dropdown {
    background: rgba(20, 20, 28, 0.55) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--ui-highlight) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    z-index: 2147483647 !important;
    position: fixed !important;
}

.menu-dropdown.show {
    pointer-events: auto !important;
}

[data-theme="light"] .menu-dropdown {
    background: rgba(255, 255, 255, 0.58) !important;
}

[data-theme="stealth"] .menu-dropdown,
[data-theme="stealth-glass"] .browser-container {
    clip-path: inset(0 round 8px);
    -webkit-clip-path: inset(0 round 8px);
}

[data-theme="stealth-glass"] .menu-dropdown,
[data-theme="stealth-glass"] .instant-answer-dropdown,
[data-theme="stealth-glass"] #tab-hover-card,
[data-theme="stealth-glass"] #url-suggestions {
    overflow: hidden;
    isolation: isolate;
    -webkit-font-smoothing: subpixel-antialiased;
}

[data-theme="stealth-glass"] #tab-hover-card {
    background: rgba(30, 18, 48, var(--panel-fill-alpha, 0.48)) !important;
    border-color: rgba(196, 142, 255, 0.28) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
    -webkit-clip-path: inset(0 round 16px) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

[data-theme="stealth-glass"] .menu-dropdown {
    background: rgba(30, 18, 48, 0.55) !important;
}

.menu-dropdown button {
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
}

.menu-dropdown button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.menu-separator {
    background: var(--ui-border) !important;
}

.instant-answer-dropdown {
    background: rgba(22, 22, 30, 0.42) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 16px !important;
    box-shadow: var(--liquid-glass-shadow,
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 12px 40px rgba(0, 0, 0, 0.28)) !important;
    z-index: 2147483647 !important;
    position: fixed !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    transition: none !important;
    overflow: hidden !important;
    isolation: isolate;
    clip-path: inset(0 round 16px) !important;
    -webkit-clip-path: inset(0 round 16px) !important;
}

#instant-answer-dropdown.show,
body > #instant-answer-dropdown.show {
    display: flex !important;
    flex-direction: column !important;
}

#instant-answer-dropdown.show .instant-answer-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}

#instant-answer-dropdown.show .instant-answer-results.show {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 1 1 auto;
}

[data-theme="stealth"] .instant-answer-dropdown,
[data-theme="stealth-glass"] .instant-answer-dropdown {
    background: rgba(36, 22, 58, 0.42) !important;
    border-color: rgba(196, 142, 255, 0.28) !important;
}

[data-theme="light"] .instant-answer-dropdown {
    background: rgba(252, 252, 255, 0.48) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

/* Connection security popover - solid opaque panel.
   Note: backdrop-filter cannot blur through the CEF native content hole,
   so we use a solid gradient fill that visually matches the glass chrome. */
.ssl-popover {
    position: fixed !important;
    z-index: 2147483647 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 360px !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, rgba(28, 28, 38, 1) 0%, rgba(20, 20, 28, 1) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    color: #f2f2f5 !important;
    font-family: inherit !important;
    pointer-events: auto !important;
    isolation: isolate !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    clip-path: inset(0 round 10px) !important;
    -webkit-clip-path: inset(0 round 10px) !important;
}

[data-theme="stealth"] .ssl-popover,
[data-theme="stealth-glass"] .ssl-popover {
    background: linear-gradient(180deg, rgba(44, 26, 70, 1) 0%, rgba(30, 18, 48, 1) 100%) !important;
    border-color: rgba(196, 142, 255, 0.22) !important;
    box-shadow: inset 0 1px 0 rgba(194, 150, 255, 0.10) !important;
}

[data-theme="light"] .ssl-popover {
    background: linear-gradient(180deg, rgba(252, 252, 254, 1) 0%, rgba(240, 240, 246, 1) 100%) !important;
    border-color: rgba(0, 0, 0, 0.10) !important;
    color: #1a1a22 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.ssl-popover .ssl-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
    flex: 0 0 auto !important;
}

.ssl-popover .ssl-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.06) !important;
    font-size: 12px !important;
    flex: 0 0 auto !important;
}

.ssl-popover .ssl-icon.ok { color: #4ade80 !important; background: rgba(74, 222, 128, 0.12) !important; }
.ssl-popover .ssl-icon.warn { color: #fbbf24 !important; background: rgba(251, 191, 36, 0.14) !important; }
.ssl-popover .ssl-icon.danger { color: #f87171 !important; background: rgba(248, 113, 113, 0.14) !important; }
.ssl-popover .ssl-icon.neutral { color: #60a5fa !important; background: rgba(96, 165, 250, 0.14) !important; }

.ssl-popover .ssl-title {
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    color: inherit !important;
}

.ssl-popover .ssl-desc {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    color: rgba(240, 240, 245, 0.78) !important;
    margin-bottom: 6px !important;
    flex: 0 0 auto !important;
}

[data-theme="light"] .ssl-popover .ssl-desc {
    color: rgba(26, 26, 34, 0.72) !important;
}

.ssl-popover .ssl-protection {
    margin: 0 0 6px !important;
    padding: 6px 7px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex: 0 0 auto !important;
}

.ssl-popover .ssl-protection-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-bottom: 3px !important;
}

.ssl-popover .ssl-protection-heading {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    color: inherit !important;
    line-height: 1.2 !important;
}

.ssl-popover .ssl-protection-heading i {
    color: #a78bfa !important;
    font-size: 11px !important;
}

.ssl-popover .ssl-protection-toggle {
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font: inherit !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
}

.ssl-popover .ssl-protection-chevron {
    font-size: 9px !important;
    opacity: 0.7 !important;
    transition: transform 0.15s ease !important;
}

.ssl-popover .ssl-protection.is-collapsed .ssl-protection-chevron {
    transform: rotate(-90deg) !important;
}

.ssl-popover .ssl-protection.is-collapsed .ssl-protection-body {
    display: none !important;
}

.ssl-popover .ssl-protection.is-collapsed .ssl-protection-top {
    margin-bottom: 0 !important;
}

.ssl-popover .ssl-site-scan {
    margin-top: 0 !important;
}

.ssl-popover .ssl-domain-meta + .ssl-site-scan,
.ssl-popover .ssl-meta + .ssl-site-scan {
    margin-top: 6px !important;
}

.ssl-popover .ssl-protection-resume {
    appearance: none !important;
    border: 1px solid rgba(251, 191, 36, 0.45) !important;
    background: rgba(251, 191, 36, 0.14) !important;
    color: #fbbf24 !important;
    border-radius: 5px !important;
    height: 20px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    flex: 0 0 auto !important;
    line-height: 1 !important;
}

.ssl-popover .ssl-protection-resume:hover {
    background: rgba(251, 191, 36, 0.22) !important;
}

.ssl-popover .ssl-protection-resume[hidden] {
    display: none !important;
}

.ssl-popover .ssl-protection-status {
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    color: rgba(240, 240, 245, 0.68) !important;
    margin-bottom: 5px !important;
}

.ssl-popover .ssl-protection-status.is-paused {
    color: #fbbf24 !important;
}

.ssl-popover .ssl-protection-bypass-hint {
    font-size: 10px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: rgba(240, 240, 245, 0.42) !important;
    margin: 0 0 6px 0 !important;
}

.ssl-popover .ssl-block-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
    margin: 0 0 5px 0 !important;
}

.ssl-popover .protection-blocked-panel {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

.ssl-popover .protection-blocked-stats {
    display: none !important;
}

.ssl-popover .protection-blocked-list-label {
    display: none !important;
}

.ssl-popover .ssl-block-stat {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 3px 7px !important;
    border-radius: 5px !important;
    background: rgba(0, 0, 0, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    min-width: 0 !important;
}

.ssl-popover .ssl-block-stat-label {
    font-size: 10px !important;
    font-weight: 650 !important;
    color: rgba(240, 240, 245, 0.62) !important;
    letter-spacing: 0.02em !important;
}

.ssl-popover .ssl-block-stat-value {
    font-size: 12.5px !important;
    font-weight: 750 !important;
    color: #f4f4f8 !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1.1 !important;
}

.ssl-popover .ssl-protection-durations {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
}

.ssl-popover .ssl-pause-duration {
    appearance: none !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(0, 0, 0, 0.24) !important;
    color: #f2f2f5 !important;
    border-radius: 5px !important;
    height: 22px !important;
    padding: 0 4px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
}

.ssl-popover .ssl-pause-duration:hover:not(:disabled) {
    background: rgba(73, 0, 194, 0.32) !important;
    border-color: rgba(90, 13, 214, 0.55) !important;
}

.ssl-popover .ssl-pause-duration:disabled,
.ssl-popover .ssl-protection-custom input:disabled,
.ssl-popover .ssl-protection-custom select:disabled,
.ssl-popover .ssl-protection-custom button:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

.ssl-popover .ssl-protection-custom {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.ssl-popover .ssl-protection-custom input[type="number"],
.ssl-popover .ssl-protection-custom select {
    height: 22px !important;
    border-radius: 5px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(0, 0, 0, 0.24) !important;
    color: #f2f2f5 !important;
    font-size: 10.5px !important;
    padding: 0 6px !important;
    color-scheme: dark;
}

.ssl-popover .ssl-protection-custom input[type="number"] {
    width: 46px !important;
    flex: 0 0 46px !important;
}

.ssl-popover .ssl-protection-custom select {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.ssl-popover .ssl-protection-custom button {
    appearance: none !important;
    height: 22px !important;
    min-width: 48px !important;
    padding: 0 8px !important;
    border: none !important;
    border-radius: 5px !important;
    background: linear-gradient(135deg, #5a0dd6, #4900c2) !important;
    color: #fff !important;
    font-size: 10.5px !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    flex: 0 0 auto !important;
}

.ssl-popover .ssl-protection-custom button:hover:not(:disabled) {
    background: linear-gradient(135deg, #6b1ee0, #5a0dd6) !important;
}

.ssl-popover .ssl-split-tunnel {
    appearance: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 5px !important;
    height: 22px !important;
    border-radius: 5px !important;
    border: 1px solid rgba(167, 139, 250, 0.35) !important;
    background: rgba(90, 13, 214, 0.16) !important;
    color: #d6c9ff !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    line-height: 1 !important;
}

.ssl-popover .ssl-split-tunnel:hover:not(:disabled) {
    background: rgba(90, 13, 214, 0.3) !important;
    border-color: rgba(167, 139, 250, 0.6) !important;
}

.ssl-popover .ssl-split-tunnel:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

[data-theme="light"] .ssl-popover .ssl-split-tunnel {
    background: rgba(90, 13, 214, 0.1) !important;
    border-color: rgba(90, 13, 214, 0.28) !important;
    color: #4900c2 !important;
}

[data-theme="light"] .ssl-popover .ssl-protection {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .ssl-popover .ssl-block-stat {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .ssl-popover .ssl-block-stat-label {
    color: rgba(20, 20, 28, 0.55) !important;
}

[data-theme="light"] .ssl-popover .ssl-block-stat-value {
    color: #1a1a22 !important;
}

[data-theme="light"] .ssl-popover .ssl-protection-status {
    color: rgba(26, 26, 34, 0.62) !important;
}

[data-theme="light"] .ssl-popover .ssl-protection-status.is-paused {
    color: #b45309 !important;
}

[data-theme="light"] .ssl-popover .ssl-protection-bypass-hint {
    color: rgba(26, 26, 34, 0.42) !important;
}

[data-theme="light"] .ssl-popover .ssl-pause-duration,
[data-theme="light"] .ssl-popover .ssl-protection-custom input[type="number"],
[data-theme="light"] .ssl-popover .ssl-protection-custom select {
    background: #f4f4f7 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1a22 !important;
    color-scheme: light;
}

[data-theme="light"] .ssl-popover .ssl-protection-resume {
    color: #b45309 !important;
    border-color: rgba(180, 83, 9, 0.35) !important;
    background: rgba(251, 191, 36, 0.18) !important;
}

.ssl-popover .ssl-popover-body {
    flex: 0 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent !important;
}

.ssl-popover .ssl-popover-body::-webkit-scrollbar {
    width: 8px !important;
}

.ssl-popover .ssl-popover-body::-webkit-scrollbar-track {
    background: transparent !important;
}

.ssl-popover .ssl-popover-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22) !important;
    border-radius: 999px !important;
}

.ssl-popover .ssl-popover-body::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.ssl-popover .ssl-meta {
    display: grid !important;
    gap: 3px !important;
    margin: 0 0 6px !important;
    padding: 5px 8px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.ssl-popover .ssl-meta > div {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
}

.ssl-popover .ssl-meta span {
    color: rgba(240, 240, 245, 0.45) !important;
    flex-shrink: 0 !important;
}

.ssl-popover .ssl-meta strong {
    color: rgba(240, 240, 245, 0.9) !important;
    font-weight: 600 !important;
    text-align: right !important;
    word-break: break-word !important;
}

[data-theme="light"] .ssl-popover .ssl-meta {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .ssl-popover .ssl-meta span {
    color: rgba(26, 26, 34, 0.45) !important;
}

[data-theme="light"] .ssl-popover .ssl-meta strong {
    color: rgba(26, 26, 34, 0.85) !important;
}

.ssl-popover .ssl-domain-meta {
    margin-top: 0 !important;
}

.ssl-popover .ssl-meta + .ssl-domain-meta {
    margin-top: 6px !important;
}

.ssl-popover .ssl-popover-body > .ssl-meta:last-child {
    margin-bottom: 0 !important;
}

.ssl-popover .ssl-value-bad {
    color: #f87171 !important;
}

.ssl-popover .ssl-value-warn {
    color: #fbbf24 !important;
}

.ssl-popover .ssl-location-value {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    max-width: 100% !important;
}

.ssl-popover .ssl-location-flag {
    width: 18px !important;
    height: 13px !important;
    border-radius: 2px !important;
    object-fit: cover !important;
    flex: 0 0 auto !important;
}

.ssl-popover .ssl-url {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding-top: 6px !important;
    margin-top: 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    font-size: 11px !important;
    color: rgba(240, 240, 245, 0.6) !important;
    word-break: break-all !important;
    flex: 0 0 auto !important;
}

[data-theme="light"] .ssl-popover .ssl-url {
    border-top-color: rgba(0, 0, 0, 0.08) !important;
    color: rgba(26, 26, 34, 0.6) !important;
}

.ssl-popover .ssl-url i {
    flex: 0 0 auto !important;
    font-size: 10px !important;
    opacity: 0.7 !important;
}

.bookmark-popup-content {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 var(--ui-highlight) !important;
    z-index: 2147483647 !important;
    position: relative !important;
    pointer-events: auto !important;
}

.bookmark-popup-input {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 8px !important;
}

.bookmark-popup-input:focus {
    border-color: rgba(124, 58, 237, 0.5) !important;
}

.modal-overlay,
.bookmark-popup {
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 2147483647 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

.drawer {
    background: var(--ui-bg) !important;
    border-left: 1px solid var(--ui-border) !important;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4), inset 1px 0 0 var(--ui-highlight) !important;
}

.drawer::before {
    background: var(--ui-bg) !important;
}

/* =============================================================================
   HOME
   ============================================================================= */

.home-search {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background-clip: padding-box !important;
    clip-path: inset(0 round 999px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: border-color 0.1s ease-out !important;
    isolation: isolate;
}

.home-search-mode {
    background: rgba(0, 0, 0, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    padding: 0 !important;
    gap: 0 !important;
    box-shadow: none !important;
}

.home-search-mode-btn {
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    border-left: none !important;
    color: rgba(255, 255, 255, 0.62) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

.home-search-mode-btn:first-child {
    border-radius: 999px 0 0 999px !important;
}

.home-search-mode-btn:last-child {
    border-radius: 0 999px 999px 0 !important;
}

.home-search-mode-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

.home-search-mode-btn.is-active {
    background: rgba(124, 58, 237, 0.55) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.home-search-mode-btn[data-mode="ai"].is-active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(168, 85, 247, 0.7)) !important;
}

.home-search > #home-search-btn {
    border-radius: 0 999px 999px 0 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-left: 1px solid var(--ui-border) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.home-search > #home-search-btn .home-search-icon-ai {
    display: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.home-search[data-home-search-mode="ai"] > #home-search-btn {
    background: rgba(124, 58, 237, 0.28) !important;
    color: #fff !important;
    border-left-color: rgba(168, 85, 247, 0.45) !important;
    min-width: 72px;
}

.home-search[data-home-search-mode="ai"] > #home-search-btn .home-search-icon-search {
    display: none;
}

.home-search[data-home-search-mode="ai"] > #home-search-btn .home-search-icon-ai {
    display: block;
}

.home-search > #home-search-btn:hover {
    background: rgba(124, 58, 237, 0.22) !important;
    color: #fff !important;
}

.home-search[data-home-search-mode="ai"] > #home-search-btn:hover {
    background: rgba(124, 58, 237, 0.4) !important;
}

.home-search:hover {
    background: var(--ui-bg-hover) !important;
}

.home-search.focused {
    border-color: rgba(124, 58, 237, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), var(--ui-shadow) !important;
}

.home-search input {
    background: transparent !important;
}

.location-chip,
.weather-chip {
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
    transition: background-color 0.1s ease-out !important;
}

.location-chip:hover,
.weather-chip:hover {
    background: var(--ui-bg-hover) !important;
}

/* =============================================================================
   WEBVIEW Z-INDEX - Ensure UI stays above webpage content
   ============================================================================= */

webview,
#webview {
    z-index: 1 !important;
}

.web-content {
    z-index: 1 !important;
}

/* Chrome bars stay above page content, below floating overlays.
   URL / address strip is the highest chrome layer so it never sits under tabs.
   Requires .browser-container { z-index: auto } so this ordering is real. */
.glass-titlebar {
    z-index: 100003 !important;
}

.tab-bar {
    z-index: 100002 !important;
    position: fixed !important;
}

.top-bar {
    z-index: 100004 !important;
    position: fixed !important;
}

.address-bar-container {
    position: relative !important;
    z-index: 100005 !important;
}

.status-bar {
    z-index: 100002 !important;
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
}

/* =============================================================================
   SCROLLBAR - Scoped to content areas only, not global
   ============================================================================= */

/* Scrollable content containers only */
.welcome-screen::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.menu-dropdown::-webkit-scrollbar,
.instant-answer-results::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.welcome-screen::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.menu-dropdown::-webkit-scrollbar-track,
.instant-answer-results::-webkit-scrollbar-track {
    background: transparent;
}

.welcome-screen::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.menu-dropdown::-webkit-scrollbar-thumb,
.instant-answer-results::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.4);
    border-radius: 4px;
}

.welcome-screen::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.menu-dropdown::-webkit-scrollbar-thumb:hover,
.instant-answer-results::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.6);
}

/* Hide scrollbar on main containers */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.browser-container::-webkit-scrollbar {
    display: none;
}

/* =============================================================================
   BOTTOM LAYOUT OVERRIDES - Ensure proper layering AND transparency
   ============================================================================= */

.browser-container.bottom-layout .tab-bar {
    z-index: 100002 !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    /* Reset padding for bottom layout as controls are at top */
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.browser-container.bottom-layout .top-bar,
.browser-container.bottom-layout .status-bar {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* Toolbar sits above the tab strip and the stats strip for paint order. */
html body .browser-container.bottom-layout .top-bar,
html body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar,
.browser-container.bottom-layout .top-bar {
    z-index: 1000001 !important;
    pointer-events: auto !important;
}

html body .browser-container.bottom-layout .status-bar,
html body .browser-container.chrome-layout-tabs-top-url-bottom .status-bar,
.browser-container.bottom-layout .status-bar {
    z-index: 999990 !important;
}

.browser-container.bottom-layout .top-bar .nav-controls,
.browser-container.bottom-layout .top-bar .address-bar-container,
.browser-container.bottom-layout .top-bar .toolbar-actions,
.browser-container.bottom-layout .top-bar .browser-menu,
.browser-container.bottom-layout .top-bar .extension-toolbar,
.browser-container.bottom-layout .top-bar .volume-control-container,
.browser-container.bottom-layout .top-bar .screenshot-toggle-container,
.browser-container.bottom-layout .top-bar .instant-answer-container,
.browser-container.bottom-layout .top-bar .security-toggle-container,
.browser-container.bottom-layout .top-bar .vpn-toggle-container,
.browser-container.bottom-layout .top-bar .tor-toggle-container,
.browser-container.bottom-layout .top-bar .pip-toggle-container,
.browser-container.bottom-layout .top-bar .playlist-toggle-container,
.browser-container.bottom-layout .top-bar .clipboard-history-toggle-container,
.browser-container.bottom-layout .top-bar .link-scan-toggle-container,
.browser-container.bottom-layout .top-bar .downloads-toggle-container,
.browser-container.bottom-layout .top-bar .password-toggle-container,
.browser-container.bottom-layout .top-bar .history-toggle-container,
.browser-container.bottom-layout .top-bar .settings-toggle-container,
.browser-container.bottom-layout .top-bar .audio-toggle-container,
.browser-container.bottom-layout .top-bar .notes-toggle-container,
.browser-container.bottom-layout .top-bar .rss-toggle-container,
.browser-container.bottom-layout .top-bar .offline-page-toggle-container,
.browser-container.bottom-layout .top-bar .file-converter-toggle-container,
.browser-container.bottom-layout .top-bar .meme-maker-toggle-container,
.browser-container.bottom-layout .top-bar .night-light-toggle-container,
.browser-container.bottom-layout .top-bar .hide-it-toggle-container,
.browser-container.bottom-layout .top-bar .block-it-toggle-container,
.browser-container.bottom-layout .top-bar .parental-controls-toggle-container,
.browser-container.bottom-layout .top-bar .wayback-look-toggle-container,
.browser-container.bottom-layout .top-bar .reading-mode-toggle-container,
.browser-container.bottom-layout .top-bar #menu-btn,
.browser-container.bottom-layout .top-bar #layout-toggle,
.browser-container.bottom-layout .top-bar .nav-btn,
.browser-container.bottom-layout .top-bar .toolbar-icon-btn,
.browser-container.bottom-layout .top-bar .instant-answer-button,
.browser-container.bottom-layout .top-bar .volume-button-knob,
.browser-container.bottom-layout .top-bar .browser-menu {
    position: relative;
    z-index: 1000002 !important;
    pointer-events: auto !important;
    overflow: visible !important;
    transform: none !important;
    -webkit-app-region: no-drag !important;
}

.browser-container.bottom-layout .top-bar #menu-btn:hover,
.browser-container.bottom-layout .top-bar #layout-toggle:hover,
.browser-container.bottom-layout .top-bar .nav-btn:hover,
.browser-container.bottom-layout .top-bar .toolbar-icon-btn:hover:not(.is-disabled):not([aria-disabled="true"]) {
    transform: none !important;
    z-index: 1000003 !important;
}

html[data-theme="dark"] .browser-container.bottom-layout .top-bar,
html[data-theme="dark"] .browser-container.bottom-layout .status-bar,
html[data-theme="dark"].bottom-layout-html .top-bar,
html[data-theme="dark"].bottom-layout-html .status-bar,
html.bottom-layout-html[data-theme="dark"] .top-bar,
html.bottom-layout-html[data-theme="dark"] .status-bar {
    background: #111111 !important;
    background-color: #111111 !important;
}
html[data-theme="stealth"] .browser-container.bottom-layout .top-bar,
html[data-theme="stealth"] .browser-container.bottom-layout .status-bar,
html[data-theme="stealth"].bottom-layout-html .top-bar,
html[data-theme="stealth"].bottom-layout-html .status-bar,
html.bottom-layout-html[data-theme="stealth"] .top-bar,
html.bottom-layout-html[data-theme="stealth"] .status-bar {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
}
/* Keep tab strip + URL bar + status on the same light chrome surface. */
html[data-theme="light"] .browser-container.bottom-layout .top-bar,
html[data-theme="light"] .browser-container.bottom-layout .status-bar,
html[data-theme="light"].bottom-layout-html .top-bar,
html[data-theme="light"].bottom-layout-html .status-bar,
html.bottom-layout-html[data-theme="light"] .top-bar,
html.bottom-layout-html[data-theme="light"] .status-bar,
body.bottom-layout-body[data-theme="light"] .top-bar,
body.bottom-layout-body[data-theme="light"] .status-bar,
html.theme-light.bottom-layout-html .top-bar,
html.theme-light.bottom-layout-html .status-bar {
    background: #d4cec4 !important;
    background-color: #d4cec4 !important;
    background-image: none !important;
}
/* Bottom-dock tab strip must paint an opaque chrome surface. Transparent /
   acrylic-key fills read as a solid black bar above the URL strip on home
   (no page HWND under the dock to frost). .glass-titlebar is a body sibling,
   never under .browser-container. */
html.bottom-layout-html .glass-titlebar,
body.bottom-layout-body .glass-titlebar,
html.bottom-layout-html.chrome-bg-transparent .glass-titlebar,
body.bottom-layout-body.chrome-bg-transparent .glass-titlebar,
html.welcome-visible.bottom-layout-html .glass-titlebar,
html.welcome-visible.bottom-layout-html.chrome-bg-transparent .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html[data-theme] .glass-titlebar {
    background: #111111 !important;
    background-color: #111111 !important;
    background-image: none !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    outline: none !important;
}

html.bottom-layout-html[data-theme="stealth"] .glass-titlebar,
html[data-theme="stealth"].bottom-layout-html .glass-titlebar,
body.bottom-layout-body[data-theme="stealth"] .glass-titlebar,
html.theme-stealth.bottom-layout-html .glass-titlebar,
html.welcome-visible.bottom-layout-html[data-theme="stealth"] .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html[data-theme="stealth"] .glass-titlebar,
html.chrome-bg-transparent.theme-stealth.bottom-layout-html .glass-titlebar {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
}

html.bottom-layout-html[data-theme="light"] .glass-titlebar,
html[data-theme="light"].bottom-layout-html .glass-titlebar,
body.bottom-layout-body[data-theme="light"] .glass-titlebar,
html.theme-light.bottom-layout-html .glass-titlebar,
html.welcome-visible.bottom-layout-html[data-theme="light"] .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html[data-theme="light"] .glass-titlebar,
html.chrome-bg-transparent.theme-light.bottom-layout-html .glass-titlebar {
    background: #d4cec4 !important;
    background-color: #d4cec4 !important;
}

html.bottom-layout-html[data-theme="stealth-glass"] .glass-titlebar,
html[data-theme="stealth-glass"].bottom-layout-html .glass-titlebar,
html.bottom-layout-html[data-theme="stealth-float"] .glass-titlebar,
html[data-theme="stealth-float"].bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html[data-theme="stealth-glass"] .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html[data-theme="stealth-float"] .glass-titlebar {
    background: #121018 !important;
    background-color: #121018 !important;
}

/* Bottom dock home: never feather a black scrim above the tab strip. */
html.bottom-layout-html.welcome-visible .browser-container::after,
body.bottom-layout-body.welcome-visible .browser-container::after,
html.welcome-visible .browser-container.bottom-layout::after,
body.welcome-visible .browser-container.bottom-layout::after,
.browser-container.bottom-layout:has(.web-content.showing-welcome)::after,
.browser-container.bottom-layout:has(#welcome-screen:not(.is-hidden):not([hidden]))::after {
    display: none !important;
    background: none !important;
    height: 0 !important;
    opacity: 0 !important;
    content: none !important;
}

.browser-container.bottom-layout .web-content,
.browser-container.bottom-layout webview,
.browser-container.bottom-layout #webview {
    z-index: 1 !important;
}

/* Bottom layout containers also transparent */
.browser-container.bottom-layout .nav-controls,
.browser-container.bottom-layout .browser-menu,
.browser-container.bottom-layout .extension-toolbar,
.browser-container.bottom-layout .volume-control-container,
.browser-container.bottom-layout .screenshot-toggle-container,
.browser-container.bottom-layout .instant-answer-container,
.browser-container.bottom-layout .downloads-toggle-container,
.browser-container.bottom-layout .link-scan-toggle-container,
.browser-container.bottom-layout .password-toggle-container,
.browser-container.bottom-layout .history-toggle-container,
.browser-container.bottom-layout .settings-toggle-container,
.browser-container.bottom-layout .tabs-container {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* =============================================================================
   BOTTOM LAYOUT - Glass Titlebar at bottom
   ============================================================================= */

/* When bottom-layout is active, move glass-titlebar to the bottom.
   status strip + 32px URL strip, minus 1px overlap to kill the DPI seam.
   --bottom-status-height tracks the live (zoomed) stats strip height. */
.bottom-layout-html .glass-titlebar,
.bottom-layout-body .glass-titlebar,
html.bottom-layout-html .glass-titlebar,
body.bottom-layout-body .glass-titlebar {
    top: auto !important;
    bottom: calc(var(--bottom-status-height, 22px) + 31px) !important;
}

/* Bottom layout: window controls stay in-flow on the tab strip. */
.browser-container.bottom-layout .glass-window-controls,
body.bottom-layout-body .glass-window-controls,
html.bottom-layout-html .glass-window-controls {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
}

/* =============================================================================
   FINAL NATIVE-CEF WINDOW CHROME OVERRIDES
   Min / max / close chips match toolbar .nav-btn size and radius so the
   tab-strip accent boxes are not taller than More / Layout / Menu.
   ============================================================================= */

.glass-window-controls {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    align-items: center !important;
    align-self: center !important;
}

.glass-control-btn,
.glass-control-btn:hover,
.glass-control-btn:active,
.glass-control-btn:focus {
    width: 20px !important;
    height: 16px !important;
    min-width: 20px !important;
    min-height: 16px !important;
    padding: 0 !important;
    align-self: center !important;
    box-sizing: border-box !important;
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    outline: none !important;
}

.glass-control-btn:hover {
    background: var(--ui-bg-hover) !important;
    color: #ffffff !important;
    transform: none !important;
}

.glass-control-btn.glass-close:hover {
    background: rgba(239, 68, 68, 0.9) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #ffffff !important;
}

html body.toolbar-labels .glass-titlebar .glass-control-btn,
html body.toolbar-labels .glass-titlebar .glass-control-btn:hover,
html body.toolbar-labels .glass-titlebar .glass-control-btn:active,
html body.toolbar-labels .glass-titlebar .glass-control-btn:focus {
    width: 21px !important;
    min-width: 21px !important;
    height: 17px !important;
    min-height: 17px !important;
}

html.bottom-layout-html,
body.bottom-layout-body,
body.bottom-layout-body .browser-container {
    overflow: hidden !important;
}

html.bottom-layout-html .glass-titlebar,
body.bottom-layout-body .glass-titlebar {
    top: auto !important;
    /* status strip + 32px URL strip, minus 1px overlap to kill the DPI seam.
       --bottom-status-height tracks the live (zoomed) stats strip height so the
       tab strip never slides under a taller URL/security stack. */
    bottom: calc(var(--bottom-status-height, 22px) + 31px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    /* Match the title strip to the 32px tab row. */
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    align-items: center !important;
}

.browser-container.bottom-layout .top-bar {
    top: auto !important;
    bottom: var(--bottom-status-height, 22px) !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
}

.browser-container.bottom-layout .status-bar {
    top: auto !important;
    bottom: 0 !important;
}

html.security-bar-hidden.bottom-layout-html .glass-titlebar,
body.security-bar-hidden.bottom-layout-body .glass-titlebar,
body.bottom-layout-body.security-bar-hidden .glass-titlebar {
    bottom: calc(var(--bottom-status-height, 0px) + 39px) !important;
}

html.security-bar-hidden.bottom-layout-html .browser-container.bottom-layout .top-bar,
body.security-bar-hidden.bottom-layout-body .browser-container.bottom-layout .top-bar,
.browser-container.bottom-layout.security-bar-hidden .top-bar,
html.security-bar-hidden .browser-container.bottom-layout .top-bar,
body.security-bar-hidden .browser-container.bottom-layout .top-bar {
    /* Dock flush to the window edge; keep the 8px inset as padding so the
       chrome background fills the breathing room instead of leaving a seam. */
    bottom: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 6px 8px 6px !important;
    box-sizing: border-box !important;
}

/* Labeled toolbar: lift tabs, grow URL strip, labels above icons so they
   never paint into the security statistics strip. html AND body must both
   agree stats are visible; a split class state parks tabs at 74 with URL at 0. */
html.bottom-layout-html:not(.security-bar-hidden) body.toolbar-labels.bottom-layout-body:not(.security-bar-hidden) .glass-titlebar,
html.bottom-layout-html:not(.security-bar-hidden) body.toolbar-labels:not(.security-bar-hidden) .glass-titlebar {
    bottom: calc(var(--bottom-status-height, 22px) + 51px) !important; /* 52px labeled URL strip minus 1px overlap */
}

html.bottom-layout-html:not(.security-bar-hidden) body.toolbar-labels.bottom-layout-body:not(.security-bar-hidden) .browser-container.bottom-layout .top-bar,
html.bottom-layout-html:not(.security-bar-hidden) body.toolbar-labels:not(.security-bar-hidden) .browser-container.bottom-layout .top-bar {
    bottom: var(--bottom-status-height, 22px) !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 14px 6px 2px 6px !important;
}

/* Stats hidden: tabs sit flush on the 52px labeled URL strip (no 22px ghost). */
html.security-bar-hidden.bottom-layout-html body.toolbar-labels .glass-titlebar,
html.bottom-layout-html.security-bar-hidden body.toolbar-labels .glass-titlebar,
html.security-bar-hidden body.toolbar-labels.bottom-layout-body .glass-titlebar {
    bottom: calc(var(--bottom-status-height, 0px) + 51px) !important;
}

html.security-bar-hidden.bottom-layout-html body.toolbar-labels .browser-container.bottom-layout .top-bar,
html.bottom-layout-html.security-bar-hidden body.toolbar-labels .browser-container.bottom-layout .top-bar,
html.security-bar-hidden body.toolbar-labels .browser-container.bottom-layout .top-bar {
    bottom: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 14px 6px 2px 6px !important;
    box-sizing: border-box !important;
}

html.security-bar-hidden .browser-container.bottom-layout .status-bar,
body.security-bar-hidden .browser-container.bottom-layout .status-bar,
.browser-container.bottom-layout.security-bar-hidden .status-bar {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* Floating bottom chrome: tabs + URL only. Never reserve a phantom status strip. */
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar {
    bottom: 40px !important;
}
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar {
    bottom: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
}

html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) body.toolbar-labels .glass-titlebar,
body.toolbar-labels.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar {
    bottom: 52px !important;
}
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) body.toolbar-labels .browser-container.bottom-layout .top-bar,
body.toolbar-labels.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar {
    bottom: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 14px 6px 2px 6px !important;
}

html.bottom-layout-html:not(.vertical-tabs) .browser-container.bottom-layout .tabs-container,
body.bottom-layout-body:not(.vertical-tabs) .browser-container.bottom-layout .tabs-container,
html.bottom-layout-html:not(.vertical-tabs) .glass-titlebar > .tabs-container,
body.bottom-layout-body:not(.vertical-tabs) .glass-titlebar > .tabs-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior: none !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    flex: 0 1 auto !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    height: 32px !important;
    padding: 0 2px !important;
}

body.vertical-tabs.bottom-layout-body .browser-container.bottom-layout .tabs-container,
body.bottom-layout-body.vertical-tabs .tabs-container,
html.vertical-tabs.bottom-layout-html .tabs-container {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    flex: none !important;
    min-width: 200px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.browser-container.bottom-layout .tab:not(.pinned),
html.bottom-layout-html .glass-titlebar .tab:not(.pinned),
body.bottom-layout-body .glass-titlebar .tab:not(.pinned) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: var(--tab-shrink-floor, 60px) !important;
    max-width: var(--max-tab-width, 240px) !important;
    width: auto !important;
    flex: 0 1 var(--min-tab-width, 120px) !important;
    flex-shrink: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
}
.browser-container.bottom-layout .tab.pinned,
html.bottom-layout-html .glass-titlebar .tab.pinned,
body.bottom-layout-body .glass-titlebar .tab.pinned {
    flex: 0 0 auto !important;
    width: auto !important;
}

html.longer-tabs .glass-titlebar .tab,
body.longer-tabs .glass-titlebar .tab,
html.longer-tabs.bottom-layout-html .glass-titlebar .tab,
body.longer-tabs.bottom-layout-body .glass-titlebar .tab,
.browser-container.bottom-layout.longer-tabs .tab {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}

html.longer-tabs:not(.vertical-tabs) .glass-titlebar .tabs-container,
body.longer-tabs:not(.vertical-tabs) .glass-titlebar .tabs-container,
html.longer-tabs.bottom-layout-html:not(.vertical-tabs) .glass-titlebar .tabs-container,
body.longer-tabs.bottom-layout-body:not(.vertical-tabs) .glass-titlebar .tabs-container {
    height: 40px !important;
    min-height: 40px !important;
}

html.longer-tabs .glass-titlebar .tab-group-chip,
body.longer-tabs .glass-titlebar .tab-group-chip {
    height: 34px !important;
    min-height: 34px !important;
}

html.longer-tabs .glass-titlebar .new-tab-btn:not(.tab-strip-new-tab-docked),
body.longer-tabs .glass-titlebar .new-tab-btn:not(.tab-strip-new-tab-docked) {
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
}

html.longer-tabs .glass-titlebar,
body.longer-tabs .glass-titlebar,
html.longer-tabs.bottom-layout-html .glass-titlebar,
body.longer-tabs.bottom-layout-body .glass-titlebar,
html.longer-tabs.bottom-layout-html body.bottom-layout-body .glass-titlebar,
body.longer-tabs.bottom-layout-body.security-bar-hidden .glass-titlebar,
html.longer-tabs.security-bar-hidden.bottom-layout-html .glass-titlebar,
body.longer-tabs.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar {
    height: 48px !important;
    min-height: 48px !important;
}

/* Longer bottom tabs use the full 40px title strip. */
html.longer-tabs.bottom-layout-html .glass-titlebar,
html.bottom-layout-html.longer-tabs .glass-titlebar,
body.longer-tabs.bottom-layout-body .glass-titlebar,
body.bottom-layout-body.longer-tabs .glass-titlebar,
html.longer-tabs.bottom-layout-html body.bottom-layout-body .glass-titlebar,
body.longer-tabs.bottom-layout-body.security-bar-hidden .glass-titlebar,
html.longer-tabs.security-bar-hidden.bottom-layout-html .glass-titlebar,
body.longer-tabs.floating-toolbar-widget:not(.chrome-widget-collapsed).bottom-layout-body .glass-titlebar,
html.longer-tabs.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
}

html.longer-tabs body .browser-container:not(.bottom-layout) .top-bar,
body.longer-tabs .browser-container:not(.bottom-layout) .top-bar {
    top: 48px !important;
}

/* Longer tabs grow the title strip: keep stats + content under the real stack.
   Default top dock without labels: 48 title + 32 URL = 80, +22 stats = 102. */
html.longer-tabs:not(.bottom-layout-html) body:not(.toolbar-labels):not(.bottom-layout-body) .status-bar,
html.longer-tabs body:not(.toolbar-labels) .browser-container:not(.bottom-layout) .status-bar {
    top: 80px !important;
}

html.longer-tabs body:not(.toolbar-labels) .browser-container:not(.bottom-layout) .web-content {
    top: 102px !important;
    height: calc(100% - 102px) !important;
}

html.longer-tabs body:not(.toolbar-labels) .browser-container.security-bar-hidden:not(.bottom-layout) .web-content,
html.longer-tabs.security-bar-hidden body:not(.toolbar-labels):not(.bottom-layout-body) .web-content {
    top: 80px !important;
    height: calc(100% - 80px) !important;
}

/* Longer tabs + labeled toolbar: 48 title + 52 URL = 100, +22 stats = 122. */
html.longer-tabs body.toolbar-labels:not(.bottom-layout-body) .status-bar,
html.longer-tabs body.toolbar-labels .browser-container:not(.bottom-layout) .status-bar {
    top: 100px !important;
}

html.longer-tabs body.toolbar-labels .browser-container:not(.bottom-layout) .web-content {
    top: 122px !important;
    height: calc(100% - 122px) !important;
}

html.longer-tabs body.toolbar-labels .browser-container.security-bar-hidden:not(.bottom-layout) .web-content,
html.longer-tabs body.toolbar-labels.security-bar-hidden:not(.bottom-layout-body) .web-content {
    top: 100px !important;
    height: calc(100% - 100px) !important;
}

/* Bottom dock: stats stay on the window edge; taller tabs only extend upward. */
html.longer-tabs.bottom-layout-html .status-bar,
body.longer-tabs.bottom-layout-body .status-bar,
html.longer-tabs .browser-container.bottom-layout .status-bar {
    top: auto !important;
    bottom: 0 !important;
}

html.bottom-layout-html .glass-titlebar,
body.bottom-layout-body .glass-titlebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* Empty titlebar band must not steal hits from toolbar controls below.
       Stay under .top-bar (100004+) so enlarged icon labels paint over this strip. */
    pointer-events: none !important;
    z-index: 100003 !important;
    -webkit-app-region: no-drag !important;
}

html.longer-tabs.bottom-layout-html .glass-titlebar,
html.bottom-layout-html.longer-tabs .glass-titlebar,
body.longer-tabs.bottom-layout-body .glass-titlebar,
body.bottom-layout-body.longer-tabs .glass-titlebar {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
}

html.bottom-layout-html .glass-titlebar > .tabs-container,
html.bottom-layout-html .glass-titlebar > .new-tab-btn,
html.bottom-layout-html .glass-titlebar .new-tab-btn,
html.bottom-layout-html .glass-titlebar > .glass-title-section,
html.bottom-layout-html .glass-titlebar > .tab-strip-scroll-btn,
html.bottom-layout-html .glass-titlebar > .tab-strip-drag-region,
html.bottom-layout-html .glass-titlebar .tab,
html.bottom-layout-html .glass-titlebar .glass-title-logo,
html.bottom-layout-html .glass-titlebar .glass-window-controls,
html.bottom-layout-html .glass-titlebar .glass-control-btn,
body.bottom-layout-body .glass-titlebar > .tabs-container,
body.bottom-layout-body .glass-titlebar > .new-tab-btn,
body.bottom-layout-body .glass-titlebar .new-tab-btn,
body.bottom-layout-body .glass-titlebar > .glass-title-section,
body.bottom-layout-body .glass-titlebar > .tab-strip-scroll-btn,
body.bottom-layout-body .glass-titlebar > .tab-strip-drag-region,
body.bottom-layout-body .glass-titlebar .tab,
body.bottom-layout-body .glass-titlebar .glass-title-logo,
body.bottom-layout-body .glass-titlebar .glass-window-controls,
body.bottom-layout-body .glass-titlebar .glass-control-btn {
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
}

/* Empty tab-strip filler is the caption drag / double-click maximize surface. */
html.bottom-layout-html .glass-titlebar > .tab-strip-drag-region,
body.bottom-layout-body .glass-titlebar > .tab-strip-drag-region {
    align-self: center !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
}

html.longer-tabs.bottom-layout-html .glass-titlebar > .tab-strip-drag-region,
html.bottom-layout-html.longer-tabs .glass-titlebar > .tab-strip-drag-region,
body.longer-tabs.bottom-layout-body .glass-titlebar > .tab-strip-drag-region,
body.bottom-layout-body.longer-tabs .glass-titlebar > .tab-strip-drag-region {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
}

.browser-container.bottom-layout .web-content {
    top: 0 !important;
    bottom: var(--bottom-chrome-reserve, 80px) !important;
    height: auto !important;
    overflow: hidden !important;
}

.browser-container.bottom-layout.security-bar-hidden .web-content {
    bottom: var(--bottom-chrome-reserve, 80px) !important;
}

/* Search/home page must keep the measured chrome inset in every theme */
.browser-container.bottom-layout .web-content.showing-welcome,
html.floating-toolbar-widget .browser-container.bottom-layout .web-content.showing-welcome,
body.floating-toolbar-widget .web-content.showing-welcome,
html.chrome-widget-collapsed .browser-container.bottom-layout .web-content.showing-welcome,
body.chrome-widget-collapsed .web-content.showing-welcome,
html.bottom-layout-html.chrome-widget-collapsed .browser-container.bottom-layout .web-content.showing-welcome,
body.bottom-layout-body.chrome-widget-collapsed .browser-container.bottom-layout .web-content.showing-welcome {
    top: 0 !important;
    bottom: var(--bottom-chrome-reserve, 80px) !important;
    height: auto !important;
    z-index: 1 !important;
}

/* Floating overlays are portaled to body and must always paint above chrome
   bars (tab strip / toolbar / status / bookmarks) in either dock position. */
body > #bookmarks-bar {
    position: fixed !important;
    z-index: 100004 !important;
}

body > #main-menu,
body > #stealth-logo-menu,
body > #ai-assistant-window,
body > #ai-assistant-more-menu,
body > #ai-assistant-name-dialog,
body > #ai-assistant-context-menu,
body > #ai-assistant-compose-menu,
body > #minimal-url-bubble,
body > #notes-window,
body > #profiles-window,
body > #offline-pages-window,
body > #file-converter-window,
body > #meme-maker-window,
body > #night-light-window,
body > #media-controls-window,
body > :is(#video-downloader-window, #cast-to-tv-window),
body > #hide-it-window,
body > #block-it-window,
body > #wayback-look-window,
body > #reading-mode-window,
body > .notes-sticky,
body > #instant-answer-dropdown,
body > #bookmark-popup,
body > #tab-hover-card,
body > #bookmarks-bar-context-menu,
body > .tab-context-menu,
body > #tab-context-menu,
body > #page-context-menu,
body > #home-dash-context,
body > .home-dash-context,
body > #tab-group-context-menu,
body > #pip-opacity-menu,
body > #url-suggestions,
body > #downloads-popup,
body > #proxy-powerup-popup,
body > #clipboard-history-popup,
body > #find-bar,
body > #playlist-popup,
body > #extensions-menu,
body > #volume-tabs-menu,
body > #toolbar-group-popup,
body > #toolbar-group-context-menu,
body > #toolbar-overflow-menu,
body > #stealthUpdatePopup,
body > #screenshot-popup,
body > #screenshot-clip-overlay,
body > #screenshot-gif-overlay,
body > #app-closing-overlay,
body > .download-flyer,
body > .drawer,
body > .modal-overlay,
body > .bug-report-overlay,
body > .extension-popup,
body > .extension-menu,
body > .ssl-popover,
body > .sb-select-menu,
body > .bug-report-select-menu,
body > .stealth-toast,
body > .glass-window-controls.window-controls-corner-bubble {
    position: fixed !important;
    z-index: 2147483647 !important;
}

body > #app-closing-overlay.show {
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    transform: none !important;
}

/* Dismiss shield must sit under the frosted menu so hover/click reach items. */
body > #page-context-menu-dismiss {
    position: fixed !important;
    z-index: 2147483645 !important;
}

body > #page-context-menu {
    position: fixed !important;
    z-index: 2147483647 !important;
}

/* Page context menu: Minimal URL bubble live CSS glass (not page-frost bake). */
body > #page-context-menu.show,
#page-context-menu.show,
.page-context-menu.show {
    --panel-fill-alpha: 0.62;
    background: rgba(18, 18, 22, var(--panel-fill-alpha, 0.62)) !important;
    background-color: rgba(18, 18, 22, var(--panel-fill-alpha, 0.62)) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    isolation: isolate;
}

[data-theme="light"] body > #page-context-menu.show,
[data-theme="light"] #page-context-menu.show,
[data-theme="light"] .page-context-menu.show {
    --panel-fill-alpha: 0.72;
    background: rgba(246, 242, 236, var(--panel-fill-alpha, 0.72)) !important;
    background-color: rgba(246, 242, 236, var(--panel-fill-alpha, 0.72)) !important;
    border: 1px solid rgba(40, 32, 24, 0.12) !important;
    box-shadow:
        0 8px 24px rgba(40, 32, 24, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

.app-closing-overlay {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 2147483647;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(8, 8, 12, 0.92);
    color: #f2f4f8;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.app-closing-overlay.show {
    opacity: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.app-closing-overlay[hidden] {
    display: none !important;
}

.app-closing-card {
    position: relative;
    width: min(360px, calc(100vw - 48px));
    max-width: calc(100% - 48px);
    margin: auto;
    padding: 22px 24px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(22, 22, 30, 0.96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    text-align: center;
    flex: 0 0 auto;
}

.app-closing-title {
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.app-closing-subtitle {
    font-size: 13px;
    color: rgba(242, 244, 248, 0.72);
    margin-bottom: 16px;
}

.app-closing-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.app-closing-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 55%, #c4b5fd 100%);
    transition: width 0.08s linear;
}

body > #main-menu.show,
body > #ai-assistant-window.show,
body > #minimal-url-bubble.show,
body > #notes-window.show,
body > #profiles-window.show,
body > #offline-pages-window.show,
body > #file-converter-window.show,
body > #meme-maker-window.show,
body > #night-light-window.show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > #hide-it-window.show,
body > #block-it-window.show,
body > #wayback-look-window.show,
body > #reading-mode-window.show,
body > .notes-sticky.show,
body > #instant-answer-dropdown.show,
body > #downloads-popup.show,
body > #extensions-menu.show,
body > #powerups-menu.show,
body > #volume-tabs-menu.show,
body > #proxy-powerup-popup.show,
body > #clipboard-history-popup.show,
body > #find-bar.show,
body > #playlist-popup.show,
body > #screenshot-popup.show,
body > #toolbar-group-popup.show,
body > #toolbar-overflow-menu.show,
body > #screenshot-clip-overlay:not([hidden]) {
    pointer-events: auto !important;
}

body > #screenshot-gif-overlay:not([hidden]) {
    pointer-events: none !important;
}

body > #screenshot-gif-overlay:not([hidden]) .screenshot-gif-bar {
    pointer-events: auto !important;
}

body > #playlist-popup.playlist-popup,
body > #playlist-popup.playlist-popup.show {
    border-radius: 14px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 14px) !important;
    -webkit-clip-path: inset(0 round 14px) !important;
    background: rgba(32, 33, 36, 0.98) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

[data-theme="light"] body > #playlist-popup.playlist-popup,
[data-theme="light"] body > #playlist-popup.playlist-popup.show {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="stealth"] body > #playlist-popup.playlist-popup,
[data-theme="stealth"] body > #playlist-popup.playlist-popup.show {
    background: rgba(10, 24, 24, 0.98) !important;
}

[data-theme="stealth-glass"] body > #playlist-popup.playlist-popup,
[data-theme="stealth-glass"] body > #playlist-popup.playlist-popup.show {
    background: rgba(22, 16, 36, 0.96) !important;
}

/* Menus / Glass / AI punch a content hole. Acrylic themes key #010103 through
   to live DWM frost. Never use compose LWA_ALPHA here; that kills color-key. */
.menu-dropdown.show,
body > #main-menu.show,
#instant-answer-dropdown.show,
#ai-assistant-window.show,
#notes-window.show,
#profiles-window.show,
#offline-pages-window.show,
#file-converter-window.show,
#meme-maker-window.show,
#night-light-window.show,
#hide-it-window.show,
#block-it-window.show,
#wayback-look-window.show,
#reading-mode-window.show,
body > .notes-sticky.show,
body > #instant-answer-dropdown.show,
body > #ai-assistant-window.show,
body > #notes-window.show,
body > #profiles-window.show,
body > #offline-pages-window.show,
body > #file-converter-window.show,
body > #meme-maker-window.show,
body > #night-light-window.show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > #hide-it-window.show,
body > #block-it-window.show,
body > #wayback-look-window.show,
body > #reading-mode-window.show {
    border-radius: 16px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 16px) !important;
    -webkit-clip-path: inset(0 round 16px) !important;
    -webkit-font-smoothing: subpixel-antialiased;
    isolation: isolate;
}

body > #downloads-popup.show {
    border-radius: 12px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 12px) !important;
    -webkit-clip-path: inset(0 round 12px) !important;
    -webkit-font-smoothing: subpixel-antialiased;
    isolation: isolate;
}

.menu-dropdown.show,
body > #main-menu.show {
    background: rgba(22, 22, 30, 0.97) !important;
}

/* The overflow list is the one menu that can outgrow the screen, so it keeps
   its own scroller instead of the shared clip-path crop. */
body > #toolbar-overflow-menu.menu-dropdown.show,
#toolbar-overflow-menu.menu-dropdown.show {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}

#instant-answer-dropdown.show,
#ai-assistant-window.show,
#notes-window.show,
#profiles-window.show,
#offline-pages-window.show,
#file-converter-window.show,
#meme-maker-window.show,
#night-light-window.show,
#hide-it-window.show,
#block-it-window.show,
#wayback-look-window.show,
#reading-mode-window.show,
body > .notes-sticky.show,
body > #instant-answer-dropdown.show,
body > #ai-assistant-window.show,
body > #notes-window.show,
body > #profiles-window.show,
body > #offline-pages-window.show,
body > #file-converter-window.show,
body > #meme-maker-window.show,
body > #night-light-window.show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > #hide-it-window.show,
body > #block-it-window.show,
body > #wayback-look-window.show,
body > #reading-mode-window.show {
    /* Translucent smoked fill over frosted glass. */
    background: rgba(22, 22, 30, var(--panel-fill-alpha, 0.55)) !important;
    background-color: rgba(22, 22, 30, var(--panel-fill-alpha, 0.55)) !important;
    backdrop-filter: blur(32px) saturate(1.18) !important;
    -webkit-backdrop-filter: blur(32px) saturate(1.18) !important;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

body > #downloads-popup.show,
body > #extensions-menu.show,
body > #powerups-menu.show,
body > #volume-tabs-menu.show,
body > #proxy-powerup-popup.show,
body > #clipboard-history-popup.show,
body > #find-bar.show,
body > #screenshot-popup.show,
body > #toolbar-group-popup.show {
    border-radius: 12px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 12px) !important;
    -webkit-clip-path: inset(0 round 12px) !important;
    background: rgba(32, 33, 36, 0.98) !important;
}

[data-theme="light"] body > #downloads-popup.show,
[data-theme="light"] body > #extensions-menu.show,
body > #powerups-menu.show,
[data-theme="light"] body > #volume-tabs-menu.show,
[data-theme="light"] body > #proxy-powerup-popup.show,
[data-theme="light"] body > #clipboard-history-popup.show,
[data-theme="light"] body > #find-bar.show,
[data-theme="light"] body > #screenshot-popup.show,
[data-theme="light"] body > #toolbar-group-popup.show {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #202124 !important;
}

[data-theme="stealth"] body > #downloads-popup.show,
[data-theme="stealth"] body > #extensions-menu.show,
body > #powerups-menu.show,
[data-theme="stealth"] body > #volume-tabs-menu.show,
[data-theme="stealth"] body > #proxy-powerup-popup.show,
[data-theme="stealth"] body > #clipboard-history-popup.show,
[data-theme="stealth"] body > #find-bar.show,
[data-theme="stealth"] body > #screenshot-popup.show {
    background: rgba(10, 24, 24, 0.96) !important;
    border-color: rgba(94, 234, 212, 0.18) !important;
}

[data-theme="stealth-glass"] body > #downloads-popup.show,
[data-theme="stealth-glass"] body > #playlist-popup.show,
[data-theme="stealth-glass"] body > #extensions-menu.show,
body > #powerups-menu.show,
[data-theme="stealth-glass"] body > #volume-tabs-menu.show,
[data-theme="stealth-glass"] body > #proxy-powerup-popup.show,
[data-theme="stealth-glass"] body > #clipboard-history-popup.show,
[data-theme="stealth-glass"] body > #find-bar.show,
[data-theme="stealth-glass"] body > #screenshot-popup.show,
[data-theme="stealth-float"] body > #downloads-popup.show,
[data-theme="stealth-float"] body > #playlist-popup.show,
[data-theme="stealth-float"] body > #extensions-menu.show,
body > #powerups-menu.show,
[data-theme="stealth-float"] body > #volume-tabs-menu.show,
[data-theme="stealth-float"] body > #proxy-powerup-popup.show,
[data-theme="stealth-float"] body > #clipboard-history-popup.show,
[data-theme="stealth-float"] body > #find-bar.show,
[data-theme="stealth-float"] body > #screenshot-popup.show {
    background: rgba(12, 12, 18, 0.58) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(24px) saturate(var(--glass-saturation, 150%)) !important;
    -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturation, 150%)) !important;
    box-shadow: var(--liquid-glass-shadow) !important;
}

[data-theme="light"] .menu-dropdown.show,
[data-theme="light"] body > #main-menu.show,
[data-theme="light"] #instant-answer-dropdown.show,
[data-theme="light"] #ai-assistant-window.show,
[data-theme="light"] #notes-window.show,
[data-theme="light"] #profiles-window.show,
[data-theme="light"] #offline-pages-window.show,
[data-theme="light"] #file-converter-window.show,
#meme-maker-window.show,
[data-theme="light"] #night-light-window.show,
[data-theme="light"] #hide-it-window.show,
[data-theme="light"] #block-it-window.show,
[data-theme="light"] #wayback-look-window.show,
[data-theme="light"] #reading-mode-window.show,
[data-theme="light"] body > .notes-sticky.show,
[data-theme="light"] body > #instant-answer-dropdown.show,
[data-theme="light"] body > #ai-assistant-window.show,
[data-theme="light"] body > #notes-window.show,
[data-theme="light"] body > #profiles-window.show,
[data-theme="light"] body > #offline-pages-window.show,
[data-theme="light"] body > #file-converter-window.show,
body > #meme-maker-window.show,
[data-theme="light"] body > #night-light-window.show,
[data-theme="light"] body > #media-controls-window.show,
[data-theme="light"] body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="light"] body > #hide-it-window.show,
[data-theme="light"] body > #block-it-window.show,
[data-theme="light"] body > #wayback-look-window.show,
[data-theme="light"] body > #reading-mode-window.show {
    background: rgba(248, 250, 252, 0.92) !important;
    color: #202124 !important;
}

[data-theme="light"] .toolbar-group-btn {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28) 46%),
        color-mix(in srgb, var(--toolbar-group-color, #a142f4) 28%, rgba(248, 250, 252, 0.9)) !important;
    border-color: color-mix(in srgb, var(--toolbar-group-color, #a142f4) 45%, rgba(0, 0, 0, 0.16)) !important;
}

[data-theme="stealth"] .menu-dropdown.show,
[data-theme="stealth"] body > #main-menu.show {
    background: rgba(12, 18, 20, 0.97) !important;
}

[data-theme="stealth"] #instant-answer-dropdown.show,
[data-theme="stealth"] #ai-assistant-window.show,
[data-theme="stealth"] #notes-window.show,
[data-theme="stealth"] #profiles-window.show,
[data-theme="stealth"] #offline-pages-window.show,
[data-theme="stealth"] #file-converter-window.show,
#meme-maker-window.show,
[data-theme="stealth"] #night-light-window.show,
[data-theme="stealth"] #hide-it-window.show,
[data-theme="stealth"] #block-it-window.show,
[data-theme="stealth"] #wayback-look-window.show,
[data-theme="stealth"] #reading-mode-window.show,
[data-theme="stealth"] body > .notes-sticky.show,
[data-theme="stealth"] body > #instant-answer-dropdown.show,
[data-theme="stealth"] body > #ai-assistant-window.show,
[data-theme="stealth"] body > #notes-window.show,
[data-theme="stealth"] body > #profiles-window.show,
[data-theme="stealth"] body > #offline-pages-window.show,
[data-theme="stealth"] body > #file-converter-window.show,
body > #meme-maker-window.show,
[data-theme="stealth"] body > #night-light-window.show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="stealth"] body > #media-controls-window.show,
[data-theme="stealth"] body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="stealth"] body > #hide-it-window.show,
[data-theme="stealth"] body > #block-it-window.show,
[data-theme="stealth"] body > #wayback-look-window.show,
[data-theme="stealth"] body > #reading-mode-window.show {
    background: rgba(12, 18, 20, var(--panel-fill-alpha, 0.55)) !important;
    background-color: rgba(12, 18, 20, var(--panel-fill-alpha, 0.55)) !important;
}

[data-theme="stealth-glass"] .menu-dropdown.show,
[data-theme="stealth-glass"] body > #main-menu.show,
[data-theme="stealth-glass"] #instant-answer-dropdown.show,
[data-theme="stealth-glass"] #ai-assistant-window.show,
[data-theme="stealth-glass"] #notes-window.show,
[data-theme="stealth-glass"] #profiles-window.show,
[data-theme="stealth-glass"] #offline-pages-window.show,
[data-theme="stealth-glass"] #file-converter-window.show,
#meme-maker-window.show,
[data-theme="stealth-glass"] #night-light-window.show,
[data-theme="stealth-glass"] #hide-it-window.show,
[data-theme="stealth-glass"] #block-it-window.show,
[data-theme="stealth-glass"] #wayback-look-window.show,
[data-theme="stealth-glass"] #reading-mode-window.show,
[data-theme="stealth-glass"] body > .notes-sticky.show,
[data-theme="stealth-glass"] body > #instant-answer-dropdown.show,
[data-theme="stealth-glass"] body > #ai-assistant-window.show,
[data-theme="stealth-glass"] body > #notes-window.show,
[data-theme="stealth-glass"] body > #profiles-window.show,
[data-theme="stealth-glass"] body > #offline-pages-window.show,
[data-theme="stealth-glass"] body > #file-converter-window.show,
body > #meme-maker-window.show,
[data-theme="stealth-glass"] body > #night-light-window.show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="stealth-glass"] body > #media-controls-window.show,
[data-theme="stealth-glass"] body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="stealth-glass"] body > #hide-it-window.show,
[data-theme="stealth-glass"] body > #block-it-window.show,
[data-theme="stealth-glass"] body > #wayback-look-window.show,
[data-theme="stealth-glass"] body > #reading-mode-window.show,
[data-theme="stealth-float"] #instant-answer-dropdown.show,
[data-theme="stealth-float"] #ai-assistant-window.show,
[data-theme="stealth-float"] #notes-window.show,
[data-theme="stealth-float"] #profiles-window.show,
[data-theme="stealth-float"] #offline-pages-window.show,
[data-theme="stealth-float"] #file-converter-window.show,
#meme-maker-window.show,
[data-theme="stealth-float"] #night-light-window.show,
[data-theme="stealth-float"] #hide-it-window.show,
[data-theme="stealth-float"] #block-it-window.show,
[data-theme="stealth-float"] #wayback-look-window.show,
[data-theme="stealth-float"] #reading-mode-window.show,
[data-theme="stealth-float"] body > .notes-sticky.show,
[data-theme="stealth-float"] body > #instant-answer-dropdown.show,
[data-theme="stealth-float"] body > #ai-assistant-window.show,
[data-theme="stealth-float"] body > #notes-window.show,
[data-theme="stealth-float"] body > #profiles-window.show,
[data-theme="stealth-float"] body > #offline-pages-window.show,
[data-theme="stealth-float"] body > #file-converter-window.show,
body > #meme-maker-window.show,
[data-theme="stealth-float"] body > #night-light-window.show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="stealth-float"] body > #media-controls-window.show,
[data-theme="stealth-float"] body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
body > #media-controls-window.show,
body > :is(#video-downloader-window, #cast-to-tv-window).show,
[data-theme="stealth-float"] body > #hide-it-window.show,
[data-theme="stealth-float"] body > #block-it-window.show,
[data-theme="stealth-float"] body > #wayback-look-window.show,
[data-theme="stealth-float"] body > #reading-mode-window.show {
    --panel-fill-alpha: 0.62;
    background: rgba(18, 18, 22, var(--panel-fill-alpha, 0.62)) !important;
    background-color: rgba(18, 18, 22, var(--panel-fill-alpha, 0.62)) !important;
    background-image: none !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

/* Live page frost: canvas-baked blurred snapshot of the live page HWND.
   Host panels go transparent so only the frost + tint show through. */
.page-frost-host {
    /* Translucent fill over the blurred page snapshot underneath. */
    background: rgba(14, 16, 22, var(--panel-fill-alpha, 0.45)) !important;
    background-color: rgba(14, 16, 22, var(--panel-fill-alpha, 0.45)) !important;
    background-image: none !important;
    overflow: hidden !important;
}
#ai-assistant-window.page-frost-host,
#instant-answer-dropdown.page-frost-host,
#tab-hover-card.page-frost-host,
#minimal-url-bubble.page-frost-host,
#chrome-tools-dock.page-frost-host,
#notes-window.page-frost-host,
#offline-pages-window.page-frost-host,
#file-converter-window.page-frost-host,
#meme-maker-window.page-frost-host,
#night-light-window.page-frost-host,
#hide-it-window.page-frost-host,
#block-it-window.page-frost-host,
#wayback-look-window.page-frost-host,
#reading-mode-window.page-frost-host,
.notes-sticky.page-frost-host,
[data-theme="stealth-glass"] #ai-assistant-window.page-frost-host,
[data-theme="stealth-glass"] #instant-answer-dropdown.page-frost-host,
[data-theme="stealth-glass"] #tab-hover-card.page-frost-host,
[data-theme="stealth-glass"] #chrome-tools-dock.page-frost-host,
[data-theme="stealth-glass"] #notes-window.page-frost-host,
[data-theme="stealth-glass"] #profiles-window.page-frost-host,
[data-theme="stealth-glass"] #offline-pages-window.page-frost-host,
[data-theme="stealth-glass"] #file-converter-window.page-frost-host,
#meme-maker-window.page-frost-host,
[data-theme="stealth-glass"] #night-light-window.page-frost-host,
[data-theme="stealth-glass"] #hide-it-window.page-frost-host,
[data-theme="stealth-glass"] #block-it-window.page-frost-host,
[data-theme="stealth-glass"] [data-theme="stealth-glass"] #wayback-look-window.page-frost-host,
[data-theme="stealth-glass"] #reading-mode-window.page-frost-host,
[data-theme="stealth-float"] #ai-assistant-window.page-frost-host,
[data-theme="stealth-float"] #instant-answer-dropdown.page-frost-host,
[data-theme="stealth-float"] #tab-hover-card.page-frost-host,
[data-theme="stealth-float"] #chrome-tools-dock.page-frost-host,
[data-theme="stealth-float"] #notes-window.page-frost-host,
[data-theme="stealth-float"] #profiles-window.page-frost-host,
[data-theme="stealth-float"] #offline-pages-window.page-frost-host,
[data-theme="stealth-float"] #file-converter-window.page-frost-host,
#meme-maker-window.page-frost-host,
[data-theme="stealth-float"] #night-light-window.page-frost-host,
[data-theme="stealth-float"] #hide-it-window.page-frost-host,
[data-theme="stealth-float"] #block-it-window.page-frost-host,
[data-theme="stealth-float"] [data-theme="stealth-float"] #wayback-look-window.page-frost-host,
[data-theme="stealth-float"] #reading-mode-window.page-frost-host,
[data-theme="stealth-glass"] body > #ai-assistant-window.page-frost-host,
[data-theme="stealth-float"] body > #ai-assistant-window.page-frost-host {
    --panel-fill-alpha: 0.42;
    --frost-tint-alpha: 0.18;
    background: rgba(14, 16, 22, var(--panel-fill-alpha, 0.42)) !important;
    background-color: rgba(14, 16, 22, var(--panel-fill-alpha, 0.42)) !important;
    /* Must beat theme .show blur rules. Live CSS backdrop over hole punches
       is what flashes brightness on drag end. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: var(--liquid-glass-shadow) !important;
}

#tab-hover-card.page-frost-host,
[data-theme="stealth-glass"] #tab-hover-card.page-frost-host,
[data-theme="stealth-float"] #tab-hover-card.page-frost-host {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

/* AI matches Profiles: denser fill so page content does not wash out the UI. */
#ai-assistant-window.page-frost-host,
#ai-assistant-window.show.page-frost-host,
[data-theme="stealth-glass"] #ai-assistant-window.page-frost-host,
[data-theme="stealth-float"] #ai-assistant-window.page-frost-host,
[data-theme="stealth-glass"] body > #ai-assistant-window.page-frost-host,
[data-theme="stealth-float"] body > #ai-assistant-window.page-frost-host,
#profiles-window.page-frost-host,
[data-theme="stealth-glass"] #profiles-window.page-frost-host,
[data-theme="stealth-float"] #profiles-window.page-frost-host {
    --panel-fill-alpha: 0.55;
    --frost-tint-alpha: 0.22;
    background: rgba(22, 22, 30, var(--panel-fill-alpha, 0.55)) !important;
    background-color: rgba(22, 22, 30, var(--panel-fill-alpha, 0.55)) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

/* Panel overhangs toolbar / tabs / status: chrome shares this CEF renderer, so
   live backdrop-filter blurs those bars while the page bake covers content. */
.page-frost-host.page-frost-over-chrome,
#ai-assistant-window.page-frost-host.page-frost-over-chrome,
#instant-answer-dropdown.page-frost-host.page-frost-over-chrome,
#notes-window.page-frost-host.page-frost-over-chrome,
#offline-pages-window.page-frost-host.page-frost-over-chrome,
#file-converter-window.page-frost-host.page-frost-over-chrome,
#meme-maker-window.page-frost-host.page-frost-over-chrome,
#night-light-window.page-frost-host.page-frost-over-chrome,
#hide-it-window.page-frost-host.page-frost-over-chrome,
#block-it-window.page-frost-host.page-frost-over-chrome,
#wayback-look-window.page-frost-host.page-frost-over-chrome,
#reading-mode-window.page-frost-host.page-frost-over-chrome,
#profiles-window.page-frost-host.page-frost-over-chrome,
#media-controls-window.page-frost-host.page-frost-over-chrome,
:is(#video-downloader-window, #cast-to-tv-window).page-frost-host.page-frost-over-chrome,
.notes-sticky.page-frost-host.page-frost-over-chrome,
[data-theme="stealth-glass"] #ai-assistant-window.page-frost-host.page-frost-over-chrome,
[data-theme="stealth-float"] #ai-assistant-window.page-frost-host.page-frost-over-chrome,
[data-theme="stealth-glass"] body > #ai-assistant-window.page-frost-host.page-frost-over-chrome,
[data-theme="stealth-float"] body > #ai-assistant-window.page-frost-host.page-frost-over-chrome,
body.floating-panel-dragging .page-frost-host.page-frost-over-chrome,
#ai-assistant-window.is-dragging.page-frost-host.page-frost-over-chrome,
#ai-assistant-window.is-resizing.page-frost-host.page-frost-over-chrome {
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
}
/* Floating / Stealth Glass chips get the same frost stack as AI / Glass. */
.page-frost-host.tab,
.page-frost-host.nav-btn,
.page-frost-host.toolbar-icon-btn,
.page-frost-host.instant-answer-button,
.page-frost-host.status-item,
.page-frost-host.glass-control-btn,
.page-frost-host.volume-button-knob,
.page-frost-host.new-tab-btn,
.page-frost-host.address-bar-container {
    isolation: isolate;
    /* Frost layer must stay inside the chip's smooth clip-path. */
    overflow: hidden !important;
}
.page-frost-host.nav-btn .page-frost-layer,
.page-frost-host.glass-control-btn .page-frost-layer,
.page-frost-host.volume-button-knob .page-frost-layer,
.page-frost-host.new-tab-btn .page-frost-layer,
.page-frost-host.instant-answer-button .page-frost-layer,
.page-frost-host.toolbar-icon-btn .page-frost-layer {
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
}
.page-frost-host.tab .page-frost-layer,
.page-frost-host.address-bar-container .page-frost-layer,
.page-frost-host.status-item .page-frost-layer {
    border-radius: inherit !important;
    clip-path: inherit !important;
    -webkit-clip-path: inherit !important;
}
.page-frost-host.tab > *:not(.page-frost-layer),
.page-frost-host.nav-btn > *:not(.page-frost-layer),
.page-frost-host.toolbar-icon-btn > *:not(.page-frost-layer),
.page-frost-host.instant-answer-button > *:not(.page-frost-layer),
.page-frost-host.status-item > *:not(.page-frost-layer),
.page-frost-host.glass-control-btn > *:not(.page-frost-layer),
.page-frost-host.volume-button-knob > *:not(.page-frost-layer),
.page-frost-host.new-tab-btn > *:not(.page-frost-layer),
.page-frost-host.address-bar-container > *:not(.page-frost-layer) {
    position: relative;
    z-index: 1;
}
.page-frost-layer {
    position: absolute !important;
    inset: 0 !important;
    overflow: hidden !important;
    border-radius: inherit !important;
    pointer-events: none !important;
    z-index: 0 !important;
    transition: none !important;
}

/* Still frame of the page held under a dragging panel. The page HWND clip is
   applied asynchronously, so without this the moving clip edge briefly shows
   bare chrome background instead of page pixels. */
.page-drag-underlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    z-index: 0 !important;
    opacity: 1 !important;
    pointer-events: none !important;
    transition: none !important;
    border: 0 !important;
}

.page-frost-image {
    position: absolute !important;
    display: block !important;
    max-width: none !important;
    pointer-events: none !important;
    will-change: left, top;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    transform: translateZ(0) !important;
    image-rendering: auto !important;
    -ms-interpolation-mode: bicubic;
}
.page-frost-layer::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    /* Keep tint light so glass does not crush to black over time.
       page-frost.js raises --frost-tint-alpha on bright pages so default
       white chrome text stays readable without killing the glass look. */
    background: rgba(10, 12, 18, var(--frost-tint-alpha, 0.18)) !important;
}

/* Bright / mostly-white page behind glass panels (Facebook login, etc.). */
.page-frost-host.page-frost-light-page:not(.is-color-flipped) {
    --frost-tint-alpha: 0.46;
    --panel-fill-alpha: 0.50;
    background: rgba(16, 18, 24, var(--panel-fill-alpha, 0.50)) !important;
    background-color: rgba(16, 18, 24, var(--panel-fill-alpha, 0.50)) !important;
}
.page-frost-host.page-frost-mid-page:not(.is-color-flipped) {
    --frost-tint-alpha: 0.32;
    --panel-fill-alpha: 0.40;
    background: rgba(18, 20, 26, var(--panel-fill-alpha, 0.40)) !important;
    background-color: rgba(18, 20, 26, var(--panel-fill-alpha, 0.40)) !important;
}
.page-frost-host.page-frost-light-page:not(.is-color-flipped) .page-frost-layer::after,
.page-frost-host.page-frost-mid-page:not(.is-color-flipped) .page-frost-layer::after {
    background: rgba(8, 10, 16, var(--frost-tint-alpha, 0.46)) !important;
}

#night-light-window.is-color-flipped.show,
#ai-assistant-window.is-color-flipped.show,
body > #night-light-window.is-color-flipped.show,
body > #ai-assistant-window.is-color-flipped.show,
[data-theme="stealth-glass"] #night-light-window.is-color-flipped.show,
[data-theme="stealth-glass"] #ai-assistant-window.is-color-flipped.show,
[data-theme="stealth-glass"] body > #night-light-window.is-color-flipped.show,
[data-theme="stealth-glass"] body > #ai-assistant-window.is-color-flipped.show,
[data-theme="stealth-float"] #night-light-window.is-color-flipped.show,
[data-theme="stealth-float"] #ai-assistant-window.is-color-flipped.show,
[data-theme="stealth-float"] body > #night-light-window.is-color-flipped.show,
[data-theme="stealth-float"] body > #ai-assistant-window.is-color-flipped.show,
[data-theme="stealth"] #night-light-window.is-color-flipped.show,
[data-theme="stealth"] #ai-assistant-window.is-color-flipped.show,
[data-theme="stealth"] body > #night-light-window.is-color-flipped.show,
[data-theme="stealth"] body > #ai-assistant-window.is-color-flipped.show {
    --panel-fill-alpha: 0.84;
    --frost-tint-alpha: 0.62;
    background: rgba(248, 250, 252, var(--panel-fill-alpha, 0.84)) !important;
    background-color: rgba(248, 250, 252, var(--panel-fill-alpha, 0.84)) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1f2937 !important;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

#night-light-window.is-color-flipped.page-frost-host,
#ai-assistant-window.is-color-flipped.page-frost-host,
[data-theme="stealth-glass"] #night-light-window.is-color-flipped.page-frost-host,
[data-theme="stealth-glass"] #ai-assistant-window.is-color-flipped.page-frost-host,
[data-theme="stealth-float"] #night-light-window.is-color-flipped.page-frost-host,
[data-theme="stealth-float"] #ai-assistant-window.is-color-flipped.page-frost-host {
    background: rgba(248, 250, 252, var(--panel-fill-alpha, 0.78)) !important;
    background-color: rgba(248, 250, 252, var(--panel-fill-alpha, 0.78)) !important;
}

#night-light-window.is-color-flipped .page-frost-layer::after,
#ai-assistant-window.is-color-flipped .page-frost-layer::after {
    background: rgba(248, 250, 252, 0.72) !important;
}
.page-frost-image {
    position: absolute !important;
    display: block !important;
    max-width: none !important;
    object-fit: fill !important;
    /* Blur is baked in page-frost.js canvas. CSS filter:blur paints outside
       overflow/clip-path and caused the AI window edge halo/bleed. */
    filter: none !important;
    transform: none !important;
    z-index: 0 !important;
    opacity: 1 !important;
    transition: none !important;
}
.page-frost-image.is-loaded {
    opacity: 1 !important;
}
/* Ambient frost for moving pages.
   A video surface cannot be sampled per frame, so page-frost.js samples a small
   colour grid on a slow cadence and these sheets carry it. They drift, scale and
   rotate continuously so the glass keeps the same liveliness as the static frost
   bitmap on regular pages, and a new sample cross-fades between the two sheets
   without interrupting that motion. Gradients are used instead of filter:blur
   because a CSS blur paints past the layer clip and halos the panel edge. */
.page-frost-ambient {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    overflow: hidden !important;
    border-radius: inherit !important;
    pointer-events: none !important;
    opacity: 0;
    /* Short enough that colour arrives with the panel, long enough to read as a
       fade rather than a swap. */
    transition: opacity 0.7s ease-in-out;
}
/* Colour rides on top of the baked page instead of replacing it. At full
   opacity the sheets are just two radial blobs, which reads as a muddy smear
   with none of the page behind it. */
.page-frost-host.page-frost-ambient-mode .page-frost-ambient {
    opacity: 0.58;
}
/* Scene tracking. page-frost.js slides this toward the bright mass of the
   sampled frame over the sample interval, so the colour keeps moving with the
   video between palette swaps instead of only orbiting on its own clock. */
.page-frost-ambient-track {
    position: absolute !important;
    inset: 0 !important;
    transform: translate3d(0, 0, 0) scale(1.02);
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.33, 0, 0.5, 1);
    transition-duration: 2.4s;
    will-change: transform;
}
.page-frost-ambient-sheet {
    position: absolute !important;
    inset: -46% !important;
    opacity: 0;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    transition: opacity var(--frost-ambient-fade, 1.6s) ease-in-out;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}
.page-frost-ambient-sheet.is-front {
    opacity: 1;
}
.page-frost-host.page-frost-ambient-mode .page-frost-ambient-sheet.sheet-a {
    animation: page-frost-ambient-drift-a 29s ease-in-out infinite alternate;
    animation-delay: -6s;
}
.page-frost-host.page-frost-ambient-mode .page-frost-ambient-sheet.sheet-b {
    animation: page-frost-ambient-drift-b 41s ease-in-out infinite alternate-reverse;
    animation-delay: -17s;
}
@keyframes page-frost-ambient-drift-a {
    0% {
        transform: translate3d(-4%, 3%, 0) scale(1.06) rotate(-2.2deg);
    }
    35% {
        transform: translate3d(3%, -2%, 0) scale(1.14) rotate(1.4deg);
    }
    68% {
        transform: translate3d(5%, 4%, 0) scale(1.09) rotate(3deg);
    }
    100% {
        transform: translate3d(-2%, -4%, 0) scale(1.17) rotate(-1.2deg);
    }
}
@keyframes page-frost-ambient-drift-b {
    0% {
        transform: translate3d(4%, -3%, 0) scale(1.12) rotate(2.6deg);
    }
    42% {
        transform: translate3d(-5%, 2%, 0) scale(1.05) rotate(-1.8deg);
    }
    73% {
        transform: translate3d(-2%, -5%, 0) scale(1.15) rotate(-3.2deg);
    }
    100% {
        transform: translate3d(3%, 4%, 0) scale(1.08) rotate(1deg);
    }
}
/* A panel gesture must not interrupt the drift. These sheets are a plain
   composited layer with no backdrop sampling, so they keep moving through a
   drag and the colour never restarts when the mouse is released. The gesture
   only freezes the ambient container's own fade so the layer cannot change
   opacity while the native region is rebuilt. */
body.floating-panel-dragging .page-frost-ambient,
.page-frost-host.is-dragging .page-frost-ambient,
.page-frost-host.is-resizing .page-frost-ambient {
    transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
    .page-frost-host.page-frost-ambient-mode .page-frost-ambient-sheet.sheet-a,
    .page-frost-host.page-frost-ambient-mode .page-frost-ambient-sheet.sheet-b {
        animation-duration: 150s !important;
    }
    .page-frost-ambient-sheet {
        transition-duration: 4.5s;
    }
    .page-frost-ambient-track {
        transition-duration: 6s !important;
    }
}

#ai-assistant-window.page-frost-host .page-frost-layer,
#instant-answer-dropdown.page-frost-host .page-frost-layer {
    border-radius: 16px !important;
    clip-path: inset(0 round 16px) !important;
    -webkit-clip-path: inset(0 round 16px) !important;
}
/* Keep content above the frost bake. Absolute chrome (resize edges, sheen)
   must stay absolute or page HWND hit-testing eats the panel perimeter. */
#ai-assistant-window.page-frost-host > *:not(.page-frost-layer):not(.ai-assistant-resize-edges):not(.ai-assistant-glass-sheen),
#instant-answer-dropdown.page-frost-host > *:not(.page-frost-layer):not(.instant-answer-glass-sheen) {
    position: relative;
    z-index: 1;
}
#ai-assistant-window,
#instant-answer-dropdown {
    isolation: isolate;
}

/* Full-bleed sheens paint off-key and turn frost into a solid slab. */
[data-theme="stealth-glass"] .instant-answer-glass-sheen,
[data-theme="stealth-glass"] .ai-assistant-glass-sheen,
[data-theme="stealth-float"] .instant-answer-glass-sheen,
[data-theme="stealth-float"] .ai-assistant-glass-sheen {
    display: none !important;
    opacity: 0 !important;
    background: none !important;
}

[data-theme="stealth-glass"] .ai-assistant-body,
[data-theme="stealth-glass"] .ai-assistant-chat-panel,
[data-theme="stealth-glass"] .ai-assistant-messages,
[data-theme="stealth-float"] .ai-assistant-body,
[data-theme="stealth-float"] .ai-assistant-chat-panel,
[data-theme="stealth-float"] .ai-assistant-messages,
[data-theme="stealth-glass"] .instant-answer-content-wrapper,
[data-theme="stealth-float"] .instant-answer-content-wrapper {
    background: transparent !important;
    background-color: transparent !important;
}

[data-theme="stealth-glass"] .menu-dropdown.show,
[data-theme="stealth-glass"] body > #main-menu.show {
    background: #010103 !important;
    background-color: #010103 !important;
}

/* Hiding security removes the row itself, not just its child indicators. */
html.security-bar-hidden #status-bar,
body.security-bar-hidden #status-bar,
.browser-container.security-bar-hidden #status-bar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

html.bottom-layout-html.security-bar-hidden .glass-titlebar,
html.security-bar-hidden.bottom-layout-html .glass-titlebar {
    bottom: calc(var(--bottom-status-height, 0px) + 39px) !important;
}

/* Labeled URL strip is 52px tall; keep tabs flush (1px overlap) on top of it. */
html.security-bar-hidden.bottom-layout-html body.toolbar-labels .glass-titlebar,
html.bottom-layout-html.security-bar-hidden body.toolbar-labels .glass-titlebar,
html.security-bar-hidden body.toolbar-labels.bottom-layout-body .glass-titlebar {
    bottom: calc(var(--bottom-status-height, 0px) + 51px) !important;
}

/* Bottom layout: window controls stay in-flow on the tab strip so tabs and
   scroll arrows shrink around them instead of painting over them. */
html.bottom-layout-html .glass-window-controls,
body.bottom-layout-body .glass-window-controls,
.browser-container.bottom-layout .glass-window-controls {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
    z-index: 30 !important;
    pointer-events: auto !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
}

/* =============================================================================
   TOP-BAR ACTION ICONS (plug / shield / code) - match glass circle style
   Volume + Stealth Glass left unchanged above.
   ============================================================================= */

.top-bar .extension-toolbar,
.top-bar #security-toggle-container,
.top-bar .security-toggle-container,
.top-bar #downloads-toggle-container,
.top-bar .downloads-toggle-container,
.top-bar #link-scan-toggle-container:not(.feature-off):not([hidden]):not(.appearance-hidden),
.top-bar #link-scan-toggle-container.is-feature-on,
.top-bar .link-scan-toggle-container:not(.feature-off):not([hidden]):not(.appearance-hidden),
.top-bar .link-scan-toggle-container.is-feature-on,
.top-bar #settings-toggle-container:not([hidden]):not(.appearance-hidden),
.top-bar .settings-toggle-container:not([hidden]):not(.appearance-hidden),
.top-bar #history-toggle-container:not([hidden]):not(.appearance-hidden),
.top-bar .history-toggle-container:not([hidden]):not(.appearance-hidden),
.top-bar #password-toggle-container:not([hidden]):not(.appearance-hidden),
.top-bar .password-toggle-container:not([hidden]):not(.appearance-hidden),
.top-bar #screenshot-toggle-container,
.top-bar .screenshot-toggle-container {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 3px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.top-bar #settings-toggle-container[hidden],
.top-bar #settings-toggle-container.appearance-hidden,
.top-bar #password-toggle-container[hidden],
.top-bar #password-toggle-container.appearance-hidden,
.top-bar #link-scan-toggle-container.feature-off,
.top-bar #link-scan-toggle-container[hidden],
.top-bar #link-scan-toggle-container.appearance-hidden {
    display: none !important;
}

.top-bar #devtools-toggle-container,
.chrome-tools-dock #devtools-toggle-container,
#devtools-toggle-container[data-toolbar-item="devtools"],
#devtools-toggle-container.nav-controls:not(.devtools-visible),
#devtools-toggle-container[hidden] {
    display: none !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 3px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.top-bar #devtools-toggle-container.devtools-visible,
.chrome-tools-dock #devtools-toggle-container.devtools-visible,
#devtools-toggle-container[data-toolbar-item="devtools"].devtools-visible:not([hidden]) {
    display: flex !important;
}

.top-bar .extension-icon,
.top-bar .toolbar-icon-btn,
.top-bar #devtools-btn {
    box-sizing: border-box !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: var(--ui-bg) !important;
    border: 1px solid var(--ui-border) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    transform: none !important;
}

.top-bar .extensions-menu-btn.is-open {
    border-color: rgba(61, 184, 255, 0.75) !important;
    background: rgba(61, 184, 255, 0.18) !important;
}

.top-bar .powerups-menu-btn.is-open {
    border-color: rgba(192, 132, 252, 0.75) !important;
    background: rgba(192, 132, 252, 0.18) !important;
}

/* iOS-style toolbar folder: rounded square with padded mosaic, never a clipped circle. */
.top-bar .toolbar-icon-group {
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
    position: relative;
    z-index: 6;
}

.top-bar .toolbar-group-btn {
    box-sizing: border-box !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    padding: 3px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    border: 1px solid color-mix(in srgb, var(--toolbar-group-color, #a142f4) 55%, rgba(255, 255, 255, 0.22)) !important;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 46%),
        color-mix(in srgb, var(--toolbar-group-color, #a142f4) 34%, rgba(22, 22, 30, 0.78)) !important;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    transform: none !important;
    cursor: pointer;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
    position: relative;
    z-index: 7;
}

.top-bar .toolbar-group-btn .toolbar-group-mosaic {
    overflow: hidden !important;
    border-radius: 6px;
}

.top-bar .toolbar-group-btn.is-single-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

.top-bar .extension-icon:hover,
.top-bar .toolbar-icon-btn:hover:not(.is-disabled):not([aria-disabled="true"]),
.top-bar #devtools-btn:hover {
    background: var(--ui-bg-hover) !important;
    transform: none !important;
}

.top-bar .toolbar-group-btn:hover,
.top-bar .toolbar-group-btn.is-open {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 46%),
        color-mix(in srgb, var(--toolbar-group-color, #a142f4) 48%, rgba(22, 22, 30, 0.82)) !important;
    border-color: color-mix(in srgb, var(--toolbar-group-color, #a142f4) 85%, #fff) !important;
    transform: none !important;
}

.top-bar .extension-icon img,
.top-bar .toolbar-icon-btn img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    object-fit: contain !important;
}

.top-bar .toolbar-icon-btn.stealth-sponsor-powerup-btn img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50%;
    filter: none !important;
}

.top-bar #screenshot-toggle-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

.top-bar #settings-toggle-btn img,
.top-bar #password-toggle-btn img,
.top-bar #payment-toggle-btn img,
.top-bar #link-scan-toggle-btn img,
.top-bar #clipboard-history-toggle-btn img,
.top-bar #offline-page-toggle-btn img,
.top-bar #file-converter-toggle-btn img,
.top-bar #meme-maker-toggle-btn img,
.top-bar #hide-it-toggle-btn img,
.top-bar #rss-toolbar-btn img,
.top-bar #split-tunnel-toolbar-btn img,
.top-bar #proxy-toolbar-btn img,
.top-bar #vpn-toolbar-btn img,
.top-bar #video-downloader-toggle-btn img,
.top-bar #cast-to-tv-toggle-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

.top-bar #tor-toolbar-btn img {
    width: 13px !important;
    height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
}

.top-bar #wayback-look-toggle-btn img {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
}

.top-bar #downloads-toggle-btn img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

.top-bar #playlist-toggle-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

.top-bar #crypto-toolbar-btn img {
    width: 17px !important;
    height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
}

.top-bar #stocks-toolbar-btn img {
    width: 11px !important;
    height: 11px !important;
    max-width: 11px !important;
    max-height: 11px !important;
}

.top-bar #social-toolbar-btn img {
    width: 17px !important;
    height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
}

.top-bar .extension-icon-letter {
    width: 14px !important;
    height: 14px !important;
    font-size: 9px !important;
}

.top-bar #devtools-btn i {
    font-size: 10px !important;
    line-height: 1 !important;
    width: 10px !important;
    height: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.top-bar .extension-icon.has-popup::before {
    bottom: 0 !important;
    right: 0 !important;
}

/* ============================================================
   Appearance transparency controls (background + UI chrome)

   Must beat theme rules such as:
   html[data-theme="dark"] .browser-container.bottom-layout .glass-titlebar
   ============================================================ */
html.chrome-bg-transparent,
html.chrome-bg-transparent body,
html.chrome-bg-transparent[data-theme] body,
html.chrome-bg-transparent.theme-dark body,
html.chrome-bg-transparent.theme-light body,
html.chrome-bg-transparent.theme-stealth body,
html.chrome-bg-transparent.theme-stealth-glass body,
html.chrome-bg-transparent.theme-stealth-float body {
    background: #010103 !important;
    background-color: #010103 !important;
    background-image: none !important;
}

html.chrome-bg-transparent .browser-container,
html.chrome-bg-transparent .browser-container.bottom-layout,
html.chrome-bg-transparent .tabs-container,
html.chrome-bg-transparent .browser-container::before,
html.chrome-bg-transparent .browser-container::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Home/search is chrome HTML. Keep it opaque so the empty results band does
   not punch through to the DWM key (#010103) as a giant black strip. */
html.chrome-bg-transparent .web-content.showing-welcome,
html.chrome-bg-transparent .welcome-screen,
html.welcome-visible .web-content.showing-welcome,
html.welcome-visible .welcome-screen {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    background-image: none !important;
}
html.chrome-bg-transparent[data-theme="stealth"] .web-content.showing-welcome,
html.chrome-bg-transparent[data-theme="stealth"] .welcome-screen,
html.welcome-visible[data-theme="stealth"] .web-content.showing-welcome,
html.welcome-visible[data-theme="stealth"] .welcome-screen,
html.chrome-bg-transparent.theme-stealth .web-content.showing-welcome,
html.chrome-bg-transparent.theme-stealth .welcome-screen {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
}
html.chrome-bg-transparent[data-theme="dark"] .web-content.showing-welcome,
html.chrome-bg-transparent[data-theme="dark"] .welcome-screen,
html.welcome-visible[data-theme="dark"] .web-content.showing-welcome,
html.welcome-visible[data-theme="dark"] .welcome-screen,
html.chrome-bg-transparent.theme-dark .web-content.showing-welcome,
html.chrome-bg-transparent.theme-dark .welcome-screen {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}
html.chrome-bg-transparent[data-theme="light"] .web-content.showing-welcome,
html.chrome-bg-transparent[data-theme="light"] .welcome-screen,
html.welcome-visible[data-theme="light"] .web-content.showing-welcome,
html.welcome-visible[data-theme="light"] .welcome-screen,
html.chrome-bg-transparent.theme-light .web-content.showing-welcome,
html.chrome-bg-transparent.theme-light .welcome-screen {
    background: #ebe4f6 !important;
    background-color: #ebe4f6 !important;
}
html.chrome-bg-transparent[data-theme="stealth-glass"] .web-content.showing-welcome,
html.chrome-bg-transparent[data-theme="stealth-glass"] .welcome-screen,
html.welcome-visible[data-theme="stealth-glass"] .web-content.showing-welcome,
html.welcome-visible[data-theme="stealth-glass"] .welcome-screen,
html.chrome-bg-transparent.theme-stealth-glass .web-content.showing-welcome,
html.chrome-bg-transparent.theme-stealth-glass .welcome-screen {
    background: #121018 !important;
    background-color: #121018 !important;
}

html.chrome-bg-transparent .glass-titlebar,
html.chrome-bg-transparent .top-bar,
html.chrome-bg-transparent .status-bar,
html.chrome-bg-transparent .tab-bar,
html.chrome-bg-transparent .browser-container .glass-titlebar,
html.chrome-bg-transparent .browser-container .top-bar,
html.chrome-bg-transparent .browser-container .status-bar,
html.chrome-bg-transparent[data-theme="dark"] .glass-titlebar,
html.chrome-bg-transparent[data-theme="dark"] .top-bar,
html.chrome-bg-transparent[data-theme="dark"] .status-bar,
html.chrome-bg-transparent[data-theme="light"] .glass-titlebar,
html.chrome-bg-transparent[data-theme="light"] .top-bar,
html.chrome-bg-transparent[data-theme="light"] .status-bar,
html.chrome-bg-transparent[data-theme="stealth"] .glass-titlebar,
html.chrome-bg-transparent[data-theme="stealth"] .top-bar,
html.chrome-bg-transparent[data-theme="stealth"] .status-bar,
html.chrome-bg-transparent.theme-dark .glass-titlebar,
html.chrome-bg-transparent.theme-dark .top-bar,
html.chrome-bg-transparent.theme-dark .status-bar,
html.chrome-bg-transparent.theme-light .glass-titlebar,
html.chrome-bg-transparent.theme-light .top-bar,
html.chrome-bg-transparent.theme-light .status-bar,
html.chrome-bg-transparent.theme-stealth .glass-titlebar,
html.chrome-bg-transparent.theme-stealth .top-bar,
html.chrome-bg-transparent.theme-stealth .status-bar {
    background: #010103 !important;
    background-color: #010103 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

/* Bottom dock has no page HWND underneath. Never key #010103 there or home
   shows a solid black band above the tab strip. */
html.chrome-bg-transparent.bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent.bottom-layout-html .top-bar,
html.chrome-bg-transparent.bottom-layout-html .status-bar,
html.chrome-bg-transparent.bottom-layout-html .tab-bar,
html.chrome-bg-transparent .browser-container.bottom-layout .glass-titlebar,
html.chrome-bg-transparent .browser-container.bottom-layout .top-bar,
html.chrome-bg-transparent .browser-container.bottom-layout .status-bar,
html.chrome-bg-transparent .browser-container.bottom-layout .tab-bar,
html.chrome-bg-transparent[data-theme="dark"].bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent[data-theme="dark"].bottom-layout-html .top-bar,
html.chrome-bg-transparent[data-theme="dark"].bottom-layout-html .status-bar,
html.chrome-bg-transparent[data-theme="dark"] .browser-container.bottom-layout .glass-titlebar,
html.chrome-bg-transparent[data-theme="dark"] .browser-container.bottom-layout .top-bar,
html.chrome-bg-transparent[data-theme="dark"] .browser-container.bottom-layout .status-bar,
html.chrome-bg-transparent.theme-dark.bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent.theme-dark.bottom-layout-html .top-bar,
html.chrome-bg-transparent.theme-dark.bottom-layout-html .status-bar {
    background: #111111 !important;
    background-color: #111111 !important;
    background-image: none !important;
}
html.chrome-bg-transparent[data-theme="stealth"].bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent[data-theme="stealth"].bottom-layout-html .top-bar,
html.chrome-bg-transparent[data-theme="stealth"].bottom-layout-html .status-bar,
html.chrome-bg-transparent[data-theme="stealth"] .browser-container.bottom-layout .glass-titlebar,
html.chrome-bg-transparent[data-theme="stealth"] .browser-container.bottom-layout .top-bar,
html.chrome-bg-transparent[data-theme="stealth"] .browser-container.bottom-layout .status-bar,
html.chrome-bg-transparent.theme-stealth.bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent.theme-stealth.bottom-layout-html .top-bar,
html.chrome-bg-transparent.theme-stealth.bottom-layout-html .status-bar {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
}
html.chrome-bg-transparent[data-theme="light"].bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent[data-theme="light"].bottom-layout-html .top-bar,
html.chrome-bg-transparent[data-theme="light"].bottom-layout-html .status-bar,
html.chrome-bg-transparent[data-theme="light"] .browser-container.bottom-layout .glass-titlebar,
html.chrome-bg-transparent[data-theme="light"] .browser-container.bottom-layout .top-bar,
html.chrome-bg-transparent[data-theme="light"] .browser-container.bottom-layout .status-bar,
html.chrome-bg-transparent.theme-light.bottom-layout-html .glass-titlebar,
html.chrome-bg-transparent.theme-light.bottom-layout-html .top-bar,
html.chrome-bg-transparent.theme-light.bottom-layout-html .status-bar {
    background: #d4cec4 !important;
    background-color: #d4cec4 !important;
}

/* Floating Glass: no solid toolbar band. Only individual chips float. */
html.chrome-bg-transparent[data-theme="stealth-float"] .glass-titlebar,
html.chrome-bg-transparent[data-theme="stealth-float"] .top-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] .status-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] .tab-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] .browser-container .glass-titlebar,
html.chrome-bg-transparent[data-theme="stealth-float"] .browser-container .top-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] .browser-container .status-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] .browser-container.bottom-layout .glass-titlebar,
html.chrome-bg-transparent[data-theme="stealth-float"] .browser-container.bottom-layout .top-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] .browser-container.bottom-layout .status-bar,
html.chrome-bg-transparent.theme-stealth-float .glass-titlebar,
html.chrome-bg-transparent.theme-stealth-float .top-bar,
html.chrome-bg-transparent.theme-stealth-float .status-bar,
html.chrome-bg-transparent.theme-stealth-float .tab-bar,
html[data-theme="stealth-float"].floating-toolbar-widget .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget .top-bar,
html[data-theme="stealth-float"].floating-toolbar-widget .status-bar,
html[data-theme="stealth-float"].floating-toolbar-widget .tab-bar,
html[data-theme="stealth-float"].floating-toolbar-widget #bookmarks-bar,
body[data-theme="stealth-float"].floating-toolbar-widget .glass-titlebar,
body[data-theme="stealth-float"].floating-toolbar-widget .top-bar,
body[data-theme="stealth-float"].floating-toolbar-widget .status-bar,
body[data-theme="stealth-float"].floating-toolbar-widget #bookmarks-bar {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Acrylic themes only: bookmarks strip uses the DWM key / transparent float surface. */
html.chrome-bg-transparent[data-theme="stealth-glass"] .bookmarks-bar,
html.chrome-bg-transparent.theme-stealth-glass .bookmarks-bar,
html.chrome-bg-transparent[data-theme="stealth-glass"] body > #bookmarks-bar {
    background: #010103 !important;
    background-color: #010103 !important;
    background-image: none !important;
    opacity: 1 !important;
}
html.chrome-bg-transparent[data-theme="stealth-float"] .bookmarks-bar,
html.chrome-bg-transparent.theme-stealth-float .bookmarks-bar,
html.chrome-bg-transparent[data-theme="stealth-float"] body > #bookmarks-bar {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Solid themes keep a themed bookmarks strip even when chrome bars are keyed. */
html.chrome-bg-transparent[data-theme="dark"] .bookmarks-bar,
html.chrome-bg-transparent.theme-dark .bookmarks-bar,
html.chrome-bg-transparent[data-theme="dark"] body > #bookmarks-bar {
    background: #111111 !important;
    background-color: #111111 !important;
    background-image: none !important;
    opacity: 1 !important;
}
html.chrome-bg-transparent[data-theme="light"] .bookmarks-bar,
html.chrome-bg-transparent.theme-light .bookmarks-bar,
html.chrome-bg-transparent[data-theme="light"] body > #bookmarks-bar {
    background: #d4cec4 !important;
    background-color: #d4cec4 !important;
    background-image: none !important;
    opacity: 1 !important;
}
html.chrome-bg-transparent[data-theme="stealth"] .bookmarks-bar,
html.chrome-bg-transparent.theme-stealth .bookmarks-bar,
html.chrome-bg-transparent[data-theme="stealth"] body > #bookmarks-bar {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
    background-image: none !important;
    opacity: 1 !important;
}

/* UI Background opacity is pure CSS translucency now: bar surfaces paint at
   reduced alpha over the solid window floor (see custom-themes.js). No native
   full-bleed / window punching, so there is no .chrome-ui-faded web-content
   override. That pipeline produced the binary 0/100 look plus halo edges and
   vanished logo / + icons. */

/* Text / logo / icon opacity (separate from background and chrome fades). */
html.chrome-fg-faded .tab .tab-title,
html.chrome-fg-faded .tab-title,
html.chrome-fg-faded .address-bar,
html.chrome-fg-faded .address-bar input,
html.chrome-fg-faded .url-text,
html.chrome-fg-faded .status-item,
html.chrome-fg-faded .status-item span,
html.chrome-fg-faded .toolbar-icon-btn,
html.chrome-fg-faded .toolbar-icon-btn i,
html.chrome-fg-faded .toolbar-icon-btn img,
html.chrome-fg-faded .nav-btn,
html.chrome-fg-faded .nav-btn i,
html.chrome-fg-faded .extension-icon,
html.chrome-fg-faded .extension-icon img,
html.chrome-fg-faded .glass-title-logo,
html.chrome-fg-faded .glass-title-logo img,
html.chrome-fg-faded .stealth-logo,
html.chrome-fg-faded .stealth-logo img,
html.chrome-fg-faded .stealth-logo-btn,
html.chrome-fg-faded .tab .tab-favicon,
html.chrome-fg-faded .tab-close,
html.chrome-fg-faded .new-tab-btn,
html.chrome-fg-faded .glass-window-controls button,
html.chrome-fg-faded .glass-window-controls button i,
html.chrome-fg-faded .bookmark-bar-chip,
html.chrome-fg-faded .bookmark-bar-chip img,
html.chrome-fg-faded #menu-btn,
html.chrome-fg-faded #layout-toggle,
html.chrome-fg-faded .instant-answer-button {
    opacity: var(--ui-foreground-opacity, 1) !important;
}

/* =============================================================================
   Floating toolbar widget (Stealth Float theme only)
   ============================================================================= */

/* Hard gate: floating chrome classes must never restyle other themes. */
html:not([data-theme="stealth-float"]).floating-toolbar-widget,
html:not([data-theme="stealth-float"]).chrome-widget-collapsed,
body:not([data-theme="stealth-float"]).floating-toolbar-widget,
body:not([data-theme="stealth-float"]).chrome-widget-collapsed {
    /* no-op marker for maintainers; JS also refuses to set these classes */
}

html.bottom-layout-html.chrome-widget-collapsed .glass-titlebar,
body.bottom-layout-body.chrome-widget-collapsed .glass-titlebar,
html.chrome-widget-collapsed .glass-titlebar,
body.chrome-widget-collapsed .glass-titlebar {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    overflow: visible !important;
    pointer-events: none !important;
    opacity: 1 !important;
    top: 0 !important;
    bottom: auto !important;
}

html.bottom-layout-html.chrome-widget-collapsed .glass-titlebar > :not(.glass-window-controls),
body.bottom-layout-body.chrome-widget-collapsed .glass-titlebar > :not(.glass-window-controls),
html.chrome-widget-collapsed .glass-titlebar > :not(.glass-window-controls),
body.chrome-widget-collapsed .glass-titlebar > :not(.glass-window-controls),
html.bottom-layout-html.chrome-widget-collapsed .tabs-container,
body.bottom-layout-body.chrome-widget-collapsed .tabs-container,
html.chrome-widget-collapsed .browser-container.bottom-layout .tabs-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    min-width: 0 !important;
    width: 0 !important;
}

html.bottom-layout-html.chrome-widget-collapsed .top-bar,
html.bottom-layout-html.chrome-widget-collapsed .status-bar,
html.bottom-layout-html.chrome-widget-collapsed #bookmarks-bar,
body.bottom-layout-body.chrome-widget-collapsed .top-bar,
body.bottom-layout-body.chrome-widget-collapsed .status-bar,
body.bottom-layout-body.chrome-widget-collapsed #bookmarks-bar,
body.chrome-widget-collapsed .browser-container.bottom-layout .top-bar,
body.chrome-widget-collapsed .browser-container.bottom-layout .status-bar,
body.chrome-widget-collapsed .top-bar,
body.chrome-widget-collapsed .status-bar,
body.chrome-widget-collapsed #bookmarks-bar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

html.bottom-layout-html.chrome-widget-collapsed .browser-container.bottom-layout .web-content:not(.showing-welcome),
body.bottom-layout-body.chrome-widget-collapsed .browser-container.bottom-layout .web-content:not(.showing-welcome),
body.chrome-widget-collapsed .web-content:not(.showing-welcome) {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important;
}

html.bottom-layout-html.chrome-widget-collapsed .glass-window-controls,
body.bottom-layout-body.chrome-widget-collapsed .glass-window-controls,
body.chrome-widget-collapsed .glass-window-controls {
    position: fixed !important;
    top: 8px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    pointer-events: none !important;
    z-index: 2147483646 !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.bottom-layout-html.chrome-widget-collapsed .glass-window-controls .glass-control-btn,
body.bottom-layout-body.chrome-widget-collapsed .glass-window-controls .glass-control-btn,
body.chrome-widget-collapsed .glass-window-controls .glass-control-btn {
    pointer-events: auto !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: rgba(18, 20, 28, 0.38) !important;
    background-color: rgba(18, 20, 28, 0.38) !important;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(22px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
}

/* Expanded floating mode: no solid chrome bands */
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) #bookmarks-bar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) #bookmarks-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .status-bar,
html[data-theme="dark"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="dark"].floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="dark"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="light"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="light"].floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="light"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth"].floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="stealth"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth-glass"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth-glass"].floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="stealth-glass"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    -webkit-app-region: no-drag !important;
}

/* Floating Glass chips: same material as Minimal URL bar bubble. */
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab-strip-scroll-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-title-logo,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .toolbar-icon-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .instant-answer-button,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .volume-button-knob,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .bookmark-bar-chip,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .bookmarks-bar-pin,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #chrome-widget-collapse-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #menu-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #layout-toggle,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .toolbar-icon-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .instant-answer-button,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn {
    --panel-fill-alpha: 0.62;
    pointer-events: auto !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(18, 18, 22, var(--panel-fill-alpha, 0.62)) !important;
    background-color: rgba(18, 18, 22, var(--panel-fill-alpha, 0.62)) !important;
    background-image: none !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #f2f2f6 !important;
    overflow: hidden !important;
    isolation: isolate;
    clip-path: inset(0 round 999px) !important;
    -webkit-clip-path: inset(0 round 999px) !important;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .toolbar-icon-btn.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .instant-answer-button.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .volume-button-knob.page-frost-host,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .bookmark-bar-chip.page-frost-host {
    /* Match Minimal URL bubble: translucent tint over live frosted page. */
    --panel-fill-alpha: 0.55;
    background: rgba(18, 18, 22, var(--panel-fill-alpha, 0.55)) !important;
    background-color: rgba(18, 18, 22, var(--panel-fill-alpha, 0.55)) !important;
}

/* Circles must clip as circles, not rounded squares (kills stair-step edges). */
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .volume-button-knob,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .instant-answer-button,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .volume-button-knob,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .instant-answer-button {
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .extension-toolbar,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .extension-toolbar {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #pip-toggle-btn.is-disabled,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #pip-toggle-btn[aria-disabled="true"],
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #pip-toggle-btn.is-disabled,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #pip-toggle-btn[aria-disabled="true"] {
    opacity: 0.38 !important;
    cursor: not-allowed !important;
    filter: grayscale(1);
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .toolbar-icon-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .instant-answer-button,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .volume-button-knob,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #menu-btn,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) #layout-toggle,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .toolbar-icon-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .new-tab-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls .glass-control-btn,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls .glass-control-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .bookmark-bar-chip,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item {
    clip-path: inset(0 round 999px) !important;
    -webkit-clip-path: inset(0 round 999px) !important;
}

/* Tabs: readable height, not squashed pills */
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    max-width: var(--max-tab-width, 240px) !important;
    padding: 0 14px !important;
    border-radius: 17px !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
}
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab .tab-title,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab .tab-title-text,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab .tab-title,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab .tab-title-text {
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .address-bar-container {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 18px !important;
    padding: 0 10px !important;
    align-items: center !important;
}

/* Dock stack with real gaps + bottom inset so pills are not clipped */
html[data-theme="stealth-float"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
body[data-theme="stealth-float"].bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .status-bar,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .status-bar {
    bottom: 14px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 3px 12px !important;
    margin: 0 !important;
    gap: 8px !important;
    overflow: visible !important;
}

html[data-theme="stealth-float"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
body[data-theme="stealth-float"].bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar {
    bottom: 58px !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    overflow: visible !important;
}

html[data-theme="stealth-float"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
body[data-theme="stealth-float"].bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .glass-titlebar,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .glass-titlebar {
    bottom: 110px !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    /* Controls are in-flow; strip uses the normal inset. */
    padding: 0 12px !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed):not(.bottom-layout-html) .status-bar,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed):not(.bottom-layout-body) .status-bar {
    margin-top: 14px !important;
    padding-top: 4px !important;
    padding-bottom: 10px !important;
}

/* Window controls: separate circles at top-right, never a grouped box */
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls,
html[data-theme="stealth-float"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls,
body[data-theme="stealth-float"].bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls {
    position: fixed !important;
    top: 10px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    display: flex !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls::before,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls::before {
    content: none !important;
    display: none !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab.active,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .tab.active {
    background: rgba(26, 22, 44, 0.72) !important;
    background-color: rgba(26, 22, 44, 0.72) !important;
    border-color: rgba(167, 139, 250, 0.85) !important;
    box-shadow:
        0 8px 24px rgba(73, 0, 194, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .web-content,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .web-content:not(.showing-welcome),
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .web-content,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .web-content:not(.showing-welcome),
html.floating-toolbar-widget.chrome-widget-collapsed .browser-container.bottom-layout .web-content:not(.showing-welcome),
body.floating-toolbar-widget.chrome-widget-collapsed .web-content:not(.showing-welcome),
html[data-theme="stealth-float"].floating-toolbar-widget .browser-container.bottom-layout .web-content,
body[data-theme="stealth-float"].floating-toolbar-widget .web-content {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important;
    /* Color-key so the live page / Settings HWND shows through chrome. */
    background: #010103 !important;
    background-color: #010103 !important;
}

/* Welcome/home keeps a measured dock inset so results are not buried. */
html.floating-toolbar-widget .browser-container.bottom-layout .web-content.showing-welcome,
body.floating-toolbar-widget .web-content.showing-welcome {
    bottom: var(--bottom-chrome-reserve, 80px) !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .tabs-container,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-controls,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .tabs-container,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .nav-controls,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
    gap: 8px !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls .glass-control-btn,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-window-controls .glass-control-btn,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #menu-btn,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #layout-toggle,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #stealth-logo-btn,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #profile-avatar-btn,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #menu-btn,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #layout-toggle,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #stealth-logo-btn,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-menu #profile-avatar-btn {
    pointer-events: auto !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn svg,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn svg {
    position: relative !important;
    z-index: 3 !important;
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    overflow: visible !important;
    color: #f2f4f8 !important;
    fill: none !important;
    stroke: #f2f4f8 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn svg path,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-control-btn svg path {
    stroke: #f2f4f8 !important;
    fill: none !important;
    opacity: 1 !important;
}


/* Status pills stay one row tall; power buttons stay inset, not nested glass chips */
html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth-float"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
body[data-theme="stealth-float"].bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    align-items: center !important;
    overflow: visible !important;
}

html[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item,
body[data-theme="stealth-float"].floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    align-items: center !important;
    gap: 4px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item .nav-btn,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar .nav-btn,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item .nav-btn,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar .nav-btn,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item #vpn-toggle,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item #tor-toggle,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item #tor-circuit-settings-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item .status-icon,
html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item .status-icon img {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-item .status-text {
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* Keep chrome strip fully clear so only glass chips paint over the page */
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar,
html.bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .status-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .top-bar,
body.bottom-layout-body.floating-toolbar-widget:not(.chrome-widget-collapsed) .browser-container.bottom-layout .status-bar,
html[data-theme="dark"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="dark"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="dark"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="stealth"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar,
html[data-theme="stealth-glass"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-titlebar,
html[data-theme="stealth-glass"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .top-bar,
html[data-theme="stealth-glass"].bottom-layout-html.floating-toolbar-widget:not(.chrome-widget-collapsed) .status-bar {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

html.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-title-logo.chrome-collapse-logo,
body.floating-toolbar-widget:not(.chrome-widget-collapsed) .glass-title-logo.chrome-collapse-logo {
    cursor: pointer !important;
}

/* Inactive tabs appearance (must load after glass opacity:1 tab rules).
   Grouped / colored tabs keep their group-color outline when the group is open. */
html.inactive-tabs-dotted .tabs-container .tab:not(.active):not(.grouped):not(.colored),
body.inactive-tabs-dotted .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html.inactive-tabs-dotted.bottom-layout-html .glass-titlebar .tabs-container .tab:not(.active):not(.grouped):not(.colored),
body.inactive-tabs-dotted.bottom-layout-body .glass-titlebar .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    border-style: dotted !important;
    border-color: rgba(196, 181, 253, 0.95) !important;
}
html[data-theme="light"].inactive-tabs-dotted .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="light"] body.inactive-tabs-dotted .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    border-color: rgba(91, 33, 182, 0.85) !important;
}
html.inactive-tabs-dotted .tabs-container .tab.grouped:not(.active),
html.inactive-tabs-dotted .tabs-container .tab.colored:not(.active),
body.inactive-tabs-dotted .tabs-container .tab.grouped:not(.active),
body.inactive-tabs-dotted .tabs-container .tab.colored:not(.active) {
    border-style: solid !important;
    border-color: var(--tab-group-color, #4285f4) !important;
}
html.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
body.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html.inactive-tabs-dimmed.bottom-layout-html .glass-titlebar .tabs-container .tab:not(.active):not(.grouped):not(.colored),
body.inactive-tabs-dimmed.bottom-layout-body .glass-titlebar .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html.inactive-tabs-dimmed .browser-container.bottom-layout .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html.chrome-ui-faded.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html.chrome-ui-faded.inactive-tabs-dimmed.bottom-layout-html .glass-titlebar .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    opacity: 0.42 !important;
    filter: saturate(0.72) !important;
}
html.inactive-tabs-dimmed .tabs-container .tab.active,
body.inactive-tabs-dimmed .tabs-container .tab.active,
html.chrome-ui-faded.inactive-tabs-dimmed .tabs-container .tab.active,
html.inactive-tabs-dimmed .tabs-container .tab.grouped,
html.inactive-tabs-dimmed .tabs-container .tab.colored,
body.inactive-tabs-dimmed .tabs-container .tab.grouped,
body.inactive-tabs-dimmed .tabs-container .tab.colored,
html.chrome-ui-faded.inactive-tabs-dimmed .tabs-container .tab.grouped,
html.chrome-ui-faded.inactive-tabs-dimmed .tabs-container .tab.colored {
    opacity: 1 !important;
    filter: none !important;
}
html.inactive-tabs-dimmed .tabs-container .tab:not(.active):hover,
body.inactive-tabs-dimmed .tabs-container .tab:not(.active):hover,
html.inactive-tabs-dimmed.bottom-layout-html .glass-titlebar .tabs-container .tab:not(.active):hover,
body.inactive-tabs-dimmed.bottom-layout-body .glass-titlebar .tabs-container .tab:not(.active):hover,
html.chrome-ui-faded.inactive-tabs-dimmed .tabs-container .tab:not(.active):hover {
    opacity: 1 !important;
    filter: none !important;
}
html[data-theme="dark"].inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="dark"] body.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    color: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(26, 26, 26, 0.55) !important;
    background-image: none !important;
}
html[data-theme="light"].inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="light"] body.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    color: rgba(28, 25, 22, 0.45) !important;
    border-color: rgba(55, 48, 40, 0.16) !important;
    background: rgba(228, 225, 219, 0.55) !important;
    background-image: none !important;
}
html[data-theme="stealth"].inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="stealth"] body.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    color: rgba(245, 243, 255, 0.48) !important;
    border-color: rgba(168, 85, 247, 0.22) !important;
    background: rgba(26, 18, 40, 0.55) !important;
    background-image: none !important;
}
html[data-theme="stealth-glass"].inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="stealth-glass"] body.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    color: rgba(242, 244, 248, 0.48) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    background-image: none !important;
    box-shadow: none !important;
}
html[data-theme="stealth-float"].inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="stealth-float"] body.inactive-tabs-dimmed .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="stealth-float"].inactive-tabs-dimmed.floating-toolbar-widget:not(.chrome-widget-collapsed) .tabs-container .tab:not(.active):not(.grouped):not(.colored),
html[data-theme="stealth-float"] body.inactive-tabs-dimmed.floating-toolbar-widget:not(.chrome-widget-collapsed) .tabs-container .tab:not(.active):not(.grouped):not(.colored) {
    color: rgba(242, 244, 248, 0.48) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(12, 14, 20, 0.28) !important;
    background-color: rgba(12, 14, 20, 0.28) !important;
    background-image: none !important;
    box-shadow: none !important;
    opacity: 0.42 !important;
    filter: saturate(0.72) !important;
}
html.inactive-tabs-dimmed .tabs-container .tab.grouped,
html.inactive-tabs-dimmed .tabs-container .tab.colored,
body.inactive-tabs-dimmed .tabs-container .tab.grouped,
body.inactive-tabs-dimmed .tabs-container .tab.colored,
html[data-theme].inactive-tabs-dimmed .tabs-container .tab.grouped,
html[data-theme].inactive-tabs-dimmed .tabs-container .tab.colored,
html[data-theme] body.inactive-tabs-dimmed .tabs-container .tab.grouped,
html[data-theme] body.inactive-tabs-dimmed .tabs-container .tab.colored {
    border: 1px solid var(--tab-group-color, #4285f4) !important;
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 28%, #1c1c1c) !important;
    background-color: color-mix(in srgb, var(--tab-group-color, #4285f4) 28%, #1c1c1c) !important;
    background-image: none !important;
    opacity: 1 !important;
    filter: none !important;
}
html.inactive-tabs-dimmed .tabs-container .tab.grouped.active,
html.inactive-tabs-dimmed .tabs-container .tab.colored.active,
body.inactive-tabs-dimmed .tabs-container .tab.grouped.active,
body.inactive-tabs-dimmed .tabs-container .tab.colored.active,
html[data-theme].inactive-tabs-dimmed .tabs-container .tab.grouped.active,
html[data-theme].inactive-tabs-dimmed .tabs-container .tab.colored.active {
    background: color-mix(in srgb, var(--tab-group-color, #4285f4) 42%, #1a1a1a) !important;
    background-color: color-mix(in srgb, var(--tab-group-color, #4285f4) 42%, #1a1a1a) !important;
}
html.inactive-tabs-dimmed .tabs-container .tab:not(.active) .tab-title,
html.inactive-tabs-dimmed .tabs-container .tab:not(.active) .tab-title-text,
html.inactive-tabs-dimmed .tabs-container .tab:not(.active) .tab-audio-btn,
body.inactive-tabs-dimmed .tabs-container .tab:not(.active) .tab-title,
body.inactive-tabs-dimmed .tabs-container .tab:not(.active) .tab-title-text,
body.inactive-tabs-dimmed .tabs-container .tab:not(.active) .tab-audio-btn {
    color: inherit !important;
    opacity: 1 !important;
}

/* Home + bottom dock: kill residual black band above the tab strip. */
html.welcome-visible.bottom-layout-html .browser-container::after,
body.welcome-visible.bottom-layout-body .browser-container::after,
html.welcome-visible .browser-container.bottom-layout::after,
body.welcome-visible .browser-container.bottom-layout::after,
html.bottom-layout-html.welcome-visible .browser-container::after,
.browser-container.bottom-layout:has(.web-content.showing-welcome)::after,
.browser-container.bottom-layout:has(#welcome-screen:not(.is-hidden):not([hidden]))::after {
    display: none !important;
    background: none !important;
    height: 0 !important;
    opacity: 0 !important;
    content: none !important;
    pointer-events: none !important;
}

html.welcome-visible.bottom-layout-html[data-theme="dark"] .browser-container,
html.welcome-visible.bottom-layout-html.theme-dark .browser-container,
html.welcome-visible[data-theme="dark"] .browser-container.bottom-layout {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}
html.welcome-visible.bottom-layout-html[data-theme="stealth"] .browser-container,
html.welcome-visible.bottom-layout-html.theme-stealth .browser-container,
html.welcome-visible[data-theme="stealth"] .browser-container.bottom-layout {
    background: #0e0a16 !important;
    background-color: #0e0a16 !important;
}
html.welcome-visible.bottom-layout-html[data-theme="light"] .browser-container,
html.welcome-visible.bottom-layout-html.theme-light .browser-container,
html.welcome-visible[data-theme="light"] .browser-container.bottom-layout {
    background: #ebe4f6 !important;
    background-color: #ebe4f6 !important;
}
html.welcome-visible.bottom-layout-html[data-theme="stealth-glass"] .browser-container,
html.welcome-visible.bottom-layout-html[data-theme="stealth-float"] .browser-container {
    background: #121018 !important;
    background-color: #121018 !important;
}

html.bottom-layout-html .glass-titlebar,
body.bottom-layout-body .glass-titlebar {
    border-top: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Canonical geometry for split and tools-dock chrome presets. */
html.chrome-layout-tools-dock-html,
html.chrome-layout-tabs-top-url-bottom-html,
html.chrome-layout-url-top-tabs-bottom-html {
    --preset-tab-strip-height: 32px;
}

html.longer-tabs.chrome-layout-tools-dock-html,
html.longer-tabs.chrome-layout-tabs-top-url-bottom-html,
html.longer-tabs.chrome-layout-url-top-tabs-bottom-html {
    --preset-tab-strip-height: 40px;
}

body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock,
body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom,
body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom {
    --preset-toolbar-height: 36px;
    --preset-status-height: 22px;
}

body.toolbar-labels.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock,
body.toolbar-labels.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom,
body.toolbar-labels.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom {
    --preset-toolbar-height: 52px;
}

html.security-bar-hidden body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock,
html.security-bar-hidden body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom,
html.security-bar-hidden body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom,
body.security-bar-hidden.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock,
body.security-bar-hidden.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom,
body.security-bar-hidden.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom {
    --preset-status-height: 0px;
}

html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .glass-titlebar,
html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .glass-titlebar,
html.chrome-layout-tools-dock-html .glass-titlebar,
body.chrome-layout-tools-dock-body .glass-titlebar,
html.chrome-layout-tabs-top-url-bottom-html .glass-titlebar,
body.chrome-layout-tabs-top-url-bottom-body .glass-titlebar {
    top: 0 !important;
    bottom: auto !important;
    height: var(--preset-tab-strip-height) !important;
    min-height: var(--preset-tab-strip-height) !important;
    max-height: var(--preset-tab-strip-height) !important;
    padding: 0 8px !important;
    align-items: center !important;
}

html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .glass-window-controls,
html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .glass-window-controls,
html.chrome-layout-tools-dock-html .glass-window-controls,
body.chrome-layout-tools-dock-body .glass-window-controls,
html.chrome-layout-tabs-top-url-bottom-html .glass-window-controls,
body.chrome-layout-tabs-top-url-bottom-body .glass-window-controls {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
}

html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .top-bar,
body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .top-bar {
    top: var(--preset-tab-strip-height) !important;
    bottom: auto !important;
    height: var(--preset-toolbar-height) !important;
    min-height: var(--preset-toolbar-height) !important;
    padding: 0 6px !important;
}

html.chrome-layout-tools-dock-html body.toolbar-labels.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .top-bar,
body.toolbar-labels.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .top-bar {
    padding: 2px 6px 14px 6px !important;
}

html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .status-bar,
body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .status-bar {
    top: calc(var(--preset-tab-strip-height) + var(--preset-toolbar-height)) !important;
    bottom: auto !important;
}

html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .web-content,
body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .web-content {
    top: calc(var(--preset-tab-strip-height) + var(--preset-toolbar-height) + var(--preset-status-height)) !important;
    bottom: 0 !important;
    height: auto !important;
}

html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar,
body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar {
    top: auto !important;
    bottom: var(--preset-status-height) !important;
    height: var(--preset-toolbar-height) !important;
    min-height: var(--preset-toolbar-height) !important;
    padding: 2px 6px !important;
}

html.chrome-layout-tabs-top-url-bottom-html body.toolbar-labels.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar,
body.toolbar-labels.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar {
    padding: 14px 6px 2px 6px !important;
}

html.chrome-layout-tabs-top-url-bottom-html body.toolbar-labels.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar [data-toolbar-label]::after,
body.toolbar-labels.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .top-bar [data-toolbar-label]::after {
    top: auto !important;
    bottom: calc(100% + 3px) !important;
}

html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .status-bar,
body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .status-bar {
    top: auto !important;
    bottom: 0 !important;
}

html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .web-content,
body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .web-content {
    top: var(--preset-tab-strip-height) !important;
    /* Live reserve from syncChromeContentInsets; preset stack as fallback. */
    bottom: var(--bottom-chrome-reserve, calc(var(--preset-toolbar-height) + var(--preset-status-height))) !important;
    height: auto !important;
}

html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .glass-titlebar,
html.chrome-layout-url-top-tabs-bottom-html .glass-titlebar,
body.chrome-layout-url-top-tabs-bottom-body .glass-titlebar {
    top: auto !important;
    bottom: 0 !important;
    height: var(--preset-tab-strip-height) !important;
    min-height: var(--preset-tab-strip-height) !important;
    max-height: var(--preset-tab-strip-height) !important;
    padding: 0 8px !important;
    align-items: center !important;
}

html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .glass-window-controls,
html.chrome-layout-url-top-tabs-bottom-html .glass-window-controls,
body.chrome-layout-url-top-tabs-bottom-body .glass-window-controls,
body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .glass-window-controls {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
}

html.chrome-layout-url-top-tabs-bottom-html .tab-loading-bar,
body.chrome-layout-url-top-tabs-bottom-body .tab-loading-bar {
    top: 0 !important;
    bottom: auto !important;
}

html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .top-bar,
body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .top-bar {
    top: 0 !important;
    bottom: auto !important;
    height: var(--preset-toolbar-height) !important;
    min-height: var(--preset-toolbar-height) !important;
    padding: 0 6px !important;
}

html.chrome-layout-url-top-tabs-bottom-html body.toolbar-labels.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .top-bar,
body.toolbar-labels.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .top-bar {
    padding: 2px 6px 14px 6px !important;
}

html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .status-bar,
body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .status-bar {
    top: var(--preset-toolbar-height) !important;
    bottom: auto !important;
}

html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .web-content,
body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .web-content {
    top: calc(var(--preset-toolbar-height) + var(--preset-status-height)) !important;
    bottom: var(--bottom-chrome-reserve, var(--preset-tab-strip-height)) !important;
    height: auto !important;
}

html.chrome-layout-tools-dock-html.security-bar-hidden body.chrome-layout-tools-dock-body.security-bar-hidden .browser-container.chrome-layout-tools-dock.security-bar-hidden .web-content {
    top: calc(var(--preset-tab-strip-height) + var(--preset-toolbar-height)) !important;
    bottom: 0 !important;
    height: auto !important;
}

html.chrome-layout-tabs-top-url-bottom-html.security-bar-hidden body.chrome-layout-tabs-top-url-bottom-body.security-bar-hidden .browser-container.chrome-layout-tabs-top-url-bottom.security-bar-hidden .web-content {
    top: var(--preset-tab-strip-height) !important;
    bottom: var(--bottom-chrome-reserve, var(--preset-toolbar-height)) !important;
    height: auto !important;
}

html.chrome-layout-url-top-tabs-bottom-html.security-bar-hidden body.chrome-layout-url-top-tabs-bottom-body.security-bar-hidden .browser-container.chrome-layout-url-top-tabs-bottom.security-bar-hidden .web-content {
    top: var(--preset-toolbar-height) !important;
    bottom: var(--preset-tab-strip-height) !important;
    height: auto !important;
}

/* =============================================================================
   WINDOW-CONTROL OFF-BAR PADDING (authoritative)
   Default dock keeps min/max/close in-flow on the strip. Corner bubble and
   between-tabs placements only need the normal strip inset.
   ============================================================================= */

/* Explicit off-bar placements, all layouts. */
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-titlebar,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-titlebar,
html.window-controls-pos-between-tabs body.window-controls-pos-between-tabs .glass-titlebar,
html.window-controls-pos-top-left body.window-controls-pos-top-left .browser-container .glass-titlebar,
html.window-controls-pos-top-right body.window-controls-pos-top-right .browser-container .glass-titlebar,
html.window-controls-pos-between-tabs body.window-controls-pos-between-tabs .browser-container .glass-titlebar {
    padding-right: 8px !important;
}

/* Strip insets stay at the normal edge padding for every dock. */
html.bottom-layout-html body.bottom-layout-body .glass-titlebar,
html.bottom-layout-html body.bottom-layout-body .browser-container.bottom-layout .glass-titlebar,
html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .glass-titlebar,
html.chrome-layout-tools-dock-html body.chrome-layout-tools-dock-body .browser-container.chrome-layout-tools-dock .glass-titlebar,
html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .glass-titlebar,
html.chrome-layout-tabs-top-url-bottom-html body.chrome-layout-tabs-top-url-bottom-body .browser-container.chrome-layout-tabs-top-url-bottom .glass-titlebar,
html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .glass-titlebar,
html.chrome-layout-url-top-tabs-bottom-html body.chrome-layout-url-top-tabs-bottom-body .browser-container.chrome-layout-url-top-tabs-bottom .glass-titlebar {
    padding-right: 8px !important;
}

/* Stealth-float widget: same release when controls are off the bar. */
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-left:not(.chrome-widget-collapsed) body.window-controls-pos-top-left .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-right:not(.chrome-widget-collapsed) body.window-controls-pos-top-right .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-between-tabs:not(.chrome-widget-collapsed) body.window-controls-pos-between-tabs .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-left:not(.chrome-widget-collapsed) body.window-controls-pos-top-left .browser-container.bottom-layout .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-right:not(.chrome-widget-collapsed) body.window-controls-pos-top-right .browser-container.bottom-layout .glass-titlebar,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-between-tabs:not(.chrome-widget-collapsed) body.window-controls-pos-between-tabs .browser-container.bottom-layout .glass-titlebar {
    padding-right: 12px !important;
}

/* =============================================================================
   WINDOW-CONTROL CORNER BUBBLE (authoritative, last in cascade)
   Bottom-layout / toolbar-labels / longer-tabs / chrome-layout presets set
   `bottom: NNpx` on .glass-window-controls without clearing `top`. When a
   corner mode also sets `top: 8px`, both stick and the pill stretches into a
   tall vertical capsule. These rules beat every dock placement above and lock
   a compact horizontal frosted bubble in the chosen corner (same material as
   the minimal URL bubble).
   ============================================================================= */
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls,
html.window-controls-pos-top-left.bottom-layout-html body.window-controls-pos-top-left.bottom-layout-body .glass-window-controls,
html.window-controls-pos-top-right.bottom-layout-html body.window-controls-pos-top-right.bottom-layout-body .glass-window-controls,
html.window-controls-pos-top-left.bottom-layout-html body.window-controls-pos-top-left.toolbar-labels .glass-window-controls,
html.window-controls-pos-top-right.bottom-layout-html body.window-controls-pos-top-right.toolbar-labels .glass-window-controls,
html.window-controls-pos-top-left.security-bar-hidden.bottom-layout-html body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-right.security-bar-hidden.bottom-layout-html body.window-controls-pos-top-right .glass-window-controls,
html.window-controls-pos-top-left.longer-tabs.bottom-layout-html body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-right.longer-tabs.bottom-layout-html body.window-controls-pos-top-right .glass-window-controls,
html.window-controls-pos-top-left.chrome-layout-url-top-tabs-bottom-html body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-right.chrome-layout-url-top-tabs-bottom-html body.window-controls-pos-top-right .glass-window-controls,
html.window-controls-pos-top-left.chrome-layout-tabs-top-url-bottom-html body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-right.chrome-layout-tabs-top-url-bottom-html body.window-controls-pos-top-right .glass-window-controls,
html.window-controls-pos-top-left.chrome-layout-tools-dock-html body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-right.chrome-layout-tools-dock-html body.window-controls-pos-top-right .glass-window-controls,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls,
html[data-theme="stealth-float"].floating-toolbar-widget.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls {
    position: fixed !important;
    top: 14px !important;
    bottom: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 44px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 5px 8px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(18, 18, 22, 0.62) !important;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    isolation: isolate !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    /* Clip button hover fills to the capsule curve (avoids square close/min caps). */
    overflow: hidden !important;
    pointer-events: auto !important;
    -webkit-app-region: no-drag !important;
    z-index: 2147483647 !important;
}

html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls,
html.window-controls-pos-top-left.bottom-layout-html body.window-controls-pos-top-left .glass-window-controls {
    left: 14px !important;
    right: auto !important;
}

html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls,
html.window-controls-pos-top-right.bottom-layout-html body.window-controls-pos-top-right .glass-window-controls {
    right: 14px !important;
    left: auto !important;
}

html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn,
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:hover,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:hover,
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:active,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:active,
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:focus,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:focus {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    /* Beat the global `border-radius: 0` chrome override so hover fills are soft. */
    border-radius: 8px !important;
    overflow: hidden !important;
}

html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:first-child,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:first-child,
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:first-child:hover,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:first-child:hover {
    border-radius: 999px 8px 8px 999px !important;
}

html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:last-child,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:last-child,
html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:last-child:hover,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:last-child:hover {
    border-radius: 8px 999px 999px 8px !important;
}

html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn:hover,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

html.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls .glass-control-btn.glass-close:hover,
html.window-controls-pos-top-right body.window-controls-pos-top-right .glass-window-controls .glass-control-btn.glass-close:hover {
    background: rgba(232, 17, 35, 0.85) !important;
    border-color: rgba(232, 17, 35, 0.9) !important;
    color: #fff !important;
}

/* Vertical tabs terminal overrides (glass.css loads after styles.css). */
body.vertical-tabs .glass-titlebar > .tabs-container,
html.vertical-tabs .glass-titlebar > .tabs-container,
body.vertical-tabs.bottom-layout-body .glass-titlebar > .tabs-container,
html.vertical-tabs.bottom-layout-html .glass-titlebar > .tabs-container,
body.longer-tabs.vertical-tabs .glass-titlebar > .tabs-container,
html.longer-tabs.vertical-tabs .glass-titlebar > .tabs-container,
body.longer-tabs.vertical-tabs.bottom-layout-body .glass-titlebar > .tabs-container,
html.longer-tabs.vertical-tabs.bottom-layout-html .glass-titlebar > .tabs-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: var(--chrome-surface, rgba(20, 20, 24, 0.96)) !important;
    border-right: 1px solid rgba(124, 58, 237, 0.35) !important;
}

body.vertical-tabs .tabs-container > .new-tab-btn,
html.vertical-tabs .tabs-container > .new-tab-btn,
body.longer-tabs.vertical-tabs .tabs-container > .new-tab-btn,
html.longer-tabs.vertical-tabs .glass-titlebar .new-tab-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 28px !important;
    min-height: 28px !important;
    flex: 0 0 auto !important;
    margin: 4px 0 0 !important;
}

body.vertical-tabs.window-controls-pos-top-left .glass-window-controls,
html.vertical-tabs.window-controls-pos-top-left body.window-controls-pos-top-left .glass-window-controls {
    left: 214px !important;
    right: auto !important;
}
