@font-face {
  font-family: "Golos Text";
  src: url(/paper/golos.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face { font-family: Letter; src: url(/paper/roman.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Letter; src: url(/paper/italic.woff2) format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: Hand; src: url(/paper/hand.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Marck; src: url(/paper/marck.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Neucha; src: url(/paper/neucha.woff2) format("woff2"); font-display: swap; }

:root {
  --paper: #fffcfa;
  --white: #fff;
  --ink: #291721;
  --muted: #685662;
  --accent: #8c284e;
  --accent-strong: #701d3d;
  --accent-soft: #faeaf0;
  --line: #e9d9e0;
  --focus: #8c284e;
  --radius-control: .65rem;
  --radius-button: .8rem;
  --radius-panel: 1.15rem;
  --radius-stage: 1.55rem;
  --body: "Golos Text", "Segoe UI", sans-serif;
  --display: Letter, Georgia, serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--body); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(3rem, 7vw, 6.2rem); line-height: .88; letter-spacing: -.062em; }
h2 { font-size: clamp(2.45rem, 4.5vw, 3.9rem); line-height: 1; letter-spacing: -.045em; }
h3 { font-size: 1.03rem; line-height: 1.4; font-weight: 800; }
p { overflow-wrap: anywhere; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
button, a, summary, input[type="checkbox"] { touch-action: manipulation; -webkit-tap-highlight-color: #f3c9dc; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
:target { scroll-margin-top: 1.5rem; }
[hidden] { display: none !important; }
.shell { width: min(100% - 5rem, 76rem); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; z-index: 6; inset: .6rem auto auto .6rem; padding: .6rem 1rem; background: white; border-radius: .5rem; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.button {
  min-height: 3.05rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: var(--radius-button); padding: .62rem 1.05rem;
  font-size: .875rem; font-weight: 800; line-height: 1.3; text-align: center; text-decoration: none;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.button:active { transform: translateY(1px); }
.primary { color: #fff; background: var(--accent); }
.primary:hover { background: var(--accent-strong); }
.secondary { color: var(--accent-strong); background: var(--white); border-color: var(--line); }
.secondary:hover, .quiet:hover { border-color: #c97597; background: var(--accent-soft); }
.quiet { color: var(--accent-strong); background: transparent; }
.textbtn {
  background: none; border: 0; min-height: 2.75rem; padding: .55rem 0; display: inline-flex; align-items: center;
  font-size: .875rem; font-weight: 800; color: var(--accent-strong); text-decoration: underline;
  text-underline-offset: .22em; text-decoration-thickness: 1px;
}
.textbtn:hover { color: var(--accent); text-decoration-thickness: 2px; }
.play-icon { width: 0; height: 0; border-block: .3rem solid transparent; border-left: .46rem solid currentColor; }

.site-header { border-bottom: 1px solid #f0e5e9; }
.site-bar { min-height: 4.6rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; justify-self: start; font-size: .94rem; font-weight: 800; }
.brand:hover { color: var(--accent); }
.brand-mark { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; background: var(--accent-soft); border-radius: .7rem; }
.site-nav { display: flex; gap: 1.7rem; }
.site-nav a { display: grid; place-items: center; min-height: 2.75rem; color: var(--muted); text-decoration: none; font-size: .875rem; font-weight: 750; }
.site-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .22em; }
.langbar { display: flex; align-items: center; justify-self: end; grid-column: 3; border: 1px solid var(--line); border-radius: .7rem; padding: .16rem; }
.langbar button { min-width: 2.65rem; min-height: 2.45rem; border: 0; border-radius: .5rem; background: transparent; font-size: .825rem; font-weight: 800; color: var(--muted); }
.langbar button:hover { color: var(--accent); }
.langbar button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }

.hero {
  margin-block-start: 2rem;
  display: grid; grid-template-columns: 1.03fr 1fr; align-items: stretch;
  min-height: 28rem; border-radius: 1.35rem; background: #fcf0f3;
  overflow: clip; isolation: isolate;
}
.hero-copy { align-self: center; padding: clamp(1.5rem, 4.6vw, 4.25rem); padding-inline-end: .5rem; z-index: 1; }
.hero h1 { font-size: clamp(3.4rem, 6.2vw, 5.45rem); max-width: 12ch; }
.hero-copy p { color: var(--muted); max-width: 38ch; margin-block: 1.3rem 1.65rem; }
.hero-art {
  position: relative; display: grid; place-items: center; isolation: isolate;
  min-height: 100%; background: #f3dce7;
}
.hero-art::before {
  content: ""; position: absolute; inset: 16% 14% 12%;
  border-radius: 50%; background: #f8e8ef; transform: rotate(-11deg) scaleX(.92);
}
.hero-orbit {
  position: absolute; width: 73%; height: 72%; border: 1px solid #e5b5ca;
  border-radius: 50%; transform: rotate(-27deg) scaleX(.97);
}
.hero-art img {
  z-index: 1; position: absolute; width: 78%; height: 98%; object-fit: contain;
  filter: drop-shadow(0 17px 13px #71234325); transform: rotate(-7deg);
  animation: hero-arrive .84s cubic-bezier(.18,.7,.3,1) both;
}
@keyframes hero-arrive {
  from { opacity: 0; transform: translateY(16px) rotate(-12deg) scale(.96); }
  to { opacity: 1; transform: rotate(-7deg); }
}
.hero-heart {
  --heart-color: #a93b68;
  position: absolute; z-index: 2; color: var(--heart-color); line-height: 1;
  text-shadow: .05em .08em .07em #77244626; font-family: Georgia, serif;
}
.hero-heart::before { content: "♥"; }
.hero-heart-one { top: 15%; right: 15%; transform: rotate(18deg); font-size: clamp(2rem, 5.4vw, 5.2rem); --heart-color: #aa4b75; }
.hero-heart-two { bottom: 16%; left: 13%; transform: rotate(-18deg); font-size: clamp(1.75rem, 4vw, 3.9rem); --heart-color: #d887a6; }
.hero-highlight { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 48% 40%, #fff6 0%, #fff0 62%); }

.collection { padding-block: 4.2rem; scroll-margin-top: 1.25rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-head p { color: var(--muted); margin-top: .55rem; }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-block: 1.35rem 1.05rem; }
.filters button, .mode-options button, .pill, .chip {
  min-height: 2.75rem; border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: .37rem .8rem; background: var(--white); color: var(--muted);
  text-align: start; font-size: .875rem; font-weight: 750;
}
.filters button { border-radius: 2rem; }
.filters button:hover, .mode-options button:hover, .pill:hover, .chip:hover { border-color: #c97597; color: var(--accent-strong); }
.filters button[aria-pressed="true"], .mode-options button[aria-pressed="true"], .pill[aria-pressed="true"] {
  background: var(--accent-soft); border-color: #d681a4; color: var(--accent-strong);
}
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; }
.card {
  min-width: 0; display: grid; grid-template-rows: 1fr auto;
  background: var(--white); border: 1px solid var(--line); border-radius: .95rem;
  padding: .42rem; text-align: start; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.card:hover { border-color: #ba5b82; }
.card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card-art {
  position: relative; aspect-ratio: 1.05; display: grid; place-items: center; overflow: hidden;
  border-radius: .66rem; background: var(--card-tone, #f1e5e9);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 49%; }
.card-art.is-cutout img { width: 98%; height: 98%; object-fit: contain; filter: drop-shadow(0 .3rem .21rem #58142d1a); }
.card[aria-pressed="true"] .card-art::after {
  content: "✓"; position: absolute; top: .38rem; right: .38rem; width: 1.48rem; height: 1.48rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-size: .85rem; font-weight: 800;
}
.card-name { display: block; min-width: 0; padding: .55rem .33rem .36rem; font-size: .875rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.collection-more { display: flex; justify-content: center; margin-top: 1.05rem; }
.collection-more:has(button[hidden]) { display: none; }

.studio { border-top: 1px solid var(--line); padding-block: 3.25rem 4.9rem; scroll-margin-top: 1.25rem; }
.studio-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: 1.4rem; margin-top: 1.65rem; }
.editor {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-panel); padding: clamp(1rem, 2.6vw, 1.8rem); min-width: 0;
}
.editor-block + .editor-block { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1.2rem; }
.effect-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .75rem; }
.effect-options .pill { min-height: 4.16rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; line-height: 1.25; padding: .35rem; overflow-wrap: anywhere; }
.effect-mark { color: #a24b73; display: block; font-size: 1.2rem; font-family: Georgia, "DejaVu Sans", serif; font-variant-emoji: text; font-weight: 700; }
.sound-setting { margin-top: .65rem; display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.sound-setting label { min-height: 2.75rem; display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted); }
.sound-setting input { width: 1.13rem; height: 1.13rem; margin: 0; accent-color: var(--accent); }
.mode-options { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.lines { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.field { display: grid; align-content: start; gap: .35rem; margin-top: .95rem; min-width: 0; }
.field label, .setting > span { font-size: .875rem; font-weight: 800; }
.optional { margin-left: .18rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .linkbox input {
  min-width: 0; width: 100%; border: 1px solid #d5c1cc;
  border-radius: var(--radius-control); background: #fffdfd; padding: .63rem .75rem;
}
.field input::placeholder, .field textarea::placeholder { color: #7d6975; opacity: 1; }
.field textarea { resize: vertical; min-height: 6.5rem; }
.field [aria-invalid="true"] { border-color: #a7264f; }
.field-error, .composer-error { color: #9d2046; font-weight: 750; font-size: .875rem; }
.counter { color: var(--muted); text-align: right; font-size: .81rem; font-variant-numeric: tabular-nums; }
.settings { margin-top: .6rem; }
.settings summary { min-height: 2.75rem; padding: .59rem 0; cursor: pointer; color: var(--accent-strong); font-size: .875rem; font-weight: 800; }
.setting { margin-block: .6rem; }
.pills { display: flex; flex-wrap: wrap; gap: .36rem; }
.setting .pills { margin-top: .35rem; }
.dot { display: inline-block; vertical-align: middle; width: .68rem; height: .68rem; margin-right: .33rem; border-radius: 50%; }
.live-preview {
  border-radius: var(--radius-panel); border: 1px solid var(--line); padding: .8rem;
  background: #fdf8fa; min-width: 0;
}
.preview-head, .preview-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem; }
.preview-head { padding: .32rem .3rem .75rem; }
.preview-head span { font-size: .85rem; color: var(--muted); font-weight: 750; }
.preview-art {
  height: clamp(15rem, 25vw, 19rem);
  display: grid; place-items: center; border-radius: var(--radius-button); overflow: hidden;
  background: var(--card-tone, #f3e3e9);
}
.preview-art img { height: 100%; width: 100%; object-fit: contain; }
.preview-art.is-cutout img { padding: .5rem; filter: drop-shadow(0 .52rem .45rem #58142d29); }
.preview-actions { margin-top: .8rem; }
.preview-actions .button { flex: 1 1 10.4rem; }
.live-copy { margin-block: .6rem; padding: .7rem; border-radius: .6rem; background: #fff; }
.live-greeting { font: 1.4rem/1.2 var(--display); color: var(--accent-strong); }
.live-message, .message { white-space: pre-wrap; overflow-wrap: anywhere; }
.live-message { margin: .45rem 0; font-size: 1.2rem; line-height: 1.4; }
.live-from { font-size: 1.04rem; }
.composer-error { padding: .65rem .2rem .1rem; }
.mobile-preview-link { display: none; }

.standalone { padding-block: clamp(2rem, 7vw, 6rem); }
.standalone-grid { display: grid; grid-template-columns: 1fr 1.03fr; gap: clamp(1.3rem, 5vw, 4.7rem); align-items: center; }
.standalone-copy { min-width: 0; }
.standalone-copy h1 { font-size: clamp(3.1rem, 7vw, 6.8rem); line-height: .94; overflow-wrap: anywhere; }
.standalone-copy h1 em { color: var(--accent); }
.standalone-copy .lead { color: var(--muted); font-size: clamp(1rem, 1.65vw, 1.23rem); margin-block: 1rem 1.4rem; }
.standalone-art {
  --card-tone: #f3dce7;
  height: clamp(21rem, 41vw, 33rem); border: 1px solid var(--line); border-radius: var(--radius-stage);
  background: var(--card-tone); display: grid; place-items: center; overflow: hidden;
}
.standalone-art img { width: 100%; height: 100%; object-fit: contain; }
.standalone-art.is-cutout img { width: 90%; height: 95%; filter: drop-shadow(0 .7rem .7rem #58142d25); }
.linkbox { display: grid; grid-template-columns: 1fr auto; gap: .45rem; margin-block: 1.2rem .85rem; }
.share-note { color: var(--muted); font-size: .875rem; margin-block: .65rem; }
.sender-line, .demo-label { font-size: .88rem; margin-bottom: .65rem; color: var(--muted); overflow-wrap: anywhere; }
.recipient-grid [id$="-stage"] { min-width: 0; }
.recipient-actions { margin-top: 1.2rem; }
.create-own { margin-top: .5rem; }
.message { margin-block: 1rem; font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.35; }
.signed { font-size: 1.3rem; }
.loading { text-align: center; padding: 4rem 1.2rem; color: var(--muted); }

.scene {
  --scene-color: #f3dce7;
  position: relative; isolation: isolate; overflow: clip; background: var(--scene-color);
  border: 1px solid #e6cad9; border-radius: var(--radius-stage); width: 100%; min-width: 0; aspect-ratio: 1.05;
  display: grid; place-items: center; perspective: 950px;
}
.scene-orbit {
  position: absolute; width: 72%; height: 72%; border: 1px solid #97527045; border-radius: 50%;
  transform: rotate(-19deg); pointer-events: none;
}
.scene-envelope {
  position: absolute; z-index: 2; width: 63%; aspect-ratio: 1.52; bottom: 19%; left: 18.5%;
  pointer-events: none; transform-origin: center bottom; transform-style: preserve-3d;
  filter: drop-shadow(0 .8rem .66rem #74244735);
}
.scene-envelope > span { position: absolute; }
.envelope-back, .envelope-front { inset: 0; border-radius: .64rem; }
.envelope-back { background: #d692ad; }
.envelope-front { z-index: 3; background: #f7dce7; clip-path: polygon(0 0, 45% 45%, 55% 45%, 100% 0, 100% 100%, 0 100%); }
.envelope-front::after {
  content: ""; position: absolute; inset: 0; clip-path: polygon(0 100%, 50% 40%, 100% 100%);
  background: #fae6ee;
}
.envelope-flap {
  z-index: 4; inset: 0 0 auto; height: 63%; border-radius: .6rem .6rem 0 0;
  clip-path: polygon(0 0, 100% 0, 52% 96%, 48% 96%);
  background: #eeb9ce; transform-origin: top;
}
.envelope-seal {
  z-index: 5; width: 18%; aspect-ratio: 1; border-radius: 50%;
  left: 41%; top: 44%; color: #ffd9e6; background: #a23762;
  display: grid; place-items: center; font: clamp(.85rem, 3.15vw, 2.45rem)/1 Georgia, serif;
  box-shadow: inset 0 0 0 .18rem #d27c9b, 0 .13rem .24rem #7c224e42;
}
.envelope-seal::before { content: "♥"; margin-top: -.06em; }
.scene[data-state="open"] .envelope-flap { transform: rotateX(174deg); z-index: 1; }
.scene[data-state="open"] .envelope-seal { opacity: 0; }
.scene[data-state="open"] .scene-envelope { z-index: 1; transform: translateY(22%) scale(.85); opacity: .63; }
.scene-bouquet {
  position: absolute; z-index: 3; width: 67%; height: 87%; top: 4%; left: 16.5%; object-fit: contain;
  transform-origin: center 82%; filter: drop-shadow(0 .56rem .42rem #6a25402f);
}
.scene-bouquet:not(.is-cutout) { width: 50%; height: 78%; left: 25%; top: 8%; border-radius: .75rem; object-fit: cover; }
.scene[data-state="closed"] .scene-bouquet, .scene:not([data-ready]) .scene-bouquet { opacity: 0; pointer-events: none; }
.scene-particles { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.scene-particle { position: absolute; display: block; top: 65%; left: 50%; border-radius: 100% 0 100% 0; background: currentColor; }
.scene-particle[data-shape="heart"] { border-radius: 0; background: none; text-shadow: 0 2px 5px #6b24462b; font: 1em/1 Georgia, serif; }
.scene-particle[data-shape="heart"]::before { content: "♥"; }
.scene-particle[data-shape="spark"] { border-radius: 0; clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0% 50%, 37% 37%); }
.scene-particle[data-shape="confetti"] { border-radius: .1rem; }
.scene-particle[data-shape="snow"] { border-radius: 50%; box-shadow: 0 0 3px #62799080; }
.scene-hit { position: absolute; z-index: 5; width: 66%; height: 46%; bottom: 17%; opacity: 0; border: 0; }
.scene[data-state="closed"]:has(.scene-hit:hover) .scene-envelope { transform: translateY(-3px); }

dialog {
  width: min(calc(100% - 1.5rem), 36rem);
  max-height: calc(100dvh - 1.5rem);
  border: 1px solid #e4c7d7; border-radius: var(--radius-panel); padding: .85rem;
  background: var(--paper); box-shadow: 0 1rem 4rem #3d142237;
  overscroll-behavior: contain;
}
dialog::backdrop { background: #3317298a; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .45rem; padding: .1rem .1rem .65rem .3rem; }
.dialog-header h2 { font-size: clamp(1.95rem, 5vw, 2.9rem); }
.icon-button { min-width: 2.75rem; height: 2.75rem; border-radius: .62rem; border: 1px solid var(--line); background: #fff; color: var(--accent); font-size: 1.5rem; line-height: 1; }
.icon-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.dialog-actions { justify-content: center; padding: .75rem 0 .1rem; }
dialog .scene { max-height: min(55dvh, 26rem); border-radius: .85rem; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.15rem; }
.site-footer > div { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }

@media (max-width: 65rem) {
  .shell { width: min(100% - 3rem, 76rem); }
  .hero { min-height: 26rem; }
  .cards { gap: .56rem; }
}
@media (max-width: 52rem) {
  .hero { min-height: 24rem; }
  .hero h1 { font-size: clamp(3rem, 7.6vw, 4.5rem); }
  .hero-copy p { margin-block: .9rem 1.05rem; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .effect-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .studio-grid { gap: .75rem; }
}
@media (max-width: 38rem) {
  .shell { width: calc(100% - 2rem); }
  .site-bar { min-height: 3.75rem; display: flex; justify-content: space-between; gap: .5rem; }
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; margin-block-start: 1rem; border-radius: 1.2rem; }
  .hero-copy { padding: 1.45rem 1.25rem 1.35rem; }
  .hero h1 { font-size: clamp(3.1rem, 12vw, 4.6rem); }
  .hero-art { min-height: 16rem; height: min(72vw, 22rem); }
  .hero-art img { width: 78%; }
  .hero-orbit { width: 65%; height: 77%; }
  .collection { padding-block: 2.8rem; }
  .studio { padding-block: 2.6rem 3rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-grid, .standalone-grid { grid-template-columns: 1fr; }
  .mobile-preview-link { display: inline-flex; }
  .preview-art { height: clamp(14rem, 65vw, 19rem); }
  .recipient-grid { gap: 1rem; }
  .standalone-art { height: 21rem; }
  .scene { border-radius: var(--radius-panel); }
}
@media (max-width: 24rem) {
  .shell { width: calc(100% - 1.35rem); }
  .hero-copy { padding-inline: .95rem; }
  .button { padding-inline: .72rem; }
  .lines, .linkbox { grid-template-columns: 1fr; }
  .effect-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: start; }
  .mobile-preview-link { max-width: 8.7rem; padding-inline-start: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
