@font-face {
  font-family: "Piñata Display";
  src: url("fonts/lilita-one.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Piñata Hand";
  src: url("fonts/patrick-hand.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Piñata Russian Display";
  src: url("fonts/rubik-black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Piñata Russian Hand";
  src: url("fonts/neucha.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.invite-page {
  --invite-ink: #25241f;
  --invite-paper: #fff2d9;
  --invite-blue: #056577;
  box-sizing: border-box;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  background: #292330;
  color: var(--invite-ink);
  font: 400 24px/1.2 "Piñata Hand", "Piñata Russian Hand", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.invite-page *, .invite-page *::before, .invite-page *::after { box-sizing: border-box; }
.invite-page [hidden] { display: none !important; }

.invite-card {
  width: min(100%, 424px);
  min-width: 0;
  margin: 0;
  padding: 2px clamp(10px, 3vw, 22px) 12px;
  border: 24px solid transparent;
  border-image: url("images/invite-paper.png") 112 80 112 80 fill / 24px / 0 stretch;
  text-align: center;
}
.invite-brand {
  margin: 0 0 8px;
  font: 400 30px/1 "Piñata Display", "Piñata Russian Display", system-ui, sans-serif;
  letter-spacing: -.04em;
}
.invite-scene {
  width: min(100%, 290px);
  height: clamp(140px, 24svh, 190px);
  max-height: 200px;
  margin: 12px auto 18px;
}
.invite-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  transform: rotate(-1deg);
}
.invite-heading {
  margin: 0 auto 14px;
  max-width: 11ch;
  font: 400 clamp(34px, 8.6vw, 44px)/.98 "Piñata Display", "Piñata Russian Display", system-ui, sans-serif;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.invite-heading::after {
  content: "";
  display: block;
  width: 160px;
  max-width: 70%;
  height: 15px;
  margin: 9px auto 0;
  background: url("images/invite-underline.png") center / contain no-repeat;
}
.invite-intro {
  margin: 0 auto 16px;
  max-width: 23ch;
  font-size: 24px;
  line-height: 1.16;
  text-wrap: balance;
}
.invite-actions { margin: 0; }
.invite-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 290px);
  aspect-ratio: 768 / 224;
  min-height: 64px;
  margin: 0 auto;
  padding: 12px 25px;
  border: 0;
  border-radius: 0;
  background: url("images/invite-open.png") center / 100% 100% no-repeat;
  color: var(--invite-ink);
  font: 400 clamp(27px, 7vw, 32px)/1 "Piñata Display", "Piñata Russian Display", system-ui, sans-serif;
  letter-spacing: -.025em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s cubic-bezier(.2,.7,.2,1);
}
.invite-open > span { display: block; transform: rotate(-.7deg); }
.invite-open:focus-visible, .invite-stores a:focus-visible {
  outline: 3px solid #dc005d;
  outline-offset: 4px;
}
.invite-open:active { transform: translateY(1px); }
.invite-open[aria-disabled="true"], .invite-open:disabled, .invite-open.disabled {
  opacity: .55;
  cursor: default;
  pointer-events: none;
  transform: none;
}
.invite-status {
  margin: 14px auto 0;
  max-width: 25ch;
  font-size: 21px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.invite-status:empty { display: none; }
.invite-stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 16px 0 0;
  font-size: 21px;
}
.invite-stores a {
  color: var(--invite-blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.invite-footnote {
  margin: 14px auto 0;
  max-width: 28ch;
  font-size: 18px;
  line-height: 1.15;
}
:lang(ru) .invite-heading, :lang(ru) .invite-open { font-weight: 900; letter-spacing: -.025em; }
:lang(ja) .invite-heading, :lang(ko) .invite-heading, :lang(zh) .invite-heading {
  max-width: 13ch;
  font-size: 32px;
  line-height: 1.14;
}
:lang(ja) .invite-intro, :lang(ko) .invite-intro, :lang(zh) .invite-intro { font-size: 20px; line-height: 1.4; }
@media (hover: hover) {
  .invite-open:hover { transform: translateY(-1px); }
}
@media (max-height: 740px) {
  .invite-scene { height: 140px; margin: 8px auto 14px; }
  .invite-heading { font-size: 36px; }
  .invite-intro { font-size: 22px; margin-bottom: 12px; }
  .invite-card { padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .invite-open { transition: none; }
  .invite-open:hover, .invite-open:active { transform: none; }
}
