@font-face {
  font-family: Jua;
  src: url('/fonts/jua-invitation.woff2') format('woff2');
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fff8e8;
  --ink: #47302a;
  --wine: #883b45;
  --line: #b59770;
  --faint-line: #e4d2b8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100dvh;
  padding: clamp(1.1rem, 6vh, 4rem) 1rem 3rem;
  color: var(--ink);
  background-color: #f0d8d0;
  background-image: conic-gradient(#ebccc5 25%, transparent 0 50%, #ebccc5 0 75%, transparent 0);
  background-size: 36px 36px;
  font: 1rem/1.6 system-ui, sans-serif;
}
.letter {
  max-width: 41rem;
  margin: 0 auto;
  padding: clamp(1.3rem, 5vw, 3.1rem);
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: var(--paper);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--faint-line), 0 5px #dfcaa9, 0 16px 35px #62412926;
  animation: letter-in .6s ease-out both;
}
@keyframes letter-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .letter { animation: none; } }
h1 { margin: 0 0 1.15rem; font: 400 clamp(1.8rem, 6vw, 2.65rem)/1.2 Jua, system-ui, sans-serif; overflow-wrap: anywhere; }
h1:focus { outline: none; }
.step-label { margin: 0 0 .55rem; font-weight: 700; font-size: .86rem; color: var(--wine); }
label { display: block; margin: .72rem 0 .25rem; font-weight: 650; }
input, textarea, button { font: inherit; min-height: 44px; }
input, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: .55rem .7rem;
  background: #fffdfa;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: .35rem;
}
textarea { resize: vertical; }
button {
  padding: .55rem .95rem;
  border: 1px solid #6c3340;
  border-radius: .4rem;
  background: var(--wine);
  color: #fff8ec;
  cursor: pointer;
}
button:disabled { opacity: .7; cursor: wait; }
.secondary { color: var(--wine); background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: .2em; }
:is(button, input, textarea):focus-visible { outline: 2px solid #315c70; outline-offset: 3px; }
.hint { margin: .5rem 0; color: #6b5248; font-size: .92rem; }
.navigation { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 1.35rem; }
.option-editor { display: grid; gap: .65rem; margin-top: .9rem; }
.edit-option {
  min-inline-size: 0;
  display: grid;
  grid-template-columns: minmax(6.6rem, 8.25rem) minmax(0, 1fr);
  column-gap: .85rem;
  padding: .6rem .85rem .8rem;
  margin: 0;
  border: 1px solid var(--faint-line);
  border-radius: .35rem;
}
.edit-option legend { padding: 0 .3rem; font-weight: 650; color: var(--wine); }
.edit-option > label { align-self: end; margin: 0 0 .22rem; }
.edit-option > input { align-self: start; }
.art-button {
  display: grid;
  grid-row: span 2;
  justify-items: center;
  gap: .1rem;
  padding: 0 .25rem;
  color: var(--wine);
  background: transparent;
  border-color: transparent;
  font-size: .8rem;
  line-height: 1.4;
}
.art-button span { text-decoration: underline; text-underline-offset: .2em; }
.art-button img { object-fit: contain; filter: grayscale(1); opacity: .58; border-radius: .3rem; }
.art-button.has-attachment img, .art-button[aria-expanded='true'] img { filter: none; opacity: 1; }
.attachments { grid-column: 1 / -1; margin-top: .5rem; padding-top: .35rem; border-top: 1px solid var(--faint-line); }
.field-error { margin: .55rem 0 0; font-size: .9rem; color: var(--wine); }
.field-error:empty { display: none; }
@media (max-width: 400px) {
  .edit-option { grid-template-columns: minmax(4.8rem, 5.8rem) minmax(0, 1fr); gap: .15rem .55rem; padding-inline: .5rem; }
  .art-button img { width: 60px; height: 60px; }
}
