.calendar-page{
  padding: 28px 0 50px;
}

.calendar-head{
  margin-bottom: 18px;
}

.calendar-title{
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
  color: #000000;
}

.calendar-desc{
  margin: 0;
  max-width: 780px;
  color: #000000;
  font-size: 15px;
  line-height: 1.8;
}

/* toolbar */
.calendar-toolbar{
  margin: 18px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.year-nav-btn{
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgb(255, 255, 255);
  color: #000000;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.year-nav-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.16);
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
}

.calendar-year-box{
    min-width: 150px;
    padding: 10px 18px;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.calendar-year-label{
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  opacity: .88;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#calendarYearText{
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

/* grid */
.calendar-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.month-card{
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: rgb(0 0 0 / 59%) 0px 4px 32px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  scroll-margin-top: 110px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.month-card:hover{
  transform: translateY(-3px);
  box-shadow: rgb(0 0 0 / 62%) 0px 10px 34px;
}

.month-card.is-current-month{
     border-color: #00ffcd;
    box-shadow: 0 0 0 2px rgb(113 255 222 / 43%), rgb(0 0 0 / 59%) 0px 8px 36px;
}

.month-head{
     min-height: 64px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-title{
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  color: #fbfbfb;
  text-align: center;
}

.month-subtitle{
  display: none;
}

.month-body{
  padding: 12px;
  flex: 1;
}

.week-row,
.days-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.week-row{
  margin-bottom: 8px;
}

.week-name{
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  padding: 2px 0;
}

.day-cell{
  position: relative;
  min-height: 36px;
  border-radius: 11px;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  user-select: none;
  transition: .18s ease;
}

.day-cell.empty{
  background: transparent;
  border-color: transparent;
}

.day-cell:disabled{
  opacity: 1;
}

.day-cell.today{
  box-shadow: inset 0 0 0 2px #cbd5e1;
}

.day-cell.has-trip{
  background: linear-gradient(180deg, #ecfeff 0%, #d2fecf 100%);
  border-color: #0b7a00;
  color: #0f766e;
  cursor: pointer;
}

.day-cell.has-trip:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(6,182,212,.14);
}

.day-cell.has-trip::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #06b6d4;
}

.day-cell.trip-hot{
  background: linear-gradient(180deg, #fff6d8 0%, #ffe5b9 100%);
  border-color: #ff8a00;
  color: #9a3412;
}

.day-cell.active{
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(15,23,42,.18);
}

.day-cell.active::after{
  background: #ffffff;
}

.day-cell.trip-multi::before{
  content: attr(data-trip-count);
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 9px;
  line-height: 15px;
  font-weight: 800;
  text-align: center;
}

.calendar-empty-note{
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 22px;
  color: #64748b;
  margin-top: 20px;
}

/* modal */
.trip-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.trip-modal.is-open{
  display: block;
}

.trip-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.56);
  backdrop-filter: blur(3px);
}

.trip-modal-dialog{
  position: relative;
  z-index: 2;
  width: min(700px, calc(100% - 35px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
}

.trip-modal-head{
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}

.trip-modal-title{
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
}

.trip-modal-desc{
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.trip-modal-close{
  flex: 0 0 auto;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ededed;
  color: #000000;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12), 0 2px 6px rgb(15 23 42 / 45%);
  cursor: pointer;
}

.trip-modal-close:hover{
  background: #e2e8f0;
}

.trip-modal-body{
  padding: 18px 20px 22px;
}

.trip-list{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.trip-card{
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12), 0 2px 6px rgb(15 23 42 / 42%);
}

.trip-media{
  position: relative;
}

.trip-media img{
  width: 100%;
  height: 220px;
  padding: 5px;
  object-fit: cover;
  display: block;
}

.trip-media-empty{
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#e2e8f0,#f8fafc);
  color: #64748b;
  font-weight: 700;
}

.trip-badge{
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(45deg, #b452a3 2.28%, #7640a1 99.77%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.trip-body{
  padding: 16px;
}

.trip-title{
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}

.trip-meta{
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.trip-meta-item{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 14px;
}

.trip-meta-label{
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.trip-meta-value{
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.trip-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-date-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 12px;
  background: #e0e0e0;
  color: #080808;
  border: 1px solid #a2a2a2;
  font-size: 12px;
  font-weight: 800;
}

.trip-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background:
    radial-gradient(800px 500px at 20% 0%, rgb(255 118 0 / 93%), transparent 60%),
    radial-gradient(700px 400px at 90% 10%, rgb(255 10 10), transparent 55%),
    linear-gradient(180deg, #000000, #2d0000);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.trip-empty{
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 18px;
  color: #64748b;
}

@media (max-width: 1200px){
  .calendar-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .month-head{
    min-height: 60px;
    padding: 13px 12px 11px;
  }

  .month-title{
    font-size: 16px;
  }

  .month-body{
    padding: 10px;
  }

  .week-row,
  .days-grid{
    gap: 5px;
  }

  .day-cell{
    min-height: 32px;
    border-radius: 10px;
    font-size: 11px;
  }

  .week-name{
    font-size: 10px;
  }
}

@media (max-width: 768px){
  .calendar-page{
    padding: 22px 0 42px;
  }

  .calendar-title{
    font-size: 28px;
  }

  .calendar-desc{
    font-size: 14px;
    line-height: 1.7;
  }

  .calendar-toolbar{
    justify-content: center;
    gap: 10px;
    margin: 14px 0 18px;
  }

  .year-nav-btn{
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 18px;
  }

  .calendar-year-box{
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 14px;
  }

  .calendar-year-label{
    font-size: 10px;
  }

  #calendarYearText{
    font-size: 22px;
  }

  .calendar-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .month-card{
    border-radius: 16px;
  }

  .month-head{
    min-height: 46px;
    padding: 8px 8px 7px;
  }

  .month-title{
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
  }

  .month-body{
    padding: 7px;
  }

  .week-row,
  .days-grid{
    gap: 3px;
  }

  .week-row{
    margin-bottom: 6px;
  }

  .week-name{
    font-size: 8px;
    font-weight: 800;
    padding: 1px 0;
  }

  .day-cell{
    min-height: 22px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
  }

  .day-cell.has-trip::after{
    width: 4px;
    height: 4px;
    bottom: 3px;
  }

  .day-cell.trip-multi::before{
    top: -3px;
    right: -3px;
    min-width: 11px;
    height: 11px;
    padding: 0 2px;
    font-size: 7px;
    line-height: 11px;
  }

  .trip-modal-dialog{
    width: min(560px, calc(100% - 24px));
    margin: 53px auto;
    border-radius: 25px;
    max-height: calc(83vh - 26px);
  }

  .trip-modal-head{
    padding: 16px 16px 12px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
  }

  .trip-modal-title{
    font-size: 20px;
  }

  .trip-modal-body{
    padding: 14px 16px 18px;
  }

  .trip-list{
    gap: 14px;
  }

  .trip-media img,
  .trip-media-empty{
    height: 200px;
  }
}