.pbx-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgb(7 20 18 / 72%);
}

.pbx-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid var(--border, #d7dedb);
  border-radius: 20px;
  background: var(--surface, #fff);
  color: var(--ink, #17211f);
  box-shadow: 0 24px 70px rgb(0 0 0 / 28%);
}

.pbx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 16px;
}

.pbx-modal-header h2,
.pbx-review-heading h3 {
  margin: 2px 0 0;
}

.pbx-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 24px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-muted, #eef3f1);
}

.pbx-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pbx-tabs button[aria-selected="true"] {
  background: var(--surface, #fff);
  box-shadow: 0 1px 4px rgb(0 0 0 / 12%);
}

.pbx-form {
  padding: 22px 24px 24px;
}

.pbx-help {
  margin: 0;
  color: var(--muted, #5d6c68);
  font-size: 0.92rem;
  line-height: 1.45;
}

.pbx-callout,
.pbx-warning {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-muted, #eef3f1);
}

.pbx-warning {
  border: 1px solid #d7a84b;
  background: #fff7df;
}

.pbx-warning ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.pbx-file-picker {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 2px dashed var(--border, #b8c7c2);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
}

.pbx-file-picker span {
  font-weight: 800;
}

.pbx-photo-preview-wrap {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.pbx-photo-preview-wrap img:not([src]) {
  display: none;
}

.pbx-photo-preview-wrap img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border, #d7dedb);
}

.pbx-photo-preview-wrap span,
.pbx-status {
  color: var(--muted, #5d6c68);
  font-size: 0.92rem;
}

.pbx-status.error {
  color: #a72b2b;
  font-weight: 700;
}

.pbx-review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pbx-confidence {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-muted, #eef3f1);
  font-size: 0.85rem;
  font-weight: 800;
}

.pbx-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px;
}

.pbx-check input {
  width: auto !important;
  margin-top: 3px;
}

@media (max-width: 640px) {
  .pbx-backdrop {
    align-items: end;
    padding: 0;
  }

  .pbx-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }

  .pbx-modal-header,
  .pbx-form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .pbx-tabs {
    margin-left: 18px;
    margin-right: 18px;
  }

  .pbx-review-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Decorative hero elements must never intercept the primary create action. */
.hero::after,
.hero-board {
  pointer-events: none;
}

.hero > div:first-child {
  position: relative;
  z-index: 2;
}
