@charset "utf-8";
/* ============================================================
   연구회 일정 — 다가오는 일정 · 한 달 달력 · 그달 목록 (docs/board.md "연구회 일정")
   말투는 메인의 일정 칸(home.css 의 .next-event / .later-events)과 같다.
   분류 칩(.cat--(tone))은 연혁과 함께 쓰므로 client.css 에 있다. tone 이름은 App\EventSchedule::CATEGORIES 가 정한다.
   ============================================================ */

.sched-icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sched-head { margin-bottom: 20px; }
.sched-head__title { margin-top: 6px; font-size: 22px; font-weight: 700; }

/* ── 다가오는 일정 ── */
.sched-upcoming { margin-bottom: 64px; }
.sched-upcoming__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: stretch; }

.sched-next {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 188px;
  border-radius: 10px;
  background: var(--color-brand);
  color: var(--color-on-dark);
  transition: background-color 0.2s var(--ease), box-shadow var(--hover-dur) var(--ease), transform var(--hover-dur) var(--ease);
}
/* 호버 — 짙어지며 떠오르고, 오른쪽 아래 물결 고리가 천천히 퍼진다 */
.sched-next:hover { background: var(--color-brand-dark); box-shadow: var(--shadow-hover); transform: translateY(var(--hover-lift)); }
.sched-next::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -140px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 22px, var(--color-on-dark-line) 22px 23px);
  pointer-events: none;
  transition: transform 0.8s var(--ease);
}
.sched-next:hover::after { transform: scale(1.15); }
.sched-next__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 140px;
  border-right: 1px solid var(--color-on-dark-line);
}
.sched-next__month { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.2em; color: var(--color-accent-light); }
.sched-next__day { font-size: 56px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.sched-next__weekday { font-size: var(--fs-xs); color: var(--color-on-dark-sub); }
.sched-next__body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; padding: 26px 30px; }
.sched-next__meta { display: flex; align-items: center; gap: 10px; }
.sched-next__dday { font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.04em; color: var(--color-accent-light); }
.sched-next__title { margin: 4px 0; font-size: 20px; font-weight: 700; line-height: 1.45; }
.sched-next__lines { display: flex; flex-direction: column; gap: 4px; }
.sched-next__line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--color-on-dark-sub); }
.sched-next__line .sched-icon { color: var(--color-accent-light); }

.sched-later { display: flex; flex-direction: column; border-top: 2px solid var(--color-brand); }
.sched-later li { flex: 1; display: flex; }
.sched-later a {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 18px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-line);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
/* 호버한 줄 — 게시판 목록과 같은 몸짓: 옅은 바탕에 왼쪽 보라 띠 */
.sched-later a:hover { background: var(--color-bg-soft); box-shadow: inset 3px 0 0 var(--color-accent); }
.sched-later__date { display: flex; flex-direction: column; align-items: center; flex: none; width: 60px; font-size: var(--fs-xs); color: var(--color-text-muted); }
.sched-later__date strong { font-size: 19px; line-height: 1.2; color: var(--color-brand); }
.sched-later__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sched-later__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.2s var(--ease); }
.sched-later__place { margin-top: 2px; font-size: var(--fs-small); color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-later__dday {
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-sub);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.sched-later a:hover .sched-later__title { color: var(--color-brand); }
.sched-later a:hover .sched-later__dday { border-color: var(--color-brand); color: var(--color-brand); }

/* ── 달 머리 ── */
.sched-month__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--color-brand);
}
.sched-month__nav { display: flex; align-items: center; gap: 14px; }
.sched-month__title { display: flex; align-items: baseline; gap: 10px; min-width: 190px; justify-content: center; }
.sched-month__title > *, .sched-month__today { white-space: nowrap; }
.sched-month__year { font-size: var(--fs-body); font-weight: 600; color: var(--color-text-muted); }
.sched-month__title strong { font-size: 32px; font-weight: 700; line-height: 1; color: var(--color-text); }
.sched-month__en { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-accent-dark); }
.sched-month__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  color: var(--color-text-sub);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.sched-month__step::before { content: ""; width: 8px; height: 8px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }
.sched-month__step--prev::before { transform: translateX(2px) rotate(-135deg); }
.sched-month__step--next::before { transform: translateX(-2px) rotate(45deg); }
.sched-month__step:hover { border-color: var(--color-brand); background: var(--color-brand); color: var(--color-on-dark); }
.sched-month__step:active { transform: scale(0.94); }
/* 볼 수 있는 끝 달(2000-01 · 2100-12)의 이전·다음 — 갈 곳이 없어 감추되 자리는 지켜 제목이 밀리지 않게 한다 */
.sched-month__step--off { visibility: hidden; }
.sched-month__today {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-brand-soft);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-brand);
}

.sched-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-xs); color: var(--color-text-sub); }
.sched-legend li { display: inline-flex; align-items: center; gap: 6px; }
.sched-legend__dot { width: 10px; height: 10px; border-radius: 3px; }

/* ── 달력 + 목록 ── */
.sched-month__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; margin-top: 24px; align-items: start; }

.sched-cal { border: 1px solid var(--color-line); border-radius: 10px; overflow: hidden; }
.sched-cal__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sched-cal__row + .sched-cal__row { border-top: 1px solid var(--color-line); }
.sched-cal__row--head { background: var(--color-bg-soft); }
.sched-cal__weekday { padding: 10px 0; text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--color-text-sub); }
.sched-cal__cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 104px;
  padding: 8px 6px;
  background: var(--color-bg);
  transition: background-color 0.2s var(--ease);
}
/* 이번 달 칸에 마우스를 올리면 옅은 청록이 깔리고 날짜에 고리가 선다 */
.sched-cal__cell:not(.is-other):hover { background: var(--color-brand-soft); }
.sched-cal__cell:not(.is-other):not(.is-today):hover .sched-cal__day { box-shadow: inset 0 0 0 1px var(--color-brand); }
.sched-cal__cell + .sched-cal__cell { border-left: 1px solid var(--color-line); }
.sched-cal__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.is-sun .sched-cal__day, .sched-cal__weekday.is-sun { color: var(--color-danger); }
.is-sat .sched-cal__day, .sched-cal__weekday.is-sat { color: var(--color-brand); }
.sched-cal__cell.is-other { background: var(--color-bg-soft); }
.sched-cal__cell.is-other .sched-cal__day { opacity: 0.45; }
.sched-cal__cell.is-today .sched-cal__day { background: var(--color-accent); color: var(--color-on-dark); }

.sched-cal__event {
  display: block;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.sched-cal__event:hover { opacity: 0.85; transform: translateY(-1px); }
/* 기간 일정은 칸을 넘어 이어지는 막대처럼 보이게 이어지는 쪽 모서리를 편다 */
.sched-cal__event.is-open { margin-right: -7px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sched-cal__event.is-cont { margin-left: -7px; border-top-left-radius: 0; border-bottom-left-radius: 0; }

.sched-list__title { display: flex; align-items: baseline; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--color-line); font-size: var(--fs-h3); font-weight: 700; }
.sched-list__title span { font-size: var(--fs-small); font-weight: 600; color: var(--color-accent-dark); }
.sched-list__empty { padding: 48px 8px; text-align: center; font-size: var(--fs-small); line-height: 1.7; color: var(--color-text-muted); }

.sched-item {
  display: flex;
  gap: 18px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--color-line);
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: background-color 0.2s var(--ease);
}
.sched-item:hover { background: var(--color-bg-soft); }
.sched-item:target { background: var(--color-bg-soft); box-shadow: inset 3px 0 0 var(--color-accent); }
.sched-item__date { display: flex; flex-direction: column; align-items: center; flex: none; width: 52px; font-size: var(--fs-xs); color: var(--color-text-muted); }
.sched-item__date strong { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--color-brand); font-variant-numeric: tabular-nums; }
.sched-item__date em { margin-top: 2px; font-style: normal; font-weight: 600; color: var(--color-accent-dark); }
.sched-item__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sched-item__meta { display: flex; align-items: center; gap: 8px; }
.sched-item__done { font-size: var(--fs-xs); color: var(--color-text-muted); }
.sched-item__title { font-size: var(--fs-body); font-weight: 700; line-height: 1.45; color: var(--color-text); }
.sched-item__line { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-small); color: var(--color-text-sub); }
.sched-item__line .sched-icon { margin-top: 2px; color: var(--color-accent-dark); }
.sched-item__desc { margin-top: 4px; font-size: var(--fs-small); line-height: 1.65; color: var(--color-text-sub); }
.sched-item__link { align-self: flex-start; margin-top: 4px; color: var(--color-brand); font-weight: 600; }
.sched-item.is-past { opacity: 0.6; }

@media (max-width: 1023px) {
  .sched-upcoming__grid { grid-template-columns: minmax(0, 1fr); }
  .sched-month__body { grid-template-columns: minmax(0, 1fr); }
}

/* 좁은 화면에서는 달력 칸에 제목이 들어가지 않는다. 막대를 점으로 줄이고 목록이 글을 맡는다. */
@media (max-width: 767px) {
  .sched-next { flex-direction: column; min-height: 0; }
  .sched-next__date { flex-direction: row; gap: 8px; width: auto; padding: 14px 20px 0; border-right: 0; justify-content: flex-start; align-items: baseline; }
  .sched-next__day { font-size: 32px; }
  .sched-next__body { padding: 8px 20px 22px; }
  .sched-next__title { font-size: var(--fs-body); }
  /* September 처럼 긴 달 이름이면 '이번 달' 단추가 390 폭을 넘는다 — 다음 줄로 내린다 */
  .sched-month__nav { flex-wrap: wrap; row-gap: 10px; }
  .sched-month__title { min-width: 0; }
  .sched-month__title strong { font-size: 26px; }
  .sched-cal__cell { min-height: 56px; padding: 6px 3px; align-items: center; }
  .sched-cal__day { align-self: center; }
  .sched-cal__event {
    width: 7px;
    height: 7px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    font-size: 0;
  }
  .sched-cal__event.is-open, .sched-cal__event.is-cont { margin: 0; border-radius: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .sched-next, .sched-later__title, .sched-cal__event { transition: none; }
}
