﻿:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --paper: rgba(255, 255, 255, 0.9);
  --ink: #151519;
  --muted: #747783;
  --line: rgba(20, 22, 30, 0.1);
  --blue: #8db8ff;
  --lavender: #d9c7ff;
  --silver: #e7edf7;
  --good: #16a56f;
  --danger: #d74343;
  --shadow: 0 18px 50px rgba(25, 28, 38, 0.12);
  font-family:
    "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

.seo-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 8px 8px 40px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 22;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 0 8px;
  background: linear-gradient(180deg, rgba(251, 251, 252, 0.98), rgba(251, 251, 252, 0.86));
  backdrop-filter: blur(18px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  flex: 0 0 1.22em;
  width: 1.22em;
  height: 1.22em;
  border-radius: 4px;
  object-fit: cover;
}

.logo::before {
  content: "";
  font-size: 0.78rem;
}

.logo::after {
  content: " Gallery";
  margin-left: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 650;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.desktop-info-links {
  display: none;
}

.desktop-info-menu {
  position: relative;
}

.desktop-info-menu summary {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(20, 22, 30, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(17, 22, 35, 0.08);
  cursor: pointer;
  list-style: none;
}

.desktop-info-menu summary::-webkit-details-marker {
  display: none;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: #5e6675;
}

.menu-bars {
  position: relative;
}

.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-bars::before {
  top: -4px;
}

.menu-bars::after {
  top: 4px;
}

.desktop-info-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 142px;
  gap: 2px;
  border: 1px solid rgba(20, 22, 30, 0.1);
  border-radius: 14px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(17, 22, 35, 0.16);
  backdrop-filter: blur(18px);
}

.desktop-info-popover a {
  border-radius: 9px;
  padding: 9px 10px;
}

.desktop-info-popover a:hover {
  background: rgba(231, 237, 247, 0.78);
}

.premium-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 207, 82, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 249, 225, 0.96), rgba(241, 229, 255, 0.92));
  color: #1d1d24;
  box-shadow: 0 8px 22px rgba(255, 199, 72, 0.18);
  text-decoration: none;
}

.premium-nav::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 210, 91, 0.28);
  animation: premiumPulse 2.4s ease-out infinite;
}

.premium-nav-desktop {
  min-height: 32px;
  padding: 0 13px;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.premium-nav-mobile {
  display: none;
}

@keyframes premiumPulse {
  0% {
    opacity: 0.72;
    transform: scale(0.92);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

.avatar {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(141, 184, 255, 0.9), rgba(217, 199, 255, 0.88)),
    #fff;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(141, 184, 255, 0.32);
}

.nav-pill,
.soft-button,
.primary-button,
.google-button,
.text-button,
.floating-pill,
.copy-btn,
.chip {
  border-radius: 999px;
  font-weight: 780;
}

.nav-pill,
.soft-button,
.copy-btn,
.chip,
.floating-pill {
  border: 1px solid rgba(141, 184, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(231, 237, 247, 0.72));
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(141, 184, 255, 0.12);
}

.copy-btn {
  border-color: rgba(117, 132, 255, 0.34);
  background: linear-gradient(135deg, #6ba8ff, #827cff 48%, #c185ff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(106, 124, 255, 0.28);
}

.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 34px rgba(106, 124, 255, 0.36);
}

.nav-pill {
  height: 34px;
  padding: 0 12px;
}

.feed-controls {
  position: sticky;
  top: 48px;
  z-index: 18;
  margin: 0 -8px 8px;
  padding: 6px 8px 4px;
  background: linear-gradient(180deg, rgba(251, 251, 252, 0.98), rgba(251, 251, 252, 0.9));
  backdrop-filter: blur(18px);
}

.switcher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--switch-count, 3), minmax(0, 1fr));
  gap: 4px;
  width: min(100%, max(300px, calc(var(--switch-count, 3) * 102px)));
  margin: 0 auto;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.ecosystem {
  position: relative;
  z-index: 2;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 820;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.ecosystem.active {
  color: var(--ink);
}

.logo::before {
  content: "";
}

.model-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.ecosystem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.icon-all {
  border-radius: 7px;
  background:
    radial-gradient(circle at 28% 28%, #8db8ff 0 18%, transparent 19%),
    radial-gradient(circle at 72% 30%, #d9c7ff 0 18%, transparent 19%),
    radial-gradient(circle at 32% 72%, #f8d66d 0 17%, transparent 18%),
    radial-gradient(circle at 72% 72%, #72dfb2 0 17%, transparent 18%),
    rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(20, 22, 30, 0.08), 0 5px 12px rgba(141, 184, 255, 0.22);
}

.icon-chatgpt {
  border-radius: 50%;
  background: conic-gradient(from 18deg, #10a37f, #35c3ff, #8f7cff, #10a37f);
  box-shadow: 0 6px 14px rgba(16, 163, 127, 0.24);
}

.icon-chatgpt::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 45% 55% 48% 52%;
  transform: rotate(22deg);
}

.icon-chatgpt::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.icon-nanobanana {
  width: 24px;
  height: 20px;
}

.icon-nanobanana::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 19px;
  height: 12px;
  border-bottom: 7px solid #ffd33d;
  border-radius: 0 0 22px 22px;
  transform: rotate(-20deg);
  filter: drop-shadow(0 5px 8px rgba(246, 184, 0, 0.28));
}

.icon-nanobanana::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 2px 4px 4px 2px;
  background: #6f4c18;
  transform: rotate(-22deg);
}

.icon-model-generic {
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(65, 204, 255, 0.98), rgba(111, 97, 255, 0.96), rgba(226, 96, 255, 0.92));
  box-shadow: 0 7px 15px rgba(99, 118, 255, 0.24);
}

.icon-model-generic::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  clip-path: polygon(50% 0, 64% 34%, 100% 50%, 64% 66%, 50% 100%, 36% 66%, 0 50%, 36% 34%);
}

.logo::before {
  content: "";
}

.icon-all {
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, #79aef8 0 18%, transparent 19%),
    radial-gradient(circle at 70% 30%, #c8b2ff 0 18%, transparent 19%),
    radial-gradient(circle at 30% 70%, #ffce4f 0 17%, transparent 18%),
    radial-gradient(circle at 70% 70%, #57d69a 0 17%, transparent 18%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 16px rgba(141, 184, 255, 0.18);
}

.icon-chatgpt {
  border-radius: 50%;
  background: #f7f3ed;
  box-shadow: inset 0 0 0 1.5px rgba(24, 25, 28, 0.86), 0 8px 16px rgba(17, 22, 35, 0.1);
}

.icon-chatgpt::before {
  inset: 5px;
  border: 2px solid #151519;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-32deg);
}

.icon-chatgpt::after {
  inset: 8px;
  border-radius: 50%;
  background: #151519;
}

.switch-glow {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--switch-count, 3));
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(231, 237, 247, 0.96), rgba(217, 199, 255, 0.7), rgba(141, 184, 255, 0.62));
  box-shadow: 0 14px 28px rgba(141, 184, 255, 0.24);
  transform: translateX(calc(var(--switch-index, 0) * 100%));
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.category-bar {
  display: flex;
  gap: 16px;
  margin: 0 -8px;
  padding: 2px 8px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category {
  position: relative;
  flex: 0 0 auto;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
  white-space: nowrap;
}

.category::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--lavender));
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.category.active {
  color: var(--ink);
}

.category.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.masonry-feed {
  column-count: 2;
  column-gap: 8px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  opacity: 1;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.masonry-feed.is-switching {
  opacity: 0;
  transform: translateY(8px);
}

.masonry-feed.model-feed {
  margin-right: auto;
  margin-left: auto;
}

.masonry-feed.sparse-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 8px;
  column-count: initial;
  column-width: initial;
}

.vibe-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 8px;
  break-inside: avoid;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.image-wrap {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--silver);
  box-shadow: 0 10px 30px rgba(17, 22, 35, 0.08);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.vibe-card:hover .image-wrap,
.vibe-card:focus-visible .image-wrap {
  box-shadow: 0 18px 44px rgba(141, 184, 255, 0.22);
  transform: scale(1.012);
}

.vibe-card img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.detail-panel,
.modal-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(15, 17, 24, 0.2);
  backdrop-filter: blur(16px);
}

.detail-panel.open,
.modal-panel.open {
  display: block;
}

.detail-sheet {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(58svh, 1fr) auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f7f8fb;
}

.close-detail,
.close-auth,
.close-profile {
  position: fixed;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(16, 20, 28, 0.18);
}

.close-detail,
.close-auth,
.close-profile {
  top: 14px;
  right: 14px;
}

.detail-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58svh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 244, 249, 0.98));
  touch-action: pan-y;
}

.detail-back-mobile {
  display: none;
}

.detail-hero img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 34px rgba(18, 24, 36, 0.12));
}

.hero-fade {
  display: none;
}

.detail-page-button,
.detail-page-count {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(10, 12, 18, 0.18);
}

.detail-page-button {
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  font-size: 2.2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.detail-page-button:disabled {
  cursor: default;
}

.detail-page-prev {
  left: 18px;
}

.detail-page-next {
  right: 18px;
}

.detail-page-count {
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 860;
  line-height: 1;
}

.hero-title {
  margin: 0 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 18px;
  background: rgba(14, 16, 22, 0.82);
  color: #fff;
  backdrop-filter: blur(18px);
}

.detail-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  margin: 0 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 8px 13px 8px 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 880;
  line-height: 1;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.detail-model-badge .model-icon {
  width: 24px;
  height: 24px;
}

.detail-model-badge .icon-nanobanana {
  width: 28px;
}

.hero-title h1 {
  max-width: none;
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.detail-title-page {
  display: inline-flex;
  width: max-content;
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 860;
  line-height: 1;
}

.detail-meta {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 760;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.32);
}

.detail-description {
  max-width: none;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
  font-weight: 720;
  line-height: 1.35;
}

.detail-keyword-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 10px 4px 0;
  color: #8a909d;
}

.detail-keyword-terms span {
  position: relative;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0.9;
}

.detail-keyword-terms span:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -8px;
  color: rgba(130, 137, 151, 0.58);
}

.detail-view-icon {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(to top, currentColor 0 42%, transparent 43%) 1px 9px / 2px 5px no-repeat,
    linear-gradient(to top, currentColor 0 68%, transparent 69%) 6px 6px / 2px 8px no-repeat,
    linear-gradient(to top, currentColor 0 100%, transparent 0) 11px 3px / 2px 11px no-repeat;
  opacity: 0.92;
}

.tag-row,
.chip-row,
.related-row,
.rating-row,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.detail-content {
  width: min(100%, 760px);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 20px 16px 42px;
  background: var(--bg);
}

.detail-actions {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.point-badge {
  align-self: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
}

.generation-result {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.remix-zone {
  display: none;
}

.generation-result img {
  width: 74px;
  height: 92px;
  border-radius: 6px;
  object-fit: cover;
}

.generation-result strong,
.generation-result span {
  display: block;
}

.tryon-result {
  min-height: 220px;
}

.tryon-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tryon-preview figure {
  margin: 0;
}

.tryon-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
  background: var(--silver);
}

.tryon-preview figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.tryon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tryon-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
}

.tryon-result p {
  color: var(--muted);
  font-weight: 780;
}

.generation-result span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 740;
}

.floating-pill,
.copy-btn,
.chip {
  padding: 9px 13px;
  font-size: 0.9rem;
}

.floating-pill.active,
.rating-star.active {
  border-color: rgba(217, 199, 255, 0.8);
  background: linear-gradient(135deg, rgba(217, 199, 255, 0.9), rgba(141, 184, 255, 0.72));
}

.heart-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(215, 67, 67, 0.18);
  border-radius: 50%;
  background: #fff;
  color: #d74343;
  font-size: 1.55rem;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(215, 67, 67, 0.08);
}

.heart-button.active {
  border-color: rgba(215, 67, 67, 0.34);
  background: rgba(215, 67, 67, 0.08);
}

.generate-cta {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: linear-gradient(135deg, #7daeff, #d4b8ff 58%, #f0f6ff);
  color: #fff;
  font-weight: 880;
  box-shadow: 0 14px 34px rgba(125, 174, 255, 0.38);
}

.generate-cta:disabled {
  opacity: 0.72;
}

.rating-star {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-weight: 850;
}

.prompt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  justify-items: stretch;
}

.prompt-card,
.admin-card,
.auth-card,
.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(20, 24, 35, 0.05);
}

.prompt-card {
  padding: 16px;
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.prompt-card h3,
.remix-zone h3,
.admin-card h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.prompt-card p {
  max-height: min(34vh, 280px);
  overflow-y: auto;
  padding-right: 6px;
  margin: 0;
  color: #353743;
  font-size: 0.96rem;
  line-height: 1.58;
}

.prompt-card p::-webkit-scrollbar {
  width: 6px;
}

.prompt-card p::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(125, 133, 151, 0.26);
}

.remix-zone {
  margin-top: 26px;
}

.remix-zone h3 {
  margin-bottom: 12px;
}

.auth-card,
.profile-card {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(92vw, 420px);
  max-height: 88vh;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 24px;
}

.auth-card h2,
.profile-card h2 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.auth-card p,
.profile-muted {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.4;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: #30323a;
  font-size: 0.9rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
}

input,
select {
  height: 43px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.45;
}

.turnstile-box {
  display: grid;
  place-items: center;
  min-height: 54px;
  margin-bottom: 12px;
  border: 1px dashed rgba(141, 184, 255, 0.45);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
}

.primary-button,
.google-button,
.text-button {
  width: 100%;
  min-height: 44px;
  margin-top: 9px;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, rgba(141, 184, 255, 0.96), rgba(217, 199, 255, 0.9));
  color: #fff;
  box-shadow: 0 14px 30px rgba(141, 184, 255, 0.3);
}

.google-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.history-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.history-item,
.admin-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.history-item img,
.admin-item img {
  width: 62px;
  height: 76px;
  border-radius: 6px;
  object-fit: cover;
}

.history-item h3,
.admin-item h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.history-item p,
.admin-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.logout-button,
.mini-button,
.danger-button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 780;
}

.logout-button,
.mini-button {
  border: 1px solid var(--line);
  background: #fff;
}

.danger-button {
  border: 1px solid rgba(215, 67, 67, 0.28);
  background: rgba(215, 67, 67, 0.08);
  color: var(--danger);
}

.admin-view {
  padding-top: 10px;
}

.admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 18px;
}

.admin-head p {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 760;
}

.admin-head h2 {
  margin: 0;
  font-size: 2.3rem;
}

.admin-tabs {
  position: sticky;
  top: 64px;
  z-index: 15;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
}

.admin-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 84px;
  height: 42px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.admin-tab.active {
  border-color: rgba(141, 184, 255, 0.46);
  background: linear-gradient(135deg, rgba(231, 237, 247, 0.96), rgba(217, 199, 255, 0.72));
  color: var(--ink);
}

.admin-panel {
  display: block;
}

.sub-tabs {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
}

.sub-tab {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 860;
}

.sub-tab.active {
  border-color: rgba(141, 184, 255, 0.46);
  background: linear-gradient(135deg, rgba(231, 237, 247, 0.96), rgba(217, 199, 255, 0.72));
  color: var(--ink);
}

.sub-panel {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.8rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-ops-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-card {
  padding: 16px;
}

.static-pages-editor .section-head {
  align-items: end;
}

.static-pages-editor .primary-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 132px;
  margin-top: 0;
}

.static-page-editor-grid {
  display: grid;
  gap: 12px;
}

.static-page-editor {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.static-page-editor legend {
  padding: 0 7px;
  color: var(--ink);
  font-weight: 850;
}

.static-page-editor textarea {
  font-family: Consolas, "Cascadia Code", "Segoe UI", sans-serif;
  font-size: 0.86rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.soft-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 780;
  text-decoration: none;
}

.admin-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 190px;
  padding-top: 18px;
}

.chart-day {
  display: grid;
  align-items: end;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  text-align: center;
}

.chart-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  min-height: 10px;
  border-radius: 8px 8px 2px 2px;
  background: rgba(231, 237, 247, 0.58);
  padding: 5px;
}

.chart-bars span {
  display: block;
  width: 8px;
  max-height: 140px;
  border-radius: 999px;
}

.chart-bars span:nth-child(1) {
  background: var(--blue);
}

.chart-bars span:nth-child(2) {
  background: var(--lavender);
}

.chart-bars span:nth-child(3) {
  background: #b9c7d9;
}

.admin-tag-list,
.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}

.inspiration-grid {
  display: grid;
  gap: 10px;
}

.inspiration-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.inspiration-card strong,
.inspiration-card span,
.inspiration-card p {
  display: block;
}

.inspiration-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.inspiration-card p {
  margin: 8px 0 0;
  color: #3b3d47;
  font-size: 0.88rem;
  line-height: 1.35;
}

.pipeline-list,
.provider-list,
.rule-list,
.taxonomy-list {
  display: grid;
  gap: 10px;
}

.pipeline-item,
.provider-item {
  display: grid;
  grid-template-columns: auto 54px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pipeline-item img {
  width: 54px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
}

.pipeline-item h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.pipeline-item p,
.provider-item span,
.panel-note,
.rule-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.provider-item {
  grid-template-columns: 1fr;
}

.catalog-studio {
  display: grid;
  gap: 22px;
}

.catalog-admin-section {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.catalog-admin-section > p {
  margin: 0;
  color: #9aa0aa;
  font-size: 0.88rem;
  font-weight: 880;
  letter-spacing: 0.18em;
}

.catalog-add-form {
  display: grid;
  grid-template-columns: 92px minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.catalog-add-form input,
.model-setting-card input,
.taxonomy-item input,
.taxonomy-item select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
}

.catalog-admin-list {
  display: grid;
  gap: 9px;
}

.model-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
}

.model-setting-card {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.model-setting-card label {
  gap: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-admin-advanced {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.taxonomy-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px 88px auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.taxonomy-item span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.taxonomy-actions {
  display: flex;
  gap: 6px;
}

.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inline-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.inline-check input {
  width: auto;
  height: auto;
}

.tag-suggestion {
  border: 1px solid rgba(141, 184, 255, 0.28);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 760;
}

.event-list {
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow: auto;
}

.event-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 3px 8px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.event-item strong {
  color: var(--ink);
}

.event-item time {
  grid-column: 2;
}

.role-select {
  height: 34px;
  margin-top: 6px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
}

.points-input {
  height: 34px;
  margin-top: 6px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
}

.billing-users {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.billing-user {
  display: grid;
  grid-template-columns: 1fr auto 86px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.billing-user strong,
.billing-user span {
  display: block;
}

.billing-user span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(141, 184, 255, 0.9), rgba(217, 199, 255, 0.88));
  color: #fff;
  font-weight: 850;
}

.form-actions,
.admin-actions {
  display: flex;
  gap: 8px;
}

.form-actions .primary-button,
.form-actions .soft-button {
  width: auto;
  min-width: 110px;
}

.soft-button {
  min-height: 42px;
  padding: 0 14px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  transform: translateY(20px);
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  padding: 11px 15px;
  background: rgba(25, 28, 38, 0.84);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 760;
  backdrop-filter: blur(16px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 34px 18px 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
  text-align: center;
}

body.detail-open #discoverView > .site-footer {
  visibility: hidden;
  pointer-events: none;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.footer-rights {
  margin: 0;
  color: #8f96a3;
  font-size: 0.76rem;
  font-weight: 760;
}

.footer-workflow {
  width: min(100%, 360px);
  margin: -4px 0 0;
  color: #8f96a3;
  font-size: 0.74rem;
  font-weight: 690;
  line-height: 1.32;
  text-align: center;
  text-wrap: balance;
}

.site-footer a,
.catalog-links a,
.desktop-info-links a,
.static-back,
.contact-card a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.catalog-links a:hover,
.desktop-info-links a:hover,
.static-back:hover,
.contact-card a:hover {
  color: var(--ink);
}

.static-view {
  min-height: calc(100vh - 80px);
  padding: clamp(28px, 7vw, 86px) 16px 70px;
}

.static-shell {
  width: min(100%, 760px);
  margin: 0 auto;
}

.static-back {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--muted);
  font-weight: 850;
}

.static-shell h1 {
  margin: 0 0 14px;
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: 0.9;
}

.static-lead,
.static-shell > p {
  max-width: 640px;
  color: #4d515b;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 650;
  line-height: 1.55;
}

.static-shell h2 {
  margin: 30px 0 8px;
  font-size: 1.25rem;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 26px;
}

.policy-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.76);
  color: #555965;
  font-size: 0.86rem;
  font-weight: 780;
}

.policy-section {
  border-top: 1px solid rgba(20, 22, 30, 0.08);
  padding: 22px 0 2px;
}

.policy-section h2 {
  margin-top: 0;
}

.policy-section p {
  margin: 0 0 12px;
  color: #4f535d;
  font-size: 1rem;
  font-weight: 610;
  line-height: 1.68;
}

.premium-product {
  margin-top: 34px;
}

.premium-hero {
  border: 1px solid rgba(24, 26, 34, 0.1);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 44px);
  background:
    radial-gradient(circle at 18% 10%, rgba(151, 126, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 255, 0.9));
  box-shadow: 0 26px 70px rgba(35, 39, 60, 0.09);
}

.premium-kicker {
  margin: 0 0 12px;
  color: #7a7f8d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.static-shell .premium-hero h2 {
  margin: 0 0 16px;
  max-width: 660px;
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  line-height: 0.95;
}

.premium-hero p {
  max-width: 620px;
  color: #4f535d;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.58;
}

.premium-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 999px;
  padding: 0 24px;
  background: linear-gradient(135deg, #5eead4, #8b5cf6);
  color: #fff;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 18px 46px rgba(103, 92, 246, 0.24);
}

.premium-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 4px;
}

.premium-badges span {
  border: 1px solid rgba(24, 26, 34, 0.08);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.78);
  color: #24262e;
  font-size: 0.86rem;
  font-weight: 850;
}

.premium-badges.muted span {
  color: #696e7b;
  background: rgba(247, 248, 252, 0.86);
}

.premium-steps {
  display: grid;
  gap: 14px;
}

.premium-steps article {
  border: 1px solid rgba(24, 26, 34, 0.08);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.premium-steps strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.premium-final {
  margin-top: 28px;
  border-radius: 24px;
  padding: 24px;
  background: #151720;
  color: #fff;
}

.premium-final p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.5;
}

.faq-list,
.contact-card {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.faq-list article,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.faq-list h2,
.contact-card span {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.faq-list p,
.contact-card p {
  margin: 0;
  color: #555965;
  font-weight: 620;
  line-height: 1.55;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-width: 420px;
  height: 58px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 46px rgba(17, 22, 35, 0.18);
  backdrop-filter: blur(22px);
}

.bottom-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.18rem;
  font-weight: 880;
  line-height: 1;
  white-space: nowrap;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.bottom-nav-item .model-icon {
  width: 21px;
  height: 21px;
}

.bottom-nav-item .icon-nanobanana {
  width: 24px;
}

.bottom-nav-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav-item.active {
  background: linear-gradient(135deg, rgba(231, 237, 247, 0.98), rgba(217, 199, 255, 0.82), rgba(141, 184, 255, 0.68));
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(141, 184, 255, 0.24);
  transform: translateY(-1px);
}

.bottom-nav.no-admin {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mobile-catalog-button,
.mobile-catalog-panel {
  display: none;
}

@media (max-width: 679px) {
  .app-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    padding-bottom: 100px;
  }

  .top-nav {
    position: sticky;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-inline: 8px;
  }

  .top-nav .switcher,
  .top-nav .nav-actions {
    display: none;
  }

  .premium-nav-mobile {
    position: static;
    flex: 0 0 auto;
    display: inline-flex;
    width: auto;
    height: 34px;
    padding: 0 11px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
  }

  .feed-controls {
    display: none;
  }

  #discoverView > .site-footer {
    position: relative;
    z-index: 72;
    display: flex;
    padding-bottom: 96px;
  }

  #discoverView > .site-footer .footer-links {
    display: flex;
  }

  .hero-title {
    margin: 0;
    border: 1px solid rgba(20, 22, 30, 0.08);
    border-radius: 8px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 252, 0.94));
    color: var(--ink);
    box-shadow: 0 14px 34px rgba(17, 22, 35, 0.08);
    backdrop-filter: none;
  }

  .detail-sheet {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-rows: auto auto;
  }

  .detail-model-badge {
    margin-bottom: 10px;
    padding: 7px 11px 7px 8px;
    font-size: 0.76rem;
  }

  .detail-model-badge .model-icon {
    width: 20px;
    height: 20px;
  }

  .detail-model-badge .icon-nanobanana {
    width: 23px;
  }

  .hero-title h1 {
    max-width: none;
    margin-bottom: 8px;
    font-size: clamp(1.35rem, 6vw, 1.9rem);
    line-height: 1.04;
    color: var(--ink);
    overflow-wrap: anywhere;
  }

  .detail-description {
    margin-bottom: 0;
    color: #5b5f6b;
    font-size: 0.82rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .detail-keyword-terms span {
    color: #8a909d;
    font-size: 0.66rem;
  }

  .detail-model-badge {
    border-color: rgba(16, 163, 127, 0.14);
    background: rgba(239, 251, 247, 0.96);
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(16, 163, 127, 0.12);
  }

  .detail-hero {
    min-height: auto;
    padding: 0;
  }

  .detail-hero img {
    height: min(45svh, 420px);
    object-position: center bottom;
  }

  .detail-content {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-top: 8px;
    padding-right: 16px;
    padding-left: 16px;
    padding-bottom: 112px;
    overflow-x: hidden;
  }

  .hero-title,
  .prompt-grid,
  .prompt-card,
  .prompt-card p {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-title,
  .prompt-grid {
    inline-size: 100%;
  }

  .masonry-feed,
  .masonry-feed.model-feed {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  .vibe-card,
  .image-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .close-detail {
    top: 12px;
    left: 12px;
    right: auto;
    width: auto;
    height: 34px;
    border-color: rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.86rem;
    font-weight: 850;
  }

  .detail-close-desktop {
    display: none;
  }

  .detail-back-mobile {
    display: inline;
  }

  .detail-page-button {
    display: none;
  }

  .detail-page-count {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .catalog-add-form,
  .model-settings-grid,
  .model-setting-card,
  .taxonomy-item {
    grid-template-columns: 1fr;
  }

  .model-settings-grid > .primary-button {
    width: 100%;
  }

  .mobile-catalog-button {
    position: fixed;
    right: max(18px, calc((100vw - 420px) / 2 + 18px));
    bottom: 83px;
    z-index: 72;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: min(48vw, 168px);
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 999px;
    padding: 0 13px 0 10px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    box-shadow: 0 16px 34px rgba(17, 22, 35, 0.16);
    backdrop-filter: blur(22px);
    font-size: 0.78rem;
    font-weight: 840;
  }

  .mobile-catalog-button span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filter-icon {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8db8ff, #d9c7ff);
    box-shadow: 0 7px 14px rgba(141, 184, 255, 0.26);
  }

  .filter-icon::before,
  .filter-icon::after {
    content: "";
    position: absolute;
    left: 6px;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
  }

  .filter-icon::before {
    top: 7px;
    box-shadow: 0 4px 0 #fff, 0 8px 0 #fff;
  }

  .filter-icon::after {
    top: 5px;
    left: 13px;
    width: 3px;
    height: 3px;
    background: #ffd33d;
    box-shadow: -8px 4px 0 #ffd33d, 0 8px 0 #ffd33d;
  }

  .bottom-nav .mobile-catalog-button {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: inline-flex;
    justify-content: center;
    min-height: 0;
    max-width: none;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .bottom-nav .mobile-catalog-button .filter-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: #f7f3ed;
    box-shadow: 0 8px 16px rgba(17, 22, 35, 0.08);
  }

  .bottom-nav .mobile-catalog-button .filter-icon::before {
    left: 6px;
    top: 7px;
    width: 12px;
    height: 2px;
    background: #61666f;
    box-shadow: 0 5px 0 #61666f, 0 10px 0 #61666f;
  }

  .bottom-nav .mobile-catalog-button .filter-icon::after {
    display: none;
  }

  .mobile-catalog-panel {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: block;
    pointer-events: none;
    background: rgba(255, 255, 255, 0);
    opacity: 0;
    transition: opacity 180ms ease, background 180ms ease;
  }

  .mobile-catalog-panel.open {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.72);
    opacity: 1;
  }

  .mobile-catalog-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: 78vh;
    border-top: 1px solid rgba(20, 22, 30, 0.08);
    border-radius: 28px 28px 0 0;
    padding: 18px 0 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -24px 60px rgba(17, 22, 35, 0.16);
    transform: translateY(24px);
    transition: transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  .mobile-catalog-panel.open .mobile-catalog-sheet {
    transform: translateY(0);
  }

  .catalog-title-row {
    display: block;
    margin: 0 58px 26px 22px;
  }

  .mobile-catalog-sheet h2 {
    flex: 0 0 auto;
    margin: 0;
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0;
  }

  .mobile-catalog-close {
    position: absolute;
    top: 13px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #555860;
    font-size: 2rem;
    line-height: 1;
  }

  .catalog-section {
    position: relative;
    margin: 0 0 24px;
  }

  .catalog-section::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 6px;
    width: 56px;
    height: 58px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 72%);
  }

  .catalog-section p {
    margin: 0 0 14px 22px;
    color: #989da8;
    font-size: 1.06rem;
    font-weight: 760;
    letter-spacing: 0.22em;
  }

  .catalog-scroll-row {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding: 0 78px 8px 22px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .catalog-scroll-row::-webkit-scrollbar {
    display: none;
  }

  .catalog-choice {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    min-height: 54px;
    border: 0;
    border-radius: 17px;
    padding: 0 17px;
    background: transparent;
    color: #202126;
    font-size: 1.08rem;
    font-weight: 680;
    white-space: nowrap;
    transition:
      background 180ms ease,
      border 180ms ease,
      box-shadow 180ms ease,
      transform 180ms ease;
  }

  .catalog-choice.active {
    border: 2px solid rgba(123, 184, 242, 0.78);
    background: rgba(248, 244, 238, 0.86);
    box-shadow: 0 10px 28px rgba(123, 184, 242, 0.14);
  }

  .catalog-choice .model-icon {
    width: 28px;
    height: 28px;
  }

  .catalog-choice .icon-nanobanana {
    width: 32px;
  }

  .catalog-cancel {
    display: block;
    width: calc(100% - 44px);
    min-height: 64px;
    margin: 4px 22px 0;
    border: 0;
    border-radius: 24px;
    background: rgba(246, 241, 235, 0.92);
    color: var(--ink);
    font-size: 1.06rem;
    font-weight: 840;
  }

  .toast {
    right: 18px;
    bottom: 138px;
    left: 18px;
    text-align: center;
  }
}

@media (min-width: 680px) {
  .bottom-nav {
    display: none;
  }

  .app-shell {
    padding: 10px clamp(12px, 1.4vw, 28px) 52px;
  }

  .top-nav {
    gap: 16px;
  }

  .logo {
    gap: 8px;
    font-size: 1.28rem;
  }

  .brand-mark {
    flex-basis: 1.34em;
    width: 1.34em;
    height: 1.34em;
  }

  .logo::after {
    font-size: 0.76em;
  }

  .desktop-info-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    color: #1c1d22;
    font-size: 0.86rem;
    font-weight: 850;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .switcher {
    width: 360px;
    margin-right: auto;
    margin-left: auto;
  }

  .category-bar {
    justify-content: center;
    margin-right: 0;
    margin-left: 0;
  }

  .masonry-feed {
    width: 100%;
    max-width: none;
    column-width: clamp(240px, 15.5vw, 300px);
    column-count: auto;
    column-gap: clamp(10px, 0.9vw, 16px);
  }

  .masonry-feed.model-feed {
    display: block;
    width: 100%;
    max-width: none;
    column-count: auto;
    column-width: clamp(240px, 15.5vw, 300px);
    column-gap: clamp(10px, 0.9vw, 16px);
  }

  .masonry-feed.model-feed .vibe-card {
    width: 100%;
    margin-bottom: 10px;
  }

  .masonry-feed.sparse-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 15.5vw, 300px), 1fr));
    gap: clamp(10px, 0.9vw, 16px);
  }

  .vibe-card {
    margin-bottom: 10px;
  }

  .admin-grid,
  .admin-ops-grid {
    grid-template-columns: 1fr 1fr;
  }

  .static-page-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-tabs {
    width: max-content;
    margin-right: auto;
    margin-left: auto;
  }

  .inspiration-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .wide-card {
    grid-column: span 1;
  }

  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .hero-title h1 {
    font-size: clamp(4.2rem, 7vw, 5.8rem);
  }

  .catalog-links {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    min-width: 0;
    margin: -4px 22px 18px;
    padding: 0 0 4px;
    color: #151519;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
  }

  .catalog-links a {
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(245, 247, 251, 0.86);
  }

  #discoverView > .site-footer {
    display: flex;
  }

  #discoverView > .site-footer .footer-links {
    display: none;
  }
}

@media (min-width: 1040px) {
  .masonry-feed {
    width: 100%;
    max-width: none;
    column-width: clamp(250px, 15vw, 320px);
    column-count: auto;
    column-gap: clamp(10px, 0.75vw, 14px);
  }

  .masonry-feed.model-feed {
    display: block;
    width: 100%;
    max-width: none;
    column-count: auto;
    column-width: clamp(250px, 15vw, 320px);
    column-gap: clamp(10px, 0.75vw, 14px);
  }

  .masonry-feed.model-feed .vibe-card {
    width: 100%;
    margin-bottom: clamp(12px, 0.9vw, 18px);
  }

  .masonry-feed.sparse-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(250px, 15vw, 320px), 1fr));
    gap: clamp(12px, 0.9vw, 18px);
  }

  .vibe-card {
    margin-bottom: clamp(12px, 0.9vw, 18px);
  }

  .detail-sheet {
    top: 18px;
    right: auto;
    bottom: 18px;
    left: 50%;
    display: grid;
    grid-template-columns: minmax(420px, 0.84fr) minmax(460px, 1.16fr);
    grid-template-rows: minmax(0, 1fr);
    width: min(1280px, calc(100vw - 40px));
    transform: translateX(-50%);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .detail-hero {
    display: block;
    min-height: 0;
    border-radius: 14px 0 0 14px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 244, 249, 0.98));
  }

  .detail-hero img {
    position: absolute;
    min-height: 0;
    object-fit: contain;
    background: transparent;
  }

  .hero-fade {
    display: none;
  }

  .hero-title {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
  }

  .hero-title h1 {
    max-width: none;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: clamp(1.55rem, 2.1vw, 2.35rem);
    line-height: 1.02;
  }

  .detail-title-page {
    border-color: rgba(20, 22, 30, 0.1);
    background: rgba(245, 247, 251, 0.92);
  }

  .detail-model-badge {
    border-color: rgba(20, 22, 30, 0.08);
    background: rgba(245, 247, 251, 0.9);
    color: var(--ink);
    box-shadow: none;
  }

  .detail-description {
    max-width: none;
    color: #555965;
    font-size: 0.94rem;
    text-shadow: none;
  }

  .detail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 14px 14px 0;
    padding: clamp(24px, 3vw, 42px);
    overflow-y: auto;
  }

  .prompt-grid {
    width: 100%;
  }

  .prompt-card p {
    max-height: min(30vh, 300px);
    scrollbar-gutter: stable;
  }
}

@media (min-width: 1440px) {
  .app-shell {
    padding-right: clamp(18px, 1.6vw, 36px);
    padding-left: clamp(18px, 1.6vw, 36px);
  }

  .masonry-feed {
    width: 100%;
    max-width: none;
    column-width: clamp(270px, 15vw, 340px);
    column-count: auto;
  }

  .masonry-feed.model-feed {
    display: block;
    width: 100%;
    max-width: none;
    column-count: auto;
    column-width: clamp(270px, 15vw, 340px);
  }

  .masonry-feed.model-feed .vibe-card {
    width: 100%;
  }

  .masonry-feed.sparse-feed {
    grid-template-columns: repeat(auto-fill, minmax(clamp(270px, 15vw, 340px), 1fr));
  }
}

body.phone-preview {
  background: #ececef;
}

body.phone-preview .app-shell {
  width: min(100vw, 390px);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  min-height: 844px;
  padding-bottom: 100px;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(20, 22, 30, 0.08), 0 24px 70px rgba(17, 22, 35, 0.18);
}

body.phone-preview .top-nav {
  display: flex;
  justify-content: space-between;
}

body.phone-preview .top-nav .switcher,
body.phone-preview .top-nav .nav-actions,
body.phone-preview .feed-controls {
  display: none;
}

body.phone-preview .catalog-title-row {
  display: block;
  margin-right: 72px;
}

body.phone-preview .catalog-links {
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  margin: -4px 22px 18px;
}

body.phone-preview .catalog-links a {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(245, 247, 251, 0.92);
}

body.phone-preview #discoverView > .site-footer {
  display: flex;
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  padding-bottom: 132px;
}

body.phone-preview #discoverView > .site-footer .footer-links {
  display: flex;
}

@media (min-width: 680px) and (max-width: 899px) {
  #discoverView > .site-footer {
    position: relative;
    z-index: 1;
    display: flex;
    margin-bottom: 18px;
    padding-bottom: 132px;
  }

  #discoverView > .site-footer .footer-links {
    display: flex;
  }
}

body.phone-preview .bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.phone-preview .bottom-nav .mobile-catalog-button {
  display: inline-flex;
  position: static;
  min-height: 0;
  max-width: none;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.phone-preview .mobile-catalog-panel {
  display: block;
}

body.phone-preview .masonry-feed,
body.phone-preview .masonry-feed.model-feed {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  column-count: 2;
  column-width: auto;
  column-gap: 8px;
}

body.phone-preview .masonry-feed.model-feed .vibe-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 8px;
}

body.phone-preview .detail-sheet,
body.phone-preview .detail-content,
body.phone-preview .hero-title,
body.phone-preview .prompt-grid,
body.phone-preview .prompt-card {
  min-width: 0;
  max-width: 100%;
}

/* Final model icon pass */
.logo::before {
  content: "";
}

.model-icon {
  overflow: visible;
  isolation: isolate;
  flex: 0 0 auto;
}

.icon-all {
  width: 23px;
  height: 23px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 31% 31%, #7bb5ff 0 16%, transparent 17%),
    radial-gradient(circle at 69% 31%, #c6b4ff 0 16%, transparent 17%),
    radial-gradient(circle at 31% 69%, #ffd35c 0 16%, transparent 17%),
    radial-gradient(circle at 69% 69%, #62dda2 0 16%, transparent 17%),
    linear-gradient(145deg, #ffffff, #f5f7fb);
  box-shadow:
    inset 0 0 0 1px rgba(18, 22, 32, 0.06),
    0 9px 18px rgba(122, 174, 255, 0.18);
}

.icon-all::before,
.icon-all::after {
  content: none;
}

.icon-chatgpt {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: url("/assets/gpt-image-icon.jpg") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 9px 18px rgba(17, 177, 134, 0.18);
}

.icon-chatgpt::before,
.icon-chatgpt::after {
  content: none;
}

.icon-nanobanana {
  width: 30px;
  height: 24px;
  background: url("/assets/nanobanana-icon.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 11px rgba(242, 182, 0, 0.24));
}

.icon-nanobanana::before,
.icon-nanobanana::after {
  content: none;
}

.bottom-nav-item .model-icon {
  width: 21px;
  height: 21px;
  transition: transform 180ms ease, filter 180ms ease;
}

.bottom-nav-item .icon-nanobanana {
  width: 24px;
  height: 21px;
}

.bottom-nav-item.active .model-icon,
.catalog-choice.active .model-icon {
  transform: translateY(-1px) scale(1.05);
}

.bottom-nav-item:focus,
.catalog-choice:focus {
  outline: 0;
}

.bottom-nav-item:focus-visible,
.catalog-choice:focus-visible {
  box-shadow:
    0 0 0 2px rgba(123, 184, 242, 0.68),
    0 12px 26px rgba(141, 184, 255, 0.22);
}

.catalog-choice .icon-chatgpt {
  width: 29px;
  height: 29px;
}

.catalog-choice .icon-nanobanana {
  width: 35px;
  height: 29px;
}

/* Mobile Safari stability pass */
@media (max-width: 679px) {
  html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
  }

  body {
    min-height: 100svh;
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
    overscroll-behavior-x: none;
  }

  .app-shell {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }

  .top-nav {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .detail-panel,
  .modal-panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(15, 17, 24, 0.14);
  }

  .detail-sheet {
    min-height: 100svh;
    padding-bottom: calc(118px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  .detail-hero,
  .image-wrap,
  .vibe-card {
    contain: paint;
  }

  .detail-hero,
  .detail-hero img,
  .vibe-card img {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .detail-hero img {
    filter: none;
  }

  .detail-content {
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
  }

  .prompt-card {
    scroll-margin-bottom: calc(142px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%;
    width: min(420px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    height: 60px;
    grid-template-columns: 48px repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 7px 8px;
    transform: translate3d(-50%, 0, 0);
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 14px 34px rgba(17, 22, 35, 0.16);
    will-change: transform;
  }

  .bottom-nav-item {
    height: 46px;
    min-width: 0;
    gap: 5px;
    padding: 0 7px;
    font-size: 0.74rem;
  }

  .bottom-nav-item .model-icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav-item .icon-nanobanana {
    width: 25px;
    height: 22px;
  }

  .bottom-nav-item > span:last-child {
    max-width: 52px;
    font-size: 0.72rem;
    line-height: 1;
  }

  .bottom-nav .mobile-catalog-button {
    padding: 0;
  }

  .bottom-nav .mobile-catalog-button .filter-icon {
    width: 23px;
    height: 23px;
  }

  #discoverView > .site-footer {
    padding-bottom: calc(136px + env(safe-area-inset-bottom));
  }

  .toast {
    bottom: calc(98px + env(safe-area-inset-bottom));
  }
}

body.phone-preview {
  padding-bottom: 0;
}

body.phone-preview .bottom-nav {
  bottom: 14px;
}

body.phone-preview .detail-sheet,
body.phone-preview .detail-content {
  padding-bottom: 128px;
}
