.ch {
  --ch-wine: #641f35;
  --ch-ink: #3e252d;
  --ch-gold: #986439;
  --ch-line: #a25e6a40;
  position: relative;
  isolation: isolate;
  padding: clamp(3.65rem, 6vw, 6.5rem) max(1.15rem, 4vw);
  text-align: center;
  color: var(--ch-ink);
}
.ch *, .ch *::before, .ch *::after { box-sizing: border-box; }
.ch [hidden] { display: none !important; }
.ch button { font: inherit; cursor: pointer; }
.ch button:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
.ch button:disabled { cursor: default; opacity: .55; }
.ch-wrap { width: min(100%, 76rem); margin-inline: auto; }
.ch-head { margin: 0 auto clamp(1.5rem, 3vw, 2.5rem); width: min(100%, 38rem); }
.ch-head h2, .ch-finale h2 {
  margin: .4em 0 .25em;
  font: 600 clamp(2.35rem, 4.4vw, 4.65rem)/1.25 var(--serif, Georgia, serif);
  color: var(--ch-wine);
  text-wrap: balance;
}
.ch-head p { margin: .85rem auto 0; font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.8; text-wrap: balance; }
.ch-ornament {
  color: var(--ch-gold);
  display: inline-flex;
  align-items: center;
  gap: .8rem;
}
.ch-ornament::before, .ch-ornament::after {
  content: '';
  display: inline-block;
  width: 2.65rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: .65;
}
.ch-ornament::after { rotate: 180deg; }
.ch-enter.ch-seen { animation: ch-rise .85s both cubic-bezier(.18,.47,.23,1); }
@keyframes ch-rise {
  from { transform: translateY(1.2rem); opacity: .35; }
  to { transform: translateY(0); opacity: 1; }
}

.ch-letter {
  background:
    radial-gradient(ellipse at 15% 56%, #d795ac48, transparent 56%),
    radial-gradient(ellipse at 90% 18%, #fff6e9, transparent 50%),
    #efd8d7;
  border-block: 1px solid #d9b8bb;
}
.ch-letter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.8rem, 5vw, 4rem);
}
.ch-letter::before {
  content: '';
  position: absolute;
  inset: .75rem;
  z-index: -1;
  border: 1px solid #aa795b6b;
  background: repeating-linear-gradient(127deg, #82575607 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.ch-letter .ch-head { margin: 0; width: 100%; text-align: start; }
.ch-mail-button, .ch-gift-button {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ch-wine);
}
.ch-mail-button .ch-action, .ch-gift-button .ch-action {
  transition: transform .24s ease;
  white-space: normal;
}
.ch-mail-button:hover .ch-action, .ch-gift-button:hover .ch-action { transform: translateY(-.2rem); }
.ch-envelope {
  position: relative;
  display: block;
  width: clamp(13rem, 32vw, 29rem);
  aspect-ratio: 1.55;
  margin: 1rem auto .3rem;
  border-radius: .28rem;
  background: linear-gradient(160deg, #88435d, #61293e);
  border: 1px solid #bb7f80;
  perspective: 42rem;
  box-shadow: 0 1.4rem 2.7rem #6222354a, 0 .25rem #8b495b;
  transition: transform .5s;
}
.ch-mail-button:hover .ch-envelope { transform: rotate(-2deg) translateY(-.3rem); }
.ch-envelope-flap, .ch-envelope-fold {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.ch-envelope-fold {
  background:
    repeating-linear-gradient(117deg, #fcdbcb10 0 1px, transparent 1px 3px),
    linear-gradient(145deg, #d093a2, #a45c77 76%);
  clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 100%, 0 100%);
}
.ch-envelope-fold::after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 50% 42%, 100% 100%);
  background:
    linear-gradient(133deg, transparent 34%, #f3c4998f 34.7%, transparent 35.25%),
    linear-gradient(227deg, transparent 34%, #f3c4998f 34.7%, transparent 35.25%),
    repeating-linear-gradient(110deg, #fddacd0f 0 1px, transparent 1px 3px),
    linear-gradient(150deg, #eab3b6, #ae6482);
}
.ch-envelope-flap {
  clip-path: polygon(0 0, 50% 65%, 100% 0);
  background:
    linear-gradient(145deg, transparent 17.3%, #f1c4a6ad 17.8%, transparent 18.3%),
    linear-gradient(-145deg, transparent 17.3%, #f1c4a6ad 17.8%, transparent 18.3%),
    repeating-linear-gradient(117deg, #ffdccb15 0 1px, transparent 1px 3px),
    linear-gradient(158deg, #ebc0bd, #bc718c);
  transform-origin: top center;
  transition: transform .8s cubic-bezier(.48,.03,.18,1);
}
.ch-envelope-card {
  position: absolute;
  inset: .8rem 8% 12%;
  padding: .8rem .2rem;
  background: repeating-linear-gradient(0deg, transparent 0 27px, #b4827c26 28px), #fff8eb;
  border: 1px solid #b4827c60;
  border-radius: .2rem;
  color: #73354b;
  font: 600 clamp(1.3rem, 2.6vw, 2.1rem)/1.3 var(--serif, Georgia, serif);
  box-shadow: 0 3px 14px #6f35473d;
  transition: transform .72s .19s cubic-bezier(.16,.68,.3,1);
}
.ch-wax {
  position: absolute;
  top: 53%;
  left: 50%;
  display: grid;
  place-content: center;
  width: clamp(2.45rem, 5.1vw, 3.75rem);
  aspect-ratio: 1;
  border-radius: 46% 48% 44% 49%;
  transform: translate(-50%, -20%);
  border: 1px solid #ce8490;
  box-shadow: inset 0 0 0 3px #79263b6b, inset 0 0 0 5px #c57e796b, 0 4px 9px #581a2c80;
  background: radial-gradient(at 28% 10%, #a75369, #6a2439 70%);
  color: #f0c4a4;
  font: 1.65rem/1 Georgia, serif;
  transition: opacity .26s, transform .65s;
}
.ch-wax span { text-shadow: 0 1px #521127, 0 -1px #ffe3b8; }
.ch-mail-open .ch-envelope-flap { transform: rotateX(172deg); }
.ch-mail-open .ch-envelope-card { transform: translateY(-35%); }
.ch-mail-open .ch-wax { opacity: 0; transform: translate(-50%, 20%) rotate(-20deg); }
.ch-letter-paper {
  position: relative;
  width: min(100%, 51rem);
  margin: clamp(2.7rem, 5vw, 4.6rem) auto 0;
  padding: clamp(1.75rem, 5vw, 4.1rem);
  text-align: start;
  background:
    repeating-linear-gradient(116deg, #8e544a06 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 13% 5%, #f3deca, transparent 46%),
    #fff9ed;
  border: 1px solid #aa795d96;
  outline: 1px solid #bc8e6577;
  outline-offset: -.68rem;
  box-shadow: 0 .25rem #b5837255, 0 1.1rem 2.8rem #692b3f22;
  animation: ch-rise .65s both;
  scroll-margin-block-start: 4rem;
}
.ch-letter-copy { font-size: clamp(1.075rem, 2.2vw, 1.3rem); line-height: 2.1; }
.ch-letter-line { display: none; }
.ch-letter-line.ch-written { display: block; animation: ch-rise .45s both; }
.ch-letter-line:last-child { color: var(--ch-wine); font-weight: 600; }
.ch-skip {
  color: var(--ch-wine);
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: .3rem .1rem;
  text-decoration: underline;
  text-underline-offset: .3rem;
}

.ch-reasons {
  background:
    radial-gradient(ellipse at 50% 21%, #fffdf5, transparent 58%),
    repeating-linear-gradient(123deg, #b37c5b0d 0 1px, transparent 1px 6px),
    #f8ebdf;
}
.ch-reasons .ch-head { margin-block-end: 1.7rem; }
.ch-reason-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.55rem, 1.8vw, 1.25rem);
  padding: 0;
  list-style: none;
  margin: 0;
}
.ch-reason {
  position: relative;
  display: grid;
  min-height: clamp(9.25rem, 12vw, 11rem);
  border: 1px solid #a8786977;
  background: #fffaef;
  box-shadow: inset 0 0 0 4px #fbefe6, inset 0 0 0 5px #ab7d5e40, 0 .4rem 1rem #62223516;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.ch-reason:nth-child(4n + 2), .ch-reason:nth-child(4n + 3) {
  background: #f4e0e1;
  box-shadow: inset 0 0 0 4px #f9eaea, inset 0 0 0 5px #ab7d5e43, 0 .45rem 1rem #62223516;
}
.ch-reason:has(details[open]) {
  border-color: #97586b;
  background: #fff7e9;
  box-shadow: inset 0 0 0 4px #f8e6d6, inset 0 0 0 5px #ab7d5e4a, 0 .5rem 1rem #6222351a;
}
.ch-reason:nth-child(2n) { --enter-x: .8rem; }
.ch-reason:nth-child(3n) { --enter-x: -.8rem; }
.ch-reason.ch-seen { animation: ch-card .65s backwards; animation-delay: calc(var(--order) * .085s); }
.ch-reason:hover { border-color: #97586b; }
@media (hover: hover) {
  .ch-reason:hover:not(:has(details[open])) { transform: translateY(-.35rem) rotate(var(--tilt)); }
}
.ch-reason details { display: grid; }
.ch-reason summary {
  position: relative;
  display: grid;
  align-content: center;
  gap: .65rem;
  min-height: 100%;
  padding: 1.05rem .9rem 1.65rem;
  cursor: pointer;
  list-style: none;
  line-height: 1.7;
}
.ch-reason summary::-webkit-details-marker { display: none; }
.ch-reason summary:focus-visible { outline: 2px solid var(--ch-wine); outline-offset: 3px; }
.ch-reason details[open] summary { min-height: 0; }
.ch-reason-icon {
  justify-self: center;
  display: grid;
  place-content: center;
  width: 2.7rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #bd90766f;
  background: #fff6eb;
  color: #7f3852;
  font: 1.56rem/1.1 Georgia, serif;
}
.ch-reason-toggle {
  position: absolute;
  inset-inline-end: .63rem;
  bottom: .62rem;
  color: #7d4255;
  font: 1.05rem/1 Georgia, serif;
}
.ch-reason-toggle::before { content: '+'; }
.ch-reason details[open] .ch-reason-toggle::before { content: '−'; }
.ch-reason p {
  border-block-start: 1px solid var(--ch-line);
  color: #713b50;
  font-size: .94rem;
  line-height: 1.7;
  margin: 0 .7rem .75rem;
  padding-block-start: .65rem;
}
@keyframes ch-card {
  from { opacity: .2; transform: translate(var(--enter-x, 0), 1.1rem) rotate(var(--tilt)); }
}

.ch-tree-section {
  background:
    radial-gradient(ellipse at 8% 92%, #c7848b38, transparent 49%),
    radial-gradient(ellipse at 28% 27%, #fff7e9, transparent 49%),
    #f5dedb;
  border-block: 1px solid #dbc2bd;
}
.ch-tree-layout {
  display: grid;
  grid-template: "copy art" 1fr "note art" 1fr / minmax(14rem, .72fr) minmax(0, 1.28fr);
  align-items: end;
  gap: 1.45rem clamp(1.8rem, 5vw, 5rem);
}
.ch-tree-layout .ch-head {
  grid-area: copy;
  align-self: end;
  margin: 0;
  width: auto;
  text-align: start;
}
.ch-tree-layout .ch-head p { text-wrap: pretty; }
.ch-tree {
  grid-area: art;
  position: relative;
  width: 100%;
  aspect-ratio: 760 / 560;
  min-height: 21rem;
  align-self: center;
  container-type: inline-size;
}
.ch-tree::before {
  content: '';
  position: absolute;
  inset: -1.05rem -.5rem -.35rem;
  z-index: -1;
  border: 1px solid #b18265a1;
  border-radius: 48% 48% 8% 8% / 46% 46% 9% 9%;
  background:
    radial-gradient(ellipse at 48% 35%, #fff5df, #f5dcd5 64%, #d09a983f 89%),
    #f3dbd2;
  box-shadow: inset 0 0 0 5px #fff5e56b, inset 0 0 0 6px #b182653e, 0 1.3rem 2.6rem #723f4520;
}
.ch-tree > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-trunk, .ch-branch, .ch-twigs path { fill: none; stroke: url(#ch-bark); stroke-linecap: round; stroke-linejoin: round; }
.ch-trunk { stroke-width: 13; }
.ch-branch { stroke-width: 5.8; }
.ch-branch:nth-of-type(3n) { stroke-width: 6.7; }
.ch-root { fill: url(#ch-bark); }
.ch-bark-detail { fill: none; stroke: #e1b17b; stroke-width: 1.35; opacity: .64; }
.ch-twigs path { stroke-width: 2.45; }
.ch-tree .ch-leaves use { opacity: .91; }
.ch-tree .ch-leaf-2 { filter: sepia(.35) saturate(1.15); opacity: .81; }
.ch-tree .ch-leaf-3 { filter: hue-rotate(-18deg) saturate(1.3); }
.ch-tree-dust { opacity: .72; }
.ch-seen .ch-twigs { animation: ch-bloom-leaves .55s .5s backwards; }
.ch-seen .ch-leaves { animation: ch-bloom-leaves .65s .63s backwards; }
.ch-seen .ch-tree-roses { animation: ch-bloom-leaves .76s .9s backwards; }
@keyframes ch-bloom-leaves { from { opacity: 0; } to { opacity: 1; } }
.ch-seen .ch-trunk, .ch-seen .ch-branch { animation: ch-grow .85s both ease-out; }
.ch-seen .ch-branch { animation-delay: calc(.16s + var(--branch) * .065s); }
@keyframes ch-grow { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
.ch .ch-blossom {
  position: absolute;
  top: var(--y);
  left: var(--x);
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  min-width: 3.3rem;
  min-height: 44px;
  padding: .25rem .53rem;
  border: 1px solid #9e606d;
  border-radius: 1.2rem;
  box-shadow: inset 0 0 0 2px #fdf4e96b, 0 .35rem .9rem #6e2c482e;
  background: #fff8ef;
  color: #64253a;
  font-size: .93rem !important;
  line-height: 1.15;
  transition: background .22s, color .22s, box-shadow .22s, transform .22s;
}
.ch-blossom span { display: block; margin-block-end: .1rem; color: #944464; font-family: Georgia, serif; }
.ch-blossom:hover, .ch-blossom[aria-pressed="true"] {
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 1;
  background: #702840;
  color: #fff4e8;
  box-shadow: inset 0 0 0 2px #e5b58069, 0 0 .95rem #71384e42;
}
.ch-blossom[aria-pressed="true"] span, .ch-blossom:hover span { color: #f2b6c0; }
.ch-seen .ch-blossom { animation: ch-bloom .44s backwards; animation-delay: calc(.72s + var(--branch) * .065s); }
@keyframes ch-bloom { from { transform: translate(-50%, -50%) scale(.55); opacity: 0; } }
.ch-tree-note {
  grid-area: note;
  min-height: 5.15rem;
  align-self: start;
  width: 100%;
  margin: 0;
  padding: .8rem 1rem;
  color: var(--ch-wine);
  border-inline-start: 2px solid #a96d54;
  border-block: 1px solid var(--ch-line);
  background: #fff6ec9c;
  box-shadow: 0 .65rem 1.6rem #6a354414;
  font-size: 1.02rem;
  line-height: 1.85;
  text-align: start;
}

.ch-album {
  --ch-wine: #fff0de;
  --ch-ink: #f5ded5;
  --ch-gold: #efc391;
  color: var(--ch-ink);
  background:
    radial-gradient(ellipse at 28% 35%, #7d3d5070, transparent 60%),
    repeating-linear-gradient(138deg, #efcfb805 0 1px, transparent 1px 4px),
    #3a182b;
  border-block: 1px solid #ad6b728f;
}
.ch-album-layout {
  display: grid;
  grid-template-columns: minmax(13rem, .53fr) minmax(0, 1.47fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}
.ch-album-layout .ch-head { margin: 0; width: 100%; text-align: start; }
.ch-album-art { min-width: 0; }
.ch-book {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  position: relative;
  width: min(100%, 49rem);
  min-height: clamp(15rem, 24vw, 22rem);
  margin: auto;
  padding: clamp(.65rem, 1.7vw, 1.16rem);
  gap: .6rem;
  border: 1px solid #c38b6baf;
  background: repeating-linear-gradient(120deg, #f2ba8b17 0 1px, transparent 1px 4px), #793848;
  border-radius: .35rem .35rem .55rem .55rem;
  box-shadow: 0 6px #c5a493, 0 8px #341326, 0 11px #b99b89, 0 27px 34px #150b17a6;
}
.ch-book::after {
  content: '';
  position: absolute;
  inset-block: 1.1rem;
  right: calc(58.33% - .24rem);
  pointer-events: none;
  width: 1px;
  background: #691b3252;
}
.ch-book-picture {
  display: grid;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: clamp(13rem, 21vw, 20rem);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: .6rem solid #fff4e7;
  background: #e0adad;
  color: #5c2435;
  outline-color: #f2d4ac;
}
.ch-book-picture:focus-visible { outline: 3px solid #ffd7a7 !important; }
.ch-book-picture img, .ch-book-picture .ch-picture-fallback { position: absolute; inset: 0; display: grid; width: 100%; height: 100%; object-fit: cover; }
.ch-picture-fallback {
  display: grid;
  place-content: center;
  background: radial-gradient(at 32% 19%, #ffddd1, transparent 52%), #d8a0ac;
  color: #87344a;
  font: 4.5rem/1 Georgia, serif;
}
.ch-zoom {
  position: absolute;
  bottom: .55rem;
  left: .55rem;
  display: grid;
  align-content: center;
  width: 2.5rem;
  aspect-ratio: 1;
  border: 1px solid #bb8c6e;
  border-radius: 50%;
  background: #fff6eb;
  font: 1.35rem/1 Georgia, serif;
}
.ch-caption {
  display: grid;
  align-content: center;
  position: relative;
  margin: 0;
  padding: 1.5rem 1rem;
  border: 1px solid #ceb08d;
  box-shadow: inset 0 0 0 4px #ffefd7, inset 0 0 0 5px #c49a744a;
  background:
    radial-gradient(at 90% 15%, #ecd0b0, transparent 77%),
    repeating-linear-gradient(114deg,#9962490b 0 1px,transparent 1px 4px),
    #fff2de;
  color: #5c2435;
}
.ch-caption span { color: #945a3e; font: 2rem/1 Georgia, serif; }
.ch-caption p { margin: .7rem 0 1rem; font: 600 clamp(1.35rem, 3vw, 2.2rem)/1.75 var(--serif, Georgia, serif); }
.ch-page-number { color: #754a46; direction: ltr; }
.ch-pages { display: flex; justify-content: center; gap: .85rem; align-items: center; margin: 2.3rem auto 0; }
.ch-pages button {
  min-height: 44px;
  border: 1px solid #bb838f;
  padding: .4rem 1rem;
  color: #6e2a42;
  background: #fff9f2;
  border-radius: 2rem;
}
.ch-pages button:hover { background: #f1d8df; }
.ch-page-dots { display: flex; gap: .3rem; max-width: 5rem; flex-wrap: wrap; justify-content: center; }
.ch-page-dots i { width: .45rem; aspect-ratio: 1; border-radius: 50%; background: #cb9da0; }
.ch-page-dots .ch-current { background: #773049; }
.ch-photo-dialog {
  box-sizing: border-box;
  width: min(91vw, 53rem);
  max-height: 90vh;
  margin: auto;
  padding: .65rem;
  border: 1px solid #c69a81;
  border-radius: .55rem;
  background: #fff3e8;
  color: #64253a;
}
.ch-photo-dialog::backdrop { background: #301522c9; }
.ch-photo-dialog img { display: block; width: 100%; max-height: 69vh; object-fit: contain; background: #4d2938; }
.ch-photo-dialog:has(img:not([hidden])) .ch-picture-fallback { display: none; }
.ch-photo-dialog .ch-picture-fallback { min-height: min(45vh, 17rem); }
.ch-photo-dialog p { padding: 0 1rem; margin: .75rem 0 .35rem; }
.ch-close {
  z-index: 1;
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  place-content: center;
  width: 2.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #b68277;
  background: #fffbf2;
  color: #6d2841;
  font: 1.8rem/1 Georgia, serif !important;
}
.ch-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ch-cake-section {
  --ch-wine: #fff2e4;
  --ch-gold: #efc69a;
  color: #fff0e4;
  background:
    radial-gradient(ellipse at 18% 68%, #77324a8a, transparent 52%),
    radial-gradient(ellipse at 83% 20%, #512232, transparent 66%),
    #28111d;
  border-block: 1px solid #862f4568;
}
.ch-cake-section::before, .ch-surprise::before, .ch-finale-frame {
  position: absolute;
  content: '';
  inset: .75rem;
  pointer-events: none;
  border: 1px solid #efc69a33;
}
.ch-cake-layout, .ch-gift-layout {
  display: grid;
  grid-template: "copy art" 1fr "action art" 1fr / minmax(12rem, .65fr) minmax(0, 1.35fr);
  column-gap: clamp(1.6rem, 4vw, 4.4rem);
  align-items: center;
}
.ch-cake-layout .ch-head, .ch-gift-layout .ch-head {
  grid-area: copy;
  align-self: end;
  width: 100%;
  margin: 0;
  text-align: start;
}
.ch-gift-layout:not(:has(.ch-gift-open)) .ch-head { grid-row: 1 / 3; align-self: center; }
.ch-cake-layout .ch-head h2 { color: #fff2e4; }
.ch-cake-action {
  grid-area: action;
  text-align: start;
  align-self: start;
  padding-block: 1.1rem clamp(1rem, 4vw, 3.4rem);
}
.ch-cake-art {
  grid-area: art;
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  width: 100%;
  container-type: inline-size;
  background: #2a1117;
  outline: 1px solid #d7a670a5;
  outline-offset: .42rem;
  box-shadow: 0 .89rem 2rem #12070f60;
  border-radius: .15rem;
}
.ch-cake-art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ch-cake-glow {
  position: absolute;
  inset: 4% 31% 52%;
  opacity: .59;
  pointer-events: none;
  background: radial-gradient(ellipse, #ffca803e 0, transparent 66%);
  mix-blend-mode: screen;
  transition: opacity .5s;
}
.ch-candles { position: absolute; inset: 0; pointer-events: none; }
.ch-candles i { position: absolute; inset-block-start: 18.45%; inset-inline-start: auto; left: var(--wick); width: 1px; height: 1px; }
.ch-candles b {
  position: absolute;
  bottom: 0;
  left: 0;
  width: clamp(.32rem, 1.5cqw, .76rem);
  height: clamp(.7rem, 3.4cqw, 1.68rem);
  border-radius: 70% 33% 57% 43% / 82% 81% 24% 23%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(8deg);
  background:
    radial-gradient(ellipse at 54% 92%, #fdecfa 1%, #fffef1 22%, #ffdb83 57%, #d68a55 82%, #c27549 100%);
  box-shadow: 0 0 8px #ffbf72, 0 0 19px #f6a965d4, 0 0 27px #ff835d63;
  animation: ch-flame 1.25s var(--flicker) alternate infinite ease-in-out;
  animation-play-state: paused;
}
.ch-scene-active .ch-candles b { animation-play-state: running; }
@keyframes ch-flame { to { transform: translateX(-50%) rotate(-8deg) scale(.88, 1.14); } }
.ch-candles-out b { opacity: 0; animation: none; transition: opacity .26s; }
.ch-candles-out .ch-cake-glow { opacity: 0; }
.ch-candles i span {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  left: -.1rem;
  width: .3rem;
  height: 1.7rem;
  background: linear-gradient(180deg, transparent, #e9c7b27a, #ffe6ca50, transparent);
  border-radius: 55% 48%;
  filter: blur(2px);
  opacity: 0;
}
.ch-candles-out .ch-candles i span { animation: ch-smoke 1.6s cubic-bezier(.28,.79,.54,1) both; }
@keyframes ch-smoke {
  0% { opacity: 0; transform: rotate(-9deg) scale(.6); }
  18% { opacity: .68; }
  65% { opacity: .19; transform: translate(.4rem,-1.5rem) rotate(16deg) scale(1.18); }
  100% { opacity: 0; transform: translate(.87rem,-2rem) rotate(21deg) scale(1.5); }
}
.ch-wish-note {
  max-width: 28rem;
  margin: 0 0 .9rem;
  line-height: 1.85;
  text-wrap: pretty;
  font-size: 1.1rem;
}
.ch-wish-note:empty { margin-block-end: 0; }
.ch-cake-section .button, .ch-replay {
  background: #fff2e4;
  color: #682740;
  border-color: #edc096;
}

.ch-surprise {
  padding-block: clamp(3.65rem, 5.5vw, 5.7rem);
  background:
    radial-gradient(ellipse at 18% 63%, #be7a872d, transparent 59%),
    radial-gradient(ellipse at 76% 19%, #fff6e2, transparent 65%),
    #f1d5d7;
  overflow: clip;
}
.ch-surprise::before { border-color: #a36d4d65; }
.ch-gift-button {
  grid-area: art;
  gap: .3rem;
  width: min(100%, 34rem);
}
.ch-present {
  display: block;
  width: 100%;
  max-width: 34rem;
  filter: drop-shadow(0 .5rem 1rem #511d2f26);
}
.ch-present > svg { display: block; width: 100%; height: auto; overflow: visible; }
.ch-present .ch-lid, .ch-present .ch-gift-flowers { transform-box: fill-box; transform-origin: center; }
.ch-lid { transition: transform .86s cubic-bezier(.2,.9,.27,1); }
.ch-gift-aura { opacity: .28; transition: opacity 1s; }
.ch-gift-flowers {
  opacity: 0;
  transform: translateY(90%) scale(.5);
  transition: transform .74s .17s cubic-bezier(.14,.7,.37,1), opacity .5s .17s;
}
.ch-gift-open .ch-lid { transform: translate(-10%, -82%) rotate(-16deg) scale(.91); }
.ch-gift-open .ch-gift-aura { opacity: .94; }
.ch-gift-open .ch-gift-flowers { transform: translateY(-10%) scale(1.12); opacity: 1; }
.ch-gift-note {
  grid-area: action;
  align-self: start;
  max-width: 29rem;
  margin: 1rem 0 clamp(1.25rem, 4vw, 3.5rem);
  text-align: start;
  color: var(--ch-wine);
  font: 600 clamp(1.55rem, 2.6vw, 2.45rem)/1.65 var(--serif, Georgia, serif);
  text-wrap: pretty;
  animation: ch-rise .65s backwards;
}

.ch-prayer {
  display: grid;
  min-height: clamp(27rem, 38vw, 37rem);
  place-items: center start;
  background:
    linear-gradient(260deg, #29121ce3 0%, #3d1b29b8 43%, #49192826 78%),
    var(--prayer-photo, none) center 65% / cover,
    #331520;
}
.ch-prayer-paper {
  width: min(100%, 48rem);
  margin-inline-start: max(0px, calc((100% - 76rem) / 2));
  padding: clamp(1.8rem, 4vw, 3.4rem) clamp(1.3rem, 4vw, 3.65rem);
  border: 1px solid #d5aa78;
  outline: 1px solid #a8744f95;
  outline-offset: -.55rem;
  background:
    radial-gradient(ellipse at 86% 0%, #e9cfaa82, transparent 55%),
    repeating-linear-gradient(134deg, #ab795b07 0 1px, transparent 1px 4px),
    #fff6e8;
  box-shadow: 0 1.2rem 3.5rem #21091386;
}
.ch-prayer .ch-head { margin-block-end: 1.15rem; }
.ch-prayer .ch-head h2 { font-size: clamp(2.2rem, 3.8vw, 3.8rem); }
.ch-prayer blockquote {
  margin: 0;
  color: #622f40;
  font: 600 clamp(1.42rem, 2.3vw, 2.04rem)/1.9 var(--serif, Georgia, serif);
  text-wrap: pretty;
}
.ch-finale {
  --ch-gold: #e9bb88;
  --ch-wine: #ffe9d5;
  display: grid;
  place-items: center;
  min-height: min(84svh, 43rem);
  background:
    radial-gradient(ellipse at 50% 55%, #6d2c4a, #391629bc 67%, #200e19),
    #351525;
  color: #fff2e8;
}
.ch-finale::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .3;
  background: linear-gradient(90deg, transparent, #351525 62%), url("assets/hero.webp") left 60% / cover no-repeat;
  pointer-events: none;
}
.ch-finale-frame {
  inset: clamp(.75rem, 2.5vw, 2.7rem);
  border-color: #d7aa716e;
  box-shadow: inset 0 0 0 5px #411b318c, inset 0 0 0 6px #d7aa713c;
}
.ch-finale-frame::before, .ch-finale-frame::after {
  content: '✧';
  position: absolute;
  font-size: 1.4rem;
  color: #ecc297;
  line-height: 1;
  padding: 0 .55rem;
  background: #39192b;
}
.ch-finale-frame::before { top: -.73rem; inset-inline-start: 10%; }
.ch-finale-frame::after { bottom: -.65rem; inset-inline-end: 10%; }
.ch-finale-content { width: min(100%, 37rem); }
.ch-finale-line { margin: .7rem 0; font-size: clamp(1rem, 2.5vw, 1.35rem); color: #ffe5de; }
.ch-seen .ch-finale-line { animation: ch-rise .6s backwards; animation-delay: calc(.24s + var(--line) * .55s); }
.ch-finale h2 { margin-block: .22em; }
.ch-seen.ch-finale-content h2 { animation: ch-rise .7s backwards; animation-delay: 1.85s; }
.ch-credit { margin: 1.4rem auto; color: #f1cbd0; line-height: 1.7; }
.ch-replay { margin: .6rem auto 0; }

@media (max-width: 850px) {
  .ch-reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-tree-layout, .ch-cake-layout, .ch-gift-layout, .ch-album-layout {
    justify-items: center;
    align-items: center;
    gap: clamp(1.15rem, 3vw, 1.65rem);
  }
  .ch-tree-layout { grid-template: "copy" auto "art" auto "note" auto / minmax(0, 1fr); }
  .ch-cake-layout, .ch-gift-layout { grid-template: "copy" auto "art" auto "action" auto / minmax(0, 1fr); }
  .ch-gift-layout:not(:has(.ch-gift-open)), .ch-album-layout { grid-template: "copy" auto "art" auto / minmax(0, 1fr); }
  .ch-gift-layout:not(:has(.ch-gift-open)) .ch-head, .ch-album-layout .ch-head { grid-area: copy; }
  .ch-album-art { grid-area: art; width: min(100%,49rem); }
  .ch-tree-layout .ch-head, .ch-cake-layout .ch-head, .ch-gift-layout .ch-head, .ch-album-layout .ch-head {
    text-align: center;
    width: min(100%, 34rem);
  }
  .ch-tree { max-width: 40rem; }
  .ch-tree-note { text-align: center; max-width: 37rem; min-height: 3.6rem; margin: 0; }
  .ch-prayer { place-items: center; }
  .ch-prayer-paper { margin: 0; }
  .ch-cake-art { max-width: 36rem; }
  .ch-cake-action, .ch-gift-note { text-align: center; padding: 0; margin: 0; }
  .ch-cake-layout { row-gap: 1.65rem; }
  .ch-gift-button { max-width: 29rem; }
}
@media (max-width: 560px) {
  .ch { padding-block: clamp(3.3rem, 11vw, 4.25rem); }
  .ch-letter-grid { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; }
  .ch-letter .ch-head { text-align: center; }
  .ch-envelope { width: clamp(12.75rem, 68vw, 18.5rem); }
  .ch-tree { min-height: 16.4rem; }
  .ch-tree::before { inset: -.45rem -.3rem -.15rem; }
  .ch .ch-blossom { padding-inline: .25rem; min-width: 2.8rem; min-height: 44px; font-size: .79rem !important; }
  .ch-book {
    grid-template-columns: minmax(0, 1fr);
    padding: .62rem;
    gap: .3rem;
  }
  .ch-book::after { display: none; }
  .ch-book-picture { min-height: 0; aspect-ratio: 1.24; border-width: .45rem; }
  .ch-caption { padding: .65rem .75rem; }
  .ch-caption p { margin: .15rem 0 .25rem; }
  .ch-caption span { font-size: 1.4rem; }
  .ch-prayer { min-height: auto; }
  .ch-prayer-paper { padding-inline: 1.15rem; }
  .ch-finale { min-height: min(82svh, 36rem); }
  .ch-finale::before { background-position: 45% center; }
}
@media (max-width: 365px) {
  .ch-head h2 { font-size: 2.19rem; }
  .ch-reason summary { padding-inline: .56rem; }
}
html[data-motion="reduce"] .ch *, html[data-motion="reduce"] .ch *::before, html[data-motion="reduce"] .ch *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}
@media (prefers-reduced-motion: reduce) {
  .ch *, .ch *::before, .ch *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}
