/* DAIstack One desktop: app windows with Mac-style window buttons, resize edges and a dock */
.desk{position:fixed;inset:0;pointer-events:none;z-index:50}
.win{position:absolute;pointer-events:auto;display:flex;flex-direction:column;background:#FFFFFF;border-radius:12px;overflow:hidden;
  box-shadow:0 0 0 1px rgba(11,31,58,.14),0 18px 50px rgba(11,31,58,.22),0 4px 14px rgba(11,31,58,.10);transition:box-shadow .15s}
.win.focused{box-shadow:0 0 0 1px rgba(11,31,58,.22),0 28px 70px rgba(11,31,58,.32),0 6px 18px rgba(11,31,58,.14)}
.win.full{left:0!important;top:0!important;width:100vw!important;height:calc(100vh - var(--dock-h,0px))!important;border-radius:0}
.win[hidden]{display:none}
.win-head{height:40px;flex:none;display:flex;align-items:center;gap:10px;padding:0 12px;background:linear-gradient(#F7F8FA,#ECEFF3);border-bottom:1px solid #DCE1E8;cursor:grab;user-select:none;-webkit-user-select:none;touch-action:none}
.win.full .win-head{cursor:default}
.win:not(.focused) .win-head{background:#F4F5F7}
.tls{display:flex;gap:8px;flex:none}
.tl{width:13px;height:13px;border-radius:50%;border:0;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.18)}
.tl i{font-style:normal;font-size:10px;line-height:1;font-weight:800;color:rgba(0,0,0,.55);opacity:0;font-family:-apple-system,system-ui,sans-serif}
.tls:hover .tl i,.tl:focus-visible i{opacity:1}
.tl:focus-visible{outline:2px solid #0B1F3A;outline-offset:2px}
.tl.red{background:#FF5F57}.tl.yellow{background:#FEBC2E}.tl.green{background:#28C840}
.tl.green i{font-size:9px}
.win:not(.focused) .tls:not(:hover) .tl{background:#D3D6DB}
.win-title{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;font-size:13.5px;font-weight:700;color:#0B1F3A;min-width:0;margin-right:30px}
.win-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.win-ic{width:20px;height:20px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex:none}
.win-pop{flex:none;width:26px;height:26px;border-radius:7px;display:flex;align-items:center;justify-content:center;margin-left:-30px}
.win-pop svg{stroke:#5B6B82}
.win-pop:hover{background:#DDE2E9}
.win-body{flex:1;min-height:0;position:relative;background:#FFFFFF}
.win-body iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
body.desk-dragging .win-body iframe{pointer-events:none}
body.desk-dragging{user-select:none;-webkit-user-select:none}

/* resize edges and corners */
.rz{position:absolute;z-index:2;touch-action:none}
.rz-n{top:-3px;left:12px;right:12px;height:9px;cursor:ns-resize}
.rz-s{bottom:-3px;left:12px;right:12px;height:10px;cursor:ns-resize}
.rz-e{right:-3px;top:12px;bottom:12px;width:10px;cursor:ew-resize}
.rz-w{left:-3px;top:12px;bottom:12px;width:10px;cursor:ew-resize}
.rz-ne{top:-3px;right:-3px;width:18px;height:18px;cursor:nesw-resize}
.rz-sw{bottom:-3px;left:-3px;width:18px;height:18px;cursor:nesw-resize}
.rz-nw{top:-3px;left:-3px;width:18px;height:18px;cursor:nwse-resize}
.rz-se{bottom:-3px;right:-3px;width:18px;height:18px;cursor:nwse-resize}
.win.full .rz{display:none}

/* dock with the open apps */
body.has-dock{--dock-h:72px;padding-bottom:var(--dock-h)}
.dock{position:fixed;left:50%;bottom:10px;transform:translateX(-50%);z-index:60;display:flex;gap:6px;padding:7px;border-radius:18px;
  background:rgba(255,255,255,.72);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);
  box-shadow:0 0 0 1px rgba(11,31,58,.12),0 10px 30px rgba(11,31,58,.2)}
.dock[hidden]{display:none}
.dk{position:relative;border:0;background:transparent;padding:0;cursor:pointer;border-radius:12px}
.dk-ic{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;transition:transform .15s}
.dk:hover .dk-ic{transform:translateY(-3px)}
.dk::after{content:"";position:absolute;left:50%;bottom:-5px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#0B1F3A;opacity:.55}
.dk.front::after{opacity:1}
.dk-name{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);background:#0B1F3A;color:#FFFFFF;font-size:12px;font-weight:700;padding:4px 9px;border-radius:7px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s}
.dk:hover .dk-name,.dk:focus-visible .dk-name{opacity:1}
.dk:focus-visible{outline:2px solid #0B1F3A;outline-offset:2px}

/* phones: windows always fill the screen */
@media (max-width:759px){.win{border-radius:0}.win-head{cursor:default}.rz{display:none}}
@media (prefers-reduced-motion:reduce){.dk-ic,.win{transition:none}}

