#windows { position: absolute; inset: 26px 0 0 0; pointer-events: none; }
.win {
  position: absolute; pointer-events: auto;
  background: var(--bg-window-solid);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  display: flex; flex-direction: column;
  min-width: 320px; min-height: 220px;
  overflow: hidden;
  transition: box-shadow 0.2s, opacity 0.18s, transform 0.18s;
}
.win.opening { animation: win-open 0.2s ease-out; }
@keyframes win-open {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.win.minimizing { transform: scale(0.05) translateY(50vh); opacity: 0; }
.win.fullscreen { top: 26px !important; left: 0 !important; width: 100vw !important; height: calc(100vh - 26px) !important; border-radius: 0; }

.win-titlebar {
  height: 28px; flex: 0 0 28px;
  background: var(--bg-titlebar);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center;
  padding: 0 10px; gap: 8px;
  cursor: grab; position: relative;
}
.win-titlebar:active { cursor: grabbing; }
.win-traffic { display: flex; gap: 8px; align-items: center; }
.tl {
  width: 12px; height: 12px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; color: rgba(0,0,0,0.55);
  cursor: pointer;
}
.tl span { opacity: 0; transition: opacity 0.1s; line-height: 1; font-weight: 700; }
.win-traffic:hover .tl span { opacity: 1; }
.tl.close { background: var(--traffic-close); }
.tl.min   { background: var(--traffic-min); }
.tl.max   { background: var(--traffic-max); }
.win:not(.focused) .tl { background: rgba(127,127,127,0.45); }

.win-title {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--text);
  pointer-events: none; line-height: 28px;
}
.win:not(.focused) .win-title { opacity: 0.55; }
.win-content { flex: 1; overflow: auto; position: relative; }

.win-resize {
  position: absolute; z-index: 5;
}
.win-resize.r-r  { top: 0; right: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.win-resize.r-l  { top: 0; left: 0;  bottom: 0; width: 6px; cursor: ew-resize; }
.win-resize.r-b  { bottom: 0; left: 0; right: 0; height: 6px; cursor: ns-resize; }
.win-resize.r-t  { top: 0; left: 0; right: 0; height: 6px; cursor: ns-resize; }
.win-resize.r-br { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.win-resize.r-bl { left: 0; bottom: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.win-resize.r-tr { right: 0; top: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.win-resize.r-tl { left: 0; top: 0; width: 14px; height: 14px; cursor: nwse-resize; }
