:root {
  color-scheme: light;
  --paper: #faf6ed;
  --cream: #f2ebdc;
  --ink: #342c2b;
  --muted: #756761;
  --red: #922b36;
  --red-dark: #72202b;
  --gold: #ac7c32;
  --line: #e5dccd;
  --white: #fffdf8;
  --green: #486247;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 95% 5%, #e7c98726, transparent 45%),
    radial-gradient(ellipse at 0 80%, #b8484a08, transparent 50%);
  pointer-events: none;
}
a {
  color: var(--red);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.15;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(2.7rem, 5.4vw, 4.7rem);
  letter-spacing: -0.045em;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.9rem;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 0.75rem;
}
h4 {
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}
h1 em {
  color: var(--red);
  font-weight: 400;
}
p {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.gold {
  color: var(--gold);
}
.eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.17em;
  font-weight: 750;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}
.intro {
  font-size: 1.05rem;
  max-width: 38rem;
}
.site-header {
  max-width: 1320px;
  margin: auto;
  padding: 1.4rem 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: -0.07em;
}
.brand-dot {
  color: var(--red);
}
.header-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}
.header-link {
  font-size: 0.8rem;
  text-decoration: none;
}
.page {
  max-width: 1224px;
  padding: 3.5rem 2.5rem;
  margin: auto;
  min-height: 70vh;
}
.page-heading {
  margin-bottom: 2rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 5px 20px #6d452104;
  margin-bottom: 1.25rem;
}
.card > p {
  font-size: 0.9rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 1px solid transparent;
  padding: 0.78rem 1.15rem;
  border-radius: 9px;
  font-weight: 650;
  font-size: 0.85rem;
  line-height: 1.45;
  text-decoration: none;
  transition:
    background 0.18s,
    transform 0.18s;
  min-height: 44px;
}
.button:active {
  transform: translateY(1px);
}
.primary {
  background: var(--red);
  color: #fffaf2;
}
.primary:hover:not(:disabled) {
  background: var(--red-dark);
}
.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  background: var(--cream);
}
.text-button {
  background: transparent;
  color: var(--red);
  padding-left: 0;
  padding-right: 0;
  font-size: 0.8rem;
}
.small-button {
  padding: 0.5rem 0.7rem;
  font-size: 0.75rem;
}
.danger {
  color: var(--red);
}
form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  margin: 0.95rem 0 0.4rem;
}
.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.7rem;
  margin-left: 0.3rem;
}
input,
textarea,
select {
  background: #fffefa;
  border: 1px solid #dcd1bf;
  border-radius: 8px;
  width: 100%;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  max-width: 100%;
}
textarea {
  resize: vertical;
  line-height: 1.65;
}
input:disabled {
  background: var(--cream);
}
input::placeholder,
textarea::placeholder {
  color: #95877c;
}
form > .button {
  margin-top: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1rem;
}
.money-input {
  max-width: 240px;
  position: relative;
}
.money-input span {
  position: absolute;
  left: 0.9rem;
  top: 0.65rem;
  color: var(--muted);
}
.money-input input {
  padding-left: 2.1rem;
}
.hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.65rem 0;
}
.privacy-note {
  font-size: 0.72rem;
  margin: 1rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}
.notice {
  padding: 1rem 1.25rem;
  background: #eaf0e4;
  border: 1px solid #c5d2bc;
  color: #304b30;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff0ec;
  border-color: #dfb7ad;
  color: #822b26;
}
.event-details {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0 0 2rem;
}
.event-pill {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.draw-card {
  background: #f3eadb;
  text-align: center;
}
.draw-card .eyebrow {
  margin-bottom: 0.6rem;
}
.draw-card > h2 {
  margin-bottom: 0;
}
.draw-card h3 {
  font-weight: 500;
}
.draw-card p {
  font-size: 0.87rem;
}
.recipient-name {
  font-family: Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4rem) !important;
  color: var(--red);
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.revealed {
  padding-top: 2.8rem;
  animation: reveal 0.55s ease-out;
}
.wish-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
}
.divider {
  height: 1px;
  background: #d7c8ae;
  margin: 1.5rem 0;
}
.gift-links {
  list-style: none;
  padding: 0;
  text-align: left;
}
.gift-links a {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid #ddceb9;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.welcome {
  position: relative;
  max-width: 920px;
  margin: 1rem auto 2rem;
  padding-right: 36%;
}
.welcome h1 {
  font-size: clamp(3.3rem, 6.5vw, 5.2rem);
}
.welcome .intro {
  max-width: 29rem;
}
.welcome-note {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.welcome-note h2 {
  font-size: 1.45rem;
}
.welcome-note p {
  font-size: 0.9rem;
}
.welcome > .gift-scene {
  position: absolute;
  right: -2rem;
  top: 4rem;
  width: 310px;
  height: 310px;
  background: #f0e6d5;
  border-radius: 50%;
  transform: rotate(7deg);
}
.gift-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
}
.gift-scene.small {
  transform: scale(0.85);
  margin: 0.8rem 0 -0.8rem;
}
.present {
  width: 132px;
  height: 120px;
  position: relative;
  background: var(--red);
  border-radius: 6px;
  box-shadow: 10px 15px 0 #b88b3c14;
  transform: rotate(-7deg);
}
.present::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(#eccb8860 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 6px;
}
.lid {
  position: absolute;
  z-index: 2;
  top: -8px;
  left: -7px;
  right: -7px;
  height: 28px;
  background: #b4484e;
  border-radius: 4px;
  box-shadow: 0 4px 0 #0000000d;
}
.ribbon {
  position: absolute;
  z-index: 3;
  left: 54px;
  top: -8px;
  bottom: 0;
  width: 24px;
  background: #e2b962;
}
.bow {
  position: absolute;
  z-index: 1;
  left: 52px;
  top: -38px;
  width: 28px;
  height: 30px;
}
.bow::before,
.bow::after {
  content: "";
  position: absolute;
  border: 8px solid #d5aa52;
  width: 36px;
  height: 22px;
  border-radius: 50% 50% 0 50%;
  top: 0;
  left: -35px;
  transform: rotate(17deg);
}
.bow::after {
  left: 10px;
  transform: rotate(73deg);
}
.spark {
  position: absolute;
  color: var(--gold);
  font-size: 2rem;
}
.spark-one {
  left: 16%;
  top: 18%;
  transform: rotate(-15deg);
}
.spark-two {
  right: 13%;
  bottom: 15%;
  font-size: 2.7rem;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-top h2,
.section-top h3 {
  margin: 0;
}
.step-number {
  font-family: Georgia, serif;
  color: #bfa578;
  font-size: 1.4rem;
}
.group-sidebar h2 {
  font-size: 1.5rem;
}
.group-list {
  display: grid;
  gap: 0.6rem;
}
.group-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: transparent;
  color: var(--ink);
}
.group-item:hover {
  background: var(--cream);
}
.group-item[aria-current="true"] {
  border-color: #ddc9ab;
  background: #efe5d3;
}
.group-item strong {
  display: block;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.group-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.25rem;
}
.sidebar-note {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1.5rem;
}
.sidebar-note > span {
  color: var(--gold);
}
.sidebar-note p {
  font-size: 0.8rem;
}
.group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.group-heading h2 {
  font-size: 2.1rem;
  margin: 0.6rem 0 0;
  overflow-wrap: anywhere;
}
.badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  background: #922b360b;
  border: 1px solid #922b3620;
  border-radius: 25px;
  padding: 0.25rem 0.6rem;
}
.badge.drawn {
  color: var(--green);
  background: #4862470b;
  border-color: #48624720;
}
.count {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.participants,
.exclusions {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.participant-row,
.exclusion-row {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.participant-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.participant-identity strong {
  font-size: 0.87rem;
  overflow-wrap: anywhere;
}
.avatar {
  background: #f0e6d5;
  color: var(--red);
  border-radius: 50%;
  min-width: 35px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
}
.participant-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.participant-actions button {
  font-size: 0.7rem;
}
.exclusion-row {
  font-size: 0.85rem;
}
.exclusion-row > span {
  overflow-wrap: anywhere;
}
.pair-symbol {
  align-self: end;
  padding-bottom: 0.8rem;
  color: var(--gold);
}
.final-card {
  background: #eee3d1;
  border-color: #e1d1b8;
}
.final-card h3 {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
}
.final-card p {
  max-width: 34rem;
}
.empty-state {
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
dialog {
  max-width: 480px;
  width: calc(100% - 2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 20px 100px #0003;
}
dialog::backdrop {
  background: #30242688;
  backdrop-filter: blur(3px);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
footer {
  padding: 1.5rem 2rem 2.5rem;
  text-align: center;
  font-size: 0.73rem;
  color: var(--muted);
}
footer span {
  color: var(--gold);
  margin-left: 0.7rem;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.personal-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: start;
}
.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 3rem;
}
.inline-form {
  display: flex;
  align-items: end;
  gap: 0.75rem;
}
.inline-form > div {
  flex: 1;
  min-width: 0;
}
.inline-form > .button {
  margin: 0;
}
.exclusion-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.6rem;
}
.exclusion-form > .button {
  grid-column: 1/-1;
  justify-self: start;
  margin-top: 0.4rem;
}
@media (max-width: 850px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .group-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .sidebar-note {
    display: none;
  }
  .site-header {
    padding: 1rem 1.5rem;
  }
  .page {
    padding: 2rem 1.5rem;
  }
  .header-link {
    margin-left: auto;
  }
  .header-note {
    display: none;
  }
  .personal-grid {
    gap: 1rem;
  }
  .card {
    padding: 1.5rem;
  }
  .welcome {
    padding-right: 30%;
  }
  .welcome > .gift-scene {
    width: 230px;
    height: 230px;
    right: -1rem;
    top: 6rem;
    transform: scale(0.8) rotate(7deg);
  }
}
@media (max-width: 600px) {
  .personal-grid {
    grid-template-columns: 1fr;
  }
  .page {
    padding: 2rem 1rem;
  }
  .site-header {
    padding: 0.8rem 1rem;
  }
  .card {
    padding: 1.3rem;
    border-radius: 14px;
  }
  .welcome {
    padding: 0;
    margin: 0;
  }
  .welcome > .gift-scene {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 160px;
    min-height: 160px;
    border-radius: 14px;
    transform: scale(0.78);
    margin: 1rem 0;
  }
  .welcome-note {
    margin-top: 0;
    padding-top: 1.5rem;
  }
  .welcome h1 {
    font-size: 3.3rem;
  }
  .participant-row {
    flex-wrap: wrap;
  }
  .participant-actions {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
    gap: 0.35rem;
  }
  .participant-actions .button {
    flex: 1;
    gap: 0;
    padding: 0.5rem;
  }
  .group-heading {
    align-items: start;
  }
  .count {
    padding-top: 0.5rem;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .inline-form > div {
    flex-basis: 100%;
  }
  .inline-form > .button {
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .event-details {
    gap: 0.4rem;
  }
  .event-pill {
    font-size: 0.72rem;
  }
  .group-heading h2 {
    font-size: 1.8rem;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .dialog-actions .button {
    flex: 1;
  }
}
