/* calendar-widget.css */
.bing-cal-wrap{max-width:680px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;color:#1b1b1b;line-height:1.6;}

.bing-cal-wrap .cal-nav-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;border:1px solid #e0e0e0;border-radius:10px;overflow:hidden;margin-bottom:12px;}
.bing-cal-wrap .cal-nav-table td.nav-cell{padding:8px 12px;vertical-align:middle;}

.bing-cal-wrap .cal-grid{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid #e8e8e8;
  border-radius:10px;
  overflow:hidden;
}

.cal-nav{display:flex;align-items:center;justify-content:space-between;}
.nav-left{display:flex;align-items:left;gap:0px;flex:0 0 auto;}
.nav-center{display:flex;align-items:center;justify-content:center;flex:1 1 auto;}
.nav-right{display:flex;align-items:center;gap:6px;flex:0 0 auto;}

.nav-btn{background:transparent;border:none;padding:4px 2px;font-size:18px;cursor:pointer;color:#333;line-height:1;border-radius:4px;transition:background .12s;}
.nav-title{font-size:16px;font-weight:400;min-width:auto;padding:0 2px;text-align:center;}
.nav-info-text{font-size:14px;color:#333;white-space:nowrap;}

.nav-today{background:transparent;border:none;padding:4px 8px;font-size:16px;cursor:pointer;color:#333;line-height:1;border-radius:4px;transition:background .12s;}
.nav-today:hover{background:#f2f2f2;}

.surprise-badge{display:inline-flex;align-items:center;cursor:pointer;transition:transform .15s;}
.surprise-badge[hidden]{display:none !important;}
.surprise-badge:hover{transform:scale(1.2);}
.surprise-emoji{font-size:18px;line-height:1;}

.cal-grid th,.cal-grid td{width:14.2857%;text-align:center;border:1px solid #e8e8e8;vertical-align:middle;}
.cal-grid th{color:#333;font-weight:600;background:#fafafa;padding:8px 0;font-size:13px;}
.cal-grid td{padding:6px 0;height:64px;}
.cal-grid td.empty{background:#fcfcfc;}
.cal-grid td.clickable{cursor:pointer;transition:background .12s;}
.cal-grid td.clickable:hover{background:#f5f9ff;}
.cal-grid td .num{display:block;text-align:center;font-size:20px;font-weight:500;color:#202020;line-height:1.4;}
.cal-grid td .lunar-num{display:block;text-align:center;font-size:12px;color:#777;margin-top:1px;line-height:1.3;}
.cal-grid td.today{background:#ffffff;}
.cal-grid td.today .num{color:#202020;font-weight:700;}
.cal-grid td.weekend:not(.today) .num{color:#d93025;}
.cell-jq,.cell-holiday,.cell-work{display:block;font-size:11px;color:#222;margin-top:1px;}

.cal-huangli{margin-top:10px;font-size:12px;line-height:1.5;background:#faf8f2;border:1px solid #efe6d2;border-radius:10px;padding:10px 14px;color:#333;}
.cal-huangli b{color:#333;font-weight:normal;}
.cal-huangli .yi{color:#1e8e3e;}
.cal-huangli .ji{color:#333;}
.cal-huangli .hl-jq{color:#e67e22;}
.cal-huangli .hl-holiday{color:#333;font-weight:normal;}
.cal-huangli .hl-work{color:#7f8c8d;font-weight:normal;}

.cal-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9999;display:none;align-items:center;justify-content:center;padding:20px;}
.cal-modal.open{display:flex;}
.cal-modal-box{position:relative;width:100%;max-width:340px;background:#fff;border-radius:14px;padding:22px 20px 18px;box-shadow:0 12px 40px rgba(0,0,0,.18);animation:calPop .16s ease-out;}
@keyframes calPop{from{transform:scale(.96);opacity:.6;}to{transform:scale(1);opacity:1;}}
.cal-modal-close{
  position:absolute;
  top:8px;
  right:8px;
  width:30px;
  height:30px;
  padding:0;                 /* 清掉默认内边距 */
  margin:0;
  border:none;
  background:transparent;
  /* 核心：flex 双居中 */
  display:flex;
  align-items:center;        /* 垂直居中 */
  justify-content:center;    /* 水平居中 */
  line-height:1;             /* 去掉行高干扰 */
  font-size:22px;
  font-weight:400;
  color:#999;
  cursor:pointer;
  border-radius:50%;
  -webkit-appearance:none;
  appearance:none;
  box-sizing:border-box;
  transition:background .12s,color .12s;
}
.cal-modal-close:hover{
  background:#f2f2f2;
  color:#333;
}
.m-title{font-size:18px;font-weight:700;color:#111;}
.m-sub{font-size:13px;color:#888;margin:4px 0 12px;}
.m-row{display:flex;gap:10px;padding:6px 0;border-bottom:1px dashed #eee;font-size:14px;line-height:1.5;}
.m-row:last-child{border-bottom:none;}
.m-k{flex:0 0 42px;color:#666;font-weight:600;text-align:center;}
.m-k.m-yi{color:#1e8e3e;}
.m-k.m-ji{color:#d93025;}
.m-v{flex:1;color:#222;}
.m-v.hl{color:#d93025;font-weight:600;}

@media (max-width:520px){
  .cal-modal-box{max-width:92vw;}
  .nav-info-text{font-size:12px;}
  .nav-title{font-size:14px;min-width:auto;padding:0 2px;}  /* ← 关键：去掉 min-width:90px */
  .nav-btn{padding:4px 0;font-size:16px;}                   /* ← 新增：按钮左右内边距归零 */
}