/* ================================================================
   JEMPOLIN — Premium Calm White (Calistoga + Inter)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  color-scheme: light;

  --bg:          #FAFAFA;
  --bg-elevated: #FFFFFF;
  --fg:          #171717;
  --fg-muted:    #525252;
  --fg-subtle:   #A3A3A3;
  --line:        #E5E5E5;
  --line-soft:   #F0F0F0;
  --accent:      #171717;
  --accent-soft: #404040;
  --ok:          #166534;
  --ok-bg:       #F0FDF4;
  --danger:      #DC2626;

  --c-bg:        var(--bg);
  --c-bg1:       var(--bg-elevated);
  --c-bg2:       var(--line-soft);
  --c-surface:   var(--bg-elevated);
  --c-surface2:  var(--line-soft);
  --c-border:    var(--line);
  --c-border2:   #D4D4D4;
  --c-text:      var(--fg);
  --c-text2:     var(--fg-muted);
  --c-text3:     var(--fg-subtle);
  --c-accent:    var(--accent);
  --c-accent-dim:var(--accent-soft);
  --c-purple:    #525252;
  --c-teal:      #525252;
  --c-ok:        var(--ok);
  --c-danger:    var(--danger);

  --g-brand:     linear-gradient(135deg, #171717 0%, #404040 100%);
  --g-card:      var(--bg-elevated);
  --g-card-hover:var(--bg-elevated);

  --s-sm:  0 1px 2px rgba(0,0,0,.04);
  --s-md:  0 8px 24px rgba(0,0,0,.06);
  --s-lg:  0 20px 50px rgba(0,0,0,.08);
  --s-xl:  0 32px 64px rgba(0,0,0,.10);

  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-pill:999px;

  --ease: cubic-bezier(.22,1,.36,1);
  --t: .22s;
  --sidebar-w: 252px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-landing { background: var(--bg); }
body.is-app, body.is-auth { background: var(--bg); }

body > * { position: relative; z-index: 1; }

a[href], button, .btn, [role="button"], .sidebar-link, .topnav-links a,
.explore-card-hit, label[for] { cursor: pointer; }

button:disabled, .btn:disabled, [disabled] { cursor: not-allowed; opacity: .45; }

h1, h2, h3, h4 {
  font-family: 'Calistoga', Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
}

p { color: var(--fg-muted); }
a { color: inherit; text-decoration: none; }
code, pre { font-family: 'JetBrains Mono', monospace; }

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ── Navbar ─────────────────────────────────────────────────── */
.topnav--bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(250,250,250,.82);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}

.topnav--bar.is-scrolled {
  background: rgba(255,255,255,.92);
  border-bottom-color: var(--line);
  box-shadow: var(--s-sm);
}

.topnav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--fg);
  flex-shrink: 0;
}

.brand-logo img { border-radius: 8px; object-fit: cover; }
.brand-logo .logo-text { color: var(--fg); }

.topnav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.topnav-links a {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--t), background var(--t);
}

.topnav-links a:hover,
.topnav-links a.active {
  color: var(--fg);
  background: var(--line-soft);
}

.topnav-actions { display: flex; align-items: center; gap: 8px; }
.topnav-toggle { display: none; margin-left: auto; }

.topnav-toggle .sidebar-icon { display: inline-flex; }

.topnav-toggle .sidebar-icon svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round;
}

.public-wrap { padding-top: var(--nav-h); min-height: 100dvh; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn, button:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
}

.btn-primary, .btn:not(.btn-ghost):not(.btn-neutral):not(.danger):not(.ghost):not(.neutral):not(.secondary) {
  background: var(--fg);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.btn-primary:hover, .btn:not(.btn-ghost):not(.btn-neutral):not(.danger):not(.ghost):not(.neutral):not(.secondary):hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--s-md);
}

.btn.secondary {
  background: var(--bg-elevated);
  color: var(--fg);
  border-color: var(--line);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--line-soft);
  border-color: var(--c-border2);
  color: var(--fg);
  transform: translateY(-1px);
}

.btn-ghost, .btn.ghost {
  background: var(--bg-elevated);
  color: var(--fg);
  border-color: var(--line);
  box-shadow: none;
}

.btn-ghost:hover, .btn.ghost:hover {
  background: var(--line-soft);
  border-color: var(--c-border2);
  transform: translateY(-1px);
}

.btn-sm, .btn.sm { height: 34px; padding: 0 16px; font-size: 13px; }
.btn-lg, .btn.lg { height: 48px; padding: 0 28px; font-size: 15px; }
.btn-xl, .btn.xl { height: 52px; padding: 0 32px; font-size: 15px; }

.btn.danger, .btn-danger {
  background: var(--danger);
  color: #fff;
}

/* Footer */
.public-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.public-footer .brand-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.public-footer .brand-footer img { width: 26px; height: 26px; border-radius: 8px; }
.public-footer p { font-size: 14px; color: var(--fg-muted); margin-top: 6px; }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--fg-muted); transition: color var(--t); }
.footer-links a:hover { color: var(--fg); }

/* ── Dashboard (compact light) ──────────────────────────────── */
.app-shell { display: flex; min-height: 100dvh; }

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand img { width: 28px; height: 28px; border-radius: 8px; }
.sidebar-section { padding: 16px 12px; flex: 1; }

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding: 0 8px;
  margin: 16px 0 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: background var(--t), color var(--t);
}

.sidebar-link .sidebar-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75;
}

.sidebar-link:hover { background: var(--line-soft); color: var(--fg); }
.sidebar-link.active { background: var(--fg); color: #fff; font-weight: 600; }
.sidebar-link.sidebar-logout { color: #B91C1C; }
.sidebar-link.sidebar-logout:hover { background: #FEF2F2; }

.sidebar-user {
  margin: 8px 12px 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
}

.sidebar-user-name { font-size: 13px; font-weight: 600; display: block; }
.sidebar-user-email { font-size: 11px; color: var(--fg-subtle); display: block; margin-top: 2px; }

.sidebar-user-balance {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,.25);
}

.sidebar-backdrop.show { display: block; }

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.app-page-title { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600; }
.app-topbar-right { display: none; }
.app-topbar-balance {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}

.app-content { flex: 1; padding: 28px; }
.mobile-toggle { display: none; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card, .card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--s-sm);
}

.stat-card { padding: 20px; }
.stat-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-subtle); margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 700; font-family: 'Inter', sans-serif; color: var(--fg); }
.stat-card-hint { font-size: 12px; color: var(--fg-subtle); margin-top: 6px; }

.card-header { padding: 20px 22px 0; display: flex; justify-content: space-between; gap: 16px; }
.card-title { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--fg-subtle); margin-top: 4px; }
.card-body { padding: 18px 22px 22px; }
.card-body-flush { padding: 0; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--line); }

.flash-wrap { margin-bottom: 20px; }
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--ok-bg);
  border: 1px solid #BBF7D0;
  color: var(--ok);
}
.flash.error { background: #FEF2F2; border-color: #FECACA; color: var(--danger); }

/* Auth */
.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--s-lg);
}

.auth-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 600; }
.auth-logo img { width: 32px; height: 32px; border-radius: 8px; }
.auth-heading { font-family: 'Calistoga', serif; font-size: 28px; margin-bottom: 8px; }
.auth-lead { font-size: 14px; color: var(--fg-muted); margin-bottom: 24px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fg-muted); }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  font-size: 14px;
  color: var(--fg);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus { border-color: var(--fg); box-shadow: 0 0 0 3px rgba(23,23,23,.08); }

.google-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 14px;
  transition: background var(--t);
}
.google-btn:hover { background: var(--line-soft); }

.google-mark {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--fg-subtle); }

/* Utilities */
.badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #BBF7D0; }

.text-muted { color: var(--fg-subtle); font-size: 13px; }
.text-sm { font-size: 14px; }
.mt-md { margin-top: 16px; }
.is-hidden { display: none !important; }
.pricing-note, .pricing-footnote { font-size: 12px; }

input, select, textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--fg);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(23,23,23,.08);
}

.code-block {
  background: #1C1C1C;
  border: 1px solid #2A2A2A;
  border-radius: var(--r-sm);
  padding: 18px 20px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #E5E5E5;
  overflow-x: auto;
}

.gradient-text {
  background: none;
  -webkit-text-fill-color: var(--fg);
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topnav-toggle { display: inline-flex; }
  .topnav-links { display: none; }
  .topnav.open .topnav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px; right: 16px;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--s-lg);
  }
  .topnav.open .topnav-links a { width: 100%; justify-content: flex-start; }
  .topnav-inner { position: relative; flex-wrap: nowrap; gap: 8px; padding: 0 16px; }
  .app-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform var(--t); }
  .sidebar.open { transform: none; }
  .mobile-toggle { display: inline-flex; }
  .app-topbar-right { display: flex; }
}

/* ================================================================
   MEDIA STUDIO (generate.php)
================================================================ */

.media-tab-nav { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.media-tab-btn {
  border: 1px solid var(--c-border2);
  background: var(--c-surface2);
  color: var(--c-text2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.media-tab-btn.active {
  background: var(--g-brand);
  color: #FFFFFF;
  border-color: transparent;
}
.media-tab-panel { display: none; }
.media-tab-panel.active { display: block; }
.media-form-aspect {
  max-width: 200px;
}
.media-form-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 4px;
}
.media-form textarea,
.media-form select {
  width: 100%;
  border: 1px solid var(--c-border2);
  background: #fff;
  color: var(--c-text);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font: inherit;
}
.media-form textarea { min-height: 110px; resize: vertical; }
.media-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.media-upload { position: relative; }
.media-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 168px;
  padding: 20px 18px;
  border: 1.5px dashed rgba(67, 94, 190, 0.35);
  border-radius: var(--r-md);
  background:
    linear-gradient(145deg, rgba(67, 94, 190, 0.06) 0%, rgba(6, 182, 212, 0.04) 100%),
    #f8fafc;
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  text-align: center;
}
.media-upload-dropzone:hover,
.media-upload-dropzone:focus-visible,
.media-upload.is-dragover .media-upload-dropzone {
  border-color: rgba(67, 94, 190, 0.7);
  background:
    linear-gradient(145deg, rgba(67, 94, 190, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%),
    #eef3fb;
  box-shadow: 0 0 0 3px rgba(67, 94, 190, 0.12);
  outline: none;
}
.media-upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(67, 94, 190, 0.14);
  color: #435ebe;
  margin-bottom: 2px;
}
.media-upload-icon svg { width: 24px; height: 24px; }
.media-upload-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}
.media-upload-hint,
.media-upload-formats {
  font-size: 11.5px;
  color: var(--c-text3);
  margin: 0;
  line-height: 1.45;
}
.media-upload-trigger {
  margin-top: 6px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(67, 94, 190, 0.45);
  border-radius: 999px;
  background: rgba(67, 94, 190, 0.12);
  color: #166534;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.media-upload-trigger:hover {
  background: rgba(67, 94, 190, 0.22);
  border-color: rgba(67, 94, 190, 0.7);
}
.media-upload-preview {
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}
.media-upload-preview-frame {
  position: relative;
  min-height: 180px;
  max-height: 280px;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.03) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.03) 75%),
    #f8fafc;
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.media-upload-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 256px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.media-upload-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--c-border);
  background: rgba(12, 18, 38, 0.9);
}
.media-upload-preview-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.media-upload-filename {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-upload-filesize { font-size: 11px; color: var(--c-text3); }
.media-upload-remove {
  flex-shrink: 0;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.media-upload-remove:hover { background: rgba(239, 68, 68, 0.2); }
.media-upload-error {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: #DC2626;
  text-align: center;
}
.media-upload.has-file .media-upload-dropzone { display: none; }
.media-upload.has-file .media-upload-preview { display: block !important; }
.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.media-preview-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface2);
  font: inherit;
  color: inherit;
  text-align: left;
}
button.media-preview-card {
  cursor: zoom-in;
}
button.media-preview-card:hover {
  border-color: rgba(67, 94, 190, 0.45);
}
.media-gallery-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--c-text3);
}
.media-preview-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f8fafc;
}
.media-preview-card video,
.media-result video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #f8fafc;
  max-height: min(520px, 72vh);
}
.media-gallery-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--c-border);
}
.media-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.media-gallery-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
}
.media-gallery-head .text-muted { font-size: 12px; }
.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 14px;
}
.media-gallery-item {
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface2);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.media-gallery-item.is-new {
  border-color: rgba(67, 94, 190, 0.65);
  box-shadow: 0 0 0 1px rgba(67, 94, 190, 0.25), 0 8px 24px rgba(67, 94, 190, 0.12);
}
.media-gallery-item.is-prompt-selected {
  border-color: rgba(67, 94, 190, 0.55);
  box-shadow: 0 0 0 1px rgba(67, 94, 190, 0.28);
}
.media-gallery-item.is-pending {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.18);
}
.media-preview-card--pending {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f8fafc;
}
.media-pending-placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.35), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(67, 94, 190, 0.25), transparent 50%),
    linear-gradient(135deg, #0b1020, #111827);
  filter: blur(10px);
  transform: scale(1.08);
}
.media-pending-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(5, 9, 18, 0.55);
  backdrop-filter: blur(2px);
}
.media-pending-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(129, 140, 248, 0.95);
  animation: media-btn-spin 0.85s linear infinite;
}
.media-pending-label {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
  text-align: center;
  line-height: 1.35;
}
.media-pending-status {
  font-size: 10.5px;
  color: rgba(148, 163, 184, 0.95);
  text-transform: capitalize;
}
.media-gallery-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--c-border);
}
.media-gallery-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}
.media-gallery-item.is-pending .media-gallery-meta,
.media-gallery-item.is-pending .media-gallery-meta-text {
  cursor: default;
}
.media-gallery-meta span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-gallery-meta time { font-size: 10.5px; color: var(--c-text3); }
.media-gallery-meta .media-download-btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.media-gallery-audio-item audio {
  width: min(100%, 420px);
}
.media-gallery-list {
  display: grid;
  gap: 12px;
}
.media-gallery-audio-item {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: rgba(21, 24, 30, 0.02);
}
.media-gallery-audio-item.is-new {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25);
}
.media-gallery-audio-item .media-gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 8px;
}
.media-gallery-empty {
  border: 1px dashed var(--c-border2);
  border-radius: var(--r-md);
  padding: 28px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--c-text3);
  background: #f8fafc;
}
.media-generating-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 7, 16, 0.78);
  backdrop-filter: blur(4px);
}
.media-generating-overlay[hidden] { display: none !important; }
.media-generating-card {
  width: min(420px, 100%);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.98), rgba(9, 14, 27, 0.98));
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
}
.media-generating-card strong {
  display: block;
  font-size: 18px;
  margin-top: 14px;
}
.media-generating-card p {
  margin: 10px 0 0;
  color: var(--c-text3);
  font-size: 13px;
  line-height: 1.5;
}
.media-generating-spinner {
  display: inline-block;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(20, 184, 166, 0.18);
  border-top-color: var(--c-teal);
  border-radius: 50%;
  animation: media-btn-spin 0.8s linear infinite;
}
.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}
.btn.is-loading .btn-label { visibility: hidden; }
.btn.is-loading .btn-spinner { display: block; }
.btn-spinner {
  display: none;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4, 18, 13, 0.2);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: media-btn-spin 0.7s linear infinite;
}
@keyframes media-btn-spin {
  to { transform: rotate(360deg); }
}

/* Mobile shell helpers */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(2, 4, 12, 0.62);
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }
.mobile-toggle { display: none; padding: 0 8px; min-width: 36px; }
.mobile-toggle .sidebar-icon { opacity: 1; }
.topnav-toggle { display: none; flex-shrink: 0; }

/* ================================================================
   RESPONSIVE
================================================================ */

@media (max-width: 1100px) {
  .bento-wide  { grid-column: span 12; }
  .bento-tall  { grid-column: span 12; }
  .bento-third { grid-column: span 6; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--t-base) var(--ease);
    width: 260px;
  }

  .sidebar.open { transform: none; }

  .mobile-toggle { display: inline-flex !important; }

  .app-main { margin-left: 0; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .grid-2,
  .grid-3,
  .two-col,
  .two-col-wide { grid-template-columns: 1fr; }

  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .card-header form,
  .card-header .btn { width: 100%; }

  .legal-container .two-col-wide { grid-template-columns: 1fr; }

  .legal-sidebar { position: static; }

  .pricing-card { grid-template-columns: 1fr; }

  .media-addon-list { width: 100%; }

  .credit-hero-row { grid-template-columns: 1fr; }

  .sub-banner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .sub-banner .text-end { text-align: left; }

  .page-meta,
  .page-meta-col { text-align: left; align-items: flex-start; }

  .bento-third { grid-column: span 12; }
  .bento-half  { grid-column: span 12; }

  .topnav {
    flex-wrap: wrap;
    height: auto;
    min-height: 54px;
    padding: 10px 12px;
    gap: 8px;
  }

  .topnav-toggle { display: inline-flex; }

  .topnav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--c-border);
  }

  .topnav-links a {
    height: auto;
    padding: 10px 12px;
    border-radius: var(--r-sm);
  }

  .topnav.open .topnav-links { display: flex; }

  .topnav-actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .auth-card { padding: 24px 20px; }

  .topnav { top: 10px; border-radius: var(--r-lg); width: calc(100vw - 20px); }
  .public-wrap { padding-top: 78px; padding-left: 10px; padding-right: 10px; }

  .hero-stats { flex-direction: column; width: 100%; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--c-border); width: 100%; }
  .hero-stat:last-child { border-bottom: none; }

  .stats-row { grid-template-columns: 1fr; }
  .package-grid { grid-template-columns: 1fr; }
  .app-content { padding: 16px; }
  .app-topbar {
    padding: 0 16px;
    min-height: 56px;
  }

  .app-page-sub { display: none; }

  .app-page-title {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70vw;
  }

  .stat-card-value { font-size: 22px; }

  .api-key-display {
    flex-direction: column;
    align-items: stretch;
  }

  .api-key-display .btn { width: 100%; justify-content: center; }

  .endpoint-item { grid-template-columns: 1fr; gap: 6px; }

  .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pagination .btn { justify-content: center; }

  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .data-table { min-width: 640px; }

  .media-form-row { grid-template-columns: 1fr; }
  .media-form-aspect { max-width: none; }

  .media-upload-preview-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .media-upload-remove { width: 100%; }

  .public-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-links { gap: 14px 18px; }

  .section-heading--center,
  .section-heading--center-sm { margin-bottom: 24px; }
}

/* ── Explore Prompt Gallery ───────────────────────────────── */
.explore-page { max-width: 1280px; margin: 0 auto; }
.explore-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.explore-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-violet);
}
.explore-heading {
  margin: 0 0 6px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--c-text);
}
.explore-lead {
  margin: 0;
  font-size: 13px;
  color: var(--c-text3);
}
.explore-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.explore-input {
  width: 100%;
  max-width: 360px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border2);
  background: var(--c-surface2);
  color: var(--c-text);
  font-size: 13px;
  outline: none;
}
.explore-input:focus {
  border-color: rgba(67, 94, 190, 0.45);
}
.explore-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.explore-page .explore-chip-btn,
.explore-page .explore-card-hit,
.explore-modal .explore-modal-x {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  line-height: 1.2;
}
.explore-page .explore-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  white-space: nowrap;
  overflow: visible;
}
.explore-page .explore-chip-btn:hover {
  border-color: rgba(67, 94, 190, 0.35);
  color: var(--c-text);
  background: #f8fafc;
  transform: none;
  box-shadow: none;
}
.explore-page .explore-chip-btn:active,
.explore-page .explore-chip-btn:focus-visible {
  transform: none;
  box-shadow: none;
  outline: 2px solid rgba(67, 94, 190, 0.35);
  outline-offset: 1px;
}
.explore-page .explore-chip-btn.is-on {
  border-color: rgba(67, 94, 190, 0.45);
  background: rgba(67, 94, 190, 0.14);
  color: #435ebe;
}
.explore-kind-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.explore-kind-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--c-border2);
  background: var(--c-surface2);
  color: var(--c-text2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.explore-kind-tab span {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--c-text3);
}
.explore-kind-tab.is-on {
  background: var(--g-brand);
  border-color: transparent;
  color: #FFFFFF;
}
.explore-kind-tab.is-on span {
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
}
.explore-top-cta.btn {
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
}
.explore-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.explore-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface2);
}
.explore-card[hidden] { display: none; }
.explore-page .explore-card-hit {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  box-shadow: none;
  transform: none;
  overflow: visible;
  gap: 0;
  white-space: normal;
}
.explore-page .explore-card-hit:hover,
.explore-page .explore-card-hit:active,
.explore-page .explore-card-hit:focus,
.explore-page .explore-card-hit:focus-visible {
  transform: none;
  box-shadow: none;
  background: transparent;
  outline: none;
}
.explore-card--video .explore-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(37, 57, 111, 0.45), transparent 45%);
  pointer-events: none;
}
.explore-card-play {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(5, 9, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  padding-left: 3px;
  pointer-events: none;
}
.explore-card-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f8fafc;
}
.explore-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.explore-card-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #0d1224, #151b2e);
}
.explore-card-ratio {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #e8eeff;
  background: rgba(5, 9, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.explore-card-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--c-border);
}
.explore-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore-card-type {
  font-size: 10.5px;
  color: var(--c-text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore-card:hover { border-color: rgba(67, 94, 190, 0.35); }
.explore-none {
  margin: 24px 0;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--c-text3);
  border: 1px dashed var(--c-border2);
  border-radius: var(--r-md);
}
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.media-lightbox[hidden] { display: none !important; }
body.media-lightbox-lock { overflow: hidden; }
.media-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(37, 57, 111, 0.75);
  cursor: zoom-out;
}
.media-lightbox-box {
  position: relative;
  width: min(920px, 100%);
  max-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg2);
  box-shadow: var(--s-lg);
}
.media-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.85);
  color: var(--c-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.media-lightbox-close:hover {
  background: rgba(67, 94, 190, 0.28);
}
.media-lightbox-preview {
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 92vh;
  overflow: auto;
}
.media-lightbox-preview img {
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}
.media-lightbox-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-left: 1px solid var(--c-border);
  min-height: 0;
  overflow: auto;
}
.media-lightbox-filename {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text2);
  word-break: break-all;
}
.media-lightbox-prompt {
  margin: 0;
  flex: 1;
  min-height: 120px;
  max-height: 42vh;
  overflow: auto;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border2);
  background: rgba(67, 94, 190, 0.06);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--c-text2);
}
.media-lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
@media (max-width: 760px) {
  .media-lightbox-box {
    grid-template-columns: 1fr;
    max-height: 94vh;
    overflow: auto;
  }
  .media-lightbox-body {
    border-left: 0;
    border-top: 1px solid var(--c-border);
  }
}
.explore-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.explore-modal[hidden] { display: none !important; }
body.explore-lock { overflow: hidden; }
.explore-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(37, 57, 111, 0.7);
}
.explore-modal-box {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1fr);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg2);
  box-shadow: var(--s-lg);
}
.explore-modal .explore-modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.8);
  color: var(--c-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.explore-modal .explore-modal-x:hover,
.explore-modal .explore-modal-x:active {
  transform: none;
  box-shadow: none;
  background: rgba(67, 94, 190, 0.25);
}
.explore-modal-preview video {
  width: 100%;
  max-height: 90vh;
  display: block;
  background: #f8fafc;
}
.explore-modal-preview {
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 90vh;
  overflow: auto;
}
.explore-modal-preview img {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}
.explore-modal-body {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-left: 1px solid var(--c-border);
  min-height: 0;
}
.explore-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.explore-tag {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--c-text2);
  background: #f8fafc;
  border: 1px solid var(--c-border);
}
.explore-tag.is-ok {
  color: #435ebe;
  border-color: rgba(67, 94, 190, 0.35);
}
.explore-tag.is-warn {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.35);
}
.explore-tag.is-link {
  color: var(--c-violet);
  text-decoration: none;
}
.explore-modal-body h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
}
.explore-modal-prompt {
  flex: 1;
  min-height: 0;
  margin: 0 0 14px;
  padding: 12px;
  max-height: 42vh;
  overflow: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: rgba(5, 9, 18, 0.55);
  color: var(--c-text2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.explore-modal-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.explore-modal-foot .explore-btn {
  flex: 1 1 140px;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  justify-content: center;
}
.explore-modal-foot .explore-btn.ghost {
  background: rgba(67, 94, 190, 0.08);
  border: 1px solid rgba(67, 94, 190, 0.22);
  color: var(--c-violet);
  box-shadow: none;
}
.explore-modal-foot .explore-btn.ghost:hover {
  transform: translateY(-1px);
  background: rgba(67, 94, 190, 0.14);
}
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.field-label-row label { margin: 0; }
.explore-inline-link {
  font-size: 12px;
  text-decoration: none;
}
.explore-inline-link:hover { color: var(--c-violet); }

.prompt-examples {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}
.prompt-examples-label {
  flex-shrink: 0;
  margin: 0;
  font-size: 11.5px;
  color: var(--c-text3);
  white-space: nowrap;
}
.prompt-examples-chips {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.prompt-examples-chips::-webkit-scrollbar {
  height: 4px;
}
.prompt-examples-chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
.prompt-example-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 30px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.prompt-example-title {
  white-space: nowrap;
}
.prompt-example-aspect {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text3);
  padding: 2px 6px;
  border-radius: 999px;
  background: #f8fafc;
}
.prompt-example-chip:hover {
  border-color: rgba(67, 94, 190, 0.35);
  color: var(--c-text);
  background: #f8fafc;
}
.prompt-example-chip:focus-visible {
  outline: 2px solid rgba(67, 94, 190, 0.35);
  outline-offset: 1px;
}
.prompt-example-chip.is-on {
  border-color: rgba(67, 94, 190, 0.45);
  background: rgba(67, 94, 190, 0.14);
  color: #435ebe;
}
.prompt-example-chip.is-on .prompt-example-aspect {
  color: #166534;
  background: rgba(67, 94, 190, 0.18);
}
@media (max-width: 768px) {
  .explore-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .explore-modal-box { grid-template-columns: 1fr; max-height: 94vh; overflow: auto; }
  .explore-modal-body { border-left: 0; border-top: 1px solid var(--c-border); }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; justify-content: center; }

  .form-actions-row .btn { width: 100%; justify-content: center; }

  .card-body,
  .card-header { padding-left: 16px; padding-right: 16px; }

  .stat-card { padding: 16px 18px; }
}

/* ================================================================
   AUTH + MEMBER — tema Mazer light (terpisah dari landing dark)
================================================================ */

body.is-auth {
  background: #f2f7ff;
}

body.is-auth .auth-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(67, 94, 190, 0.12), transparent 70%),
    #f2f7ff;
}

body.is-auth .btn:not(.btn-ghost):not(.ghost):not(.google-btn) {
  background: #435ebe;
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(67, 94, 190, 0.25);
}

body.is-auth .btn:not(.btn-ghost):not(.ghost):not(.google-btn):hover {
  filter: brightness(1.05);
  background: #435ebe;
}

body.is-auth .alert {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--r-sm);
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.auth-footer-note {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--fg-muted);
}

.auth-footer-note a {
  color: #435ebe;
  font-weight: 600;
}

.auth-footer-note a:hover { text-decoration: underline; }

.auth-submit-row { margin-top: 4px; }

body.is-app.mazer-member {
  background: #f2f7ff;
}
