:root {
  color-scheme: light;
  --page: #fff8f8;
  --paper: #fffdfd;
  --blush: #f9e4e9;
  --line: #e9cdd5;
  --text: #2f1822;
  --muted: #715762;
  --accent: #8c2145;
  --accent-dark: #681532;
  --radius: 1.25rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 .7em; line-height: 1.04; font-family: Georgia, "Times New Roman", serif; letter-spacing: -.042em; }
h1 { font-size: clamp(2.35rem, 5vw, 4.65rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
h3 { font-size: 1.65rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.container { width: min(100% - 3rem, 73rem); margin-inline: auto; }
main.container { padding-bottom: 5rem; }
.skip-link { position: absolute; z-index: 1; background: var(--paper); padding: .6rem 1rem; transform: translateY(-110%); }
.skip-link:focus { transform: none; }
.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-inner { display: flex; justify-content: space-between; gap: 1.25rem; align-items: center; min-height: 4.6rem; padding-block: .75rem; }
.brand { display: inline-flex; gap: .6rem; align-items: center; font-weight: 720; font-size: .99rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; border-radius: 50%; width: 2rem; height: 2rem; flex-shrink: 0; background: var(--accent); color: white; font-size: 1.35rem; }
.topbar nav { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; font-size: .94rem; }
.topbar nav a:not(.button) { text-decoration: none; }
.topbar nav a:hover, .nav-button:hover { color: var(--accent); text-decoration: underline; }
.nav-button { border: 0; padding: 0; cursor: pointer; color: inherit; background: none; }

.hero { display: grid; grid-template-columns: 1fr 1.06fr; min-height: 32rem; margin-top: 2.25rem; overflow: hidden; border-radius: 1.65rem; background: var(--blush); }
.hero-copy { align-self: center; min-width: 0; padding: clamp(2rem, 5.2vw, 4.75rem); }
.hero h1 { font-size: clamp(3rem, 6.3vw, 6rem); margin-bottom: .36em; line-height: .96; letter-spacing: -.065em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.06rem; max-width: 24rem; margin-bottom: 1.75rem; }
.hero-art { min-height: 20rem; background: #e9b9c6 url('gift.jpg') center / cover no-repeat; }
.rules { padding-top: 3.2rem; scroll-margin-top: 1.5rem; }
.rules-grid p { color: var(--muted); }

.button { display: inline-flex; width: fit-content; min-height: 2.85rem; max-width: 100%; padding: .62rem 1.22rem; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: .65rem; background: var(--accent); color: white; text-align: center; text-decoration: none; cursor: pointer; font-weight: 650; line-height: 1.25; }
.button:hover { background: var(--accent-dark); }
.button:focus-visible { outline-color: var(--accent-dark); }
.button-secondary { color: var(--accent-dark); border-color: var(--line); background: var(--paper); }
.button-secondary:hover { background: var(--blush); }
.button-small { min-height: 2.45rem; padding: .46rem .82rem; font-size: .9rem; }
.text-link { color: var(--accent); text-underline-offset: .22em; }
.muted { color: var(--muted); }
.multiline { white-space: pre-wrap; }

.page-heading { padding-block: 2.8rem 1rem; }
.page-heading h1 { margin-bottom: .2em; overflow-wrap: anywhere; }
.page-heading .text-link { display: block; width: fit-content; margin-bottom: 1rem; }
.status-pill { display: inline-block; margin-bottom: .8rem; padding: .22rem .68rem; border-radius: 4rem; background: var(--blush); color: var(--accent-dark); font-size: .875rem; font-weight: 650; }
.split-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-grid.rules-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.details-grid { margin-top: 1.1rem; }
.sheet { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 2.8vw, 2.1rem); background: var(--paper); overflow-wrap: anywhere; }
.sheet > :last-child { margin-bottom: 0; }
.feature-sheet { background: #fdebf0; }
.feature-sheet h2 { font-family: inherit; font-size: 1.05rem; font-weight: 680; letter-spacing: 0; }
.recipient { margin-bottom: .25em; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.4vw, 3rem); color: var(--accent-dark); letter-spacing: -.045em; line-height: 1.02; }
.revealed-name { font-size: 1.1rem; font-weight: 700; }
.result { color: var(--accent-dark); font-weight: 700; }
.game-link a { text-decoration-thickness: .045em; text-underline-offset: .18em; }
.narrow { max-width: 36rem; margin-inline: auto; }
.page-panel { margin-top: clamp(1.5rem, 5vw, 4.5rem); }
.page-panel h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.page-panel > .text-link:first-child { display: block; margin-bottom: 1.15rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.count { display: inline-block; vertical-align: middle; color: var(--accent-dark); background: var(--blush); border-radius: 2rem; padding: .32rem .55rem; font: 650 .85rem/1 system-ui, sans-serif; letter-spacing: 0; }

form.stack { display: grid; gap: 1rem; margin-top: 1rem; }
label { display: block; margin-bottom: .32rem; font-size: .95rem; font-weight: 660; }
input:not([type='hidden']), textarea, select { width: 100%; min-width: 0; color: inherit; background: white; border: 1px solid #cbaab6; border-radius: .6rem; padding: .65rem .72rem; }
input[readonly] { background: var(--page); }
textarea { display: block; resize: vertical; }
select { appearance: none; padding-right: 2.15rem; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.invite { display: block; margin-bottom: .8rem; }
.helptext, small { color: var(--muted); font-size: .875rem; }
.helptext { margin-top: .32rem; }
.errorlist { margin: 0 0 .4rem; padding-left: 1.15rem; color: var(--accent-dark); }
.alerts { padding-top: 1rem; }
.alert { margin: 0 0 .6rem; padding: .7rem 1rem; border-radius: .65rem; color: #204930; background: #edf6ef; }
.alert.error { color: var(--accent-dark); background: var(--blush); }

.facts { display: grid; gap: .75rem; margin: 1rem 0; }
.facts dt { margin-bottom: .1rem; color: var(--muted); font-weight: 650; font-size: .875rem; }
.facts dd { margin: 0; }
.feed, .names { list-style: none; padding: 0; margin: 0; }
.stack + .feed { margin-top: 1rem; }
.feed li, .names li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.feed li:last-child, .names li:last-child { border-bottom: 0; }
.feed p { margin-bottom: .18rem; }
.feed small { display: block; }
.feed .actions { margin-top: .5rem; }
details { border-top: 1px solid var(--line); padding-block: .65rem; }
details p { margin-top: .65rem; }
summary { cursor: pointer; font-weight: 650; color: var(--accent-dark); }

@media (max-width: 55rem) {
  .hero { min-height: auto; }
  .hero h1 { font-size: clamp(2.8rem, 7vw, 4.5rem); }
  .hero-copy { padding: 1.75rem; }
}

@media (max-width: 43rem) {
  .container { width: calc(100% - 2rem); }
  .topbar-inner { gap: .65rem; }
  .topbar nav { gap: .45rem .75rem; }
  .hero, .split-grid, .split-grid.rules-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { margin-top: 1.25rem; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-art { min-height: 0; aspect-ratio: 1.44; background-position: center 56%; }
  .page-heading { padding-top: 1.6rem; }
}

@media (max-width: 26rem) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar nav { justify-content: flex-start; }
}
