/* PromptBase visual refresh: Arabic-first, responsive and deliberately calm. */
:root {
  color-scheme: light;
  --primary-50: #f2efff;
  --primary-100: #e6e0ff;
  --primary-200: #d1c6ff;
  --primary-300: #b7a6ff;
  --primary-400: #9a83ff;
  --primary-500: #8065f5;
  --primary-600: #674bd8;
  --secondary-500: #43cfb4;
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7fb;
  --bg-elevated: #ffffff;
  --text-primary: #171927;
  --text-secondary: #535b70;
  --text-tertiary: #858ca0;
  --border-light: #e5e6ef;
  --border-medium: #d3d6e2;
  --shadow-sm: 0 2px 8px #22243b0a;
  --shadow-md: 0 12px 30px #24244012;
  --shadow-lg: 0 24px 65px #17182c1c;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 30px;
  --font-sans: "Segoe UI", Tahoma, Arial, system-ui, sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #0b0d14;
  --bg-secondary: #0b0d14;
  --bg-elevated: #121621;
  --text-primary: #f4f5fb;
  --text-secondary: #b7bdcd;
  --text-tertiary: #838b9e;
  --border-light: #252a38;
  --border-medium: #363c4d;
  --shadow-sm: 0 3px 10px #00000024;
  --shadow-md: 0 14px 34px #00000035;
  --shadow-lg: 0 28px 72px #00000058;
}

html { scroll-padding-top: 88px; }
body {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 34% at 8% 0%, #8065f50d, transparent 72%),
    radial-gradient(ellipse 42% 32% at 95% 20%, #43cfb40b, transparent 70%);
}
body[data-theme="dark"]::before {
  background:
    radial-gradient(ellipse 55% 38% at 8% -4%, #8065f526, transparent 73%),
    radial-gradient(ellipse 45% 34% at 96% 20%, #43cfb418, transparent 70%),
    linear-gradient(#ffffff03 1px, transparent 1px),
    linear-gradient(90deg, #ffffff03 1px, transparent 1px);
  background-size: auto, auto, 54px 54px, 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
::selection { background: #8065f54d; color: var(--text-primary); }
a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary-400) 72%, transparent); outline-offset: 3px; }
.container { width: min(1280px, 100%); padding-inline: 30px; }

/* Shared header and navigation */
.header {
  padding: 12px 0;
  border-bottom-color: color-mix(in srgb, var(--border-light) 72%, transparent);
  background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
  backdrop-filter: blur(22px) saturate(145%);
}
.header-content { position: relative; min-height: 48px; gap: 26px; }
.logo { gap: 11px; color: var(--text-primary); }
.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(140deg, #9c82ff, #7558eb 55%, #48d7bd);
  box-shadow: 0 8px 22px #8065f547, inset 0 1px #ffffff65;
  font-size: 19px;
  letter-spacing: -.06em;
}
.brand-word { font-size: 17px; font-weight: 800; letter-spacing: -.035em; }
.nav-menu { gap: 5px; }
.nav-menu a {
  padding: 9px 13px;
  border-radius: 11px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  transition: color .18s ease, background .18s ease;
}
.nav-menu a:hover, .nav-menu a.active {
  background: color-mix(in srgb, var(--primary-500) 12%, var(--bg-elevated));
  color: var(--primary-400);
}
.header-actions { gap: 8px; }
.theme-toggle, .auth-button, .avatar-button {
  min-height: 42px;
  border-color: var(--border-light);
  border-radius: 13px;
  background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.theme-toggle:hover, .auth-button:hover, .avatar-button:hover { border-color: var(--primary-400); transform: translateY(-1px); }
.theme-toggle { width: 42px; color: var(--text-secondary); }
.auth-button { padding-inline: 14px; font-size: 12px; }
.avatar-button.is-signed-in { width: 42px; height: 42px; }
.menu-toggle { display: none; }

/* Homepage hero */
#home.container { width: min(1280px, 100%); }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr);
  align-items: center;
  gap: clamp(30px, 6vw, 82px);
  min-height: 570px;
  padding: 64px 0 72px;
  text-align: right;
}
.hero-copy { position: relative; z-index: 2; max-width: 650px; }
.hero-eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 17px;
  color: var(--primary-400);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
}
.eyebrow-spark { color: var(--secondary-500); font-size: 17px; }
.hero-title {
  max-width: 660px;
  margin: 0 0 20px;
  font-size: clamp(44px, 6.2vw, 76px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.055em;
}
.gradient-text {
  background: linear-gradient(100deg, #9a83ff 10%, #bb9cff 55%, #54dec1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle { max-width: 560px; margin: 0 0 27px; color: var(--text-secondary); font-size: 16px; line-height: 1.95; }
.hero-actions { justify-content: flex-start; gap: 11px; }
.button {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 750;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  border: 1px solid #9b86ff66;
  background: linear-gradient(115deg, #886df8, #6b55df 58%, #45cbb3);
  color: #fff;
  box-shadow: 0 10px 26px #8065f53a, inset 0 1px #ffffff58;
}
.button-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 34px #8065f54a, inset 0 1px #ffffff69; }
.button-primary > span[aria-hidden="true"] { margin-inline-start: 8px; font-size: 16px; }
.button-secondary { border-color: var(--border-light); background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.button-secondary:hover { border-color: var(--primary-400); background: color-mix(in srgb, var(--primary-500) 7%, var(--bg-elevated)); color: var(--primary-400); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--text-tertiary); font-size: 11px; }
.hero-proof span { display: inline-flex; align-items: center; gap: 6px; }
.hero-proof i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: #43cfb41a; color: var(--secondary-500); font-size: 10px; font-style: normal; font-weight: 900; }
.hero-art { position: relative; min-width: 0; }

/* Landing page sections and category tiles */
.categories-section { padding: 19px 0 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading .section-kicker { margin-bottom: 4px; font-size: 10px; }
.section-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 34px); font-weight: 850; letter-spacing: -.04em; }
.section-heading p { margin: 5px 0 0; color: var(--text-secondary); font-size: 12px; }
.section-link { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 5px; color: var(--primary-400); font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.section-link:hover { color: var(--secondary-500); }
.section-link span { font-size: 16px; transition: transform .18s ease; }
.section-link:hover span { transform: translateX(-3px); }
.categories-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.category-card {
  min-height: 265px;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 23px 21px 19px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--bg-elevated) 92%, var(--primary-500) 8%), var(--bg-elevated) 65%);
  box-shadow: var(--shadow-sm);
  text-align: right;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.category-card::before { display: none; }
.category-card::after { position: absolute; inset: auto -42px -72px auto; width: 170px; height: 170px; border: 1px solid color-mix(in srgb, var(--primary-400) 14%, transparent); border-radius: 50%; box-shadow: 0 0 0 21px color-mix(in srgb, var(--primary-400) 3%, transparent), 0 0 0 42px color-mix(in srgb, var(--primary-400) 2%, transparent); content: ""; pointer-events: none; transition: transform .35s ease; }
.category-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--primary-400) 62%, var(--border-light)); box-shadow: var(--shadow-lg); }
.category-card:hover::after { transform: scale(1.1) translate(-8px, -8px); }
.category-icon { position: relative; z-index: 1; width: 55px; height: 55px; margin-bottom: 20px; border: 1px solid color-mix(in srgb, var(--primary-400) 18%, var(--border-light)); border-radius: 17px; background: linear-gradient(145deg, color-mix(in srgb, var(--primary-500) 18%, var(--bg-elevated)), color-mix(in srgb, var(--secondary-500) 11%, var(--bg-elevated))); color: var(--primary-400); box-shadow: inset 0 1px #ffffff18; }
.category-icon svg { width: 25px; height: 25px; }
.category-content { position: relative; z-index: 1; display: grid; align-content: start; gap: 7px; width: 100%; }
.category-card strong { font-size: 15px; font-weight: 800; }
.category-card small { margin: 0; color: var(--text-secondary); font-size: 10px; line-height: 1.8; }
.category-enter { display: inline-flex; width: fit-content; align-items: center; gap: 7px; margin-top: 15px; padding: 7px 10px; border: 1px solid var(--border-light); border-radius: 9px; color: var(--text-secondary); font-size: 9px; font-weight: 750; transition: background .2s, color .2s, border-color .2s; }
.category-arrow { position: static; color: var(--primary-400); }
.category-card:hover .category-enter { border-color: color-mix(in srgb, var(--primary-400) 45%, var(--border-light)); background: color-mix(in srgb, var(--primary-500) 11%, var(--bg-elevated)); color: var(--primary-400); }
.category-card:nth-child(2) .category-icon { border-color: #43cfb433; background: linear-gradient(145deg, #43cfb426, #43cfb40b); color: var(--secondary-500); }
.category-card:nth-child(3) .category-icon { border-color: #ffc46c33; background: linear-gradient(145deg, #ffc46c26, #ffc46c0b); color: #eab563; }
.category-card:nth-child(4) .category-icon { border-color: #ec87be33; background: linear-gradient(145deg, #ec87be26, #ec87be0b); color: #e587b9; }
.my-library { position: relative; min-height: 140px; gap: 18px; margin: 38px 0 45px; padding: 24px 27px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--primary-400) 30%, var(--border-light)); border-radius: 22px; background: linear-gradient(105deg, color-mix(in srgb, var(--bg-elevated) 94%, var(--primary-500) 6%), color-mix(in srgb, var(--bg-elevated) 90%, var(--secondary-500) 10%)); box-shadow: var(--shadow-md); }
.my-library::after { position: absolute; inset: -90px auto auto 28%; width: 260px; height: 260px; border: 1px solid #8065f51c; border-radius: 50%; box-shadow: 0 0 0 28px #8065f50a, 0 0 0 56px #43cfb408; content: ""; pointer-events: none; }
.library-spark { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border: 1px solid #8065f53d; border-radius: 16px; background: linear-gradient(145deg, #8065f526, #43cfb41b); color: var(--primary-400); font-size: 25px; }
.my-library > div { position: relative; z-index: 1; }
.my-library .section-kicker { margin: 0 0 2px; font-size: 9px; }
.my-library h2 { font-size: 17px; font-weight: 800; }
.my-library p { color: var(--text-secondary); font-size: 11px; }
.my-library .button { position: relative; z-index: 1; margin-inline-start: auto; }

/* Interior pages, search controls and cards */
.account-page, .detail-page, .static-page, .admin-page { padding-top: 40px; padding-bottom: 55px; }
.account-page h1, .detail-page h1, .static-page h1, .admin-page h1 { margin: 5px 0 6px; font-size: clamp(27px, 4vw, 42px); font-weight: 850; letter-spacing: -.045em; }
.page-lead { max-width: 740px; margin: 0 0 24px; color: var(--text-secondary); font-size: 13px; line-height: 1.9; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 7px 11px; border: 1px solid var(--border-light); border-radius: 10px; color: var(--text-secondary); font-size: 10px; text-decoration: none; transition: border-color .18s, color .18s; }
.back-link:hover { border-color: var(--primary-400); color: var(--primary-400); }
.library-toolbar { gap: 9px; margin: 21px 0 22px; }
.explore-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.explore-toolbar .search-box { grid-column: 1 / -1; }
.search-box, .library-toolbar select, .admin-controls input, .admin-controls select {
  min-height: 45px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.search-box { gap: 10px; padding-inline: 14px; }
.search-box:focus-within, .library-toolbar select:focus, .admin-controls input:focus, .admin-controls select:focus { border-color: var(--primary-400); box-shadow: 0 0 0 4px #8065f51c; outline: none; }
.search-box input { color: var(--text-primary); font-size: 11px; }
.search-box input::placeholder, .dialog input::placeholder, .dialog textarea::placeholder { color: var(--text-tertiary); }
.library-toolbar select { min-width: 0; width: 100%; padding-inline: 12px; font-size: 10px; }
.prompt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.prompt-card { border-color: var(--border-light); border-radius: 19px; background: var(--bg-elevated); box-shadow: var(--shadow-sm); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.prompt-card::before { height: 2px; background: linear-gradient(90deg, var(--primary-400), var(--secondary-500)); }
.prompt-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary-400) 47%, var(--border-light)); box-shadow: var(--shadow-lg); }
.card-image-wrap { height: auto; aspect-ratio: 1.42; background: linear-gradient(145deg, #23263a, #192d35 58%, #30304e); }
.card-image { transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.prompt-card:hover .card-image { transform: scale(1.045); }
.image-placeholder { background: radial-gradient(circle at 50% 45%, #8065f522, transparent 55%); }
.card-category { top: 11px; right: 11px; padding: 5px 10px; border: 1px solid #ffffff25; background: #090b12c9; font-size: 9px; font-weight: 700; backdrop-filter: blur(10px); }
.save-button { top: 10px; left: 10px; display: grid; place-items: center; border: 1px solid #ffffff2e; background: #090b12bf; font-size: 17px; backdrop-filter: blur(10px); transition: transform .18s, background .18s; }
.save-button:hover { transform: scale(1.07); background: #090b12eb; }
.card-body { padding: 16px; }
.card-meta { color: var(--text-tertiary); font-size: 9px; }
.card-title { margin: 8px 0 5px; font-size: 14px; font-weight: 800; line-height: 1.55; }
.card-title-link:hover { color: var(--primary-400); }
.card-desc { min-height: 40px; color: var(--text-secondary); font-size: 10px; line-height: 1.8; }
.card-footer { margin-top: 12px; padding-top: 12px; border-top-color: var(--border-light); }
.prompt-card .card-footer { gap: 9px; }
.creator { color: var(--text-tertiary); font-size: 9px; }
.creator-dot { width: 27px; height: 27px; background: linear-gradient(145deg, #9b83ff, #45cdb5); font-size: 11px; font-weight: 800; }
.card-action { min-height: 34px; border-color: var(--border-light); border-radius: 9px; background: color-mix(in srgb, var(--bg-elevated) 88%, var(--primary-500) 12%); color: var(--text-secondary); font-size: 10px; font-weight: 750; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.card-action:hover { transform: translateY(-1px); border-color: var(--primary-400); color: var(--primary-400); }
.prompt-card .card-action-view { border-color: transparent; background: linear-gradient(110deg, #8065f5, #6752d6); color: white; }
.prompt-card .card-action-copy:hover { background: color-mix(in srgb, var(--primary-500) 12%, var(--bg-elevated)); color: var(--primary-400); }
.loading-state, .empty-state { padding: 44px 16px; border: 1px dashed var(--border-medium); border-radius: 18px; background: color-mix(in srgb, var(--bg-elevated) 55%, transparent); color: var(--text-secondary); }
.prompt-grid-loading { min-height: 42px; color: var(--text-secondary); font-size: 11px; }
.prompt-card-skeleton { border-color: var(--border-light); }
.skeleton-card-image { height: auto; aspect-ratio: 1.42; }
.skeleton-card-body { gap: 12px; padding: 16px; }
.skeleton-line, .skeleton-card-image { background-color: color-mix(in srgb, var(--border-light) 72%, var(--bg-elevated)); }
.load-more { min-width: 156px; margin: 26px auto 0; }
.account-toolbar { margin: 21px 0 18px; }
.library-tabs { gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--border-light); border-radius: 14px; background: color-mix(in srgb, var(--bg-elevated) 70%, transparent); }
.library-tabs button { min-height: 37px; padding: 7px 15px; border: 1px solid transparent; border-radius: 10px; color: var(--text-secondary); font-size: 10px; font-weight: 750; }
.library-tabs button.active { border-color: var(--border-light); background: var(--bg-elevated); color: var(--primary-400); box-shadow: var(--shadow-sm); }

/* Details, administration, forms and dialogs */
.detail-tool { display: inline-flex; padding: 6px 10px; border: 1px solid var(--border-light); border-radius: 9px; background: var(--bg-elevated); }
.detail-image { border-radius: 20px; box-shadow: var(--shadow-md); }
.detail-copy { border-color: var(--border-light); border-radius: 20px; background: var(--bg-elevated); box-shadow: var(--shadow-sm); }
.detail-copy pre { border: 1px solid var(--border-light); border-radius: 13px; background: var(--bg-secondary); }
.static-page { max-width: 940px; }
.static-page p { font-size: 13px; line-height: 2; }
.admin-stats article, .admin-row, .admin-controls input, .admin-controls select { border-radius: 15px; }
.admin-stats article { border-color: var(--border-light); background: var(--bg-elevated); box-shadow: var(--shadow-sm); }
.admin-stats strong { color: var(--primary-400); }
.admin-row { border-color: var(--border-light); background: var(--bg-elevated); box-shadow: var(--shadow-sm); }
.admin-controls input, .admin-controls select { padding: 9px 12px; }
.admin-row-actions .button { border-radius: 10px; }
.dialog { border-color: var(--border-light); border-radius: 22px; background: color-mix(in srgb, var(--bg-elevated) 95%, var(--primary-500) 5%); box-shadow: 0 35px 100px #0009; }
.dialog::backdrop { background: #05060bcc; backdrop-filter: blur(8px); }
.dialog h2 { font-size: 21px; font-weight: 850; }
.dialog label { color: var(--text-secondary); font-size: 11px; }
.dialog input:not([type=checkbox]), .dialog textarea, .dialog select { min-height: 43px; border-color: var(--border-light); border-radius: 11px; background: var(--bg-secondary); color: var(--text-primary); }
.dialog input:focus, .dialog textarea:focus, .dialog select:focus { border-color: var(--primary-400); box-shadow: 0 0 0 4px #8065f51c; }
.dialog-close { border-radius: 10px; background: color-mix(in srgb, var(--bg-secondary) 70%, var(--primary-500) 8%); }
.auth-dialog { padding: 26px; }
.auth-dialog .google-signin { min-height: 48px; border-radius: 13px; }
.form-choice-section { border-radius: 15px; }
.toast { border-radius: 13px; backdrop-filter: blur(14px); }
.not-found-page { min-height: 75vh; }
.not-found-code { background: linear-gradient(120deg, var(--primary-400), var(--secondary-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Responsive layout */
@media (max-width: 1080px) {
  .container { padding-inline: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(330px, .84fr); gap: 25px; min-height: 520px; }
  .hero-title { font-size: clamp(42px, 6.5vw, 66px); }
  .categories-grid, .prompt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-card { min-height: 240px; }
}
@media (max-width: 820px) {
  .container { padding-inline: 20px; }
  .header-content { gap: 12px; }
  .brand-word { font-size: 15px; }
  .nav-menu { gap: 1px; }
  .nav-menu a { padding-inline: 9px; font-size: 10px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(275px, .8fr); gap: 12px; min-height: 480px; padding: 52px 0 58px; }
  .hero-title { font-size: clamp(39px, 6vw, 54px); }
  .hero-subtitle { font-size: 13px; }
  .categories-grid, .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-toolbar .search-box { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .header { padding: 8px 0; }
  .header-content { min-height: 42px; }
  .logo { gap: 8px; }
  .logo-icon { width: 37px; height: 37px; border-radius: 13px; }
  .brand-word { font-size: 14px; }
  .header-actions { margin-inline-start: auto; gap: 6px; }
  .header-actions .desktop-theme-toggle { display: none; }
  .menu-toggle { display: grid; width: 38px; min-height: 38px; place-items: center; border: 1px solid var(--border-light); border-radius: 12px; background: var(--bg-elevated); color: var(--text-primary); }
  .menu-toggle svg { width: 18px; height: 18px; }
  .nav-menu { position: absolute; top: calc(100% + 13px); right: 0; left: 0; z-index: 40; display: none; align-items: stretch; gap: 4px; margin: 0; padding: 9px; border: 1px solid var(--border-light); border-radius: 16px; background: color-mix(in srgb, var(--bg-elevated) 94%, transparent); box-shadow: var(--shadow-lg); backdrop-filter: blur(22px); }
  .nav-menu.is-open { display: flex; flex-direction: column; animation: menu-enter .18s ease-out; }
  .nav-menu a { padding: 11px 12px; border-radius: 10px; font-size: 12px; }
  .nav-menu .menu-theme-toggle { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: flex-start; gap: 10px; padding: 9px 12px; border: 0; background: transparent; color: var(--text-secondary); font-size: 11px; }
  .nav-menu .menu-theme-toggle svg { width: 17px; height: 17px; }
  @keyframes menu-enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; min-height: 0; padding: 47px 0 45px; }
  .hero-copy { text-align: center; }
  .hero-eyebrow { justify-content: center; margin-bottom: 13px; font-size: 10px; }
  .hero-title { margin-bottom: 12px; font-size: clamp(39px, 10vw, 58px); line-height: 1.23; }
  .hero-subtitle { max-width: 520px; margin: 0 auto 19px; font-size: 12px; line-height: 1.9; }
  .hero-actions { justify-content: center; gap: 8px; }
  .button { min-height: 42px; padding-inline: 14px; font-size: 10px; }
  .hero-proof { justify-content: center; gap: 11px; margin-top: 18px; font-size: 9px; }
  .categories-section { padding-top: 8px; }
  .section-heading { align-items: flex-start; margin-bottom: 15px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading p { max-width: 320px; font-size: 10px; }
  .section-link { gap: 4px; padding-top: 20px; font-size: 9px; }
  .categories-grid { gap: 10px; }
  .category-card { min-height: 215px; padding: 17px 14px 15px; border-radius: 17px; }
  .category-icon { width: 46px; height: 46px; margin-bottom: 14px; border-radius: 14px; }
  .category-icon svg { width: 22px; height: 22px; }
  .category-content { gap: 5px; }
  .category-card strong { font-size: 12px; }
  .category-card small { font-size: 9px; line-height: 1.7; }
  .category-enter { gap: 5px; margin-top: 10px; padding: 6px 8px; font-size: 8px; }
  .my-library { min-height: 0; flex-wrap: wrap; gap: 12px; margin: 25px 0 32px; padding: 17px; border-radius: 17px; }
  .library-spark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; font-size: 20px; }
  .my-library > div { flex: 1; min-width: 0; }
  .my-library h2 { font-size: 13px; }
  .my-library p { font-size: 9px; }
  .my-library .button { width: 100%; margin: 0; }
  .account-page, .detail-page, .static-page, .admin-page { padding-top: 27px; padding-bottom: 38px; }
  .account-page h1, .detail-page h1, .static-page h1, .admin-page h1 { font-size: 29px; }
  .page-lead { margin-bottom: 19px; font-size: 11px; }
  .library-toolbar { gap: 7px; margin: 16px 0; }
  .explore-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-box, .library-toolbar select { min-height: 41px; border-radius: 11px; }
  .search-box { padding-inline: 11px; }
  .search-box input { font-size: 10px; }
  .library-toolbar select { padding-inline: 9px; font-size: 9px; }
  .prompt-grid { gap: 11px; }
  .prompt-card { border-radius: 15px; }
  .card-image-wrap { aspect-ratio: 1.22; }
  .card-category { top: 7px; right: 7px; padding: 4px 7px; font-size: 8px; }
  .save-button { top: 7px; left: 7px; width: 31px; height: 31px; }
  .card-body { padding: 11px; }
  .card-meta { gap: 5px; font-size: 8px; }
  .card-title { font-size: 12px; }
  .card-desc { min-height: 34px; font-size: 9px; }
  .prompt-card .card-footer { gap: 7px; }
  .prompt-card .card-actions { gap: 5px; }
  .prompt-card .card-action { min-height: 33px; padding-inline: 7px; font-size: 9px; }
  .creator { font-size: 8px; }
  .creator-dot { width: 23px; height: 23px; }
  .account-toolbar { align-items: stretch; gap: 10px; }
  .account-toolbar .button { width: 100%; }
  .library-tabs { justify-content: stretch; }
  .library-tabs button { flex: 1; }
  .admin-stats { gap: 7px; }
  .admin-stats article { padding: 10px; }
  .admin-stats span { font-size: 8px; }
  .admin-stats strong { font-size: 17px; }
  .admin-row { grid-template-columns: 58px minmax(0, 1fr); gap: 9px; }
  .admin-row-image { width: 58px; height: 58px; }
  .admin-row-actions { justify-content: stretch; }
  .admin-row-actions .button { flex: 1; }
  .footer { width: 100%; padding: 15px 20px; }
  .footer .brand-word { font-size: 12px; }
  .footer-links a { font-size: 9px; }
}
@media (max-width: 420px) {
  .container { padding-inline: 15px; }
  .brand-word { font-size: 12px; }
  .header-actions .auth-button { min-height: 36px; padding: 5px 9px; font-size: 9px; }
  .header-actions .avatar-button.is-signed-in { width: 36px; height: 36px; }
  .header-actions .menu-toggle { width: 35px; min-height: 35px; }
  .hero { padding-top: 38px; }
  .hero-title { font-size: clamp(36px, 10vw, 45px); }
  .hero-proof { gap: 8px; }
  .hero-proof span { gap: 4px; }
  .hero-proof i { width: 15px; height: 15px; }
  .section-heading { gap: 6px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading p { max-width: 225px; font-size: 9px; }
  .section-link { font-size: 8px; }
  .categories-grid { gap: 8px; }
  .category-card { min-height: 196px; padding: 14px 10px; }
  .category-icon { width: 41px; height: 41px; margin-bottom: 10px; }
  .category-card strong { font-size: 11px; }
  .category-card small { font-size: 8px; }
  .category-enter { margin-top: 8px; padding: 5px 6px; font-size: 7px; }
  .explore-toolbar { gap: 6px; }
  .prompt-grid { gap: 8px; }
  .card-body { padding: 9px; }
  .card-title { font-size: 11px; }
  .card-desc { font-size: 8px; line-height: 1.65; }
  .prompt-card .card-footer { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .prompt-card .creator { max-width: 100%; }
  .prompt-card .card-actions { width: 100%; }
  .footer { gap: 8px; padding-inline: 15px; }
  .footer-links { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Product-first previews: the visual sample is an actual public Firebase prompt. */
.hero-art { display: block; min-height: 0; }
.hero-preview-frame { width: min(460px, 100%); margin-inline: auto; }
.hero-live-card { overflow: hidden; border: 1px solid var(--border-light); border-radius: 22px; background: var(--bg-elevated); box-shadow: 0 28px 70px #00000038; }
.hero-live-image, .showcase-image { position: relative; display: block; overflow: hidden; background: linear-gradient(145deg, #292c42, #17302f); }
.hero-live-image { aspect-ratio: 1.22; }
.hero-live-image::after, .showcase-image::after { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #080a12a6); content: ""; pointer-events: none; }
.hero-live-image img, .showcase-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.hero-live-card:hover .hero-live-image img, .showcase-card:hover .showcase-image img { transform: scale(1.045); }
.hero-image-chip, .showcase-image-label { position: absolute; z-index: 1; right: 13px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #ffffff3b; border-radius: 10px; background: #0a0c13bd; color: #fff; font-size: 9px; font-weight: 750; backdrop-filter: blur(12px); }
.hero-image-chip i { color: #7de4ca; font-style: normal; }
.hero-live-body { padding: 17px 18px 18px; }
.hero-live-meta, .showcase-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.hero-live-meta span, .showcase-meta span { display: inline-flex; padding: 4px 8px; border: 1px solid var(--border-light); border-radius: 20px; color: var(--text-tertiary); font-size: 8px; font-weight: 700; }
.hero-live-meta span:first-child, .showcase-meta span:first-child { border-color: #8065f52b; background: #8065f510; color: var(--primary-400); }
.hero-live-body h2 { margin: 9px 0 4px; font-size: 15px; font-weight: 850; line-height: 1.6; }
.hero-live-body p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-secondary); font-size: 10px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hero-live-open { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; color: var(--primary-400); font-size: 9px; font-weight: 800; text-decoration: none; }
.hero-live-open span { font-size: 15px; transition: transform .18s ease; }
.hero-live-open:hover span { transform: translateX(-3px); }
.hero-preview-caption { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: var(--text-tertiary); font-size: 9px; }
.hero-preview-caption span { color: var(--secondary-500); }
.preview-loading { display: grid; gap: 11px; padding: 14px; border: 1px solid var(--border-light); border-radius: 22px; background: var(--bg-elevated); box-shadow: var(--shadow-lg); }
.preview-loading-image { display: block; width: 100%; aspect-ratio: 1.22; border-radius: 14px; background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-primary) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: prompt-skeleton-shimmer 1.35s ease-in-out infinite; }
.preview-empty { display: grid; min-height: 350px; align-content: center; justify-items: center; gap: 10px; padding: 28px; border: 1px dashed var(--border-medium); border-radius: 22px; background: color-mix(in srgb, var(--bg-elevated) 72%, transparent); text-align: center; }
.preview-empty > span { color: var(--primary-400); font-size: 35px; }
.preview-empty strong { font-size: 13px; }
.preview-empty small { max-width: 250px; color: var(--text-tertiary); font-size: 10px; line-height: 1.8; }
.preview-empty .button { margin-top: 4px; }
.showcase-section { padding: 19px 0 4px; }
.showcase-section > .section-heading { align-items: end; }
.showcase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.showcase-card { min-width: 0; overflow: hidden; border: 1px solid var(--border-light); border-radius: 18px; background: var(--bg-elevated); box-shadow: var(--shadow-sm); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.showcase-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary-400) 45%, var(--border-light)); box-shadow: var(--shadow-lg); }
.showcase-image { aspect-ratio: 1.22; }
.showcase-image-label { right: 9px; bottom: 9px; padding: 6px 8px; font-size: 8px; }
.showcase-card-body { padding: 12px; }
.showcase-meta span { padding: 3px 7px; font-size: 7px; }
.showcase-card h3 { margin: 8px 0 4px; font-size: 11px; font-weight: 800; line-height: 1.6; }
.showcase-card h3 a { color: var(--text-primary); text-decoration: none; }
.showcase-card h3 a:hover { color: var(--primary-400); }
.showcase-card p { display: -webkit-box; min-height: 33px; margin: 0; overflow: hidden; color: var(--text-secondary); font-size: 8px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.showcase-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border-light); }
.showcase-actions a, .showcase-actions button { display: inline-flex; min-width: 0; min-height: 32px; flex: 1; align-items: center; justify-content: center; padding: 5px 7px; border: 1px solid var(--border-light); border-radius: 9px; background: var(--bg-secondary); color: var(--text-secondary); font: inherit; font-size: 8px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: border-color .18s, color .18s, background .18s; }
.showcase-actions a { border-color: transparent; background: linear-gradient(110deg, #8065f5, #6752d6); color: #fff; }
.showcase-actions a:hover { filter: brightness(1.08); }
.showcase-actions button:hover { border-color: var(--primary-400); background: color-mix(in srgb, var(--primary-500) 9%, var(--bg-elevated)); color: var(--primary-400); }
.showcase-skeleton { pointer-events: none; }
.showcase-skeleton-image { aspect-ratio: 1.22; background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-primary) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: prompt-skeleton-shimmer 1.35s ease-in-out infinite; }
.showcase-skeleton-copy { display: grid; gap: 10px; padding: 13px; }
.showcase-empty { grid-column: 1 / -1; margin: 0; }
.showcase-empty a { color: var(--primary-400); font-weight: 750; }
@media (max-width: 1080px) {
  .hero-preview-frame { width: min(420px, 100%); }
  .showcase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero-preview-frame { width: min(380px, 100%); }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .hero-art { width: min(100%, 430px); margin: 0 auto; }
  .hero-preview-frame { width: min(380px, 100%); }
  .hero-preview-caption { font-size: 8px; }
  .showcase-section { padding-top: 9px; }
  .showcase-section > .section-heading { align-items: flex-start; }
  .showcase-card-body { padding: 10px; }
}
@media (max-width: 420px) {
  .hero-preview-frame { width: 100%; }
  .hero-live-image { aspect-ratio: 1.12; }
  .hero-live-body { padding: 13px; }
  .hero-live-body h2 { font-size: 13px; }
  .showcase-grid { gap: 8px; }
  .showcase-card { border-radius: 14px; }
  .showcase-card-body { padding: 8px; }
  .showcase-card h3 { font-size: 10px; }
  .showcase-card p { font-size: 7px; }
  .showcase-actions { gap: 4px; }
  .showcase-actions a, .showcase-actions button { min-height: 29px; padding-inline: 4px; font-size: 7px; }
}

/* Less copy, larger previews, and direct actions. */
:root {
  --shadow-sm: 0 1px 4px #00000012;
  --shadow-md: 0 7px 18px #00000018;
  --shadow-lg: 0 14px 32px #00000020;
}
body[data-theme="dark"] {
  --shadow-sm: 0 1px 4px #00000025;
  --shadow-md: 0 7px 18px #00000030;
  --shadow-lg: 0 14px 32px #00000038;
}
.header { backdrop-filter: blur(12px); }
.hero { min-height: 0; padding-block: 42px 48px; }
.hero-title { font-size: clamp(42px, 5.4vw, 64px); }
.hero-subtitle { font-size: 14px; line-height: 1.7; }
.hero-eyebrow, .hero-proof, .hero-preview-caption, .hero-image-chip,
.showcase-image-label, .section-heading .section-kicker, .section-heading p,
.card-desc, .showcase-card p { display: none !important; }
.hero-live-card { box-shadow: var(--shadow-md); }
.hero-live-image { aspect-ratio: 1.48; }
.hero-live-image::after, .showcase-image::after { display: none; }
.hero-live-body { padding: 14px 16px; }
.hero-live-body h2 { margin-block: 8px 0; }
.hero-live-open { min-height: 38px; margin-top: 8px; font-size: 12px; }
.hero-preview-frame { width: min(480px, 100%); }
.showcase-section { padding-top: 10px; }
.showcase-grid { gap: 14px; }
.showcase-card, .prompt-card { box-shadow: var(--shadow-sm); }
.showcase-card:hover, .prompt-card:hover, .category-card:hover { transform: none; box-shadow: var(--shadow-md); }
.showcase-image { aspect-ratio: 1.48; }
.showcase-card-body { padding: 12px 14px; }
.showcase-meta span { padding: 4px 8px; font-size: 10px; }
.showcase-card h3 { margin-block: 8px 0; font-size: 14px; }
.showcase-actions { gap: 8px; margin-top: 10px; padding-top: 10px; }
.showcase-actions a, .showcase-actions button { min-height: 42px; padding-inline: 10px; font-size: 12px; }
.categories-section { padding-top: 14px; }
.category-card { min-height: 150px; justify-content: center; padding: 18px; box-shadow: var(--shadow-sm); }
.category-card::after { display: none; }
.category-icon { width: 46px; height: 46px; margin-bottom: 12px; }
.category-card strong { font-size: 14px; }
.category-enter { margin-top: 7px; padding: 3px 0; border: 0; color: var(--primary-400); font-size: 11px; }
.prompt-card .creator { display: none; }
.prompt-card .prompt-status { display: flex; align-items: center; min-width: 0; color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.category-prompt-card .card-category { display: none; }
.category-prompt-card .card-meta:empty { display: none; }
.prompt-text-label { margin: 14px 0 7px; font-size: 13px; font-weight: 750; }
.account-page { padding-top: 30px; }
.account-page > .back-link { margin-bottom: 8px; }
.library-toolbar { margin-top: 16px; }
.library-tabs button, .search-box input, .library-toolbar select { font-size: 12px; }
.load-more { min-height: 44px; padding-inline: 24px; }
.prompt-card .card-footer { margin-top: 9px; padding-top: 9px; }
.prompt-card .card-actions { width: 100%; gap: 8px; }
.prompt-card .card-action { min-height: 42px; font-size: 12px; }
.card-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 15px; }

@media (max-width: 680px) {
  .hero { gap: 18px; padding-block: 26px 28px; }
  .hero-title { margin-bottom: 8px; font-size: clamp(36px, 9vw, 48px); }
  .hero-subtitle { margin-bottom: 14px; font-size: 13px; }
  .hero-actions { gap: 8px; }
  .hero-actions .button { min-height: 44px; padding-inline: 12px; font-size: 11px; }
  .hero-art, .hero-preview-frame { width: 100%; max-width: none; }
  .hero-live-image { aspect-ratio: 1.48; }
  .section-heading { align-items: center; margin-bottom: 12px; }
  .section-heading h2 { font-size: 22px; }
  .section-link { padding: 5px 0; font-size: 11px; }
  .showcase-grid, .prompt-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .showcase-card:nth-child(n + 3) { display: none; }
  .showcase-image, .card-image-wrap, .skeleton-card-image { aspect-ratio: 1.52; height: auto; }
  .showcase-card-body, .card-body { padding: 13px 14px; }
  .showcase-card h3, .card-title { font-size: 15px; }
  .showcase-actions a, .showcase-actions button { min-height: 44px; font-size: 12px; }
  .categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card { min-height: 132px; padding: 13px 9px; }
  .category-card strong { font-size: 12px; }
  .category-enter { font-size: 10px; }
  .prompt-grid { gap: 14px; }
  .card-meta { font-size: 10px; }
  .prompt-card .card-actions { gap: 8px; }
  .prompt-card .card-action { min-height: 44px; font-size: 12px; }
}
@media (max-width: 420px) {
  .container { padding-inline: 16px; }
  .hero-actions { flex-wrap: nowrap; }
  .hero-actions .button { flex: 1; white-space: nowrap; }
  .showcase-grid, .prompt-grid { gap: 12px; }
  .category-card { min-height: 122px; }
}

/* Keep prompt cards balanced and easy to scan on phones. */
@media (max-width: 680px) {
  .categories-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; }
  .categories-grid > .category-card { width: 100%; max-width: 560px; align-items: center; justify-content: center; text-align: center; }
  .category-card .category-icon { margin-inline: auto; }
  .category-card .category-content { justify-items: center; text-align: center; }
  .category-card .category-enter { justify-self: center; justify-content: center; margin-inline: auto; }
  .prompt-grid, .showcase-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .prompt-grid > .prompt-card,
  .prompt-grid > .prompt-card-skeleton { width: 100%; max-width: 560px; }
  .prompt-card .card-image-wrap,
  .prompt-card-skeleton .skeleton-card-image { aspect-ratio: 1.4; }
  .prompt-card .card-category { top: auto; right: auto; bottom: 10px; left: 50%; transform: translateX(-50%); }
  .prompt-card .card-body { padding: 16px 16px 15px; text-align: center; }
  .prompt-card .card-meta { justify-content: center; flex-wrap: wrap; gap: 7px; }
  .prompt-card .card-title { min-height: 2.9em; margin: 8px 0 0; text-align: center; line-height: 1.45; }
  .prompt-card .card-footer { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .prompt-card .prompt-status { align-self: center; justify-content: center; min-height: 28px; padding: 3px 12px; border: 1px solid var(--border-light); border-radius: 999px; }
  .prompt-card .card-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); justify-content: stretch; width: 100%; gap: 8px; }
  .prompt-card .card-action { display: inline-flex; width: 100%; min-width: 0; min-height: 46px; align-items: center; justify-content: center; padding: 7px 5px; font-size: 11px; line-height: 1.35; text-align: center; white-space: normal; }
  .prompt-card .card-action-view { border-color: transparent; background: linear-gradient(110deg, #8065f5, #6752d6); color: #fff; }
  .prompt-card .card-actions [data-delete] { border-color: color-mix(in srgb, #ef6472 35%, var(--border-light)); color: #e45b68; }
  .showcase-card-body { text-align: center; }
  .showcase-meta { justify-content: center; }
  .showcase-card h3 { display: grid; min-height: 3.1em; align-content: center; justify-items: center; margin: 8px 0 0; text-align: center; }
  .showcase-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep the homepage hero headline on one line at every viewport size. */
.hero-title { white-space: nowrap; }
html[lang="en"] .hero-title { font-size: clamp(24px, 4.5vw, 58px); letter-spacing: -.04em; }
@media (max-width: 1080px) {
  html[lang="en"] .hero-title { font-size: clamp(30px, 4vw, 42px); }
}
@media (max-width: 820px) {
  html[lang="en"] .hero-title { font-size: clamp(25px, 3.5vw, 30px); }
}
@media (max-width: 680px) {
  html[lang="en"] .hero-title { font-size: clamp(20px, 7.4vw, 36px); }
}
