/* 날짜별 접속자 — 쌓은 막대 (stats.js dailyChart). 색 변수는 style.css :root.
   막대 폭 24px 이하, 윗끝 4px 둥글게, 조각·막대 사이 2px 흰 틈 (dataviz 규격). */
.legend {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 2px;
  vertical-align: -1px;
}

.plot {
  position: relative;
  height: 180px;
  margin: 0 0 24px 40px;
}

.grid {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
}

.grid span {
  position: absolute;
  right: 100%;
  padding-right: 6px;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.cols {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
}

.col {
  position: relative;
  display: flex;
  align-items: flex-end;
  flex: 1;
  max-width: 24px;
  height: 100%;
  outline-offset: 2px;
}

.bar {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  width: 100%;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.seg {
  min-height: 2px;
}

.col:hover .bar,
.col:focus .bar {
  filter: brightness(1.12);
}

.x-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.tooltip {
  position: absolute;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.tip-title {
  margin-bottom: 4px;
  color: var(--text-2);
}

.tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key {
  display: inline-block;
  width: 12px;
  height: 2px;
}

details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
}
