/* Shared chrome only: each tool keeps its own content and interaction model. */
.cmd-layer:has([data-rw-kind]) { display:contents; }
[data-rw-ready] { position:fixed!important;inset:auto!important;left:var(--rw-left)!important;top:var(--rw-top)!important;width:var(--rw-width)!important;height:var(--rw-height)!important;z-index:var(--rw-z)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;resize:none!important;box-sizing:border-box;border:1px solid #3b4852!important;border-radius:10px!important;box-shadow:0 12px 40px #0005!important;overflow:hidden; }
[data-rw-ready].rw-active { border-color:#58748a!important;box-shadow:0 22px 65px #0008!important; }
[data-rw-ready].rw-minimized,[data-rw-dismissed] { display:none!important; }
[data-rw-ready] [data-rw-bar] { display:flex!important;align-items:center!important;gap:8px!important;min-height:40px;flex:0 0 40px!important;padding:0 14px 0 13px!important;background:#202a33!important;border-bottom:1px solid #ffffff0c;cursor:grab;user-select:none;touch-action:none;color:#cbd5de;font:12px/1.4 'Segoe UI',system-ui,sans-serif; }
[data-rw-ready].rw-active [data-rw-bar] { background:#25333f!important; }
[data-rw-ready] [data-rw-title-text] { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 12px/1.4 'Segoe UI',system-ui,sans-serif;color:#e2eaf0; }
[data-rw-ready] [data-rw-bar]>.oi,[data-rw-ready] [data-rw-bar]>i { flex-shrink:0;color:#88b9d7;font-size:13px; }
[data-rw-controls] { display:flex;align-items:center;gap:2px;flex-shrink:0; }
/* Close remains owned by each tool; match the group's 2px gap across that boundary. */
[data-rw-ready] [data-rw-controls] { margin-right:-6px; }
[data-rw-ready] [data-rw-controls]>button,[data-rw-ready] [data-rw-bar]>button { display:grid;place-items:center;align-self:center;box-sizing:border-box;flex-shrink:0;width:30px!important;height:28px!important;min-height:28px!important;padding:5px!important;margin:0;border:0!important;border-radius:5px!important;background:transparent!important;color:#acbcc9!important;line-height:1!important;cursor:pointer; }
[data-rw-ready] [data-rw-controls]>button:hover,[data-rw-ready] [data-rw-bar]>button:hover { background:#ffffff12!important;color:#fff!important; }
[data-rw-ready] [data-rw-bar]>button[data-rw-close]:hover,[data-rw-ready] .viewer-files-close:hover { background:#91434c!important; }
[data-rw-ready] [data-rw-controls] svg,[data-rw-ready] .rw-close-icon,.rw-dock svg { display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0; }
[data-rw-ready] [data-rw-bar]>.cmd-meta { font:10px/1.4 system-ui;color:#95a8b6;white-space:nowrap; }
[data-rw-ready] button:focus-visible,.rw-dock button:focus-visible { outline:2px solid #91cdeb!important;outline-offset:-2px; }
.rw-terminal-tools { display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;background:#141e26;padding:6px 10px;border-bottom:1px solid #2b3944; }
.rw-terminal-tools .cmd-shell-switch { border-radius:5px; }.rw-terminal-tools .cmd-shell-btn { font:11px system-ui;padding:3px 10px; }
.rw-terminal-tools .cmd-clipboard-tools { margin-left:auto; }.rw-terminal-tools .cmd-clipboard-tools button { font-size:11px; }
.rw-resize { position:absolute;z-index:8;touch-action:none; }
.rw-resize-n,.rw-resize-s { left:10px;right:10px;height:5px;cursor:ns-resize; }.rw-resize-n { top:0; }.rw-resize-s { bottom:0; }
.rw-resize-e,.rw-resize-w { top:10px;bottom:10px;width:5px;cursor:ew-resize; }.rw-resize-e { right:0; }.rw-resize-w { left:0; }
.rw-resize-ne,.rw-resize-nw,.rw-resize-se,.rw-resize-sw { width:11px;height:11px; }.rw-resize-ne { top:0;right:0;cursor:nesw-resize; }.rw-resize-nw { top:0;left:0;cursor:nwse-resize; }.rw-resize-se { bottom:0;right:0;cursor:nwse-resize; }.rw-resize-sw { bottom:0;left:0;cursor:nesw-resize; }
.rw-resize-se::after { content:'';position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-right:1px solid #7891a2;border-bottom:1px solid #7891a2; }
.rw-resize:focus-visible { outline:2px solid #91cdeb;outline-offset:-2px; }.rw-maximized .rw-resize { display:none; }.rw-interacting iframe { pointer-events:none!important; }
.rw-dock { position:fixed;bottom:14px;left:50%;transform:translateX(-50%);z-index:1030;display:flex;align-items:center;gap:5px;padding:6px;max-width:calc(100vw - 280px);min-height:46px;overflow-x:auto;overscroll-behavior:contain;scrollbar-width:thin;border:1px solid #415362;border-radius:11px;background:#1b2934;box-shadow:0 12px 40px #0007;color:#dde8ef;font:12px/1.35 'Segoe UI',system-ui,sans-serif; }
.rw-dock[hidden],.rw-dock button[hidden] { display:none!important; }
.rw-dock button { display:flex;align-items:center;justify-content:center;gap:8px;min-height:32px;max-width:210px;flex-shrink:0;padding:6px 11px;position:relative;white-space:nowrap;border:1px solid transparent;border-radius:6px;background:#ffffff04;color:#bbcbd7;font:inherit;cursor:pointer; }
.rw-dock button:hover { background:#ffffff0c;color:#fff; }.rw-dock button[aria-pressed=true] { background:#334b5e;border-color:#58788f;color:#f0f7fc; }
.rw-dock-tool::after { content:'';position:absolute;bottom:1px;width:14px;height:2px;border-radius:2px;background:#839aa9; }.rw-dock-tool[aria-pressed=true]::after { background:#96d6f5;width:22px; }.rw-dock-tool.rw-dock-minimized::after { width:5px;background:#667e90; }
.rw-dock-tool span { overflow:hidden;text-overflow:ellipsis;max-width:155px; }.rw-dock button.rw-dock-reset { border-left:1px solid #40515f;border-radius:0 5px 5px 0;max-width:34px;width:34px;padding:7px; }
@media(max-width:600px) { .rw-dock { bottom:68px;max-width:calc(100vw - 24px); }.rw-dock button { max-width:155px;padding:6px 8px; }.rw-dock-tool span { max-width:108px; }[data-rw-ready] [data-rw-bar]>.cmd-meta { display:none; } }
@media(prefers-reduced-motion:no-preference) { .rw-dock button { transition:background .12s ease,border-color .12s ease; } }
