:root {
  --paper: #f9f3e9; --ink: #28201b; --muted: #6f5d53; --clay: #a53728;
  --clay-dark: #81291f; --rule: #ddcfc2; --white: #fffaf2; --sage: #e5e9db;
  --focus: #366466; --sage-ink: #374a35; --sage-dot: #4a7157; --sage-card: #edf0df;
  --envelope: #ddad94; --envelope-border: #ce9a7e; --rose: #f7e0d7; --rose-card: #fbeee3;
  --serif: 'Fraunces', Georgia, serif; --sans: 'DM Sans', sans-serif;
  color-scheme: light; font-family: var(--sans); color: var(--ink); background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 5; background: white; padding: 8px; }
.skip:focus { top: 12px; }
.mast { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; border-bottom: 1px solid var(--rule); gap: 16px; }
.mast nav { display: flex; gap: 28px; align-items: center; font-size: .9rem; font-weight: 700; }
.mast a, .footer a { text-decoration: none; }
.mast nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.member-link { color: var(--clay-dark); }
.language-menu { position: relative; }
.language-menu summary { display: grid; place-items: center; width: 38px; height: 38px; list-style: none; cursor: pointer; border: 1px solid var(--rule); border-radius: 50%; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu[open] summary, .language-menu summary:hover { background: var(--white); border-color: var(--clay); }
.globe-icon { position: relative; display: block; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; }
.globe-icon::before, .globe-icon::after { position: absolute; content: ''; }
.globe-icon::before { inset: -1.5px 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.globe-icon::after { inset: 50% 0 auto; border-top: 1.5px solid currentColor; }
.language-menu ul { position: absolute; z-index: 3; right: 0; margin: 8px 0 0; min-width: max-content; padding: 6px; list-style: none; border: 1px solid var(--rule); border-radius: 12px; background: var(--white); box-shadow: 0 12px 25px color-mix(in srgb, var(--ink) 14%, transparent); }
.language-menu a { display: block; padding: 8px 12px; border-radius: 7px; }
.language-menu a[aria-current=true] { background: var(--rose); color: var(--clay-dark); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; white-space: nowrap; font-size: 1.3rem; }
.logo-mark { height: 30px; width: 30px; display: inline-grid; place-items: center; border: 1px solid var(--clay); color: var(--clay); border-radius: 50%; font-family: var(--sans); font-size: .85rem; }
.pill { display: inline-flex; min-height: 47px; padding: 10px 20px; align-items: center; gap: 12px; justify-content: center; border: 1px solid transparent; border-radius: 100px; font-weight: 700; text-decoration: none; text-align: center; }
.pill.outline { border-color: var(--rule); }
.pill.demo-link { border-color: var(--envelope-border); color: var(--clay-dark); background: var(--white); }
.pill.demo-link:hover { border-color: var(--clay); }
.pill.primary { background: var(--clay); border-color: var(--clay); color: var(--white); }
.pill.primary:hover { background: var(--clay-dark); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 48px; min-height: 555px; padding-block: 58px 66px; }
.hero h1 { font: 500 clamp(3.7rem, 6.2vw, 6.05rem)/.97 var(--serif); letter-spacing: -.055em; }
.intro { max-width: 360px; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.17rem); margin-top: 23px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 27px; }
.text-button { color: var(--clay-dark); text-underline-offset: .26em; font-weight: 700; }
.note { color: var(--muted); margin-top: 12px; font-size: .84rem; }
.hero-art { position: relative; width: min(100%, 500px); min-width: 0; justify-self: center; padding: 0 13px; isolation: isolate; scroll-margin-top: 13px; }
.hero-art::before { content: ''; position: absolute; z-index: -1; inset: -12% -12% 4%; pointer-events: none; background: radial-gradient(ellipse, var(--rose), transparent 68%); }
.demo-book-stage { position: relative; min-height: clamp(350px, 35vw, 434px); perspective: 1550px; isolation: isolate; }
.demo-book-stage::before, .demo-book-stage::after { content: ''; position: absolute; inset: 3px -4px -5px 3px; z-index: -1; border: 1px solid var(--envelope-border); border-radius: 11px 18px 18px 11px; background: var(--envelope); transform: rotate(2.8deg); }
.demo-book-stage::after { inset: 0 -2px -3px 2px; background: var(--rose-card); transform: rotate(1.15deg); }
.demo-sheet { --story-panel: var(--rose-card); position: absolute; inset: 0; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--rule); border-radius: 11px 18px 18px 11px; box-shadow: 0 19px 37px color-mix(in srgb, var(--ink) 18%, transparent); transform-origin: left center; backface-visibility: hidden; }
.demo-sheet[data-current] { z-index: 1; }
.eyebrow { color: var(--muted); letter-spacing: .16em; font-size: .62rem; font-weight: 700; }
.demo-sheet h2 { font: 500 clamp(1.65rem, 3.45vw, 2.68rem)/1.08 var(--serif); letter-spacing: -.04em; }
.demo-cover-picture { position: relative; min-height: 0; flex: 1; background: var(--envelope); }
.demo-cover-picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 54%; }
.demo-cover-picture .demo-wax { position: absolute; right: 17px; bottom: 13px; }
.demo-cover-caption { padding: 16px 20px 20px; text-align: center; }
.demo-cover-caption .eyebrow { text-transform: uppercase; color: var(--clay-dark); }
.demo-cover-caption h2 { margin-block: 4px 5px; }
.demo-cover-caption p:last-child { font: italic 500 1rem/1.35 var(--serif); color: var(--muted); }
.demo-wax { display: inline-grid; width: 42px; height: 42px; place-items: center; border: 2px double var(--envelope-border); border-radius: 48% 53% 50% 45%; background: var(--clay-dark); color: var(--white); font: 500 1.5rem/1 var(--serif); box-shadow: 0 3px 9px color-mix(in srgb, var(--ink) 28%, transparent); }
.demo-sheet[data-current] .demo-wax { animation: wax-press .65s ease both; }
@keyframes wax-press { from { opacity: .35; transform: scale(.7) rotate(-17deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.demo-photo-sheet { padding: 16px; }
.demo-photo-sheet h2 { margin: 3px 0 12px; text-align: center; }
.demo-photo-sheet .story-wall-grid { flex: 1; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.demo-photo-sheet .story-wall-tile { aspect-ratio: auto; }
.demo-photo-sheet .story-caption { font-size: clamp(.66rem, 1.6vw, .9rem); }
.demo-letter-sheet { place-content: center; justify-content: safe center; overflow-y: auto; padding: 22px; background: linear-gradient(150deg, var(--rose), var(--envelope)); }
.demo-letter-paper { padding: clamp(17px, 3.1vw, 34px); background: var(--white); box-shadow: 0 8px 21px color-mix(in srgb, var(--ink) 15%, transparent); border: 1px solid var(--envelope-border); border-radius: 4px; transform: rotate(-1.5deg); }
.demo-letter-paper .demo-wax { float: right; margin: -4px 0 8px 12px; }
.demo-letter-paper h2 { margin: 3px 0 20px; }
.demo-letter-paper p { font: 500 clamp(1rem, 2vw, 1.25rem)/1.5 var(--serif); white-space: pre-wrap; }
.demo-letter-paper .demo-signature { margin-top: 13px; font-style: italic; color: var(--clay-dark); }
.demo-book-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; margin-top: 17px; }
.demo-page-picker { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 20px; background: var(--white); }
.demo-page-picker button, .demo-play { padding: 5px 10px; min-height: 33px; border: 0; border-radius: 17px; background: transparent; color: var(--clay-dark); font-size: .78rem; font-weight: 700; }
.demo-page-picker button[aria-pressed=true] { background: var(--rose); }
.demo-book-controls .share-button { margin-inline-start: auto; }
.share-button { min-height: 38px; padding: 5px 13px; background: var(--white); color: var(--clay-dark); font-size: .82rem; }
.share-button:hover { border-color: var(--clay); }
.studio { padding: 44px clamp(20px, 5.4vw, 72px) 50px; background: var(--sage); border-radius: 22px; scroll-margin-top: 20px; }
.studio-start { display: flex; align-items: center; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.studio-start .studio-heading p { margin-bottom: 0; }
.studio-heading h2, .how > h2, .faq > h2 { font: 500 clamp(2.35rem, 5vw, 3.65rem)/1.05 var(--serif); letter-spacing: -.04em; }
.studio-heading p { color: var(--sage-ink); margin: 7px 0 25px; }
.studio-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: -9px 0 20px; }
.studio-preview-actions .text-button { font-size: .89rem; }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4.2vw, 54px); align-items: start; }
.fields { display: grid; gap: 15px; padding: 23px; background: var(--white); border-radius: 15px; border: 1px solid var(--rule); }
.fields label, .unlock label { display: grid; gap: 5px; font-weight: 700; font-size: .86rem; min-width: 0; }
.fields input:not([type=radio], [type=file]), .fields textarea, .unlock input { background: var(--white); border: 1px solid var(--rule); border-radius: 7px; width: 100%; padding: 8px 10px; color: var(--ink); min-height: 41px; }
.fields textarea { resize: vertical; }
.fields small { color: var(--muted); font-weight: 500; }
.occasions { margin: 0; padding: 0; border: 0; display: flex; gap: 7px; flex-wrap: wrap; min-inline-size: 0; }
.occasions legend { margin-bottom: 5px; font-weight: 700; font-size: .86rem; }
.occasions label { cursor: pointer; }
.occasions input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.occasions span { padding: 7px 10px; display: block; border-radius: 50px; border: 1px solid var(--rule); font-size: .82rem; }
.occasions input:checked + span { background: var(--rose); border-color: var(--clay); color: var(--clay-dark); }
.occasions input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.template-picker { min-inline-size: 0; margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.template-picker legend { font-weight: 700; font-size: .86rem; margin-bottom: 5px; }
.template-picker label { cursor: pointer; }
.template-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.template-picker span { min-height: 62px; display: flex; flex-direction: column; justify-content: center; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; }
.template-picker input:checked + span { border-color: var(--clay); background: var(--rose); color: var(--clay-dark); }
.template-picker input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.upload { position: relative; }
.upload input { position: absolute; inset: 18px 0; opacity: 0; width: 100%; cursor: pointer; }
.upload:focus-within .upload-cta { outline: 3px solid var(--focus); }
.upload-cta { border: 1px dashed var(--muted); color: var(--ink); padding: 10px; border-radius: 8px; }
.photo-queue { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-queue:empty, .status:empty { display: none; }
.photo-thumb { position: relative; }
.photo-thumb img { width: 51px; height: 51px; border-radius: 7px; object-fit: cover; }
.photo-thumb button { position: absolute; border: 0; border-radius: 50%; right: -4px; top: -4px; width: 22px; height: 22px; line-height: 1; background: var(--ink); color: white; }
.preview-panel { position: sticky; top: 16px; align-self: start; max-width: 100%; border-radius: 15px; background: var(--white); overflow: hidden; border: 1px solid var(--rule); }
.preview-bar { display: flex; justify-content: center; align-items: center; gap: 7px; font-size: .75rem; padding: 8px; color: var(--sage-ink); background: var(--sage-card); border-bottom: 1px solid var(--rule); }
.preview-dot { width: 7px; height: 7px; background: var(--sage-dot); border-radius: 50%; }
.mode-note, .status { font-size: .84rem; color: var(--muted); }
.mobile-jump { display: none; }
.share-result { background: var(--sage); padding: 12px; border-radius: 8px; overflow-wrap: anywhere; display: grid; gap: 8px; }
.share-result input { min-width: 0; }
.share-result button, .share-result a { justify-self: start; text-decoration: underline; }
.share-result button { border: 0; background: transparent; padding: 0; color: inherit; }
.share-result .share-button { padding: 7px 16px; color: var(--white); background: var(--clay); text-decoration: none; }
.share-dialog { width: min(440px, calc(100% - 22px)); padding: 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--white); color: var(--ink); box-shadow: 0 18px 40px color-mix(in srgb, var(--ink) 30%, transparent); }
.share-dialog::backdrop { background: color-mix(in srgb, var(--ink) 62%, transparent); }
.share-dialog-header, .share-dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.share-dialog-header { justify-content: space-between; margin-bottom: 15px; }
.share-dialog-header h2 { font: 500 1.5rem/1.12 var(--serif); }
.share-dialog .pill { min-height: 41px; padding: 6px 13px; }
.share-field { display: grid; gap: 5px; font-size: .83rem; font-weight: 700; margin-bottom: 12px; }
.share-field input { min-width: 0; width: 100%; min-height: 41px; padding: 7px 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 7px; color: var(--ink); }
.share-dialog .status { margin-top: 10px; }
.receiver-share { display: flex; justify-content: flex-end; padding: 0 13px 9px; }
.order-gift .share-button { margin-inline-start: 8px; margin-block: 3px; }
.steps { padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; gap: 12px; margin: 23px 0 0; }
.gift-guide { grid-template-columns: repeat(2, 1fr); gap: 12px 32px; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.price-card { padding: clamp(18px, 3vw, 26px); border: 1px solid var(--rule); border-radius: 14px; background: var(--white); }
.price-card h3 { font-size: .95rem; }
.price-amount { font: 600 clamp(2rem, 5vw, 3rem)/1.05 var(--serif); margin-block: 10px 14px; }
.price-publish { background: var(--rose-card); border-color: var(--envelope-border); }
.price-publish .price-amount { color: var(--clay-dark); }
.account-entry { width: min(450px, calc(100% - 34px)); margin-inline: auto; padding-block: clamp(38px, 9vw, 105px); }
.account-card h1 { font: 500 clamp(2rem, 6vw, 2.7rem)/1.08 var(--serif); letter-spacing: -.045em; }
.account-card p { margin-top: 12px; color: var(--muted); }
.account-card .pill { width: 100%; margin-top: 22px; }
.steps li { padding: 18px 0; border-top: 1px solid var(--rule); }
.steps h3 { font: 600 1.23rem/1.2 var(--serif); }
.steps p { color: var(--muted); margin-top: 5px; }
.how, .faq { padding-block: 58px 14px; }
.faq { max-width: 720px; }
.faq h2 { margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 13px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 8px; color: var(--muted); }
.footer { display: flex; margin-top: 55px; padding-block: 24px; gap: 18px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--rule); }
.footer a:not(.brand) { color: var(--muted); font-size: .85rem; }
.receiver { max-width: 670px; padding-block: 22px 45px; }
.receiver-brand { text-align: center; margin-bottom: 20px; }
.unlock { border-radius: 14px; border: 1px solid var(--rule); }
.unlock { padding: 26px; background: var(--white); display: grid; gap: 12px; max-width: 380px; margin: 40px auto; }
.unlock h1 { font: 500 2rem/1.08 var(--serif); }
.receiver > .status { text-align: center; margin-bottom: 12px; }
@media (max-width: 840px) {
  .hero { min-height: 480px; gap: 28px; }
  .hero h1 { font-size: clamp(3.1rem, 7.9vw, 4.25rem); }
  .hero-art { padding-inline: 8px; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 34px); }
  .mast { padding: 14px 0; }
  .mast nav { gap: 12px; font-size: .8rem; }
  .desktop-nav { display: none; }
  .logo { font-size: 1.12rem; }
  .logo-mark { width: 25px; height: 25px; }
  .hero { grid-template-columns: 1fr; padding-block: 34px 32px; gap: 28px; min-height: 0; }
  .hero h1 { font-size: clamp(2.75rem, 11.7vw, 4.25rem); }
  .intro { margin-top: 14px; }
  .actions { margin-top: 18px; gap: 9px; }
  .hero .actions .pill { gap: 7px; padding-inline: 13px; font-size: .875rem; }
  .hero-art { width: min(100%, 415px); }
  .hero-art::before { inset-inline: 0; }
  .demo-book-stage { min-height: 322px; }
  .demo-book-controls { margin-top: 13px; }
  .demo-book-controls .share-button { margin-inline-start: 0; }
  .demo-letter-sheet { padding: 13px; }
  .demo-letter-paper { padding: 14px; }
  .demo-letter-paper h2 { margin-bottom: 12px; }
  .demo-letter-paper p { font-size: clamp(.9rem, 3.8vw, 1.04rem); line-height: 1.38; }
  .studio { padding: 24px 13px 19px; }
  .studio-heading { padding-inline: 5px; }
  .studio-grid, .steps, .gift-guide, .price-grid { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .mobile-jump { display: block; justify-self: start; color: var(--clay-dark); font-size: .86rem; font-weight: 700; text-underline-offset: .25em; }
  .preview-back { margin: 10px 14px; }
  .fields { padding: 14px; }
  .steps { gap: 0; }
  .steps li { padding: 12px 0; }
  .how, .faq { padding-block: 37px 5px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .demo-sheet[data-current] .demo-wax { animation: none; } }
.order-admin { padding-block: 38px; }
.order-admin header { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.order-admin header .brand { text-decoration: none; font-family: var(--serif); color: var(--clay-dark); }
.order-admin h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; margin-top: 8px; }
.order-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block: 24px; }
.order-metrics article, .order-list { border: 1px solid var(--rule); border-radius: 12px; background: var(--white); padding: 16px; }
.order-metrics article { display: grid; gap: 5px; }
.order-metrics span, .order-list th { color: var(--muted); font-size: .84rem; }
.order-metrics strong { font-size: 1.65rem; }
.order-state { border-radius: 4em; background: var(--rose); color: var(--clay-dark); padding: 5px 9px; font-size: .78rem; white-space: nowrap; }
.order-state[data-state=published] { background: var(--sage); color: var(--sage-ink); }
.order-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.order-filters a { border-radius: 5px; padding: 5px 10px; text-decoration: none; font-size: .86rem; }
.order-filters a[aria-current=page] { background: var(--ink); color: var(--white); }
.order-table { overflow: auto; }
.order-table table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .87rem; }
.order-table th, .order-table td { border-bottom: 1px solid var(--rule); padding: 11px 8px; }
.order-table code { font-size: .74rem; }
.order-table .order-empty { text-align: center; padding: 26px; color: var(--muted); }
.legal { max-width: 680px; }
.legal section { margin-top: 23px; }
.legal section h2 { font: 600 1.45rem/1.2 var(--serif); margin-bottom: 5px; }
.legal section p { color: var(--muted); }
.order-admin > .order-list + .order-list { margin-top: 11px; }
@media(max-width:650px) {
  .mast .member-link { color: var(--clay-dark); text-align: right; }
}

.studio-grid { grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); }
.fields section { display: grid; gap: 10px; border-top: 1px solid var(--rule); padding-top: 13px; }
.fields section h3 { font: 600 1.12rem/1.2 var(--serif); }
.fields select { width: 100%; padding: 8px 10px; min-height: 41px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--rule); border-radius: 7px; }
.fields .subtle-button, .preview-tools button {
  border: 0; background: transparent; padding: 6px 0; color: var(--clay-dark); font-weight: 700;
  justify-self: start; text-align: left; text-decoration: underline; text-underline-offset: .22em;
}
.milestone-fields { display: grid; gap: 9px; }
.milestone-item { min-width: 0; margin: 0; padding: 9px 11px; border: 1px solid var(--rule); border-radius: 8px; display: grid; gap: 7px; }
.milestone-item legend { font-size: .81rem; font-weight: 700; padding-inline: 5px; }
.photo-queue { display: grid; }
.photo-row { display: grid; grid-template-columns: 51px minmax(0, 1fr); gap: 9px; align-items: center; }
.photo-row-actions { display: flex; gap: 10px; align-items: center; min-height: 23px; }
.photo-row-actions small, .photo-row-actions button { font-size: .72rem; }
.preview-panel { box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 10%, transparent); scroll-margin-top: 12px; }
.preview-bar { justify-content: space-between; padding-inline: 12px; flex-wrap: wrap; }
.preview-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.preview-tools { display: flex; flex-wrap: wrap; column-gap: 12px; }
.preview-scroll { overflow: auto; max-height: min(68vh, 690px); scrollbar-gutter: stable; overscroll-behavior-y: contain; background: var(--white); }
.preview-scroll:focus-visible { outline-offset: -3px; }
.preview-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; color: var(--ink); background: var(--paper); overscroll-behavior-y: contain; }
.preview-dialog::backdrop { background: color-mix(in srgb, var(--ink) 74%, transparent); }
.preview-dialog-toolbar { position: sticky; z-index: 1; top: 0; background: var(--white); display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center; padding: 8px clamp(13px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.preview-toolbar-actions, .preview-device { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; }
.preview-device { gap: 4px; padding: 3px; border: 1px solid var(--rule); border-radius: 30px; }
.preview-device button { min-height: 32px; border: 0; border-radius: 24px; background: transparent; color: var(--ink); padding: 3px 13px; font-size: .83rem; font-weight: 700; }
.preview-device button[aria-pressed=true] { background: var(--rose); color: var(--clay-dark); }
.preview-dialog-toolbar .pill { min-height: 39px; padding: 6px 13px; }
.preview-story { width: min(670px, calc(100% - 34px)); margin: 18px auto 35px; }
.preview-story .story { border-radius: 15px; }
.preview-story .story-block { scroll-margin-top: 62px; }
.preview-dialog[data-device=phone] .preview-story { width: min(390px, calc(100% - 34px)); }
.preview-status { padding: 8px 12px; }
[data-receiver] .story, .example-view .story { border-radius: 16px; }
[data-receiver] #gift-view:empty { display: none; }
.receiver-tools { justify-content: center; margin-block: 14px; }
.demo-bar nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.demo-bar nav .pill { min-height: 38px; padding: 6px 12px; }
.demo-stage .story { border: 1px solid var(--rule); border-radius: 15px; }
.demo-label { margin-bottom: 9px; color: var(--muted); font-size: .78rem; font-weight: 700; text-align: center; }
.example-view { margin-block: 24px; }
.example-view > section { scroll-margin-top: 16px; }
.example-view > section > p:not(.actions) { color: var(--muted); margin: 6px 0 16px; }
.example-view p.actions { margin-bottom: 35px; }
.story {
  --story-paper: var(--white); --story-ink: var(--ink); --story-accent: var(--clay-dark); --story-panel: var(--rose); --story-line: var(--envelope-border);
  container-type: inline-size; position: relative; overflow: clip; overflow-wrap: anywhere;
  background: var(--story-paper); color: var(--story-ink);
}
.story[data-theme=night] {
  --story-paper: #242239; --story-ink: var(--white); --story-accent: #f9bdc3;
  --story-panel: color-mix(in srgb, var(--story-paper) 88%, var(--story-accent));
  --story-line: color-mix(in srgb, var(--story-paper) 55%, var(--story-accent));
}
.story[data-theme=garden] {
  --story-paper: var(--sage-card); --story-ink: var(--sage-ink); --story-accent: var(--sage-dot);
  --story-panel: var(--sage); --story-line: color-mix(in srgb, var(--sage) 70%, var(--sage-ink));
}
.story-cover { padding: clamp(24px, 9cqi, 64px) 8% 6%; text-align: center; }
.story-mark {
  display: grid; place-items: center; width: 40px; height: 40px; margin-inline: auto;
  font: 500 1.5rem/1 var(--serif); color: var(--story-accent);
  border: 1px solid var(--story-line); border-radius: 50%;
}
.story-kicker { margin: 14px 0 7px; text-transform: uppercase; letter-spacing: .14em; font-size: clamp(.65rem, 2.6cqi, .8rem); font-weight: 700; color: var(--story-accent); }
.story-name { font: 500 clamp(2.65rem, 13cqi, 6.5rem)/.98 var(--serif); letter-spacing: -.065em; }
.story-subtitle { margin-top: 12px; font: italic 500 clamp(1rem, 4.5cqi, 1.45rem)/1.32 var(--serif); }
.story-cover-photo, .story-art { margin-top: clamp(21px, 6cqi, 44px); }
.story-photo-button { display: block; width: 100%; border: 0; background: none; padding: 0; text-align: inherit; }
.story-photo-button img { transition: transform .33s ease; }
.story-photo-button:hover img { transform: scale(1.035); }
.story-photo-button:focus-visible { outline-offset: -4px; }
.story-cover-photo img, .story-art {
  width: 100%; aspect-ratio: 10 / 9; object-fit: cover; border-radius: 48% 48% 4px 4px / 42% 42% 4px 4px;
  background: var(--story-panel); border: 1px solid var(--story-line);
}
.story-art { display: grid; place-items: center; aspect-ratio: 1.4; position: relative; }
.story-art::before { content: ''; position: absolute; inset: 9%; border: 1px solid var(--story-line); border-radius: inherit; }
.story-art span { font: 400 clamp(3rem, 17cqi, 7rem)/1 var(--serif); color: var(--story-accent); }
.story-caption { color: var(--story-accent); font: italic 500 clamp(.82rem, 3.6cqi, 1.12rem)/1.3 var(--serif); padding-top: 9px; text-align: center; }
.story-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 14px; margin: 0 8%; padding: 12px 0; border-block: 1px solid var(--story-line); }
.story-links a, .story-end a { color: var(--story-accent); text-underline-offset: .25em; font-size: clamp(.72rem, 3cqi, .88rem); }
.story-block { padding: clamp(30px, 9cqi, 72px) 8%; scroll-margin-top: 4px; }
.story-title { margin: 0 0 clamp(16px, 5cqi, 32px); font: 500 clamp(1.65rem, 8cqi, 3.35rem)/1.08 var(--serif); letter-spacing: -.045em; text-align: center; }
.story-date { display: grid; justify-items: center; border: 1px solid var(--story-line); padding: 15px; color: var(--story-accent); }
.story-date strong { font: 500 clamp(1.8rem, 9cqi, 3.3rem)/1.0 var(--serif); }
.story-date span, .story-timeline time { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(.67rem, 3cqi, .85rem); }
.story-date time { margin-top: 4px; color: var(--story-ink); font: 500 clamp(.94rem, 3.8cqi, 1.2rem)/1.2 var(--serif); }
.story-timeline { list-style: none; padding: 0 0 0 20px; margin: 26px 0 0 8px; border-left: 1px solid var(--story-line); display: grid; gap: 22px; }
.story-timeline li { position: relative; }
.story-timeline li::before { content: ''; position: absolute; width: 9px; height: 9px; background: var(--story-accent); border-radius: 50%; left: -25px; top: 8px; }
.story-timeline time { color: var(--story-accent); }
.story-moment-title { font: 600 clamp(1.05rem, 4.5cqi, 1.55rem)/1.2 var(--serif); margin-block: 4px; }
.story-moment-note { font-size: clamp(.88rem, 3.4cqi, 1.03rem); white-space: pre-wrap; }
.story-memory summary { font: 600 clamp(1.05rem, 4.5cqi, 1.55rem)/1.28 var(--serif); margin-block: 4px; cursor: pointer; }
.story-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 420px); gap: 4px; margin-top: 13px; }
.story-countdown div { display: grid; gap: 4px; padding-block: 7px; background: var(--story-panel); }
.story-countdown strong { font-size: clamp(1rem, 4.2cqi, 1.55rem); }
.story-countdown span { font-size: clamp(.5rem, 2.3cqi, .72rem); letter-spacing: .04em; }
.story-photos { background: var(--story-panel); }
.story-gallery { display: grid; gap: clamp(14px, 5cqi, 34px); }
.story-print { padding: 7px 7px 10px; background: var(--story-paper); border: 1px solid var(--story-line); }
.story-print img { width: 100%; max-height: 550px; aspect-ratio: 4 / 3; object-fit: cover; }
.story[data-layout=wall] .story-cover { padding-bottom: clamp(20px, 6cqi, 40px); }
.story[data-layout=wall] .story-name { font-size: clamp(2.25rem, 10.75cqi, 5.4rem); }
.story[data-layout=wall] .story-photos { padding: clamp(22px, 5.5cqi, 38px) 6% clamp(20px, 6cqi, 44px); background: var(--story-paper); }
.story[data-layout=wall] .story-photos .story-title { font-size: clamp(1.4rem, 6cqi, 2.4rem); }
.story-wall-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(5px, 1.5cqi, 12px); }
.story-wall-grid:has(> :nth-child(5)), .story-wall-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-wall-tile { position: relative; isolation: isolate; min-width: 0; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--story-panel); }
.story-wall-grid:has(> :nth-child(3):last-child) > :first-child { grid-column: span 2; grid-row: span 2; }
.story-wall-tile:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 11; }
.story-wall-tile .story-photo-button { height: 100%; overflow: hidden; }
.story-wall-tile img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.story-wall-tile:only-child img { aspect-ratio: 16 / 11; }
.story-wall-tile .story-caption {
  position: absolute; inset: auto 0 0; padding: .7em .65em .4em;
  color: var(--white); background: linear-gradient(0deg, var(--ink), transparent);
  font-size: clamp(.64rem, 2.75cqi, .93rem); pointer-events: none;
}
.photo-lightbox { width: min(780px, calc(100% - 20px)); padding: 10px; border: 1px solid var(--rule); border-radius: 15px; background: var(--white); color: var(--ink); }
.photo-lightbox::backdrop { background: color-mix(in srgb, var(--ink) 87%, transparent); }
.photo-lightbox img { width: 100%; max-height: 70dvh; object-fit: contain; background: var(--ink); border-radius: 8px; touch-action: pan-y; }
.photo-lightbox-bar, .photo-lightbox-arrows { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-lightbox-bar { margin-bottom: 8px; }
.photo-lightbox-arrows { margin-top: 8px; }
.photo-lightbox figcaption { margin-top: 8px; text-align: center; }
.photo-lightbox figcaption:empty { display: none; }
.photo-lightbox .pill { min-height: 42px; padding: 6px 14px; background: var(--white); color: var(--ink); }
.story-message { white-space: pre-wrap; font: 500 clamp(1.01rem, 4.15cqi, 1.45rem)/1.65 var(--serif); }
.story-letter-content { border: 1px solid var(--story-line); background: var(--story-panel); border-radius: 10px; }
.story-letter-content summary { padding: 20px 15px; text-align: center; cursor: pointer; color: var(--story-accent); font: 600 clamp(1rem, 4.2cqi, 1.3rem)/1.25 var(--serif); }
.story-letter-content .story-message { padding: 8px clamp(18px, 6cqi, 42px) 25px; }
.story-letter-content[open] .story-message { animation: letter-unfold .52s ease-out both; }
@keyframes letter-unfold { from { opacity: 0; transform: translateY(10px) rotateX(-8deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .story-letter-content[open] .story-message { animation: none; }
  .story-photo-button img { transition: none; }
}
.story-end { padding: 28px 8% 36px; background: var(--story-panel); text-align: center; }
.story-ending { margin-top: 14px; font: italic 500 clamp(1rem, 4.7cqi, 1.5rem)/1.3 var(--serif); }
.story-signature { margin: 8px 0; color: var(--story-accent); font: 500 clamp(.9rem, 3.3cqi, 1.24rem)/1.35 var(--serif); }
@media (max-width: 650px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-scroll { max-height: 67svh; }
  .preview-dialog-toolbar { justify-content: flex-end; }
  .preview-device { display: none; }
  .preview-story, .preview-dialog[data-device=phone] .preview-story { width: min(100%, 620px); margin-top: 0; }
  .preview-story .story { border-radius: 0; }
  [data-receiver].wrap { width: min(100%, 620px); padding: 0 0 20px; }
  [data-receiver] .story { border-radius: 0; }
  [data-receiver] .unlock { margin-inline: 18px; }
  [data-receiver] .receiver-brand { padding-top: 15px; }
}
