[hidden] {
  display: none !important;
}
.product-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.main {
  width: 100%;
}
.product-cell strong,
.account-list strong {
  overflow-wrap: anywhere;
}
.stock-desktop table,
.product-desktop table {
  table-layout: fixed;
}
.void-button {
  margin: 6px 0 0 8px;
  min-height: 46px;
}
.voided {
  color: var(--muted);
}
.rate-list > div {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}
.rate-list button {
  margin-left: auto;
}
.account-list article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.account-list small {
  display: block;
  overflow-wrap: anywhere;
}
.account-list .actions {
  margin: 0;
}
.future-entry {
  margin-bottom: 20px;
}
.ai-box {
  width: 100%;
  justify-content: space-between;
}
.entry-panel .error-text {
  grid-column: 1/-1;
}
#stock-search {
  max-width: 420px;
}
dialog {
  max-height: 90dvh;
  overflow: auto;
}
#dialog-form > .field-grid {
  margin-top: 22px;
}
#dialog-form .error-text {
  margin: 12px 0;
}
.error-text:empty {
  display: none;
}
.error-text {
  overflow-wrap: anywhere;
}
.login-form .helper {
  margin-top: 14px;
}
.login-form button {
  width: 100%;
}
.record-table {
  table-layout: fixed;
}
.record-table td {
  overflow-wrap: anywhere;
}
.record-table th:nth-child(1) {
  width: 17%;
}
.record-table th:nth-child(2) {
  width: 32%;
}
.metric strong {
  overflow-wrap: anywhere;
}
.step-indicator {
  list-style: none;
}
.account-list .actions {
  flex-wrap: wrap;
}
input[type="file"] {
  padding: 10px 6px;
}
.actions button {
  min-height: 46px;
}
.settings-grid .accounts-panel .actions button {
  width: auto;
}
@media (max-width: 760px) {
  .entry-panel label:has(#entry-currency) {
    display: grid;
  }
  .entry-panel .form-section[data-step="2"] .field-grid {
    grid-template-columns: 1fr;
  }
  .entry-panel .field-grid .wide {
    grid-column: auto;
  }
  .account-list article {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-list .actions {
    width: 100%;
  }
  .record-table,
  .record-table tbody {
    display: block;
  }
  .record-table tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }
  .record-table td {
    min-width: 0;
  }
  .record-table td:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }
  .record-table td:last-child small {
    flex-basis: 100%;
  }
  .record-table th:nth-child(1),
  .record-table th:nth-child(2) {
    width: auto;
  }
  .metric:last-child {
    gap: 12px;
  }
  .counts {
    gap: 12px;
  }
  .toolbar {
    display: flex;
  }
  #stock-search {
    max-width: 100%;
  }
  .login-story h1 {
    font-size: 32px;
  }
  .inventory-card .card-bottom {
    flex-wrap: wrap;
  }
  .topbar .brand {
    font-size: 16px;
  }
  .topbar {
    gap: 8px;
  }
  .main {
    overflow-wrap: anywhere;
  }
  .settings-grid .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel-title {
    flex-wrap: wrap;
  }
  .record-table td:nth-child(3) {
    text-align: right;
  }
  .record-table .void-button {
    margin: 0 0 0 auto;
  }
  .step-controls {
    grid-column: 1/-1;
  }
  .entry-panel .subtotal {
    align-items: flex-start;
  }
  .step-indicator span {
    padding: 8px 4px;
  }
  .rate-list > div {
    gap: 12px;
  }
}
/* 给浏览器缩放下的触控尺寸留出余量。 */
.void-button {
  min-height: 46px;
}
dialog .actions {
  position: sticky;
  bottom: -22px;
  background: var(--paper);
  padding: 12px 0;
  z-index: 1;
}
.quick-operations small {
  display: block;
}
.spaced {
  margin-top: 24px;
}
.notice {
  padding: 16px;
  background: #edf2e9;
  border: 1px solid #c9d8bd;
  border-radius: 8px;
}
.warning {
  color: #8d3d1f;
  background: #fff3e4;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.check-label input {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.document-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.original-image {
  position: sticky;
  top: 90px;
}
.original-image img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
}
.review-line {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.review-line.unmatched {
  border-left: 4px solid #b94a32;
  padding-left: 12px;
}
.question-examples {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.opening-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.opening-row span {
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
button,
.button,
summary {
  min-height: 46px;
}
input,
textarea,
select {
  scroll-margin-bottom: 140px;
}
.main {
  min-width: 0;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
}
@media (max-width: 760px) {
  .review-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .original-image {
    position: static;
  }
  .original-image img {
    max-height: 360px;
  }
  .main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .review-line .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .question-examples button {
    width: 100%;
    text-align: left;
  }
  .rate-list > div {
    flex-wrap: wrap;
    padding: 12px 0;
  }
  dialog {
    max-width: calc(100vw - 24px);
  }
}
/* 比 44px 多留余量，浏览器缩放后的像素取整也不会缩小点击区域。 */
body[data-variant="C"] button,
body[data-variant="C"] .button,
body[data-variant="C"] summary {
  min-height: 46px;
}

/* 切换页面时保留内容，并给出看得见的等待提示。 */
.main[aria-busy="true"]::before {
  content: "正在加载，请稍候…";
  position: fixed;
  top: calc(72px + env(safe-area-inset-top));
  right: 20px;
  z-index: 80;
  padding: 12px 18px;
  border: 1px solid #b7cec0;
  border-radius: 8px;
  color: #234f3d;
  background: #f7fbf6;
  box-shadow: 0 3px 12px #234f3d18;
}
