:root {
  --yonsei-blue: #003478;
  --yonsei-light-blue: #e6eefc;
  --accent: #0050a5;
  --bg: #f8fafc;
  --border: #d8dee9;
  --text: #1a1d20;
  --gray-text: #6b7280;
  --success: #00b894;
  --error: #d9534f;
}

/* =========================================================
   ±âº» ¼³Á¤
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  font-family: "Noto Sans KR", sans-serif;
  background: var(--bg);
  margin: 0;
  padding: 0 0 72px; /* ÇªÅÍ °ø°£ È®º¸ */
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5;
}

/* =========================================================
   Çì´õ
   ========================================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 3px solid var(--yonsei-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.brand {
  font-weight: 700;
  color: var(--yonsei-blue);
  font-size: 18px;
  text-align: center;
  letter-spacing: -0.3px;
  line-height: 1.3;
  max-width: 80vw;
}
@media (max-width: 600px) {
  .brand { font-size: 15px; line-height: 1.4; }
}

/* =========================================================
   ¸ÞÀÎ ÄÁÅ×ÀÌ³Ê
   ========================================================= */
.container {
  width: 90vw;
  max-width: 1080px;
  margin: 0 auto;
  padding: 100px 0 24px;
  text-align: center;
}

/* =========================================================
   ÆäÀÌÁö Á¦¸ñ (¿¹¾àÇöÈ²)
   ========================================================= */
.page-title {
  width: 90vw;
  max-width: 1080px;
  margin: 10px auto 16px auto; /* »ó´Ü ¿©¹é 10px·Î Ãà¼Ò */
  text-align: center;
}
.page-title h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--yonsei-blue);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.3px;
  position: relative;
}
.page-title h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--yonsei-blue);
  margin: 6px auto 0;
  border-radius: 3px;
}

/* =========================================================
   ´Þ·Â »ó´Ü (ÇöÀç¿ù + ÀÌÀü/´ÙÀ½)
   ========================================================= */
.calendar-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90vw;
  max-width: 1080px;
  margin: 0 auto 14px auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.month-label {
  font-weight: 700;
  color: var(--yonsei-blue);
  font-size: 18px;
}
.month-controls {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.month-btn {
  background: var(--yonsei-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s;
}
.month-btn:hover { background: var(--accent); }

/* =========================================================
   ´Þ·Â
   ========================================================= */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin: 12px auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--gray-text);
  font-size: 14px;
  margin-bottom: 6px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(112px, auto);
  gap: 10px;
  width: 100%;
}
.day {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  transition: box-shadow .2s, transform .1s, border-color .2s;
  overflow: hidden;
}
.day:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.day.other { opacity: .3; }

.day.has-availability {
  border-color: rgba(0, 52, 120, .28);
  background: linear-gradient(180deg, #f3f7ff 0%, #ffffff 60%);
  cursor: pointer;
}
.day .day-num {
  position: absolute;
  top: 8px;
  left: 10px;
  font-weight: 700;
  color: #0f1c2e;
}

/*  ¿¹¾àÇÏ±â ±ÛÀÚ: ¹ÝÀÀÇü Ãà¼Ò + ÁÙ³»¸² ¹æÁö */
.reserve-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  color: var(--yonsei-blue);
  user-select: none;
  pointer-events: none;
  text-align: center;

  /* È­¸é Æø¿¡ µû¶ó ÀÚµ¿À¸·Î Å©±â Á¶Àý */
  font-size: clamp(11px, 1.8vw, 15px);

  /* ÁÙ³»¸² ¹æÁö ¹× ¸»ÁÙÀÓ */
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 360px) {
  .reserve-text { font-size: clamp(10px, 3.2vw, 13px); }
}

/* =========================================================
   ¹öÆ°
   ========================================================= */
.button {
  background: var(--yonsei-blue);
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: .2s;
  box-shadow: 0 6px 16px rgba(0, 52, 120, .18);
}
.button:hover { background: var(--accent); transform: translateY(-1px); }
.button.ghost { background: #fff; color: var(--yonsei-blue); border: 1px solid var(--yonsei-blue); }
.button.btn-danger { background: #d9534f; }
.button.btn-danger:hover { background: #c0392b; }

/* =========================================================
   ¸ð´Þ
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal .sheet {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  width: 92%;
  max-width: 560px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  animation: fadeIn .28s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
#modalTitle {
  font-size: 22px;
  font-weight: 800;
  color: var(--yonsei-blue);
  text-align: center;
  margin: 0 0 16px;
}
#slotInfo {
  text-align: center;
  color: var(--gray-text);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.6;
}

/* °øÅë ÀÔ·Â ½ºÅ¸ÀÏ */
.modal .input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d4d8df;
  border-radius: 12px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  line-height: 1.5;
}
.modal .input + .input,
.modal .input + textarea.input,
.modal textarea.input + .input { margin-top: 12px; }
.modal .input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 80, 165, 0.15);
}
.modal textarea.input { resize: none; min-height: 84px; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#msg { font-size: 13px; text-align: right; color: var(--error); margin-top: 10px; }

/*  ½Ã°£ ¼±ÅÃ »óÀÚ(SELECT)¸¦ ÀÔ·Â°ú µ¿ÀÏ ³ôÀÌ/½ºÅ¸ÀÏ·Î */
select.input,
.modal select.input {
  height: 46px;
  padding: 0 14px;
  font-size: 14px;
  border: 1px solid #d4d8df;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  appearance: none; /* ±âº» È­»ìÇ¥ Á¦°Å */
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 1L5 5L1 1' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
}
select.input:focus,
.modal select.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,80,165,0.15);
}

/* =========================================================
   ÇªÅÍ
   ========================================================= */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: #fff;
  border-top: 1px solid var(--border);
  height: 56px;
  display: flex;  align-items: center;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 90vw;
}
.footer-center { text-align: center; font-weight: 500; color: var(--gray-text); flex: 1; }
.admin-link { position: absolute; right: 0; color: var(--yonsei-blue); font-weight: 500; text-decoration: none; transition: .2s; }
.admin-link:hover { text-decoration: underline; color: var(--accent); }

/* =========================================================
   ¹ÝÀÀÇü
   ========================================================= */
@media (max-width: 480px) {
  .calendar { grid-auto-rows: minmax(98px, auto); gap: 8px; }
  .day { border-radius: 10px; padding: 8px; } /*  ¿ÀÅ¸ ¼öÁ¤(px ¡æ 8px) */
  .month-label { font-size: 16px; }
  .reserve-text { font-size: clamp(10px, 3vw, 13px); }
  .footer { height: 52px; }
  body { padding-bottom: 68px; }
}