:root {
  --personal-bg: #f3f7f4;
  --personal-surface: #ffffff;
  --personal-surface-muted: #eef5f0;
  --personal-text: #10231a;
  --personal-muted: #5a6c63;
  --personal-border: #cfe0d5;
  --personal-primary: #146c43;
  --personal-primary-strong: #0f5132;
  --personal-accent: #dff3e7;
  --personal-danger: #b42318;
  --personal-danger-bg: #fff0ee;
  --personal-warning: #8a4b08;
  --personal-warning-bg: #fff7e6;
  --personal-shadow: 0 14px 36px rgba(15, 81, 50, 0.1);
  --personal-radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--personal-bg);
  color: var(--personal-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top right, rgba(93, 181, 129, 0.15), transparent 32rem),
    var(--personal-bg);
  color: var(--personal-text);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(20, 108, 67, 0.32);
  outline-offset: 2px;
}

.skip-link {
  background: #ffffff;
  border: 2px solid var(--personal-primary);
  border-radius: 10px;
  color: var(--personal-primary-strong);
  font-weight: 800;
  left: 12px;
  padding: 10px 14px;
  position: fixed;
  top: -80px;
  z-index: 1000;
}

.skip-link:focus {
  top: 12px;
}

.offline-banner {
  background: var(--personal-warning-bg);
  border-bottom: 1px solid #f0c98f;
  color: var(--personal-warning);
  font-size: 0.9rem;
  font-weight: 800;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  text-align: center;
}

.app-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--personal-border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-block,
.header-actions,
.button-row,
.session-meta,
.results-toolbar,
.scanner-header,
.section-heading-row,
.order-heading,
.order-actions {
  align-items: center;
  display: flex;
}

.brand-block {
  gap: 11px;
  min-width: 0;
}

.brand-logo {
  background: #ffffff;
  border: 1px solid var(--personal-border);
  border-radius: 12px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 3px;
}

.brand-block h1,
.section-heading h2,
.session-card h2,
.state-card h2,
.auth-card h2,
.scanner-header h3 {
  color: var(--personal-text);
  margin: 0;
}

.brand-block h1 {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.1;
}

.eyebrow {
  color: var(--personal-primary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.header-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-chip {
  background: var(--personal-surface-muted);
  border: 1px solid var(--personal-border);
  border-radius: 999px;
  color: var(--personal-muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-chip.is-online {
  background: var(--personal-accent);
  color: var(--personal-primary-strong);
}

.status-chip.is-offline {
  background: var(--personal-warning-bg);
  border-color: #f0c98f;
  color: var(--personal-warning);
}

.app-main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 22px max(16px, env(safe-area-inset-right)) 44px max(16px, env(safe-area-inset-left));
  width: 100%;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  line-height: 1.15;
  min-height: 44px;
  padding: 10px 15px;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  background: var(--personal-primary);
  color: #ffffff;
}

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

.button-secondary {
  background: #ffffff;
  border-color: var(--personal-border);
  color: var(--personal-primary-strong);
}

.button-secondary:not(:disabled):hover,
.button-quiet:not(:disabled):hover {
  background: var(--personal-surface-muted);
}

.button-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--personal-muted);
}

.button-danger {
  background: var(--personal-danger-bg);
  border-color: #f3c1bb;
  color: var(--personal-danger);
}

.button-small {
  font-size: 0.86rem;
  min-height: 40px;
  padding: 8px 11px;
}

.state-card,
.auth-card,
.session-card,
.content-panel {
  background: var(--personal-surface);
  border: 1px solid var(--personal-border);
  border-radius: var(--personal-radius);
  box-shadow: var(--personal-shadow);
}

.state-card {
  align-items: center;
  display: flex;
  gap: 18px;
  margin: min(14vh, 100px) auto 0;
  max-width: 620px;
  padding: clamp(22px, 6vw, 36px);
}

.state-card p,
.auth-card p,
.section-heading p,
.scanner-header p {
  color: var(--personal-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.state-card-error {
  background: var(--personal-danger-bg);
  border-color: #f3c1bb;
}

.spinner {
  animation: spin 850ms linear infinite;
  border: 4px solid var(--personal-border);
  border-radius: 50%;
  border-top-color: var(--personal-primary);
  flex: 0 0 auto;
  height: 42px;
  width: 42px;
}

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

.auth-card {
  margin: min(8vh, 70px) auto 0;
  max-width: 520px;
  padding: clamp(22px, 6vw, 38px);
}

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

.section-heading-row {
  gap: 16px;
  justify-content: space-between;
}

.section-heading h2,
.session-card h2,
.state-card h2,
.auth-card h2 {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
}

.stack-form {
  display: grid;
  gap: 8px;
}

.stack-form label,
.search-form label {
  color: var(--personal-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.stack-form input,
.search-form input,
.status-select {
  background: #ffffff;
  border: 1px solid #b7cbbf;
  border-radius: 12px;
  color: var(--personal-text);
  min-height: 48px;
  padding: 11px 13px;
  width: 100%;
}

.stack-form input {
  margin-bottom: 8px;
}

.stack-form .button {
  margin-top: 6px;
  width: 100%;
}

.form-message {
  color: var(--personal-muted);
  font-weight: 700;
  line-height: 1.4;
  min-height: 1.4em;
}

.form-message.is-error {
  color: var(--personal-danger);
}

.form-message.is-success {
  color: var(--personal-primary-strong);
}

.button-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.session-card {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

#staff-view .session-card,
#staff-view .content-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#staff-view .session-card {
  padding: 8px 0 12px;
}

#staff-view .content-panel {
  padding: 16px 0;
}

.session-meta {
  color: var(--personal-muted);
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
}

.session-meta strong {
  color: var(--personal-text);
}

.role-links {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: thin;
}

.role-link {
  background: var(--personal-surface);
  border: 1px solid var(--personal-border);
  border-radius: 999px;
  color: var(--personal-primary-strong);
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
}

.section-tabs {
  background: #dfeae3;
  border-radius: 14px;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 0 14px;
  padding: 5px;
}

.section-tab {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--personal-muted);
  cursor: pointer;
  font-weight: 900;
  min-height: 44px;
  padding: 10px;
}

.section-tab.is-active {
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 81, 50, 0.1);
  color: var(--personal-primary-strong);
}

.content-panel {
  padding: clamp(16px, 4vw, 24px);
}

.search-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.scanner-region {
  background: #07120d;
  border-radius: 16px;
  color: #ffffff;
  margin-top: 16px;
  overflow: hidden;
}

.scanner-header {
  gap: 12px;
  justify-content: space-between;
  padding: 13px 14px;
}

.scanner-header h3,
.scanner-header p,
.scanner-header .button-quiet {
  color: #ffffff;
}

.scanner-header p {
  font-size: 0.86rem;
  margin-top: 3px;
}

.scanner-region video {
  aspect-ratio: 4 / 3;
  background: #000000;
  display: block;
  max-height: 62vh;
  object-fit: cover;
  width: 100%;
}

.results-toolbar {
  gap: 12px;
  justify-content: space-between;
  margin-top: 17px;
}

.results-toolbar p {
  color: var(--personal-muted);
  font-size: 0.9rem;
  margin: 0;
}

.inline-loading {
  background: var(--personal-surface-muted);
  border-radius: 12px;
  color: var(--personal-muted);
  font-weight: 800;
  margin-top: 14px;
  padding: 13px;
  text-align: center;
}

.product-list,
.order-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.product-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card,
.order-card {
  background: #ffffff;
  border: 1px solid var(--personal-border);
  border-radius: 15px;
  overflow: hidden;
}

.product-card {
  padding: 15px;
}

.product-card-photo,
.product-photo-preview {
  align-items: center;
  background: #edf6f1;
  border: 1px solid var(--personal-border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.product-card-photo {
  aspect-ratio: 16 / 9;
  margin-bottom: 13px;
  width: 100%;
}

.product-photo-preview {
  aspect-ratio: 4 / 3;
  min-height: 180px;
  width: min(100%, 320px);
}

.product-photo-image {
  background: #ffffff;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.product-photo-placeholder {
  color: var(--personal-primary);
  font-size: clamp(2.2rem, 10vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.product-card h3,
.order-card h3 {
  color: var(--personal-text);
  font-size: 1rem;
  line-height: 1.35;
  margin: 0;
}

.product-code,
.order-subtitle {
  color: var(--personal-muted);
  font-size: 0.82rem;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.product-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0 0;
}

.product-meta div {
  background: var(--personal-surface-muted);
  border-radius: 11px;
  min-width: 0;
  padding: 9px 10px;
}

.product-meta dt {
  color: var(--personal-muted);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.product-meta dd {
  color: var(--personal-text);
  font-size: 0.95rem;
  font-weight: 900;
  margin: 0;
  overflow-wrap: anywhere;
}

.product-meta .confidential-field {
  background: #edf4ff;
}

.product-card-actions {
  border-top: 1px solid var(--personal-border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 13px;
  padding-top: 12px;
}

.product-card-actions .button {
  width: 100%;
}

.empty-state {
  background: var(--personal-surface-muted);
  border: 1px dashed #adc5b6;
  border-radius: 14px;
  color: var(--personal-muted);
  grid-column: 1 / -1;
  line-height: 1.5;
  padding: 24px 18px;
  text-align: center;
}

.order-list {
  display: grid;
  gap: 13px;
}

.order-card {
  padding: 16px;
}

.order-card.is-active {
  border-left: 5px solid var(--personal-primary);
}

.order-card.is-terminal {
  background: #f8faf8;
  border-color: #d9e2dc;
}

.order-heading {
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
}

.order-status {
  background: var(--personal-surface-muted);
  border: 1px solid var(--personal-border);
  border-radius: 999px;
  color: var(--personal-primary-strong);
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.order-facts {
  display: grid;
  gap: 7px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.order-fact {
  color: var(--personal-muted);
  font-size: 0.86rem;
}

.order-fact strong {
  color: var(--personal-text);
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.order-lines {
  background: var(--personal-surface-muted);
  border-radius: 11px;
  margin: 0 0 13px;
  padding: 12px;
}

.order-lines-title {
  color: var(--personal-text);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.order-line-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-line {
  background: #ffffff;
  border: 1px solid var(--personal-border);
  border-radius: 10px;
  padding: 10px;
}

.order-line-main {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.order-line-name {
  color: var(--personal-text);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
}

.order-line-code {
  color: var(--personal-muted);
  font-size: 0.74rem;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.order-line-mode {
  background: var(--personal-accent);
  border-radius: 999px;
  color: var(--personal-primary-strong);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
}

.order-line-facts {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 9px;
}

.order-line-fact {
  color: var(--personal-muted);
  font-size: 0.72rem;
  min-width: 0;
}

.order-line-fact strong {
  color: var(--personal-text);
  display: block;
  font-size: 0.84rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.order-lines-empty {
  color: var(--personal-muted);
  font-size: 0.85rem;
  margin: 0;
}

.orders-pagination {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.orders-pagination .button {
  min-width: min(100%, 240px);
}

.order-actions {
  border-top: 1px solid var(--personal-border);
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 13px;
}

.status-select {
  flex: 1 1 190px;
  min-height: 44px;
}

.editor-overlay {
  align-items: stretch;
  background: rgba(4, 18, 11, 0.66);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  position: fixed;
  z-index: 200;
}

.editor-sheet {
  background: var(--personal-bg);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.22);
  max-width: 820px;
  min-height: 100dvh;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  width: min(100%, 820px);
}

.editor-header,
.editor-preview-heading,
.editor-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.editor-header {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--personal-border);
  border-radius: 16px;
  margin-bottom: 14px;
  padding: 15px 16px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.editor-header h2,
.editor-preview-heading h3 {
  color: var(--personal-text);
  margin: 0;
}

.editor-header p:last-child {
  color: var(--personal-muted);
  font-size: 0.86rem;
  line-height: 1.35;
  margin: 5px 0 0;
}

.editor-close {
  flex: 0 0 auto;
}

.product-editor-form {
  display: grid;
  gap: 13px;
}

.editor-photo-layout {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
}

.editor-photo-controls {
  display: grid;
  gap: 10px;
}

.editor-photo-controls label {
  color: var(--personal-text);
  display: grid;
  font-size: 0.83rem;
  font-weight: 850;
  gap: 7px;
}

.editor-photo-controls input[type="file"] {
  background: #ffffff;
  border: 1px solid #b7cbbf;
  border-radius: 11px;
  color: var(--personal-text);
  max-width: 100%;
  min-height: 46px;
  padding: 7px;
  width: 100%;
}

.editor-photo-controls input[type="file"]::file-selector-button {
  background: var(--personal-surface-muted);
  border: 0;
  border-radius: 8px;
  color: var(--personal-primary-strong);
  cursor: pointer;
  font-weight: 850;
  margin-right: 9px;
  min-height: 32px;
  padding: 7px 10px;
}

.editor-photo-controls .button {
  justify-self: start;
  min-width: 150px;
}

.editor-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.photo-status {
  color: var(--personal-muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
  margin: 10px 0 0;
  min-height: 1.4em;
}

.photo-status.is-error {
  color: var(--personal-danger);
}

.photo-status.is-success {
  color: var(--personal-primary-strong);
}

.editor-group {
  background: #ffffff;
  border: 1px solid var(--personal-border);
  border-radius: 15px;
  margin: 0;
  padding: 14px;
}

.editor-group[disabled] {
  background: #f4f5f4;
  opacity: 0.72;
}

.editor-group legend {
  color: var(--personal-primary-strong);
  font-size: 0.94rem;
  font-weight: 900;
  padding: 0 7px;
}

.editor-fields {
  display: grid;
  gap: 11px;
}

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

.editor-fields-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-fields label {
  color: var(--personal-text);
  display: grid;
  font-size: 0.83rem;
  font-weight: 850;
  gap: 6px;
  min-width: 0;
}

.editor-fields input,
.editor-fields select {
  background: #ffffff;
  border: 1px solid #b7cbbf;
  border-radius: 11px;
  color: var(--personal-text);
  min-height: 46px;
  padding: 9px 11px;
  width: 100%;
}

.editor-help {
  color: var(--personal-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 10px 0 0;
}

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

.editor-actions .button {
  min-width: 150px;
}

.editor-preview {
  background: #ffffff;
  border: 1px solid var(--personal-border);
  border-radius: 16px;
  box-shadow: var(--personal-shadow);
  padding: 17px;
}

.editor-preview-heading {
  align-items: flex-start;
}

.editor-diff {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.editor-diff-item {
  align-items: center;
  background: var(--personal-surface-muted);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 2fr);
  padding: 11px;
}

.editor-diff-values {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.editor-diff-values-create {
  grid-template-columns: minmax(0, 1fr);
}

.editor-diff-label {
  color: var(--personal-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.editor-diff-before,
.editor-diff-after {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.editor-diff-before {
  color: #7f1d1d;
}

.editor-diff-after {
  color: var(--personal-primary-strong);
}

.editor-diff-arrow {
  color: var(--personal-muted);
  font-weight: 900;
}

.editor-warnings {
  background: var(--personal-warning-bg);
  border: 1px solid #f0c98f;
  border-radius: 12px;
  color: var(--personal-warning);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.45;
  margin-top: 13px;
  padding: 11px 12px;
}

.editor-confirm {
  align-items: flex-start;
  background: #edf4ff;
  border: 1px solid #c7dcfa;
  border-radius: 12px;
  color: #16385e;
  display: flex;
  font-size: 0.88rem;
  font-weight: 800;
  gap: 10px;
  line-height: 1.4;
  margin-top: 14px;
  padding: 12px;
}

.editor-confirm input {
  flex: 0 0 auto;
  height: 20px;
  margin: 1px 0 0;
  width: 20px;
}

.editor-apply {
  margin-top: 12px;
  width: 100%;
}

body.editor-open {
  overflow: hidden;
}

.toast {
  background: #10231a;
  border-radius: 12px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-weight: 800;
  left: 50%;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  position: fixed;
  transform: translateX(-50%);
  width: max-content;
  z-index: 100;
}

.toast.is-error {
  background: #7f1d1d;
}

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

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions .button {
    font-size: 0.82rem;
    min-height: 38px;
    padding: 8px 10px;
  }

  .status-chip {
    order: -1;
    width: 100%;
  }

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

  .search-form input {
    grid-column: 1 / -1;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

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

  .editor-photo-layout {
    grid-template-columns: 1fr;
  }

  .product-photo-preview {
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .app-header {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-logo {
    height: 36px;
    width: 36px;
  }

  .eyebrow {
    font-size: 0.64rem;
  }

  .brand-block h1 {
    font-size: 1rem;
  }

  .header-actions .button-quiet {
    padding-left: 7px;
    padding-right: 7px;
  }

  .session-card,
  .section-heading-row,
  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .session-card > .button,
  .section-heading-row > .button,
  .results-toolbar > .button {
    width: 100%;
  }

  .state-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-meta,
  .order-facts {
    grid-template-columns: 1fr;
  }

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

  .editor-header,
  .editor-preview-heading,
  .editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-header .button,
  .editor-preview-heading .button,
  .editor-actions .button {
    width: 100%;
  }

  .editor-photo-controls .button {
    justify-self: stretch;
    width: 100%;
  }

  .editor-photo-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .editor-diff-item {
    grid-template-columns: 1fr;
  }

  .editor-diff-values {
    grid-template-columns: 1fr;
  }

  .editor-diff-arrow {
    text-align: center;
    transform: rotate(90deg);
  }

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

  .order-line-main {
    flex-direction: column;
  }

  .order-line-facts {
    grid-template-columns: 1fr;
  }
}

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

  .spinner {
    animation-duration: 1.8s;
  }
}
