/* ==========================================================
   樱花日程 / 课程表样式
   - 表格卡片样式：任何页面出现 .sakura-schedule 都生效
   - 樱花粉背景 + 飘落花瓣：只在「课程表」页面（body.sakura-schedule-page）
   ========================================================== */

/* ---------- 页面级：仅课程表页面 ---------- */
body.sakura-schedule-page {
  background: linear-gradient(165deg, #fff8fb 0%, #ffeaf2 38%, #ffdce8 72%, #ffe9f1 100%) !important;
  background-attachment: fixed;
}
body.sakura-schedule-page .wp-site-blocks {
  position: relative;
  z-index: 2;
}
body.sakura-schedule-page .wp-block-post-title {
  display: none;
}

/* 花瓣层（JS 注入，fixed 铺满视口，不挡点击） */
.sakura-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.sakura-petal {
  position: absolute;
  top: -8vh;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #fff6fa 0%, #ffc2d4 55%, #ff9fbb 100%);
  border-radius: 150% 0 150% 0;
  opacity: 0.8;
  filter: drop-shadow(0 1px 1px rgba(255, 150, 180, 0.35));
  animation-name: sakura-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
@keyframes sakura-fall {
  0% {
    opacity: 0.8;
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  100% {
    opacity: 0.85;
    transform: translate3d(var(--drift, 40px), 108vh, 0) rotate(540deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sakura-petal {
    display: none;
  }
}

/* ---------- 标题 ---------- */
.sakura-title {
  color: #b3486b;
  text-shadow: 0 2px 12px rgba(255, 150, 180, 0.35);
  letter-spacing: 0.08em;
}

/* ---------- 表格卡片（任何页面通用） ---------- */
.sakura-schedule {
  margin-left: auto;
  margin-right: auto;
  max-width: 1120px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 16px 44px rgba(255, 140, 170, 0.24), 0 2px 8px rgba(255, 140, 170, 0.12);
  overflow-x: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sakura-schedule table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
}
.sakura-schedule th {
  padding: 14px 10px;
  border: none;
  background: linear-gradient(135deg, #ff8fab, #ffb3c6);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(180, 70, 105, 0.25);
}
.sakura-schedule th:first-child {
  background: linear-gradient(135deg, #ff7b9c, #ff9ab5);
}
.sakura-schedule td {
  padding: 12px 10px;
  border: 1px solid #ffe1ea;
  background: rgba(255, 255, 255, 0.55);
  color: #6b4453;
  vertical-align: middle;
  line-height: 1.7;
}
.sakura-schedule tbody tr:nth-child(even) td {
  background: rgba(255, 242, 247, 0.78);
}
.sakura-schedule td:first-child {
  background: linear-gradient(135deg, #ffe3ec, #fff0f5);
  color: #a34b68;
  font-weight: 700;
  white-space: nowrap;
}
.sakura-schedule tbody tr:hover td {
  background: rgba(255, 228, 238, 0.95);
  transition: background 0.2s ease;
}

/* ---------- 编辑提示 ---------- */
.sakura-hint {
  margin-top: 26px;
  padding: 12px 16px;
  border: 1px dashed #ffc2d4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #a75d74;
  font-size: 0.92em;
}

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .sakura-schedule {
    overflow-x: auto;
    padding: 6px;
  }
  .sakura-schedule table {
    min-width: 660px;
  }
  .sakura-schedule th,
  .sakura-schedule td {
    padding: 8px 6px;
    font-size: 0.88em;
  }
}

/* 防横向溢出 */
html,
body.sakura-schedule-page {
  max-width: 100%;
  overflow-x: hidden;
}
