:root,
html[data-theme="dark"] {
  --bg: #080b10;
  --surface: rgba(22, 28, 38, 0.72);
  --surface-solid: #161c26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --brand: #ff6b4a;
  --brand2: #ff3d8e;
  --brand-glow: rgba(255, 77, 142, 0.25);
  --ok: #34d399;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(8, 11, 16, 0.82);
  --link: #ff9f7a;
  --link-hover: #ffc4a8;
  --hero-title: #faf8f6;
  --hero-tag: #e8e2dc;
  --hero-kicker: #c4a99a;
}

html[data-theme="light"] {
  --bg: #f2f4f7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --border: rgba(20, 24, 32, 0.1);
  --text: #161a22;
  --muted: #5c6575;
  --brand: #e85a3a;
  --brand2: #0d9488;
  --brand-glow: rgba(232, 90, 58, 0.18);
  --ok: #0f9f6e;
  --shadow: 0 18px 50px rgba(20, 28, 40, 0.08);
  --header-bg: rgba(242, 244, 247, 0.92);
  --link: #c2410c;
  --link-hover: #9a3412;
  --hero-title: #12151c;
  --hero-tag: #2a3140;
  --hero-kicker: #0f766e;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: auto;
  color-scheme: dark;
}
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }
.container { max-width: 1320px; margin: 0 auto; padding: 0 1.5rem; }

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(255, 107, 74, 0.11), transparent),
    radial-gradient(ellipse 55% 40% at 88% 8%, rgba(45, 212, 191, 0.07), transparent),
    radial-gradient(ellipse 50% 35% at 70% 90%, rgba(56, 189, 248, 0.05), transparent),
    var(--bg);
}
html[data-theme="light"] .bg-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(232, 90, 58, 0.09), transparent),
    radial-gradient(ellipse 55% 40% at 88% 8%, rgba(13, 148, 136, 0.06), transparent),
    radial-gradient(ellipse 50% 35% at 70% 90%, rgba(14, 165, 233, 0.04), transparent),
    var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hide-mobile { display: block; }
@media (max-width: 768px) { .hide-mobile { display: none; } }

/* Header — company / Google-like (clean underline nav, solid bar) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.92);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.header-login {
  display: none;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.header-login:hover,
.header-login.active {
  border-color: rgba(66, 133, 244, 0.55);
  background: rgba(66, 133, 244, 0.08);
  color: var(--text);
}
.header-auth {
  display: none;
  align-items: center;
  gap: 0.4rem;
}
.header-signup {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.header-signup:hover,
.header-signup.active {
  opacity: 0.92;
}
.header-account {
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 821px) {
  .header-auth { display: inline-flex; }
  .header-login { display: inline-flex; }
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: rgba(255, 107, 74, 0.45); }
/* Language switch — quiet company style (not toy gradient pill) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  overflow: hidden;
}
html[data-theme="light"] .lang-switch {
  background: transparent;
  border-color: var(--border);
}
.lang-opt {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 0;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.lang-opt:hover { color: var(--text); }
.lang-opt.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
html[data-theme="light"] .lang-opt.is-active {
  background: rgba(15, 23, 42, 0.06);
}
.lang-sep {
  display: none;
}
.lang-switch-drawer {
  margin: 0.35rem 0 0.85rem;
  width: fit-content;
  max-width: 100%;
}
@media (max-width: 480px) {
  .header-actions .lang-switch {
    font-size: 0.68rem;
  }
  .header-actions .lang-opt {
    padding: 0.34rem 0.5rem;
  }
}
.theme-icon { display: none; line-height: 0; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
html[data-theme="light"] .theme-icon-moon { display: block; }
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: none;
  flex-shrink: 0;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  background: transparent;
}
.logo-text { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.logo-text small { display: block; font-size: 0.65rem; color: var(--muted); font-weight: 500; }
.nav-toggle {
  display: none;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  place-items: center;
}
.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-drawer-open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.nav-drawer-open .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
body.nav-drawer-open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile app-style off-canvas drawer */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 6, 10, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 81;
  width: min(320px, 86vw);
  height: 100%;
  height: 100dvh;
  background: var(--surface-solid);
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
  transform: translate3d(-102%, 0, 0);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
  overflow: hidden;
}
.mobile-drawer.is-open {
  transform: translate3d(0, 0, 0);
}
.mobile-drawer[hidden],
.nav-backdrop[hidden] {
  display: none !important;
}
.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.mobile-drawer-brand strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.mobile-drawer-brand small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}
.mobile-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-drawer-close:hover { color: var(--text); }
.mobile-drawer-nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.65rem 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer-label {
  margin: 0.85rem 0.65rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.mobile-drawer-nav > a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
}
.mobile-drawer-nav > a:hover,
.mobile-drawer-nav > a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] .mobile-drawer-nav > a:hover,
html[data-theme="light"] .mobile-drawer-nav > a.active {
  background: rgba(20, 24, 32, 0.06);
}
.mobile-drawer-nav > a.md-login {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.18), rgba(52, 168, 83, 0.12));
  border: 1px solid rgba(66, 133, 244, 0.35);
  font-weight: 600;
  color: var(--text);
}
.mobile-drawer-nav > a.md-login .md-ico {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  opacity: 1;
}
.md-ico {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
  flex-shrink: 0;
}
body.nav-drawer-open {
  overflow: hidden;
}
@media (min-width: 821px) {
  .nav-backdrop,
  .mobile-drawer { display: none !important; }
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.05rem;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}
.header-nav > a {
  position: relative;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.55rem 0.7rem;
  border-radius: 0;
  background: transparent;
  transition: color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.header-nav > a::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background 0.15s ease;
}
.header-nav > a:hover {
  color: var(--text);
  background: transparent;
}
.header-nav > a.active {
  color: var(--text);
  font-weight: 600;
  background: transparent;
}
.header-nav > a.active::after {
  background: #8ab4f8;
}
html[data-theme="light"] .header-nav > a.active::after {
  background: #1a73e8;
}
.nav-ext { opacity: 0.85; }

.nav-more {
  position: relative;
  flex-shrink: 0;
}
.nav-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.55rem 0.7rem;
  border-radius: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.nav-more-btn:hover,
.nav-more.is-active .nav-more-btn,
.nav-more.is-open .nav-more-btn {
  color: var(--text);
  background: transparent;
}
.nav-more-menu {
  position: absolute;
  top: calc(100% + 0.15rem);
  right: 0;
  min-width: 200px;
  padding: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: none;
  flex-direction: column;
  gap: 0;
  z-index: 60;
}
.nav-more.is-open .nav-more-menu,
.nav-more-menu:not([hidden]) {
  display: flex;
}
.nav-more-menu[hidden] { display: none !important; }
.nav-more.is-open .nav-more-menu[hidden] { display: flex !important; }
.nav-more-menu a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-more-menu a:hover,
.nav-more-menu a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.user-chip {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-primary, .btn-ghost {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  box-shadow: 0 8px 28px var(--brand-glow);
}
.btn-primary:hover { transform: translateY(-1px); color: white; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Hero */
.hero-banner { padding: 2rem 0 0.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 107, 74, 0.12);
  color: #ff9f7a;
  border: 1px solid rgba(255, 107, 74, 0.2);
  margin-bottom: 1rem;
}
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 800;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 52ch; margin: 0; }

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats span { font-size: 0.82rem; color: var(--muted); }

.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.visual-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.visual-bar em { font-style: normal; color: var(--muted); font-size: 0.9rem; }
.visual-bar.before { background: rgba(255,255,255,0.04); width: 100%; }
.visual-bar.after {
  background: linear-gradient(90deg, rgba(255,107,74,0.25), rgba(255,61,142,0.2));
  width: 28%;
  min-width: 120px;
}
.visual-note { margin: 0.5rem 0 0; color: var(--ok); font-size: 0.9rem; font-weight: 600; }

/* Tool */
.tool-section { padding: 0.5rem 0 2.5rem; }
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 960px) { .tool-grid { grid-template-columns: 1fr; } }

.card-glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  margin-bottom: 1rem;
}
.card-glass h3 { margin: 0 0 0.75rem; font-size: 1rem; }

.tool-controls { margin-bottom: 1rem; }
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.control-row:last-child { margin-bottom: 0; }
.control-row label { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.control-row input[type="range"] { flex: 1; accent-color: var(--brand2); }
.control-row select {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.dropzone,
.upload-zone {
  position: relative;
  isolation: isolate;
  border: 2px dashed rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 48%),
    rgba(22, 28, 38, 0.45);
  min-height: 240px;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="light"] .dropzone,
html[data-theme="light"] .upload-zone {
  border-color: rgba(15, 23, 42, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.85)),
    #fff;
}
.dropzone::before,
.upload-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 107, 74, 0.22) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 28%, rgba(45, 212, 191, 0.2) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 62% 72%, rgba(56, 189, 248, 0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 78%, rgba(255, 107, 74, 0.14) 0 2px, transparent 3px);
  z-index: 0;
}
.dropzone:hover,
.dropzone.dragover,
.upload-zone:hover,
.upload-zone.dragover {
  border-color: rgba(255, 107, 74, 0.65);
  background:
    linear-gradient(180deg, rgba(255, 107, 74, 0.07), transparent 55%),
    rgba(22, 28, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.08);
}
html[data-theme="light"] .dropzone:hover,
html[data-theme="light"] .dropzone.dragover,
html[data-theme="light"] .upload-zone:hover,
html[data-theme="light"] .upload-zone.dragover {
  background:
    linear-gradient(180deg, rgba(232, 90, 58, 0.06), transparent 55%),
    #fff;
  box-shadow: 0 0 0 4px rgba(232, 90, 58, 0.08);
}
.dropzone-inner,
.upload-zone-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.25rem 1.5rem;
  max-width: 28rem;
  margin: 0 auto;
}
.drop-icon,
.upload-zone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.15rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), #2dd4bf);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px var(--brand-glow);
}
.drop-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}
.drop-sub,
.drop-limits {
  color: var(--muted);
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}
.drop-helper {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--link);
}
.dropzone.dragover .drop-helper,
.upload-zone.dragover .drop-helper {
  color: var(--brand);
}
.dropzone:focus-visible,
.upload-zone:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.7);
  outline-offset: 3px;
}

/* TinyPNG-style upload box over original Fah Swe panda/forest stage */
.upload-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(0.75rem, 3vw, 1.5rem);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
}
.upload-stage-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #7fa98a;
  background-image: url("/static/img/upload-stage-panda.webp");
  background-size: cover;
  background-position: 72% center;
  background-repeat: no-repeat;
}
.upload-stage-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 28, 24, 0.38) 0%, rgba(18, 28, 24, 0.22) 42%, rgba(18, 28, 24, 0.12) 70%, rgba(18, 28, 24, 0.28) 100%),
    linear-gradient(180deg, rgba(12, 20, 18, 0.18), transparent 35%, rgba(12, 20, 18, 0.22) 100%);
}
/* Lightweight 3D-style rain — scoped to upload-stage canvas (all image uploads) */
.rain-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
}
.rain-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.upload-stage.has-rain .upload-box {
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .rain-stage { display: none !important; }
}
body.page-perf-lite .rain-stage {
  display: none !important;
}

.upload-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(38, 42, 50, 0.88);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}
@media (min-width: 769px) {
  .upload-box {
    background: rgba(34, 38, 46, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
.upload-stage .dropzone,
.upload-stage .upload-zone {
  margin: 1.15rem 1.15rem 0.85rem;
  min-height: 230px;
  border: 2px dashed rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}
.upload-stage .dropzone::before,
.upload-stage .upload-zone::before {
  display: none;
}
.upload-stage .dropzone:hover,
.upload-stage .dropzone.dragover,
.upload-stage .upload-zone:hover,
.upload-stage .upload-zone.dragover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
html[data-theme="light"] .upload-stage .dropzone,
html[data-theme="light"] .upload-stage .upload-zone {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="light"] .upload-stage .dropzone:hover,
html[data-theme="light"] .upload-stage .dropzone.dragover,
html[data-theme="light"] .upload-stage .upload-zone:hover,
html[data-theme="light"] .upload-stage .upload-zone.dragover {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.upload-stage .dropzone-inner,
.upload-stage .upload-zone-inner {
  padding: 1.75rem 1.25rem 1.5rem;
  max-width: 22rem;
}
.upload-stage .drop-icon,
.upload-stage .upload-zone-icon,
.upload-box-icon {
  width: auto;
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 0;
  background: none;
  box-shadow: none;
  display: grid;
  place-items: center;
}
.upload-stage .drop-title {
  color: #fff;
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.upload-stage .drop-sub,
.upload-stage .drop-limits {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 0.45rem;
  font-size: 0.86rem;
}
.upload-stage .drop-helper {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}
.upload-stage .file-picked {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.75rem;
  font-size: 0.86rem;
  word-break: break-word;
}
.upload-box-bar {
  background: #fff;
  color: #1a1f2a;
  padding: 0.8rem 1.2rem;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}
.upload-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #222733;
  min-height: 44px;
}
.upload-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.upload-toggle-ui {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #c5cad3;
  transition: background 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
.upload-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}
.upload-toggle-input:checked + .upload-toggle-ui {
  background: #3d8bfd;
}
.upload-toggle-input:checked + .upload-toggle-ui::after {
  transform: translateX(18px);
}
.upload-toggle-input:focus-visible + .upload-toggle-ui {
  outline: 2px solid #3d8bfd;
  outline-offset: 2px;
}
.upload-toggle-label {
  line-height: 1.3;
}
@media (max-width: 768px) {
  .upload-stage {
    min-height: 340px;
    padding: 1.25rem 0.65rem 1.5rem;
    border-radius: 16px;
  }
  .upload-stage-bg {
    background-position: 82% center;
  }
  .upload-stage-bg::after {
    background:
      linear-gradient(180deg, rgba(14, 22, 20, 0.42), rgba(14, 22, 20, 0.28) 45%, rgba(14, 22, 20, 0.4)),
      linear-gradient(90deg, rgba(14, 22, 20, 0.2), transparent 55%);
  }
  .upload-box {
    max-width: min(100%, 560px);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(36, 40, 48, 0.94);
  }
  .upload-stage .dropzone,
  .upload-stage .upload-zone {
    margin: 0.9rem 0.9rem 0.65rem;
    min-height: 200px;
  }
  .upload-stage .drop-title { font-size: 1.12rem; }
  .upload-box-bar { padding: 0.7rem 1rem; }
  .upload-toggle { font-size: 0.86rem; gap: 0.55rem; }
}
@media (max-width: 480px) {
  .upload-stage { padding: 1rem 0.4rem 1.25rem; min-height: 320px; }
  .upload-stage-bg { background-position: 88% center; }
  .upload-stage .dropzone-inner,
  .upload-stage .upload-zone-inner { padding: 1.35rem 0.85rem 1.15rem; }
}

.progress { margin-top: 1.25rem; text-align: center; }
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.progress-fill {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  animation: progress-slide 1.2s ease-in-out infinite;
}
@keyframes progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

.results { margin-top: 1.25rem; display: grid; gap: 1rem; }
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  animation: fadeUp 0.35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.result-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.result-name { font-weight: 700; word-break: break-all; font-size: 1rem; }
.badge-ok {
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.result-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 500px) { .result-preview { grid-template-columns: 1fr; } }
.preview-box {
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
}
.preview-box.preview-checker {
  background-color: #1a1f2a;
  background-image:
    linear-gradient(45deg, #2a3140 25%, transparent 25%),
    linear-gradient(-45deg, #2a3140 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a3140 75%),
    linear-gradient(-45deg, transparent 75%, #2a3140 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ba-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.5rem 0 0.25rem;
}
.ba-col .preview-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
@media (max-width: 560px) {
  .ba-compare { grid-template-columns: 1fr; }
}
.ba-slider {
  margin: 0.55rem 0 0.35rem;
}
.ba-slider-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: min(62vh, 520px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}
.ba-slider-after,
.ba-slider-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  background: transparent;
}
.ba-slider-before-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid rgba(255, 255, 255, 0.85);
  z-index: 2;
}
.ba-slider-before {
  /* Keep before image same layout box as after (no stretch) */
  width: 100%;
  max-width: none;
  left: 0;
  right: auto;
}
.ba-slider-before-wrap .ba-slider-before {
  width: var(--ba-frame-w, 100cqw);
  min-width: 100%;
}
.ba-slider-frame {
  container-type: size;
}
.ba-slider-before-wrap .ba-slider-before {
  width: 100cqw;
  height: 100cqh;
  max-width: none;
}
.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}
.ba-slider-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.ba-slider-handle span::before,
.ba-slider-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  transform: translateY(-50%);
}
.ba-slider-handle span::before {
  left: 8px;
  border-width: 5px 6px 5px 0;
  border-color: transparent #fff transparent transparent;
}
.ba-slider-handle span::after {
  right: 8px;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent #fff;
}
.ba-slider-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
  margin: 0;
}
.ba-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-process-theater {
  margin: 0.75rem 0 1rem;
}
.ai-process-theater.hidden { display: none; }
.ai-process-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
}
@media (min-width: 720px) {
  .ai-process-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
  }
}
.ai-process-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 74, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 107, 74, 0.12), 0 16px 40px rgba(0, 0, 0, 0.2);
}
.ai-process-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: blur(1.2px) saturate(0.92);
  transform: scale(1.02);
  transition: filter 0.6s ease, transform 0.6s ease;
}
.ai-process-theater.is-done .ai-process-visual img {
  filter: none;
  transform: none;
}
.ai-process-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 107, 74, 0.22) 50%,
    rgba(255, 255, 255, 0.08) 55%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: ai-scan 2.4s linear infinite;
  pointer-events: none;
}
.ai-process-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 107, 74, 0.2), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(45, 212, 191, 0.12), transparent 40%);
  animation: ai-pulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
.ai-process-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.ai-process-stages li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}
.ai-process-stages li::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.ai-process-stages li.is-active {
  color: var(--text);
  font-weight: 600;
}
.ai-process-stages li.is-active::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.2);
}
.ai-process-stages li.is-done::before {
  background: #22c55e;
}
.ai-process-stages li small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}
@media (prefers-reduced-motion: reduce) {
  .ai-process-scan,
  .ai-process-glow { animation: none; }
}
@keyframes ai-scan {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}
@keyframes ai-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}
.control-row.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.preview-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.size-bars { display: grid; gap: 0.5rem; }
.size-bar-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.size-bar-row span { width: 52px; color: var(--muted); flex-shrink: 0; }
.bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bar-fill.before { background: #475569; }
.bar-fill.after { background: linear-gradient(90deg, var(--brand), var(--brand2)); }

.result-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.download-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px var(--brand-glow);
  transition: transform 0.15s;
}
.download-btn:hover { transform: translateY(-1px); color: white; }
.result-note { margin: 0; color: var(--muted); font-size: 0.82rem; }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  padding: 0.35rem 0 0.35rem 1.5rem;
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}

.mini-post {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mini-post:last-of-type { border-bottom: none; }
.mini-cat { display: block; font-size: 0.72rem; color: var(--brand); font-weight: 600; text-transform: uppercase; }
.mini-title { display: block; color: var(--text); font-size: 0.9rem; font-weight: 500; margin-top: 0.15rem; }
.link-more { display: inline-block; margin-top: 0.75rem; font-size: 0.88rem; font-weight: 600; }

/* Features strip */
.features-strip {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background: rgba(255,255,255,0.02);
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 800px) { .strip-grid { grid-template-columns: repeat(2, 1fr); } }
.strip-grid article { text-align: center; }
.strip-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.strip-grid h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.strip-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* Pages */
.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0.5rem 0; letter-spacing: -0.03em; }

.blog-list { padding: 1rem 0 4rem; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  min-height: 0;
}
.blog-card .blog-cover {
  display: block;
  flex: 0 0 auto;
  margin-bottom: 0.75rem;
}
.blog-card .blog-cat { flex: 0 0 auto; }
.blog-card h2 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.3em;
}
.blog-card h2 a { color: var(--text); }
.blog-card h3 { margin: 0.5rem 0; font-size: 1.05rem; line-height: 1.35; color: var(--text); }
.blog-card .blog-excerpt,
.blog-card > p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 0.75rem;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
}
.blog-card .blog-meta {
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: 0;
}
.blog-card .read-link {
  flex: 0 0 auto;
  margin-top: 0.65rem;
}
.blog-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.blog-cover {
  display: block;
  margin: 0 0 0.85rem;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #12161e;
  border: 1px solid var(--border);
}
.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-cover-hero {
  margin: 1rem 0 1.25rem;
  border-radius: 16px;
}
.blog-grid-home .blog-card { padding: 1rem; }
.blog-grid-home {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .blog-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .blog-grid-home {
    grid-template-columns: 1fr;
  }
}
.blog-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
}
.blog-meta { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.read-link { font-weight: 600; font-size: 0.9rem; }
@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-article { padding: 1rem 0 4rem; max-width: 760px; }
.article-header { margin-bottom: 2rem; }
.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }
.article-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.03em; }
.article-cta { margin-top: 2.5rem; text-align: center; }
.article-cta h3 { margin-top: 0; }

.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose p, .prose li { color: #cbd5e1; }
.prose code { background: rgba(255,255,255,0.06); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.9em; }

.features-page { padding: 1rem 0 4rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.feature-card { text-align: center; }
.feature-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.feature-card h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.cta-banner { text-align: center; padding: 2.5rem; }
.cta-banner h2 { margin: 0 0 1.25rem; }

.about-page { padding: 1rem 0 4rem; max-width: 760px; }
.content-wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 4rem;
}
.content-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 1.75rem);
  backdrop-filter: blur(12px);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.page-hero .lead {
  max-width: 40rem;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  line-height: 1.55;
}
.page-hero h1 {
  font-size: clamp(1.45rem, 5.5vw, 2.6rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.prose h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  line-height: 1.25;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
  color: #cbd5e1;
  font-size: clamp(0.92rem, 2.6vw, 1rem);
  line-height: 1.65;
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}
.prose li { margin: 0.4rem 0; }
.prose a { word-break: break-word; }
.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.about-cta-row .btn-primary,
.about-cta-row .btn-ghost {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contact-card {
  padding: clamp(1rem, 3.5vw, 1.35rem);
}
.contact-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.contact-card p { margin: 0.25rem 0; }
.contact-card .muted,
.contact-cta .muted { color: var(--muted); font-size: 0.9rem; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.why-card {
  padding: 1.15rem 1.25rem;
}
.why-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}
.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.howto-block,
.intro-block,
.contact-cta {
  padding: clamp(1rem, 3.5vw, 1.4rem);
}
.intro-block p { color: var(--muted); }
html[data-theme="light"] .prose p,
html[data-theme="light"] .prose li {
  color: var(--muted);
}
.ad-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.ad-slot { margin: 1rem 0; text-align: center; }
.ad-slot:empty { display: none; margin: 0; }
.ad-sidebar { min-height: 0; }
.ad-top, .ad-bottom { min-height: 0; }

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
  background: rgba(0,0,0,0.25);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { font-size: 1.1rem; }
.site-footer p { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.site-footer h4 { margin: 0 0 0.75rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.site-footer a { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer-stats { font-size: 0.85rem !important; }
.footer-bottom {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  min-height: 5rem;
}
.footer-copy { color: var(--muted); font-size: 0.82rem; position: relative; z-index: 1; }
.footer-panda {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: auto;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  user-select: none;
  opacity: 0.68;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.22));
  transition: width 0.2s ease, opacity 0.2s ease;
}
html[data-theme="light"] .footer-panda {
  opacity: 0.55;
  filter: drop-shadow(0 4px 14px rgba(30, 20, 10, 0.14));
}
.footer-panda--s { width: 64px; }
.footer-panda--m { width: 96px; }
.footer-panda--l { width: 140px; }
.footer-panda--off { display: none; }
.footer-panda-controls,
.footer-panda-label,
.footer-panda-btn {
  display: none !important;
}
@media (max-width: 480px) {
  .footer-panda--l { width: 96px; }
  .footer-panda--m { width: 72px; }
  .footer-panda--s { width: 48px; }
}

.hidden { display: none !important; }
.legal { padding: 2rem 0 4rem; }

/* AI Chat */
.chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  font-size: 1.4rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 8px 28px var(--brand-glow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.chat-fab.is-dragging {
  cursor: grabbing;
  box-shadow: 0 12px 32px var(--brand-glow);
  transform: scale(1.04);
}
.chat-fab.is-placed {
  transition: none;
  right: auto;
  bottom: auto;
}
.chat-panel {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 61;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(480px, 70vh);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.chat-head strong { display: block; font-size: 0.95rem; }
.chat-head small { color: var(--muted); font-size: 0.75rem; }
.chat-head button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chat-msg {
  max-width: 88%;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
}
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}
html[data-theme="light"] .chat-msg.bot {
  background: rgba(20, 24, 32, 0.05);
}
.chat-msg.thinking { opacity: 0.7; font-style: italic; }
.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  outline: none;
}
.chat-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  cursor: pointer;
}

@media (max-width: 960px) {
  .logo-text small { display: none; }
  .header-nav > a { padding: 0.35rem 0.5rem; font-size: 0.82rem; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; }
  .header-nav {
    display: none !important;
  }
  .nav-more { width: 100%; }
  .nav-more-btn {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
  }
  .nav-more-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 0.5rem;
    min-width: 0;
  }
  .nav-more.is-open .nav-more-menu[hidden],
  .nav-more.is-open .nav-more-menu { display: flex !important; }
  .site-header .container { position: relative; }
}
@media (max-width: 768px) {
  .logo-text small { display: none; }
}

/* ========== Fah Swe Tools hub / app shell (appended) ========== */
body.with-tabbar {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.footer-note { font-size: 0.82rem !important; opacity: 0.85; }

/* Mobile bottom tab bar */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
}
.mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  text-decoration: none;
  border-radius: 12px;
}
.mobile-tabbar a .tab-ico { font-size: 1.05rem; line-height: 1; opacity: 0.9; }
.mobile-tabbar a.active,
.mobile-tabbar a:hover {
  color: var(--text);
  background: rgba(255, 107, 74, 0.12);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  color: var(--muted);
  font-size: 0.88rem;
}
@media (min-width: 769px) {
  .cookie-banner { bottom: 1.5rem; left: 1.5rem; right: auto; }
}

/* Hub hero — Google-structured centered column + soft mesh */
.hub-hero {
  position: relative;
  isolation: isolate;
  min-height: min(62vh, 520px);
  padding: clamp(2.25rem, 6vw, 4rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.spider-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  display: none; /* bubble snow replaces spider on hub */
}

/* Animated soft mesh — transform/opacity/background-position only */
.hero-mesh {
  position: absolute;
  inset: -12% -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 48% at 18% 22%, rgba(255, 107, 74, 0.22), transparent 62%),
    radial-gradient(ellipse 48% 42% at 82% 28%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 44% at 52% 88%, rgba(56, 189, 248, 0.14), transparent 58%),
    radial-gradient(ellipse 40% 36% at 70% 70%, rgba(255, 61, 142, 0.08), transparent 55%);
  background-size: 140% 140%;
  background-position: 30% 40%;
  animation: hero-mesh-shift 22s ease-in-out infinite alternate;
  will-change: background-position, opacity;
}
html[data-theme="light"] .hero-mesh {
  background:
    radial-gradient(ellipse 55% 48% at 18% 22%, rgba(232, 90, 58, 0.16), transparent 62%),
    radial-gradient(ellipse 48% 42% at 82% 28%, rgba(13, 148, 136, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 44% at 52% 88%, rgba(14, 165, 233, 0.1), transparent 58%),
    radial-gradient(ellipse 40% 36% at 70% 70%, rgba(15, 118, 110, 0.06), transparent 55%);
  background-size: 140% 140%;
}
@keyframes hero-mesh-shift {
  0% { background-position: 22% 35%; opacity: 0.85; }
  50% { background-position: 55% 48%; opacity: 1; }
  100% { background-position: 78% 42%; opacity: 0.9; }
}

.hub-hero::before {
  content: none;
}
.hub-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5rem;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

/* Soft geometric glows */
.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  border-radius: 40%;
  opacity: 0.5;
  animation: hero-glow-drift 28s ease-in-out infinite;
  will-change: transform, opacity;
}
.hero-glow-1 {
  width: min(42vw, 22rem);
  height: min(28vw, 14rem);
  top: 4%;
  left: 8%;
  background: radial-gradient(ellipse at 40% 40%, rgba(255, 107, 74, 0.18), transparent 70%);
  animation-duration: 32s;
}
.hero-glow-2 {
  width: min(36vw, 18rem);
  height: min(26vw, 12rem);
  top: 10%;
  right: 6%;
  background: radial-gradient(ellipse at 55% 45%, rgba(45, 212, 191, 0.14), transparent 72%);
  animation-duration: 36s;
  animation-delay: -10s;
}
.hero-glow-3 {
  width: min(48vw, 24rem);
  height: min(22vw, 11rem);
  bottom: 6%;
  left: 30%;
  background: radial-gradient(ellipse at 50% 50%, rgba(56, 189, 248, 0.1), transparent 68%);
  animation-duration: 40s;
  animation-delay: -18s;
}
@keyframes hero-glow-drift {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.4; }
  50% { transform: translate3d(0, -12px, 0); opacity: 0.62; }
}

/* Bubble snow — two layers of box-shadow circles (cheap, GPU-friendly) */
.bubble-snow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bubble-snow-layer {
  position: absolute;
  left: 0;
  top: -8%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  will-change: transform;
}
.bubble-snow-a {
  box-shadow:
    6vw 8vh 0 0 rgba(255, 255, 255, 0.18),
    14vw 22vh 0 1px rgba(255, 107, 74, 0.22),
    22vw 12vh 0 0 rgba(45, 212, 191, 0.2),
    30vw 38vh 0 1px rgba(56, 189, 248, 0.18),
    38vw 18vh 0 0 rgba(255, 255, 255, 0.14),
    46vw 48vh 0 0 rgba(255, 107, 74, 0.16),
    54vw 10vh 0 1px rgba(45, 212, 191, 0.18),
    62vw 32vh 0 0 rgba(255, 255, 255, 0.12),
    70vw 55vh 0 0 rgba(56, 189, 248, 0.16),
    78vw 16vh 0 1px rgba(255, 107, 74, 0.14),
    86vw 42vh 0 0 rgba(45, 212, 191, 0.15),
    10vw 60vh 0 0 rgba(255, 255, 255, 0.1),
    26vw 70vh 0 1px rgba(56, 189, 248, 0.14),
    50vw 68vh 0 0 rgba(255, 107, 74, 0.12),
    88vw 62vh 0 0 rgba(255, 255, 255, 0.11),
    18vw 44vh 0 0 rgba(45, 212, 191, 0.12);
  animation: bubble-snow-drift 28s linear infinite;
  opacity: 0.85;
}
.bubble-snow-b {
  width: 5px;
  height: 5px;
  box-shadow:
    8vw 14vh 0 0 rgba(255, 255, 255, 0.12),
    18vw 36vh 0 0 rgba(56, 189, 248, 0.16),
    28vw 8vh 0 1px rgba(255, 107, 74, 0.14),
    40vw 52vh 0 0 rgba(45, 212, 191, 0.14),
    52vw 24vh 0 0 rgba(255, 255, 255, 0.1),
    64vw 46vh 0 0 rgba(255, 107, 74, 0.12),
    74vw 12vh 0 1px rgba(56, 189, 248, 0.14),
    84vw 58vh 0 0 rgba(45, 212, 191, 0.12),
    12vw 72vh 0 0 rgba(255, 255, 255, 0.08),
    34vw 64vh 0 0 rgba(255, 107, 74, 0.1),
    58vw 74vh 0 0 rgba(56, 189, 248, 0.1),
    92vw 30vh 0 0 rgba(255, 255, 255, 0.09);
  animation: bubble-snow-drift 38s linear infinite reverse;
  opacity: 0.7;
  animation-delay: -8s;
}
@keyframes bubble-snow-drift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(2vw, 18vh, 0); }
}
html[data-theme="light"] .bubble-snow-a {
  box-shadow:
    6vw 8vh 0 0 rgba(15, 23, 42, 0.08),
    14vw 22vh 0 1px rgba(232, 90, 58, 0.18),
    22vw 12vh 0 0 rgba(13, 148, 136, 0.16),
    30vw 38vh 0 1px rgba(14, 165, 233, 0.14),
    38vw 18vh 0 0 rgba(15, 23, 42, 0.06),
    46vw 48vh 0 0 rgba(232, 90, 58, 0.12),
    54vw 10vh 0 1px rgba(13, 148, 136, 0.14),
    62vw 32vh 0 0 rgba(15, 23, 42, 0.05),
    70vw 55vh 0 0 rgba(14, 165, 233, 0.12),
    78vw 16vh 0 1px rgba(232, 90, 58, 0.1),
    86vw 42vh 0 0 rgba(13, 148, 136, 0.1),
    10vw 60vh 0 0 rgba(15, 23, 42, 0.05),
    26vw 70vh 0 1px rgba(14, 165, 233, 0.1),
    50vw 68vh 0 0 rgba(232, 90, 58, 0.08),
    88vw 62vh 0 0 rgba(15, 23, 42, 0.04),
    18vw 44vh 0 0 rgba(13, 148, 136, 0.08);
}
html[data-theme="light"] .bubble-snow-b {
  opacity: 0.55;
}

@media (max-width: 720px) {
  .hero-glow-3 { display: none; }
  .hero-glow-1,
  .hero-glow-2 { opacity: 0.28; animation: none; }
  .bubble-snow { display: none; }
  .hero-mesh { animation: none; opacity: 0.65; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-glow,
  .hero-mesh,
  .bubble-snow-layer {
    animation: none !important;
  }
  .hero-glow { opacity: 0.3; }
  .hero-mesh { opacity: 0.7; background-position: 40% 40%; }
  .bubble-snow { opacity: 0.35; }
}
/* Pause decorative motion while the user is scrolling (smoother scroll) */
body.is-scrolling .bubble-snow,
body.is-scrolling .hero-glow,
body.is-scrolling .hero-mesh {
  animation-play-state: paused !important;
}
.bubble-snow-layer,
.hero-glow {
  will-change: auto;
}
body.page-perf-lite .bubble-snow-b,
body.page-perf-lite .hero-glow-3 {
  display: none;
}
body.page-perf-lite .bubble-snow-a {
  animation-duration: 42s;
  opacity: 0.45;
}
body.page-perf-lite .hero-mesh {
  animation: none;
  opacity: 0.65;
}

/* Soft transparent panda — decorative, behind copy */
.hero-panda {
  position: absolute;
  right: clamp(-1rem, 4vw, 3.5rem);
  bottom: -0.35rem;
  z-index: 1;
  width: min(32vw, 260px);
  height: auto;
  max-height: 72%;
  object-fit: contain;
  object-position: bottom right;
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
}
html[data-theme="light"] .hero-panda {
  opacity: 0.2;
  filter: drop-shadow(0 8px 20px rgba(30, 20, 10, 0.18));
}
@media (max-width: 900px) {
  .hero-panda {
    width: min(28vw, 200px);
    opacity: 0.22;
    right: -0.5rem;
  }
}
@media (max-width: 640px) {
  .hero-panda {
    display: none;
  }
}

.hub-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.hero-copy {
  min-width: 0;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.hub-kicker {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-kicker);
}
html[data-theme="light"] .hub-kicker {
  color: #0f766e;
}
.hub-brand-title {
  margin: 0;
  font-size: clamp(2.5rem, 6.4vw, 4rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--hero-title);
  text-wrap: balance;
}
.hub-brand-anim {
  display: inline-block;
  background-image: linear-gradient(
    105deg,
    #ff6b4a 0%,
    #f472b6 22%,
    #38bdf8 48%,
    #2dd4bf 72%,
    #ff6b4a 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    hub-brand-slide 0.6s cubic-bezier(0.22, 1, 0.36, 1) both,
    hub-brand-shimmer 9s ease-in-out 0.6s infinite;
}
@keyframes hub-brand-slide {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes hub-brand-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
html[data-theme="light"] .hub-brand-anim {
  background-image: linear-gradient(
    105deg,
    #e85a3a 0%,
    #db2777 22%,
    #0284c7 48%,
    #0d9488 72%,
    #e85a3a 100%
  );
}
.hub-brand-title::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin: 0.9rem auto 0;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--brand), rgba(45, 212, 191, 0.85));
}
.hub-brand-aka {
  margin: 0.75rem auto 0;
  max-width: 38rem;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--muted);
  text-wrap: balance;
}
.hub-tagline {
  margin: 1.15rem auto 0;
  max-width: 36rem;
  font-size: clamp(1.06rem, 2.2vw, 1.28rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--hero-tag);
  text-wrap: balance;
}
.hub-lead {
  margin: 1.15rem auto 0;
  max-width: 28rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
@media (prefers-reduced-motion: reduce) {
  .hub-brand-anim {
    animation: none;
    background-position: 35% 50%;
  }
}
@media (max-width: 480px) {
  .hub-hero { min-height: auto; padding-top: 1.85rem; }
}
.hub-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.4rem;
}
.hub-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hub-hero .btn-primary {
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(255, 77, 100, 0.16);
  letter-spacing: -0.01em;
}
.hub-hero .btn-ghost {
  border-radius: 10px;
  color: #d6dde8;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.hub-hero .btn-ghost:hover {
  color: #fff;
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.07);
}
html[data-theme="light"] .hub-hero .btn-ghost {
  color: var(--text);
  border-color: rgba(20, 24, 32, 0.14);
  background: rgba(255, 255, 255, 0.72);
}
html[data-theme="light"] .hub-hero .btn-ghost:hover {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.06);
}

.hub-main { padding-bottom: 3.5rem; width: 100%; }
.hub-section { margin: 2.75rem 0; width: 100%; }
.hub-section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.section-lead { color: var(--muted); margin: 0 0 1.35rem; font-size: 0.95rem; }
.hub-panel {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
}
.page-hub .why-card,
.page-hub .blog-card,
.page-hub .faq-item {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: none;
}
.page-hub .cat-card,
.page-hub .tool-card {
  backdrop-filter: none;
  background: var(--surface-solid);
  border-radius: 14px;
}
.page-hub .intro-block {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  padding: 0;
}
.page-hub .intro-block h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}
.page-hub .intro-block p {
  text-align: left;
  text-wrap: pretty;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 0.85rem;
  max-width: 46rem;
}
.page-hub .intro-block p:last-child {
  margin-bottom: 0;
}
.page-hub .intro-block a {
  color: var(--link);
  text-decoration: none;
}
.page-hub .intro-block a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.page-hub .intro-block .hub-section-head {
  margin-bottom: 0.35rem;
}
.page-hub .intro-block .section-lead {
  margin-bottom: 0.85rem;
}

.hub-searches {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
}
.hub-searches-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
}
.hub-searches-list li {
  margin: 0;
}
.hub-searches-list a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--link);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}
.hub-searches-list a:hover {
  color: var(--link-hover);
  border-color: rgba(255, 107, 74, 0.4);
  text-decoration: none;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
}
.cat-card {
  display: block;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.cat-card:hover {
  border-color: rgba(255, 107, 74, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.cat-card h3 {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: 1.05rem;
}
.cat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.cat-card-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff9f7a;
}
.cat-card-blog {
  border-color: rgba(255, 107, 74, 0.28);
  background: linear-gradient(160deg, rgba(255, 107, 74, 0.08), transparent 55%);
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (max-width: 1100px) {
  .tool-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tool-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .tool-card-grid { grid-template-columns: 1fr; }
}
.tool-card {
  display: block;
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  border-color: rgba(255, 61, 142, 0.4);
  transform: translateY(-2px);
}
.tool-card-views {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  min-width: 1.6rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #fff;
  background: rgba(12, 16, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
html[data-theme="light"] .tool-card-views {
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  border-color: rgba(15, 23, 42, 0.12);
}
.tool-card-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.tool-card-title {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1rem;
  overflow: hidden;
  max-width: 100%;
}
.tool-card-title-inner {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.tool-card-title.is-marquee .tool-card-title-inner {
  text-overflow: clip;
  padding-right: 1.25rem;
  animation: tool-title-marquee 9s linear infinite;
}
.tool-card:hover .tool-card-title.is-marquee .tool-card-title-inner,
.tool-card:focus-visible .tool-card-title.is-marquee .tool-card-title-inner {
  animation-play-state: running;
}
@keyframes tool-title-marquee {
  0% { transform: translateX(0); }
  15% { transform: translateX(0); }
  85% { transform: translateX(calc(-100% + 6.5rem)); }
  100% { transform: translateX(calc(-100% + 6.5rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .tool-card-title.is-marquee .tool-card-title-inner {
    animation: none;
    text-overflow: ellipsis;
  }
}
.tool-card h3 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1rem;
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.host-marquee {
  display: block;
  overflow: hidden;
  max-width: 100%;
}
.host-marquee > span {
  display: inline-block;
  white-space: nowrap;
  padding-right: 1.5rem;
  animation: tool-title-marquee 10s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .host-marquee > span { animation: none; }
}

.catalog-section {
  scroll-margin-top: 5.5rem;
}
.catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.catalog-head .section-lead {
  margin-bottom: 1rem;
}
.catalog-see-all {
  flex-shrink: 0;
  margin-top: 0.15rem;
  white-space: nowrap;
}

.faq-list { display: grid; gap: 0.65rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  background: rgba(22, 28, 38, 0.45);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.9rem; }
.hub-blog { margin-top: 0.75rem; }

/* Tool workspace */
.tool-workspace { margin-bottom: 1.25rem; }
.tool-fields {
  margin-top: 1rem;
}
.tool-fields.hidden { display: none; }
.tool-fields .control-row {
  flex-wrap: wrap;
}
.tool-fields input[type="number"],
.tool-fields input[type="text"],
.tool-fields input[type="url"],
.tool-fields textarea,
.tool-fields select {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  max-width: 100%;
}
.tool-fields textarea { width: 100%; resize: vertical; }
.tool-fields .field-stack {
  flex-direction: column;
  align-items: stretch;
}
.tool-fields .field-stack label { margin-bottom: 0.35rem; }
.tool-run-row {
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.file-picked {
  margin: 0.85rem 0 0;
  color: var(--ok);
  font-size: 0.88rem;
  font-weight: 600;
}
.howto-block h2,
.faq-block h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.howto-block ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.howto-block li { margin-bottom: 0.4rem; }

.result-pre {
  margin: 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: #0d1117;
  border: 1px solid var(--border);
  overflow: auto;
  max-height: 320px;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #cbd5e1;
}
.result-pre-lg { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em; }

.serp-preview {
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  text-align: left;
}
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; }
.serp-url { color: #006621; font-size: 0.82rem; margin: 0.15rem 0; }
.serp-desc { color: #4d5156; font-size: 0.88rem; }

.warn-hint { color: #b45309; }
.result-sub { font-size: 0.95rem; margin: 0.75rem 0 0.35rem; }
.diff-pre { white-space: pre-wrap; word-break: break-word; font-size: 0.82rem; }
.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  overflow: hidden;
  margin: 0.5rem 0;
}
.strength-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #16a34a);
  border-radius: inherit;
}
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.swatch {
  min-width: 4.5rem;
  padding: 1.4rem 0.4rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.palette-strip {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.og-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 480px;
  background: #fff;
  color: #111;
  text-align: left;
  margin: 0.5rem 0 1rem;
}
.og-card-media {
  aspect-ratio: 1.91 / 1;
  background: #e5e7eb;
  overflow: hidden;
}
.og-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.og-card-media-empty {
  display: grid;
  place-items: center;
  color: #6b7280;
  font-size: 0.9rem;
}
.og-card-body { padding: 0.75rem 0.9rem 1rem; }
.og-card-site {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.og-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.og-card-desc {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.4;
}
.lead-mini {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0.35rem 0 0.75rem;
}
.diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 768px) {
  .diff-grid { grid-template-columns: 1fr; }
}

.tool-page-hero { padding-bottom: 0.5rem; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.seo-body-block { margin-top: 1.25rem; }
.seo-body-block p { color: var(--muted); line-height: 1.65; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }

/* App-like mobile */
@media (max-width: 768px) {
  .mobile-tabbar { display: grid; }
  .header-nav { /* desktop nav remains behind toggle */ }
  .chat-fab:not(.is-placed) {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .chat-panel {
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  }
  .hub-hero { padding-top: 1.75rem; }
  .site-footer { margin-bottom: 0.5rem; }
  .dropzone,
  .upload-zone { min-height: 200px; }
  .upload-stage .dropzone,
  .upload-stage .upload-zone { min-height: 200px; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .hub-brand-title { font-size: clamp(2rem, 11vw, 3rem); }
  .page-hero { padding: 1.5rem 0 1rem; }
  .page-hero h1 { font-size: clamp(1.35rem, 6.5vw, 1.85rem); }
  .page-hero .lead { max-width: 100%; }
  .content-wrap { max-width: 100%; padding-bottom: 5.5rem; }
  .content-card { padding: 1.15rem 1rem; border-radius: 16px; }
  .prose, .about-page, .legal { max-width: 100%; }
  .prose ul, .prose ol { padding-left: 1.1rem; }
  .faq-item summary { min-height: 44px; }
  .btn-primary, .btn-ghost { min-height: 44px; }
  .about-cta-row { flex-direction: column; }
  .about-cta-row a { width: 100%; }
}

@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .header-inner { min-height: 64px; }
  .logo-text { font-size: 0.95rem; }
  .container { padding: 0 0.85rem; }
  .content-card { padding: 1rem 0.9rem; }
  .page-hero h1 { font-size: 1.3rem; }
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.chat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(255, 77, 100, 0.28);
}
.chat-action-btn:hover { filter: brightness(1.08); color: #fff !important; }
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--brand);
  animation: chatBlink 1s step-end infinite;
}
@keyframes chatBlink {
  50% { opacity: 0; }
}

@media (min-width: 769px) {
  body.with-tabbar { padding-bottom: 0; }
}

/* —— Random Key Generator (app-like) —— */
.keygen-hero .lead code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}
.keygen-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--link-hover); }
.keygen-engine {
  font-size: 0.85rem;
  color: var(--muted);
}
.keygen-page { padding-bottom: 5rem; }
.keygen-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0 1rem;
  margin-bottom: 0.5rem;
  scrollbar-width: none;
  position: sticky;
  top: 64px;
  z-index: 5;
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
}
.keygen-chips::-webkit-scrollbar { display: none; }
.keygen-chip {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.keygen-chip:hover { border-color: var(--brand); color: var(--link); }
.keygen-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.keygen-card {
  padding: 1.1rem 1.15rem 1.25rem;
  scroll-margin-top: 120px;
  transition: opacity 0.2s ease;
}
.keygen-card.is-loading,
.keygen-sections.is-loading { opacity: 0.55; pointer-events: none; }
.keygen-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.keygen-card-head h2 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.25;
}
.keygen-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.keygen-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.keygen-regen {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.keygen-regen:active { transform: scale(0.96); }
.keygen-group { margin-top: 0.75rem; }
.keygen-group-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.keygen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.keygen-key {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.keygen-key:hover { border-color: var(--brand); }
.keygen-key:active,
.keygen-key.copied {
  transform: scale(0.99);
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--bg));
}
.keygen-key-text {
  word-break: break-all;
  flex: 1;
  line-height: 1.35;
}
.keygen-copy-hint {
  flex: 0 0 auto;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.keygen-key.copied .keygen-copy-hint { color: var(--ok); }
.keygen-about,
.keygen-page .howto-block,
.keygen-page .faq-block,
.keygen-related {
  margin-top: 1.25rem;
}
.keygen-related-grid {
  display: grid;
  gap: 0.5rem;
}
.keygen-toast {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 0.9rem;
}
.keygen-toast.hidden { display: none; }

@media (min-width: 900px) {
  .keygen-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .keygen-card#fort-knox,
  .keygen-card#ridiculous,
  .keygen-card#wpa,
  .keygen-about {
    grid-column: 1 / -1;
  }
  .keygen-chips { top: 72px; }
}

@media (max-width: 768px) {
  .keygen-hero h1 { font-size: 1.75rem; }
  .keygen-toolbar .btn-primary,
  .keygen-toolbar .btn-ghost { flex: 1 1 auto; min-width: 42%; }
  .keygen-key { font-size: 0.8rem; border-radius: 12px; }
  .keygen-card { border-radius: 18px; }
}

/* —— Privacy Policy Generator wizard —— */
.ppg-page { padding-bottom: 5.5rem; }
.ppg-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.5rem;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 60px;
  z-index: 6;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-radius: 16px;
}
.ppg-steps::-webkit-scrollbar { display: none; }
.ppg-step {
  flex: 1 1 0;
  min-width: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.ppg-step span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  background: var(--surface-solid);
  font-size: 0.85rem;
}
.ppg-step.is-active { color: var(--text); }
.ppg-step.is-active span,
.ppg-step.is-done span {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}
.ppg-step em { font-style: normal; line-height: 1.25; max-width: 9rem; }
.ppg-card {
  padding: 1.25rem 1.15rem 1rem;
  margin-bottom: 1.25rem;
}
.ppg-panel { display: none; }
.ppg-panel.is-active { display: block; }
.ppg-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
}
.ppg-field {
  border: none;
  margin: 0 0 1.15rem;
  padding: 0;
}
.ppg-field legend,
.ppg-field > label:first-child {
  display: block;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.req { color: #ef4444; }
.ppg-hint {
  margin: 0.35rem 0 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.ppg-check,
.ppg-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.45rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  font-weight: 500;
  line-height: 1.4;
  min-height: 48px;
}
.ppg-check:has(input:checked),
.ppg-radio:has(input:checked) {
  border-color: #1d4ed8;
  background: color-mix(in srgb, #1d4ed8 10%, var(--bg));
}
.ppg-check input,
.ppg-radio input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: #1d4ed8;
  flex: 0 0 auto;
}
.ppg-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (min-width: 720px) {
  .ppg-grid { grid-template-columns: 1fr 1fr; }
}
.ppg-field input[type="text"],
.ppg-field input[type="url"],
.ppg-field input[type="email"],
.ppg-field input[type="date"],
.ppg-field input[type="number"],
.ppg-field select,
.ppg-field textarea,
.ppg-scan-row input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.ppg-field textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}
.ppg-opt {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85em;
}
.ppg-check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
@media (min-width: 640px) {
  .ppg-check-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .ppg-check-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.ppg-pro {
  margin: 1.1rem 0 1.35rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, #0f2744);
  padding: 0.35rem 0.9rem 0.9rem;
}
.ppg-pro > summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.75rem 0.15rem;
  list-style: none;
  color: var(--text);
}
.ppg-pro > summary::-webkit-details-marker { display: none; }
.ppg-pro > summary::before {
  content: "▸ ";
  color: #1d4ed8;
}
.ppg-pro[open] > summary::before { content: "▾ "; }
.ppg-scan {
  padding: 0.9rem;
  margin-bottom: 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, #1d4ed8 6%, var(--surface));
}
.ppg-scan-row {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.45rem;
}
.ppg-scan-row input { flex: 1; }
.ppg-info {
  border: 1px solid color-mix(in srgb, #1d4ed8 35%, var(--border));
  background: color-mix(in srgb, #1d4ed8 8%, var(--bg));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}
.ppg-info strong { display: block; margin-bottom: 0.25rem; color: #1d4ed8; }
.ppg-info p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.ppg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: calc(58px + env(safe-area-inset-bottom));
  background: var(--surface-solid);
  margin: 0 -1.15rem -1rem;
  padding: 0.85rem 1.15rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 4;
}
@media (min-width: 769px) {
  .ppg-nav { bottom: 0; }
}
.ppg-back {
  background: none;
  border: none;
  color: #1d4ed8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  padding: 0.4rem 0.2rem;
}
.ppg-back.hidden,
.ppg-panel .hidden,
.ppg-page .hidden { display: none !important; }
.ppg-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0;
}
.ppg-format { margin-bottom: 0.5rem; }
.ppg-preview {
  margin-top: 1rem;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  min-height: 320px;
}
.ppg-iframe {
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}
.ppg-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.ppg-disclaimer {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.ppg-about { margin-top: 1.25rem; }
.ppg-lead { color: var(--muted); }
.ppg-match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.ppg-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(29, 78, 216, 0.1);
  color: #1e3a5f;
  border: 1px solid rgba(29, 78, 216, 0.22);
}
.ppg-live-match { margin: 0.75rem 0 1rem; }
.ppg-match-report { margin: 1rem 0; padding: 1rem 1.1rem; }
.ppg-match-report h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #0f2744;
}
.ppg-match-report-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.ppg-match-report-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.55);
}
.ppg-match-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.ppg-match-evidence {
  font-size: 0.8rem;
  color: var(--muted);
}
.ppg-match-report-list a {
  font-size: 0.85rem;
  width: fit-content;
}

@media (max-width: 768px) {
  .ppg-hero h1 { font-size: 1.7rem; }
  .ppg-step em { font-size: 0.65rem; }
  .ppg-scan-row { flex-direction: column; }
  .ppg-nav .btn-primary { flex: 1; justify-content: center; }
}

/* —— My IP page —— */
.ip-page { padding-bottom: 5rem; }
.ip-hero-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
  margin-bottom: 1rem;
}
.ip-kicker {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ip-value {
  margin: 0.5rem 0 0.85rem;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ip-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.ip-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}
.ip-badge.warn { color: #f59e0b; border-color: color-mix(in srgb, #f59e0b 40%, var(--border)); }
.ip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.ip-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
}
@media (min-width: 800px) {
  .ip-grid { grid-template-columns: repeat(3, 1fr); }
}
.ip-field { padding: 1rem 1.05rem; }
.ip-field h2 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ip-field-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-word;
}
.ip-field-value.mono,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}
.wrap { white-space: pre-wrap; word-break: break-word; }
.ip-details { padding: 1.15rem; margin-bottom: 1rem; }
.ip-details h2 { margin-top: 0; }
.ip-dl { margin: 0; }
.ip-dl > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 700px) {
  .ip-dl > div {
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: start;
  }
}
.ip-dl dt {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ip-dl dd { margin: 0; }

/* SEO tool result cards */
.seo-result-fields { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.5rem 0 0.75rem; }
.seo-result-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
@media (max-width: 560px) {
  .seo-result-row { grid-template-columns: 1fr; }
  .ip-grid { grid-template-columns: 1fr; }
}
.seo-result-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.seo-result-value { font-weight: 600; word-break: break-word; }
.seo-feedback { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.seo-feedback li { margin-bottom: 0.35rem; }
.seo-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.seo-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.seo-chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.seo-chip.no { color: var(--muted); }

/* —— UX: search, recent carousel, perf —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-search {
  display: none;
}
.header-search-toggle,
.header-search-panel {
  display: none !important;
}

.tools-search-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}
.tools-search-input:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}
.tools-search-input-lg {
  padding: 1.1rem 1.25rem 1.1rem 3.25rem;
  border-radius: 18px;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  background: var(--surface-solid);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 14px 40px rgba(0, 0, 0, 0.24);
  border-color: rgba(255, 255, 255, 0.12);
  min-height: 60px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tools-search-input-lg:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 3px rgba(45, 212, 191, 0.14),
    0 16px 42px rgba(0, 0, 0, 0.26);
}
.tools-search-input-lg::placeholder {
  color: var(--muted);
  opacity: 0.92;
  font-weight: 450;
}
html[data-theme="light"] .tools-search-input-lg {
  border-color: rgba(20, 24, 32, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 12px 32px rgba(30, 20, 10, 0.08);
}
html[data-theme="light"] .tools-search-input-lg:focus {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 0 0 3px rgba(13, 148, 136, 0.14),
    0 12px 32px rgba(30, 20, 10, 0.1);
}
.hub-search {
  position: relative;
  width: 100%;
  max-width: 44rem;
  margin: 1.75rem auto 0;
  text-align: left;
  z-index: 2;
}
.hub-search-bubbles {
  display: none;
}
.hub-search-bubble {
  display: none;
}

/* Fire round — CSS-only spinning conic border (transform only).
   `.fire-round` is the reusable, generic class for ANY search/URL field
   (home hero search, video-download URL fields, etc). `.hub-search-fire`
   is kept as an alias so the existing home hero markup needs no changes. */
.fire-round,
.hub-search-fire {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  padding: 3px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 90, 40, 0.42);
  box-shadow:
    0 0 22px rgba(255, 90, 40, 0.32),
    0 0 48px rgba(255, 160, 40, 0.18),
    0 8px 28px rgba(0, 0, 0, 0.18);
}
.fire-round::before,
.hub-search-fire::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160%;
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    #ff3d00 0%,
    #ffb300 18%,
    #ff6b00 32%,
    #ff1744 48%,
    #ffd54f 62%,
    #ff5722 78%,
    #ff3d00 100%
  );
  transform: translate(-50%, -50%);
  animation: fire-round-spin 2.8s linear infinite;
  will-change: transform;
}
.fire-round::after,
.hub-search-fire::after {
  content: none;
}
@keyframes fire-round-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.fire-round:focus-within,
.hub-search-fire:focus-within {
  box-shadow:
    0 0 28px rgba(255, 110, 40, 0.48),
    0 0 56px rgba(255, 170, 50, 0.26),
    0 10px 32px rgba(0, 0, 0, 0.2);
}
.fire-round .fire-round-field,
.fire-round .hub-search-field,
.hub-search-fire .hub-search-field {
  position: relative;
  z-index: 1;
  border-radius: 19px;
  background: var(--surface-solid);
}
.fire-round .tools-search-input-lg,
.hub-search-fire .tools-search-input-lg {
  border-color: transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 28px rgba(0, 0, 0, 0.18);
}
.fire-round .tools-search-input-lg:focus,
.hub-search-fire .tools-search-input-lg:focus {
  border-color: transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 28px rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] .fire-round,
html[data-theme="light"] .hub-search-fire {
  background: rgba(232, 90, 58, 0.34);
  box-shadow:
    0 0 20px rgba(232, 90, 58, 0.26),
    0 0 40px rgba(255, 160, 40, 0.14),
    0 8px 24px rgba(30, 20, 10, 0.08);
}
html[data-theme="light"] .fire-round .tools-search-input-lg,
html[data-theme="light"] .hub-search-fire .tools-search-input-lg {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 24px rgba(30, 20, 10, 0.08);
}
@media (prefers-reduced-motion: reduce) {
  .fire-round::before,
  .hub-search-fire::before {
    animation: none !important;
    background: conic-gradient(
      from 35deg,
      #ff6b00 0%,
      #ffd54f 35%,
      #ff3d00 70%,
      #ff6b00 100%
    );
  }
}
body.page-perf-lite .fire-round::before,
body.page-perf-lite .hub-search-fire::before {
  animation: none;
  background: conic-gradient(
    from 35deg,
    #ff6b00 0%,
    #ffd54f 35%,
    #ff3d00 70%,
    #ff6b00 100%
  );
}

/* Fire round applied to the video-download URL field (YouTube/TikTok/WeChat) */
.vdl-url-fire {
  flex: 1 1 auto;
  min-width: 0;
}
.vdl-url-fire .vdl-url-field {
  width: 100%;
  border-color: transparent;
  background: var(--surface-solid);
}
.vdl-url-fire .vdl-url-field:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.hub-search-field {
  position: relative;
  z-index: 1;
}
.hub-search-ico {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.9;
  z-index: 2;
}
.hub-search-field:focus-within .hub-search-ico {
  color: #ff8a50;
  opacity: 1;
}
.tools-search-results {
  margin-top: 0.4rem;
  max-height: min(55vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-solid);
}
.tools-search-results[hidden] { display: none !important; }
.tools-search-results-lg {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 8;
  margin-top: 0.6rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}
.tools-search-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1.05rem;
  min-height: 52px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
}
.tools-search-item:last-child { border-bottom: none; }
.tools-search-item:hover,
.tools-search-item:focus {
  background: rgba(45, 212, 191, 0.08);
  outline: none;
}
.tools-search-ico { font-size: 1.25rem; line-height: 1.2; flex-shrink: 0; }
.tools-search-meta { min-width: 0; display: grid; gap: 0.2rem; }
.tools-search-meta strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 650;
}
.tools-search-meta small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tools-search-empty {
  padding: 1rem 1.05rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-tool-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 40rem;
  margin: 1.35rem auto 0;
  text-align: left;
}
@media (max-width: 560px) {
  .hero-tool-strip { grid-template-columns: 1fr; }
  .hub-cta { flex-direction: column; align-items: center; }
  .hub-cta-btn { justify-content: center; width: 100%; max-width: 22rem; }
  .hub-search {
    max-width: none;
    margin-top: 1.45rem;
  }
  .tools-search-input-lg {
    font-size: 1.05rem;
    min-height: 52px;
    padding: 0.95rem 1.1rem 0.95rem 3.05rem;
  }
  .hub-search-ico {
    left: 1.05rem;
    width: 22px;
    height: 22px;
  }
  .tools-search-item {
    min-height: 48px;
    padding: 0.85rem 0.95rem;
  }
}
.hero-tool-chip {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 74, 0.35);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.hero-tool-chip:hover {
  border-color: rgba(255, 107, 74, 0.7);
  color: inherit;
}
.hero-tool-chip-icon { font-size: 1.35rem; line-height: 1; }
.hero-tool-chip-text { min-width: 0; display: grid; gap: 0.2rem; }
.hero-tool-chip-text strong {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.hero-tool-chip-text small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tool-card-spotlight {
  border-color: rgba(255, 107, 74, 0.4);
  background: color-mix(in srgb, var(--surface-solid) 92%, rgba(255, 107, 74, 0.12));
}

.recent-tools-section { margin-top: 0.5rem; }
.recent-tools-head {
  display: block;
  margin-bottom: 0.85rem;
}
.recent-tools-head .section-lead { margin-bottom: 0; }
.recent-tools-nav { display: none; }
.recent-tools-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  overflow: visible;
  padding: 0;
  cursor: default;
  scroll-snap-type: none;
}
@media (min-width: 560px) {
  .recent-tools-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .recent-tools-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .recent-tools-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.recent-tool-card {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.recent-tool-card:hover {
  border-color: rgba(255, 107, 74, 0.45);
  color: inherit;
}
.recent-tool-ico {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.recent-tool-body {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
  flex: 1;
}
.recent-tool-body strong,
.recent-tool-body .tool-card-title {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-tool-body small {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: capitalize;
}

.tool-card,
.cat-card,
.blog-card,
.faq-item,
.why-card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 140px;
}

/* Cheaper paint on scroll: solid surfaces, no blur/filters on small screens */
@media (max-width: 900px) {
  .site-header,
  .header-nav,
  .mobile-tabbar,
  .card-glass,
  .cat-card,
  .visual-card,
  .content-card,
  .ppg-steps {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .site-header,
  .header-nav,
  .mobile-tabbar {
    background: var(--surface-solid);
  }
  .card-glass,
  .cat-card,
  .visual-card,
  .content-card,
  .why-card,
  .blog-card,
  .faq-item {
    background: var(--surface-solid);
    box-shadow: none;
  }
  .cat-card:hover,
  .tool-card:hover {
    transform: none;
    box-shadow: none;
  }
  .bg-mesh {
    background: var(--bg);
  }
  html[data-theme="light"] .bg-mesh {
    background: var(--bg);
  }
  .hero-mesh {
    animation: none;
    opacity: 0.7;
  }
  .bubble-snow-b { display: none !important; }
  .bubble-snow-a {
    opacity: 0.45;
    animation-duration: 40s;
  }
  .spider-canvas { display: none !important; }
  .hero-glow {
    animation-duration: 40s;
  }
  .dropzone::before,
  .upload-zone::before {
    opacity: 0.2;
  }
  .upload-box {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Security / keygen / docs — solid surfaces, less paint */
body.page-perf-lite .card-glass,
body.page-perf-lite .keygen-card,
body.page-perf-lite .why-card,
body.page-perf-lite .tool-card,
body.page-perf-lite .cat-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--surface-solid);
  box-shadow: none;
}
body.page-perf-lite .bg-mesh {
  background: var(--bg);
  opacity: 0.55;
}
body.page-perf-lite .keygen-card,
body.page-perf-lite .tool-card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 280px;
}
.keygen-card.is-pending .keygen-groups:empty {
  display: none;
}
.keygen-pending {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.35rem 0 0.15rem;
}
.keygen-pending-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}
.keygen-card.is-loading .keygen-pending {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 768px) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  .logo-mark { box-shadow: none; }
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--header-bg);
  }
  .chat-fab {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

@media (min-width: 901px) {
  .site-header {
    background: color-mix(in srgb, var(--header-bg) 92%, var(--surface-solid));
  }
}

/* —— SVGA Preview (scoped) —— */
.svga-hero .lead code {
  font-size: 0.95em;
}
.svga-page {
  padding: 0.25rem 0 2.5rem;
}
.svga-privacy {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.svga-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
}
@media (max-width: 960px) {
  .svga-layout { grid-template-columns: 1fr; }
}
.svga-dropzone {
  margin-bottom: 1rem;
  min-height: 180px;
}
.svga-stage {
  padding: 1rem;
}
.svga-canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: calc(var(--radius) - 4px);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 107, 74, 0.08), transparent 55%),
    linear-gradient(160deg, rgba(18, 22, 32, 0.9), rgba(28, 34, 48, 0.75));
  border: 1px solid var(--border);
  overflow: hidden;
}
.svga-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: auto;
}
.svga-empty {
  position: absolute;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
}
.svga-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.svga-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.svga-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.svga-loop {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.svga-loop input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand2);
}
.svga-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.svga-bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.svga-bullets li { margin-bottom: 0.35rem; }
.svga-side .muted-sm,
.svga-credit {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.svga-credit {
  margin: 1.25rem 0 0;
}
.svga-credit a { color: var(--brand2); }

html[data-theme="light"] .svga-canvas-wrap {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 107, 74, 0.1), transparent 55%),
    linear-gradient(160deg, #f3f5f8, #e8ecf2);
}

@media (max-width: 600px) {
  .svga-dropzone { min-height: 160px; }
  .svga-canvas-wrap { min-height: 220px; }
  .svga-controls-row { width: 100%; }
  .svga-controls-row .btn-primary,
  .svga-controls-row .btn-ghost { flex: 1; justify-content: center; }
}

/* Video URL download tools — pro dark UI */
.vdl-page {
  --vdl-accent: #ff4d4f;
  --vdl-accent-soft: rgba(255, 77, 79, 0.14);
  --vdl-accent-glow: rgba(255, 77, 79, 0.28);
  --vdl-field-bg: rgba(8, 11, 16, 0.55);
  --vdl-field-border: rgba(255, 255, 255, 0.1);
  --vdl-field-focus: rgba(255, 77, 79, 0.45);
}
.vdl-page[data-platform="youtube"],
.vdl-workspace.vdl-platform-youtube,
.vdl-url-stage.vdl-platform-youtube {
  --vdl-accent: #ff3b30;
  --vdl-accent-soft: rgba(255, 59, 48, 0.14);
  --vdl-accent-glow: rgba(255, 59, 48, 0.32);
  --vdl-field-focus: rgba(255, 59, 48, 0.5);
}
.vdl-page[data-platform="tiktok"],
.vdl-workspace.vdl-platform-tiktok,
.vdl-url-stage.vdl-platform-tiktok {
  --vdl-accent: #25f4ee;
  --vdl-accent-soft: rgba(37, 244, 238, 0.12);
  --vdl-accent-glow: rgba(254, 44, 85, 0.28);
  --vdl-field-focus: rgba(37, 244, 238, 0.45);
}
.vdl-page[data-platform="wechat"],
.vdl-workspace.vdl-platform-wechat,
.vdl-url-stage.vdl-platform-wechat {
  --vdl-accent: #07c160;
  --vdl-accent-soft: rgba(7, 193, 96, 0.14);
  --vdl-accent-glow: rgba(7, 193, 96, 0.3);
  --vdl-field-focus: rgba(7, 193, 96, 0.5);
}
html[data-theme="light"] .vdl-page {
  --vdl-field-bg: rgba(255, 255, 255, 0.92);
  --vdl-field-border: rgba(20, 24, 32, 0.12);
}

.vdl-hero-youtube .pill.vdl-pill { background: rgba(255, 59, 48, 0.12); color: #ff6b63; }
.vdl-hero-tiktok .pill.vdl-pill { background: rgba(37, 244, 238, 0.1); color: #5ef7f2; }
.vdl-hero-wechat .pill.vdl-pill { background: rgba(7, 193, 96, 0.12); color: #34d399; }
.vdl-hero-youtube {
  --vdl-accent: #ff3b30;
  --vdl-accent-soft: rgba(255, 59, 48, 0.14);
  --vdl-field-border: rgba(255, 255, 255, 0.1);
}
.vdl-hero-tiktok {
  --vdl-accent: #25f4ee;
  --vdl-accent-soft: rgba(37, 244, 238, 0.12);
  --vdl-field-border: rgba(255, 255, 255, 0.1);
}
.vdl-hero-wechat {
  --vdl-accent: #07c160;
  --vdl-accent-soft: rgba(7, 193, 96, 0.14);
  --vdl-field-border: rgba(255, 255, 255, 0.1);
}

.vdl-legal {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}
html[data-theme="light"] .vdl-legal { background: rgba(0, 0, 0, 0.02); }

/* Solo page layout — one platform per URL, no multi-tool hub chrome */
.vdl-solo {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* Panda + rain stage adapted for URL paste (not file upload) */
.vdl-url-stage.upload-stage {
  margin: 0 0 1.5rem;
  min-height: 420px;
  padding: clamp(1.35rem, 3.5vw, 2.5rem) clamp(0.75rem, 3vw, 1.35rem);
}
.vdl-url-stage .upload-box.vdl-url-box {
  max-width: 640px;
  background: rgba(28, 32, 40, 0.9);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
}
@media (min-width: 769px) {
  .vdl-url-stage .upload-box.vdl-url-box {
    background: rgba(26, 30, 38, 0.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
html[data-theme="light"] .vdl-url-stage .upload-box.vdl-url-box {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(20, 28, 24, 0.18);
}
.vdl-url-box-inner {
  position: relative;
  padding: 1.35rem 1.25rem 1.45rem;
}
.vdl-url-stage.has-rain .upload-box {
  z-index: 2;
}
.vdl-stage-kicker {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vdl-accent);
}
.vdl-stage-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.vdl-stage-sub {
  margin: 0 0 1.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.vdl-workspace {
  position: relative;
  overflow: hidden;
}
.vdl-platform-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vdl-accent), transparent 85%);
  opacity: 0.95;
  border-radius: 16px 16px 0 0;
}
.vdl-platform-tiktok .vdl-platform-bar {
  background: linear-gradient(90deg, #25f4ee, #fe2c55 55%, transparent 90%);
}

.vdl-related-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: 1.75rem 0 0.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}
.vdl-related-label {
  font-weight: 600;
  color: var(--muted);
}
.vdl-related-footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.vdl-related-footer a:hover {
  color: var(--vdl-accent);
  border-bottom-color: var(--vdl-accent);
}
.vdl-related-sep {
  opacity: 0.45;
  user-select: none;
}

.vdl-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.vdl-url-block { margin-bottom: 0.35rem; }
.vdl-url-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}
.vdl-url-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px solid var(--vdl-field-border);
  background: var(--vdl-field-bg);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.vdl-url-field:focus-within {
  border-color: var(--vdl-accent);
  box-shadow: 0 0 0 3px var(--vdl-accent-soft), 0 0 0 1px var(--vdl-field-focus);
}
.vdl-url-field input[type="url"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
  padding: 1rem 0.35rem 1rem 1.05rem;
  border-radius: 14px;
}
.vdl-url-field input[type="url"]::placeholder { color: var(--muted); opacity: 0.72; }
.vdl-paste-btn {
  flex: 0 0 auto;
  margin: 0.4rem 0.45rem 0.4rem 0;
  padding: 0.45rem 0.85rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.vdl-paste-btn:hover {
  color: var(--text);
  border-color: var(--vdl-accent);
  background: var(--vdl-accent-soft);
}
.vdl-paste-btn:active { transform: scale(0.98); }
.vdl-fetch-btn {
  flex: 0 0 auto;
  min-width: 7.5rem;
  justify-content: center;
  border-radius: 14px !important;
  background: var(--vdl-accent) !important;
  box-shadow: 0 10px 28px var(--vdl-accent-glow) !important;
}
.vdl-platform-tiktok .vdl-fetch-btn {
  background: linear-gradient(135deg, #25f4ee, #fe2c55) !important;
  color: #0a0a0a !important;
}
.vdl-fetch-btn:disabled,
.vdl-dl-btn:disabled,
.vdl-audio-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
.vdl-url-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.vdl-status {
  margin: 0.9rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.vdl-status.is-ok {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
  color: var(--ok);
}
.vdl-status.is-err {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}
.vdl-status.is-info {
  border-color: var(--vdl-accent-soft);
  background: var(--vdl-accent-soft);
  color: var(--text);
}

/* Fetching state */
.vdl-loading {
  margin-top: 1.25rem;
  padding: 1.1rem 1.05rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .vdl-loading { background: rgba(0, 0, 0, 0.03); }
.vdl-loading-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.vdl-loading-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--vdl-accent);
  box-shadow: 0 0 0 0 var(--vdl-accent-glow);
  animation: vdl-pulse 1.6s ease-in-out infinite;
}
.vdl-loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  background: linear-gradient(
    90deg,
    var(--text) 0%,
    var(--muted) 40%,
    var(--text) 80%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: vdl-text-shimmer 2.2s ease-in-out infinite;
}
.vdl-skeleton {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1rem;
  align-items: start;
}
.vdl-skel-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}
.vdl-skel-body { display: flex; flex-direction: column; gap: 0.65rem; padding-top: 0.15rem; }
.vdl-skel-line {
  height: 0.85rem;
  border-radius: 6px;
}
.vdl-skel-title { width: 88%; height: 1.1rem; }
.vdl-skel-meta { width: 46%; }
.vdl-skel-fmt { width: 64%; margin-top: 0.35rem; height: 2.4rem; border-radius: 10px; }
.vdl-shimmer {
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.09) 45%,
    rgba(255, 255, 255, 0.04) 90%
  );
  background-size: 220% 100%;
  animation: vdl-shimmer 1.5s ease-in-out infinite;
}
html[data-theme="light"] .vdl-shimmer {
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.08) 45%,
    rgba(0, 0, 0, 0.04) 90%
  );
  background-size: 220% 100%;
}

@keyframes vdl-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); box-shadow: 0 0 0 0 var(--vdl-accent-glow); }
  50% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 8px transparent; }
}
@keyframes vdl-text-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: -100% 50%; }
}
@keyframes vdl-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes vdl-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Result reveal */
.vdl-result {
  margin-top: 1.25rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.vdl-result.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.vdl-result.is-revealed .vdl-meta-card,
.vdl-result.is-revealed .vdl-format-block,
.vdl-result.is-revealed .vdl-actions {
  animation: vdl-reveal 0.4s ease both;
}
.vdl-result.is-revealed .vdl-format-block { animation-delay: 0.06s; }
.vdl-result.is-revealed .vdl-actions { animation-delay: 0.12s; }

.vdl-meta { margin: 0; }
.vdl-meta-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1.1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] .vdl-meta-card { background: rgba(0, 0, 0, 0.03); }
.vdl-thumb-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
}
.vdl-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.vdl-result.is-revealed .vdl-thumb { transform: scale(1); }
.vdl-thumb-fallback {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, var(--vdl-accent-soft), transparent 60%),
    rgba(255, 255, 255, 0.03);
}
.vdl-thumb-fallback span {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--vdl-accent);
  opacity: 0.55;
  position: relative;
}
.vdl-thumb-fallback span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.4rem 0 0.4rem 0.65rem;
  border-color: transparent transparent transparent var(--vdl-accent);
  transform: translate(-35%, -50%);
}
.vdl-meta-copy { min-width: 0; }
.vdl-meta-title {
  margin: 0 0 0.65rem;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}
.vdl-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.vdl-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--vdl-accent-soft);
  border: 1px solid transparent;
}
.vdl-tag-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.vdl-note {
  margin: 0.7rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

.vdl-format-block { margin-top: 1.15rem; }
.vdl-select-wrap {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--vdl-field-border);
  background: var(--vdl-field-bg);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.vdl-select-wrap:focus-within {
  border-color: var(--vdl-accent);
  box-shadow: 0 0 0 3px var(--vdl-accent-soft);
}
.vdl-select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 1rem center;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  padding: 0.9rem 2.4rem 0.9rem 1rem;
  border-radius: 12px;
  cursor: pointer;
}

.vdl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.vdl-dl-btn {
  border-radius: 12px !important;
  background: var(--vdl-accent) !important;
  box-shadow: 0 10px 26px var(--vdl-accent-glow) !important;
  min-width: 9.5rem;
  justify-content: center;
}
.vdl-platform-tiktok .vdl-dl-btn {
  background: linear-gradient(135deg, #25f4ee, #fe2c55) !important;
  color: #0a0a0a !important;
}
.vdl-out { margin-top: 1.15rem; }
.vdl-done-card.vdl-done-enter {
  animation: vdl-reveal 0.35s ease both;
}
.vdl-workspace.is-fetching .vdl-url-row,
.vdl-workspace.is-downloading .vdl-actions {
  opacity: 0.72;
  pointer-events: none;
}

/* Centered, YT1s-style hero + converter layout */
.vdl-hero-centered .vdl-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.vdl-hero-centered .breadcrumbs { align-self: flex-start; }
.vdl-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0.75rem 0 0.35rem;
  font-size: 1.7rem;
  border-radius: 16px;
  background: var(--vdl-accent-soft);
  border: 1px solid var(--vdl-field-border);
}
.vdl-hero-centered h1 { max-width: 46rem; }
.vdl-hero-centered .lead { max-width: 40rem; margin-left: auto; margin-right: auto; }
.vdl-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.vdl-trust-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
html[data-theme="light"] .vdl-trust-chip { background: rgba(0, 0, 0, 0.02); }

/* Shared trust + how-it-works strip (tool / privacy / video pages) */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}
.tool-page-hero .trust-strip,
.ppg-hero .trust-strip,
.vdl-hero .trust-strip {
  justify-content: flex-start;
}
.vdl-hero-centered .trust-strip {
  justify-content: center;
}
.trust-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
html[data-theme="light"] .trust-chip { background: rgba(0, 0, 0, 0.02); }
.howto-strip {
  margin-top: 1.1rem;
  max-width: 42rem;
}
.vdl-hero-centered .howto-strip {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.howto-strip-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.howto-strip-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}
.howto-strip-steps li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}
.howto-strip-num {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent, #5b8cff);
  background: rgba(91, 140, 255, 0.12);
  border: 1px solid rgba(91, 140, 255, 0.25);
}
.vdl-trust-extra { margin-top: 0.65rem; }

/* Video vs. MP3/Audio mode toggle — same URL, no upload; picks which
   quality cards are shown (this IS the "convert to MP3" flow). */
.vdl-mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.vdl-mode-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--vdl-field-border);
  background: var(--vdl-field-bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.vdl-mode-btn:hover { border-color: var(--vdl-accent); color: var(--text); }
.vdl-mode-btn.is-active {
  border-color: var(--vdl-accent);
  background: var(--vdl-accent-soft);
  color: var(--text);
}
.vdl-mode-sub { font-weight: 600; font-size: 0.78rem; opacity: 0.75; }

/* Quality cards grid — replaces the plain <select> as the primary UI */
.vdl-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.vdl-quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 0.55rem;
}
.vdl-qcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0.7rem 0.75rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--vdl-field-border);
  background: var(--vdl-field-bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.vdl-qcard:hover {
  border-color: var(--vdl-accent);
  transform: translateY(-1px);
}
.vdl-qcard.is-active {
  border-color: var(--vdl-accent);
  background: var(--vdl-accent-soft);
  box-shadow: 0 0 0 2px var(--vdl-accent-soft);
}
.vdl-qcard-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.4rem;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0a0a0a;
  background: #9ca3af;
}
.vdl-badge-8k, .vdl-badge-4k { background: linear-gradient(135deg, #ffd166, #ff7a3c); }
.vdl-badge-2k { background: #ffd166; }
.vdl-badge-fhd { background: #86efac; }
.vdl-badge-hd { background: #93c5fd; }
.vdl-badge-sd { background: #cbd5e1; }
.vdl-badge-best { background: linear-gradient(135deg, #f0abfc, #a78bfa); }
.vdl-badge-m4a, .vdl-badge-mp3, .vdl-badge-audio { background: #67e8f9; }
.vdl-qcard-label {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}
.vdl-qcard-meta {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}
.vdl-qcard-flag {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fca5a5;
}
.vdl-qcard-warn { border-color: rgba(248, 113, 113, 0.35); }
.vdl-qcard-audio { border-style: dashed; }
.vdl-tag-hq {
  background: linear-gradient(135deg, #ffd166, #ff7a3c);
  color: #1a1210;
  font-weight: 800;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}
.field-stack input[type="url"],
.field-stack select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--bg, transparent);
  color: inherit;
  font-size: 1rem;
}
.tool-run-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.85rem 0;
}

@media (max-width: 720px) {
  .vdl-url-row { flex-direction: column; }
  .vdl-fetch-btn { width: 100%; }
  .vdl-skeleton,
  .vdl-meta-card { grid-template-columns: 1fr; }
  .vdl-skel-thumb,
  .vdl-thumb-wrap { max-width: 280px; }
}
@media (max-width: 600px) {
  .vdl-actions .btn-primary,
  .vdl-actions .btn-ghost { flex: 1; justify-content: center; }
  .vdl-url-box-inner { padding: 1.1rem 1rem 1.25rem; }
  .vdl-quality-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .vdl-loading-dot,
  .vdl-loading-text,
  .vdl-shimmer,
  .vdl-result,
  .vdl-result.is-revealed .vdl-meta-card,
  .vdl-result.is-revealed .vdl-format-block,
  .vdl-result.is-revealed .vdl-actions,
  .vdl-done-card.vdl-done-enter,
  .vdl-thumb,
  .vdl-paste-btn {
    animation: none !important;
    transition: none !important;
  }
  .vdl-loading-text {
    color: var(--text);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
  .vdl-result { opacity: 1; transform: none; }
}
body.page-perf-lite .vdl-loading-dot,
body.page-perf-lite .vdl-loading-text,
body.page-perf-lite .vdl-shimmer,
body.page-perf-lite .vdl-result.is-revealed .vdl-meta-card,
body.page-perf-lite .vdl-result.is-revealed .vdl-format-block,
body.page-perf-lite .vdl-result.is-revealed .vdl-actions,
body.page-perf-lite .vdl-done-card.vdl-done-enter {
  animation: none !important;
}
body.page-perf-lite .vdl-loading-text {
  color: var(--text);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
body.page-perf-lite .vdl-result {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ── Pro home hub (2026 redesign) ─────────────────────────── */
.page-hub .hub-main {
  padding-top: 0.25rem;
}
.hub-trust {
  margin: 1.5rem 0 0.75rem;
  padding: 0;
}
.hub-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 0.75rem 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
}
html[data-theme="light"] .hub-trust-strip {
  background: transparent;
}
.hub-trust-chip {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 0.4rem 0.85rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
html[data-theme="light"] .hub-trust-chip {
  background: rgba(255, 255, 255, 0.85);
}
.hub-section-head {
  max-width: 46rem;
  margin-bottom: 0.25rem;
}
.page-hub .hub-section {
  margin: 3.15rem 0;
}
.page-hub .hub-section h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  letter-spacing: -0.03em;
}
.page-hub .tool-card {
  position: relative;
  padding: 1.2rem 1.15rem 1.3rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.page-hub .tool-card:hover {
  transform: none;
  border-color: rgba(255, 107, 74, 0.42);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}
html[data-theme="light"] .page-hub .tool-card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.page-hub .tool-card-go {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 1.05rem;
  color: var(--brand);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.page-hub .tool-card:hover .tool-card-go {
  opacity: 1;
  transform: translateX(0);
}
.tool-card-grid-featured {
  gap: 1.1rem;
}
.page-hub .tool-card-spotlight {
  border-color: rgba(255, 107, 74, 0.35);
  background:
    linear-gradient(160deg, rgba(255, 107, 74, 0.09), transparent 55%),
    var(--surface-solid);
}

/* Essential tools — enterprise product grid (static, crawlable, mobile-first) */
.hub-suite {
  margin-top: 2.25rem;
}
.hub-suite-head {
  max-width: 40rem;
  margin-bottom: 1.25rem;
}
.hub-suite-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .hub-suite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .hub-suite-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }
}
.hub-suite-item {
  margin: 0;
  min-width: 0;
}
.hub-suite-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1rem;
  align-items: start;
  height: 100%;
  padding: 1.05rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.hub-suite-link:hover,
.hub-suite-link:focus-visible {
  border-color: rgba(255, 107, 74, 0.45);
  color: inherit;
  outline: none;
}
.hub-suite-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.35);
}
.hub-suite-item--accent .hub-suite-link {
  border-color: rgba(255, 107, 74, 0.28);
  background:
    linear-gradient(160deg, rgba(255, 107, 74, 0.07), transparent 55%),
    var(--surface-solid);
}
.hub-suite-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
html[data-theme="light"] .hub-suite-icon {
  background: rgba(15, 23, 42, 0.04);
}
.hub-suite-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.hub-suite-title {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}
.hub-suite-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-suite-cta {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--brand);
}
.hub-suite-link:hover .hub-suite-cta {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
@media (prefers-reduced-motion: reduce) {
  .hub-suite-link { transition: none; }
}
body.page-perf-lite .hub-suite-link {
  transition: border-color 0.15s ease;
}
.page-hub .cat-card {
  border-radius: 14px;
  background: var(--surface-solid);
  backdrop-filter: none;
  min-height: 100%;
}
.page-hub .cat-card:hover {
  border-color: rgba(45, 212, 191, 0.4);
}
.hub-howto-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
}
.hub-howto-list li {
  line-height: 1.5;
  color: var(--text);
}
.hub-howto-prefer {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.hub-cta-band {
  margin-top: 3.5rem;
  margin-bottom: 2rem;
}
.hub-cta-band-inner {
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 80% at 20% 0%, rgba(255, 107, 74, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 70% at 90% 100%, rgba(45, 212, 191, 0.1), transparent 50%),
    var(--surface-solid);
}
.hub-cta-band-inner h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}
.hub-cta-band-lead {
  margin: 0 auto 0.85rem;
  max-width: 32rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--hero-tag, var(--text));
}
.hub-cta-band-body {
  margin: 0 auto 1.35rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.hub-cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* Scroll reveal — opacity only (smoother scroll, less GPU work) */
.hub-reveal[data-reveal] {
  opacity: 0;
  transform: none;
  transition: opacity 0.35s ease;
  will-change: auto;
}
.hub-reveal.is-inview,
.hub-reveal[data-reveal].is-inview {
  opacity: 1;
  transform: none;
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  .hub-reveal[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .page-hub .tool-card:hover {
    transform: none;
  }
}
body.page-perf-lite .hub-reveal[data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}
body.page-perf-lite .page-hub .tool-card:hover {
  transform: none;
}

/* Google-style top navigation progress */
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-progress.is-active {
  opacity: 1;
}
.nav-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4285f4, #34a853 55%, #fbbc05);
  box-shadow: 0 0 8px rgba(66, 133, 244, 0.45);
  transition: width 0.25s ease, opacity 0.2s ease;
}

/* Thinking indicator in chat */
.chat-msg.thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.chat-thinking-dots {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
}
.chat-thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  animation: chat-think-bounce 1s ease-in-out infinite;
}
.chat-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-think-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-3px); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-thinking-dots span { animation: none; opacity: 0.55; }
}
body.page-perf-lite .chat-thinking-dots span { animation: none; }

/* Login + IP safe landing */
.login-card {
  max-width: 28rem;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.35rem;
  display: grid;
  gap: 0.85rem;
}
.login-card h2 { margin: 0; font-size: 1.2rem; }
.login-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #fff;
  color: #1f2937;
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-google:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-google-g {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #4285f4;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}
.login-note { font-size: 0.85rem; }
.login-links { font-size: 0.88rem; }
.login-links a { color: var(--accent, #ff6b4a); }

/* Company auth pages — Sign In / Sign Up */
body.page-auth .site-footer,
body.page-auth .mobile-tabbar,
body.page-auth #chat-fab,
body.page-auth #chat-panel,
body.page-auth #cookie-banner {
  display: none !important;
}
body.page-auth.with-tabbar { padding-bottom: 0; }
body.page-auth .site-header { position: sticky; }
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100vh - 4.25rem);
  max-width: 1120px;
  margin: 0 auto;
  gap: 0;
}
.auth-brand {
  padding: clamp(2rem, 5vw, 3.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(66, 133, 244, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(255, 107, 74, 0.12), transparent 50%),
    color-mix(in srgb, var(--bg) 88%, #0b1220);
  border-right: 1px solid var(--border);
}
.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  width: fit-content;
}
.auth-brand-logo img { border-radius: 50%; }
.auth-brand h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.auth-brand > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 36ch;
}
.auth-bullets {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.auth-bullets li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}
.auth-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #4285f4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}
.auth-brand-foot {
  margin-top: auto !important;
  font-size: 0.82rem !important;
  color: var(--muted) !important;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 0.85rem;
}
.auth-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4285f4;
}
.auth-card h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.auth-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.auth-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
}
.auth-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--text);
}
.auth-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, #fff);
  color: var(--text);
  font-size: 0.95rem;
}
.auth-field input:focus {
  outline: none;
  border-color: rgba(66, 133, 244, 0.65);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.18);
}
.auth-hint {
  margin: -0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.auth-error {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.88rem;
}
html[data-theme="light"] .auth-error { color: #b91c1c; }
.auth-submit {
  width: 100%;
  min-height: 2.85rem;
  border-radius: 10px;
  font-weight: 650;
}
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--border);
}
.auth-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.auth-switch {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}
.auth-switch a {
  color: #4285f4;
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-legal {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.auth-legal a { color: var(--muted); }
@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-brand {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
  }
  .auth-brand h1 { max-width: none; }
  .auth-brand-foot { margin-top: 0.5rem !important; }
}

.ip-safe-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.emoji-cipher-out {
  font-size: 1.35rem;
  line-height: 1.55;
  word-break: break-word;
}
.emoji-style-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.emoji-style-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}
.emoji-style-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.emoji-style-head strong { font-size: 0.88rem; }
.emoji-style-text {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Animated emoji library */
.ae-hero { padding-bottom: 0.75rem; }
.ae-page { padding-bottom: 3rem; }
.ae-toolbar { display: grid; gap: 0.85rem; margin-bottom: 1.25rem; }
.ae-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
}
.ae-search svg { color: var(--muted); flex-shrink: 0; }
.ae-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  min-height: 48px;
  outline: none;
}
.ae-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ae-cat {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  line-height: 1.3;
  min-height: 36px;
}
.ae-types {
  margin: 0 0 1.5rem;
}
.ae-types h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.ae-types .section-lead {
  margin: 0 0 0.9rem;
  color: var(--muted);
  max-width: 42rem;
}
.ae-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.ae-type-card {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: 1rem 1.05rem 0.95rem;
  min-height: 7.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid);
  text-decoration: none;
  color: var(--text);
}
.ae-type-card:hover,
.ae-type-card:focus-visible {
  border-color: rgba(66, 133, 244, 0.5);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.16);
}
.ae-type-ico {
  font-size: 1.7rem;
  line-height: 1;
}
.ae-type-card strong {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.ae-type-card span {
  color: var(--muted);
  font-size: 0.85rem;
}
.ae-type-card em {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--link);
  margin-top: 0.25rem;
}
.ae-tile {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 52px auto;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.7rem 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
  text-decoration: none;
  color: var(--text);
  min-height: 92px;
  content-visibility: auto;
  contain-intrinsic-size: 92px;
}
.ae-char {
  grid-area: 1 / 1;
  font-size: 1.85rem;
  line-height: 52px;
}
.ae-tile-anim {
  grid-area: 1 / 1;
  width: 52px;
  height: 52px;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}
.ae-tile.has-anim .ae-tile-anim { opacity: 1; }
.ae-tile.has-anim .ae-char { visibility: hidden; }
.ae-tile-name { grid-area: 2 / 1; }
.ae-also {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
}
.ae-cat.is-on,
.ae-cat:hover {
  color: var(--text);
  border-color: rgba(66, 133, 244, 0.45);
  background: rgba(66, 133, 244, 0.08);
}
.ae-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 1.25rem;
  align-items: start;
}
.ae-group { margin: 0 0 1.5rem; }
.ae-group h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.ae-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.55rem;
}
.ae-tile:hover,
.ae-tile.is-on {
  border-color: rgba(66, 133, 244, 0.55);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.18);
}
.ae-tile-name {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ae-panel {
  position: sticky;
  top: 4.75rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-solid);
}
.ae-panel-inner { padding: 1.1rem 1.15rem 1.25rem; display: grid; gap: 0.55rem; }
.ae-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.ae-panel { position: sticky; }
.ae-panel-inner { position: relative; }
.ae-panel-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ae-panel h2 { margin: 0; font-size: 1.25rem; padding-right: 1.5rem; }
.ae-code { margin: 0; font-size: 0.82rem; color: var(--muted); font-family: ui-monospace, monospace; }
.ae-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: color-mix(in srgb, var(--bg) 70%, #fff 8%);
  border-radius: 12px;
}
.ae-preview img { width: 180px; height: 180px; object-fit: contain; }
.ae-formats-label,
.ae-related-label { margin: 0.35rem 0 0; font-weight: 650; font-size: 0.88rem; }
.ae-downloads { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.45rem; }
.ae-downloads .btn-primary,
.ae-downloads .btn-ghost { min-height: 2.5rem; width: 100%; justify-content: center; }
.ae-lottie-url { display: grid; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); }
.ae-url-row { display: flex; gap: 0.4rem; }
.ae-url-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  font-size: 0.75rem;
}
.ae-note { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.ae-related { margin: 0; font-size: 0.88rem; line-height: 1.55; }
.ae-about { margin-top: 1.75rem; padding: 1.15rem 1.2rem; }
.ae-empty { color: var(--muted); }
@media (max-width: 980px) {
  .ae-type-grid { grid-template-columns: 1fr; }
  .ae-type-card { min-height: 0; }
  .ae-layout { grid-template-columns: 1fr; }
  .ae-panel {
    position: fixed;
    inset: auto 0 0;
    top: auto;
    z-index: 40;
    border-radius: 16px 16px 0 0;
    max-height: min(78vh, 640px);
    overflow: auto;
    box-shadow: 0 -16px 40px rgba(0,0,0,0.28);
  }
  .ae-preview { min-height: 160px; }
  .ae-preview img { width: 128px; height: 128px; }
}
@media (max-width: 720px) {
  .ae-hero h1 { font-size: clamp(1.45rem, 6.4vw, 2rem); }
  .ae-toolbar { gap: 0.65rem; }
  .ae-cats { gap: 0.35rem; }
  .ae-cat { font-size: 0.8rem; padding: 0.3rem 0.7rem; min-height: 34px; }
}
@media (max-width: 520px) {
  .ae-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .ae-char { font-size: 1.55rem; }
  .ae-tile-anim { width: 44px; height: 44px; }
  .ae-tile { grid-template-rows: 44px auto; min-height: 84px; }
  .ae-downloads { grid-template-columns: 1fr; }
  .ae-page { padding-left: 0.15rem; padding-right: 0.15rem; }
}
@media (min-width: 1280px) {
  .ae-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
@media (min-width: 1600px) {
  .ae-hero .container,
  .ae-page.container { max-width: 1560px; }
  .ae-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .ae-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }
}

/* Hub hero — quieter, faster, company-clean */
body.page-hub .bubble-snow,
body.page-hub .hero-atmosphere {
  display: none !important;
}
body.page-hub .hero-mesh {
  animation: none !important;
  opacity: 0.55;
}
body.page-hub .hub-brand-anim {
  animation: none !important;
  background-image: none !important;
  color: var(--hero-title) !important;
  -webkit-background-clip: unset;
  background-clip: unset;
}
body.page-hub .hub-search-fire {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 14px;
  overflow: visible;
}
body.page-hub .hub-search-fire::before {
  display: none !important;
  animation: none !important;
}
body.page-hub .hub-search-field {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid);
}
body.page-hub .hero-panda {
  opacity: 0.16;
  filter: none;
}
body.page-hub .hub-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 420px;
}
body.page-hub .hub-reveal[data-reveal] {
  opacity: 1;
  transition: none;
}
@media (max-width: 720px) {
  body.page-hub .hub-hero {
    min-height: auto;
    padding: 1.35rem 0 1.5rem;
  }
  body.page-hub .hub-brand-title {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }
  body.page-hub .hub-cta-btn { min-height: 44px; }
}

/* ============================================================
   Wide monitors — use the extra width instead of empty gutters
   ============================================================ */
@media (min-width: 1600px) {
  .container { max-width: 1480px; }
}
@media (min-width: 1920px) {
  .container { max-width: 1600px; padding: 0 2rem; }
}

/* ============================================================
   Home hero (hx) — split layout, category launcher, app-like mobile
   ============================================================ */
.hx {
  --hx-pad: clamp(1rem, 4vw, 2.5rem);
  position: relative;
  isolation: isolate;
  padding: clamp(2.25rem, 5.5vw, 5rem) 0 clamp(2rem, 4.5vw, 4rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hx-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 12% 0%, rgba(255, 107, 74, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 55% at 92% 20%, rgba(45, 212, 191, 0.12), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
html[data-theme="light"] .hx-bg {
  background:
    radial-gradient(ellipse 50% 60% at 12% 0%, rgba(232, 90, 58, 0.12), transparent 70%),
    radial-gradient(ellipse 45% 55% at 92% 20%, rgba(13, 148, 136, 0.1), transparent 70%),
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px) 0 0 / 56px 56px;
}
.hx-wrap {
  width: min(100% - 2 * var(--hx-pad), 1440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "panel" "stats";
  gap: clamp(1.5rem, 3.5vw, 3rem) clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hx-copy { grid-area: copy; min-width: 0; }
.hx-panel { grid-area: panel; min-width: 0; }
.hx-stats { grid-area: stats; }

.hx-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.85rem 0.38rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.hx-badge:hover { border-color: rgba(255, 107, 74, 0.45); }
.hx-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.hx-badge-arrow { color: var(--muted); }

.hx-title { margin: 1.1rem 0 0; }
.hx-brand {
  display: block;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(95deg, var(--hero-title) 0%, var(--hero-title) 45%, var(--brand) 78%, #ff3d8e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hx-h1-sub {
  display: block;
  max-width: 26ch;
  margin-top: 0.7rem;
  font-size: clamp(1.3rem, 2.3vw, 2.1rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--hero-title);
  text-wrap: balance;
}
.hx-lead {
  max-width: 58ch;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.15vw, 1.14rem);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.hub-search.hx-search {
  max-width: 42rem;
  margin: 1.6rem 0 0;
}
.hx-search-field { position: relative; }
.hx-search-ico {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}
.hx-search .tools-search-input-lg {
  padding-left: 3.2rem;
  padding-right: 3.4rem;
  border-radius: 16px;
  min-height: 58px;
}
.hx-kbd {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  min-width: 1.6rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: 600 0.78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
  pointer-events: none;
}

.hx-popular {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  min-width: 0;
}
.hx-popular-label {
  flex: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.hx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}
.hx-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.hx-chip:hover {
  border-color: rgba(255, 107, 74, 0.5);
  background: rgba(255, 107, 74, 0.08);
}
html[data-theme="light"] .hx-chip { background: #fff; }

.hx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1.35rem 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.hx-stats li { min-width: 0; }
.hx-stats strong {
  display: block;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--hero-title);
}
.hx-stats span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hx-panel {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
html[data-theme="light"] .hx-panel {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(30, 20, 10, 0.1);
}
.hx-panel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.1rem 0.25rem 0.95rem;
}
.hx-panel-dots { display: inline-flex; gap: 6px; }
.hx-panel-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}
.hx-panel-dots i:nth-child(2) { background: #febc2e; }
.hx-panel-dots i:nth-child(3) { background: #28c840; }
.hx-panel-title {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hx-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hx-cat {
  --hx-c: 255, 107, 74;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 100%;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.hx-cat:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--hx-c), 0.5);
  background: rgba(var(--hx-c), 0.07);
}
html[data-theme="light"] .hx-cat { background: #fff; }
.hx-cat--media { --hx-c: 255, 61, 142; }
.hx-cat--seo { --hx-c: 56, 189, 248; }
.hx-cat--docs { --hx-c: 245, 158, 11; }
.hx-cat--security { --hx-c: 45, 212, 191; }
.hx-cat--all { --hx-c: 167, 139, 250; }
.hx-cat-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(var(--hx-c), 0.14);
  color: rgb(var(--hx-c));
}
.hx-cat-text { display: grid; min-width: 0; }
.hx-cat-name {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
}
.hx-cat-count {
  font-size: 0.8rem;
  color: var(--muted);
}
.hx-cat-go {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}
.hx-cat:hover .hx-cat-go { transform: translateX(3px); color: rgb(var(--hx-c)); }
.hx-panel-foot {
  margin: 0.95rem 0.25rem 0.1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Desktop — two columns: copy + stats on the left, launcher on the right */
@media (min-width: 1024px) {
  .hx-wrap {
    grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
    grid-template-areas:
      "copy panel"
      "stats panel";
    align-items: start;
  }
  .hx-copy { align-self: end; }
  .hx-panel { align-self: center; }
}
@media (min-width: 1920px) {
  .hx-wrap { width: min(100% - 2 * var(--hx-pad), 1600px); }
}

@media (min-width: 721px) {
  .hx-popular { flex-wrap: wrap; gap: 0.5rem; }
  .hx-popular-label { margin-right: 0.25rem; }
  .hx-chips { display: contents; }
}

/* Tablet — single column, launcher as 3-up cards */
@media (min-width: 721px) and (max-width: 1023px) {
  .hx-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hx-cat-go { display: none; }
}

/* Phone — app-like: compact header, scrollable chips, icon launcher */
@media (max-width: 720px) {
  .hx { padding: 1.15rem 0 1.5rem; border-bottom: 0; }
  .hx-wrap { width: calc(100% - 2rem); gap: 1.35rem; }
  .hx-badge { font-size: 0.74rem; padding: 0.3rem 0.7rem 0.3rem 0.55rem; }
  .hx-title { margin-top: 0.85rem; }
  .hx-brand { font-size: clamp(2.05rem, 10vw, 2.7rem); }
  .hx-h1-sub { font-size: 1.12rem; margin-top: 0.45rem; }
  .hx-lead {
    font-size: 0.93rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hub-search.hx-search { margin-top: 1.15rem; }
  .hx-search .tools-search-input-lg {
    min-height: 52px;
    padding-right: 1rem;
    font-size: 1rem;
    border-radius: 14px;
  }
  .hx-kbd { display: none; }
  .hx-popular { margin: 0.9rem -1rem 0; }
  .hx-popular-label { display: none; }
  .hx-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 1rem 0.2rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .hx-chips::-webkit-scrollbar { display: none; }
  .hx-chip { scroll-snap-align: start; min-height: 40px; }

  .hx-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  html[data-theme="light"] .hx-panel { background: transparent; box-shadow: none; }
  .hx-panel-head { padding: 0 0 0.7rem; }
  .hx-panel-dots { display: none; }
  .hx-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
  .hx-cat {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 0.35rem 0.75rem;
    border-radius: 18px;
    text-align: center;
  }
  .hx-cat:hover { transform: none; }
  .hx-cat:active { transform: scale(0.97); }
  .hx-cat-ico {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgb(var(--hx-c)), rgba(var(--hx-c), 0.62));
    color: #fff;
    box-shadow: 0 8px 18px rgba(var(--hx-c), 0.28);
  }
  .hx-cat-text { justify-items: center; }
  .hx-cat-name { font-size: 0.84rem; }
  .hx-cat-count { font-size: 0.7rem; }
  .hx-cat-go,
  .hx-panel-foot { display: none; }

  .hx-stats {
    gap: 0.4rem;
    padding: 1rem 0 0;
  }
  .hx-stats li { text-align: center; }
  .hx-stats strong { font-size: 1.02rem; }
  .hx-stats span { font-size: 0.68rem; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-cat,
  .hx-cat-go { transition: none; }
}

/* ============================================================
   Animated emoji — pager, search view, app-like mobile toolbar
   ============================================================ */
.ae-h1-page {
  margin-left: 0.35rem;
  font-size: 0.6em;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.ae-range {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.ae-search-status {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 650;
}
.ae-search-view { margin-bottom: 1.5rem; }
.ae-tile-anim:not([src]) { visibility: hidden; }
.ae-layout:has(> .ae-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }

.ae-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.75rem 0 0.5rem;
  flex-wrap: wrap;
}
.ae-pg-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ae-pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 42px;
  min-height: 42px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
a.ae-pg:hover {
  border-color: rgba(66, 133, 244, 0.55);
  background: rgba(66, 133, 244, 0.08);
}
.ae-pg.is-on {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), #ff3d8e);
  color: #fff;
}
.ae-pg.is-disabled { opacity: 0.4; pointer-events: none; }
.ae-pg-gap { padding: 0 0.2rem; color: var(--muted); }
.ae-pg-compact { display: none; font-weight: 650; color: var(--muted); }

@media (max-width: 980px) {
  .ae-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
  .ae-type-card {
    min-height: 0;
    padding: 0.8rem 0.5rem 0.75rem;
    justify-items: center;
    text-align: center;
    border-radius: 16px;
  }
  .ae-type-card strong { font-size: 0.86rem; line-height: 1.25; }
  .ae-type-card span { font-size: 0.72rem; }
  .ae-type-card em { display: none; }
  .ae-types .section-lead { font-size: 0.9rem; }
}

@media (max-width: 720px) {
  .ae-toolbar {
    position: sticky;
    top: 56px;
    z-index: 20;
    margin: 0 calc(-1 * var(--page-pad)) 1rem;
    padding: 0.6rem var(--page-pad) 0.55rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .ae-search { min-height: 46px; border-radius: 14px; }
  .ae-search input { min-height: 44px; }
  .ae-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--page-pad));
    padding: 0 var(--page-pad) 0.1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ae-cats::-webkit-scrollbar { display: none; }
  .ae-cat { flex: none; white-space: nowrap; }
  .ae-tile { border-radius: 16px; }
  .ae-tile:active { transform: scale(0.96); }
  .ae-pg-list { display: none; }
  .ae-pg-compact { display: inline; padding: 0 0.6rem; }
  .ae-pager { justify-content: space-between; flex-wrap: nowrap; }
  .ae-pg-nav { flex: 1; min-height: 48px; }
}



/* ============================================================
   One page width for header, hero and every section (shared left edge)
   ============================================================ */
:root { --page-max: 1440px; --page-pad: clamp(1rem, 4vw, 2.5rem); }
@media (min-width: 1920px) { :root { --page-max: 1600px; } }
@media (max-width: 720px) { :root { --page-pad: 1rem; } }
.container,
.hx-wrap {
  width: min(100% - 2 * var(--page-pad), var(--page-max));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

/* ============================================================
   Header — company mega menu
   ============================================================ */
.header-nav.mm { justify-content: flex-start; margin-left: 1.25rem; }
.mm-list {
  display: flex;
  align-items: stretch;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mm-item { position: static; display: flex; }
.mm-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 56px;
  padding: 0 0.7rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}
.mm-btn::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.15s ease;
}
.mm-btn:hover,
.mm-item.is-open .mm-btn,
.mm-item.is-current .mm-btn { color: var(--text); }
.mm-item.is-open .mm-btn::after { background: var(--brand); }
.mm-item.is-current .mm-btn::after { background: color-mix(in srgb, var(--brand) 55%, transparent); }
.mm-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: 6px; }
.mm-caret { opacity: 0.6; transition: transform 0.18s ease; }
.mm-item.is-open .mm-caret { transform: rotate(180deg); }

.mm-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 70;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35);
}
html[data-theme="light"] .mm-panel { box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.18); }
.mm-panel[hidden] { display: none; }
.mm-item.is-open .mm-panel { display: block; animation: mm-in 0.16s ease-out; }
@keyframes mm-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mm-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2rem;
  padding-block: 1.6rem 1.8rem;
}
.mm-groups {
  display: grid;
  grid-template-columns: repeat(var(--mm-cols, 3), minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.mm-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.mm-group-title {
  margin: 0 0 0.55rem;
  padding-left: 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.mm-link {
  display: grid;
  gap: 0.1rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s ease;
}
.mm-link:hover,
.mm-link:focus-visible,
.mm-link.active { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.mm-link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mm-name { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.mm-link.active .mm-name { color: var(--brand); }
.mm-desc {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mm-side {
  align-self: start;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--brand) 7%, transparent);
}
.mm-side-title { margin: 0 0 0.35rem; font-weight: 700; font-size: 0.98rem; }
.mm-side-text { margin: 0 0 0.95rem; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }
.mm-side-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--brand);
  text-decoration: none;
}
.mm-side-cta:hover { color: var(--brand); text-decoration: underline; }

.header-cta {
  display: none;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}
.header-cta:hover { color: #fff; filter: brightness(1.06); }

/* Desktop mega menu from 1200px; tablet & phone use the drawer */
@media (min-width: 1440px) {
  .header-cta { display: inline-flex; }
}
@media (max-width: 1199px) {
  .header-nav.mm { display: none !important; }
  .nav-toggle { display: grid; }
}
@media (min-width: 821px) and (max-width: 1199px) {
  .mobile-drawer:not([hidden]) { display: flex !important; }
  .nav-backdrop:not([hidden]) { display: block !important; }
}
@media (min-width: 1200px) and (max-width: 1359px) {
  .mm-btn { padding: 0 0.5rem; font-size: 0.84rem; }
  .mm-btn::after { left: 0.5rem; right: 0.5rem; }
  .header-nav.mm { margin-left: 0.6rem; }
  .logo-text { display: none; }
  .mm-inner { grid-template-columns: minmax(0, 1fr) 220px; gap: 1.25rem; }
}

/* Drawer — collapsible sections */
.md-acc { border-radius: 12px; }
.md-acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.md-acc summary::-webkit-details-marker { display: none; }
.md-acc summary::after { content: "+"; font-size: 1.15rem; font-weight: 400; color: var(--muted); }
.md-acc[open] summary::after { content: "−"; }
.md-acc[open] summary { background: color-mix(in srgb, var(--text) 5%, transparent); }
.md-acc-body { display: grid; padding: 0.2rem 0 0.6rem 0.6rem; }
.md-acc-group {
  margin: 0.6rem 0.65rem 0.2rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.md-acc-body a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.md-acc-body a:hover,
.md-acc-body a.active { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.md-acc-body a.md-acc-all { color: var(--brand); font-weight: 600; }
