.market-matrix-panel #market-matrix { min-width: 0; }
.market-matrix-panel .matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  min-height: 176px;
  align-content: start;
}
.market-matrix-panel .matrix-tile {
  position: relative;
  min-width: 0;
  min-height: 26px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid rgba(160, 136, 213, .14);
  border-radius: 5px;
  background: rgba(133, 104, 191, .07);
  color: #c1aedf;
  contain: layout style;
  transform-origin: center;
  font-variant-numeric: tabular-nums;
}
.market-matrix-panel .matrix-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .035), transparent 65%);
}
.market-matrix-panel .matrix-positive {
  color: #81f4ca;
  border-color: rgba(100, 240, 188, .22);
  background: linear-gradient(130deg, rgba(69, 227, 171, var(--matrix-tint, .1)), rgba(24, 57, 56, .27));
}
.market-matrix-panel .matrix-negative {
  color: #ff9bba;
  border-color: rgba(255, 123, 168, .22);
  background: linear-gradient(130deg, rgba(255, 96, 152, var(--matrix-tint, .1)), rgba(58, 29, 52, .27));
}
.market-matrix-panel .matrix-neutral { color: #c1b7e5; }
.market-matrix-panel .matrix-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.market-matrix-panel .matrix-base {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .03em;
}
.market-matrix-panel .matrix-price-tick { color: #8f7cae; font: 10px/1 ui-monospace, monospace; }
.market-matrix-panel .matrix-change {
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.market-matrix-panel .matrix-flash-up { animation: matrix-up .56s ease-out; }
.market-matrix-panel .matrix-flash-down { animation: matrix-down .56s ease-out; }
.market-matrix-panel .matrix-flash-up.matrix-pulse-alt { animation-name: matrix-up-alt; }
.market-matrix-panel .matrix-flash-down.matrix-pulse-alt { animation-name: matrix-down-alt; }
.market-matrix-panel .matrix-flash-up .matrix-price-tick { color: #8affce; }
.market-matrix-panel .matrix-flash-down .matrix-price-tick { color: #ff94bb; }
.market-matrix-panel .matrix-footer {
  margin-top: 9px;
  color: #9b88b5;
  font: 9px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .025em;
}
.market-matrix-panel .matrix-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 175px;
  place-items: center;
  border: 1px dashed rgba(166, 135, 221, .2);
  border-radius: 7px;
  color: #a18abf;
  font-size: 11px;
  background: radial-gradient(ellipse at center, rgba(128, 92, 187, .08), transparent 70%);
}
@keyframes matrix-up {
  0% { transform: scale(.97); border-color: #c0ffe5; box-shadow: inset 0 0 16px rgba(115, 255, 203, .42), 0 0 10px rgba(98, 246, 185, .28); filter: brightness(1.7); }
  30% { transform: scale(1.025); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes matrix-up-alt {
  0% { transform: scale(.97); border-color: #c0ffe5; box-shadow: inset 0 0 16px rgba(115, 255, 203, .42), 0 0 10px rgba(98, 246, 185, .28); filter: brightness(1.7); }
  30% { transform: scale(1.025); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes matrix-down {
  0% { transform: scale(.97); border-color: #ffd0e2; box-shadow: inset 0 0 16px rgba(255, 123, 174, .42), 0 0 10px rgba(255, 104, 166, .28); filter: brightness(1.7); }
  30% { transform: scale(1.025); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes matrix-down-alt {
  0% { transform: scale(.97); border-color: #ffd0e2; box-shadow: inset 0 0 16px rgba(255, 123, 174, .42), 0 0 10px rgba(255, 104, 166, .28); filter: brightness(1.7); }
  30% { transform: scale(1.025); }
  100% { transform: scale(1); filter: brightness(1); }
}
body.motion-off .market-matrix-panel .matrix-tile { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .market-matrix-panel .matrix-tile { animation: none !important; }
}
@media (max-width: 600px) {
  .market-matrix-panel .matrix-grid { gap: 4px; min-height: 176px; }
  .market-matrix-panel .matrix-tile { padding: 2px 7px; min-height: 26px; }
  .market-matrix-panel .matrix-base { font-size: 8px; }
  .market-matrix-panel .matrix-change { font-size: 11px; }
}
