/* Jarex: animated e-cards. Design system (ui-ux-pro-max, "Gift & Wishlist" palette, Rubik + Nunito Sans): gift red,
   gold and surprise pink on a warm paper background; handwriting (Caveat) only on the cards.
   Two modes on <html data-motion>: "full" (all movement) and "lite" (no animation, no canvas, no transitions). */

@import url('/static/fonts/fonts.css');

:root {
    --bg: #fff7f5;
    --bg-2: #fff1f2;
    --card: #ffffff;
    --fg: #22101a;
    --muted: #6b5560;
    --line: #f3dfe2;
    --primary: #e11d48;
    --primary-2: #be123c;
    --gold: #d97706;
    --pink: #ec4899;
    --ring: #e11d48;
    --ok: #15803d;
    --radius: 18px;
    --radius-s: 12px;
    --shadow: 0 1px 2px rgb(34 16 26 / 6%), 0 8px 24px -8px rgb(34 16 26 / 14%);
    --shadow-lg: 0 2px 4px rgb(34 16 26 / 6%), 0 24px 48px -16px rgb(190 18 60 / 30%);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font-head: 'Rubik', system-ui, sans-serif;
    --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-hand: 'Caveat', 'Segoe Script', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--primary-2); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
::selection { background: #fecdd3; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.sec { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.sec-head { max-width: 62ch; margin-bottom: 1.6rem; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--fg); color: #fff; padding: 0.6rem 1rem; border-radius: 10px; }
.skip:focus { top: 1rem; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 46px; padding: 0.7em 1.25em; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; font: 650 1rem/1.1 var(--font-head); text-decoration: none; box-shadow: 0 6px 18px -6px rgb(225 29 72 / 55%); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-position 0.4s; background-size: 160% 100%; cursor: pointer; }
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px -8px rgb(225 29 72 / 65%); background-position: 100% 0; }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-ghost { background: var(--card); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow); }
.btn-ghost:hover { color: var(--primary-2); box-shadow: inset 0 0 0 1.5px #fda4af, var(--shadow); }
.btn-light { background: #fff; color: var(--primary-2); }
.btn-light:hover { color: var(--primary); }
.btn-big { min-height: 54px; padding: 0.85em 1.6em; font-size: 1.08rem; }
.btn-small { min-height: 38px; padding: 0.45em 0.9em; font-size: 0.9rem; }
.btn[aria-busy='true'] { opacity: 0.75; pointer-events: none; }
.row-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 50; background: rgb(255 247 245 / 82%); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.3s, box-shadow 0.3s; }
.hdr.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgb(34 16 26 / 35%); }
.hdr-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--fg); text-decoration: none; }
.logo-mark { flex: none; width: 38px; height: 38px; transition: transform 0.5s var(--ease); }
.brand:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.brand-name { font: 800 1.45rem/1 var(--font-head); letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.nav > a, .mega > summary { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem; border-radius: 999px; color: var(--fg); font-weight: 650; text-decoration: none; cursor: pointer; list-style: none; }
.mega > summary::-webkit-details-marker { display: none; }
.mega > summary::after { content: ''; width: 0.45em; height: 0.45em; margin-left: 0.5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform 0.25s; }
.mega[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.nav > a:hover, .mega > summary:hover { background: var(--bg-2); color: var(--primary-2); }
.mega { position: relative; }
.mega-panel { position: absolute; top: calc(100% + 10px); left: 50%; width: min(680px, 92vw); transform: translateX(-50%); padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: pop 0.3s var(--ease); }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.mega-grid a { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.5rem 0.7rem; border-radius: var(--radius-s); color: var(--fg); text-decoration: none; font-weight: 600; }
.mega-grid a:hover { background: var(--bg-2); color: var(--primary-2); }
.mega-grid .ico { color: var(--primary); }
.mega-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 0.6rem; }
.mega-all { display: flex; align-items: center; gap: 0.4rem; min-height: 44px; font-weight: 700; text-decoration: none; }
.hdr-tools { display: flex; align-items: center; gap: 0.5rem; }
.motion-btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0 0.8rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); font-size: 0.88rem; font-weight: 700; }
.motion-btn:hover { border-color: #fda4af; }
.motion-btn .ico { color: var(--primary); }
.motion-off { display: none; }
[data-motion='lite'] .motion-on { display: none; }
[data-motion='lite'] .motion-off { display: inline; }
@media (max-width: 480px) { .hide-xs { display: none !important; } .brand-name { display: none; } }
@media (max-width: 760px) {
    .hide-sm { display: none !important; }
    .hdr-in { gap: 0.5rem; }
    .nav { gap: 0; }
    .motion-btn span { display: none !important; }
    .brand-name { font-size: 1.25rem; }
    .nav > a, .mega > summary { padding: 0 0.6rem; }
    .mega-panel { position: fixed; top: 70px; left: 50%; }
    .mega-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding-top: clamp(2rem, 6vw, 4.5rem); background: radial-gradient(60rem 30rem at 85% 0%, #ffe4e6 0%, transparent 60%), radial-gradient(40rem 26rem at 0% 30%, #fef3c7 0%, transparent 60%); }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.85rem; border-radius: 999px; background: #fff; box-shadow: var(--shadow); color: var(--primary-2); font: 700 0.9rem/1.2 var(--font-head); }
.hero-title { margin-top: 0.6rem; font-size: clamp(2.3rem, 5.4vw, 4rem); }
.grad { background: linear-gradient(100deg, var(--primary-2) 0%, var(--primary) 30%, var(--pink) 55%, var(--gold) 80%, var(--primary) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradmove 9s ease-in-out infinite alternate; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 56ch; }
.trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin: 1.6rem 0 0; padding: 0; list-style: none; color: var(--muted); font-weight: 650; }
.trust li { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust .ico { color: var(--ok); }
.hero-stack { position: relative; aspect-ratio: 1 / 0.92; perspective: 1200px; }
.stack-card { position: absolute; width: 78%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 22px; border: 6px solid #fff; box-shadow: var(--shadow-lg); transform-style: preserve-3d; will-change: transform; }
.stack-card .art { width: 100%; height: 100%; }
.stack-card.s0 { left: 2%; top: 6%; --r: -9deg; transform: rotate(var(--r)) translate3d(var(--px, 0), var(--py, 0), 0); animation: hover1 7s ease-in-out infinite alternate; }
.stack-card.s1 { right: 0; top: 30%; --r: 7deg; transform: rotate(var(--r)) translate3d(calc(var(--px, 0) * -1), var(--py, 0), 40px); animation: hover2 8s ease-in-out infinite alternate; z-index: 2; }
.stack-card.s2 { left: 12%; bottom: 0; --r: -2deg; transform: rotate(var(--r)) translate3d(var(--px, 0), calc(var(--py, 0) * -1), 80px); animation: hover1 9s ease-in-out infinite alternate-reverse; z-index: 3; }
.marquee { position: relative; margin-top: clamp(2rem, 5vw, 3.5rem); padding: 1rem 0; overflow: hidden; border-block: 1px solid var(--line); background: rgb(255 255 255 / 55%); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 0.75rem; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-stack { max-width: 520px; width: 100%; margin-inline: auto; } }

/* Chips, occasion tiles */
.chip { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 42px; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--fg); font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.chip .ico { color: var(--primary); }
.chip:hover { color: var(--primary-2); box-shadow: inset 0 0 0 1.5px #fda4af; transform: translateY(-2px); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.occ-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.occ { position: relative; display: flex; flex-direction: column; gap: 0.35rem; min-height: 132px; padding: 1.1rem; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transform: perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.occ::before { content: ''; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, #fecdd3, transparent 70%); transition: transform 0.6s var(--ease); }
.occ:hover { box-shadow: var(--shadow-lg); color: var(--fg); }
.occ:hover::before { transform: scale(1.6); }
.occ-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #ffe4e6, #fef3c7); color: var(--primary-2); }
.occ-ico .ico { width: 26px; height: 26px; }
.occ-ico.big { width: 64px; height: 64px; margin-bottom: 1rem; }
.occ-ico.big .ico { width: 34px; height: 34px; }
.occ-name { position: relative; font: 650 1.08rem/1.25 var(--font-head); }
.occ-n { position: relative; color: var(--muted); font-size: 0.9rem; margin-top: auto; }

/* Product cards */
.pc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.pc { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(var(--lift, 0)); transition: transform 0.4s var(--ease), box-shadow 0.4s; content-visibility: auto; contain-intrinsic-size: auto 320px; }
.pc:hover { --lift: -4px; box-shadow: var(--shadow-lg); color: var(--fg); }
.pc-art { aspect-ratio: 16 / 10; overflow: hidden; }
.pc-art .art { width: 100%; height: 100%; transition: transform 0.8s var(--ease); }
.pc:hover .pc-art .art { transform: scale(1.04); }
.pc-body { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.8rem; padding: 1rem 1.1rem 1.15rem; }
.pc-body h3 { margin: 0; }
.pc-body p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.95rem; }
.price { grid-row: 1; grid-column: 2; align-self: center; padding: 0.2rem 0.65rem; border-radius: 999px; background: #fff1f2; color: var(--primary-2); font: 700 0.95rem/1.4 var(--font-head); }

/* Upcoming name days */
.up-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.up-item { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.up-item.is-today { background: linear-gradient(135deg, #fff1f2, #fffbeb); box-shadow: inset 0 0 0 2px #fda4af, var(--shadow); }
.up-date { color: var(--primary-2); font: 600 0.95rem/1.2 var(--font-head); }
.up-date b { font-size: 1.6rem; }
.up-when { color: var(--muted); font-size: 0.85rem; }
.up-names { color: var(--muted); font-size: 0.92rem; }

/* Steps */
.steps { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 1.3rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 0.8rem; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--gold)); color: #fff; font: 700 1.15rem/1 var(--font-head); }
.step p { margin: 0; color: var(--muted); }

/* Text pages */
.page-head { padding-top: 1.5rem; max-width: 860px; }
.page-head > p { font-size: 1.08rem; color: var(--muted); }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
.prose p { font-size: 1.05rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 1.2rem 0 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 0.3rem; color: #d4a5ae; }
.crumbs a { color: var(--muted); }

/* FAQ */
.faq { max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { position: relative; display: block; padding: 1.1rem 2.5rem 1.1rem 0; font: 600 1.08rem/1.35 var(--font-head); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 0.4rem; top: 50%; display: grid; place-items: center; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: var(--bg-2); color: var(--primary-2); font-size: 1.3rem; transition: transform 0.3s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding-bottom: 1rem; color: var(--muted); }

/* CTA band */
.cta-band { position: relative; overflow: hidden; margin-block: 2rem 4rem; padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem); border-radius: 28px; background: linear-gradient(120deg, var(--primary-2), var(--primary), var(--pink), var(--gold)); background-size: 300% 100%; color: #fff; text-align: center; animation: gradmove 12s ease-in-out infinite alternate; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 52ch; margin-inline: auto; opacity: 0.95; font-size: 1.1rem; }
.cta-fx, .view-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Product page */
.product { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3rem); padding-block: 1.5rem 2rem; align-items: start; }
.product-preview { position: sticky; top: 88px; }
.preview-label { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.7rem; color: var(--muted); font-weight: 700; }
.product-blurb { font-size: 1.1rem; color: var(--muted); }
.product-price { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.2rem 0 0.2rem; }
.product-price span { color: var(--muted); font-weight: 600; }
.product-price strong { font: 800 2rem/1 var(--font-head); color: var(--primary-2); }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } .product-preview { position: static; } }

/* The card: scene + paper */
.card { margin: 0; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); }
.card-art { aspect-ratio: 16 / 10; overflow: hidden; }
.card-art .art { width: 100%; height: 100%; }
.card-paper { position: relative; padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.2rem, 4vw, 2.2rem) clamp(1.3rem, 3vw, 2rem); background: linear-gradient(180deg, #fffdfb, #fff8f3); border-top: 4px solid var(--a); }
.card-paper::before { content: ''; position: absolute; inset: 10px; border: 1.5px dashed color-mix(in srgb, var(--a) 30%, transparent); border-radius: 14px; pointer-events: none; }
.card-to { margin: 0 0 0.3rem; font: 700 clamp(1.7rem, 3.4vw, 2.3rem)/1.1 var(--font-hand); color: var(--primary-2); }
.card-msg { margin: 0 0 0.6rem; font-size: clamp(1.02rem, 1.6vw, 1.15rem); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; color: #3b1d2a; }
.card-from { margin: 0; text-align: right; font: 600 clamp(1.4rem, 2.6vw, 1.8rem)/1.1 var(--font-hand); color: #7c2d12; }
.card-big { max-width: 820px; margin-inline: auto; }

/* Form */
.order { display: grid; gap: 1rem; margin-top: 1.4rem; padding: clamp(1.1rem, 3vw, 1.6rem); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.order h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 1.3rem; }
.order h2 .ico { color: var(--primary); }
.field { display: grid; gap: 0.3rem; }
.field > span { display: flex; justify-content: space-between; font-weight: 700; }
.field small { color: var(--muted); }
.count { font-style: normal; font-weight: 600; color: var(--muted); font-size: 0.85rem; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 0.7rem 0.9rem; border: 1.5px solid #ead1d6; border-radius: var(--radius-s); background: #fffdfc; color: var(--fg); font: inherit; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgb(225 29 72 / 14%); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; font-size: 0.95rem; }
.check { cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin: 1px 0 0; border: 2px solid #e8b4bf; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(76, 5, 25, 0.06); cursor: pointer; transition: background 0.2s var(--ease), border-color 0.2s, box-shadow 0.25s, transform 0.15s; }
.check input::after { content: ''; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 2.6px 2.6px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.28s var(--ease); }
.check input:checked { border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--pink)); box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check:hover input:not(:checked) { border-color: var(--primary); background: #fff5f7; }
.check input:active { transform: scale(0.9); }
.check input:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }
.check input:user-invalid { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.14); }
@media (forced-colors: active) { .check input { appearance: auto; -webkit-appearance: auto; } .check input::after { content: none; } }
.btn-pay { width: 100%; }
.notice { padding: 0.8rem 1rem; border-radius: var(--radius-s); background: #fffbeb; box-shadow: inset 0 0 0 1.5px #fde68a; }
.notice-err { background: #fef2f2; box-shadow: inset 0 0 0 1.5px #fecaca; color: #991b1b; }

/* Wishes */
.wish-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.wish-list li { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.wish-list blockquote { position: relative; margin: 0; padding-left: 1.6rem; color: #3b1d2a; }
.wish-list blockquote::before { content: '“'; position: absolute; left: 0; top: -0.35rem; color: #fda4af; font: 700 2.2rem/1 var(--font-head); }
.wish-list .btn { align-self: flex-start; margin-top: auto; }

/* Done */
.done { padding-block: 2rem 4rem; }
.done-head { position: relative; padding: 1rem 0 1.5rem; text-align: center; }
.done-head .lead { margin-inline: auto; }
.done-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 0.8rem; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; box-shadow: 0 10px 30px -10px rgb(21 128 61 / 60%); animation: pop 0.6s var(--ease); }
.done-ico .ico { width: 38px; height: 38px; }
.done-ico.spin { background: linear-gradient(135deg, var(--gold), var(--primary)); }
.done-ico.spin .ico { animation: spin 2.4s linear infinite; }
.done-ico.warn { background: linear-gradient(135deg, #f59e0b, #b45309); }
.done-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 1.5rem; }
.done-share, .done-qr { padding: 1.4rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.done-share { display: grid; gap: 1rem; align-content: start; }
.done-qr { display: grid; gap: 0.6rem; justify-items: center; text-align: center; }
.done-qr h2 { font-size: 1.2rem; margin: 0; }
.done-qr img { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.linkbox { display: flex; gap: 0.5rem; }
.linkbox input { flex: 1; min-width: 0; min-height: 48px; padding: 0 0.9rem; border: 1.5px solid #ead1d6; border-radius: var(--radius-s); background: #fffdfc; font: 600 1rem var(--font-body); color: var(--fg); }
.share-title { margin: 0; font-weight: 700; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.done-card { max-width: 760px; margin: 2.5rem auto 0; }
@media (max-width: 860px) { .done-grid { grid-template-columns: 1fr; } .linkbox { flex-direction: column; } }

/* The recipient's view */
body.is-card { min-height: 100dvh; background: radial-gradient(60rem 40rem at 50% 0%, #ffe4e6, transparent 65%), radial-gradient(40rem 30rem at 100% 100%, #fef3c7, transparent 60%), var(--bg); }
.view { display: grid; place-items: center; min-height: 100dvh; padding: 1.5rem 1rem 2rem; }
.view-card { position: relative; display: none; width: 100%; }
.view.opened .view-card { display: block; animation: rise 1s var(--ease) both; }
.view.opened .envelope { display: none; }
.view-foot { display: grid; justify-items: center; gap: 0.6rem; margin-top: 1.8rem; text-align: center; }
.envelope { position: relative; width: min(560px, 92vw); aspect-ratio: 16 / 10.5; border: 0; padding: 0; background: none; perspective: 1400px; cursor: pointer; animation: bob 3.4s ease-in-out infinite; }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 18px; }
.env-back { background: color-mix(in srgb, var(--a) 70%, #000 10%); box-shadow: var(--shadow-lg); }
.env-letter { position: absolute; left: 7%; right: 7%; top: 8%; height: 84%; overflow: hidden; border-radius: 12px; background: #fff; transition: transform 0.9s var(--ease) 0.35s; }
.env-letter .art { width: 100%; height: 100%; }
.env-front { background: linear-gradient(160deg, color-mix(in srgb, var(--a) 85%, #fff), var(--a)); clip-path: polygon(0 35%, 50% 72%, 100% 35%, 100% 100%, 0 100%); }
.env-flap { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 75%, #fff), color-mix(in srgb, var(--a) 92%, #000)); clip-path: polygon(0 0, 100% 0, 50% 64%); transform-origin: top; transition: transform 0.6s var(--ease); z-index: 2; }
.env-seal { position: absolute; left: 50%; top: 58%; z-index: 3; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fb7185, #9f1239); color: #fff; box-shadow: 0 6px 16px rgb(0 0 0 / 25%); transition: transform 0.4s var(--ease), opacity 0.3s; }
.env-seal .ico { width: 30px; height: 30px; fill: #fff; }
.env-to { position: absolute; left: 0; right: 0; bottom: 14%; z-index: 3; color: #fff; font: 700 clamp(1.5rem, 4.4vw, 2.2rem)/1.1 var(--font-hand); text-shadow: 0 2px 8px rgb(0 0 0 / 25%); }
.env-hint { position: absolute; left: 0; right: 0; bottom: -2.6rem; color: var(--muted); font-weight: 700; animation: pulse 2s ease-in-out infinite; }
.view.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.view.opening .env-seal { transform: scale(0); opacity: 0; }
.view.opening .env-letter { transform: translateY(-48%); }
.view.opening .envelope { animation: none; }

/* Name days */
.nd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.2rem; }
.nd-month { padding: 1.2rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.nd-month h2 { font-size: 1.35rem; color: var(--primary-2); }
.nd-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.nd-table th, .nd-table td { padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.nd-table thead th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.nd-table tbody th { font-weight: 700; }
.nd-table td:first-child { white-space: nowrap; color: var(--primary-2); font-weight: 700; }

/* 404 */
.nf { padding-block: 3rem 5rem; max-width: 720px; }
.nf-code { margin: 0; font: 800 clamp(4rem, 12vw, 7rem)/1 var(--font-head); background: linear-gradient(135deg, var(--primary), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf .chips { justify-content: center; }

/* Footer */
.ftr { margin-top: 3rem; padding-top: 3rem; background: #22101a; color: #f5e6ea; }
.ftr a { color: #fecdd3; text-decoration: none; }
.ftr a:hover { color: #fff; text-decoration: underline; }
.ftr h2 { font-size: 1rem; color: #fff; letter-spacing: 0.02em; }
.ftr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1.6fr 1fr 1fr; gap: 2rem; }
.ftr-cols { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
.ftr-brand .brand { color: #fff; margin-bottom: 0.8rem; }
.ftr-brand p { color: #d9c3ca; }
.ftr-pay { display: flex; gap: 0.5rem; font-size: 0.9rem; }
.ftr-bottom { margin-top: 2rem; padding-block: 1.2rem 1.6rem; border-top: 1px solid #3d2430; color: #bfa6ae; font-size: 0.9rem; }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr-brand { grid-column: 1 / -1; } }

.toast { position: fixed; left: 50%; bottom: 1.2rem; z-index: 80; display: flex; align-items: center; gap: 0.8rem; max-width: min(560px, 92vw); padding: 0.85rem 1rem; border-radius: 16px; background: #22101a; color: #fff; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: rise 0.4s var(--ease); }
.toast[hidden] { display: none; }
.toast .btn { flex: none; min-height: 38px; padding: 0.4em 0.9em; font-size: 0.9rem; }

/* Scroll reveal (full mode only; without the script or in light mode everything is simply there) */
[data-motion='full'] .js .reveal { opacity: 0; translate: 0 26px; transition: opacity 0.8s var(--ease) var(--d, 0s), translate 0.8s var(--ease) var(--d, 0s), transform 0.4s var(--ease), box-shadow 0.4s; }
[data-motion='full'] .js .reveal.in { opacity: 1; translate: none; }

/* Card scenes: paused until visible (app.js marks [data-play] .playing), run only in full mode */
.art [class^='jx-'] { transform-box: fill-box; transform-origin: center; animation-play-state: paused; }
.playing .art [class^='jx-'] { animation-play-state: running; }
.jx-float { animation: jx-float 6s ease-in-out infinite alternate; }
.jx-fall { animation: jx-fall 8s linear infinite; }
.jx-snow { animation: jx-snow 11s linear infinite; }
.jx-twinkle { animation: jx-twinkle 3s ease-in-out infinite; }
.jx-flicker { animation: jx-flicker 0.9s ease-in-out infinite; }
.jx-glow { animation: jx-glow 2.4s ease-in-out infinite alternate; }
.jx-spin-slow { animation: spin 30s linear infinite; }
.jx-burst { animation: jx-burst 3.2s ease-out infinite; }
.jx-rise { animation: jx-rise 7s ease-in infinite; }
.jx-rise-far { animation: jx-rise-far 10s ease-in infinite; }
.jx-clink-l { animation: jx-clink-l 3.2s ease-in-out infinite; }
.jx-clink-r { animation: jx-clink-r 3.2s ease-in-out infinite; }
.jx-fizz { animation: jx-fizz 2.2s ease-in infinite; }
.jx-flash { animation: jx-flash 3.2s ease-out infinite; }
.jx-sway { animation: jx-sway 5s ease-in-out infinite alternate; }
.jx-bloom { animation: jx-bloom 1.4s var(--ease) both; }
.jx-petal { animation: jx-petal 10s linear infinite; }
.jx-beat { animation: jx-beat 1.6s ease-in-out infinite; }
.jx-draw { animation: jx-draw 2.6s ease-out both; }
.jx-swing { animation: jx-swing 4.4s ease-in-out infinite alternate; }
.jx-wobble { animation: jx-wobble 3.6s ease-in-out infinite; }
.jx-drift { animation: jx-drift 30s ease-in-out infinite alternate; }
.jx-hop { animation: jx-hop 2.8s ease-in-out infinite; }
.jx-toss { animation: jx-toss 4.8s ease-in-out infinite; }
.jx-steam { animation: jx-steam 3.3s ease-out infinite; }

@keyframes jx-float { from { transform: translateY(10px) rotate(-2deg); } to { transform: translateY(-14px) rotate(2deg); } }
@keyframes jx-fall { 0% { transform: translate(0, -80px) rotate(0); opacity: 0; } 6% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translate(30px, 600px) rotate(600deg); opacity: 0; } }
@keyframes jx-snow { 0% { transform: translate(0, -60px); opacity: 0; } 8% { opacity: 1; } 50% { transform: translate(18px, 260px); } 92% { opacity: 1; } 100% { transform: translate(-6px, 580px); opacity: 0; } }
@keyframes jx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes jx-flicker { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(0.9, 1.1); } 50% { transform: scale(1.06, 0.94); } 75% { transform: scale(0.95, 1.06); } }
@keyframes jx-glow { from { opacity: 0.12; transform: scale(0.94); } to { opacity: 0.34; transform: scale(1.06); } }
@keyframes jx-burst { 0% { transform: scale(0.05); opacity: 0; } 8% { opacity: 1; } 55% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.14); opacity: 0; } }
@keyframes jx-rise { 0% { transform: translateY(40px); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translateY(-260px); opacity: 0; } }
@keyframes jx-rise-far { 0% { transform: translate(0, 120px) scale(0.6); opacity: 0; } 15% { opacity: 0.9; } 50% { transform: translate(14px, -200px) scale(0.85); } 100% { transform: translate(-10px, -520px) scale(1); opacity: 0; } }
@keyframes jx-clink-l { 0%, 58%, 100% { transform: rotate(0); } 72% { transform: rotate(7deg); } 80% { transform: rotate(4deg); } }
@keyframes jx-clink-r { 0%, 58%, 100% { transform: rotate(0); } 72% { transform: rotate(-7deg); } 80% { transform: rotate(-4deg); } }
@keyframes jx-fizz { 0% { transform: translateY(0); opacity: 0.9; } 100% { transform: translateY(-64px); opacity: 0; } }
@keyframes jx-flash { 0%, 62%, 100% { transform: scale(0); opacity: 0; } 72% { transform: scale(1.25); opacity: 1; } 86% { transform: scale(0.7); opacity: 0; } }
@keyframes jx-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes jx-bloom { 0% { transform: scale(0.15); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes jx-petal { 0% { transform: translate(-40px, -60px) rotate(0); opacity: 0; } 10% { opacity: 0.85; } 90% { opacity: 0.85; } 100% { transform: translate(140px, 560px) rotate(380deg); opacity: 0; } }
@keyframes jx-beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.08); } 28% { transform: scale(1); } 42% { transform: scale(1.05); } 70% { transform: scale(1); } }
@keyframes jx-draw { from { stroke-dasharray: 2000; stroke-dashoffset: 2000; } to { stroke-dasharray: 2000; stroke-dashoffset: 0; } }
@keyframes jx-swing { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes jx-wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
@keyframes jx-drift { from { transform: translateX(-34px); } to { transform: translateX(34px); } }
@keyframes jx-hop { 0%, 58%, 100% { transform: translateY(0); } 70% { transform: translateY(-24px) rotate(-3deg); } 80% { transform: translateY(0); } 88% { transform: translateY(-8px); } }
@keyframes jx-toss { 0% { transform: translate(0, 40px) rotate(-20deg); } 50% { transform: translate(12px, -56px) rotate(160deg); } 100% { transform: translate(0, 40px) rotate(340deg); } }
@keyframes jx-steam { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: 0.9; } 100% { transform: translateY(-28px); opacity: 0; } }
@keyframes gradmove { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes hover1 { from { translate: 0 -6px; } to { translate: 0 10px; } }
@keyframes hover2 { from { translate: 0 8px; } to { translate: 0 -10px; } }
@keyframes pop { from { opacity: 0; transform: translateX(var(--tx, 0)) scale(0.92); } to { opacity: 1; transform: translateX(var(--tx, 0)) scale(1); } }
.mega-panel { --tx: -50%; }
@keyframes slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 24px) scale(0.98); } to { opacity: 1; transform: translate(var(--tx, 0), 0); } }
.toast { --tx: -50%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Page-to-page cross-fade (Chrome, Edge, Safari 18) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.25s ease both vt-out; }
::view-transition-new(root) { animation: 0.35s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Light mode: still, light, the same layout */
[data-motion='lite'] { scroll-behavior: auto; }
[data-motion='lite'] *, [data-motion='lite'] *::before, [data-motion='lite'] *::after { animation: none !important; transition: none !important; }
[data-motion='lite']::view-transition-old(root), [data-motion='lite']::view-transition-new(root) { animation: none !important; }
[data-motion='lite'] .hero-fx, [data-motion='lite'] .cta-fx, [data-motion='lite'] .view-fx { display: none; }
[data-motion='lite'] .hdr { backdrop-filter: none; background: var(--bg); }
[data-motion='lite'] .marquee-track { flex-wrap: wrap; justify-content: center; width: auto; }
[data-motion='lite'] .marquee-track > :nth-child(n + 16) { display: none; }
[data-motion='lite'] .marquee { mask-image: none; }
[data-motion='lite'] .pc, [data-motion='lite'] .occ { transform: none; content-visibility: visible; }
[data-motion='lite'] .stack-card { transform: rotate(var(--r)); }
[data-motion='lite'] .view .envelope { display: none; }
[data-motion='lite'] .view .view-card { display: block; }

/* Open Graph frame (scripts/og.mjs) */
body.og { margin: 0; background: #fff; }
.og-frame { position: relative; width: 1200px; height: 630px; overflow: hidden; }
.og-frame .art { width: 1200px; height: 630px; }
.og-band { position: absolute; left: 40px; bottom: 36px; display: flex; align-items: center; gap: 14px; padding: 16px 26px 16px 18px; border-radius: 22px; background: rgb(255 255 255 / 93%); box-shadow: 0 12px 40px rgb(0 0 0 / 22%); }
.og-band .logo-mark { width: 54px; height: 54px; }
.og-band .brand-name { font-size: 2rem; color: #22101a; }
.og-band strong { margin-left: 10px; padding-left: 18px; border-left: 2px solid #f3dfe2; font: 700 2rem/1.1 var(--font-head); color: #be123c; }

@media print { .hdr, .ftr, .toast, canvas { display: none !important; } }
.nw { white-space: nowrap; }
/* Grids with a column count that divides what they hold, so no row is left half empty: 18 occasions (6/3/2),
   cards 4 or 8 (4/2/1), 12 wishes (4/3/2/1), 6 upcoming name days (6/3/2). */
@media (max-width: 1180px) { .up-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .pc-grid { grid-template-columns: repeat(2, 1fr); } .wish-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .occ-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .wish-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .occ-grid, .up-list { grid-template-columns: repeat(2, 1fr); } .pc-grid, .wish-list { grid-template-columns: 1fr; } }
/* Gradient text (transparent glyphs over a clipped background) vanished under the selection: selected, it is a solid colour. */
.grad::selection, .grad *::selection, .nf-code::selection { color: var(--primary-2); -webkit-text-fill-color: var(--primary-2); background: #fecdd3; }
/* Example text in the empty fields */
.field input::placeholder, .field textarea::placeholder { color: #a8939c; opacity: 1; }
/* FAQ: app.js animates the height in full mode; the "+" turns back as soon as an answer starts closing. */
.faq-item.is-closing summary::after { transform: none; }
/* The FAQ moves in light mode too (app.js animates the answer; the "+" turns with it). */
[data-motion='lite'] .faq-item summary::after { transition: transform 0.3s var(--ease) !important; }

/* ---------- Card Studio: the buyer's own cards (.sx, drawn by static/studio-core.mjs) ----------
   The card is 800 × 500 units: layers sit at percentages of it and size with the card (cqw). Depth (--z) moves a layer
   towards the viewer when the card tilts (--tx, --ty on .sx-tilt). Each layer's place and turn are on .sx-it, its
   animation on .sx-in, so a moving layer keeps its place. Lite mode stops the movement; every animation ends (or rests)
   in a pleasing still pose, and the ones that reveal (draw itself, typewriter, pop in) show everything when still. */
.sx { position: relative; width: 100%; height: 100%; overflow: hidden; container-type: inline-size; perspective: 1100px; background: linear-gradient(135deg, var(--a, #2a1330), var(--b, #2a1330)); isolation: isolate; user-select: none; -webkit-user-select: none; }
.sx-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform 0.6s var(--ease); }
/* The background sits back and reaches past the edges: a tilted card never shows a corner. */
.sx-bg { position: absolute; inset: -16%; transform: translateZ(-80px) scale(1.08); }
.sx-bg .art { width: 100%; height: 100%; }
.sx-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transform: translateZ(-20px); overflow: hidden; }
.sx-items { position: absolute; inset: 0; transform-style: preserve-3d; }
.sx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sx-it { position: absolute; transform: translate(-50%, -50%) translateZ(calc(var(--z, 0) * 90px)) rotate(var(--r, 0deg)); font-size: calc(var(--s, 64) * 100cqw / 800); line-height: 1; white-space: nowrap; }
.sx-draw { left: 0; top: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--z, 0) * 90px)); pointer-events: none; overflow: visible; }
.sx-draw path { pointer-events: visibleStroke; }
.sx-in { display: inline-block; animation-duration: calc(var(--d, 4s) / var(--sp, 1)); animation-delay: var(--dl, 0s); animation-iteration-count: infinite; animation-timing-function: ease-in-out; animation-fill-mode: both; }
.sx-draw .sx-in { display: inline; transform-box: view-box; font-size: 40px; }
.sx-emoji .sx-in { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif; filter: drop-shadow(0 0.04em 0.08em rgb(0 0 0 / 18%)); }
.sx-shape .sx-in { filter: drop-shadow(0 0.03em 0.06em rgb(0 0 0 / 18%)); }
.sx-shape svg { width: 1em; height: 1em; overflow: visible; }
.sx-text { text-shadow: 0 0.04em 0.14em rgb(0 0 0 / 24%); letter-spacing: -0.01em; }
.sx-ch { display: inline-block; }

.sx-a-none { animation: none; }
.sx-a-float { --d: 4s; animation-name: sx-float; animation-direction: alternate; }
.sx-a-bounce { --d: 1.3s; animation-name: sx-bounce; animation-fill-mode: none; }
.sx-a-spin { --d: 6s; animation-name: sx-spin; animation-timing-function: linear; animation-fill-mode: none; }
.sx-a-pulse { --d: 1.6s; animation-name: sx-pulse; animation-direction: alternate; }
.sx-a-heartbeat { --d: 1.5s; animation-name: jx-beat; animation-fill-mode: none; }
.sx-a-swing { --d: 2.4s; animation-name: sx-swing; animation-direction: alternate; }
.sx-a-jelly { --d: 1.6s; animation-name: sx-jelly; animation-fill-mode: none; }
.sx-a-drift { --d: 5s; animation-name: sx-drift; animation-direction: alternate; }
.sx-a-rise { --d: 4.5s; animation-name: sx-rise; animation-timing-function: ease-in; animation-fill-mode: none; }
.sx-a-blink { --d: 2.2s; animation-name: sx-blink; animation-fill-mode: none; }
.sx-a-flip { --d: 3.4s; animation-name: sx-flip; animation-fill-mode: none; }
.sx-a-orbit { --d: 5s; animation-name: sx-orbit; animation-timing-function: linear; animation-fill-mode: none; }
.sx-a-pop { --d: 0.9s; animation-name: sx-pop; animation-iteration-count: 1; animation-timing-function: cubic-bezier(0.2, 1.5, 0.4, 1); }
.sx-a-glow { --d: 2s; animation-name: sx-glow; animation-direction: alternate; }
.sx-a-wave, .sx-a-type, .sx-a-draw { animation: none; }
.sx-a-wave .sx-ch { animation: sx-wave calc(1.6s / var(--sp, 1)) ease-in-out calc(var(--dl, 0s) + var(--i) * 0.08s) infinite; }
.sx-a-type .sx-ch { animation: sx-type 0.05s steps(1) calc(var(--dl, 0s) + var(--i) * 0.11s / var(--sp, 1)) 1 backwards; }
.sx-a-draw path { animation: sx-draw calc(2.4s / var(--sp, 1)) ease-in-out var(--dl, 0s) 1 backwards; }

@keyframes sx-float { from { transform: translateY(0.1em) rotate(-2deg); } to { transform: translateY(-0.14em) rotate(2deg); } }
@keyframes sx-bounce { 0%, 100% { transform: translateY(0) scale(1, 1); animation-timing-function: cubic-bezier(0.3, 0.6, 0.5, 1); } 45% { transform: translateY(-0.35em) scale(0.96, 1.04); animation-timing-function: cubic-bezier(0.5, 0, 0.7, 0.4); } 88% { transform: translateY(0) scale(1.08, 0.92); } }
@keyframes sx-spin { to { transform: rotate(360deg); } }
@keyframes sx-pulse { from { transform: scale(0.94); } to { transform: scale(1.12); } }
@keyframes sx-swing { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
@keyframes sx-jelly { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(1.14, 0.86); } 50% { transform: scale(0.9, 1.1); } 75% { transform: scale(1.05, 0.95); } }
@keyframes sx-drift { from { transform: translateX(-0.35em) rotate(-3deg); } to { transform: translateX(0.35em) rotate(3deg); } }
@keyframes sx-rise { 0% { transform: translateY(0.4em); opacity: 0; } 15%, 80% { opacity: 1; } 100% { transform: translateY(-2.6em); opacity: 0; } }
@keyframes sx-blink { 0%, 100% { opacity: 0.35; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes sx-flip { 0%, 15% { transform: perspective(5em) rotateY(0); } 85%, 100% { transform: perspective(5em) rotateY(360deg); } }
@keyframes sx-orbit { from { transform: rotate(0) translateX(0.5em) rotate(0); } to { transform: rotate(360deg) translateX(0.5em) rotate(-360deg); } }
@keyframes sx-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sx-glow { from { filter: drop-shadow(0 0 0.04em currentColor); } to { filter: drop-shadow(0 0 0.3em currentColor) drop-shadow(0 0 0.08em #fff); } }
@keyframes sx-wave { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-0.25em); } }
@keyframes sx-type { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }

.env-letter .sx, .og-studio .sx { position: absolute; inset: 0; }
.og-studio .sx { width: 1200px; height: 630px; }
.card-studio .card-art { position: relative; }

/* ---------- Card Studio: the editor (/studio/, static/studio.js) ---------- */
.nav-studio { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 800; color: var(--primary-2); }
.nav-studio .ico { width: 1rem; height: 1rem; }
.studio { padding-block: clamp(1.2rem, 3vw, 2.4rem) 3.5rem; }
.studio-head { margin-bottom: 1.4rem; text-align: center; }
.studio-head h1 { margin: 0 0 0.4rem; font: 800 clamp(2.1rem, 5vw, 3.3rem)/1.05 var(--font-head); letter-spacing: -0.02em; }
.studio-head .lead { max-width: 42rem; margin-inline: auto; }
.studio > .notice { max-width: 760px; margin: 0 auto 1rem; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: clamp(1rem, 2.4vw, 1.8rem); align-items: start; }
.studio-main { position: sticky; top: 84px; }
.studio-grid > * { min-width: 0; }
@media (max-width: 1000px) { .studio-grid { grid-template-columns: 1fr; } .studio-main { position: static; } }
.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem; }
.st-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.st-seg button, .st-tool { min-height: 40px; padding: 0.5rem 0.95rem; border: 0; border-radius: 999px; background: transparent; color: var(--fg); font: 700 0.9rem/1 var(--font-body); cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.2s var(--ease); }
.st-seg button[aria-pressed='true'] { background: var(--primary); color: #fff; }
.st-tool { background: var(--card); box-shadow: var(--shadow); }
.st-tool:hover:not(:disabled) { color: var(--primary-2); transform: translateY(-1px); }
.st-tool[aria-pressed='true'] { background: var(--fg); color: #fff; }
.st-tool:disabled { opacity: 0.45; cursor: default; }
.st-clear { margin-inline-start: auto; color: var(--primary-2); }
.studio-stage { touch-action: none; overscroll-behavior: contain; }
.studio-stage .sx-it { cursor: grab; }
.studio-stage .sx-it:active { cursor: grabbing; }
.studio-stage.is-drawing, .studio-stage.is-drawing .sx-it { cursor: crosshair; }
.studio-stage.is-drawing .sx-it, .studio-stage.is-drawing .sx-draw path, .studio-stage.is-3d .sx-it, .studio-stage.is-3d .sx-draw path { pointer-events: none; }
.studio-stage.is-3d { cursor: move; }
.studio-stage.is-3d .sx-tilt { transition: transform 0.12s linear; }
.studio-stage .sx-it.is-sel { outline: 2px dashed rgb(255 255 255 / 92%); outline-offset: 6px; }
.studio-stage .sx-draw.is-sel { outline: none; }
.studio-stage .sx-draw.is-sel path { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px rgb(0 0 0 / 55%)); }
.sx-live-stroke { position: absolute; inset: 0; z-index: 999; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.st-hint { min-height: 2.8em; margin: 0.7rem 0 0; transition: color 0.3s; }
.st-hint.is-loud { color: var(--primary-2); font-weight: 700; }

.studio-panel { display: grid; gap: 0.9rem; }
.st-props, .st-pane, .st-price { padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.st-props { box-shadow: inset 0 0 0 2px #fecdd3, var(--shadow); }
.st-props-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.7rem; }
.st-props-head h2 { margin: 0; font: 800 1.05rem/1.2 var(--font-head); }
.st-acts { display: flex; gap: 0.3rem; }
.st-icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--fg); font-weight: 800; cursor: pointer; transition: color 0.2s, box-shadow 0.2s, background 0.2s; }
.st-icon-btn:hover { color: var(--primary-2); box-shadow: inset 0 0 0 1.5px #fda4af; }
.st-icon-btn .ico { width: 16px; height: 16px; }
.st-up { transform: rotate(-90deg); }
.st-down { transform: rotate(90deg); }
.st-del:hover { background: var(--primary); color: #fff; box-shadow: none; }
.st-field { display: grid; gap: 0.3rem; margin-bottom: 0.75rem; }
.st-field > span, .st-range > span { color: var(--muted); font: 700 0.82rem/1.2 var(--font-body); }
.st-field input[type='text'], .st-field select, .st-any input { width: 100%; min-height: 42px; padding: 0.5rem 0.75rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--fg); font: inherit; }
.st-field input[type='text']:focus-visible, .st-field select:focus-visible, .st-any input:focus-visible { border-color: var(--primary); outline: 3px solid rgb(225 29 72 / 18%); outline-offset: 1px; }
.st-range { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr) 3.4rem; align-items: center; gap: 0.6rem; margin-bottom: 0.55rem; }
.st-range output { color: var(--fg); font: 700 0.82rem/1 var(--font-body); font-variant-numeric: tabular-nums; text-align: right; }
.st-range input[type='range'] { width: 100%; accent-color: var(--primary); }
.st-tick { display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 0.6rem; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.st-tick input { width: 18px; height: 18px; accent-color: var(--primary); }
.st-inline { display: flex; align-items: center; gap: 0.8rem; }
.st-inline .st-tick { margin: 0; }
.st-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.st-swatches input[type='color'], .st-inline input[type='color'], .st-colour input { width: 42px; height: 32px; padding: 2px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.st-sw { width: 24px; height: 24px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: transform 0.15s var(--ease); }
.st-sw:hover { transform: scale(1.18); }
.st-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.st-tabs button { padding: 0.6rem 0.2rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 700 0.86rem/1.1 var(--font-body); cursor: pointer; transition: background 0.2s, color 0.2s; }
.st-tabs button[aria-selected='true'] { background: var(--bg-2); color: var(--primary-2); }
.st-count { color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.st-pane h3 { margin: 1.1rem 0 0.55rem; font: 800 0.95rem/1.2 var(--font-head); }
.st-pane h3:first-child { margin-top: 0; }
.st-pane h3 small { color: var(--muted); font-weight: 600; }
.st-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.st-row .btn { justify-content: center; }
.st-row [data-tool][aria-pressed='true'] { background: var(--fg); color: #fff; box-shadow: none; }
.st-brush { margin-top: 0.8rem; padding: 0.8rem; border-radius: 12px; background: var(--bg-2); }
.st-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-bottom: 0.6rem; }
.st-chips .chip, .st-fx .chip { justify-content: center; min-height: 38px; padding-inline: 0.5rem; font-size: 0.86rem; cursor: pointer; border: 0; font-family: var(--font-body); }
.st-chips .chip[aria-pressed='true'], .st-fx .chip[aria-pressed='true'] { background: var(--primary); color: #fff; box-shadow: none; }
.st-emoji { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.st-emoji button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; background: transparent; font: 1.45rem/1 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; cursor: pointer; transition: transform 0.15s var(--ease), background 0.15s; }
.st-emoji button:hover, .st-emoji button:focus-visible { background: var(--bg-2); transform: scale(1.18); }
.st-any { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem; margin-top: 0.6rem; }
.st-shapes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.3rem; margin-top: 0.6rem; }
.st-shapes button { aspect-ratio: 1; padding: 6px; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--primary); cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.st-shapes button:hover { transform: scale(1.1); box-shadow: inset 0 0 0 1.5px #fda4af; }
.st-shapes svg { width: 100%; height: 100%; }
.st-grads { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; }
.st-grads button, .st-scenes button { padding: 0; border: 2px solid #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.st-grads button { aspect-ratio: 1; }
.st-grads button:hover, .st-scenes button:hover { transform: translateY(-2px); }
.st-grads button[aria-pressed='true'], .st-scenes button[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--primary); }
.st-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin-top: 0.8rem; }
.st-custom .st-range { grid-template-columns: auto minmax(0, 1fr); flex: 1 1 100%; margin: 0; }
.st-custom .st-tick { margin: 0; }
.st-colour { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 700; }
.st-scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.st-scenes button { aspect-ratio: 16 / 10; overflow: hidden; }
.st-scenes .art { width: 100%; height: 100%; }
.st-fx { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.st-layers { display: grid; gap: 0.3rem; max-height: 360px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.st-layers button { display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.5rem 0.65rem; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.st-layers button[aria-pressed='true'] { background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--primary); }
.lay-kind { min-width: 5rem; color: var(--muted); font: 700 0.7rem/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; }
.lay-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.lay-anim { padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--bg-2); color: var(--primary-2); font-size: 0.72rem; font-weight: 700; }
.st-price { position: sticky; bottom: 0.8rem; box-shadow: inset 0 0 0 2px #fde68a, var(--shadow-lg); }
.st-total { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 0.4rem; font-weight: 700; }
.st-total strong { color: var(--primary-2); font: 800 1.9rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.st-break summary { color: var(--muted); font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.st-break ul { display: grid; gap: 0.25rem; margin: 0.5rem 0 0; padding: 0; font-size: 0.88rem; list-style: none; }
.st-break li { display: flex; justify-content: space-between; gap: 1rem; }
.st-price .btn { justify-content: center; width: 100%; margin-top: 0.7rem; }
.studio-order { max-width: 700px; margin: 2.6rem auto 0; scroll-margin-top: 96px; }

/* The home page's studio band */
.studio-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; padding: clamp(1.4rem, 4vw, 2.6rem); border-radius: 28px; background: linear-gradient(135deg, #fff, var(--bg-2)); box-shadow: var(--shadow); }
.studio-band h2 { margin: 0.2rem 0 0.7rem; font: 800 clamp(1.6rem, 3.4vw, 2.4rem)/1.1 var(--font-head); }
.studio-band-card { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px; box-shadow: var(--shadow-lg); }
@media (max-width: 860px) { .studio-band { grid-template-columns: 1fr; } }
.st-scenes .art * { animation-play-state: paused !important; }
/* Phones and tablets: the card stays in sight at the top while the panels scroll under it (the paper and the long hint
   give way; the hint still speaks up when something needs saying), and the tool bar scrolls sideways in one row. */
@media (max-width: 1000px) {
    .studio-main { position: sticky; top: 56px; z-index: 5; padding: 0.4rem 0 0.5rem; background: var(--bg); }
    .card-studio .card-paper { display: none; }
    .studio-main .st-hint { min-height: 0; margin-top: 0.35rem; font-size: 0.82rem; }
    .studio-main .st-hint:not(.is-loud) { display: none; }
    .st-bar { flex-wrap: nowrap; margin-bottom: 0.45rem; overflow-x: auto; scrollbar-width: none; }
    .st-bar::-webkit-scrollbar { display: none; }
    .st-seg button, .st-tool { min-height: 36px; padding: 0.4rem 0.75rem; font-size: 0.84rem; white-space: nowrap; }
    .st-clear { margin-inline-start: 0; }
    .st-price { padding: 0.7rem 0.9rem; }
    .st-total strong { font-size: 1.5rem; }
    .st-price .btn { min-height: 46px; margin-top: 0.4rem; }
}
/* The studio hides what does not apply (fields of another kind of layer, closed panes): over any display rule. */
.studio [hidden] { display: none !important; }
