.purchase-policy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 14px;
    color: #94a3b8;
    letter-spacing: 0;
}

.purchase-refund-note,
.purchase-license-link {
    min-height: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.65;
}

.purchase-refund-note {
    position: relative;
    color: #94a3b8;
    cursor: help;
    outline: none;
}

.purchase-refund-note:focus-visible {
    color: #64748b;
}

.purchase-refund-note .layui-icon {
    color: #f59e0b;
    font-size: 14px;
}

.purchase-refund-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 30;
    width: max-content;
    max-width: min(330px, calc(100vw - 48px));
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    background: #111827;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    text-align: center;
    transform: translate(-50%, 4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.purchase-refund-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    border: 6px solid transparent;
    border-top-color: #111827;
    transform: translateX(-50%);
}

.purchase-refund-note:hover .purchase-refund-tooltip,
.purchase-refund-note:focus .purchase-refund-tooltip {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
}

.purchase-license-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.16s ease;
}

.purchase-license-link:hover,
.purchase-license-link:focus {
    color: #1e40af;
    text-decoration: none;
}

.purchase-license-link .layui-icon-read {
    font-size: 14px;
}

.purchase-policy-separator {
    width: 1px;
    height: 12px;
    margin: 0 10px;
    background: #cbd5e1;
}

.purchase-dialog-drag {
    display: flex;
    height: 16px;
    margin: -8px 0 8px;
    align-items: center;
    justify-content: center;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.purchase-dialog-drag::before {
    width: 34px;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    box-shadow: 0 7px 0 #cbd5e1;
    content: '';
}

.purchase-dialog-title {
    padding-right: 36px;
    cursor: default;
    user-select: none;
}

.purchase-price-rows {
    display: grid;
    row-gap: 4px;
    text-align: left;
}

.purchase-price-row {
    display: grid;
    grid-template-columns: 5em minmax(0, 1fr);
    align-items: baseline;
    column-gap: 6px;
}

.purchase-price-row-value {
    color: #111827;
}

.purchase-price-reference .purchase-price-row-value {
    color: #94a3b8;
    text-decoration: line-through;
}

.purchase-price-saving,
.purchase-price-saving .purchase-price-row-value {
    color: #10b981;
}

.purchase-payment {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

@media (min-width: 500px) {
    .purchase-dialog.payment-ready {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 192px;
        align-items: start;
        column-gap: 16px;
    }

    .purchase-dialog.payment-ready .purchase-dialog-drag {
        grid-column: 1 / -1;
    }

    .purchase-dialog.payment-ready .purchase-payment {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
        padding: 0 0 0 16px;
        border-top: 0;
        border-left: 1px solid #e2e8f0;
    }

    .purchase-dialog.payment-ready .purchase-payment-product {
        display: none;
    }

    .purchase-dialog.payment-ready .purchase-policy {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: center;
        margin-top: 4px;
        padding-top: 14px;
        border-top: 1px solid #e2e8f0;
    }

    .purchase-dialog.payment-ready .purchase-retry-wrap {
        grid-column: 1 / -1;
    }
}

@media (min-width: 720px) {
    .purchase-dialog.payment-ready {
        grid-template-columns: minmax(0, 1fr) 240px;
        column-gap: 28px;
    }

    .purchase-dialog.payment-ready .purchase-payment {
        padding-left: 28px;
    }
}

.purchase-payment-heading {
    color: #172231;
    font-size: 15px;
    font-weight: 700;
}

.purchase-qr-image,
.purchase-qr-code {
    display: none;
    width: 184px;
    height: 184px;
    margin: 14px auto 10px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
}

.purchase-qr-code img,
.purchase-qr-code canvas {
    max-width: 100%;
    max-height: 100%;
    vertical-align: top;
}

.purchase-qr-code {
    overflow: hidden;
    line-height: 0;
    text-align: center;
}

.purchase-qr-code table {
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto !important;
}

.purchase-qr-loading {
    display: none;
    width: 184px;
    height: 184px;
    margin: 14px auto 10px;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 32px;
}

.purchase-payment-amount {
    color: #f97316;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.25;
}

.purchase-payment-product,
.purchase-payment-tip,
.purchase-order-number {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.purchase-order-number {
    color: #94a3b8;
}

.purchase-retry-wrap {
    margin-top: 12px;
    text-align: center;
}

.purchase-retry {
    padding: 0;
    color: #2563eb;
    background: transparent;
    border: 0;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
}

.purchase-retry:hover,
.purchase-retry:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

body.license-page {
    margin: 0;
    color: #172231;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.license-main {
    padding-top: 70px;
}

.license-container {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
}

.license-heading-band {
    padding: 46px 0 40px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.license-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 24px;
    color: #475569;
    font-size: 14px;
    text-decoration: none;
}

.license-back:hover,
.license-back:focus {
    color: #1d4ed8;
    text-decoration: none;
}

.license-heading-band h1 {
    margin: 0;
    color: #0f172a;
    font-size: 36px;
    font-weight: 750;
    line-height: 1.3;
}

.license-heading-band p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.8;
}

.license-updated {
    display: block;
    margin-top: 14px;
    color: #94a3b8;
    font-size: 13px;
}

.license-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 52px;
    padding-top: 44px;
    padding-bottom: 72px;
}

.license-nav {
    position: sticky;
    top: 92px;
    align-self: start;
    padding-left: 16px;
    border-left: 2px solid #e2e8f0;
}

.license-nav strong {
    display: block;
    margin-bottom: 10px;
    color: #334155;
    font-size: 14px;
}

.license-nav a {
    display: block;
    padding: 7px 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}

.license-nav a:hover,
.license-nav a:focus {
    color: #1d4ed8;
}

.license-article {
    min-width: 0;
}

.license-alert {
    margin-bottom: 8px;
    padding: 16px 18px;
    color: #9a3412;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.8;
}

.license-alert strong {
    color: #7c2d12;
}

.license-section {
    padding: 28px 0;
    border-bottom: 1px solid #e2e8f0;
    scroll-margin-top: 92px;
}

.license-section h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.45;
}

.license-section p,
.license-section li {
    color: #475569;
    font-size: 15px;
    line-height: 1.9;
}

.license-section p {
    margin: 0 0 10px;
}

.license-section ul {
    margin: 0;
    padding-left: 22px;
}

.license-section .license-sublist {
    margin: 8px 0 2px;
    padding-left: 24px;
    list-style: decimal;
}

.license-section .license-sublist li {
    margin-top: 5px;
}

.license-section li + li {
    margin-top: 7px;
}

.license-acceptance {
    margin-top: 28px;
    padding: 18px 20px;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 767px) {
    body.license-page #top {
        height: 64px;
    }

    body.license-page #top .layui-nav {
        min-height: 64px;
        padding: 0 16px;
        overflow: hidden;
    }

    body.license-page #top .layui-nav-item:not(.brand-item):not(.top-service-item) {
        display: none;
    }

    body.license-page #top .top-service-item {
        display: flex;
        margin-left: auto;
    }

    .purchase-refund-note,
    .purchase-license-link {
        font-size: 12px;
    }

    .purchase-refund-tooltip {
        max-width: calc(100vw - 56px);
        white-space: normal;
    }

    .purchase-qr-image,
    .purchase-qr-code,
    .purchase-qr-loading {
        width: 168px;
        height: 168px;
    }

    .license-main {
        padding-top: 64px;
    }

    .license-container {
        width: min(100% - 32px, 680px);
    }

    .license-heading-band {
        padding: 26px 0 28px;
    }

    .license-back {
        margin-bottom: 18px;
    }

    .license-heading-band h1 {
        font-size: 27px;
    }

    .license-heading-band p {
        font-size: 14px;
    }

    .license-layout {
        display: block;
        padding-top: 24px;
        padding-bottom: 48px;
    }

    .license-nav {
        position: static;
        display: flex;
        gap: 14px;
        margin-bottom: 22px;
        padding: 0 0 12px;
        overflow-x: auto;
        border-left: 0;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    .license-nav strong {
        display: none;
    }

    .license-nav a {
        flex: 0 0 auto;
        padding: 4px 0;
    }

    .license-section {
        padding: 23px 0;
    }

    .license-section h2 {
        font-size: 20px;
    }
}

@media (min-width: 500px) and (max-width: 719px) {
    .purchase-dialog.payment-ready {
        grid-template-columns: minmax(240px, 1fr) 156px;
        column-gap: 12px;
    }

    .purchase-dialog.payment-ready .purchase-payment {
        padding-left: 12px;
    }

    .purchase-qr-image,
    .purchase-qr-code,
    .purchase-qr-loading {
        width: 136px;
        height: 136px;
    }
}
