/* GI 275 six-pack — floating, draggable panel (separate from core analyzer) */
.sixpack-toggle {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line, #d0d7de);
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #1c2128);
  cursor: pointer;
  flex-shrink: 0;
}
.sixpack-toggle:hover { background: #eef4f8; }
.sixpack-toggle.is-on {
  background: #0b7a3e;
  border-color: #0b7a3e;
  color: #fff;
}

.sixpack-host {
  position: fixed;
  z-index: 90;
  left: 24px;
  top: 72px;
  width: min(720px, calc(100vw - 24px));
  max-width: calc(100vw - 16px);
  pointer-events: none;
}
.sixpack-host[hidden] { display: none !important; }

.sixpack-panel {
  pointer-events: auto;
  width: 100%;
  background: linear-gradient(165deg, #1a1f2a 0%, #0c1018 55%, #070a10 100%);
  color: #e2e8f0;
  border: 1px solid #3f4b5b;
  border-radius: 14px;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  min-width: 560px;
  min-height: 400px;
  max-width: 96vw;
  max-height: 92vh;
}

.sixpack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  background: linear-gradient(180deg, #2a3342, #171d28);
  border-bottom: 1px solid #3d4a5c;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.sixpack-head.is-dragging { cursor: grabbing; }
.sixpack-head h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9fb0c5;
  white-space: nowrap;
}
.sixpack-drag-hint {
  font-size: 0.58rem;
  color: #64748b;
  white-space: nowrap;
}
.sixpack-meta {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.62rem;
  color: #94a3b8;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sixpack-close {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border: 1px solid #4b5a6e;
  border-radius: 6px;
  background: #243041;
  color: #e2e8f0;
  cursor: pointer;
}
.sixpack-close:hover { background: #334155; }

.sixpack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(132px, 0.95fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem;
  flex: 1;
  min-height: 280px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(56, 100, 160, 0.12), transparent 55%),
    #05070c;
}
.sixpack-cell {
  position: relative;
  background: radial-gradient(circle at 50% 38%, #1b2433 0%, #0a0e16 70%);
  border: 1px solid #2a3545;
  border-radius: 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 -18px 28px rgba(0, 0, 0, 0.35);
}
.sixpack-cell canvas {
  width: 100%;
  height: 100%;
  min-height: 148px;
  display: block;
  flex: 1;
}
.sixpack-cell.is-temps {
  grid-row: 1 / -1;
  grid-column: 4;
  background: #0a0e14;
  border-color: #1e293b;
}
.sixpack-cell.is-pfd {
  background: #020617;
  border-color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.15), 0 0 18px rgba(14, 116, 144, 0.18);
}
.sixpack-foot {
  padding: 0.3rem 0.65rem 0.45rem;
  font-size: 0.58rem;
  color: #64748b;
  border-top: 1px solid #243041;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .sixpack-host {
    left: 8px;
    right: 8px;
    width: auto;
    max-height: none;
  }
  .sixpack-panel {
    min-width: 0;
    max-height: min(88vh, 88dvh);
    resize: vertical;
    overflow: hidden;
  }
  .sixpack-grid {
    grid-template-columns: 1fr 1fr;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sixpack-cell.is-temps {
    grid-row: auto;
    grid-column: 1 / -1;
    min-height: 140px;
  }
  .sixpack-cell.is-pfd { grid-column: 1 / -1; min-height: 180px; }
}
