:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: transparent;
  --surface-soft: rgba(241, 244, 248, 0.54);
  --ink: #08111f;
  --muted: #6f7a8b;
  --soft: #9aa5b5;
  --line: #dfe6ee;
  --line-soft: #ebf0f5;
  --accent: #08111f;
  --accent-soft: #eef3fb;
  --blue: #5d7fa8;
  --danger: #9d3d3d;
  --shadow: none;
  --radius: 0;
  --radius-sm: 10px;
  --pill: 999px;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui,
    -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -160px, rgba(201, 219, 240, 0.5), transparent 420px),
    linear-gradient(180deg, #fbfdff 0%, #f7f9fc 52%, #fbfdff 100%);
  color: var(--ink);
}

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

button {
  border: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(93, 127, 168, 0.2);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

svg path,
svg circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  height: 68px;
  border-bottom: 1px solid rgba(223, 230, 238, 0.78);
  background: rgba(251, 253, 255, 0.78);
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  backdrop-filter: blur(18px);
}

.nav-reset {
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-row strong {
  display: block;
  font-size: 13px;
  font-weight: 830;
  letter-spacing: 0.15em;
  line-height: 1.1;
}

.brand-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.nav-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-item,
.lang-button,
.profile-button,
.credit-pill,
.primary-button,
.secondary-button,
.small-button,
.filter-button,
.text-button,
.icon-button {
  min-height: 34px;
  border-radius: var(--pill);
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.nav-item {
  background: transparent;
  color: var(--muted);
  padding: 0 13px;
  font-size: 12px;
  font-weight: 720;
}

.nav-item.active,
.nav-item:hover {
  background: var(--ink);
  color: #ffffff;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.8);
  padding: 3px;
}

.lang-button {
  min-width: 36px;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 760;
}

.lang-button.active {
  background: var(--ink);
  color: #ffffff;
}

.profile-button,
.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 4px 11px 4px 5px;
  font-size: 12px;
  font-weight: 720;
}

.credit-pill {
  padding: 0 12px;
  color: var(--muted);
}

.credit-pill strong {
  color: var(--ink);
  font-size: 13px;
}

.redeem-topbar {
  min-width: 56px;
  padding-inline: 12px;
  white-space: nowrap;
}

.avatar {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 11px;
  font-weight: 820;
}

.avatar.large {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.main-shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.panel-view {
  display: none;
}

.panel-view.active {
  display: block;
}

.studio-hero {
  padding: 34px 0 58px;
}

.studio-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  padding-bottom: 22px;
}

.studio-kicker {
  margin-bottom: 12px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.18em;
}

h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.studio-heading p:not(.studio-kicker),
.panel-title p,
.section-heading p {
  max-width: 520px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.studio-status {
  display: grid;
  min-width: 128px;
  gap: 3px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 16px;
  background: transparent;
  padding: 6px 0 6px 22px;
  text-align: right;
}

.studio-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.studio-status strong {
  font-size: 24px;
  font-weight: 840;
  line-height: 1;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.control-panel,
.result-panel,
.history-strip,
.admin-card,
.history-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: var(--shadow);
}

.control-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 0 28px 0 0;
}

.panel-title {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 790;
  line-height: 1.3;
}

h3 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.35;
}

.panel-title p {
  max-width: 280px;
  margin-top: 5px;
  font-size: 12px;
}

.panel-title > span {
  width: fit-content;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  padding: 0;
  text-transform: uppercase;
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 12px;
}

.mode-tab {
  position: relative;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
  padding: 0;
}

.mode-tab.active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.mode-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -13px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: "";
}

.icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
}

.generator-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.field-block {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 740;
}

.field-block textarea,
.field-block select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.field-block textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.72;
}

.field-block select {
  height: 40px;
  padding: 0 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.upload-zone {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px dashed #c9d3df;
  border-radius: 10px;
  background: transparent;
  padding: 10px;
}

.upload-zone.has-preview {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.upload-zone.has-preview .upload-icon {
  display: none;
}

.upload-zone strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.upload-zone span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.upload-preview {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.upload-filename {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
}

.upload-icon svg {
  width: 19px;
  height: 19px;
}

.small-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 760;
}

.mask-board {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 10px;
}

.mask-preview {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  max-height: 260px;
  border-radius: 10px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #dce6ef, #657686);
  touch-action: none;
}

.mask-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mask-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.mask-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.range-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

input[type="range"] {
  accent-color: var(--blue);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cost-row strong {
  color: var(--ink);
  font-weight: 820;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--pill);
  padding: 0 18px;
  font-size: 13px;
  font-weight: 800;
}

.primary-button {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover,
.profile-button:hover,
.credit-pill:hover,
.small-button:hover,
.filter-button:hover,
.text-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.arrow {
  font-size: 14px;
  line-height: 1;
}

.inline-warning {
  color: var(--danger);
  font-size: 12px;
  font-weight: 690;
}

.result-panel {
  display: flex;
  min-height: 620px;
  flex-direction: column;
  padding: 0;
}

.result-header,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.result-header p,
.result-footer span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.icon-button.active {
  background: var(--ink);
  color: #ffffff;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.image-stage {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  height: clamp(420px, 52vh, 560px);
  min-height: 0;
  max-height: 560px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 45% 20%, rgba(255, 255, 255, 0.5), transparent 280px),
    #dfe8ef;
}

.image-stage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-stage::after {
  position: absolute;
  inset: auto 14px 14px auto;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.56);
  color: #ffffff;
  content: "MOCK";
  font-size: 10px;
  font-weight: 820;
  padding: 5px 9px;
  backdrop-filter: blur(12px);
}

.site-shell[data-provider-mode="mock"] .image-stage::after {
  display: block;
}

.batch-result-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.batch-thumb {
  position: relative;
  overflow: hidden;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 0;
}

.batch-thumb.active {
  border-color: var(--ink);
}

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

.batch-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 17, 31, 0.68);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.generating-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(246, 248, 251, 0.68);
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  backdrop-filter: blur(10px);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(8, 17, 31, 0.12);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.result-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.result-footer div {
  display: grid;
  gap: 3px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
}

.result-footer div:last-child {
  border-right: 0;
  padding-left: 18px;
}

.result-footer strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.history-strip,
#historyPanel,
#adminPanel {
  border-top: 1px solid var(--line);
  padding: 40px 0 68px;
}

.history-strip {
  padding-top: 34px;
}

.text-button {
  background: transparent;
  color: var(--ink);
  padding: 0 4px;
  font-size: 12px;
  font-weight: 780;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.thumb-card,
.history-card {
  overflow: hidden;
}

.thumb-card {
  position: relative;
  height: 142px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
}

.thumb-card img,
.history-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.thumb-card span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.62);
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  padding: 5px 8px;
  backdrop-filter: blur(10px);
}

.page-heading {
  margin-bottom: 18px;
}

.toolbar-heading {
  justify-content: flex-end;
}

.filter-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: transparent;
  padding: 4px;
}

.filter-button {
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 760;
}

.filter-button.active {
  background: var(--ink);
  color: #ffffff;
}

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

.history-card {
  display: grid;
  grid-template-rows: 230px auto;
  min-width: 0;
}

.history-card > img {
  min-height: 0;
}

.history-card-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.history-card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.history-card p,
.admin-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.06);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.admin-card {
  border-top: 1px solid var(--line);
  padding: 18px;
}

.admin-card h3 {
  margin-bottom: 14px;
}

.wide-card {
  grid-column: 1 / -1;
}

.user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.user-row strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

#adminCredits {
  font-size: 24px;
  font-weight: 840;
}

.ledger-list,
.record-table {
  display: grid;
  gap: 8px;
}

.redeem-admin-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(96px, 0.6fr) auto auto;
  align-items: end;
  gap: 10px;
}

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

.admin-field span,
.admin-help,
.muted-line {
  color: var(--muted);
  font-size: 12px;
}

.admin-field select,
.admin-field input,
.code-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.admin-field select,
.admin-field input {
  min-height: 38px;
  padding: 0 10px;
}

.admin-help {
  margin-top: 12px;
}

.code-output {
  min-height: 132px;
  margin-top: 12px;
  resize: vertical;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.redeem-batches-heading {
  margin-top: 14px;
}

.redeem-batch-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.ledger-item,
.record-row,
.redeem-batch-row {
  display: grid;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  padding: 10px 11px;
}

.ledger-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.redeem-batch-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ledger-item strong,
.record-row strong,
.redeem-batch-row strong {
  font-size: 12px;
}

.ledger-item span,
.record-row span,
.redeem-batch-row span {
  color: var(--muted);
  font-size: 11px;
}

.record-row {
  grid-template-columns: 1.1fr 1fr 0.7fr 0.7fr;
}

.compact-button {
  min-height: 38px;
  padding: 0 16px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 48px));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(8, 17, 31, 0.9);
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 720;
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  backdrop-filter: blur(14px);
}

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

.hidden {
  display: none !important;
}

@media (max-width: 1060px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-list {
    display: none;
  }

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

  .result-panel {
    min-height: auto;
  }

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

@media (max-width: 760px) {
  .site-header {
    position: static;
    display: grid;
    height: auto;
    grid-template-columns: 1fr;
    padding: 16px 18px;
  }

  .topbar-actions {
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .profile-button span:last-child {
    display: none;
  }

  .main-shell {
    width: min(100vw - 28px, 1180px);
  }

  .studio-hero {
    padding: 24px 0 48px;
  }

  .studio-heading {
    display: grid;
  }

  .studio-status {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .mode-tabs,
  .form-row,
  .mask-tools,
  .result-footer,
  .admin-grid,
  .redeem-admin-grid,
  .record-row {
    grid-template-columns: 1fr;
  }

  .mode-tab {
    justify-content: flex-start;
    padding: 0;
  }

  .upload-zone {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .upload-zone.has-preview {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .upload-zone .small-button {
    grid-column: 1 / -1;
  }

  .image-stage,
  .image-stage img {
    height: 330px;
    min-height: 0;
    max-height: 330px;
  }

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

  .thumb-row,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .history-card {
    grid-template-rows: 220px auto;
  }

  .filter-tabs {
    flex-wrap: wrap;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-heading {
    align-items: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
