:root {
  --image-ink: #496b70;
  --image-ink-2: #5b777b;
  --image-paper: #fff8f2;
  --image-paper-2: #f5ebe4;
  --image-coral: #f3a18d;
  --image-mint: #aeddd6;
  --image-yellow: #f2dba2;
  --image-sky: #cae5f0;
  --image-white: #fffdfb;
  --image-line: rgba(73, 107, 112, 0.16);
  --image-muted: #74888a;
  --image-danger: #bf7467;
}

* {
  box-sizing: border-box;
}

.image-lab-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    linear-gradient(rgba(73, 107, 112, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 107, 112, 0.035) 1px, transparent 1px),
    var(--image-paper);
  background-size: 28px 28px;
  color: var(--image-ink);
  font-family: "Aptos", "Malgun Gothic", "Trebuchet MS", sans-serif;
}

.image-lab-page button,
.image-lab-page input,
.image-lab-page select,
.image-lab-page textarea {
  font: inherit;
}

.image-lab-page button,
.image-lab-page select,
.image-lab-page input,
.image-lab-page textarea,
.image-upload-primary {
  outline-color: var(--image-coral);
}

.image-lab-app {
  min-height: 100vh;
}

.image-lab-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(34px, 6vw, 76px) clamp(18px, 5vw, 72px) 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--image-line);
  background:
    radial-gradient(circle at 88% 12%, rgba(243, 161, 141, 0.32), transparent 27%),
    radial-gradient(circle at 72% 86%, rgba(174, 221, 214, 0.38), transparent 30%),
    linear-gradient(135deg, #fffdfb, #fff7f0 52%, #f2f8f4);
}

.image-kicker,
.image-card-kicker,
.image-panel-intro > span,
.image-stage-toolbar > div:first-child > span {
  color: #158a84;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.image-hero-copy h1 {
  margin: 14px 0 18px;
  font-family: "Aptos Display", "Malgun Gothic", "Trebuchet MS", sans-serif;
  font-size: clamp(40px, 6.2vw, 82px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.075em;
}

.image-hero-copy h1 em {
  color: var(--image-coral);
  font-style: normal;
  font-weight: 850;
}

.image-hero-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--image-muted);
  font-size: 14px;
  line-height: 1.7;
}

.image-hero-actions {
  display: grid;
  min-width: min(100%, 250px);
  gap: 10px;
}

.image-local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font: 700 10px/1 "Courier New", monospace;
  letter-spacing: 0.08em;
}

.image-local-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--image-mint);
  box-shadow: 0 0 0 5px rgba(87, 198, 191, 0.18);
}

.image-upload-primary,
.image-hero-actions button {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--image-ink);
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.image-upload-primary {
  position: relative;
  overflow: hidden;
  background: var(--image-ink);
  color: white;
}

.image-upload-primary input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-hero-actions button {
  background: transparent;
  color: var(--image-ink);
}

.image-command-bar {
  display: flex;
  min-height: 66px;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(12px, 3vw, 42px);
  border-bottom: 1px solid var(--image-line);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(12px);
}

.image-mode-tabs,
.image-history-actions {
  display: flex;
  align-items: stretch;
}

.image-mode-tabs button,
.image-history-actions button {
  border: 0;
  background: transparent;
  color: var(--image-muted);
  cursor: pointer;
}

.image-mode-tabs button {
  position: relative;
  min-width: 150px;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 800;
}

.image-mode-tabs button::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 4px;
  transform: scaleX(0);
  background: var(--image-coral);
  content: "";
}

.image-mode-tabs button.is-active {
  color: var(--image-ink);
}

.image-mode-tabs button.is-active::after {
  transform: scaleX(1);
}

.image-mode-tabs button span {
  margin-right: 7px;
  color: #158a84;
  font: 700 10px/1 "Courier New", monospace;
}

.image-history-actions {
  gap: 4px;
  align-items: center;
}

.image-history-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 11px;
}

.image-history-actions button:hover:not(:disabled) {
  border-color: var(--image-line);
  color: var(--image-ink);
}

.image-history-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.image-workspace {
  display: grid;
  grid-template-columns: 310px minmax(460px, 1fr) 270px;
  align-items: start;
  gap: 14px;
  padding: 14px;
}

.image-controls,
.image-stage-card,
.image-report-card,
.image-export-card,
.image-system-card {
  border: 1px solid var(--image-line);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 18px 42px rgba(16, 45, 50, 0.07);
}

.image-controls {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.image-mode-panel {
  padding: 18px;
}

.image-panel-intro {
  margin: -18px -18px 18px;
  padding: 24px 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.58), transparent 38%),
    linear-gradient(145deg, #c7e7e1, #dceeed 56%, #f5dfd8);
  color: #385d62;
}

.image-panel-intro h2 {
  margin: 10px 0;
  font-family: "Aptos Display", "Malgun Gothic", "Trebuchet MS", sans-serif;
  font-size: 30px;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.image-panel-intro p {
  margin: 0;
  color: rgba(56, 93, 98, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.image-panel-intro.compact {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.58), transparent 42%),
    linear-gradient(145deg, #c9e5f0, #d8eee8 58%, #f6dfd7);
}

.image-drop-zone {
  display: grid;
  min-height: 82px;
  place-content: center;
  gap: 5px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px dashed rgba(16, 45, 50, 0.35);
  background: var(--image-paper);
  cursor: pointer;
  text-align: center;
}

.image-drop-zone.is-dragging {
  border-color: var(--image-coral);
  background: rgba(240, 100, 73, 0.08);
}

.image-drop-zone strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-drop-zone span {
  color: var(--image-muted);
  font-size: 10px;
}

.image-diagnosis-card {
  margin-bottom: 18px;
  padding: 12px;
  border-left: 4px solid var(--image-mint);
  background: #edf8f5;
}

.image-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
}

.image-section-head span {
  color: var(--image-muted);
  font: 700 10px/1 "Courier New", monospace;
}

.image-diagnosis-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.image-diagnosis-list span {
  padding: 5px 7px;
  border: 1px solid rgba(16, 45, 50, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--image-ink-2);
  font-size: 10px;
}

.image-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.image-preset-grid button {
  position: relative;
  display: grid;
  min-height: 90px;
  align-content: end;
  gap: 3px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--image-line);
  border-radius: 3px;
  background:
    linear-gradient(150deg, transparent, rgba(174, 221, 214, 0.32)),
    var(--image-white);
  color: var(--image-ink);
  cursor: pointer;
  text-align: left;
}

.image-preset-grid button:nth-child(3n + 2) {
  background:
    linear-gradient(150deg, transparent, rgba(243, 161, 141, 0.28)),
    var(--image-white);
}

.image-preset-grid button b {
  position: absolute;
  top: 8px;
  right: 9px;
  color: rgba(16, 45, 50, 0.28);
  font: 700 10px/1 "Courier New", monospace;
}

.image-preset-grid button strong {
  font-size: 12px;
}

.image-preset-grid button small {
  color: var(--image-muted);
  font-size: 9px;
  line-height: 1.3;
}

.image-preset-grid button.is-active {
  border-color: var(--image-coral);
  box-shadow: inset 0 0 0 1px var(--image-coral);
}

.image-strength-control {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.image-strength-control > span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.image-strength-control output {
  color: var(--image-coral);
  font-family: "Courier New", monospace;
  font-weight: 800;
}

.image-strength-control input,
.image-slider-stack input[type="range"],
.image-export-card input[type="range"] {
  width: 100%;
  accent-color: var(--image-coral);
}

.image-strength-control small {
  color: var(--image-muted);
  font-size: 10px;
}

.image-auto-button,
.image-download-button {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 3px;
  background: var(--image-coral);
  color: #38575c;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 5px 5px 0 #b9dcd7;
}

.image-auto-button:active,
.image-download-button:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #b9dcd7;
}

.image-control-group {
  margin-bottom: 9px;
  border: 1px solid var(--image-line);
  background: var(--image-white);
}

.image-control-group summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.image-control-group summary::-webkit-details-marker {
  display: none;
}

.image-control-group summary span {
  color: #158a84;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: 0.12em;
}

.image-slider-stack,
.image-form-stack {
  display: grid;
  gap: 13px;
  padding: 4px 12px 14px;
}

.image-slider-stack label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  color: var(--image-muted);
  font-size: 10px;
}

.image-slider-stack output {
  color: var(--image-ink);
  font: 700 10px/1 "Courier New", monospace;
}

.image-slider-stack input {
  grid-column: 1 / -1;
}

.image-ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px 12px 12px;
}

.image-ratio-grid button,
.image-inline-actions button {
  min-height: 32px;
  border: 1px solid var(--image-line);
  border-radius: 2px;
  background: white;
  color: var(--image-ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.image-ratio-grid button.is-active {
  border-color: var(--image-coral);
  background: rgba(240, 100, 73, 0.08);
  color: var(--image-coral);
}

.image-inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 12px 14px;
}

.image-inline-actions label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--image-muted);
  font-size: 9px;
}

.image-inline-actions input[type="color"] {
  width: 34px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--image-line);
  background: white;
}

.image-form-stack label:not(.image-check) {
  display: grid;
  gap: 5px;
  color: var(--image-muted);
  font-size: 10px;
}

.image-form-stack textarea,
.image-form-stack select {
  width: 100%;
  border: 1px solid var(--image-line);
  border-radius: 2px;
  background: white;
  color: var(--image-ink);
  padding: 8px;
}

.image-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.image-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
}

.image-license-note {
  margin: 0;
  color: var(--image-muted);
  font-size: 9px;
  line-height: 1.45;
}

.image-lesson {
  position: relative;
  margin-bottom: 9px;
  padding: 14px 13px 14px 45px;
  border: 1px solid var(--image-line);
  background: var(--image-white);
}

.image-lesson b {
  position: absolute;
  top: 16px;
  left: 12px;
  color: var(--image-coral);
  font: 800 10px/1 "Courier New", monospace;
}

.image-lesson h3 {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: 15px;
}

.image-lesson p,
.image-learn-warning p {
  margin: 0;
  color: var(--image-muted);
  font-size: 10px;
  line-height: 1.55;
}

.image-learn-warning {
  padding: 14px;
  border-left: 4px solid var(--image-yellow);
  background: #fff4d5;
}

.image-learn-warning strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.image-stage-card {
  position: sticky;
  top: 14px;
  overflow: hidden;
}

.image-stage-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--image-line);
}

.image-stage-toolbar > div:first-child {
  display: grid;
  gap: 4px;
}

.image-stage-toolbar strong {
  font-size: 12px;
}

.image-view-buttons {
  display: flex;
  gap: 4px;
}

.image-view-buttons button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid var(--image-line);
  border-radius: 2px;
  background: white;
  color: var(--image-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.image-view-buttons button.is-active {
  border-color: var(--image-ink);
  background: var(--image-ink);
  color: white;
}

.image-canvas-stage {
  position: relative;
  display: grid;
  min-height: 590px;
  place-items: center;
  overflow: hidden;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,0.68), transparent 24%),
    linear-gradient(150deg, #d8ece8, #dcecf2 56%, #f5e5df);
}

.image-stage-grid {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(73,107,112,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73,107,112,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

#image-output-canvas {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  max-height: 70vh;
  background: var(--image-paper);
  box-shadow: 0 24px 70px rgba(73, 107, 112, 0.2);
}

.image-empty-state {
  position: absolute;
  z-index: 3;
  display: grid;
  max-width: 360px;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  color: rgba(73, 107, 112, 0.66);
  text-align: center;
  pointer-events: none;
}

.image-empty-state span {
  color: #5b9d99;
  font: 800 10px/1 "Courier New", monospace;
  letter-spacing: 0.18em;
}

.image-empty-state strong {
  color: #3f666b;
  font-family: "Aptos Display", "Malgun Gothic", "Trebuchet MS", sans-serif;
  font-size: 26px;
  font-weight: 850;
}

.image-empty-state p {
  margin: 0;
  font-size: 11px;
}

.image-rendering-badge {
  position: absolute;
  z-index: 5;
  right: 15px;
  bottom: 15px;
  padding: 7px 9px;
  background: var(--image-yellow);
  color: var(--image-ink);
  font: 800 10px/1 "Courier New", monospace;
}

.image-split-control {
  position: absolute;
  z-index: 5;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(16, 45, 50, 0.9);
  color: white;
  font-size: 10px;
}

.image-split-control input {
  flex: 1;
  accent-color: var(--image-coral);
}

.image-stage-footer {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-top: 1px solid var(--image-line);
  color: var(--image-muted);
  font-size: 9px;
}

.image-output-panel {
  display: grid;
  gap: 12px;
}

.image-report-card,
.image-export-card {
  padding: 16px;
}

.image-report-card h2,
.image-export-card h2 {
  margin: 7px 0 13px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 500;
}

.image-score-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
  border: 1px solid var(--image-line);
}

.image-score-pair > div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.image-score-pair > div + div {
  border-left: 1px solid var(--image-line);
}

.image-score-pair .is-after {
  background: linear-gradient(145deg, var(--image-mint), var(--image-sky));
  color: #385b60;
}

.image-score-pair span {
  color: var(--image-muted);
  font-size: 9px;
}

.image-score-pair .is-after span {
  color: rgba(56, 91, 96, 0.68);
}

.image-score-pair strong {
  font: 800 24px/1 "Courier New", monospace;
}

#image-histogram {
  display: block;
  width: 100%;
  height: 76px;
  margin-bottom: 12px;
  border: 1px solid var(--image-line);
  background: var(--image-paper);
}

.image-metric-list {
  margin: 0;
}

.image-metric-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--image-line);
  font-size: 10px;
}

.image-metric-list dt {
  color: var(--image-muted);
}

.image-metric-list dd {
  margin: 0;
  font-family: "Courier New", monospace;
  font-weight: 800;
}

.image-report-card > p {
  margin: 12px 0 0;
  color: var(--image-muted);
  font-size: 9px;
  line-height: 1.5;
}

.image-export-card > label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--image-muted);
  font-size: 10px;
}

.image-export-card select {
  min-width: 130px;
  min-height: 34px;
  border: 1px solid var(--image-line);
  background: white;
  color: var(--image-ink);
  padding: 0 6px;
}

.image-export-card input[type="range"] {
  grid-column: 1 / -1;
}

.image-export-summary {
  margin-top: 13px;
  padding: 10px;
  background: var(--image-paper);
  color: var(--image-ink-2);
  font-size: 10px;
  line-height: 1.5;
}

.image-download-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.image-export-card > small {
  display: block;
  margin-top: 10px;
  color: var(--image-muted);
  font-size: 9px;
  text-align: center;
}

.image-system-card {
  display: grid;
  padding: 8px 14px;
}

.image-system-card > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--image-line);
}

.image-system-card > div:last-child {
  border-bottom: 0;
}

.image-system-card i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--image-yellow);
}

.image-system-card i.is-online {
  background: var(--image-mint);
  box-shadow: 0 0 0 4px rgba(87, 198, 191, 0.15);
}

.image-system-card span {
  display: grid;
  gap: 2px;
}

.image-system-card strong {
  font-size: 10px;
}

.image-system-card small {
  color: var(--image-muted);
  font-size: 8px;
}

.image-lab-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  padding: 36px 20px 52px;
  color: var(--image-muted);
  font-size: 10px;
}

.image-lab-footer > span:first-child {
  color: #158a84;
  font: 800 10px/1 "Courier New", monospace;
  letter-spacing: 0.08em;
}

.image-lab-footer a {
  color: var(--image-ink);
  text-underline-offset: 3px;
}

@media (max-width: 1260px) {
  .image-workspace {
    grid-template-columns: 300px minmax(430px, 1fr);
  }

  .image-output-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .image-lab-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .image-hero-actions {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .image-local-badge {
    grid-column: 1 / -1;
  }

  .image-command-bar {
    display: block;
    padding: 0;
  }

  .image-mode-tabs button {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
  }

  .image-mode-tabs {
    min-height: 58px;
  }

  .image-history-actions {
    justify-content: center;
    padding: 6px;
    border-top: 1px solid var(--image-line);
  }

  .image-workspace {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .image-stage-card {
    position: static;
    order: 1;
  }

  .image-controls {
    max-height: none;
    order: 2;
  }

  .image-output-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
    order: 3;
  }

  .image-canvas-stage {
    min-height: 430px;
  }
}

@media (max-width: 500px) {
  .image-lab-hero {
    padding-top: 36px;
  }

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

  .image-local-badge {
    grid-column: auto;
  }

  .image-mode-tabs button span {
    display: none;
  }

  .image-stage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .image-view-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .image-canvas-stage {
    min-height: 330px;
    padding: 10px;
  }

  .image-stage-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Audio Studio visual alignment */
:root {
  --image-ink: #092f43;
  --image-ink-2: #315d6c;
  --image-paper: #f3f9fc;
  --image-paper-2: #e8f3f7;
  --image-coral: #0b93a3;
  --image-mint: #bfe5e5;
  --image-yellow: #e9aa3d;
  --image-sky: #d7edf6;
  --image-white: #ffffff;
  --image-line: #cfe2ea;
  --image-muted: #657e89;
  --image-danger: #bf6558;
}

.image-lab-page {
  background:
    radial-gradient(circle at 8% 4%, rgba(111, 196, 214, 0.15), transparent 24rem),
    linear-gradient(180deg, #f8fcfe 0%, #edf6fa 52%, #f8fbfc 100%);
  color: var(--image-ink);
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.image-lab-page button,
.image-lab-page input,
.image-lab-page select,
.image-lab-page textarea {
  font-family: inherit;
}

.image-lab-app {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 clamp(10px, 2vw, 24px);
}

.image-lab-hero {
  align-items: center;
  margin: 20px 0 14px;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--image-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(10, 147, 163, 0.12), transparent 26%),
    radial-gradient(circle at 70% 92%, rgba(233, 170, 61, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff, #f0f8fa 64%, #f8f3e7);
  box-shadow: 0 14px 38px rgba(9, 47, 67, 0.07);
}

.image-kicker,
.image-card-kicker,
.image-panel-intro > span,
.image-stage-toolbar > div:first-child > span {
  color: #078c9b;
  font-family: "Courier New", monospace;
  font-weight: 800;
}

.image-hero-copy h1 {
  max-width: 760px;
  margin: 12px 0 15px;
  color: var(--image-ink);
  font-family: inherit;
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.image-hero-copy h1 em {
  color: #078c9b;
  font-family: inherit;
  font-style: normal;
  font-weight: 800;
}

.image-hero-copy p {
  color: #607986;
  font-size: 14px;
}

.image-local-badge {
  color: #35616e;
}

.image-local-badge i {
  background: #11a4a8;
  box-shadow: 0 0 0 5px rgba(17, 164, 168, 0.13);
}

.image-upload-primary,
.image-hero-actions button {
  min-height: 46px;
  border: 1px solid #b9d8e4;
  border-radius: 12px;
  font-size: 13px;
}

.image-upload-primary {
  border-color: #0a7383;
  background: linear-gradient(135deg, #0a7181, #0a94a3);
  color: white;
  box-shadow: 0 8px 20px rgba(10, 113, 129, 0.16);
}

.image-hero-actions button {
  background: #ffffff;
  color: var(--image-ink);
}

.image-command-bar {
  min-height: 62px;
  margin-bottom: 14px;
  padding: 0 16px;
  overflow: hidden;
  border: 1px solid var(--image-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(9, 47, 67, 0.05);
}

.image-mode-tabs button {
  min-width: 140px;
  color: #6b828d;
  font-size: 13px;
  font-weight: 750;
}

.image-mode-tabs button::after {
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #0b93a3;
}

.image-mode-tabs button.is-active {
  color: #08364a;
}

.image-mode-tabs button span,
.image-section-head span {
  color: #0b93a3;
}

.image-history-actions button {
  border-radius: 9px;
}

.image-history-actions button:hover:not(:disabled) {
  border-color: #b8d8e4;
  background: #edf7fa;
}

.image-workspace {
  gap: 16px;
  padding: 0;
}

.image-controls,
.image-stage-card,
.image-report-card,
.image-export-card,
.image-system-card {
  overflow: hidden;
  border: 1px solid var(--image-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(9, 47, 67, 0.065);
}

.image-controls {
  overflow-x: hidden;
  overflow-y: auto;
}

.image-panel-intro,
.image-panel-intro.compact {
  margin: -18px -18px 18px;
  padding: 24px 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(63, 183, 193, 0.2), transparent 44%),
    linear-gradient(145deg, #0a3541, #0e505a);
  color: white;
}

.image-panel-intro h2 {
  color: white;
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.image-panel-intro p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.image-drop-zone {
  border-color: #a9ceda;
  border-radius: 12px;
  background: #f2f9fb;
}

.image-drop-zone.is-dragging {
  border-color: #0b93a3;
  background: #e4f5f6;
}

.image-diagnosis-card {
  border-left: 4px solid #0b93a3;
  border-radius: 5px 12px 12px 5px;
  background: #eaf6f7;
}

.image-diagnosis-list span {
  border-color: #c8e2e7;
  background: white;
  color: #315e69;
}

.image-preset-grid button,
.image-preset-grid button:nth-child(3n + 2) {
  border-color: #d3e4ea;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(11, 147, 163, 0.1), transparent 48%),
    linear-gradient(145deg, #ffffff, #f4fafb);
}

.image-preset-grid button:hover {
  border-color: #87bfcb;
  background: #edf8fa;
}

.image-preset-grid button.is-active {
  border-color: #0b93a3;
  background: linear-gradient(145deg, #e8f7f8, #ffffff);
  box-shadow: inset 0 0 0 1px #0b93a3;
}

.image-preset-grid button b {
  color: #5aaab2;
}

.image-strength-control input,
.image-slider-stack input[type="range"],
.image-export-card input[type="range"] {
  accent-color: #0b93a3;
}

.image-strength-control output {
  color: #078b99;
}

.image-auto-button,
.image-download-button {
  min-height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0a7383, #0b9aa7);
  color: white;
  box-shadow: 0 10px 24px rgba(10, 115, 131, 0.2);
}

.image-auto-button:active,
.image-download-button:active {
  transform: translateY(1px);
  box-shadow: 0 5px 14px rgba(10, 115, 131, 0.18);
}

.image-control-group {
  overflow: hidden;
  border-color: #d4e5eb;
  border-radius: 12px;
  background: white;
}

.image-control-group summary {
  background: #f7fbfc;
  font-size: 12px;
}

.image-control-group summary span {
  color: #0b93a3;
}

.image-ratio-grid button,
.image-inline-actions button,
.image-form-stack textarea,
.image-form-stack select,
.image-export-card select {
  border-color: #cbdfe7;
  border-radius: 8px;
}

.image-ratio-grid button.is-active {
  border-color: #0b93a3;
  background: #e8f6f7;
  color: #087e8c;
}

.image-form-stack textarea:focus,
.image-form-stack select:focus,
.image-export-card select:focus {
  border-color: #0b93a3;
  box-shadow: 0 0 0 3px rgba(11, 147, 163, 0.11);
}

.image-lesson {
  border-color: #d2e4ea;
  border-radius: 12px;
  background: #f9fcfd;
}

.image-lesson b {
  color: #0b93a3;
}

.image-lesson h3 {
  color: var(--image-ink);
  font-family: inherit;
  font-weight: 800;
}

.image-learn-warning {
  border-left-color: #e9aa3d;
  border-radius: 5px 12px 12px 5px;
  background: #fff7e7;
}

.image-stage-card {
  top: 14px;
}

.image-stage-toolbar {
  min-height: 62px;
  background: #ffffff;
}

.image-view-buttons button {
  border-color: #c8dde5;
  border-radius: 9px;
  background: #f8fbfc;
}

.image-view-buttons button.is-active {
  border-color: #0a4655;
  background: #0a4655;
  color: white;
}

.image-canvas-stage {
  min-height: 590px;
  background:
    radial-gradient(circle at 16% 8%, rgba(62, 178, 190, 0.18), transparent 27%),
    linear-gradient(145deg, #113f48, #0c313a 68%, #164f58);
}

.image-stage-grid {
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.065) 1px, transparent 1px);
}

#image-output-canvas {
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(2, 25, 31, 0.38);
}

.image-empty-state {
  color: rgba(255, 255, 255, 0.58);
}

.image-empty-state span {
  color: #62ccd1;
}

.image-empty-state strong {
  color: white;
  font-family: inherit;
  font-weight: 800;
}

.image-rendering-badge {
  border-radius: 8px;
  background: #e9aa3d;
  color: #153c44;
}

.image-split-control {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(7, 45, 54, 0.9);
}

.image-stage-footer {
  background: #f7fbfc;
}

.image-report-card h2,
.image-export-card h2 {
  color: var(--image-ink);
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.image-score-pair {
  overflow: hidden;
  border-color: #cfe2e9;
  border-radius: 12px;
}

.image-score-pair .is-after {
  background: linear-gradient(145deg, #0a4655, #0b7180);
  color: white;
}

.image-score-pair .is-after span {
  color: rgba(255, 255, 255, 0.66);
}

#image-histogram {
  border-color: #cfe2e9;
  border-radius: 10px;
  background: #edf6f8;
}

.image-export-summary {
  border-radius: 10px;
  background: #edf6f8;
}

.image-system-card i.is-online {
  background: #15a2a6;
  box-shadow: 0 0 0 4px rgba(21, 162, 166, 0.13);
}

.image-lab-footer {
  color: #6b818a;
}

.image-lab-footer > span:first-child {
  color: #078c9b;
}

@media (max-width: 860px) {
  .image-lab-app {
    padding: 0 8px;
  }

  .image-lab-hero {
    margin-top: 10px;
    border-radius: 16px;
  }

  .image-command-bar {
    border-radius: 14px;
  }

  .image-workspace {
    padding: 0;
  }
}

.image-empty-state[hidden] { display: none !important; }

.image-empty-close {
  position: absolute;
  top: -4px;
  right: 4px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(8, 49, 58, 0.74);
  color: white;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  pointer-events: auto;
}

.image-empty-close:hover { background: #0b93a3; }

.image-convert-intro {
  background: radial-gradient(circle at 100% 0, rgba(233, 170, 61, 0.24), transparent 44%), linear-gradient(145deg, #0a3541, #0c5b65) !important;
}

.image-convert-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 18px;
}

.image-convert-route > div {
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  border: 1px solid #cfe2e9;
  border-radius: 11px;
  background: #f4fafb;
}

.image-convert-route > div.is-output { border-color: #8fc8d0; background: #e9f7f8; }
.image-convert-route span { color: var(--image-muted); font-size: 9px; }
.image-convert-route strong { font: 800 12px/1.2 "Courier New", monospace; }
.image-convert-route > i { align-self: center; color: #0b93a3; font-style: normal; font-weight: 900; }

.image-convert-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 16px;
}

.image-convert-preset-grid button {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #d1e3e9;
  border-radius: 11px;
  background: #f8fcfd;
  color: var(--image-ink);
  cursor: pointer;
  text-align: left;
}

.image-convert-preset-grid button:hover,
.image-convert-preset-grid button.is-active { border-color: #0b93a3; background: #eaf7f8; }
.image-convert-preset-grid strong { font: 800 11px/1.2 "Courier New", monospace; }
.image-convert-preset-grid small { color: var(--image-muted); font-size: 9px; }

.image-convert-dimensions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
  margin-bottom: 18px;
  padding: 13px;
  border-radius: 12px;
  background: #edf6f8;
}

.image-convert-dimensions label { display: grid; gap: 5px; color: var(--image-muted); font-size: 9px; }
.image-convert-dimensions input { width: 100%; min-height: 38px; border: 1px solid #bdd9e2; border-radius: 8px; background: white; color: var(--image-ink); padding: 0 8px; font-family: "Courier New", monospace; font-weight: 800; }
.image-convert-dimensions > span { padding-bottom: 11px; color: #0b93a3; font-weight: 900; }

.image-convert-fit-grid { display: grid; gap: 7px; margin-bottom: 14px; }
.image-convert-fit-grid button { display: grid; gap: 4px; min-height: 62px; padding: 11px 12px; border: 1px solid #d1e3e9; border-radius: 11px; background: white; color: var(--image-ink); cursor: pointer; text-align: left; }
.image-convert-fit-grid button.is-active { border-color: #0b93a3; background: #e9f7f8; box-shadow: inset 0 0 0 1px #0b93a3; }
.image-convert-fit-grid strong { font-size: 11px; }
.image-convert-fit-grid small { color: var(--image-muted); font-size: 9px; }

.image-convert-options { display: grid; gap: 9px; margin-bottom: 13px; }
.image-convert-options label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; color: var(--image-muted); font-size: 10px; }
.image-convert-options input[type="color"] { width: 42px; height: 34px; padding: 2px; border: 1px solid #c9dfe7; border-radius: 8px; background: white; }
.image-convert-options select { width: 180px; min-height: 36px; border: 1px solid #c9dfe7; border-radius: 8px; background: white; color: var(--image-ink); padding: 0 7px; font-size: 10px; }

.image-convert-notice { padding: 12px; border-left: 4px solid #e9aa3d; border-radius: 5px 11px 11px 5px; background: #fff7e8; }
.image-convert-notice strong { display: block; margin-bottom: 5px; font-size: 10px; }
.image-convert-notice p { margin: 0; color: #6f776f; font-size: 9px; line-height: 1.55; }

.image-convert-download { width: 100%; min-height: 42px; margin-top: 9px; border: 1px solid #9fcbd4; border-radius: 11px; background: white; color: #087d8b; cursor: pointer; font-weight: 800; }
.image-convert-download:hover { background: #eaf7f8; }

@media (max-width: 620px) {
  .image-mode-tabs { display: grid; width: 100%; grid-template-columns: repeat(4, 1fr); }
  .image-mode-tabs button { min-width: 0; padding: 0 4px; font-size: 11px; }
}

.image-source-dock {
  display: grid;
  grid-template-columns: 96px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid var(--image-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(9, 47, 67, 0.05);
}

#image-source-thumb {
  display: block;
  width: 96px;
  height: 66px;
  border: 1px solid #cfe2e9;
  border-radius: 10px;
  background: #e9f4f7;
  object-fit: contain;
}

.image-source-copy { display: grid; min-width: 0; gap: 4px; }
.image-source-copy > span { color: #0b93a3; font: 800 9px/1 "Courier New", monospace; letter-spacing: 0.12em; }
.image-source-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.image-source-copy small { color: var(--image-muted); font-size: 10px; }

.image-source-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.image-source-actions label,
.image-source-actions button {
  display: grid;
  min-height: 36px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid #bdd8e2;
  border-radius: 9px;
  background: #f8fcfd;
  color: var(--image-ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.image-source-actions label { border-color: #0b93a3; background: #e9f7f8; color: #087d8b; }
.image-source-actions .is-danger { color: #a65349; }
.image-source-actions button:disabled { opacity: 0.38; cursor: not-allowed; }

.image-queue-nav { display: flex; align-items: center; gap: 5px; }
.image-queue-nav button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #c5dce5; border-radius: 50%; background: white; color: #087d8b; cursor: pointer; font-size: 20px; }
.image-queue-nav span { min-width: 44px; font: 800 10px/1 "Courier New", monospace; text-align: center; }

.image-mode-source-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  padding: 11px;
  border: 1px solid #cfe2e9;
  border-radius: 11px;
  background: #f1f8fa;
}
.image-mode-source-entry > div { display: grid; min-width: 0; gap: 4px; }
.image-mode-source-entry span { color: #0b93a3; font: 800 9px/1 "Courier New", monospace; }
.image-mode-source-entry strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.image-mode-source-entry label { padding: 8px 9px; border-radius: 8px; background: #0b7f8d; color: white; cursor: pointer; font-size: 9px; font-weight: 800; }

.image-quick-tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 13px; }
.image-quick-tool-grid button { display: grid; min-height: 58px; place-content: center; gap: 4px; border: 1px solid #d1e3e9; border-radius: 10px; background: white; color: var(--image-ink); cursor: pointer; }
.image-quick-tool-grid button:hover,
.image-quick-tool-grid button.is-active { border-color: #0b93a3; background: #eaf7f8; }
.image-quick-tool-grid strong { color: #087e8c; font-size: 15px; }
.image-quick-tool-grid small { font-size: 8px; }

.image-convert-size-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: -9px 0 18px; }
.image-convert-size-actions button,
.image-convert-size-actions label { display: flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; border: 1px solid #c9dfe7; border-radius: 9px; background: white; color: var(--image-ink); cursor: pointer; font-size: 9px; font-weight: 800; }
.image-convert-size-actions input { accent-color: #0b93a3; }

.image-convert-quality { grid-template-columns: 1fr auto !important; }
.image-convert-quality input { grid-column: 1 / -1; width: 100%; accent-color: #0b93a3; }
.image-convert-options input[type="number"] { width: 180px; min-height: 36px; border: 1px solid #c9dfe7; border-radius: 8px; background: white; color: var(--image-ink); padding: 0 8px; }

.image-batch-download { width: 100%; min-height: 43px; margin-top: 8px; border: 1px solid #e0bd74; border-radius: 11px; background: #fff7e6; color: #785713; cursor: pointer; font-weight: 800; }
.image-batch-download:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 900px) {
  .image-source-dock { grid-template-columns: 78px 1fr; }
  #image-source-thumb { width: 78px; height: 58px; }
  .image-queue-nav { grid-column: 1 / 2; justify-content: center; }
  .image-source-actions { grid-column: 2 / 3; justify-content: flex-start; }
}

@media (max-width: 540px) {
  .image-source-dock { grid-template-columns: 64px 1fr; gap: 9px; padding: 9px; }
  #image-source-thumb { width: 64px; height: 54px; }
  .image-source-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .image-source-actions .is-danger { grid-column: 1 / -1; }
  .image-quick-tool-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 2026 large-format Image Lab shell — aligned with the Audio Studio scale. */
.image-lab-page {
  --image-shell: min(1220px, calc(100% - 48px));
  min-width: 320px;
  background:
    radial-gradient(circle at 86% 8%, rgba(105, 194, 220, 0.16), transparent 31rem),
    radial-gradient(circle at 9% 24%, rgba(161, 221, 205, 0.16), transparent 26rem),
    linear-gradient(180deg, #f8fcff 0, #eef7fb 44rem, #f7fbfd 100%);
}

.image-lab-app {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.image-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-site-header {
  display: flex;
  width: var(--image-shell);
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
  color: #143b4d;
}

.image-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.image-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
}

.image-brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.image-brand > span:last-child {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.image-brand strong {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.image-brand em {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 6px;
  border: 1px solid #b9dbe7;
  border-radius: 6px;
  color: #456c7a;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.12em;
  vertical-align: 2px;
}

.image-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-header-nav .nav-link {
  margin-right: 5px;
  color: #557583;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.image-header-nav .nav-link:hover {
  color: #0c4a61;
}

.image-header-nav .support-button,
.image-header-nav .theme-button,
.image-header-nav .share-button,
.image-header-nav .language-control select {
  min-height: 42px;
  border: 1px solid #b9dbe7;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  color: #163e50;
  font: inherit;
}

.image-header-nav .support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 15px;
  background: linear-gradient(135deg, #ffe9ee, #edf9ff);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.image-header-nav .support-button > span { color: #d97088; }

.image-header-nav .language-control {
  display: inline-flex;
}

.image-header-nav .language-control select {
  max-width: 100px;
  padding: 0 28px 0 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.image-header-nav .theme-button,
.image-header-nav .share-button {
  cursor: pointer;
}

.image-header-nav .theme-button {
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
}

.image-header-nav .theme-button > span { font-size: 16px; }
.image-header-nav .theme-button b { font-size: 11px; }
.image-header-nav .share-button { padding: 0 15px; font-size: 11px; }

.image-header-nav .support-button:hover,
.image-header-nav .theme-button:hover,
.image-header-nav .share-button:hover,
.image-header-nav .language-control select:hover {
  border-color: #83c5db;
  background-color: #fff;
}

.image-site-header a:focus-visible,
.image-site-header button:focus-visible,
.image-site-header select:focus-visible {
  outline: 3px solid #2a8fb9;
  outline-offset: 3px;
}

.image-lab-hero {
  position: relative;
  display: grid;
  width: var(--image-shell);
  min-height: 610px;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  align-items: center;
  gap: clamp(38px, 6vw, 82px);
  margin: 0 auto;
  padding: 54px 0 72px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.image-lab-hero::before {
  position: absolute;
  z-index: -1;
  top: -84px;
  right: calc(50% - 50vw);
  left: calc(50% - 50vw);
  height: 694px;
  background:
    radial-gradient(circle at 82% 40%, rgba(90, 183, 217, 0.26), transparent 27%),
    radial-gradient(circle at 12% 66%, rgba(169, 225, 208, 0.26), transparent 25%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.94), rgba(238, 248, 252, 0.82) 76%, transparent);
  content: "";
}

.image-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 660px;
}

.image-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4a8399;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.image-kicker::before {
  width: 26px;
  height: 1px;
  background: #4eb4c2;
  content: "";
}

.image-hero-copy h1 {
  max-width: 680px;
  margin: 21px 0 22px;
  color: #153a4c;
  font-size: clamp(52px, 5.7vw, 78px);
  font-weight: 880;
  line-height: 1.06;
  letter-spacing: -0.072em;
}

.image-hero-copy h1 em {
  color: #2da5bd;
  background: linear-gradient(90deg, #2199b2, #56bcbd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.image-hero-copy > p {
  max-width: 630px;
  margin: 0;
  color: #5d7988;
  font-size: 15px;
  line-height: 1.85;
  word-break: keep-all;
}

.image-hero-actions {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 10px;
  margin-top: 31px;
}

.image-upload-primary,
.image-hero-actions button {
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 0 19px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.25;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.image-upload-primary {
  border-color: #123e51;
  background: linear-gradient(135deg, #143e51, #0d5969);
  box-shadow: 0 14px 30px rgba(18, 62, 81, 0.2);
}

.image-hero-actions button {
  border-color: #b6d8e5;
  background: rgba(255, 255, 255, 0.82);
  color: #194659;
  box-shadow: 0 8px 22px rgba(31, 88, 110, 0.07);
}

.image-upload-primary:hover,
.image-hero-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(18, 62, 81, 0.17);
}

.image-upload-primary > span,
.image-hero-actions button > span {
  font-size: 13px;
  font-weight: 850;
}

.image-upload-primary > small,
.image-hero-actions button > small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 8px;
  font-weight: 650;
}

.image-hero-actions button > small { color: #76909b; }

.image-hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid rgba(169, 207, 219, 0.9);
  border-radius: 12px;
  background: rgba(169, 207, 219, 0.9);
}

.image-hero-proof > span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  min-width: 0;
  padding: 12px 13px;
  background: rgba(250, 253, 255, 0.94);
}

.image-hero-proof b {
  grid-row: 1 / 3;
  align-self: center;
  color: #4baab1;
  font: 850 8px/1 "SFMono-Regular", Consolas, monospace;
}

.image-hero-proof strong {
  overflow: hidden;
  color: #284f5f;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-hero-proof small {
  color: #75909b;
  font-size: 8px;
  line-height: 1.2;
}

.image-hero-visual {
  position: relative;
  min-height: 490px;
  perspective: 1100px;
}

.image-hero-frame {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(182, 220, 229, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.87);
  box-shadow: 0 32px 75px rgba(33, 92, 116, 0.18);
}

.image-hero-frame--back {
  top: 55px;
  right: 56px;
  width: min(360px, 80%);
  height: 350px;
  transform: rotate(8deg) translateZ(-20px);
  background:
    radial-gradient(circle at 76% 22%, rgba(246, 201, 150, 0.72), transparent 20%),
    linear-gradient(145deg, #cae6e1 0 40%, #8cc7d2 40% 68%, #3c7687 68%);
}

.image-hero-frame--back > span,
.image-hero-frame--front > span {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 18px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(8, 45, 59, 0.72);
  color: rgba(255, 255, 255, 0.84);
  font: 800 8px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.13em;
}

.image-hero-frame--front {
  right: 8px;
  bottom: 30px;
  width: min(390px, 87%);
  height: 390px;
  padding: 14px;
  transform: rotate(-4deg);
}

.image-hero-picture {
  position: relative;
  height: 280px;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 74% 21%, #ffe4aa 0 7%, transparent 7.5%),
    linear-gradient(152deg, transparent 0 52%, rgba(30, 97, 109, 0.46) 52.5% 66%, transparent 66.5%),
    linear-gradient(28deg, #abdcd2 0 42%, #8dc9d7 42% 64%, #cde7ef 64%);
}

.image-hero-picture i {
  position: absolute;
  bottom: -18%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50% 50% 12% 12%;
  background: linear-gradient(145deg, rgba(30, 102, 112, 0.7), rgba(16, 63, 77, 0.86));
}

.image-hero-picture i:nth-child(1) { left: -15%; }
.image-hero-picture i:nth-child(2) { left: 27%; bottom: -28%; width: 55%; }
.image-hero-picture i:nth-child(3) { right: -18%; bottom: -12%; width: 42%; }

.image-hero-adjustments {
  display: grid;
  gap: 8px;
  padding: 17px 8px 4px;
}

.image-hero-adjustments > span {
  display: grid;
  grid-template-columns: 43px 1fr;
  align-items: center;
  gap: 10px;
}

.image-hero-adjustments b {
  height: 5px;
  border-radius: 99px;
  background: #bed8e2;
}

.image-hero-adjustments i {
  position: relative;
  height: 5px;
  border-radius: 99px;
  background: #e0edf1;
}

.image-hero-adjustments i::before {
  display: block;
  width: var(--hero-adjustment, 66%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #56bac0, #58a7ca);
  content: "";
}

.image-hero-adjustments > span:nth-child(2) i::before { --hero-adjustment: 82%; }
.image-hero-adjustments > span:nth-child(3) i::before { --hero-adjustment: 48%; }

.image-hero-chip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 3px;
  min-width: 112px;
  padding: 12px 14px;
  border: 1px solid rgba(173, 214, 224, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(26, 80, 100, 0.14);
  backdrop-filter: blur(10px);
}

.image-hero-chip b {
  color: #20989b;
  font: 900 10px/1 "SFMono-Regular", Consolas, monospace;
}

.image-hero-chip span {
  color: #647f8c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.image-hero-chip--one { top: 34px; left: 0; }
.image-hero-chip--two { right: 0; bottom: 6px; }

.image-command-bar {
  position: relative;
  z-index: 4;
  width: var(--image-shell);
  min-height: 70px;
  margin: 0 auto 14px;
  padding: 0 18px;
  border: 1px solid #c6dfe8;
  border-radius: 17px 17px 0 0;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 14px 35px rgba(23, 76, 97, 0.08);
}

.image-source-dock {
  width: var(--image-shell);
  margin: -15px auto 0;
  border-color: #c6dfe8;
  border-radius: 0 0 17px 17px;
  background: rgba(247, 252, 254, 0.98);
  box-shadow: 0 14px 35px rgba(23, 76, 97, 0.06);
}

.image-workspace {
  width: var(--image-shell);
  grid-template-columns: minmax(300px, 0.82fr) minmax(500px, 1.65fr) minmax(250px, 0.68fr);
  gap: 16px;
  margin: 18px auto clamp(70px, 8vw, 110px);
  padding: 0;
}

.image-controls,
.image-stage-card,
.image-report-card,
.image-export-card,
.image-system-card {
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(20, 72, 92, 0.085);
}

.image-controls {
  max-height: none;
  overflow: visible;
}

.image-panel-intro,
.image-panel-intro.compact {
  padding: 29px 22px 26px;
}

.image-panel-intro h2 {
  font-size: 32px;
  line-height: 1.06;
}

.image-stage-card { top: 18px; }

.image-stage-toolbar {
  min-height: 68px;
  padding: 11px 16px;
}

.image-stage-toolbar strong { font-size: 13px; }
.image-canvas-stage { min-height: 650px; }
.image-output-panel { gap: 14px; }

html[data-theme="dark"] .image-lab-page {
  --image-ink: #e8f6fb;
  --image-ink-2: #bad0d9;
  --image-paper: #0f252f;
  --image-paper-2: #112d38;
  --image-line: #2b4d5a;
  --image-muted: #9bb3be;
  background:
    radial-gradient(circle at 86% 8%, rgba(40, 130, 165, 0.2), transparent 31rem),
    radial-gradient(circle at 9% 24%, rgba(50, 140, 112, 0.13), transparent 26rem),
    linear-gradient(180deg, #07141b 0, #091a22 44rem, #07141b 100%);
  color: var(--image-ink);
}

html[data-theme="dark"] .image-site-header,
html[data-theme="dark"] .image-brand,
html[data-theme="dark"] .image-hero-copy h1 { color: #e9f7fc; }

html[data-theme="dark"] .image-brand em { border-color: #315663; color: #9bc0ce; }
html[data-theme="dark"] .image-header-nav .nav-link { color: #a3bbc5; }

html[data-theme="dark"] .image-header-nav .support-button,
html[data-theme="dark"] .image-header-nav .theme-button,
html[data-theme="dark"] .image-header-nav .share-button,
html[data-theme="dark"] .image-header-nav .language-control select {
  border-color: #2d4e5b;
  background: #102832;
  color: #e8f6fb;
}

html[data-theme="dark"] .image-header-nav .support-button {
  background: linear-gradient(135deg, #39232b, #102d39);
}

html[data-theme="dark"] .image-lab-hero::before {
  background:
    radial-gradient(circle at 82% 40%, rgba(38, 126, 157, 0.27), transparent 29%),
    radial-gradient(circle at 12% 66%, rgba(42, 123, 94, 0.15), transparent 27%),
    linear-gradient(180deg, rgba(8, 24, 32, 0.92), rgba(8, 26, 35, 0.82) 76%, transparent);
}

html[data-theme="dark"] .image-hero-copy > p { color: #a0b8c2; }
html[data-theme="dark"] .image-kicker { color: #8bcce3; }

html[data-theme="dark"] .image-hero-actions button {
  border-color: #31525f;
  background: rgba(16, 40, 50, 0.9);
  color: #e8f6fb;
}

html[data-theme="dark"] .image-hero-actions button > small { color: #8da9b5; }
html[data-theme="dark"] .image-hero-proof { border-color: #294a57; background: #294a57; }
html[data-theme="dark"] .image-hero-proof > span { background: rgba(14, 35, 44, 0.96); }
html[data-theme="dark"] .image-hero-proof strong { color: #dff2f8; }
html[data-theme="dark"] .image-hero-proof small { color: #8eaab5; }
html[data-theme="dark"] .image-hero-frame { border-color: #31525f; background: rgba(14, 34, 43, 0.94); }
html[data-theme="dark"] .image-hero-chip { border-color: #31525f; background: rgba(14, 35, 44, 0.94); }
html[data-theme="dark"] .image-hero-chip span { color: #9bb3be; }
html[data-theme="dark"] .image-hero-adjustments b { background: #365662; }
html[data-theme="dark"] .image-hero-adjustments i { background: #213e49; }

html[data-theme="dark"] .image-command-bar,
html[data-theme="dark"] .image-source-dock,
html[data-theme="dark"] .image-controls,
html[data-theme="dark"] .image-stage-card,
html[data-theme="dark"] .image-report-card,
html[data-theme="dark"] .image-export-card,
html[data-theme="dark"] .image-system-card {
  border-color: #2b4d5a;
  background: rgba(13, 32, 41, 0.97);
  color: #e8f6fb;
}

html[data-theme="dark"] .image-stage-toolbar,
html[data-theme="dark"] .image-stage-footer { background: #102832; }

html[data-theme="dark"] .image-panel-intro,
html[data-theme="dark"] .image-panel-intro.compact {
  background:
    radial-gradient(circle at 100% 0, rgba(69, 169, 176, 0.2), transparent 44%),
    linear-gradient(145deg, #0a303b, #0c4750);
  color: #eff9fc;
}

html[data-theme="dark"] .image-panel-intro h2 { color: #f1fbfe; }
html[data-theme="dark"] .image-panel-intro p { color: #adc2ca; }

html[data-theme="dark"] .image-drop-zone,
html[data-theme="dark"] .image-diagnosis-card,
html[data-theme="dark"] .image-diagnosis-list span,
html[data-theme="dark"] .image-preset-grid button,
html[data-theme="dark"] .image-control-group,
html[data-theme="dark"] .image-lesson,
html[data-theme="dark"] .image-form-stack textarea,
html[data-theme="dark"] .image-form-stack select,
html[data-theme="dark"] .image-ratio-grid button,
html[data-theme="dark"] .image-inline-actions button,
html[data-theme="dark"] .image-mode-source-entry,
html[data-theme="dark"] .image-quick-tool-grid button,
html[data-theme="dark"] .image-convert-route > div,
html[data-theme="dark"] .image-convert-preset-grid button,
html[data-theme="dark"] .image-convert-fit-grid button,
html[data-theme="dark"] .image-convert-options,
html[data-theme="dark"] .image-convert-options input,
html[data-theme="dark"] .image-convert-options select,
html[data-theme="dark"] .image-convert-size-actions button,
html[data-theme="dark"] .image-convert-size-actions label,
html[data-theme="dark"] .image-export-card select,
html[data-theme="dark"] .image-export-summary,
html[data-theme="dark"] #image-histogram {
  border-color: #2b4d5a;
  background: #102832;
  color: #e5f3f8;
}

html[data-theme="dark"] .image-preset-grid button:hover,
html[data-theme="dark"] .image-quick-tool-grid button:hover,
html[data-theme="dark"] .image-ratio-grid button:hover { background: #173540; }

html[data-theme="dark"] .image-preset-grid button.is-active,
html[data-theme="dark"] .image-ratio-grid button.is-active,
html[data-theme="dark"] .image-quick-tool-grid button.is-active,
html[data-theme="dark"] .image-convert-preset-grid button.is-active,
html[data-theme="dark"] .image-convert-fit-grid button.is-active {
  border-color: #48b8c3;
  background: #123a44;
  color: #effbfe;
  box-shadow: inset 0 0 0 1px #48b8c3;
}

html[data-theme="dark"] .image-control-group summary { background: #122d37; color: #e5f3f8; }
html[data-theme="dark"] .image-section-head strong,
html[data-theme="dark"] .image-preset-grid strong,
html[data-theme="dark"] .image-control-group strong,
html[data-theme="dark"] .image-report-card h2,
html[data-theme="dark"] .image-export-card h2,
html[data-theme="dark"] .image-lesson h3 { color: #e9f7fb; }

html[data-theme="dark"] .image-preset-grid small,
html[data-theme="dark"] .image-lesson p,
html[data-theme="dark"] .image-export-card label,
html[data-theme="dark"] .image-export-card > small,
html[data-theme="dark"] .image-report-card > p,
html[data-theme="dark"] .image-metric-list dt { color: #9eb6c0; }

html[data-theme="dark"] .image-score-pair { border-color: #2b4d5a; }
html[data-theme="dark"] .image-score-pair > div { background: #102832; }
html[data-theme="dark"] .image-score-pair .is-after { background: linear-gradient(145deg, #17505a, #166574); color: white; }
html[data-theme="dark"] .image-system-card > div,
html[data-theme="dark"] .image-metric-list > div { border-color: #294853; }

@media (max-width: 1180px) {
  .image-lab-page { --image-shell: min(100% - 32px, 1050px); }

  .image-lab-hero {
    min-height: 560px;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.82fr);
    gap: 28px;
  }

  .image-header-nav .nav-link { display: none; }
  .image-hero-visual { min-height: 440px; }
  .image-hero-frame--front { width: min(350px, 88%); height: 360px; }
  .image-hero-picture { height: 254px; }

  .image-workspace {
    grid-template-columns: minmax(290px, 0.8fr) minmax(470px, 1.45fr);
  }

  .image-output-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .image-header-nav { gap: 6px; }
  .image-header-nav .support-button { padding: 0 11px; }
  .image-header-nav .share-button { display: none; }

  .image-lab-hero {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    padding: 58px 0 72px;
  }

  .image-hero-copy h1 { font-size: clamp(44px, 7vw, 58px); }
  .image-hero-visual { min-height: 350px; }
  .image-hero-frame--back { top: 36px; right: 30px; height: 260px; }
  .image-hero-frame--front { right: 0; bottom: 18px; height: 290px; }
  .image-hero-picture { height: 195px; }
  .image-hero-chip--one { left: -8px; }
}

@media (max-width: 760px) {
  .image-lab-page { --image-shell: calc(100% - 24px); }
  .image-site-header { min-height: 76px; }
  .image-brand > span:last-child { font-size: 14px; }
  .image-header-nav .support-button b { display: none; }
  .image-header-nav .support-button { width: 42px; padding: 0; }
  .image-header-nav .theme-button { width: 42px; min-width: 42px; padding: 0; }
  .image-header-nav .theme-button b { display: none; }
  .image-header-nav .language-control select { width: 76px; padding: 0 20px 0 8px; }

  .image-lab-hero { display: block; padding: 50px 0 62px; }
  .image-lab-hero::before { right: 0; left: 0; height: 620px; }
  .image-hero-copy { max-width: 100%; }
  .image-hero-copy h1 { font-size: clamp(42px, 11vw, 60px); }
  .image-hero-copy > p { font-size: 14px; }
  .image-hero-visual { display: none; }
  .image-hero-proof { margin-top: 24px; }
  .image-hero-proof > span { padding: 11px 9px; }
  .image-hero-proof strong { font-size: 8px; }

  .image-command-bar { display: block; padding: 0; border-radius: 15px 15px 0 0; }
  .image-mode-tabs { overflow-x: auto; overscroll-behavior-inline: contain; }
  .image-mode-tabs button { min-width: 112px; }
  .image-source-dock { margin-top: -15px; }

  .image-workspace { grid-template-columns: 1fr; padding: 0; }
  .image-stage-card { position: static; order: 1; }
  .image-controls { max-height: none; order: 2; }
  .image-output-panel { grid-column: auto; grid-template-columns: 1fr; order: 3; }
}

@media (max-width: 540px) {
  .image-lab-page { --image-shell: calc(100% - 16px); }
  .image-site-header { gap: 6px; }
  .image-brand > span:last-child { display: none; }
  .image-brand-mark { width: 34px; height: 34px; }
  .image-brand-mark img { width: 32px; height: 32px; }
  .image-header-nav .support-button { display: none; }

  .image-lab-hero { padding-top: 42px; }
  .image-kicker { font-size: 8px; letter-spacing: 0.13em; }
  .image-hero-copy h1 { margin-top: 18px; font-size: clamp(40px, 13vw, 54px); }
  .image-hero-actions { display: grid; }
  .image-upload-primary,
  .image-hero-actions button { min-height: 60px; }
  .image-hero-proof { grid-template-columns: 1fr; }
  .image-hero-proof > span { grid-template-columns: 24px 1fr; }
  .image-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }
  .image-mode-tabs button {
    min-width: 0;
    min-height: 52px;
  }
  .image-canvas-stage { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .image-upload-primary,
  .image-hero-actions button,
  .image-hero-frame,
  .image-hero-chip { transition: none; }

  .image-hero-frame--back,
  .image-hero-frame--front { transform: none; }
}
