.website-accounts { max-width: 1240px; margin-inline: auto; font-size: 13px; }
.website-section-heading, .website-editor-heading, .website-editor-footer, .website-connection, .website-actions, .browser-view-toolbar, .browser-account-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.website-section-heading { margin-bottom: 18px; }
.website-section-heading h4, .website-removal h4 { font-size: 17px; letter-spacing: -.02em; margin: 0 0 6px; }
.website-section-heading p, .website-help, .website-footnote { color: var(--text-soft); font-size: 12px; line-height: 1.7; margin: 0; }
.website-list { display: grid; gap: 12px; margin-bottom: 24px; }
.website-connection { padding: 22px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.website-connection-identity { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 260px; }
.website-monogram { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; font-size: 18px; font-weight: 650; color: var(--accent); background: color-mix(in srgb,var(--accent) 9%,transparent); border: 1px solid color-mix(in srgb,var(--accent) 20%,transparent); border-radius: 11px; }
.website-connection-title { margin: 0 0 5px; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.website-connection-meta { color: var(--text-faint); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.website-connection-state { display: inline-flex; padding: 3px 8px; margin-left: 8px; border-radius: 6px; font-size: 10px; font-weight: 550; color: var(--text-soft); background: var(--surface-highlight); vertical-align: middle; }
.website-connection-state.is-connected { color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,transparent); }
.website-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.website-empty { display: grid; place-items: center; text-align: center; padding: 48px 24px; border: 1px dashed var(--stroke); border-radius: 12px; background: var(--surface); }
.website-empty svg { width: 38px; height: 38px; margin-bottom: 16px; color: var(--text-faint); }
.website-empty h4 { font-size: 16px; margin: 0 0 8px; }
.website-empty p { color: var(--text-soft); max-width: 52ch; line-height: 1.8; margin: 0; }
.website-feedback { color: var(--accent); border: 1px solid var(--stroke); background: var(--surface); padding: 12px 16px; border-radius: 9px; font-size: 12px; line-height: 1.7; }
.website-feedback.is-error, .website-danger { color: var(--danger, #ef7777); }
.website-history { margin: 14px 0; }
.website-history summary, .website-form-section summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.website-history-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--stroke); padding: 12px 0; font-size: 12px; }
.website-history-row:first-child { margin-top: 16px; }
.website-history-row time { color: var(--text-faint); font-size: 11px; }
.website-footnote { margin: 24px 0 0; max-width: 95ch; }
.website-editor { width: min(820px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; margin: auto; border: 1px solid var(--stroke); border-radius: 16px; color: var(--text); background: var(--surface); box-shadow: 0 28px 90px #0005; }
.website-editor::backdrop { background: #0009; backdrop-filter: blur(4px); }
.website-editor form { display: flex; flex-direction: column; max-height: calc(100dvh - 42px); }
.website-editor-heading { padding: 22px 26px; border-bottom: 1px solid var(--stroke); flex-shrink: 0; }
.website-editor-heading h3 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.website-editor-heading .settings-eyebrow { margin-bottom: 6px; }
.website-editor-body { padding: 24px 26px; overflow-y: auto; min-height: 0; }
.website-editor-footer { justify-content: flex-end; flex-wrap: wrap; padding: 16px 26px; border-top: 1px solid var(--stroke); flex-shrink: 0; }
.website-editor-footer .website-feedback { flex: 1 1 100%; margin: 0; overflow-wrap: anywhere; }
.website-editor form[aria-busy="true"] [type="submit"] { cursor: progress; }
.website-form-grid, .website-check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.website-form-grid label, .website-form-section > label { display: grid; gap: 7px; font-size: 12px; color: var(--text-soft); }
.website-form-grid .input, .website-form-grid .select, .website-form-section .input { width: 100%; min-width: 0; border-radius: 9px; }
.website-editor .website-help { margin-top: 12px; }
.website-form-section { border: 0; border-top: 1px solid var(--stroke); padding: 20px 0 0; margin: 22px 0 0; min-width: 0; }
.website-form-section legend { padding: 0 8px 0 0; font-size: 13px; font-weight: 600; }
.website-form-section[open] summary { margin-bottom: 14px; }
.website-check-grid { gap: 9px 16px; margin-top: 14px;  }
.website-agent-picker { margin-top: 14px; }
.website-agent-picker .chip-select-chips { border-radius: 8px; }
.website-agent-picker .chip-select-chip { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.website-agent-picker [data-chip-remove] { flex-shrink: 0; }
.website-agent-picker .chip-select-input { min-width: 0; }
.website-agent-picker .chip-select-dropdown { position: static; margin-top: 6px; max-height: 12rem; border-radius: 8px; background: var(--surface); }
.website-agent-picker [data-chip-option] { overflow-wrap: anywhere; }
.website-check { display: flex !important; align-items: center; gap: 9px; font-size: 12px; color: var(--text-soft); line-height: 1.5; }
.website-check input { accent-color: var(--accent); flex-shrink: 0; }
.website-check label { overflow-wrap: anywhere; }
.website-removal .website-actions { margin-top: 14px; }
.website-editor [hidden], .website-accounts [hidden], .browser-view [hidden] { display: none !important; }
.website-viewer-host { margin: 24px 0; }
.website-viewer-host iframe, .browser-inline-card iframe { border: 1px solid var(--stroke); border-radius: 12px; width: 100%; height: min(900px,85dvh); min-height: 460px; background: var(--surface); }
.browser-inline-card { border: 1px solid var(--stroke); border-radius: 12px; background: var(--surface); margin: 12px 0; overflow: hidden; }
.browser-inline-card > summary { padding: 14px 18px; cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 600; }
.browser-inline-card iframe { border: 0; border-top: 1px solid var(--stroke); border-radius: 0; display: block; }
.browser-view-body { margin: 0; min-height: 100dvh; color: var(--text); background: var(--surface); font-family: var(--font-body,Inter,system-ui,sans-serif); }
.browser-view { max-width: 1480px; margin: auto; font-size: 12px; }
.browser-view-toolbar { padding: 14px 18px; border-bottom: 1px solid var(--stroke); flex-wrap: wrap; }
.browser-view-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.browser-view-identity strong { font-size: 13px; }
.browser-view-identity [data-browser-control-status] { color: var(--text-faint); }
.browser-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.browser-view .button { border-radius: 8px; font-size: 11px; padding: 8px 11px; min-height: 36px; }
.browser-address-bar { display: flex; align-items: center; gap: 8px; padding: 12px 18px 0; }
.browser-address-bar .input { flex: 1; min-width: 0; width: 100%; }
.browser-tab-label { display: flex; align-items: center; gap: 6px; color: var(--text-faint); }
.browser-tab-label select { max-width: 160px; }
.browser-view-status { margin: 10px 18px; min-height: 1.5em; color: var(--text-faint); overflow-wrap: anywhere; }
.browser-view-status.is-error { color: var(--danger,#ef7777); }
.browser-screen-wrap { background: #15171b; border-block: 1px solid var(--stroke); overflow: hidden; min-height: 200px; }
.browser-screen { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.browser-screen:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.browser-direct-input { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; font-size: 16px; }
.browser-dialog iframe,.browser-dialog-heading > div,.browser-view,.browser-view-toolbar,.browser-address-bar { min-width: 0; }
.browser-view[data-desktop="true"] [data-browser-credentials] { display: none; }
.browser-screen[hidden],.browser-tab-label[hidden],.browser-placeholder[hidden] { display: none; }
.browser-status-row { display:flex; align-items:center; gap:8px; padding-inline:14px; }
.browser-status-row .browser-view-status { flex:1; padding-inline:0; }
/* Only a touch screen has a keyboard to raise. */
.browser-keyboard-button { display:none; }
@media (any-pointer: coarse) { .browser-keyboard-button { display:inline-flex; } }
.browser-placeholder,.browser-opening { padding:32px 20px; color:var(--text-muted); text-align:center; }
.browser-opening { min-height:180px; display:grid; place-items:center; }
.browser-upload { padding:10px 14px; border-bottom:1px solid var(--stroke); }
.browser-upload summary { cursor:pointer; }
.browser-upload form { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin-top:8px; }
.browser-upload label { flex:1 1 260px; }
.browser-upload label input { display:block; width:100%; margin-top:6px; }
.browser-upload p { flex-basis:100%; color:var(--text-muted); font-size:12px; }
.browser-view[data-desktop="true"] .browser-screen { max-width: none; }
.browser-screen[aria-busy="true"] { opacity: .65; cursor: progress; }
.browser-input-bar { display: flex; align-items: flex-end; gap: 8px; padding: 14px 18px; flex-wrap: wrap; }
.browser-input-bar label { display: grid; gap: 7px; flex: 1 1 220px; color: var(--text-soft); }
.browser-input-bar input { width: 100%; min-width: 0; }
.browser-account-bar { border-top: 1px solid var(--stroke); padding: 14px 18px; flex-wrap: wrap; }
.browser-account-bar p { color: var(--text-soft); margin: 0; line-height: 1.7; }
.browser-view :is(input,select) { min-height: 36px; border-radius: 8px; }
.browser-view button:disabled { opacity: .45; cursor: default; }
.website-quick-start { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.website-quick-start .website-help { margin: 0; }
.browser-dialog-open { overflow: hidden; }
.browser-dialog { width: min(1200px,calc(100vw - 48px)); height: min(980px,calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid var(--stroke); border-radius: 16px; color: var(--text); background: var(--surface); box-shadow: 0 24px 100px #0006; overflow: hidden; }
.browser-dialog[open] { display: flex; flex-direction: column; }
.browser-dialog [hidden] { display: none !important; }
.browser-dialog::backdrop { background: #080a0dc4; }
.browser-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--stroke); flex: 0 0 auto; }
.browser-dialog-heading h3 { font-size: 17px; margin: 3px 0 0; }
.browser-dialog-heading .settings-eyebrow { font-size: 9px; }
.browser-dialog-heading .button { min-width: 60px; min-height: 42px; }
.browser-dialog > iframe { display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: var(--surface); }
.browser-inline-card > .button { margin: 0 16px 16px; }
.browser-view-body { height: 100dvh; min-height: 0; overflow: hidden; }
.browser-view { display: flex; flex-direction: column; height: 100dvh; max-width: none; overflow: hidden; }
.browser-view-toolbar { gap: 10px; padding: 10px 14px; flex: 0 0 auto; }
.browser-view-status { margin: 7px 14px; font-size: 11px; flex: 0 0 auto; }
.browser-screen-wrap { flex: 1 1 auto; min-height: 150px; background: #f8f9fa; overflow: auto; overscroll-behavior: contain; }
.browser-address-bar { padding: 8px 14px 0; flex: 0 0 auto; }
.browser-input-bar { padding: 9px 14px; gap: 7px; border-top: 1px solid var(--stroke); flex: 0 0 auto; }
.browser-input-bar label { flex: 1 1 260px; gap: 5px; font-size: 11px; }
.browser-more { padding: 8px 14px max(8px,env(safe-area-inset-bottom)); border-top: 1px solid var(--stroke); color: var(--text-soft); flex: 0 0 auto; }
.browser-more > summary { cursor: pointer; font-size: 11px; }
.browser-more-content { max-height: 170px; overflow-y: auto; font-size: 11px; line-height: 1.6; padding-top: 10px; }
.browser-more-content p { margin: 10px 0 0; }
.browser-command-icon { display: none; }
.browser-update-note { padding: 8px 14px; margin: 0; background: var(--surface-highlight); font-size: 11px; }
/* Storage follows the same topbar, surfaces and typography as Settings. */
.storage-workspace-pane { display: flex; flex-direction: column; padding: 0; max-width: none; height: 100%; min-height: 0; margin: 0; font-size: 13px; overflow: hidden; }
.storage-workspace-pane > .orch-topbar { flex-shrink: 0; }
.storage-workspace-pane > .orch-topbar,.settings-pane > .orch-topbar { background: var(--surface-header); border-color: var(--stroke); }
.storage-workspace-body { padding: 28px clamp(18px,2.2vw,40px) 48px; overflow-y: auto; min-height: 0; flex: 1; scrollbar-gutter: stable; }
.storage-workspace-content { width: 100%; max-width: 1240px; margin-inline: auto; }
.storage-workspace-content > :not(:first-child) { margin-top: 22px; }
.storage-workspace-pane :is(section[aria-label="Cloud storage allowance"],section[aria-label="Generated files awaiting upload"],.storage-workspace-content > details,[aria-label="Storage usage"] > div,[data-storage-artifact]) { background: var(--surface); border-radius: 12px; border-color: var(--stroke); box-shadow: none; }
.storage-workspace-pane [aria-label="Cloud storage allowance"] { border-top: 2px solid var(--accent); padding: 24px; }
.storage-workspace-pane [aria-label="Cloud storage allowance"] h2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.storage-workspace-pane [aria-label="Cloud storage allowance"] p { color: var(--text-soft); font-size: 12px; line-height: 1.8; }
.storage-workspace-pane [aria-label="Storage usage"] > div { padding: 22px 24px; }
.storage-workspace-pane [aria-label="Storage usage"] .text-3xl { letter-spacing: -.04em; font-size: 30px; }
.storage-workspace-pane progress { display: block; height: 6px; border: 0; border-radius: 8px; accent-color: var(--accent); background: var(--surface-highlight); }
.storage-workspace-pane progress::-webkit-progress-bar { background: var(--surface-highlight); border-radius: 8px; }
.storage-workspace-pane progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.storage-workspace-pane .storage-controls { background: var(--surface); border: 1px solid var(--stroke); padding: 20px; border-radius: 12px; }
.storage-workspace-pane :is(.input,.select) { min-height: 42px; border-radius: 9px; }
.storage-workspace-pane .button { border-radius: 9px; font-size: 12px; }
.storage-workspace-pane .storage-result-count { color: var(--text-soft); font-size: 12px; }
.storage-workspace-pane [data-storage-artifact] { padding: 22px 24px; }
@media(max-width:640px) {
  .browser-dialog { width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .browser-dialog-heading { padding: max(8px,env(safe-area-inset-top)) 12px 8px; }
  .browser-dialog-heading .settings-eyebrow { display: none; }
  .browser-dialog-heading h3 { margin: 0; font-size: 15px; }
  .browser-view-toolbar { flex-wrap: nowrap; padding-block: 4px; gap: 6px; }
  .browser-view-toolbar .website-actions { flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
  .browser-view-toolbar .button { min-height: 40px; padding-inline: 8px; }
  .browser-view-identity { min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; font-size: 11px; }
  .browser-view-identity strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .browser-view-identity [data-browser-control-status] { display: none; }
  .browser-live-dot { flex-shrink: 0; }
  .browser-input-bar { display: grid; grid-template-columns: minmax(0,1fr) repeat(3,40px); gap: 5px; padding-block: 6px; }
  .browser-input-bar label { min-width: 0; }
  .browser-input-bar label > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .browser-input-bar .input { font-size: 16px; height: 42px; min-height: 42px; padding-block: 8px; }
  .browser-input-bar > button { width: 40px; height: 42px; min-height: 42px; padding: 0; }
  .browser-input-bar [data-browser-key="Tab"] { grid-column: 2; grid-row: 1; }
  .browser-input-bar [value="type"] { grid-column: 3; grid-row: 1; }
  .browser-input-bar [value="enter"] { grid-column: 4; grid-row: 1; }
  .browser-input-bar [data-browser-focus-password] { grid-column: 1 / -1; grid-row: 2; width: auto; height: 36px; min-height: 36px; }
  .browser-command-label { display: none; }
  .browser-command-icon { display: inline; font-size: 20px; }
  .website-section-heading { align-items: flex-start; flex-direction: column; }
  .website-accounts .settings-heading { gap: 12px; flex-direction: column; }
  .website-connection { padding: 18px; }
  .website-form-grid,.website-check-grid { grid-template-columns: minmax(0,1fr); }
  .website-editor { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .website-editor form { max-height: calc(100dvh - 18px); }
  .website-editor-heading,.website-editor-body,.website-editor-footer { padding: 18px; }
  .browser-view-toolbar,.browser-address-bar,.browser-input-bar,.browser-account-bar { padding-inline: 12px; }
  .browser-tab-label { font-size: 0; }
  .browser-tab-label select { max-width: 75px; font-size: 11px; }
  .browser-view-identity [data-browser-control-status] { font-size: 11px; }
  .storage-workspace-pane [data-storage-artifact],.storage-workspace-pane .storage-controls { padding: 18px; }
}

/* In-chat computer-use viewer. Reuses the shared dialog shell above so it
   matches every other controller viewer; only the consent status line and the
   always-available reopen launcher are new. */
.computer-dialog > p { flex: 0 0 auto; margin: 0; padding: 10px 18px; border-bottom: 1px solid var(--stroke); }
.computer-dialog > p[data-state="pending"] { color: #f59e42; }
.computer-launcher-slot { display: flex; min-width: 0; }
.computer-launcher {
  position: static;
  max-width: min(22rem, 42vw);
  min-height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--stroke));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: none;
}
.computer-launcher[hidden] { display: none; }
@media (max-width: 720px) {
  .computer-dialog > p { padding: 8px 12px; }
  .computer-launcher-slot { display: flex; }
  .computer-launcher {
    width: auto;
    max-width: min(48vw, 13rem);
    min-height: 44px;
    padding: 10px 12px;
  }
}

/* Open Computer on the controller page: a full-screen live desktop. The modal
   owns the header, Close and Take Control; the embedded viewer paints the
   desktop and reports its own state. */
.computer-modal { position: fixed; inset: 0; z-index: 96; display: flex; flex-direction: column; background: #05070a; }
.computer-modal.hidden { display: none; }
.computer-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--stroke); background: var(--surface-strong); flex: 0 0 auto; }
.computer-modal-identity { min-width: 0; }
.computer-modal-identity > span { display: block; }
.computer-modal-identity p { margin: 2px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.4; }
.computer-modal-identity p[data-state="error"] { color: var(--danger); }
.computer-modal-identity p[data-state="ended"] { color: var(--warning); }
.computer-modal-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.computer-modal-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: #05070a; }
.computer-modal-frame { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; border: 0; background: #05070a; }
body.computer-modal-open { overflow: hidden; }
/* The modal lives inside #plugin-main-pane, which is intentionally kept below
   the app shell header and sidebar (styles.css .plugin-overlay-pane). A local
   z-index cannot out-rank that ancestor stacking context, so the modal bar --
   identity, Take Control and Close -- painted underneath the topbar and the
   viewer dead-ended with no controls. Promote the pane only while the modal is
   open, the way the FireFlea and private-cloud hosts already do. */
#plugin-main-pane:has(.computer-modal:not(.hidden)) { z-index: 1000; }

/* Embedded viewer (?embed=1): the toolbar, help text and stop/record controls
   belong to the standalone chat viewer, not the controller page's modal. */
.browser-view-embed { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100dvh; padding: 0; gap: 0; background: #05070a; }
.browser-view-embed > .browser-view-help { order: 2; width: 100%; flex: 0 0 auto; margin: 0; padding: 5px 12px; border-top: 1px solid var(--stroke); }
.browser-view-embed > .browser-view-help p { margin: 0; font-size: 11px; line-height: 1.5; color: var(--text-soft); }
.browser-view-embed > [data-computer-screen] { order: 1; flex: 1 1 auto; min-height: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; touch-action: none; }

[data-browser-save-notice] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
[data-browser-save-notice] p { flex: 1 1 100%; margin: 0; overflow-wrap: anywhere; }
.website-connection-identity, .website-connection-identity > div { min-width: 0; }
.website-connection-title, .website-connection-meta { overflow-wrap: anywhere; }
.website-connection-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.website-history-row { flex-wrap: wrap; }
@media(max-width:640px) {
  .website-connection { flex-direction: column; align-items: stretch; }
  .website-connection-identity { flex: none; }
  .website-connection .website-actions { justify-content: flex-start; flex-wrap: wrap; }
  .website-connection .website-actions .button { min-height: 44px; }
}
