.monthTop{
  min-height:48px;
  padding:7px 20px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.monthHeadNav{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}

.monthTop h2{
  margin:0 0 0 5px;
  min-width:132px;

  font-size:20px;
  line-height:1.15;
  letter-spacing:-.02em;
  text-align:left;
  white-space:nowrap;
}

.monthHeadNav button{
  width:30px;
  height:30px;
  padding:0;

  display:grid;
  place-items:center;

  border:1px solid var(--line);
  border-radius:7px;

  background:var(--surface);
  color:var(--muted);

  font-size:18px;
  line-height:1;

  cursor:pointer;
}

.monthHeadNav button:hover{
  border-color:var(--blue);
  color:var(--blue);
}

.monthContext{
  flex:0 0 auto;

  text-align:right;
  color:var(--muted);
  font-size:10px;
  white-space:nowrap;
}

.mLayout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:16px;
  align-items:start;
  padding:0 20px 20px;
}
.mCalendar{overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow)}
.mWeekdays{height:32px;display:grid;grid-template-columns:repeat(7,1fr);align-items:center;border-bottom:1px solid var(--line2);color:var(--muted);font-size:9px;font-weight:800;text-align:center}
.mGrid{display:grid;grid-template-columns:repeat(7,1fr)}
.mDayCell{min-width:0;min-height:168px;padding:6px;border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);background:var(--surface)}
.mDayCell:nth-child(7n){border-right:0}
.mOutside{background:var(--bg)}
.mToday{
  position:relative;
  outline:none;
}

.mToday::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:var(--blue);
  pointer-events:none;
}

.mToday::after{
  content:"TODAY";
  position:absolute;
  top:7px;
  right:7px;
  color:var(--blue);
  font-size:7px;
  font-weight:850;
  letter-spacing:.08em;
  pointer-events:none;
}

.mToday .mDayNumber{
  background:var(--blue);
  color:#fff;
}

.mSelectedDay{
  background:var(--blueSoft);
}
.mDayNumber{width:25px;height:23px;margin-bottom:4px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--text);font-size:10px;font-weight:800;cursor:pointer}
.mEntries{display:flex;flex-direction:column;gap:3px}
.mContest{width:100%;min-width:0;padding:4px 5px;border:1px solid var(--line2);border-radius:5px;background:var(--surface);text-align:left;cursor:pointer}
.mContest:hover,.mSelectedContest{border-color:var(--blue);background:var(--blueSoft)}
.mContestTitle{display:flex;gap:4px;font-size:9px;line-height:1.25;font-weight:720}
.mContestTitle span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mStar{color:#7b8898}.mStar.featured{color:var(--blue)}
.mContestTime{margin-top:2px;padding-left:14px;color:var(--muted);font-size:8px}
.mMore{border:0;background:transparent;color:var(--blue);font-size:8px;font-weight:750;cursor:pointer}

.mRight{display:flex;flex-direction:column;gap:14px}
.mSelection,.mBriefing{padding:14px 15px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow)}
.mEyebrow{margin-bottom:4px;color:var(--blue);font-size:9px;font-weight:800;letter-spacing:.05em}
.mSelection h3{margin:0 0 4px;font-size:17px}.mSelection p{margin:0;color:var(--muted);font-size:11px;line-height:1.45}
.mBriefing[hidden]{display:none}.mBriefing h2{margin:0 0 8px;font-size:18px}
.mBriefing p{font-size:11px;line-height:1.45;color:var(--muted)}
.mBriefing .meta{margin-top:8px;color:var(--text)}

.mDetailTop{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.mTitleLine{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.mDot{
  width:10px;
  height:10px;
  flex:0 0 auto;
  border-radius:50%;
  background:#94a3b8;
}
.mDot.running{background:var(--green)}
.mDot.soon{background:var(--orange)}
.mDot.break{background:var(--break)}
.mDot.later,.mDot.finished,.mDot.cancelled{background:#94a3b8}
.mBriefStar{
  flex:0 0 auto;
  font-size:19px;
  color:#778799;
}
.mBriefStar.featured{color:var(--blue)}
.mSummary{
  margin-bottom:10px;
  font-size:11px;
  line-height:1.48;
}
.mUnavailable{color:var(--muted2)!important}
.mStats{
  display:grid;
  grid-template-columns:1fr 1fr .72fr;
  gap:6px;
  margin-bottom:10px;
}
.mStat{
  min-width:0;
  padding:8px;
  border:1px solid var(--line2);
  border-radius:6px;
  background:var(--bg);
}
.mStatLabel{
  margin-bottom:3px;
  color:var(--muted);
  font-size:8px;
  font-weight:800;
}
.mStatValue{
  font-size:10px;
  line-height:1.35;
  font-weight:720;
}

.mDurationBox.status-running{
  border-color:var(--green);
  background:color-mix(in srgb,var(--green) 12%,transparent);
}
.mDurationBox.status-soon{
  border-color:var(--orange);
  background:color-mix(in srgb,var(--orange) 13%,transparent);
}
.mDurationBox.status-break{
  border-color:var(--break);
  background:color-mix(in srgb,var(--break) 13%,transparent);
}
.mInfoTable{
  border-top:1px solid var(--line2);
}
.mInfoRow{
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:9px;
  padding:7px 0;
  border-bottom:1px solid var(--line2);
}
.mInfoLabel{
  color:var(--muted);
  font-size:9px;
  font-weight:800;
}
.mInfoValue{
  min-width:0;
  font-size:10px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.mInfoValue a{
  color:var(--blue);
  text-decoration:none;
}
.mInfoValue a:hover{text-decoration:underline}

/* A-012 final Month interaction/status semantics */
.mDayCell:not(.mOutside){
  cursor:pointer;
}

.mDayCell.mSelectedDay{
  background:var(--blueSoft);
  box-shadow:inset 0 0 0 2px var(--blue);
}


/* P-002 visible navigation bounds */
#monthPrev:disabled,
#monthNext:disabled {
  visibility: hidden;
  opacity: 0;
  cursor: default !important;
  pointer-events: none;
}
