/* Shared runtime modals and auth actions for storybook pages. */
  .auth-action {
    min-height: 48px;
    border: 0;
    border-radius: 50px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--coral), var(--coral-deep));
    color: #fff;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(255, 107, 74, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  }
  .auth-action.secondary {
    background: var(--white);
    color: var(--mint-dark);
    border: 1.5px solid rgba(126, 207, 192, 0.32);
    box-shadow: none;
  }
  .auth-action:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(255, 107, 74, 0.25);
  }
  .auth-action:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    box-shadow: none;
    transform: none;
  }
  .auth-action.secondary:disabled {
    background: var(--mint-pale);
    color: var(--text-light);
  }
  .flow-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
      radial-gradient(circle at 18% 16%, rgba(255, 179, 153, 0.26), transparent 35%),
      radial-gradient(circle at 86% 45%, rgba(126, 207, 192, 0.22), transparent 34%),
      rgba(96, 80, 58, 0.30);
    backdrop-filter: blur(12px);
  }
  .flow-modal-mask.show { display: flex; }
  .flow-modal {
    position: relative;
    width: min(430px, 100%);
    background:
      radial-gradient(circle at 18% 0%, rgba(255, 243, 232, 0.90), transparent 40%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(255, 252, 248, 0.985));
    border-radius: 28px;
    padding: 78px 30px 28px;
    box-shadow: 0 28px 70px rgba(93, 78, 55, 0.15), 0 18px 42px rgba(255, 140, 105, 0.14);
    border: 1.5px solid rgba(255, 217, 188, 0.96);
    color: var(--text);
    text-align: center;
  }
  .flow-modal h3 {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 10px;
  }
  .flow-modal p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 20px;
  }
  .flow-modal-lead {
    font-weight: 700;
  }
  .flow-modal-icon {
    position: absolute;
    z-index: 2;
    top: -48px;
    left: 50%;
    width: 104px;
    height: 104px;
    transform: translateX(-50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #fff 0%, #fff6ee 100%);
    border: 9px solid rgba(255, 243, 232, 0.98);
    box-shadow: 0 16px 38px rgba(255, 140, 105, 0.20);
  }
  .flow-modal-icon::after {
    content: "✦";
    position: absolute;
    top: 13px;
    right: -24px;
    color: var(--honey);
    font-size: 22px;
    text-shadow: 18px 22px 0 var(--honey);
  }
  .flow-modal-icon span {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 35%, #806454, #4e3c31 72%);
    color: #fff;
    font-size: 40px;
    line-height: 1;
  }
  .flow-modal-icon.mobile span {
    position: relative;
    background: linear-gradient(135deg, rgba(126, 207, 192, 0.88), rgba(255, 243, 232, 0.96));
    color: var(--text);
    font-size: 0;
    overflow: hidden;
  }
  .flow-modal-icon.mobile span::before {
    content: "📖";
    position: absolute;
    left: 12px;
    bottom: 8px;
    font-size: 32px;
    transform: rotate(-6deg);
    filter: drop-shadow(0 5px 8px rgba(93, 78, 55, 0.16));
  }
  .flow-modal-icon.mobile span::after {
    content: "📱";
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 34px;
    transform: rotate(6deg);
    filter: drop-shadow(0 6px 8px rgba(93, 78, 55, 0.16));
  }
  .flow-status {
    min-height: 22px;
    font-size: 13px;
    color: var(--mint-dark);
    text-align: center;
    margin-top: 8px;
    font-weight: 800;
  }
  .flow-status.error { color: var(--coral-deep); }
  .flow-modal-close {
    position: absolute;
    z-index: 3;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 228, 204, 0.95);
    border-radius: 50%;
    background: rgba(255, 250, 246, 0.96);
    color: var(--text);
    font-size: 0;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  }
  .flow-modal-close::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .flow-modal-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  .flow-modal-close:hover {
    background: rgba(255, 243, 232, 0.98);
    color: var(--text);
    transform: rotate(6deg);
  }
  .flow-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    text-align: left;
  }
  .flow-field {
    position: relative;
  }
  .flow-field-icon {
    position: absolute;
    z-index: 2;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    line-height: 1;
  }
  .flow-modal .input-field {
    width: 100%;
    min-height: 48px;
    border: 1.3px solid rgba(255, 196, 166, 0.72);
    border-radius: 16px;
    padding: 0 18px 0 50px;
    background: rgba(255, 251, 247, 0.84);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    outline: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }
  .flow-modal .input-field:focus {
    border-color: var(--coral);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 140, 105, 0.10);
  }
  .flow-modal .input-field::placeholder {
    color: rgba(139, 115, 85, 0.66);
  }
  .mobile-row {
    display: flex;
    gap: 12px;
  }
  .mobile-row .flow-field { flex: 1; }
  .mobile-row .auth-action {
    white-space: nowrap;
    min-height: 48px;
    padding-left: 17px;
    padding-right: 17px;
  }
  .mobile-benefit {
    min-height: 42px;
    margin: 14px 0 0;
    border: 1px solid rgba(126, 207, 192, 0.26);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(232, 249, 246, 0.95), rgba(255, 243, 232, 0.72));
    color: var(--mint-dark);
    font-size: 14px;
    font-weight: 800;
  }
  .flow-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
  }
  .flow-modal-actions .auth-action { flex: 1; }
  .bind-mobile-modal {
    width: min(430px, calc(100vw - 32px));
  }
  .purchase-modal {
    width: min(780px, calc(100vw - 32px));
    max-height: min(880px, calc(100vh - 46px));
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding: 0;
    text-align: left;
  }
  .purchase-scroll {
    max-height: inherit;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 66px 56px 24px;
    border-radius: inherit;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 140, 105, 0.45) transparent;
  }
  .purchase-scroll::-webkit-scrollbar {
    width: 6px;
  }
  .purchase-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 140, 105, 0.45);
  }
  .purchase-scroll::-webkit-scrollbar-track {
    background: transparent;
  }
  .purchase-modal h3 {
    text-align: center;
    font-size: 34px;
    margin-bottom: 6px;
    padding-right: 0;
  }
  .purchase-modal .purchase-message {
    margin: 0 0 14px;
    color: var(--text-light);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
  }
  .purchase-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 70px;
    margin-bottom: 14px;
    padding: 12px 22px;
    border-radius: 18px;
    border: 1.5px solid rgba(255, 228, 204, 0.95);
    background: linear-gradient(135deg, rgba(255, 243, 232, 0.96), rgba(255, 255, 255, 0.90));
    color: var(--text-light);
    font-size: 14px;
  }
  .purchase-summary-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 179, 71, 0.48);
    background: linear-gradient(135deg, #fff4dd, #ffb347);
    color: #fff;
    font-size: 29px;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.42);
  }
  .purchase-summary strong {
    display: block;
    color: var(--text);
    font-size: 20px;
    line-height: 1.35;
    white-space: nowrap;
  }
  .purchase-summary span {
    display: block;
    margin-top: 3px;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 700;
  }
  .purchase-section {
    display: block;
    margin-bottom: 10px;
  }
  .purchase-section-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
    margin-bottom: 10px;
  }
  .purchase-goods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 394px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 2px 6px 2px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,140,105,0.45) transparent;
  }
  .purchase-goods::-webkit-scrollbar { width: 6px; }
  .purchase-goods::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255,140,105,0.45);
  }
  .purchase-goods::-webkit-scrollbar-track { background: transparent; }
  .purchase-good {
    position: relative;
    width: 100%;
    min-height: 76px;
    min-width: 0;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1.5px solid rgba(255, 228, 204, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 250, 246, 0.86) 100%);
    color: inherit;
    cursor: pointer;
    text-align: left;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto 34px;
    align-items: center;
    column-gap: 16px;
    row-gap: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  }
  .purchase-good-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #ff8c69, var(--coral-deep));
    box-shadow: 0 12px 22px rgba(255, 107, 74, 0.20);
  }
  .purchase-good-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .purchase-good-year .purchase-good-icon {
    background: linear-gradient(135deg, #ffb36d, var(--coral-deep));
  }
  .purchase-good-month .purchase-good-icon {
    background: linear-gradient(135deg, #ff9b7c, #ff6f52);
  }
  .purchase-good-main {
    min-width: 0;
  }
  .purchase-good-check {
    position: static;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 196, 166, 0.92);
    background: rgba(255, 255, 255, 0.72);
    color: transparent;
    font-size: 20px;
    font-weight: 900;
    box-shadow: none;
  }
  .purchase-good.selected {
    border-color: var(--coral-deep);
    background: linear-gradient(180deg, #fff 0%, rgba(255, 243, 232, 0.86) 100%);
    box-shadow: 0 14px 30px rgba(255,140,105,0.18);
    transform: translateY(-1px);
  }
  .purchase-good.disabled {
    cursor: not-allowed;
    opacity: 0.72;
  }
  .purchase-good:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(255, 140, 105, 0.14), 0 14px 30px rgba(255,140,105,0.18);
  }
  .purchase-good.selected .purchase-good-check {
    border-color: transparent;
    background: linear-gradient(135deg, var(--coral), var(--coral-deep));
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 107, 74, 0.24);
  }
  .purchase-good-title {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.22;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .purchase-price {
    justify-self: end;
    color: var(--coral-deep);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
  }
  .purchase-good .purchase-good-meta {
    margin: 4px 0 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    overflow: hidden;
    white-space: normal;
  }
  .purchase-quantity-panel {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid rgba(255, 196, 166, 0.72);
    border-radius: 14px;
    background: rgba(255, 250, 246, 0.82);
    display: grid;
    grid-template-columns: minmax(230px, 1.2fr) 1px minmax(240px, 1fr);
    align-items: center;
    gap: 18px;
    text-align: left;
  }
  .purchase-quantity-field {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(112px, 136px) auto;
    align-items: center;
    gap: 12px;
  }
  .purchase-quantity-label {
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 900;
    white-space: nowrap;
  }
  .purchase-quantity-field small {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .purchase-quantity-input-wrap {
    min-width: 0;
    height: 42px;
    border: 1.3px solid rgba(255, 140, 105, 0.48);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
  }
  .purchase-quantity-input-wrap em {
    padding-right: 10px;
    color: var(--text-light);
    font-style: normal;
    font-size: 15px;
    font-weight: 900;
  }
  .purchase-quantity-input {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 17px;
    font-weight: 900;
    text-align: center;
    outline: 0;
  }
  .purchase-quantity-input-wrap:focus-within {
    border-color: var(--coral-deep);
    box-shadow: 0 0 0 3px rgba(255, 140, 105, 0.12);
  }
  .purchase-quantity-divider {
    width: 1px;
    height: 42px;
    background: rgba(152, 118, 84, 0.22);
  }
  .purchase-quantity-stats {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .purchase-quantity-stats span {
    min-width: 0;
    min-height: 58px;
    border-radius: 10px;
    background: rgba(255, 243, 232, 0.82);
    display: grid;
    place-items: center;
    padding: 7px 10px;
  }
  .purchase-quantity-stats em {
    color: var(--text-light);
    font-style: normal;
    font-size: 13px;
    font-weight: 800;
  }
  .purchase-quantity-stats strong {
    color: var(--coral-deep);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
    white-space: nowrap;
  }
  .purchase-goods-empty {
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
  }
  .purchase-pay-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }
  .purchase-pay-option {
    min-height: 42px;
    border: 1.5px solid rgba(255, 228, 204, 0.95);
    border-radius: 50px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  }
  .purchase-pay-option.active {
    background: linear-gradient(135deg, rgba(255, 243, 232, 0.98), rgba(255, 255, 255, 0.94));
    color: var(--text);
    box-shadow: inset 0 0 0 2px rgba(255, 107, 74, 0.82), 0 10px 22px rgba(255, 107, 74, 0.16);
  }
  .pay-icon {
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    border-radius: 7px;
    color: #fff;
    background: var(--mint-dark);
    font-size: 13px;
    line-height: 1;
  }
  .pay-icon.wechat {
    position: relative;
    background: #14b86a;
  }
  .pay-icon.wechat::before,
  .pay-icon.wechat::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: #fff;
  }
  .pay-icon.wechat::before {
    width: 11px;
    height: 8px;
    left: 4px;
    top: 6px;
  }
  .pay-icon.wechat::after {
    width: 9px;
    height: 7px;
    right: 4px;
    bottom: 5px;
    box-shadow: -5px -2px 0 -3px #14b86a;
  }
  .pay-icon.alipay { background: #2f80ed; }
  .purchase-submit {
    width: 100%;
    min-height: 52px;
    margin: 4px 0 12px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: linear-gradient(135deg, var(--coral), var(--coral-deep));
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(255, 107, 74, 0.22);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  }
  .purchase-submit:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(255, 107, 74, 0.26);
  }
  .purchase-submit:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    box-shadow: none;
  }
  .payment-panel {
    display: none;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin-top: 2px;
    padding: 12px;
    border: 1.5px solid rgba(255, 228, 204, 0.95);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 243, 232, 0.70), rgba(255,255,255,0.95));
    text-align: left;
  }
  .payment-panel.has-qr {
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    align-items: center;
  }
  .payment-qr-box {
    width: 72px;
    height: 72px;
    margin: 0;
    border-radius: 16px;
    border: 1.5px dashed rgba(255, 140, 105, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    color: var(--text-light);
    text-align: center;
    font-size: 12px;
    line-height: 1.55;
    padding: 8px;
  }
  .payment-panel.has-qr .payment-qr-box {
    width: 180px;
    height: 180px;
    padding: 10px;
    border-radius: 22px;
    border-style: solid;
    background: #fff;
  }
  .payment-qr-box.empty {
    border-style: dashed;
    background: rgba(255, 250, 246, 0.72);
    color: transparent;
  }
  .payment-copy { min-width: 0; }
  .payment-title {
    color: var(--text);
    font-size: 19px;
    font-weight: 900;
    margin-bottom: 7px;
  }
  .payment-panel.has-qr .payment-title {
    font-size: 22px;
  }
  .payment-desc {
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.7;
  }
  .payment-panel .flow-status {
    min-height: 18px;
    margin-top: 8px;
    color: var(--text);
    text-align: left;
  }
  .payment-panel .flow-status.error {
    color: var(--coral-deep);
  }
  .payment-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  @media (min-width: 721px) {
    .flow-modal-mask.payment-ready .purchase-modal {
      width: min(920px, calc(100vw - 48px));
    }
    .flow-modal-mask.payment-ready .purchase-scroll {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 250px;
      grid-template-areas:
        "title title"
        "message message"
        "summary summary"
        "product payment"
        "pay payment"
        "submit payment"
        "status payment";
      column-gap: 24px;
      align-items: start;
    }
    .flow-modal-mask.payment-ready .purchase-modal h3 {
      grid-area: title;
    }
    .flow-modal-mask.payment-ready .purchase-message {
      grid-area: message;
    }
    .flow-modal-mask.payment-ready .purchase-summary {
      grid-area: summary;
    }
    .flow-modal-mask.payment-ready .product-section {
      grid-area: product;
    }
    .flow-modal-mask.payment-ready .purchase-pay-section {
      grid-area: pay;
    }
    .flow-modal-mask.payment-ready .purchase-submit {
      grid-area: submit;
    }
    .flow-modal-mask.payment-ready #purchaseStatus {
      grid-area: status;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-panel {
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      padding: 10px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-divider {
      display: none;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-field {
      grid-template-columns: auto minmax(86px, 112px) auto;
      gap: 8px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-label {
      font-size: 13px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-field small {
      font-size: 10px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-input-wrap {
      height: 34px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-input {
      height: 32px;
      font-size: 14px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-input-wrap em {
      font-size: 12px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-stats {
      gap: 8px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-stats span {
      min-height: 44px;
      padding: 5px 7px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-stats em {
      font-size: 10px;
    }
    .flow-modal-mask.payment-ready .purchase-quantity-stats strong {
      font-size: 14px;
    }
    .flow-modal-mask.payment-ready .payment-panel {
      grid-area: payment;
      display: grid;
      position: sticky;
      top: 12px;
      grid-template-columns: minmax(0, 1fr);
      justify-items: center;
      gap: 14px;
      margin-top: 0;
      padding: 18px;
      text-align: center;
    }
    .flow-modal-mask.payment-ready .payment-panel .payment-qr-box {
      width: 210px;
      height: 210px;
      padding: 10px;
      border-radius: 22px;
    }
    .flow-modal-mask.payment-ready .payment-panel .payment-copy,
    .flow-modal-mask.payment-ready .payment-panel .flow-status {
      text-align: center;
    }
    .flow-modal-mask.payment-ready .payment-panel .payment-title {
      font-size: 22px;
    }
  }
  @media (min-width: 721px) and (max-height: 860px) {
    .flow-modal-mask {
      padding: 44px 24px 24px;
    }
    .purchase-modal {
      max-height: calc(100vh - 64px);
      border-radius: 24px;
    }
    .flow-modal-mask.payment-ready .purchase-modal {
      width: min(880px, calc(100vw - 48px));
    }
    .flow-modal-mask.payment-ready .purchase-scroll {
      grid-template-columns: minmax(0, 1fr) 220px;
      column-gap: 20px;
    }
    .purchase-modal > .flow-modal-icon {
      top: -34px;
      width: 88px;
      height: 88px;
      border-width: 8px;
      box-shadow: 0 12px 28px rgba(255, 140, 105, 0.18);
    }
    .purchase-modal > .flow-modal-icon span {
      width: 60px;
      height: 60px;
      font-size: 32px;
    }
    .purchase-scroll {
      padding: 48px 38px 10px;
    }
    .purchase-modal h3 {
      font-size: 27px;
      margin-bottom: 8px;
    }
    .purchase-modal .purchase-message {
      margin-bottom: 10px;
      font-size: 13px;
      line-height: 1.55;
    }
    .purchase-summary {
      min-height: 58px;
      margin-bottom: 10px;
      padding: 10px 16px;
      gap: 14px;
      border-radius: 16px;
    }
    .purchase-summary-icon {
      width: 42px;
      height: 42px;
      font-size: 23px;
    }
    .purchase-summary strong {
      font-size: 17px;
    }
    .purchase-summary span {
      margin-top: 3px;
      font-size: 12px;
    }
    .purchase-section {
      margin-bottom: 8px;
    }
    .purchase-section-title {
      margin-bottom: 7px;
      font-size: 15px;
    }
    .purchase-goods {
      gap: 8px;
      max-height: 316px;
    }
    .purchase-good {
      min-height: 70px;
      padding: 10px 14px;
      border-radius: 16px;
      grid-template-columns: 46px minmax(0, 1fr) auto 30px;
      column-gap: 12px;
      row-gap: 10px;
      overflow: visible;
    }
    .purchase-good-icon {
      width: 42px;
      height: 42px;
    }
    .purchase-good-icon svg {
      width: 22px;
      height: 22px;
    }
    .purchase-good-check {
      width: 27px;
      height: 27px;
      font-size: 17px;
    }
    .purchase-good-title {
      margin-bottom: 0;
      font-size: 16px;
      line-height: 1.2;
      white-space: nowrap;
    }
    .purchase-price {
      font-size: 18px;
      line-height: 1.1;
    }
    .purchase-good .purchase-good-meta {
      margin-top: 0;
      font-size: 12px;
      line-height: 1.25;
      overflow: hidden;
      white-space: normal;
    }
    .purchase-quantity-panel {
      width: 100%;
      grid-template-columns: minmax(196px, 1.15fr) 1px minmax(196px, 1fr);
      gap: 12px;
      padding: 9px 10px;
    }
    .purchase-quantity-field {
      grid-template-columns: auto minmax(86px, 110px) auto;
      gap: 8px;
    }
    .purchase-quantity-label {
      font-size: 13px;
    }
    .purchase-quantity-field small {
      font-size: 10px;
    }
    .purchase-quantity-input-wrap {
      height: 34px;
    }
    .purchase-quantity-input {
      height: 32px;
      font-size: 14px;
    }
    .purchase-quantity-input-wrap em {
      font-size: 12px;
    }
    .purchase-quantity-stats {
      gap: 8px;
    }
    .purchase-quantity-stats span {
      min-height: 44px;
      padding: 5px 7px;
    }
    .purchase-quantity-stats em {
      font-size: 10px;
    }
    .purchase-quantity-stats strong {
      font-size: 14px;
    }
    .purchase-pay-option {
      min-height: 36px;
      padding: 7px 14px;
      font-size: 13px;
    }
    .pay-icon {
      width: 21px;
      height: 21px;
      font-size: 13px;
    }
    .purchase-submit {
      min-height: 44px;
      margin-bottom: 8px;
      font-size: 20px;
    }
    .payment-panel {
      grid-template-columns: 66px minmax(0, 1fr);
      gap: 14px;
      padding: 10px;
      border-radius: 18px;
    }
    .payment-panel.has-qr {
      grid-template-columns: 150px minmax(0, 1fr);
      gap: 14px;
      padding: 12px;
    }
    .payment-qr-box {
      width: 58px;
      height: 58px;
      border-radius: 14px;
      font-size: 11px;
      line-height: 1.35;
      padding: 6px;
    }
    .payment-panel.has-qr .payment-qr-box {
      width: 140px;
      height: 140px;
      padding: 8px;
      border-radius: 18px;
    }
    .flow-modal-mask.payment-ready .payment-panel .payment-qr-box {
      width: 180px;
      height: 180px;
      padding: 9px;
      border-radius: 20px;
    }
    .payment-title {
      margin-bottom: 4px;
      font-size: 18px;
    }
    .payment-desc {
      font-size: 12px;
      line-height: 1.45;
    }
    .payment-panel .flow-status {
      min-height: 14px;
      margin-top: 4px;
    }
    .purchase-modal .flow-status {
      min-height: 16px;
      margin-top: 4px;
    }
  }
  @media (max-width: 720px) {
    .flow-modal-mask {
      padding: 18px 12px;
      align-items: flex-start;
      overflow-y: auto;
    }
    .flow-modal {
      margin-top: 56px;
      padding: 66px 22px 24px;
      border-radius: 24px;
    }
    .flow-modal h3 { font-size: 28px; }
    .purchase-modal {
      width: calc(100vw - 24px);
      max-width: 520px;
      max-height: none;
      overflow: visible;
      padding: 0;
    }
    .purchase-scroll {
      max-height: none;
      padding: 66px 20px 24px;
    }
    .flow-modal-mask.payment-ready .purchase-scroll {
      display: block;
    }
    .purchase-goods {
      grid-template-columns: 1fr;
      max-height: none;
    }
    .purchase-good {
      grid-template-columns: 44px minmax(0, 1fr) auto 28px;
      column-gap: 10px;
      padding: 12px;
    }
    .purchase-good-icon {
      width: 40px;
      height: 40px;
    }
    .purchase-good-icon svg {
      width: 21px;
      height: 21px;
    }
    .purchase-good-title {
      font-size: 16px;
    }
    .purchase-good .purchase-good-meta {
      font-size: 12px;
    }
    .purchase-price {
      font-size: 17px;
    }
    .purchase-good-check {
      width: 26px;
      height: 26px;
      font-size: 17px;
    }
    .purchase-quantity-panel {
      grid-template-columns: 1fr;
      gap: 10px;
      padding: 10px;
    }
    .purchase-quantity-divider {
      display: none;
    }
    .purchase-quantity-field {
      grid-template-columns: auto minmax(94px, 122px) auto;
      gap: 8px;
    }
    .purchase-quantity-stats {
      gap: 8px;
    }
    .purchase-pay-options {
      gap: 8px;
    }
    .purchase-pay-option {
      padding: 8px 10px;
      font-size: 13px;
    }
    .purchase-submit {
      min-height: 46px;
      font-size: 20px;
    }
    .payment-panel {
      grid-template-columns: 94px minmax(0, 1fr);
      gap: 14px;
    }
    .flow-modal-mask.payment-ready .payment-panel {
      display: grid;
    }
    .payment-panel.has-qr,
    .flow-modal-mask.payment-ready .payment-panel {
      grid-template-columns: 1fr;
      justify-items: center;
      text-align: center;
      gap: 14px;
      padding: 16px;
    }
    .payment-qr-box {
      width: 86px;
      height: 86px;
    }
    .payment-panel.has-qr .payment-qr-box,
    .flow-modal-mask.payment-ready .payment-panel .payment-qr-box {
      width: min(160px, 72vw);
      height: min(160px, 72vw);
      padding: 10px;
      border-radius: 20px;
    }
    .payment-panel.has-qr .payment-copy,
    .flow-modal-mask.payment-ready .payment-panel .payment-copy {
      text-align: center;
    }
    .payment-panel.has-qr .flow-status,
    .flow-modal-mask.payment-ready .payment-panel .flow-status {
      text-align: center;
    }
    .purchase-summary {
      padding: 16px;
      gap: 12px;
    }
    .purchase-summary strong { white-space: normal; }
    .mobile-row {
      display: grid;
      grid-template-columns: 1fr;
    }
  }
