/* AI 음원 충전 UI only. Shared header, payment pages and My Page are untouched. */
.sg .sg-wallet-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 22px;padding:16px 20px;border:1px solid var(--line);border-radius:15px;background:#fff}
.sg .sg-wallet-copy{display:flex;align-items:center;flex-wrap:wrap;gap:9px 14px;min-width:0}
.sg .sg-wallet-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:var(--accent-weak);color:#746025;flex-shrink:0}
.sg .sg-wallet-copy strong{font-size:16px;font-weight:650;line-height:1.4;letter-spacing:-.035em}
.sg .sg-wallet-copy small{display:block;font-size:11px;color:var(--muted);line-height:1.5}
.sg .sg-wallet-caption{font-size:12px;color:var(--muted)}
.sg .sg-wallet-open{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 14px;border:1px solid #e6cf81;border-radius:10px;background:#fff9e6;font-size:12px;font-weight:650;line-height:1.4;white-space:nowrap}
.sg .sg-wallet-open:hover{background:#ffedb2;border-color:#d6b857}
.sg .sg-wallet-open svg{width:15px;height:15px}
.sg .sg-token-amount-row{flex-wrap:wrap}
.sg .sg-token-amount-row .sg-wallet-open{margin-left:4px}
.sg-charge-overlay,.sg-wallet-toast{font-family:'Pretendard',-apple-system,BlinkMacSystemFont,'Noto Sans KR',sans-serif;font-size:14px;line-height:1.6;letter-spacing:-.025em;color:#202126;-webkit-font-smoothing:antialiased}
.sg-charge-overlay *,.sg-charge-overlay *::before,.sg-charge-overlay *::after{box-sizing:border-box;font-family:inherit}
.sg-charge-overlay[hidden],.sg-charge-overlay [hidden],.sg-wallet-toast[hidden]{display:none!important}
.sg-charge-overlay{position:fixed;inset:0;z-index:2147483600;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(26,27,30,.52);backdrop-filter:blur(5px);isolation:isolate}
.sg-charge-dialog{position:relative;width:100%;max-width:600px;max-height:calc(100dvh - 48px);overflow-y:auto;overscroll-behavior:contain;padding:32px;border-radius:24px;background:#fff;box-shadow:0 22px 80px rgba(15,16,19,.18);text-align:left;scrollbar-width:thin}
.sg-charge-dialog :is(h2,p){margin:0;color:inherit}
.sg-charge-dialog button{appearance:none;border:0;font:inherit;cursor:pointer;color:inherit}
.sg-charge-dialog button:disabled{cursor:not-allowed}
.sg-charge-dialog :is(button,input):focus-visible{outline:2px solid #202126;outline-offset:4px}
.sg-charge-close{position:absolute;top:19px;right:19px;z-index:2;display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:#f5f4ef}
.sg-charge-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.sg-charge-head{padding-right:44px}
.sg-charge-eyebrow{display:block;color:#85847b;font-size:9px;font-weight:600;letter-spacing:.14em;line-height:1.6;margin-bottom:8px}
.sg-charge-head h2{font-size:25px;font-weight:650;letter-spacing:-.045em;line-height:1.4;word-break:keep-all}
.sg-charge-head p{margin-top:7px;font-size:12px;color:#77777e;line-height:1.7;word-break:keep-all}
.sg-charge-balance{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin:22px 0;padding:12px 14px;background:#f6f5f1;border-radius:11px;font-size:12px;color:#77777e}
.sg-charge-balance strong{color:#202126;font-size:15px;font-weight:650}
.sg-charge-shared{margin-left:auto;font-size:10px}
.sg-charge-fieldset{min-width:0;padding:0;margin:0 0 20px;border:0}
.sg-charge-fieldset legend{display:block;padding:0;margin-bottom:10px;font-size:12px;font-weight:650}
.sg-charge-packages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.sg-charge-package,.sg-charge-methods label{position:relative;display:block;margin:0;min-width:0;cursor:pointer}
.sg-charge-package>input,.sg-charge-methods input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.sg-charge-package-card{display:flex;flex-direction:column;min-height:125px;padding:13px 12px;border:1px solid #e6e5df;border-radius:13px;background:#fff;transition:background .15s,border-color .15s;line-height:1.4}
.sg-charge-tier{display:flex;justify-content:space-between;align-items:center;gap:6px;color:#77777e;font-size:11px;letter-spacing:0}
.sg-charge-tier i{width:12px;height:12px;border:1px solid #d3d2c8;border-radius:50%}
.sg-charge-package strong{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px;margin-top:13px;font-size:24px;font-weight:650;letter-spacing:-.045em;line-height:1.3}
.sg-charge-package small{font-size:10px;color:#77777e;font-weight:500;letter-spacing:-.02em}
.sg-charge-price{display:block;margin-top:auto;padding-top:7px;font-size:12px;font-weight:600}
.sg-charge-package>input:checked+.sg-charge-package-card{border-color:#d4b24b;box-shadow:inset 0 0 0 1px #d4b24b;background:#fffaf0}
.sg-charge-package>input:checked+.sg-charge-package-card .sg-charge-tier{color:#6d591e}
.sg-charge-package>input:checked+.sg-charge-package-card i{background:#202126;border-color:#202126;box-shadow:inset 0 0 0 3px #fffaf0}
.sg-charge-package>input:focus-visible+.sg-charge-package-card,.sg-charge-methods input:focus-visible+span{outline:2px solid #202126;outline-offset:3px}
.sg-charge-methods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
/* Compact vector icons keep the payment labels readable on narrow screens. */
.sg-charge-methods .sg-method-choice{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:82px;padding:11px 6px 9px;border:1px solid #e6e5df;border-radius:11px;background:#fff;font-size:12px;font-weight:500;text-align:center;line-height:1.4;word-break:keep-all;transition:border-color .15s,background .15s}
.sg-charge-methods .sg-method-icon{display:block;flex-shrink:0;width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;color:#5e5e56}
.sg-charge-methods .sg-method-icon-kakao{width:44px;stroke:none}
.sg-charge-methods .sg-method-label{display:block;font-size:inherit;line-height:1.4;font-weight:inherit;color:inherit;word-break:keep-all}
.sg-charge-methods .sg-method-choice::after{content:"";position:absolute;top:7px;right:7px;width:5px;height:5px;border-radius:50%;background:#202126;opacity:0}
.sg-charge-methods input:checked+.sg-method-choice::after{opacity:1}
.sg-charge-methods label:hover .sg-method-choice{border-color:#aaa99f}
@media(max-width:360px){.sg-charge-methods .sg-method-choice{min-height:91px;gap:5px;padding:10px 5px 7px}.sg-charge-methods .sg-method-label{display:flex;align-items:center;justify-content:center;min-height:31px}}
.sg-charge-methods input:checked+span{border-color:#202126;background:#f7f7f5;font-weight:650}
.sg-charge-total{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;border-top:1px solid #e6e5df;font-size:12px}
.sg-charge-total strong{font-size:24px;font-weight:650;letter-spacing:-.045em;line-height:1.4}
.sg-charge-agreement{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:3px 8px;margin:0 0 15px;font-size:11px;color:#64646b}
.sg-charge-agreement label{display:flex;align-items:center;gap:7px;min-height:32px;cursor:pointer;margin:0}
.sg-charge-agreement input{appearance:auto;-webkit-appearance:checkbox;position:static;opacity:1;display:inline-block;width:16px;height:16px;flex-shrink:0;margin:0;accent-color:#202126}
.sg-charge-agreement b{font-size:10px;margin-right:3px;font-weight:600;color:#202126}
.sg-charge-agreement button{min-height:32px;padding:4px 0;background:none;font-size:11px;color:#64646b;text-decoration:underline;text-underline-offset:3px}
.sg-charge-dialog .sg-charge-error{margin:0 0 12px;padding:10px 12px;border-radius:9px;background:#fff4ed;color:#9b481e;font-size:12px;line-height:1.7;word-break:keep-all}
.sg-charge-pay{display:block;width:100%;min-height:50px;padding:13px 16px;border-radius:12px;background:#202126;color:#fff!important;font-size:14px!important;font-weight:650!important;line-height:1.5}
.sg-charge-pay:hover{background:#3b3c40}
.sg-charge-pay:disabled{background:#e9e8e1;color:#929289!important}
.sg-charge-dialog .sg-charge-footnote{margin-top:12px;font-size:10px;color:#85847b;text-align:center;line-height:1.7;word-break:keep-all}
.sg-wallet-toast{position:fixed;z-index:2147483601;left:50%;bottom:24px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);padding:13px 19px;border-radius:13px;background:#202126;color:#fff;box-shadow:0 8px 30px rgba(0,0,0,.14);font-size:12px;line-height:1.7;word-break:keep-all;text-align:center}
@media(max-width:640px){
 .sg .sg-wallet-bar{padding:13px 14px;gap:8px;margin-bottom:16px}
 .sg .sg-wallet-copy{gap:9px}
 .sg .sg-wallet-caption{display:none}
 .sg .sg-wallet-open{min-height:42px;padding:8px 10px;font-size:11px}
 .sg .sg-token-amount-row .sg-wallet-open{margin-left:0}
 .sg-charge-overlay{padding:12px;align-items:center}
 .sg-charge-dialog{max-height:calc(100dvh - 24px);padding:25px 20px 20px;border-radius:20px}
 .sg-charge-close{top:13px;right:13px;width:36px;height:36px}
 .sg-charge-head h2{font-size:23px}
 .sg-charge-eyebrow{font-size:8px;letter-spacing:.1em}
 .sg-charge-balance{margin:18px 0}
 .sg-charge-packages{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .sg-charge-package-card{min-height:102px;padding:11px 13px}
 .sg-charge-package strong{margin-top:6px;font-size:24px}
 .sg-charge-fieldset{margin-bottom:17px}
 .sg-charge-price{padding-top:4px}
 .sg-charge-methods span{font-size:11px}
 .sg-charge-agreement{font-size:10px}
}
@media(max-width:360px){
 .sg .sg-wallet-icon{display:none}
 .sg .sg-wallet-copy strong{font-size:14px}
 .sg-charge-dialog{padding:23px 16px 18px}
 .sg-charge-head h2{font-size:21px}
 .sg-charge-shared{width:100%;margin:0}
 .sg-charge-agreement label{align-items:flex-start;padding-top:6px}
}
