/* --- Popup base --- */
.popup{ position:fixed; inset:0; display:none; align-items:center; justify-content:center;
        background:rgba(0,0,0,.45); z-index:9999; padding:20px; }
.popup.is-open{ display:flex; }

.popup__dialog{  background:#fff; border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.25); position:relative; overflow:hidden; }
.popup__content{ padding:24px; }
.popup__content h3{ margin:0 0 10px; font-size:20px; font-weight:800; }
.popup__content p{ margin:0 0 16px; line-height:1.65; color:#424b57; }

.popup__close{ 
    position:absolute; top:8px; right:8px; width:36px; height:36px;    align-items: center;
    justify-content: center;
  border:0; background:#f3f5f8; border-radius:10px; font-size:22px; cursor:pointer; display: flex;
}
.popup__close:hover{ background:#e9eef4; }

.popup__today{ display:flex; align-items:center; gap:8px;
  padding:12px 16px; background:#f8fafc; border-top:1px solid #eef2f7; font-size:14px; color:#4b5563; }

.btn-primary{ display:inline-block; padding:10px 14px;  color:#fff;
  text-decoration:none; border-radius:10px; font-weight:700; }
.btn-primary:hover{ }

/* 넓은 팝업으로 보고 싶으면 팝업 루트에 popup--wide 클래스 추가 */
.popup--wide .popup__dialog{ width:min(96vw, 980px); }

/* 타임테이블 */
.popup__content.popup--timetable{ padding:16px; }
.popup__content.popup--timetable h3{
  margin:0 0 14px; font-size:18px; font-weight:800;
}

.tt{ width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.tt thead th{
  background:#eef6ff; color:#0f3f82; font-weight:800; text-align:center;
  padding:12px 10px; border-bottom:0;
}
.tt tbody th.hour{
  text-align:center; font-weight:800; color:#0f3f82; background:#f2fbf6; border-left:2px solid #d3f0e0; border-right:2px solid #d3f0e0;
}
.tt td, .tt th.hour{
  padding:12px 14px; vertical-align:top; font-size:15px; line-height:1.7;
}
.tt tbody tr{
  border-top:1px dashed #e5e7eb;
}
.tt tbody td.minutes{
  color:#111827;
  font-variant-numeric: tabular-nums; /* 숫자 정렬 깔끔 */
}
.tt tbody td:first-child{ border-left:2px solid #e5eef7; }
.tt tbody td:last-child{ border-right:2px solid #e5eef7; }
.tt tbody tr:last-child td:first-child{ border-bottom-left-radius:18px; }
.tt tbody tr:last-child td:last-child{ border-bottom-right-radius:18px; }
.tt tbody tr:last-child th.hour{ border-bottom:2px solid #d3f0e0; }

/* 모바일 가독성 */
@media (max-width: 640px){
  .tt thead{ display:none; }
  .tt, .tt tbody, .tt tr, .tt td, .tt th{ display:block; width:100%; }
  .tt tr{ padding:12px 10px; border:1px solid #e9eef4; border-radius:12px; margin-bottom:10px; }
  .tt th.hour{ background:#f2fbf6; border:0; border-radius:8px; margin-bottom:8px; padding:8px 10px; }
  .tt td.minutes{ padding:6px 2px; }
  .tt td.minutes + .hour, .tt td.minutes + td{ margin-top:6px; }
}

/* 주석 */
.tt-notes{ margin:12px 2px 0; color:#4b5563; font-size:14px; line-height:1.7; }
.tt-notes li{ position:relative; padding-left:20px; }
.tt-notes li::before{
  content:"i"; position:absolute; left:0; top:2px;
  width:16px; height:16px; border-radius:50%; background:#e8f0ff; color:#1e4fbf;
  display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:11px;
}
