@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

:root {
    --paper: #fbf8f2;
    --paper-deep: #f1ebe1;
    --ink: #172036;
    --ink-soft: #5c6473;
    --line: rgba(23, 32, 54, .15);
    --coral: #f06b57;
    --coral-dark: #d95142;
    --blue: #4269d0;
    --lilac: #9a74c9;
    --yellow: #e8a92b;
    --white: #fffdfa;
    --radius: 14px;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'DM Sans', Arial, sans-serif;
    --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body:has(.modal-backdrop:not([hidden])) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.site-shell { overflow: hidden; max-width: 100vw; }
.container { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }

.top-note { min-height: 32px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: rgba(255,255,255,.72); font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.status-dot { width: 6px; height: 6px; border-radius: 999px; background: #82d6a5; box-shadow: 0 0 0 4px rgba(130,214,165,.13); }
.site-header { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.05em; font-size: 18px; }
/* Art-direction for the wordmark. "Send" + "Cards" stay in the same DM Sans
   weight as the rest of the UI; the connector "the" is rendered in Fraunces
   italic (the same display serif used for the hero's <em> moments) and gets a
   hand-drawn underline to echo the scribble/ink details in the rest of the
   design. Keeping the mark + wordmark on one line keeps the original layout
   intact while making the brand feel hand-set rather than just typed. */
.brand-text { display: inline-flex; align-items: baseline; gap: 1px; line-height: 1; }
.brand-text em {
    position: relative;
    margin: 0 .12em;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: 1.18em;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--coral);
    /* The slightly raised baseline keeps the italic connectors optically
       aligned with the surrounding cap-height of DM Sans. */
    top: .04em;
    transition: color .25s ease, transform .25s ease;
}
.brand-text em::after {
    /* Hand-drawn underline, evoking the dashed art-stamp / scribble accents
       in the cards. We use a small SVG so the line has real taper and a
       tiny dip at the end, instead of a flat CSS line. */
    content: '';
    position: absolute;
    left: -.08em;
    right: -.08em;
    bottom: -.18em;
    height: .32em;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'><path d='M2 7 C 18 2, 38 10, 55 5 S 88 8, 98 4' fill='none' stroke='%23f06b57' stroke-width='2' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    opacity: .9;
    pointer-events: none;
    transform-origin: left center;
    transition: transform .3s ease;
}
.brand:hover .brand-text em { color: var(--coral-dark); }
.brand:hover .brand-text em::after { transform: scaleX(1.04); }
.brand-mark { position: relative; display: inline-flex; width: 23px; height: 21px; align-items: flex-end; gap: 3px; }
.brand-mark span { width: 5px; border-radius: 999px; background: var(--coral); transform: rotate(10deg); }
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 21px; background: var(--blue); transform: rotate(-5deg); }
.brand-mark span:nth-child(3) { height: 16px; background: var(--yellow); transform: rotate(8deg); }
.desktop-nav { display: flex; gap: 30px; align-items: center; margin-left: auto; color: var(--ink-soft); font-size: 13px; }
.desktop-nav a, .footer-bottom a { transition: color .2s ease; }
.desktop-nav a:hover, .footer-bottom a:hover { color: var(--coral-dark); }
.desktop-nav .nav-cta {
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--coral);
    color: #fff !important;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}
.desktop-nav .nav-cta:hover {
    background: var(--coral-dark);
    transform: translateY(-1px);
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; border: 0; border-radius: 6px; padding: 15px 20px; font-weight: 700; font-size: 12px; line-height: 1; letter-spacing: .01em; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 7px 17px rgba(23,32,54,.12); }
.button span { font-size: 17px; line-height: 0; font-weight: 400; }
.button-small { padding: 12px 15px; font-size: 11px; }
.button-ink { background: var(--ink); color: #fff; }
.button-paper { background: var(--paper); color: var(--ink); }

.hero { padding: 55px 0 74px; display: flex; flex-direction: column; align-items: stretch; gap: 46px; }
.hero > .hero-copy { width: 100%; text-align: center; order: 2 !important; }
.hero > .builder-wrap { order: 1 !important; }
.hero-copy .eyebrow { justify-content: center; }
.hero-copy .hero-lede { margin-inline: auto; }
.eyebrow-line { display: inline-block; width: 23px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.065em; }
h1 { margin-bottom: 25px; font-size: clamp(50px, 5.3vw, 80px); line-height: .97; font-weight: 600; }
h1 em, h2 em { color: var(--coral); font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.06em; }
.hero-lede { max-width: 100%; color: var(--ink-soft); font-size: 16px; line-height: 1.65; white-space: nowrap; }
@media (max-width: 700px) { .hero-lede { white-space: normal; } }
.hero-proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero-proof > span { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1px solid rgba(23,32,54,.12); border-radius: 999px; background: #fff; color: var(--ink); font: 600 14px/1 var(--sans); box-shadow: 4px 5px 0 #e8dfd1; }
.hero-proof .proof-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: 12px; line-height: 1; }
.builder-wrap { position: relative; width: min(960px, 100%); display: grid; grid-template-columns: minmax(230px, .62fr) minmax(510px, 1.38fr); align-items: center; gap: 70px; order: 1; }
.builder-wrap .builder-card { grid-column: 2; grid-row: 1; }
.builder-card { position: relative; z-index: 2; padding: 31px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 13px 17px 0 #e8dfd1; }
.builder-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.kicker { margin-bottom: 10px; color: var(--ink-soft); font-size: 9px; }
.builder-heading h2 { margin: 0; font-size: 25px; line-height: 1.05; }
.builder-step { color: #a3a7af; font: 10px var(--mono); }
.field-grid, .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { position: relative; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; color: var(--ink-soft); font: 500 10px var(--mono); letter-spacing: .02em; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid rgba(23,32,54,.17); border-radius: 5px; padding: 12px 13px; outline: none; background: #fff; color: var(--ink); font: 500 13px var(--sans); transition: border-color .2s ease, box-shadow .2s ease; }
.field textarea { min-height: 78px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #b2b1ad; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(240,107,87,.12); }
.char-count { position: absolute; right: 12px; bottom: 11px; color: #b6b4ae; font: 9px var(--mono); }
.field-message { margin-bottom: 18px; }
.field small { color: #b0afb0; font-size: 9px; }
.field-set { margin: 0 0 19px; padding: 0; border: 0; }
.field-set legend { margin-bottom: 9px; color: var(--ink-soft); font: 500 10px var(--mono); }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice { position: relative; display: grid; grid-template-columns: 23px 1fr; grid-template-rows: auto auto; column-gap: 6px; padding: 11px 9px; text-align: left; border: 1px solid rgba(23,32,54,.14); border-radius: 5px; background: #fff; color: var(--ink); }
.choice:hover { border-color: rgba(23,32,54,.4); }
.choice.is-selected { border-color: var(--coral); background: #fff8f5; box-shadow: inset 0 0 0 1px var(--coral); }
.choice-icon { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-deep); color: var(--coral-dark); font-size: 14px; }
.choice span:not(.choice-icon) { font: 700 11px var(--sans); }
.choice small { margin-top: 3px; color: #96999f; font: 9px var(--sans); white-space: nowrap; }
.field-row { align-items: end; }
.field-select { min-width: 0; }
.field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23172036' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 13px center; padding-right: 30px; }
.theme-field { margin-bottom: 16px; }
/* Mood swatches: a grid of square tiles that visually represent the
   card's color story, not a colour swatch. Each tile is a small paper card:
   light pastel body + accent dot + name label. The 12 tiles fill the
   available width in `.options-content .field-row`'s narrow right column.

   Music mode keeps the music picker in the row, so the mood tiles only
   get the right ~34% of the row → 3 columns. In Motion / Note mode the
   music field is hidden, the theme field takes the full row, and we widen
   to 4 columns so the 12 tiles fit in 3 neat rows. */
.theme-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; min-height: 39px; }
#card-builder[data-card-mode="animation"] .theme-choices,
#card-builder[data-card-mode="message"] .theme-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* When the music field is hidden, the field-row collapses to a single
   full-width column so the mood grid gets the whole row to spread across. */
#card-builder[data-card-mode="animation"] .options-content .field-row,
#card-builder[data-card-mode="message"] .options-content .field-row { grid-template-columns: 1fr; }
#card-builder[data-card-mode="animation"] .field-row .theme-field,
#card-builder[data-card-mode="message"] .field-row .theme-field { width: 100%; }
/* On narrow screens the 4-up grid crowds the labels, so keep 3 columns
   so each swatch stays comfortably tappable. */
@media (max-width: 700px) {
    #card-builder[data-card-mode="animation"] .theme-choices,
    #card-builder[data-card-mode="message"] .theme-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.theme-swatch {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 56px;
    padding: 8px 9px 7px;
    border: 1px solid rgba(23, 32, 54, .12);
    border-radius: 8px;
    background: #f7c1ad;
    color: var(--ink);
    text-align: left;
    box-shadow: 0 1px 0 rgba(23, 32, 54, .03);
    overflow: hidden;
    isolation: isolate;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.theme-swatch::before {
    /* Accent dot, top-right, so the tile reads as "named colour" without
       looking like a plain button. Uses the swatch's accent color via the
       .theme-XXX modifier below. */
    content: '';
    position: absolute;
    top: 7px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 2px rgba(255, 253, 250, .9);
}
.theme-swatch-name {
    position: relative;
    z-index: 1;
    font: 700 9.5px/1 var(--sans);
    letter-spacing: -.005em;
    color: var(--ink);
    text-shadow: 0 1px 0 rgba(255, 253, 250, .5);
}
.theme-swatch:hover { transform: translateY(-1px); box-shadow: 0 4px 9px rgba(23, 32, 54, .1); border-color: rgba(23, 32, 54, .22); }
.theme-swatch.is-selected {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px var(--ink), 0 4px 9px rgba(23, 32, 54, .12);
    transform: translateY(-1px);
}
.theme-swatch.is-selected::after {
    /* Tiny check mark in the bottom-right corner, so the active mood is
       unmistakable. */
    content: '✓';
    position: absolute;
    right: 7px;
    bottom: 5px;
    color: var(--ink);
    font: 700 11px/1 var(--sans);
    z-index: 1;
}
.theme-swatch:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
/* Pastel backgrounds (the "mood" of the card). Each swatch tile uses the
   same fill as the live preview card so the choice mirrors the result. */
.theme-coral { background: #f7c1ad; }
.theme-blue { background: #bec9f0; }
.theme-lilac { background: #d5c7e3; }
.theme-yellow { background: #f3d795; }
.theme-mint { background: #bfe3d2; }
.theme-sky { background: #b9dbe7; }
.theme-rose { background: #f2c5c9; }
.theme-sage { background: #d5dfc3; }
.theme-cream { background: #f1e8d4; }
.theme-plum { background: #dcc8d6; }
.theme-olive { background: #cccf9d; }
.theme-sand { background: #ecd9bf; }
/* Accent dot color matches the card's accent (left rail, type label, etc.) */
.theme-coral::before { background: #f06b57; }
.theme-blue::before { background: #4269d0; }
.theme-lilac::before { background: #9a74c9; }
.theme-yellow::before { background: #e8a92b; }
.theme-mint::before { background: #378d6b; }
.theme-sky::before { background: #3f879c; }
.theme-rose::before { background: #c85c72; }
.theme-sage::before { background: #6f8a4e; }
.theme-cream::before { background: #b08a3a; }
.theme-plum::before { background: #7a4475; }
.theme-olive::before { background: #7a8037; }
.theme-sand::before { background: #a87841; }
.button-submit { width: 100%; margin-top: 2px; background: var(--coral); color: #fff; }
.button-submit:hover { background: var(--coral-dark); box-shadow: 0 9px 19px rgba(240,107,87,.2); }
.form-note { margin: 13px 0 0; color: #aaa8a2; text-align: center; font-size: 10px; }

.preview-card { position: relative; z-index: 1; grid-column: 1; grid-row: 1; min-height: 342px; padding: 13px; overflow: hidden; border-radius: 11px; background: #f7c1ad; box-shadow: 5px 10px 0 rgba(23,32,54,.12); transform: rotate(3.5deg) translateX(2px); transition: background .35s ease, transform .35s ease; }
.preview-card:hover { transform: rotate(1deg) translateX(2px) translateY(-3px); }
.preview-card.theme-blue { background: #bec9f0; }
.preview-card.theme-lilac { background: #d5c7e3; }
.preview-card.theme-yellow { background: #f3d795; }
.preview-topline, .preview-footer { display: flex; justify-content: space-between; color: rgba(23,32,54,.6); font: 8px var(--mono); letter-spacing: .08em; }
.preview-topline { padding: 1px 2px 9px; }
.preview-spark { color: var(--coral-dark); font-size: 16px; line-height: 7px; }
.preview-art { position: relative; height: 167px; overflow: hidden; border-radius: 7px; background: #e2a49d; }
.preview-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(.94); }
.preview-art::after { position: absolute; inset: 0; content: ''; background: linear-gradient(120deg, rgba(240,107,87,.15), rgba(23,32,54,.16)); mix-blend-mode: multiply; }
.art-stamp { position: absolute; z-index: 1; right: 12px; top: 11px; width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed rgba(255,255,255,.8); color: #fff; font: 8px/1.2 var(--mono); letter-spacing: .1em; transform: rotate(8deg); }
.art-stamp strong { font-size: 9px; }
.art-scribble { position: absolute; z-index: 1; bottom: 10px; left: 12px; color: #fff; font: 18px/1 var(--serif); font-style: italic; transform: rotate(-5deg); text-shadow: 0 1px 8px rgba(23,32,54,.25); }
.preview-message { padding: 13px 6px 10px; }
.preview-label { color: rgba(23,32,54,.55); font: 9px var(--mono); }
.preview-label strong { color: var(--ink); }
.preview-message p { max-width: 190px; margin: 7px 0 0; font: 500 21px/1.1 var(--serif); letter-spacing: -.045em; }
.preview-track { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 8px; border-radius: 5px; background: rgba(255,255,255,.42); }
.soundtrack-player { flex: 0 0 100%; min-width: 0; width: 100%; }
.soundtrack-player audio { display: block; width: 100%; height: 42px; margin-top: 6px; }

/* Autoplay fallback: the browser refused to start the music on its own, so
   we offer one obvious button instead of a silent page. */
.audio-play-fallback { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 7px; padding: 9px 11px; border: 1px solid rgba(23,32,54,.16); border-radius: 7px; background: var(--white); color: var(--ink); text-align: left; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.audio-play-fallback:hover { border-color: var(--ink); transform: translateY(-1px); }
.audio-play-fallback[hidden] { display: none !important; }
.audio-play-glyph { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 9px; padding-left: 2px; }
.audio-play-text { font: 600 11px var(--sans); }

/* Four little bars that pulse while the soundtrack is running. */
.audio-meta { display: flex; align-items: center; gap: 8px; margin: 7px 0 0; }
.audio-meta:empty { display: none; }
.audio-wave { display: none; align-items: flex-end; gap: 2px; height: 13px; }
.audio-wave[data-active="true"] { display: flex; }
.audio-wave i { display: block; width: 2px; height: 6px; border-radius: 2px; background: var(--coral-dark); animation: audio-wave .9s ease-in-out infinite alternate; }
.audio-wave i:nth-child(2) { animation-delay: .15s; }
.audio-wave i:nth-child(3) { animation-delay: .3s; }
.audio-wave i:nth-child(4) { animation-delay: .45s; }
@keyframes audio-wave { to { height: 13px; opacity: .55; } }
.audio-state { color: var(--ink-soft); font: 500 10px var(--sans); }
.audio-state:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .audio-wave i { animation: none; } }
#preview-track[hidden], .soundtrack-player[hidden], #preview-music-link[hidden] { display: none !important; }
#preview-track .track-meta, .open-card-track .track-meta { flex: 1 1 100%; }
#preview-track .track-meta strong, .open-card-track .track-meta strong { max-width: none; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
#preview-track .track-meta small, .open-card-track .track-meta small { font-size: 12px; }
#preview-track .music-open, .open-card-track .music-open { margin-left: 0; font-size: 14px; }
.track-play { display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 9px; }
.track-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track-meta small { color: rgba(23,32,54,.5); font: 7px var(--mono); letter-spacing: .08em; }
.track-meta strong { max-width: 88px; overflow: hidden; color: var(--ink); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.track-wave { display: flex; align-items: center; gap: 2px; height: 20px; margin-left: auto; }
.track-wave i { display: block; width: 2px; height: 7px; border-radius: 3px; background: var(--coral-dark); animation: wave 1s ease-in-out infinite alternate; }
.track-wave i:nth-child(2) { height: 12px; animation-delay: -.2s; }.track-wave i:nth-child(3) { height: 17px; animation-delay: -.5s; }.track-wave i:nth-child(4) { height: 10px; animation-delay: -.7s; }.track-wave i:nth-child(5) { height: 14px; animation-delay: -.4s; }.track-wave i:nth-child(6) { height: 6px; animation-delay: -.1s; }.track-wave i:nth-child(7) { height: 11px; animation-delay: -.3s; }
@keyframes wave { to { transform: scaleY(.55); opacity: .55; } }
.preview-footer { padding: 11px 2px 1px; font-size: 7px; }

.marquee { display: block; position: relative; left: 50%; right: 50%; width: 100vw; max-width: 100vw; margin-left: -50vw; margin-right: -50vw; overflow: hidden; background: var(--coral); color: #fff8f5; }
.marquee-track { display: flex; flex-shrink: 0; width: max-content; gap: 90px; padding: 14px 0; padding-right: 90px; font: 500 11px var(--mono); letter-spacing: .03em; animation: marquee 80s linear infinite; will-change: transform; }
.marquee-track > span { display: inline-flex; align-items: center; flex-shrink: 0; white-space: nowrap; }
.marquee-track b { padding: 0 13px; font-family: var(--sans); font-size: 15px; font-weight: 400; }
@keyframes marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(-100% / 8), 0, 0); } }

.gallery-section { padding: 102px 0 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.section-heading h2, .how-section h2, .ideas-section h2 { margin: 0; font-size: clamp(39px, 4vw, 59px); line-height: .99; font-weight: 600; }
.section-heading > p { max-width: 295px; margin-bottom: 4px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 23px; }
.filter-chip { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font: 10px var(--mono); transition: all .2s ease; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.showcase-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.showcase-card:hover { transform: translateY(-6px); box-shadow: 0 15px 24px rgba(23,32,54,.1); }
.showcase-media { position: relative; aspect-ratio: .93; overflow: hidden; background: var(--paper-deep); }
.showcase-media::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, rgba(23,32,54,.02) 40%, rgba(23,32,54,.48)); }
.showcase-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7); transition: transform .35s ease; }
.showcase-card:hover .showcase-media img { transform: scale(1.04); }
.media-tag { position: absolute; z-index: 1; left: 11px; bottom: 10px; padding: 6px 8px; border-radius: 4px; background: rgba(255,253,250,.87); color: var(--ink); font: 9px var(--mono); }
.media-tag span { color: var(--card-accent); font-size: 14px; vertical-align: -1px; }
.media-arrow { position: absolute; z-index: 1; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 50%; background: rgba(255,253,250,.85); color: var(--ink); font-size: 15px; transition: background .2s ease, color .2s ease; }
.showcase-card:hover .media-arrow { background: var(--card-accent); color: #fff; }
.showcase-body { padding: 15px 14px 16px; }
.showcase-meta { display: flex; gap: 6px; color: #9b9da3; font: 8px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.showcase-body h3 { min-height: 45px; margin: 12px 0 17px; font: 500 20px/1.1 var(--serif); letter-spacing: -.04em; }
.showcase-bottom { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 10px; }
.mini-line { width: 18px; height: 1px; background: var(--card-accent); }
.showcase-bottom span:last-child { margin-left: auto; color: var(--card-accent); font: 9px var(--mono); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px; border: 1px dashed var(--line); text-align: center; color: var(--ink-soft); }
.empty-state strong { color: var(--ink); }
.empty-state .button { margin-top: 10px; }

.how-section { padding: 104px 0 112px; background: var(--ink); color: #fff; }
.section-heading-light .eyebrow { color: #f39b89; }.section-heading-light > p { color: rgba(255,255,255,.58); }
.section-heading-light h2 em { color: #f39b89; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.step-card { position: relative; min-height: 246px; padding: 24px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(255,255,255,.035); }
.step-card-highlight { background: var(--coral); border-color: var(--coral); transform: translateY(-14px); }
.step-number { color: rgba(255,255,255,.5); font: 10px var(--mono); }.step-icon { position: absolute; top: 21px; right: 22px; color: #f39b89; font-size: 27px; }.step-card-highlight .step-icon { color: rgba(255,255,255,.82); }
.step-card h3 { margin: 72px 0 11px; font-size: 20px; letter-spacing: -.04em; }.step-card p { max-width: 230px; margin-bottom: 0; color: rgba(255,255,255,.57); font-size: 12px; line-height: 1.65; }.step-card-highlight p { color: rgba(255,255,255,.75); }

.ideas-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 120px; align-items: center; padding: 128px 0 137px; }
.ideas-copy > p:not(.eyebrow) { max-width: 340px; margin: 25px 0 24px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--coral-dark); font: 700 11px var(--mono); }.text-link span { font-size: 18px; transition: transform .2s ease; }.text-link:hover span { transform: translateX(4px); }
.ideas-stack { position: relative; min-height: 315px; }.idea-note { position: absolute; width: min(390px, 80%); display: grid; grid-template-columns: 38px 1fr 25px; grid-template-rows: auto auto; column-gap: 13px; padding: 19px 18px; border: 1px solid rgba(23,32,54,.13); border-radius: 6px; background: var(--white); box-shadow: 7px 9px 0 #ece4d7; }.idea-icon { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-deep); color: var(--coral-dark); font-size: 18px; }.idea-note strong { align-self: end; font-size: 13px; }.idea-note small { margin-top: 5px; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }.idea-arrow { grid-row: span 2; align-self: center; color: var(--coral-dark); font-size: 19px; }.idea-note-one { top: 7px; left: 6%; transform: rotate(-3deg); }.idea-note-two { top: 103px; left: 19%; background: #e2eafa; transform: rotate(2.5deg); }.idea-note-two .idea-icon { background: rgba(255,255,255,.66); color: var(--blue); }.idea-note-three { top: 203px; left: 3%; background: #ffe5bf; transform: rotate(-1deg); }.idea-note-three .idea-icon { background: rgba(255,255,255,.66); color: #ae7412; }

.faq-section { display: grid; grid-template-columns: .72fr 1.28fr; gap: 110px; padding: 0 0 127px; }.faq-section h2 { margin: 0; font-size: 42px; letter-spacing: -.06em; }.faq-list details { padding: 21px 0; border-top: 1px solid var(--line); }.faq-list details:last-child { border-bottom: 1px solid var(--line); }.faq-list summary { display: flex; justify-content: space-between; gap: 30px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; }.faq-list summary::-webkit-details-marker { display: none; }.faq-list summary span { color: var(--coral-dark); font: 20px var(--sans); transition: transform .2s ease; }.faq-list details[open] summary span { transform: rotate(45deg); }.faq-list p { max-width: 600px; margin: 13px 35px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }

.site-footer { padding: 48px 0 23px; background: var(--ink); color: #fff; }.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-bottom: 45px; }.brand-light { color: #fff; }
.brand-light .brand-text em { color: #f7c1ad; }
.brand-light .brand-text em::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'><path d='M2 7 C 18 2, 38 10, 55 5 S 88 8, 98 4' fill='none' stroke='%23f7c1ad' stroke-width='2' stroke-linecap='round'/></svg>"); opacity: .85; }
.brand-light:hover .brand-text em { color: #fff; }.footer-top p { margin: 0 auto 0 22px; color: rgba(255,255,255,.52); font: 12px var(--serif); font-style: italic; }.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.42); font: 9px var(--mono); }.footer-bottom a { color: inherit; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(23,32,54,.65); backdrop-filter: blur(7px); }.modal-backdrop[hidden] { display: none; }.success-modal { position: relative; width: min(500px, 100%); padding: 43px; border-radius: 12px; background: var(--paper); box-shadow: 0 25px 60px rgba(23,32,54,.28); }.modal-close { position: absolute; right: 17px; top: 13px; border: 0; background: transparent; color: var(--ink-soft); font-size: 25px; }.success-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 25px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 20px; }.success-modal .eyebrow { margin-bottom: 14px; }.success-modal h2 { margin: 0 0 18px; font-size: 42px; line-height: .98; }.success-modal > p:not(.eyebrow) { max-width: 340px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }.share-row { display: flex; gap: 8px; margin: 25px 0 24px; }.share-row input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 5px; padding: 0 12px; background: #fff; color: var(--ink-soft); font: 10px var(--mono); }.copy-done { background: #2e8961; }

.card-page-body { min-height: 100vh; background: var(--paper-deep); }.card-page-shell { min-height: 100vh; display: flex; flex-direction: column; }.card-page-header { min-height: 85px; display: flex; align-items: center; justify-content: space-between; }.open-card-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 32px 0 78px; }.open-card-kicker { display: flex; align-items: center; gap: 11px; margin: 0 0 28px; color: var(--coral-dark); font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }.open-card-stage { display: flex; align-items: center; gap: 88px; }.open-card { width: min(570px, calc(100vw - 34px)); flex: 0 0 auto; padding: 17px; border-radius: 14px; background: #f7c1ad; box-shadow: 13px 17px 0 rgba(23,32,54,.12); transform: rotate(-2.2deg); }.open-card[data-card-theme="blue"] { background: #bec9f0; }.open-card[data-card-theme="lilac"] { background: #d5c7e3; }.open-card[data-card-theme="yellow"] { background: #f3d795; }.open-card-art { position: relative; height: 310px; overflow: hidden; border-radius: 8px; background: #d99b91; }.open-card-art::after { position: absolute; inset: 0; content: ''; background: linear-gradient(120deg, rgba(240,107,87,.13), rgba(23,32,54,.18)); mix-blend-mode: multiply; }.open-card-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(.94); }.open-card .art-stamp { right: 23px; top: 20px; width: 66px; height: 66px; font-size: 11px; }.open-card .art-stamp strong { font-size: 13px; }.open-card .art-scribble { bottom: 22px; left: 24px; font-size: 30px; }.open-card-copy { padding: 26px 7px 20px; }.open-card-copy p { max-width: 470px; margin: 13px 0 0; font: 500 39px/1.06 var(--serif); letter-spacing: -.05em; }.open-card-track { padding: 12px 11px; }.open-card-track .track-meta strong { max-width: none; font-size: 11px; }.open-card-footer { display: flex; justify-content: space-between; padding: 18px 7px 2px; color: rgba(23,32,54,.56); font: 8px var(--mono); letter-spacing: .08em; }.open-card-caption { width: 126px; padding: 15px 0; color: var(--ink-soft); transform: rotate(4deg); }.caption-mark { display: block; margin-bottom: 19px; color: var(--coral-dark); font-size: 25px; }.open-card-caption p { margin: 0; font: 500 20px/1.12 var(--serif); letter-spacing: -.05em; }.open-card-caption p span { color: var(--ink-soft); font-size: 13px; }.open-card-actions { display: flex; align-items: center; gap: 26px; margin-top: 56px; }.card-page-footer { padding: 20px; border-top: 1px solid rgba(23,32,54,.11); color: #898c95; text-align: center; font: 9px var(--mono); }

.legal-page { min-height: 100vh; background: var(--paper); }.legal-wrap { max-width: 760px; padding: 60px 0 100px; }.legal-wrap h1 { margin: 50px 0 24px; font-size: 56px; }.legal-wrap h2 { margin: 37px 0 12px; font-size: 23px; letter-spacing: -.04em; }.legal-wrap p, .legal-wrap li { color: var(--ink-soft); font-size: 14px; line-height: 1.75; }.legal-wrap ul { padding-left: 20px; }.legal-back { display: inline-flex; align-items: center; gap: 9px; color: var(--coral-dark); font: 10px var(--mono); }

@media (max-width: 1080px) { .hero { gap: 42px; }.hero-lede { max-width: 520px; }.builder-wrap { width: min(880px, 100%); grid-template-columns: minmax(215px, .65fr) minmax(470px, 1.35fr); gap: 38px; }.card-grid { grid-template-columns: repeat(2, 1fr); }.ideas-section { gap: 70px; } }
@media (max-width: 860px) { .builder-wrap { max-width: 560px; display: flex; flex-direction: column; gap: 32px; }.builder-wrap .builder-card { order: 2; width: 100%; }.preview-card { order: 1; width: min(310px, 78%); align-self: center; } }
@media (max-width: 700px) { .container { width: min(100% - 34px, 560px); }.site-header { min-height: 70px; }.desktop-nav { display: none; }.site-header .button { display: none; }.hero { padding: 35px 0 52px; gap: 35px; }.hero h1 { font-size: clamp(47px, 14vw, 68px); }.hero-lede { font-size: 14px; }.builder-wrap { display: flex; flex-direction: column; gap: 32px; }.builder-card { width: 100%; padding: 22px 18px; box-shadow: 7px 9px 0 #e8dfd1; }.preview-card { width: min(270px, 80%); align-self: center; margin-right: 0; }.field-grid, .field-row { grid-template-columns: 1fr; gap: 0; }.choice-grid { grid-template-columns: 1fr 1fr 1fr; }.choice { grid-template-columns: 1fr; grid-template-rows: auto auto auto; text-align: center; gap: 3px; }.choice-icon { grid-row: auto; margin: 0 auto 2px; }.choice small { font-size: 8px; white-space: normal; }.field-row { align-items: stretch; }.theme-field { margin-top: 2px; }.gallery-section, .ideas-section { padding: 76px 0 82px; }.section-heading { display: block; margin-bottom: 28px; }.section-heading > p { margin: 22px 0 0; }.card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.showcase-body { padding: 12px 10px 13px; }.showcase-meta { font-size: 7px; }.showcase-body h3 { min-height: 42px; font-size: 17px; }.showcase-bottom { display: block; line-height: 1.7; }.mini-line { display: none; }.showcase-bottom span:last-child { display: block; }.how-section { padding: 78px 0 82px; }.steps-grid { grid-template-columns: 1fr; gap: 12px; }.step-card { min-height: 190px; }.step-card-highlight { transform: none; }.step-card h3 { margin-top: 50px; }.ideas-section { display: flex; flex-direction: column; gap: 45px; align-items: stretch; }.ideas-stack { min-height: 330px; }.idea-note { width: 87%; }.idea-note-one { left: 4%; }.idea-note-two { left: 13%; }.idea-note-three { left: 0; }.faq-section { display: block; padding-bottom: 82px; }.faq-section h2 { margin-bottom: 35px; font-size: 38px; }.footer-top { flex-wrap: wrap; padding-bottom: 30px; }.footer-top p { order: 3; width: 100%; margin: 3px 0 0; }.footer-bottom { flex-direction: column; gap: 9px; }.success-modal { padding: 32px 22px; }.success-modal h2 { font-size: 37px; }.share-row { flex-direction: column; }.share-row input { height: 44px; padding: 0 10px; }.share-row .button { min-height: 44px; } }

/* Wordmark on small screens: keep the italic connector proportional and
   prevent the hand-drawn underline from clipping against the line height. */
@media (max-width: 700px) {
    .brand { font-size: 16px; }
    .brand-text em { font-size: 1.18em; top: .06em; margin: 0 .08em; }
    .brand-text em::after { bottom: -.22em; left: -.04em; right: -.04em; }
}
@media (max-width: 700px) { .card-page-header { min-height: 70px; }.card-page-header .button { display: none; }.open-card-main { padding-top: 28px; }.open-card-stage { display: block; width: 100%; }.open-card { width: 100%; transform: rotate(-1.2deg); }.open-card-art { height: 220px; }.open-card .art-scribble { font-size: 24px; }.open-card-copy p { font-size: 31px; }.open-card-caption { width: 160px; margin: 24px 0 0 auto; }.open-card-actions { flex-wrap: wrap; justify-content: center; margin-top: 38px; }.legal-wrap { padding-top: 30px; }.legal-wrap h1 { margin-top: 42px; font-size: 47px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; } .showcase-card, .card-rail-btn, .field input, .field select, .field textarea, .theme-swatch, .choice, .privacy-choice, .locked-card, .step-card, .idea-note, .button, .modal-backdrop, .success-modal, .faq-list summary span, .spotify-picker, .external-link-picker, .library-track, .options-plus, .card-grid, .how-section, .ideas-section, .ideas-stack, .step-card-highlight, .track-meta, .preview-card, .preview-message, .builder-card, .field-set, .choice-grid, .field-grid, .field-row, .builder-wrap, .builder-wrap .builder-card, .builder-wrap .preview-card, .modal-open-card, .text-link, .top-note { animation-duration: .001ms !important; animation-iteration-count: 1 !important; } }

/* Music provider choices. The first-party library is the no-account, in-page playback path. */
.music-source-tabs { display: flex; gap: 5px; margin: 10px 0 9px; padding: 3px; border-radius: 6px; background: var(--paper-deep); }
.music-field { position: relative; min-width: 0; }
.music-source-tab { flex: 1; min-height: 27px; padding: 5px 7px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-soft); font: 500 9px var(--mono); }
.music-source-tab:hover { color: var(--ink); background: rgba(255,255,255,.55); }
.music-source-tab.is-selected { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(23,32,54,.1); }
.music-source-panel[hidden] { display: none; }
.library-tracks { display: grid; gap: 5px; }
.library-track { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 43px; padding: 5px 7px; border: 1px solid rgba(23,32,54,.12); border-radius: 5px; background: #fff; color: var(--ink); text-align: left; }
.library-track:hover, .library-track.is-selected { border-color: var(--coral); background: #fff8f5; }
.library-track-art { display: flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 4px; background-position: center; background-size: cover; color: #fff; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.45); }
.library-track > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.library-track strong, .library-track small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-track strong { font-size: 10px; }.library-track small { color: var(--ink-soft); font-size: 8px; }.library-track-check { margin-left: auto; color: var(--coral); font-size: 13px; opacity: 0; }.library-track.is-selected .library-track-check { opacity: 1; }
.external-link-picker { display: flex; align-items: center; border: 1px solid rgba(23,32,54,.17); border-radius: 5px; background: #fff; }.external-link-picker:focus-within { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(240,107,87,.12); }.external-link-picker input { min-width: 0; flex: 1; border: 0; padding: 11px 12px; outline: 0; background: transparent; color: var(--ink); font: 500 11px var(--sans); }.external-link-picker button { min-height: 38px; padding: 0 12px; border: 0; border-left: 1px solid rgba(23,32,54,.1); background: transparent; color: var(--coral-dark); font: 700 9px var(--mono); }
.music-status { margin: 7px 0 0; color: #9a9d9f; font-size: 9px; line-height: 1.35; }.form-error { margin: 0 0 11px; padding: 9px 10px; border-radius: 5px; background: #fff0ec; color: var(--coral-dark); font-size: 10px; line-height: 1.4; }
.music-open { margin-left: auto; color: var(--coral-dark); font: 8px var(--mono); white-space: nowrap; }.card-audio { width: min(190px, 100%); height: 28px; margin-left: auto; }
.modal-open-card { width: 100%; margin-bottom: 13px; }.not-found-card { margin: 12vh auto; }.not-found-card .button { margin-top: 20px; }
@media (max-width: 700px) { .music-source-tab { font-size: 8px; padding-inline: 4px; }.card-audio { width: 100%; order: 4; margin: 8px 0 0; }.music-open { order: 3; }.open-card-track { flex-wrap: wrap; } }

/* Quick-create workspace: a calm 50 / 50 split with the card as a first-class surface. */
.hero { gap: 38px; }
.builder-wrap { width: 100%; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; align-items: stretch; }
.builder-wrap .builder-card { grid-column: 2; min-height: 610px; display: flex; flex-direction: column; padding: 30px; border-radius: 16px; box-shadow: 11px 13px 0 #e8dfd1; }
.builder-card form { flex: 1; display: flex; flex-direction: column; }
.builder-card .button-submit { margin-top: auto; }
.preview-card { grid-column: 1; min-height: 610px; display: flex; flex-direction: column; padding: 20px; border: 1px solid rgba(23,32,54,.11); border-radius: 16px; box-shadow: 8px 12px 0 rgba(23,32,54,.13); transform: rotate(-1deg); }
.preview-card:hover { transform: rotate(-.3deg) translateY(-3px); }
.preview-topline { padding: 2px 3px 13px; }
.preview-art { flex: 0 0 310px; height: 310px; border-radius: 10px; }
.preview-message { padding: 23px 8px 17px; }
.preview-message p { max-width: 420px; margin-top: 10px; font-size: clamp(29px, 3vw, 41px); line-height: 1.02; }
.preview-track { margin-top: auto; padding: 13px 11px; }
.preview-footer { padding: 14px 3px 2px; }

.builder-options { margin: 0 0 10px; border-top: 1px solid rgba(23,32,54,.12); }
.builder-options:last-of-type { border-bottom: 1px solid rgba(23,32,54,.12); }
.builder-options summary { display: flex; align-items: center; gap: 9px; min-height: 53px; cursor: pointer; list-style: none; color: var(--ink); font: 700 12px var(--sans); }
.builder-options summary::-webkit-details-marker { display: none; }
.options-summary-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-deep); color: var(--coral-dark); font-size: 14px; }
.options-summary-value { margin-left: auto; color: #9c9da1; font: 9px var(--mono); text-align: right; }
.options-plus { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; border: 1px solid rgba(23,32,54,.16); border-radius: 50%; color: var(--ink-soft); font-size: 16px; font-weight: 400; transition: transform .2s ease, background .2s ease; }
.builder-options[open] .options-plus { transform: rotate(45deg); background: var(--ink); color: #fff; }
.options-content { padding: 4px 0 14px; border-top: 1px dashed rgba(23,32,54,.12); }
.options-content .field-set { margin-top: 14px; }
.options-content .field-row { grid-template-columns: minmax(0, 1.32fr) minmax(120px, .68fr); align-items: start; margin-top: 14px; }
.options-content .theme-field { margin-bottom: 0; }
.options-content .choice { min-height: 66px; }
.spotify-field { position: relative; min-width: 0; }
.spotify-picker { display: flex; align-items: center; border: 1px solid rgba(23,32,54,.17); border-radius: 5px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.spotify-picker:focus-within { border-color: #1db954; box-shadow: 0 0 0 3px rgba(29,185,84,.12); }
.spotify-picker input { min-width: 0; flex: 1; border: 0; padding: 11px 12px; outline: 0; background: transparent; color: var(--ink); font: 500 12px var(--sans); }
.spotify-picker input::placeholder { color: #b2b1ad; }
.spotify-picker button { width: 38px; height: 38px; border: 0; border-left: 1px solid rgba(23,32,54,.1); background: transparent; color: #1a9c4b; font-size: 20px; }
.spotify-results { position: absolute; z-index: 12; top: 103px; right: 0; left: 0; max-height: 246px; overflow-y: auto; padding: 5px; border: 1px solid rgba(23,32,54,.15); border-radius: 7px; background: #fffdfa; box-shadow: 0 14px 28px rgba(23,32,54,.16); }
.spotify-result { display: flex; align-items: center; width: 100%; gap: 10px; padding: 8px; border: 0; border-radius: 5px; background: transparent; text-align: left; }
.spotify-result:hover { background: #f1f5ee; }
.spotify-result img, .spotify-result-placeholder { flex: 0 0 35px; width: 35px; height: 35px; object-fit: cover; border-radius: 4px; }
.spotify-result-placeholder { display: flex; align-items: center; justify-content: center; background: #e8f5ec; color: #1a9c4b; font-size: 16px; }
.spotify-result-copy { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.spotify-result-copy strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.spotify-result-copy small { overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.spotify-result-check { margin-left: auto; color: #1a9c4b; font-size: 16px; }
.spotify-empty { padding: 15px 10px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.selected-song { display: flex; align-items: center; gap: 8px; min-height: 47px; margin-top: 8px; padding: 6px 8px; border-radius: 5px; background: #f1f5ee; }
.selected-song-art { display: flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 4px; background-color: #d9efdf; background-position: center; background-size: cover; color: #1a9c4b; font-size: 15px; }
.selected-song-copy { display: flex; flex-direction: column; min-width: 0; gap: 3px; }.selected-song-copy small { color: #6c9277; font: 8px var(--mono); text-transform: uppercase; }.selected-song-copy strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.clear-song { margin-left: auto; border: 0; background: transparent; color: #7da287; font-size: 18px; }
.spotify-status { margin: 7px 0 0; color: #9a9d9f; font-size: 9px; line-height: 1.35; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.privacy-choice { display: flex; align-items: center; gap: 9px; min-height: 64px; padding: 10px; border: 1px solid rgba(23,32,54,.14); border-radius: 5px; background: #fff; text-align: left; }.privacy-choice:hover { border-color: rgba(23,32,54,.36); }.privacy-choice.is-selected { border-color: var(--coral); box-shadow: inset 0 0 0 1px var(--coral); background: #fff8f5; }
.privacy-choice-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; background: var(--paper-deep); color: var(--coral-dark); font-size: 14px; }.privacy-choice > span:last-child { display: flex; flex-direction: column; gap: 4px; }.privacy-choice strong { font-size: 10px; }.privacy-choice small { color: #999da2; font-size: 8px; line-height: 1.25; }
.private-password-field { margin: 13px 0 0; }
.spotify-open { margin-left: auto; color: #1a9c4b; font: 8px var(--mono); white-space: nowrap; }
.locked-card { width: min(560px, 100%); margin: auto; padding: 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 10px 13px 0 #e8dfd1; }.locked-card-icon { display: flex; align-items: center; justify-content: center; width: 49px; height: 49px; margin-bottom: 28px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 23px; }.locked-card h1 { margin: 0 0 19px; font-size: 48px; line-height: .98; }.locked-card > p:not(.eyebrow) { max-width: 360px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }.password-form { margin: 28px 0 20px; }.password-form .field { margin-bottom: 13px; }.password-form .field small { min-height: 13px; color: var(--coral-dark); }.password-form .button { width: 100%; }

@media (max-width: 860px) { .builder-wrap { max-width: 650px; display: flex; flex-direction: column; gap: 32px; }.builder-wrap .builder-card { order: 2; width: 100%; min-height: 0; }.preview-card { order: 1; width: min(100%, 520px); min-height: 540px; align-self: center; }.preview-art { flex-basis: 290px; height: 290px; } }
@media (max-width: 700px) { .hero { gap: 32px; }.builder-wrap { width: 100%; }.preview-card { width: 100%; min-height: 500px; padding: 14px; }.preview-topline { padding-bottom: 10px; }.preview-art { flex-basis: 250px; height: 250px; }.preview-message { padding: 19px 6px 14px; }.preview-message p { font-size: 30px; }.builder-wrap .builder-card { padding: 22px 18px; box-shadow: 7px 9px 0 #e8dfd1; }.options-summary-value { max-width: 125px; }.options-content .field-row { grid-template-columns: 1fr; gap: 0; }.options-content .theme-field { margin-top: 8px; }.privacy-grid { grid-template-columns: 1fr; }.spotify-results { top: 103px; }.locked-card { padding: 32px 22px; }.locked-card h1 { font-size: 40px; } }

/* Extended mood palette. */
.preview-card.theme-mint { background: #bfe3d2; }
.preview-card.theme-sky { background: #b9dbe7; }
.preview-card.theme-rose { background: #f2c5c9; }
.preview-card.theme-sage { background: #d5dfc3; }
.preview-card.theme-cream { background: #f1e8d4; }
.preview-card.theme-plum { background: #dcc8d6; }
.preview-card.theme-olive { background: #cccf9d; }
.preview-card.theme-sand { background: #ecd9bf; }
.open-card[data-card-theme="mint"] { background: #bfe3d2; }
.open-card[data-card-theme="sky"] { background: #b9dbe7; }
.open-card[data-card-theme="rose"] { background: #f2c5c9; }
.open-card[data-card-theme="sage"] { background: #d5dfc3; }
.open-card[data-card-theme="cream"] { background: #f1e8d4; }
.open-card[data-card-theme="plum"] { background: #dcc8d6; }
.open-card[data-card-theme="olive"] { background: #cccf9d; }
.open-card[data-card-theme="sand"] { background: #ecd9bf; }

/* ---------- Card interactions: votes + bullet comments ----------
   The vote buttons live in the right-hand column of the card stage, under
   the little caption. The bullet comments run as a horizontal strip under
   the whole card. Both are deliberately quiet: paper background, hairline
   borders, the same coral accent as the rest of the site. */
.open-card-interactions { width: 100%; display: flex; flex-direction: column; align-items: center; }
.open-card-side { width: min(150px, 100%); flex: 0 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
.card-interactions { display: flex; flex-direction: column; gap: 10px; }

.interaction-votes { display: flex; flex-direction: column; gap: 8px; }
.vote-button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink-soft); cursor: pointer; transition: border-color .18s ease, color .18s ease, background-color .18s ease, transform .18s ease; }
.vote-button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.vote-button:disabled { cursor: progress; opacity: .6; }
.vote-glyph { font-size: 16px; line-height: 1; }
.vote-label { font: 500 10px var(--sans); }
.vote-count { font: 700 13px var(--mono); color: var(--ink); }
.vote-like .vote-glyph { color: var(--coral-dark); }
.vote-dislike .vote-glyph { color: #8b8f99; }
.vote-button.is-selected { border-color: var(--coral); background: #fff6f3; color: var(--ink); box-shadow: 0 5px 14px rgba(240,107,87,.16); }
.vote-button.is-selected.vote-dislike { border-color: #b9bcc4; background: #f4f4f6; box-shadow: none; }
.vote-button.is-selected.vote-dislike .vote-glyph { color: var(--ink-soft); }

.interaction-status { min-height: 15px; margin: -6px 0 0; font: 500 10px var(--sans); color: var(--ink-soft); }
.interaction-status[data-tone="good"] { color: #2e8961; }
.interaction-status[data-tone="bad"] { color: var(--coral-dark); }

/* (old .theme-choices 4-col rule removed; the new swatch grid is defined
   next to .theme-swatch above.) */

/* Type scale and long-name/card-photo refinements. */
.top-note { font-size: 11px; }
.desktop-nav { font-size: 15px; }
.button { font-size: 14px; }
.button-small { font-size: 13px; }
.eyebrow, .kicker { font-size: 11px; }
.builder-heading h2 { font-size: 29px; }
.builder-step { font-size: 11px; }
.field { font-size: 12px; }
.field input, .field textarea, .field select { font-size: 15px; }
.field small { font-size: 11px; }
.field-set legend { font-size: 12px; }
.choice span:not(.choice-icon) { font-size: 13px; }
.choice small { font-size: 11px; }
.builder-options summary { font-size: 13px; }
.options-summary-value { font-size: 11px; }
.form-note { font-size: 12px; }
.preview-topline, .preview-footer { font-size: 10px; }
.preview-message { padding: 18px 8px 13px; }
.preview-recipient-line, .open-card-recipient { display: block; max-width: 100%; overflow-wrap: anywhere; color: rgba(23,32,54,.68); font: 600 clamp(19px, 2.5vw, 30px)/1.05 var(--sans); letter-spacing: -.045em; }
.preview-recipient-line strong, .open-card-recipient strong { color: var(--ink); }
.preview-message p { max-width: 100%; margin: 10px 0 0; font-size: clamp(24px, 2.8vw, 35px); }
.preview-sender-line, .open-card-sender { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; margin-top: 17px; color: rgba(23,32,54,.62); font: 500 12px/1.2 var(--sans); overflow-wrap: anywhere; text-align: right; }
.preview-sender-line strong, .open-card-sender strong { color: var(--ink); font-size: 14px; }
.track-meta small { font-size: 9px; }
.track-meta strong { font-size: 11px; }
.open-card-track .track-meta strong { font-size: 14px; }
.showcase-meta { font-size: 10px; }
.showcase-bottom { font-size: 11px; }
.showcase-bottom span:last-child { font-size: 10px; }
.cover-file-row { display: flex; align-items: center; gap: 9px; }
.cover-file-row input { min-width: 0; flex: 1; padding: 9px 10px; font-size: 13px; }
.cover-reset { flex: 0 0 auto; min-height: 39px; padding: 0 11px; border: 1px solid rgba(23,32,54,.17); border-radius: 5px; background: var(--paper-deep); color: var(--ink-soft); font: 600 11px var(--sans); }
.cover-reset:hover { border-color: var(--ink); color: var(--ink); }
#cover-image-status.is-error { color: var(--coral-dark); }
.open-card-copy { padding: 26px 7px 20px; }
.open-card-recipient { font-size: clamp(27px, 3vw, 38px); }
.open-card-copy p { max-width: 100%; margin-top: 14px; font-size: clamp(32px, 3.2vw, 43px); }
.open-card-sender { margin-top: 23px; font-size: 14px; }
.open-card-sender strong { font-size: 16px; }

@media (max-width: 700px) {
    .preview-recipient-line { font-size: 25px; }
    .preview-message p { font-size: 31px; }
    .preview-sender-line { margin-top: 15px; font-size: 12px; }
    .preview-sender-line strong { font-size: 14px; }
    .cover-file-row { align-items: stretch; flex-direction: column; gap: 7px; }
    .cover-reset { min-height: 38px; }
    /* On small screens the builder switches to a single column, so the
       mood swatch grid can comfortably show 3 tiles per row. The grid
       already does this on desktop; the override is just to keep the tile
       density similar when the right-side options panel stacks. */
    .theme-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
    .theme-swatch { min-height: 50px; padding: 7px 8px 6px; }
    .theme-swatch-name { font-size: 9px; }
    .open-card-recipient { font-size: 29px; }
    .open-card-sender { font-size: 13px; }
    .open-card-sender strong { font-size: 15px; }
}

/* Form readability: 12px is the minimum; primary controls use 14px or more. */
#card-builder .field { font-size: 14px; }
#card-builder .field small,
#card-builder .char-count,
#card-builder .music-status,
#card-builder .spotify-status,
#card-builder .form-error,
#card-builder .cover-file-row small { font-size: 12px; }
#card-builder .field input,
#card-builder .field textarea,
#card-builder .field select { font-size: 16px; }
#card-builder .builder-options summary { font-size: 14px; }
#card-builder .options-summary-value { font-size: 12px; }
#card-builder .choice span:not(.choice-icon),
#card-builder .privacy-choice strong { font-size: 14px; }
#card-builder .choice small,
#card-builder .privacy-choice small,
#card-builder .field-set legend { font-size: 12px; }
#card-builder .music-source-tab { font-size: 12px; }
#card-builder .library-track strong,
#card-builder .selected-song-copy strong,
#card-builder .spotify-result-copy strong { font-size: 14px; }
#card-builder .library-track small,
#card-builder .selected-song-copy small,
#card-builder .spotify-result-copy small { font-size: 12px; }
#card-builder .external-link-picker input,
#card-builder .spotify-picker input { font-size: 14px; }
#card-builder .external-link-picker button { font-size: 12px; }
#card-builder .form-note { font-size: 12px; }
#card-builder .field[hidden],
#card-builder .private-password-field[hidden] { display: none !important; }
.privacy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.privacy-choice { min-height: 76px; }

@media (max-width: 700px) {
    .privacy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .privacy-choice { min-height: 104px; padding: 9px 7px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; }
    .privacy-choice > span:last-child { width: 100%; gap: 3px; }
}

/* ============================================================
   Gallery — static 4-up grid of community cards
   Desktop: 4 columns. Tablet (≤1080px): 2 columns. Phone (≤700px): 2 columns.
   The old horizontal-rail + auto-scrolling marquee is gone; cards now
   sit in a calm, easy-to-scan grid like the original prototype.
   ============================================================ */

.card-grid .showcase-card { height: 100%; }

/* Soundtrack line on each card ("♫ Bloom · The Paper Kites"). Lives in the
   card body, sits above the From/Open footer. */
.showcase-track {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: var(--ink-soft);
    font: 10.5px/1.3 var(--sans);
    letter-spacing: -.005em;
}
.showcase-track-glyph {
    color: var(--card-accent, var(--coral));
    font-size: 13px;
    line-height: 1;
}
.showcase-track-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Live eyebrow — small pulsing dot after the eyebrow text. */
.gallery-section .eyebrow { position: relative; }
.gallery-section .eyebrow::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    margin-left: 4px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 0 rgba(240, 107, 87, .55);
    animation: live-pulse 1.8s ease-out infinite;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(240, 107, 87, .55); }
    70%  { box-shadow: 0 0 0 8px rgba(240, 107, 87, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(240, 107, 87, 0);   }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-section .eyebrow::after { animation: none; }
}

/* ---------- Motion style: animated overlay on the card art ---------- */
/* The card art is the canvas (position:relative; overflow:hidden). We
   position an absolutely-laid, pointer-events-none layer on top of the
   image, then drop a dozen tiny pieces that each run a per-style keyframe
   with its own delay, size and horizontal start. The same layer is reused
   by the live preview (index.php) and the recipient view (card.php). */
.motion-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}
.motion-layer .motion-piece {
    position: absolute;
    display: block;
    will-change: transform, opacity;
}
/* Distribute pieces across the art without writing 12 individual rules. */
.motion-layer .motion-piece:nth-child(1)  { left:  4%; animation-delay: -0.2s; }
.motion-layer .motion-piece:nth-child(2)  { left: 13%; animation-delay: -1.4s; }
.motion-layer .motion-piece:nth-child(3)  { left: 22%; animation-delay: -2.7s; }
.motion-layer .motion-piece:nth-child(4)  { left: 31%; animation-delay: -0.8s; }
.motion-layer .motion-piece:nth-child(5)  { left: 40%; animation-delay: -3.5s; }
.motion-layer .motion-piece:nth-child(6)  { left: 49%; animation-delay: -1.9s; }
.motion-layer .motion-piece:nth-child(7)  { left: 58%; animation-delay: -0.5s; }
.motion-layer .motion-piece:nth-child(8)  { left: 67%; animation-delay: -2.3s; }
.motion-layer .motion-piece:nth-child(9)  { left: 76%; animation-delay: -3.1s; }
.motion-layer .motion-piece:nth-child(10) { left: 85%; animation-delay: -1.0s; }
.motion-layer .motion-piece:nth-child(11) { left: 91%; animation-delay: -2.6s; }
.motion-layer .motion-piece:nth-child(12) { left: 97%; animation-delay: -3.8s; }

/* 1) Floating confetti — small coloured squares drifting down with a sway.
   Notes on the translate values:
   - CSS `translate3d(..., N%, ...)` resolves N against the translated
     element's own size, not its container. The pieces are only a few
     pixels tall, so a 120% shift moved them ~14px instead of the full
     art height — the layer looked static. We use a fixed 380px travel
     and start them with `top: 0` so the layer's `overflow: hidden` does
     the off-screen culling. 380px covers every `.preview-art` /
     `.open-card-art` height (167–310px) plus a comfortable offscreen
     buffer, so the loop looks continuous on every breakpoint. */
.motion-layer-floating-confetti .motion-piece {
    position: absolute;
    top: 0;
    width: 8px;
    height: 12px;
    border-radius: 1px;
    background: #f8d36b;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    opacity: 0;
    animation: motion-confetti 6.5s linear infinite;
}
.motion-layer-floating-confetti .motion-piece:nth-child(3n) { background: #f06b57; width: 6px; height: 9px; }
.motion-layer-floating-confetti .motion-piece:nth-child(4n) { background: #6f8a4e; width: 7px; height: 7px; border-radius: 50%; }
.motion-layer-floating-confetti .motion-piece:nth-child(5n) { background: #9a74c9; width: 5px; height: 11px; }
.motion-layer-floating-confetti .motion-piece:nth-child(7n) { background: #3f879c; width: 6px; height: 6px; border-radius: 50%; }
@keyframes motion-confetti {
    0%   { transform: translate3d(0, -16px, 0) rotate(0deg);   opacity: 0; }
    8%   { opacity: 1; }
    50%  { transform: translate3d(14px, 190px, 0) rotate(180deg); }
    92%  { opacity: 1; }
    100% { transform: translate3d(-10px, 380px, 0) rotate(360deg); opacity: 0; }
}

/* 2) Soft snowfall — round flakes falling slowly, drifting side-to-side.
   Same container-relative fix as confetti: keyframes use a fixed 380px
   travel so the flakes actually fall the full height of the art. */
.motion-layer-soft-snowfall .motion-piece {
    position: absolute;
    top: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 0 6px rgba(255, 255, 255, .55), 0 0 0 1px rgba(23, 32, 54, .05);
    opacity: 0;
    animation: motion-snowfall 8s linear infinite;
}
.motion-layer-soft-snowfall .motion-piece:nth-child(2n) { width: 5px; height: 5px; opacity: .9; }
.motion-layer-soft-snowfall .motion-piece:nth-child(3n) { width: 10px; height: 10px; opacity: .7; }
.motion-layer-soft-snowfall .motion-piece:nth-child(5n) { width: 4px; height: 4px; opacity: .95; }
@keyframes motion-snowfall {
    0%   { transform: translate3d(0, -16px, 0); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translate3d(-12px, 190px, 0); }
    100% { transform: translate3d(8px, 380px, 0); opacity: 0; }
}

/* 3) Hand-drawn sparkles — 4-pointed star glyphs that twinkle in place. */
.motion-layer-hand-drawn-sparkles .motion-piece {
    width: 14px;
    height: 14px;
    color: #f5e7c4;
    font: 600 14px/1 var(--serif, serif);
    text-align: center;
    text-shadow: 0 0 6px rgba(255, 240, 200, .85), 0 0 2px rgba(255, 255, 255, .9);
    opacity: 0;
    transform-origin: 50% 50%;
    animation: motion-sparkle 2.6s ease-in-out infinite;
}
.motion-layer-hand-drawn-sparkles .motion-piece::before { content: '✦'; }
.motion-layer-hand-drawn-sparkles .motion-piece:nth-child(3n) { color: #f8d36b; }
.motion-layer-hand-drawn-sparkles .motion-piece:nth-child(4n) { color: #f06b57; }
.motion-layer-hand-drawn-sparkles .motion-piece:nth-child(5n) { color: #9a74c9; }
@keyframes motion-sparkle {
    0%, 100% { transform: scale(0.2) rotate(0deg);   opacity: 0; }
    35%      { transform: scale(1)   rotate(45deg);  opacity: 1; }
    70%      { transform: scale(0.4) rotate(90deg);  opacity: .6; }
}

/* 4) Drifting petals — sakura-like oval chips that float down with a softer
   sway than confetti and a pink / white palette. Same 380px container-relative
   travel as confetti / snowfall. */
.motion-layer-drifting-petals .motion-piece {
    position: absolute;
    top: 0;
    width: 9px;
    height: 7px;
    border-radius: 70% 30% 70% 30%;
    background: #f7b8c4;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
    opacity: 0;
    animation: motion-petals 7.5s linear infinite;
}
.motion-layer-drifting-petals .motion-piece:nth-child(2n) { background: #fcd5dc; width: 11px; height: 9px; }
.motion-layer-drifting-petals .motion-piece:nth-child(3n) { background: #f59ab0; width: 7px;  height: 6px; transform-origin: 50% 50%; }
.motion-layer-drifting-petals .motion-piece:nth-child(5n) { background: #ffe9ee; width: 8px;  height: 6px; }
@keyframes motion-petals {
    0%   { transform: translate3d(0, -16px, 0) rotate(0deg);   opacity: 0; }
    8%   { opacity: .95; }
    50%  { transform: translate3d(-22px, 190px, 0) rotate(160deg); }
    92%  { opacity: .95; }
    100% { transform: translate3d(18px, 380px, 0) rotate(320deg); opacity: 0; }
}

/* 5) Floating hearts — small heart glyphs rising from the bottom of the art,
   gently swaying side to side. Distributed across the width with varied sizes. */
.motion-layer-floating-hearts .motion-piece {
    position: absolute;
    bottom: 0;
    width: 14px;
    height: 14px;
    color: #f06b57;
    font: 700 14px/1 var(--sans);
    text-align: center;
    text-shadow: 0 0 8px rgba(240, 107, 87, .7), 0 0 16px rgba(240, 107, 87, .4);
    opacity: 0;
    animation: motion-hearts 5s ease-in-out infinite;
}
.motion-layer-floating-hearts .motion-piece::before { content: '♥'; }
.motion-layer-floating-hearts .motion-piece:nth-child(1)  { left:  6%; animation-delay:  0s; }
.motion-layer-floating-hearts .motion-piece:nth-child(2)  { left: 18%; animation-delay: -2.5s; color: #f59ab0; font-size: 11px; }
.motion-layer-floating-hearts .motion-piece:nth-child(3)  { left: 30%; animation-delay: -1.2s; }
.motion-layer-floating-hearts .motion-piece:nth-child(4)  { left: 42%; animation-delay: -4s;   color: #f8d36b; font-size: 16px; }
.motion-layer-floating-hearts .motion-piece:nth-child(5)  { left: 54%; animation-delay: -0.8s; color: #9a74c9; font-size: 12px; }
.motion-layer-floating-hearts .motion-piece:nth-child(6)  { left: 66%; animation-delay: -3.2s; }
.motion-layer-floating-hearts .motion-piece:nth-child(7)  { left: 78%; animation-delay: -1.8s; color: #f59ab0; font-size: 10px; }
.motion-layer-floating-hearts .motion-piece:nth-child(8)  { left: 90%; animation-delay: -4.5s; color: #f8d36b; font-size: 15px; }
.motion-layer-floating-hearts .motion-piece:nth-child(9)  { left: 12%; animation-delay: -2.8s; }
.motion-layer-floating-hearts .motion-piece:nth-child(10) { left: 36%; animation-delay: -0.5s; color: #9a74c9; font-size: 13px; }
.motion-layer-floating-hearts .motion-piece:nth-child(11) { left: 60%; animation-delay: -3.5s; }
.motion-layer-floating-hearts .motion-piece:nth-child(12) { left: 84%; animation-delay: -1.5s; color: #f59ab0; font-size: 11px; }
@keyframes motion-hearts {
    0%   { transform: translate3d(0, 0, 0)       scale(0.5); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translate3d(18px, -150px, 0) scale(1.1); }
    90%  { opacity: 1; }
    100% { transform: translate3d(-14px, -300px, 0) scale(0.8); opacity: 0; }
}

/* 6) Twinkling stars — small 5-point star glyphs scattered across the entire
   image, twinkling in place (no vertical movement). Random top positioning
   distributes them evenly throughout the layer. */
.motion-layer-twinkling-stars .motion-piece {
    width: 12px;
    height: 12px;
    color: #fff3b0;
    font: 600 12px/1 var(--sans);
    text-align: center;
    text-shadow: 0 0 6px rgba(255, 232, 140, .9), 0 0 12px rgba(255, 232, 140, .5);
    opacity: 0;
    animation: motion-twinkle 2.5s ease-in-out infinite;
}
.motion-layer-twinkling-stars .motion-piece::before { content: '★'; }
.motion-layer-twinkling-stars .motion-piece:nth-child(1)  { top:  5%; left:  8%; }
.motion-layer-twinkling-stars .motion-piece:nth-child(2)  { top: 15%; left: 22%; animation-delay: -0.6s; color: #f8d36b; font-size: 14px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(3)  { top:  8%; left: 35%; animation-delay: -1.2s; color: #cfe9ff; font-size: 10px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(4)  { top: 25%; left: 48%; animation-delay: -0.3s; }
.motion-layer-twinkling-stars .motion-piece:nth-child(5)  { top: 12%; left: 62%; animation-delay: -1.8s; color: #f7b8c4; font-size: 11px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(6)  { top: 35%; left: 75%; animation-delay: -0.9s; color: #f8d36b; font-size: 13px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(7)  { top: 18%; left: 88%; animation-delay: -2.1s; }
.motion-layer-twinkling-stars .motion-piece:nth-child(8)  { top: 45%; left: 12%; animation-delay: -0.5s; color: #cfe9ff; font-size: 9px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(9)  { top: 55%; left: 28%; animation-delay: -1.4s; }
.motion-layer-twinkling-stars .motion-piece:nth-child(10) { top: 40%; left: 42%; animation-delay: -0.8s; color: #f7b8c4; font-size: 12px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(11) { top: 65%; left: 55%; animation-delay: -1.9s; color: #f8d36b; font-size: 10px; }
.motion-layer-twinkling-stars .motion-piece:nth-child(12) { top: 50%; left: 70%; animation-delay: -0.2s; }
@keyframes motion-twinkle {
    0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    50%      { opacity: 1; transform: scale(1.2) rotate(15deg); }
}

/* 7) Bubbles — translucent rings rising from the bottom, drifting side to
   side. Scattered across the entire image with better visibility. */
.motion-layer-bubbles .motion-piece {
    position: absolute;
    bottom: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(135, 206, 235, .4));
    border: 2px solid rgba(255, 255, 255, .9);
    box-shadow: 0 0 8px rgba(135, 206, 235, .6), inset 0 0 4px rgba(255, 255, 255, .5);
    opacity: 0;
    animation: motion-bubbles 6s linear infinite;
}
.motion-layer-bubbles .motion-piece:nth-child(1)  { left:  5%; bottom:  0%; animation-delay:  0s; }
.motion-layer-bubbles .motion-piece:nth-child(2)  { left: 15%; bottom:  0%; width: 10px; height: 10px; animation-delay: -1.5s; }
.motion-layer-bubbles .motion-piece:nth-child(3)  { left: 25%; bottom:  0%; width: 20px; height: 20px; border-color: rgba(180, 230, 255, .9); animation-delay: -3s; }
.motion-layer-bubbles .motion-piece:nth-child(4)  { left: 35%; bottom:  0%; animation-delay: -0.8s; }
.motion-layer-bubbles .motion-piece:nth-child(5)  { left: 45%; bottom:  0%; width: 8px;  height: 8px;  animation-delay: -2.2s; }
.motion-layer-bubbles .motion-piece:nth-child(6)  { left: 55%; bottom:  0%; width: 18px; height: 18px; animation-delay: -4s; }
.motion-layer-bubbles .motion-piece:nth-child(7)  { left: 65%; bottom:  0%; animation-delay: -1s; }
.motion-layer-bubbles .motion-piece:nth-child(8)  { left: 75%; bottom:  0%; width: 12px; height: 12px; border-color: rgba(200, 240, 255, .9); animation-delay: -2.8s; }
.motion-layer-bubbles .motion-piece:nth-child(9)  { left: 85%; bottom:  0%; width: 22px; height: 22px; animation-delay: -4.5s; }
.motion-layer-bubbles .motion-piece:nth-child(10) { left: 12%; bottom:  0%; animation-delay: -3.5s; }
.motion-layer-bubbles .motion-piece:nth-child(11) { left: 42%; bottom:  0%; width: 14px; height: 14px; animation-delay: -1.3s; }
.motion-layer-bubbles .motion-piece:nth-child(12) { left: 72%; bottom:  0%; width: 9px;  height: 9px;  animation-delay: -5s; }
@keyframes motion-bubbles {
    0%   { transform: translate3d(0, 0, 0);     opacity: 0; }
    8%   { opacity: .9; }
    50%  { transform: translate3d(-20px, -150px, 0); }
    92%  { opacity: .9; }
    100% { transform: translate3d(12px, -300px, 0); opacity: 0; }
}

/* 8) Falling leaves — small leaf chips falling with a stronger rotational
   tumble than confetti, in earthy / autumnal hues. */
.motion-layer-falling-leaves .motion-piece {
    position: absolute;
    top: 0;
    width: 9px;
    height: 6px;
    border-radius: 60% 40% 60% 40%;
    background: #c59849;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    opacity: 0;
    transform-origin: 50% 50%;
    animation: motion-leaves 7s linear infinite;
}
.motion-layer-falling-leaves .motion-piece:nth-child(2n) { background: #a86a3e; width: 10px; height: 7px; }
.motion-layer-falling-leaves .motion-piece:nth-child(3n) { background: #d24e3b; width: 8px;  height: 5px; }
.motion-layer-falling-leaves .motion-piece:nth-child(5n) { background: #6f8a4e; width: 11px; height: 7px; }
.motion-layer-falling-leaves .motion-piece:nth-child(7n) { background: #bf6b2c; width: 7px; height: 5px; }
@keyframes motion-leaves {
    0%   { transform: translate3d(0, -16px, 0) rotate(0deg);   opacity: 0; }
    8%   { opacity: 1; }
    50%  { transform: translate3d(20px, 190px, 0) rotate(360deg); }
    92%  { opacity: 1; }
    100% { transform: translate3d(-24px, 380px, 0) rotate(720deg); opacity: 0; }
}

/* 9) Floating balloons — coloured balloon circles (with a tiny string dot)
   rising up and swaying. Slower than hearts so they read as a few big
   objects rather than a swarm. Distributed across the width from bottom. */
.motion-layer-floating-balloons .motion-piece {
    position: absolute;
    bottom: 0;
    width: 16px;
    height: 18px;
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    background: linear-gradient(135deg, #f06b57 0%, #e85a4a 100%);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 0 12px rgba(240, 107, 87, .4);
    opacity: 0;
    animation: motion-balloons 8s ease-in-out infinite;
}
.motion-layer-floating-balloons .motion-piece::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    width: 1.5px;
    height: 14px;
    background: linear-gradient(to bottom, rgba(23, 32, 54, .4), transparent);
    transform: translateX(-50%);
}
.motion-layer-floating-balloons .motion-piece:nth-child(1)  { left:  5%; bottom:  0%; animation-delay:  0s; }
.motion-layer-floating-balloons .motion-piece:nth-child(2)  { left: 18%; bottom:  0%; width: 14px; height: 16px; background: linear-gradient(135deg, #3f879c 0%, #2d6a7a 100%); animation-delay: -2s; }
.motion-layer-floating-balloons .motion-piece:nth-child(3)  { left: 31%; bottom:  0%; width: 18px; height: 20px; background: linear-gradient(135deg, #f8d36b 0%, #e6c45a 100%); animation-delay: -4s; }
.motion-layer-floating-balloons .motion-piece:nth-child(4)  { left: 44%; bottom:  0%; width: 13px; height: 15px; background: linear-gradient(135deg, #9a74c9 0%, #8a63b8 100%); animation-delay: -1s; }
.motion-layer-floating-balloons .motion-piece:nth-child(5)  { left: 57%; bottom:  0%; width: 15px; height: 17px; animation-delay: -5s; }
.motion-layer-floating-balloons .motion-piece:nth-child(6)  { left: 70%; bottom:  0%; width: 17px; height: 19px; background: linear-gradient(135deg, #6f8a4e 0%, #5e7940 100%); animation-delay: -3s; }
.motion-layer-floating-balloons .motion-piece:nth-child(7)  { left: 83%; bottom:  0%; width: 12px; height: 14px; background: linear-gradient(135deg, #3f879c 0%, #2d6a7a 100%); animation-delay: -6s; }
.motion-layer-floating-balloons .motion-piece:nth-child(8)  { left: 10%; bottom:  0%; width: 14px; height: 16px; background: linear-gradient(135deg, #f8d36b 0%, #e6c45a 100%); animation-delay: -7s; }
.motion-layer-floating-balloons .motion-piece:nth-child(9)  { left: 26%; bottom:  0%; animation-delay: -0.5s; }
.motion-layer-floating-balloons .motion-piece:nth-child(10) { left: 50%; bottom:  0%; width: 16px; height: 18px; background: linear-gradient(135deg, #9a74c9 0%, #8a63b8 100%); animation-delay: -4.5s; }
.motion-layer-floating-balloons .motion-piece:nth-child(11) { left: 64%; bottom:  0%; width: 13px; height: 15px; animation-delay: -2.5s; }
.motion-layer-floating-balloons .motion-piece:nth-child(12) { left: 78%; bottom:  0%; width: 15px; height: 17px; background: linear-gradient(135deg, #6f8a4e 0%, #5e7940 100%); animation-delay: -1.5s; }
@keyframes motion-balloons {
    0%   { transform: translate3d(0, 0, 0)      rotate(-4deg); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translate3d(-28px, -150px, 0) rotate(4deg); }
    90%  { opacity: 1; }
    100% { transform: translate3d(20px, -300px, 0) rotate(-4deg); opacity: 0; }
}

/* 10) Sparkle rain — tiny gold dots + plus-shape glyphs falling straight
   down, paired with a quick twinkle at mid-fall so each piece flashes as
   it drops. */
.motion-layer-sparkle-rain .motion-piece {
    position: absolute;
    top: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f8d36b;
    box-shadow: 0 0 4px rgba(248, 211, 107, .8);
    opacity: 0;
    animation: motion-sparkle-rain 5s linear infinite;
}
.motion-layer-sparkle-rain .motion-piece:nth-child(2n)::before {
    content: '+';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff3b0;
    font: 700 9px/1 var(--sans);
    text-shadow: 0 0 4px rgba(255, 232, 140, .8);
}
.motion-layer-sparkle-rain .motion-piece:nth-child(3n) { background: #fff3b0; width: 4px; height: 4px; }
.motion-layer-sparkle-rain .motion-piece:nth-child(5n) { background: #f59ab0; width: 6px; height: 6px; }
@keyframes motion-sparkle-rain {
    0%   { transform: translate3d(0, -16px, 0) scale(0.6); opacity: 0; }
    15%  { opacity: 1; transform: translate3d(2px, 50px, 0) scale(1); }
    50%  { transform: translate3d(-2px, 190px, 0) scale(0.8); opacity: 1; }
    85%  { opacity: 1; transform: translate3d(2px, 330px, 0) scale(0.6); }
    100% { transform: translate3d(0, 380px, 0) scale(0.4); opacity: 0; }
}

/* Respect users who opted out of motion entirely. */
@media (prefers-reduced-motion: reduce) {
    .motion-layer { display: none; }
}

/* ============================================================
   Shared "back to home" link used at the top of subpages
   (browse + history). Coral text, mono uppercase, with a
   generous hover affordance so it reads as a real action.
   ============================================================ */
.browse-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 12px 7px 9px;
    border: 1px solid rgba(217, 81, 66, .22);
    border-radius: 999px;
    color: var(--coral-dark);
    font: 600 11px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(240, 107, 87, .08);
    transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}
.browse-back:hover {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
    color: #fff;
    transform: translateX(-2px);
}
.browse-back:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ============================================================
   History page — list of cards the user has created, kept in
   localStorage. Mirrors sendthesong.xyz's "your previous links"
   feel but lives entirely client-side.
   ============================================================ */
.history-hero { padding: 64px 0 28px; text-align: center; }
.history-hero h1 { margin: 0 0 18px; font-size: clamp(42px, 5vw, 64px); line-height: 1; }
.history-hero p { max-width: 600px; margin: 0 auto; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.history-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 720px;
    margin: 22px auto 0;
    padding: 14px 18px;
    border: 1px solid rgba(240, 107, 87, .35);
    border-radius: 10px;
    background: #fff5f2;
    color: var(--coral-dark);
    font: 500 12px/1.55 var(--sans);
    text-align: left;
}
.history-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--coral);
    color: #fff;
    font-size: 14px;
    line-height: 1;
}
.history-warning strong { color: var(--ink); display: block; margin-bottom: 3px; font-size: 13px; }
.history-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 960px;
    margin: 28px auto 16px;
}
.history-toolbar-meta {
    color: var(--ink-soft);
    font: 500 11px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.history-toolbar-meta strong { color: var(--ink); }
.history-toolbar-actions { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.history-toolbar-actions .button { padding: 13px 18px; font-size: 11px; }
.history-toolbar-actions .button[data-variant="primary"] {
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
}
.history-toolbar-actions .button[data-variant="primary"]:hover {
    background: var(--coral);
    border-color: var(--coral);
    transform: translateY(-2px);
    box-shadow: 0 7px 17px rgba(240, 107, 87, .28);
}
.history-toolbar-actions .button[data-variant="primary"] span[aria-hidden] {
    font-size: 16px;
    transition: transform .2s ease;
}
.history-toolbar-actions .button[data-variant="primary"]:hover span[aria-hidden] {
    transform: translateY(2px);
}
.history-toolbar-actions .button[data-variant="danger"] {
    background: #fff;
    color: var(--coral-dark);
    border: 1px solid rgba(217, 81, 66, .35);
}
.history-toolbar-actions .button[data-variant="danger"]:hover {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
    transform: translateY(-2px);
    box-shadow: 0 7px 17px rgba(240, 107, 87, .25);
}
.history-toolbar-actions .button[disabled] {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.history-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 960px;
    margin: 0 auto 28px;
    padding: 0 0 96px;
}
.history-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.history-item:hover {
    border-color: rgba(23, 32, 54, .25);
    box-shadow: 0 8px 18px rgba(23, 32, 54, .07);
    transform: translateY(-2px);
}
.history-item-thumb {
    position: relative;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--paper-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--coral-dark);
    font-size: 22px;
}
.history-item-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Cover resolution is async, so the thumbnail paints a neutral skeleton until
   the real image is decoded. Without this the box flashes the old/theme image
   first and then snaps to the uploaded photo. */
.history-item-thumb.is-pending::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--paper-deep);
    animation: history-thumb-pulse 1.1s ease-in-out infinite;
}
@keyframes history-thumb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
    .history-item-thumb.is-pending::after { animation: none; }
}
.history-item-body { min-width: 0; }
.history-item-recipient {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-soft);
    font: 500 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.history-item-recipient strong { color: var(--ink); font-size: 12px; }
.history-item-message {
    margin: 6px 0 6px;
    color: var(--ink);
    font: 500 16px/1.35 var(--serif);
    letter-spacing: -.025em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.history-item-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--coral-dark);
    font: 500 10px var(--mono);
    word-break: break-all;
}
.history-item-meta {
    margin-top: 4px;
    color: #9b9da3;
    font: 9px var(--mono);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.history-item-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.history-item-actions button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(23, 32, 54, .15);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font: 600 10px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.history-item-actions button:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.history-item-actions button:disabled { opacity: .5; cursor: not-allowed; }
.history-item-actions .is-danger:hover { border-color: var(--coral); color: var(--coral-dark); }
.history-item-actions .is-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.history-item-actions .is-primary:hover { background: var(--coral); border-color: var(--coral); }
.history-item-actions .is-done { background: #2e8961; border-color: #2e8961; color: #fff; }
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 540px;
    margin: 32px auto 96px;
    padding: 60px 30px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    text-align: center;
    color: var(--ink-soft);
}
.history-empty[hidden] { display: none; }
.history-empty strong { color: var(--ink); font-size: 18px; }
.history-empty .button { margin-top: 12px; }
.history-empty-hint {
    max-width: 440px;
    margin: 4px 0 0;
    color: #9b9da3;
    font: 11px/1.55 var(--sans);
}
.history-empty-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--paper-deep);
    color: var(--coral-dark);
    font-size: 22px;
}

/* Keep the expanded library and message picker compact as their catalogs grow. */
.library-tracks { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.message-inspiration { margin: 12px 0 22px; }
.message-inspiration-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.message-inspiration-heading button { padding: 8px 12px; border: 1px solid var(--line, #d9d6ce); border-radius: 8px; background: var(--paper, #fbf8f2); color: var(--ink); font: inherit; cursor: pointer; }
.message-inspiration-heading button:hover { background: var(--paper-deep, #ede9df); }
.message-ideas { margin-top: 10px; font-size: 14px; }
.message-ideas summary { padding: 7px 0; cursor: pointer; text-underline-offset: 3px; }
.message-category-label { display: block; margin: 10px 0 6px; font-size: 12px; }
#message-category { width: 100%; min-height: 42px; padding: 8px; border: 1px solid #d9d6ce; border-radius: 8px; background: #fff; color: var(--ink); font: 14px var(--sans); }
.message-idea-list { display: grid; gap: 8px; max-height: 260px; margin-top: 10px; overflow-y: auto; overscroll-behavior: contain; }
.message-idea { display: grid; gap: 5px; width: 100%; padding: 12px; border: 1px solid #d9d6ce; border-radius: 8px; background: #fff; color: var(--ink); font: 14px/1.5 var(--sans); text-align: left; cursor: pointer; }
.message-idea small { color: var(--ink-soft); font-size: 12px; }
.message-idea:hover, .message-idea:focus-visible { border-color: var(--coral-dark, #a34c3f); }
.message-idea[hidden] { display: none !important; }
#message-idea-status { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) {
    .history-item {
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto;
        row-gap: 12px;
    }
    .history-item-thumb { width: 44px; height: 44px; font-size: 18px; }
    .history-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .history-item-actions button { flex: 1 1 auto; }
}


/* ---------- Card interactions: narrow screens ----------
   On phones the vote column sits under the card, so the buttons go back
   to sitting side by side and the comment rail spans the full width.
   These live at the end of the file so they win over the base rules. */
@media (max-width: 700px) {
    .open-card-side { width: 100%; gap: 18px; margin-top: 26px; }
    .open-card-caption { width: 160px; margin: 0 0 0 auto; }
    .interaction-votes { flex-direction: row; }
    .vote-button { flex: 1 1 0; }
}
