* { box-sizing: border-box; }
body {
  margin: 0;
  background: #fff;
  color: #18212b;
  font: 1rem/1.5 system-ui, sans-serif;
}
main { max-width: 34rem; margin: 0 auto; padding: 2rem 1rem; }
h1 { margin: 0 0 .5rem; font-size: 1.75rem; line-height: 1.25; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
p { margin: .75rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
button, .link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: .65rem 1rem;
  border: 1px solid #315e9f;
  border-radius: .375rem;
  background: #fff;
  color: #234b82;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
#take-photo { background: #24569b; color: #fff; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #995900; outline-offset: 3px; }
[hidden] { display: none !important; }
#status { min-height: 3rem; }
#status[data-error="true"] { color: #a01c21; }
#result { margin-top: 1.5rem; }
textarea {
  display: block;
  width: 100%;
  min-height: 9rem;
  padding: .75rem;
  border: 1px solid #7a8694;
  border-radius: .375rem;
  background: #fff;
  color: inherit;
  font: inherit;
  resize: vertical;
  overflow-wrap: anywhere;
}
.note { color: #4a5563; font-size: .9rem; }
#preview {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
#crop { margin-top: 1.5rem; }
@media (max-width: 24rem) { .actions > * { width: 100%; } }
