
:root {
  color-scheme: light;
  --paper: #fff8ec;
  --table: #eae0ce;
  --ink: #26201b;
  --subtle: #554c40;
  --rule: #ad9a83;
  --brick: #872d23;
  --brick-deep: #642018;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--table);
}
* { box-sizing: border-box; }
body { margin: 0; padding: clamp(0.75rem, 4vw, 3rem); }
[hidden] { display: none !important; }
.book {
  width: min(100%, 42rem);
  margin-inline: auto;
  padding: clamp(1rem, 6vw, 3rem);
  border: 1px solid var(--rule);
  background: var(--paper);
}
.masthead { border-top: 4px solid var(--brick); padding-block: 0.9rem 1.4rem; }
.edition { margin: 0 0 0.65rem; font-size: 0.875rem; color: var(--subtle); }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 500; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.4rem, 8vw, 4.25rem); line-height: 1; letter-spacing: -0.06em; }
h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); line-height: 1.13; }
.intro, .help { max-width: 44ch; color: var(--subtle); margin: 0.8rem 0 0; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  border-block: 1px solid var(--rule);
}
.steps li { padding: 0.55rem 0.5rem; text-align: center; color: var(--subtle); }
.steps li + li { border-inline-start: 1px solid var(--rule); }
.steps li[aria-current] { color: var(--brick); box-shadow: inset 0 -3px var(--brick); font-weight: 750; }
.pane { padding-block: clamp(1.25rem, 5vw, 2rem) 0.75rem; }
.participant { margin: 0 0 0.45rem; color: var(--subtle); overflow-wrap: anywhere; }
form { display: grid; gap: 0.4rem; margin-block: 1.1rem 0; }
label { font-weight: 650; }
input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
  border: 1px solid #796954;
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font: inherit;
}
input[type="file"] { padding: 0; }
input::file-selector-button {
  min-height: 44px;
  border: 0;
  border-inline-end: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  margin-inline-end: 0.5rem;
  padding-inline: 0.65rem;
  font: inherit;
  cursor: pointer;
}
button {
  min-height: 46px;
  width: fit-content;
  max-width: 100%;
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--brick);
  border-radius: 4px;
  background: var(--brick);
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--brick-deep); }
button:disabled { cursor: default; background: #e1d2be; border-color: #796954; color: var(--subtle); }
.secondary { background: transparent; border-color: #796954; color: var(--ink); }
.secondary:hover:not(:disabled) { background: #eae0ce; }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
.status { margin: 0.65rem 0 0; overflow-wrap: anywhere; color: var(--subtle); }
.status:empty { margin: 0; }
.status[data-error] { color: var(--brick); font-weight: 650; }
#preview { display: block; max-width: min(100%, 20rem); max-height: 18rem; object-fit: contain; margin-block: 0.5rem; }
.receipt { border-block: 1px solid var(--rule); padding-block: 0.65rem; margin: 1rem 0 0; }
.receipt dt { color: var(--subtle); font-size: 0.875rem; }
.receipt dd { margin: 0.15rem 0 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
@media (max-width: 25rem) { .actions > button { width: 100%; } }
