/* COGO credit UI r1: scoped spacing, server-owned balances. */
#modal:has(.cogo-credit-shell){width:min(560px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border-radius:20px;overflow:hidden}
#modal:has(.cogo-credit-shell)[open]{display:flex;flex-direction:column}
#modal:has(.cogo-credit-shell)>.dialog-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid var(--line,#dce3f0)}
#modal:has(.cogo-credit-shell) #modalTitle{margin:0;font-size:18px;line-height:26px;letter-spacing:-.4px}
#modal:has(.cogo-credit-shell)>.dialog-head .icon-btn{width:34px;height:34px;min-width:34px;padding:7px;margin:0;display:grid;place-items:center}
#modal:has(.cogo-credit-shell)>.dialog-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:22px 24px 24px;scrollbar-gutter:stable}
.cogo-credit-shell{color:var(--ink,#1d2e4b);font-size:13px;line-height:1.65}
.cogo-credit-shell,.cogo-credit-shell *{box-sizing:border-box}
.cogo-credit-panel{--credit-fill:#7295f1;--credit-track:#edf1f8;text-align:center}
.cogo-credit-shell [hidden]{display:none!important}
.cogo-credit-panel .energy-symbol15{display:block;width:48px;height:48px;margin:0 auto;color:#ddad4d;font-size:46px;line-height:48px}
.cogo-credit-panel .credit-plan{display:table;margin:8px auto 0;padding:3px 10px;background:#f1f4fb;border-radius:6px;color:#536789;font-size:12px;font-weight:600;line-height:20px}
.cogo-credit-panel .credit-amount{display:flex;align-items:baseline;justify-content:center;gap:8px;margin:12px 0 0;font-size:34px;font-weight:750;line-height:1.25;letter-spacing:-.9px;font-variant-numeric:tabular-nums}
.cogo-credit-panel .credit-capacity{color:#8a96ab;font-size:20px;font-weight:500;letter-spacing:-.4px;white-space:pre}
.cogo-credit-panel .credit-countdown{margin:8px 0 0;color:#7282a0;font-size:12px;line-height:20px;min-height:20px}
.cogo-credit-panel .credit-meter{margin:20px 0 0}
.cogo-credit-panel .energy-dots15{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;margin:0}
.cogo-credit-panel .energy-dots15 i{height:25px;border-radius:5px;background:var(--credit-track)}
.cogo-credit-panel .energy-dots15 i.filled{background:linear-gradient(130deg,#7295f1,#4569c8)}
.cogo-credit-panel .credit-track{position:relative;height:10px;border-radius:99px;background:var(--credit-track);overflow:hidden}
.cogo-credit-panel .credit-fill{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(130deg,#7295f1,#4569c8);transition:width .24s ease}
.cogo-credit-panel .credit-held-fill{position:absolute;top:0;bottom:0;width:0;background:repeating-linear-gradient(135deg,#c5d3ef 0 4px,#e6ecf8 4px 8px);transition:width .24s ease,left .24s ease}
.cogo-credit-panel .credit-reserved{margin:10px 0 0;color:#7282a0;font-size:12px;line-height:1.6}
.cogo-credit-panel .credit-grace{margin:16px 0 0;padding:10px 14px;background:#f6f8fc;border:1px solid #e8edf6;border-radius:10px;color:#647593;font-size:12px;line-height:1.65;word-break:keep-all;overflow-wrap:anywhere}
.cogo-credit-panel .credit-details{margin:20px 0 0;text-align:left;font-size:12px;border-top:1px solid var(--line,#dce3f0)}
.cogo-credit-shell .cogo-credit-rules{margin:0;border-top:1px solid var(--line,#dce3f0);border-bottom:1px solid var(--line,#dce3f0)}
.cogo-credit-shell .credit-details>summary,.cogo-credit-shell .cogo-credit-rules>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding:12px 2px;margin:0;color:#344766;font-size:13px;font-weight:600;line-height:24px;list-style:none;cursor:pointer;opacity:1}
.cogo-credit-shell summary::-webkit-details-marker{display:none}
.cogo-credit-shell .credit-details>summary::after,.cogo-credit-shell .cogo-credit-rules>summary::after{content:"";flex:none;width:7px;height:7px;margin:0 5px 4px;border-right:1.5px solid #8594ae;border-bottom:1.5px solid #8594ae;transform:rotate(45deg);transition:transform .18s ease}
.cogo-credit-shell details[open]>summary::after{transform:rotate(225deg);margin-top:4px;margin-bottom:0}
.cogo-credit-panel .credit-details ol{margin:8px 0 12px;padding:0 0 0 18px;max-height:160px;overflow:auto;color:#63738e;font-size:12px;line-height:1.8}
.cogo-credit-panel .credit-details li+li{margin-top:6px}
.cogo-credit-panel .credit-reward{margin:0 0 10px;color:#4768a0;font-size:12px;line-height:1.6}
.cogo-credit-panel .credit-refresh{display:inline-flex;align-items:center;min-height:36px;margin:0 0 12px;padding:5px 10px;border:1px solid #dce3f0;border-radius:8px;background:#fff;font:inherit;color:#526582;cursor:pointer;text-decoration:none}
.cogo-credit-panel .credit-refresh:disabled{opacity:.5;cursor:wait}
.cogo-credit-shell .credit-rules{padding:0 2px 14px;color:#63738e;font-size:12px;line-height:1.75}
.cogo-credit-shell .credit-rules h3{margin:0 0 10px;color:#344766;font-size:13px;font-weight:600}
.cogo-credit-shell .credit-rules p{margin:8px 0;font-size:12px;line-height:1.75;word-break:keep-all;overflow-wrap:anywhere}
.cogo-credit-shell .credit-rules b{display:inline-block;min-width:60px;color:#344766}
.cogo-credit-shell .credit-rules a{color:#486bc1;text-underline-offset:3px}
.cogo-credit-shell .credit-actions{padding:18px 0 0}
.cogo-credit-shell .credit-actions>.btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:0;padding:11px 16px;border-radius:11px;font:inherit;font-weight:650;line-height:22px}
.cogo-credit-shell .credit-navigation-status{margin:10px 0 0;color:#9a4426;font-size:12px;line-height:1.65}
.cogo-credit-panel .credit-status{margin:12px 0;color:#9a4426;font-size:12px;line-height:1.6}
.cogo-credit-panel .credit-status:empty{display:none}
.cogo-credit-shell button:focus-visible,.cogo-credit-shell summary:focus-visible{outline:2px solid #7295f1;outline-offset:3px}
[data-energy15].cogo-credit-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:6px 11px;border-radius:12px;white-space:nowrap;vertical-align:middle;font-variant-numeric:tabular-nums}
[data-energy15].cogo-credit-trigger .credit-header-symbol{display:inline-flex;align-items:center;justify-content:center;flex:none;width:20px;height:26px;color:#d5a23e;font-size:25px;line-height:1;font-family:Arial,sans-serif}
[data-energy15].cogo-credit-trigger .credit-header-amount{color:var(--ink,#1d2e4b);font-size:13px;line-height:20px;font-weight:600;letter-spacing:-.2px}
@media(max-width:480px){
 #modal:has(.cogo-credit-shell){width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:18px}
 #modal:has(.cogo-credit-shell)>.dialog-head{padding:14px 18px}
 #modal:has(.cogo-credit-shell)>.dialog-content{padding:18px 18px 20px;scrollbar-gutter:auto}
 .cogo-credit-panel .credit-amount{font-size:32px}.cogo-credit-panel .credit-capacity{font-size:18px}
 .cogo-credit-panel .credit-grace{padding:10px 12px}
 .cogo-credit-shell .credit-actions{padding-top:16px}
 [data-energy15].cogo-credit-trigger{gap:5px;padding:5px 8px}
 [data-energy15].cogo-credit-trigger .credit-header-amount{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.cogo-credit-panel .credit-fill,.cogo-credit-panel .credit-held-fill,.cogo-credit-shell summary::after{transition:none}}
