:root {
  --bg: #0a1120;
  --bg-2: #0f172a;
  --ink: #ecedee;
  --muted: #94a3b8;
  --sky: #38bdf8;
  --sky-ink: #010d15;
  --paper: #f8fafc;
  --paper-ink: #1f2937;
  --paper-muted: #64748b;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px rgba(2, 8, 23, 0.28);
  --max: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif, "Segoe UI", Arial;
  line-height: 1.5;
}
a { color: inherit; }
img, video { max-width: 100%; }
button, input { font: inherit; }
.skip {
  position: absolute; left: -999px;
}
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  width: min(var(--max), calc(100% - 24px));
  margin: 10px auto 0;
  padding: 10px 14px;
  background: rgba(10, 17, 32, 0.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 400; letter-spacing: -0.02em; font-size: 16px; }
.logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; display: block; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a, .menu-btn {
  text-decoration: none; color: #fff; border-radius: 999px;
  padding: 8px 12px; background: transparent; border: 0; cursor: pointer; font-weight: 400; font-size: 16px;
}
.nav a[aria-current="page"], .nav a:hover { background: rgba(255,255,255,0.08); }
.features { position: relative; }
.features-menu {
  display: none; position: absolute; top: 100%; right: 0; min-width: 240px; padding: 8px;
  background: #111827; border: 1px solid var(--line); border-radius: 14px; z-index: 30;
}
.features:hover .features-menu, .features:focus-within .features-menu { display: grid; }
.features-menu a { display: block; border-radius: 10px; }
.menu-btn { display: none; margin-left: auto; }

.hero.has-results { min-height: auto; padding-top: 18px; }
.hero.has-results h1 { font-size: clamp(28px, 5vw, 40px); }
.hero.has-results .lede { display: none; }
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 0 120px; overflow: hidden;
}
.waves {
  position: absolute; left: -10%; right: -10%; bottom: -30px; height: 280px; pointer-events: none;
  background:
    radial-gradient(42% 80% at 18% 100%, rgba(168, 85, 247, 0.75), transparent 70%),
    radial-gradient(38% 90% at 48% 120%, rgba(99, 102, 241, 0.55), transparent 68%),
    radial-gradient(46% 85% at 82% 110%, rgba(56, 189, 248, 0.7), transparent 70%);
  filter: blur(2px);
}
.waves::before, .waves::after {
  content: ""; position: absolute; border-radius: 50%;
}
.waves::before { width: 90px; height: 90px; left: 22%; top: 10px; border: 2px solid rgba(255,255,255,0.18); }
.waves::after { width: 14px; height: 14px; left: 46%; top: 36px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.hero-inner { position: relative; z-index: 1; text-align: center; width: min(760px, calc(100% - 32px)); }
h1, h2, h3 { font-weight: 600; }
.hero h1 {
  margin: 0 0 10px; font-size: clamp(40px, 5.2vw, 56px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600;
}
.hero h1 span {
  background: linear-gradient(90deg, #e879f9, #a78bfa 40%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 auto 22px; color: var(--muted); }
.hero .lede { font-size: min(18px, 2.7vw); white-space: nowrap; }
.lookup {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 8px; border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.lookup input {
  min-width: 0; border: 0; background: transparent; color: #fff;
  padding: 14px 16px; outline: none;
}
.lookup input::placeholder { color: #94a3b8; }
.submit, .primary {
  border: 0; border-radius: 14px; background: var(--sky); color: var(--sky-ink);
  font-weight: 600; padding: 12px 18px; cursor: pointer;
}
.submit:disabled, .primary:disabled { opacity: 0.65; cursor: progress; }
.history-row { display: flex; justify-content: center; margin-top: 12px; position: relative; }
.ghost {
  border: 0; background: transparent; color: var(--ink); cursor: pointer; font-weight: 500;
}
.history-menu {
  position: absolute; top: 36px; min-width: 220px; text-align: left;
  background: #111827; border: 1px solid var(--line); border-radius: 14px; padding: 8px;
  box-shadow: var(--shadow);
}
.history-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: #fff; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.history-menu button:hover { background: rgba(255,255,255,0.06); }
#results { margin-top: 22px; display: grid; gap: 12px; text-align: left; }
#results:empty { display: none; }
.notice, .status {
  background: rgba(255,255,255,0.08); border-radius: 14px; padding: 12px 14px; font-weight: 650;
}

.profile-card {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: center;
  background: transparent; color: var(--ink); padding: 0; box-shadow: none;
}
.download-box {
  background: #fff; color: var(--paper-ink); border-radius: 18px; padding: 14px; box-shadow: var(--shadow);
}
.profile-card h2, .download-box h2 { margin: 0 0 4px; letter-spacing: -0.03em; font-weight: 600; }
.profile-card p { margin: 0 0 6px; color: var(--muted); overflow-wrap: anywhere; }
.result-tabs, .stat-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.result-tabs { margin-bottom: 4px; }
.result-tabs .tab, .stat-buttons button {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 500;
}
.result-tabs .tab[aria-selected="true"] { background: var(--sky); color: var(--sky-ink); border-color: transparent; }
.stat-buttons button { display: grid; justify-items: center; min-width: 92px; border-radius: 14px; }
.stat-buttons strong { font-size: 15px; font-weight: 600; }
.stat-buttons span { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat-buttons button:hover { border-color: var(--sky); }
.media-section { display: grid; gap: 10px; }
.media-section h3 { margin: 8px 0 0; font-size: 16px; }
.empty-note { margin: 0; color: var(--muted); }
.library { display: grid; gap: 14px; min-width: 0; max-width: 100%; }
.result-panel, .library-stage, .media-bar { min-width: 0; max-width: 100%; }
.media-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subtabs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.subtab, .view-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500;
}
.subtab {
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted);
  padding: 8px 0; border-radius: 0;
}
.subtab[aria-selected="true"] { color: var(--ink); border-bottom-color: #7c8cff; }
.view-toggle {
  border: 0; background: #3558e0; color: #fff; border-radius: 12px; padding: 8px 14px; flex: none;
}
.view-toggle .ico, .subtab .ico { width: 16px; height: 16px; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #111318; cursor: pointer; }
.tile-grid-reels .tile { aspect-ratio: 3 / 4; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-stats, .tile-views, .tile-badge {
  position: absolute; z-index: 1; color: #fff; display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.75);
}
.tile-stats { left: 8px; right: 36px; bottom: 8px; }
.tile-views { top: 8px; left: 8px; }
.tile-badge {
  top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; justify-content: center;
  background: rgba(0, 0, 0, 0.55); text-shadow: none;
}
.tile-save {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(15, 23, 42, 0.72); color: #fff;
}
.tile-save .ico, .tile-stats .ico, .tile-views .ico { width: 14px; height: 14px; }
.tile-badge .ico { width: 18px; height: 18px; }
.tile-save:disabled { opacity: 0.6; }
.ico { display: inline-flex; }
.ico svg { width: 100%; height: 100%; display: block; }
.post-stack { display: grid; gap: 28px; }
.load-more {
  justify-self: center; border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 10px 18px; font-weight: 500; cursor: pointer;
}
.viewer {
  display: grid; justify-items: center; gap: 12px; width: min(440px, 100%); margin: 0 auto; text-align: center;
}
.post-actions { display: flex; align-items: center; gap: 10px; width: 100%; }
.count-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  color: #fff; font-weight: 500; border-radius: 999px;
}
.like-btn { background: #1d9bf0; padding: 8px 14px; }
.comment-btn { background: transparent; color: var(--ink); padding: 8px 4px; }
.count-btn .ico { width: 16px; height: 16px; }
.slide-dots { display: flex; flex: 1; justify-content: center; align-items: center; gap: 6px; min-height: 16px; }
.slide-dots .dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #334155; cursor: pointer;
}
.slide-dots .dot.on { background: #38bdf8; }
.post-actions .tile-save { position: static; width: 36px; height: 36px; flex: none; background: rgba(255,255,255,0.08); }
.viewer-frame { position: relative; width: 100%; display: grid; justify-items: center; }
.viewer-frame img, .viewer-frame video {
  width: auto; max-width: 100%; max-height: 72vh; margin: 0 auto; display: block;
  border-radius: 16px; background: #111318;
}
.viewer .caption { margin: 0; white-space: pre-wrap; color: var(--ink); text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.post-list { display: grid; gap: 18px; justify-items: center; }
.post-card { display: grid; justify-items: center; gap: 10px; width: min(440px, 100%); text-align: center; }
.post-card img { width: auto; max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 16px; background: #111318; margin: 0 auto; display: block; }
.post-meta { margin: 0; color: var(--ink); font-weight: 600; text-align: center; }
.post-card .caption { margin: 0; white-space: pre-wrap; color: var(--ink); text-align: center; }
.post-card .primary, .viewer .primary { justify-self: center; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.avatar-fallback { display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #5b21b6; background: #efe7ff; }
.download-box {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  grid-template-areas: "title title" "preview actions"; gap: 10px 14px; align-items: center;
}
.download-box h2 { grid-area: title; text-align: center; }
.download-box .preview { grid-area: preview; background: #111318; border-radius: 14px; overflow: hidden; }
.download-box video, .download-box img { width: 100%; height: 220px; object-fit: contain; background: #111318; display: block; }
.download-box .meta { grid-area: actions; text-align: center; }
.download-box p { margin: 0; color: #64748b; }
.formats, .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.story-switch { display: flex; gap: 8px; }
.story-option {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer;
}
.story-option[aria-selected="true"] { background: var(--sky); color: var(--sky-ink); border-color: transparent; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.story-card { display: grid; gap: 8px; justify-items: stretch; background: transparent; }
.story-frame { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.story-frame img, .story-frame video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; background: #111318; }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.play-badge .ico { width: 24px; height: 24px; }
.play-badge.is-off,
.play-badge[hidden] { display: none !important; }
video::-webkit-media-controls-overlay-play-button { display: none !important; }
.clear-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #fff; color: #0a1120;
}
.clear-download .ico { width: 18px; height: 18px; }
.story-card time { color: var(--muted); font-size: 13px; text-align: center; }

.band { padding: 72px 0; content-visibility: auto; contain-intrinsic-size: auto 640px; }
.band.dark { background: var(--bg-2); }
.band.light { background: var(--paper); color: var(--paper-ink); }
.band h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.04em; text-align: center; }
.intro { margin: 0 auto 28px; max-width: 62ch; text-align: center; color: var(--muted); }
.band.light .intro { color: var(--paper-muted); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  border-radius: 20px; padding: 18px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.band.light .card { background: #fff; border-color: #e2e8f0; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); }
.card h3 { margin: 8px 0 6px; letter-spacing: -0.03em; }
.card p, .step p, .faq p { margin: 0; color: var(--muted); }
.band.light .card p, .band.light .step p { color: var(--paper-muted); }
.icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(56, 189, 248, 0.15); color: #7dd3fc; font-weight: 800;
}
.band.light .icon { background: #e0f2fe; color: #0369a1; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { background: #fff; border-radius: 20px; padding: 16px; border: 1px solid #e2e8f0; }
.step b { display: block; color: #0284c7; margin-bottom: 6px; }
.step figure { margin: 0 0 12px; }
.step svg { width: 100%; height: auto; display: block; border-radius: 14px; }
.split {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 36px; align-items: center;
  width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 56px 0;
}
.split.flip .copy { order: 2; }
.split.flip .art { order: 1; }
.split h2 { text-align: left; margin-bottom: 12px; }
.split p { margin: 0 0 12px; color: var(--muted); }
.band.light.split, .split.paper p { color: var(--paper-muted); }
.split .art svg, .split .art img { width: 100%; height: auto; display: block; }
.article-body { max-width: none; }
.article-body h1 { text-align: center; }
.article-body h2 { margin: 26px 0 8px; font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.03em; text-align: left; }
.article-body p { margin: 0 0 16px; }
.article-body .feature { width: min(540px, 100%); margin: 0 auto 18px; }
.article-body .feature img, .shot { width: 100%; height: auto; border-radius: 18px; display: block; }
.kicker { text-align: center; letter-spacing: 0.14em; font-size: 12px; font-weight: 800; color: #0284c7; margin: 0 0 8px; }
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.post {
  display: block; text-decoration: none; background: #fff; color: var(--paper-ink);
  border-radius: 18px; overflow: hidden; border: 1px solid #e2e8f0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12); }
.post img { width: 100%; height: 180px; object-fit: cover; display: block; background: #0f172a; }
.post h3, .post p { margin: 0; padding: 0 14px; }
.post h3 { padding-top: 14px; }
.post p { padding-bottom: 14px; color: var(--paper-muted); font-size: 14px; }
.faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border-radius: 14px; padding: 12px 16px; border: 1px solid #e2e8f0; }
.faq summary { cursor: pointer; font-weight: 750; }
.faq p { margin-top: 8px; }
.magic { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.magic article {
  min-height: 180px; border-radius: 24px; padding: 22px;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.12));
  border: 1px solid var(--line);
  transition: transform .18s ease, border-color .18s ease;
}
.magic article:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, 0.7); }
.magic .icon svg { width: 22px; height: 22px; display: block; }
.magic h3 { margin: 10px 0 8px; font-size: 26px; letter-spacing: -0.04em; }
.notice {
  display: grid; gap: 8px; max-width: 720px; margin: 0 auto;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px;
}
.notice ul { margin: 0; padding-left: 18px; color: var(--muted); }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quote { background: #fff; color: var(--paper-ink); border-radius: 18px; padding: 18px; border: 1px solid #e2e8f0; }
.quote p { margin: 0 0 10px; }
.quote b { color: #0369a1; font-size: 14px; }
.cta { text-align: center; }
.cta .submit { text-decoration: none; display: inline-flex; }

.site-footer { background: #070d18; padding: 42px 0 22px; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 20px; }
.site-footer h3 { margin: 0 0 8px; }
.site-footer p, .site-footer a { color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.legal { margin-top: 22px; color: var(--muted); font-size: 13px; }

.page { padding: 36px 0 64px; }
.page h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.04em; }
.page .lede { margin-left: 0; }
.dialog {
  width: min(420px, calc(100% - 32px)); border: 0; border-radius: 18px; padding: 18px;
  background: #111827; color: #fff;
}
.dialog::backdrop { background: rgba(0,0,0,0.55); }
.dialog p { color: var(--muted); }

@media (max-width: 900px) {
  .cards, .cards.three, .steps, .posts, .magic, .quotes { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split.flip .copy, .split.flip .art { order: 0; }
  .split h2 { text-align: center; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 62px; left: 12px; right: 12px;
    background: #111827; border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  }
  .nav.open .features-menu { display: grid; position: static; border: 0; background: transparent; padding: 0 0 0 8px; min-width: 0; }
  .hero .lede { font-size: 11px; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip .copy, .split.flip .art { order: 0; }
  .bar { position: sticky; }
  .cards, .cards.three, .cards.two, .steps, .posts, .foot, .magic, .quotes { grid-template-columns: 1fr; }
  .lookup { grid-template-columns: 1fr; }
  .submit { width: 100%; }
  .profile-card { grid-template-columns: 72px minmax(0, 1fr); }
  .profile-card h2 { overflow-wrap: anywhere; }
  .avatar { width: 72px; height: 72px; }
  .result-tabs, .stat-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-tabs .tab, .stat-buttons button { min-width: 0; width: 100%; padding: 8px 6px; }
  .stat-buttons strong { font-size: 13px; }
  .story-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .story-option { width: 100%; }
  .story-grid { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .story-card { width: min(320px, 100%); }
  .media-bar { flex-wrap: wrap; }
  .subtabs { min-width: 0; flex: 1 1 auto; }
  .tile-stats, .tile-views { font-size: 11px; }
  .tile-stats { left: 4px; right: 30px; bottom: 4px; }
  .post-actions { flex-wrap: wrap; justify-content: center; }
  .viewer, .post-card { width: min(440px, 100%); }
  .download-box { grid-template-columns: 1fr; grid-template-areas: "title" "preview" "actions"; }
  .download-box video, .download-box img { height: 220px; max-height: 42vh; }
  .formats .primary { flex: 1 1 0; min-width: 0; }
  .hero { min-height: calc(100svh - 64px); padding: 24px 0 36px; }
}
