:root {
  --color-primary: #007aff;
  --color-primary-dark: #005bbb;
  --color-bg: #f2f2f7;
  --color-card: #ffffff;
  --color-text: #1c1c1e;
  --color-muted: #c7c7cc;
  --glass: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.45);
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0c0c0d;
    --color-card: #1c1c1e;
    --color-text: #e5e5ea;
    --color-muted: #3a3a3c;
    --glass: rgba(20,20,22,0.45);
    --glass-border: rgba(255,255,255,0.08);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background: radial-gradient(1200px 1200px at -20% -10%, #8ec5ff33, transparent 60%),
              radial-gradient(1000px 1000px at 120% 20%, #ffd6a833, transparent 60%),
              linear-gradient(180deg, #ffffff00, #ffffff00);
}
.bg__gradient {
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, #7dd3fc22, #fca5a522, #fde68a22, #86efac22, #7dd3fc22);
  filter: blur(60px) saturate(120%);
  animation: spin 28s linear infinite;
}
.orb { position: absolute; width: 220px; height: 220px; border-radius: 50%; filter: blur(26px); opacity: .55; }
.orb--a { background:#60a5fa55; left: -40px; top: 10vh; animation: float 18s ease-in-out infinite; }
.orb--b { background:#fbbf2455; right: -60px; top: 40vh; animation: float 22s ease-in-out infinite reverse; }
.orb--c { background:#34d39955; left: 10vw; bottom: -80px; animation: float 20s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-28px) } }
@keyframes spin { to { transform: rotate(360deg) } }

.site {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--color-text); text-decoration: none; }
.nav__brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav__links { display: flex; gap: 14px; }
.nav__link { color: var(--color-primary); text-decoration: none; font-weight: 600; }
.nav__link:hover { text-decoration: underline; }

.hero { position: relative; background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); border-radius: 18px; padding: 22px; display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.hero__icon { width: 120px; height: 120px; border-radius: 20px; background: #ffedd5; display: grid; place-items: center; overflow: hidden; }
.hero__icon img { width: 100%; height: 100%; object-fit: cover; }
.hero__title { margin: 0 0 6px; font-size: 2rem; background: linear-gradient(90deg, #2563eb, #06b6d4, #16a34a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__desc { margin: 0; color: #6b7280; }
.hero__actions { margin-top: 14px; display: block; text-align: center; }
.hero__body { display: grid; justify-items: center; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.hero__actions .btn { display: block; margin: 0 auto; }
.btn--primary { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: 0 6px 14px rgba(0,122,255,0.18); }
.btn--ghost { border: 1px solid var(--color-muted); color: var(--color-text); background: var(--color-card); }
.btn--block { display:block; width:100%; text-align:center; }
.meta { color: #6b7280; font-size: .9rem; }
.meta code { word-break: break-all; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }

.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 16px; }
.card { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(8px); border-radius: 14px; padding: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: #6b7280; line-height: 1.6; }

/* Gallery */
.gallery { margin-top: 18px; overflow-x: auto; display: grid; grid-auto-flow: column; gap: 12px; scroll-snap-type: x mandatory; padding: 6px 2px 12px; }
.shot { position: relative; width: 220px; height: 396px; border-radius: 18px; border: 1px solid var(--color-muted); background: #000; overflow: hidden; scroll-snap-align: start; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot img { cursor: zoom-in; }
.dots { display:flex; gap:6px; justify-content:center; margin-top:8px; }
.dot { width:8px; height:8px; border-radius:50%; background:#cbd5e1; }
.dot.active { background: var(--color-primary); }

/* Demo */
.demo { margin-top: 18px; display: grid; gap: 10px; }
.demo input, .demo textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--color-muted); background: var(--color-card); color: var(--color-text); }
.demo .row { display: grid; grid-template-columns: 1fr 160px; gap: 8px; }
.emoji { font-size: 1.1rem; line-height: 1.5; min-height: 64px; word-wrap: break-word; }
.spark { animation: pop .4s ease; display: inline-block; }
@keyframes pop { from { transform: scale(.9); opacity:.6; } to { transform: scale(1); opacity:1; } }

/* Emoji particles */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.em { position: absolute; font-size: 18px; opacity: .8; animation: drift linear forwards; }
@keyframes drift { from { transform: translate(var(--x,0), var(--y,0)) scale(.9); opacity:.8; } to { transform: translate(calc(var(--x,0) + var(--dx,0)), calc(var(--y,0) - 120px)) scale(1.1); opacity:0; } }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__icon { margin: 0 auto; }
  .grid { grid-template-columns: 1fr; }
  /* Larger, easier taps on mobile, centered */
  .hero__actions { text-align: center; }
  .hero__actions .btn { padding: 12px 20px; font-size: 1.05rem; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .shot { width: 180px; height: 324px; }
}

.section { margin-top: 20px; }
.section h2 { margin: 0 0 10px; font-size: 1.2rem; }
.steps { display: grid; gap: 10px; }
.step { background: var(--color-card); border: 1px solid var(--color-muted); border-radius: 10px; padding: 10px 12px; }
.step::before { content: none; }

.footer { margin-top: 24px; color: #6b7280; font-size: .9rem; text-align: center; }
.hash { user-select: all; }
.copy { margin-left: 8px; cursor: pointer; color: var(--color-primary); background: none; border: none; font-weight: 700; }
.copy:active { transform: scale(.98); }

/* Sticky mobile CTA */
.cta { position: fixed; left: 0; right: 0; bottom: 0; display: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in oklab, var(--color-card) 86%, transparent); border-top: 1px solid var(--color-muted); backdrop-filter: blur(6px); }
.cta__inner { max-width: 980px; margin: 0 auto; padding: 0 12px; }
@media (max-width: 720px) { .cta { display: block; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 50; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); cursor: zoom-out; }
.lightbox__close { position: absolute; top: 10px; right: 12px; background: rgba(255,255,255,.9); color: #111; border: none; border-radius: 999px; width: 36px; height: 36px; font-weight: 700; cursor: pointer; }
.lightbox__close:active { transform: scale(.96); }
