.vacard {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.vacard.hidden { display: none; }

.vacard__panel {
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #f8fafc;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.vacard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vacard__head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #1e2638;
}

button.vacard__x.portal-skip-enhance {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e2638;
  box-shadow: none;
  cursor: pointer;
}

button.vacard__x.portal-skip-enhance::before,
button.vacard__x.portal-skip-enhance::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

button.vacard__x.portal-skip-enhance::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

button.vacard__x.portal-skip-enhance::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

button.vacard__x.portal-skip-enhance:hover {
  background: #cbd5e1;
}

.vacard__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #334155;
}

.vacard__field input {
  font: inherit;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

.vacard__switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.vacard__switch button,
.vacard__actions button,
.vacard__find {
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.vacard__switch button {
  background: #e2e8f0;
  color: #334155;
}

.vacard__switch button.is-on {
  background: #0f766e;
  color: #fff;
}

.vacard__stage {
  background: transparent;
}

.vacard__stage canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  touch-action: pan-y;
  background: #fff;
}

.vacard__toast {
  margin: 10px 0 0;
  color: #b45309;
  font-weight: 700;
}

.vacard__toast.is-ok { color: #0f766e; }

.vacard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.vacard__actions button,
.vacard__find {
  background: #0f766e;
  color: #fff;
}

.vacard__actions button.vacard__ghost,
.vacard__find.vacard__ghost {
  background: #fff;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.vacard__actions button:disabled,
.vacard__find:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.vacard__find { width: 100%; margin-top: 12px; }

.vagent-actions {
  display: flex;
  gap: 10px;
}

.vagent-actions button.vsub-pay {
  width: auto;
  flex: 1 1 0;
  margin-top: 0;
}

@media (max-width: 520px) {
  .vagent-actions { flex-direction: column; }
}
