/* BeezInvite — site, dashboard & editor UI */
:root {
  --ink: #1d1230;
  --ink-2: #4a3d5c;
  --muted: #7b6f8c;
  --line: #ece6f3;
  --bg: #fcfaff;
  --card: #ffffff;
  --brand: #e8467c;
  --brand-2: #8b5cf6;
  --gold: #f5b041;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --grad: linear-gradient(120deg, #e8467c 0%, #b44cf0 50%, #6d5df6 100%);
  --grad-soft: linear-gradient(135deg, #fff1f6 0%, #f4efff 55%, #eef6ff 100%);
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(54, 22, 92, .18);
  --shadow-lg: 0 30px 60px -20px rgba(54, 22, 92, .35);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 3px solid rgba(139, 92, 246, .45); outline-offset: 2px; border-radius: 8px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.display { font-family: var(--display); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: .95rem; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s; white-space: nowrap; line-height: 1.2; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); background-size: 150% 100%; color: #fff; box-shadow: 0 10px 24px -10px rgba(232, 70, 124, .7); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 16px 30px -10px rgba(139, 92, 246, .6); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #d7cbe6; box-shadow: var(--shadow); }
.btn-gold { background: linear-gradient(120deg, #f7c86a, #e09a2b); color: #3b2300; box-shadow: 0 10px 24px -10px rgba(224, 154, 43, .8); }
.btn-danger { background: #fff; border-color: #fbd0d0; color: var(--bad); }
.btn-sm { padding: .5em 1em; font-size: .85rem; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: .2s; }
.icon-btn:hover { background: #f6f1fc; }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: .3em; padding: .25em .7em; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.badge-premium { background: linear-gradient(120deg, #fff1c9, #ffd98a); color: #7a4b00; }
.badge-free { background: #e8f8ee; color: #167a3a; }
.badge-trend { background: #ffe6ee; color: #c2185b; }
.badge-live { background: #dcfce7; color: #166534; }
.badge-draft { background: #f1f0f5; color: #5b5470; }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-locked { background: #fff7e0; color: #8a5a00; }
.chip { display: inline-flex; align-items: center; gap: .4em; padding: .55em 1em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .2s; white-space: nowrap; }
.chip:hover { border-color: #d3c4ea; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); background: rgba(252, 250, 255, .78); border-bottom: 1px solid rgba(236, 230, 243, .7); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px -8px rgba(232, 70, 124, .8); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn) { padding: .5em .9em; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.nav-links a:not(.btn):hover, .nav-links a.on { background: #f3edfb; color: var(--ink); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; padding: 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .3s; }
  .nav-links.open { transform: none; }
  .nav-links a { text-align: center; }
}

/* Flash toasts */
.toasts { position: fixed; top: 80px; right: 16px; left: 16px; z-index: 100; display: grid; justify-items: end; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 420px; padding: 14px 18px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); border-left: 4px solid var(--ok); font-weight: 600; animation: toastIn .4s cubic-bezier(.2, .9, .3, 1.3); }
.toast.error { border-color: var(--bad); }
.toast.info { border-color: var(--brand-2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* Hero */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 8vw, 110px); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto; height: 120%; background:
  radial-gradient(40% 50% at 15% 20%, rgba(232, 70, 124, .18), transparent 70%),
  radial-gradient(35% 45% at 85% 15%, rgba(139, 92, 246, .2), transparent 70%),
  radial-gradient(40% 40% at 60% 90%, rgba(245, 176, 65, .16), transparent 70%); z-index: -1; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(2%, 3%, 0) scale(1.05); } }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.hero h1 { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 600; letter-spacing: -.035em; }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 700; margin-bottom: 18px; box-shadow: var(--shadow); }
.eyebrow b { background: var(--grad); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: .75rem; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; }
.stats div b { display: block; font-size: 1.6rem; font-family: var(--display); }
.stats div span { font-size: .85rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero p.lead { margin-inline: auto; } .hero-cta, .stats { justify-content: center; } }

/* Phone mockup with live demo */
.phone-wrap { position: relative; display: grid; place-items: center; }
.phone { position: relative; width: min(320px, 78vw); aspect-ratio: 9 / 19; border-radius: 46px; padding: 12px; background: linear-gradient(145deg, #2b2140, #0f0a18); box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .08); animation: float 6s ease-in-out infinite; }
.phone::before { content: ''; position: absolute; top: 20px; left: 50%; width: 90px; height: 24px; border-radius: 20px; background: #0b0710; transform: translateX(-50%); z-index: 2; }
.phone iframe, .phone .screen { width: 100%; height: 100%; border: 0; border-radius: 36px; background: #fff; display: block; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-1deg); } }
.float-card { position: absolute; z-index: 3; background: #fff; padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .82rem; font-weight: 700; display: flex; align-items: center; gap: 8px; animation: float 5s ease-in-out infinite; }
.float-card small { display: block; font-weight: 500; color: var(--muted); }
.float-card .dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; }
.fc-1 { top: 12%; left: -4%; animation-delay: -1s; }
.fc-2 { bottom: 18%; right: -6%; animation-delay: -2.5s; }
.fc-3 { bottom: 4%; left: 2%; animation-delay: -4s; }
@media (max-width: 520px) { .fc-1 { left: 0; } .fc-2 { right: 0; } .fc-3 { display: none; } }

/* Marquee of occasions */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: #fff; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { font-weight: 700; color: var(--ink-2); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
section.block { padding: clamp(56px, 8vw, 100px) 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(30px, 5vw, 50px); }
.section-head h2 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 600; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat { padding: 20px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-align: center; transition: .25s; }
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #e2d6f1; }
.cat .ico { font-size: 2rem; display: block; margin-bottom: 6px; transition: transform .3s; }
.cat:hover .ico { transform: scale(1.2) rotate(-8deg); }
.cat b { display: block; }
.cat small { color: var(--muted); }

/* Template cards */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: clamp(16px, 2.4vw, 26px); }
.t-card { background: #fff; border-radius: 22px; border: 1px solid var(--line); overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; display: flex; flex-direction: column; }
.t-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.t-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.t-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 6px; z-index: 3; }
.t-overlay { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 16px; background: linear-gradient(to top, rgba(20, 10, 35, .75), transparent 60%); opacity: 0; transition: opacity .3s; }
.t-card:hover .t-overlay, .t-card:focus-within .t-overlay { opacity: 1; }
@media (hover: none) { .t-overlay { opacity: 1; background: linear-gradient(to top, rgba(20, 10, 35, .55), transparent 45%); } }
.t-body { padding: 14px 16px 18px; }
.t-body h3 { font-size: 1.05rem; margin: 0 0 2px; display: flex; justify-content: space-between; gap: 8px; }
.t-body p { font-size: .85rem; color: var(--muted); margin: 0; }

/* Template thumbnail (mini poster rendered from the template palette) */
.thumb { position: absolute; inset: 0; background: var(--bg); color: var(--t); font-family: var(--bf); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16% 12%; overflow: hidden; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.t-card:hover .thumb { transform: scale(1.04); }
.thumb .orn { position: absolute; color: var(--p); pointer-events: none; }
.thumb .orn svg, .thumb .th-house svg { width: 100%; height: 100%; display: block; overflow: visible; }
.thumb .th-head { font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
.thumb .th-names { font-family: var(--hf); color: var(--p); font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.05; overflow-wrap: anywhere; position: relative; z-index: 2; }
.thumb .th-amp { display: block; font-size: .6em; color: var(--a); }
.thumb .th-date { margin-top: 10px; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; position: relative; z-index: 2; }
.thumb .th-frame { position: absolute; inset: 7%; border: 1px solid color-mix(in srgb, var(--p) 50%, transparent); border-radius: 6px; }
.thumb.dark .th-frame { border-color: color-mix(in srgb, var(--p) 70%, transparent); }
.thumb--royal { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--bg) 70%, #fff 8%), var(--bg) 70%); }
.thumb--royal .th-names { background: linear-gradient(90deg, var(--p), var(--a), var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.thumb--aurora { background: radial-gradient(60% 50% at 20% 20%, color-mix(in srgb, var(--p) 55%, transparent), transparent 70%), radial-gradient(60% 50% at 85% 80%, color-mix(in srgb, var(--a) 50%, transparent), transparent 70%), var(--bg); }
.thumb--aurora .th-card { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); border-radius: 18px; padding: 18px 14px; backdrop-filter: blur(6px); }
.thumb--aurora .th-names { color: #fff; text-shadow: 0 0 18px var(--p); }
.thumb--modern { align-items: flex-start; text-align: left; justify-content: flex-end; }
.thumb--modern .th-names { color: var(--t); font-size: clamp(2rem, 4vw, 2.8rem); }
.thumb--modern .th-photo { position: absolute; top: 0; left: 0; right: 0; height: 52%; background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 40%, #000)); }
.thumb--party .th-names { font-size: clamp(2rem, 4vw, 2.6rem); }
.thumb--party .th-big { font-family: var(--hf); font-size: 4rem; line-height: 1; color: var(--a); -webkit-text-stroke: 2px var(--p); }
.thumb--home .th-house { width: 46%; color: var(--p); margin-bottom: 10px; }
.thumb--festive { background: radial-gradient(ellipse at 50% 110%, color-mix(in srgb, var(--p) 30%, transparent), transparent 60%), var(--bg); }
.thumb--festive .th-names { text-shadow: 0 0 18px color-mix(in srgb, var(--a) 60%, transparent); }
.thumb--romance .th-polaroid { width: 52%; aspect-ratio: .85; background: #fff; padding: 6px 6px 22px; box-shadow: 0 8px 20px rgba(0, 0, 0, .15); transform: rotate(-5deg); margin-bottom: 12px; }
.thumb--romance .th-polaroid div { width: 100%; height: 100%; background: linear-gradient(135deg, var(--a), var(--p)); }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 28px; }
.filters .scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.filters .scroll::-webkit-scrollbar { display: none; }
.search { position: relative; flex: 0 1 280px; min-width: 200px; }
.search input { width: 100%; padding: .7em 1em .7em 2.6em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
@media (max-width: 640px) { .search { flex: 1 1 100%; } }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: .3s; position: relative; overflow: hidden; }
.feature::after { content: ''; position: absolute; inset: auto -40% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: var(--grad); opacity: 0; filter: blur(40px); transition: .4s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature:hover::after { opacity: .25; }
.feature .fi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--grad-soft); margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 20px; counter-reset: step; }
.step { padding: 28px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 24px; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(232, 70, 124, .8); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 22px; max-width: 900px; margin: 0 auto; }
.plan { padding: 32px 28px; border-radius: 24px; background: #fff; border: 1px solid var(--line); position: relative; }
.plan.pop { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); }
.plan .price { font-family: var(--display); font-size: 2.6rem; font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: '✓'; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #ecfdf3; color: var(--ok); display: grid; place-items: center; font-size: .75rem; font-weight: 900; margin-top: 2px; }
.plan li.no::before { content: '–'; background: #f4f4f5; color: #a1a1aa; }

/* Notice box */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: #fff8e8; border: 1px solid #fde4a8; color: #6b4a00; }
.notice.info { background: #f3efff; border-color: #ddd2fb; color: #3f2a7a; }
.notice .ni { font-size: 1.3rem; line-height: 1; }
.notice p { margin: 0; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; transition: .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; transition: transform .25s; color: var(--brand); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); }

/* CTA band */
.cta-band { border-radius: 30px; padding: clamp(36px, 6vw, 64px); background: var(--grad); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.cta-band::before { top: -120px; left: -80px; }
.cta-band::after { bottom: -140px; right: -60px; }
.cta-band h2 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); position: relative; }
.cta-band .btn { position: relative; }

/* Footer */
.footer { padding: 50px 0 30px; border-top: 1px solid var(--line); margin-top: 40px; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--brand); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .lbl { font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .field select, .field textarea { width: 100%; padding: .75em 1em; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: #b9a2ea; box-shadow: 0 0 0 4px rgba(139, 92, 246, .12); }
.field textarea { resize: vertical; min-height: 90px; }
.field .err, .err { color: var(--bad); font-size: .82rem; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }

/* Auth */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; background: var(--grad-soft); }
.auth-card { width: min(440px, 100%); background: #fff; border-radius: 26px; padding: clamp(26px, 5vw, 40px); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-family: var(--display); font-size: 2rem; }

/* Dashboard */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 34px 0 22px; }
.page-head h1 { font-family: var(--display); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.inv-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; transition: .3s; }
.inv-card:hover { box-shadow: var(--shadow); }
.inv-top { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.inv-top img { width: 100%; height: 100%; object-fit: cover; }
.inv-top .thumb { padding: 8% 10%; }
.inv-top .t-badges { top: 10px; }
.inv-body { padding: 16px 18px 18px; display: grid; gap: 12px; flex: 1; }
.inv-body h3 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.meter { height: 8px; border-radius: 99px; background: #f1edf7; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.inv-stats { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.inv-stats b { color: var(--ink); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.empty { text-align: center; padding: 70px 20px; border-radius: 26px; border: 2px dashed #e4dbef; background: #fff; }
.empty .big { font-size: 3.5rem; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.tbl th, .tbl td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #fbf9fe; }
.tbl tr:last-child td { border-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.kpi b { font-size: 1.8rem; display: block; font-family: var(--display); }
.kpi span { color: var(--muted); font-size: .85rem; }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(20, 10, 35, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: min(520px, 100%); background: #fff; border-radius: 26px; padding: clamp(22px, 5vw, 34px); box-shadow: var(--shadow-lg); animation: pop .45s cubic-bezier(.2, .9, .3, 1.25); position: relative; }
.modal .x { position: absolute; top: 14px; right: 14px; }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(20px); } }
.link-box { display: flex; gap: 8px; padding: 6px; border-radius: 14px; border: 1.5px solid var(--line); background: #faf8fd; }
.link-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 10px; font-weight: 600; color: var(--ink-2); }
.link-box input:focus { outline: none; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 16px; border: 1px solid var(--line); width: fit-content; margin: 0 auto; }
.confetti-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.confetti-burst i { position: absolute; top: 40%; left: 50%; width: 8px; height: 14px; border-radius: 2px; animation: burst 1.2s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* ---------- Editor ---------- */
.ed { display: grid; grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); height: calc(100vh - 64px); height: calc(100dvh - 64px); }
.ed-top { position: sticky; top: 0; z-index: 60; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.ed-top .title-in { flex: 1 1 auto; min-width: 0; border: 0; font-weight: 800; font-size: 1.05rem; padding: 8px 10px; border-radius: 10px; background: transparent; text-overflow: ellipsis; }
.ed-top .title-in:hover, .ed-top .title-in:focus { background: #f6f2fb; outline: none; }
.save-state { font-size: .8rem; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.save-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.save-state.saving i { background: var(--warn); animation: blink 1s infinite; }
.save-state.error i { background: var(--bad); }
@keyframes blink { 50% { opacity: .2; } }
.ed-actions { display: flex; gap: 8px; align-items: center; }
.ed-panel { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.ed-tabs { flex: none; position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d6c8ee transparent; }
.ed-tabs::-webkit-scrollbar { height: 6px; }
.ed-tabs::-webkit-scrollbar-thumb { background: #d6c8ee; border-radius: 6px; }
.ed-tabs::-webkit-scrollbar-thumb:hover { background: #b9a3e0; }
.ed-tabs button { flex: none; border: 0; background: transparent; padding: .55em .9em; border-radius: 10px; font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.ed-tabs button.on { background: #f3edfb; color: var(--ink); }
.ed-body { padding: 18px 18px 120px; }
.ed-sec { margin-bottom: 24px; }
.ed-sec h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.repeat { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; background: #fcfbfe; position: relative; }
.repeat .rm { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; }
.ed-preview { position: relative; background: radial-gradient(circle at 30% 20%, #f6eefe, transparent 60%), radial-gradient(circle at 80% 80%, #fff0f5, transparent 60%), #f7f5fa; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; min-height: 0; overflow: hidden; }
.device-bar { display: flex; gap: 6px; margin-bottom: 14px; background: #fff; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.device-bar button { border: 0; background: transparent; padding: .45em 1em; border-radius: 999px; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--muted); }
.device-bar button.on { background: var(--ink); color: #fff; }
.device { position: relative; transition: width .4s, height .4s, border-radius .4s; background: #111; box-shadow: var(--shadow-lg); overflow: hidden; flex: none; }
.device.mobile { width: 375px; height: min(760px, 100% - 60px); border-radius: 40px; padding: 10px; }
.device.desktop { width: min(100%, 1100px); height: calc(100% - 60px); border-radius: 14px; padding: 26px 6px 6px; }
.device.desktop::before { content: '● ● ●'; position: absolute; top: 4px; left: 14px; color: #555; font-size: 10px; letter-spacing: 2px; }
.device iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 30px; display: block; }
.device.desktop iframe { border-radius: 8px; }
.preview-loading { position: absolute; inset: 10px; border-radius: 30px; background: rgba(255, 255, 255, .6); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: .2s; }
.preview-loading.on { opacity: 1; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #eadff7; border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mob-preview-btn { display: none; }
@media (max-width: 960px) {
  .ed { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ed-panel { border-right: 0; overflow: visible; }
  .ed-tabs { top: 64px; }
  .ed-preview { position: fixed; inset: 64px 0 0; z-index: 70; transform: translateY(100%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); padding: 12px; }
  .ed-preview.open { transform: none; }
  .device.mobile { width: min(375px, 100%); height: calc(100% - 50px); }
  .device-bar { display: none; }
  .mob-preview-btn { display: inline-flex; position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; box-shadow: var(--shadow-lg); }
  .ed-top .hide-sm { display: none; }
}
@media (max-width: 520px) { .ed-top { gap: 6px; padding: 0 10px; } .ed-top .btn { padding: .55em .85em; font-size: .82rem; } .save-state span { display: none; } }

/* Uploads */
.drop { border: 2px dashed #dccdf0; border-radius: 18px; padding: 22px; text-align: center; background: #fbf8ff; cursor: pointer; transition: .2s; display: block; }
.drop:hover, .drop.over { border-color: var(--brand-2); background: #f4eeff; }
.drop input { display: none; }
.cover-prev { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; background: #f3eff8; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.cover-prev .icon-btn { position: absolute; top: 10px; right: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #f3eff8; cursor: grab; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .icon-btn { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; }
.ph.uploading::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .6); }
.ph .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px; border-radius: 9px; background: #fff; z-index: 2; overflow: hidden; }
.ph .bar i { display: block; height: 100%; background: var(--grad); }

/* Design controls */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.swatch { border: 2px solid var(--line); border-radius: 14px; padding: 6px; cursor: pointer; background: #fff; text-align: center; font-size: .72rem; font-weight: 700; transition: .2s; }
.swatch:hover, .swatch.on { border-color: var(--ink); }
.swatch .sw { display: flex; height: 28px; border-radius: 9px; overflow: hidden; margin-bottom: 4px; }
.swatch .sw i { flex: 1; }
.colors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.color { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; font-size: .85rem; font-weight: 700; }
.color input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 10px; cursor: pointer; flex: none; }
.color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color input[type=color]::-webkit-color-swatch { border-radius: 9px; border: 1px solid rgba(0, 0, 0, .1); }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.font-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 8px; background: #fff; cursor: pointer; text-align: center; transition: .2s; overflow: hidden; }
.font-opt span { display: block; font-size: 1.35rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-opt small { font-size: .68rem; color: var(--muted); }
.font-opt.on, .font-opt:hover { border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #ddd5e8; transition: .25s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: .25s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.tpl-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.tpl-mini form { display: block; margin: 0; }
.tpl-mini button { width: 100%; position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); padding: 0; cursor: pointer; background: none; }
.tpl-mini button.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 18, 48, .15); }
.tpl-mini .thumb { padding: 10%; }
.tpl-mini .thumb .th-names { font-size: 1.05rem; }
.tpl-mini .thumb .th-head, .tpl-mini .thumb .th-date { font-size: .45rem; }
.tpl-mini .lab { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: rgba(255, 255, 255, .92); font-size: .68rem; font-weight: 800; padding: 4px; }

/* Checkout */
.checkout { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; background: var(--grad-soft); }
.checkout-card { width: min(920px, 100%); display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); }
.checkout-card > div { padding: clamp(24px, 4vw, 40px); }
.checkout-side { background: #1d1230; color: #fff; position: relative; overflow: hidden; }
.checkout-side::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: var(--grad); filter: blur(80px); opacity: .45; top: -140px; right: -140px; }
.checkout-side > * { position: relative; }
.sum-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed rgba(255, 255, 255, .2); }
@media (max-width: 760px) { .checkout-card { grid-template-columns: 1fr; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Gallery extras: personalise bar, toolbar, favourites, colour dots */
.personalise { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 18px 20px; margin-bottom: 18px; border-radius: 22px; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 2px solid transparent; box-shadow: var(--shadow); }
.pz-title { display: grid; flex: 1 1 220px; }
.pz-title small { color: var(--muted); }
.pz-fields { display: flex; flex-wrap: wrap; gap: 8px; flex: 3 1 480px; }
.pz-fields input { flex: 1 1 150px; min-width: 0; padding: .65em 1em; border-radius: 12px; border: 1.5px solid var(--line); background: #fbf9fe; }
.pz-fields input:focus { outline: none; border-color: #b9a2ea; box-shadow: 0 0 0 4px rgba(139, 92, 246, .12); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.sort select { padding: .5em .8em; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; color: var(--ink); }
@media (max-width: 560px) { .sort { margin-left: 0; width: 100%; } .sort select { flex: 1; } }
.fav { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #c9bfd6; font-size: 1rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); transition: color .2s; }
.fav.on { color: #e8467c; }
.t-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.dots { display: flex; gap: 6px; }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; transition: transform .2s; }
.dot:hover { transform: scale(1.15); }
.dot.on { box-shadow: 0 0 0 2px var(--ink); }
.t-card.picked { animation: picked 1.2s ease; }
@keyframes picked { 0%, 100% { box-shadow: none; } 30%, 70% { box-shadow: 0 0 0 4px #e8467c, var(--shadow-lg); transform: translateY(-6px) scale(1.02); } }

/* Brand wordmark */
.logo-text { display: inline-flex; align-items: baseline; flex-wrap: wrap; column-gap: 1px; line-height: 1.1; }
.logo-by { flex-basis: 100%; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.logo-mark { background: linear-gradient(135deg, #f7b733, #e8467c 55%, #8b5cf6); }
@media (max-width: 380px) { .logo-by { display: none; } }

/* Feedback widget */
.fb-fab { position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: .88rem; cursor: pointer; box-shadow: var(--shadow-lg); transition: transform .2s; }
.fb-fab:hover { transform: translateY(-2px); }
.fb-fab span:first-child { font-size: 1.15rem; line-height: 1; }
@media (max-width: 960px) { .ed-body ~ .fb-fab, .fb-fab { bottom: 76px; } }
@media (max-width: 520px) { .fb-fab { padding: 10px; } .fb-fab-label { display: none; } }
.fb-faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fb-face { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: transform .15s, border-color .15s; }
.fb-face span { font-size: 1.6rem; line-height: 1; filter: grayscale(.6); transition: filter .15s; }
.fb-face small { font-size: .68rem; font-weight: 700; color: var(--muted); }
.fb-face:hover span, .fb-face.on span { filter: none; }
.fb-face.on { border-color: var(--brand); background: #fff3f7; transform: translateY(-2px); }

/* Thumbnails for the additional layouts */
.th-kasavu { position: absolute; left: 0; right: 0; height: 7%; background: linear-gradient(var(--p), var(--p)) 0 30% / 100% 40% no-repeat, repeating-linear-gradient(90deg, var(--a) 0 3px, transparent 3px 7px) 0 100% / 100% 25% no-repeat; }
.th-kasavu.top { top: 0; } .th-kasavu.bottom { bottom: 0; transform: scaleY(-1); }
.thumb--deco .th-names { text-transform: uppercase; letter-spacing: .1em; font-size: clamp(1.1rem, 2.4vw, 1.6rem); }
.thumb--peacock { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--a) 30%, transparent), transparent 60%), var(--bg); justify-content: flex-end; padding-bottom: 14%; }
.thumb--peacock .orn { color: color-mix(in srgb, var(--p) 80%, #0a4); }
.thumb--newspaper { align-items: flex-start; text-align: left; justify-content: flex-start; padding: 10% 9%; }
.th-mast { font-family: var(--hf); font-size: 1.15rem; width: 100%; text-align: center; border-bottom: 3px double var(--t); padding-bottom: 6px; margin-bottom: 14px; position: relative; z-index: 2; }
.thumb--newspaper .th-names { color: var(--t); text-transform: uppercase; font-size: clamp(1.3rem, 2.8vw, 1.8rem); }
.thumb--newspaper .th-amp { display: inline; margin: 0 .2em; }
.th-ticket { position: absolute; inset: 22% 8%; background: #fff; border-radius: 12px; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.th-ticket::after { content: ''; position: absolute; top: 0; bottom: 0; right: 28%; border-right: 2px dashed #ccc; }
.thumb--ticket { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 50%, var(--bg)), var(--bg)); }
.thumb--ticket .th-names, .thumb--ticket .th-head, .thumb--ticket .th-date { color: #1d1d2a; padding-right: 22%; }
.thumb--ticket .th-names { color: var(--p); font-size: 1.2rem; }
.th-airmail { position: absolute; inset: 6%; border: 6px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--p) 0 8px, #fff 8px 12px, var(--a) 12px 20px, #fff 20px 24px) 6; }
.th-stamp { position: absolute; top: 12%; right: 12%; width: 22%; aspect-ratio: .82; background: linear-gradient(135deg, var(--a), var(--p)); outline: 4px dotted #fff; outline-offset: -2px; }
.thumb--celestial { background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--a) 30%, var(--bg)), var(--bg) 70%); }
.thumb--celestial .th-names { text-shadow: 0 0 14px var(--p); }
.thumb--tropical { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 70%, var(--bg)), color-mix(in srgb, var(--p) 35%, var(--bg)) 60%, var(--bg)); }
.th-sun { position: absolute; top: 18%; left: 50%; width: 46%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle, #fff2b3, color-mix(in srgb, var(--a) 80%, #ffb347) 60%, transparent 71%); }
.thumb--tropical .orn { color: color-mix(in srgb, var(--t) 85%, #000); }
.th-retro { position: absolute; left: 50%; bottom: -60%; width: 160%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: repeating-radial-gradient(circle, var(--p) 0 8%, var(--a) 8% 16%, color-mix(in srgb, var(--p) 55%, var(--t)) 16% 24%, var(--bg) 24% 28%); }
.thumb--retro .th-names { background: var(--bg); border: 2px solid var(--t); border-radius: 14px; padding: 4px 10px; color: var(--p); text-shadow: 2px 2px 0 var(--a); }
.thumb--retro .orn { color: var(--t); }
.th-bulbs { position: absolute; inset: 10%; border-radius: 14px; box-shadow: 0 0 0 3px var(--p); background: radial-gradient(circle, #fff7cc 0 2px, var(--a) 3px, transparent 4px) 0 0 / 14px 14px repeat-x, radial-gradient(circle, #fff7cc 0 2px, var(--a) 3px, transparent 4px) 0 100% / 14px 14px repeat-x, radial-gradient(circle, #fff7cc 0 2px, var(--a) 3px, transparent 4px) 0 0 / 14px 14px repeat-y, radial-gradient(circle, #fff7cc 0 2px, var(--a) 3px, transparent 4px) 100% 0 / 14px 14px repeat-y; }
.thumb--marquee .th-names { color: #fff; text-shadow: 0 0 6px var(--a), 0 0 16px var(--p); }
.thumb--boho { justify-content: flex-end; padding-bottom: 16%; }
.thumb--boho .orn:last-of-type { color: color-mix(in srgb, var(--t) 70%, var(--bg)); }
.th-wash { position: absolute; inset: 0; background: radial-gradient(40% 35% at 25% 25%, color-mix(in srgb, var(--a) 60%, transparent), transparent 70%), radial-gradient(45% 40% at 80% 75%, color-mix(in srgb, var(--p) 45%, transparent), transparent 70%), radial-gradient(30% 30% at 75% 20%, color-mix(in srgb, var(--a) 40%, #9be3d0), transparent 70%); filter: blur(4px); }
.thumb--lotus { background: radial-gradient(ellipse at 50% 70%, color-mix(in srgb, var(--a) 25%, var(--bg)), var(--bg) 70%); justify-content: flex-start; padding-top: 16%; }
.th-chalk { position: absolute; inset: 0; border: 9px solid #8b5a2b; box-shadow: inset 0 0 30px rgba(0, 0, 0, .5); }
.thumb--chalk .th-names { color: var(--t); }
.thumb--story { background: linear-gradient(160deg, var(--p), var(--a)); color: #fff; align-items: flex-start; text-align: left; justify-content: flex-end; }
.th-story { position: absolute; top: 5%; left: 6%; right: 6%; display: flex; gap: 3px; }
.th-story i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.th-story i:first-child { background: #fff; }
.thumb--story .th-names { color: #fff; }

/* Thumbnails: music player, streaming premiere, chat, mandap, Bollywood, Y2K */
.thumb--spotify { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 70%, var(--bg)), var(--bg) 70%); justify-content: flex-start; padding-top: 12%; }
.th-sp-art { width: 62%; aspect-ratio: 1; border-radius: 6px; background: linear-gradient(135deg, var(--p), var(--a)); box-shadow: 0 10px 20px rgba(0, 0, 0, .4); margin-bottom: 10px; position: relative; z-index: 2; }
.thumb--spotify .th-head { display: none; }
.thumb--spotify .th-names { font-family: var(--bf); font-weight: 800; color: var(--t); font-size: 1rem; align-self: flex-start; text-align: left; }
.thumb--spotify .th-amp { display: inline; margin: 0 .2em; font-size: 1em; color: var(--t); }
.th-sp-bar { position: absolute; left: 12%; right: 12%; bottom: 20%; height: 3px; background: rgba(255, 255, 255, .25); border-radius: 3px; }
.th-sp-bar i { display: block; width: 60%; height: 100%; background: var(--t); }
.th-sp-ctrl { position: absolute; bottom: 7%; left: 0; right: 0; color: var(--t); font-size: .8rem; letter-spacing: .4em; }
.th-sp-ctrl b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--p); color: #000; letter-spacing: 0; }
.thumb--spotify .th-date { display: none; }
.thumb--netflix { justify-content: flex-end; align-items: flex-start; text-align: left; padding-bottom: 12%; }
.th-nf-bg { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 25%, transparent 70%), linear-gradient(135deg, color-mix(in srgb, var(--p) 60%, #000), #222); }
.th-nf-tag { position: relative; z-index: 2; font-size: .55rem; letter-spacing: .3em; color: #ddd; font-weight: 700; margin-bottom: 4px; }
.th-nf-tag b { font-family: var(--hf); color: var(--p); font-size: 1rem; letter-spacing: 0; }
.thumb--netflix .th-head { display: none; }
.thumb--netflix .th-names { color: #fff; text-transform: uppercase; font-size: 1.5rem; }
.thumb--netflix .th-amp { display: inline; margin: 0 .2em; }
.thumb--netflix .th-date { color: var(--p); font-weight: 800; }
.thumb--chat { background: color-mix(in srgb, var(--a) 22%, #efe7dd); justify-content: flex-end; padding-bottom: 10%; }
.th-ch-head { position: absolute; top: 0; left: 0; right: 0; height: 13%; background: var(--p); }
.th-ch { position: absolute; height: 9%; border-radius: 8px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.th-ch.b1 { top: 18%; left: 8%; width: 46%; } .th-ch.b2 { top: 30%; right: 8%; width: 56%; background: color-mix(in srgb, var(--a) 45%, #fff); } .th-ch.b3 { top: 42%; left: 8%; width: 36%; }
.thumb--chat .th-head { display: none; }
.thumb--chat .th-names { background: #fff; border-radius: 10px; padding: 6px 10px; color: var(--p); font-size: 1.1rem; }
.thumb--chat .th-date { color: #555; }
.thumb--mandap { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--a) 30%, var(--bg)), var(--bg) 65%); justify-content: flex-end; padding-bottom: 12%; }
.th-mandap { position: absolute; top: 8%; left: 14%; right: 14%; height: 48%; border-top: 14px solid var(--p); border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.th-mandap i { position: absolute; top: 0; bottom: 0; width: 6px; background: var(--p); }
.th-mandap i:first-child { left: 6%; } .th-mandap i:last-child { right: 6%; }
.thumb--mandap .th-names { color: color-mix(in srgb, var(--p) 85%, var(--t)); }
.thumb--bollywood { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 90%, #fff), var(--p) 60%, color-mix(in srgb, var(--p) 60%, #000)); border: 5px solid var(--t); }
.th-bw-rays { position: absolute; inset: -30%; background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 255, 255, .18) 0 8deg, transparent 8deg 20deg); }
.th-bw-sticker { position: absolute; top: 8%; right: 8%; width: 40px; height: 40px; border-radius: 50%; background: #ffe94d; color: var(--t); font-weight: 900; font-size: .62rem; display: grid; place-items: center; rotate: 12deg; }
.thumb--bollywood .th-names { font-style: italic; color: #fff8dc; -webkit-text-stroke: 1px var(--t); paint-order: stroke fill; text-shadow: 0 3px 0 var(--a); }
.thumb--bollywood .th-head, .thumb--bollywood .th-date { color: #fff8dc; }
.thumb--y2k { background: linear-gradient(125deg, color-mix(in srgb, var(--p) 55%, #fff), color-mix(in srgb, var(--a) 55%, #fff), #e0f2ff); padding-top: 22%; }
.th-yk-bar { position: absolute; top: 9%; left: 9%; right: 9%; display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px 6px 0 0; background: linear-gradient(90deg, var(--p), var(--a)); color: #fff; font: 700 .6rem/1 system-ui, sans-serif; }
.thumb--y2k .th-names { background: linear-gradient(180deg, #fff 0%, #c9c9da 40%, #6f6f86 50%, #fff 55%, #b9b9d1 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--p) 70%, #000)); }
.thumb--y2k .th-date, .thumb--y2k .th-head { color: var(--p); }
.tpl-skel { display: block; aspect-ratio: 4 / 5; border-radius: 14px; background: linear-gradient(100deg, #f3eff8 30%, #fbf9fd 50%, #f3eff8 70%) 0 0 / 300% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -150% 0; } }

/* Speed: the browser skips laying out / painting cards that are off-screen until you scroll near them. */
.tpl-mini form { content-visibility: auto; contain-intrinsic-size: auto 140px; }
