:root {
  --bg-0: #fff8fc;
  --bg-1: #fff3f9;
  --bg-2: #f8f3ff;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(255, 170, 212, 0.22);
  --text: #38253e;
  --muted: #8f7393;
  --cyan: #7ec8ff;
  --violet: #b18cff;
  --pink: #ff8dc7;
  --peach: #ffcbba;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 141, 199, 0.24), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(126, 200, 255, 0.18), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(255, 203, 186, 0.22), transparent 30%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
}

.app-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 22px rgba(230, 181, 210, 0.12);
}

.account-menu {
  position: relative;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(230, 181, 210, 0.14);
  cursor: pointer;
}

.avatar-button:focus-visible,
.account-action:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid rgba(177, 140, 255, 0.42);
  outline-offset: 2px;
}

.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 141, 199, 0.26), rgba(177, 140, 255, 0.28));
  color: #9b4a7b;
  font-size: 14px;
  font-weight: 700;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 54px rgba(175, 114, 154, 0.18);
  backdrop-filter: blur(18px);
  z-index: 30;
}

.account-summary {
  display: grid;
  gap: 2px;
  padding: 4px 4px 12px;
}

.account-summary strong {
  font-size: 15px;
}

.account-summary span {
  color: var(--muted);
  font-size: 12px;
}

.account-actions {
  display: grid;
  gap: 8px;
}

.account-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(248, 243, 255, 0.74);
  font: inherit;
  cursor: pointer;
}

.account-action:hover {
  background: rgba(244, 236, 252, 0.98);
}

.account-action.danger {
  color: #b04a78;
}

.hero {
  display: block;
  margin-left: -20px;
  margin-right: -20px;
  padding: 4px 20px 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

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

.hero-copy,
.composer,
.result-panel {
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 252, 0.72));
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 38px rgba(214, 170, 198, 0.12);
  padding: 26px;
}

.hero-window {
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 252, 0.82));
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 38px rgba(214, 170, 198, 0.12);
}

.hero-copy {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  width: 100%;
  margin: 0;
  padding: 2px 0 2px;
  display: grid;
  gap: 6px;
  text-align: left;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: 28px;
  align-items: center;
}

.hero.admin-hero .hero-copy {
  padding: 8px 0 0;
}

.composer,
.result-panel {
  border: 1px solid rgba(255, 170, 212, 0.08);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #c0629a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(230, 181, 210, 0.16);
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink), var(--violet));
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(56, 37, 62, 0.22);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  margin: 10vh auto 0;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,248,252,0.95));
  box-shadow: 0 28px 80px rgba(175, 114, 154, 0.22);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.auth-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(248, 243, 255, 0.92);
}

.auth-tab {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: linear-gradient(90deg, rgba(255,141,199,0.22), rgba(177,140,255,0.2));
  color: #a74f81;
}

.auth-copy {
  margin-top: 16px;
  display: grid;
  gap: 6px;
}

.auth-copy strong {
  font-size: 24px;
}

.auth-copy p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.auth-submit {
  width: 100%;
}

.auth-feedback {
  min-height: 20px;
  margin: 0;
  color: #c24b7d;
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d46fa4;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
}

.hero-title-stack {
  display: grid;
  gap: 0;
  justify-items: flex-start;
  max-width: none;
  margin-left: -10px;
}

.hero-side {
  display: grid;
  justify-items: center;
  align-content: center;
  max-width: 470px;
  width: 100%;
  padding-right: 0;
  margin-left: -54px;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 112px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  display: grid;
  gap: 42px;
  justify-items: flex-start;
  width: fit-content;
}

h1 span {
  display: block;
}

h1 span:first-child {
  font-size: 1.12em;
  transform: translateX(-10px);
}

h1 span:last-child {
  font-size: 0.42em;
  line-height: 1.02;
  letter-spacing: -0.03em;
  justify-self: start;
  padding-left: clamp(148px, 19vw, 244px);
  transform: translateY(22px);
}

.panel-head p,
.result-path,
.empty-note,
.hero-window p {
  color: var(--muted);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: center;
  gap: 8px;
  margin-top: 0;
  grid-area: points;
  max-width: 420px;
}

.point,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
}

.point {
  color: var(--text);
  background: rgba(255, 141, 199, 0.12);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}

.chip {
  color: #d46fa4;
  background: rgba(255, 141, 199, 0.14);
}

.hero-cloud {
  position: relative;
  display: block;
  width: min(100%, 520px);
  min-height: 388px;
  margin: 0 auto 0 -10px;
  padding: 10px 0;
  transform: translateX(-112px);
}

.hero-cloud > * {
  position: absolute;
}

.hero-cloud::before {
  content: "";
  position: absolute;
  inset: 42px 52px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 170, 212, 0.18);
  opacity: 0.8;
}

.hero-case {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 170, 212, 0.16);
  color: #715971;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(228, 193, 214, 0.11);
  white-space: nowrap;
  z-index: 1;
}

.hero-case-a {
  top: 8px;
  left: 116px;
  transform: rotate(-10deg);
}

.hero-case-b {
  top: 64px;
  right: 6px;
  transform: rotate(16deg);
}

.hero-case-c {
  top: 92px;
  left: 0;
  transform: rotate(-18deg);
}

.hero-case-d {
  top: 214px;
  right: 0;
  transform: rotate(14deg);
}

.hero-case-e {
  bottom: 0;
  left: 170px;
  transform: rotate(8deg);
}

.hero-case-f {
  top: 232px;
  left: 18px;
  transform: rotate(-16deg);
}

.hero-case-g {
  top: 300px;
  left: 54px;
  transform: rotate(-8deg);
}

.hero-case-h {
  top: 300px;
  right: 20px;
  transform: rotate(10deg);
}

.hero-case-i {
  top: 8px;
  right: 122px;
  transform: rotate(8deg);
}

.hero-case-j {
  bottom: 44px;
  left: 248px;
  transform: rotate(6deg);
}

.hero-actions {
  display: flex;
  justify-content: center;
  width: 232px;
  height: 232px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.hero-actions .primary-link {
  width: 100%;
  max-width: none;
}

.hero-actions .primary-link {
  min-height: 232px;
  padding: 0 32px;
  border-radius: 999px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 800;
  box-shadow: 0 26px 56px rgba(219, 130, 186, 0.22);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.66), transparent 38%),
    linear-gradient(135deg, rgba(255, 141, 199, 0.34), rgba(177, 140, 255, 0.3));
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    filter 180ms ease;
}

.hero-actions .primary-link:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 32px 64px rgba(219, 130, 186, 0.28);
  filter: saturate(1.06);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.72), transparent 40%),
    linear-gradient(135deg, rgba(255, 141, 199, 0.4), rgba(177, 140, 255, 0.34));
}

.hero-actions .primary-link:active {
  transform: translateY(0) scale(0.99);
}

.primary-link,
.docs-link,
.primary-button,
.ghost-button {
  border-radius: 16px;
  text-decoration: none;
  font: inherit;
}

.primary-link,
.primary-button {
  background: linear-gradient(90deg, rgba(255, 141, 199, 0.26), rgba(177, 140, 255, 0.22));
  color: var(--text);
  border: 1px solid rgba(255, 170, 212, 0.26);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
}

.docs-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 170, 212, 0.2);
}

.hero-stage,
.hero-visual,
.hero-orbit,
.hero-window,
.hero-glow,
.hero-collage,
.hero-shot {
  display: none;
}

.hero-glow-a {
  width: 180px;
  height: 180px;
  top: 36px;
  left: 18px;
  background: rgba(255, 141, 199, 0.22);
}

.hero-glow-b {
  width: 150px;
  height: 150px;
  right: 22px;
  bottom: 24px;
  background: rgba(126, 200, 255, 0.18);
}

.hero-collage {
  position: absolute;
  inset: 6px;
}

.hero-shot {
  position: absolute;
  overflow: hidden;
  border-radius: 26px;
  background: transparent;
  box-shadow: none;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 24px;
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 72%, rgba(0, 0, 0, 0.92) 84%, rgba(0, 0, 0, 0.7) 92%, rgba(0, 0, 0, 0.18) 100%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 72%, rgba(0, 0, 0, 0.92) 84%, rgba(0, 0, 0, 0.7) 92%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-shot-main {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: transparent;
}

.hero-window h2,
.panel-head h2 {
  margin: 10px 0 0;
  font-size: 28px;
}

.inspiration {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding: 26px;
  border: 1px solid rgba(255, 170, 212, 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,250,252,0.5));
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(214, 170, 198, 0.1);
}

.section-copy h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

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

.example-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(222, 184, 208, 0.14);
}

.template-card {
  padding: 0;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.template-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(222, 184, 208, 0.2);
}

.template-like {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.template-like.active {
  color: #ff5e7a;
}

.template-like .heart-icon {
  line-height: 1;
}

.template-like .heart-count {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.template-like:disabled {
  opacity: 0.6;
  cursor: wait;
}

.subtle-chip {
  color: var(--muted);
  background: rgba(248, 243, 255, 0.8);
}

.example-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.example-copy {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.example-copy strong {
  font-size: 15px;
  line-height: 1.45;
}

.example-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.inspiration-tags {
  margin-top: 22px;
}

.ghost-button,
.primary-button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 170, 212, 0.12);
  cursor: pointer;
  color: var(--text);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
}

.studio {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-top: 22px;
}

.admin-layout {
  grid-template-columns: 0.9fr 1.1fr;
}

.filter-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(138, 181, 255, 0.1);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

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

.chip-group {
  display: grid;
  gap: 10px;
}

.chip-group strong {
  font-size: 14px;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(255, 170, 212, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.filter-chip.active {
  background: linear-gradient(90deg, rgba(255, 141, 199, 0.22), rgba(177, 140, 255, 0.2));
  border-color: rgba(255, 141, 199, 0.4);
  color: #7c3c66;
}

.panel-head h2 {
  margin: 0;
}

.panel-head p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.composer-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.mode-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 170, 212, 0.1);
}

.mode-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mode-tab.active {
  background: linear-gradient(90deg, rgba(255, 141, 199, 0.2), rgba(177, 140, 255, 0.18));
  color: #7c3c66;
}

.mode-panel {
  display: none;
}

.mode-panel.active {
  display: grid;
  gap: 14px;
}

.mode-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 22px;
}

.mode-note strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.mode-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mode-note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.prompt-note {
  background: linear-gradient(180deg, rgba(255, 238, 247, 0.92), rgba(255, 246, 251, 0.88));
}

.prompt-note .mode-note-badge {
  background: rgba(255, 141, 199, 0.18);
  color: #b45186;
}

.clone-note {
  background: linear-gradient(180deg, rgba(242, 248, 255, 0.92), rgba(250, 243, 255, 0.88));
}

.clone-note .mode-note-badge {
  background: rgba(126, 200, 255, 0.18);
  color: #4f7fb7;
}

.compact-prompt textarea {
  min-height: 110px;
}

.upload-cluster {
  display: grid;
  gap: 18px;
}

.prompt-field,
.composer-form label {
  display: grid;
  gap: 9px;
}

.prompt-field span,
.composer-form label span {
  color: var(--muted);
  font-size: 14px;
}

textarea,
select,
input[type="text"] {
  width: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 180px;
  padding: 16px;
  resize: vertical;
}

select,
input[type="text"] {
  min-height: 48px;
  padding: 0 14px;
}

.control-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reference-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 247, 252, 0.52));
}

.reference-block-head {
  display: grid;
  gap: 4px;
}

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

.reference-block-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.reference-helper {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.reference-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reference-card-grid:not(.has-items) {
  display: none;
}

.clone-source-zone {
  min-height: 200px;
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.single-preview {
  grid-template-columns: minmax(0, 180px);
}

.upload-preview-grid:not(.has-items) {
  display: none;
}

.option-toggle {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  width: fit-content;
  gap: 6px;
  margin: 8px 0 4px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.composer-form label.option-toggle {
  display: flex;
  gap: 6px;
}

.option-toggle span {
  order: 1;
  display: inline;
  flex: 0 1 auto;
  width: auto;
  white-space: nowrap;
}

.composer-form label.option-toggle span {
  display: inline;
}

.option-toggle input {
  order: 2;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #f16eb1;
}

.clone-option-toggle {
  margin-left: 4px;
}

.batch-toggle {
  margin-top: 2px;
}

.batch-prompt-field {
  margin-top: 4px;
}

.batch-prompt-field textarea {
  min-height: 152px;
}

.batch-prompt-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.preview-thumb {
  display: grid;
  gap: 8px;
}

.preview-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(220, 182, 207, 0.12);
}

.preview-thumb span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.batch-result-card {
  gap: 16px;
}

.batch-stats {
  margin-top: -4px;
}

.batch-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.batch-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(220, 182, 207, 0.18);
}

.job-batch-summary[hidden] {
  display: none !important;
}

.job-quota-summary[hidden] {
  display: none !important;
}

.job-quota-summary {
  margin-bottom: 16px;
}

.job-quota-card {
  gap: 14px;
}

.job-batch-summary {
  margin-bottom: 16px;
}

.batch-summary-card {
  gap: 14px;
}

.reference-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(220, 182, 207, 0.1);
}

.reference-card-top {
  position: relative;
}

.reference-card-top img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
}

.reference-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(56, 37, 62, 0.72);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.reference-card-copy {
  display: grid;
  gap: 8px;
}

.reference-card-copy strong {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.reference-scope-field {
  display: grid;
  gap: 6px;
}

.reference-scope-field span {
  color: var(--muted);
  font-size: 12px;
}

.upload-zone {
  position: relative;
  min-height: 170px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 251, 0.84));
  overflow: hidden;
  cursor: pointer;
}

.upload-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 141, 199, 0.12), transparent 38%),
    linear-gradient(180deg, transparent, rgba(177, 140, 255, 0.06));
  pointer-events: none;
}

.upload-zone.accent::before {
  background:
    radial-gradient(circle at top left, rgba(126, 200, 255, 0.14), transparent 38%),
    linear-gradient(180deg, transparent, rgba(255, 141, 199, 0.06));
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d46fa4;
}

.upload-zone strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
}

.upload-zone small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.upload-status {
  display: block;
  margin-top: 18px;
  font-style: normal;
  color: var(--text);
  opacity: 0.82;
  font-size: 13px;
}

.inline-select {
  display: grid;
  gap: 8px;
}

.inline-select span {
  color: var(--muted);
  font-size: 13px;
}

.result-panel {
  display: grid;
  align-content: start;
}

.result-canvas {
  margin-top: 24px;
}

.result-card {
  padding: 16px;
  border: 1px solid rgba(255, 170, 212, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
}

.loading-card {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.result-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.result-image {
  display: block;
  width: 100%;
  max-height: 840px;
  object-fit: cover;
  border-radius: 16px;
}

.loading-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 6px 0 2px;
}

.loading-visual span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink), var(--violet));
  box-shadow: 0 8px 20px rgba(214, 140, 190, 0.28);
  animation: beauty-bounce 0.9s ease-in-out infinite;
}

.loading-visual span:nth-child(2) {
  animation-delay: 0.12s;
}

.loading-visual span:nth-child(3) {
  animation-delay: 0.24s;
}

.result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.result-stats span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 141, 199, 0.1);
  color: var(--muted);
  font-size: 12px;
}

.result-path {
  margin-top: 12px;
  font-size: 13px;
  word-break: break-all;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.compact-link,
.small-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.empty-note {
  margin: 0;
  line-height: 1.6;
}

@keyframes beauty-bounce {
  0%, 80%, 100% {
    transform: translateY(0) scale(0.92);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-10px) scale(1);
    opacity: 1;
  }
}

.recent-runs {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 170, 212, 0.08);
}

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

.recent-head h3 {
  margin: 0;
  font-size: 18px;
}

.recent-grid {
  display: grid;
  gap: 18px;
}

.recent-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 170, 212, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.recent-preview {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.recent-preview img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.recent-copy {
  display: grid;
  align-content: center;
  gap: 6px;
}

.recent-copy strong {
  font-size: 14px;
  word-break: break-word;
}

.recent-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.full-span {
  grid-column: 1 / -1;
}

.library-grid-page {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.job-grid-page {
  display: grid;
  gap: 14px;
}

.job-list {
  display: grid;
  gap: 14px;
}

.job-card {
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(214, 170, 198, 0.11);
}

.job-card-focus {
  box-shadow:
    0 16px 34px rgba(214, 170, 198, 0.16),
    0 0 0 1px rgba(241, 110, 177, 0.22);
}

.job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.job-card-header strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.job-stage {
  color: var(--muted);
  font-size: 13px;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.job-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(177, 140, 255, 0.12);
  overflow: hidden;
  margin-bottom: 12px;
}

.job-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 141, 199, 0.72), rgba(177, 140, 255, 0.74));
}

.job-error {
  margin: 0 0 12px;
  color: #b04a78;
  font-size: 13px;
  line-height: 1.5;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-load-more {
  justify-self: center;
}

.library-card {
  display: grid;
  gap: 0;
}

.library-media {
  position: relative;
  cursor: zoom-in;
}

.library-media-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.library-preview-image {
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.library-badges {
  position: absolute;
  left: 12px;
  top: 44px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.library-like {
  top: 12px;
  right: 12px;
}

.library-actions {
  display: flex;
  gap: 10px;
  padding: 0 14px 14px;
}

.library-actions .ghost-button,
.library-actions .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.library-actions a,
.library-actions button {
  flex: 1 1 0;
}

.library-download-button {
  border: 1px solid rgba(229, 177, 210, 0.4);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.publish-button,
.unpublish-button,
.delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  color: var(--text);
}

.publish-button {
  background: linear-gradient(90deg, rgba(173, 224, 191, 0.72), rgba(188, 241, 206, 0.9));
  border-color: rgba(128, 196, 151, 0.5);
  color: #21553a;
}

.unpublish-button {
  background: linear-gradient(90deg, rgba(255, 221, 170, 0.72), rgba(255, 199, 163, 0.92));
  border-color: rgba(228, 171, 123, 0.55);
  color: #7a4d24;
}

.delete-button {
  background: linear-gradient(90deg, rgba(255, 197, 206, 0.74), rgba(255, 181, 195, 0.92));
  border-color: rgba(227, 136, 152, 0.55);
  color: #84293f;
}

.publish-button:disabled,
.unpublish-button:disabled,
.delete-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.small-pill {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.artwork-lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.artwork-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(38, 19, 43, 0.68);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.artwork-lightbox-dialog {
  position: relative;
  width: min(92vw, 1080px);
  max-height: 88vh;
  margin: 6vh auto 0;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 250, 253, 0.9);
  box-shadow: 0 28px 80px rgba(55, 28, 64, 0.3);
}

.artwork-lightbox-dialog img {
  display: block;
  width: 100%;
  max-height: calc(88vh - 36px);
  object-fit: contain;
  border-radius: 20px;
}

.artwork-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .hero,
  .studio,
  .inspiration {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .app-shell {
    padding: 16px 14px 40px;
  }

  .hero {
    margin-left: -14px;
    margin-right: -14px;
    padding: 4px 14px 0;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-title-stack {
    margin-left: 0;
  }

  h1 span:first-child {
    transform: none;
  }

  h1 span:last-child {
    padding-left: 26px;
  }

  .hero-side {
    justify-items: flex-start;
    max-width: none;
  }

  .hero-cloud {
    position: static;
    width: 100%;
    min-height: auto;
    display: grid;
    gap: 10px;
    padding: 0;
  }

  .hero-cloud > * {
    position: static;
    transform: none !important;
  }

  .hero-actions {
    transform: none;
  }

  .hero-copy,
  .hero-window,
  .composer,
  .result-panel {
    padding: 20px;
  }

  .control-row,
  .upload-grid,
  .advanced-box .control-row {
    grid-template-columns: 1fr;
  }

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

  .library-grid-page {
    grid-template-columns: 1fr;
  }

  .upload-preview-grid,
  .reference-card-grid,
  .single-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions,
  .hero-actions {
    flex-direction: column;
  }

  .top-nav,
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    align-items: flex-start;
  }

  .hero-strip {
    justify-content: flex-start;
    max-width: none;
  }

  .hero-collage {
    position: relative;
    inset: auto;
    display: block;
    padding: 12px;
  }

  .hero-shot {
    position: relative;
    width: auto;
    height: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
  }

  .hero-shot-main {
    height: 420px;
  }
}
