:root {
  --paper: #f7f5ee;
  --panel: #fffdf7;
  --ink: #1f1d18;
  --muted: #706b60;
  --line: #d9d2c4;
  --line-strong: #27231d;
  --accent: #176d5b;
  --accent-2: #1c5fa8;
  --warm: #f3c44e;
  --soft-green: #e7f2eb;
  --soft-blue: #e7eef9;
  --shadow: 0 10px 28px rgba(28, 25, 19, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.hero-cover {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-bottom: 2px solid var(--line-strong);
  background:
    radial-gradient(circle at 50% 8%, rgba(64, 213, 255, 0.22), transparent 30%),
    radial-gradient(circle at 18% 42%, rgba(98, 114, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #07131f 0%, #0c1725 46%, #08111c 100%);
  color: #fffdf7;
}

.hero-cover::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(148, 203, 255, 0.055) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(148, 203, 255, 0.05) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(115deg, transparent 0 62%, rgba(122, 209, 255, 0.055) 62% 62.25%, transparent 62.25% 100%);
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

.hero-cover::after {
  position: absolute;
  right: 9%;
  top: 102px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(154, 213, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 46%, rgba(118, 204, 255, 0.16) 46.4% 47%, transparent 47.4% 62%, rgba(118, 204, 255, 0.12) 62.4% 63%, transparent 63.4%),
    linear-gradient(90deg, transparent 49.8%, rgba(118, 204, 255, 0.16) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(118, 204, 255, 0.12) 50%, transparent 50.2%);
  content: "";
  opacity: 0.5;
  pointer-events: none;
}

.hero-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.hero-logo {
  display: grid;
  width: 172px;
  height: 52px;
  place-items: center;
  border: 3px solid #050505;
  padding: 0;
  background: #f3c44e;
  color: #111;
  box-shadow: 6px 6px 0 #050505;
}

.hero-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(980px, calc(100% - 44px));
  margin: 36px auto 0;
  text-align: center;
}

.hero-title {
  color: #fffdf7;
  font-size: 108px;
  font-weight: 950;
  line-height: 0.92;
  text-shadow: 8px 8px 0 #050505;
}

.hero-label {
  margin-top: 22px;
  border: 4px solid #050505;
  padding: 10px 38px 14px;
  background: #fffdf7;
  color: #050505;
  box-shadow: 8px 8px 0 #050505;
  font-size: 68px;
  font-weight: 950;
  line-height: 1;
}

.hero-subtitle {
  margin-top: 20px;
  color: #fffdf7;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 3px 3px 0 #050505;
}

.hero-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  width: min(840px, 100%);
  margin-top: 42px;
  border: 3px solid #050505;
  background: #fffdf7;
  box-shadow: 8px 8px 0 #050505;
  text-align: left;
}

.hero-input-panel {
  position: relative;
  min-height: 166px;
  border-right: 2px solid #050505;
  background: #f5f7fa;
}

.hero-input-panel textarea {
  width: 100%;
  min-height: 166px;
  resize: none;
  border: 0;
  padding: 22px 24px 76px;
  outline: none;
  background: transparent;
  color: #1f1d18;
  font-size: 18px;
  line-height: 1.5;
}

.hero-input-panel textarea::placeholder {
  color: #9ca5b3;
}

.hero-input-panel.has-uploads textarea {
  padding-top: 86px;
}

.hero-uploads {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  gap: 10px;
  overflow: hidden;
  padding-bottom: 18px;
  border-bottom: 1px solid #d7dce3;
  pointer-events: none;
}

.hero-uploads:empty {
  display: none;
}

.upload-chip {
  position: relative;
  display: inline-flex;
  max-width: 148px;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  border: 2px solid #c8c8c8;
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  background: #fffdf7;
  color: #55585f;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  pointer-events: auto;
  white-space: nowrap;
}

.upload-chip:hover {
  border-color: #050505;
  background: #fff7c8;
}

.upload-chip img {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
}

.upload-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #050505;
  color: #fffdf7;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.upload-chip:hover .upload-remove,
.upload-chip:focus-within .upload-remove {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-tool-row {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-settings-panel {
  position: absolute;
  left: 24px;
  bottom: 70px;
  display: grid;
  width: max-content;
  max-width: calc(100% - 48px);
  gap: 9px;
  border: 3px solid #050505;
  padding: 10px 12px 12px;
  background: #fffdf7;
  box-shadow: 5px 5px 0 #050505;
}

.hero-settings-panel[hidden] {
  display: none;
}

.hero-settings-panel strong {
  color: #747b85;
  font-size: 13px;
  font-weight: 900;
}

.ratio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ratio-btn {
  min-width: 50px;
  min-height: 30px;
  border: 3px solid #050505;
  padding: 0 9px;
  background: #fffdf7;
  color: #050505;
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 3px 3px 0 #050505;
}

.ratio-btn.active {
  background: #050505;
  color: #fffdf7;
}

.hero-mini-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px solid #050505;
  padding: 0 16px;
  background: #fffdf7;
  color: #050505;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 3px 3px 0 #050505;
}

.hero-icon-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
}

.hero-mini-btn:hover {
  background: #ffe36e;
}

.hero-file-btn {
  display: inline-flex;
  align-items: center;
}

.hero-file-name {
  min-width: 0;
  overflow: hidden;
  color: #5f6978;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-reset-btn {
  position: absolute;
  right: 20px;
  bottom: 16px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid #050505;
  background: #fffdf7;
  color: #050505;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  box-shadow: 4px 4px 0 #050505;
}

.hero-reset-btn[hidden] {
  display: none;
}

.hero-generate {
  display: inline-flex;
  min-height: 166px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: #050505;
  color: #fffdf7;
  cursor: pointer;
  font-size: 22px;
  font-weight: 950;
}

.hero-generate svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  fill: currentColor;
}

.hero-generate:hover {
  background: #151515;
}

.hero-pill {
  margin-top: 28px;
  border: 2px solid #050505;
  border-radius: 999px;
  padding: 8px 18px;
  background: #e8f6ff;
  color: #050505;
  box-shadow: 4px 4px 0 #050505;
  font-size: 14px;
  font-weight: 900;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1.4fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 2px solid var(--line-strong);
  background: rgba(247, 245, 238, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-img {
  display: block;
  width: 154px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  background: #f3c44e;
  object-fit: cover;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--line-strong);
  background: var(--warm);
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.1;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 46px 0 14px;
  outline: none;
  background: var(--panel);
}

.search-wrap input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(28, 95, 168, 0.14);
}

.icon-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--ink);
  background: #eee7d9;
}

.toolbar,
.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.command-btn {
  min-height: 40px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.command-btn:hover {
  transform: translateY(-1px);
}

.command-btn.secondary {
  background: var(--panel);
  color: var(--ink);
}

.command-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.workspace {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 74px);
}

.filter-panel {
  position: sticky;
  top: 74px;
  height: calc(100vh - 74px);
  overflow: auto;
  border-right: 2px solid var(--line-strong);
  background: #eee8dc;
  padding: 16px 14px;
}

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

.filter-head strong {
  font-size: 16px;
}

.filter-head span,
.category-btn em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.category-groups {
  display: grid;
  gap: 14px;
}

.category-group h3 {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

.category-btn {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.category-btn span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.category-btn:hover {
  background: rgba(255, 253, 247, 0.72);
}

.category-btn.active {
  border-color: var(--line-strong);
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--line-strong);
  font-weight: 800;
}

.favorite-filter-btn {
  margin-top: 8px;
}

.content {
  min-width: 0;
  padding: 18px 22px 36px;
}

.result-bar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  color: var(--muted);
}

.result-bar strong {
  color: var(--ink);
  font-size: 24px;
}

.active-filter {
  max-width: 50vw;
  overflow: hidden;
  color: var(--accent);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.prompt-card {
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(31, 29, 24, 0.92);
}

.image-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: #ded7ca;
  cursor: zoom-in;
}

.image-button img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #ded7ca;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  font-weight: 850;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.tag {
  max-width: 100%;
  border: 1px solid #9ab2d3;
  border-radius: 6px;
  padding: 2px 7px;
  background: var(--soft-blue);
  color: #173f72;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.small-btn {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #f1eadc;
  cursor: pointer;
  font-weight: 750;
}

.small-btn:hover {
  background: var(--soft-green);
}

.generate-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.generate-card-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: currentColor;
}

.load-row {
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

.load-more {
  min-width: 180px;
}

.detail-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(23, 22, 18, 0.62);
}

.upload-preview-dialog {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 0;
  background: #1f1d18;
  box-shadow: var(--shadow);
}

.upload-preview-dialog::backdrop {
  background: rgba(23, 22, 18, 0.72);
}

.upload-preview-shell {
  position: relative;
  display: grid;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  place-items: center;
  padding: 16px;
  background: #1f1d18;
}

.upload-preview-shell img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
  object-fit: contain;
}

.upload-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  max-height: calc(100vh - 32px);
}

.preview-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  background: #24221e;
}

.preview-pane > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  flex: 0 1 auto;
  object-fit: contain;
}

.floating-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.image-strip {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border-top: 2px solid #3b3831;
}

.image-strip button {
  width: 60px;
  height: 46px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.image-strip button.active {
  border-color: var(--warm);
}

.image-strip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #24221e;
}

.prompt-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 18px;
}

.prompt-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.prompt-head h2 {
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.prompt-head p {
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 164px;
  border: 3px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}

.segmented button {
  min-height: 38px;
  border: 0;
  background: var(--panel);
  cursor: pointer;
  font-weight: 800;
}

.segmented button.active {
  background: var(--ink);
  color: white;
}

.copy-row {
  justify-content: space-between;
}

.language-switch {
  width: min(192px, 100%);
  min-width: 156px;
  border-width: 2px;
  border-radius: 8px;
  box-shadow: 2px 2px 0 rgba(31, 29, 24, 0.92);
}

.language-switch button {
  min-height: 29px;
  font-size: 14px;
  font-weight: 900;
}

.detail-actions {
  display: grid;
  width: 128px;
  gap: 8px;
}

.copy-current {
  width: 100%;
}

.command-btn.generate-now {
  display: inline-flex;
  width: 136px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-width: 2px;
  border-radius: 12px;
  background: #f1eadc;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.command-btn.generate-now svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: currentColor;
}

.prompt-text {
  min-height: 0;
  margin: 0;
  overflow: auto;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  background: #fff2a9;
  color: #111;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.68;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 44px));
  transform: translateY(20px);
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

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

.empty-state {
  grid-column: 1 / -1;
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .hero-cover {
    min-height: 500px;
  }

  .hero-cover::after {
    opacity: 0.28;
  }

  .hero-inner {
    margin-top: 28px;
  }

  .hero-title {
    font-size: 78px;
    text-shadow: 6px 6px 0 #050505;
  }

  .hero-label {
    font-size: 54px;
  }

  .hero-composer {
    grid-template-columns: minmax(0, 1fr) 128px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    height: auto;
    max-height: 34vh;
    border-right: 0;
    border-bottom: 2px solid var(--line-strong);
  }

  .dialog-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .preview-pane > img {
    max-height: min(46vh, 520px);
  }

  .prompt-pane {
    min-height: 48vh;
  }
}

@media (max-width: 560px) {
  .hero-cover {
    min-height: 0;
    padding-bottom: 42px;
  }

  .hero-cover::after {
    display: none;
  }

  .hero-nav {
    padding: 14px 16px;
  }

  .hero-logo {
    width: 142px;
    height: 44px;
    padding: 0;
    box-shadow: 4px 4px 0 #050505;
  }

  .hero-inner {
    width: calc(100% - 28px);
    margin-top: 18px;
  }

  .hero-title {
    font-size: 48px;
    text-shadow: 4px 4px 0 #050505;
  }

  .hero-label {
    margin-top: 16px;
    padding: 8px 24px 10px;
    font-size: 38px;
    box-shadow: 5px 5px 0 #050505;
  }

  .hero-subtitle {
    margin-top: 16px;
    font-size: 15px;
  }

  .hero-composer {
    grid-template-columns: 1fr;
    margin-top: 28px;
    box-shadow: 5px 5px 0 #050505;
  }

  .hero-input-panel {
    min-height: 210px;
    border-right: 0;
    border-bottom: 2px solid #050505;
  }

  .hero-input-panel textarea {
    min-height: 210px;
    padding: 18px 16px 92px;
    font-size: 15px;
  }

  .hero-input-panel.has-uploads textarea {
    padding-top: 102px;
  }

  .hero-uploads {
    top: 16px;
    left: 16px;
    right: 16px;
    flex-wrap: wrap;
    gap: 7px;
    padding-bottom: 12px;
  }

  .upload-chip {
    max-width: 136px;
    min-height: 34px;
    gap: 6px;
    padding-right: 10px;
    font-size: 12px;
  }

  .upload-chip img {
    width: 26px;
    height: 26px;
  }

  .hero-tool-row {
    left: 16px;
    right: 16px;
    bottom: 14px;
    flex-wrap: wrap;
  }

  .hero-settings-panel {
    right: 16px;
    left: 16px;
    bottom: 82px;
    width: auto;
    gap: 8px;
    padding: 10px;
    box-shadow: 4px 4px 0 #050505;
  }

  .ratio-options {
    gap: 7px;
  }

  .ratio-btn {
    min-width: 48px;
    min-height: 30px;
    padding-inline: 8px;
    font-size: 13px;
    box-shadow: 3px 3px 0 #050505;
  }

  .hero-mini-btn {
    min-height: 34px;
    padding-inline: 12px;
  }

  .hero-reset-btn {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .hero-generate {
    min-height: 68px;
    font-size: 20px;
  }

  .hero-pill {
    margin-top: 22px;
    font-size: 12px;
  }

  .topbar,
  .content {
    padding-inline: 12px;
  }

  .toolbar,
  .copy-row {
    flex-wrap: wrap;
  }

  .command-btn {
    flex: 1 1 auto;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    gap: 12px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .prompt-head {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
  }
}

/* 92AI-inspired visual refresh for the prompt gallery. */
:root {
  color-scheme: light;
  --paper: #f7faf9;
  --panel: #ffffff;
  --ink: #101820;
  --muted: rgba(16, 24, 32, 0.58);
  --line: rgba(16, 24, 32, 0.1);
  --line-strong: rgba(16, 24, 32, 0.18);
  --accent: #18c8a8;
  --accent-2: #2f7cff;
  --warm: #f3c44e;
  --soft-green: rgba(24, 200, 168, 0.1);
  --soft-blue: rgba(47, 124, 255, 0.08);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(238, 244, 246, 0.74);
  --shadow: 0 24px 70px rgba(31, 45, 56, 0.12);
  --shadow-card: 0 16px 44px rgba(31, 45, 56, 0.1);
}

html {
  background: var(--paper);
}

body {
  background:
    linear-gradient(180deg, rgba(238, 248, 246, 0.94) 0%, rgba(247, 250, 249, 0.82) 420px, #f7faf9 100%),
    #f7faf9;
  color: var(--ink);
  text-rendering: geometricPrecision;
}

.app-shell {
  background: transparent;
}

.hero-cover {
  min-height: 560px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 251, 250, 0.86) 42%, rgba(224, 246, 242, 0.74) 100%),
    #f7faf9;
  color: var(--ink);
}

.hero-cover::before {
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(24, 200, 168, 0.08) 48.2% 48.8%, transparent 49% 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
  opacity: 1;
}

.hero-cover::after {
  display: none;
}

.hero-logo {
  width: 182px;
  height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}

.brand-logo-img {
  width: 148px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.hero-nav {
  width: min(1340px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 10px;
}

.hero-logo {
  width: 174px;
  height: 54px;
  border: 1px solid rgba(16, 24, 32, 0.14);
  border-radius: 16px;
  background: #f3c44e;
  box-shadow: 0 18px 44px rgba(31, 45, 56, 0.14);
}

.hero-logo img {
  border-radius: 15px;
}

.hero-inner {
  width: min(980px, calc(100% - 44px));
  margin-top: 48px;
}

.hero-title {
  color: var(--ink);
  font-size: clamp(56px, 8.2vw, 104px);
  font-weight: 920;
  line-height: 0.94;
  text-shadow: none;
}

.hero-label {
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  padding: 12px 42px 15px;
  background: #101820;
  color: #ffffff;
  box-shadow: 0 24px 54px rgba(16, 24, 32, 0.16);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
}

.hero-subtitle {
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 720;
  text-shadow: none;
}

.hero-composer {
  grid-template-columns: minmax(0, 1fr) 142px;
  width: min(920px, 100%);
  margin-top: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-input-panel {
  min-height: 168px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.hero-input-panel textarea {
  min-height: 168px;
  padding: 24px 28px 78px;
  color: var(--ink);
  font-size: 17px;
}

.hero-input-panel textarea::placeholder {
  color: rgba(16, 24, 32, 0.34);
}

.hero-uploads {
  border-bottom-color: rgba(16, 24, 32, 0.08);
}

.upload-chip {
  border: 1px solid rgba(16, 24, 32, 0.12);
  background: #ffffff;
  color: rgba(16, 24, 32, 0.72);
}

.upload-chip:hover {
  border-color: rgba(24, 200, 168, 0.42);
  background: #f4fffc;
}

.hero-settings-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(31, 45, 56, 0.14);
}

.ratio-btn {
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: #f7faf9;
  box-shadow: none;
}

.ratio-btn.active {
  background: #101820;
  color: #ffffff;
}

.hero-mini-btn {
  min-height: 38px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: none;
}

.hero-mini-btn:hover {
  border-color: rgba(24, 200, 168, 0.42);
  background: rgba(232, 255, 250, 0.96);
}

.hero-reset-btn {
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 45, 56, 0.16);
}

.hero-generate {
  min-height: 168px;
  background: #101820;
  color: #ffffff;
  font-size: 21px;
}

.hero-generate:hover {
  background: #17212b;
}

.hero-pill {
  margin-top: 26px;
  border: 1px solid rgba(24, 200, 168, 0.28);
  background: rgba(232, 255, 250, 0.84);
  color: #0b5f53;
  box-shadow: none;
  font-weight: 820;
}

.topbar {
  grid-template-columns: 210px minmax(280px, 1fr) auto;
  gap: 18px;
  padding: 16px max(22px, calc((100vw - 1340px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(1.08);
}

.brand-logo-img {
  width: 146px;
  height: 42px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(31, 45, 56, 0.1);
}

.search-wrap input {
  height: 46px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(31, 45, 56, 0.06);
}

.search-wrap input:focus {
  border-color: rgba(24, 200, 168, 0.52);
  box-shadow: 0 0 0 4px rgba(24, 200, 168, 0.12);
}

.command-btn {
  min-height: 42px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: #101820;
  box-shadow: 0 14px 32px rgba(16, 24, 32, 0.12);
}

.command-btn.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: none;
}

.workspace {
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 75px);
  background: #f7faf9;
}

.filter-panel {
  top: 75px;
  height: calc(100vh - 75px);
  border-right: 1px solid var(--line);
  background: rgba(238, 244, 246, 0.72);
  padding: 18px 16px;
}

.filter-head {
  color: rgba(16, 24, 32, 0.74);
}

.category-groups {
  gap: 10px;
}

.category-group h3 {
  margin: 18px 0 8px;
  color: rgba(16, 24, 32, 0.48);
  font-weight: 820;
}

.category-btn {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(16, 24, 32, 0.7);
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.78);
}

.category-btn.active {
  border-color: transparent;
  background: #101820;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(16, 24, 32, 0.13);
}

.content {
  padding: 24px max(22px, calc((100vw - 1340px) / 2)) 42px 24px;
}

.result-bar {
  margin-bottom: 20px;
}

.result-bar strong {
  font-size: 26px;
  font-weight: 900;
}

.active-filter {
  color: #0b8f78;
}

.gallery {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.prompt-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 32, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.prompt-card:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 200, 168, 0.32);
  box-shadow: 0 22px 58px rgba(31, 45, 56, 0.14);
}

.image-button {
  flex: 0 0 auto;
  background: #edf3f5;
}

.image-button img {
  background: #edf3f5;
}

.card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 196px;
  padding: 14px;
}

.card-title-row,
.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: start;
}

.card-title {
  min-height: 46px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 860;
}

.favorite-star-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(16, 24, 32, 0.78);
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.favorite-star-btn:hover,
.favorite-star-btn:focus-visible {
  background: rgba(16, 24, 32, 0.05);
  color: #101820;
  outline: none;
  transform: translateY(-1px);
}

.favorite-star-btn.active {
  color: #d99a00;
}

.favorite-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.favorite-icon svg {
  display: block;
  width: 25px;
  height: 25px;
  overflow: visible;
}

.favorite-icon-star {
  fill: #ffffff;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.favorite-icon-badge {
  fill: currentColor;
}

.favorite-icon-plus {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.favorite-star-btn.active .favorite-icon-star,
.favorite-star-btn.active .favorite-icon-badge {
  fill: #f3c44e;
  stroke: #d99a00;
}

.favorite-star-btn.active .favorite-icon-badge,
.favorite-star-btn.active .favorite-icon-plus {
  display: none;
}

.tag {
  border: 1px solid rgba(47, 124, 255, 0.12);
  border-radius: 999px;
  background: rgba(47, 124, 255, 0.07);
  color: #285f9f;
  font-size: 12px;
}

.card-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
}

.small-btn {
  min-height: 36px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-weight: 780;
}

.small-btn:hover {
  background: rgba(232, 255, 250, 0.94);
}

.generate-card-btn {
  background: #101820;
  color: #ffffff;
}

.generate-card-btn:hover {
  background: #17212b;
}

.detail-dialog {
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 34px 110px rgba(16, 24, 32, 0.22);
}

.detail-dialog::backdrop {
  background: rgba(7, 12, 16, 0.56);
  backdrop-filter: blur(12px);
}

.preview-pane {
  background: #101820;
}

.prompt-pane {
  background: #ffffff;
}

.prompt-head h2 {
  color: var(--ink);
  font-weight: 900;
}

.detail-title-row {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.detail-favorite-star {
  width: 32px;
  height: 32px;
}

.detail-actions {
  width: 96px;
  gap: 0;
}

.copy-current {
  width: 100%;
}

.segmented {
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: #edf3f5;
}

.segmented button {
  border-radius: 999px;
}

.segmented button.active {
  background: #101820;
}

.language-switch {
  box-shadow: none;
}

.command-btn.generate-now {
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.prompt-text {
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 18px;
  background: #fff8c9;
}

.empty-state {
  border: 1px dashed rgba(16, 24, 32, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    height: auto;
    max-height: 34vh;
  }
}

@media (max-width: 560px) {
  .hero-cover {
    padding-bottom: 36px;
  }

  .hero-composer {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-label {
    font-size: 34px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  }

  .card-body {
    padding: 12px;
  }

  .card-title-row {
    grid-template-columns: minmax(0, 1fr) 32px;
  }

  .favorite-star-btn {
    width: 28px;
    height: 28px;
  }

  .favorite-icon,
  .favorite-icon svg {
    width: 23px;
    height: 23px;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hero-cover {
  background:
    radial-gradient(ellipse 56% 62% at 50% 45%, rgba(138, 197, 226, 0.82) 0%, rgba(178, 219, 239, 0.62) 36%, rgba(226, 234, 235, 0.7) 66%, rgba(239, 239, 238, 0.98) 100%),
    linear-gradient(180deg, #f3f2f1 0%, #ededec 100%);
}

.hero-cover::before {
  background: radial-gradient(ellipse 48% 40% at 50% 42%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 72%);
  opacity: 1;
}

.hero-cover::after {
  display: none;
}

.hero-logo {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-logo img,
.brand-logo-img {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.topbar {
  padding-right: 24px;
  padding-left: 24px;
}

.content {
  padding-right: 24px;
}

.gallery {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1300px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 560px) {
  .content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  }
}

.hero-pill {
  margin-top: 26px;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: #101820;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.14);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

@media (max-width: 560px) {
  .hero-pill {
    margin-top: 22px;
    padding: 7px 16px;
    font-size: 12px;
  }
}

.hero-cover {
  overflow: visible;
}

.hero-inner {
  padding-bottom: 18px;
}

.hero-pill {
  position: relative;
  z-index: 3;
  margin-top: 18px;
  margin-bottom: -36px;
  transform: none;
}

.topbar {
  padding-top: 34px;
}

@media (max-width: 560px) {
  .hero-inner {
    padding-bottom: 14px;
  }

  .hero-pill {
    margin-top: 16px;
    margin-bottom: -30px;
  }

  .topbar {
    padding-top: 30px;
  }
}

.hero-cover {
  min-height: 0;
}

.hero-nav {
  padding-top: 18px;
  padding-bottom: 4px;
}

.hero-inner {
  width: min(940px, calc(100% - 44px));
  margin-top: 26px;
  padding-bottom: 8px;
}

.hero-title {
  font-size: clamp(52px, 5.4vw, 82px);
  line-height: 0.94;
}

.hero-label {
  margin-top: 14px;
  padding: 8px 34px 11px;
  font-size: clamp(30px, 3.2vw, 46px);
}

.hero-subtitle {
  margin-top: 14px;
  font-size: 14px;
}

.hero-composer {
  width: min(900px, 100%);
  margin-top: 28px;
}

.hero-input-panel,
.hero-input-panel textarea {
  min-height: 138px;
}

.hero-input-panel textarea {
  padding-top: 20px;
  padding-bottom: 70px;
}

.hero-generate {
  min-height: 138px;
}

.hero-pill {
  margin-top: 14px;
}

@media (max-width: 560px) {
  .hero-nav {
    padding-top: 14px;
  }

  .hero-inner {
    margin-top: 24px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-label {
    font-size: 32px;
  }

  .hero-input-panel,
  .hero-input-panel textarea,
  .hero-generate {
    min-height: 150px;
  }
}

.hero-nav {
  padding-top: 12px;
  padding-bottom: 0;
}

.hero-logo {
  width: 128px;
  height: 38px;
}

.brand-logo-img {
  width: 120px;
  height: 35px;
}

.hero-inner {
  width: min(1120px, calc(100% - 64px));
  margin-top: 16px;
  padding-bottom: 8px;
}

.hero-title {
  font-size: clamp(34px, 4vw, 56px);
}

.hero-label {
  margin-top: 10px;
  padding: 6px 28px 9px;
  font-size: clamp(24px, 2.4vw, 34px);
}

.hero-subtitle {
  margin-top: 10px;
  font-size: 13px;
}

.hero-composer {
  grid-template-columns: minmax(0, 1fr) 118px;
  width: min(1080px, 100%);
  margin-top: 18px;
}

.hero-input-panel,
.hero-input-panel textarea,
.hero-generate {
  height: 116px;
  min-height: 116px;
}

.hero-input-panel textarea {
  padding: 18px 24px 56px;
  font-size: 16px;
}

.hero-tool-row {
  bottom: 12px;
  gap: 8px;
}

.hero-mini-btn {
  min-height: 34px;
  padding-inline: 13px;
}

.hero-generate {
  font-size: 18px;
}

.hero-generate svg {
  width: 22px;
  height: 22px;
}

.hero-pill {
  margin-top: 10px;
  margin-bottom: -32px;
}

.topbar {
  padding-top: 30px;
}

@media (max-width: 560px) {
  .hero-logo {
    width: 116px;
    height: 34px;
  }

  .hero-inner {
    margin-top: 16px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-label {
    font-size: 28px;
  }

  .hero-input-panel,
  .hero-input-panel textarea,
  .hero-generate {
    height: 132px;
    min-height: 132px;
  }
}

/* Final stable hero sizing: keep the section wide, only compress vertical height. */
.hero-cover {
  min-height: 0;
  overflow: visible;
}

.hero-nav {
  width: min(1280px, calc(100% - 48px));
  padding-top: 16px;
  padding-bottom: 0;
}

.hero-logo {
  width: clamp(124px, 10vw, 156px);
  height: clamp(36px, 3vw, 45px);
}

.hero-inner {
  width: min(1180px, calc(100% - 64px));
  margin-top: 18px;
  padding-bottom: 0;
}

.hero-title {
  font-size: clamp(40px, 4.4vw, 58px);
}

.hero-label {
  margin-top: 10px;
  padding: 7px 30px 10px;
  font-size: clamp(26px, 2.6vw, 38px);
}

.hero-subtitle {
  margin-top: 10px;
  font-size: 13px;
}

.hero-composer {
  grid-template-columns: minmax(0, 1fr) 140px;
  width: min(1180px, 100%);
  margin-top: 20px;
}

.hero-input-panel,
.hero-input-panel textarea,
.hero-generate {
  height: 126px;
  min-height: 126px;
  max-height: 126px;
}

.hero-input-panel textarea {
  box-sizing: border-box;
  padding: 18px 28px 56px;
  font-size: 16px;
}

.hero-tool-row {
  bottom: 12px;
}

.hero-mini-btn {
  min-height: 34px;
}

.hero-generate {
  font-size: 18px;
}

.hero-generate svg {
  width: 22px;
  height: 22px;
}

.hero-pill {
  margin-top: 12px;
  margin-bottom: -18px;
}

.topbar {
  padding-top: 34px;
}

@media (max-width: 980px) {
  .hero-inner {
    width: min(760px, calc(100% - 44px));
  }

  .hero-composer {
    grid-template-columns: minmax(0, 1fr) 118px;
  }
}

@media (max-width: 560px) {
  .hero-nav {
    width: min(100% - 32px, 1280px);
    padding-top: 14px;
  }

  .hero-logo {
    width: 116px;
    height: 34px;
  }

  .hero-inner {
    width: min(100% - 32px, 760px);
    margin-top: 16px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-label {
    font-size: 28px;
  }

  .hero-composer {
    grid-template-columns: 1fr;
  }

  .hero-input-panel,
  .hero-input-panel textarea,
  .hero-generate {
    height: 132px;
    min-height: 132px;
    max-height: 132px;
  }

  .topbar {
    padding-top: 30px;
  }
}

/* Keep the bottom badge inside the hero image instead of letting the next module cover it. */
.hero-pill {
  margin-bottom: 18px;
}

/* Increase only the hero image/background height by one third. */
.hero-cover {
  min-height: 653px;
}

/* Move the hero content group down inside the taller background. */
.hero-inner {
  transform: translateY(145px);
}

/* Increase the prompt input bar height by 80%. */
.hero-input-panel,
.hero-input-panel textarea,
.hero-generate {
  height: 227px;
  min-height: 227px;
  max-height: 227px;
}

.hero-input-panel textarea {
  padding-bottom: 70px;
}

/* Browser comment fixes: grow the input upward 10%, keep the badge visible, and restore 5 cards per row. */
.hero-cover {
  min-height: 690px;
}

.hero-composer {
  margin-top: -3px;
}

.hero-input-panel,
.hero-input-panel textarea,
.hero-generate {
  height: 250px;
  min-height: 250px;
  max-height: 250px;
}

.hero-pill {
  margin-bottom: 28px;
}

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

@media (max-width: 1300px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  }
}

/* Final logo sizing: match the 109x30 brand mark used on http://127.0.0.1:4321/. */
.hero-logo,
.brand-logo-img {
  width: 109px !important;
  height: 30px !important;
  flex: 0 0 auto;
}

.hero-logo img,
.brand-logo-img {
  display: block;
  width: 109px !important;
  height: 30px !important;
  object-fit: contain !important;
}

/* Match the top-left 92AI logo size from the reference site at :4321. */
.hero-logo,
.brand-logo-img {
  width: 109px;
  height: 30px;
}

.hero-logo img,
.brand-logo-img {
  object-fit: contain;
}

/* UI polish pass: keep the 92AI theme, but tighten hierarchy, spacing, and surface contrast. */
:root {
  --paper: #f4f8f8;
  --panel: #ffffff;
  --ink: #101820;
  --muted: #667782;
  --line: #dce8e8;
  --line-strong: #101820;
  --accent: #078a77;
  --accent-2: #2b78ff;
  --soft-green: #e9fbf7;
  --soft-blue: #edf6ff;
  --shadow-card: 0 18px 50px rgba(16, 24, 32, 0.08);
  --shadow-card-hover: 0 24px 68px rgba(16, 24, 32, 0.14);
}

html,
body {
  background:
    radial-gradient(circle at 50% 0%, rgba(181, 226, 243, 0.35), transparent 34rem),
    linear-gradient(180deg, #f8fbfb 0%, #f4f8f8 42%, #eef5f5 100%);
  color: var(--ink);
  text-rendering: geometricPrecision;
}

.topbar {
  grid-template-columns: 190px minmax(280px, 1fr) auto;
  padding-top: 18px;
  padding-bottom: 18px;
  background: rgba(250, 253, 253, 0.9);
  border-bottom: 1px solid rgba(16, 24, 32, 0.08);
  box-shadow: 0 12px 34px rgba(16, 24, 32, 0.05);
}

.brand-logo-img {
  width: 132px;
  height: 38px;
}

.search-wrap {
  max-width: 1180px;
}

.search-wrap input {
  height: 48px;
  border-color: rgba(16, 24, 32, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 15px;
  box-shadow: 0 14px 36px rgba(16, 24, 32, 0.06);
}

.search-wrap input::placeholder {
  color: rgba(16, 24, 32, 0.38);
}

.command-btn {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(16, 24, 32, 0.12);
  font-weight: 820;
}

.command-btn.secondary {
  border: 1px solid rgba(16, 24, 32, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(16, 24, 32, 0.06);
}

.workspace {
  background:
    linear-gradient(90deg, rgba(238, 247, 247, 0.95) 0 260px, transparent 260px),
    linear-gradient(180deg, rgba(247, 251, 251, 0.92), rgba(242, 248, 248, 0.94));
}

.filter-panel {
  border-right: 1px solid rgba(16, 24, 32, 0.08);
  background: rgba(239, 247, 247, 0.8);
  padding: 20px 18px 28px;
  scrollbar-color: rgba(16, 24, 32, 0.34) transparent;
}

.filter-head {
  margin-bottom: 16px;
  color: var(--ink);
}

.filter-head strong {
  font-size: 17px;
  font-weight: 900;
}

.category-group h3 {
  margin: 22px 0 8px;
  color: rgba(16, 24, 32, 0.48);
  font-size: 12px;
  font-weight: 850;
}

.category-btn {
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(16, 24, 32, 0.66);
  font-size: 15px;
  font-weight: 650;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.category-btn.active {
  border-color: transparent;
  background: #101820;
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(16, 24, 32, 0.14);
}

.content {
  padding-top: 28px;
  padding-bottom: 52px;
}

.result-bar {
  min-height: 44px;
  margin-bottom: 18px;
  color: rgba(16, 24, 32, 0.52);
}

.result-bar strong {
  font-size: 27px;
  font-weight: 920;
  letter-spacing: 0;
}

.active-filter {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(7, 138, 119, 0.08);
  color: #047767;
  font-size: 14px;
  font-weight: 850;
}

.gallery {
  gap: 22px;
}

.prompt-card {
  border: 1px solid rgba(16, 24, 32, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.prompt-card:hover {
  transform: translateY(-4px);
  border-color: rgba(7, 138, 119, 0.24);
  box-shadow: var(--shadow-card-hover);
}

.image-button {
  background: #edf5f5;
}

.image-button img {
  background:
    linear-gradient(180deg, rgba(237, 246, 246, 0.92), rgba(228, 239, 239, 0.92));
}

.card-body {
  gap: 13px;
  min-height: 204px;
  padding: 16px 16px 15px;
}

.card-title {
  min-height: 48px;
  font-size: 17px;
  font-weight: 880;
  line-height: 1.32;
}

.card-time {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: -6px;
  color: rgba(16, 24, 32, 0.46);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.card-time svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.favorite-star-btn {
  width: 28px;
  height: 28px;
  color: rgba(16, 24, 32, 0.58);
}

.favorite-icon,
.favorite-icon svg {
  width: 23px;
  height: 23px;
}

.tag-row {
  gap: 7px;
}

.tag {
  border-color: rgba(43, 120, 255, 0.14);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(237, 246, 255, 0.88);
  color: #326aa7;
  font-size: 12px;
  font-weight: 650;
}

.card-actions {
  gap: 10px;
}

.small-btn {
  min-height: 38px;
  border: 1px solid rgba(16, 24, 32, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
}

.small-btn:hover {
  background: rgba(233, 251, 247, 0.96);
}

.generate-card-btn {
  background: #101820;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(16, 24, 32, 0.12);
}

.generate-card-btn:hover {
  background: #17222d;
}

.load-row {
  padding-top: 30px;
}

.load-more {
  min-width: 160px;
}

.detail-dialog {
  border: 0;
  border-radius: 30px;
  box-shadow: 0 38px 120px rgba(16, 24, 32, 0.26);
}

.prompt-text {
  background: #fff7bf;
  color: #17202a;
}

@media (max-width: 1180px) {
  .workspace {
    background: linear-gradient(180deg, rgba(247, 251, 251, 0.92), rgba(242, 248, 248, 0.94));
  }
}

/* Final small alignment fixes: keep upload delete controls unclipped and lift the hero title group slightly. */
.hero-title,
.hero-label,
.hero-subtitle {
  transform: translateY(-24px);
}

.hero-uploads,
.upload-chip {
  overflow: visible;
}

.hero-uploads {
  z-index: 8;
}

/* Gallery layout: keep four prompt cards centered between equal left and right rails. */
.workspace {
  grid-template-columns: 260px minmax(0, 1fr) 260px;
}

.content {
  min-width: 0;
  padding-right: 24px;
  padding-left: 24px;
}

.gallery {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

/* Textured hero background: use a real soft-blue asset, then add gentle light and grain-like depth. */
.hero-cover {
  background:
    radial-gradient(ellipse 58% 42% at 50% 38%, rgba(145, 199, 224, 0.2), rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(246, 247, 247, 0.18) 0%, rgba(241, 246, 247, 0.08) 44%, rgba(237, 246, 247, 0.24) 100%),
    url("/assets/prompt-hero-youmind-soft-bg.png") center / cover no-repeat;
  background-color: #eef5f6;
}

.hero-cover::before {
  background:
    radial-gradient(ellipse 34% 26% at 50% 40%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 74%),
    radial-gradient(circle at 50% 42%, rgba(107, 181, 218, 0.12), rgba(255, 255, 255, 0) 46%);
  opacity: 1;
}

.hero-cover::after {
  display: block;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 20% 28%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 62% 34%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 62%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1.5px);
  background-size: 7px 7px, 9px 9px, 11px 11px;
  mix-blend-mode: soft-light;
  opacity: 0.18;
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  }
}
