:root {
  --sw-ink: #172336;
  --sw-muted: #667589;
  --sw-line: #dce7ea;
  --sw-surface: #ffffff;
  --sw-soft: #f6fafb;
  --sw-teal: #078491;
  --sw-teal-dark: #056a74;
  --sw-purple: #5a2675;
  --sw-danger: #d72638;
  --sw-shadow: 0 26px 76px rgba(15, 23, 42, .28);
}

.sw-layer,
.sw-dock {
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.sw-layer {
  position: fixed;
  inset: 0;
  z-index: 1088;
  pointer-events: none;
}

.sw-window {
  position: fixed;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 52px));
  height: min(720px, calc(100vh - 92px));
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  box-shadow: var(--sw-shadow);
  overflow: hidden;
  pointer-events: auto;
}

.sw-window.is-compact {
  width: min(520px, calc(100vw - 52px));
}

.sw-titlebar {
  min-height: 56px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px 9px 12px;
  background: linear-gradient(135deg, var(--sw-purple), #743991);
  color: #ffffff;
  cursor: grab;
  user-select: none;
}

.sw-titlebar:active {
  cursor: grabbing;
}

.sw-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.sw-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.sw-title strong,
.sw-title span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sw-title strong {
  font-size: 15px;
  line-height: 1.15;
}

.sw-title span {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 650;
}

.sw-actions {
  display: inline-flex;
  gap: 6px;
}

.sw-action {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1;
}

.sw-action:hover {
  background: rgba(255, 255, 255, .24);
}

.sw-action.close:hover {
  background: var(--sw-danger);
}

.sw-body {
  min-height: 0;
  position: relative;
  background: #f8fbfc;
}

.sw-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #ffffff;
}

.sw-fallback {
  position: absolute;
  inset: auto 16px 16px;
  padding: 10px 12px;
  border: 1px solid #cbdce1;
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  color: var(--sw-muted);
  font-size: 12px;
  line-height: 1.35;
}

.sw-fallback a {
  color: var(--sw-teal-dark);
  font-weight: 800;
}

.sw-dock {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 1090;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.sw-bubble {
  width: 74px;
  min-height: 62px;
  border: 1px solid #cbdce1;
  border-radius: 12px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, .96);
  color: var(--sw-teal-dark);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .16);
  cursor: pointer;
  pointer-events: auto;
}

.sw-bubble:hover {
  border-color: var(--sw-teal);
  transform: translateY(-1px);
}

.sw-bubble span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #dff7f5;
  color: var(--sw-teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.sw-bubble small {
  width: 62px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 800;
}

.sw-bubble.is-minimized span {
  background: #fff0d2;
  color: #9a5a00;
}

@media (max-width: 760px) {
  .sw-layer {
    inset: auto 0 0;
  }

  .sw-window,
  .sw-window.is-compact {
    left: 8px !important;
    right: 8px;
    top: auto !important;
    bottom: 86px;
    width: auto;
    height: min(76vh, 680px);
    border-radius: 14px 14px 10px 10px;
  }

  .sw-titlebar {
    min-height: 52px;
  }

  .sw-dock {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(68px, 1fr);
    overflow-x: auto;
  }

  .sw-bubble {
    width: 100%;
  }
}

@media print {
  .sw-layer,
  .sw-dock {
    display: none !important;
  }
}
