/* Mobile compression layer (≤760px). Compresses and folds; never removes data. See compact.js. */
.headline{display:none}
@media(max-width:760px){
 .topbar{position:sticky;top:0;z-index:20;min-height:0;height:auto;padding:6px 12px;gap:6px;flex-wrap:wrap}
 .topbar .top-actions{gap:4px;flex-wrap:wrap}
 .topbar .small-button{padding:4px 7px;font-size:11px}
 .content{padding:10px 10px 84px}
 .pagehead{margin-bottom:8px;gap:6px;flex-direction:row;align-items:center;flex-wrap:wrap}
 .pagehead h1{font-size:19px;margin:0}
 .pagehead .eyebrow,.pagehead p{display:none}
 .pagehead .button{padding:6px 10px;font-size:12px}
 .panel,.cash-card{padding:10px 11px;border-radius:11px;margin-bottom:8px}
 .panel h2{font-size:14px;margin:0}
 .panel-head{margin-bottom:6px}
 .panel-head .eyebrow{display:none}
 .panel p{margin:4px 0;font-size:12px;line-height:1.4}
 .stats{gap:6px;margin-bottom:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat{padding:8px 10px;border-radius:10px}
 .stat small{font-size:10px}
 .stat strong{font-size:16px;margin:2px 0 0}
 .stat p,.stat>small:not(:first-child),.stat>span{display:none}
 .item{padding:7px 0}
 .item p{margin:2px 0}
 .two-col{gap:8px}
 /* folded secondary panels */
 details.compact-fold>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px;font-weight:750;font-size:14px}
 details.compact-fold>summary::after{content:'▸';color:#6d8176;font-size:13px}
 details.compact-fold[open]>summary::after{content:'▾'}
 details.compact-fold>summary .panel-head,details.compact-fold>summary h2{margin:0}
 details.compact-fold[open]>summary{margin-bottom:6px}
 /* Today headline */
 .headline{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;margin:4px 0 6px}
 .headline div{min-width:0}
 .headline small{display:block;font-size:10px;color:#65716b}
 .headline b{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
 .headline .mover{grid-column:1/-1;font-size:12px;color:#34473d}
 #wealth-summary .wealth-value{font-size:24px}
 #wealth-summary>.panel-head{margin-bottom:0}
 #wealth-summary .currency-control{font-size:11px}
 /* Holdings: 3 short lines per position */
 #holdings-body tr{grid-template-columns:1.25fr 1fr 1fr!important;padding:7px 9px!important;margin-bottom:6px!important;gap:1px 8px!important}
 #holdings-body td{padding:1px 0!important;font-size:13px!important;text-align:left}
 #holdings-body td::before{display:none!important}
 #holdings-body td:nth-child(1){grid-area:1/1;font-size:0!important;line-height:1.15}
 #holdings-body td:nth-child(1) strong{font-size:15px}
 #holdings-body td:nth-child(1) small{font-size:10px;color:#65716b;display:block}
 #holdings-body td:nth-child(4){grid-area:1/2;font-weight:700}
 #holdings-body td:nth-child(7){grid-area:1/3;font-size:12px!important}
 #holdings-body td:nth-child(2){grid-area:2/1;color:#50635a}
 #holdings-body td:nth-child(2)::after{content:' 股'}
 #holdings-body td:nth-child(5){grid-area:2/2}
 #holdings-body td:nth-child(8){grid-area:2/3}
 #holdings-body td:nth-child(6),#holdings-body td:nth-child(3),#holdings-body td:nth-child(9){font-size:11px!important;color:#65716b}
 #holdings-body td:nth-child(6){grid-area:3/1}
 #holdings-body td:nth-child(3){grid-area:3/2}
 #holdings-body td:nth-child(9){grid-area:3/3}
 #holdings-body td:nth-child(6)::before,#holdings-body td:nth-child(3)::before,#holdings-body td:nth-child(9)::before{display:inline!important;content:attr(data-label) ' ';font-size:10px;margin:0}
 #holdings-body td:nth-child(7) br,#holdings-body td:nth-child(8) br{display:none}
 #holdings-body td:nth-child(7) .pl-value+.pl-value{margin-left:4px}
 #holdings-body details summary{font-size:10px}
 #holdings-body .quote-up,#holdings-body .quote-down{animation:none}
 .responsive-finance tfoot tr{padding:7px 9px!important;margin-bottom:6px!important}
 /* History rows */
 #history-body tr{grid-template-columns:repeat(3,minmax(0,1fr))!important;padding:7px 9px!important;margin-bottom:6px!important;gap:1px 8px!important}
 #history-body td{padding:1px 0!important;font-size:12px!important}
 #history-body td::before{font-size:10px!important;margin:0!important}
 #history-body td:first-child{grid-column:1/-1;font-size:14px!important}
 /* Today: headline already carries these numbers */
 #view-today #today-stats{display:none}
 /* Holdings summary strip */
 #hold-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #hold-summary .stat{padding:6px 9px}
 #hold-summary .stat strong,#hold-summary .stat .pl-value{font-size:14px!important;display:inline}
 #hold-summary .stat .pl-value+.pl-value{font-size:11px!important;margin-left:4px}
 #hold-summary .stat small{margin-right:8px}
 #holdings-body td:nth-child(7) .pl-value:last-child{margin-left:6px}
 #holding-currency-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}
 #holding-currency-controls .account-total strong{font-size:15px}
 #view-holdings .toolbar{gap:6px;margin-bottom:6px}
 #view-holdings .toolbar select,#view-holdings .toolbar input{padding:6px 8px;font-size:12px}
 /* Holdings row polish: short labels, one-line P/L */
 #holdings-body td:nth-child(7) .pl-value,#holdings-body td:nth-child(8) .pl-value{font-size:12px;white-space:nowrap}
 #holdings-body td:nth-child(6)::before{content:'佔比 '!important}
 #holdings-body td:nth-child(3)::before{content:'均價 '!important}
 #holdings-body td:nth-child(9)::before{content:'回報 '!important}
 #holdings-body td:nth-child(9) details{display:inline}
 #holdings-body td:nth-child(9) details>summary{display:inline;margin-left:4px}
 /* folded panel headers stay one line */
 details.compact-fold>summary p,details.compact-fold>summary .muted{display:none}
 details.compact-fold>summary .panel-head{display:flex;align-items:center;gap:6px;flex:1}
 /* Research */
 .research-thesis{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 .research-thumbnails img{max-height:72px;width:auto}
 .research-card .panel-head h2{font-size:15px}
 .rr-compact .rr-line{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:13px}
 .rr-compact dl{display:grid;grid-template-columns:auto 1fr;gap:2px 8px;margin:6px 0;font-size:12px}
 .rr-compact dt{color:#65716b;font-size:11px;white-space:nowrap}
 .rr-compact dd{margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .thesis-card>summary{font-size:13px}
 .cash-grid{gap:6px}
 .cash-card strong{font-size:16px}
}
