/* ---------- WINDOWS ---------- */
.win {
  position: absolute; min-width: 300px; min-height: 180px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4);
  overflow: hidden; animation: pop .16s ease-out;
}
.win.focused { border-color: #2f4a73; }
.win.min { display: none; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.titlebar {
  height: 36px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  cursor: grab; user-select: none; touch-action: none;
}
.titlebar:active { cursor: grabbing; }
.titlebar .ti { width: 16px; height: 16px; flex: none; }
.titlebar .tt { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbtn { width: 26px; height: 24px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); }
.wbtn:hover { background: #22324d; color: var(--fg); }
.wbtn.x:hover { background: var(--danger); color: #fff; }
.wbtn svg { width: 12px; height: 12px; }
.wbody { flex: 1; min-height: 0; overflow: auto; }
.resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; }
