.calendar-section {
  background: radial-gradient(circle at 88% 15%, #6c56351e, transparent 35%), #101f24;
}
.calendar-shell {
  display: block;
  min-height: 0;
  overflow: hidden;
  background: #13282c;
  border: 1px solid #d1ad755c;
  box-shadow: 0 28px 90px #030d126b, inset 0 1px #e9d6a52a;
}
.month-rail {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-right: 0;
  border-bottom: 1px solid #d8b98538;
  background: #102126;
}
.month-rail button {
  height: 48px;
  border: 0;
  border-right: 1px solid #d8b98517;
  background: transparent;
  color: #9daea4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  transition: background .2s, color .2s;
}
.month-rail button:hover { background: #27413e; color: #f4ddb3; }
.month-rail button.active { background: #e7ba7e; color: #13252a; box-shadow: inset 0 -3px #ee7764; }
.calendar-detail { padding: 30px 34px 34px; }
.calendar-top { align-items: end; margin-bottom: 25px; }
.calendar-eyebrow, .agenda-overline { color: #d5b47d; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.calendar-month { display: flex; align-items: baseline; gap: 10px; margin-top: 9px; line-height: 1; }
.calendar-month strong { color: #8fa79d; font-size: 17px; letter-spacing: .06em; }
.calendar-month b { color: #f0d19b; font-size: 49px; letter-spacing: -.08em; }
.calendar-month small { color: #c3d2bf; font-size: 14px; margin-left: 2px; letter-spacing: 0; }
.calendar-controls { display: flex; align-items: center; gap: 5px; }
.calendar-controls > button { width: 36px; height: 35px; border: 1px solid #c7ae7c6b; color: #ebd2a4; background: #1b3438; }
.calendar-controls > button:hover { background: #d9ba87; color: #14272a; }
.calendar-controls > button.today-button { width: auto; padding: 0 12px; font-size: 11px; }
.calendar-region { margin-left: 12px; white-space: nowrap; }
.calendar-region select { min-width: 96px; padding: 8px 22px 8px 9px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(285px, .74fr); border: 1px solid #d6bd8a36; }
.calendar-main { min-width: 0; padding: 13px; background: radial-gradient(circle at 10% 0%, #25443d66, transparent 48%), #14272a; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { padding: 5px 0 10px; }
.calendar-weekdays span { text-align: center; color: #b7c8b7; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.calendar-grid { gap: 4px; }
.calendar-day {
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative; min-width: 0; min-height: 82px; padding: 10px 9px;
  border: 1px solid #b5c7b32b; background: #1b3335a8; color: #e9e8d5;
  text-align: left; transition: border-color .2s, background .2s, transform .2s;
}
.calendar-day:hover { background: #284740; border-color: #e5c18c; transform: translateY(-2px); }
.calendar-day.is-selected { background: linear-gradient(145deg, #70553c, #3a473b); border-color: #f3d5a1; box-shadow: inset 0 0 0 1px #f3d5a13b, 0 0 22px #f2ba7b24; }
.calendar-day.is-node:not(.is-selected) { background: #3b3b32; border-color: #d6aa6857; }
.calendar-day.is-today .day-number { color: #f48972; }
.calendar-day-empty { border-color: transparent; background: #0f212440; pointer-events: none; }
.day-number { font-size: 16px; font-weight: 800; line-height: 1; }
.day-label { overflow: hidden; max-width: 100%; margin-top: auto; color: #b6cdbd; font-size: 10px; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.calendar-day.is-node .day-label { color: #efd2a2; font-weight: 700; }
.calendar-day i { position: absolute; top: 9px; right: 7px; color: #f48673; font-size: 9px; font-style: normal; }
.calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin: 14px 2px 1px; color: #8da69a; font-size: 10px; }
.calendar-legend span { display: flex; align-items: center; gap: 7px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-node { background: #efbe7f; }
.legend-task { background: #7ca99b; }
.calendar-agenda { display: flex; flex-direction: column; min-width: 0; padding: 29px; border-left: 1px solid #d6bd8a36; background: linear-gradient(160deg, #263c3a, #172e30 60%, #102428); }
.calendar-agenda h3 { margin: 14px 0 7px; color: #f4ead5; font-size: clamp(23px, 2.4vw, 31px); }
.agenda-kind { display: inline-block; align-self: flex-start; padding: 6px 9px; border: 1px solid #dfb88175; color: #efd0a0; font-size: 10px; }
.calendar-agenda h4 { margin: 29px 0 13px; color: #f1d2a4; font-size: 20px; line-height: 1.45; }
.agenda-region { margin: 0 0 21px; padding: 14px; border-left: 2px solid #ec7a64; background: #ffffff0b; color: #b7c9bb; font-size: 11px; line-height: 1.8; }
.agenda-region b { display: block; margin-bottom: 4px; color: #ebd1a8; }
.agenda-actions { padding-top: 18px; border-top: 1px solid #d1bc9050; }
.agenda-actions > b { color: #e9e5cf; font-size: 11px; letter-spacing: .08em; }
.agenda-actions ol { padding-left: 18px; margin: 12px 0 24px; color: #b9cbbc; font-size: 11px; line-height: 1.8; }
.agenda-actions li + li { margin-top: 9px; }
.calendar-agenda > button { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #ebc993; background: linear-gradient(110deg, #e9c993, #d2a76e); color: #162a2b; font-weight: 800; font-size: 11px; }
.calendar-agenda > button:hover { filter: brightness(1.09); }
.calendar-agenda > button span { margin-left: 9px; }
.calendar-agenda > small { margin-top: 11px; color: #89a399; font-size: 9px; line-height: 1.65; }
@media (max-width: 900px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .calendar-agenda { border-left: 0; border-top: 1px solid #d6bd8a36; }
  .calendar-day { min-height: 75px; }
}
@media (max-width: 620px) {
  .month-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .month-rail button { height: 36px; }
  .calendar-detail { padding: 18px 11px 14px; }
  .calendar-top { display: block; margin-bottom: 17px; }
  .calendar-month b { font-size: 38px; }
  .calendar-month small { font-size: 12px; }
  .calendar-controls { margin-top: 18px; gap: 4px; }
  .calendar-controls > button { width: 32px; height: 32px; }
  .calendar-controls > button.today-button { padding: 0 8px; }
  .calendar-region { display: flex; align-items: center; gap: 3px; margin: 0 0 0 auto; font-size: 10px; }
  .calendar-region select { min-width: 70px; margin: 0; padding: 6px 3px; font-size: 11px; }
  .calendar-main { padding: 6px; }
  .calendar-grid { gap: 2px; }
  .calendar-day { min-height: 55px; padding: 6px 3px; }
  .day-number { font-size: 12px; }
  .day-label { font-size: 8px; letter-spacing: -.04em; }
  .calendar-day i { top: 5px; right: 2px; font-size: 7px; }
  .calendar-weekdays span { font-size: 9px; }
  .calendar-legend { font-size: 9px; gap: 8px 12px; }
  .calendar-agenda { padding: 23px 19px; }
  .calendar-agenda h4 { margin-top: 21px; }
}
