/* 摘自小灶 OS，MIT 许可及来源见同目录 LICENSE 和项目 README。 */
.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 14px 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  z-index: 900;
}
.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 0;
}
.dock-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease;
}
.dock-item:hover .dock-icon { transform: translateY(-8px) scale(1.12); }
.dock-item .tip {
  position: absolute;
  bottom: calc(100% + 10px);
  background: rgba(12, 8, 20, 0.8);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.dock-item:hover .tip { opacity: 1; }
.dock-item .dot {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  margin: 0;
  opacity: 0;
}
.dock-item.running .dot { opacity: 1; }
.dock-sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, 0.25); margin: 4px 2px; }

.window {
  position: absolute;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100% - 80px);
  display: flex;
  flex-direction: column;
  background: var(--os-win);
  backdrop-filter: blur(24px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 80px rgba(8, 4, 18, 0.5);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96) translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
}
.window.open { opacity: 1; transform: scale(1) translateY(0); }
.window.max { border-radius: 0; max-height: 100%; }

/* 边缘缩放热区（不可见，macOS 风格无角标） */
.rz { position: absolute; z-index: 6; }
.rz-l  { left: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-r  { right: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-b  { bottom: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rz-bl { left: -5px; bottom: -5px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-br { right: -5px; bottom: -5px; width: 14px; height: 14px; cursor: nwse-resize; }
.window.max .rz { display: none; }
.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--os-line);
  cursor: grab;
  user-select: none;
  background: rgba(255, 255, 255, 0.5);
  flex: none;
}
.win-bar:active { cursor: grabbing; }
.traffic { display: flex; gap: 8px; }
.traffic button {
  position: relative;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0;
}
.traffic button::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: rgba(0, 0, 0, 0.55);
  opacity: 0;
}
.t-close::after { content: "×"; }
.t-min::after { content: "−"; }
.t-max::after { content: "+"; }
.traffic:hover button::after { opacity: 1; }
.t-close { background: #ff5f57; }
.t-min   { background: #febc2e; }
.t-max   { background: #28c840; }
.win-title {
  flex: 1;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--os-ink-2);
  margin-right: 55px; /* 平衡红绿灯宽度 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-body {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

