:root {
  --green: #0f4d2a;
  --gold: #b8923f;
  --ink: #0f1f3d;
  --paper: #f3f4f1;
  --line: #cbd3c8;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.4;
  padding: max(16px, env(safe-area-inset-top)) 16px
    max(24px, env(safe-area-inset-bottom));
}
main {
  max-width: 420px;
  margin: 0 auto;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  margin: 8px 0 4px;
  color: var(--green);
}
p.lead {
  margin: 0 0 8px;
  color: #4a5568;
}
label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
}
.hint {
  font-weight: 400;
  color: #5b6573;
}
input[type="text"],
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s;
}
input[type="text"]:focus,
select:focus {
  border-color: var(--gold);
}
input[type="file"] {
  width: 100%;
  font-size: 0.95rem;
  min-height: 44px;
}
input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.hidden {
  display: none;
}
.stage {
  margin: 22px 0 14px;
  display: flex;
  justify-content: center;
}
canvas {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(15, 77, 42, 0.3);
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
button {
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  background: var(--green);
  color: #fff;
  transition:
    opacity 0.15s,
    background 0.15s;
}
button:hover:not(:disabled) {
  opacity: 0.87;
}
button:active:not(:disabled) {
  opacity: 0.72;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.alt {
  background: #1f9d55;
}
button.link {
  min-height: 40px;
  margin-top: 8px;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  font-weight: 600;
  padding: 0;
}
button.link:hover:not(:disabled) {
  opacity: 0.72;
}
.photo-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.photo-opt {
  background: #fff;
  color: var(--green);
  border: 1.5px solid var(--green);
  font-size: 0.95rem;
  min-height: 48px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.photo-opt:hover:not(:disabled) { background: var(--green); color: #fff; }
.photo-opt:disabled { opacity: 0.5; cursor: not-allowed; }
.tiny {
  font-size: 0.85rem;
  color: #4a5568;
  margin-top: 14px;
}
