/* Money 指南針：左右分流、按資金絕對值配置面積，延續 NitaStock 玻璃卡片。 */
.money-compass-meta { display: grid; gap: 4px; margin: 0 2px 11px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.82); border-radius: 15px; color: var(--muted); background: linear-gradient(120deg,rgba(255,255,255,.52),rgba(235,232,255,.27),rgba(226,248,246,.22)); font-size: 10px; line-height: 1.55; }
.money-compass-meta strong { color: #5f5b9e; font-size: 12px; }
.money-compass-section > .section-heading { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 0; }
.money-compass-section > .section-heading h2 { flex: 0 0 auto; }
.money-compass-header-actions { display: flex; align-items: center; margin-left: auto; min-width: 0; }
.money-compass-period-line { margin: 5px 2px 13px; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: right; }
.money-compass-header-actions .range-switch { flex: 0 0 auto; }
.money-compass-header-actions .range-button { flex: 0 0 auto; white-space: nowrap; }
.money-compass-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.money-flow-panel { display: grid; grid-template-rows: auto minmax(300px,1fr); gap: 10px; min-width: 0; padding: 13px; border: 1px solid rgba(255,255,255,.88); border-radius: var(--r-lg,21px); background: linear-gradient(135deg,rgba(255,255,255,.73),rgba(245,241,255,.46) 55%,rgba(236,250,248,.39)); box-shadow: var(--shadow); }
.money-flow-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.money-flow-kicker { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; }
.money-flow-panel h3 { margin: 0; color: #4e4c6d; font-size: 16px; }
.money-flow-total { display: grid; justify-items: end; min-width: 0; }
.money-flow-total strong { color: #4b4969; font-size: clamp(16px,2vw,22px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.money-flow-total small { color: var(--soft-muted); font-size: 9px; }
.money-flow-treemap { position: relative; min-width: 0; min-height: 300px; overflow: hidden; border: 1px solid rgba(255,255,255,.87); border-radius: 15px; background: rgba(255,255,255,.43); }
.money-flow-tile { position: absolute; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; min-width: 0; min-height: 0; overflow: hidden; padding: clamp(3px,.8vw,9px); border: 1px solid rgba(255,255,255,.79); border-radius: 5px; color: #49364c; background: var(--tile-tint); text-align: left; cursor: pointer; transition: filter .14s ease,box-shadow .14s ease; }
.money-flow-tile:hover,.money-flow-tile:focus-visible { z-index: 2; filter: saturate(1.12) brightness(.97); box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.money-flow-tile.is-static { cursor: default; }
.money-flow-tile.is-static:hover,.money-flow-tile.is-static:focus-visible { z-index: auto; filter: none; box-shadow: none; }
.money-flow-tile .money-tile-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; max-width: 100%; line-height: 1.15; }
.money-flow-tile .money-tile-name { font-size: 12px; font-weight: 760; line-height: 1.15; overflow-wrap: anywhere; }
.money-flow-tile .money-tile-amount { font-size: 10px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.money-flow-tile .money-tile-streak { font-size: 8px; line-height: 1.15; color: var(--muted); overflow-wrap: anywhere; }
.money-flow-tile--compact .money-tile-main,.money-flow-tile--compact .money-tile-streak { display: none; }
.is-inflow .money-flow-tile { color: #5c3040; }
.is-outflow .money-flow-tile { color: #254e43; }
.money-treemap-empty { display: grid; height: 100%; min-height: 300px; place-items: center; padding: 16px; color: var(--soft-muted); font-size: 11px; text-align: center; }
.money-compass-omitted { margin-top: 9px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.38); font-size: 10px; }
.money-compass-omitted summary { cursor: pointer; font-weight: 650; }
.money-compass-omitted > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.money-compass-omitted > div span { padding: 4px 8px; border: 1px solid rgba(255,255,255,.85); border-radius: 999px; background: rgba(255,255,255,.55); font-size: 9px; }
@media(max-width:760px) {
  .money-compass-section > .section-heading h2 { font-size: clamp(16px, 4.5vw, 21px); }
  .money-compass-header-actions .range-switch { gap: 1px; padding: 2px; }
  .money-compass-header-actions .range-button { min-height: 30px; padding-inline: clamp(4px, 1.6vw, 9px); font-size: clamp(9px, 2.5vw, 11px); }
  .money-compass-grid { grid-template-columns: 1fr; }
  .money-flow-panel { grid-template-rows: auto minmax(280px,1fr); }
  .money-flow-treemap,.money-treemap-empty { min-height: 280px; }

}
@media(max-width:420px) {
  .money-flow-panel { padding: 9px; }
  .money-flow-treemap,.money-treemap-empty { min-height: 250px; }
  .money-flow-tile { padding: 3px; border-radius: 3px; }

}

.money-flow-tooltip { position: absolute; z-index: 5; max-width: 230px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.94); border-radius: 12px; color: #514d70; background: linear-gradient(130deg,rgba(255,255,255,.97),rgba(244,239,255,.96) 58%,rgba(234,250,247,.95)); box-shadow: 0 10px 28px -12px rgba(61,53,99,.42),inset 0 1px 0 #fff; font-size: 11px; font-weight: 700; line-height: 1.45; pointer-events: none; white-space: pre-line; transform: translate(8px,8px); }
.money-flow-tooltip[hidden] { display: none; }
.money-flow-tooltip small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
@media (max-width: 760px) {
  .money-flow-tooltip { max-width: min(230px, calc(100% - 12px)); }
}
