/* =========================================================
   LotaMota AI Prompts — Premium Mobile-First Stylesheet
   Design inspired by the official Android application
   ========================================================= */

:root {
  /* Light theme (default) */
  --bg-body: #FFF8F8;
  --bg-card: #FFFFFF;
  --bg-header: #FFF0F0;
  --bg-search: #FFE4E8;
  --bg-nav: #FFFFFF;
  --bg-drawer: #FFFFFF;
  --bg-drawer-header: #FFF0F0;
  --bg-bottom-nav: #FFF5F7;
  --bg-input: #FFFFFF;
  --bg-skeleton: #F5E6E8;

  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted: #9A9A9A;
  --text-accent: #C41E3A;
  --text-on-accent: #FFFFFF;

  --accent: #E91E63;
  --accent-soft: #F8BBD9;
  --accent-light: #FFCDD2;
  --accent-dark: #AD1457;
  --pink-pill: #FFB6C1;
  --pink-active: #F48FB1;

  --border: #F0E0E4;
  --shadow-sm: 0 2px 8px rgba(200, 50, 80, 0.06);
  --shadow-md: 0 4px 16px rgba(200, 50, 80, 0.10);
  --shadow-lg: 0 8px 28px rgba(200, 50, 80, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --bottom-nav-height: 68px;
  --header-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-body: #121212;
  --bg-card: #1E1E1E;
  --bg-header: #1A1215;
  --bg-search: #2A1F24;
  --bg-nav: #1E1E1E;
  --bg-drawer: #1A1A1A;
  --bg-drawer-header: #22181C;
  --bg-bottom-nav: #1A1215;
  --bg-input: #2A2A2A;
  --bg-skeleton: #2A2226;

  --text-primary: #F5F5F5;
  --text-secondary: #C0C0C0;
  --text-muted: #888888;
  --text-accent: #FF6B8A;
  --text-on-accent: #FFFFFF;

  --accent: #FF4081;
  --accent-soft: #F48FB1;
  --accent-light: #AD1457;
  --accent-dark: #F8BBD9;
  --pink-pill: #C2185B;
  --pink-active: #F48FB1;

  --border: #333033;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px);
  transition: background-color var(--transition), color var(--transition);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; font-size: 16px; } /* prevent iOS zoom */

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
.text-accent { color: var(--text-accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* ========== HEADER ========== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-header);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.app-header .menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.35rem;
  transition: background var(--transition);
}
.app-header .menu-btn:hover,
.app-header .menu-btn:active { background: var(--accent-light); }
.app-header .page-title {
  font-size: 1.25rem;
  font-weight: 700;
  flex: 1;
}
.app-header .header-actions {
  display: flex;
  gap: 4px;
}
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
}

/* Desktop header */
.desktop-header {
  display: none;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.desktop-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.desktop-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.desktop-logo img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.desktop-logo .brand {
  display: flex;
  flex-direction: column;
}
.desktop-logo .brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-accent);
}
.desktop-logo .brand-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.desktop-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.desktop-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.desktop-nav a:hover,
.desktop-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ========== SEARCH ========== */
.search-wrap {
  padding: 12px 16px 8px;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-search);
  border-radius: var(--radius-full);
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.search-bar:focus-within {
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-bar i {
  color: var(--text-accent);
  font-size: 1.1rem;
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.search-bar input::placeholder {
  color: var(--text-muted);
}
.search-clear {
  color: var(--text-muted);
  font-size: 1.1rem;
  display: none;
}
.search-bar.has-value .search-clear { display: block; }

/* ========== PROMPT GRID ========== */
.prompts-container {
  padding: 8px 12px 20px;
  max-width: 1280px;
  margin: 0 auto;
}
.prompts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* Card */
.prompt-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.prompt-card:active {
  transform: scale(0.985);
}
.prompt-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-skeleton);
  display: block;
  flex-shrink: 0;
}
.prompt-card-image-wrap > img,
.prompt-card-image-wrap .swiper,
.prompt-card-image-wrap .swiper-wrapper,
.prompt-card-image-wrap .swiper-slide {
  width: 100% !important;
  height: 100% !important;
}
.prompt-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.prompt-card:hover .prompt-card-image-wrap img {
  transform: scale(1.03);
}

/* Stats overlay - always on top of image/swiper */
.prompt-stats {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 10px 8px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 42px;
  align-items: center;
  pointer-events: none;
}
.prompt-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}
.prompt-stats i { font-size: 0.95rem; opacity: 0.95; }

.prompt-card-body {
  padding: 14px 16px 16px;
  background: var(--bg-card);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.prompt-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}
.prompt-card-title a {
  color: inherit;
}
.prompt-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.prompt-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.prompt-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.95rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}
.action-btn:hover,
.action-btn:active {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
}
.action-btn.liked,
.action-btn.saved {
  background: var(--accent);
  color: #fff;
}

/* Swiper inside card */
.card-swiper {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.card-swiper .swiper-wrapper,
.card-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}
.card-swiper .swiper-pagination {
  bottom: 10px !important;
  z-index: 15;
}
.card-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.55;
}
.card-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--accent);
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-bottom-nav);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(200, 50, 80, 0.08);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  min-width: 64px;
  transition: all var(--transition);
}
.bottom-nav a i {
  font-size: 1.25rem;
  transition: transform var(--transition);
}
.bottom-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.bottom-nav a.active i {
  transform: scale(1.12);
}

/* ========== SIDE DRAWER ========== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s ease;
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}
.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: var(--bg-drawer);
  z-index: 210;
  transform: translateX(-105%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}
.side-drawer.open {
  transform: translateX(0);
}
.drawer-header {
  background: var(--bg-drawer-header);
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.drawer-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.drawer-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.drawer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-accent);
}
.drawer-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -4px;
}
.drawer-nav {
  padding: 12px 12px 24px;
  flex: 1;
}
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.98rem;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.drawer-nav a i {
  width: 22px;
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-secondary);
}
.drawer-nav a:hover,
.drawer-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.drawer-nav a:hover i,
.drawer-nav a.active i {
  color: var(--accent);
}
.drawer-nav a.drawer-download {
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.drawer-nav a.drawer-download i { color: #fff; }
.drawer-nav a.drawer-download:hover,
.drawer-nav a.drawer-download:active {
  background: var(--accent-dark);
  color: #fff;
}
.drawer-nav a.drawer-download:hover i,
.drawer-nav a.drawer-download:active i { color: #fff; }
.drawer-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.drawer-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-accent);
  padding: 6px 16px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ========== DETAILS PAGE ========== */
.details-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-height);
  background: var(--bg-header);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.details-header .back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.details-header .page-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.details-image-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-skeleton);
}
.details-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.img-full-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
}
.img-full-btn:hover,
.img-full-btn:active {
  background: rgba(0, 0, 0, 0.62);
}

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-lightbox[hidden] {
  display: none !important;
}
.img-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
}
.img-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.7);
}
.img-lightbox-swiper {
  width: 100%;
  height: 100%;
}
.img-lightbox-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-lightbox-swiper {
  width: 100%;
  height: 100%;
}
.card-lightbox-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-lightbox-swiper img,
.card-lightbox-swiper img {
  aspect-ratio: 4 / 5;
  width: min(100vw, calc(100vh * 0.8));
  height: min(100vh, calc(100vw * 1.25));
  max-width: 100vw;
  max-height: 100vh;
  object-fit: cover;
}
.img-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.img-lightbox-prev { left: 12px; }
.img-lightbox-next { right: 12px; }
.img-lightbox-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.55;
}
.img-lightbox-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--accent);
}
.details-stats {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(6px);
  border-radius: 22px;
  padding: 12px 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  align-items: center;
}
.details-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.details-content {
  padding: 18px 16px 100px;
  max-width: 640px;
  margin: 0 auto;
}
.details-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.details-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Customize section */
.customize-section {
  margin-top: 8px;
}
.customize-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.var-field {
  margin-bottom: 14px;
}
.var-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.var-field input,
.var-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}
.var-field input:focus,
.var-field select:focus {
  border-color: var(--accent);
}

.generated-preview {
  background: var(--bg-search);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}

.details-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + var(--safe-bottom));
  display: flex;
  gap: 10px;
  z-index: 95;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.details-actions .btn {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.btn-icon {
  width: 48px;
  flex: 0 0 48px;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 50%;
}
.btn-icon:hover { background: var(--accent); color: #fff; }
.btn-copy {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.btn-copy:hover { background: var(--accent); color: #fff; }
.btn-open {
  background: var(--accent);
  color: #fff;
}
.btn-open:hover { background: var(--accent-dark); }


/* When bottom nav is hidden (details page) */
body.no-bottom-nav {
  padding-bottom: 0;
}
body.no-bottom-nav .details-actions {
  bottom: 0;
}

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 20px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #1A1A1A;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s ease;
  pointer-events: auto;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success { background: #2E7D32; }
.toast.error { background: #C62828; }

/* ========== SKELETON ========== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-skeleton) 25%, #f0e0e4 50%, var(--bg-skeleton) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  height: 420px;
}
.skeleton-img {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ========== EMPTY / ERROR STATES ========== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ========== LOAD MORE ========== */
.load-more-wrap {
  text-align: center;
  padding: 16px;
}
.btn-load-more {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  transition: all var(--transition);
}
.btn-load-more:hover {
  background: var(--accent);
  color: #fff;
}

/* ========== PAGES (About, Contact, etc) ========== */
.page-content {
  padding: 20px 16px 40px;
  max-width: 720px;
  margin: 0 auto;
}
.page-content h1 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text-accent);
}
.page-content p {
  margin-bottom: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.legal-body {
  color: var(--text-secondary);
  line-height: 1.7;
}
.legal-body.is-plain { white-space: pre-wrap; }
.legal-body.is-html h2,
.legal-body.is-html h3,
.legal-body.is-html h4 {
  color: var(--text-primary);
  margin: 22px 0 10px;
  line-height: 1.3;
  font-weight: 700;
}
.legal-body.is-html h2 { font-size: 1.2rem; }
.legal-body.is-html h3 { font-size: 1.05rem; }
.legal-body.is-html h4 { font-size: 0.98rem; }
.legal-body.is-html p { margin-bottom: 12px; }
.legal-body.is-html ul,
.legal-body.is-html ol {
  margin: 0 0 14px 1.2rem;
  padding: 0;
}
.legal-body.is-html li { margin-bottom: 6px; }
.legal-body.is-html a { color: var(--accent); text-decoration: underline; }
.legal-body.is-html strong,
.legal-body.is-html b { color: var(--text-primary); }
.legal-body.is-html hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.legal-body.is-html blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-search);
  border-radius: 0 10px 10px 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}
.contact-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: block;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}
.btn-submit {
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 8px;
  transition: background var(--transition);
}
.btn-submit:hover { background: var(--accent-dark); }
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
  .prompts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .search-wrap { padding: 16px 20px 10px; }
  .prompts-container { padding: 12px 20px 24px; }
}

@media (min-width: 900px) {
  body { padding-bottom: 24px; }
  .app-header { display: none; }
  .desktop-header { display: block; }
  .bottom-nav { display: none; }
  .prompts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .details-actions {
    position: static;
    margin-top: 24px;
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
  .details-content { padding-bottom: 40px; }
}

@media (min-width: 1200px) {
  .prompts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Utility */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Desktop Legal dropdown */
.desktop-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.desktop-drop-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  font-family: inherit;
}
.desktop-drop-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.desktop-drop-menu {
  display: none !important;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
}
.desktop-dropdown:hover > .desktop-drop-menu,
.desktop-dropdown.open > .desktop-drop-menu,
.desktop-dropdown:focus-within > .desktop-drop-menu {
  display: block !important;
}
.desktop-drop-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  white-space: nowrap;
}
.desktop-drop-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* Desktop footer - always styled when shown */
.site-footer {
  display: none;
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  padding: 32px 24px 24px;
  margin-top: 48px;
  clear: both;
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.site-footer h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text-accent);
}
.site-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 320px;
}
.footer-tagline {
  font-weight: 600;
  margin-bottom: 8px;
}
.footer-info {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
}
.site-footer a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 8px;
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }
.site-footer-bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}


.var-field input.invalid {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

@media (min-width: 900px) {
  .site-footer { display: block !important; }
  body:not(.no-bottom-nav) { padding-bottom: 0; }
  .bottom-nav { display: none !important; }
}


/* Logo sizing - any source size fits correctly */
.desktop-logo img,
.drawer-logo img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.drawer-logo {
  width: 72px;
  height: 72px;
  overflow: hidden;
}
.drawer-logo img {
  width: 100%;
  height: 100%;
}

.ad-slot {
  margin: 12px auto;
  max-width: 728px;
  min-height: 0;
  text-align: center;
  overflow: hidden;
}
.ad-slot-header, .ad-slot-footer { padding: 8px 12px; }
.ad-slot-details { max-width: 480px; padding: 10px 12px 0; }
.ad-slot-feed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
}

.app-popup {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.app-popup[hidden] { display: none !important; }
.app-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
}
.app-popup-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 22px 22px 0 0;
  padding: 28px 22px 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.app-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.app-popup-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  margin: 4px auto 14px;
  box-shadow: var(--shadow-md);
}
.app-popup-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.app-popup-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; margin-bottom: 18px; }
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 18px 8px 14px;
  border-radius: 10px;
  background: #000;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}
.play-badge:hover { background: #111; filter: brightness(1.08); }
.play-badge-mark { width: 28px; height: 28px; flex-shrink: 0; }
.play-badge-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  text-align: left;
}
.play-badge-copy small {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.85;
}
.play-badge-copy strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .app-popup { align-items: center; }
  .app-popup-card { border-radius: 22px; padding: 32px 28px; }
}
