/* 组件：按钮、表单、徽标、列表、浮层、对话框、Toast、骨架屏。 */

.icon {
  width: 16px;
  height: 16px;
}

.muted {
  color: var(--text-3);
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

.ellipsis {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 按钮 ---------- */

.btn {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: var(--control-h);
  padding: 0 var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1),
    box-shadow var(--dur-1), transform var(--dur-1) var(--ease-out), opacity var(--dur-1);
}

.btn-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.btn:active:not(:disabled, [aria-disabled="true"]) {
  transform: scale(var(--press));
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn[aria-disabled="true"] {
  cursor: progress;
}

.btn-primary {
  background: var(--primary-solid);
  color: #fff;
}

.btn-primary:active:not(:disabled) {
  background: var(--primary-solid-active);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.btn-secondary:active:not(:disabled) {
  background: var(--surface-3);
}

.btn-danger {
  background: var(--danger-solid);
  color: #fff;
}

.btn-danger:active:not(:disabled) {
  background: var(--danger-solid-active);
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:active:not(:disabled) {
  background: var(--surface-3);
}

.btn-text {
  height: 30px;
  padding: 0 var(--sp-2);
  color: var(--primary-text);
}

.btn-text.danger {
  color: var(--danger);
}

.btn-text:active:not(:disabled) {
  background: var(--primary-soft);
}

.btn-icon {
  width: var(--control-h);
  padding: 0;
}

.btn-icon.btn-sm {
  width: 30px;
}

.btn-sm {
  height: 30px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 44px;
  font-size: var(--fs-lg);
}

@media (hover: hover) {
  .btn-primary:hover:not(:disabled) {
    background: var(--primary-solid-hover);
  }

  .btn-secondary:hover:not(:disabled) {
    background: var(--surface-2);
  }

  .btn-danger:hover:not(:disabled) {
    background: var(--danger-solid-hover);
  }

  .btn-ghost:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text);
  }

  .btn-text:hover:not(:disabled) {
    background: var(--primary-soft);
  }

  .btn-text.danger:hover:not(:disabled) {
    background: var(--danger-soft);
  }
}

/* 加载中：转圈但保持按钮宽度不变 */
.btn[aria-busy="true"] .btn-label {
  visibility: hidden;
}

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ---------- 表单 ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
}

.field-label .muted {
  font-weight: 400;
}

.field-hint {
  color: var(--text-3);
  font-size: var(--fs-xs);
}

.field-error {
  min-height: 18px;
  font-size: var(--fs-xs);
  color: var(--danger);
}

.field-error:empty {
  min-height: 0;
}

.input,
.textarea {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}

.textarea {
  height: auto;
  min-height: 84px;
  padding: var(--sp-2) var(--sp-3);
  line-height: 1.5;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus,
.textarea[aria-invalid="true"]:focus {
  box-shadow: var(--danger-ring);
}

@media (hover: hover) {
  .input:hover:not(:focus, [aria-invalid="true"]),
  .textarea:hover:not(:focus, [aria-invalid="true"]) {
    border-color: var(--text-3);
  }
}

.code-input {
  height: 52px;
  padding-left: 0.45em;
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.45em;
  text-align: center;
}

.search {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
  max-width: 360px;
}

.search .input {
  padding-right: 34px;
  padding-left: 34px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  color: var(--text-3);
  pointer-events: none;
  translate: 0 -50%;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  color: var(--text-3);
  translate: 0 -50%;
}

@media (hover: hover) {
  .search-clear:hover {
    background: var(--surface-2);
    color: var(--text);
  }
}

/* 自定义下拉框（收起时的框） */
.select-trigger {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--sp-2);
  min-width: 132px;
  max-width: 240px;
  height: var(--control-h);
  padding: 0 var(--sp-2) 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}

.select-trigger .select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-trigger .select-prefix {
  color: var(--text-3);
}

.select-trigger .chev {
  color: var(--text-3);
  transition: transform var(--dur-2) var(--ease-out);
}

.select-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.select-trigger[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

@media (hover: hover) {
  .select-trigger:hover:not([aria-expanded="true"]) {
    border-color: var(--text-3);
  }
}

@media (max-width: 639px) {
  .input,
  .textarea,
  .select-trigger {
    font-size: 16px;
  }

  .code-input {
    font-size: 24px;
  }
}

/* ---------- 徽标 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

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

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

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

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

/* ---------- 卡片与列表 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.toolbar-end {
  margin-left: auto;
  color: var(--text-3);
  font-size: var(--fs-sm);
}

.list {
  container: list / inline-size;
}

.list .card {
  transition: opacity var(--dur-2);
}

.list[data-loading] .card {
  opacity: 0.6;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 40px;
  padding: 0 var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.table th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.table th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.table td {
  height: 56px;
  max-width: 280px;
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  transition: background-color var(--dur-1);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr.clickable {
  cursor: pointer;
}

@media (hover: hover) {
  .table tbody tr:hover td {
    background: var(--surface-2);
  }
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.table .actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.actions-inner {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.cell-main {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-sub {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-3);
  font-size: var(--fs-xs);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.id-cell {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  white-space: nowrap;
}

.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  color: var(--text-3);
  transition: background-color var(--dur-1), color var(--dur-1);
}

.copy-btn.copied {
  color: var(--success);
}

@media (hover: hover) {
  .copy-btn:hover {
    background: var(--surface-3);
    color: var(--text);
  }
}

/* 窄容器：先隐藏次要列，再变成卡片 */
.cards {
  display: none;
}

@container list (max-width: 1080px) {
  .col-opt {
    display: none;
  }
}

@container list (max-width: 700px) {
  .table {
    display: none;
  }

  .cards {
    display: block;
  }
}

.row-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  transition: background-color var(--dur-1);
}

.row-card:last-child {
  border-bottom: 0;
}

button.row-card:active,
.row-card.clickable:active {
  background: var(--surface-2);
}

.row-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  min-height: 30px;
}

.row-card-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-card-line {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-card-meta {
  color: var(--text-3);
  font-size: var(--fs-xs);
}

.row-card .num {
  font-weight: 600;
}

.row-card-head .row-card-meta {
  margin-left: auto;
}

.flash td,
.row-card.flash {
  animation: flash 1.6s var(--ease-out);
}

@keyframes flash {
  from {
    background: var(--primary-soft);
  }
}

.removing {
  animation: fade-out var(--dur-2) var(--ease-in) forwards;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--fs-sm);
}

.pager-buttons {
  display: flex;
  gap: var(--sp-1);
}

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-10) var(--sp-6);
  color: var(--text-2);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-2);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
}

.empty-title {
  color: var(--text);
  font-weight: 600;
}

.empty-text {
  max-width: 380px;
  font-size: var(--fs-sm);
}

.empty .btn {
  margin-top: var(--sp-3);
}

/* 骨架屏 */
.skeleton {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton.sk-a {
  width: min(220px, 40%);
}

.skeleton.sk-b {
  width: min(420px, 70%);
  height: 10px;
}

.skeleton-rows {
  display: flex;
  flex-direction: column;
}

/* 数据到达前给列表预留高度，避免内容跳动 */
.list .card:empty {
  min-height: 280px;
}

.skeleton-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.skeleton-row:last-child {
  border-bottom: 0;
}

@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }

  to {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* 提示块、密钥展示、键值列表 */
.callout {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: var(--fs-sm);
}

.callout .icon {
  margin-top: 2px;
}

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

/* 创建支付订单后的摘要：商品、金额、状态 */
.pay-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.pay-summary-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-summary-money {
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: 600;
  white-space: nowrap;
}

.secret {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.secret code {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  user-select: all;
  word-break: break-all;
}

.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm);
}

.kv dt {
  color: var(--text-3);
}

.kv dd {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  min-width: 0;
  color: var(--text);
  word-break: break-all;
}

@media (max-width: 639px) {
  .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .kv dd {
    margin-bottom: var(--sp-2);
  }
}

/* ---------- 浮层：菜单与下拉列表 ---------- */

.popover {
  position: fixed;
  z-index: 60;
  min-width: 180px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: min(360px, 60dvh);
  padding: var(--sp-1);
  overflow-y: auto;
  border-radius: var(--radius-md);
  background: var(--overlay);
  box-shadow: var(--shadow-pop);
  animation: pop-in var(--dur-2) var(--ease-out);
}

.popover[data-closing] {
  animation: pop-out var(--dur-1) var(--ease-in) forwards;
}

.popover-title {
  display: none;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  min-height: 34px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-xs);
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}

.popover-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popover-item:focus-visible {
  background: var(--surface-2);
  box-shadow: none;
}

.popover-item:active {
  background: var(--surface-3);
}

.popover-item.danger {
  color: var(--danger);
}

.popover-sep {
  height: 1px;
  margin: var(--sp-1) var(--sp-2);
  background: var(--border);
}

.popover-item[aria-selected="true"] {
  color: var(--primary-text);
  font-weight: 500;
}

.popover-item .check {
  margin-left: auto;
  visibility: hidden;
}

.popover-item[aria-selected="true"] .check {
  visibility: visible;
}

@media (hover: hover) {
  .popover-item:hover {
    background: var(--surface-2);
  }
}

.popover-scrim {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: var(--scrim);
  animation: fade-in var(--dur-2);
}

.popover-scrim[data-closing] {
  animation: fade-out var(--dur-1) forwards;
}

/* 手机上：底部面板 */
.popover.as-sheet {
  inset: auto 0 0 0;
  width: 100%;
  max-width: none;
  max-height: 70dvh;
  padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + env(safe-area-inset-bottom));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  animation-name: sheet-in;
  animation-duration: var(--dur-3);
}

.popover.as-sheet[data-closing] {
  animation-name: sheet-out;
  animation-duration: var(--dur-2);
}

.popover.as-sheet .popover-title {
  display: block;
  padding: var(--sp-2) var(--sp-3) var(--sp-2);
  color: var(--text-3);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.popover.as-sheet .popover-item {
  min-height: 48px;
  font-size: var(--fs-lg);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(calc(var(--shift) * -1)) scale(var(--scale-in));
  }
}

@keyframes pop-out {
  to {
    opacity: 0;
    transform: scale(var(--scale-in));
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

@keyframes sheet-out {
  to {
    transform: translateY(100%);
  }
}

/* ---------- 对话框 ---------- */

dialog.dialog {
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 64px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--overlay);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  animation: dialog-in var(--dur-3) var(--ease-out);
}

dialog.dialog::backdrop {
  background: var(--scrim);
  animation: fade-in var(--dur-2);
}

dialog.dialog[data-closing] {
  animation: dialog-out var(--dur-1) var(--ease-in) forwards;
}

dialog.dialog[data-closing]::backdrop {
  animation: fade-out var(--dur-1) forwards;
}

dialog.dialog.wide {
  width: min(640px, calc(100vw - 32px));
}

.dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-2);
}

.dialog-title {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.4;
}

.dialog-close {
  margin: -6px -8px 0 0;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-5) var(--sp-4);
  overflow-y: auto;
  color: var(--text-2);
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5) var(--sp-5);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(var(--shift)) scale(var(--scale-in));
  }
}

@keyframes dialog-out {
  to {
    opacity: 0;
    transform: scale(var(--scale-in));
  }
}

@media (max-width: 639px) {
  dialog.dialog,
  dialog.dialog.wide {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation-name: sheet-in;
  }

  dialog.dialog[data-closing] {
    animation-name: sheet-out;
    animation-duration: var(--dur-2);
  }

  .dialog-foot {
    flex-direction: column-reverse;
  }

  .dialog-foot .btn {
    width: 100%;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .popover.as-sheet,
  dialog.dialog {
    animation-name: fade-in;
  }

  .popover.as-sheet[data-closing],
  dialog.dialog[data-closing] {
    animation-name: fade-out;
  }
}

/* ---------- Toast ---------- */

/* 容器是 popover（位于顶层，盖在对话框之上），这里清掉浏览器给 popover 的默认样式 */
.toasts {
  position: fixed;
  inset: auto var(--sp-6) var(--sp-6) auto;
  z-index: 80;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: min(420px, calc(100vw - 32px));
  min-height: 42px;
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--overlay);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-size: var(--fs-sm);
  pointer-events: auto;
  animation: toast-in var(--dur-3) var(--ease-out);
}

.toast[data-closing] {
  animation: fade-out var(--dur-2) var(--ease-in) forwards;
}

.toast-text {
  flex: 1;
  min-width: 0;
  padding-right: var(--sp-1);
}

.toast .icon.success {
  color: var(--success);
}

.toast .icon.error {
  color: var(--danger);
}

.toast .icon.info {
  color: var(--info);
}

.toast .btn {
  height: 28px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(calc(var(--shift) * 1.5));
  }
}

@media (max-width: 639px) {
  .toasts {
    inset: auto var(--sp-3) calc(var(--sp-3) + env(safe-area-inset-bottom)) var(--sp-3);
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

/* 支付跳转页 */
.spinner-lg {
  width: 32px;
  height: 32px;
  border: 3px solid var(--primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.pay-auto {
  display: none;
}

.submitting .pay-auto {
  display: contents;
}

.submitting .pay-manual {
  display: none;
}
