#monthlyAnalysisDialog{border:1px solid #d0e6f2;border-radius:16px;box-shadow:0 15px 55px #12344a20;color:#12344a;background:#fff;font-family:inherit;max-width:calc(100vw - 32px)}
#monthlyAnalysisDialog::backdrop{background:#172e3c35}
#monthlyAnalysisDialog{width:580px;padding:30px 32px 20px;max-height:90vh;overflow-y:auto}
#monthlyAnalysisDialog .ma-close{position:absolute;z-index:2;right:22px;top:22px;width:34px;height:34px;border-radius:50%;font-size:25px;line-height:1;background:#f1f6fa}
#monthlyAnalysisDialog .ma-close:hover{background:#e4f0f8}
.ma-popup-heading{display:flex;align-items:center;gap:13px;margin:0 36px 25px 0}
.ma-popup-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:#ecf6fd;color:#278bc4;flex-shrink:0}
.ma-popup-icon svg{width:23px;height:23px}
#monthlyAnalysisDialog .ma-popup-heading h2{font-size:22px;margin:0 0 4px;font-weight:750;letter-spacing:-.6px}
.ma-popup-subtitle{font-size:12px;color:#8095a3}
.ma-popup-highlight{background:#f0f8fe;border-radius:13px;padding:25px 22px;position:relative;display:flex;flex-direction:column;gap:9px}
.ma-popup-highlight>span:first-child{font-size:13px;color:#668297}
.ma-popup-highlight>strong{font-size:32px;color:#147caf;letter-spacing:-1px}
.ma-popup-highlight em{font-style:normal;font-size:20px;font-weight:550;letter-spacing:-.6px;color:#234e66}
.ma-change-pill{position:absolute;right:20px;top:27px;background:#dfeffb;color:#167aad;border-radius:30px;padding:5px 9px;font-size:12px;font-weight:700}
.ma-compare-chart{display:grid;gap:24px;padding:28px 3px 30px}
.ma-compare-row>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin-bottom:9px;color:#6e8798}
.ma-compare-row strong{font-size:18px;color:#49677b}
.ma-compare-row.ma-current>div:first-child,.ma-compare-row.ma-current strong{color:#147caf;font-weight:700}
.ma-chart-track{height:18px;border-radius:5px;overflow:hidden;background:#f1f5f8}
.ma-chart-track>span{display:block;height:100%;border-radius:5px}
.ma-popup-action{width:100%;border:1px solid #d2e6f3;background:#f7fbfe;border-radius:9px;padding:14px 17px;text-align:left;font-size:14px;font-weight:650;color:#187aae;display:flex;justify-content:space-between;align-items:center}
.ma-popup-action:hover{background:#eaf5fc}
.ma-category-amount{position:relative;display:flex;flex-direction:column;gap:8px;padding:0 0 24px}
.ma-category-amount>span:first-child{font-size:13px;color:#7a91a0}
.ma-category-amount>strong{font-size:38px;font-weight:750;letter-spacing:-1.1px;line-height:1.3}
.ma-share-pill{position:absolute;right:0;bottom:34px;font-size:12px;color:#5b7a8e;background:#eef5f9;padding:6px 10px;border-radius:25px}
.ma-category-amount:has(+.ma-share-visual) .ma-share-pill{display:none}
.ma-budget-visual,.ma-share-visual{border-top:1px solid #e3edf4;padding:23px 0 27px}
.ma-budget-caption{display:flex;justify-content:space-between;align-items:center;font-size:14px}
.ma-budget-caption h3{font-size:14px;font-weight:600;margin:0;color:#58778b}
.ma-budget-caption strong{font-size:16px}
.ma-budget-meter{display:flex;height:23px;margin-top:18px;position:relative;border-radius:5px;background:#edf4f8}
.ma-budget-used{background:#78b1d4;border-radius:5px 0 0 5px}
.ma-budget-over{background:repeating-linear-gradient(135deg,#edac60,#edac60 5px,#f5c88e 5px,#f5c88e 9px);border-radius:0 5px 5px 0}
.ma-budget-meter i{position:absolute;top:-5px;bottom:-5px;width:2px;background:#a96e1c;transform:translateX(-1px)}
.ma-budget-labels{margin-top:11px;font-size:11px;color:#7a91a1}
.ma-budget-labels>span:last-child{color:#aa7225}
.ma-budget-callout{display:flex;gap:8px;align-items:center;background:#fff6e9;padding:12px 13px;border-radius:8px;margin-top:20px;color:#a46b20}
.ma-budget-callout>span{display:grid;place-items:center;width:18px;height:18px;background:#efc990;border-radius:50%;font-size:12px;font-weight:750}
.ma-budget-callout strong{font-size:14px}.ma-budget-callout small{font-size:12px;color:#aa824d;margin-left:auto}
.ma-share-meter{margin-top:18px;height:24px;border-radius:6px;overflow:hidden;background:#edf2f6}
.ma-share-meter>span{display:block;height:100%;border-radius:6px}
.ma-share-key{display:flex;justify-content:space-between;font-size:12px;color:#7a91a1;margin-top:12px}.ma-share-key i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:6px}
.ma-all-total{display:flex;align-items:center;justify-content:space-between;background:#f0f8fe;border-radius:12px;padding:17px 19px;color:#477089;font-size:14px}
.ma-all-total strong{font-size:28px;color:#173f56;letter-spacing:-.8px}
.ma-ranked-categories{margin-top:10px}
.ma-ranked-item{width:100%;display:block;border:0;background:none;padding:16px 5px;border-radius:8px;text-align:left}.ma-ranked-item:hover{background:#f4f9fc}
.ma-ranked-line{display:flex;justify-content:space-between;align-items:center;font-size:14px}.ma-ranked-line>span:last-child{display:flex;gap:14px;align-items:center}.ma-ranked-line small{width:30px;text-align:right;font-size:12px;color:#7b90a0}.ma-ranked-line b{font-size:19px;color:#93a8b7}.ma-ranked-line strong{font-size:15px}
.ma-rank-track{height:7px;background:#f0f4f7;border-radius:3px;margin-top:11px;overflow:hidden}.ma-rank-track>span{display:block;height:100%;border-radius:3px}
#monthlyAnalysisDialog .ma-sample{margin:17px 0 0;text-align:right;font-size:10px;color:#97a8b3}

/* 짧고 차분한 팝업 진입, 사용자 동작 감소 설정 존중 */
#monthlyAnalysisDialog[open]{animation:ma-popup-appear 200ms cubic-bezier(.2,.7,.3,1) both}
#monthlyAnalysisDialog[open]::backdrop{animation:ma-backdrop-appear 200ms ease-out both}
.ma-popup-view{animation:ma-popup-content-appear 180ms ease-out both}
#monthlyAnalysisDialog[open].ma-is-closing{animation:ma-popup-disappear 160ms ease-in both;pointer-events:none}
#monthlyAnalysisDialog[open].ma-is-closing::backdrop{animation:ma-backdrop-disappear 160ms ease-in both}
@keyframes ma-popup-appear{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes ma-backdrop-appear{from{background-color:#172e3c00}to{background-color:#172e3c35}}
@keyframes ma-popup-content-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@keyframes ma-popup-disappear{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(6px) scale(.99)}}
@keyframes ma-backdrop-disappear{from{background-color:#172e3c35}to{background-color:#172e3c00}}
@media(prefers-reduced-motion:reduce){#monthlyAnalysisDialog[open],#monthlyAnalysisDialog[open]::backdrop,#monthlyAnalysisDialog[open].ma-is-closing,#monthlyAnalysisDialog[open].ma-is-closing::backdrop,.ma-popup-view{animation:none}}

/* A · 한 막대: approved monthly analysis */
#monthlyAnalysis{color:#12344a;font-family:"Segoe UI","Noto Sans KR",Arial,sans-serif;min-width:0}
#monthlyAnalysis *{box-sizing:border-box}
.ma-heading{display:flex;justify-content:flex-end;align-items:center;margin:0 0 16px;gap:16px}
#monthlyAnalysis .ma-heading h2{margin:0;color:#12344a;font-size:28px;font-weight:800;letter-spacing:-.8px}
.ma-heading>span{font-size:12px;color:#7b929e}
.ma-allocation{background:linear-gradient(120deg,#f0f9fe 0%,#f7fcff 45%,#fff 100%);border:1px solid #d8eaf4;border-radius:16px;padding:27px 28px 28px;box-shadow:0 4px 18px #1d648405}
.ma-income{display:flex;flex-direction:column;align-items:flex-start}
.ma-income>span{color:#496576;font-weight:650;font-size:15px}
.ma-income>strong{color:#12344a;font-size:38px;font-weight:750;letter-spacing:-1px;margin:8px 0 11px;line-height:1.3;overflow-wrap:anywhere}
.ma-income>small{font-size:12px;color:#7a8f9d}
.ma-bar{height:28px;margin-top:26px;border-radius:7px;display:flex;overflow:hidden;background:#e7eff4}
.ma-bar>span{height:100%;flex-shrink:0}
.ma-segment-0{background:#ed888a}.ma-segment-1{background:#4eafab}.ma-segment-2{background:#459bd2}
.ma-labels{display:grid;padding-top:18px;gap:0}
.ma-labels>div{text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:0 3px}
.ma-labels strong{font-size:16px;font-weight:750;line-height:1.4;overflow-wrap:anywhere}
.ma-labels span{font-size:13px;font-weight:650;color:#687e8f;line-height:1.5;overflow-wrap:anywhere}
.ma-label-0 strong{color:#ef4444}.ma-label-1 strong{color:#27863f}.ma-label-2 strong{color:#2875e8}
.ma-warning{font-size:13px;color:#ab731c;margin:18px 0 0;line-height:1.5}
.ma-comparison{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:23px 4px;border-bottom:1px solid #dfebf1;margin-top:4px}
.ma-comparison p{margin:0;font-size:17px;font-weight:500;color:#375a6f;letter-spacing:-.35px;line-height:1.7}
.ma-comparison strong{color:#126da0;font-weight:750}.ma-increased strong{color:#b56d25}
#monthlyAnalysis button{font-family:inherit;cursor:pointer}
.ma-link{display:inline-flex;align-items:center;gap:10px;border:0;background:transparent;padding:4px 0;color:#1379b9;font-size:13px;font-weight:650;white-space:nowrap}
.ma-link svg{width:15px;height:15px}
.ma-categories{padding:24px 4px 0}
#monthlyAnalysis h3{font-size:19px;font-weight:750;color:#163c52;margin:0 0 3px}
.ma-category{display:grid;width:100%;grid-template-columns:minmax(0,1fr) 130px 205px 16px;gap:16px;align-items:center;text-align:left;background:transparent;border:0;border-bottom:1px solid #e6eef3;padding:18px 10px;color:#244b62}
.ma-category:first-of-type{background:#f8fcfe;border-radius:9px 9px 0 0}.ma-category:hover{background:#edf7fc}
.ma-category>span{font-size:15px;font-weight:600;overflow-wrap:anywhere}.ma-category strong{font-size:16px;font-weight:700;color:#173f56;text-align:right}
.ma-category small{font-size:12px;color:#ab731c;text-align:right}.ma-category svg{width:16px;height:16px;color:#8a9aa7}
.ma-all-link{margin-top:18px}
.ma-empty,.ma-budget-alert{font-size:14px;padding:20px 0;color:#718c9b}
.ma-budget-alert{width:100%;display:flex;align-items:center;gap:10px;border:0;background:none;color:#ab731c;font-size:13px;text-align:left}.ma-budget-alert svg{width:17px;height:17px}
#insightsView>.ma-legacy{border:0;border-top:1px solid #e5eef4;padding:0;margin-top:32px;background:transparent;box-shadow:none}
#insightsView>.ma-legacy>summary{padding:18px 4px;display:flex;align-items:center;justify-content:space-between;color:#648499;font-size:14px;font-weight:600;cursor:pointer;list-style:none}
.ma-legacy>summary::-webkit-details-marker{display:none}.ma-legacy>summary svg{width:17px;height:17px}
.ma-legacy-content{display:grid;gap:20px;padding-top:12px}
#monthlyAnalysisDialog button{cursor:pointer;font-family:inherit;border:0;color:inherit}
#monthlyAnalysisDialog .ma-popup-action{border:1px solid #d2e6f3}
#monthlyAnalysisDialog .ma-close{padding:0;color:#7f95a3}
#monthlyAnalysisDialog .ma-popup-icon svg{width:23px;height:23px}
#monthlyAnalysisDialog .ma-popup-action svg{width:16px;height:16px}
#monthlyAnalysisDialog .ma-popup-heading h2{line-height:1.4;overflow-wrap:anywhere}
#monthlyAnalysisDialog .ma-ranked-line>span:first-child{min-width:0;overflow-wrap:anywhere;padding-right:14px}
#monthlyAnalysisDialog .ma-ranked-line>span:last-child{flex-shrink:0}
#monthlyAnalysisDialog .ma-ranked-line small{width:45px}
#monthlyAnalysisDialog .ma-budget-callout.ma-within{background:#edf8f4;color:#358674}
#monthlyAnalysisDialog .ma-budget-callout.ma-within>span{background:#c9e9df}
#monthlyAnalysisDialog .ma-budget-name{font-size:15px;margin:22px 0 12px}
#monthlyAnalysisDialog .ma-empty{padding:28px 0}
#monthlyAnalysisDialog .ma-increased>strong{color:#b56d25}
#monthlyAnalysisDialog .ma-increased .ma-change-pill{background:#fff0df;color:#a46b20}
#monthlyAnalysisDialog .ma-popup-highlight>strong{font-size:30px;line-height:1.4;padding-right:45px}
#monthlyAnalysisDialog .ma-popup-highlight em{white-space:nowrap}
#monthlyAnalysisDialog .ma-budget-caption h3{line-height:1.5}
#monthlyAnalysisDialog .ma-chart-track>span{min-width:0}
#monthlyAnalysisDialog button:focus-visible,#monthlyAnalysis button:focus-visible{outline:2px solid #1683c3;outline-offset:3px}
html:has(#monthlyAnalysisDialog[open]){overflow:hidden}
@media(max-width:1100px){.ma-category{grid-template-columns:minmax(0,1fr) 105px 160px 16px;gap:10px}.ma-comparison{gap:12px}.ma-comparison p{font-size:15px}}
@media(max-width:640px){.ma-heading{margin-bottom:18px;align-items:flex-start}.ma-heading>span{padding-top:7px}#monthlyAnalysis .ma-heading h2{font-size:23px}.ma-allocation{padding:22px 15px}.ma-income>strong{font-size:30px}.ma-bar{height:23px}.ma-labels strong{font-size:12px}.ma-labels span{font-size:11px}.ma-comparison{align-items:flex-start;flex-direction:column;gap:8px;padding:18px 0}.ma-category{padding:16px 4px;grid-template-columns:minmax(0,1fr) auto 14px}.ma-category small{grid-column:1/3;grid-row:2;text-align:left}.ma-category small:empty{display:none}.ma-category svg{grid-column:3;grid-row:1}.ma-category strong{font-size:14px}.ma-category>span{font-size:14px}#monthlyAnalysisDialog{padding:25px 20px 22px}#monthlyAnalysisDialog .ma-category-amount>strong{font-size:30px}#monthlyAnalysisDialog .ma-share-pill{font-size:11px}#monthlyAnalysisDialog .ma-popup-heading h2{font-size:20px}#monthlyAnalysisDialog .ma-popup-highlight>strong{font-size:24px;padding-right:0}#monthlyAnalysisDialog .ma-popup-highlight{padding:23px 16px}#monthlyAnalysisDialog .ma-popup-highlight em{font-size:16px}#monthlyAnalysisDialog .ma-change-pill{position:static;width:max-content}#monthlyAnalysisDialog .ma-ranked-line>span:last-child{gap:8px}}
