.cf-card {
  margin-top: 11px;
  padding: 13px 12px 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--c-panel-a), var(--c-panel-b));
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}

.cf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cf-head > b {
  font-size: 11.5px;
  font-weight: 700;
}

.cf-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  color: var(--c-text-2);
}

.cf-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.cf-legend i:first-of-type {
  margin-inline-start: 2px;
}

.cf-legend .in {
  background: linear-gradient(180deg, #57C79A, #0E9F77);
}

.cf-legend .out {
  margin-inline-start: 8px;
  background: linear-gradient(180deg, #FF9DB4, #CF4769);
}

.cf-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -4px;
  padding: 2px 4px 4px;
  scrollbar-width: none;
}

.cf-scroll::-webkit-scrollbar {
  display: none;
}

.cf-track {
  direction: ltr;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 5px;
  width: max-content;
  min-width: 100%;
}

.cf-group {
  flex: 0 0 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 3px 2px 4px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: var(--dur) var(--ease);
}

.cf-group:hover {
  background: var(--c-tint);
}

.cf-group.is-active {
  background: var(--c-tint);
  border-color: var(--c-tint-line);
}

.cf-bars {
  width: 100%;
  height: 126px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  background-image: linear-gradient(to top, var(--c-line) 1px, transparent 1px);
  background-size: 100% 32px;
  background-position: bottom;
  border-radius: 6px;
}

.cf-bar {
  width: 14px;
  height: var(--h, 10%);
  border-radius: 5px 5px 3px 3px;
  transition: height 0.45s var(--ease);
}

.cf-bar.in {
  background: linear-gradient(180deg, #57C79A, #0E9F77);
  box-shadow: 0 0 12px -6px rgba(14, 159, 119, 0.9);
}

.cf-bar.out {
  background: linear-gradient(180deg, #FF9DB4, #CF4769);
  box-shadow: 0 0 12px -6px rgba(207, 71, 105, 0.9);
}

.cf-group.is-active .cf-bar {
  filter: brightness(1.08);
}

.cf-label {
  font-size: 8px;
  color: var(--c-text-3);
  white-space: nowrap;
}

.cf-group.is-active .cf-label {
  color: var(--c-text);
  font-weight: 700;
}

.cf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--c-line);
  font-size: 8.5px;
  color: var(--c-text-3);
}

.cf-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 15px;
  background: var(--c-tint);
  border: 1px solid var(--c-tint-line);
}

.cf-selected span {
  display: block;
  font-size: 8.5px;
  color: var(--c-text-3);
}

.cf-selected b {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.cf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 8px;
}

.cf-stat {
  padding: 10px 9px;
  border-radius: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}

.cf-stat span {
  display: block;
  font-size: 8.5px;
  color: var(--c-text-3);
}

.cf-stat b {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cf-stat.in b {
  color: var(--c-green);
}

.cf-stat.out b {
  color: var(--c-pink);
}

.cf-ratio {
  display: flex;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--c-line);
}

.cf-ratio i {
  display: block;
  height: 100%;
}

.cf-ratio .in {
  background: linear-gradient(90deg, #57C79A, #0E9F77);
}

.cf-ratio .out {
  background: linear-gradient(90deg, #FF9DB4, #CF4769);
}

.cf-ratio-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 8.5px;
  color: var(--c-text-3);
}

@media (max-width: 380px) {
  .cf-group {
    flex-basis: 48px;
  }

  .cf-bar {
    width: 12px;
  }

  .cf-stat b {
    font-size: 11px;
  }
}
