/* Isolated keepsake template. All rules stay inside its viewer. */
.ks-viewer {
  --ks-paper: #f6f0e4;
  --ks-paper-deep: #efe6d6;
  --ks-ink: #2b2622;
  --ks-muted: #6e655b;
  --ks-gold: #b08d57;
  --ks-gilt: #d4b98a;
  --ks-accent: #243447;
  --ks-on-accent: #f6f0e4;
  --ks-title: "EB Garamond", Georgia, serif;
  --ks-body: "Cormorant Garamond", Georgia, serif;
  --ks-script: "Pinyon Script", cursive;
  --ks-ease: cubic-bezier(.22, .8, .2, 1);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  container-type: size;
  color: var(--ks-ink);
  background: var(--ks-paper);
  font-family: var(--ks-body);
  -webkit-font-smoothing: antialiased;
}
.ks-viewer[data-look="quiet"] { --ks-paper: #fbf9f5; --ks-paper-deep: #f1ede6; --ks-ink: #44403c; --ks-muted: #78716c; --ks-gold: #79716a; --ks-gilt: #c5b8a7; --ks-accent: #49423c; --ks-title: "Newsreader", Georgia, serif; }
.ks-viewer[data-look="playful"] { --ks-paper: #fff8d6; --ks-paper-deep: #ffefaa; --ks-ink: #393222; --ks-muted: #796a45; --ks-gold: #8a4c24; --ks-gilt: #ffd200; --ks-accent: #513b23; --ks-title: "Manrope", Arial, sans-serif; }
.ks-viewer[data-look="nature"] { --ks-paper: #f3eee4; --ks-paper-deep: #e1e6d7; --ks-ink: #2f3b2a; --ks-muted: #66715d; --ks-gold: #67714d; --ks-gilt: #bcc698; --ks-accent: #344332; --ks-title: "Lora", Georgia, serif; }
.ks-viewer[data-look="cinematic"] { --ks-paper: #161618; --ks-paper-deep: #222225; --ks-ink: #e9e7e3; --ks-muted: #b9b5af; --ks-gold: #bfa993; --ks-gilt: #d8c1a9; --ks-accent: #0c0c0d; }
.ks-viewer[data-look="handmade"] { --ks-paper: #f6eedd; --ks-paper-deep: #e8d9b8; --ks-ink: #4a3b22; --ks-muted: #7a694c; --ks-gold: #8a6c3c; --ks-gilt: #d5bd8e; --ks-accent: #59472c; --ks-title: "Newsreader", Georgia, serif; }
.ks-viewer *, .ks-viewer *::before, .ks-viewer *::after { box-sizing: border-box; }
.ks-viewer [hidden] { display: none !important; }
.ks-viewer h2, .ks-viewer p, .ks-viewer blockquote, .ks-viewer figure { margin: 0; }
.ks-viewer h2 { font-weight: 400; font-family: var(--ks-title); }
.ks-viewer h2.ks-caps { font-family: var(--ks-body); font-weight: 600; }
.ks-viewer p, .ks-viewer h2, .ks-viewer li, .ks-viewer blockquote { overflow-wrap: anywhere; }
.ks-viewer button, .ks-viewer input { font: inherit; }
.ks-viewer button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ks-viewer button:disabled { opacity: .45; cursor: default; }
.ks-viewer :focus-visible { outline: 3px solid var(--ks-gilt); outline-offset: 4px; }
.ks-viewer .ks-moment:focus { outline: none; }
.ks-viewer a { color: inherit; }
.ks-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ks-stage { flex: 1; min-height: 0; position: relative; isolation: isolate; touch-action: pan-y pinch-zoom; }
.ks-moment { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: safe center; align-items: center; gap: 28px; padding: clamp(28px, 5.5cqw, 72px); overflow-x: hidden; overflow-y: auto; visibility: hidden; opacity: 0; transform: scale(1.02); z-index: 0; pointer-events: none; color: var(--ks-ink); background-color: var(--ks-paper); background-image: url(images/keepsake-paper.svg); scrollbar-width: thin; scrollbar-color: var(--ks-gold) transparent; transition: opacity 1s ease, transform 1.5s var(--ks-ease), visibility 0s linear 1s; }
.ks-moment > * { flex-shrink: 0; }
.ks-moment.ks-active { visibility: visible; opacity: 1; transform: none; z-index: 2; pointer-events: auto; transition: opacity 1s ease, transform 1.5s var(--ks-ease); }
.ks-moment.ks-leaving { visibility: visible; opacity: 1; transform: none; z-index: 1; transition: none; }
.ks-reveal { opacity: 0; transform: translateY(18px); }
.ks-leaving .ks-reveal { opacity: 1; transform: none; }
.ks-active .ks-reveal { animation: ks-arrive 1.2s var(--ks-ease) both; }
.ks-active .ks-reveal:nth-child(2) { animation-delay: .16s; }
.ks-active .ks-reveal:nth-child(3) { animation-delay: .32s; }
/* Build copy is laid out once, then revealed without reflow or token-by-token rendering. */
.ks-scroll-cue:disabled { visibility: hidden; }
.ks-building .ks-cover:not(.ks-built) .ks-tagline { visibility: hidden; }
.ks-active.ks-built .ks-build-word { animation: ks-word .38s ease var(--word-delay, 0ms) both; }
@keyframes ks-word { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ks-active.ks-built .ks-build-word { animation: none; }
}
.ks-framed::before, .ks-framed::after { content: ""; position: absolute; inset: clamp(14px, 2.2cqw, 26px); border: 1px solid var(--ks-gilt); opacity: .55; pointer-events: none; z-index: 3; }
.ks-framed::after { inset: clamp(19px, calc(2.2cqw + 5px), 31px); opacity: .25; }
.ks-caps { font-family: var(--ks-body); font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: .34em; text-transform: uppercase; }
.ks-chrome { position: absolute; inset: 0 0 auto; display: flex; padding: clamp(40px, 4.6cqw, 56px); z-index: 4; pointer-events: none; }
.ks-badge { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 9px 16px; border: 0; border-radius: 999px; background: rgba(26,21,18,.42); color: #f6f0e4; backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(212,185,138,.35); overflow-wrap: anywhere; }
.ks-badge::before, .ks-badge::after { content: ""; width: 18px; height: 1px; background: var(--ks-gilt); flex-shrink: 0; }
.ks-progress { position: absolute; left: 0; top: 0; width: 100%; height: 2px; z-index: 5; background: #2b262214; }
.ks-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--ks-gold), var(--ks-gilt)); transform-origin: left; transition: transform .7s var(--ks-ease); }
.ks-navigation { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; justify-content: center; width: min(90%, 360px); padding: 6px 12px; border: 1px solid var(--ks-gilt); border-radius: 999px; color: var(--ks-ink); background: var(--ks-paper); z-index: 5; opacity: 0; pointer-events: none; }
.ks-page-button { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid color-mix(in srgb, var(--ks-gold) 45%, transparent); border-radius: 50%; color: var(--ks-ink); background: transparent; font-size: 20px !important; }
.ks-page-counter { min-width: 0; width: 240px; text-align: center; font-family: "Manrope", Arial, sans-serif; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.ks-background, .ks-shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ks-background { object-fit: cover; filter: sepia(.18) contrast(1.02) saturate(.9); z-index: -2; }
.ks-shade { z-index: -1; background: linear-gradient(180deg, #1e16122e, transparent 35%, #1e1612c9); }
.ks-cover, .ks-people, .ks-closing { isolation: isolate; color: #fff; background: var(--ks-accent); }
.ks-cover { justify-content: safe flex-end; }
.ks-cover-copy { width: 100%; max-width: 1100px; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-bottom: clamp(80px, 13cqh, 130px); text-align: center; }
.ks-cover-meta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ks-name { font-family: var(--ks-title); font-size: clamp(4.4rem, 13cqw, 13rem); line-height: .9; letter-spacing: .02em; text-shadow: 0 2px 40px rgba(0,0,0,.25); }
.ks-rule { position: relative; height: 1px; width: min(100%, 420px); background: linear-gradient(90deg, transparent, var(--ks-gilt) 20%, var(--ks-gilt) 80%, transparent); transform-origin: center; }
.ks-active .ks-rule { animation: ks-rule 1.4s var(--ks-ease) .3s both; }
.ks-rule::after { content: ""; position: absolute; left: calc(50% - 3px); top: -3px; width: 7px; height: 7px; background: var(--ks-gilt); transform: rotate(45deg); }
.ks-years { color: var(--ks-gilt); }
.ks-tagline { max-width: 34ch; font-family: var(--ks-body); font-style: italic; font-size: clamp(1.35rem, 2.2cqw, 2rem); line-height: 1.3; text-wrap: balance; color: rgba(255,255,255,.92); }
.ks-scroll-cue { position: absolute; left: 50%; bottom: clamp(44px, 5cqw, 60px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; border: 0; background: transparent; color: #fff; min-height: 44px; padding: 0; }
.ks-statement { font-family: var(--ks-title); font-size: clamp(2.1rem, 5cqw, 4.8rem); line-height: 1.15; letter-spacing: -.005em; text-wrap: balance; }
.ks-statement em { font-style: italic; color: var(--ks-accent); }
.ks-people .ks-statement em { color: var(--ks-gilt); }
.ks-viewer[data-look="cinematic"] .ks-sentence em, .ks-viewer[data-look="cinematic"] .ks-candid-copy em, .ks-viewer[data-look="cinematic"] .ks-small-list li:last-child { color: var(--ks-gilt); }
.ks-sentence { text-align: center; }
.ks-sentence::before { content: "\201C"; position: absolute; left: 50%; top: clamp(80px, 13cqh, 140px); transform: translateX(-50%); font-family: var(--ks-title); font-size: clamp(7rem, 16cqw, 14rem); line-height: .5; color: var(--ks-gilt); opacity: .6; }
.ks-sentence .ks-statement { position: relative; max-width: 22ch; }
.ks-print { position: relative; min-width: 0; background: #fbf7ef; padding: clamp(10px, 1.2cqw, 16px); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 40px 80px -40px rgba(43,38,34,.45), 0 12px 30px -18px rgba(43,38,34,.3); }
.ks-print::after { content: ""; position: absolute; inset: clamp(5px, .6cqw, 8px); border: 1px solid var(--ks-gilt); pointer-events: none; }
.ks-print img, .ks-print .ks-photo-empty { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: sepia(.12) contrast(1.02) saturate(.92); }
.ks-photo-empty { display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 16px; color: var(--ks-muted); background: var(--ks-paper-deep); text-align: center; font-family: var(--ks-script); font-size: clamp(1.5rem, 4cqw, 3rem); overflow-wrap: anywhere; }
.ks-photo-empty small { font: 11px/1.5 "Manrope", Arial, sans-serif; }
.ks-candid-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; width: 100%; max-width: 1200px; }
.ks-photo-pair { position: relative; width: min(100%, calc(58cqh * .8 / .78)); margin-inline: auto; padding-bottom: 12%; }
.ks-print-a { width: 78%; rotate: -1.2deg; }
.ks-print-b { position: absolute; right: 0; bottom: 0; width: 48%; rotate: 2deg; }
.ks-print-b img, .ks-print-b .ks-photo-empty { aspect-ratio: 1; }
.ks-candid-copy .ks-statement { font-size: clamp(1.8rem, 3.3cqw, 3.1rem); line-height: 1.15; text-wrap: pretty; }
.ks-caption-tag { display: inline-flex; align-items: center; gap: 14px; color: var(--ks-gold); margin-top: 24px !important; font-size: 11px; }
.ks-caption-tag::before { content: ""; width: 28px; height: 1px; background: var(--ks-gold); flex-shrink: 0; }
.ks-people { align-items: flex-start; justify-content: safe flex-end; }
.ks-people-copy { max-width: 900px; display: flex; flex-direction: column; gap: 16px; padding: 0 clamp(14px, 2.2cqw, 26px) clamp(40px, 6cqh, 64px); }
.ks-people-copy .ks-caps { color: var(--ks-gilt); }
.ks-people .ks-statement { text-wrap: pretty; font-size: clamp(1.8rem, 4cqw, 4rem); line-height: 1.1; letter-spacing: -.01em; text-shadow: 0 2px 30px rgba(0,0,0,.3); }
.ks-small { text-align: center; gap: clamp(18px, 3.6cqh, 40px); }
.ks-ornament { display: flex; align-items: center; gap: 16px; color: var(--ks-gold); margin-bottom: clamp(6px, 1cqh, 14px) !important; }
.ks-ornament::before, .ks-ornament::after { content: ""; width: 40px; height: 1px; background: currentColor; }
.ks-small-list { display: flex; flex-direction: column; gap: clamp(18px, 3.6cqh, 40px); list-style: none; margin: 0; padding: 0; width: 100%; max-width: 900px; }
.ks-small-list li { font-family: var(--ks-title); font-size: clamp(1.9rem, 4.4cqw, 4.2rem); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.ks-small-list li + li::before { content: ""; display: block; width: 6px; height: 6px; margin: 0 auto clamp(18px, 3.6cqh, 40px); background: var(--ks-gilt); transform: rotate(45deg); }
.ks-small-list li:last-child { font-style: italic; color: var(--ks-accent); font-size: clamp(2.2rem, 5.2cqw, 5rem); }
.ks-active .ks-small-list li:nth-child(2) { animation-delay: .5s; }
.ks-active .ks-small-list li:nth-child(3) { animation-delay: 1s; }
.ks-sound { text-align: center; }
.ks-sound-description { max-width: 38ch; font-size: clamp(1.25rem, 2.4cqw, 2rem); line-height: 1.4; text-wrap: balance; }
.ks-sound-title { font-size: clamp(3.4rem, 9.5cqw, 8.5rem); line-height: .95; letter-spacing: -.01em; max-width: 14ch; }
.ks-media { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 4cqh, 40px); text-align: center; z-index: 1; width: min(100%, 820px); }
.ks-play { --played: 0%; position: relative; display: grid; place-items: center; width: clamp(80px, 9cqw, 112px); height: clamp(80px, 9cqw, 112px); padding: 0; border: 1px solid color-mix(in srgb, var(--ks-gold) 55%, transparent); border-radius: 50%; background: transparent; color: inherit; }
.ks-play::before { content: ""; position: absolute; inset: -2px; padding: 2px; border-radius: 50%; background: conic-gradient(var(--ks-gilt) var(--played), transparent 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
.ks-play-symbol { width: 21%; height: 23%; background: currentColor; clip-path: polygon(8% 0, 100% 50%, 8% 100%); translate: 2px 0; }
.ks-playing .ks-play-symbol { width: 14%; height: 14%; clip-path: none; border-radius: 50%; translate: 0 0; animation: ks-pulse 1.6s ease-in-out infinite; }
.ks-media-time { color: var(--ks-gold); }
.ks-media-status, .ks-empty-note { max-width: 34ch; font-family: "Manrope", Arial, sans-serif; font-size: 12px; line-height: 1.6; color: var(--ks-muted); }
.ks-media-status:empty, .ks-share-status:empty { display: none; }
.ks-transcript { width: min(100%, 640px); font-size: 1.1rem; line-height: 1.5; }
.ks-transcript summary { min-height: 44px; padding: 10px; text-align: center; cursor: pointer; }
.ks-transcript p { padding-top: 14px; white-space: pre-wrap; }
.ks-film { padding: 0; }
.ks-film-frame { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 1.5cqw, 20px); width: 100%; aspect-ratio: 2.35 / 1; max-height: 100%; overflow: hidden; background: #1a1512; color: #fff; }
.ks-film-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at center, transparent 30%, #140e0a80); }
.ks-film-video, .ks-film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: -2; background: #1a1512; }
.ks-film-seek { width: clamp(90px, 20cqw, 240px); min-height: 28px; accent-color: #f6f0e4; }
.ks-film-poster { object-fit: cover; filter: sepia(.2) brightness(.32); }
.ks-film-title { position: relative; color: #fff; text-align: center; text-shadow: 0 1px 10px #000; }
.ks-film-media { color: white; gap: clamp(6px, 1.5cqw, 20px); padding: clamp(8px, 1.5cqw, 20px); background: #1a151277; width: auto; border-radius: 20px; backdrop-filter: blur(4px); }
.ks-film .ks-play { width: clamp(44px, 7cqw, 100px); height: clamp(44px, 7cqw, 100px); }
.ks-film .ks-media-time, .ks-film .ks-empty-note, .ks-film .ks-media-status { color: #f6f0e4; }
.ks-film.ks-media-playing .ks-film-media { position: absolute; left: 24px; bottom: 16px; flex-direction: row; width: auto; padding: 0; gap: 12px; background: transparent; backdrop-filter: none; }
.ks-film.ks-media-playing .ks-play { width: 44px; height: 44px; }
.ks-film.ks-media-playing .ks-film-title { position: absolute; left: 24px; right: 24px; top: 16px; margin: 0 !important; }
.ks-film-sound { position: absolute; bottom: 16px; right: 24px; background: #1a1512aa !important; }
.ks-remembrance { justify-content: flex-start; }
.ks-remembrance-layout { width: 100%; max-width: 1200px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; margin-block: auto; }
.ks-remembrance .ks-print { rotate: -1deg; width: min(100%, calc(56cqh * .8)); margin-inline: auto; }
.ks-passage { display: flex; flex-direction: column; gap: .8em; font-size: clamp(1.1rem, calc(2.4cqh + .5cqw), 2.1rem); }
.ks-passage-title { display: flex; align-items: center; gap: 16px; color: var(--ks-gold); }
.ks-passage-title::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--ks-gold), transparent); }
.ks-paragraph { font-family: var(--ks-body); font-size: inherit; line-height: 1.38; white-space: pre-wrap; text-wrap: pretty; }
.ks-paragraph:first-of-type::first-letter { float: left; font-family: var(--ks-title); font-size: 3.4em; line-height: .8; padding: .06em .14em 0 0; color: var(--ks-gold); }
.ks-signature { font-family: var(--ks-script); font-size: 1.5em; line-height: 1; color: var(--ks-accent); margin-top: .5em !important; }
.ks-viewer[data-look="cinematic"] .ks-passage .ks-signature { color: var(--ks-gilt); }
.ks-closing { gap: 0; text-align: center; }
.ks-closing .ks-shade { background: linear-gradient(180deg, #1e161259, #1e161259 40%, #1e1612de); }
.ks-closing-copy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; width: 100%; padding-bottom: clamp(60px, 12cqh, 120px); text-align: center; z-index: 1; }
.ks-forever { font-family: var(--ks-script) !important; font-size: clamp(4.2rem, 12cqw, 12rem); line-height: 1; color: var(--ks-gilt); text-shadow: 0 2px 40px rgba(0,0,0,.35); padding: 0 .15em .1em; }
.ks-outline { min-height: 44px; padding: 14px 26px; border: 1px solid var(--ks-gilt); border-radius: 999px; color: var(--ks-gilt); background: transparent; font: 600 11px var(--ks-body) !important; letter-spacing: .34em; text-transform: uppercase; max-width: 100%; overflow-wrap: anywhere; }
.ks-text-button { min-height: 44px; padding: 4px 0; border: 0; border-bottom: 1px solid rgba(212,185,138,.5); background: transparent; color: rgba(255,255,255,.7); font: 600 11px var(--ks-body) !important; letter-spacing: .34em; text-transform: uppercase; }
.ks-share-status { max-width: 36ch; font: 12px/1.5 "Manrope", Arial, sans-serif; }
.ks-closing-foot { position: absolute; left: clamp(28px, 5.5cqw, 72px); right: clamp(28px, 5.5cqw, 72px); bottom: clamp(24px, 4cqh, 44px); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; z-index: 2; }
.ks-credit { display: flex; flex-direction: column; gap: 6px; max-width: 50%; text-align: left; color: rgba(255,255,255,.6); }
.ks-credit .ks-signature { color: var(--ks-gilt); font-size: clamp(1.9rem, 3.4cqw, 2.7rem); line-height: 1; margin-top: 4px !important; }
.ks-credit .ks-caps:last-child { margin-top: 10px; font-size: 9px; letter-spacing: .34em; color: rgba(255,255,255,.4); }
.ks-hug { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: 50%; text-align: right; color: rgba(255,255,255,.75); }
.ks-hug-button { --held: 0%; position: relative; width: clamp(56px, 6cqw, 68px); height: clamp(56px, 6cqw, 68px); border: 1px solid rgba(212,185,138,.45); border-radius: 50%; background: transparent; color: var(--ks-gilt); font-size: clamp(15px, 1.8cqw, 20px) !important; touch-action: none !important; user-select: none; }
.ks-hug-button::before { content: ""; position: absolute; inset: -5px; padding: 2px; border-radius: 50%; background: conic-gradient(var(--ks-gilt) var(--held), transparent 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.ks-holding { box-shadow: 0 0 40px #d4b98a44; }
.ks-hug .ks-caps { max-width: 27ch; font-size: 9px; letter-spacing: .15em; }
.ks-hug-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 290px; }
.ks-hug-form input { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--ks-gilt); border-radius: 10px; color: white; background: #1a151299; font-size: 16px; }
.ks-hug-form input::placeholder { color: #e3d5c1; }
.ks-hug-names { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ks-hug-names span { position: absolute; right: 12%; top: 23%; font-family: var(--ks-script); color: var(--ks-gilt); font-size: 2rem; animation: ks-name-float 5s ease both; }
.ks-cover-only { height: auto; aspect-ratio: 4 / 5; container-type: inline-size; }
.ks-cover-only .ks-stage { position: absolute; inset: 0; }
.ks-cover-only .ks-cover { padding: clamp(28px, 4vw, 52px) clamp(24px, 3.5vw, 44px); gap: 0; overflow: hidden; }
.ks-cover-only .ks-cover-copy { padding: 0; gap: 14px; }
.ks-cover-only .ks-name { font-size: clamp(2.6rem, 4.5vw, 3.8rem); }
.ks-cover-only .ks-tagline { font-size: clamp(1rem, 4cqw, 1.35rem); }
.ks-embedded { position: absolute; inset: 0 auto auto 0; width: 1280px; height: 960px; transform: scale(var(--ks-scale, 1)); transform-origin: 0 0; }
.ks-full { height: 100%; }
.ks-viewer .ks-visibility-hidden { display: none !important; }
.ks-editing .ks-field-hidden { opacity: .4 !important; filter: grayscale(1); }
.ks-editing .ks-section-hidden > * { opacity: .4 !important; filter: grayscale(1); }
.ks-viewer[data-look="playful"] .ks-name { font-weight: 600; letter-spacing: -.05em; }
.ks-viewer[data-look="playful"] .ks-print { border-radius: 14px; }
.ks-viewer[data-look="playful"] .ks-print::after { border-radius: 9px; }
.ks-viewer[data-look="handmade"] .ks-name { font-family: var(--ks-script); }

/* The card keeps the desktop composition; only the full viewer reaches these breakpoints. */
@container (max-width: 899px) {
  .ks-candid-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ks-remembrance-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ks-remembrance .ks-print { width: min(60%, calc(30cqh * .8)); }
  .ks-candids { justify-content: safe center; }
}
@container (max-width: 640px) {
  .ks-film-frame { aspect-ratio: 4 / 5; max-height: calc(100cqh - 160px); }
  .ks-film.ks-media-playing .ks-film-media { right: 24px; bottom: 72px; }
  .ks-full .ks-closing { justify-content: flex-start; padding-top: 110px; padding-bottom: 112px; }
  .ks-full .ks-closing-copy { padding-bottom: 36px; }
  .ks-closing-foot { position: relative; inset: auto; width: 100%; flex-direction: column; align-items: flex-start; }
  .ks-credit, .ks-hug { max-width: 100%; }
  .ks-hug { align-items: flex-start; text-align: left; }
  .ks-full .ks-people { padding-bottom: 96px; }
  .ks-full .ks-remembrance { padding-bottom: 112px; }
  .ks-full .ks-scroll-cue { bottom: 108px; }
}
/* Original gift preview framing and discreet, keyboard-only page controls. */
.ks-scaled-host { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.ks-navigation:focus-within { opacity: 1; pointer-events: auto; }
.ks-cue-arrow { display: block; font-size: 18px; line-height: 14px; animation: ks-nudge 2.6s ease-in-out infinite; }
.ks-candids, .ks-remembrance { padding-top: clamp(110px, 16cqh, 150px); }
.ks-caption-tag::after { content: ""; width: 28px; height: 1px; background: var(--ks-gold); }
.ks-sound { gap: clamp(22px, 4cqh, 40px); }
.ks-cover-only .ks-rule { max-width: 220px; }
.ks-cover-only .ks-years { font-size: 11px; }
.ks-cover-only .ks-framed::before { inset: clamp(10px, 1.6vw, 18px); }
.ks-cover-only .ks-framed::after { inset: clamp(15px, calc(1.6vw + 5px), 23px); }
.ks-cover-only .ks-shade { background: linear-gradient(to top, rgba(28,25,23,.72), rgba(28,25,23,.2) 45%, transparent 70%); }
.ks-cover-only .ks-background { object-position: 50% 0% !important; }
.ks-closing .ks-background { filter: sepia(.3) contrast(1) saturate(.75) brightness(.9); }
@keyframes ks-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes ks-pulse { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }

@media (hover: hover) {
  .ks-page-button:hover:not(:disabled) { background: var(--ks-paper-deep); }
  .ks-outline:hover { background: var(--ks-gilt); color: #1a1512; }
  .ks-play:hover:not(:disabled) { box-shadow: 0 0 0 5px #b08d571a; }
  .ks-text-button:hover { color: var(--ks-gilt); }
}
@keyframes ks-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ks-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ks-name-float { 0% { opacity: 0; transform: translateY(20px); } 20%, 65% { opacity: .9; } 100% { opacity: 0; transform: translateY(-24px); } }
@media (prefers-reduced-motion: reduce) {
  .ks-viewer *, .ks-viewer *::before, .ks-viewer *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ks-viewer .ks-reveal { opacity: 1; transform: none; }
  .ks-hug-names span { opacity: .8; }
}
