:root {
  --desk: #cfc6b8;
  --paper: #fbf6ea;
  --ink: #2a241c;
  --ink-soft: #4a4338;
  --mute: #746c61;
  --rule: rgba(62, 92, 158, 0.12);
  --margin: #e3b4ad;
  --hl-yellow: #ffe56a;
  --hl-mint: #c8f5b8;
  --line: 1.75rem;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  overflow-x: clip;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(255, 255, 255, 0.26), transparent 58%),
    var(--desk);
  color: var(--ink);
  font-family: Caveat, "Segoe Print", cursive;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--hl-yellow);
  color: var(--ink);
}

.note {
  width: min(33.5rem, 100%);
  padding: 1.75rem 1.65rem 2.15rem 2.45rem;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--margin), var(--margin)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--line) - 1px),
      var(--rule) calc(var(--line) - 1px),
      var(--rule) var(--line)
    );
  background-size: 1px 100%, 100% var(--line);
  background-position: 1.55rem 0, 0 0.5rem;
  background-repeat: no-repeat, repeat;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 16px 36px rgba(70, 55, 30, 0.16),
    0 2px 6px rgba(70, 55, 30, 0.1);
  rotate: -0.25deg;
}

header {
  margin: 0 0 1.4rem;
}

.date {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--mute);
}

h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.55rem, 1.35rem + 0.7vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

article p {
  margin: 0 0 1.4rem;
  font-size: clamp(1.06rem, 1rem + 0.24vw, 1.14rem);
  line-height: var(--line);
  letter-spacing: 0.012em;
  color: var(--ink-soft);
}

article p:last-child {
  margin-bottom: 0;
  color: var(--ink);
}

em {
  font-family: Lora, Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.84em;
  letter-spacing: -0.01em;
  color: var(--ink);
}

mark {
  background: var(--hl-yellow);
  color: inherit;
  padding: 0.05em 0.16em;
  border-radius: 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

mark.hl-mint {
  background: var(--hl-mint);
}

.emo {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal;
  font-size: 0.88em;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: fit-content;
  min-height: 44px;
  margin: 0;
  padding: 0.4rem 1.25rem 0.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 255px 40px 225px 35px / 40px 225px 40px 255px;
  background: var(--ink);
  color: var(--paper);
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  rotate: -0.8deg;
}

.cta-arrow {
  display: inline-flex;
  width: 1.1em;
  height: 0.66em;
  translate: 0.02em 0.1em;
  rotate: -8deg;
  transition: translate 0.2s ease;
}

.cta-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cta:hover {
  background: var(--hl-yellow);
  color: var(--ink);
}

.cta:hover .cta-arrow {
  translate: 0.16em 0.08em;
}

.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.invite {
  margin: 1.4rem 0 0;
  width: 100%;
  font-size: clamp(1.06rem, 1rem + 0.24vw, 1.14rem);
  line-height: var(--line);
  letter-spacing: 0.012em;
  color: var(--ink-soft);
}

.ps {
  margin-right: 0.28em;
  font-weight: 600;
  color: var(--ink);
}

.signoff {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1.5rem;
  rotate: -1.5deg;
}

.sign {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.sign-role {
  margin-top: -0.08rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}

@media (min-width: 700px) {
  body {
    align-items: center;
    padding: 3rem 1.5rem;
  }

  .note {
    padding: 2rem 2.1rem 2.35rem 2.85rem;
    background-position: 1.9rem 0, 0 0.5rem;
  }
}
