.commerce-dialog{border:1px solid #e3ded9;border-radius:20px;padding:0;width:min(760px,calc(100vw - 40px));max-width:760px;max-height:calc(100dvh - 48px);margin:auto;color:#25272a;background:#fff;box-shadow:0 22px 90px #261b2c3d;font-family:'Noto Sans T Chinese';font-size:15px;overflow:hidden}
.commerce-dialog::backdrop{background:#1c202b91;backdrop-filter:blur(3px)}
.commerce-layout{display:flex;flex-direction:column;max-height:calc(100dvh - 50px);min-height:0}
.commerce-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:25px 30px 20px;border-bottom:1px solid #ece7e2;flex:none}
.commerce-eyebrow{display:block;color:#aa343c;font-size:11px;letter-spacing:.08em;font-weight:650;margin-bottom:8px}
.commerce-header h2{font-size:25px;line-height:1.45;letter-spacing:-.015em;outline:none;overflow-wrap:anywhere}
.commerce-subtitle{font-size:12px;line-height:1.7;color:#666;margin:7px 0 0}
.commerce-close{flex:none;width:36px;height:36px;border:1px solid #ded9d5;background:white;border-radius:50%;line-height:1;font-size:24px;font-weight:400;color:#62656c;display:grid;place-items:center;padding:0;cursor:pointer}
.commerce-close:hover{background:#f8f0ef;color:#ab2529}
.commerce-scroll{padding:22px 30px 26px;overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-gutter:stable}
.commerce-block{margin:22px 0 0}
.commerce-block h3,.commerce-risk-block h3{font-size:16px;line-height:1.6;margin:0 0 9px;font-weight:650}
.commerce-block p,.commerce-risk-block p{font-size:14px;line-height:1.9;margin:0}
.commerce-block p+p{margin-top:10px}
.commerce-risk-block{padding:18px;background:#fcf2f0;border:1px solid #f0d8d1;border-radius:10px;margin-top:22px;color:#5f3835}
.commerce-block .commerce-source,.commerce-source{color:#656568;font-size:12px;line-height:1.95}
.commerce-footer{padding:17px 30px 23px;border-top:1px solid #ece7e2;flex:none;background:#fcfbfa}
.commerce-modal-risk{font-size:12px;line-height:1.8;font-weight:650;color:#565458;margin:0 0 14px}
.commerce-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px}
.commerce-actions .btn{font-size:14px;min-height:44px;padding:11px 17px;gap:10px}
.commerce-error{color:#b21921;background:#fff1f0;border-radius:7px;padding:11px 14px;margin:17px 0 0;font-size:13px;line-height:1.85}
.commerce-dialog button:focus-visible,.commerce-dialog a:focus-visible,.commerce-dialog input:focus-visible,.commerce-dialog summary:focus-visible{outline:3px solid #2a536b;outline-offset:4px}
@media(max-width:600px){.commerce-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:14px}.commerce-layout{max-height:calc(100dvh - 26px)}.commerce-header{padding:18px 18px 15px;gap:12px}.commerce-header h2{font-size:21px;line-height:1.5}.commerce-close{width:33px;height:33px;font-size:23px}.commerce-eyebrow{font-size:10px}.commerce-subtitle{font-size:11px}.commerce-scroll{padding:18px 18px 22px;scrollbar-gutter:auto}.commerce-footer{padding:13px 18px 17px}.commerce-modal-risk{font-size:11px;line-height:1.85;margin-bottom:12px}.commerce-actions{gap:8px}.commerce-actions .btn{font-size:12px;flex:1;min-height:45px;padding:10px 11px;gap:6px}.commerce-actions .btn:only-child{flex:none;min-width:120px}.commerce-source,.commerce-block .commerce-source{font-size:11px}.commerce-risk-block{padding:15px}.commerce-block p,.commerce-risk-block p{font-size:13px}}
@media(prefers-reduced-motion:reduce){.commerce-dialog *{scroll-behavior:auto!important;transition:none!important}}
.commerce-full-disclosures{margin-top:22px;padding:17px 18px;background:#faf6f2;border:1px solid #e9dfd6;border-radius:9px}
.commerce-full-disclosures > .product-disclosures{margin:0;padding:0;border:0;color:#555;font-weight:600}
.commerce-dialog .product-disclosures a{color:#a62f37;text-decoration:underline}
.commerce-dialog .product-credit-warning{color:#9f3039}
@media(max-width:600px){.commerce-full-disclosures{padding:14px;margin-top:18px}}
/* AIP-5384：基金詳情（關鍵資料、累積報酬）與加入購物車 */
.commerce-status{font-size:13px;color:#666;background:#f6f4f1;border-radius:7px;padding:11px 14px;margin:0}
.commerce-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;margin:0}
.commerce-facts>div{display:grid;gap:3px;min-width:0}
.commerce-facts dt{font-size:12px;color:#777;line-height:1.6}
.commerce-facts dd{margin:0;font-size:15px;font-weight:600;line-height:1.6;overflow-wrap:anywhere}
.commerce-facts.is-dates{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:10px}
.fund-returns{margin:14px 0 0;padding:12px 14px;border:1px solid #ece5df;border-radius:10px;background:#fcfaf8}
.fund-returns-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:0 0 8px;font-size:12px;line-height:1.6}
.fund-returns-head strong{font-weight:650;color:#3b3b3d}
.fund-returns-date{color:#888;font-size:11px;white-space:nowrap}
.fund-returns dl,.fund-returns-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;margin:0}
.fund-returns dl>div,.fund-returns-detail>div{display:grid;gap:2px;min-width:0}
.fund-returns dt,.fund-returns-detail dt{font-size:11px;color:#7a7a7d;line-height:1.5}
.fund-returns dd,.fund-returns-detail dd{margin:0;font-size:14px;font-weight:400;color:#25272a;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.fund-returns-detail dd{font-size:15px}
.fund-returns-note{margin:8px 0 0;font-size:11px;line-height:1.6;color:#8a8a8d;overflow-wrap:anywhere}
/* 績效一律中性色，不套漲紅跌綠（審稿版 fund-perf.css）；缺值「—」用淡色 */
.fund-returns .is-na,.fund-returns-detail .is-na{color:#62656c}
/* AIP-5384（審稿版 D11）：卡片的每個期間是獨立灰底小方塊（AIP-5428 起改兩欄，見下）；右上角只在載入中／無資料時有字 */
.fund-returns{background:#fff}
.fund-returns-date:empty{display:none}
.fund-returns dl>div,.fund-returns-detail>div{padding:8px 10px;border-radius:8px;background:#f4f3f1}
/* AIP-5428（安聯回覆）：兩欄（近 3 月／近 6 月、近 1 年／近 2 年、近 3 年／近 5 年），「成立至今」獨立一整列：標籤在左、數字靠右且大一些 */
.fund-returns dl>.is-since,.fund-returns-detail>.is-since{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}
.fund-returns .is-since dt,.fund-returns-detail .is-since dt{font-size:12px;color:#5f6266}
.fund-returns .is-since dd{font-size:17px;font-weight:600;text-align:right}
.fund-returns-detail>div{padding:10px 14px}
.fund-returns-detail .is-since dd{font-size:19px;font-weight:600;text-align:right}
@media(max-width:480px){.fund-returns{padding:12px 10px}.fund-returns dl{gap:6px}.fund-returns dl>div{padding:7px 10px}.fund-returns .is-since dd{font-size:16px}}
.fund-cart-button.is-added{background:#fff;color:#2f7a4a;border-color:#2f7a4a;box-shadow:none}
.official-cart{position:relative}
.official-cart>.official-cart-count{position:absolute;top:3px;left:11px;display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e21e28;color:#fff;font-size:11px;font-weight:700;line-height:1}
.official-cart>.official-cart-count[hidden]{display:none}
.official-cart-count.is-bump{animation:cmf-cart-bump .45s ease}
@keyframes cmf-cart-bump{0%{transform:scale(1)}35%{transform:scale(1.45)}70%{transform:scale(.9)}100%{transform:scale(1)}}
.cart-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:1000;width:max-content;max-width:calc(100vw - 32px);background:#222326;color:#fff;border-radius:12px;box-shadow:0 12px 40px #0000004d;padding:13px 18px}
.cart-toast[hidden]{display:none}
.cart-toast p{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0;font-size:14px;line-height:1.6}
.cart-toast-name{color:#d9d9db;overflow-wrap:anywhere}
.cart-toast-link{color:#ffd9d4;font-weight:650;text-decoration:underline;white-space:nowrap}
@media(max-width:767px){
.commerce-dialog{width:100vw;max-width:100vw;max-height:88dvh;margin:auto 0 0;border-radius:18px 18px 0 0;border-bottom:0}
.commerce-layout{max-height:88dvh}
.commerce-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
.cart-toast{bottom:16px;width:calc(100vw - 32px)}
}
@media(max-width:768px){.official-cart>.official-cart-count{left:22px}}
@media(prefers-reduced-motion:reduce){.official-cart-count.is-bump{animation:none}}
/* AIP-5384：依風險等級三型的基金組合（portfolio-tiers.js） */
.tier-tabs{margin:4px 0 16px}
.tier-tabs .tab{flex:1 1 0;min-width:0;min-height:44px}
.tier-tabs .tab:focus-visible,.tier-panel:focus-visible{outline:3px solid #1f6feb;outline-offset:2px}
.tier-panel{min-width:0}
.tier-portfolio-status{margin:8px 0;padding:14px 16px;border-radius:10px;background:#f4f7fa;color:#4b5f6d;font-size:14px;line-height:1.8}
.tier-portfolio-status.is-error{background:#fff4f0;color:#7a3524}
.tier-mix{margin:4px 0 12px}
.tier-mix-bar{display:flex;height:14px;border-radius:7px;overflow:hidden;background:#e7edf2}
.tier-mix-bar>span{display:block;min-width:2px}
.tier-mix-legend{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 0;padding:0;list-style:none;font-size:14px;font-weight:600;color:#3a4f5e}
.tier-mix-legend li{display:flex;align-items:center;gap:6px}
.tier-mix-legend i{display:inline-block;width:10px;height:10px;border-radius:3px}
.tier-mix-Equity{background:#f5b48f}
.tier-mix-Balanced{background:#f2d27e}
.tier-mix-Bond{background:#9fcdee}
.tier-mix-MoneyMarket{background:#b9dcc4}
.tier-mix-Other{background:#cfd6dc}
.product-row-meta{margin:4px 0 0;font-size:13px;color:#5b6d7a}
.outlook-plan-panel .tier-portfolio{margin-top:12px}
@media(max-width:767px){.tier-tabs{flex-wrap:nowrap;gap:6px}.tier-tabs .tab{padding:8px 6px;font-size:14px}}
