:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-border: rgba(148, 163, 184, 0.18);
  --font-family-base: "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-weight-base: 300;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-strong: #2563eb;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow: 0 24px 60px rgba(2, 8, 23, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-base);
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.26), transparent 32%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body,
h1,
h2,
h3,
p,
span,
label,
a,
input,
select,
textarea,
button,
strong,
b {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-base);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 920;
  width: 100%;
  min-height: 64px;
  margin-bottom: 28px;
  margin-left: 0;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.88);
  box-shadow: 0 14px 36px rgba(2, 8, 23, 0.22);
  backdrop-filter: blur(18px);
}

.workspace-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 72px;
  padding: 0 10px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  text-decoration: none;
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

.workspace-link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0) 0%, rgba(96, 165, 250, 0.72) 22%, rgba(56, 189, 248, 1) 50%, rgba(37, 99, 235, 0.78) 78%, rgba(37, 99, 235, 0) 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.28), 0 0 18px rgba(37, 99, 235, 0.18);
  opacity: 0;
  transform: scaleX(0.72);
  transform-origin: center;
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.workspace-link:hover {
  color: rgba(226, 232, 240, 0.96);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.26);
}

.workspace-link:hover::after {
  opacity: 0.62;
  transform: scaleX(0.9);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.34), 0 0 22px rgba(37, 99, 235, 0.22);
}

.workspace-link.active {
  color: #eff6ff;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.34), 0 0 18px rgba(37, 99, 235, 0.18);
}

.workspace-link.active::after {
  opacity: 1;
  transform: scaleX(1);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.44), 0 0 26px rgba(37, 99, 235, 0.28);
}

.image-export-nav-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  background: rgba(8, 15, 31, 0.92);
  box-shadow: 0 8px 24px rgba(2, 8, 23, 0.2);
}

.image-export-nav-widget[data-status="starting"],
.image-export-nav-widget[data-status="running"] {
  border-color: rgba(96, 165, 250, 0.32);
}

.image-export-nav-widget[data-status="success"] {
  border-color: rgba(74, 222, 128, 0.35);
}

.image-export-nav-widget[data-status="error"] {
  border-color: rgba(248, 113, 113, 0.35);
}

.image-export-nav-text {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(226, 232, 240, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-export-nav-widget[data-status="running"] .image-export-nav-text,
.image-export-nav-widget[data-status="starting"] .image-export-nav-text {
  color: rgba(125, 211, 252, 0.96);
}

.image-export-nav-widget[data-status="success"] .image-export-nav-text {
  color: rgba(134, 239, 172, 0.96);
}

.image-export-nav-widget[data-status="error"] .image-export-nav-text {
  color: rgba(252, 165, 165, 0.96);
}

.image-export-nav-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(34, 197, 94, 0.12);
  color: #d1fae5;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.image-export-nav-action:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(74, 222, 128, 0.4);
}

body.asset-sidebar-mounted {
  --asset-sidebar-rail-width: clamp(68px, 5.5vw, 80px);
  --asset-sidebar-open-width: clamp(260px, calc(220px + 10vw), 380px);
  --page-safe-gutter: 100px;
  padding-left: var(--asset-sidebar-rail-width);
  overflow-x: hidden;
  transition: padding-left 0.22s ease;
}

body.asset-sidebar-mounted.asset-sidebar-open {
  padding-left: var(--asset-sidebar-open-width);
}

.page {
  transition: width 0.22s ease, margin 0.22s ease;
}

body.asset-sidebar-mounted .page {
  width: min(1120px, calc(100% - 32px - (var(--page-safe-gutter) * 2)));
}

.asset-sidebar-shell {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 940;
  display: flex;
  width: var(--asset-sidebar-rail-width);
  height: 100vh;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.98);
  box-shadow: 18px 0 48px rgba(2, 8, 23, 0.42);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: width 0.22s ease;
}

body.asset-sidebar-open .asset-sidebar-shell {
  width: var(--asset-sidebar-open-width);
}

.asset-sidebar-rail {
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--asset-sidebar-rail-width);
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 6px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.asset-sidebar-rail-spacer {
  flex: 1 1 auto;
}

.asset-sidebar-user-button {
  border-radius: 18px;
}

.asset-sidebar-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(var(--asset-sidebar-rail-width) - 12px);
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(10, 14, 24, 0.92);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.asset-sidebar-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(18, 24, 38, 0.98);
}

.asset-sidebar-toggle.is-active {
  border-color: rgba(96, 165, 250, 0.92);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.42), rgba(29, 78, 216, 0.26));
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18), 0 10px 24px rgba(37, 99, 235, 0.14);
}

.asset-sidebar-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #e2e8f0;
}

.asset-sidebar-toggle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.asset-sidebar-toggle-hint {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  word-break: break-all;
  color: rgba(148, 163, 184, 0.86);
}

.asset-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  padding: 16px 16px 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: opacity 0.18s ease, transform 0.22s ease;
}

body.asset-sidebar-open .asset-sidebar {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.provider-switch-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-switch-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.76);
  color: rgba(226, 232, 240, 0.86);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.provider-switch-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(30, 41, 59, 0.94);
  color: #f8fafc;
}

.provider-switch-button.is-active {
  border-color: rgba(96, 165, 250, 0.92);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.46), rgba(29, 78, 216, 0.3));
  color: #eff6ff;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18), 0 10px 22px rgba(37, 99, 235, 0.18);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.asset-sidebar-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.asset-sidebar-header-copy {
  min-width: 0;
  flex: 1;
  display: block;
}

.asset-sidebar-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.asset-sidebar-header h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.asset-sidebar-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.asset-sidebar-controls-row {
  display: flex;
  gap: 8px;
}

.asset-sidebar-controls-row .asset-sidebar-action {
  flex: 1 1 0;
  min-width: 0;
}

.asset-sidebar-search-field {
  margin: 0;
}

.asset-sidebar-search-field span {
  font-size: 11px;
  color: var(--muted);
}

.asset-sidebar-action {
  flex: 0 0 auto;
  align-self: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  color: #eff6ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.asset-sidebar-action:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(37, 99, 235, 0.22);
}

.asset-sidebar-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.asset-sidebar-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 12px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.72) rgba(15, 23, 42, 0.32);
}

.asset-sidebar-list::-webkit-scrollbar {
  width: 8px;
}

.asset-sidebar-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.32);
  border-radius: 999px;
}

.asset-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.72);
  border-radius: 999px;
}

.asset-sidebar-list::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.9);
}

.asset-sidebar-list.is-upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.asset-sidebar-list.is-upload-grid .placeholder {
  grid-column: 1 / -1;
}

.asset-sidebar-load-more-hint {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px dashed rgba(96, 165, 250, 0.18);
  border-radius: 12px;
  color: rgba(226, 232, 240, 0.66);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.asset-sidebar-list.is-upload-grid .asset-sidebar-load-more-hint {
  grid-column: 1 / -1;
}

.asset-sidebar-list.is-dragover {
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.1);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.42);
}

.asset-sidebar-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: default;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.asset-sidebar-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 41, 59, 0.92);
}

.asset-sidebar-card:disabled {
  opacity: 1;
}

.asset-sidebar-card.is-error {
  cursor: pointer;
  border-color: rgba(248, 113, 113, 0.42);
}

.asset-sidebar-card.is-error:hover {
  border-color: rgba(248, 113, 113, 0.82);
  background: rgba(69, 10, 10, 0.26);
}

.asset-sidebar-card.is-success {
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.asset-sidebar-card.is-library {
  cursor: pointer;
}

.asset-sidebar-card.is-library.is-selected {
  border-color: rgba(96, 165, 250, 0.92);
  background: rgba(21, 55, 114, 0.42);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.32);
}

.asset-sidebar-upload-tile {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  color: inherit;
  text-align: left;
  content-visibility: auto;
  contain-intrinsic-size: 152px;
}

.asset-sidebar-upload-tile img {
  display: block;
  width: calc(100% - 12px);
  aspect-ratio: 1;
  margin: 6px auto 0;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.asset-sidebar-upload-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.asset-sidebar-card.is-success.is-selected {
  border-color: rgba(96, 165, 250, 0.92);
  background: rgba(21, 55, 114, 0.42);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.32);
}

.asset-sidebar-card.is-asset-view {
  grid-template-columns: 68px minmax(0, 1fr);
  content-visibility: auto;
  contain-intrinsic-size: 112px;
}

.asset-sidebar-card-aside {
  display: grid;
  grid-template-rows: 84px auto;
  gap: 8px;
  align-content: start;
}

.asset-sidebar-card-media {
  display: grid;
  place-items: center;
  gap: 6px;
  width: 84px;
  height: 84px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.95);
  overflow: hidden;
}

.asset-sidebar-card-media img {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.asset-sidebar-card.is-asset-view .asset-sidebar-card-aside {
  grid-template-rows: 68px;
  gap: 0;
}

.asset-sidebar-card.is-asset-view .asset-sidebar-card-media {
  width: 68px;
  height: 68px;
  padding: 6px;
  border-radius: 12px;
}

.asset-sidebar-card.is-asset-view .asset-sidebar-card-media img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
}

.asset-sidebar-upload-tile img.is-pending,
.asset-sidebar-card-media img.is-pending {
  opacity: 0;
}

.asset-sidebar-upload-tile img.is-loaded,
.asset-sidebar-card-media img.is-loaded {
  opacity: 1;
  transition: opacity 0.18s ease;
}

.asset-sidebar-card.is-selected .asset-sidebar-card-media img {
  outline: 2px solid rgba(96, 165, 250, 0.95);
  outline-offset: -2px;
}

.asset-sidebar-action.is-active {
  border-color: rgba(96, 165, 250, 0.92);
  background: rgba(37, 99, 235, 0.24);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.asset-sidebar-card-regenerate {
  width: 84px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(74, 222, 128, 0.72);
  border-radius: 8px;
  background: rgba(20, 83, 45, 0.96);
  color: #dcfce7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.asset-sidebar-card-regenerate:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(22, 101, 52, 0.98);
  border-color: rgba(134, 239, 172, 0.98);
}

.asset-sidebar-card-regenerate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.asset-sidebar-card-regenerate.is-corner {
  position: absolute;
  top: auto;
  bottom: 6px;
  right: 6px;
  z-index: 2;
  width: auto;
  min-width: 0;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  background: rgba(20, 83, 45, 0.92);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

.asset-sidebar-card-media.is-running,
.asset-sidebar-card-media.is-error {
  align-content: center;
  justify-items: stretch;
  background: rgba(0, 0, 0, 0.88);
}

.asset-sidebar-card-media.is-error {
  background: rgba(32, 8, 8, 0.94);
}

.asset-sidebar-card-status {
  display: block;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.asset-sidebar-card-log {
  margin: 0;
  color: rgba(226, 232, 240, 0.84);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.asset-sidebar-card-body {
  min-width: 0;
}

.asset-sidebar-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(248, 113, 113, 0.75);
  border-radius: 999px;
  background: rgba(69, 10, 10, 0.92);
  color: #fecaca;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.asset-sidebar-card-delete:hover {
  transform: scale(1.06);
  background: rgba(127, 29, 29, 0.98);
  border-color: rgba(252, 165, 165, 0.95);
}

.asset-sidebar-card-title {
  display: block;
  margin-bottom: 6px;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.5;
  min-width: 0;
}

.asset-sidebar-card-title.is-truncated {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.asset-sidebar-card-meta,
.asset-sidebar-card-prompt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.asset-sidebar-card-prompt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.asset-sidebar-card-meta.is-truncated {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-sidebar-card-prompt.is-compact {
  -webkit-line-clamp: 1;
}

.asset-sidebar-section {
  display: grid;
  gap: 0;
}

.asset-sidebar-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}

.asset-sidebar-section-title {
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.asset-sidebar-section-meta {
  color: rgba(148, 163, 184, 0.9);
  font-size: 11px;
  line-height: 1.4;
}

.asset-sidebar-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: auto;
}

.asset-sidebar-preview-modal[hidden] {
  display: none;
}

.asset-sidebar-preview-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.8);
}

.asset-sidebar-preview-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: center;
  width: min(1040px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  padding: 10px 18px 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.52);
}

.asset-sidebar-preview-close {
  position: static;
  justify-self: end;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
}

.asset-sidebar-preview-close:hover {
  background: rgba(30, 41, 59, 0.98);
}

.asset-sidebar-preview-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 40px;
}

.asset-sidebar-preview-dimensions {
  justify-self: center;
  min-height: 18px;
  margin-top: -4px;
  padding: 0 12px;
  color: rgba(226, 232, 240, 0.88);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
}

.asset-sidebar-preview-position {
  min-height: 18px;
  color: rgba(148, 163, 184, 0.92);
  font-size: 13px;
  line-height: 1.3;
}

.asset-sidebar-preview-content {
  display: grid;
  gap: 10px;
  width: min(100%, 920px);
}

.asset-sidebar-preview-regenerate {
  justify-self: start;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  white-space: nowrap;
  background: rgba(37, 99, 235, 0.9);
  border-color: rgba(191, 219, 254, 0.24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.3);
}

.asset-sidebar-preview-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-height: min(72vh, 820px);
  padding: 0 64px;
}

.asset-sidebar-preview-frame[data-can-navigate="true"] {
  cursor: default;
}

.asset-sidebar-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.4);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.82);
  color: rgba(255, 255, 255, 0.98);
  font-size: 34px;
  line-height: 1;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
  opacity: 0.98;
  transform: translateY(-50%);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
}

.asset-sidebar-preview-nav:hover {
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  transform: translateY(-50%) scale(1.03);
}

.asset-sidebar-preview-nav.is-prev {
  left: 16px;
}

.asset-sidebar-preview-nav.is-next {
  right: 16px;
}

.asset-sidebar-preview-nav[hidden] {
  display: none !important;
}

.asset-sidebar-preview-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 760px);
  margin-top: 0;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.batch-preview-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  align-items: start;
  justify-content: center;
}

.batch-preview-pane {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.batch-preview-pane-title {
  color: rgba(226, 232, 240, 0.92);
  font-size: 14px;
}

.batch-preview-compare-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(68vh, 760px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

@media (max-width: 900px) {
  .asset-sidebar-preview-frame {
    padding: 0 52px;
  }

  .batch-preview-compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .asset-sidebar-preview-frame {
    padding: 0 20px;
  }

  .asset-sidebar-preview-nav.is-prev {
    left: 8px;
  }

  .asset-sidebar-preview-nav.is-next {
    right: 8px;
  }
}

.batch-preview-prompt {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 2px 4px 0;
  background: transparent;
  overflow: hidden;
}

.batch-preview-prompt-text {
  color: rgba(203, 213, 225, 0.9);
  font-size: 13px;
  line-height: 1.7;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 120px;
  overflow-y: auto;
  padding: 0 10px 8px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.hero-text,
.warning-card p {
  color: var(--muted);
  line-height: 1.7;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.95);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.page-link:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.22);
}

.page-link.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #eff6ff;
}

.page-link-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.settings-summary {
  display: inline-flex;
  flex: 1 1 320px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
}

.settings-summary-label {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
}

.settings-summary strong {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  line-height: 1.5;
  word-break: break-all;
}

.generation-page {
  width: min(1680px, calc(100% - 20px));
}

body.asset-sidebar-mounted .generation-page {
  width: min(1680px, calc(100% - 20px - (var(--page-safe-gutter) * 2)));
}

.generation-toolbar {
  margin-bottom: 14px;
  padding: 6px 0 2px;
}

.generation-page .page-links {
  gap: 10px 12px;
  margin-top: 0;
  padding: 2px 0 8px;
}

.generation-page .settings-summary {
  flex: 1 1 520px;
  min-height: 42px;
  background: rgba(15, 23, 42, 0.32);
}

.generation-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 0;
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  align-items: start;
}

.generation-stage-title {
  display: none;
}

.generation-upload-column,
.generation-form-column {
  min-width: 0;
}

.generation-page .upload-panel {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.generation-page .preview-header {
  margin-bottom: 10px;
}

.generation-page .upload-dropzone {
  display: flex;
  flex-direction: column;
  min-height: clamp(220px, 28vh, 340px);
  padding: 14px 16px 16px;
  border: 1px dashed rgba(96, 165, 250, 0.4);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.generation-page .upload-dropzone.is-empty {
  justify-content: center;
}

.generation-page .input-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
}

.generation-page .input-preview-card img {
  height: 132px;
}

.generation-page .input-preview-meta {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
}

.generation-page .placeholder {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0 18px;
  margin: 0;
}

.generation-page .form-grid {
  display: block;
}

.generation-page .text-prompt-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.generation-page .text-prompt-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.generation-page .text-prompt-layout .prompt-history-panel,
.generation-page .text-prompt-side .field,
.generation-page .text-prompt-side .actions,
.generation-page .text-prompt-field {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.generation-page .text-prompt-field,
.generation-page .text-prompt-side .field {
  padding: 0;
}

.generation-page .text-prompt-layout .prompt-history-panel {
  padding: 0;
}

.generation-page .text-prompt-actions {
  padding: 0;
  margin-top: 0;
}

.generation-page .prompt-textarea {
  height: 295px;
  min-height: 295px;
  resize: vertical;
  overflow-y: auto;
}

.generation-inline-status {
  margin-top: 10px;
  min-height: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.panel,
.warning-card {
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 22px;
  margin-bottom: 20px;
}

.page > .panel:last-child,
.page > .warning-card:last-child {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.warning-card {
  padding: 20px;
}

.warning-card h2 {
  margin-bottom: 12px;
  color: var(--warning);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 14px;
  color: #cbd5e1;
}

.password-field-shell {
  position: relative;
}

.password-field-shell input {
  padding-right: 58px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  line-height: 1;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-button:hover {
  background: rgba(148, 163, 184, 0.12);
}

.password-toggle-icon {
  width: 18px;
  height: 18px;
}

.password-toggle-button .is-eye-off {
  display: none;
}

.password-toggle-button.is-visible .is-eye {
  display: none;
}

.password-toggle-button.is-visible .is-eye-off {
  display: block;
}

.field-help {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(203, 213, 225, 0.82);
  font-size: 13px;
  line-height: 1.5;
  border-radius: 12px;
}

.field-span-2 {
  grid-column: span 2;
}

.text-prompt-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.text-prompt-field {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.text-prompt-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-content: start;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

.text-prompt-layout .prompt-history-panel {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
}

.text-prompt-side .field,
.text-prompt-side .actions {
  min-width: 0;
}

.prompt-history-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.prompt-history-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prompt-history-header-copy {
  min-width: 0;
  flex: 1;
}

.prompt-history-title {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #e2e8f0;
}

.prompt-history-message {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.prompt-history-message.is-success {
  color: var(--success);
}

.prompt-history-message.is-error {
  color: var(--danger);
}

.prompt-history-save {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.14);
  color: #dbeafe;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.prompt-history-save:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.58);
  background: rgba(37, 99, 235, 0.22);
}

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

.prompt-history-section {
  position: relative;
  min-width: 0;
}

.prompt-history-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.38);
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.prompt-history-section-toggle:hover,
.prompt-history-section-toggle:focus-visible {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(15, 23, 42, 0.52);
}

.prompt-history-section-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.prompt-history-section-heading strong {
  color: #cbd5e1;
}

.prompt-history-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-history-chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(191, 219, 254, 0.8);
  border-bottom: 2px solid rgba(191, 219, 254, 0.8);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.prompt-history-section-toggle:hover .prompt-history-chevron,
.prompt-history-section-toggle:focus-visible .prompt-history-chevron {
  border-color: rgba(147, 197, 253, 1);
}

.prompt-history-section-toggle:focus-visible {
  outline: none;
}

.prompt-history-section-toggle:focus-visible .prompt-history-section-heading strong {
  color: #e2e8f0;
}

.prompt-history-section-body {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.98);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  z-index: 10;
}

.prompt-history-section:not(.is-collapsed) .prompt-history-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.prompt-history-list,
.prompt-history-saved-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.prompt-history-option,
.prompt-history-remove {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
}

.prompt-history-option {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.prompt-history-option:hover,
.prompt-history-remove:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(37, 99, 235, 0.16);
}

.prompt-history-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.prompt-history-option.is-saved {
  flex: 1;
}

.prompt-history-remove {
  flex: 0 0 auto;
  width: 34px;
  min-height: 34px;
  padding: 0;
  cursor: pointer;
}

.prompt-history-empty {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(96, 165, 250, 0.88);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.prompt-textarea {
  height: 295px;
  min-height: 295px;
  overflow-y: auto;
}

input[type="file"] {
  padding: 10px;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(96, 165, 250, 0.45);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.upload-panel {
  margin-top: 8px;
  margin-bottom: 22px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: rgba(96, 165, 250, 0.9);
  background: rgba(37, 99, 235, 0.14);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.upload-dropzone input[type="file"] {
  display: none;
}

.upload-dropzone-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.input-preview-grid {
  display: none;
  width: 100%;
  grid-template-columns: repeat(auto-fill, 180px);
  justify-content: start;
  gap: 14px;
  margin-top: 8px;
}

.input-preview-grid.has-items {
  display: grid;
}

.input-preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.batch-result-transfer-button {
  position: absolute;
  bottom: 3px;
  left: 4px;
  right: 4px;
  padding: 3px 6px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #eff6ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter 0.15s ease;
}

.batch-result-transfer-button:hover {
  filter: brightness(1.08);
}

.batch-result-transfer-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.input-preview-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center center;
  margin-left: auto;
  margin-right: auto;
  background: #020617;
}

.input-preview-meta {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.input-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fecaca;
  font-size: 18px;
  line-height: 1;
}

.input-preview-remove:hover {
  background: rgba(127, 29, 29, 0.92);
  border-color: rgba(248, 113, 113, 0.55);
}

.placeholder {
  padding: 22px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.text-prompt-actions {
  margin-top: 4px;
  justify-content: flex-start;
  grid-column: 1 / -1;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.password-toggle-button {
  transition: background 0.2s ease, opacity 0.2s ease;
}

.password-toggle-button:hover {
  transform: translateY(-50%);
}

.password-toggle-button:active {
  transform: translateY(-50%);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #eff6ff;
}

.secondary {
  background: rgba(30, 41, 59, 0.95);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-panel .field {
  margin-top: 14px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.status-text {
  margin: 0;
  font-size: 16px;
}

.status-text.idle {
  color: var(--muted);
}

.status-text.running {
  color: var(--warning);
}

.status-text.success {
  color: var(--success);
}

.status-text.error {
  color: var(--danger);
}

.status-metrics {
  display: flex;
  gap: 14px;
}

.advanced-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
}

.advanced-field-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.advanced-field-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.advanced-field-help {
  margin: 0;
}

.metric {
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.35);
}

.metric-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.result-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
}

.result-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #020617;
}

.result-card .result-body {
  padding: 12px;
}

.result-card .result-body p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.result-card a {
  color: #93c5fd;
  text-decoration: none;
}

.batch-generation-page {
  width: min(1820px, calc(100% - 12px));
}

body.asset-sidebar-mounted .batch-generation-page {
  width: min(1820px, calc(100% - 12px - (var(--page-safe-gutter) * 2)));
}

.batch-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 12px;
}

.batch-settings-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 20px;
}

.batch-settings-grid.has-global-prompt {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.batch-project-panel {
  margin-bottom: 20px;
}

.batch-project-workspace-bar {
  margin-bottom: 20px;
}

.batch-project-workspace-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 16px;
}

.batch-project-starter-section {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.batch-project-starter-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.batch-project-starter-header p {
  margin: 0;
}

.batch-project-starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.batch-project-starter-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 128px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 17, 38, 0.92));
  color: #eff6ff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.batch-project-starter-card:hover,
.batch-project-starter-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.14), 0 18px 36px rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, rgba(21, 34, 68, 0.98), rgba(11, 20, 46, 0.96));
}

.batch-project-starter-title {
  display: block;
  color: #f8fbff;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 400;
}

.batch-project-starter-desc {
  display: block;
  color: rgba(191, 219, 254, 0.8);
  font-size: 12px;
  line-height: 1.7;
}

[hidden],
.batch-upload-dropzone-inline[hidden],
.batch-project-groups-area[hidden],
.batch-project-toolbar[hidden],
.batch-project-toolbar-side[hidden] {
  display: none !important;
}

.batch-project-create-tile {
  display: grid;
  place-items: center;
  gap: 10px;
  width: 100%;
  min-height: 210px;
  padding: 28px 20px;
  margin-bottom: 22px;
  border-radius: 22px;
  border: 1px dashed rgba(96, 165, 250, 0.42);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 18, 44, 0.88));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.batch-project-create-tile:hover,
.batch-project-create-tile:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.78);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.14), 0 18px 38px rgba(37, 99, 235, 0.14);
  background: linear-gradient(180deg, rgba(19, 32, 67, 0.96), rgba(11, 22, 50, 0.92));
}

.batch-project-create-plus {
  display: inline-block;
  color: rgba(219, 234, 254, 0.9);
  font-size: 44px;
  line-height: 1;
  font-weight: 400;
}

.batch-project-create-label {
  color: rgba(239, 246, 255, 0.92);
  font-size: 18px;
  font-weight: 400;
}

.batch-project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 22px 18px;
  align-items: start;
}

.batch-project-folder-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 152px;
  padding: 10px 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.batch-project-folder-card-shell {
  position: relative;
  min-width: 0;
}

.batch-project-folder-card:hover,
.batch-project-folder-card:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.batch-project-folder-delete {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 999px;
  background: rgba(44, 18, 28, 0.88);
  color: rgba(255, 225, 225, 0.88);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.batch-project-folder-delete:hover,
.batch-project-folder-delete:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(91, 24, 39, 0.92);
}

.batch-project-folder-delete.is-confirm {
  border-color: rgba(248, 113, 113, 0.66);
  background: rgba(140, 28, 52, 0.96);
  color: #fff1f2;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.18);
}

.batch-project-folder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 86px;
}

.batch-project-folder-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 16px rgba(11, 32, 88, 0.2));
}

.batch-project-folder-name {
  display: block;
  max-width: 132px;
  text-align: center;
  line-height: 1.45;
  word-break: break-word;
  color: #eff6ff;
  font-size: 14px;
  font-weight: 500;
}

.batch-project-folder-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 132px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.18);
  color: #bfdbfe;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
}

.batch-project-folder-stats {
  display: grid;
  gap: 4px;
  width: 100%;
  max-width: 132px;
}

.batch-project-folder-stat {
  display: block;
  text-align: center;
  line-height: 1.35;
  color: rgba(191, 219, 254, 0.84);
  font-size: 12px;
}

.batch-project-folder-stat.is-complete {
  color: #86efac;
}

.batch-project-empty-state {
  margin-bottom: 20px;
}

.batch-project-list-placeholder {
  grid-column: 1 / -1;
}

.batch-project-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 980;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.batch-project-toast {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.94);
  color: #e2e8f0;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.32);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.batch-project-toast.is-success {
  border-color: rgba(74, 222, 128, 0.4);
}

.batch-project-toast.is-warning {
  border-color: rgba(251, 191, 36, 0.42);
}

.batch-project-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}

.batch-project-creator-modal[hidden] {
  display: none;
}

.batch-project-creator-modal {
  position: fixed;
  inset: 0;
  z-index: 970;
}

.batch-project-creator-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  margin: min(14vh, 120px) auto 0;
}

.batch-project-name-field {
  margin: 0;
}

.batch-project-creator-preset {
  margin: 10px 0 0;
  color: #bfdbfe;
  font-size: 13px;
  line-height: 1.5;
}

.batch-project-creator-actions {
  margin-top: 16px;
  flex-wrap: wrap;
}

.button-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.button-like:hover,
.button-like:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.batch-top-grid > .panel {
  margin-bottom: 0;
}

.batch-panel-tip {
  margin: 0;
}

.batch-parameter-panel,
.batch-global-prompt-panel {
  height: 100%;
}

.batch-upload-dropzone {
  min-height: 220px;
  justify-content: center;
}

.batch-upload-dropzone-inline {
  position: relative;
  width: 100%;
  min-height: 230px;
  height: 100%;
  padding: 24px 22px;
  align-items: flex-start;
  justify-content: center;
}

.batch-upload-dropzone-inline .upload-dropzone-copy {
  max-width: 100%;
}

.batch-project-groups-area {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.batch-project-groups-summary {
  margin: 0;
}

.batch-project-groups-list {
  min-width: 0;
}

.batch-project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.batch-project-toolbar-actions {
  margin-top: 0;
  width: auto;
  grid-template-columns: repeat(2, max-content);
  justify-content: flex-start;
}

.batch-project-toolbar-actions button {
  width: auto;
}

.batch-project-toolbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.batch-project-download-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 12px;
  margin-top: 0;
  justify-content: flex-end;
}

.batch-project-download-actions button {
  width: auto;
}

.batch-project-toolbar-meta {
  flex: 0 1 auto;
  min-width: 0;
  text-align: right;
}

.batch-upload-actions,
.batch-group-actions {
  margin-top: 14px;
  flex-wrap: wrap;
}

.batch-group-actions {
  margin-bottom: 10px;
}

.batch-upload-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.batch-upload-actions button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
}

.batch-parameter-panel .form-grid {
  align-items: start;
}

.batch-feature-select-field {
  gap: 10px;
}

.batch-feature-select-description {
  margin: 0;
  line-height: 1.65;
}

.batch-parameter-panel .actions {
  flex-wrap: wrap;
}

.batch-global-prompt-panel {
  margin-bottom: 0;
}

.batch-global-prompt-panel .field {
  margin: 0;
}

.batch-global-prompt-mode-field {
  margin: 0 !important;
  max-width: 140px;
  flex: 0 0 140px;
}

.batch-global-prompt-panel .prompt-history-panel {
  margin-top: 14px;
}

.batch-global-prompt-textarea {
  min-height: 120px;
}

.batch-global-prompt-actions {
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: nowrap;
}

.batch-global-prompt-actions > button {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
}

.batch-group-list,
.batch-issue-list {
  display: grid;
  gap: 16px;
}

.batch-project-groups-list .batch-group-card {
  background: rgba(2, 6, 23, 0.38);
}

.batch-group-card,
.batch-issue-card {
  position: relative;
  display: grid;
  gap: 14px;
  scroll-margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
}

.batch-group-card.has-reverse-prompt-error {
  border-color: rgba(248, 113, 113, 0.52);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.batch-group-card.is-upload-validation-error {
  border-color: rgba(251, 113, 133, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(251, 113, 133, 0.22),
    0 0 0 1px rgba(251, 113, 133, 0.14),
    0 18px 36px rgba(127, 29, 29, 0.14);
}

.batch-group-card.is-upload-validation-error .batch-group-window-panel.is-main-window {
  border-color: rgba(251, 113, 133, 0.42);
}

.batch-group-corner-badge {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.batch-group-corner-badge.is-error {
  border: 1px solid rgba(252, 165, 165, 0.6);
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.96), rgba(239, 68, 68, 0.92));
  color: #fff1f2;
}

.batch-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.batch-group-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.batch-group-identity input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.batch-group-title-wrap {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.batch-group-title {
  font-size: 16px;
  color: #eff6ff;
}

.batch-group-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.batch-group-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.batch-group-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  align-items: stretch;
}

.batch-group-layout > :only-child {
  flex-basis: 100%;
}

.batch-group-window-panel {
  min-width: 0;
  flex: 1 1 0;
  display: grid;
  align-self: stretch;
  gap: 14px;
  height: 100%;
  padding: 18px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.92) 0%, rgba(2, 6, 23, 0.8) 100%),
    rgba(15, 23, 42, 0.76);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08), 0 18px 40px rgba(2, 8, 23, 0.18);
  isolation: isolate;
}

.batch-group-window-panel.is-main-window {
  border-color: rgba(96, 165, 250, 0.22);
}

.batch-group-window-panel.is-edit-window {
  border-color: rgba(45, 212, 191, 0.26);
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.94) 0%, rgba(3, 15, 23, 0.82) 100%),
    rgba(15, 23, 42, 0.8);
}

.batch-group-window-header {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.batch-group-window-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e0f2fe;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.batch-group-window-meta {
  margin: 0;
  color: rgba(191, 219, 254, 0.7);
  font-size: 12px;
  line-height: 1.55;
}

.batch-group-window-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.batch-group-window-panel.is-main-window .batch-group-window-content {
  grid-template-areas:
    "upload result"
    "prompt prompt";
}

.batch-group-window-panel.is-edit-window .batch-group-window-content {
  grid-template-areas:
    "edit-upload edit-result"
    "edit-prompt edit-prompt";
}

.batch-group-section {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.42);
  overflow: hidden;
}

.batch-group-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}

.batch-group-section-heading .batch-group-section-title {
  padding: 0;
  border-bottom: 0;
}

.batch-group-section-heading .primary,
.batch-group-section-heading .secondary {
  flex: 0 0 auto;
}

.batch-group-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  color: #dbeafe;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.batch-group-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.14);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.batch-group-section-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.batch-group-section-toggle::-webkit-details-marker {
  display: none;
}

.batch-group-section-toggle::after {
  content: "展开";
  font-size: 12px;
  color: var(--muted);
}

.batch-group-section-collapsible[open] > .batch-group-section-toggle::after {
  content: "收起";
}

.batch-group-section-collapsible:not([open]) > .batch-group-section-toggle {
  border-bottom-color: transparent;
}

.batch-group-section-collapsible:not([open]) > .batch-group-section-body {
  display: none;
}

.batch-group-section-body {
  padding: 14px 16px 16px;
}

.batch-group-preview-body {
  border: 1px dashed transparent;
  border-radius: 18px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.batch-group-preview-body.is-generated-drop-target {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16);
}

.batch-group-preview-grid,
.batch-group-result-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 120px;
  gap: 10px;
  margin-top: 0;
  justify-content: start;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  align-items: start;
}

.batch-image-card {
  aspect-ratio: 1 / 1;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 8px 28px;
}

.batch-image-card img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.8) 100%);
  flex: 0 1 auto;
}

.batch-group-preview-grid .batch-image-card {
  cursor: grab;
}

.batch-group-preview-grid .batch-image-card.is-fixed-slot {
  cursor: default;
}

.batch-group-preview-grid .batch-image-card.is-edit-drag-source,
.batch-group-preview-grid .batch-image-card.is-fixed-slot.is-edit-drag-source {
  cursor: grab;
}

.batch-group-preview-grid .batch-image-card.is-edit-drag-source:active {
  cursor: grabbing;
}

.batch-group-result-grid .batch-generated-card {
  cursor: grab;
}

.batch-group-result-grid .batch-generated-card.is-dragging {
  opacity: 0.62;
  transform: scale(0.98);
}

.batch-group-preview-grid .batch-add-image-card {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 120px;
  border: 1px dashed rgba(96, 165, 250, 0.42);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.56) 0%, rgba(15, 23, 42, 0.3) 100%);
  cursor: pointer;
}

.batch-group-preview-grid .batch-add-image-card:hover {
  border-color: rgba(96, 165, 250, 0.72);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76) 0%, rgba(15, 23, 42, 0.42) 100%);
}

.batch-group-preview-grid .batch-add-image-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.batch-group-preview-grid .batch-add-image-card.is-disabled:hover {
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.56) 0%, rgba(15, 23, 42, 0.3) 100%);
}

.batch-group-preview-grid .batch-add-image-card.is-drop-target {
  border-color: rgba(52, 211, 153, 0.9);
  background: linear-gradient(180deg, rgba(10, 35, 34, 0.86) 0%, rgba(8, 28, 29, 0.72) 100%);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.3);
}

.batch-add-image-card-content {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
}

.batch-add-image-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  font-size: 42px;
  line-height: 1;
}

.batch-add-image-card-label {
  color: rgba(191, 219, 254, 0.94);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  word-break: break-word;
}

.batch-group-preview-grid .batch-image-card.is-dragging {
  opacity: 0.48;
  transform: scale(0.98);
}

.batch-group-preview-grid .batch-image-card.is-drop-before::before,
.batch-group-preview-grid .batch-image-card.is-drop-after::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.98) 0%, rgba(59, 130, 246, 0.92) 100%);
  box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.2);
  z-index: 4;
}

.batch-group-preview-grid .batch-image-card.is-drop-before::before {
  left: 6px;
}

.batch-group-preview-grid .batch-image-card.is-drop-after::before {
  right: 6px;
}

.batch-group-preview-grid .input-preview-remove {
  z-index: 3;
}

.batch-generated-card .batch-generated-remove {
  z-index: 4;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  font-size: 15px;
  line-height: 1;
  padding: 0;
}

.batch-generated-card .batch-generated-remove:hover,
.batch-generated-card .batch-generated-remove:active {
  transform: none;
}

.batch-image-card .input-preview-meta {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 10px 10px 6px;
  color: #e2e8f0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7) 0%, rgba(2, 6, 23, 0.24) 58%, rgba(2, 6, 23, 0) 100%);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.batch-generated-card .input-preview-meta {
  color: #c7d2fe;
}

.batch-generated-card img {
  cursor: zoom-in;
}

.asset-sidebar-upload-tile img,
.asset-sidebar-card-media img,
.asset-sidebar-preview-frame img,
.result-card img,
.library-card img,
.gallery-page .asset-card img,
.history-card img,
.project-history-card img,
.image-stitch-item-preview img {
  object-position: center center;
  margin-left: auto;
  margin-right: auto;
}

.batch-generated-card.is-selected {
  border-color: rgba(96, 165, 250, 0.92);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.24), 0 16px 32px rgba(15, 23, 42, 0.26);
}

.batch-image-context-menu {
  position: fixed;
  z-index: 990;
  min-width: 148px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 18px 36px rgba(2, 8, 23, 0.36);
  backdrop-filter: blur(18px);
}

.batch-image-context-menu[hidden] {
  display: none;
}

.project-context-menu[hidden] {
  display: none;
}

.project-context-menu {
  --project-context-menu-size: 284px;
  --project-context-orbit-radius: 94px;
  --project-context-resolved-orbit-radius: var(--project-context-orbit-radius);
  --project-context-button-size: 70px;
  --project-context-resolved-button-size: var(--project-context-button-size);
  --project-context-button-gap: 14px;
  --project-context-orbit-padding: 18px;
  position: fixed;
  z-index: 1250;
  width: var(--project-context-menu-size);
  height: var(--project-context-menu-size);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  isolation: isolate;
  overflow: visible;
}

.project-context-menu::before {
  content: none;
}

.project-context-menu::after {
  content: "";
  position: absolute;
  inset: calc(50% - var(--project-context-resolved-orbit-radius));
  border: 1px solid rgba(31, 224, 220, 0.24);
  border-radius: 50%;
  background: #07121d;
  box-shadow: inset 0 0 0 1px rgba(31, 224, 220, 0.08);
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.project-context-menu-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(31, 224, 220, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(91, 248, 214, 0.96) 0%, rgba(18, 179, 185, 0.9) 58%, rgba(7, 64, 89, 0.94) 100%);
  box-shadow:
    0 0 0 5px rgba(31, 224, 220, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.24);
  color: transparent;
  font-size: 0;
  line-height: 0;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.project-context-menu-button {
  --project-context-button-offset-x: 0px;
  --project-context-button-offset-y: 0px;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  left: calc(50% + var(--project-context-button-offset-x));
  top: calc(50% + var(--project-context-button-offset-y));
  width: var(--project-context-resolved-button-size);
  height: var(--project-context-resolved-button-size);
  padding: 10px;
  border: 1px solid rgba(31, 224, 220, 0.34);
  border-radius: 50%;
  background: #081420;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 30px rgba(0, 0, 0, 0.38);
  color: #f7feff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.08),
    0 0 18px rgba(133, 244, 255, 0.12);
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  z-index: 2;
}

.project-context-menu-button:hover:not(:disabled),
.project-context-menu-button:focus-visible:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: rgba(31, 224, 220, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 38px rgba(0, 0, 0, 0.42);
}

.project-context-menu-button:active:not(:disabled) {
  transform: translate(-50%, -50%);
}

.project-context-menu-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
  .project-context-menu {
    --project-context-menu-size: 272px;
    --project-context-orbit-radius: 90px;
    --project-context-button-size: 66px;
    --project-context-button-gap: 12px;
    --project-context-orbit-padding: 16px;
  }
}

@media (max-width: 480px) {
  .project-context-menu {
    --project-context-menu-size: 248px;
    --project-context-orbit-radius: 80px;
    --project-context-button-size: 58px;
    --project-context-button-gap: 10px;
    --project-context-orbit-padding: 14px;
  }

  .project-context-menu-button {
    padding: 8px;
    font-size: 10px;
  }
}

.image-stitch-modal[hidden] {
  display: none;
}

.image-stitch-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.image-stitch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(10px);
}

.image-stitch-panel {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 960px);
  max-height: min(calc(100vh - 72px), 900px);
  margin: 18px auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
}

.image-stitch-header {
  align-items: flex-start;
  gap: 16px;
}

.image-stitch-list {
  flex: 1 1 auto;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 8px 4px 12px 0;
  justify-items: center;
  align-content: start;
}

.image-stitch-item {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(100%, 144px);
  max-width: 100%;
  padding: 8px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 16px;
  background: rgba(7, 18, 29, 0.82);
  cursor: grab;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.18);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.image-stitch-item:hover {
  border-color: rgba(65, 236, 232, 0.42);
  background: rgba(8, 24, 37, 0.92);
  transform: translateY(-1px);
}

.image-stitch-item.is-dragging {
  opacity: 0.74;
  transform: scale(0.985);
  cursor: grabbing;
  border-color: rgba(65, 236, 232, 0.7);
  box-shadow: 0 18px 34px rgba(4, 17, 27, 0.34);
}

.image-stitch-item.is-drop-before {
  box-shadow: inset 0 4px 0 rgba(65, 236, 232, 0.95), 0 14px 28px rgba(4, 17, 27, 0.26);
  border-color: rgba(65, 236, 232, 0.7);
}

.image-stitch-item.is-drop-after {
  box-shadow: inset 0 -4px 0 rgba(65, 236, 232, 0.95), 0 14px 28px rgba(4, 17, 27, 0.26);
  border-color: rgba(65, 236, 232, 0.7);
}

.image-stitch-item-preview {
  position: relative;
  width: min(100%, 128px);
  max-width: 100%;
  overflow: visible;
  border-radius: 12px;
  border: 1px solid rgba(65, 236, 232, 0.12);
  background: transparent;
}

.image-stitch-item-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: initial;
  background: transparent;
}

.image-stitch-item-order {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(7, 18, 29, 0.88);
  border: 1px solid rgba(65, 236, 232, 0.4);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.image-stitch-item-meta {
  display: grid;
  gap: 4px;
  width: 100%;
}

.image-stitch-item-title {
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.image-stitch-item-hint {
  color: rgba(148, 163, 184, 0.92);
  font-size: 11px;
  line-height: 1.4;
}

.image-stitch-actions {
  margin-top: 0;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
}

.image-stitch-size-field {
  min-width: 132px;
  margin-right: auto;
}

.image-stitch-size-field span {
  white-space: nowrap;
}

.batch-image-context-action {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.92);
  color: #eff6ff;
  text-align: left;
}

.batch-image-context-action:hover {
  background: rgba(37, 99, 235, 0.28);
}

.batch-group-result-placeholder {
  min-height: 168px;
  display: grid;
  place-items: center;
}

.batch-task-list {
  gap: 4px;
}

.batch-task-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 34px 10px 28px;
  text-align: center;
}

.batch-task-placeholder.is-running {
  border-color: rgba(96, 165, 250, 0.26);
}

.batch-task-placeholder.is-error {
  border-color: rgba(248, 113, 113, 0.24);
}

.batch-task-inline-status {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
}

.batch-task-inline-status.is-running {
  color: #93c5fd;
}

.batch-task-inline-status.is-error {
  color: #fca5a5;
}

.batch-task-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #dbeafe;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.batch-task-badge.is-downloaded {
  border-color: rgba(74, 222, 128, 0.46);
  background: rgba(6, 78, 59, 0.82);
  color: #dcfce7;
}

.batch-group-prompt-body .field {
  margin: 0;
}

.batch-group-prompt-summary {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.batch-group-prompt-summary-title {
  color: #dbeafe;
  font-size: 16px;
  font-weight: 600;
}

.batch-group-prompt-preview {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.batch-group-section-collapsible[open] .batch-group-prompt-preview {
  display: none;
}

.batch-group-section-collapsible[open] .batch-group-section-toggle {
  padding-top: 10px;
  padding-bottom: 10px;
}

.batch-group-prompt-body {
  padding-top: 10px;
}

.batch-group-prompt-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.batch-group-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.batch-group-prompt {
  min-height: 132px;
}

.batch-group-prompt.is-readonly {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(96, 165, 250, 0.18);
  cursor: default;
  resize: none;
}

.batch-group-copy-static {
  padding: 0;
}

.batch-group-copy-static-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.batch-group-reverse-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.batch-group-reverse-prompt-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.36);
}

.batch-group-reverse-prompt-title {
  color: #dbeafe;
  font-size: 14px;
  font-weight: 600;
}

.batch-group-reverse-prompt-text {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.batch-group-reverse-prompt-text.is-placeholder {
  color: var(--muted);
}

.batch-group-reverse-prompt-text.is-error {
  color: #fca5a5;
}

.batch-group-reverse-prompt-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.batch-group-section.is-upload {
  grid-area: upload;
}

.batch-group-section.is-result {
  grid-area: result;
}

.batch-group-section.is-edit-upload {
  grid-area: edit-upload;
}

.batch-group-section.is-edit-result {
  grid-area: edit-result;
}

.batch-group-section.is-main-prompt {
  grid-area: prompt;
}

.batch-group-section.is-edit-prompt {
  grid-area: edit-prompt;
}

@media (max-width: 1180px) {
  .batch-group-layout {
    flex-direction: column;
  }
}

.batch-issue-card {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.batch-issue-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(15, 23, 42, 0.92);
}

.batch-issue-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.batch-issue-title {
  color: #fecaca;
  word-break: break-all;
}

.batch-issue-message {
  margin: 0;
  color: #fca5a5;
  line-height: 1.7;
}

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

@media (max-width: 880px) {
  .batch-project-starter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-project-create-tile {
    min-height: 180px;
  }

  .batch-top-grid {
    grid-template-columns: 1fr;
  }

  .batch-project-toolbar {
    align-items: flex-start;
  }

  .batch-project-toolbar-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .batch-project-toolbar-side {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }


@media (max-width: 640px) {
  .batch-project-starter-grid {
    grid-template-columns: 1fr;
  }
}

  .batch-project-download-actions {
    grid-template-columns: 1fr;
    width: 100%;
    justify-content: stretch;
  }

  .batch-project-download-actions button {
    width: 100%;
  }

  .batch-project-toolbar-meta {
    text-align: left;
  }

  .batch-global-prompt-actions {
    flex-wrap: wrap;
  }

  .batch-global-prompt-mode-field {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .batch-group-layout {
    grid-template-columns: 1fr;
  }

  .batch-group-window-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .batch-group-window-content {
    grid-template-columns: 1fr;
  }

  .batch-group-window-panel.is-main-window .batch-group-window-content {
    grid-template-areas:
      "upload"
      "result"
      "prompt";
  }

  .batch-group-window-panel.is-edit-window .batch-group-window-content {
    grid-template-areas:
      "edit-upload"
      "edit-result"
      "edit-prompt";
  }

  .batch-group-section-heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }


  .batch-group-preview-grid,
  .batch-group-result-grid {
    grid-auto-columns: 120px;
  }

  .batch-image-card img {
    max-width: 100%;
    max-height: 100%;
  }

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

.result-card a:hover {
  text-decoration: underline;
}

.asset-grid,
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  align-content: start;
}

.gallery-scroll-shell {
  height: clamp(560px, 74vh, 760px);
  min-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) rgba(15, 23, 42, 0.18);
}

.history-upload-dropzone {
  border: 1px dashed rgba(96, 165, 250, 0.34);
  border-radius: 16px;
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.history-upload-dropzone.dragover {
  border-color: rgba(96, 165, 250, 0.92);
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.history-footer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.history-search-field {
  flex: 1 1 280px;
  margin: 0;
}

.history-search-field span {
  font-size: 11px;
  color: var(--muted);
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.history-pagination .secondary {
  min-width: 88px;
}

.history-pagination .secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gallery-scroll-shell::-webkit-scrollbar {
  width: 8px;
}

.gallery-scroll-shell::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.gallery-scroll-shell::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}

.asset-grid[data-preview-size="large"],
.history-grid[data-preview-size="large"] {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.asset-grid[data-preview-size="medium"],
.history-grid[data-preview-size="medium"] {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.asset-grid[data-preview-size="small"],
.history-grid[data-preview-size="small"] {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.asset-card {
  cursor: pointer;
}

.asset-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 34px;
  height: 22px;
  border: 1px solid rgba(248, 113, 113, 0.48);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  background: rgba(15, 23, 42, 0.82);
  color: rgba(254, 202, 202, 0.96);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(6px);
}

.asset-card-delete:hover {
  background: rgba(127, 29, 29, 0.9);
  border-color: rgba(252, 165, 165, 0.72);
  color: #fff;
}

.asset-card-delete:focus-visible {
  outline: 2px solid rgba(252, 165, 165, 0.9);
  outline-offset: 2px;
}

.asset-card-link,
.history-card-link {
  color: #93c5fd;
  text-decoration: none;
}

.asset-card-link:hover,
.history-card-link:hover {
  text-decoration: underline;
}

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

.library-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
}

.library-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #020617;
}

.library-card-body {
  padding: 12px;
}

.library-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-left: auto;
  justify-content: flex-end;
}

.toolbar-field {
  min-width: 138px;
  margin: 0;
}

.toolbar-search-field {
  min-width: 240px;
  flex: 1 1 240px;
}

.toolbar-field span {
  font-size: 11px;
  color: var(--muted);
}

.toolbar-field input,
.toolbar-field select {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}

.toolbar-refill-button {
  margin-left: auto;
  min-width: 126px;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.toolbar-download-button {
  margin-left: 0;
}

.toolbar-upload-button {
  margin-left: 0;
  background: rgba(30, 41, 59, 0.95);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.toolbar-refill-button:disabled {
  background: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.75);
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: none;
  cursor: not-allowed;
}

.toolbar-refill-button:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: rgba(96, 165, 250, 0.9);
}

.gallery-page {
  width: min(1680px, calc(100% - 20px));
}

body.asset-sidebar-mounted .gallery-page {
  width: min(1680px, calc(100% - 20px - (var(--page-safe-gutter) * 2)));
}

.gallery-page .panel.gallery-stage {
  flex: 1 1 auto;
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  margin-bottom: 0;
  border: 1px solid rgba(65, 236, 232, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(5, 16, 28, 0.9), rgba(3, 11, 20, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 72px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.gallery-page .toolbar {
  position: relative;
  top: auto;
  z-index: 1;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  padding: 18px 18px 14px;
  background:
    linear-gradient(180deg, rgba(4, 15, 27, 0.72) 0%, rgba(4, 15, 27, 0.42) 72%, rgba(4, 15, 27, 0) 100%);
}

.gallery-page .preview-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-page .preview-header h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.gallery-page .toolbar-actions {
  flex: 1 1 auto;
}

.gallery-page .gallery-scroll-shell {
  flex: 1 1 auto;
  display: block;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 0;
  background: transparent;
  scrollbar-width: auto;
}

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

.gallery-page .asset-grid[data-preview-size="large"],
.gallery-page .history-grid[data-preview-size="large"] {
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
}

.gallery-page .asset-grid[data-preview-size="medium"],
.gallery-page .history-grid[data-preview-size="medium"] {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}

.gallery-page .asset-grid[data-preview-size="small"],
.gallery-page .history-grid[data-preview-size="small"] {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.gallery-page .history-upload-dropzone {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-page .history-upload-dropzone.dragover {
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.1);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4);
}

.gallery-page .history-card,
.gallery-page .asset-card {
  border-radius: 10px;
  border-color: rgba(96, 165, 250, 0.12);
  background: rgba(5, 10, 24, 0.86);
  box-shadow: none;
}

.gallery-page .history-card:hover,
.gallery-page .asset-card:hover {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(8, 15, 34, 0.94);
}

.gallery-page .history-card img,
.gallery-page .asset-card img {
  border-radius: 8px 8px 0 0;
}

.gallery-page .history-card-body {
  padding: 6px 8px 8px;
  background: rgba(5, 10, 24, 0.92);
}

.gallery-page .history-card-title {
  margin-bottom: 0;
  font-size: 10px;
  line-height: 1.35;
}

.gallery-page .asset-card .history-card-body {
  min-height: 0;
  max-height: none;
  padding: 6px 8px 8px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.gallery-page .asset-card-content {
  overflow: hidden;
  padding-right: 0;
  padding-bottom: 0;
}

.gallery-page .asset-card .history-card-meta {
  display: none;
}

.gallery-page .asset-card-regenerate {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  min-height: 28px;
  padding: 0 10px;
  margin-top: 0;
  font-size: 10px;
  border-radius: 999px;
  white-space: nowrap;
  align-self: flex-start;
}

.gallery-page .asset-card-delete {
  top: 8px;
  right: 8px;
  min-width: 28px;
  height: 20px;
  padding: 0 6px;
  font-size: 13px;
}

.history-card-select-toggle {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.84);
  color: rgba(226, 232, 240, 0.92);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.history-card.is-selection-mode .history-card-select-toggle {
  display: inline-flex;
}

.history-card.is-selected .history-card-select-toggle {
  border-color: rgba(96, 165, 250, 0.92);
  background: rgba(37, 99, 235, 0.95);
  color: #eff6ff;
}

.gallery-page .asset-card-select-toggle {
  top: 8px;
  left: 8px;
}

.toolbar-refill-button.is-active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: rgba(96, 165, 250, 0.92);
  color: #eff6ff;
}

.gallery-page .history-footer-tools {
  flex: 0 0 auto;
  justify-content: center;
  margin-top: auto;
  min-height: 64px;
  padding: 14px 0 20px;
}

.history-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.history-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.08) 38%, rgba(2, 6, 23, 0) 72%),
    linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(59, 130, 246, 0.18));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.history-card.is-selected {
  border-color: rgba(103, 232, 249, 0.95);
  background: rgba(6, 16, 34, 0.96);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.26), 0 0 0 4px rgba(37, 99, 235, 0.18), 0 14px 32px rgba(2, 6, 23, 0.32);
  transform: translateY(-1px);
}

.history-card.is-selected::after {
  opacity: 1;
}

.history-card.is-selection-mode {
  cursor: pointer;
}

.history-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.02);
  image-rendering: auto;
  transform: translateZ(0);
}

.history-card.is-selected img {
  filter: brightness(0.82) saturate(1.08);
}

.history-card-overlay {
  position: static;
  inset: auto;
  display: block;
  padding: 0;
  opacity: 1;
  transition: none;
  background: none;
}

.history-card:hover .history-card-overlay,
.history-card:focus-within .history-card-overlay {
  opacity: 1;
}

.history-card.is-selected .history-card-overlay {
  opacity: 1;
}

.history-card.is-selected .history-card-body {
  border-top-color: rgba(103, 232, 249, 0.26);
  background: linear-gradient(180deg, rgba(8, 21, 44, 0.96), rgba(2, 6, 23, 0.94));
}

.history-card-body {
  width: 100%;
  padding: 10px;
  min-height: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.82);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  align-items: flex-start;
}

.asset-card .history-card-body {
  max-height: 136px;
  overflow: hidden;
  position: relative;
}

.asset-card-content {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  padding-bottom: 42px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) rgba(15, 23, 42, 0.18);
}

.asset-card-content::-webkit-scrollbar {
  width: 6px;
}

.asset-card-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.asset-card-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}

.history-card-title {
  display: block;
  margin-bottom: 2px;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-meta {
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
}

.asset-card-regenerate {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  width: auto;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(37, 99, 235, 0.78);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.26);
}

.asset-card-regenerate:hover {
  background: rgba(59, 130, 246, 0.86);
}

.history-card-delete {
  z-index: 3;
}

.history-card-delete:focus-visible {
  outline: 2px solid rgba(191, 219, 254, 0.95);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body.asset-sidebar-mounted {
    --asset-sidebar-open-width: min(300px, calc(100vw - 16px));
    padding-left: var(--asset-sidebar-rail-width);
  }

  body.asset-sidebar-mounted.asset-sidebar-open {
    padding-left: var(--asset-sidebar-open-width);
  }

  .asset-sidebar-shell {
    width: var(--asset-sidebar-rail-width);
  }

  body.asset-sidebar-open .asset-sidebar-shell {
    width: var(--asset-sidebar-open-width);
  }

  .asset-sidebar-rail {
    flex-basis: 80px;
    padding: 10px 5px;
  }

  .asset-sidebar-toggle {
    min-height: 78px;
  }

  .asset-grid[data-preview-size="large"],
  .history-grid[data-preview-size="large"] {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .asset-grid[data-preview-size="medium"],
  .history-grid[data-preview-size="medium"] {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  }

  .asset-grid[data-preview-size="small"],
  .history-grid[data-preview-size="small"] {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
  }

  .gallery-scroll-shell {
    height: clamp(420px, 66vh, 640px);
    min-height: 420px;
  }
}

body.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-text {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-close {
  flex-shrink: 0;
}

.confirm-modal-dialog {
  width: min(480px, 100%);
}

.confirm-modal-actions {
  justify-content: flex-end;
  gap: 10px;
}

.login-page .modal-header {
  justify-content: center;
  text-align: center;
}

.login-page .confirm-modal-actions {
  justify-content: center;
}

.image-export-dialog {
  width: min(460px, 100%);
}

.image-export-field {
  margin-bottom: 12px;
}

.image-export-field select {
  width: 100%;
}

.image-export-hint {
  margin: 0 0 18px;
  line-height: 1.6;
}

.image-export-actions {
  justify-content: flex-end;
}

.login-page #loginButton {
  min-width: 220px;
}

@media (max-width: 1240px) {
  .generation-stage,
  .generation-page .text-prompt-layout,
  .generation-status-panel {
    grid-template-columns: 1fr;
  }

  .generation-page .text-prompt-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generation-page .upload-panel {
    position: static;
  }
}

@media (max-width: 1100px) {
  body.asset-sidebar-mounted {
    --asset-sidebar-open-width: min(280px, calc(100vw - 24px));
    --page-safe-gutter: clamp(10px, 1.4vw, 18px);
  }
}

@media (max-width: 820px) {
  body.asset-sidebar-mounted {
    --asset-sidebar-open-width: min(300px, calc(100vw - 24px));
    --page-safe-gutter: 10px;
  }

  .page {
    width: min(100% - 20px, 1120px);
  }

  .generation-page {
    width: min(100% - 20px, 1680px);
  }

  .batch-settings-grid.has-global-prompt {
    grid-template-columns: 1fr;
  }

  .workspace-nav {
    top: 0;
    gap: 10px;
    min-height: 56px;
    margin-bottom: 22px;
    padding: 10px 12px;
  }

  .workspace-link {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
    padding: 0 8px;
  }

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

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

  .generation-stage,
  .generation-status-panel {
    grid-template-columns: 1fr;
  }

  .generation-page .upload-panel {
    position: static;
  }

  .generation-page .text-prompt-side {
    grid-template-columns: 1fr;
  }

  .generation-page .text-prompt-actions {
    width: 100%;
    justify-self: stretch;
  }

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

  .text-prompt-field,
  .text-prompt-side,
  .text-prompt-layout .prompt-history-panel {
    grid-column: 1;
    grid-row: auto;
  }

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

  .field-span-2 {
    grid-column: span 1;
  }

  .status-row,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .status-metrics {
    width: 100%;
  }

  .metric {
    flex: 1;
  }

  .modal {
    padding: 14px;
  }

  .modal-header {
    flex-direction: column;
    align-items: stretch;
  }

}

.admin-page {
  width: min(100% - 40px, 1700px);
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-hero-actions {
  align-items: center;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-summary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 116px;
}

.admin-summary-label {
  color: var(--muted);
  font-size: 13px;
}

.admin-summary-card strong {
  font-size: 28px;
  line-height: 1.2;
}

.admin-config-panel,
.admin-table-panel {
  margin-bottom: 24px;
}

.admin-prompt-card-grid {
  margin-top: 18px;
  margin-bottom: 18px;
}

.admin-prompt-card {
  min-height: 112px;
}

.admin-prompt-card.is-active {
  border-color: rgba(96, 165, 250, 0.88);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18), 0 18px 36px rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, rgba(24, 39, 79, 0.98), rgba(11, 20, 46, 0.96));
}

.admin-prompt-editor-shell {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 18px;
  padding: 18px;
  background: rgba(2, 8, 23, 0.32);
}

.admin-prompt-editor-header {
  margin-bottom: 14px;
}

.admin-prompt-editor-panel[hidden] {
  display: none;
}

.admin-table-shell {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
  text-align: left;
}

.admin-table th {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-table td {
  color: #e2e8f0;
  font-size: 14px;
}

.admin-cell-title {
  font-weight: 600;
  line-height: 1.5;
}

.admin-cell-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-cell-sub-error {
  color: #fca5a5;
  white-space: normal;
  word-break: break-word;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
}

.admin-status-badge.is-success {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.admin-status-badge.is-error {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.admin-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px 4px 2px 0;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.admin-action-button:hover {
  background: rgba(96, 165, 250, 0.22);
  border-color: rgba(96, 165, 250, 0.55);
}

.admin-action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-status-badge.is-running {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.admin-table-link {
  color: #93c5fd;
  text-decoration: none;
}

.admin-table-link:hover {
  text-decoration: underline;
}

@media (max-width: 1240px) {
  .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* AI-CAAC inspired global theme overrides */
:root {
  --bg: #03080f;
  --panel: rgba(6, 18, 29, 0.82);
  --panel-border: rgba(65, 236, 232, 0.16);
  --text: #f2fbff;
  --muted: rgba(187, 215, 227, 0.72);
  --accent: #1fe0dc;
  --accent-strong: #0cc4d7;
  --success: #49f0ca;
  --warning: #ffd66b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

html {
  scrollbar-color: rgba(31, 224, 220, 0.65) rgba(255, 255, 255, 0.06);
}

body {
  position: relative;
  background:
    radial-gradient(circle at 18% 12%, rgba(31, 224, 220, 0.18), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(32, 151, 255, 0.14), transparent 32%),
    linear-gradient(180deg, #02060c 0%, #03111d 52%, #02060c 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.85;
}

body::before {
  top: 78px;
  left: -110px;
  width: 340px;
  height: 340px;
  background: rgba(36, 227, 193, 0.16);
}

body::after {
  top: 96px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: rgba(12, 150, 215, 0.14);
}

.page {
  width: min(1540px, calc(100% - 40px));
  padding-bottom: 44px;
}

.panel,
.warning-card,
.prompt-history-panel {
  border-color: rgba(65, 236, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.86), rgba(4, 12, 22, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 72px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.panel,
.warning-card {
  border-radius: 28px;
}

.batch-project-panel,
.batch-project-workspace-bar,
.admin-config-panel,
.admin-table-panel,
.batch-issue-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(65, 236, 232, 0.12);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(5, 14, 23, 0.92), rgba(3, 10, 18, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 26px 86px rgba(0, 0, 0, 0.38);
}

.batch-project-panel::before,
.batch-project-workspace-bar::before,
.admin-config-panel::before,
.admin-table-panel::before,
.batch-issue-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(31, 224, 220, 0.14), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(35, 142, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(10, 28, 42, 0.2) 0%, rgba(10, 28, 42, 0.08) 18%, rgba(10, 28, 42, 0) 42%);
}

.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: static;
  top: auto;
  min-height: 64px;
  margin: 0 0 40px;
  padding: 12px 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(65, 236, 232, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace-link {
  min-width: 0;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: rgba(210, 231, 241, 0.78);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.workspace-link::after {
  display: none;
}

.workspace-link:hover,
.workspace-link:focus-visible {
  color: #f8ffff;
  background: rgba(31, 224, 220, 0.08);
  box-shadow: inset 0 0 0 1px rgba(31, 224, 220, 0.12);
}

.workspace-link.active {
  color: #02141d;
  background: linear-gradient(135deg, #1fe0dc 0%, #32efb8 100%);
  text-shadow: none;
  box-shadow: 0 12px 28px rgba(31, 224, 220, 0.22);
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
strong {
  color: #f5fdff;
}

h1 {
  font-size: clamp(38px, 4.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(22px, 2vw, 34px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.muted,
.modal-text,
.hero-text,
.warning-card p,
.field span,
.settings-summary-label,
.batch-group-meta,
.batch-project-toolbar-meta {
  color: rgba(188, 215, 226, 0.72);
}

input,
select,
textarea {
  border-color: rgba(65, 236, 232, 0.14);
  border-radius: 18px;
  background: rgba(4, 17, 29, 0.88);
  color: #effcff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: rgba(167, 194, 207, 0.44);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 224, 220, 0.56);
  box-shadow: 0 0 0 4px rgba(31, 224, 220, 0.09);
}

button,
.button-like,
.page-link {
  border-radius: 999px;
}

.primary,
.page-link.active,
.prompt-history-save,
.toolbar-refill-button:not(:disabled),
.asset-sidebar-preview-regenerate {
  background: linear-gradient(135deg, #1fe0dc 0%, #31efb7 100%);
  color: #02141d;
  box-shadow: 0 18px 36px rgba(31, 224, 220, 0.18);
}

.primary:hover,
.button-like.primary:hover,
.page-link.active:hover {
  box-shadow: 0 20px 42px rgba(31, 224, 220, 0.26);
}

.secondary,
.page-link,
.toolbar-upload-button,
.asset-sidebar-action,
.provider-switch-button,
.prompt-history-option,
.prompt-history-remove {
  border-color: rgba(65, 236, 232, 0.12);
  background: rgba(7, 18, 30, 0.9);
  color: #ecfbff;
}

.secondary:hover,
.button-like.secondary:hover,
.page-link:hover,
.provider-switch-button:hover:not(:disabled),
.asset-sidebar-action:hover:not(:disabled),
.prompt-history-option:hover,
.prompt-history-remove:hover {
  border-color: rgba(31, 224, 220, 0.3);
  background: rgba(10, 24, 39, 0.96);
}

.provider-switch-button.is-active,
.asset-sidebar-action.is-active {
  border-color: rgba(31, 224, 220, 0.36);
  background: rgba(31, 224, 220, 0.1);
  color: #f3ffff;
  box-shadow: inset 0 0 0 1px rgba(31, 224, 220, 0.08);
}

.status-text.running {
  color: #6ee7ff;
}

.status-text.success {
  color: #4ef2c5;
}

.status-text.error {
  color: #ff8c97;
}

.upload-dropzone,
.history-upload-dropzone,
.batch-upload-dropzone {
  border-color: rgba(65, 236, 232, 0.18);
  border-radius: 24px;
  background: rgba(4, 15, 26, 0.76);
}

.upload-dropzone:hover,
.upload-dropzone.dragover,
.history-upload-dropzone.dragover,
.batch-upload-dropzone.dragover {
  border-color: rgba(31, 224, 220, 0.42);
  background: rgba(6, 20, 32, 0.92);
  box-shadow: 0 0 0 4px rgba(31, 224, 220, 0.08);
}

.input-preview-card,
.result-card,
.history-card,
.asset-card,
.library-card,
.batch-group-card,
.batch-issue-card,
.batch-project-folder-card-shell {
  border-color: rgba(65, 236, 232, 0.1);
  background: linear-gradient(180deg, rgba(7, 19, 31, 0.92), rgba(4, 12, 22, 0.92));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.24);
}

.history-card.is-selected,
.asset-sidebar-card.is-library.is-selected,
.batch-generated-card.is-selected {
  border-color: rgba(31, 224, 220, 0.56);
  box-shadow:
    0 0 0 2px rgba(31, 224, 220, 0.12),
    0 20px 42px rgba(0, 0, 0, 0.28);
}

.batch-project-create-tile,
.batch-project-folder-card-shell,
.batch-project-starter-card {
  border-radius: 28px;
}

.batch-project-create-tile,
.batch-project-folder-card-shell {
  border-color: rgba(65, 236, 232, 0.12);
  background:
    radial-gradient(circle at 0% 0%, rgba(31, 224, 220, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(5, 16, 28, 0.94), rgba(3, 10, 18, 0.96));
}

.batch-project-folder-card {
  min-height: 172px;
  padding: 16px 10px 14px;
}

.batch-project-folder-icon svg {
  filter: drop-shadow(0 18px 28px rgba(13, 197, 210, 0.16));
}

.toolbar,
.gallery-page .toolbar,
.prompt-history-section-body,
.asset-sidebar-shell,
.asset-sidebar {
  background: transparent;
}

.gallery-page .toolbar {
  top: auto;
  background:
    linear-gradient(180deg, rgba(4, 15, 27, 0.72) 0%, rgba(4, 15, 27, 0.42) 72%, rgba(4, 15, 27, 0) 100%);
}

.login-page {
  min-height: 100vh;
}

.login-page .modal {
  padding-top: 96px;
}

.login-page .modal-backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(31, 224, 220, 0.16), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(26, 162, 255, 0.14), transparent 26%),
    rgba(1, 5, 10, 0.82);
  backdrop-filter: blur(12px);
}

.login-page .confirm-modal-dialog .panel {
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.96), rgba(4, 12, 22, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 30px 90px rgba(0, 0, 0, 0.42);
}

.generation-stage,
.gallery-page .panel.gallery-stage {
  position: relative;
}

.generation-stage {
  border: 1px solid rgba(65, 236, 232, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(5, 16, 28, 0.9), rgba(3, 11, 20, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 72px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.generation-page .preview-header {
  margin-bottom: 6px;
}

.generation-page .preview-header h3,
.generation-page .preview-header .muted,
.generation-page .field > span {
  margin: 0;
  line-height: 1.2;
}

.generation-page .text-prompt-field,
.generation-page .text-prompt-side .field {
  gap: 4px;
}

.generation-page .text-prompt-actions {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  align-self: start;
  justify-self: start;
}

@media (max-width: 1100px) {
  .workspace-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .page,
  .generation-page,
  .batch-generation-page,
  .gallery-page,
  .admin-page {
    width: min(calc(100% - 20px), 1700px);
  }

  .workspace-nav {
    gap: 8px;
    padding: 12px 14px;
  }

  .workspace-link {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.asset-sidebar-collapse-button {
  margin-bottom: 4px;
}

.asset-sidebar-collapse-icon {
  transition: transform 0.22s ease;
}

body:not(.asset-sidebar-open) .asset-sidebar-collapse-icon {
  transform: rotate(180deg);
}

.generation-page {
  width: min(1480px, calc(100% - 32px));
}

body.asset-sidebar-mounted .generation-page {
  width: min(1480px, calc(100% - 24px - (var(--page-safe-gutter) * 2)));
}

.generation-page .workspace-nav {
  margin-bottom: 24px;
}

.generation-page .generation-stage {
  padding: clamp(24px, 3vw, 36px);
}

.generation-shell {
  display: grid;
  gap: 20px;
}

.generation-shell-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.generation-shell-copy .eyebrow {
  margin: 0;
}

.generation-shell-title {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.04;
}

.generation-shell-subtitle {
  max-width: 820px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.generation-composer {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(300px, 0.78fr);
  gap: 20px;
  align-items: start;
}

.generation-composer-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.generation-page .generation-prompt-field {
  gap: 10px;
}

.generation-page .generation-prompt-field > span,
.generation-page .generation-parameter-panel .field > span {
  font-size: 14px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}

.generation-page .prompt-textarea {
  height: clamp(160px, 22vh, 220px);
  min-height: 160px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(65, 236, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(5, 17, 28, 0.98), rgba(3, 11, 20, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 32px rgba(0, 0, 0, 0.18);
}

.generation-page .generation-prompt-field .prompt-history-panel {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(65, 236, 232, 0.1);
  background:
    linear-gradient(180deg, rgba(6, 18, 30, 0.92), rgba(3, 11, 20, 0.92));
}

.generation-page .generation-upload-panel,
.generation-page .generation-parameter-panel,
.generation-page .generation-history-panel {
  border: 1px solid rgba(65, 236, 232, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(6, 18, 30, 0.92), rgba(3, 11, 20, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 36px rgba(0, 0, 0, 0.2);
}

.generation-page .generation-upload-panel {
  padding: 16px;
}

.generation-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.generation-upload-copy {
  display: grid;
  gap: 4px;
}

.generation-upload-copy h3,
.generation-parameter-header h2,
.generation-history-header h2 {
  margin: 0;
}

.upload-trigger-button {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(65, 236, 232, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 231, 216, 0.22), rgba(32, 135, 255, 0.16));
  color: #dffefe;
  font-size: 30px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(16, 185, 202, 0.16);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.upload-trigger-button:hover {
  transform: translateY(-1px);
  border-color: rgba(65, 236, 232, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 32px rgba(16, 185, 202, 0.22);
}

.generation-page .upload-dropzone {
  min-height: 156px;
  padding: 12px;
  border-style: solid;
  border-color: rgba(65, 236, 232, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(3, 14, 24, 0.94), rgba(2, 10, 18, 0.92));
}

.generation-page .upload-dropzone.is-empty {
  justify-content: center;
}

.generation-page .input-preview-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 12px;
}

.generation-page .input-preview-card {
  border-radius: 18px;
}

.generation-page .input-preview-card img {
  height: 124px;
}

.generation-upload-placeholder {
  min-height: 126px;
  border: 1px dashed rgba(65, 236, 232, 0.16);
  border-radius: 20px;
  background: rgba(3, 15, 25, 0.5);
}

.generation-upload-placeholder-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.generation-upload-placeholder-copy strong {
  font-size: 18px;
  font-weight: 600;
  color: #eefcff;
}

.generation-upload-placeholder-copy span {
  color: rgba(148, 163, 184, 0.86);
  font-size: 13px;
  line-height: 1.7;
}

.generation-page .generation-inline-status {
  min-height: 22px;
  margin-top: 0;
  padding: 0 4px;
}

.generation-parameter-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.generation-parameter-header {
  display: grid;
  gap: 6px;
}

.generation-parameter-header p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.generation-parameter-grid {
  display: grid;
  gap: 14px;
}

.generation-page .generation-parameter-panel select,
.generation-page .generation-parameter-panel input[type="number"] {
  min-height: 52px;
  border-radius: 18px;
}

.generation-page .generation-submit-actions {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.generation-page .generation-submit-actions .primary,
.generation-page .generation-submit-actions .secondary {
  width: 100%;
  min-height: 52px;
}

.generation-page .generation-history-panel {
  padding: 22px;
}

.generation-history-header {
  margin-bottom: 16px;
}

.generation-history-header p {
  margin: 6px 0 0;
}

.project-history-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(166px, 196px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.project-history-strip::-webkit-scrollbar {
  height: 8px;
}

.project-history-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(65, 236, 232, 0.22);
}

.project-history-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(65, 236, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(6, 20, 32, 0.96), rgba(2, 10, 18, 0.96));
}

.project-history-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(2, 8, 16, 0.96);
}

.project-history-card-body {
  display: grid;
  gap: 6px;
  padding: 12px 12px 14px;
}

.project-history-card-title {
  color: #eefcff;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-history-card-meta {
  color: rgba(148, 163, 184, 0.82);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 1240px) {
  .generation-composer {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .generation-page .generation-stage,
  .generation-page .generation-history-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .generation-shell {
    gap: 20px;
  }

  .generation-shell-title {
    font-size: 32px;
  }

  .generation-page .prompt-textarea {
    min-height: 190px;
    height: 190px;
  }

  .generation-parameter-grid {
    grid-template-columns: 1fr;
  }

  .upload-trigger-button {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 26px;
  }

  .project-history-strip {
    grid-auto-columns: minmax(146px, 172px);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.generation-page-minimal {
  --page-safe-gutter: clamp(24px, 2.4vw, 48px);
  width: min(1840px, calc(100% - 12px));
}

body.asset-sidebar-mounted .generation-page-minimal {
  width: min(1840px, calc(100% - 12px - (var(--page-safe-gutter) * 2)));
}

.generation-page-minimal .workspace-nav {
  margin-bottom: 56px;
}

.generation-page-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0 0 26px;
  text-align: center;
}

.generation-page-title {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(239, 254, 255, 0.96);
  text-shadow: 0 0 24px rgba(65, 236, 232, 0.08);
}

.generation-page-subtitle {
  margin: 0;
  font-size: clamp(15px, 1.8vw, 22px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, rgba(189, 248, 246, 0.94), rgba(65, 236, 232, 0.92), rgba(148, 163, 184, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(65, 236, 232, 0.06);
}

.generation-workspace-layout {
  display: block;
}

.generation-stage-minimal {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.generation-page-minimal .generation-editor-shell {
  display: grid;
  gap: 0;
  width: 100%;
  border: 1px solid rgba(65, 236, 232, 0.1);
  border-radius: 32px;
  background:
    radial-gradient(circle at 0% 0%, rgba(31, 224, 220, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(6, 18, 30, 0.96), rgba(3, 11, 20, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.generation-page-minimal .generation-prompt-field-minimal {
  gap: 0;
  margin: 0;
  border: 1px solid rgba(65, 236, 232, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(7, 20, 32, 0.96), rgba(3, 11, 20, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 30px rgba(0, 0, 0, 0.18);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.generation-page-minimal .generation-prompt-field-minimal:focus-within {
  border-color: rgba(65, 236, 232, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(65, 236, 232, 0.16),
    0 18px 34px rgba(0, 0, 0, 0.22);
}

.generation-page-minimal .generation-editor-textarea {
  min-height: 250px;
  height: 250px;
  padding: 18px 20px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(239, 254, 255, 0.94);
}

.generation-page-minimal .generation-editor-textarea::placeholder {
  color: rgba(148, 163, 184, 0.78);
  line-height: 1.75;
}

.generation-editor-bottom {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 0;
  background: transparent;
}

.generation-stage-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin: -2px 0 2px;
}

.generation-stage-divider-label {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  color: rgba(148, 163, 184, 0.82);
  white-space: nowrap;
}

.generation-stage-divider-line {
  flex: 1 1 auto;
  min-width: 0;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(65, 236, 232, 0.2), rgba(65, 236, 232, 0.42) 50%, rgba(65, 236, 232, 0.2));
  box-shadow: 0 0 10px rgba(65, 236, 232, 0.08);
}

.generation-upload-dropzone-minimal {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.generation-upload-dropzone-minimal[hidden] {
  display: none !important;
}

.generation-upload-dropzone-minimal.is-empty {
  display: none;
}

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

.generation-inline-preview-strip {
  display: inline-flex;
  width: auto;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.generation-inline-preview-strip.has-items {
  display: inline-flex;
}

.generation-inline-preview-strip::-webkit-scrollbar {
  display: none;
}

.generation-page-minimal .input-preview-card {
  border-radius: 18px;
}

.generation-inline-preview-strip .input-preview-card {
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  height: 72px;
}

.generation-inline-preview-strip .batch-image-card {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

.generation-inline-preview-strip .input-preview-card {
  cursor: grab;
}

.generation-inline-preview-strip .input-preview-card.is-dragging {
  opacity: 0.48;
  transform: scale(0.98);
}

.generation-inline-preview-strip .input-preview-card.is-drop-before::before,
.generation-inline-preview-strip .input-preview-card.is-drop-after::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(65, 236, 232, 0.98) 0%, rgba(37, 99, 235, 0.92) 100%);
  box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.18);
  z-index: 4;
}

.generation-inline-preview-strip .input-preview-card.is-drop-before::before {
  left: 4px;
}

.generation-inline-preview-strip .input-preview-card.is-drop-after::before {
  right: 4px;
}

.generation-inline-preview-strip .generation-upload-skeleton-card {
  position: relative;
  overflow: hidden;
  cursor: default;
  border-color: rgba(65, 236, 232, 0.12);
  background: rgba(7, 19, 30, 0.82);
}

.generation-inline-preview-strip .generation-upload-skeleton-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(65, 236, 232, 0.12) 48%, transparent 100%),
    linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.04));
  transform: translateX(-100%);
  animation: generation-upload-skeleton-shimmer 1.25s ease-in-out infinite;
}

@keyframes generation-upload-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.generation-inline-preview-strip .upload-trigger-button-minimal {
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
}

.generation-page-minimal .input-preview-card img {
  height: 92px;
}

.generation-inline-preview-strip .input-preview-card img {
  height: 72px;
}

.generation-inline-preview-strip .batch-image-card img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.generation-page-minimal .input-preview-meta {
  display: none;
}

.generation-inline-preview-strip .input-preview-remove {
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  font-size: 14px;
}

.generation-upload-placeholder-minimal {
  display: none !important;
}

.generation-card-controls {
  display: grid;
  gap: 10px;
}

.generation-card-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.generation-card-topbar-inline {
  margin-top: 0;
}

.generation-model-chip {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: auto;
  margin: 0;
}

.generation-parameter-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.generation-model-chip-field {
  width: 72px;
}

.generation-model-chip select[hidden] {
  display: none;
}

.generation-model-trigger,
.upload-trigger-button-minimal {
  width: 100%;
  min-height: 72px;
  border-radius: 18px;
}

.generation-model-dropdown {
  position: relative;
}

.generation-model-trigger {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 6px;
  aspect-ratio: 1 / 1;
  padding: 8px;
  border: 1px solid rgba(65, 236, 232, 0.16);
  background: linear-gradient(180deg, rgba(8, 20, 32, 0.98), rgba(3, 11, 20, 0.98));
  color: #effeff;
  box-shadow: inset 0 0 0 1px rgba(65, 236, 232, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.generation-model-trigger:hover,
.generation-model-dropdown[data-open="true"] .generation-model-trigger {
  transform: none;
  border-color: rgba(65, 236, 232, 0.28);
  box-shadow: 0 0 0 1px rgba(65, 236, 232, 0.14), inset 0 0 18px rgba(65, 236, 232, 0.06);
}

.generation-model-trigger-icon,
.generation-model-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #62f3ef;
  filter: drop-shadow(0 0 8px rgba(98, 243, 239, 0.3));
  pointer-events: none;
}

.generation-model-trigger-icon svg,
.generation-model-option-icon svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.generation-model-trigger-label,
.generation-model-option-label {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 8px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  color: rgba(239, 254, 255, 0.96);
  pointer-events: none;
}

.generation-model-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 0;
  z-index: 20;
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(65, 236, 232, 0.18);
  border-radius: 18px;
  background: rgba(4, 14, 24, 0.98);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.generation-model-option {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 72px;
  padding: 8px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #effeff;
  cursor: pointer;
}

.generation-model-option:hover {
  transform: none;
  background: rgba(65, 236, 232, 0.08);
}

.upload-trigger-button-minimal {
  flex: 0 0 auto;
  width: 72px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
  text-align: center;
}

.generation-card-parameters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.generation-card-parameters-inline {
  --generation-inline-control-height: 46px;
  --generation-inline-control-gap: 8px;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  justify-content: stretch;
  align-items: start;
}

.generation-inline-parameter-grid {
  display: contents;
}

.generation-inline-toolbar {
  display: contents;
}

.generation-inline-toolbar-buttons {
  display: contents;
}

.generation-global-prompt-inline-panel {
  display: flex;
  min-width: 0;
}

.generation-card-parameters-inline > *,
.generation-card-parameters-inline .generation-inline-toolbar-buttons > * {
  min-width: 0;
}

.generation-inline-extra-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.generation-apply-global-prompt-button {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.generation-starter-preset-field {
  min-width: 0;
}

.generation-import-button-minimal {
  width: 100%;
  min-height: var(--generation-inline-control-height);
  border-radius: 16px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 10px;
  font-size: 12px;
  line-height: 1.15;
}


.generation-submit-action-stack {
  display: contents;
}

.generation-submit-action-stack > button,
.generation-submit-action-stack > * {
  width: 100%;
  min-width: 0;
}

.generation-submit-split-button {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(65, 236, 232, 0.2);
  border-radius: 18px;
  overflow: visible;
  background: linear-gradient(135deg, rgba(59, 236, 227, 0.96) 0%, rgba(45, 213, 193, 0.94) 100%);
  box-shadow: 0 0 0 1px rgba(65, 236, 232, 0.08), 0 10px 24px rgba(4, 17, 27, 0.28);
  isolation: isolate;
}

.generation-submit-split-button.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.generation-submit-split-button::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(239, 254, 255, 0) 0%,
    rgba(239, 254, 255, 0.78) 18%,
    rgba(239, 254, 255, 0.92) 50%,
    rgba(239, 254, 255, 0.78) 82%,
    rgba(239, 254, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.generation-submit-split-button.is-single::after {
  display: none;
}

.generation-submit-button-segment {
  min-width: 0;
  min-height: var(--generation-inline-control-height);
  border-radius: 0;
  padding: 12px 8px;
  position: relative;
  background: transparent;
  color: #eff6ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: none;
  box-shadow: none;
  z-index: 0;
}

.generation-submit-button-segment[hidden] {
  display: none !important;
}

.generation-submit-button-segment:hover:not(:disabled) {
  transform: none;
  background: linear-gradient(180deg, rgba(239, 254, 255, 0.12) 0%, rgba(239, 254, 255, 0.04) 100%);
  filter: none;
}

.generation-submit-button-segment:active:not(:disabled) {
  transform: none;
  background: linear-gradient(180deg, rgba(7, 18, 29, 0.12) 0%, rgba(7, 18, 29, 0.04) 100%);
  filter: none;
}

.generation-submit-button-segment:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(239, 246, 255, 0.86);
  outline-offset: -2px;
}

.generation-submit-button-segment.is-edit {
  color: rgba(239, 254, 255, 0.92);
}

.generation-submit-edit-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  min-width: 0;
}

.generation-submit-edit-wrap[hidden] {
  display: none !important;
}

.generation-submit-edit-wrap::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  right: 34px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(239, 254, 255, 0) 0%,
    rgba(239, 254, 255, 0.78) 18%,
    rgba(239, 254, 255, 0.92) 50%,
    rgba(239, 254, 255, 0.78) 82%,
    rgba(239, 254, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.generation-submit-edit-wrap.is-remove-copy-selected {
  background: linear-gradient(180deg, rgba(5, 46, 44, 0.16) 0%, rgba(5, 46, 44, 0.04) 100%);
}

.generation-submit-edit-wrap.is-menu-open {
  z-index: 9;
}

.generation-submit-edit-wrap.is-menu-open .generation-submit-edit-menu {
  display: grid;
}

.generation-submit-edit-wrap .generation-submit-button-segment.is-edit {
  width: 100%;
}

.generation-submit-edit-trigger {
  min-width: 0;
  min-height: var(--generation-inline-control-height);
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(239, 254, 255, 0.92);
  box-shadow: none;
  transform: none;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 0;
}

.generation-submit-edit-trigger:hover:not(:disabled) {
  transform: none;
  background: linear-gradient(180deg, rgba(239, 254, 255, 0.12) 0%, rgba(239, 254, 255, 0.04) 100%);
}

.generation-submit-edit-trigger:active:not(:disabled) {
  transform: none;
  background: linear-gradient(180deg, rgba(7, 18, 29, 0.12) 0%, rgba(7, 18, 29, 0.04) 100%);
}

.generation-submit-edit-trigger:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(239, 246, 255, 0.86);
  outline-offset: -2px;
}

.generation-submit-edit-trigger-caret {
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.generation-submit-edit-wrap.is-menu-open .generation-submit-edit-trigger-caret {
  transform: rotate(180deg);
}

.generation-submit-edit-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 108px;
  padding: 6px;
  border: 1px solid rgba(65, 236, 232, 0.18);
  border-radius: 14px;
  background: rgba(7, 18, 29, 0.96);
  box-shadow: 0 16px 32px rgba(4, 17, 27, 0.34);
  z-index: 8;
}

.generation-submit-edit-menu-option {
  width: 100%;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: rgba(239, 246, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  box-shadow: none;
  transform: none;
}

.generation-submit-edit-menu-option:hover:not(:disabled),
.generation-submit-edit-menu-option.is-selected {
  background: rgba(45, 212, 191, 0.16);
}

.generation-submit-edit-menu-option:active:not(:disabled) {
  transform: none;
  background: rgba(13, 148, 136, 0.2);
}

.generation-batch-groups-area {
  display: grid;
  gap: 12px;
  padding: 16px 10px 0;
}

.generation-project-analysis-panel {
  padding: 14px;
  border-radius: 18px;
}

.generation-project-analysis-layout {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.generation-project-analysis-upload-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
}

.generation-project-analysis-upload-item {
  position: relative;
  width: 108px;
  min-width: 108px;
}

.generation-project-analysis-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 108px;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 18, 29, 0.94), rgba(3, 10, 18, 0.96));
  border: 1px dashed rgba(96, 165, 250, 0.42);
}

.generation-project-analysis-upload:hover {
  border-color: rgba(96, 165, 250, 0.72);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.88) 0%, rgba(8, 17, 34, 0.92) 100%);
}

.generation-project-analysis-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(2, 6, 23, 0.88);
  color: #f8fafc;
  font-size: 16px;
  line-height: 1;
}

.generation-project-analysis-delete:hover {
  background: rgba(127, 29, 29, 0.9);
  border-color: rgba(248, 113, 113, 0.42);
}

.generation-project-analysis-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.generation-project-analysis-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(226, 232, 240, 0.88);
  text-align: center;
  pointer-events: none;
}

.generation-project-analysis-placeholder-content {
  width: 100%;
  min-height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 2px;
  text-align: center;
}

.generation-project-analysis-placeholder-icon {
  font-size: 19px;
  line-height: 1;
  color: #dbeafe;
}

.generation-project-analysis-placeholder-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.35;
  color: #dbeafe;
  word-break: break-word;
}

.generation-project-analysis-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.generation-project-analysis-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.generation-project-analysis-header-text {
  min-width: 0;
}

.generation-project-analysis-title,
.generation-project-analysis-meta {
  margin: 0;
}

.generation-project-analysis-title {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  color: #eff6ff;
}

.generation-project-analysis-meta {
  margin-top: 4px;
  font-size: 12px;
}

.generation-project-analysis-start {
  min-width: 128px;
  min-height: 46px;
  padding: 10px 16px;
  white-space: nowrap;
}

.generation-project-analysis-actions {
  --generation-project-analysis-control-height: 46px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.generation-project-analysis-parameter-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.generation-project-analysis-parameter-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 13px;
  line-height: 1;
  color: rgba(226, 232, 240, 0.88);
  white-space: nowrap;
}

.generation-project-analysis-parameter-select {
  width: clamp(104px, 11vw, 128px);
  min-height: var(--generation-project-analysis-control-height);
  padding: 0 36px 0 12px;
  border-radius: 16px;
}

.generation-project-analysis-result-field {
  gap: 0;
}

.generation-project-analysis-result {
  min-height: 108px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.generation-batch-groups-header,
.generation-batch-groups-summary {
  margin: 0;
}

.generation-batch-group-list {
  --generation-display-card-scale: 0.6;
  gap: 8px;
}

.generation-batch-group-list .batch-group-card {
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
}

.generation-batch-group-list .batch-group-header,
.generation-batch-group-list .batch-group-identity,
.generation-batch-group-list .batch-group-card-actions {
  gap: 8px;
}

.generation-batch-group-list .batch-group-card-actions {
  max-width: min(100%, 420px);
}

.generation-batch-group-list .batch-group-corner-badge {
  font-size: 11px;
  min-height: 22px;
  padding: 3px 10px;
}

.generation-batch-group-list .batch-group-layout {
  gap: 8px;
  margin-top: 8px;
}

.generation-batch-group-list .batch-group-window-panel {
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
}

.generation-batch-group-list .batch-group-window-content {
  gap: 8px;
}

.generation-batch-group-list .batch-group-section.is-result .batch-group-section-heading .primary,
.generation-batch-group-list .batch-group-section.is-edit-result .batch-group-section-heading .primary {
  padding: 9.6px 14.4px;
  border-radius: 9.6px;
  font-size: 0.8em;
  line-height: 1.2;
}

.generation-batch-group-list .batch-group-section-heading {
  padding: 10px 12px 0;
}

.generation-batch-group-list .batch-group-section-title {
  padding: 10px 12px;
}

.generation-batch-group-list .batch-group-section-body {
  padding: 10px 12px 12px;
}

.generation-batch-group-list .batch-group-prompt-summary-title {
  font-size: 12.8px;
}

.generation-batch-group-list .batch-group-prompt-preview {
  font-size: 12.8px;
  line-height: 1.5;
}

.generation-batch-group-list .batch-group-section-toggle::after {
  font-size: 9.6px;
}

.generation-batch-group-list .batch-group-result-placeholder {
  font-size: 12.8px;
  line-height: 1.5;
}

.generation-batch-group-list .batch-group-preview-grid,
.generation-batch-group-list .batch-group-result-grid {
  grid-auto-columns: calc(108px * var(--generation-display-card-scale));
  gap: 4px;
}

.generation-batch-group-list .batch-group-section.is-upload .batch-group-preview-grid,
.generation-batch-group-list .batch-group-section.is-edit-upload .batch-group-preview-grid {
  grid-template-columns: repeat(4, calc(108px * var(--generation-display-card-scale)));
  justify-content: start;
}

.generation-batch-group-list .batch-group-section.is-result .batch-group-result-grid,
.generation-batch-group-list .batch-group-section.is-edit-result .batch-group-result-grid {
  grid-template-columns: repeat(4, calc(108px * var(--generation-display-card-scale)));
  justify-content: start;
}

.generation-batch-group-list .batch-image-card {
  aspect-ratio: 1 / 1;
  width: calc(108px * var(--generation-display-card-scale));
  min-width: calc(108px * var(--generation-display-card-scale));
  max-width: calc(108px * var(--generation-display-card-scale));
  min-height: calc(108px * var(--generation-display-card-scale));
  padding: 0;
  place-items: center;
}

.generation-batch-group-list .batch-image-card img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  margin-left: auto;
  margin-right: auto;
}

.generation-batch-group-list .batch-image-card .input-preview-meta {
  padding: calc(8px * var(--generation-display-card-scale)) calc(8px * var(--generation-display-card-scale)) calc(4px * var(--generation-display-card-scale));
  font-size: calc(11px * var(--generation-display-card-scale));
  line-height: 1.2;
  text-align: center;
}

.generation-batch-group-list .batch-group-preview-grid .input-preview-remove,
.generation-batch-group-list .batch-generated-card .batch-generated-remove {
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 5;
}

.generation-batch-group-list .batch-generated-card {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
  border-radius: 16px;
}

.generation-batch-group-list .batch-generated-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 0 rgba(56, 189, 248, 0),
    inset 0 0 24px rgba(8, 53, 74, 0);
  background: rgba(0, 0, 0, 0);
  transition: box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  z-index: 2;
}

.generation-batch-group-list .batch-generated-card.is-selected {
  border-color: rgba(56, 189, 248, 0.98);
  background: linear-gradient(180deg, rgba(8, 25, 44, 0.96) 0%, rgba(8, 22, 40, 0.92) 100%);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.34),
    0 0 0 5px rgba(14, 165, 233, 0.12),
    0 16px 30px rgba(8, 47, 73, 0.34);
  transform: translateY(-1px);
}

.generation-batch-group-list .batch-generated-card.is-selected::after {
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px rgba(125, 211, 252, 0.58),
    inset 0 0 18px rgba(8, 53, 74, 0.22);
  background:
    radial-gradient(circle at center, rgba(8, 53, 74, 0.5) 0%, rgba(8, 53, 74, 0.5) 52%, rgba(8, 53, 74, 0.34) 74%, rgba(8, 53, 74, 0.18) 88%, rgba(8, 53, 74, 0.04) 100%),
    linear-gradient(180deg, rgba(8, 53, 74, 0.22) 0%, rgba(8, 53, 74, 0.08) 100%);
}

.generation-batch-group-list .batch-generated-card.is-selected img {
  filter: brightness(1.02) saturate(1.08);
}

.generation-batch-group-list .batch-generated-card.is-selected .batch-task-badge {
  border-color: rgba(125, 211, 252, 0.8);
  background: rgba(6, 40, 61, 0.92);
  color: #f0f9ff;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.generation-batch-group-list .batch-generated-card.is-selected .input-preview-meta {
  color: #eff6ff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(5, 17, 32, 0.58) 56%, rgba(2, 6, 23, 0.08) 100%);
}

.generation-batch-group-list .batch-generated-card .input-preview-meta {
  z-index: 3;
}

.generation-batch-group-list .batch-task-badge {
  top: 4px;
  left: 4px;
  min-height: 16px;
  padding: 0 5px;
  font-size: 9px;
  border-radius: 999px;
  max-width: calc(100% - 30px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
}

.generation-batch-group-list .batch-group-preview-grid .batch-add-image-card {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(108px * var(--generation-display-card-scale));
  min-width: calc(108px * var(--generation-display-card-scale));
  max-width: calc(108px * var(--generation-display-card-scale));
  min-height: calc(108px * var(--generation-display-card-scale));
}

.generation-batch-group-list .batch-add-image-card-content {
  width: 100%;
  min-height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(8px * var(--generation-display-card-scale));
  padding: 0 2px;
  text-align: center;
}

.generation-batch-group-list .batch-add-image-card-icon {
  font-size: calc(42px * var(--generation-display-card-scale));
}

.generation-batch-group-list .batch-add-image-card-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.generation-batch-group-list .batch-group-result-body {
  min-height: calc(140px * var(--generation-display-card-scale));
}

.generation-batch-group-list .batch-group-prompt {
  min-height: 112px;
}

.generation-card-parameters-inline #starterPresetSelect[hidden] {
  display: none !important;
}

.generation-project-card-media {
  width: 84px;
  height: 84px;
  padding: 8px;
}

.generation-project-card-folder {
  width: 100%;
  height: 100%;
  color: #c7d2fe;
}

.generation-project-card-folder svg {
  display: block;
  width: 100%;
  height: 100%;
}

.generation-project-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  margin: 0 0 8px;
  padding: 0 8px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.18);
  color: #bfdbfe;
  font-size: 10px;
  line-height: 1.35;
}

body.generation-shortcuts-layout .asset-sidebar-nav-button {
  gap: 0;
}

body.generation-shortcuts-layout .asset-sidebar-collapse-button {
  gap: 0;
}

body.generation-shortcuts-layout .asset-sidebar-user-button {
  gap: 0;
}

body.generation-shortcuts-layout .asset-sidebar-nav-button .asset-sidebar-toggle-hint {
  display: none;
}

body.generation-shortcuts-layout .asset-sidebar-collapse-button .asset-sidebar-toggle-hint {
  display: none;
}

body.generation-shortcuts-layout .asset-sidebar-user-button .asset-sidebar-toggle-hint {
  display: none;
}

.generation-detail-slot-card,
.generation-detail-slot-add {
  aspect-ratio: 1 / 1;
  width: calc(92px * 0.6);
  min-width: calc(92px * 0.6);
  max-width: calc(92px * 0.6);
  min-height: calc(92px * 0.6);
}

.generation-detail-slot-add .batch-add-image-card-content {
  gap: calc(6px * 0.6);
}

.generation-detail-slot-add .batch-add-image-card-icon {
  font-size: calc(32px * 0.6);
}

.generation-page .generation-detail-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, calc(92px * 0.6));
  grid-auto-columns: calc(92px * 0.6);
  justify-content: start;
  align-items: start;
  gap: 4px;
}

.generation-compact-field {
  gap: 6px;
  margin: 0;
}

.generation-compact-field select,
.generation-compact-field input {
  min-height: var(--generation-inline-control-height);
  border-radius: 16px;
  border: 1px solid rgba(65, 236, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(8, 20, 32, 0.96), rgba(3, 11, 20, 0.96));
}

.generation-compact-field select option,
.generation-global-prompt-mode-field select option,
.generation-model-chip select option {
  color: #effeff;
  background: #081420;
}

.generation-apply-global-prompt-button,
.generation-submit-button-minimal,
.generation-reset-button-minimal {
  min-height: var(--generation-inline-control-height);
  border-radius: 16px;
  align-self: start;
}

.generation-apply-global-prompt-button,
.generation-import-button-minimal,
.generation-submit-button-minimal,
.generation-reset-button-minimal {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: start;
}

.generation-parameter-description {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.84);
}

.generation-model-chip-field .generation-parameter-description {
  text-align: center;
}

.generation-inline-status-minimal {
  min-height: 20px;
  margin: 0;
  padding: 0 2px;
  font-size: 12px;
  text-align: right;
}

.generation-inline-status-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.generation-inline-status-row .generation-inline-status-minimal {
  flex: 1 1 auto;
}

.image-export-status-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 14px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .generation-card-parameters-inline {
    --generation-inline-control-gap: 6px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .generation-import-button-minimal {
    padding: 10px 8px;
    font-size: 11px;
  }

  .generation-submit-button-segment {
    padding: 12px 7px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .generation-page-minimal {
    width: calc(100% - 20px);
  }

  .generation-page-hero {
    gap: 6px;
    margin-bottom: 22px;
  }

  .generation-workspace-layout {
    display: block;
  }

  .generation-page-minimal .generation-editor-shell {
    border-radius: 24px;
  }

  .generation-page-minimal .generation-editor-textarea {
    min-height: 200px;
    height: 200px;
    padding: 14px 16px;
    font-size: 16px;
  }

  .generation-editor-bottom {
    padding: 12px 14px 14px;
  }

  .generation-model-chip,
  .generation-model-chip-field {
    width: 64px;
  }

  .upload-trigger-button-minimal {
    width: 64px;
  }

  .generation-model-chip,
  .generation-model-trigger,
  .upload-trigger-button-minimal {
    min-height: 64px;
    border-radius: 16px;
  }

  .generation-model-dropdown-menu {
    border-radius: 16px;
  }

  .generation-model-trigger-label,
  .generation-model-option-label {
    font-size: 10px;
  }

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

  .generation-card-parameters-inline {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }

  .generation-import-button-minimal {
    font-size: 11px;
  }

  .generation-project-analysis-layout {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .generation-project-analysis-upload {
    width: 100%;
    min-width: 0;
    height: 92px;
  }

  .generation-project-analysis-upload-item {
    width: 92px;
    min-width: 92px;
  }
}

@media (max-width: 720px) {
  .generation-card-parameters-inline {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generation-inline-parameter-grid,
  .generation-inline-toolbar,
  .generation-inline-toolbar-buttons,
  .generation-submit-action-stack {
    display: contents;
  }

  .generation-submit-button-segment {
    font-size: 13px;
  }

  .generation-project-analysis-layout {
    grid-template-columns: 1fr;
  }

  .generation-project-analysis-upload-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generation-project-analysis-upload {
    width: 100%;
    min-width: 0;
    height: 120px;
  }

  .generation-project-analysis-upload-item {
    width: 100%;
    min-width: 0;
  }

  .generation-project-analysis-header {
    flex-direction: column;
    align-items: stretch;
  }

  .generation-project-analysis-actions {
    align-items: stretch;
  }

  .generation-project-analysis-parameter-field {
    justify-content: flex-end;
  }

  .generation-project-analysis-start {
    width: auto;
  }

}

@media (max-width: 560px) {
  .generation-page-minimal {
    width: calc(100% - 16px);
  }

  .generation-card-topbar,
  .generation-card-parameters,
  .generation-stage-divider,
  .generation-inline-parameter-grid,
  .generation-inline-toolbar-buttons {
    grid-template-columns: 1fr;
  }

  .generation-card-parameters-inline {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }

  .generation-project-analysis-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .generation-project-analysis-parameter-field {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  .generation-project-analysis-parameter-select {
    width: 104px;
  }


  .generation-submit-split-button {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generation-submit-button-segment {
    min-height: 54px;
    padding: 12px 8px;
    font-size: 12px;
  }

  .generation-card-topbar {
    display: grid;
  }

  .generation-model-chip,
  .upload-trigger-button-minimal {
    width: 100%;
  }

  .generation-model-chip-field {
    width: 100%;
  }

  .generation-model-dropdown-menu {
    position: static;
    margin-top: 8px;
  }
}
