.no-hero #vcard {
  padding: unset;
  padding-bottom: 1rem;
}

#vcard .section-header {
  margin-bottom: 0.5rem;
}
#vcard .section-header .section-title {
  margin-bottom: 0;
}


.vcard-generator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  /* margin-top: 2rem; */
  align-items: start;
}

@media (max-width: 768px) {
  .vcard-generator {
    grid-template-columns: 1fr;
  }
}

.vcard-fields {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0; /* prevent grid child from overflowing its column */
}

.vcard-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vcard-group__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 0.25rem;
  margin-bottom: 0.1rem;
}

.vcard-field {
  display: flex;
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  overflow: hidden; /* prevent long values from pushing the row wider */
  transition: border-color var(--t);
}

.vcard-field:hover {
  border-color: var(--border-hover);
}

.vcard-field input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--cyan);
  flex-shrink: 0;
  cursor: pointer;
}

.vcard-field__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cyan);
  min-width: 9rem;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.vcard-field__value {
  color: var(--text-muted);
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .vcard-field__label {
    min-width: 7rem;
  }

  /* Let the value wrap to a second line so it isn't cramped */
  .vcard-field {
    flex-wrap: wrap;
  }

  .vcard-field__value {
    flex: 0 0 100%;
    white-space: normal;
    padding-left: calc(1.1rem + 0.75rem); /* indent under label text */
    margin-top: 0.1rem;
  }
}

@media (max-width: 768px) {
  #download-vcard,
  #vcard-preview {
    display: none;
  }
}


.vcard-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.vcard-qr {
  background: #fff;
  padding: 0.5rem;
  border-radius: var(--r);
  line-height: 0;
}

/* qrcodejs renders a fixed-size canvas — cap it so it never exceeds its container */
.vcard-qr canvas,
.vcard-qr img {
  max-width: 100%;
  height: auto;
}

.vcard-preview {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  font-family: monospace;
  line-height: 1.5;
}

.btn--qr-this {
  background: transparent;
  color: var(--text);
  border-color: rgba(var(--cyan-rgb), 0.35);
  font-size: 0.6rem;
  min-height: unset;
  padding: 0.1rem 0.5rem;
  margin-left: 5px;
}
