.hybrid-studio { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; position: relative; }
.hybrid-studio [hidden] { display: none !important; }
.hybrid-switch { display: flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; cursor: pointer; font-size: .875rem; font-weight: 600; white-space: normal; }
.hybrid-switch span { min-width: 0; }
.hybrid-label-short { display: none; }
.hybrid-switch input { appearance: none; width: 40px; height: 24px; margin: 0; border: 1px solid var(--muted); border-radius: 14px; background: var(--bg); flex-shrink: 0; }
.hybrid-switch input::before { content: ""; display: block; width: 16px; height: 16px; margin: 3px; border-radius: 50%; background: var(--muted); }
.hybrid-switch input:checked { background: var(--teal); border-color: var(--teal); }
.hybrid-switch input:checked::before { transform: translateX(16px); background: var(--bg); }
.hybrid-switch input:focus-visible, .hybrid-details summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.hybrid-switch input:disabled { opacity: .55; cursor: wait; }
#hybrid-availability { font-size: .75rem; color: var(--teal); }
.hybrid-studio[data-availability="down"] #hybrid-availability, .hybrid-studio[data-availability="offline"] #hybrid-availability { color: #ffb3ca; }
.hybrid-details summary { list-style: none; min-height: 44px; min-width: 44px; display: grid; place-items: center; cursor: pointer; color: var(--violet); }
.hybrid-details { position: static; }
.hybrid-details:not([open]) .hybrid-info { display: none; }
.hybrid-details summary::-webkit-details-marker { display: none; }
.hybrid-info { position: absolute; z-index: 30; top: 100%; right: 0; width: min(340px, calc(100vw - 40px)); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: 0 8px 28px #000a; color: var(--ink); font-size: .875rem; text-align: start; max-height: 65dvh; overflow-y: auto; }
.hybrid-info p { margin: 0 0 10px; overflow-wrap: anywhere; }
.hybrid-info button, #hybrid-check { min-height: 44px; }
.hybrid-cleanup-pending summary { color: #ffb3ca; }
#hybrid-status { flex-basis: 100%; margin: 0; max-width: 400px; color: #ffb3ca; }
#server-studio-host { min-width: 0; }
.studio-mode #server-studio-host { opacity: .7; }
@media (max-width: 940px) {
    .masthead { flex-wrap: wrap; }
    .masthead .brand { flex: 1; }
    .header-actions { display: contents; }
    .header-actions > #analyze { order: 1; margin-left: auto; }
    #server-studio-host { flex-basis: 100%; order: 2; z-index: 2; }
    .hybrid-info { position: fixed; top: auto; right: 20px; left: 20px; width: auto; }
}
/* Enlarged text needs the compact engine label at every viewport width. */
body.large-text .masthead { row-gap: 4px; }
body.large-text .hybrid-details summary { line-height: 1.25; }
body.large-text .hybrid-label-long { display: none; }
body.large-text .hybrid-label-short { display: inline; }
