/* 강의 시간표 (course_skin) */
.crs { --crs-line: #222; --crs-grid: #c9c9c9; --crs-head: #d7d7d7; --crs-accent: #1f6fb2; }
.crs [hidden] { display: none !important; }
.crs_btns { text-align: right; margin-bottom: 10px; }
.crs_btns .btn { margin-left: 4px; }

/* 연도 탭 (큰 탭) */
.crs_years { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid #333; -webkit-overflow-scrolling: touch; }
.crs_years button { flex: 0 0 auto; border: 1px solid #ccc; border-bottom: 0; background: #f4f4f4; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; border-radius: 4px 4px 0 0; color: #444; }
.crs_years button.on { background: #333; border-color: #333; color: #fff; }
/* 학기 탭 (작은 탭) */
.crs_terms { display: flex; gap: 6px; margin: 12px 0 14px; flex-wrap: wrap; }
.crs_terms button { border: 1px solid #ccc; background: #fff; padding: 4px 12px; font: inherit; font-size: 13px; border-radius: 14px; cursor: pointer; color: #444; }
.crs_terms button.on { background: var(--crs-accent); border-color: var(--crs-accent); color: #fff; }

/* 시간표: PDF 와 같은 격자 (시간 | 월~토), 07:30 ~ 22:00 */
.crs_ttwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.crs_tt { width: 100%; min-width: 600px; border-collapse: collapse; table-layout: fixed; border: 1px solid var(--crs-line); }
.crs_tt caption { caption-side: top; text-align: center; font-size: 18px; font-weight: 700; padding: 6px 0 2px; }
.crs_tt .crs_sub { display: block; text-align: right; font-size: 12px; font-weight: 400; color: #444; padding: 2px 2px 8px; }
.crs_tt th, .crs_tt td { border: 1px solid var(--crs-grid); height: 21px; padding: 0 4px; font-size: 11px; text-align: center; vertical-align: middle; }
.crs_tt thead th { background: var(--crs-head); border-color: var(--crs-line); font-size: 12px; height: 26px; }
.crs_tt th.crs_time { width: 84px; text-align: left; font-weight: 400; color: #333; white-space: nowrap; background: #fafafa; position: sticky; left: 0; z-index: 1; }
.crs_tt thead th.crs_time { background: var(--crs-head); text-align: center; font-weight: 700; }
.crs_tt th.crs_time b { display: inline-block; width: 26px; font-weight: 600; }
.crs_tt tr.crs_hour th, .crs_tt tr.crs_hour td { border-top-color: #9a9a9a; }
/* 과목 블록 테두리: 표 테두리(collapse)는 같은 두께면 위 칸 선이 이겨서 윗선이 회색으로 덮임
   -> 블록 안쪽에 그림자로 진한 선을 그림 (주변 칸 선과 상관없이 네 면 모두 보임) */
.crs_tt tbody tr td.crs_cls { border: 1px solid var(--crs-grid); box-shadow: inset 0 0 0 1.5px var(--crs-line); padding: 4px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.crs_tt .crs_n { font-weight: 700; display: block; }
.crs_tt .crs_r, .crs_tt .crs_code { display: block; color: #333; }
.crs_tt .crs_code { font-size: 10px; color: #555; }
.crs_tt .crs_multi + .crs_multi { border-top: 1px dashed #888; margin-top: 3px; padding-top: 3px; }
/* 과목별 연한 색 */
.crs_c0 { background: #e8f1fb; } .crs_c1 { background: #fdf0dc; } .crs_c2 { background: #e6f5ea; } .crs_c3 { background: #f6e8f5; }
.crs_c4 { background: #fff7cf; } .crs_c5 { background: #e9e9f9; } .crs_c6 { background: #fbe6e6; }

/* 과목 목록 (시간표 아래) */
.crs_list { margin-top: 16px; border-top: 1px solid #ddd; }
.crs_row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #eee; align-items: baseline; }
.crs_dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid #999; }
.crs_t { font-weight: 600; } .crs_t small { font-weight: 400; color: #777; margin-left: 4px; }
.crs_m { color: #555; font-size: 12px; } .crs_cd { color: #777; font-size: 12px; white-space: nowrap; }
.crs_empty { padding: 30px 0; text-align: center; color: #777; }
/* 시간표의 과목을 누르면 목록의 그 과목이 잠깐 강조됨 (course.js) */
.crs:not(.crs_editing) .crs_tt td.crs_cls { cursor: pointer; }
.crs_row.crs_flash { animation: crs_flash 1.6s ease-out; }
@keyframes crs_flash { 0%, 30% { background: #fff3b0; } 100% { background: transparent; } }

/* 편집기 */
.crs_semsel { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 12px; }
.crs_semsel label { font-weight: 600; }
.crs_semsel input, .crs_semsel select { margin-left: 6px; padding: 5px 8px; border: 1px solid #ccc; font: inherit; }
.crs_semsel input[type=number] { width: 90px; }
.crs_help { margin: 0 0 10px; padding: 8px 12px; background: #f0f6ff; border: 1px solid #c8dcf3; border-radius: 4px; font-size: 13px; color: #24527a; }
.crs_editing .crs_tt td.crs_free { cursor: crosshair; }
.crs_editing .crs_tt td.crs_free:hover { background: #f0f6ff; }
.crs_editing .crs_tt td.crs_cls { cursor: pointer; }
.crs_editing .crs_tt td.crs_cls:hover { outline: 2px solid var(--crs-accent); outline-offset: -2px; }
.crs_tt td.crs_sel { background: #cfe3fb !important; }
.crs_editing .crs_tt { touch-action: none; user-select: none; }
.crs_write .btnArea { margin-top: 16px; text-align: center; }
.crs_write h2 { margin: 16px 0 12px; font-size: 18px; }

.crs_dlg { border: 1px solid #ccc; border-radius: 8px; padding: 0; width: min(440px, 92vw); }
.crs_dlg::backdrop { background: rgba(0, 0, 0, .35); }
.crs_dlg_in { padding: 18px 18px 14px; }
.crs_dlg h3 { margin: 0 0 12px; font-size: 16px; }
.crs_dlg label { display: block; font-size: 12px; color: #555; margin: 10px 0 4px; }
.crs_dlg input, .crs_dlg select { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 4px; font: inherit; box-sizing: border-box; }
.crs_when { font-size: 13px; background: #f6f6f6; padding: 8px 10px; border-radius: 4px; }
.crs_days { display: flex; gap: 4px; flex-wrap: wrap; }
.crs_days label { margin: 0; display: inline-flex; align-items: center; gap: 3px; border: 1px solid #ccc; border-radius: 4px; padding: 3px 7px; color: #222; font-size: 13px; }
.crs_days input { width: auto; }
.crs_two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.crs_acts { display: flex; justify-content: space-between; margin-top: 16px; gap: 6px; }
.crs_primary { background: var(--crs-accent, #1f6fb2); border-color: #1f6fb2; color: #fff; }
.crs_danger { color: #c0392b; }

@media (max-width: 767px) {
	.crs, .crs_write { padding: 0 14px 20px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
	.crs_write .crs { padding: 0; }
	.crs * { max-height: 999999px; }
	.crs_years { margin-top: 12px; }
	/* 휴대폰: 옆으로 밀지 않아도 월~토가 한 화면에 들어오게 줄임.
	   시간 칸은 "0A / 08:00" 두 줄, 과목 칸은 과목명 + 강의실 (코드는 아래 과목 목록에 있음) */
	table.crs_tt { min-width: 0; }
	/* 수업 없는 요일은 절반 폭 (course.js 가 요일별 비율을 --crs-w 로 넣음). PC 는 모든 요일 같은 폭 */
	.crs_tt col.crs_col_day { width: var(--crs-w); }
	.crs_tt th, .crs_tt td { padding: 0 1px; }
	.crs_tt thead th { font-size: 11px; }
	.crs_tt caption { font-size: 16px; }
	.crs_tt th.crs_time { width: 36px; font-size: 9px; line-height: 1.15; text-align: center; padding: 2px 0; }
	.crs_tt th.crs_time b { display: block; width: auto; font-size: 10px; }
	.crs_tt tbody tr td.crs_cls { font-size: 10px; padding: 2px; line-height: 1.25; }
	/* 과목명·강의실은 한 줄 (넘치면 course.js 가 글자를 줄이고, 그래도 안 되면 .crs_wrap 으로 두 줄) */
	.crs_tt td.crs_cls .crs_n, .crs_tt td.crs_cls .crs_r { white-space: nowrap; overflow: hidden; letter-spacing: -0.02em; }
	.crs_tt td.crs_cls .crs_r { font-size: 9px; }
	.crs_tt td.crs_cls .crs_wrap { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
	.crs_tt td.crs_cls .crs_code { display: none; }
}
