.pvca-intro,
.pvca-module {
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.pvca-intro p,
.pvca-lead {
  margin: 0;
  color: var(--muted);
}

.pvca-mode-tabs {
  display: inline-flex;
  gap: 0.4rem;
}

.tab-btn {
  border: 1px solid rgba(12, 29, 44, 0.16);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.tab-btn.is-active {
  border-color: var(--accent);
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-weight: 600;
}

.pvca-canvas-wrap {
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.pvca-canvas {
  min-width: 700px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0.65rem;
}

.pvca-box {
  min-height: 86px;
  border-radius: 14px;
  border: 1px solid rgba(12, 29, 44, 0.2);
  background:
    radial-gradient(10rem 7rem at 0% 0%, rgba(162, 217, 205, 0.2), transparent 64%),
    #fff;
  padding: 0.6rem 0.7rem;
  text-align: center;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-size: 0.96rem;
  line-height: 1.28;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.pvca-box:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 128, 120, 0.5);
  box-shadow: 0 8px 20px rgba(21, 43, 62, 0.12);
}

.pvca-box.is-missing {
  opacity: 0.42;
  transform: scale(0.96);
  filter: saturate(0.72);
  pointer-events: none;
}

.pvca-problem {
  min-height: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 29, 44, 0.14);
  background: var(--surface-soft);
  padding: 0.58rem 0.7rem;
  color: var(--muted);
}

.pvca-problem[data-status="danger"] {
  border-color: rgba(169, 53, 42, 0.45);
  background: rgba(169, 53, 42, 0.08);
  color: #7b2c24;
  font-weight: 600;
}

.pvca-reset-wrap {
  display: flex;
  justify-content: flex-end;
}

.pvca-modal[hidden] {
  display: none;
}

.pvca-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.pvca-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 29, 36, 0.45);
  backdrop-filter: blur(2px);
}

.pvca-modal-card {
  position: relative;
  width: min(560px, calc(100% - 1.6rem));
  margin: 13vh auto 0;
  border: 1px solid rgba(12, 29, 44, 0.14);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 32, 46, 0.22);
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
}

.pvca-modal-card p {
  margin: 0;
  color: var(--muted);
}

.pvca-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (max-width: 760px) {
  .pvca-canvas {
    min-width: 620px;
  }
}
