/* 月历上的签到印记 + 今日开馆弹窗 */
.cal-checkin-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin: 14px 0 0;
  padding: 10px 16px;
  border: 1px solid rgba(63, 95, 158, .2);
  border-radius: 999px;
  background: #fffdf8;
  color: #344f8c;
  box-shadow: 0 4px 14px rgba(40, 52, 84, .06);
  font: 600 14px/1.2 inherit;
  cursor: pointer;
}
.cal-checkin-entry:hover { background: #fff; border-color: rgba(63, 95, 158, .38); }
.cal-checkin-entry img { width: 28px; height: 28px; object-fit: contain; flex: 0 0 auto; }
.cal-checkin-entry .ck-cal-entry-meta { font-weight: 400; font-size: 11px; color: #8a93a3; }

.cal-cell { position: relative; }
.cal-cell .ck-cal-stamp {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 3;
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .12));
}
.cal-cell.has-checkin .cal-daynum { z-index: 2; }

.ck-cal-modal[hidden] { display: none !important; }
.ck-cal-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.ck-cal-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 45, .38);
  backdrop-filter: blur(3px);
}
.ck-cal-dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid rgba(63, 95, 158, .2);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 24px 70px rgba(20, 28, 45, .3);
  padding: 22px 22px 20px;
}
.ck-cal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(63, 95, 158, .07);
  color: #6d7688;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ck-cal-dialog h2 { margin: 2px 0 4px; font-size: 20px; color: #263656; }
.ck-cal-dialog .ck-cal-sub { margin: 0 0 12px; color: #8a93a3; font-size: 12px; }
.ck-cal-hero { display: grid; justify-items: center; gap: 6px; margin: 6px 0 14px; }
.ck-cal-hero img { width: 168px; height: 168px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(40, 20, 15, .16)); }
.ck-cal-empty-dog {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1.5px dashed rgba(120, 96, 64, .42);
  border-radius: 50%;
  color: #b0a692;
  font: 600 44px/1 Georgia, serif;
}
.ck-cal-level { font: 600 26px/1.2 Georgia, "Songti SC", serif; color: #263656; }
.ck-cal-stars { color: #c69b43; letter-spacing: 2px; font-size: 13px; }
.ck-cal-advice { margin: 4px 0 0; color: #4d5970; font-size: 13px; line-height: 1.7; text-align: center; }
.ck-cal-pending { margin: 8px 0 14px; color: #6d7688; font-size: 13px; line-height: 1.7; text-align: center; }
.ck-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(86, 122, 206, .28);
  border-radius: 999px;
  background: #344f8c;
  color: #fff;
  font: 600 14px/1 inherit;
  cursor: pointer;
}
.ck-cal-btn[disabled] { opacity: .6; cursor: wait; }
.ck-cal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
.ck-cal-fields div { padding: 8px 10px; border-radius: 12px; background: rgba(63, 95, 158, .05); }
.ck-cal-fields small { display: block; color: #8a93a3; font-size: 10px; }
.ck-cal-fields b { color: #263656; font-size: 13px; }
.ck-cal-yiji { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(63, 95, 158, .18); }
.ck-cal-yiji p { display: flex; gap: 8px; margin: 6px 0; color: #4d5970; font-size: 12px; }
.ck-cal-yiji .ck-yi, .ck-cal-yiji .ck-ji { flex: 0 0 auto; font-weight: 700; }
.ck-cal-yiji .ck-yi { color: #4f7d55; }
.ck-cal-yiji .ck-ji { color: #a65a4f; }

@media (max-width: 820px) {
  .cal-checkin-entry { margin-top: 12px; padding: 9px 14px; font-size: 13px; }
  .cal-checkin-entry img { width: 26px; height: 26px; }
  .cal-cell .ck-cal-stamp { top: 3px; right: 3px; bottom: auto; width: 20px; height: 20px; }
  .cal-cell.has-checkin { align-items: flex-start; }
  .cal-cell.has-checkin .cal-daynum { margin-left: 3px; }
  .cal-cell.has-checkin .cal-count, .cal-cell.has-checkin .cal-sched-badge { align-self: center; }
  .ck-cal-modal { align-items: end; padding: 0; }
  .ck-cal-dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    animation: ckCalSheet .24s ease-out;
  }
  .ck-cal-hero img { width: 132px; height: 132px; }
  .ck-cal-dialog h2 { font-size: 18px; }
}
@keyframes ckCalSheet { from { transform: translateY(18px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ck-cal-dialog { animation: none; } }
