:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --text: #373a46;
  --muted: #8c93a1;
  --line: #eceff3;
  --soft: #f7f8fa;
  --paper: rgba(255, 255, 255, 0.72);
  --paper-solid: #ffffff;
  --dark: #1a1a1a;
  --green: #52c41a;
  --blue: #1677ff;
  --red: #ff4d4f;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 45% at 18% 8%, rgba(251, 191, 36, 0.14), transparent 65%),
    radial-gradient(ellipse 60% 45% at 84% 10%, rgba(56, 189, 248, 0.14), transparent 65%),
    radial-gradient(ellipse 50% 40% at 52% 24%, rgba(167, 139, 250, 0.10), transparent 70%),
    linear-gradient(180deg, #fdfbf7 0%, #f8fafc 55%, #f5f7fb 100%);
}

.app.editor-mode {
  background: linear-gradient(135deg, #080711 0%, #130d28 48%, #331811 100%);
}

.app.editor-mode .ambient {
  display: none;
}

.app.editor-mode .topbar {
  background: rgba(8, 7, 17, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app.editor-mode .brand-btn,
.app.editor-mode .nav-pill,
.app.editor-mode .icon-pill {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.app.editor-mode .brand-btn {
  color: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 36px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.24) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.brand-btn,
.nav-pill,
.dark-pill,
.icon-pill,
.tool-button,
.send-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.brand-btn {
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
}

.brand-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--dark);
  color: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-pill,
.icon-pill {
  background: rgba(255, 255, 255, 0.62);
  color: #515866;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 0 14px;
  font-size: 13px;
}

.icon-pill {
  width: 46px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
}

.sparkle-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  line-height: 1;
  font-size: 15px;
}

.dark-pill {
  background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 100%);
  color: #fff;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.nav-pill:hover,
.icon-pill:hover,
.brand-btn:hover {
  transform: translateY(-1px);
  background: #fff;
  color: var(--ink);
}

.dark-pill:hover,
.send-button:hover {
  transform: translateY(-1px) scale(1.02);
}

.home-view,
.chat-view,
.library-view {
  position: relative;
  z-index: 10;
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 82px);
  padding: 290px clamp(16px, 4vw, 32px) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
  position: relative;
}

.hero > *:not(.hero-video-layer) {
  position: relative;
  z-index: 1;
}

.hero-video-layer {
  position: absolute;
  top: -82px;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-video-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleY(-1);
  opacity: 0.88;
  display: block;
  background: #eef2ff;
}

.hero-video-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 26.416%,
    #fff 66.943%
  );
}

.config-chip,
.library-badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #a78bfa, #f472b6, #fbbf24, #60a5fa) border-box;
  border: 1.5px solid transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.daily-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #8c93a1;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
}

.metric-stars {
  color: #f6b300;
  letter-spacing: 2px;
  font-size: 15px;
}

.metric-dots {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.metric-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
}

.metric-dots i:nth-child(2) { background: #ef4444; }
.metric-dots i:nth-child(3) { background: #f59e0b; }
.metric-dots i:nth-child(4) { background: #22c55e; }
.metric-dots i:nth-child(5) { background: #8b5cf6; }

.hero h1,
.library-hero h1 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 1.05;
  font-weight: 500;
}

.hero h1 em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(46px, 7.5vw, 100px);
}

.hero-desc,
.library-hero p {
  margin: 0;
  max-width: 554px;
  color: var(--text);
  opacity: 0.8;
  font-size: 18px;
  line-height: 1.65;
}

.hero .config-chip,
.hero .daily-metric,
.hero h1,
.hero .hero-desc,
.hero .composer-mount {
  animation: fadeSlideUp 0.72s ease both;
}

.hero .daily-metric { animation-delay: 0.08s; }
.hero h1 { animation-delay: 0.16s; }
.hero .hero-desc { animation-delay: 0.24s; }
.hero .composer-mount { animation-delay: 0.32s; }

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.composer-mount,
.sticky-composer {
  width: min(960px, calc(100vw - 32px));
}

.composer-mount {
  position: relative;
  z-index: 50;
}

.home-gen-status {
  width: min(940px, 100%);
  margin: 12px auto 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  box-sizing: border-box;
}

.home-gen-status.hidden {
  display: none;
}

.home-gen-status .recent-spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.home-gen-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-gen-jump {
  border: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.home-gen-jump:hover {
  background: rgba(124, 58, 237, 0.18);
}

.sticky-composer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  transform: translateX(-50%);
}

.composer {
  width: 100%;
  background: #fcfcfc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 40px;
  box-shadow: 0 10px 40px 5px rgba(194, 194, 194, 0.25);
  padding: 24px;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer:focus-within {
  border-color: rgba(167, 139, 250, 0.34);
  box-shadow: 0 24px 80px rgba(99, 102, 241, 0.14);
}

.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.model-chip {
  border: 0;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 18px;
  background: #050505;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow:
    inset -4px -6px 25px 0 rgba(201, 201, 201, 0.08),
    inset 4px 4px 10px 0 rgba(29, 29, 29, 0.24);
}

.square-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #b6bbc4;
  font-size: 14px;
  white-space: nowrap;
}

.square-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d9dadd;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.square-toggle input:checked + .toggle-track {
  background: #050505;
}

.square-toggle input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.prompt-box {
  width: 100%;
  min-height: 46px;
  max-height: 160px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #20242d;
  padding: 9px 6px;
  font-size: 16px;
  line-height: 1.5;
}

.prompt-box::placeholder {
  color: #a5adba;
}

.composer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.composer-spacer {
  flex: 1;
}

.tool-button,
.add-reference-button {
  background: #f4f6f8;
  color: #667085;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid #edf0f3;
  min-height: 36px;
}

.add-reference-button {
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px dashed #d5d8de;
  background: #fff;
  color: #a0a7b3;
  font-size: 22px;
}

.tool-button input,
.add-reference-button input {
  display: none;
}

.tool-button:hover,
.tool-button.active,
.add-reference-button:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.send-button {
  background: linear-gradient(180deg, #3a3a3a 0%, #050505 100%);
  color: #fff;
  padding: 0 28px;
  min-height: 54px;
  min-width: 86px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow:
    inset -4px -6px 25px 0 rgba(201, 201, 201, 0.08),
    inset 4px 4px 10px 0 rgba(29, 29, 29, 0.24);
}

.send-button span {
  white-space: nowrap;
}

.send-button:disabled {
  background: #a7a9ad;
  color: #fff;
  opacity: 1;
  box-shadow: none;
}

.advanced-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 4px 2px;
}

.custom-size-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  grid-column: span 2;
}

.advanced-options label {
  display: grid;
  gap: 6px;
  color: #778091;
  font-size: 12px;
}

.advanced-options select,
.advanced-options input,
.modal input,
.modal select,
.modal textarea,
.admin-card input,
.admin-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  outline: none;
  padding: 11px 12px;
  color: var(--ink);
}

.advanced-options select:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.admin-card input:focus,
.admin-card select:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.reference-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 4px 8px;
}

.reference-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.reviews {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a0a7b3;
  font-size: 13px;
}

.recent-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 68px;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.recent-header {
  text-align: center;
  margin-bottom: 32px;
}

.recent-header h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  font-weight: 520;
  letter-spacing: 0;
  color: var(--ink);
}

.recent-header p {
  margin: 7px 0 0;
  color: #999;
  font-size: 14px;
}

.recent-masonry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.recent-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  contain: layout paint;
}

.recent-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.11);
}

.recent-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease;
  cursor: pointer;
}

.recent-tile:hover .recent-delete,
.recent-delete.is-always {
  opacity: 1;
}

.recent-delete:hover {
  background: #dc2626;
}

.recent-visual {
  width: 100%;
  background: #f1f5f9;
}

.recent-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transform: translateZ(0);
}

.recent-gradient,
.recent-pending {
  width: 100%;
  height: 220px;
}

.recent-gradient {
  display: grid;
  place-items: center;
  background: var(--art-bg);
  color: rgba(255, 255, 255, 0.94);
  font-size: 44px;
}

.recent-caption {
  display: grid;
  gap: 5px;
  padding: 12px 13px 14px;
}

.recent-caption strong {
  color: #1e293b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.recent-caption span {
  color: #778091;
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inspiration-band {
  padding: 10px clamp(16px, 4vw, 32px) 84px;
  max-width: 1180px;
  margin: 0 auto;
  content-visibility: auto;
  contain-intrinsic-size: 760px;
}

.inspiration-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.inspiration-head button {
  border: 0;
  background: transparent;
  color: #475569;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.example-grid,
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
}

.example-card,
.prompt-card {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  contain: layout paint;
}

.example-card:hover,
.prompt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
  border-color: rgba(167, 139, 250, 0.28);
}

.card-art {
  height: 154px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--art-bg);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.94);
  font-size: 42px;
}

.prompt-card .card-art {
  aspect-ratio: 1;
  height: auto;
  position: relative;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-art.image-error img {
  display: none;
}

.card-art.image-error::before {
  content: "\ef5b";
  font-family: remixicon;
  color: rgba(255, 255, 255, 0.92);
  font-size: 42px;
}

.card-art em {
  position: absolute;
  top: 8px;
  right: 8px;
  max-width: calc(100% - 16px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.example-card h3,
.prompt-card h3 {
  margin: 0 4px 6px;
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
}

.prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 4px 8px;
}

.prompt-tags span {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.25;
}

.example-card p,
.prompt-card p {
  margin: 0 4px 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  border-top: 1px solid rgba(226, 232, 240, 0.66);
  padding: 10px 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-actions button,
.tiny-button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-actions .use-button {
  background: #1e293b;
  color: #fff;
  padding: 7px 13px;
  border-radius: 999px;
}

.chat-view {
  min-height: calc(100vh - 82px);
  padding-top: 30px;
}

.generation-status {
  max-width: 960px;
  margin: 0 auto 22px;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8a93a4;
  font-size: 14px;
}

.paint-drip {
  height: 32px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.paint-drip span {
  width: 4px;
  border-radius: 999px;
  animation: drip 1.4s ease-in-out infinite;
}

.paint-drip span:nth-child(1),
.paint-drip span:nth-child(5) {
  background: #1a1a1a;
}

.paint-drip span:nth-child(2),
.paint-drip span:nth-child(4) {
  background: #666;
  animation-delay: 0.12s;
}

.paint-drip span:nth-child(3) {
  background: #999;
  animation-delay: 0.24s;
}

@keyframes drip {
  0% {
    opacity: 0;
    height: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    height: 28px;
  }
}

.history-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  display: grid;
  gap: 20px;
}

.date-separator {
  color: #b7bec9;
  font-size: 13px;
  margin-top: 4px;
}

.message-card {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.message-prompt {
  padding: 18px 18px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #273140;
}

.message-prompt i {
  color: #94a3b8;
  margin-top: 3px;
}

.message-image {
  padding: 0 14px 14px;
}

.image-shell {
  border-radius: 22px;
  overflow: hidden;
  background: #f1f5f9;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.image-shell img {
  width: 100%;
  height: auto;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 16px;
}

.message-actions a,
.message-actions button {
  border: 0;
  background: #f6f7f9;
  color: #667085;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  text-decoration: none;
}

.message-actions a:hover,
.message-actions button:hover {
  background: #fff;
  color: var(--ink);
}

.error-box {
  margin: 0 18px 16px;
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #ffd5d1;
  border-radius: 16px;
  padding: 12px;
  font-size: 13px;
}

.bottom-spacer {
  height: 180px;
}

.library-view {
  padding-bottom: 96px;
}

.library-hero {
  position: relative;
  text-align: center;
  padding: 54px 16px 40px;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.library-hero h1 {
  font-size: clamp(30px, 5vw, 52px);
}

.library-search {
  width: min(640px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.library-search span {
  flex-shrink: 0;
  background: #1e293b;
  color: #fff;
  border-radius: 13px;
  padding: 7px 12px;
  font-size: 12px;
}

.library-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px;
}

.library-search button {
  border: 0;
  background: #e2e8f0;
  color: #475569;
  border-radius: 13px;
  padding: 9px 18px;
  font-size: 13px;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 880px;
}

.tag-filters button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  padding: 7px 18px;
  font-size: 13px;
}

.tag-filters button.active {
  background: rgba(255, 255, 255, 0.78);
  color: #1e293b;
  border-color: #e2e8f0;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
}

.tag-filters button span {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.56;
}

.library-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 48px);
  margin: 4px 0 20px;
}

.library-stats div:not(.stat-divider) {
  display: grid;
  gap: 3px;
  text-align: center;
}

.library-stats strong {
  color: #1e293b;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.library-stats span {
  color: #94a3b8;
  font-size: 12px;
}

.stat-divider {
  width: 1px;
  align-self: stretch;
  background: #e2e8f0;
}

.prompt-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.load-more-wrap,
.empty-message {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 28px 0;
  color: #94a3b8;
}

.load-more-wrap button {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  color: #64748b;
  padding: 12px 28px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.load-more-wrap button:hover {
  background: #fff;
  color: #1e293b;
}

.load-more-wrap span {
  opacity: 0.58;
  margin-left: 4px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(14px);
}

.modal {
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 100px rgba(15, 23, 42, 0.24);
  padding: 24px;
  position: relative;
  animation: modalIn 0.18s ease-out both;
}

.preview-modal {
  width: min(860px, 100%);
  padding: 14px;
}

.compliance-modal {
  width: min(780px, calc(100vw - 32px));
  padding: 46px 56px 26px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 8%, rgba(124, 58, 237, 0.08), transparent 34%),
    #fff;
}

.compliance-close {
  color: #8a8f98;
  background: transparent;
}

.compliance-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.34);
}

.compliance-title {
  text-align: center;
  margin-bottom: 22px;
}

.compliance-title h2 {
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.compliance-title h2 i {
  color: #ec4899;
}

.compliance-title p {
  margin: 0;
  color: #667085;
  font-weight: 650;
  font-size: 14px;
}

.notice-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #fff;
  padding: 20px 22px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
  margin-bottom: 16px;
}

.notice-card h3 {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.notice-card.danger {
  border-left: 4px solid #ff344f;
}

.notice-card.danger h3 span {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.notice-card.privacy {
  border-left: 4px solid #f59e0b;
}

.notice-card.privacy h3 i {
  color: #3b82f6;
}

.notice-card.together {
  border-left: 4px solid #22c55e;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.08), rgba(255, 255, 255, 0.92));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.notice-card ul {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.notice-card li {
  position: relative;
  padding-left: 22px;
  color: #475467;
  line-height: 1.7;
  font-size: 14px;
}

.notice-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
}

.notice-card em {
  color: #f97316;
  font-style: normal;
  font-weight: 800;
}

.notice-card p {
  margin: 0;
  color: #475467;
  line-height: 1.7;
  font-size: 14px;
}

.compliance-actions {
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  margin-top: 20px;
  padding-top: 18px;
  display: flex;
  justify-content: center;
}

.compliance-actions .modal-primary {
  width: auto;
  min-width: 120px;
  padding: 0 30px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.28);
}

.works-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 24px;
}

.works-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin: 8px 44px 20px 0;
}

.works-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.works-head p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.works-refresh {
  width: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.work-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.work-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #eef2f7;
}

.work-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.work-body p {
  min-height: 40px;
  margin: 0;
  color: #101828;
  font-size: 13px;
  line-height: 1.55;
}

.work-body span {
  color: #98a2b3;
  font-size: 12px;
}

.work-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.work-actions a,
.work-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.preview-image,
.preview-gradient {
  width: 100%;
  max-height: min(68vh, 720px);
  border-radius: 22px;
  object-fit: contain;
  background: #f1f5f9;
}

.preview-gradient {
  min-height: 420px;
  display: grid;
  place-items: center;
  background: var(--art-bg);
  color: #fff;
  font-size: 72px;
}

.preview-body {
  padding: 16px 8px 4px;
}

.preview-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 650;
}

.preview-body p {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.65;
}

.preview-actions {
  padding: 0;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-modal {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f5f6f7;
  color: #6b7280;
}

.modal-title {
  text-align: center;
  margin-bottom: 18px;
}

.modal-title i {
  font-size: 32px;
  color: var(--ink);
}

.modal-title h2 {
  margin: 8px 0 5px;
  font-size: 22px;
  font-weight: 650;
}

.modal-title p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  margin-bottom: 14px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.contact-qr {
  width: 100%;
  max-height: min(58vh, 520px);
  object-fit: contain;
  border-radius: 14px;
  background: #f8fafc;
}

.modal-form,
.admin-form {
  display: grid;
  gap: 12px;
}

.modal-form label,
.admin-form label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.modal-primary,
.modal-secondary,
.ghost-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  font-weight: 600;
}

.modal-primary {
  background: var(--dark);
  color: #fff;
}

.modal-secondary {
  background: #f5f5f5;
  color: #333;
}

.link-button {
  border: 0;
  background: transparent;
  color: #9aa2af;
  font-size: 13px;
  padding: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  background: #f3f4f6;
  border-radius: 18px;
  padding: 5px;
}

.auth-tabs button {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #8b94a1;
  min-height: 38px;
  font-weight: 600;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.credits-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.checkin-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 1px solid #eceff3;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 22px 16px;
  margin: 18px 0;
}

.checkin-card i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 22px;
}

.checkin-card strong {
  color: #111;
  font-size: 34px;
  line-height: 1;
}

.checkin-card span {
  color: #667085;
  font-size: 13px;
}

.package-card {
  border: 1px solid #eee;
  background: #f9f9f9;
  border-radius: 18px;
  padding: 16px 8px;
  position: relative;
}

.package-card.hot {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.package-card strong {
  display: block;
  font-size: 22px;
}

.package-card span {
  display: block;
  opacity: 0.68;
  font-size: 12px;
  margin-top: 4px;
}

.hot-badge {
  position: absolute;
  top: -9px;
  right: -5px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
}

.admin-modal {
  width: min(1120px, 100%);
}

.editor-view {
  min-height: calc(100vh - 82px);
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.18) 1px, transparent 0) 0 0 / 40px 40px,
    linear-gradient(135deg, #080711 0%, #130d28 45%, #331811 100%);
  color: #f8fafc;
  padding: 22px clamp(14px, 3vw, 32px) 32px;
}

.editor-stage {
  max-width: 1540px;
  margin: 0 auto;
}

.editor-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.editor-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  font-weight: 750;
}

.editor-tabs {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.editor-tabs button,
.editor-toolbar button,
.editor-zoom button,
.editor-prompt-bar button,
.editor-attach {
  border: 0;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.editor-tabs button {
  gap: 8px;
  min-height: 44px;
  padding: 0 26px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
  font-weight: 700;
}

.editor-tabs button.active {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  box-shadow: inset -4px -6px 25px rgba(201, 201, 201, 0.08), inset 4px 4px 10px rgba(29, 29, 29, 0.24);
}

.editor-workspace {
  position: relative;
  min-height: calc(100vh - 160px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.2) 1.5px, transparent 0) 0 0 / 38px 38px,
    rgba(5, 5, 14, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
}

.editor-toolbar {
  position: absolute;
  left: 50%;
  top: 28px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(63, 68, 76, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.editor-toolbar button {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 25px;
}

.editor-toolbar button.active {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
}

.editor-toolbar input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.editor-canvas-area {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  padding: 110px 48px 132px;
}

.editor-upload-card {
  width: min(520px, calc(100vw - 48px));
  min-height: 280px;
  border-radius: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  cursor: pointer;
}

.editor-upload-card i {
  font-size: 44px;
  color: #c4b5fd;
}

.editor-upload-card strong {
  font-size: 20px;
  color: #fff;
}

.editor-upload-card span {
  font-size: 13px;
}

.editor-upload-card input,
.editor-attach input {
  display: none;
}

.editor-image-frame {
  max-width: min(76vw, 980px);
  max-height: calc(100vh - 280px);
  display: grid;
  place-items: center;
}

.editor-image-scaler {
  position: relative;
  transform-origin: center center;
  transition: transform 0.16s ease;
}

.editor-image-scaler img {
  display: block;
  max-width: min(76vw, 980px);
  max-height: calc(100vh - 280px);
  width: auto;
  height: auto;
  user-select: none;
  border-radius: 2px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.editor-image-scaler canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.editor-zoom {
  position: absolute;
  left: 34px;
  bottom: 34px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 8, 14, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.editor-zoom button {
  width: 36px;
  height: 34px;
  border-radius: 999px;
  background: transparent;
  font-size: 22px;
}

.editor-zoom span {
  min-width: 54px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.editor-keyboard {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 14, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 22px;
}

.editor-prompt-bar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  transform: translateX(-50%);
  width: min(880px, calc(100vw - 320px));
  min-height: 72px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(42, 42, 48, 0.96), rgba(12, 12, 16, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.editor-attach {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 23px;
}

.editor-prompt-icon {
  color: #a855f7;
  font-size: 24px;
}

.editor-prompt-bar > input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  outline: none;
}

.editor-prompt-bar input::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.editor-public-toggle {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.58);
}

.editor-prompt-bar button[type="submit"] {
  min-width: 132px;
  height: 54px;
  gap: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset -4px -6px 25px rgba(201, 201, 201, 0.08), inset 4px 4px 10px rgba(29, 29, 29, 0.24);
}

.editor-prompt-bar button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: wait;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) 1fr;
  gap: 18px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
}

.admin-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.admin-switch {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  color: #273140 !important;
}

.admin-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--dark);
}

.users-table-wrap {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.users-table th {
  color: #8b94a1;
  font-size: 12px;
  text-transform: uppercase;
}

.users-table input,
.users-table select {
  min-width: 86px;
  padding: 8px;
  border-radius: 12px;
}

.user-cell strong {
  display: block;
}

.user-cell span {
  color: #8b94a1;
  font-size: 12px;
}

.toast-layer {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 230px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: #273140;
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.15);
  padding: 12px 14px;
  animation: toastIn 0.22s ease-out both;
  font-size: 13px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fade-up {
  animation: fadeUp 0.65s ease-out both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-pill span {
    display: none;
  }

  .nav-pill .sparkle-icon {
    display: inline-grid;
  }

  .hero {
    padding-top: 160px;
  }

  .daily-metric {
    flex-wrap: wrap;
    gap: 8px 12px;
    white-space: normal;
  }

  .advanced-options,
  .custom-size-row,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .recent-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-composer {
    bottom: 10px;
  }

  .editor-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .editor-brand {
    justify-self: center;
  }

  .editor-canvas-area {
    padding: 104px 18px 158px;
  }

  .editor-prompt-bar {
    width: calc(100vw - 32px);
    bottom: 84px;
    border-radius: 28px;
    flex-wrap: wrap;
  }

  .editor-public-toggle {
    order: 5;
  }

  .editor-zoom {
    left: 16px;
    bottom: 22px;
  }

  .editor-keyboard {
    right: 16px;
    bottom: 22px;
  }
}

@media (max-width: 560px) {
  .top-actions {
    gap: 6px;
  }

  .nav-pill,
  .dark-pill,
  .icon-pill {
    min-height: 36px;
    padding: 0 11px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero h1 em {
    font-size: 48px;
  }

  .composer {
    border-radius: 28px;
    padding: 18px;
  }

  .composer-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .composer-bar {
    align-items: stretch;
  }

  .composer-spacer {
    display: none;
  }

  .send-button,
  .tool-button {
    min-width: 72px;
  }

  .prompt-box {
    min-width: 0;
    font-size: 15px;
  }

  .library-search {
    flex-wrap: wrap;
  }

  .library-search input {
    flex-basis: 100%;
    order: 5;
  }

  .credits-packages {
    grid-template-columns: 1fr;
  }

  .works-modal {
    padding: 20px 14px;
  }

  .works-head {
    margin-right: 40px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-actions {
    grid-template-columns: 1fr;
  }

  .compliance-modal {
    padding: 38px 18px 20px;
    border-radius: 18px;
  }

  .compliance-title h2 {
    font-size: 18px;
  }

  .notice-card {
    padding: 16px;
  }

  .recent-masonry {
    gap: 10px;
  }

  .recent-gradient,
  .recent-pending {
    height: 180px;
  }

  .editor-view {
    padding: 12px 10px 24px;
  }

  .editor-tabs button {
    min-height: 40px;
    padding: 0 16px;
  }

  .editor-toolbar {
    top: 18px;
    gap: 4px;
    padding: 7px;
  }

  .editor-toolbar button {
    width: 39px;
    height: 39px;
    font-size: 22px;
  }

  .editor-image-scaler img,
  .editor-image-frame {
    max-width: calc(100vw - 42px);
  }

  .editor-prompt-bar > input {
    flex-basis: calc(100% - 76px);
    font-size: 15px;
  }

  .editor-prompt-bar button[type="submit"] {
    min-width: 108px;
    height: 48px;
    font-size: 16px;
  }
}


/* ---- 本项目补充：生成中浮层 / 风格按钮 / 输入栏控件 ---- */
.gen-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 24, .45);
  backdrop-filter: blur(6px);
}
.gen-overlay.show { display: flex; }
.gen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 26px 32px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 30px 80px rgba(20, 12, 60, .35);
  text-align: center;
}
.gen-card strong { font-size: 15px; color: #1c1633; }
.gen-card .gen-text { font-size: 12.5px; color: #6b6580; }
.gen-spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid #e6e2f5;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: gen-spin .8s linear infinite;
}
@keyframes gen-spin { to { transform: rotate(360deg); } }

.style-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
  max-height: 96px;
  overflow-y: auto;
}
.style-chip {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, .22);
  background: rgba(255, 255, 255, .76);
  color: #4b4560;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s ease;
}
.style-chip:hover { background: #fff; color: #241c3d; }
.style-chip.active { background: #1c1633; border-color: #1c1633; color: #fff; }

.composer-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #6b6580;
}
.composer-field select {
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(24, 18, 46, .14);
  background: #fff;
  font-size: 12.5px;
  color: #241c3d;
}
.contact-qq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px;
  border-radius: 16px;
  background: #f7f5ff;
}
.contact-qq strong { font-size: 24px; letter-spacing: 1px; color: #241c3d; }
.contact-qq span { font-size: 12.5px; color: #6b6580; }

/* ---- 首屏：外链视频不可用，改成温润画布暖白 + 晨曦暖金/天青背景 ---- */
.hero-video-layer { display: none !important; }
.hero {
  min-height: auto !important;
  padding-top: 32px !important;
  padding-bottom: 16px !important;
  background: transparent !important;
}


/* ---- 本项目补充：输入区控件圆润化 / 比例图形 / 生成中卡片 / 风格条 ---- */
.composer-field select {
  appearance: none;
  -webkit-appearance: none;
  height: 38px;
  padding: 0 34px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(24, 18, 46, .14);
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6580' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: 0 1px 2px rgba(20, 12, 60, .06), inset 0 1px 0 rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 500;
  color: #241c3d;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer-field select:hover { border-color: rgba(124, 58, 237, .38); }
.composer-field select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .16);
}
.composer-field > span {
  font-size: 12px;
  color: #8b85a0;
  font-weight: 500;
}
.ratio-shape {
  display: inline-block;
  border: 1.6px solid #6b6580;
  border-radius: 3px;
  margin-right: 6px;
  flex: none;
}

/* 生成中占位卡片 */
.recent-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 150px;
  padding: 16px;
  text-align: center;
  background: linear-gradient(135deg, #faf8f5, #f4f4f6);
  color: #52525b;
  font-size: 12.5px;
  box-sizing: border-box;
}
.recent-pending em {
  font-style: normal;
  font-weight: 600;
}
.recent-pending small {
  font-size: 11.5px;
  line-height: 1.45;
  opacity: 0.85;
  max-width: 220px;
}
.recent-pending.is-error { background: #fff5f5; color: #b42318; }
.recent-pending.is-error i { font-size: 20px; }

.recent-empty-box {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 520px;
  margin: 8px auto 16px;
  padding: 36px 24px;
  border-radius: 22px;
  border: 1px dashed rgba(24, 24, 27, .14);
  background: rgba(255, 255, 255, .72);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-sizing: border-box;
}
.recent-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(24, 24, 27, .05);
  color: #3f3f46;
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 4px;
}
.recent-empty-box strong {
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}
.recent-empty-box span {
  font-size: 13px;
  color: #71717a;
}
.recent-login-btn {
  margin-top: 8px;
  height: 36px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(24, 24, 27, .16);
  transition: transform .15s ease, background .15s ease;
}
.recent-login-btn:hover {
  background: #27272a;
  transform: translateY(-1px);
}
.recent-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(124, 58, 237, .18);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: gen-spin .8s linear infinite;
}
@keyframes gen-spin { to { transform: rotate(360deg); } }

/* 风格条紧贴输入框 */
.composer-mount + .style-bar { margin: 14px 0 0; max-height: 88px; }

/* 输入框高度：默认不太小，随文字增长但有上限 */
.prompt-box {
  min-height: 96px !important;
  max-height: 220px !important;
  overflow-y: auto;
  resize: none;
  line-height: 1.6;
}


/* ---- 风格选择器重做：分类 + 渐隐滚动 ---- */
.style-bar {
  margin: 16px auto 0 !important;
  max-width: 940px;
  padding: 0 4px;
  background: none;
  max-height: none;
  overflow: visible;
}
.style-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.style-cat {
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .6);
  color: #7b7590;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.style-cat:hover { color: #241c3d; background: #fff; }
.style-cat.active {
  background: #241c3d;
  color: #fff;
  box-shadow: 0 4px 12px rgba(36, 28, 61, .22);
}
.style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 132px;
  overflow-y: auto;
  padding: 4px 2px 10px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 82%, transparent 100%);
}
.style-chips::-webkit-scrollbar { width: 6px; }
.style-chips::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, .25); border-radius: 999px; }
.style-chips::-webkit-scrollbar-track { background: transparent; }
.style-chip {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(24, 18, 46, .10);
  background: #fff;
  color: #4b4560;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  transition: all .16s ease;
  box-shadow: 0 1px 2px rgba(20, 12, 60, .04);
}
.style-chip:hover {
  border-color: rgba(124, 58, 237, .45);
  color: #241c3d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, .14);
}
.style-chip.active {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(124, 58, 237, .30);
}

/* 输入框上下更舒展 */
.prompt-box {
  min-height: 116px !important;
  max-height: 220px !important;
  padding-top: 18px !important;
  padding-bottom: 6px !important;
}


/* ---- 卡片更好看 + 风格标签 + 输入框固定底部 ---- */
.recent-tile {
  border-radius: 18px !important;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 12, 60, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.recent-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 12, 60, .14); }
.recent-visual { border-radius: 18px 18px 0 0; overflow: hidden; }
.recent-visual img { width: 100%; display: block; }
.recent-caption { display: grid; justify-items: start; padding: 12px 14px 14px !important; gap: 6px; }
.recent-caption strong { font-size: 13px; color: #241c3d; }
.recent-caption span {
  display: inline-block;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .10);
  color: #6d28d9;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-card {
  border-radius: 20px !important;
  box-shadow: 0 2px 12px rgba(20, 12, 60, .06);
  overflow: hidden;
}
.message-image .image-shell, .message-image img { border-radius: 14px !important; }
.message-style {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .10);
  color: #6d28d9;
  font-size: 11.5px;
  vertical-align: middle;
}

/* 输入框固定在底部，向上滚动时不跟着飘 */
body { padding-bottom: 150px; }
#stickyComposerMount, .sticky-composer {
  position: fixed !important;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  width: min(940px, 92vw);
  z-index: 60;
  background: transparent;
}
.sticky-composer .composer {
  box-shadow: 0 18px 50px rgba(20, 12, 60, .18) !important;
}

/* ---- 炫酷首屏工作台（晨曦暖金与天青极光 / 飘逸艺术字标题 / 曜石黑金按钮） ---- */
.hero {
  position: relative;
  z-index: 20;
  overflow: visible !important;
  padding-top: 56px !important;
  padding-bottom: 24px !important;
}
.hero-aurora {
  position: absolute;
  top: -72px;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
}
.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  animation: aurora-float 10s ease-in-out infinite alternate;
}
.aurora-orb.orb-1 {
  width: 440px;
  height: 320px;
  top: -80px;
  left: 8%;
  background: radial-gradient(circle, rgba(245, 158, 11, .32), rgba(251, 146, 60, 0));
}
.aurora-orb.orb-2 {
  width: 460px;
  height: 340px;
  top: -60px;
  right: 6%;
  background: radial-gradient(circle, rgba(14, 165, 233, .28), rgba(20, 184, 166, .14), transparent);
  animation-delay: -4s;
}
.aurora-orb.orb-3 {
  width: 520px;
  height: 260px;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(251, 191, 36, .16), rgba(56, 189, 248, .12), transparent);
  animation-delay: -7s;
}
.aurora-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(24, 24, 27, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 24, 27, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 20%, transparent 80%);
}
@keyframes aurora-float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(24px, 16px, 0) scale(1.08); }
}

.hero .daily-metric {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  background:
    linear-gradient(rgba(255, 255, 255, .92), rgba(255, 255, 255, .92)) padding-box,
    linear-gradient(135deg, rgba(245, 158, 11, .42), rgba(24, 24, 27, .15), rgba(14, 165, 233, .40)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  backdrop-filter: blur(10px);
  color: #3f3f46;
  font-size: 13px;
  font-weight: 500;
}
.hero .daily-metric .metric-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #18181b, #3f3f46);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(24, 24, 27, .22);
}
.hero .daily-metric .metric-tag i {
  color: #fbbf24;
}
.hero .daily-metric .metric-sep {
  color: #d4d4d8;
}

.hero h1 {
  margin: 4px 0 0 !important;
  color: #18181b !important;
  letter-spacing: -0.04em !important;
  font-size: clamp(38px, 5.8vw, 76px) !important;
  line-height: 1.08 !important;
  font-weight: 500 !important;
}
.hero h1 em {
  font-family: "Instrument Serif", "STKaiti", "Kaiti SC", "Noto Serif SC", "Songti SC", serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(46px, 7.2vw, 96px) !important;
  padding: 0 6px;
  background: linear-gradient(135deg, #d97706 0%, #e11d48 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 20px rgba(217, 119, 6, .18));
}
.hero .hero-desc {
  font-size: 16.5px !important;
  color: #52525b !important;
  max-width: 620px !important;
  opacity: 0.92 !important;
}

.hero .composer-mount,
#heroComposerMount {
  position: relative !important;
  z-index: 60 !important;
}
.hero .quick-prompts,
.hero .style-bar,
.hero .reviews {
  position: relative;
  z-index: 1;
}
.hero .composer {
  position: relative;
  z-index: 60;
  background:
    linear-gradient(rgba(255, 255, 255, .96), rgba(255, 255, 255, .98)) padding-box,
    linear-gradient(135deg, rgba(245, 158, 11, .28), rgba(24, 24, 27, .12), rgba(14, 165, 233, .28)) border-box !important;
  border: 1.5px solid transparent !important;
  box-shadow:
    0 20px 60px -12px rgba(15, 23, 42, .10),
    0 4px 20px rgba(15, 23, 42, .04),
    inset 0 1px 0 rgba(255, 255, 255, .95) !important;
  backdrop-filter: blur(16px);
}
.hero .composer:focus-within {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #f59e0b, #18181b, #0284c7) border-box !important;
  box-shadow:
    0 24px 72px -10px rgba(15, 23, 42, .15),
    0 0 0 4px rgba(245, 158, 11, .10) !important;
}
.composer .send-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #18181b 0%, #27272a 60%, #3f3f46 100%) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(24, 24, 27, .24), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.composer .send-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(24, 24, 27, .34), inset 0 1px 0 rgba(255, 255, 255, .25);
  filter: brightness(1.06);
}
.composer .send-button i {
  font-size: 16px;
  color: #fff;
  transition: transform 0.16s ease;
}
.composer .send-button:hover:not(:disabled) i {
  transform: translateX(2px);
}

.quick-prompts {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  margin: 12px auto 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
}
.quick-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: #71717a;
  margin-right: 2px;
}
.quick-pill {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(24, 24, 27, .10);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  color: #3f3f46;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .16s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
}
.quick-pill:hover {
  border-color: rgba(217, 119, 6, .45);
  background: #fff;
  color: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, .12);
}
.composer-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.control-group,
.param-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.control-label {
  font-size: 12px;
  font-weight: 500;
  color: #8b85a0;
  user-select: none;
}
.trigger-ratio-box {
  display: inline-block;
  border: 1.6px solid #5b5470;
  border-radius: 3px;
  flex: none;
  transition: width .15s ease, height .15s ease;
}
.param-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(24, 18, 46, .10);
  background: #f4f4f6;
  color: #241c3d;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.param-trigger:hover {
  border-color: rgba(24, 24, 27, .24);
  background: #fff;
}
.param-trigger[aria-expanded="true"] {
  background: #fff;
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, .08);
}
.param-trigger .param-chevron {
  font-size: 15px;
  color: #8b85a0;
  transition: transform .15s ease;
}
.param-trigger[aria-expanded="true"] .param-chevron {
  transform: rotate(180deg);
}
.param-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: min(410px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(24, 18, 46, .08);
  box-shadow: 0 20px 50px rgba(20, 12, 60, .14), 0 4px 12px rgba(20, 12, 60, .05);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popover-in .14s ease-out;
}
.param-popover.hidden {
  display: none;
}
.param-popover.open-up {
  top: auto;
  bottom: calc(100% + 10px);
}
@keyframes popover-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.param-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.param-label {
  font-size: 13px;
  font-weight: 500;
  color: #4b4560;
}
.param-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 12px;
  background: #f4f4f6;
  gap: 2px;
}
.param-seg-btn {
  border: 0;
  background: transparent;
  color: #6b6580;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.param-seg-btn:hover {
  color: #241c3d;
}
.param-seg-btn.active {
  background: #fff;
  color: #18181b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.ratio-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ratio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 6px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.ratio-card:hover {
  background: #f7f7f9;
}
.ratio-card.active {
  background: #f4f4f6;
  border-color: #d4d4d8;
}
.ratio-box {
  display: block;
  border: 1.5px solid #71717a;
  border-radius: 4px;
  transition: border-color .15s ease;
}
.ratio-card.active .ratio-box {
  border-color: #18181b;
}
.ratio-code {
  font-size: 12.5px;
  font-weight: 600;
  color: #27272a;
  line-height: 1.2;
}
.ratio-name {
  font-size: 11px;
  color: #8b85a0;
  line-height: 1.1;
}
@media (max-width: 520px) {
  .ratio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- 灵感示例与风格栏重做（紧跟输入框下方，清爽无竖向滚动条） ---- */
.inspiration-band {
  padding: 20px clamp(16px, 4vw, 32px) 44px !important;
  max-width: 1140px;
  margin: 0 auto;
}
.inspiration-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px !important;
}
.inspiration-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.inspiration-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
  letter-spacing: -0.01em;
}
.inspiration-title span {
  font-size: 13px;
  color: #71717a;
  font-weight: 400;
}
.inspiration-head button {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 24, 27, .04);
  color: #3f3f46;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.inspiration-head button:hover {
  background: rgba(24, 24, 27, .08);
  color: #18181b;
}
.style-bar,
.composer-mount + .style-bar {
  width: min(940px, 100%) !important;
  margin: 14px auto 0 !important;
  max-width: 940px !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 4px !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 8px !important;
  text-align: left;
  box-sizing: border-box;
}
.style-cats {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 !important;
}
.style-cat {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(24, 24, 27, .07);
  background: #fff;
  color: #52525b;
  font-size: 12px;
  font-weight: 500;
}
.style-cat.active {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 24, 27, .16);
}
.style-chips {
  width: 100%;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px;
  max-height: none !important;
  overflow: visible !important;
  padding: 2px 0 !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.style-chips::-webkit-scrollbar {
  display: none;
}
.style-chip {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(24, 24, 27, .09);
  background: #fff;
  color: #3f3f46;
  font-size: 12.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.style-chip:hover {
  transform: none;
  border-color: rgba(24, 24, 27, .24);
  background: #fafafa;
  box-shadow: none;
}
.style-chip.active {
  background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(24, 24, 27, .22);
}
.style-chip.style-more {
  border-style: dashed;
  color: #71717a;
  background: transparent;
}
.style-chip.style-more:hover {
  color: #18181b;
  background: rgba(24, 24, 27, .04);
}
.example-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}
.example-grid .example-card,
.example-grid .prompt-card {
  border-radius: 20px;
  border: 1px solid rgba(24, 24, 27, .07);
  background: #fff;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.example-grid .card-art {
  height: auto !important;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  margin-bottom: 10px;
}
.example-grid .card-art img {
  transition: transform .28s ease;
}
.example-grid .prompt-card:hover .card-art img {
  transform: scale(1.03);
}
@media (max-width: 980px) {
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 560px) {
  .example-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
