.neura-window {
  --neura-bg: var(--app-card, #fffef9); --neura-ink: var(--app-ink, #0b0c11);
  --neura-muted: var(--app-muted, #62636b); --neura-line: var(--app-line, #dedcd6);
  position:fixed; display:flex; flex-direction:column; box-sizing:border-box; overflow:hidden;
  background:var(--neura-bg); color:var(--neura-ink); border:1px solid var(--neura-line); border-radius:14px;
  box-shadow:0 20px 65px #0003; font:13px/1.45 'Public Sans',sans-serif; container-type:inline-size;
}
.dark-style .neura-window { --neura-bg:#000; box-shadow:0 24px 80px #0009; }
.neura-window[hidden], .neura-window-dock[hidden] { display:none!important; }
.neura-window.is-active { border-color:color-mix(in srgb,var(--matrix-color-b,#8f79d8) 65%,var(--neura-line)); }
.neura-window svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.neura-window button, .neura-window a.neura-button {
  display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:7px; border:1px solid transparent;
  border-radius:6px; background:color-mix(in srgb,var(--neura-ink) 7%,var(--neura-bg)); color:var(--neura-ink);
  font:inherit; cursor:pointer; text-decoration:none;
}
.neura-window button:hover, .neura-window a.neura-button:hover { background:color-mix(in srgb,var(--neura-ink) 13%,var(--neura-bg)); }
.neura-window :is(button,a):focus-visible { outline:2px solid var(--matrix-color-b,#8f79d8); outline-offset:2px; }
.neura-window button:disabled { opacity:.45; cursor:default; }
.neura-window-bar { display:flex; align-items:center; gap:8px; padding:5px 6px 5px 12px; min-height:34px; box-sizing:border-box; border-bottom:1px solid var(--neura-line); cursor:grab; user-select:none; touch-action:none; }
.neura-window-bar > strong { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12px; font-weight:600; }
.neura-window-controls { display:flex; gap:3px; }
.neura-window-controls button { width:27px; height:27px; padding:5px; }
.neura-window-controls .neura-window-close:hover { background:#b74646; color:white; }
.neura-window-body { display:flex; flex:1; flex-direction:column; min-height:0; min-width:0; overflow:hidden; }
.neura-window .neura-window-resize { position:absolute; right:0; bottom:0; padding:0; width:14px; height:14px; font-size:12px; color:var(--neura-muted); background:transparent; border:0; border-radius:0; cursor:nwse-resize; touch-action:none; }
.neura-window.is-maximized .neura-window-resize { display:none; }
.neura-window.is-moving iframe { pointer-events:none; }
.neura-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:8px 10px; border-bottom:1px solid var(--neura-line); }
.neura-toolbar .neura-context { flex:1; color:var(--neura-muted); font-size:11px; min-width:60px; }
.neura-terminal-panes { display:flex; flex:1; min-height:0; min-width:0; }
.neura-terminal-pane { display:flex; flex:1; flex-direction:column; min-width:0; min-height:0; overflow:hidden; }
.neura-terminal-pane + .neura-terminal-pane { border-left:1px solid var(--neura-line); }
.neura-pane-bar { display:flex; align-items:center; gap:6px; padding:5px 9px; color:var(--neura-muted); font-size:11px; }
.neura-pane-bar [data-status] { flex:1; min-width:0; overflow-wrap:anywhere; }
.neura-pane-bar button { padding:4px; }
.neura-pane-bar button svg { width:14px; height:14px; }
.neura-window-bar, .neura-toolbar, .neura-pane-bar, .neura-terminal-footer { flex-shrink:0; }
.neura-terminal-screen { position:relative; flex:1; min-width:0; min-height:0; padding:4px 7px 8px 10px; overflow:hidden; }
.neura-terminal-screen .xterm { height:100%; }
.neura-terminal-screen .xterm-viewport { background:var(--neura-bg)!important; }
.neura-terminal-footer { display:flex; align-items:center; gap:5px; padding:7px 12px 7px 8px; border-top:1px solid var(--neura-line); color:var(--neura-muted); font-size:11px; }
.neura-terminal-footer > span { flex:1; text-align:right; }
.neura-terminal-footer button { padding:5px 8px; min-height:28px; }
.neura-window-dock { position:fixed; bottom:12px; left:50%; transform:translateX(-50%); z-index:1089; display:flex; flex-wrap:wrap; gap:6px; max-width:calc(100vw - 100px); }
.neura-window-dock button { display:flex; align-items:center; gap:7px; padding:9px 12px; border:1px solid var(--app-line,#444); border-radius:9px; background:var(--app-card,#000); color:var(--app-ink,#fff); box-shadow:0 4px 18px #0003; cursor:pointer; }
.neura-window-dock svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; }
@container(max-width:500px) { .neura-terminal-footer > span { display:none; } .neura-toolbar button span { display:none; } }
@media(max-width:600px) { .neura-window { border-radius:0; } .neura-terminal-panes { flex-direction:column; } .neura-terminal-pane + .neura-terminal-pane { border-left:0; border-top:1px solid var(--neura-line); } .neura-window-controls button { width:32px; height:32px; } }
.neura-editor-window .neura-window-body { display:flex; flex-direction:column; min-height:0; }
.neura-editor-window iframe { border:0; width:100%; flex:1; min-height:0; background:var(--app-card,#fff); }
.neura-editor-status { padding:6px 12px; font-size:12px; color:var(--app-muted,#777); border-bottom:1px solid var(--app-line,#ddd); }
.neura-editor-window.is-moving iframe { pointer-events:none; }
