:root {
  color-scheme: light;
  --ink: #25224c;
  --cream: #fff9e8;
  --paper: #ff755f;
  --lemon: #ffdc65;
  --lavender: #e6deff;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100dvh;
  background-image: radial-gradient(#7a281c26 1px, transparent 1px);
  background-size: 15px 15px;
}
.poster {
  width: min(100% - 32px, 550px);
  margin: auto;
  padding: clamp(24px, 5vh, 60px) 0 25px;
  text-align: center;
}
.tag {
  display: inline-flex; gap: .45rem; align-items: center;
  padding: .36rem .7rem;
  border: 1.5px solid var(--ink); border-radius: 30px;
  background: var(--cream); transform: rotate(-3deg);
  font-size: .73rem; font-weight: 850; letter-spacing: .075em;
}
.tag span { font-size: .98rem; line-height: 1; }
h1 {
  margin: .55rem 0 0;
  font-size: clamp(2.65rem, 11vw, 4.65rem);
  line-height: .96; letter-spacing: -.075em; font-weight: 950;
}
h1 em {
  display: inline-block; padding: 0 .11em .04em .04em;
  color: var(--lemon); font-style: normal; transform: rotate(-8deg);
  -webkit-text-stroke: 1.5px var(--ink); text-shadow: 3px 4px var(--ink);
}
.stage { position: relative; height: 224px; width: min(100%, 410px); margin: 0 auto -12px; }
.orbit {
  position: absolute; width: 290px; height: 125px; top: 62px; left: 50%;
  border-radius: 50%; border: 1.5px dashed #5e305b86;
  transform: translateX(-50%) rotate(-12deg);
}
.spark { position: absolute; font-size: 32px; color: var(--lemon); -webkit-text-stroke: 1px var(--ink); }
.s1 { top: 50px; left: 8%; transform: rotate(12deg); }
.s2 { top: 82px; right: 8%; font-size: 42px; }
.s3 { top: 153px; right: 15%; color: var(--lavender); font-size: 23px; }
.s4 { top: 155px; left: 13%; color: var(--cream); font-size: 23px; }
.cat {
  --fur: #ffae46; --stripe: #e77736;
  position: absolute; width: 198px; height: 182px; left: calc(50% - 99px); top: 31px;
  transform: rotate(-5deg); transition: transform .24s;
}
.face {
  position: absolute; inset: 36px 0 0;
  border: 4px solid var(--ink); border-radius: 48% 48% 44% 44%;
  background: var(--fur); box-shadow: inset 0 -7px #c34a332a, 0 7px var(--ink);
  transition: background .2s;
}
.ear {
  position: absolute; top: 24px; width: 64px; height: 71px;
  border: 4px solid var(--ink); border-radius: 26% 76% 32% 48%; background: var(--fur);
  transition: background .2s;
}
.ear::after { content: ""; position: absolute; inset: 13px 15px 17px 10px; background: #fa7d77; border-radius: inherit; }
.ear-left { left: 5px; transform: rotate(-12deg); }
.ear-right { right: 5px; transform: scaleX(-1) rotate(-12deg); }
.stripe {
  position: absolute; left: 50%; top: -1px; width: 11px; height: 21px; border-radius: 3px 3px 8px 8px;
  background: var(--stripe); transform: translateX(-50%);
  box-shadow: -19px -1px 0 -2px var(--stripe), 19px -1px 0 -2px var(--stripe);
}
.eye {
  position: absolute; top: 36px; width: 43px; height: 46px; display: grid; place-items: center;
  background: #fffdf3; border: 3px solid var(--ink); border-radius: 50%; overflow: hidden;
}
.eye-left { left: 34px; } .eye-right { right: 34px; }
.eye i {
  display: block; position: relative; width: 23px; height: 25px;
  background: var(--ink); border-radius: 50%; transform: translate(var(--look-x, 0), var(--look-y, 0));
}
.eye i::after { content: ""; position: absolute; top: 4px; left: 5px; width: 7px; height: 7px; border-radius: 50%; background: white; }
.brow {
  position: absolute; z-index: 1; width: 29px; height: 7px; top: 27px;
  border-radius: 9px; background: var(--ink); opacity: 0; transition: transform .2s;
}
.brow-left { left: 39px; } .brow-right { right: 39px; }
.cheek { position: absolute; top: 87px; width: 35px; height: 17px; background: #f37670; border-radius: 50%; }
.cheek-left { left: 16px; } .cheek-right { right: 16px; }
.muzzle { position: absolute; width: 70px; height: 39px; left: 50%; top: 82px; transform: translateX(-50%); background: #ffdb8d; border-radius: 50%; }
.nose { position: absolute; width: 17px; height: 11px; left: 50%; top: 81px; transform: translateX(-50%); border-radius: 55% 55% 70% 70%; background: var(--ink); }
.mouth {
  position: absolute; width: 25px; height: 13px; top: 95px; left: 50%; transform: translateX(-50%);
  border-bottom: 3px solid var(--ink); border-radius: 50%;
}
.whiskers {
  position: absolute; top: 130px; width: 32px; height: 3px; border-radius: 5px;
  background: var(--ink); box-shadow: 1px 10px var(--ink);
}
.whiskers-left { left: -9px; transform: rotate(11deg); }
.whiskers-right { right: -9px; transform: scaleX(-1) rotate(11deg); }
.hat {
  position: absolute; top: -14px; right: 37px; width: 52px; height: 56px;
  display: grid; place-items: end center; padding-bottom: 4px;
  transform: rotate(15deg); clip-path: polygon(55% 0, 100% 100%, 0 100%);
  color: var(--ink); background: var(--lavender); font-size: 25px;
  border-bottom: 4px solid var(--ink);
}
.tear { position: absolute; width: 12px; height: 24px; top: 72px; border: 2px solid var(--ink); border-radius: 90% 50% 70% 70%; background: #76ddff; display: none; }
.tear-left { left: 34px; transform: rotate(18deg); } .tear-right { right: 34px; transform: rotate(-18deg); }
.tongue {
  display: none; position: absolute; width: 20px; height: 23px; left: calc(50% - 10px); top: 96px;
  background: #fa7893; border: 2px solid var(--ink); border-radius: 45% 45% 55% 55%;
  transform-origin: 50% 20%;
}
[data-reaction="hungry"] .tongue { display: block; animation: lick 1.15s ease-in-out infinite; }
[data-reaction="hungry"] .mouth { background: var(--ink); border-radius: 50%; }
@keyframes lick {
  0%, 62%, 100% { transform: scaleY(.1) translateY(-2px); opacity: 0; }
  18% { transform: rotate(-65deg) translateX(-8px); opacity: 1; }
  43% { transform: rotate(82deg) translateX(7px); opacity: 1; }
  56% { opacity: 1; }
}
.pet-cat {
  position: absolute; inset: 62px calc(50% - 100px) 12px; min-height: 0; padding: 0; border: 0;
  background: transparent; box-shadow: none; border-radius: 44%;
}
.pet-cat:active { box-shadow: none; translate: 0; }
.cat-sound {
  position: absolute; top: 25px; right: 13px; display: grid; place-items: center;
  width: 40px; min-height: 40px; padding: 0; background: var(--cream); border-radius: 50%;
}
.cat-sound[aria-pressed="true"] { background: var(--lemon); }
.stage:not([data-mood="curious"]) :is(.pet-cat, .cat-sound) { display: none; }
.purr-heart {
  display: none; position: absolute; top: 94px; z-index: 1; pointer-events: none;
  color: #ff91ac; -webkit-text-stroke: 1px var(--ink); font-size: 30px;
}
.purr-heart-left { right: calc(50% + 93px); }
.purr-heart-right { left: calc(50% + 91px); top: 70px; }
[data-reaction="purring"] .purr-heart { display: block; animation: float-heart 1.4s ease-out infinite; }
[data-reaction="purring"] .purr-heart-right { animation-delay: -.55s; }
[data-reaction="purring"] .cat { animation: nuzzle .88s ease-in-out infinite; }
@keyframes float-heart {
  0%, 100% { transform: translateY(3px) scale(.8); opacity: .7; }
  70% { transform: translateY(-15px) scale(1.13); opacity: 1; }
}
@keyframes nuzzle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}
[data-mood="serious"] .mouth { height: 5px; border-radius: 0; }
[data-mood="serious"] .brow, [data-mood="angry"] .brow, [data-mood="red"] .brow { opacity: 1; }
[data-mood="angry"] .brow-left, [data-mood="red"] .brow-left { transform: rotate(23deg) translateY(8px); }
[data-mood="angry"] .brow-right, [data-mood="red"] .brow-right { transform: rotate(-23deg) translateY(8px); }
[data-mood="angry"] .mouth, [data-mood="red"] .mouth, [data-mood="sad"] .mouth { border-top: 3px solid var(--ink); border-bottom: 0; top: 101px; }
[data-mood="red"] .cat { --fur: #ff6254; --stripe: #bf383d; transform: rotate(5deg); }
:is([data-mood="happy"], [data-mood="jump"], [data-mood="touched"], [data-reaction="purring"]) .eye {
  height: 24px; top: 56px; background: transparent; border: 4px solid var(--ink);
  border-color: var(--ink) transparent transparent; border-radius: 60%;
}
:is([data-mood="happy"], [data-mood="jump"], [data-mood="touched"], [data-reaction="purring"]) .eye i { display: none; }
:is([data-mood="happy"], [data-mood="jump"]) .mouth {
  width: 39px; height: 22px; background: #d54b70; border: 3px solid var(--ink); border-radius: 5px 5px 60% 60%;
}
:is([data-mood="sad"], [data-mood="touched"]) .tear { display: block; }
[data-mood="jump"] .cat { animation: jump .85s cubic-bezier(.36,.03,.45,1) 3; }
@keyframes jump {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  45% { transform: translateY(-45px) rotate(9deg) scale(1.05); }
}
.card {
  position: relative; padding: clamp(16px, 5vw, 28px);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 5px 7px var(--ink);
}
.event { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.event > span { display: inline-flex; gap: .35rem; align-items: center; padding: .33rem .67rem; border: 1px solid var(--ink); border-radius: 30px; background: var(--lavender); font-size: .89rem; font-weight: 740; }
.event > span:nth-child(2) { background: #ffe797; }
.event-icon { font-size: 1.15rem; line-height: 1; }
h2 { font-size: clamp(1.55rem, 5.5vw, 2.25rem); letter-spacing: -.045em; line-height: 1.1; margin: .85rem 0 .45rem; }
h2:focus { outline: none; }
p { line-height: 1.5; margin: .5rem auto; max-width: 39ch; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 1rem; }
button {
  min-height: 44px; padding: .55rem .65rem; border: 2px solid var(--ink); border-radius: 11px;
  box-shadow: 0 3px var(--ink); color: var(--ink); background: var(--lemon);
  font: inherit; font-weight: 800; cursor: pointer;
}
button:hover { filter: brightness(1.04); }
button:active { box-shadow: 0 1px var(--ink); translate: 0 2px; }
button:disabled { opacity: .63; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid #6337be; outline-offset: 3px; }
.secondary { background: var(--lavender); }
.actions button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.trap { font-size: 1.65rem; line-height: 1; }
.rsvp-no { transition: transform .18s ease-out; position: relative; z-index: 1; }
.rsvp-no.dodge-1 { transform: translate(8px, -39px) rotate(6deg); }
.rsvp-no.dodge-2 { transform: translate(-12px, -54px) rotate(-7deg); }
.hole {
  display: inline-block; width: 26px; height: 23px;
  border: 2px solid var(--ink); border-radius: 14px 14px 3px 3px; background: #52466e; box-shadow: inset 4px 0 #796299;
}
.choice-hint { min-height: 1.3em; font-size: .87rem; margin-bottom: 0; }
form { margin-top: .9rem; }
fieldset { margin: 0; border: 0; padding: 0; text-align: left; }
.person {
  display: flex; gap: .7rem; align-items: center; min-height: 52px; margin-bottom: 6px;
  padding: 7px 11px; border: 1px solid #25224c60; border-radius: 9px; background: #fffdf5; cursor: pointer;
}
.person input { width: 19px; height: 19px; accent-color: var(--ink); }
.person small { margin-left: auto; font-size: .82rem; }
.pet-icon {
  display: inline-block; flex: 0 0 28px; height: 28px;
  background: url("/pet-stickers.png") left center / 200% 100% no-repeat;
}
.pet-icon--cat { background-position: right center; }
.extra { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: .6rem 0; }
.extra input { width: 100%; padding: .65rem; border: 1px solid var(--ink); border-radius: 8px; background: white; font: inherit; color: inherit; }
.extra input[aria-invalid="true"] { border-color: #962e2b; }
.extra button { font-size: .85rem; }
.form-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: .85rem; }
.feedback { margin-top: .75rem; color: #962e2b; font-weight: 700; }
.edit { margin-top: .85rem; }
.names { font-weight: 750; overflow-wrap: anywhere; }
footer { margin: 20px auto 0; max-width: 42ch; font-size: .85rem; font-weight: 700; }
.mouse { display: none; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 6; font-size: 29px; line-height: 1; }
@media (hover: hover) and (pointer: fine) {
  body.has-mouse, body.has-mouse button, body.has-mouse label.person,
  body.has-mouse input[type="checkbox"] { cursor: default; }
  body.has-mouse .mouse { display: block; }
}
canvas { width: 100%; height: 100%; position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 375px) {
  .stage { transform: scale(.91); height: 209px; }
  .orbit { width: 265px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
