/* 周视图 ↔ 日视图切换的样式。
 * 两张图叠在同一个舞台里,切换只改 opacity 和 transform。
 * 热区位置按 scripts/measure-icons.mjs 量出的图标像素取值(网格图标 x≈66%、y≈3%)。 */

.view-switch { margin: 40px auto 0; max-width: 440px; }
/* 舞台不裁切:注释卡在桌面上会伸到图的两侧 */
.view-switch__stage { position: relative; }
.view-switch__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  transition: opacity .45s ease, transform .45s ease;
}
/* 两张图叠放:日视图绝对定位到周视图上面 */
.view-switch__img--day {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: scale(.985);
  pointer-events: none;
}
.view-switch[data-state="day"] .view-switch__img--week { opacity: 0; transform: scale(.985); }
.view-switch[data-state="day"] .view-switch__img--day { opacity: 1; transform: none; }

/* 切换热区:包住网格图标(x 66%、y 3%,宽 4.3%、高 2%),再留一点余量,
 * 但不能盖到右边的日程图标(x 78%),所以宽度到 72% 为止。 */
.view-switch__hot {
  all: unset;
  cursor: pointer;
  position: absolute;
  left: 62.5%;
  top: 1%;
  width: 9%;
  height: 7%;
  border-radius: 12px;
  z-index: 2;
}
.view-switch__hot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 引导文字:贴在网格图标正上方。图标中心在图内 x ≈ 68%(65.9% + 4.2%/2)。 */
.view-switch__cue {
  position: absolute;
  left: 68%;
  top: -34px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: opacity .3s;
}
.view-switch[data-state="day"] .view-switch__cue,
.view-switch__cue[data-done="1"] { opacity: 0; }
.view-switch__label {
  font-size: var(--fs-aux);
  color: var(--t1);
  background: var(--sheet, #101318);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgb(0 0 0 / .25);
  white-space: nowrap;
}
.view-switch__arrow {
  width: 2px;
  height: 14px;
  margin-top: 6px;
  background: var(--accent);
}
.view-switch__state { margin: 14px 0 0; text-align: center; }
@media (max-width: 560px) {
  .view-switch__label { font-size: 12px; }
}
