:root {
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  --background: #f9e9ee;
  --paper: #fffafb;
  --ink: #512139;
  --muted: #775365;
  --accent: #933055;
  --line: #dfb9c9;
  --hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
  background: var(--background);
  color: var(--ink);
}

body[data-site="man"] {
  --background: #e9f0f4;
  --paper: #fcfdfd;
  --ink: #183e52;
  --muted: #4e6878;
  --accent: #265a73;
  --line: #b9cdd8;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }

.page {
  min-height: 100svh;
  max-width: 1280px;
  margin-inline: auto;
  padding: 38px 64px 26px;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: .875rem;
}

.brand { font-weight: 600; text-decoration: none; }
.header-note { color: var(--muted); }

.love-letter {
  width: 100%;
  max-width: 1010px;
  margin: auto;
  padding-block: 67px 52px;
}

h1 {
  margin: 0 0 45px;
  font-family: var(--hand);
  font-size: clamp(3.1rem, 6.8vw, 5.6rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.045em;
  text-align: center;
  text-wrap: balance;
}

.note {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 38px;
  max-width: 800px;
  margin: 0 auto;
  padding: 43px 54px 39px 40px;
  background: var(--paper);
  border-radius: 5px 5px 35px 5px;
  box-shadow: 0 8px 0 -4px var(--background), 0 9px 0 -4px var(--line);
}

.heart {
  width: 135px;
  height: auto;
  transform: rotate(-9deg);
}

.salutation, .signoff {
  font-family: var(--hand);
  font-size: 1.65rem;
  line-height: 1.25;
  font-weight: 700;
}

.salutation { margin: 0 0 17px; }
.message { font-size: 1.125rem; line-height: 1.7; }
.message p { margin: 0 0 15px; }
.signoff { margin: 24px 0 0; }
.footnote { margin: 31px 0 0; text-align: center; font-size: .95rem; color: var(--muted); }

.sharing { margin: 30px auto 0; text-align: center; }
.share-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.button {
  min-height: 46px;
  padding: 12px 23px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--paper);
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button:hover { filter: brightness(.94); }
.share-address { display: inline-block; margin-top: 16px; font-size: .8125rem; color: var(--muted); }
.share-status { min-height: 1.5em; margin: 9px 0 0; font-size: .875rem; color: var(--muted); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 28px;
  padding-top: 20px;
  color: var(--muted);
  font-size: .8125rem;
}

.simple-page {
  width: 100%;
  max-width: 680px;
  margin: auto;
  padding-block: 76px;
}

.simple-page h1 { font-size: clamp(2.8rem, 5vw, 4rem); text-align: left; margin-bottom: 32px; }
.simple-page p { font-size: 1.0625rem; line-height: 1.75; }
.simple-page .button { margin-top: 17px; }
.simple-page .heart { width: 72px; margin-bottom: 24px; }

@media (min-width: 1500px) {
  .love-letter { padding-block: 85px; }
}

@media (max-width: 700px) {
  .page { padding: 26px 23px 24px; }
  .site-header { font-size: .8125rem; gap: 12px; }
  .header-note { display: none; }
  .love-letter { padding-block: 45px 30px; }
  h1 { margin-bottom: 31px; font-size: clamp(2.65rem, 11vw, 4.5rem); }
  .note { padding: 31px 29px 29px; grid-template-columns: minmax(0, 1fr); }
  .note .heart { position: absolute; top: 24px; right: 27px; width: 47px; }
  .salutation { margin-bottom: 25px; padding-right: 55px; }
  .message { font-size: 1rem; line-height: 1.65; }
  .signoff { margin-top: 22px; font-size: 1.55rem; }
  .footnote { margin-top: 26px; font-size: .875rem; }
  .sharing { margin-top: 24px; }
  .site-footer { gap: 18px; font-size: .75rem; }
  .simple-page { padding-block: 65px; }
}

@media (max-width: 360px) {
  .page { padding-inline: 17px; }
  .note { padding-inline: 23px; }
  h1 { font-size: 2.85rem; }
  .button { padding-inline: 16px; }
}
