:root {
  color-scheme: light;
  font-family: ui-rounded, "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  color: #1e2940;
  background: #f8f2e8;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgb(255 214 149 / 38%), transparent 30rem),
    radial-gradient(circle at 88% 90%, rgb(161 213 203 / 34%), transparent 29rem),
    #f8f2e8;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 40px 0;
}

.upload-card {
  overflow: hidden;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgb(30 41 64 / 10%);
  border-radius: 28px;
  background: rgb(255 253 249 / 94%);
  box-shadow: 0 22px 60px rgb(66 49 28 / 14%);
}

.hero {
  max-width: 570px;
}

.eyebrow,
.section-kicker,
.verification-label {
  margin: 0;
  color: #b55030;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 560px;
  margin: 9px 0 14px;
  color: #17233a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 7vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.steps {
  display: flex;
  gap: 10px;
  margin: 32px 0 34px;
  padding: 0;
  list-style: none;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8490a3;
  font-size: 0.86rem;
  font-weight: 700;
}

.step:not(:last-child)::after {
  width: clamp(12px, 6vw, 40px);
  height: 1px;
  margin-left: 4px;
  background: #d7d9d9;
  content: "";
}

.step-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d5d9e0;
  border-radius: 999px;
  color: #7b8698;
  background: #fff;
  font-size: 0.76rem;
}

.step-current {
  color: #1e2940;
}

.step-current .step-number {
  border-color: #1e2940;
  color: #fff;
  background: #1e2940;
}

form {
  display: grid;
  gap: 26px;
}

.form-section {
  padding: 22px;
  border: 1px solid #e5e1d9;
  border-radius: 18px;
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: #1e2940;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.file-limits,
.crop-note {
  margin: 0;
  color: #788398;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: right;
}

#photo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px 18px;
  border: 1.5px dashed #b8bfca;
  border-radius: 14px;
  color: #1e2940;
  background: #fbfaf7;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.file-picker:hover {
  border-color: #b55030;
  background: #fff7f1;
}

.file-picker:focus-within {
  outline: 3px solid rgb(181 80 48 / 22%);
  outline-offset: 3px;
}

.file-picker-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #b55030;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
}

.file-picker-copy {
  display: grid;
  gap: 2px;
}

.file-picker-copy strong {
  font-size: 1rem;
}

.file-picker-copy span {
  color: #68758a;
  font-size: 0.88rem;
}

#file-details {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: #536078;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.crop-section[hidden] {
  display: none;
}

.orientation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.orientation-options legend {
  width: 100%;
  margin-bottom: 10px;
  color: #536078;
  font-size: 0.86rem;
  font-weight: 700;
}

.orientation-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.orientation-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.orientation-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 13px;
  border: 1px solid #dce0e6;
  border-radius: 12px;
  color: #4a566b;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.orientation-copy strong {
  color: #263149;
  font-size: 0.9rem;
}

.orientation-copy span {
  color: #788398;
  font-size: 0.82rem;
}

.orientation-option input:checked + .orientation-copy {
  border-color: #1e2940;
  box-shadow: inset 0 0 0 1px #1e2940;
  background: #f3f6fb;
}

.orientation-option input:focus-visible + .orientation-copy {
  outline: 3px solid rgb(30 41 64 / 20%);
  outline-offset: 2px;
}

#crop-container {
  overflow: hidden;
  border-radius: 12px;
  background: #e8e7e2;
}

#crop-image {
  display: block;
  max-width: 100%;
}

.verification-section {
  display: grid;
  gap: 9px;
  padding: 2px 0;
}

#turnstile-container {
  min-height: 65px;
}

#submit-button {
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #1e2940;
  box-shadow: 0 6px 0 #101827;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

#submit-button:hover:not(:disabled) {
  background: #293957;
  transform: translateY(-1px);
  box-shadow: 0 7px 0 #101827;
}

#submit-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #101827;
}

#submit-button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.48;
}

#result {
  min-height: 1.3em;
  margin-top: 20px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #536078;
  background: #f4f4f1;
  font-size: 0.92rem;
  line-height: 1.45;
}

#result[data-state="working"] {
  border-color: #d8dfec;
  color: #304c77;
  background: #eef4ff;
}

#result[data-state="success"] {
  border-color: #b9dfc7;
  color: #185d36;
  background: #edf9f0;
}

#result[data-state="error"] {
  border-color: #f1c3b9;
  color: #8a2e22;
  background: #fff0ed;
}

.crop-summary {
  margin: 0 0 15px;
  color: #536078;
  font-size: 0.94rem;
  line-height: 1.45;
}

.crop-workspace[hidden] {
  display: none;
}

.crop-workspace {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  color: #edf4ff;
  background: #111b2b;
}

.crop-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
}

.crop-workspace-header h2 {
  margin: 3px 0 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.workspace-kicker {
  margin: 0;
  color: #f2a97c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cropper-close-button {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 10px;
  color: #fff;
  background: transparent;
  box-shadow: none;
  font-size: 0.86rem;
}

.cropper-close-button:hover:not(:disabled) {
  border-color: #fff;
  background: rgb(255 255 255 / 12%);
  box-shadow: none;
  transform: none;
}

.cropper-launch-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #aeb8c5;
  border-radius: 12px;
  color: #1e2940;
  background: #fff;
  box-shadow: none;
  font-weight: 800;
}

.cropper-launch-button:hover:not(:disabled) {
  border-color: #1e2940;
  color: #1e2940;
  background: #f0f4f8;
  box-shadow: none;
  transform: none;
}

.crop-workspace-orientation {
  margin-bottom: 12px;
}

.crop-workspace .orientation-options legend {
  color: #cad5e5;
}

.crop-workspace .orientation-copy {
  border-color: rgb(255 255 255 / 22%);
  color: #dbe6f5;
  background: rgb(255 255 255 / 8%);
}

.crop-workspace .orientation-copy strong {
  color: #fff;
}

.crop-workspace .orientation-copy span {
  color: #cad5e5;
}

.crop-workspace .orientation-option input:checked + .orientation-copy {
  border-color: #f2a97c;
  box-shadow: inset 0 0 0 1px #f2a97c;
  background: rgb(242 169 124 / 15%);
}

.crop-workspace-help {
  margin: 0 0 12px;
  color: #cad5e5;
  font-size: 0.86rem;
  line-height: 1.35;
}

.crop-workspace-canvas {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 14px;
  background: #070d17;
}

.crop-workspace-canvas .cropper-container {
  height: 100% !important;
  width: 100% !important;
}

.crop-workspace-canvas .cropper-view-box {
  outline: 3px solid rgb(255 255 255 / 96%);
  outline-offset: -3px;
}

.crop-workspace-canvas .cropper-face {
  background: transparent;
  opacity: 0;
}

.crop-workspace-canvas .cropper-line,
.crop-workspace-canvas .cropper-point {
  display: none;
}

.crop-workspace-canvas .cropper-dashed {
  border-color: rgb(255 255 255 / 36%);
}

.crop-workspace-canvas img {
  display: block;
  max-width: 100%;
}

.crop-workspace-footer {
  padding-top: 14px;
}

#use-crop-button {
  width: 100%;
  min-height: 56px;
  border-radius: 14px;
  color: #18263c;
  background: #f2a97c;
  box-shadow: 0 5px 0 #ba7550;
  font-weight: 850;
}

#use-crop-button:hover:not(:disabled) {
  background: #ffc197;
  box-shadow: 0 6px 0 #ba7550;
}

body.crop-workspace-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 720px);
    padding: 10px 0;
  }

  .upload-card {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .steps {
    margin: 26px 0;
  }

  .step {
    gap: 5px;
    font-size: 0.78rem;
  }

  .step:not(:last-child)::after {
    width: 14px;
    margin-left: 0;
  }

  .form-section {
    padding: 18px 15px;
  }

  .section-heading {
    display: grid;
    gap: 7px;
  }

  .file-limits,
  .crop-note {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .crop-workspace {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .crop-workspace-header {
    padding-bottom: 8px;
  }

  .crop-workspace-header h2 {
    font-size: 1.25rem;
  }

  .crop-workspace-orientation {
    margin-bottom: 8px;
  }

  .crop-workspace-help {
    margin-bottom: 8px;
  }

  .crop-workspace-footer {
    padding-top: 10px;
  }

  #use-crop-button {
    min-height: 52px;
  }
}