.prune-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 18px;
  background: #fff;
  color: var(--ink);
}

.prune-dialog::backdrop { background: #fff; }

.prune-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1500px;
  margin: auto;
}

.prune-header h2 { margin: 0; font-size: 28px; }
.prune-help, .prune-gesture { text-align: center; color: var(--muted); font-size: 13px; }

.wheel-tier-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 8px;
  color: var(--muted);
  font-size: 13px;
}

.wheel-tier-control select {
  border: 1px solid rgba(64, 95, 78, .28);
  border-radius: 999px;
  padding: 7px 30px 7px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.prune-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-width: 1500px;
  height: calc(100dvh - 190px);
  margin: auto;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  grid-auto-rows: minmax(0, 1fr);
}

.prune-face {
  position: relative;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #161719;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
}

.prune-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.prune-face svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.prune-face rect {
  fill: rgba(255, 59, 48, .08);
  stroke: #ff3b30;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.prune-face.rejected { opacity: .18; transform: scale(.92); }
.prune-face.assigned img, .prune-face.assigned svg { opacity: .48; }
.prune-face.syncing::after {
  position: absolute;
  z-index: 4;
  top: 7px;
  right: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(31, 34, 32, .86);
  content: "Saving";
  font: 700 10px/1.2 system-ui, sans-serif;
}

.prune-assigned-name {
  position: absolute;
  z-index: 2;
  inset: 50% 8px auto;
  transform: translateY(-50%);
  color: #fff;
  font: 800 clamp(14px, 1.5vw, 22px)/1.1 system-ui, sans-serif;
  text-align: center;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
  pointer-events: none;
}

.prune-badges {
  position: absolute;
  z-index: 3;
  left: 7px;
  right: 7px;
  bottom: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}

.prune-badge {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(31, 34, 32, .86);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
  font: 700 10px/1.2 system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prune-badge.active { background: rgba(38, 105, 69, .92); }
.prune-badge.passive { background: rgba(69, 78, 72, .84); }
.prune-badge.warning { background: rgba(176, 71, 35, .94); }

.prune-next {
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px solid rgba(64, 95, 78, .3);
  padding: 16px;
  background: #e9eee6;
  color: var(--sage-dark);
  cursor: pointer;
  font: 700 13px/1.2 inherit;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  text-align: center;
}

.prune-next:hover { background: #dfe9df; }
.prune-next-arrow { font-size: 34px; line-height: 1; }

.people-wheel {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
  opacity: .94;
  transition: opacity 140ms ease-out;
}

.people-wheel.pending { opacity: .38; }

@media (max-width: 700px) {
  .prune-dialog { padding: 10px; }
  .prune-grid { grid-template-columns: repeat(3, 1fr); height: calc(100dvh - 180px); }
  .prune-header h2 { font-size: 22px; }
  .prune-next { padding: 8px; font-size: 11px; }
  .prune-next-arrow { font-size: 26px; }
}
