:root {
  --bg: #f5f7fa;
  --ink: #25313b;
  --muted: #6a7580;
  --line: #e6eaee;
  --line-strong: #ccd3da;
  --brand: #2d665f;
  --brand-soft: #e3f0ec;
  --shadow: none;
}
body { font-size: 14px; letter-spacing: 0; }
.app { grid-template-columns: 332px minmax(0, 1fr); }
.side { background: #fff; padding: 24px 20px; scrollbar-width: thin; }
.side h1 { font-size: 22px; }
.side > .stack { gap: 0; }
.section { padding: 20px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.side .section h2 { font-size: 15px; color: #334750; }
.main { padding: 26px 28px 36px; }
button, input, textarea, select { border-radius: 6px; font-size: 13px; }
button { min-height: 36px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .event:focus-visible { outline: 2px solid #3567b1; outline-offset: 3px; }
button.primary:hover { background: #24564f; }
.toolbar { gap: 8px; margin-bottom: 14px; }
.toolbar label { min-width: 180px; max-width: 100%; }
.toolbar label select { max-width: 100%; }
.subtle { font-size: 12px; }
.week-controls { gap: 8px; margin-top: 22px; }
.week-controls label { min-width: 190px; }
.week-controls .week-arrow { width: 38px; min-height: 38px; }
#weekDates { margin: 0 0 9px 4px; font-variant-numeric: tabular-nums; }
.term-settings { margin: 0 0 22px; padding-bottom: 12px; color: var(--muted); font-size: 12px; }
.topbar { align-items: center; margin-bottom: 12px; }
.topbar h2 { font-size: 21px; margin: 0; }
.tabs { gap: 2px; padding: 3px; border: 1px solid var(--line); background: #eaf0f2; border-radius: 6px; }
.tabs button { border-radius: 4px; min-height: 30px; padding: 5px 12px; background: transparent; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #26374414; }
.stats { gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.stat { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; background: transparent; border: 0; border-radius: 0; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { font-size: 23px; color: #304952; }
.board-wrap { border-radius: 8px; box-shadow: none; }
.board { min-width: 916px; grid-template-columns: 76px repeat(7, minmax(120px, 1fr)); }
.corner, .day-head { min-height: 66px; padding: 10px 6px; background: #fff; font-size: 13px; color: #43505b; }
.day-head { gap: 5px; border-left: 1px solid var(--line); }
.day-head small { font-size: 13px; color: #6a7580; font-variant-numeric: tabular-nums; }
.day-head.today { background: #eef6f3; color: #245f55; }
.day-head.today small { font-weight: 700; color: #245f55; }
.time-col { position: sticky; left: 0; z-index: 2; background: #fcfdfe; }
.time-col, .day-col { height:var(--timetable-height); min-height:0; }
.time-label:first-child { transform: none; }
.time-label { left: 0; right: 0; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.day-col { border-right:0; background:#fff; }
.time-slot { position:absolute; left:0; right:0; display:flex; flex-direction:column; justify-content:center; align-items:center; border-bottom:1px solid var(--line); font-size:12px; line-height:1.2; font-variant-numeric:tabular-nums; color:#43505b; }
.time-slot small { font-size:10px; color:var(--muted); margin-top:3px; }
.grid-slot { position:absolute; left:0; right:0; border-bottom:1px solid var(--line); pointer-events:none; }
.break-slot { background:#f3f6f8; }
.board-empty { grid-column:1 / -1; min-height:160px; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:13px; }
.day-col.weekend { background-color: #fafbfd; }
.event { left:5px; right:5px; padding:7px 8px; border:1px solid var(--course-border); border-left-width:3px; border-radius:5px; background:var(--course-bg); color:var(--course-ink); scrollbar-width:none; transition:box-shadow .15s; box-shadow:none; }
.event::-webkit-scrollbar { display: none; }
.event:hover, .event:focus-visible { z-index: 1; box-shadow: 0 3px 10px #25313b18; }
.event.personal { background: var(--course-bg); color: var(--course-ink); border-color: var(--course-border); border-style: dashed; border-left-style: solid; }
.event.conflict { outline: 2px solid #ba443d; outline-offset: 0; }
.event-title { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; font-size:13px; font-weight:700; line-height:1.35; margin-bottom:3px; overflow-wrap:anywhere; }
.event.personal .event-title { display: block; white-space: nowrap; }
.event-meta { font-size: 11px; line-height: 1.35; opacity: .95; white-space: nowrap; }
.event-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 10px; }
.event-kind { font-size: 10px; font-weight: 600; margin-bottom: 3px; }
.duplicate-note { color:#695016; font-size:10px; }
.list { gap: 0; }
.item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; background: transparent; }
#eventList { max-height: none; }
#eventList .item { border-left: 4px solid var(--course-border); padding: 14px 16px; margin: 0 0 8px; background: var(--course-bg); border-radius: 6px; }
#eventList .item strong { color: var(--course-ink); }
#eventList .item span { line-height: 1.7; color: #44515d; }
.course-arrangement { margin:6px 0 0; line-height:1.7; font-size:12px; }
#eventList .item > div:first-child { min-width:0; flex:1; }
.item-actions { display:flex; flex-direction:column; gap:8px; flex:none; }
.preview-course { border-bottom:1px solid var(--line); padding:10px 0; }
.preview-course p { margin:6px 0; }
.school-results { display: block; }
.school-result { display: block; width: 100%; min-height: 66px; background: transparent; }
.school-result:hover { background: #f5f8fa; }
.notice { font-size: 12px; }
@media (max-width: 1100px) and (min-width: 981px) { .app { grid-template-columns: 300px minmax(0, 1fr); } .main { padding: 24px 18px; } }
@media (max-width: 980px) { .app { grid-template-columns: 1fr; } .main { padding: 20px; } .side { padding: 24px 20px; } .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .main { padding: 18px 12px; }
  .toolbar { align-items: end; }
  .toolbar label { flex: 1; min-width: 100%; }
  .toolbar button { padding: 7px 9px; }
  .week-controls { gap: 6px; }
  .week-controls label { flex: 1; min-width: 160px; }
  .week-controls select { min-width: 0; }
  #weekDates { flex-basis: 100%; margin: 4px 0 0; }
  .stat { gap: 6px; padding: 10px 8px; }
  .stat strong { font-size: 20px; }
  .stat .subtle { font-size: 11px; }
  .topbar h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { button, .event { transition: none; } }
