.passfoto-hero .hero {
  min-height: clamp(520px, 75vh, 860px);
}

.passfoto.section {
  width: min(calc(100% - 30px), 1100px);
  padding-block: clamp(32px, 6vw, 72px);
  scroll-margin-top: 105px;
  color: var(--text-dark);
}

.passfoto [hidden] {
  display: none !important;
}

.passfoto h2 {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.passfoto p {
  margin: 0;
}

.passfoto .passfoto-note,
.passfoto .report > p,
.passfoto small {
  color: var(--text-dark);
}

.passfoto .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 3vw, 28px);
}

.passfoto .panel {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  background: #fff;
}

.passfoto .drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 28px 14px;
  min-height: 166px;
  text-align: center;
  border: 1px dashed #a48b65;
  background: var(--soft);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.passfoto .drop:focus-within,
.passfoto .drop.dragging {
  outline: 2px solid #947850;
  outline-offset: 2px;
}

.passfoto .drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.passfoto .upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--accent);
  font-size: 1.35rem;
}

.passfoto .select-label {
  display: block;
  font-weight: 650;
  margin: 20px 0 6px;
}

.passfoto select,
.passfoto button,
.passfoto .download {
  font: inherit;
  min-height: 46px;
}

.passfoto select {
  width: 100%;
  border: 1px solid #bdbdbd;
  padding: 8px;
  background: #fff;
  color: inherit;
}

.passfoto button {
  width: 100%;
  margin-top: 14px;
}

.passfoto button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.passfoto #status {
  margin-top: 12px;
}

.passfoto #status:empty {
  display: none;
}

.passfoto .photo-frame {
  position: relative;
  display: grid;
  place-items: center;
  max-width: 220px;
  aspect-ratio: 35 / 45;
  margin: auto;
  overflow: hidden;
  background: var(--soft);
  color: var(--text-dark);
}

.passfoto .photo-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.passfoto .download-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.passfoto .download {
  display: block;
  text-decoration: none;
  text-align: center;
  margin-top: 16px;
}

.passfoto .download[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.passfoto #checks {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.passfoto #checks li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.passfoto #checks li p {
  grid-column: 1 / -1;
}

.passfoto .ok,
.passfoto .warn {
  font-size: 0.87rem;
  padding: 1px 8px;
}

.passfoto .ok {
  color: #155c46;
  background: #e5f4eb;
}

.passfoto .warn {
  color: #724818;
  background: #ffefce;
}

.passfoto .passfoto-note {
  margin-top: 24px;
  font-size: 0.91rem;
}

.passfoto .passfoto-note a {
  color: var(--text-dark);
  display: inline-block;
  margin-top: 7px;
}

.passfoto .privacy {
  margin-top: 12px;
  font-size: 0.87rem;
  color: var(--text-dark);
}

.passfoto #preview-caption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.87rem;
  color: var(--text-dark);
}

.passfoto fieldset {
  border: 0;
  padding: 0;
  margin: 22px 0 0;
}

.passfoto legend,
.passfoto h3 {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 8px;
}

.passfoto fieldset label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}

.passfoto input[type="radio"] {
  accent-color: var(--text-dark);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.passfoto input[type="color"] {
  width: 100%;
  height: 46px;
  padding: 4px;
  border: 1px solid #bdbdbd;
  background: #fff;
}

.passfoto .notice,
.passfoto .requirements {
  margin-top: 12px;
  padding: 14px;
  background: var(--soft);
  font-size: 0.9rem;
}

.passfoto .notice {
  background: #ffefce;
}

.passfoto a[href]:not(.download) {
  color: var(--text-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.passfoto #requirement-date {
  margin: 10px 0 4px;
  color: var(--text-dark);
  font-size: 0.83rem;
}

body.square .passfoto .photo-frame {
  aspect-ratio: 1;
}

@media (min-width: 651px) {
  .passfoto .layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .passfoto .photo-form {
    grid-column: 1;
    grid-row: 1;
  }

  .passfoto .preview {
    grid-column: 2;
    grid-row: 1 / 3;
    position: sticky;
    top: 96px;
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
  }

  .passfoto .report {
    grid-column: 1;
    grid-row: 2;
  }
}

.passfoto .identity-notice {
  margin: 0 0 20px;
}

.passfoto .identity-notice h4 {
  margin: 0 0 6px;
}

.passfoto .button:focus-visible,
.passfoto select:focus-visible,
.passfoto input:focus-visible {
  outline: 2px solid #947850;
  outline-offset: 2px;
}

.passfoto button:disabled:hover {
  transform: none;
}

.passfoto .requirements,
.passfoto .passfoto-note {
  overflow-wrap: anywhere;
}
