:root {
  color-scheme: light;
  --ink-950: #0b1220;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;
  --surface: #ffffff;
  --blue-700: #075985;
  --blue-600: #0369a1;
  --blue-100: #e0f2fe;
  --blue-50: #f0f9ff;
  --green-700: #047857;
  --green-600: #059669;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;
  --amber-700: #b45309;
  --amber-100: #fef3c7;
  --red-700: #b91c1c;
  --red-100: #fee2e2;
  --focus: #0284c7;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 28px rgba(15, 23, 42, .06);
  --shadow-sheet: 0 -24px 70px rgba(15, 23, 42, .22);
  --z-header: 20;
  --z-sheet: 50;
  --z-toast: 70;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  background: var(--ink-50);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 90% 0%, rgba(14, 165, 233, .08), transparent 24rem),
    var(--ink-50);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button, select { cursor: pointer; }

button { touch-action: manipulation; }

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(2, 132, 199, .32);
  outline-offset: 2px;
}

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

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

.app-header {
  position: sticky;
  z-index: var(--z-header);
  top: 0;
  color: #fff;
  background: rgba(15, 23, 42, .96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(100%, 1440px);
  min-height: 76px;
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-block { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #38bdf8;
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 12px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 1px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-block .eyebrow { color: #7dd3fc; }

.brand-block h1 {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.prototype-badge {
  min-height: 36px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  background: rgba(30, 41, 59, .88);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}

.page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px);
}

.control-panel {
  padding: clamp(18px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

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

.control-heading h2,
.orders-heading h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.order-count {
  padding: 6px 10px;
  color: var(--ink-700);
  background: var(--ink-100);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.control-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-control { min-width: 0; }

.field-label {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 700;
}

.field-label svg,
.date-helper svg,
.icon-text-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.field-control input,
.field-control select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  color: var(--ink-900);
  background: var(--ink-50);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 650;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.field-control input:hover,
.field-control select:hover { border-color: #94a3b8; }

.field-control input:disabled,
.field-control select:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.field-control input:focus,
.field-control select:focus {
  background: #fff;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, .12);
  outline: none;
}

.select-wrap { position: relative; display: block; }

.select-wrap select {
  padding-right: 48px;
  appearance: none;
}

.select-wrap > svg {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 21px;
  height: 21px;
  color: var(--ink-600);
  pointer-events: none;
  transform: translateY(-50%);
}

.date-helper {
  margin: 16px 0 0;
  padding: 11px 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-size: 13px;
}

.control-error {
  min-height: 0;
  margin-bottom: 0;
}

.orders-section { margin-top: clamp(26px, 4vw, 42px); }

.orders-heading { margin-bottom: 16px; }

.icon-text-button {
  min-height: 44px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink-700);
  background: transparent;
  border: 1px solid var(--ink-300);
  border-radius: 10px;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.icon-text-button:hover { background: var(--ink-100); border-color: #94a3b8; }

.icon-text-button:disabled {
  cursor: wait;
  opacity: .56;
}

.loading-state {
  padding: 18px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
}

.loading-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-700);
}

.loading-heading > div { min-width: 0; }
.loading-heading strong { display: block; color: var(--ink-900); font-size: 15px; }
.loading-heading span:last-child { display: block; margin-top: 1px; font-size: 13px; }

.loading-spinner,
.button-spinner {
  flex: 0 0 auto;
  border: 3px solid var(--blue-100);
  border-top-color: var(--blue-700);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.loading-spinner { width: 30px; height: 30px; }

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

.skeleton-card {
  min-height: 278px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-card > * {
  display: block;
  margin: 0;
  background: linear-gradient(90deg, var(--ink-100) 25%, #e4eaf1 45%, var(--ink-100) 65%);
  background-size: 240% 100%;
  border-radius: 8px;
  animation: skeleton-sweep 1.3s ease-in-out infinite;
}

.skeleton-card i { height: 20px; }
.skeleton-card i:first-child { width: 72%; }
.skeleton-card i:nth-child(2) { width: 58%; justify-self: end; }
.skeleton-card b { height: 72px; }
.skeleton-card em { grid-column: 1 / -1; height: 104px; }

.empty-state {
  min-height: 330px;
  padding: 48px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  background: rgba(255,255,255,.76);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-xl);
}

.empty-state[hidden],
.card-grid[hidden] {
  display: none;
}

.empty-illustration {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: 22px;
}

.empty-illustration svg { width: 46px; height: 46px; }
.empty-state h3 { margin: 17px 0 4px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--ink-600); }

.empty-action {
  min-height: 46px;
  margin-top: 18px;
  padding: 10px 18px;
  color: #fff;
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
  border-radius: 10px;
  font-weight: 800;
}

.empty-action:hover { filter: brightness(.92); }

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

.order-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.order-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(15,23,42,.06), 0 16px 36px rgba(15,23,42,.08);
}

.card-main { padding: 18px; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-head > div:first-child { flex: 1 1 auto; min-width: 0; }

.work-order-label {
  display: block;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
}

.work-order-no {
  margin: 3px 0 0;
  color: var(--ink-950);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(18px, 2.3vw, 21px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.style-badge {
  flex: 0 0 44%;
  max-width: 44%;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 9px;
  overflow-wrap: anywhere;
  text-align: right;
}

.style-badge-label {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
}

.style-badge-value {
  margin-top: 2px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(16px, 1.7vw, 18px);
  font-weight: 900;
  line-height: 1.2;
}

.metric-grid {
  margin: 17px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink-200);
  border-radius: 12px;
}

.metric {
  min-width: 0;
  padding: 11px 12px;
}

.metric:nth-child(odd) { border-right: 1px solid var(--ink-200); }
.metric:nth-child(n+3) { border-top: 1px solid var(--ink-200); }

.metric dt {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 650;
}

.metric dd {
  margin: 2px 0 0;
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric.remaining dd { color: var(--amber-700); }
.metric.today-output dd { color: var(--green-700); }

.target-block {
  margin-top: 14px;
  padding: 13px;
  background: var(--blue-50);
  border: 1px solid #bae6fd;
  border-radius: 12px;
}

.target-block.is-empty {
  color: var(--ink-600);
  background: var(--ink-50);
  border-color: var(--ink-200);
}

.target-head,
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.target-label {
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 700;
}

.target-value {
  color: var(--blue-700);
  font-size: 20px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.target-block.is-empty .target-value { color: var(--ink-600); font-size: 14px; }

.progress-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  background: #dbeafe;
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  background: var(--blue-600);
  border-radius: inherit;
  transition: transform 260ms ease;
  transform-origin: left;
}

.progress-fill.is-over { background: var(--green-600); }

.progress-meta {
  margin-top: 7px;
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 650;
}

.over-badge {
  padding: 2px 6px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  font-weight: 800;
}

.selected-date-state {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-600);
  font-size: 12px;
}

.selected-date-state svg { width: 17px; height: 17px; }
.selected-date-state.has-target { color: var(--green-700); }
.selected-date-state.no-target { color: var(--amber-700); }

.card-actions {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--ink-50);
  border-top: 1px solid var(--ink-200);
}

.action-button {
  min-height: 50px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  font-weight: 800;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.action-button svg { width: 20px; height: 20px; flex: 0 0 auto; }

.target-button {
  color: var(--blue-700);
  background: #fff;
  border: 1px solid #7dd3fc;
}

.target-button:hover:not(:disabled) { background: var(--blue-50); border-color: var(--blue-600); }

.report-button {
  color: #fff;
  background: var(--green-700);
  border: 1px solid var(--green-700);
}

.report-button:hover:not(:disabled) { background: #065f46; border-color: #065f46; }

.action-button:active:not(:disabled) { transform: scale(.98); }

.action-button:disabled {
  color: var(--ink-500);
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  cursor: not-allowed;
  opacity: .82;
}

.sheet-layer {
  position: fixed;
  z-index: var(--z-sheet);
  inset: 0;
  display: grid;
  place-items: end center;
}

.sheet-layer[hidden] { display: none; }

.sheet-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(2, 6, 23, .58);
  border: 0;
  backdrop-filter: blur(3px);
  animation: fade-in 180ms ease-out both;
}

.quantity-sheet {
  position: relative;
  width: min(100%, 620px);
  max-height: min(92dvh, 780px);
  padding: 12px clamp(18px, 4vw, 30px) calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: #fff;
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-sheet);
  animation: sheet-in 240ms cubic-bezier(.2,.8,.2,1) both;
}

.sheet-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 15px;
  background: var(--ink-300);
  border-radius: 999px;
}

.sheet-head { display: flex; align-items: center; gap: 12px; }

.sheet-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 13px;
}

.sheet-icon.report { color: var(--green-700); background: var(--green-100); }
.sheet-icon svg { width: 25px; height: 25px; }

.sheet-title-block { flex: 1; min-width: 0; }
.sheet-title-block h2 { margin: 0; font-size: 23px; line-height: 1.2; }

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--ink-600);
  background: var(--ink-100);
  border: 0;
  border-radius: 50%;
}

.icon-button:hover { background: var(--ink-200); }
.icon-button svg { width: 22px; height: 22px; }

.sheet-context {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 14px;
}

.sheet-context > div { min-width: 0; padding: 11px 13px; }
.sheet-context > div:nth-child(odd) { border-right: 1px solid var(--ink-200); }
.sheet-context > div:nth-child(n+3) { border-top: 1px solid var(--ink-200); }
.sheet-context span { display: block; color: var(--ink-500); font-size: 12px; }
.sheet-context strong { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 14px; }

.sheet-context > .sheet-target-context {
  grid-column: 1 / -1;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--blue-50);
  border-top: 1px solid #bae6fd;
  border-right: 0;
}

.sheet-context > .sheet-target-context strong {
  margin: 0;
  color: var(--blue-700);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.sheet-target-context[hidden] { display: none; }

.quantity-field { margin-top: 22px; }
.quantity-field > label { display: block; margin-bottom: 8px; font-weight: 800; }

.quantity-input-wrap {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  overflow: hidden;
  border: 2px solid var(--ink-300);
  border-radius: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.quantity-input-wrap:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, .12);
}

.quantity-input-wrap button {
  min-height: 58px;
  display: grid;
  place-items: center;
  color: var(--ink-700);
  background: var(--ink-100);
  border: 0;
}

.quantity-input-wrap button:hover { background: var(--ink-200); }
.quantity-input-wrap button svg { width: 23px; height: 23px; }

.quantity-input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink-950);
  background: #fff;
  border: 0;
  border-right: 1px solid var(--ink-200);
  border-left: 1px solid var(--ink-200);
  outline: 0;
  font-size: 27px;
  font-weight: 850;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}

.quantity-input-wrap input::-webkit-inner-spin-button { appearance: none; }

.quantity-meta {
  min-height: 38px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-500);
  font-size: 12px;
}

.quantity-meta button {
  min-height: 44px;
  padding: 5px 8px;
  color: var(--blue-700);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.quantity-meta button:hover { background: var(--blue-50); }

.field-error {
  min-height: 22px;
  margin: 3px 0 0;
  color: var(--red-700);
  font-size: 13px;
  font-weight: 700;
}

.sheet-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(170px, 1.3fr);
  gap: 10px;
}

.secondary-button,
.primary-button {
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 850;
}

.secondary-button {
  color: var(--ink-700);
  background: #fff;
  border: 1px solid var(--ink-300);
}

.secondary-button:hover { background: var(--ink-100); }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
}

.primary-button.report { background: var(--green-700); border-color: var(--green-700); }
.primary-button:hover { filter: brightness(.92); }
.primary-button:disabled { cursor: wait; opacity: .64; }

.button-spinner {
  width: 19px;
  height: 19px;
  border-width: 2px;
  border-color: rgba(255,255,255,.35);
  border-top-color: #fff;
}

.submit-status {
  min-height: 42px;
  margin: 2px 0 0;
  padding: 9px 12px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  min-height: 50px;
  width: min(calc(100% - 32px), 420px);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: var(--ink-900);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(15,23,42,.28);
  font-weight: 750;
  text-align: center;
  animation: toast-in 200ms ease-out both;
}

.toast[hidden] { display: none; }
.toast svg { width: 21px; height: 21px; color: #6ee7b7; flex: 0 0 auto; }
.toast[data-type="error"] svg { color: #fca5a5; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes skeleton-sweep { to { background-position: -120% 0; } }
@keyframes sheet-in { from { opacity: .6; transform: translateY(42px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 1080px) {
  .card-grid,
  .loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .header-inner { min-height: 68px; }
  .brand-mark { width: 40px; height: 40px; }
  .prototype-badge { padding: 6px 9px; font-size: 11px; }
  .prototype-badge .status-dot { display: none; }
  .page-shell { padding: 16px; }
  .control-panel { padding: 17px; border-radius: 18px; }
  .control-heading { align-items: flex-start; }
  .control-grid { grid-template-columns: 1fr; gap: 13px; }
  .orders-section { margin-top: 28px; }
  .card-grid,
  .loading-grid { grid-template-columns: 1fr; gap: 14px; }
  .skeleton-card:nth-child(n+2) { display: none; }
  .order-card:hover { box-shadow: var(--shadow-card); }
  .quantity-sheet { width: 100%; }
}

@media (max-width: 430px) {
  .prototype-badge { max-width: 104px; white-space: normal; line-height: 1.15; text-align: center; }
  .control-heading h2, .orders-heading h2 { font-size: 20px; }
  .order-count { font-size: 12px; }
  .card-main { padding: 16px; }
  .sheet-context { grid-template-columns: 1fr; }
  .sheet-context > div:nth-child(odd) { border-right: 0; }
  .sheet-context > div + div { border-top: 1px solid var(--ink-200); }
  .quantity-meta { align-items: flex-start; }
  .sheet-actions { grid-template-columns: .78fr 1.22fr; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .quantity-sheet {
    max-height: 100dvh;
    border-radius: 18px 18px 0 0;
  }

  .sheet-context { margin-top: 12px; }
  .quantity-field { margin-top: 14px; }
}

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