#cube_credit-panel, .acp-admin {
    --acp-accent: #08775e;
    --acp-background: #fff;
    --acp-soft: #f4f8f6;
    --acp-text: #243047;
    --acp-muted: #526475;
    --acp-line: #dce6e0;
}
body.is-dark #cube_credit-panel, body.is-dark .acp-admin {
    --acp-background: #23272e;
    --acp-soft: #2e3638;
    --acp-text: #f2f5f8;
    --acp-muted: #c2cbd2;
    --acp-line: #46534e;
}
#cube_credit-panel [hidden], .acp-admin [hidden] { display: none !important; }
#cube_credit-panel .modal-content { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
#cube_credit-panel .acp-checkout {
    position: relative;
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    overflow: hidden;
    color: var(--acp-text);
    background: var(--acp-background);
}
#cube_credit-panel .acp-checkout > :is(.modal-card-body,.modal-card-foot) {
    margin: 0;
    padding: 16px 20px;
    background: var(--acp-background);
    border-color: var(--acp-line);
}
#cube_credit-panel .modal-card-foot { justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.acp-heading { display: grid; gap: 2px; min-width: 0; margin-bottom: 12px; padding-inline: 40px; text-align: center; }
.acp-heading h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--acp-text); }
.acp-current-balance { color: var(--acp-muted); font-size: 13px; line-height: 1.4; }
.acp-current-balance:empty { display: none; }
.acp-close {
    position: absolute; top: 10px; right: 12px; z-index: 1;
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: 50%; border: 0; background: var(--acp-soft); color: var(--acp-text); cursor: pointer;
}
.acp-options { padding: 0; margin: 0; border: 0; min-width: 0; }
.acp-options legend { font-size: 14px; font-weight: 750; margin-bottom: 8px; }
.acp-plan-tabs {
    --acp-tab-active: var(--acp-accent);
    --acp-tab-track: #edf0f1;
    display: flex; gap: 2px; width: fit-content; max-width: 100%; margin: 0 auto 12px;
    padding: 3px; border-radius: 999px; background: var(--acp-tab-track);
}
body.is-dark .acp-plan-tabs { --acp-tab-active: #78cfb6; --acp-tab-track: #343b42; }
.acp-plan-tabs button {
    flex: 1 1 0; min-width: 96px; height: 36px; padding: 0 12px;
    border: 1px solid transparent; border-radius: inherit; background: none;
    color: var(--acp-muted); font-size: 13px; font-weight: 700; cursor: pointer;
}
.acp-plan-tabs button[aria-selected="true"] {
    border-color: var(--acp-tab-active); background: var(--acp-background); color: var(--acp-text);
    box-shadow: 0 1px 2px #24304718;
}
.acp-subscription-note { margin: 0 0 10px; color: var(--acp-muted); font-size: 12px; line-height: 1.4; text-align: center; }
.acp-subscription-note:empty { display: none; }
.acp-cards { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
.acp-card, .acp-payment-option { position: relative; display: grid; min-width: 0; margin: 0; cursor: pointer; }
.acp-card { flex: 0 0 calc((100% - 16px) / 3); }
:is(.acp-card, .acp-payment-option) > input {
    position: absolute; width: 1px; height: 1px; margin: 0; clip-path: inset(50%);
}
.acp-card-copy {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; padding: 10px; border: 1px solid var(--acp-line);
    border-radius: 11px; background: var(--acp-background); text-align: center;
}
:is(.acp-card, .acp-payment-option) > input:checked + span {
    border-color: var(--acp-accent); box-shadow: inset 0 0 0 1px var(--acp-accent); background: var(--acp-soft);
}
:is(.acp-card, .acp-payment-option) > input:focus-visible + span { outline: 2px solid var(--acp-accent); outline-offset: 2px; }
.acp-card-name { color: var(--acp-muted); font-size: 11px; overflow-wrap: anywhere; }
.acp-money { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 800; }
.acp-money small { font-size: 70%; }
.acp-card .acp-money, .acp-total .acp-money { font-size: 19px; }
.acp-card strong { font-size: 14px; color: inherit; }
.acp-bonus {
    padding: 2px 5px; border-radius: 999px; white-space: nowrap;
    background: #347e3b; color: #fff; font-size: 10px; font-weight: 700; line-height: 14px;
}
.acp-expiry { color: var(--acp-muted); font-size: 12px; font-weight: 700; }
.acp-payment { margin-top: 14px; }
.acp-payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acp-payment-option > span {
    display: grid; justify-items: center; align-content: center; gap: 4px;
    min-height: 62px; padding: 7px 8px;
    border: 1px solid var(--acp-line); border-radius: 8px; background: var(--acp-background);
    text-align: center; font-size: 14px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere;
}
.acp-payment-logo { display: block; width: auto; height: 24px; max-width: 110px; object-fit: contain; }
.acp-fields :is(input,select) {
    width: 100%; min-width: 0; height: 36px; box-sizing: border-box; padding: 0 8px;
    border: 1px solid var(--acp-line); border-radius: 8px; background: var(--acp-background); color: var(--acp-text);
    font: inherit; font-size: 14px;
}
.acp-actions, .acr-card .acr-actions { display: flex; gap: 8px; align-items: center; }
.acp-button {
    height: 36px; padding: 0 15px; border: 1px solid var(--acp-line); border-radius: 999px;
    background: var(--acp-background); color: var(--acp-text); font-size: 14px; font-weight: 700; cursor: pointer;
}
.acp-primary { background: var(--acp-accent); border-color: var(--acp-accent); color: white; }
.acp-button:disabled { opacity: .5; cursor: default; }
.acp-review {
    width: min(440px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 16px;
    border: 1px solid var(--acp-line); border-radius: 14px; background: var(--acp-background); color: var(--acp-text);
    box-sizing: border-box; overflow: auto;
}
.acp-review::backdrop { background: #17262166; }
.acp-review h2 { margin: 0 0 10px; font-size: 18px; font-weight: 800; }
.acp-review-summary {
    display: grid; justify-items: center; gap: 4px; width: min(100%,270px); margin-inline: auto;
    padding: 12px; box-sizing: border-box; border: 1px solid var(--acp-accent); border-radius: 11px;
    background: var(--acp-soft); box-shadow: inset 0 0 0 1px var(--acp-accent);
    text-align: center; font-size: 14px; overflow-wrap: anywhere;
}
.acp-review-summary .acp-money { font-size: 19px; }
.acp-review-rules { margin: 12px 0; padding-inline-start: 20px; list-style: disc; color: var(--acp-muted); font-size: 13px; line-height: 1.5; }
.acp-review-rules li + li { margin-top: 4px; }
.acp-review .acp-actions { justify-content: end; flex-wrap: wrap; }
.acp-review button:focus-visible { outline: 2px solid var(--acp-accent); outline-offset: 2px; }
.acp-pending { display: grid; gap: 2px; padding: 12px; background: var(--acp-soft); border-radius: 8px; }
.acp-status { color: var(--acp-muted); margin: 0 0 8px; font-size: 13px; }
.acp-status:empty { display: none; }
.acp-checkout :is(button,input,select):focus-visible { outline: 2px solid var(--acp-accent); outline-offset: 2px; }
.acp-admin .acr-filter-header .acr-heading { gap: 2px; }
.acp-admin a.acr-button { display: inline-flex; align-items: center; }
.acp-admin [data-plan-status] { color: var(--acp-muted); margin: 10px 0; font-size: 13px; }
.acp-admin-form { background: var(--acp-soft); margin-top: 12px; padding: 12px; border: 1px solid var(--acp-line); border-radius: 10px; }
.acp-admin-form h2 { font-weight: 800; margin: 0 0 8px; color: var(--acp-text); }
.acp-form-error { margin: 10px 0 0; color: #a12738; font-size: 13px; }
.acp-form-error:empty { display: none; }
body.is-dark .acp-form-error { color: #ff9eaa; }
.acp-fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.acp-fields label { display: grid; gap: 4px; font-size: 13px; }
.acp-admin-form .acr-actions { justify-content: end; margin-top: 12px; }
@media (max-width: 590px) {
    .acp-card { flex-basis: calc((100% - 8px) / 2); }
    .acp-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
    #cube_credit-panel .acp-checkout > :is(.modal-card-body,.modal-card-foot) { padding: 12px 14px; }
}
@media (max-width: 360px) {
    .acp-card-copy { padding-inline: 6px; }
    .acp-fields { grid-template-columns: 1fr; }
}
