@font-face {
  font-family: "Inter Preview";
  src: url("./assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f8f9fb;
  --ink: #222629;
  --muted: #646b74;
  --line: #e0e3e8;
  --accent: #16634e;
  --accent-dark: #104a3b;
  --accent-soft: #eaf4ef;
  font-family:
    "Inter Preview",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

.app-shell {
  max-width: 1320px;
  padding: 28px 44px 0;
}
.page-heading {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.brand-lockup h1 {
  display: grid;
  gap: 2px;
  font-size: 20px;
  font-weight: 620;
  line-height: 1.2;
}
.brand-lockup h1 span:last-child {
  font-size: 13px;
  font-weight: 480;
  color: #626c77;
}
h1 {
  font-size: 27px;
  font-weight: 560;
  line-height: 1.2;
}
.page-heading h1 {
  max-width: 100%;
}
h2 {
  font-size: 15px;
  font-weight: 620;
}
h3 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 24px;
}
.workspace {
  grid-template-columns: 292px minmax(0, 1fr);
  grid-template-areas: "settings upload" "settings results";
  grid-template-rows: min-content 1fr;
  gap: 0 40px;
}
.image-import {
  grid-area: upload;
}
.image-results {
  grid-area: results;
  display: none;
}
.has-images .image-results {
  display: block;
}
.section-heading {
  margin-bottom: 14px;
}
.count {
  padding: 3px 7px;
  background: #edf0f3;
  color: #505963;
  font-weight: 560;
}
.button {
  font-weight: 570;
  font-size: 13px;
  border-radius: 7px;
  padding: 12px 18px;
}
.primary {
  box-shadow:
    inset 0 1px 0 #ffffff16,
    0 1px 2px #17261e12;
}
.primary:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 #ffffff16,
    0 2px 6px #17261e18;
}
.text-button {
  color: #545f66;
  padding: 10px 0;
  box-shadow: none;
}
.text-button:hover:not(:disabled) {
  color: var(--accent);
}
.text-button .icon {
  width: 16px;
  height: 16px;
}
.secondary {
  border-color: #d6dbe1;
}
.secondary:hover:not(:disabled) {
  background: #f1f3f6;
  border-color: #b7c0cb;
}
button:disabled {
  opacity: 1;
  box-shadow: none;
  color: #89929a;
  background: #edf0f3;
  border-color: #e3e7eb;
}
.button.primary:disabled {
  background: #dfe7e3;
  border-color: #dfe7e3;
  color: #677c72;
}
.drop-zone {
  min-height: 420px;
  border: 1px dashed #c2ccd1;
  padding: 32px 24px;
  background: #fff;
}
.drop-zone.dragover {
  background: #f0f7f3;
  outline-color: #16634e24;
}
.photo-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 300px;
  height: 146px;
  margin-bottom: 28px;
}
.photo-stack img {
  position: static;
  width: 90px;
  height: 120px;
  border-width: 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px #17232d10;
}
.photo-stack img:nth-child(1),
.photo-stack img:nth-child(2),
.photo-stack img:nth-child(3) {
  transform: none;
}
.photo-stack img:nth-child(3) {
  order: -1;
}
.photo-stack img:nth-child(1) {
  height: 136px;
}
.drop-zone .primary {
  min-height: 46px;
  padding-left: 26px;
  padding-right: 26px;
}
.drop-label {
  font-size: 12px;
  margin-top: 18px;
}
.formats {
  font-size: 11px;
  color: #626c77;
  margin-top: 18px;
}
.has-images .drop-zone {
  min-height: 76px;
  padding: 14px;
  background: #fff;
}
.has-images .drop-zone .primary {
  box-shadow: none;
}
.batch-summary {
  padding: 25px 0;
  gap: 28px;
}
.batch-summary span {
  font-size: 11px;
}
.batch-summary strong {
  font-size: 28px;
  font-weight: 520;
  line-height: 1.2;
}
.batch-summary > div {
  gap: 7px;
}
.batch-summary > .icon {
  color: #a0a8b1;
  width: 18px;
  height: 18px;
}
.queue-toolbar {
  padding: 20px 0 6px;
}
.queue-toolbar p {
  font-size: 11px;
}
.queue-item {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 0;
}
.thumb {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 6px;
}
.preview-hint {
  background: #232d2be8;
}
.file-name {
  font-size: 13px;
  font-weight: 570;
}
.file-submeta {
  margin-top: 5px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.status {
  font-weight: 530;
}
.icon-button {
  color: #78848b;
}
.icon-button:hover:not(:disabled) {
  background: #edf0f3;
}
.icon-button .icon {
  width: 18px;
  height: 18px;
}
.settings-panel {
  grid-area: settings;
  border-left: 0;
  border-right: 1px solid var(--line);
  padding-left: 0;
  padding-right: 28px;
}
.settings-heading {
  min-height: 46px;
  display: flex;
  align-items: center;
  margin-bottom: 17px;
  font-size: 14px;
  font-weight: 600;
}
.settings-heading > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}
.settings-heading .icon {
  width: 18px;
  height: 18px;
  color: #626e76;
}
.settings-heading .settings-short {
  display: none;
}
.settings-panel summary {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 17px;
}
.settings-panel summary > span:first-child {
  gap: 9px;
}
.settings-panel summary .icon {
  width: 18px;
  height: 18px;
  color: #626e76;
}
label,
.field-label,
legend {
  font-size: 12px;
  font-weight: 550;
}
select,
input[type="number"],
input[type="text"] {
  border-color: #d6dce3;
  border-radius: 6px;
  height: 42px;
  font-size: 13px;
  font-weight: 450;
  box-shadow: 0 1px 2px #17261e03;
}
input::placeholder {
  color: #7d858f;
  opacity: 1;
}
select {
  margin-bottom: 23px;
}
.preset-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.preset-row select {
  margin: 0;
}
.segmented {
  background: #e9edf1;
  gap: 2px;
  padding: 3px;
  border-radius: 7px;
}
.segmented span {
  font-size: 12px;
  font-weight: 570;
  color: #58626e;
  border-radius: 5px;
  min-height: 35px;
}
.segmented input:checked + span {
  color: var(--ink);
  box-shadow:
    0 1px 3px #1d283215,
    0 0 0 1px #1d283209;
}
.field-note {
  font-size: 11px;
  color: #626c77;
  margin-top: 10px;
  min-height: 27px;
}
.quality-heading {
  margin-top: 18px;
}
.quality-heading output {
  font-size: 12px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  height: 30px;
  margin-top: 5px;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #d8dee2;
  border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  height: 4px;
  background: #d8dee2;
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
  box-shadow: 0 1px 3px #263b3b20;
}
input[type="range"]::-moz-range-thumb {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
  box-shadow: 0 1px 3px #263b3b20;
}
.range-labels {
  font-size: 10px;
}
.field-divider {
  margin: 21px 0;
}
.unit {
  color: #626c77;
}
.check-row {
  font-size: 12px;
  font-weight: 450;
}
.check-row input {
  width: 16px;
  height: 16px;
}
.filename-preview {
  min-height: 0;
}
.settings-footer {
  margin-top: 23px;
  font-size: 10px;
}
.action-bar {
  padding: 16px 20px;
  margin-top: 30px;
  box-shadow: 0 4px 16px #27384b08;
  border-color: #dfe4e9;
}
.action-status {
  font-size: 11px;
}
.status-dot {
  width: 5px;
  height: 5px;
}
.actions {
  gap: 8px;
}
.app-footer {
  font-size: 9px;
  font-weight: 400;
  color: #67717b;
  padding-top: 26px;
}
.notice {
  background: #edf6f1;
  border-color: #d4e7dc;
  color: #315b47;
  font-size: 12px;
}
.preview-dialog,
.clear-dialog {
  box-shadow: 0 20px 70px #16223526;
}
.preview-image {
  background-color: #edf0f3;
}

@media (max-width: 899px) {
  .app-shell {
    padding-left: 24px;
    padding-right: 24px;
  }
  .workspace {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 0 24px;
  }
  .settings-panel {
    padding-left: 0;
    padding-right: 20px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 20px 20px 0;
  }
  .page-heading {
    flex-direction: row;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
  }
  .brand-lockup {
    gap: 10px;
  }
  .brand-mark {
    width: 35px;
    height: 35px;
  }
  .brand-lockup h1 {
    font-size: 18px;
  }
  .brand-lockup h1 span:last-child {
    font-size: 12px;
  }
  .page-heading .text-button {
    max-width: 90px;
    min-height: 44px;
    font-size: 11px;
    gap: 4px;
    text-align: left;
  }
  h1 {
    font-size: 24px;
    font-weight: 560;
    line-height: 1.25;
  }
  h2 {
    font-size: 14px;
  }
  h3 {
    font-size: 23px;
    font-weight: 500;
    margin-bottom: 22px;
  }
  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "upload" "settings" "results";
    grid-template-rows: auto;
    gap: 20px;
  }
  .settings-panel {
    padding: 0;
    border-top: 0;
    border-right: 0;
  }
  .settings-heading {
    min-height: 24px;
    margin-bottom: 16px;
    font-size: 14px;
  }
  .settings-panel form {
    padding-top: 0;
  }
  .settings-panel summary {
    min-height: 44px;
    margin-bottom: 0;
    font-size: 13px;
  }
  .settings-short {
    font-size: 10px;
  }
  .section-heading {
    height: 30px;
    margin-bottom: 10px;
  }
  body:not(.has-images) .image-import .section-heading {
    display: none;
  }
  .drop-zone {
    min-height: 120px;
    padding: 14px 12px;
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    justify-items: center;
    gap: 8px 12px;
  }
  .empty-state {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }
  .empty-state h3 {
    display: none;
  }
  .drop-zone .photo-stack {
    width: 84px;
    height: 54px;
    gap: 4px;
    margin: 0;
  }
  .drop-zone .photo-stack img {
    width: 25px;
    height: 43px;
    border-radius: 2px;
  }
  .photo-stack img:nth-child(1) {
    height: 52px;
  }
  .drop-zone .primary {
    grid-column: 2;
    grid-row: 1;
    min-height: 44px;
    font-size: 12px;
    padding: 10px 16px;
    width: 100%;
  }
  .drop-label {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 10px;
  }
  .formats {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 9px;
  }
  .has-images .drop-zone {
    min-height: 68px;
    padding: 9px;
    gap: 4px;
  }
  .has-images .drop-zone {
    display: flex;
  }
  .has-images .drop-zone .primary {
    width: auto;
  }
  .preset-row {
    margin-bottom: 18px;
  }
  .field-note {
    min-height: 0;
    margin-top: 8px;
    font-size: 10px;
  }
  .quality-heading {
    margin-top: 12px;
  }
  .field-divider {
    margin: 12px 0;
  }
  .batch-summary {
    padding: 22px 0;
    gap: 20px;
  }
  .batch-summary strong {
    font-size: 24px;
  }
  .batch-summary span {
    font-size: 10px;
  }
  .queue-item {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 16px 0;
  }
  .thumb {
    width: 50px;
    height: 58px;
  }
  .file-name {
    font-size: 13px;
  }
  .file-submeta {
    font-size: 11px;
    line-height: 1.6;
  }
  .status {
    font-size: 10px;
  }
  select,
  input[type="number"],
  input[type="text"] {
    height: 44px;
    font-size: 16px;
  }
  .segmented span {
    min-height: 44px;
    font-size: 12px;
  }
  .action-bar {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    margin: 24px -20px 0;
    border-radius: 0;
    box-shadow: 0 -4px 20px #1f2c3c05;
  }
  .action-status {
    font-size: 10px;
  }
  .actions > .button {
    min-height: 44px;
    font-size: 12px;
  }
  .app-footer {
    font-size: 8px;
    padding: 20px;
  }
}
