:root {
  color-scheme: dark;
  --black: #090a0a;
  --surface: #101212;
  --surface-raised: #151817;
  --surface-soft: #1b1f1d;
  --line: #292d2b;
  --line-strong: #3c423f;
  --text: #f1f4ef;
  --muted: #8b928d;
  --muted-strong: #b7beb8;
  --green: #73ff45;
  --green-soft: #c5ffb5;
  --green-deep: #12311d;
  --danger: #ff8278;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--black);
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  padding: 27px 14px 23px;
  border-right: 1px solid var(--line);
  background: #0b0d0c;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  background: transparent;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--black);
  background: var(--green);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}

.side-nav {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 70px;
}

.side-nav-item {
  display: grid;
  width: 100%;
  min-height: 72px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: color 160ms ease, background 160ms ease;
}

.side-nav-item:hover,
.side-nav-item.active {
  color: var(--green);
  background: var(--green-deep);
}

.nav-number {
  color: currentColor;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.sidebar-foot {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: auto;
  color: #68706a;
  font-size: 9px;
  letter-spacing: 1.5px;
  line-height: 1.45;
  text-align: center;
}

.sidebar-rule {
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}

.sidebar-version {
  color: #48504b;
  font-size: 9px;
  letter-spacing: 0;
}

.app-main {
  min-width: 0;
}

.topbar {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2vw;
  border-bottom: 1px solid var(--line);
}

.breadcrumb,
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2px;
}

.breadcrumb b {
  color: #4c544e;
  font-weight: 400;
}

.breadcrumb strong {
  color: var(--muted-strong);
  font-weight: 600;
}

.green-dot,
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(115, 255, 69, 0.75);
}

.content {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 31px 2vw 22px;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 16px;
}

.view-heading-copy {
  min-width: 0;
}

.eyebrow,
.panel-kicker,
.panel-count,
.mode-index,
.empty-index {
  margin: 0;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  line-height: 1.4;
  text-transform: uppercase;
}

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

h1,
h3 {
  max-width: 600px;
  margin: 13px 0 0;
  color: var(--text);
  font-size: 50px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 0.98;
}

h1 em,
h3 em {
  color: var(--green);
  font-style: normal;
}

.view-heading-note,
.view-heading-description {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.view-heading-note {
  text-align: right;
}

.mode-rail {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.mode-card {
  position: relative;
  display: grid;
  min-height: 88px;
  align-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.mode-card-featured {
  border-color: #315b31;
  background: var(--green-deep);
}

.mode-card strong,
.mode-card > div span {
  display: block;
}

.mode-card strong {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.mode-card > div span {
  color: var(--muted);
  font-size: 11px;
}

.mode-card-featured > div span {
  color: var(--green-soft);
}

.mode-arrow {
  position: absolute;
  right: 16px;
  bottom: 13px;
  color: var(--muted-strong);
  font-size: 21px;
  line-height: 1;
}

.mode-card-featured .mode-arrow {
  color: var(--green);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.workspace-panel {
  min-width: 0;
  padding: 21px 22px 22px;
}

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

.output-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  background: #0d100f;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 40px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 620;
  letter-spacing: 0;
  line-height: 1.3;
}

.panel-count {
  padding-top: 2px;
  color: #5f6862;
  font-size: 9px;
  white-space: nowrap;
}

.field-group {
  margin-bottom: 16px;
}

.field-group.compact {
  margin-bottom: 0;
}

.field-heading,
.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

label,
.field-label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.field-hint {
  color: #606861;
  font-size: 10px;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 11px;
  padding: 20px;
  border: 1px dashed #3b453d;
  border-radius: 6px;
  background: #131716;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--green);
  background: #17231a;
}

.dropzone.has-image {
  padding: 0;
  border-style: solid;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--black);
  background: var(--green);
  border-radius: 50%;
  font-size: 21px;
  font-weight: 350;
  line-height: 1;
}

.dropzone-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.dropzone-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
}

.dropzone.has-image .dropzone-mark,
.dropzone.has-image .dropzone-title,
.dropzone.has-image .dropzone-name {
  display: none;
}

textarea {
  display: block;
  width: 100%;
  min-height: 76px;
  margin-top: 11px;
  padding: 13px 14px;
  color: var(--text);
  background: #131716;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  resize: vertical;
  font-size: 12px;
  line-height: 1.7;
  transition: border-color 160ms ease, background 160ms ease;
}

textarea::placeholder {
  color: #626b64;
}

textarea:focus {
  border-color: #536c59;
  background: #151d17;
  box-shadow: inset 0 0 0 1px rgba(115, 255, 69, 0.18);
}

textarea:focus-visible {
  outline: none;
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.prompt-suggestions button {
  padding: 6px 9px;
  color: #aab4ab;
  background: #171c19;
  border: 1px solid #2b342e;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.prompt-suggestions button:hover {
  color: var(--green);
  background: #1b2b1e;
  border-color: #467a41;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 20px;
  padding-top: 3px;
}

.segmented {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.segmented button {
  min-width: 52px;
  padding: 8px 10px;
  color: var(--muted);
  background: #151918;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.segmented button:hover,
.segmented button.selected {
  color: var(--black);
  background: var(--green);
  border-color: var(--green);
}

.form-error {
  margin: 18px 0 0;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.5;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 17px;
  padding: 0 15px 0 18px;
  color: var(--black);
  background: var(--green);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover {
  background: #92ff6d;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.primary-button span:last-child {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.primary-button.loading span:last-child {
  animation: pulse-arrow 900ms ease-in-out infinite alternate;
}

.output-heading {
  margin-bottom: 20px;
}

.status-dot {
  margin-top: 3px;
  background: #465049;
  box-shadow: none;
}

.status-dot.status-queued,
.status-dot.status-submitted,
.status-dot.status-processing,
.status-dot.status-converting {
  background: var(--green);
  box-shadow: 0 0 12px rgba(115, 255, 69, 0.75);
}

.status-dot.status-succeeded {
  background: var(--green);
  box-shadow: 0 0 12px rgba(115, 255, 69, 0.75);
}

.status-dot.status-failed {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 130, 120, 0.6);
}

.result-stage {
  display: grid;
  min-height: 0;
  flex: 1;
  place-items: center;
  border: 1px solid #232925;
  border-radius: 5px;
  background: #080a09;
  overflow: hidden;
}

.empty-result,
.processing-result,
.failed-result {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-result p,
.processing-result p,
.failed-result p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
}

.empty-result > span:last-child,
.processing-result > p + span {
  color: #5d665f;
  font-size: 10px;
}

.empty-index {
  color: #59635b;
  font-size: 9px;
}

.empty-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--green);
  border: 1px solid #304d33;
  border-radius: 50%;
  font-size: 19px;
}

.processing-orbit {
  display: block;
  width: 38px;
  height: 38px;
  border: 2px solid #2e3f31;
  border-right-color: var(--green);
  border-radius: 50%;
  animation: orbit 800ms linear infinite;
}

.failed-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--danger);
  border: 1px solid #693a38;
  border-radius: 50%;
  font-size: 18px;
}

.progress-area {
  padding-top: 19px;
}

.progress-copy {
  color: var(--muted);
  font-size: 10px;
}

.progress-copy strong {
  color: var(--green);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  background: #283029;
  border-radius: 10px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 240ms ease;
}

.progress-fill.indeterminate {
  width: 38%;
  animation: progress-slide 1200ms ease-in-out infinite;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}

.download-button,
.text-button {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 13px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  text-decoration: none;
}

.download-button {
  color: var(--black);
  background: var(--green);
  font-weight: 700;
}

.download-button:hover {
  background: #92ff6d;
}

.danger-confirm {
  color: #160d0d;
  background: var(--danger);
}

.danger-confirm:hover {
  background: #ff9b92;
}

.download-button span {
  font-size: 17px;
  line-height: 1;
}

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

.text-button:hover {
  color: var(--text);
}

.content-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 21px;
  color: #4e5751;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.view-panel[hidden] {
  display: none !important;
}

.dropzone.has-items {
  min-height: 72px;
}

.optional-label {
  color: #657067;
  font-size: 9px;
  font-weight: 400;
}

.common-prompt-field textarea {
  min-height: 58px;
  resize: none;
}

.batch-list {
  display: grid;
  max-height: 188px;
  gap: 7px;
  margin: -2px 0 13px;
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.batch-list-empty {
  padding: 11px 12px;
  color: #646e67;
  background: #131716;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  text-align: center;
}

.batch-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 7px;
  border: 1px solid #2c342e;
  border-radius: 5px;
  background: #131716;
}

.batch-item-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: start;
  gap: 5px;
}

.batch-preview-tile {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  color: var(--green);
  background: #080a09;
  border-radius: 3px;
  font-size: 8px;
  line-height: 1.25;
  text-align: center;
}

.batch-item-image,
.batch-item-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-preview-tile > span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 2px 3px;
  color: var(--text);
  background: rgba(9, 10, 10, 0.75);
  border-radius: 2px;
  font-size: 7px;
  line-height: 1;
}

.batch-preview-placeholder {
  color: #667168;
  border: 1px solid #29312b;
  background: #111513;
}

.batch-preview-placeholder > span {
  position: static;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 8px;
}

.batch-item-body {
  min-width: 0;
}

.batch-item-head,
.batch-item-foot {
  display: flex;
  align-items: center;
  gap: 7px;
}

.batch-item-head {
  min-height: 15px;
}

.batch-item-index,
.result-item-index {
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.task-status {
  display: inline-flex;
  min-height: 17px;
  align-items: center;
  padding: 0 6px;
  color: #95a099;
  background: #202722;
  border-radius: 3px;
  font-size: 9px;
  line-height: 1;
}

.task-status.status-succeeded {
  color: var(--green);
  background: #19321d;
}

.task-status.status-failed {
  color: var(--danger);
  background: #35201f;
}

.remove-item {
  margin-left: auto;
  padding: 0 2px;
  color: #69736b;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.remove-item:hover {
  color: var(--danger);
}

.batch-item textarea {
  min-height: 43px;
  margin-top: 5px;
  padding: 7px 9px;
  font-size: 10px;
  line-height: 1.45;
  resize: none;
}

.batch-item-foot {
  justify-content: space-between;
  margin-top: 4px;
  color: #68726a;
  font-size: 9px;
}

.batch-item-foot span {
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-item-foot strong {
  color: var(--green);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.batch-item-error {
  margin: 5px 0 0;
  color: var(--danger);
  font-size: 9px;
}

.suggestion-label {
  align-self: center;
  color: #69736b;
  font-size: 10px;
}

.batch-results {
  display: grid;
  width: 100%;
  max-height: 100%;
  align-content: start;
  gap: 7px;
  padding: 12px;
  overflow-y: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.result-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #29312b;
  border-radius: 4px;
  background: #111513;
  font-size: 10px;
}

.result-item-preview {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  background: #080a09;
  border-radius: 3px;
}

.result-item-preview img,
.result-item-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-item-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.result-item-name {
  overflow: hidden;
  color: var(--muted-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-item-status {
  color: var(--muted);
  white-space: nowrap;
}

.result-item > strong {
  color: var(--green);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.result-download {
  color: var(--green);
  text-decoration: none;
}

.history-view {
  min-height: calc(100vh - 90px);
}

.view-heading h3 {
  margin: 13px 0 0;
}

.history-title-mark {
  color: var(--green);
}

.history-count {
  color: var(--green);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.history-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green);
}

.history-toolbar-actions,
.history-row-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.danger-button {
  color: #c77770;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 12px;
  margin-top: 13px;
}

.history-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 0;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.history-card-top {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
}

.history-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: rgba(23, 28, 25, 0.92);
  border: 1px solid #556058;
  border-radius: 4px;
}

.history-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  padding: 0;
  color: var(--green);
  background: #080a09;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  font-size: 9px;
}

.history-preview img,
.history-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.history-row-content {
  min-width: 0;
  min-height: 94px;
  padding-top: 12px;
}

.history-row-actions {
  grid-column: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-self: end;
  min-height: 40px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.history-row-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.history-row-top time {
  color: #5f6961;
  font-size: 10px;
}

.history-prompt-preview {
  min-height: 54px;
  max-height: 54px;
  margin: 7px 0 4px;
  overflow-y: auto;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  scrollbar-color: var(--line-strong) transparent;
}

.history-meta {
  color: #657067;
  font-size: 9px;
}

.compact-download {
  min-height: 29px;
  padding: 0 9px;
  font-size: 10px;
}

.history-row-actions .text-button {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 6px;
}

.history-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.history-empty p {
  margin: 0;
  font-size: 13px;
}

.history-create-button {
  width: auto;
  min-height: 38px;
  margin-top: 4px;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-top: 17px;
  color: var(--muted);
  font-size: 10px;
}

.history-pagination .text-button:disabled,
.history-toolbar .text-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.about-view {
  min-height: calc(100vh - 90px);
}

.about-panel {
  max-width: 640px;
  padding-top: 0;
}

.about-panel .primary-button {
  width: 180px;
  margin-top: 25px;
}

.prompt-dialog {
  width: min(500px, calc(100vw - 36px));
  padding: 0;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.prompt-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.prompt-dialog form {
  padding: 23px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-heading h2 {
  margin: 7px 0 0;
  font-size: 16px;
}

.dialog-preview {
  display: grid;
  width: min(100%, 360px);
  max-height: 300px;
  margin-top: 18px;
  margin-right: auto;
  margin-left: auto;
  place-items: center;
  overflow: hidden;
  /* background: #0d100f; */
  /* border: 1px solid var(--line); */
  /* border-radius: 5px; */
}

.dialog-preview img,
.dialog-preview video {
  display: block;
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.dialog-preview img {
  border-radius: 50%;
}

.dialog-file {
  margin: 11px 0 0;
  overflow: hidden;
  color: #657067;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-close {
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.dialog-prompt {
  max-height: 180px;
  min-height: 90px;
  margin: 13px 0 23px;
  overflow-y: auto;
  padding: 13px;
  color: var(--muted-strong);
  background: #0d100f;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  scrollbar-color: #536158 transparent;
  scrollbar-width: thin;
}

.dialog-prompt::-webkit-scrollbar {
  width: 7px;
}

.dialog-prompt::-webkit-scrollbar-track {
  background: transparent;
}

.dialog-prompt::-webkit-scrollbar-thumb {
  background: #536158;
  border-radius: 999px;
}

.dialog-actions {
  justify-content: flex-end;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(290%); }
}

@keyframes pulse-arrow {
  from { transform: translateX(0); }
  to { transform: translateX(3px); }
}

@media (min-width: 981px) and (max-height: 960px) {
  .topbar {
    min-height: 54px;
  }

  .content {
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .view-heading {
    padding-bottom: 16px;
  }

  h1,
  h3 {
    margin-top: 9px;
    font-size: 30px;
  }

  .mode-rail {
    gap: 10px;
    margin-bottom: 12px;
  }

  .mode-card {
    min-height: 72px;
    padding: 10px 14px;
  }

  .mode-card strong {
    margin-bottom: 3px;
    font-size: 13px;
  }

  .mode-arrow {
    right: 14px;
    bottom: 10px;
  }

  .workspace-panel {
    padding: 16px 20px 17px;
  }

  .panel-heading {
    min-height: 34px;
    margin-bottom: 13px;
  }

  .panel-heading h2 {
    margin-top: 4px;
    font-size: 14px;
  }

  .field-group {
    margin-bottom: 12px;
  }

  .dropzone {
    min-height: 88px;
    margin-top: 7px;
  }

  .batch-list {
    max-height: 138px;
    margin-bottom: 9px;
  }

  .batch-item textarea {
    min-height: 36px;
  }

  .common-prompt-field textarea {
    min-height: 44px;
  }

  .image-preview {
    min-height: 88px;
  }

  textarea {
    min-height: 62px;
    margin-top: 7px;
    padding: 9px 12px;
  }

  .prompt-suggestions {
    margin-top: 7px;
  }

  .prompt-suggestions button {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .segmented {
    margin-top: 7px;
  }

  .segmented button {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .primary-button {
    min-height: 37px;
    margin-top: 12px;
  }

  .result-actions {
    padding-top: 12px;
  }

  .content-footer {
    padding-top: 12px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .brand-name {
    display: none;
  }

  .topbar,
  .content {
    padding-right: 4vw;
    padding-left: 4vw;
  }

  .mode-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .mode-card-featured {
    grid-column: span 2;
  }

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

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

  .output-panel {
    min-height: 540px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    display: flex;
    min-height: 0;
    flex-direction: row;
    justify-content: space-between;
    padding: 15px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-name {
    display: inline;
  }

  .side-nav {
    display: flex;
    width: auto;
    gap: 4px;
    margin: 0;
  }

  .side-nav-item {
    min-height: 32px;
    width: 48px;
    display: inline-flex;
    gap: 0;
    border-radius: 4px;
    font-size: 0;
  }

  .side-nav-item.active {
    font-size: 10px;
  }

  .nav-number {
    font-size: 9px;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    min-height: 54px;
    padding: 0 18px;
  }

  .breadcrumb,
  .topbar-meta {
    font-size: 10px;
    min-width: 0;
  }

  .breadcrumb {
    overflow: hidden;
    white-space: nowrap;
  }

  .breadcrumb strong,
  .topbar-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-meta {
    flex: 0 1 auto;
    white-space: nowrap;
  }

  .content {
    padding: 38px 18px 26px;
  }

  .view-heading {
    display: block;
    padding-bottom: 31px;
  }

  h1 {
    font-size: 45px;
    line-height: 1;
  }

  .view-heading-note {
    margin-top: 22px;
    text-align: left;
  }

  .mode-rail {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }

  .mode-card,
  .mode-card-featured {
    grid-column: auto;
    min-height: 105px;
    padding: 14px;
  }

  .mode-card-featured {
    grid-column: span 2;
  }

  .mode-card strong {
    font-size: 14px;
  }

  .workspace-panel {
    padding: 22px 18px 24px;
  }

  .panel-heading h2 {
    max-width: 240px;
    font-size: 15px;
  }

  .panel-count {
    display: none;
  }

  .field-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .field-hint {
    margin-left: auto;
    text-align: right;
  }

  .dropzone {
    min-height: 142px;
    flex-wrap: wrap;
    align-content: center;
    text-align: center;
  }

  .dropzone-title,
  .dropzone-name {
    max-width: 100%;
    white-space: normal;
  }

  .image-preview {
    min-height: 142px;
  }

  .settings-row {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .result-stage {
    min-height: 270px;
  }

  .output-panel {
    min-height: 440px;
  }

  .content-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    line-height: 1.4;
  }

  .batch-list {
    max-height: 245px;
  }

  .view-heading {
    display: block;
    padding-top: 0;
    padding-bottom: 31px;
  }

  .about-panel {
    padding-bottom: 31px;
  }

  .view-heading h3 {
    font-size: 45px;
    line-height: 1;
  }

  .view-heading-description {
    margin-top: 22px;
  }

  .history-count {
    display: block;
    margin-top: 22px;
  }

  .history-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .history-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px;
  }

  .history-card-top {
    top: 12px;
    right: 12px;
  }

  .history-preview {
    width: 100%;
    height: auto;
  }

  .history-row-actions {
    grid-column: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .history-prompt-preview {
    font-size: 11px;
  }

  .history-pagination {
    gap: 10px;
  }
}
