/* ══ 按钮通用 ══ */
.mkl-action-buttons { display: flex; flex-direction: column; gap: 12px; }
.mkl-btn-row { display: flex; gap: 12px; }
.mkl-btn {
    flex: 1; max-width: 240px;
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; border-radius: 12px;
    font-size: 15px; font-weight: 500;
    text-decoration: none; cursor: pointer;
    transition: background .2s ease;
    border: none; font-family: inherit;
}
.mkl-btn--buy { background: #0071e3; color: #fff; }
.mkl-btn--buy:hover { background: #0033FF; color: #fff; }
.mkl-btn--dl { background: #1D1D1F; color: #fff; }
.mkl-btn--dl:hover { background: #3a3a3c; color: #fff; }
.mkl-btn:focus { outline: none; box-shadow: none; }

/* ══ 伪二层 pill ══ */
.mkl-purchase-options { margin-bottom: 12px; }
.mkl-po-label { font-size: 13px; color: #6E6E73; margin-bottom: 8px; }
.mkl-po-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.mkl-po-pill {
    padding: 6px 16px; border: 1.5px solid #E5E5EA; border-radius: 20px;
    background: #fff; font-family: inherit; font-size: 13px; color: #1D1D1F;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.mkl-po-pill:hover { border-color: #0071e3; }
.mkl-po-pill.active {
    border-color: #0071e3; background: rgba(0,113,227,0.06); color: #0071e3;
}

/* ══ Modal 弹窗 ══ */
.mkl-modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.mkl-modal-overlay.is-open { opacity: 1; visibility: visible; }
.mkl-modal {
    background: #fff; border-radius: 16px;
    width: 90%; max-width: 480px; max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95); transition: transform .2s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.mkl-modal-overlay.is-open .mkl-modal { transform: scale(1); }
.mkl-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 0;
    position: sticky; top: 0; background: #fff;
    border-radius: 16px 16px 0 0; z-index: 1;
}
.mkl-modal-title { font-size: 17px; font-weight: 600; color: #1D1D1F; margin: 0; }
.mkl-modal-close {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: #F2F2F7; color: #8E8E93;
    font-size: 18px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s; font-family: inherit;
}
.mkl-modal-close:hover { background: #E5E5EA; color: #1D1D1F; }
.mkl-modal-body { padding: 16px 24px 24px; }
.mkl-dl-detected { font-size: 13px; color: #6E6E73; margin-bottom: 12px; }
.mkl-dl-main-btn {
    width: 100%; padding: 14px 16px; border-radius: 12px;
    background: #0071e3; color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 500; font-family: inherit;
    transition: background .15s;
}
.mkl-dl-main-btn:hover { background: #0077ED; }
.mkl-dl-btn-icon { font-size: 18px; }
.mkl-dl-btn-size { margin-left: auto; font-size: 13px; opacity: 0.8; }
.mkl-dl-other { margin-top: 16px; }
.mkl-dl-other-toggle {
    font-size: 13px; color: #6E6E73; background: none; border: none;
    cursor: pointer; padding: 0; font-family: inherit;
    display: flex; align-items: center; gap: 4px;
}
.mkl-dl-other-toggle:hover { color: #1D1D1F; }
.mkl-dl-arrow { font-size: 10px; transition: transform .2s; }
.mkl-dl-arrow.is-open { transform: rotate(180deg); }
.mkl-dl-other-list {
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
    display: flex; flex-direction: column; gap: 8px; margin-top: 0;
}
.mkl-dl-other-list.is-open { margin-top: 10px; }
.mkl-dl-os-btn {
    width: 100%; padding: 10px 16px; border-radius: 10px;
    background: #F5F5F7; color: #1D1D1F; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-family: inherit; transition: background .15s;
}
.mkl-dl-os-btn:hover { background: #E8E8ED; }
.mkl-dl-flat-list { display: flex; flex-direction: column; gap: 8px; }
.mkl-dl-supps {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid #F2F2F7;
}
.mkl-dl-supps-label { font-size: 13px; color: #6E6E73; margin-bottom: 10px; }
.mkl-dl-supp-btn {
    width: 100%; padding: 10px 16px; border-radius: 10px;
    background: #FFFBF0; color: #1D1D1F; border: 1px solid #F0E6CC;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-family: inherit; transition: background .15s;
    margin-bottom: 4px;
}
.mkl-dl-supp-btn:hover { background: #FFF5E0; }
.mkl-dl-supp-note { font-size: 12px; color: #8E8E93; margin: 2px 0 8px 16px; }
.mkl-dl-main-btn.is-unlocked { background: #34C759; }
.mkl-dl-main-btn.is-unlocked:hover { background: #2DB84D; }
.mkl-dl-os-btn.is-unlocked { background: #E8FAE8; color: #1D1D1F; }
.mkl-dl-os-btn.is-unlocked:hover { background: #D4F5D4; }
.mkl-dl-supp-btn.is-unlocked { background: #E8FAE8; border-color: #34C759; }
.mkl-dl-supp-btn.is-unlocked:hover { background: #D4F5D4; }
.mkl-dl-other-toggle.is-unlocked { color: #34C759; font-weight: 600; font-size: 14px; }
.mkl-dl-verify {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid #F2F2F7;
}
.mkl-dl-verify-label { font-size: 13px; color: #6E6E73; margin-bottom: 10px; }
.mkl-dl-verify-row { display: flex; align-items: center; gap: 8px; }
.mkl-dl-verify-q { font-size: 15px; color: #1D1D1F; white-space: nowrap; }
.mkl-dl-verify-input {
    width: 56px; height: 36px;
    border: 1.5px solid #E5E5EA; border-radius: 8px;
    text-align: center; font-size: 15px; font-family: inherit; color: #1D1D1F;
    outline: none; transition: border-color .15s;
    background: #fff;
}
.mkl-dl-verify-input:focus { border-color: #0071e3; }
.mkl-dl-verify-input.is-error { border-color: #FF3B30; animation: mkl-shake .3s; }
.mkl-dl-verify-submit {
    min-width: 180px; padding: 0 16px; height: 36px; border-radius: 8px;
    display: inline-flex; justify-content: center; align-items: center;
    background: #1D1D1F; color: #fff; border: none; cursor: pointer;
    font-size: 14px; font-weight: 500; font-family: inherit;
    transition: background .15s; white-space: nowrap;
}
.mkl-dl-verify-submit:hover { background: #3a3a3c; }
.mkl-dl-verify-submit:disabled { background: #34C759; cursor: default; opacity: 1; }
.mkl-dl-verify-ok { font-size: 13px; color: #34C759; margin-top: 8px; display: none; }
.mkl-dl-verify-ok.is-show { display: block; }

@keyframes mkl-shake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-4px); }
    40%,80% { transform: translateX(4px); }
}
