/* ==========================================================================
   Invite — Invitation Card Maker · styles
   Premium navy & gold, light/dark themes, responsive down to 360px.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --navy: #0b1a3a;
  --navy-2: #13254d;
  --gold: #c9a227;
  --gold-2: #e9cf7a;
  --gold-grad: linear-gradient(135deg, #f3dc8b 0%, #c9a227 45%, #a77f17 75%, #e9cf7a 100%);
  --rose: #e11d48;
  --green: #16a34a;
  --bg: #f7f5f0;
  --bg-2: #efebe2;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --surface-3: #f1efe9;
  --line: #e5e1d8;
  --line-2: #d6d1c4;
  --text: #17171c;
  --text-2: #4b4b57;
  --muted: #7a7a86;
  --accent: #0b1a3a;
  --accent-text: #ffffff;
  --link: #1d4ed8;
  --focus: 0 0 0 3px rgba(201, 162, 39, .45);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow: 0 8px 24px -8px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-lg: 0 30px 60px -20px rgba(11, 26, 58, .35), 0 10px 20px -10px rgba(11, 26, 58, .2);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Devanagari', sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #0b0d14;
  --bg-2: #10131d;
  --surface: #141824;
  --surface-2: #191e2c;
  --surface-3: #1f2535;
  --line: #262d40;
  --line-2: #323a52;
  --text: #eef0f6;
  --text-2: #b9bfd0;
  --muted: #8a91a6;
  --accent: #e9cf7a;
  --accent-text: #14110a;
  --link: #93c5fd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.01em; }
h1, h2 { font-family: var(--font-display); font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 18px; height: 18px; flex: none; }
.i-lg { width: 22px; height: 22px; }
.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kbd, kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); }
::selection { background: rgba(201, 162, 39, .35); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: transform .15s var(--ease), background .2s, box-shadow .2s, border-color .2s, color .2s; white-space: nowrap; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 18px -8px rgba(11, 26, 58, .7); }
.btn-primary:hover { background: var(--navy-2); }
[data-theme='dark'] .btn-primary { background: var(--gold-2); color: #14110a; }
[data-theme='dark'] .btn-primary:hover { background: #f3dc8b; }
.btn-gold { background: var(--gold-grad); color: #1b1505; box-shadow: 0 8px 22px -10px rgba(167, 127, 23, .9); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-2); transition: background .15s, color .15s; position: relative; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.active, .icon-btn[aria-pressed='true'] { background: var(--navy); color: #fff; }
[data-theme='dark'] .icon-btn.active, [data-theme='dark'] .icon-btn[aria-pressed='true'] { background: var(--gold-2); color: #14110a; }
.icon-btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn-sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn-sm .i { width: 16px; height: 16px; }

.input, .select, textarea.input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 76px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus); }
.input-sm, .select-sm { height: 32px; font-size: 13px; padding: 0 9px; border-radius: 8px; }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a86' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span, .label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.field-inline > span { font-size: 13px; color: var(--text-2); }
.input-group { display: flex; gap: 6px; align-items: center; }
.input-group .input { flex: 1; }
input[type='range'] { width: 100%; accent-color: var(--gold); height: 22px; }
input[type='checkbox'] { accent-color: var(--gold); width: 16px; height: 16px; }
.color-input { position: relative; width: 38px; height: 32px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; flex: none; background: conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0) 0 0/10px 10px; }
.color-input input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; }
.range-row { display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; margin-bottom: 10px; }
.range-row .input { height: 30px; padding: 0 6px; font-size: 12px; text-align: center; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(16px); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); }
.seg button { padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-block { display: flex; width: 100%; }
.seg-block button { flex: 1; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: .15s; }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme='dark'] .chip.active { background: var(--gold-2); border-color: var(--gold-2); color: #14110a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge .i { width: 12px; height: 12px; }
.badge-premium { background: var(--gold-grad); color: #2a1f05; }
.badge-free { background: #dcfce7; color: #166534; }
.badge-anim { background: rgba(11, 26, 58, .85); color: #fff; backdrop-filter: blur(6px); }
.badge-trend { background: #ffe4e6; color: #be123c; }
.badge-new { background: #dbeafe; color: #1e40af; }
.badge-soft { background: var(--surface-3); color: var(--text-2); }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); line-height: 1.45; }
.note .i { margin-top: 1px; color: var(--gold); }
.note-warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
[data-theme='dark'] .note-warn { background: #2a2210; border-color: #4d3d10; color: #fde68a; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 34px; width: auto; }
.brand .logo-dark { display: none; }
[data-theme='dark'] .brand .logo-light { display: none; }
[data-theme='dark'] .brand .logo-dark { display: block; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: .15s; }
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a.active { color: var(--text); background: var(--surface-3); font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lang-toggle { font-weight: 700; font-size: 12px; }
.menu-btn { display: none; }
.mobile-nav { position: fixed; inset: var(--topbar-h) 0 auto 0; z-index: 49; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; display: grid; gap: 2px; box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s var(--ease); }
.mobile-nav.open { transform: none; opacity: 1; pointer-events: auto; }
.mobile-nav a { padding: 12px 10px; border-radius: 10px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.mobile-nav a:hover, .mobile-nav a.active { background: var(--surface-3); }

/* ---------- page scaffolding ---------- */
#app { min-height: calc(100vh - var(--topbar-h)); }
.page { padding: 36px 0 70px; animation: pageIn .35s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.section-foot { text-align: center; margin-top: 36px; }
.empty { text-align: center; padding: 70px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); background: var(--surface); }
.empty .i { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--gold); }
.empty h3 { color: var(--text); font-family: var(--font-display); font-size: 22px; }
.empty .btn { margin-top: 12px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 70px 0 90px; background: radial-gradient(1200px 600px at 85% -10%, rgba(201, 162, 39, .18), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(225, 29, 72, .08), transparent 60%), var(--bg); }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 66px); line-height: 1.04; margin-bottom: 20px; letter-spacing: -.02em; }
.hero p.lead { font-size: 18px; color: var(--text-2); max-width: 540px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 28px; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.hero-cards { position: relative; height: 560px; }
.hero-card { position: absolute; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); transition: transform .5s var(--ease); cursor: pointer; }
.hero-card canvas { width: 100%; height: 100%; }
.hero-card:nth-child(1) { width: 52%; left: 24%; top: 4%; z-index: 3; }
.hero-card:nth-child(2) { width: 40%; left: 0; top: 18%; transform: rotate(-8deg); z-index: 2; }
.hero-card:nth-child(3) { width: 40%; right: 0; top: 22%; transform: rotate(8deg); z-index: 1; }
.hero-card:hover { transform: translateY(-6px) rotate(0) scale(1.02); z-index: 5; }
.hero-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 162, 39, .35), transparent 65%); top: 15%; left: 22%; filter: blur(20px); animation: float 8s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-18px); } }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cat-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; padding: 18px; border-radius: var(--r-lg); color: #fff; overflow: hidden; isolation: isolate; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; }
.cat-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, var(--c1), var(--c2)); }
.cat-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .28), transparent 45%); }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-tile .emoji { position: absolute; top: 14px; right: 16px; font-size: 40px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); transition: transform .3s var(--ease); }
.cat-tile:hover .emoji { transform: scale(1.12) rotate(-6deg); }
.cat-tile h3 { font-size: 19px; margin: 0; font-family: var(--font-display); }
.cat-tile small { opacity: .85; font-size: 12.5px; }
.cat-tile .hi { font-size: 13px; opacity: .8; }

/* ---------- template cards ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 18px; }
.tgrid-lg { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tcard { position: relative; display: flex; flex-direction: column; gap: 9px; }
.tcard-thumb { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s; cursor: pointer; aspect-ratio: var(--ar, 1 / 1.414); display: grid; place-items: center; }
.tcard-thumb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); pointer-events: none; }
.tcard:hover .tcard-thumb { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tcard-thumb img, .tcard-thumb canvas { width: 100%; height: 100%; object-fit: contain; }
.tcard-thumb .anim-canvas { position: absolute; inset: 0; }
.tcard-thumb.loading { background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%) 0 0/200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tcard-badges { position: absolute; top: 9px; left: 9px; display: flex; gap: 5px; flex-wrap: wrap; z-index: 2; pointer-events: none; }
.tcard-fav { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #374151; box-shadow: var(--shadow-sm); opacity: 0; transform: scale(.85); transition: .2s var(--ease); }
.tcard:hover .tcard-fav, .tcard-fav.on, .tcard-fav:focus-visible { opacity: 1; transform: none; }
.tcard-fav.on { color: #e11d48; }
.tcard-fav .i { width: 17px; height: 17px; }
.tcard-hover { position: absolute; inset: auto 10px 10px 10px; z-index: 3; display: flex; gap: 6px; opacity: 0; transform: translateY(6px); transition: .2s var(--ease); }
.tcard:hover .tcard-hover, .tcard:focus-within .tcard-hover { opacity: 1; transform: none; }
.tcard-hover .btn { flex: 1; height: 34px; font-size: 13px; }
.tcard-meta { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tcard-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tcard-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- gallery layout ---------- */
.gallery { display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: start; }
.filters { position: sticky; top: calc(var(--topbar-h) + 18px); display: grid; gap: 18px; max-height: calc(100vh - var(--topbar-h) - 36px); overflow: auto; padding-right: 6px; }
.filters h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.filter-list { display: grid; gap: 2px; }
.filter-list button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border-radius: 9px; font-size: 14px; color: var(--text-2); }
.filter-list button:hover { background: var(--surface-3); color: var(--text); }
.filter-list button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.filter-list .count { font-size: 12px; color: var(--muted); font-weight: 500; }
.gallery-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; height: 44px; border-radius: 999px; }
.result-info { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters-toggle { display: none; }
.load-more { display: flex; justify-content: center; margin-top: 30px; }

/* ---------- home sections ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 22px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: #2a1f05; font-weight: 800; font-size: 14px; }
.step .i { width: 28px; height: 28px; color: var(--gold); margin-bottom: 12px; }
.step h3 { font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: .2s; }
.feature:hover { border-color: var(--gold); transform: translateY(-2px); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(201, 162, 39, .18), rgba(201, 162, 39, .05)); color: var(--gold); margin-bottom: 14px; }
.feature h3 { font-size: 16px; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }
.showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.showcase .tcard-thumb { aspect-ratio: auto; }
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; }
.quote p { margin: 0; font-size: 15px; color: var(--text-2); }
.quote .who { display: flex; gap: 12px; align-items: center; }
.quote .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; }
.quote .stars { color: var(--gold); letter-spacing: 2px; }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding-bottom: 6px; }
.cta-band { border-radius: var(--r-xl); padding: 50px; background: radial-gradient(600px 300px at 90% 0%, rgba(201, 162, 39, .4), transparent 60%), var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.5vw, 38px); margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .8; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #c7cde0; padding: 60px 0 30px; }
[data-theme='dark'] .footer { background: #070910; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
.footer img { height: 34px; margin-bottom: 14px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer a { display: block; padding: 4px 0; font-size: 14px; color: #c7cde0; }
.footer a:hover { color: var(--gold-2); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #8a93ad; }

/* ---------- categories page ---------- */
.cat-section { margin-bottom: 44px; }
.cat-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.cat-section-head h2 { font-size: 26px; margin: 0; display: flex; align-items: center; gap: 10px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.event-pill { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: .15s; }
.event-pill:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.event-pill .em { font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-3); flex: none; }
.event-pill b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.event-pill small { color: var(--muted); font-size: 12px; }

/* ---------- designs ---------- */
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.dcard { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: .2s; }
.dcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.dcard-thumb { aspect-ratio: 4 / 4.4; background: var(--surface-3); display: grid; place-items: center; padding: 14px; cursor: pointer; }
.dcard-thumb img { max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: var(--shadow-sm); }
.dcard-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.dcard-body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard-actions { display: flex; gap: 2px; padding: 0 8px 8px; }

/* ---------- about / contact / static ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin-top: 30px; }
.prose p, .prose li { color: var(--text-2); }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 18px; }
.info-list { display: grid; gap: 14px; }
.info-list div { display: flex; gap: 12px; align-items: flex-start; }
.info-list .i { color: var(--gold); margin-top: 3px; }

/* ---------- modal / toast / menus ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(8, 12, 24, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.modal-backdrop.show { opacity: 1; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.98); transition: transform .25s var(--ease); }
.modal-backdrop.show .modal { transform: none; }
.modal-wide { width: min(940px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px 22px; }
.modal-head h3 { margin: 0; font-size: 18px; font-family: var(--font-display); }
.modal-body { padding: 10px 22px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
#toasts { position: fixed; z-index: 2000; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: #111827; color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: .25s var(--ease); max-width: min(560px, 92vw); }
.toast.show { opacity: 1; transform: none; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #60a5fa; flex: none; }
.toast-success .toast-dot { background: #4ade80; }
.toast-error .toast-dot { background: #f87171; }
.toast-warn .toast-dot { background: #fbbf24; }
.ctx-menu { position: fixed; z-index: 1500; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: pop .12s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.ctx-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; text-align: left; color: var(--text); }
.ctx-menu button:hover { background: var(--surface-3); }
.ctx-menu button .kbd { margin-left: auto; font-size: 11px; }
.ctx-menu button.danger { color: #dc2626; }
.ctx-menu hr { border: 0; height: 1px; background: var(--line); margin: 5px 2px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--gold-grad); transition: width .2s; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   EDITOR
   ========================================================================== */
body.is-editor { overflow: hidden; }
body.is-editor .footer, body.is-editor .topbar { display: none; }
.editor { position: fixed; inset: 0; display: grid; grid-template-rows: 56px 1fr; background: var(--bg-2); }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.ed-top .brand img { height: 28px; }
.ed-top .sep { width: 1px; height: 26px; background: var(--line); flex: none; }
.ed-name { display: flex; flex-direction: column; min-width: 0; max-width: 260px; }
.ed-name input { border: 1px solid transparent; background: none; font-weight: 600; font-size: 14px; padding: 2px 6px; border-radius: 6px; width: 100%; text-overflow: ellipsis; }
.ed-name input:hover { border-color: var(--line); }
.ed-name input:focus { outline: none; border-color: var(--gold); background: var(--surface); }
.ed-name small { font-size: 11px; color: var(--muted); padding-left: 7px; white-space: nowrap; }
.ed-tools { display: flex; align-items: center; gap: 2px; }
.ed-zoom { min-width: 58px; font-size: 13px; font-weight: 600; height: 32px; border-radius: 8px; padding: 0 6px; }
.ed-zoom:hover { background: var(--surface-3); }
.ed-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ed-body { display: grid; grid-template-columns: 76px 320px 1fr 300px; min-height: 0; }
.ed-body.panel-closed { grid-template-columns: 76px 0 1fr 300px; }
.ed-rail { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: none; }
.ed-rail::-webkit-scrollbar { display: none; }
.ed-rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px; border-radius: 10px; font-size: 10.5px; font-weight: 600; color: var(--muted); transition: .15s; }
.ed-rail button .i { width: 21px; height: 21px; }
.ed-rail button:hover { color: var(--text); background: var(--surface-3); }
.ed-rail button.active { color: var(--text); background: var(--surface-3); }
.ed-rail button.active .i { color: var(--gold); }
.ed-panel { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 18px; gap: 8px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-body { flex: 1; overflow-y: auto; padding: 4px 18px 24px; }
.panel-sec { margin-bottom: 20px; }
.panel-sec > h4 { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.asset-grid-4 { grid-template-columns: repeat(4, 1fr); }
.asset-grid-2 { grid-template-columns: repeat(2, 1fr); }
.asset { aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; padding: 8px; transition: .15s; cursor: pointer; overflow: hidden; position: relative; }
.asset:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.asset img, .asset canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.asset-emoji { font-size: 30px; line-height: 1; }
.asset-label { position: absolute; bottom: 3px; left: 0; right: 0; font-size: 9.5px; text-align: center; color: var(--muted); }
.asset .del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: none; place-items: center; }
.asset:hover .del { display: grid; }
.asset .del .i { width: 12px; height: 12px; }
.bg-swatch { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; transition: .15s; position: relative; overflow: hidden; background-size: cover; }
.bg-swatch:hover { transform: scale(1.04); box-shadow: var(--shadow-sm); }
.bg-swatch canvas { width: 100%; height: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; transition: transform .1s; }
.swatch:hover { transform: scale(1.12); }
.palette-row { display: flex; border-radius: 10px; overflow: hidden; height: 34px; cursor: pointer; border: 1px solid var(--line); transition: .15s; margin-bottom: 6px; }
.palette-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.palette-row span { flex: 1; }
.text-preset { width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 8px; transition: .15s; line-height: 1.2; }
.text-preset:hover { border-color: var(--gold); }
.font-pair { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; transition: .15s; }
.font-pair:hover { border-color: var(--gold); }
.font-pair .h { font-size: 22px; line-height: 1.15; }
.font-pair .b { font-size: 13px; color: var(--muted); }
.mini-tpl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-tpl .tcard-thumb { border-radius: 10px; }
.layer-list { display: grid; gap: 4px; }
.layer { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2); font-size: 13px; cursor: pointer; user-select: none; }
.layer:hover { border-color: var(--line-2); }
.layer.selected { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.layer.dragging { opacity: .4; }
.layer.drop-before { box-shadow: inset 0 2px 0 var(--gold); }
.layer.drop-after { box-shadow: inset 0 -2px 0 var(--gold); }
.layer .thumb { width: 34px; height: 34px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.layer .thumb canvas { width: 100%; height: 100%; }
.layer .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer .icon-btn { width: 26px; height: 26px; }
.layer .icon-btn .i { width: 15px; height: 15px; }
.layer.hidden-el .nm { opacity: .45; text-decoration: line-through; }
.upload-drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: .15s; margin-bottom: 14px; }
.upload-drop:hover, .upload-drop.over { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 6%, transparent); color: var(--text); }
.upload-drop .i { width: 28px; height: 28px; margin: 0 auto 8px; color: var(--gold); }

/* stage */
.ed-stage-wrap { position: relative; overflow: auto; min-width: 0; min-height: 0; background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 0) 0 0/22px 22px, var(--bg-2); }
.ed-stage-inner { min-width: 100%; min-height: 100%; display: grid; place-items: center; padding: 60px; box-sizing: border-box; width: max-content; height: max-content; }
.ed-stage { position: relative; box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06); background: #fff; }
.ed-stage canvas { display: block; }
.ed-stage.transparent-bg { background: conic-gradient(#ddd 25%, #fff 0 50%, #ddd 0 75%, #fff 0) 0 0/20px 20px; }
.ed-overlay { position: absolute; inset: 0; touch-action: none; }
.ed-overlay.panning { cursor: grab; }
.sel-box { position: absolute; border: 1.5px solid #3b82f6; pointer-events: none; transform-origin: center; }
.sel-box.locked { border-color: #f59e0b; border-style: dashed; }
.sel-box.multi { border-style: dashed; }
.hover-box { position: absolute; border: 1.5px solid rgba(59, 130, 246, .55); pointer-events: none; transform-origin: center; }
.handle { position: absolute; width: 12px; height: 12px; background: #fff; border: 1.5px solid #3b82f6; border-radius: 50%; pointer-events: auto; transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.handle.side { width: 8px; height: 18px; border-radius: 6px; }
.handle.side.h { width: 18px; height: 8px; }
.handle.rot { width: 26px; height: 26px; display: grid; place-items: center; color: #3b82f6; cursor: grab; }
.handle.rot .i { width: 14px; height: 14px; }
.rot-stem { position: absolute; left: 50%; width: 1.5px; height: 18px; background: #3b82f6; transform: translateX(-50%); }
.size-tag { position: absolute; left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: #3b82f6; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.guide { position: absolute; background: #ec4899; pointer-events: none; z-index: 5; }
.guide.v { width: 1px; top: 0; bottom: 0; }
.guide.h { height: 1px; left: 0; right: 0; }
.marquee { position: absolute; border: 1px solid #3b82f6; background: rgba(59, 130, 246, .1); pointer-events: none; }
.inline-editor { position: absolute; z-index: 10; margin: 0; padding: 0; border: 0; outline: 1.5px dashed #3b82f6; outline-offset: 2px; background: transparent; resize: none; overflow: hidden; white-space: pre-wrap; word-break: break-word; caret-color: #3b82f6; transform-origin: center; }
.ed-float { position: absolute; z-index: 20; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(-50%); white-space: nowrap; }
.ed-float .sep { width: 1px; background: var(--line); margin: 4px 2px; }
.ed-bottom { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 15; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ed-bottom input[type='range'] { width: 180px; }
.ed-bottom .time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 74px; text-align: center; }
.ed-stage-holder { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.ed-stage-holder > .ed-stage-wrap { position: absolute; inset: 0; }
.is-playing .ed-overlay { cursor: pointer; }
.is-playing .ed-float { display: none; }
.footer-link:hover { color: var(--gold-2) !important; }

/* props panel */
.ed-props { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; min-width: 0; }
.props-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.props-head h3 { margin: 0; font-size: 15px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.props-tabs { display: flex; gap: 2px; padding: 4px 12px 0; border-bottom: 1px solid var(--line); position: sticky; top: 46px; background: var(--surface); z-index: 2; }
.props-tabs button { padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.props-tabs button.active { color: var(--text); border-color: var(--gold); }
.props-body { padding: 14px 16px 40px; }
.prop-sec { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.prop-sec:last-child { border-bottom: 0; }
.prop-sec > h4 { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.btn-row { display: flex; gap: 4px; flex-wrap: wrap; }
.btn-row .icon-btn { width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.num { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; height: 32px; background: var(--surface); overflow: hidden; }
.num label { padding: 0 7px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: ew-resize; user-select: none; }
.num input { width: 100%; min-width: 0; border: 0; background: none; height: 100%; font-size: 13px; padding-right: 6px; }
.num input:focus { outline: none; }
.num:focus-within { border-color: var(--gold); box-shadow: var(--focus); }
.color-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.color-row .input { height: 32px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.gradient-stops { display: grid; gap: 6px; margin-bottom: 10px; }
.gradient-bar { height: 16px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; }
.font-select { position: relative; }
.font-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.font-list button { width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.font-list button small { font-family: var(--font); font-size: 10.5px; color: var(--muted); }
.font-list button:hover, .font-list button.active { background: var(--surface-3); }
.font-list h5 { margin: 8px 10px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.anim-chooser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.anim-chooser button { padding: 8px 4px; border-radius: 9px; border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); }
.anim-chooser button:hover { border-color: var(--line-2); color: var(--text); }
.anim-chooser button.active { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--surface)); color: var(--text); }
.fx-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 13px; }
.fx-item b { flex: 1; font-weight: 600; }
.ai-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 8%, var(--surface)), var(--surface)); }
.suggestion { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 13px; background: var(--surface); transition: .15s; color: var(--text); line-height: 1.4; }
.suggestion:hover { border-color: var(--gold); }

/* ---------- animation studio ---------- */
.studio { position: fixed; inset: 0; display: grid; grid-template-rows: 56px 1fr auto; background: var(--bg-2); }
.studio-main { display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.studio-preview { display: grid; place-items: center; padding: 24px; min-height: 0; overflow: hidden; }
.studio-preview canvas { box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .4); background: #fff; border-radius: 4px; max-width: 100%; max-height: 100%; }
.studio-side { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; }
.timeline { background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-rows: 46px minmax(120px, 30vh); }
.tl-bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.tl-bar .time { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; min-width: 96px; }
.tl-scroll { overflow: auto; position: relative; }
.tl-grid { position: relative; min-width: 100%; }
.tl-ruler { position: sticky; top: 0; z-index: 3; height: 24px; margin-left: 200px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-ruler span { position: absolute; top: 4px; font-size: 10.5px; color: var(--muted); transform: translateX(-50%); }
.tl-ruler i { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line-2); }
.tl-row { display: flex; height: 34px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.tl-row.selected { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.tl-label { position: sticky; left: 0; z-index: 2; width: 200px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12.5px; background: var(--surface); border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; overflow: hidden; }
.tl-label span { overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; flex: 1; }
.tl-clip { position: absolute; top: 6px; height: 22px; border-radius: 6px; background: linear-gradient(90deg, #3b82f6, #6366f1); color: #fff; font-size: 10.5px; font-weight: 600; padding: 0 8px; display: flex; align-items: center; cursor: grab; white-space: nowrap; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.tl-clip.loop { background: repeating-linear-gradient(45deg, rgba(201, 162, 39, .5) 0 6px, rgba(201, 162, 39, .3) 6px 12px); color: var(--text); top: 9px; height: 16px; cursor: default; }
.tl-clip.exit { background: linear-gradient(90deg, #f97316, #ef4444); }
.tl-clip.fx { background: linear-gradient(90deg, #a855f7, #ec4899); }
.tl-clip .grip { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 4; pointer-events: none; }
.tl-playhead::before { content: ''; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #ef4444; }
.tl-hit { position: absolute; left: 200px; right: 0; top: 0; height: 24px; z-index: 5; cursor: pointer; }

/* ---------- export page ---------- */
.export-layout { display: grid; grid-template-columns: 1fr 420px; gap: 30px; align-items: start; }
.export-preview { position: sticky; top: calc(var(--topbar-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; place-items: center; min-height: 400px; }
.export-preview canvas, .export-preview img { max-height: 64vh; width: auto; box-shadow: var(--shadow); border-radius: 4px; }
.formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; margin-bottom: 18px; }
.format { padding: 12px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; display: grid; gap: 2px; transition: .15s; position: relative; }
.format b { font-size: 15px; }
.format small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.format:hover { border-color: var(--line-2); }
.format.active { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }
.format.unsupported { opacity: .55; }
.format .badge { position: absolute; top: 8px; right: 8px; height: 18px; font-size: 9.5px; padding: 0 6px; }
.export-result { display: grid; gap: 8px; margin-top: 14px; }
.qr-box { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.qr-box canvas, .qr-box img { width: 180px; height: 180px; image-rendering: pixelated; }
.share-row { display: flex; gap: 6px; }
.share-row .input { font-size: 12px; }

/* ---------- share view ---------- */
.viewer { min-height: calc(100vh - var(--topbar-h)); display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(800px 400px at 50% 0%, rgba(201, 162, 39, .18), transparent 60%), var(--bg-2); }
.viewer-card { display: grid; gap: 18px; justify-items: center; }
.viewer canvas { max-width: min(560px, 92vw); max-height: 76vh; width: auto; height: auto; box-shadow: var(--shadow-lg); border-radius: 6px; background: #fff; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
.ed-only-sm { display: none; }
@media (max-width: 1240px) {
  .ed-body { grid-template-columns: 70px 290px 1fr 280px; }
  .ed-body.panel-closed { grid-template-columns: 70px 0 1fr 280px; }
}
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-cards { height: 460px; max-width: 560px; width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .showcase { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .filters { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(320px, 88vw); max-height: none; background: var(--surface); padding: 20px; box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .25s var(--ease); top: 0; }
  .filters.open { transform: none; }
  .filters-toggle { display: inline-flex; }
  .export-layout, .two-col { grid-template-columns: 1fr; }
  .export-preview { position: static; min-height: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* editor becomes stage-first with bottom sheets */
  .ed-body, .ed-body.panel-closed { grid-template-columns: 1fr; grid-template-rows: 1fr 64px; }
  .ed-rail { grid-row: 2; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 4px 6px; overflow-x: auto; overflow-y: hidden; }
  .ed-rail button { min-width: 62px; padding: 6px 2px; }
  .ed-stage-holder { grid-row: 1; }
  .ed-panel, .ed-props { position: fixed; z-index: 40; left: 0; right: 0; bottom: 64px; max-height: 58vh; border: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -18px 40px -12px rgba(0, 0, 0, .3); transform: translateY(calc(100% + 70px)); transition: transform .28s var(--ease); }
  .ed-panel.sheet-open, .ed-props.sheet-open { transform: none; }
  .ed-panel::before, .ed-props::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 8px auto 0; }
  .ed-props .props-head { top: 0; }
  .ed-top .ed-hide-sm { display: none; }
  .ed-top .ed-only-sm { display: inline-grid; }
  .studio-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .studio-side { max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .container { width: calc(100% - 28px); }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 60px; }
  .hero-cards { height: 380px; }
  .hero-stats { gap: 20px; }
  .steps, .showcase { grid-template-columns: 1fr; }
  .tgrid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { min-height: 130px; padding: 14px; }
  .cat-tile .emoji { font-size: 30px; }
  .cat-tile h3 { font-size: 16px; }
  .tcard-hover { display: none; }
  .tcard-fav { opacity: 1; transform: none; width: 30px; height: 30px; }
  .cta-band { padding: 30px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .ed-top { gap: 6px; padding: 0 8px; }
  .ed-top .ed-hide-xs { display: none; }
  .ed-name { max-width: 120px; }
  .ed-stage-inner { padding: 24px; }
  .ed-bottom { bottom: 8px; }
  .ed-bottom input[type='range'] { width: 110px; }
  .dgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tl-label { width: 120px; }
  .tl-ruler, .tl-hit { margin-left: 120px; left: 120px; }
  .tl-ruler { left: auto; }
  .modal-body { padding: 8px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print {
  .topbar, .footer { display: none; }
}
