/* 交互区域优先，商品分组折叠；同时覆盖窄手机、平板与桌面。 */
.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  pointer-events: none;
  vertical-align: middle;
}
.primary,
.secondary,
.text-btn,
.expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.primary.full {
  display: flex;
}
.warehouse,
.menu-caret,
.icon,
.info-symbol,
.sku-foot small,
.version-amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.warehouse .ui-icon,
.menu-caret .ui-icon,
.expand .ui-icon,
.cart-fold .ui-icon,
.sku-foot .ui-icon {
  width: 14px;
  height: 14px;
}
.menu-caret {
  line-height: 1;
}
.user[aria-expanded="true"] .menu-caret .ui-icon {
  transform: rotate(180deg);
}
.expand,
.cart-fold {
  gap: 4px;
  line-height: 1.4;
}
.expand {
  white-space: nowrap;
}
.cart-fold {
  font-size: 12px;
  flex-direction: row;
}
.qty button,
.close,
.remove-variant {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.qty .ui-icon {
  width: 14px;
  height: 14px;
}
.close {
  width: 36px;
  min-height: 36px;
  padding: 0;
}
.close:hover,
.remove-variant:hover {
  background: #f0f4fa;
}
.success-mark .ui-icon {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}
.outline-icon .ui-icon {
  width: 24px;
  height: 24px;
}
.version-amount {
  justify-content: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
}
.qr-error {
  padding: 26px 10px;
  color: #6c7d96;
  font-size: 13px;
  line-height: 1.8;
}
.mobile-cart > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.modal-head {
  flex-shrink: 0;
}
.modal {
  position: relative;
}
.modal-notice {
  display: none;
  position: absolute;
  z-index: 5;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  background: #26364deb;
  color: #fff;
  font-size: 13px;
  line-height: 1.7;
  border-radius: 9px;
  padding: 9px 16px;
  box-shadow: 0 5px 18px #15233e20;
  text-align: left;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.modal-notice.visible {
  display: block;
}
.summary-grid .pill {
  display: inline-flex;
  width: auto;
  font-size: 11px;
  max-width: 100%;
}
.version-back {
  margin: 10px 0;
}
.detail-line .qty-note {
  display: block;
  white-space: nowrap;
}
body.has-modal {
  overflow: hidden;
}
.password-dialog .password-intro {
  margin: 0 0 22px;
}
.modal-backdrop.cart-drawer {
  padding: 0;
}
.search {
  min-width: 0;
  display: flex;
  align-items: center;
}
.search input {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0;
  min-height: 42px;
}
.search button {
  flex: 0 0 72px !important;
  min-width: 72px;
  min-height: 42px;
  white-space: nowrap;
  line-height: 1.3;
}
.cart-group {
  border-bottom: 1px solid #e9eef5;
}
.cart-group:last-child {
  border-bottom: 0;
}
.cart-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 17px 0;
  text-align: left;
}
.cart-group-head > img {
  width: 42px;
  height: 53px;
  object-fit: contain;
  background: #f2f5f8;
  border-radius: 7px;
  flex-shrink: 0;
}
.cart-group-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cart-group-title strong {
  font-weight: 600;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.cart-group-title small {
  font-size: 10px;
  color: #9ca9bc;
  overflow-wrap: anywhere;
}
.cart-group-summary {
  font-size: 11px;
  color: #637fa9;
}
.cart-fold {
  font-size: 10px;
  color: #8298b7;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 39px;
}
.cart-variants {
  margin: 0 0 14px;
  padding: 3px 10px;
  background: #f8faff;
  border: 1px solid #edf2fa;
  border-radius: 8px;
}
.cart-variant {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  padding: 11px 0;
  border-bottom: 1px solid #e7eef8;
}
.cart-variant:last-child {
  border-bottom: 0;
}
.cart-variant-name {
  font-size: 11px;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #8597af;
  overflow-wrap: anywhere;
}
.cart-variant-name strong {
  font-size: 11px;
  font-weight: 500;
  color: #4e668c;
}
.cart-variant-edit {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.remove-variant {
  font-size: 18px;
  color: #a6b3c5;
  min-width: 27px;
  min-height: 33px;
  padding: 0;
  line-height: 1;
}
.cart-list {
  padding: 0 16px;
  max-height: min(50vh, 470px);
  overscroll-behavior: contain;
}
.cart-bottom {
  border-top: 1px solid #edf1f6;
}
.cart-drawer .cart-head {
  display: none;
}
.cart-drawer .modal-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.cart-drawer .cart {
  display: flex;
  flex-direction: column;
  position: static;
  border: 0;
  border-radius: 0;
  min-height: 0;
  max-height: calc(90dvh - 66px);
}
.cart-drawer .cart-list {
  flex: 1;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding: 0 20px;
}
.cart-drawer .cart-bottom {
  flex-shrink: 0;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.product-top > div {
  min-width: 0;
}
.history-row > * {
  min-width: 0;
}
.modal-body {
  overscroll-behavior: contain;
}
@media (min-width: 761px) and (max-width: 900px) {
  .workspace {
    display: block;
  }
  .workspace > .side-column {
    display: none;
  }
  .layout main {
    padding-bottom: 105px;
  }
  .mobile-cart {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 98px;
    right: 24px;
    z-index: 24;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: #203b70;
    color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px #15254b29;
    font-size: 13px;
  }
  .mobile-cart b {
    margin-right: 9px;
    background: #456095;
    padding: 3px 7px;
    border-radius: 5px;
  }
  .mobile-cart small {
    margin-left: 10px;
    color: #a5bbdf;
  }
}
@media (max-width: 760px) {
  html,
  body,
  #app {
    width: 100%;
    min-width: 0;
  }
  header {
    padding: 0 14px;
    gap: 10px;
  }
  .brand {
    gap: 8px;
  }
  .brand strong {
    font-size: 15px;
  }
  .brand small {
    letter-spacing: 1.4px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .header-right {
    flex-shrink: 0;
  }
  .warehouse {
    font-size: 9px;
    white-space: nowrap;
  }
  .layout main {
    padding: 23px 12px calc(155px + env(safe-area-inset-bottom, 0px));
  }
  .workspace,
  .panel,
  .toolbar,
  .search,
  .product-row {
    min-width: 0;
    max-width: 100%;
  }
  .toolbar {
    gap: 12px;
    padding: 13px;
  }
  .search {
    width: 100%;
    gap: 9px;
  }
  .search button {
    flex-basis: 68px !important;
    min-width: 68px;
    padding: 10px 12px !important;
  }
  .search input {
    font-size: 16px !important;
    padding: 10px;
  }
  .search input::placeholder {
    font-size: 12px;
  }
  .checkbox {
    min-height: 28px;
    font-size: 11px;
  }
  .product-top {
    grid-template-columns: 46px minmax(0, 1fr) 66px 60px !important;
    gap: 8px !important;
    padding: 15px 11px;
  }
  .product-img {
    width: 44px !important;
    height: 60px;
  }
  .product-title {
    font-size: 12px;
    line-height: 1.65;
  }
  .expand {
    min-height: 44px;
    min-width: 54px;
    font-size: 12px;
  }
  .sku-area {
    padding: 12px 10px;
  }
  .sku-tools {
    font-size: 10px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .sku-tools input {
    min-height: 36px;
    width: 48px;
    padding: 6px 3px;
  }
  .sku-tools button {
    min-height: 36px;
    font-size: 10px;
    padding: 6px 8px;
  }
  .sku-table {
    table-layout: fixed;
    width: 100%;
    font-size: 11px;
  }
  .sku-table th,
  .sku-table td {
    padding: 10px 3px;
    overflow-wrap: anywhere;
  }
  .sku-table th:first-child {
    width: 24px;
  }
  .sku-table th:nth-child(2) {
    width: 52px;
  }
  .sku-table th:nth-child(3) {
    width: 32px;
  }
  .sku-table th:nth-child(4) {
    width: 69px;
  }
  .sku-table th:last-child {
    width: 99px;
    text-align: right;
  }
  .sku-table td .pill {
    font-size: 9px;
    padding: 5px 4px;
  }
  .sku-table input[type="checkbox"] {
    height: 18px;
    width: 18px;
    margin: 0;
  }
  .qty button {
    min-height: 34px;
    width: 28px !important;
    padding: 0;
    font-size: 14px;
  }
  .qty input {
    width: 38px !important;
    height: 34px;
    padding: 4px 1px;
    font-size: 16px !important;
  }
  .sku-foot {
    gap: 8px;
  }
  .sku-foot .primary {
    min-height: 40px;
  }
  .cart-group-title strong {
    font-size: 13px;
  }
  .cart-group-head {
    padding: 17px 0;
    gap: 12px;
  }
  .cart-group-head > img {
    width: 45px;
    height: 56px;
  }
  .cart-group-title small {
    font-size: 10px;
  }
  .cart-fold {
    font-size: 12px;
    min-width: 46px;
    min-height: 46px;
  }
  .cart-variants {
    padding: 2px 12px;
  }
  .cart-variant {
    padding: 9px 0;
    gap: 10px;
  }
  .cart-variant-name {
    font-size: 12px;
  }
  .cart-variant-name strong {
    font-size: 12px;
  }
  .cart-variant .qty button {
    height: 38px;
    width: 32px !important;
  }
  .cart-variant .qty input {
    height: 38px;
    width: 47px !important;
  }
  .remove-variant {
    width: 38px;
    min-height: 40px;
    font-size: 20px;
  }
  .cart-variant-edit {
    gap: 4px;
  }
  .cart-drawer .modal {
    width: 100%;
    max-height: 92dvh;
    border-radius: 15px 15px 0 0;
  }
  .cart-drawer .cart {
    max-height: calc(92dvh - 65px);
  }
  .mobile-cart {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    min-height: 51px;
  }
  .layout aside {
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    gap: 34px !important;
  }
  .layout aside button {
    min-width: 104px !important;
    min-height: 48px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal-body {
    padding: 19px 17px;
  }
  .summary-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 10px;
  }
  .summary-grid strong {
    overflow-wrap: anywhere;
  }
  .modal-footer {
    flex-wrap: wrap;
    gap: 9px;
  }
  .modal-footer button {
    flex: 1;
    min-height: 42px;
    white-space: nowrap;
  }
  .detail-line .grow {
    min-width: 0;
  }
  .detail-line .name,
  .detail-line .variant {
    overflow-wrap: anywhere;
  }
  .detail-line .amount {
    flex-shrink: 0;
    max-width: 42%;
    overflow-wrap: anywhere;
  }
  .tabs button {
    white-space: nowrap;
    min-height: 38px;
  }
  .history-toolbar {
    padding: 12px 10px;
    gap: 4px;
    align-items: flex-start;
  }
  .history-toolbar .tabs {
    gap: 0;
    flex: 1;
  }
  .history-toolbar .tabs button {
    font-size: 10px;
    padding: 8px;
  }
  .history-toolbar > .text-btn {
    min-height: 38px;
    padding: 8px 2px;
    font-size: 10px;
  }
  .history-row {
    padding: 17px 13px;
  }
  .history-row time {
    margin-left: 0;
  }
  .password-dialog .form-field input {
    min-height: 45px;
    font-size: 16px !important;
  }
  .password-actions button {
    min-height: 43px;
    flex: 1;
  }
}
@media (max-width: 359px) {
  .warehouse {
    display: none;
  }
  .product-top {
    grid-template-columns: 40px minmax(0, 1fr) 60px 54px !important;
    gap: 6px !important;
    padding: 13px 8px;
  }
  .product-img {
    width: 39px !important;
  }
  .product-title {
    font-size: 11px;
  }
  .sku-area {
    padding: 11px 6px;
  }
  .sku-table th:first-child {
    width: 21px;
  }
  .sku-table th:nth-child(2) {
    width: 43px;
  }
  .sku-table th:nth-child(3) {
    width: 27px;
  }
  .sku-table th:nth-child(4) {
    width: 59px;
  }
  .sku-table th:last-child {
    width: 94px;
  }
  .sku-table th,
  .sku-table td {
    padding: 10px 2px;
  }
  .sku-table .qty button {
    width: 25px !important;
  }
  .sku-table .qty input {
    width: 34px !important;
  }
  .history-toolbar .tabs button {
    padding: 8px 6px;
    font-size: 9px;
  }
}
/* 颜色固定在左，尺码横向输入；滚动限定在表格内。 */
.matrix-area {
  min-width: 0;
  overflow: hidden;
}
.matrix-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.matrix-tools label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.matrix-tools input {
  width: 64px;
  min-height: 40px;
  text-align: center;
}
.matrix-tools button {
  min-height: 40px;
}
.matrix-tools .size-jump {
  margin-left: auto;
}
.size-jump select {
  max-width: 120px;
  min-height: 40px;
  border: 1px solid #dbe1eb;
  border-radius: 7px;
  padding: 5px 9px;
  background: white;
}
.matrix-hint {
  font-size: 12px;
  color: #64748b;
  margin: 12px 0;
  line-height: 1.6;
}
.matrix-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  position: relative;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.sku-matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}
.sku-matrix th,
.sku-matrix td {
  padding: 10px 8px;
  border-right: 1px solid #e7ebf2;
  border-bottom: 1px solid #e7ebf2;
  text-align: center;
  vertical-align: middle;
  min-width: 100px;
  background: white;
}
.sku-matrix thead th {
  background: #f3f6fb;
  font-size: 13px;
}
.sku-matrix .matrix-color {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  overflow-wrap: anywhere;
  background: #f8fafc;
  box-shadow: 2px 0 4px #1020400a;
  font-size: 12px;
}
.sku-matrix thead .matrix-color {
  z-index: 3;
}
.matrix-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.matrix-cell .pill {
  font-size: 10px;
  padding: 3px 6px;
  white-space: nowrap;
}
.matrix-cell input {
  width: 76px;
  min-height: 44px;
  border: 1px solid #bdc9db;
  border-radius: 6px;
  text-align: center;
  background: #fff;
  font-size: 16px;
  color: #172b4d;
}
.matrix-cell input:focus {
  outline: 2px solid #2358d6;
  outline-offset: 1px;
}
.matrix-cell input:disabled {
  background: #f1f3f7;
  color: #94a3b8;
  border-color: #e3e8ef;
}
.matrix-cell small {
  font-size: 10px;
  max-width: 110px;
  overflow-wrap: anywhere;
}
.matrix-missing {
  color: #a1adbd;
}
.matrix-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}
.matrix-foot > span {
  font-size: 12px;
  color: #52647c;
}
.matrix-foot button {
  min-height: 44px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .matrix-area .matrix-tools {
    gap: 8px;
  }
  .matrix-tools label {
    font-size: 12px;
  }
  .matrix-tools .size-jump {
    margin-left: 0;
  }
  .matrix-area .matrix-hint {
    font-size: 11px;
  }
  .sku-matrix th,
  .sku-matrix td {
    min-width: 88px;
    padding: 9px 6px;
  }
  .sku-matrix .matrix-color {
    min-width: 72px;
    max-width: 72px;
    width: 72px;
  }
  .matrix-foot {
    align-items: center;
    gap: 6px;
  }
  .matrix-foot > span {
    font-size: 11px;
  }
}
.sku-layout-switch {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  margin-bottom: 13px;
  background: #f3f6fb;
}
.sku-layout-switch button {
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  color: #52647c;
}
.sku-layout-switch button.active {
  background: #2358d6;
  color: white;
}
.vertical-sizes {
  display: grid;
  gap: 14px;
}
.vertical-color {
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  overflow: hidden;
}
.vertical-color h3 {
  font-size: 13px;
  padding: 12px;
  margin: 0;
  background: #f3f6fb;
}
.vertical-size-row,
.vertical-size-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 88px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.vertical-size-head {
  color: #64748b;
  font-size: 12px;
  background: #fafbfd;
}
.vertical-size-row {
  border-top: 1px solid #e7ebf2;
  font-size: 13px;
}
.vertical-size-row > div {
  min-width: 0;
}
.vertical-size-row small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.vertical-size-row .pill {
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .vertical-size-row,
  .vertical-size-head {
    grid-template-columns: minmax(0, 1fr) 76px 76px;
    gap: 6px;
    padding: 10px 8px;
  }
  .vertical-size-row .matrix-cell input {
    width: 68px;
  }
}
/* 选规格独立面板：商品身份与操作区固定，中间区域独立滚动。 */
body.has-modal .mobile-cart {
  display: none !important;
}
.sku-dialog .modal.sku-area {
  display: flex;
  flex-direction: column;
  width: min(1080px, 96vw);
  max-width: 1080px;
  height: min(840px, 90dvh);
  max-height: 90dvh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: white;
}
.sku-dialog .modal-head {
  flex: none;
  padding: 16px 20px;
  gap: 12px;
}
.sku-dialog .modal-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
}
.sku-dialog .modal-head h2 img {
  width: 48px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f7fb;
  flex: none;
}
.sku-dialog .modal-head h2 span {
  min-width: 0;
}
.sku-dialog .modal-head strong {
  display: block;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.sku-dialog .modal-head small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: #64748b;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.sku-panel-controls {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid #e5eaf2;
  background: white;
}
.sku-panel-controls .sku-layout-switch {
  margin: 0;
}
.sku-panel-controls .size-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.sku-dialog .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px;
  overscroll-behavior-y: contain;
}
.sku-dialog .matrix-area {
  overflow: visible;
}
.sku-bulk {
  margin-bottom: 12px;
  border: 1px solid #e1e6ef;
  border-radius: 7px;
  padding: 9px 12px;
}
.sku-bulk summary {
  cursor: pointer;
  font-size: 12px;
  color: #52647c;
}
.sku-bulk[open] summary {
  margin-bottom: 10px;
}
.sku-dialog .modal-footer.matrix-foot {
  flex: none;
  display: flex;
  margin: 0;
  padding: 12px 20px;
  background: white;
  border-top: 1px solid #e1e6ef;
}
.sku-dialog .modal-footer.matrix-foot > span {
  color: #172b4d;
  font-size: 13px;
}
.sku-dialog .modal-footer.matrix-foot button {
  min-width: 150px;
}
.sku-dialog .matrix-scroll {
  border-radius: 7px;
}
@media (max-width: 760px) {
  .modal-backdrop.sku-dialog {
    padding: 0;
    align-items: stretch;
  }
  .sku-dialog .modal.sku-area {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .sku-dialog .modal-head {
    padding: 12px 14px;
  }
  .sku-dialog .modal-head strong {
    font-size: 14px;
  }
  .sku-dialog .modal-head h2 img {
    width: 40px;
    height: 46px;
  }
  .sku-panel-controls {
    padding: 9px 12px;
    gap: 6px;
  }
  .sku-panel-controls .sku-layout-switch button {
    padding: 7px 11px;
    min-height: 38px;
    font-size: 12px;
  }
  .sku-panel-controls .size-jump {
    font-size: 11px;
  }
  .sku-panel-controls select {
    max-width: 78px;
    min-height: 38px;
  }
  .sku-dialog .modal-body {
    padding: 12px;
  }
  .sku-dialog .modal-footer.matrix-foot {
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  .sku-dialog .modal-footer.matrix-foot > span {
    font-size: 12px;
  }
  .sku-dialog .modal-footer.matrix-foot button {
    min-width: 125px;
    min-height: 46px;
  }
}
/* 录入工具统一基线，压缩标签和数量框的纵向留白。 */
.sku-dialog .sku-bulk .matrix-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 48px;
  align-items: center;
  gap: 8px;
  max-width: 400px;
}
.sku-dialog .sku-bulk .matrix-tools label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
}
.sku-dialog .sku-bulk .matrix-tools input {
  width: 64px;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  padding: 5px;
  margin: 0;
  font-size: 16px;
}
.sku-dialog .sku-bulk .matrix-tools button {
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  margin: 0;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.sku-dialog .sku-bulk .matrix-tools .text-btn {
  border: 1px solid #dbe3ef;
  color: #52647c;
  background: #fff;
}
.sku-dialog .sku-matrix th,
.sku-dialog .sku-matrix td {
  padding: 7px 6px;
}
.sku-dialog .sku-matrix thead th {
  padding: 10px 6px;
}
.sku-dialog .matrix-cell {
  gap: 4px;
}
.sku-dialog .matrix-cell input {
  height: 38px;
  min-height: 38px;
  padding: 5px;
}
.sku-dialog .matrix-cell .pill {
  line-height: 16px;
  padding: 1px 5px;
}
.sku-dialog .vertical-size-row {
  padding: 7px 10px;
}
.sku-dialog .vertical-size-row strong {
  font-size: 12px;
  line-height: 18px;
}
.sku-dialog .vertical-size-row small {
  margin-top: 1px;
  font-size: 9px;
  line-height: 12px;
}
.sku-dialog .vertical-size-head {
  padding: 8px 10px;
}
.sku-dialog .vertical-color h3 {
  padding: 9px 10px;
}
.sku-dialog .vertical-sizes {
  gap: 10px;
}
@media (max-width: 359px) {
  .sku-dialog .sku-bulk .matrix-tools {
    grid-template-columns: minmax(0, 1fr) 56px 42px;
    gap: 6px;
  }
  .sku-dialog .sku-bulk .matrix-tools label {
    gap: 6px;
    font-size: 11px;
  }
  .sku-dialog .sku-bulk .matrix-tools input {
    width: 54px;
  }
  .sku-dialog .sku-bulk .matrix-tools button {
    padding: 0 7px;
  }
}
/* 单尺码无需宽矩阵：颜色、库存和数量分成三列，每行约48px。 */
.sku-dialog .sku-single {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.sku-dialog .sku-single th,
.sku-dialog .sku-single td {
  padding: 6px 10px;
  border-bottom: 1px solid #e7ebf2;
  text-align: left;
  vertical-align: middle;
  background: white;
}
.sku-dialog .sku-single thead th {
  height: 38px;
  padding: 7px 10px;
  background: #f3f6fb;
  color: #52647c;
  font-size: 12px;
  font-weight: 500;
}
.sku-dialog .sku-single thead th:nth-child(2) {
  width: 96px;
  text-align: center;
}
.sku-dialog .sku-single thead th:last-child {
  width: 94px;
  text-align: center;
}
.sku-dialog .sku-single tbody th {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.sku-dialog .sku-single td {
  text-align: center;
}
.sku-dialog .sku-single .matrix-cell {
  flex-direction: row;
  justify-content: center;
}
.sku-dialog .sku-single .matrix-cell input {
  width: 68px;
  height: 34px;
  min-height: 34px;
  padding: 4px;
  margin: 0;
  font-size: 16px;
}
.sku-dialog .sku-single .pill {
  font-size: 10px;
  padding: 2px 6px;
  line-height: 16px;
  white-space: nowrap;
}
.sku-dialog .sku-single tbody tr:last-child > * {
  border-bottom: 0;
}
@media (max-width: 359px) {
  .sku-dialog .sku-single th,
  .sku-dialog .sku-single td {
    padding: 6px 7px;
  }
  .sku-dialog .sku-single thead th:nth-child(2) {
    width: 80px;
  }
  .sku-dialog .sku-single thead th:last-child {
    width: 82px;
  }
}
body.has-photo {
  overflow: hidden;
}
img[data-photo] {
  cursor: zoom-in;
}
img[data-photo]:focus-visible {
  outline: 2px solid #2358d6;
  outline-offset: 3px;
}
.photo-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #131923;
  color: #fff;
}
.photo-viewer[open] {
  display: flex;
  flex-direction: column;
}
.photo-viewer::backdrop {
  background: #000b;
}
.photo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 10px;
  padding: 12px 16px;
  background: #1e2735;
}
.photo-toolbar > span {
  font-size: 14px;
}
.photo-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.photo-toolbar button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  color: white;
  background: #354358;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
}
.photo-toolbar [data-photo-action="close"] {
  display: grid;
  place-items: center;
  padding: 10px;
}
.photo-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
}
.photo-large {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: center;
  transform: translate(-50%, -50%);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}
.photo-stage.can-pan {
  cursor: grab;
}
.photo-stage.can-pan:active {
  cursor: grabbing;
}
.photo-toolbar small {
  display: block;
  margin-top: 4px;
  color: #a5b4cc;
  font-size: 11px;
}
.photo-error {
  padding: 24px;
  font-size: 14px;
  color: #e2e8f0;
}
header .brand {
  min-width: 0;
  gap: 8px;
}
header .brand > div {
  min-width: 0;
}
header .brand strong {
  font-size: 15px;
  line-height: 1.35;
  white-space: normal;
}
@media (max-width: 600px) {
  header .brand {
    flex: 1;
  }
  header .brand img {
    width: 30px;
  }
  header .brand strong {
    font-size: 13px;
    max-width: 160px;
  }
  header .header-right {
    flex: none;
    gap: 8px;
  }
  header .warehouse {
    display: none;
  }
}
.category-filter {
  min-width: 160px;
  max-width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fff;
}
.category-filter summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  min-height: 42px;
  list-style: none;
  cursor: pointer;
  font-size: 12px;
}
.category-filter summary::-webkit-details-marker {
  display: none;
}
.category-filter summary > span {
  color: #64748b;
  flex: 1;
  font-size: 11px;
}
.category-filter summary .ui-icon {
  width: 14px;
  height: 14px;
}
.category-filter[open] {
  flex-basis: 100%;
  order: 3;
}
.category-filter[open] summary {
  border-bottom: 1px solid #e7ebf2;
}
.category-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 4px 10px;
  max-height: 240px;
  overflow: auto;
  padding: 8px 12px;
}
.category-options-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 11px;
}
.category-options-head button {
  min-height: 36px;
  font-size: 12px;
}
.category-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  min-width: 0;
  font-size: 13px;
  cursor: pointer;
}
.category-option input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: #2358d6;
}
.category-option span {
  overflow-wrap: anywhere;
}
.category-empty {
  font-size: 12px;
  color: #64748b;
}
@media (max-width: 760px) {
  .toolbar .search {
    flex-basis: 100%;
  }
  .category-filter {
    flex: 1;
    min-width: 0;
  }
  .category-filter[open] {
    flex-basis: 100%;
  }
  .category-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
  }
}
.password-wrap {
  align-items: center;
}
.password-wrap input {
  flex: 1;
  min-width: 0;
}
.password-wrap .password-eye {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
}
.password-wrap .password-eye:hover {
  color: #2358d6;
  background: transparent;
}
.password-wrap .password-eye .ui-icon {
  width: 20px;
  height: 20px;
}
.password-wrap .password-eye:focus-visible {
  outline: 2px solid #2358d6;
  outline-offset: 1px;
}
.dealer-watermark {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat;
  background-size: 240px 140px;
  opacity: 0.095;
}
.stock-visibility-dialog .modal { width: min(400px, 100%); border-radius: 18px; }
.stock-visibility-dialog .modal-head { padding: 20px 20px 8px; border-bottom: 0; }
.stock-visibility-dialog .modal-head h2 { font-size: 17px; line-height: 1.5; }
.stock-visibility-dialog .modal-body { padding: 4px 20px 22px; }
.stock-visibility-warning p { margin: 0; text-align: left; font-size: 14px; line-height: 1.8; color: #52647c; }
.stock-visibility-warning .stock-visibility-note { margin-top: 10px; font-size: 12px; color: #8491a5; }
.stock-visibility-dialog .modal-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px 20px; border-top: 0; }
.stock-visibility-dialog .modal-footer button { width: 100%; min-width: 0; min-height: 44px; padding: 10px 8px; margin: 0; font-size: 14px; line-height: 1.5; border-radius: 10px; }
.retail-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; margin-top: 3px; color: #7b8798; font-size: 11px; line-height: 1.45; font-weight: 400; }
.retail-price .retail-price-label { font-weight: 400; }
.retail-price b { color: #52647c; font-size: inherit; font-weight: 600; overflow-wrap: anywhere; }
.sku-dialog .modal-head .retail-price { font-weight: 400; }
.sku-dialog .modal-head .retail-price b { font-weight: 600; }
.product-top .retail-price { margin: 6px 0 4px; line-height: 1.6; font-weight: 400; }
.product-top .retail-price b { font-weight: 600; }
@media (max-width: 760px) {
  .product-top .retail-price { font-size: 9px; }
}
.captcha-dialog .modal {
  width: min(420px, calc(100vw - 24px));
  max-width: 100%;
  min-width: 0;
}
.captcha-dialog .modal-head {
  padding: 13px 18px;
}
.captcha-dialog .modal-head h2 {
  font-size: 16px;
}
.captcha-dialog .modal-body {
  padding: 18px;
  min-width: 0;
}
.captcha-dialog .modal-footer {
  padding: 12px 18px;
  gap: 8px;
}
.captcha-dialog .modal-footer button {
  min-width: 0;
  padding: 9px 11px;
  font-size: 12px;
}
.captcha-prompt {
  color: #334155;
  font-size: 14px;
  margin: 0 0 13px;
  line-height: 1.7;
}
.captcha-board {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 2/1;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #deedf3;
  touch-action: manipulation;
  cursor: crosshair;
}
.captcha-background {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.captcha-piece {
  position: absolute;
  left: 0;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px #0007);
}
.captcha-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.captcha-click-marker {
  position: absolute;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  background: #2358d6;
  border: 2px solid #fff;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  box-shadow: 0 1px 5px #0004;
}
.captcha-slider-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: 10px;
  padding: 15px 0 0;
  color: #64748b;
  font-size: 12px;
}
.captcha-slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 44px;
  margin: 0;
  /* Reset the shared text-input box, including padding applied to ranges on iOS. */
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
  accent-color: #2358d6;
  touch-action: pan-x;
}
.captcha-slider::-webkit-slider-runnable-track {
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #e3eaf5;
}
.captcha-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2358d6;
  box-shadow: 0 2px 7px #2358d640;
}
.captcha-slider::-moz-range-track {
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #e3eaf5;
}
.captcha-slider::-moz-range-thumb {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2358d6;
  box-shadow: 0 2px 7px #2358d640;
}

/* 收藏与查找共用现有商品列表，不挤占手机上的商品名称列。 */
.catalog-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(300px, calc(100% - 28px));
  margin: 14px 14px 0;
  padding: 4px;
  gap: 4px;
  border: 1px solid #e7edf6;
  border-radius: 11px;
  background: #f3f6fb;
}
.catalog-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #74829a;
}
.catalog-tab.active {
  color: #2358d6;
  background: #fff;
  box-shadow: 0 1px 5px #273e5c0d;
  font-weight: 600;
}
.catalog-tab .ui-icon { width: 16px; height: 16px; }
.search .category-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px !important;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0 !important;
  border: 1px solid #dce5f1;
  color: #75849b;
  background: #fff;
  border-radius: 8px;
}
.search .category-toggle.active { color: #2358d6; background: #f0f5ff; border-color: #cbdafa; }
.category-toggle .ui-icon { width: 19px; height: 19px; }
.category-count { position: absolute; top: -5px; right: -5px; min-width: 17px; padding: 1px 4px; border-radius: 999px; background: #2358d6; color: #fff; font-size: 10px; line-height: 15px; }
.category-filter-panel { flex-basis: 100%; width: 100%; min-width: 0; border: 1px solid #e7edf5; border-radius: 9px; background: #f8faff; }
.category-filter-panel[hidden] { display: none; }
.category-filter-panel .category-options { padding: 6px 12px 10px; }
.category-options-head { justify-content: flex-start; flex-wrap: wrap; min-width: 0; gap: 4px 14px; }
.category-options-head .stock-filter { margin: 0; min-height: 24px; gap: 5px; white-space: nowrap; font-size: 11px; }
.category-options-head .stock-filter input { width: 13px; height: 13px; margin: 0; }
.category-options-head > span { font-size: 11px; white-space: nowrap; }
.category-options-head > button { margin-left: auto; min-height: 24px; padding: 0; font-size: 11px; white-space: nowrap; }
.catalog-panel .favorites-empty { text-align: center; }
.favorite-confirm-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 0; }
.favorite-confirm-icon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #eef4ff; color: #2358d6; }
.favorite-confirm-icon .ui-icon { width: 21px; height: 21px; }
.favorite-confirm-item > div { min-width: 0; }
.favorite-confirm-item strong { display: block; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; color: #263c5c; }
.favorite-confirm-item small { display: block; margin-top: 3px; color: #8b98ac; font-size: 11px; overflow-wrap: anywhere; }
.favorite-confirm-note { margin: 6px 0 0; color: #7b89a0; font-size: 12px; line-height: 1.8; text-align: left; }
.product-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.favorite-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #8d9ab0;
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
}
.favorite-button:hover:not(:disabled) { color: #2358d6; border-color: #c6d5ef; background: #f7faff; }
.favorite-button.is-favorite { color: #2358d6; background: #eef4ff; border-color: #d4e2fb; }
.favorite-button.is-favorite .ui-icon { fill: currentColor; }
.favorite-button[aria-busy="true"] { cursor: wait; }
.product-actions .expand { padding: 0; min-width: 0; }
@media (min-width: 761px) {
  .catalog-panel .product-top { grid-template-columns: 66px minmax(0, 1fr) 96px 116px; }
}
@media (max-width: 760px) {
  .catalog-tabs { width: calc(100% - 26px); margin: 12px 13px 0; padding: 3px; border-radius: 9px; }
  .catalog-tab { min-height: 29px; padding: 4px 8px; font-size: 12px; border-radius: 6px; }
  .catalog-tab .ui-icon { width: 14px; height: 14px; }
  .catalog-panel .toolbar { gap: 9px; }
  .catalog-panel .search .category-toggle { flex-basis: 38px !important; width: 38px; min-width: 38px; }
  .product-actions { flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; }
  .product-actions .expand { min-height: 40px; white-space: nowrap; }
}
.captcha-click-hint {
  color: #64748b;
  font-size: 12px;
  margin: 12px 0 0;
}
.captcha-feedback {
  min-height: 20px;
  margin: 10px 0 0;
  color: #a75134;
  line-height: 1.6;
  font-size: 12px;
}
.access-status-page {
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 28px 24px;
  background: #f5f8fc;
}
.access-status-page > .brand {
  width: fit-content;
  margin: auto;
}
.access-status-page > .brand img {
  width: 32px;
  height: 32px;
}
.access-status-page > .brand strong {
  font-size: 15px;
}
.access-status-card {
  width: min(420px, 100%);
  box-sizing: border-box;
  margin: 65px auto 24px;
  padding: 36px 25px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
  text-align: center;
}
.access-status-icon,
.share-state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #edf3ff;
  color: #4166a4;
}
.access-status-icon svg,
.share-state-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.7;
}
.access-status-card h1 {
  font-size: 22px;
  margin: 0 0 10px;
  color: #24354c;
}
.access-status-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.7;
  margin: 0;
}
.rest-countdown {
  display: block;
  margin: 25px 0;
  color: #244783;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}
.access-status-card button {
  min-width: 160px;
  min-height: 44px;
}
.access-status-card small {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: #94a3b8;
}
.share-state-shell {
  max-width: 660px;
  padding: 0 16px;
  margin: 44px auto;
}
.share-state-card {
  padding: 40px 28px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  text-align: center;
}
.share-state-card h1 {
  font-size: 22px;
  color: #26364d;
  margin: 0 0 12px;
  line-height: 1.5;
}
.share-state-card p {
  max-width: 370px;
  margin: 0 auto;
  color: #64748b;
  font-size: 14px;
  line-height: 1.9;
}
.share-state-card > div:last-child {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}
.share-state-card a,
.share-state-card button {
  min-height: 42px;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 13px;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .share-state-shell {
    margin: 26px auto;
    padding: 0 14px;
  }
  .share-state-card {
    padding: 32px 22px;
  }
  .share-state-card h1 {
    font-size: 20px;
  }
  .access-status-card {
    margin-top: 40px;
  }
}
.empty-colors-action {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.empty-colors-action button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 12px;
  color: #64748b;
}
.empty-colors-action .ui-icon {
  width: 14px;
  height: 14px;
}

/* 详情信息分层：单号独占一行，状态提示合并，清单独立滚动。 */
.plan-detail-dialog .modal {
  width: min(780px, 100%);
  max-height: 92dvh;
}
.plan-detail-dialog .modal-head {
  padding: 14px 22px;
  gap: 12px;
}
.plan-detail-dialog .modal-head h2 {
  font-size: 17px;
  line-height: 1.5;
}
.plan-detail-dialog .modal-body {
  padding: 0;
  min-height: 0;
  overscroll-behavior: contain;
}
.plan-detail-dialog .modal-footer {
  padding: 14px 22px;
  flex: none;
}
.plan-detail-dialog .modal-footer button {
  min-height: 42px;
  font-size: 13px;
  white-space: nowrap;
}
.plan-detail-dialog .detail-copy {
  margin-right: auto;
}
.detail-summary {
  padding: 20px 24px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e6ebf2;
}
.detail-identity > span {
  display: block;
  color: #64748b;
  font-size: 11px;
  margin-bottom: 5px;
}
.detail-number {
  display: block;
  color: #192b46;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  user-select: all;
}
.detail-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}
.detail-status .pill {
  flex: none;
  margin: 0;
  font-size: 11px;
  white-space: nowrap;
}
.detail-status p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
}
.detail-status .text-btn {
  flex: none;
  min-height: 36px;
  font-size: 12px;
  padding: 4px 6px;
}
.detail-summary-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
}
.detail-summary-actions button {
  min-height: 36px;
  color: #b44343;
  font-size: 12px;
  padding: 5px 0 5px 12px;
}
.pill.cancelled {
  background: #edf0f4;
  color: #64748b;
}
.pill.cancelling {
  background: #fff4df;
  color: #9b6b21;
}
.cancel-plan-number {
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.cancel-plan-message {
  color: #334155;
  line-height: 1.8;
  font-size: 14px;
}
.detail-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px solid #e4eaf2;
}
.detail-dates > div {
  min-width: 0;
}
.detail-dates dt {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 4px;
}
.detail-dates dd {
  font-size: 13px;
  color: #334155;
  margin: 0;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.detail-logistics {
  display: flex;
  gap: 14px;
  font-size: 12px;
  padding-top: 13px;
  margin-top: 12px;
  border-top: 1px solid #e4eaf2;
}
.detail-logistics > span {
  color: #64748b;
  flex: none;
}
.detail-logistics > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #334155;
  overflow-wrap: anywhere;
}
.plan-details .detail-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 24px;
  margin: 0;
  border: 0;
  background: #fff;
}
.plan-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #f2f5fa;
  border: 1px solid #e3e9f1;
  border-radius: 9px;
}
.plan-tabs button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}
.plan-tabs button.active {
  color: #2358d6;
  background: #fff;
  box-shadow: 0 1px 4px #15233e15;
}
.plan-tabs button:focus-visible {
  outline: 2px solid #2358d6;
  outline-offset: 1px;
}
.detail-content {
  padding: 0 24px 18px;
}
.detail-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0 10px;
  font-size: 11px;
  color: #64748b;
  border-bottom: 1px solid #e6ebf2;
}
.plan-details .detail-line {
  gap: 12px;
  padding: 13px 0;
  font-size: 13px;
}
.plan-details .detail-line img {
  width: 42px;
  height: 50px;
  flex: none;
}
.plan-details .detail-line .grow {
  min-width: 0;
}
.plan-details .detail-line .name {
  color: #26344c;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.plan-details .detail-line .variant {
  color: #64748b;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.plan-details .detail-line .amount {
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
  flex: none;
  max-width: 40%;
  overflow-wrap: anywhere;
}
.plan-details .detail-line .qty-note {
  font-size: 10px;
  color: #64748b;
  white-space: normal;
}
.plan-details .detail-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 2px;
  color: #52647c;
}
.plan-details .detail-total strong {
  margin: 0;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.share-shell {
  max-width: 820px;
}
.share-shell .panel {
  padding: 0;
  overflow: visible;
}
.share-shell h1 {
  margin: 0;
  padding: 18px 24px;
  border-bottom: 1px solid #e6ebf2;
  font-size: 18px;
}
#share-content.loading {
  padding: 0;
  text-align: left;
}
.submission-warning {
  background: #fff8ed;
  border: 1px solid #f0dab4;
  color: #765322;
  border-radius: 9px;
  padding: 14px 16px;
  margin-top: 16px;
}
.submission-warning strong {
  font-size: 13px;
}
.submission-warning p {
  font-size: 13px;
  line-height: 1.8;
  margin: 7px 0;
}
.submission-warning small {
  font-size: 11px;
  line-height: 1.6;
  color: #8c744d;
}
.brand img {
  object-fit: contain;
  flex: none;
}
header .brand img {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: transparent;
}
.login-intro .brand {
  gap: 10px;
}
.login-intro .brand img {
  width: 40px;
  height: 40px;
}
.login-intro .brand strong {
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0.4px;
}
@media (max-width: 760px) {
  .plan-detail-dialog {
    padding: 10px;
  }
  .plan-detail-dialog .modal {
    max-height: calc(100dvh - 20px);
    border-radius: 13px;
  }
  .plan-detail-dialog .modal-head {
    padding: 11px 16px;
  }
  .plan-detail-dialog .modal-head h2 {
    font-size: 15px;
  }
  .plan-detail-dialog .modal-body {
    padding: 0;
  }
  .detail-summary {
    padding: 16px;
  }
  .detail-number {
    font-size: 13px;
  }
  .detail-status {
    align-items: flex-start;
    gap: 8px;
    margin-top: 9px;
  }
  .detail-status p {
    font-size: 11px;
  }
  .detail-dates {
    gap: 8px 12px;
    margin-top: 12px;
    padding-top: 11px;
  }
  .detail-dates dd {
    font-size: 12px;
  }
  .plan-details .detail-tabs {
    padding: 12px 16px;
  }
  .plan-tabs button {
    font-size: 12px;
    min-height: 38px;
    padding: 7px 4px;
  }
  .detail-content {
    padding: 0 16px 16px;
  }
  .plan-details .detail-line {
    padding: 12px 0;
    gap: 9px;
  }
  .plan-details .detail-line img {
    width: 38px;
    height: 46px;
  }
  .plan-details .detail-line .name {
    font-size: 12px;
  }
  .plan-details .detail-line .variant {
    font-size: 11px;
  }
  .plan-detail-dialog .modal-footer {
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    gap: 7px;
    flex-wrap: nowrap;
  }
  .plan-detail-dialog .modal-footer button {
    flex: 1;
    min-width: 0;
    padding: 9px 6px;
    font-size: 12px;
  }
  .plan-detail-dialog .detail-copy {
    margin: 0;
  }
  .share-shell {
    padding: 0 10px;
    margin: 16px auto;
  }
  .share-shell h1 {
    padding: 15px 16px;
    font-size: 16px;
  }
  header .brand img {
    width: 30px;
    height: 30px;
  }
  .login-intro {
    padding: 24px 28px;
  }
  .login-intro > .brand {
    margin-bottom: 0;
  }
  .login-intro .brand img {
    width: 32px;
    height: 32px;
  }
  .login-intro .brand strong {
    font-size: 14px;
  }
  .login-intro h1 {
    margin: 18px 0 7px;
  }
}

.access-status-card > p + button {
  margin-top: 24px;
}

/* 登录品牌只保留一个标题；移动导航各占半行。 */
.login-intro h1.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: clamp(24px, 2.9vw, 40px);
  letter-spacing: 0;
}
.login-brand img {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
}
.login-brand span {
  min-width: 0;
}
.user .username {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-label {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .login-intro h1.login-brand {
    gap: 10px;
    margin: 0 0 9px;
    font-size: clamp(20px, 6vw, 25px);
  }
  .login-brand img {
    width: 32px;
    height: 32px;
  }
  .layout aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 !important;
    padding-left: 0;
    padding-right: 0;
    left: 0;
    right: 0;
  }
  .layout aside button {
    width: 100%;
    min-width: 0 !important;
    margin: 0;
    padding: 5px 4px;
    border-radius: 0;
    justify-content: center;
    align-items: center;
  }
}

.shipping-review {
  margin: 16px 0;
  padding: 16px;
  background: #f7faff;
  border: 1px solid #dfe7f5;
  border-radius: 10px;
}
.shipping-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.shipping-section-head h3 {
  margin: 0;
  font-size: 14px;
  color: #24354c;
}
.shipping-section-head h3 small {
  font-size: 11px;
  color: #b56a39;
  font-weight: 400;
  margin-left: 5px;
}
.shipping-section-head > div {
  display: flex;
  gap: 12px;
  flex: none;
}
.shipping-person {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  align-items: baseline;
  color: #26364d;
  font-size: 14px;
}
.shipping-person strong {
  overflow-wrap: anywhere;
}
.shipping-person span {
  color: #53647d;
  font-variant-numeric: tabular-nums;
}
.shipping-location {
  font-size: 13px;
  color: #64748b;
  line-height: 1.8;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.shipping-placeholder {
  font-size: 13px;
  color: #8291a9;
  margin: 0;
  line-height: 1.8;
}
.address-dialog .modal {
  max-width: 540px;
}
.address-list {
  display: grid;
  gap: 12px;
}
.address-card {
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.address-card.selected {
  border-color: #8aaaf1;
  background: #f7faff;
}
.address-select {
  display: block;
  width: 100%;
  padding: 16px;
  text-align: left;
}
.address-select:hover {
  background: #f6f9ff;
}
.address-default {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 9px;
  font-size: 10px;
  color: #2358d6;
  background: #edf3ff;
}
.address-select-hint {
  display: block;
  font-size: 12px;
  color: #2358d6;
  margin-top: 10px;
}
.address-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 9px 16px;
  border-top: 1px solid #edf1f7;
}
.address-person-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.address-region-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
#address-form .form-field {
  min-width: 0;
  margin-bottom: 18px;
}
#address-form .form-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  font-size: 14px;
}
#address-form .form-field label {
  font-size: 13px;
  margin-bottom: 8px;
}
.required-mark {
  color: #b76344;
}
.address-default-check {
  margin-bottom: 16px;
}
.address-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.detail-shipping {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e7edf5;
}
.detail-shipping > span {
  display: block;
  font-size: 11px;
  color: #8291a9;
  margin-bottom: 8px;
}
@media (max-width: 760px) {
  .shipping-review {
    padding: 13px;
  }
  .shipping-section-head {
    gap: 8px;
  }
  .shipping-section-head > div {
    gap: 10px;
  }
  .shipping-section-head .text-btn {
    font-size: 12px;
  }
  .address-dialog .modal-body {
    padding: 17px;
  }
  .address-dialog .modal-footer {
    padding: 12px 17px max(12px, env(safe-area-inset-bottom));
  }
  .address-dialog .modal-footer button,
  .address-form-actions button {
    flex: 1;
    min-width: 0;
  }
  .address-person-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 12px;
  }
  .address-region-fields {
    gap: 8px;
  }
}

.shipping-person span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* V4.23：登录单标题、独立确认和更清晰的状态层级。 */
.error-inline:empty {
  display: none;
}
.login-page .login-intro {
  justify-content: center;
  padding: 56px;
}
.login-intro h1.login-brand {
  font-size: clamp(25px, 3vw, 40px);
  margin: 0 0 14px;
  line-height: 1.35;
}
.login-intro .login-art {
  margin-top: 42px;
}
.login-intro .login-copy {
  margin-top: 28px;
}
.refresh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  color: #62718b;
  flex: none;
}
.refresh-icon:hover {
  color: #2358d6;
  background: #f0f5ff;
}
.refresh-icon svg {
  width: 18px;
  height: 18px;
}
.detail-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  gap: 9px;
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 9px;
  background: #f5f8fc;
}
.detail-status .pill {
  grid-column: 1;
}
.detail-status p {
  grid-row: 2;
  grid-column: 1/-1;
  width: 100%;
  margin: 0;
  line-height: 1.8;
}
.detail-status .text-btn {
  grid-row: 1;
  grid-column: 2;
}
.submit-confirm-dialog .modal {
  max-width: 440px;
}
.submit-confirm-copy {
  line-height: 1.9;
  color: #64748b;
  font-size: 14px;
}
.submit-confirm-copy h3 {
  font-size: 17px;
  color: #26364d;
  margin: 15px 0 12px;
}
.confirm-info-icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  color: #a56a2f;
  background: #fff4df;
}
#address-form select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  border: 1px solid #dce4f1;
  border-radius: 7px;
  color: #334155;
  background: #fff;
  font-size: 14px;
}
#address-form select:disabled {
  background: #f5f7fb;
  color: #94a3b8;
}
@media (max-width: 760px) {
  .login-page .login-intro {
    padding: 40px 28px 30px;
  }
  .login-intro h1.login-brand {
    font-size: 26px;
    margin: 0 0 10px;
  }
  .login-form-side {
    padding-top: 30px;
  }
  .detail-status {
    padding: 12px;
    gap: 8px;
  }
  .submit-confirm-dialog .modal-footer button {
    flex: 1;
    min-width: 0;
  }
}

/* V4.24 登录与订货弹窗 */
.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.modal-title-group h2 {
  margin: 0;
}
.modal-title-group > .pill {
  font-size: 11px;
  white-space: nowrap;
  padding: 4px 8px;
  line-height: 1.4;
}
.detail-guidance {
  margin: 10px 0 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.detail-guidance p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: #8491a5;
  flex: 1;
}
.detail-guidance .text-btn {
  flex: none;
}
.submit-confirm-dialog .modal {
  max-width: 400px;
  border-radius: 18px;
}
.submit-confirm-dialog .modal-head {
  padding: 20px 24px 15px;
  border-bottom: 0;
}
.submit-confirm-dialog .modal-head h2 {
  font-size: 15px;
  color: #64748b;
  font-weight: 500;
}
.submit-confirm-dialog .modal-body {
  padding: 0 24px 22px;
}
.submit-confirm-dialog .modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 24px 22px;
  background: #fff;
  border-top: 1px solid #edf1f7;
}
.submit-confirm-dialog .modal-footer button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 9px;
  font-size: 14px;
}
.confirm-lead {
  margin: 0 0 18px;
  color: #26364d;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.5;
}
.confirm-counts {
  display: flex;
  gap: 20px;
  padding-bottom: 20px;
  color: #7b899e;
  font-size: 12px;
}
.confirm-counts b {
  color: #315995;
  font-size: 22px;
  font-weight: 600;
  margin-right: 3px;
}
.confirm-disclaimer {
  padding: 14px 15px;
  background: #f5f7fb;
  border-radius: 10px;
  border: 1px solid #e7edf5;
}
.confirm-disclaimer strong {
  color: #455772;
  font-size: 13px;
  font-weight: 600;
}
.confirm-disclaimer p {
  font-size: 13px;
  line-height: 1.85;
  margin: 6px 0 0;
  color: #7b899e;
}
.confirm-contact {
  font-size: 12px;
  line-height: 1.7;
  margin: 14px 0 0;
  color: #8c99ad;
}
.login-page {
  display: flex;
  min-height: 100dvh;
  justify-content: center;
  align-items: center;
  padding: 36px 20px;
  background:
    radial-gradient(ellipse at 10% 5%, #eaf1ff, transparent 60%), #f6f8fc;
}
.login-frame {
  width: 100%;
  max-width: 440px;
  padding: 34px 36px 30px;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 20px;
  box-shadow: 0 14px 54px #294b7a0a;
}
.login-page .login-intro {
  padding: 0 0 25px;
  background: none;
}
.login-intro h1.login-brand {
  font-size: 25px;
  margin: 0 0 9px;
  line-height: 1.45;
  letter-spacing: 0.5px;
}
.login-intro p {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  color: #8c99ae;
}
.login-page .login-art,
.login-page .login-copy {
  display: none;
}
.login-page .login-form-side {
  display: block;
  padding: 23px 0 0;
  border-top: 1px solid #edf1f7;
}
.login-card {
  max-width: none;
}
.login-card h2 {
  font-size: 18px;
  margin-bottom: 5px;
}
.login-card > p {
  font-size: 12px;
  margin-bottom: 25px;
}
.login-card .form-field input {
  height: 46px;
  border-radius: 9px;
}
.login-card .primary.full {
  min-height: 46px;
  border-radius: 9px;
  box-shadow: none;
}
.login-card .remember {
  margin: 4px 0 24px;
}
@media (max-width: 760px) {
  .login-page {
    padding: 32px 20px;
    align-items: center;
  }
  .login-frame {
    margin: 0;
    padding: 28px 24px;
    border-radius: 16px;
  }
  .login-page .login-intro {
    padding: 0 0 22px;
  }
  .login-intro h1.login-brand {
    font-size: 23px;
  }
  .plan-detail-dialog .modal-head {
    padding: 14px 16px;
  }
  .plan-detail-dialog .modal-title-group {
    gap: 8px;
  }
  .submit-confirm-dialog .modal-head {
    padding: 18px 20px 13px;
  }
  .submit-confirm-dialog .modal-body {
    padding: 0 20px 20px;
  }
  .submit-confirm-dialog .modal-footer {
    padding: 14px 20px 20px;
  }
  .confirm-lead {
    font-size: 20px;
  }
}

/* 验证完成即提交，弹窗无底部操作区。 */
.captcha-dialog .modal-body {
  padding-bottom: 18px;
}
.captcha-dialog .captcha-feedback {
  margin-bottom: 0;
}
.captcha-slider:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* 密码输入与显示按钮使用同一外框，焦点高亮不在内部被裁切。 */
.password-wrap {
  align-items: center;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.password-wrap:focus-within {
  border-color: #789bed;
  box-shadow: 0 0 0 3px #2358d612;
}
.password-wrap input:focus,
.password-wrap input:focus-visible {
  outline: none;
  box-shadow: none;
}
.login-card .password-wrap {
  height: 46px;
  border-radius: 9px;
}
.login-card .password-wrap input {
  width: 0;
  min-width: 0;
  flex: 1;
  height: 100%;
  border-radius: 0;
}
.password-wrap .password-eye {
  flex: none;
}
.password-wrap .password-eye:focus-visible {
  outline: 2px solid #789bed;
  outline-offset: -6px;
}

/* 商品库存说明单独居中，略增字号，不改变其他提示。 */
.workspace .footer-note {
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 22px;
  padding: 0 8px;
  color: #94a1b5;
}

/* 单号长按复制，取消操作归入底部按钮区。 */
.detail-number[data-copy-number] {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.detail-number[data-copy-number]:focus-visible {
  outline: 2px solid #9dbbff;
  outline-offset: 4px;
  border-radius: 3px;
}
.plan-detail-dialog .cancel-plan-button {
  color: #b25858;
  border-color: #eadada;
}
.plan-detail-dialog .cancel-plan-button:hover {
  background: #fff7f6;
}

/* 说明段落换行后均从首行左边缘继续，避免继承卡片的居中排版。 */
p,
.modal-notice,
#toast,
.inline-notice,
.error-inline,
.success-banner,
.demo-banner,
.matrix-hint,
.captcha-feedback,
.captcha-prompt,
.captcha-click-hint,
.cancel-plan-message,
.shipping-location,
.shipping-placeholder,
.photo-error,
.qr-error,
.empty-state,
.empty-cart,
.loading,
.login-help,
.cart-bottom p,
.access-status-card p,
.share-state-card p {
  text-align: left;
  text-indent: 0;
  overflow-wrap: anywhere;
}
/* 容器仍可居中，内部多行文字统一左对齐。 */
.workspace .footer-note,
.history-expiry-note,
.qr-box p,
.qr-box small,
.boot p {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  text-indent: 0;
  overflow-wrap: anywhere;
}
.qr-box small {
  display: block;
}

/* 清单和历史列表空状态在区域内居中；文字换行仍沿同一左边缘。 */
.detail-content > .empty-state,
.history-table-head + .empty-state {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

/* 详情刷新放在标题右侧，与关闭图标并排。 */
.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.detail-refresh {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  color: #7d90ad;
  flex: none;
}
.detail-refresh .ui-icon {
  width: 18px;
  height: 18px;
}
.detail-refresh:hover {
  background: #f0f4fa;
  color: #2358d6;
}
.detail-refresh:disabled {
  cursor: wait;
}
.share-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-detail-title .detail-refresh {
  margin-left: auto;
}

/* 整款快捷移除：触屏侧滑，桌面直接删除。表单控件不参与滑动。 */
.cart-group {
  position: relative;
  overflow: hidden;
}
.cart-group-content {
  position: relative;
  z-index: 1;
  background: #fff;
  transition: transform 0.18s ease;
  touch-action: pan-y;
}
.cart-group-top {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-group-top .cart-group-head {
  flex: 1;
  min-width: 0;
}
.cart-delete-desktop {
  flex: none;
  width: 32px;
  min-height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #a6b3c5;
  border-radius: 7px;
}
.cart-delete-desktop:hover {
  color: #cf4148;
  background: #fff0f1;
}
.cart-delete-desktop .ui-icon,
.cart-swipe-delete .ui-icon {
  width: 18px;
  height: 18px;
}
.cart-swipe-delete {
  position: absolute;
  inset: 0 0 0 auto;
  width: 76px;
  padding: 12px 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #dc4850;
  color: #fff;
  border-radius: 0;
  font-size: 12px;
  visibility: hidden;
}
@media (hover: none), (pointer: coarse) {
  .cart-delete-desktop {
    display: none;
  }
  .cart-swipe-delete {
    display: flex;
  }
  .cart-group.swipe-open .cart-group-content {
    transform: translateX(-76px);
  }
  .cart-group.swipe-open .cart-swipe-delete,
  .cart-group.swiping .cart-swipe-delete {
    visibility: visible;
  }
}
.cart-group.swiping .cart-group-content {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .cart-group-content {
    transition: none;
  }
}

/* 页面禁止手势缩放；大图仅通过自身transform在裁剪框内缩放。 */
html,
body {
  touch-action: pan-x pan-y;
}
.address-parse-box {
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid #e3eaf5;
  border-radius: 10px;
  background: #f8faff;
}
.address-parse-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: #46628c;
  font-size: 13px;
  list-style: none;
}
.address-parse-box summary::-webkit-details-marker {
  display: none;
}
.address-parse-box[open] summary {
  margin-bottom: 12px;
}
.address-parse-box textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
}
.address-parse-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.address-parse-actions span {
  font-size: 11px;
  color: #8a9bb3;
}
.address-parse-actions button {
  flex: none;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.address-parse-feedback {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  text-align: left;
  color: #647fa6;
  overflow-wrap: anywhere;
}
.address-parse-feedback:empty {
  display: none;
}
.request-loading {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 24px;
  border: 0;
  background: transparent;
  color: #223a60;
  touch-action: none;
}
.request-loading[open] {
  display: grid;
  place-items: center;
}
.request-loading::backdrop {
  background: rgba(238, 244, 253, 0.72);
  backdrop-filter: blur(8px);
}
.request-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 44px 23px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.97),
    rgba(244, 248, 255, 0.95)
  );
  box-shadow:
    0 24px 80px #1d407b1c,
    0 2px 12px #fff8;
}
.request-loading-card strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 20px;
}
.request-loading-card p {
  font-size: 12px;
  color: #8a9bb4;
  margin: 9px 0 0;
  text-align: left;
}
.loading-orbit {
  position: relative;
  width: 64px;
  height: 64px;
}
.loading-orbit i {
  position: absolute;
  inset: 0;
  border: 2px solid #e3ebfc;
  border-top-color: #2860e5;
  border-right-color: #94b4ff;
  border-radius: 50%;
  animation: loading-orbit 1.25s linear infinite;
  animation-play-state: paused;
}
.loading-orbit i::after {
  content: "";
  position: absolute;
  top: -4px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2860e5;
  box-shadow: 0 0 8px #739bff80;
}
.loading-orbit i:nth-child(2) {
  inset: 10px;
  border-top-color: #95b5fb;
  border-left: 2px solid #4476ed;
  animation-direction: reverse;
  animation-duration: 1.85s;
}
.loading-orbit i:nth-child(2)::after {
  background: #799ff3;
}
.loading-orbit span {
  position: absolute;
  inset: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #80a6ff, #2459d8);
  transform: rotate(45deg);
  box-shadow: 0 0 18px #5988f75c;
  animation: loading-core 1.6s ease-in-out infinite;
  animation-play-state: paused;
}
.loading-dots {
  display: flex;
  gap: 5px;
  margin-top: 17px;
}
.loading-dots i {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #6c95eb;
  animation: loading-dots 1.2s ease-in-out infinite;
  animation-play-state: paused;
}
.loading-dots i:nth-child(2) {
  animation-delay: 0.16s;
}
.loading-dots i:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes loading-orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes loading-core {
  0%,
  100% {
    transform: rotate(45deg) scale(0.86);
    opacity: 0.65;
  }
  50% {
    transform: rotate(45deg) scale(1.08);
    opacity: 1;
  }
}
@keyframes loading-dots {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
@keyframes loading-soft-glow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-orbit i,
  .loading-orbit span,
  .loading-dots i {
    animation-name: loading-soft-glow;
    animation-duration: 1.8s;
    animation-timing-function: ease-in-out;
    animation-direction: normal;
    animation-iteration-count: infinite;
  }
  /* 仅保留一个缓慢旋转的等待指示，其余元素不再跳动或缩放。 */
  .loading-orbit i:first-child {
    animation-name: loading-orbit;
    animation-duration: 3.2s;
    animation-timing-function: linear;
  }
}
.request-loading[open] .loading-orbit i,
.request-loading[open] .loading-orbit span,
.request-loading[open] .loading-dots i {
  animation-play-state: running;
}

/* 选择地址卡片：紧凑留白，默认标识与姓名共用第一行。 */
.address-list {
  gap: 9px;
}
.address-select {
  position: relative;
  padding: 12px 13px;
}
.address-select .shipping-person {
  gap: 4px 12px;
  font-size: 13px;
  line-height: 1.6;
}
.address-select:has(.address-default) .shipping-person {
  padding-right: 42px;
}
.address-select .address-default {
  position: absolute;
  right: 12px;
  top: 13px;
  margin: 0;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 1.7;
}
.address-select .shipping-location {
  font-size: 12px;
  line-height: 1.65;
  margin-top: 4px;
}
.address-select-hint {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 5px;
}
.address-card-actions {
  gap: 16px;
  padding: 3px 12px;
}
.address-card-actions button {
  min-height: 30px;
  font-size: 12px;
  padding: 3px 0;
}
@media (hover: hover) and (pointer: fine) {
  .photo-toolbar small {
    display: none;
  }
}

.address-parse-box .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 空清单与提交提示居中排放；换行文字保持同一左边缘。 */
.empty-cart p,
.cart-bottom > p,
.success-expiry-note {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.session-replaced-dialog .modal {
  max-width: 360px;
}
.session-replaced-message {
  margin: 0;
  color: #526884;
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}
.session-replaced-dialog .modal-body {
  padding: 22px;
}
.session-replaced-dialog .modal-footer {
  padding: 0 22px 22px;
  border: 0;
}
/* 版本及维护入口沿用统一弹层，桌面与手机保持紧凑比例。 */
.system-dialog .modal { width: min(420px, calc(100vw - 28px)); }
.system-about { padding: 12px 0 8px; text-align: center; }
.system-about h3 { margin: 0 0 18px; font-size: 21px; line-height: 1.45; color: #183e78; }
.system-version { padding: 8px 20px; border: 1px solid #dce6fa; border-radius: 10px; background: #f3f7ff; color: #2358d6; font-size: 16px; font-weight: 600; touch-action: manipulation; }
.system-copyright { margin: 24px 0 8px; font-size: 12px; line-height: 1.7; color: #71819a; }
.system-maintenance-status { font-size: 13px; color: #2358d6; }
.maintenance-intro { margin: 0 0 14px; color: #71819a; font-size: 14px; }
.system-dialog .password-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.system-dialog .system-about .system-copyright,
.system-dialog .system-about .system-maintenance-status {
  width: 100%;
  text-align: center;
}
.share-state-card > p,
.access-status-card > p {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

html[lang="en"] .brand strong { display: block; max-width: 240px; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
html[lang="en"] .product-title,
html[lang="en"] .cart-group-title strong,
html[lang="en"] .sku-dialog .modal-head strong { overflow-wrap: anywhere; word-break: normal; }
html[lang="en"] .pill { white-space: normal; text-align: center; line-height: 1.4; }
html[lang="en"] .modal-footer button,
html[lang="en"] .address-form-actions button,
html[lang="en"] .password-actions button { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
html[lang="en"] .plan-tabs button { white-space: normal; line-height: 1.4; }
html[lang="en"] .matrix-color,
html[lang="en"] .vertical-color h3,
html[lang="en"] .cart-variant-name { overflow-wrap: anywhere; }
html[lang="en"] .history-toolbar .tabs { min-width: 0; flex-wrap: wrap; }
.page-language-switch {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e2e9f4;
  border-radius: 10px;
  background: #fff;
  color: #627693;
}
.page-language-switch:hover { color: #2358d6; background: #f3f7ff; }
.page-language-switch:focus-visible { outline: 2px solid #2358d6; outline-offset: 3px; }
.page-language-switch .ui-icon { width: 19px; height: 19px; }
.login-frame { position: relative; }
.login-language-icon { position: absolute; top: 14px; right: 14px; }
.login-page .login-intro { padding-top: 30px; }
.history-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.history-actions button { white-space: nowrap; min-height: 34px; font-size: 12px; }
.history-actions .secondary { padding: 6px 10px; border: 1px solid #dce2eb; background: #fff; color: #2358d6; }
.history-actions .secondary.danger { border-color: #f0d8dc; color: #c54b5b; }
.history-actions .plan-detail-button:hover { background: #f3f7ff; border-color: #b8c9ee; }
.cart-clear-icon { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; color: #8491a5; border-radius: 8px; }
.cart-clear-icon:hover:not(:disabled) { color: #c54b5b; background: #fff2f3; }
.cart-clear-icon .ui-icon { width: 17px; height: 17px; }
.cart-clear-confirm { padding: 0; border: 0; border-radius: 16px; width: min(380px, calc(100vw - 32px)); background: transparent; }
.cart-clear-confirm::backdrop { background: #15233e66; backdrop-filter: blur(3px); }
.cart-clear-confirm .modal { width: 100%; max-height: 90dvh; box-shadow: none; }
.cart-clear-confirm .modal-head { padding: 18px 20px 10px; border: 0; }
.cart-clear-confirm .modal-head h2 { font-size: 16px; }
.cart-clear-confirm .modal-body { padding: 4px 20px 22px; }
.cart-clear-confirm .modal-body p { margin: 0; line-height: 1.8; font-size: 14px; }
.cart-clear-confirm .modal-body .subtitle { margin-top: 8px; font-size: 12px; }
.cart-clear-confirm .modal-footer { display: grid; grid-template-columns: 1fr 1fr; padding: 0 20px 20px; border: 0; gap: 10px; }
.cart-clear-confirm .modal-footer button { min-width: 0; min-height: 42px; white-space: normal; }
@media (min-width: 761px) {
  .history-row { grid-template-columns: minmax(140px, 1.5fr) .8fr minmax(100px, 1fr) 90px 148px; gap: 14px; }
}
@media (max-width: 760px) {
  .history-row .history-actions { order: 5; flex-basis: 100%; padding-top: 8px; border-top: 1px solid #f1f3f7; }
  .history-row .history-actions .secondary { width: auto; min-height: 34px; padding: 6px 10px; text-align: center; }
}
@media (max-width: 760px) {
  html[lang="en"] .brand strong { max-width: 160px; font-size: 11px; }
  html[lang="en"] .warehouse { display: none; }
  html[lang="en"] .product-top { grid-template-columns: 47px minmax(0, 1fr) 61px 62px !important; gap: 7px !important; }
  html[lang="en"] .product-top .expand { width: 62px; padding-left: 0; padding-right: 0; font-size: 11px; }
  html[lang="en"] .product-top .retail-price { font-size: 10px; }
  html[lang="en"] .sku-panel-controls { gap: 8px; flex-wrap: wrap; }
  html[lang="en"] .detail-summary { overflow-wrap: anywhere; }
  html[lang="en"] .login-brand { font-size: 22px; line-height: 1.4; }
  html[lang="en"] .login-card .remember { flex-wrap: wrap; gap: 8px; }
  html[lang="en"] .plan-detail-dialog .modal-footer button { font-size: 12px; min-height: 44px; padding: 10px 6px; }
}
