:root {
  color-scheme: light;
  font: 100%/1.55 system-ui, sans-serif;
  --dark: #102d28;
  --ink: #18352e;
  --muted: #4a6257;
  --paper: #fbf6e8;
  --gold: #f4ce7d;
  --rule: #b7bca7;
  --green: #165a48;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: #fff5dc;
  background: var(--dark);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, #0c241c30, #0a201624 55%, #091e1747),
    url("receipt-background.webp"),
    radial-gradient(ellipse at 50% 0, #23604f, transparent 70%);
  background-size: cover;
  background-position: center, right center, center;
}
.shell {
  position: relative;
  width: min(100% - 2rem, 42rem);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 4.5rem) 0 2rem;
}
.masthead { text-align: center; margin-bottom: 2rem; text-shadow: 0 2px 18px #071d16; }
.occasion, .eyebrow, .total, .code {
  font-family: ui-monospace, "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .085em;
  font-size: .875rem;
}
.occasion { color: var(--gold); margin: 0 0 .6rem; }
.occasion span { padding: 0 .4rem; }
h1, h2, blockquote { font-family: Georgia, serif; font-weight: 400; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 9.3vw, 5.2rem); letter-spacing: -.055em; margin: 0; }
h1 em { color: var(--gold); font-weight: 400; }
.subtitle { margin: .65rem 0 0; color: #f1e5ca; }
.paper {
  color: var(--ink);
  background: var(--paper);
  padding: clamp(1.15rem, 5vw, 2.55rem);
  border-radius: .45rem .45rem 0 0;
  box-shadow: 0 15px 45px #060d0a55;
  position: relative;
}
.paper::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 8px;
  background: linear-gradient(135deg, var(--paper) 50%, transparent 51%) 0 0 / 16px 8px repeat-x,
              linear-gradient(225deg, var(--paper) 50%, transparent 51%) 0 0 / 16px 8px repeat-x;
}
h2 { font-size: clamp(1.95rem, 5.5vw, 2.7rem); margin: .2rem 0 .7rem; }
h2:focus { outline: none; }
p { margin: .55rem 0 .95rem; }
.eyebrow { color: var(--green); text-transform: uppercase; margin: 0; }
.muted, small { color: var(--muted); }
small { font-size: .875rem; }
.divider { border: 0; border-top: 1px dashed var(--rule); margin: 1.35rem 0; }
form { display: grid; gap: .85rem; }
label { font-size: .92rem; font-weight: 700; display: grid; gap: .35rem; min-width: 0; }
input, textarea, select, button { font: inherit; }
input, textarea, select {
  width: 100%;
  padding: .67rem .75rem;
  color: var(--ink);
  background: #fffdf6;
  border: 1px solid #829889;
  border-radius: .35rem;
}
textarea { min-height: 4.25rem; resize: vertical; }
button {
  border: 1px solid transparent;
  border-radius: .35rem;
  padding: .65rem 1rem;
  min-height: 46px;
  font-weight: 700;
  background: var(--green);
  color: white;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #114635; }
button.secondary { border-color: #829889; color: var(--ink); background: transparent; }
button.secondary:hover:not(:disabled) { background: #e7ecdf; }
button:disabled { opacity: .63; cursor: default; }
:focus-visible { outline: 3px solid #a75811; outline-offset: 3px; }
.actions, .invite { display: flex; flex-wrap: wrap; gap: .65rem; align-items: stretch; }
.actions { margin-top: 1rem; }
.invite input { flex: 1 1 13rem; min-width: 0; }
.toggle { margin-bottom: 1.1rem; }
.toggle button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.notice { background: #e8eddf; border-left: .2rem solid #7d9b68; padding: .8rem 1rem; }
.notice p { margin: .35rem 0 0; }
.receipt { border-block: 1px dashed var(--rule); padding: 1rem 0; margin: 1rem 0; }
blockquote { font-size: clamp(1.45rem, 5vw, 2.35rem); margin: .4rem 0 .8rem; overflow-wrap: anywhere; }
.receipt p, .roster { overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; margin: 1rem 0 0; color: var(--green); }
.message { min-height: 1.5em; margin: 1.25rem 0 0; }
details summary { cursor: pointer; font-weight: 650; }
@media (max-width: 640px) {
  body::before {
    background-image:
      linear-gradient(180deg, #071c15a8 0%, #071c1575 52%, #071c1524 100%),
      url("receipt-background.webp"),
      radial-gradient(ellipse at 50% 0, #23604f, transparent 70%);
  }
}
@media (max-width: 360px) { .shell { width: calc(100% - 1rem); } .masthead { margin-bottom: 1.4rem; } }

.language-picker { max-width: 16rem; margin: 1rem auto 0; color: var(--gold); }
.language-picker select { text-align: center; }
