/* Template artwork is decorative. All personal information stays real HTML. */
.has-artwork .sec-cover { position: relative; isolation: isolate; overflow: hidden; }
.cover-art { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.has-artwork.doc-wedding .sec-cover { padding: 5rem 2.8rem 4rem; }
.has-artwork.doc-wedding .sec-cover:not(.has-photo) { min-height: 44rem; min-height: min(47rem, max(40rem, 100svh - var(--ribbon-height)) ); }
.has-artwork.doc-wedding .cover-kicker { font-size: .55rem; letter-spacing: .28em; }
.has-artwork.doc-wedding .sec-cover:not(.has-photo) .cover-kicker { margin-bottom: 4rem; }
.has-artwork.doc-wedding .cover-names { font-size: 1.8rem; font-weight: 400; }
.has-artwork.doc-wedding .cover-when { font-size: .8rem; }
.has-artwork.doc-wedding .cover-where { font-size: .75rem; }
.has-artwork.doc-wedding .cover-photo { width: 90%; padding: .35rem; background: #fffc; box-shadow: 0 .6rem 1.5rem #313b2514; }
.has-artwork.doc-wedding .cover-photo img { display: block; aspect-ratio: 4/5; }
body.tpl-w-botanical { --paper: #fbf8ee; --surface: #fffdf5; --wash: #f0f0e5; --ink: #404736; --muted: #676d5d; --line: #dadfcf; --heading-font: var(--font-batang); --heading-weight: 400; --radius: .2rem; --section-space: 4.5rem; }
body.tpl-w-editorial { --paper: #faf7f0; --surface: #fffdf8; --wash: #efe8df; --ink: #554b40; --muted: #72685e; --line: #dfd8cb; --heading-font: var(--font-batang); --heading-weight: 400; --radius: .1rem; --section-space: 4.75rem; }
.tpl-w-editorial.doc-wedding .sec-cover:not(.has-photo) { padding-top: 10rem; }
.tpl-w-editorial.doc-wedding .cover-names { flex-direction: column; align-items: center; gap: .4rem; }
.tpl-w-editorial.doc-wedding .cover-names .amp { font-size: .65rem; margin-block: .4rem; }
.tpl-w-editorial.doc-wedding .sec-cover:not(.has-photo) .cover-kicker { margin-bottom: 2rem; }
body.tpl-w-garden { --paper: #f8f9ef; --surface: #fdfef5; --wash: #edf0e4; --ink: #364532; --muted: #626f5d; --line: #d2dcc8; --heading-font: var(--font-serif); --heading-weight: 400; --radius: .2rem; --section-space: 4.75rem; }
.tpl-w-garden.doc-wedding .sec-cover:not(.has-photo) { padding-bottom: 11rem; }
.has-artwork.doc-wedding .sec + .sec { border-top: 0; }
.has-artwork.doc-wedding .sec:nth-child(2n + 3) { background: var(--wash); }
.greeting-sprig { display: block; width: 5rem; height: 5.5rem; object-fit: contain; margin: -1rem auto 1.8rem; }
.gallery:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cover-scroll { position: absolute; bottom: 1.25rem; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: .4rem; min-height: 44px; color: var(--accent-text); text-decoration: none; }
.cover-scroll > span:first-child { font: .42rem var(--font-sans); letter-spacing: .24em; }
.cover-scroll > span:last-child { font-size: 1rem; }
body.tpl-f-lily { --paper: #fbfaf6; --surface: #fffefa; --wash: #f0f1ea; --ink: #3c4339; --muted: #646a60; --line: #d7ddd1; --heading-font: var(--font-serif); --heading-weight: 400; --section-space: 3rem; --radius: .1rem; }
.has-artwork.doc-funeral .sec-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 39rem; padding: 4rem 2rem 9rem; border-top: 0; }
.has-artwork.doc-funeral .obit-title { font-size: 1.35rem; font-weight: 400; }
.has-artwork.doc-funeral .obit-hanja { font-size: .55rem; }
.has-artwork.doc-funeral .obit-name { margin-top: 3rem; font-size: 1.9rem; }
.has-artwork.doc-funeral .obit-line { font-size: .8rem; line-height: 2; }
.has-artwork.doc-funeral .portrait { width: 7.5rem; background: var(--paper); }
.has-artwork.doc-funeral .portrait + .obit-name { margin-top: 1.5rem; }
body.tpl-f-moon { --paper: #1a2631; --surface: #23313b; --wash: #22303a; --ink: #f2eee4; --muted: #bdc7c9; --line: #455661; --control-line: #8b9da5; --heading-font: var(--font-serif); --heading-weight: 400; --section-space: 3rem; --radius: .1rem; --accent-text: #d1dbd4; --accent-soft: #2c3d43; --primary: #d1dbd4; --on-primary: #1a2631; --error: #f3bcb2; --error-bg: #3d2b29; --success: #b8d7bb; --success-bg: #25392e; background: #111c25; color-scheme: dark; }
.tpl-f-moon.has-artwork.doc-funeral .sec-cover { min-height: 43rem; padding-top: 13rem; padding-bottom: 7rem; }
.tpl-f-moon.has-artwork.doc-funeral .obit-title { font-size: 1.25rem; }
.tpl-f-moon.has-artwork.doc-funeral .obit-name { margin-top: 2rem; }
.tpl-f-moon .cover-art { object-position: center; }
.sample-bar { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; height: calc(var(--ribbon-height) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(.75rem, env(safe-area-inset-right)) 0 max(.75rem, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); font: .65rem/1.5 var(--font-sans); }
.sample-bar a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.sample-bar > span { color: var(--muted); }
.sample-bar .sample-create { padding-inline: .75rem; background: var(--primary); color: var(--on-primary); border-radius: .2rem; min-height: 2.25rem; }
body.doc[data-mode="sample"]::before { display: none; }
.motion-toggle { position: fixed; z-index: 20; right: max(.8rem, calc((100vw - 480px) / 2 + .8rem)); bottom: calc(.8rem + env(safe-area-inset-bottom)); min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--surface); color: var(--muted); box-shadow: 0 .2rem 1rem #0001; font: .6rem/1.5 var(--font-sans); cursor: pointer; }
.motion-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.doc-reveal { opacity: 0; transform: translateY(1.1rem); transition: opacity .9s ease, transform .9s ease; }
.doc-reveal.is-visible { opacity: 1; transform: none; }
.petal-field { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; }
.petal { position: absolute; top: -3rem; left: calc(var(--i) * 13%); width: .55rem; height: .9rem; border-radius: 80% 10% 70% 20%; background: linear-gradient(140deg, #fffdf2, #dfd1bc); box-shadow: .1rem .1rem .3rem #c0b19322; opacity: 0; animation: petal-fall 12s linear infinite; animation-delay: calc(var(--i) * -1.7s); }
.petal:nth-child(2n) { width: .4rem; height: .65rem; background: linear-gradient(140deg, #fff2ed, #e2c5bd); animation-duration: 15s; }
.petal:nth-child(3n) { background: linear-gradient(140deg, #e5e9d7, #c3cbb1); }
@keyframes petal-fall { 0% { transform: translate3d(-1rem, -1rem, 0) rotate(0); opacity: 0; } 8% { opacity: .6; } 85% { opacity: .4; } 100% { transform: translate3d(3rem, 48rem, 0) rotate(390deg); opacity: 0; } }
.doc-wedding[data-motion]:not([data-motion="none"]) :is(.cover-kicker, .cover-names, .cover-when, .cover-where) { animation: cover-arrive 1.4s ease both; }
.doc-wedding[data-motion]:not([data-motion="none"]) .cover-names { animation-delay: .15s; }
.doc-wedding[data-motion]:not([data-motion="none"]) .cover-when { animation-delay: .3s; }
.doc-wedding[data-motion]:not([data-motion="none"]) .cover-where { animation-delay: .4s; }
.doc-wedding[data-motion]:not([data-motion="none"]) .cover-scroll > span:last-child { animation: scroll-hint 2.8s ease-in-out 3; }
.doc-funeral[data-motion]:not([data-motion="none"]) .obit-name { animation: memorial-arrive 1.5s ease both; }
@keyframes cover-arrive { from { opacity: 0; transform: translateY(.65rem); } to { opacity: 1; transform: none; } }
@keyframes memorial-arrive { from { opacity: .2; } to { opacity: 1; } }
@keyframes scroll-hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.3rem); } }
.doc.is-paused *, .doc.is-paused *::before, .doc.is-paused *::after { animation-play-state: paused !important; }
.doc.cover-settled :is(.cover-kicker, .cover-names, .cover-when, .cover-where, .obit-name) { animation: none !important; opacity: 1; transform: none; }
.doc.is-paused .doc-reveal { transition: none; opacity: 1; transform: none; }
@media (max-width: 23rem) {
  .sample-bar { font-size: .55rem; }
  .sample-bar .sample-create { padding-inline: .5rem; }
  .has-artwork.doc-wedding .sec-cover { padding-inline: 2rem; }
  .has-artwork.doc-wedding .cover-names { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-reveal { opacity: 1; transform: none; }
  .petal-field, .motion-toggle { display: none; }
}
