* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* 外层容器：由你自己控制宽高，日历自动填满 */
.calendar-card {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: linear-gradient(90deg, #62b9ff, #bb68ea);
  padding: clamp(6px, 1.2%, 12px);
  font-family: "Microsoft Yahei", system-ui, sans-serif;
}
.calendar-inner {
  width: 100%;
  height: 100%;
  background-color: #f5f7fc;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3%, 22px) clamp(10px, 2%, 16px) clamp(6px, 1.5%, 10px);
  position: relative;
}
.calendar-head .ym-title {
  font-size: clamp(14px, 16px, 20px);
  color: #1e64ad;
}
.calendar-head .btn-prev,
.calendar-head .btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(14px, 16px, 20px);
  color: #1e64ad;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: opacity 0.2s;
}
.btn-prev { left: clamp(10px, 3%, 30px); }
.btn-next { right: clamp(10px, 3%, 30px); }

.week-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: clamp(14px, 16px, 20px);
  color: #333;
  padding: clamp(4px, 1%, 6px) 0;
}
.day-wrapper {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(3px, 0.6vw, 6px);
  padding: 0 clamp(8px, 1.6%, 14px) clamp(12px, 3%, 26px);
}
.day-item {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  position: relative; /* 关键：用于圆形绝对居中 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 2.8vw, 32px);
  cursor: default;
}
.day-other {
  color: #bbbbbb;
}

/* 圆形背景层，独立一层，完美居中 */
.day-bg-circle {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 999px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.tag-normal .day-bg-circle {
  background: #c3c7d0;
}
.tag-exercise .day-bg-circle {
  background: linear-gradient(135deg, #439eff, #b462ee);
}
.tag-important .day-bg-circle { 
  background: linear-gradient(135deg, #ffa500, #ff0000);
}
/* 日期文字层级高于圆形 */
.day-text {
  font-size: clamp(14px, 16px, 20px);
  position: relative;
  z-index: 2;
}
.tag-normal .day-text,
.tag-exercise .day-text {
  color: #fff;
}

/* 悬浮提示框 */
.tooltip-box {
  position: fixed;
  background: #222;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
  display: none;