:root {
  --color-canvas: #f6f4ef;
  --color-panel: #ffffff;
  --color-text: #172033;
  --color-muted: #5b6473;
  --color-border: #d9dee7;
  --color-border-strong: #bbc4d2;
  --color-primary: #087f73;
  --color-primary-hover: #066a61;
  --color-primary-soft: #e8f5f2;
  --color-warning: #8a5200;
  --color-warning-soft: #fff7e6;
  --color-error: #a61b1b;
  --color-error-soft: #fff0f0;
  --color-success: #166b50;
  --color-success-soft: #eaf7f2;
  --color-blue: #2f6aa3;
  --shadow-card: 0 10px 30px rgb(25 35 50 / 7%);
  --shadow-sticky: 0 -8px 30px rgb(25 35 50 / 12%);
  --radius-card: 14px;
  --radius-control: 8px;
  --focus-ring: 0 0 0 3px rgb(89 183 173 / 45%);
  --font-ui: "Yu Gothic UI", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--color-text);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-header {
  border-bottom: 1px solid #e2e0da;
  background:
    radial-gradient(circle at 16% -40%, rgb(8 127 115 / 10%), transparent 40%),
    #fbfaf7;
}

.header-inner,
.page-shell,
.export-inner {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: 146px;
  padding: 26px 0;
}

.brand-block {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 13px;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgb(8 127 115 / 22%);
}

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

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}

.eyebrow {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.local-badge {
  padding: 2px 8px;
  border: 1px solid #c6dcd7;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-success);
  font-size: 11px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 5px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.brand-block p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.steps {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a919d;
}

.step:not(:last-child) {
  margin-right: 48px;
}

.step:not(:last-child)::after {
  position: absolute;
  top: 18px;
  left: calc(100% + 10px);
  width: 28px;
  height: 1px;
  background: #cfd4dc;
  content: "";
}

.step-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #cfd4dc;
  border-radius: 50%;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.step strong,
.step small {
  display: block;
  white-space: nowrap;
}

.step strong {
  font-size: 13px;
}

.step small {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 500;
}

.step.is-active,
.step.is-complete {
  color: var(--color-primary);
}

.step.is-active .step-number,
.step.is-complete .step-number {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.step.is-complete:not(:last-child)::after {
  background: var(--color-primary);
}

.page-shell {
  padding: 32px 0 170px;
}

.panel {
  border: 1px solid rgb(208 214 223 / 85%);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  box-shadow: var(--shadow-card);
}

.upload-panel {
  padding: 26px 28px 28px;
}

.panel-heading,
.results-heading,
.color-heading,
.row-card-header,
.row-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f3;
}

.panel-heading h2,
.results-heading h2 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.35;
}

.panel-heading > p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 13px;
  text-align: right;
}

.section-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.store-fieldset {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.store-fieldset legend,
.field > span,
.field-label {
  margin-bottom: 8px;
  color: #3d4654;
  font-size: 13px;
  font-weight: 700;
}

.required-label,
.field b,
.field-label b {
  margin-left: 5px;
  color: var(--color-error);
  font-size: 10px;
  font-weight: 700;
}

.store-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  max-width: 680px;
  margin-top: 9px;
}

.store-option {
  position: relative;
}

.store-option input {
  position: absolute;
  opacity: 0;
}

.store-option span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: #fff;
  color: #46505f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.store-option input:checked + span {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.store-option input:focus-visible + span {
  box-shadow: var(--focus-ring);
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.drop-zone {
  position: relative;
  display: flex;
  min-height: 194px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 2px dashed #aebac7;
  border-radius: 12px;
  background: #fbfcfd;
  color: var(--color-muted);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--color-primary);
  background: #f1faf8;
}

.drop-zone.is-dragging {
  transform: scale(1.005);
}

.drop-zone.has-file {
  border-style: solid;
  border-color: #7ebbb4;
  background: #f3faf8;
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 9px;
  place-items: center;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

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

.drop-title {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 700;
}

.drop-separator {
  margin: 2px 0;
  font-size: 11px;
}

.file-picker-label {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drop-help {
  margin-top: 6px;
  font-size: 11px;
}

.selected-file {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-action {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #fafbfc;
}

.action-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-muted);
}

.action-note svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--color-primary);
}

.action-note p {
  margin: 0;
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button svg {
  width: 19px;
  height: 19px;
}

.button-large {
  min-height: 52px;
  font-size: 15px;
}

.button-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 7px 16px rgb(8 127 115 / 18%);
}

.button-primary:not(:disabled):hover {
  background: var(--color-primary-hover);
}

.button-secondary {
  border-color: #b8d6d1;
  background: #fff;
  color: var(--color-primary);
}

.button-secondary:not(:disabled):hover {
  background: var(--color-primary-soft);
}

.button-confirm {
  border-color: #8bc4b2;
  background: var(--color-success-soft);
  color: var(--color-success);
}

.button-confirm:not(:disabled):hover {
  border-color: var(--color-success);
  background: #ddf2ea;
}

.message-box {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid #e9b6b6;
  border-radius: 10px;
  background: var(--color-error-soft);
  color: var(--color-error);
  font-size: 13px;
  font-weight: 700;
}

.message-box.is-success {
  border-color: #aad9c8;
  background: var(--color-success-soft);
  color: var(--color-success);
}

.results-section {
  margin-top: 34px;
}

.results-heading {
  margin-bottom: 14px;
}

.result-file-label {
  max-width: 55%;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 17px;
  border: 1px solid #e0e4e9;
  border-radius: 11px;
  background: #fff;
}

.summary-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
}

.summary-icon svg {
  width: 21px;
  height: 21px;
}

.icon-blue {
  background: #edf5fc;
  color: var(--color-blue);
}

.icon-navy {
  background: #eff1f5;
  color: #47566d;
}

.icon-green {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.icon-amber {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.summary-card small,
.summary-card strong {
  display: block;
}

.summary-card small {
  color: var(--color-muted);
  font-size: 11px;
}

.summary-card strong {
  margin-top: 1px;
  font-size: 23px;
  line-height: 1.2;
}

.empty-state,
.loading-state {
  min-height: 330px;
  padding: 48px 24px;
  text-align: center;
}

.empty-illustration {
  display: block;
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  color: #6f7f92;
}

.empty-illustration svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.empty-state h3,
.loading-state h3 {
  margin-bottom: 7px;
  font-size: 17px;
}

.empty-state > p,
.loading-state > p {
  color: var(--color-muted);
  font-size: 13px;
}

.empty-state ul {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 18px 0 0;
  padding: 15px 20px;
  border-radius: 10px;
  background: #f6f8fa;
  color: #526070;
  font-size: 12px;
  text-align: left;
}

.empty-state li::marker {
  color: var(--color-primary);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.spinner-large {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-width: 3px;
  color: var(--color-primary);
}

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

.rows-container {
  display: grid;
  gap: 14px;
}

.row-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-left: 5px solid #d0d6df;
  border-radius: 12px;
  background: var(--color-panel);
  box-shadow: 0 6px 20px rgb(25 35 50 / 5%);
}

.row-card.status-confirmed {
  border-left-color: var(--color-success);
}

.row-card.status-warning {
  border-left-color: #d58b19;
}

.row-card.status-error {
  border-left-color: var(--color-error);
}

.row-card-header {
  min-height: 62px;
  padding: 12px 17px;
  border-bottom: 1px solid #e8ebef;
  background: #fafbfc;
}

.row-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.row-number {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  background: #e9edf2;
  color: #536071;
  font-size: 12px;
  font-weight: 800;
}

.page-label {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.compact-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-field > span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.product-code-input {
  width: 118px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.product-name {
  max-width: 260px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf0f4;
  color: #526070;
  font-size: 11px;
  font-weight: 800;
}

.status-badge.confirmed {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.status-badge.warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.status-badge.error {
  background: var(--color-error-soft);
  color: var(--color-error);
}

.row-card-body {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(460px, 1.35fr);
  gap: 22px;
  padding: 18px;
}

.row-fields {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 98px;
  gap: 12px;
  align-content: start;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.field > span {
  display: block;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--color-text);
}

.field input:focus,
.field select:focus {
  border-color: var(--color-primary);
}

.field small,
.color-heading small {
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 10px;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--color-error);
  background: #fffafa;
}

.color-block {
  min-width: 0;
  padding-left: 21px;
  border-left: 1px solid #e4e8ed;
}

.color-heading {
  align-items: flex-start;
  margin-bottom: 11px;
}

.color-heading .field-label,
.color-heading small {
  display: block;
  margin: 0;
}

.recommend-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 11px;
  font-size: 11px;
}

.candidate-list {
  display: flex;
  min-height: 37px;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 11px;
}

.candidate-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #cfd7df;
  border-radius: 999px;
  background: #fff;
  color: #445161;
  font-size: 11px;
  cursor: pointer;
}

.candidate-chip:hover,
.candidate-chip.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.candidate-chip strong {
  font-size: 12px;
}

.candidate-score {
  padding-left: 7px;
  border-left: 1px solid currentColor;
  opacity: 0.78;
}

.candidate-empty {
  color: var(--color-muted);
  font-size: 11px;
  font-style: normal;
}

.catalog-select-field {
  max-width: 390px;
}

.catalog-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.row-card-footer {
  min-height: 70px;
  padding: 12px 17px;
  border-top: 1px solid #e8ebef;
  background: #fbfcfd;
}

.row-note {
  max-width: 58%;
  color: var(--color-muted);
  font-size: 11px;
}

.price-block {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
}

.price-block > span {
  min-width: 82px;
}

.price-block small,
.price-block strong {
  display: block;
  text-align: right;
}

.price-block small {
  color: var(--color-muted);
  font-size: 10px;
}

.price-block strong {
  font-size: 16px;
}

.row-error {
  margin: 0 17px 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--color-error-soft);
  color: var(--color-error);
  font-size: 12px;
  font-weight: 700;
}

.export-bar {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid #d5dbe3;
  background: rgb(255 255 255 / 96%);
  box-shadow: var(--shadow-sticky);
  backdrop-filter: blur(12px);
}

.export-inner {
  display: flex;
  min-height: 106px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 15px 0;
}

.export-progress {
  display: flex;
  min-width: 230px;
  align-items: center;
  gap: 13px;
}

.progress-ring {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
}

.progress-ring svg {
  position: absolute;
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}

.ring-track,
.ring-value {
  fill: none;
  stroke-width: 4;
}

.ring-track {
  stroke: #e5e9ee;
}

.ring-value {
  stroke: var(--color-primary);
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset 0.3s ease;
}

.progress-ring strong {
  font-size: 10px;
}

.export-progress small,
.export-progress strong {
  display: block;
}

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

.export-progress > span > strong {
  font-size: 13px;
}

.totals {
  display: flex;
  margin: 0;
}

.totals > div {
  min-width: 138px;
  padding: 0 28px;
  border-left: 1px solid #e0e4e9;
}

.totals dt {
  color: var(--color-muted);
  font-size: 10px;
}

.totals dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.export-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.export-action p {
  max-width: 220px;
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
  text-align: right;
}

.export-action .button {
  min-width: 165px;
  min-height: 48px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .steps {
    align-self: stretch;
    justify-content: space-between;
  }

  .step:not(:last-child) {
    margin-right: 36px;
  }

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

  .row-card-body {
    grid-template-columns: 1fr;
  }

  .color-block {
    padding-top: 17px;
    padding-left: 0;
    border-top: 1px solid #e4e8ed;
    border-left: 0;
  }

  .export-inner {
    gap: 16px;
  }

  .totals > div {
    min-width: 112px;
    padding: 0 16px;
  }

  .export-action p {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner,
  .page-shell,
  .export-inner {
    width: min(100% - 28px, 1360px);
  }

  .header-inner {
    min-height: auto;
  }

  .steps {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .step:not(:last-child) {
    margin-right: 46px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .panel-heading > p {
    max-width: none;
    text-align: left;
  }

  .upload-panel {
    padding: 21px;
  }

  .store-options {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

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

  .upload-action {
    flex-direction: row;
    align-items: center;
  }

  .upload-action .button {
    min-width: 220px;
  }

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

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

  .quantity-field {
    grid-column: span 2;
    max-width: 160px;
  }

  .row-card-header,
  .row-card-footer {
    align-items: flex-start;
  }

  .row-identity {
    flex-wrap: wrap;
  }

  .row-note {
    max-width: 45%;
  }

  .export-inner {
    flex-wrap: wrap;
    padding: 11px 0;
  }

  .export-progress {
    min-width: auto;
  }

  .totals {
    margin-left: auto;
  }

  .export-action {
    width: 100%;
  }

  .export-action .button {
    width: 100%;
  }

  .page-shell {
    padding-bottom: 200px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .page-shell,
  .export-inner {
    width: min(100% - 20px, 1360px);
  }

  .app-header {
    background: #fbfaf7;
  }

  .brand-block {
    gap: 11px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

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

  h1 {
    font-size: 19px;
  }

  .brand-block p {
    font-size: 12px;
  }

  .steps {
    gap: 12px;
  }

  .step {
    flex: 1 0 86px;
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .step:not(:last-child) {
    margin-right: 0;
  }

  .step:not(:last-child)::after {
    top: 18px;
    left: calc(50% + 23px);
    width: calc(100% - 45px);
  }

  .step small {
    display: none;
  }

  .page-shell {
    padding-top: 20px;
    padding-bottom: 226px;
  }

  .upload-panel {
    padding: 17px;
  }

  .store-options {
    gap: 7px;
  }

  .upload-action {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-action .button {
    min-width: 0;
    width: 100%;
  }

  .drop-zone {
    min-height: 180px;
    padding: 18px;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .result-file-label {
    max-width: 100%;
  }

  .summary-cards {
    gap: 8px;
  }

  .summary-card {
    gap: 9px;
    padding: 12px;
  }

  .summary-icon {
    width: 33px;
    height: 33px;
  }

  .summary-card strong {
    font-size: 19px;
  }

  .empty-state ul {
    display: block;
  }

  .empty-state li + li {
    margin-top: 5px;
  }

  .row-card-header {
    position: relative;
    padding-top: 46px;
  }

  .status-badge {
    position: absolute;
    top: 11px;
    right: 12px;
  }

  .row-identity {
    width: 100%;
  }

  .product-code-field {
    width: calc(100% - 58px);
  }

  .product-code-input {
    flex: 1;
    width: auto;
  }

  .product-name {
    max-width: 100%;
  }

  .row-card-body {
    padding: 15px;
  }

  .row-fields {
    grid-template-columns: 1fr;
  }

  .quantity-field {
    grid-column: auto;
    max-width: none;
  }

  .color-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .recommend-button {
    align-self: flex-start;
  }

  .catalog-select-field {
    max-width: none;
  }

  .row-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .row-note {
    max-width: none;
  }

  .price-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 12px;
  }

  .price-block small,
  .price-block strong {
    text-align: left;
  }

  .resolve-button {
    grid-column: span 2;
    width: 100%;
  }

  .export-progress {
    width: 100%;
  }

  .totals {
    width: 100%;
    margin: 0;
  }

  .totals > div {
    flex: 1;
    min-width: 0;
    padding: 0;
    border-left: 0;
  }

  .totals > div + div {
    padding-left: 22px;
    border-left: 1px solid #e0e4e9;
  }
}

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