/* 방송 일정 페이지 (/schedule/). 색·글꼴 변수와 기본 글자 설정은 main.css 를 같이 불러 쓴다 */
.sc-page { box-sizing: border-box; width: min(980px, 100%); margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sc-back { font: 22px/1 var(--f-pop); text-decoration: none; }
.sc-back:hover { color: var(--brick); }
.sc-main { display: grid; gap: 22px; margin-top: 20px; }

.sc-hero h1 { margin: 0; font: clamp(34px, 6vw, 48px)/1.1 var(--f-pop); color: var(--brick); }
.sc-hero p { margin: 8px 0 0; font-weight: 500; line-height: 1.6; }

/* 달력 판 */
.sc-board { padding: 14px; border: 4px solid var(--black); border-radius: 18px; background: var(--paper); box-shadow: 6px 7px 0 var(--black); }
.sc-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sc-board { position: relative; }
.sc-heading { flex: 1; min-width: 0; display: flex; justify-content: center; margin: 0; }
/* 연·월 제목: 누르면 달 고르기가 열린다 */
.sc-title { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; border-radius: 12px; background: transparent; font: 26px/1.1 var(--f-pop); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.sc-title:hover, .sc-title[aria-expanded="true"] { background: rgba(21, 18, 31, .07); }
.sc-title svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.sc-title[aria-expanded="true"] svg { transform: rotate(180deg); }

/* 달 고르기: 해를 넘기고 달을 누르면 그 달로 워프 */
.sc-picker { position: absolute; z-index: 5; top: 62px; left: 50%; width: min(320px, calc(100% - 24px)); box-sizing: border-box; padding: 12px; border: 3px solid var(--black); border-radius: 14px; background: #fff; box-shadow: 5px 5px 0 var(--black); transform: translateX(-50%); }
.sc-picker[hidden] { display: none; }
.sc-picker-year { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sc-picker-year b { font: 20px/1 var(--f-pop); font-variant-numeric: tabular-nums; }
.sc-picker-year .sc-arrow { width: 34px; height: 34px; }
.sc-picker-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sc-picker-months button { padding: 9px 0; border: 2px solid rgba(21, 18, 31, .25); border-radius: 10px; background: var(--paper); font-weight: 700; font-size: 14px; cursor: pointer; }
.sc-picker-months button:hover { border-color: var(--black); }
.sc-picker-months .now { border-color: var(--brick); color: var(--brick); }
.sc-picker-months .current { border-color: var(--black); background: var(--card-chzzk); color: var(--black); }
.sc-arrow, .sc-this, .sc-retry, .sc-btn { border: 3px solid var(--black); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--black); font-weight: 700; cursor: pointer; }
.sc-arrow:hover, .sc-this:hover, .sc-retry:hover, .sc-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--black); }
.sc-arrow:active, .sc-this:active, .sc-retry:active, .sc-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--black); }
.sc-arrow { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; }
.sc-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sc-this { order: 4; padding: 8px 12px; background: var(--blonde); font-size: 13px; white-space: nowrap; }

/* .sc-grid 는 칸 띠(.sc-strip)를 담는 창. 넘기는 동안(.sliding)만 창 밖을 자른다 (평소에 자르면 오늘 칸 테두리·포커스 표시가 잘림) */
.sc-grid { position: relative; }
.sc-grid.sliding { overflow: hidden; }
.sc-weekdays, .sc-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sc-weekdays { margin-bottom: 6px; text-align: center; font-weight: 700; font-size: 13px; }
[data-wd="0"] > .num, .sc-weekdays [data-wd="0"] { color: var(--brick); }
[data-wd="6"] > .num, .sc-weekdays [data-wd="6"] { color: #3A55C9; }

.sc-strip { position: relative; }
.sc-cell { position: relative; transition: background-color .45s ease, border-color .45s ease; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; min-height: 88px; box-sizing: border-box; padding: 6px; border: 2px solid rgba(21, 18, 31, .18); border-radius: 10px; background: #fff; font: inherit; text-align: left; color: inherit; }
.sc-cell .num { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; transition: opacity .45s ease; }
.sc-cell .chips { transition: opacity .45s ease; }
/* 앞뒤 달 날짜는 점선 칸. 그 날 일정도 흐리게 보여 준다 (유저 요청 2026-10-25) */
.sc-cell.out { border-style: dashed; background: transparent; }
.sc-cell.out .num { opacity: .35; }
.sc-cell.out .chips { opacity: .6; }
/* 지난 날은 날짜와 일정을 같이 흐리게 (유저 요청 2026-10-25) */
.sc-cell.past { background: rgba(255, 255, 255, .55); }
.sc-cell.past .num { opacity: .55; }
.sc-cell.past .chips { opacity: .5; }
.sc-cell.out.past .chips { opacity: .35; }
.sc-cell.today { border: 3px solid var(--brick); box-shadow: 0 0 0 2px rgba(168, 50, 42, .2); }
/* 일정이 있는 날은 테두리를 진하게. 그중 '앞으로의 일정' 목록에 있는 날(.link)만 눌러서 목록으로 내려간다 */
.sc-cell.has { border-color: var(--black); }
.sc-cell.link { cursor: pointer; }
.sc-cell.link:hover { background: #F2FFFD; }
.chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* 제목은 줄을 바꿔 3줄까지 보이고, 넘치면 … 으로 줄인다 (유저 요청 2026-10-25: 한 줄로 잘리면 제목을 못 읽음) */
.chip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; padding: 2px 6px; border: 2px solid var(--black); border-radius: 6px; background: var(--card-chzzk); font-size: 12px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
/* 제목에 '휴방'이 든 일정은 빨간색 (calendar-month.js 의 isDayOff) */
.chip.off { background: var(--onair); color: #fff; }
/* 한 달 넘김에서 새로 드러난 줄의 일정이 아래에서 떠오른다 (시작 때는 config.js 의 SCHEDULE_ANIM.riseDelayMs) */
.chips.rise { animation: sc-rise .5s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes sc-rise { from { opacity: 0; transform: translateY(14px); } }
.more { font-size: 11px; font-weight: 700; color: rgba(21, 18, 31, .7); }

/* 앞으로의 일정 목록 */
.sc-agenda h2, .sc-sub h2 { margin: 0 0 10px; font: 24px/1.2 var(--f-pop); }
.sc-status { margin: 0 0 10px; font-weight: 500; }
.sc-status[hidden], .sc-retry[hidden] { display: none; }
.sc-grid-status { margin: 12px 0 0; }
.sc-board .sc-retry { margin: 8px 0 0; }
.sc-retry { margin-bottom: 10px; padding: 7px 14px; font-size: 13px; }
.sc-days { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sc-day { scroll-margin-top: 16px; padding: 12px 14px; border: 3px solid var(--black); border-radius: 14px; background: #fff; box-shadow: 4px 4px 0 var(--black); }
.sc-day.flash { animation: sc-flash 1.2s ease-out; }
@keyframes sc-flash { 0%, 30% { background: #CFFFE5; } 100% { background: #fff; } }
.sc-day h3 { margin: 0 0 8px; font-size: 16px; }
.badge { display: inline-block; padding: 1px 8px; border: 2px solid var(--black); border-radius: 999px; background: var(--brick); color: #fff; font-size: 12px; vertical-align: 1px; }
.sc-day ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sc-ev { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 12px; }
.sc-ev .time { font-size: 13px; font-weight: 700; color: var(--brick); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-ev .title { font-size: 16px; overflow-wrap: anywhere; }
.sc-ev.off .time, .sc-ev.off .title { color: var(--onair); }
/* 설명은 유저가 구글 캘린더에 적은 줄바꿈을 그대로 보여 준다 (반 공지처럼 쓰는 글) */
.sc-ev .note { grid-column: 2; margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; color: rgba(21, 18, 31, .82); }

/* 구독 */
.sc-sub { padding: 14px 16px; border: 3px dashed var(--black); border-radius: 16px; background: rgba(255, 248, 228, .7); }
.sc-sub p { margin: 0 0 12px; line-height: 1.6; }
.sc-sub-links { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-btn { display: inline-block; padding: 9px 16px; font-size: 14px; text-decoration: none; }
.sc-btn:first-child { background: var(--card-chzzk); }
.sc-chzzk { justify-self: start; font-weight: 700; }

/* 폰 화면: 달력 칸이 작아서 일정 제목 대신 점을 찍고, 제목은 아래 목록에서 읽는다 */
@media (max-width: 640px) {
  .sc-board { padding: 10px; }
  .sc-nav { gap: 6px; }
  .sc-title { gap: 3px; padding: 4px 6px; font-size: 19px; }
  .sc-title svg { width: 15px; height: 15px; }
  .sc-arrow { width: 36px; height: 36px; }
  .sc-this { padding: 7px 9px; font-size: 12px; }
  .sc-weekdays, .sc-grid { gap: 4px; }
  .sc-cell { min-height: 52px; padding: 4px; border-radius: 8px; align-items: center; }
  .sc-cell .num { font-size: 13px; }
  .chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .chip { display: block; width: 8px; height: 8px; padding: 0; border-width: 1.5px; border-radius: 50%; font-size: 0; }
  .more { display: none; }
  .sc-ev { grid-template-columns: minmax(0, 1fr); }
  .sc-ev .note { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-day.flash, .chips.rise { animation: none; }
  .sc-cell, .sc-cell .num, .sc-cell .chips { transition: none; }
}
