:root {
  color-scheme: light;
  --pine: #153d33;
  --pine-dark: #0c3128;
  --ink: #20322a;
  --muted: #4d6256;
  --paper: #fffefa;
  --background: #edf3ec;
  --line: #cddcd1;
  --moss: #eaf2e9;
  --berry: #90372d;
  --berry-dark: #782c24;
  --gold: #c79449;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.55;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 0;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, #dceadc, var(--background) 45rem);
}

button, input, textarea {
  font: inherit;
}

button, a, input, textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 0.2rem solid #967332;
  outline-offset: 0.22rem;
}

.site-header {
  background: var(--pine);
  color: var(--paper);
  border-bottom: 0.22rem solid var(--gold);
}

.header-inner {
  max-width: 60rem;
  min-height: 4.3rem;
  margin-inline: auto;
  padding: 0.4rem clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.site-name, .header-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  font-size: 1.05rem;
}

.site-name {
  font-weight: 730;
  text-decoration: none;
}

.site-name:hover, .header-link {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.header-link, button.header-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 560;
}

button.header-link:hover:enabled {
  background: transparent;
  color: #ffdd9f;
}

.site-name:focus-visible, .header-link:focus-visible {
  outline-color: #ffdd9f;
}

.site-mark {
  position: relative;
  width: 1.38rem;
  height: 1.38rem;
  flex: none;
  border: 0.1rem solid #f3c87e;
  border-radius: 50%;
  background: linear-gradient(0deg, transparent 46%, #f3c87e 46% 55%, transparent 55%);
}

.site-mark::before {
  position: absolute;
  content: "";
  width: 0.38rem;
  height: 0.24rem;
  top: -0.27rem;
  left: calc(50% - 0.19rem);
  border-radius: 0.1rem;
  background: #f3c87e;
}

.page {
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 4vw, 1.6rem);
  padding-bottom: 4rem;
}

.participant-page, .admin-page:has(#dashboard[hidden]) {
  padding-top: clamp(1.5rem, 8vh, 5rem);
}

.admin-page {
  max-width: 56rem;
  padding-top: clamp(1.5rem, 4vh, 3rem);
}

.card {
  border: 1px solid var(--line);
  border-radius: clamp(1rem, 4vw, 1.5rem);
  background: var(--paper);
  box-shadow: 0 0.8rem 2rem -1.2rem #143d3366;
}

.participant-card {
  width: min(100%, 34rem);
  margin-inline: auto;
  overflow: hidden;
  text-align: center;
}

.participant-card::before {
  display: block;
  height: 0.4rem;
  background: repeating-linear-gradient(135deg, var(--pine) 0 1.2rem, #245646 1.2rem 2.4rem);
  content: "";
}

.card-content {
  padding: clamp(1.3rem, 5vw, 3rem);
}

.emblem {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 auto 1.3rem;
  border: 1px solid #e6cabd;
  border-radius: 50%;
  background-color: #f8eae3;
}

.gift {
  position: relative;
  width: 1.8rem;
  height: 1.27rem;
  margin-top: 0.6rem;
  border: 0.12rem solid var(--berry);
  border-radius: 0.15rem;
  background: linear-gradient(90deg, transparent 46%, var(--berry) 46% 54%, transparent 54%);
}

.gift::before {
  position: absolute;
  content: "";
  top: -0.15rem;
  left: -0.26rem;
  width: 2.08rem;
  height: 0.42rem;
  border: 0.12rem solid var(--berry);
  border-radius: 0.12rem;
  background: #f8eae3;
}

.gift::after {
  position: absolute;
  content: "";
  width: 1.03rem;
  height: 0.5rem;
  top: -0.62rem;
  left: calc(50% - 0.515rem);
  border: 0.12rem solid var(--berry);
  border-radius: 50% 50% 0 0;
  background: linear-gradient(90deg, transparent 43%, var(--berry) 43% 57%, transparent 57%);
}

h1, h2, p {
  margin-top: 0;
}

h1, h2, .recipient {
  color: var(--pine-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
}

.lede {
  max-width: 29ch;
  margin: 0 auto 1.3rem;
  color: var(--muted);
  font-size: clamp(1.13rem, 3vw, 1.27rem);
  overflow-wrap: anywhere;
}

.lede:empty, .card-content > :last-child {
  margin-bottom: 0;
}

.date-note {
  margin: 0 auto 1.3rem;
  padding: 0.85rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--moss);
}

.date-note time, .date-note span {
  display: block;
}

.date-note time {
  font-size: clamp(1.12rem, 3.5vw, 1.3rem);
  color: var(--pine-dark);
  font-weight: 750;
  text-wrap: balance;
}

.date-note span {
  font-size: 0.94rem;
  color: var(--muted);
}

.recipient {
  margin: 1.2rem auto 0;
  padding: 0.8rem;
  border-block: 2px solid #e9d6af;
  background: #fbf4e4;
  font-size: clamp(2rem, 8vw, 3.8rem);
  color: var(--berry-dark);
}

.stack, .field {
  display: grid;
}

.stack {
  gap: 0.85rem;
}

.field {
  min-width: 0;
  gap: 0.3rem;
  text-align: left;
}

label {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 680;
}

.participant-card label {
  font-size: 1.13rem;
}

.field-help {
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 500;
}

input, textarea {
  min-height: 3.25rem;
  width: 100%;
  min-width: 0;
  border: 1px solid #7c9183;
  border-radius: 0.62rem;
  padding: 0.65rem 0.8rem;
  background: white;
  color: var(--ink);
}

.participant-card input {
  min-height: 3.6rem;
  font-size: 1.2rem;
}

button {
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: var(--pine);
  color: white;
  font-weight: 690;
  cursor: pointer;
  overflow-wrap: anywhere;
}

button:hover:enabled {
  background: var(--pine-dark);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.participant-card button {
  min-height: 3.6rem;
  width: 100%;
  font-size: 1.15rem;
}

.secondary {
  color: var(--pine-dark);
  border-color: #b1c4b6;
  background: #f5f8f4;
}

.secondary:hover:enabled {
  background: var(--moss);
}

.quiet {
  background: transparent;
  color: var(--berry-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.quiet:hover:enabled {
  background: #fbede8;
}

.notice {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--moss);
  color: var(--pine-dark);
  overflow-wrap: anywhere;
}

.error {
  border-color: #d9ad9f;
  background: #faece7;
  color: var(--berry-dark);
}

.admin-card {
  margin-top: 1rem;
  padding: clamp(1rem, 4vw, 1.5rem);
}

.section-note, .empty {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.dashboard-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
}

.dashboard-form .field {
  flex: 1 1 15rem;
}

.manual-copy {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.manual-copy button {
  justify-self: start;
}

.manual-copy textarea {
  resize: vertical;
}

.invite-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.invite-identification {
  flex: 1 1 11rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.invite-identification strong, .invite-identification span {
  display: block;
}

.invite-identification strong {
  color: var(--pine-dark);
  font-size: 1.1rem;
}

.registered, .pending {
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.3rem;
}

.row-actions button {
  min-height: 2.75rem;
  padding-inline: 0.65rem;
}

.empty {
  margin: 1rem 0 0;
}

@media (max-width: 31rem) {
  .dashboard-form button {
    width: 100%;
  }
}
