/* rebuild — 채팅 축소 + 실시간 TC 입출금 패널 */

.lower-comm {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(168px, 0.92fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.panel--chat,
.panel--txfeed {
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
}

.panel--chat .chat-feed {
  margin-bottom: 6px;
}

.panel--chat .chat-input {
  padding: 3px;
}

.panel--chat .chat-input input,
.panel--chat .chat-input button {
  height: 28px;
}

.panel--txfeed h3 {
  margin-bottom: 6px;
  padding-bottom: 6px;
}

.tx-feed {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  /* 10행 + gap — 초과분 스크롤 */
  max-height: calc(10 * 44px + 9 * 4px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 110, 0.35) transparent;
}

.tx-feed::-webkit-scrollbar {
  width: 5px;
}

.tx-feed::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.35);
  border-radius: 3px;
}

.tx-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 12, 9, 0.75), rgba(0, 0, 0, 0.55));
  border: 1px solid rgba(216, 178, 83, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -2px 6px rgba(0, 0, 0, 0.35);
  font-size: 10px;
  animation: tx-row-in 0.35s ease-out;
}

.tx-row.is-new {
  border-color: rgba(216, 178, 83, 0.32);
  background: linear-gradient(180deg, rgba(28, 20, 10, 0.82), rgba(12, 8, 4, 0.65));
}

@keyframes tx-row-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tx-row__type {
  grid-row: 1 / 3;
  align-self: center;
  flex-shrink: 0;
  min-width: 34px;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.tx-row--dep .tx-row__type {
  color: #9fe0ad;
  background: rgba(42, 92, 52, 0.55);
  border: 1px solid rgba(80, 160, 96, 0.35);
}

.tx-row--wd .tx-row__type {
  color: #ffb0b0;
  background: rgba(92, 24, 24, 0.55);
  border: 1px solid rgba(180, 60, 60, 0.35);
}

.tx-row__user {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--chat-nick);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-row__user .chat-flag {
  flex-shrink: 0;
  margin-right: 3px;
  line-height: 0;
}

.tx-row__time {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  font-family: var(--font-num);
  font-weight: 400;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--chat-time);
}

.tx-row__amt {
  grid-column: 2 / 4;
  grid-row: 2;
  font-family: var(--font-num);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.tx-row--dep .tx-row__amt {
  color: #7ee8a0;
}

.tx-row--wd .tx-row__amt {
  color: #ff9a9a;
}

@media (max-width: 1280px) {
  .lower-comm {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.88fr);
    gap: 8px;
  }
}
