dialog {
  border: 1px solid #dce1d5;
  border-radius: 6px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  max-width: calc(100% - 32px);
  max-height: calc(100svh - 48px);
  box-shadow: 0 24px 80px #1b2b3140;
  overscroll-behavior: contain;
}
.wish-access {
  margin-bottom: 18px;
}
.wish-access-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wish-access-controls input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f5f6ef;
  color: var(--ink);
}
.wish-dialog .wish-sharing {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 9px;
  align-items: start;
  font-size: 11px;
  line-height: 1.8;
  margin: 12px 0;
  text-align: left;
  color: #64705f;
}
.wish-sharing input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}
#wish-save-status {
  flex: 1;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
#wish-save-status[data-error="true"] {
  color: var(--coral);
}
#wish-counter {
  flex-shrink: 0;
}
#wish-form[aria-busy="true"] button {
  opacity: 0.65;
  cursor: wait;
}
dialog::backdrop {
  background: #223a315c;
  backdrop-filter: blur(5px);
}
dialog[open] {
  animation: dialog-in 0.25s ease;
}
.dialog-close {
  position: absolute;
  right: 15px;
  top: 14px;
  z-index: 2;
  background: #fcfcf9e6;
}
.dialog-close[data-tooltip]:after {
  left: auto;
  right: 0;
  transform: none;
  bottom: auto;
  top: calc(100% + 5px);
}
.letter-dialog {
  width: 700px;
}
.dialog-tools {
  position: sticky;
  top: 0;
  height: 0;
  z-index: 5;
}
.letter-content {
  padding: 53px 65px 49px;
}
.letter-content > .eyebrow {
  color: #8b967f;
  font-size: 9px;
}
.letter-content > h2 {
  font: 500 34px var(--serif);
  margin-top: 14px;
}
.letter-content > time {
  font-size: 10px;
  color: #929a89;
  display: block;
  margin-top: 16px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.letter-greeting {
  font: 18px var(--serif);
  margin: 29px 0 18px;
}
#letter-paragraphs p {
  font-size: 14px;
  line-height: 2.3;
  color: #64705f;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.letter-signature {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-top: 29px;
  font-size: 11px;
  color: #88917e;
}
.letter-signature strong {
  font: 18px var(--serif);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.letter-signature svg {
  color: var(--coral);
  width: 22px;
  height: 22px;
  margin-top: 5px;
}
.wish-dialog {
  width: 474px;
  padding: 43px 40px 28px;
  text-align: center;
}
.wish-dialog-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ebefdf;
  color: #8a986e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.wish-dialog > .eyebrow {
  font-size: 8px;
  color: #949d89;
}
.wish-dialog h2 {
  font: 500 25px/1.6 var(--serif);
  margin-top: 12px;
}
.wish-dialog-copy {
  font-size: 11px;
  color: #939b8a;
  margin-top: 8px;
}
.wish-dialog form {
  margin-top: 26px;
  text-align: left;
}
.wish-dialog label {
  font-size: 11px;
  display: block;
  margin-bottom: 9px;
}
.wish-dialog textarea {
  width: 100%;
  resize: vertical;
  min-height: 112px;
  max-height: 220px;
  padding: 13px 15px;
  line-height: 1.9;
  font-size: 13px;
  border: 1px solid #d5dccd;
  border-radius: 3px;
  background: #f5f6ef;
  color: var(--ink);
}
.wish-dialog textarea::placeholder {
  color: #a0a792;
}
.wish-form-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  color: #8d9680;
  min-height: 27px;
  padding-top: 6px;
}
.wish-submit {
  width: 100%;
  margin-top: 8px;
}
.wish-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 48px;
}
.wish-secondary-actions .text-button {
  color: #8a937e;
  font-size: 11px;
}
.wish-secondary-actions > .icon-button {
  position: absolute;
  right: 0;
  width: 32px;
  height: 32px;
  color: #9d756b;
}
.history-dialog {
  width: min(560px, calc(100% - 32px));
}
.history-dialog-content {
  padding: 47px 42px 38px;
}
.history-dialog-content > .eyebrow {
  font-size: 8px;
  color: #949d89;
}
.history-dialog-content h2 {
  font: 500 27px/1.5 var(--serif);
  margin-top: 11px;
}
.history-dialog-copy {
  color: #939b8a;
  font-size: 11px;
  margin-top: 8px;
}
.history-list {
  display: grid;
  gap: 12px;
  margin-top: 27px;
}
.history-entry {
  border: 1px solid #e0e3d9;
  border-left: 3px solid #b95f50;
  background: #f7f8f2;
  padding: 17px 18px 15px;
}
.history-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.history-entry-year {
  color: var(--ink);
  font: 500 22px Georgia, serif;
}
.history-entry-label,
.history-entry-date {
  color: #8d9680;
  font-size: 9px;
}
.history-entry-message {
  color: #536152;
  font: 16px/1.9 var(--serif);
  margin-top: 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.history-entry-date {
  display: block;
  margin-top: 11px;
}
.history-empty {
  color: #939b8a;
  font-size: 12px;
  line-height: 1.9;
  margin-top: 28px;
}
.photo-dialog {
  width: min(900px, calc(100% - 32px));
}
.photo-dialog > img {
  width: 100%;
  max-height: 65svh;
  object-fit: contain;
  background: #edf0e8;
}
.photo-caption {
  padding: 23px 28px 26px;
}
.photo-caption h2 {
  font: 500 24px var(--serif);
}
.photo-caption p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 9px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  max-width: calc(100% - 32px);
  width: max-content;
  transform: translate(-50%, 15px);
  padding: 14px 23px;
  line-height: 1.7;
  background: var(--ink);
  color: white;
  font-size: 12px;
  box-shadow: 0 6px 26px #162a2625;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s;
  z-index: 100;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.noscript-note {
  padding: 24px;
  text-align: center;
  font-family: var(--serif);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1600px) {
  .hero-inner {
    max-width: 1440px;
  }
  .hero-handwriting {
    right: 175px;
  }
  .hero {
    max-height: 680px;
  }
  .hero h1 {
    font-size: 74px;
  }
  .hero h1 [data-age] {
    font-size: 94px;
  }
}
@media (max-width: 1100px) {
  .nav-inner {
    padding: 0 36px;
    gap: 20px;
  }
  .nav-inner nav {
    gap: 23px;
  }
  .edition {
    display: none;
  }
  .hero-inner {
    padding: 0 60px;
  }
  .hero h1 {
    font-size: 56px;
  }
  .hero h1 [data-age] {
    font-size: 75px;
  }
  .hero-actions {
    gap: 20px;
  }
  .birthday-stamp {
    right: 45px;
    width: 85px;
    height: 85px;
  }
  .hero-handwriting {
    right: 75px;
    font-size: 24px;
  }
  .hero-side-note {
    right: 20px;
  }
  .letter-section {
    gap: 56px;
  }
  .letter-intro h2 {
    font-size: 33px;
  }
  .section-inner {
    padding-left: 40px;
    padding-right: 40px;
  }
  .section-inner h2 {
    font-size: 31px;
  }
  .wishes-grid {
    gap: 10px;
  }
  .wish-front {
    padding: 14px;
  }
  .wish-front strong {
    font-size: 11px;
  }
  .wish-front > svg {
    right: 12px;
    width: 16px;
    height: 16px;
  }
  .wish-back {
    font-size: 10px;
    padding: 17px 12px;
  }
  .plans-grid {
    gap: 20px;
  }
}
@media (max-width: 800px) {
  .site-header {
    height: 72px;
  }
  .nav-inner {
    padding: 0 26px;
  }
  .wordmark-english {
    display: none;
  }
  .wordmark {
    font-size: 22px;
  }
  .wordmark > svg {
    width: 28px;
    height: 28px;
  }
  .nav-inner nav {
    gap: 20px;
    font-size: 11px;
  }
  .hero-inner {
    padding: 0 38px;
  }
  .hero-copy {
    width: 55%;
  }
  .hero h1 {
    font-size: 47px;
  }
  .hero h1 [data-age] {
    font-size: 64px;
  }
  .hero-eyebrow {
    font-size: 7px;
    margin-bottom: 24px;
    gap: 7px;
  }
  .little-line {
    width: 16px;
  }
  .salutation {
    font-size: 12px;
  }
  .hero-description {
    font-size: 11px;
  }
  .hero-actions {
    gap: 18px;
  }
  .hero-actions .button {
    font-size: 11px;
    padding: 0 18px;
    gap: 14px;
    min-height: 46px;
  }
  .hero-actions .text-button {
    font-size: 10px;
    gap: 8px;
  }
  .hero-date {
    gap: 8px;
    font-size: 8px;
  }
  .birthday-stamp {
    right: 26px;
    top: 27px;
    width: 74px;
    height: 74px;
  }
  .birthday-stamp strong {
    font-size: 28px;
  }
  .birthday-stamp span {
    font-size: 7px;
  }
  .hero-handwriting {
    right: 50px;
    font-size: 22px;
    bottom: 90px;
  }
  .hero-side-note {
    display: none;
  }
  .section-inner {
    padding: 70px 30px;
  }
  .letter-section {
    gap: 35px;
  }
  .section-inner h2,
  .letter-intro h2 {
    font-size: 28px;
  }
  .section-description {
    font-size: 12px;
  }
  .letter-sparkle {
    right: 20px;
    bottom: 15px;
    width: 23px;
    height: 23px;
  }
  .envelope {
    height: 243px;
  }
  .envelope-to {
    left: 22px;
  }
  .postage {
    right: 19px;
  }
  .envelope-paper {
    padding: 17px;
  }
  .envelope-paper span + span {
    font-size: 14px;
  }
  .wishes-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .wish-card {
    height: 123px;
  }
  .wish-front strong {
    font-size: 12px;
  }
  .wish-back {
    font-size: 11px;
    padding: 19px 14px;
  }
  .section-heading {
    gap: 14px;
  }
  .wish-progress {
    font-size: 9px;
  }
  .future-description {
    font-size: 10px;
  }
  .plans-grid {
    gap: 16px;
  }
  .plan h3 {
    font-size: 19px;
  }
  .plan-note {
    font-size: 10px;
  }
  .plan-tag {
    font-size: 6px;
    gap: 7px;
  }
  .plan-tag:before {
    width: 12px;
  }
  .closing-inner h2 {
    font-size: 36px;
  }
  .site-footer {
    padding: 24px 30px;
  }
  .love-ribbon > div {
    font-size: 9px;
    gap: 24px;
  }
  .love-ribbon > div > span:last-child {
    display: none;
  }
}
@media (max-width: 600px) {
  html {
    scroll-padding-top: 22px;
  }
  .site-header {
    height: 66px;
  }
  .nav-inner {
    padding: 0 21px;
    gap: 14px;
  }
  .wordmark {
    font-size: 20px;
    gap: 6px;
  }
  .wordmark > svg {
    width: 24px;
    height: 24px;
  }
  .nav-inner nav {
    gap: 15px;
    font-size: 10px;
  }
  .nav-inner nav a:last-child {
    display: none;
  }
  .music-button {
    width: 34px;
    height: 34px;
  }
  .music-button svg {
    width: 16px;
    height: 16px;
  }
  .hero {
    height: calc(100svh - 122px);
    min-height: 600px;
    max-height: 780px;
  }
  .hero-inner {
    padding: 0 29px;
  }
  .hero-copy {
    width: 100%;
    height: auto;
    padding-top: 34px;
    padding-bottom: 0;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
  }
  .hero-eyebrow {
    font-size: 7px;
    margin-bottom: 17px;
  }
  .salutation {
    font-size: 11px;
    margin-bottom: 11px;
  }
  .hero h1 {
    font-size: 38px;
    line-height: 1.3;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
  }
  .hero h1 [data-age] {
    font-size: 51px;
  }
  .hero-description {
    font-size: 11px;
    margin-top: 15px;
    line-height: 1.95;
  }
  .hero-actions {
    margin-top: 20px;
    gap: 27px;
  }
  .hero-actions .button {
    font-size: 11px;
    padding: 0 20px;
    min-height: 43px;
    gap: 18px;
  }
  .hero-actions .text-button {
    font-size: 10px;
  }
  .hero-date {
    position: absolute;
    bottom: 22px;
    left: 25px;
    right: 25px;
    justify-content: center;
    font-size: 8px;
    gap: 10px;
    margin: 0;
  }
  .hero-date .date-line {
    display: none;
  }
  .hero-scene.scene-fallback {
    background-size: auto 43%;
    background-position: center calc(100% - 65px);
  }
  .birthday-stamp {
    top: auto;
    right: 29px;
    bottom: 258px;
    width: 69px;
    height: 69px;
    transform: rotate(12deg);
  }
  .birthday-stamp strong {
    font-size: 27px;
  }
  .birthday-stamp span {
    font-size: 6px;
  }
  .hero-handwriting {
    right: auto;
    left: 30px;
    bottom: 71px;
    font-size: 19px;
    transform: rotate(-6deg);
  }
  .hero-scroll {
    right: 27px;
    left: auto;
    bottom: 54px;
  }
  .love-ribbon > div {
    min-height: 55px;
    gap: 20px;
    justify-content: center;
    font-size: 9px;
    padding: 12px 20px;
  }
  .love-ribbon > div > span:nth-of-type(2),
  .love-ribbon > div > svg:nth-of-type(2),
  .love-ribbon > div > svg:nth-of-type(3) {
    display: none;
  }
  .love-ribbon svg {
    width: 14px;
    height: 14px;
  }
  .section-inner {
    padding: 62px 25px;
  }
  .section-eyebrow {
    font-size: 8px;
    margin-bottom: 13px;
  }
  .section-inner h2,
  .letter-intro h2 {
    font-size: 29px;
    line-height: 1.6;
  }
  .letter-section {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-bottom: 78px;
  }
  .letter-intro {
    padding: 0 7px;
  }
  .section-description {
    font-size: 12px;
    margin-top: 14px;
  }
  .with-love {
    font-size: 19px;
    margin-top: 23px;
  }
  .letter-sparkle {
    right: 35px;
    bottom: 30px;
    width: 31px;
    height: 31px;
  }
  .envelope {
    width: calc(100% - 14px);
    height: 247px;
    justify-self: center;
  }
  .envelope-to {
    left: 26px;
  }
  .postage {
    right: 23px;
  }
  .envelope-paper {
    padding: 19px;
    font-size: 7px;
  }
  .envelope-paper span + span {
    font-size: 15px;
  }
  .section-heading {
    display: block;
    margin-bottom: 27px;
  }
  .wishes-section h2 {
    font-size: 26px;
  }
  .wishes-section .section-description {
    font-size: 11px;
    margin-top: 10px;
  }
  .wish-progress {
    margin-top: 18px;
    padding: 0;
    font-size: 10px;
    gap: 7px;
  }
  .wish-progress svg {
    width: 12px;
    height: 12px;
  }
  .wishes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .wish-card {
    height: 119px;
  }
  .wish-front {
    padding: 13px 11px;
  }
  .wish-number {
    font-size: 16px;
  }
  .wish-front strong {
    font-size: 11px;
    padding-right: 0;
  }
  .wish-front > svg {
    top: 14px;
    right: 10px;
    width: 15px;
    height: 15px;
  }
  .wish-back {
    font-size: 10px;
    line-height: 1.9;
    padding: 17px 10px;
  }
  .wishes-bottom {
    font-size: 9px;
    gap: 12px;
    margin-top: 17px;
  }
  .wishes-bottom .text-button {
    font-size: 10px;
    gap: 7px;
  }
  .future-section .section-heading h2 {
    font-size: 26px;
  }
  .future-description {
    margin-top: 14px;
    font-size: 12px;
  }
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .plan-image {
    aspect-ratio: 1.5;
  }
  .plan figcaption {
    padding-top: 17px;
  }
  .plan-tag {
    font-size: 8px;
    gap: 10px;
    margin-bottom: 7px;
  }
  .plan-tag:before {
    width: 20px;
  }
  .plan h3 {
    font-size: 23px;
  }
  .plan-note {
    font-size: 11px;
    margin-top: 5px;
  }
  .plan-save {
    width: 37px;
    height: 37px;
  }
  .future-footnote {
    margin-top: 38px;
    font-size: 10px;
    gap: 7px;
    line-height: 1.8;
    text-align: center;
  }
  .closing-section {
    padding: 54px 25px 49px;
  }
  .closing-inner h2 {
    font-size: 33px;
  }
  .closing-inner > p {
    font-size: 11px;
  }
  .closing-handwriting {
    font-size: 14px;
  }
  .closing-inner .button {
    font-size: 12px;
    min-height: 46px;
  }
  .site-footer {
    padding: 25px 25px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
  }
  .footer-mark {
    font-size: 17px;
  }
  .site-footer > span {
    grid-row: 2;
    grid-column: 1/-1;
    justify-content: flex-start;
    font-size: 8px;
  }
  .site-footer > time {
    display: none;
  }
  .site-footer > .icon-button {
    grid-column: 2;
    grid-row: 1;
    width: 32px;
    height: 32px;
  }
  .letter-content {
    padding: 43px 25px 34px;
  }
  .letter-content > h2 {
    font-size: 29px;
  }
  .letter-greeting {
    font-size: 17px;
  }
  #letter-paragraphs p {
    font-size: 13px;
    line-height: 2.15;
  }
  .letter-signature strong {
    font-size: 17px;
  }
  .dialog-close {
    right: 8px;
    top: 8px;
    width: 36px;
    height: 36px;
  }
  .wish-dialog {
    padding: 38px 24px 22px;
  }
  .wish-dialog h2 {
    font-size: 23px;
  }
  .wish-dialog-copy {
    font-size: 10px;
  }
  .history-dialog-content {
    padding: 40px 23px 27px;
  }
  .history-dialog-content h2 {
    font-size: 23px;
  }
  .history-entry-message {
    font-size: 15px;
  }
  .photo-caption {
    padding: 20px;
  }
  .photo-caption h2 {
    font-size: 23px;
  }
  .photo-caption p {
    font-size: 11px;
  }
  .toast {
    font-size: 11px;
    padding: 12px 17px;
    bottom: 20px;
  }
}
@media (max-width: 380px) {
  .nav-inner {
    padding: 0 16px;
    gap: 10px;
  }
  .wordmark {
    font-size: 18px;
  }
  .nav-inner nav {
    gap: 12px;
    font-size: 9px;
  }
  .hero-inner {
    padding: 0 18px;
  }
  .hero h1 {
    font-size: 35px;
  }
  .hero h1 [data-age] {
    font-size: 48px;
  }
  .hero-copy {
    padding-top: 29px;
  }
  .hero-description {
    margin-top: 13px;
  }
  .hero-actions {
    gap: 20px;
  }
  .hero-actions .button {
    padding: 0 16px;
  }
  .hero-handwriting {
    font-size: 17px;
    left: 24px;
  }
  .section-inner {
    padding-left: 21px;
    padding-right: 21px;
  }
  .wishes-section h2,
  .future-section .section-heading h2 {
    font-size: 23px;
  }
  .wish-card {
    height: 115px;
  }
  .wish-front strong {
    font-size: 10px;
  }
  .wish-front {
    padding: 13px 10px;
  }
  .wish-back {
    font-size: 9px;
    padding: 16px 9px;
  }
  .wish-front > svg {
    width: 13px;
    height: 13px;
  }
  .birthday-stamp {
    right: 23px;
    width: 62px;
    height: 62px;
  }
}
@media (max-width: 600px) and (max-height: 740px) {
  .hero {
    min-height: 480px;
    max-height: 620px;
  }
  .hero-copy {
    padding-top: 23px;
  }
  .hero-eyebrow {
    margin-bottom: 12px;
  }
  .salutation {
    margin-bottom: 8px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .hero h1 [data-age] {
    font-size: 49px;
  }
  .hero-description {
    margin-top: 12px;
    font-size: 10px;
  }
  .hero-actions {
    margin-top: 16px;
  }
  .hero-actions .button {
    min-height: 39px;
  }
  .birthday-stamp {
    bottom: 191px;
    width: 58px;
    height: 58px;
  }
  .birthday-stamp strong {
    font-size: 23px;
  }
  .hero-handwriting {
    bottom: 61px;
    font-size: 17px;
  }
  .hero-date {
    bottom: 17px;
  }
  .hero-scroll {
    bottom: 42px;
  }
}
@media (max-width: 600px) and (max-height: 620px) {
  .hero-scene.scene-fallback {
    background-size: auto 35%;
    background-position: center calc(100% - 55px);
  }
  .hero {
    min-height: 425px;
  }
  .hero-copy {
    padding-top: 18px;
  }
  .hero-eyebrow {
    margin-bottom: 9px;
  }
  .hero-description {
    margin-top: 9px;
  }
  .hero-actions {
    margin-top: 12px;
  }
  .hero h1 {
    font-size: 33px;
  }
  .hero h1 [data-age] {
    font-size: 44px;
  }
  .birthday-stamp {
    bottom: 161px;
  }
  .hero-handwriting {
    bottom: 45px;
  }
  .hero-scroll {
    bottom: 33px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .wish-back,
  .wish-front {
    backface-visibility: visible;
  }
}
