/* ============================================================
   Doctor Lounge v0.3 — 무찌게시판 스타일
   메디게이트 무찌마 톤 · 파란 계열 · 안정감
   ============================================================ */

:root {
  --muzzi-blue: #1a6fb5;
  --muzzi-blue-dark: #145a94;
  --muzzi-blue-light: #e8f2fa;
  --muzzi-blue-soft: #f0f6fc;
  --muzzi-blue-border: #c5d9eb;
  --muzzi-blue-hover: #eef5fb;

  --bg-page: #f4f7fb;
  --bg-white: #ffffff;
  --bg-bar: #f8fafc;

  --text-primary: #1e2a36;
  --text-secondary: #4a5d6f;
  --text-muted: #7a8b9a;
  --text-link: #1a6fb5;

  --accent-red: #e05353;
  --accent-red-soft: #fff0f0;

  --border: #dde5ee;
  --border-dash: #d0dae6;

  --shadow-sm: 0 1px 3px rgba(26, 111, 181, 0.06);
  --shadow-md: 0 2px 8px rgba(26, 111, 181, 0.08);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --font-sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --ease: ease;
  --container: min(920px, 100% - 2rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

:focus-visible {
  outline: 2px solid var(--muzzi-blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  padding: 0.5rem 0.9rem; background: var(--muzzi-blue);
  color: #fff; border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

.container { width: var(--container); margin-inline: auto; }

/* 배경 장식 제거 — 무찌는 밝고 단정 */
.grid-bg, .glow { display: none; }

/* --- Header (무찌 상단바 느낌) --- */
.site-header {
  background: var(--bg-white);
  border-bottom: 2px solid var(--muzzi-blue);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-pulse { display: none; }

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muzzi-blue);
  letter-spacing: -0.02em;
}

.brand-name::before {
  content: "무찌";
  margin-right: 0.15rem;
}

.brand-ver {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--muzzi-blue-soft);
  border: 1px solid var(--muzzi-blue-border);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.header-nav {
  display: flex;
  gap: 0.25rem;
}

.header-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.header-link:hover,
.header-link:first-child {
  color: var(--muzzi-blue);
  background: var(--muzzi-blue-light);
}

/* --- Hero (짧고 안정적) --- */
.hero {
  background: linear-gradient(180deg, var(--muzzi-blue-soft) 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0 1rem;
}

.hero-badge { margin-bottom: 0.5rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 3px;
}

.badge--live {
  color: var(--muzzi-blue-dark);
  background: var(--muzzi-blue-light);
  border: 1px solid var(--muzzi-blue-border);
}

.badge--cat {
  font-size: 0.68rem;
  color: var(--muzzi-blue-dark);
  background: var(--muzzi-blue-soft);
  border: 1px solid var(--muzzi-blue-border);
}

.hero-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.hero-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--muzzi-blue);
  color: #fff;
  border: 1px solid var(--muzzi-blue-dark);
}
.btn--primary:hover { background: var(--muzzi-blue-dark); }

.btn--secondary {
  background: var(--bg-white);
  color: var(--muzzi-blue);
  border: 1px solid var(--muzzi-blue-border);
}
.btn--secondary:hover { background: var(--muzzi-blue-light); }

.btn--ghost {
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  color: var(--muzzi-blue);
  border-color: var(--muzzi-blue-border);
  background: var(--muzzi-blue-soft);
}

.btn--link {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  color: var(--muzzi-blue);
  background: var(--bg-white);
  border: 1px solid var(--muzzi-blue-border);
}
.btn--link:hover { background: var(--muzzi-blue-light); }

.btn--small { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn--wide { width: 100%; }
.btn--back { margin-bottom: 0.75rem; font-size: 0.82rem; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --- Quick Links (무찌 상단 바로가기) --- */
.quick-links-section {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.quick-links-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.quick-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muzzi-blue-dark);
  background: var(--bg-white);
  border: 1px solid var(--muzzi-blue-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}

.quick-link-btn:hover {
  background: var(--muzzi-blue);
  color: #fff;
  border-color: var(--muzzi-blue-dark);
}

@media (min-width: 520px) {
  .quick-links-bar {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
  }
}

/* --- Section --- */
.section { padding: 1.25rem 0 1.75rem; }

.section-head {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--muzzi-blue);
}

.section-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.section-num { color: var(--muzzi-blue); font-weight: 600; }

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--muzzi-blue-dark);
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.section--board {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* --- Write Panel --- */
.write-panel {
  background: var(--muzzi-blue-soft);
  border: 1px solid var(--muzzi-blue-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.write-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muzzi-blue-dark);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--muzzi-blue-border);
}

.form-row { margin-bottom: 0.75rem; }

.form-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.optional { color: var(--text-muted); font-weight: 400; }

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--muzzi-blue);
  box-shadow: 0 0 0 2px rgba(26, 111, 181, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.char-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.char-counter.is-warning { color: var(--accent-red); }

/* --- Board List (메디게이트 무찌 목록) --- */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 0.55rem 0.75rem;
  background: var(--muzzi-blue);
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.board-toolbar-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.board-toolbar .btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.board-toolbar .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.board-list-head {
  display: none;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-bar);
  border: 1px solid var(--border);
  border-top: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.board-list-head-meta {
  display: flex;
  gap: 0.85rem;
  min-width: 200px;
  justify-content: flex-end;
}

.board-list {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}

.board-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px dashed var(--border-dash);
  transition: background 0.12s;
  cursor: pointer;
}
.board-row:last-child { border-bottom: none; }
.board-row:hover { background: var(--muzzi-blue-hover); }

.board-row-main { min-width: 0; }

.board-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.board-row:hover .board-title { color: var(--muzzi-blue); }

.board-cmt {
  color: var(--accent-red);
  font-weight: 700;
  font-size: 0.85rem;
  margin-left: 0.15rem;
}

.board-row-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.board-author {
  color: var(--text-secondary);
  min-width: 4.5rem;
}

.board-time { font-variant-numeric: tabular-nums; }

.board-like {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.board-like--empty { opacity: 0.5; }

.board-loading,
.board-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* --- Post Detail --- */
.post-detail {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}

.post-detail-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.post-detail-body {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-primary);
  word-break: keep-all;
}

.comment-section-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muzzi-blue-dark);
  margin-bottom: 0.6rem;
  padding-left: 0.15rem;
}

.comment-list {
  list-style: none;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
}

.comment-item {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px dashed var(--border-dash);
}
.comment-item:last-child { border-bottom: none; }

.comment-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
}

.comment-author {
  font-weight: 600;
  color: var(--muzzi-blue-dark);
}

.comment-time { color: var(--text-muted); }

.comment-body {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.comment-empty {
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.comment-form {
  background: var(--muzzi-blue-soft);
  border: 1px solid var(--muzzi-blue-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

/* --- 오늘의 소소한 혜택 --- */
.section--perks {
  padding-top: 1.5rem;
  padding-bottom: 1.75rem;
}

.section-head--soft {
  border-bottom: none;
  margin-bottom: 1.1rem;
  padding-bottom: 0;
}

.section-head--soft .section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-head--soft .section-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.perks-section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.perks-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.perks-grid {
  display: grid;
  gap: 0.75rem;
}

.perk-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(30, 42, 54, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.perk-card:hover,
.perk-card.is-lifted {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 42, 54, 0.07);
  border-color: #d4dde8;
}

.perk-card-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.perk-card-icon--naver { color: #2d8f6f; }
.perk-card-icon--toss { color: #3182f6; }

.perk-icon-svg {
  width: 2.75rem;
  height: 2.75rem;
  display: block;
}

.perk-card-body {
  flex: 1;
  min-width: 0;
}

.perk-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-bar);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.perk-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.perk-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.perk-card-footer {
  display: flex;
  justify-content: flex-end;
}

.perk-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.perk-open-btn:hover {
  color: var(--muzzi-blue-dark);
  border-color: var(--muzzi-blue-border);
  background: var(--muzzi-blue-soft);
}

@media (min-width: 560px) {
  .perks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .perk-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.15rem 1.2rem;
  }

  .perk-card-icon {
    width: 3rem;
    height: 3rem;
  }

  .perk-icon-svg {
    width: 3rem;
    height: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .perks-section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .perk-card {
    transition: border-color 0.15s;
  }

  .perk-card:hover,
  .perk-card.is-lifted {
    transform: none;
  }
}

/* --- Links Hub --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.filter-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.filter-btn:hover { border-color: var(--muzzi-blue-border); color: var(--muzzi-blue); }
.filter-btn.is-active {
  color: #fff;
  background: var(--muzzi-blue);
  border-color: var(--muzzi-blue-dark);
}

.links-grid {
  display: grid;
  gap: 0.65rem;
}

.link-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.link-card:hover {
  border-color: var(--muzzi-blue-border);
  box-shadow: var(--shadow-sm);
}

.link-card-top { margin-bottom: 0.35rem; }
.link-card-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.25rem; }
.link-card-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.6rem; line-height: 1.5; }
.link-card-footer { display: flex; justify-content: flex-end; }

/* --- 연수강좌 캘린더 --- */
.section--training {
  background: var(--bg-bar);
  border-top: 1px solid var(--border);
  padding-bottom: 2rem;
}

.training-upload-panel,
.training-review-wrap,
.cal-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.training-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muzzi-blue-dark);
  margin-bottom: 0.35rem;
}

.training-panel-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.training-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.training-upload-status {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  min-height: 1.2em;
}

.training-upload-status.is-visible {
  color: var(--muzzi-blue-dark);
  font-weight: 500;
}

.training-table-scroll {
  overflow-x: auto;
  margin-bottom: 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.training-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.training-table th,
.training-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
  text-align: left;
}

.training-table th {
  background: var(--bg-bar);
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.review-input {
  width: 100%;
  min-width: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.76rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-white);
}

.review-input--sm { max-width: 3.2rem; }
.review-input--wide { min-width: 10rem; }

.review-check { text-align: center; }

.training-review-footer {
  display: flex;
  justify-content: flex-end;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.cal-month-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 7rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.cal-filters { margin-bottom: 0.85rem; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
}

.cal-wd {
  background: var(--bg-bar);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 0.2rem;
}

.cal-wd--sun { color: #c44; }
.cal-wd--sat { color: #1a6fb5; }

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.cal-day {
  min-height: 6.5rem;
  background: var(--bg-white);
  padding: 0.35rem 0.3rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cal-day--pad {
  background: #f8fafc;
  min-height: 0;
}

.cal-day--today {
  background: #fffbe8;
  box-shadow: inset 0 0 0 2px #e8c84a;
}

.cal-day--sun .cal-day-num { color: #c44; }
.cal-day--sat .cal-day-num { color: #1a6fb5; }
.cal-day--holiday { background: #fff5f5; }

.cal-day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  line-height: 1.2;
}

.cal-day-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-holiday-label {
  font-size: 0.62rem;
  color: #b33;
  font-weight: 600;
  word-break: keep-all;
}

.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-height: 0;
}

.cal-evt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.28rem 0.35rem;
  background: var(--muzzi-blue-soft);
  border: 1px solid var(--muzzi-blue-border);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.cal-evt:hover {
  background: var(--muzzi-blue-light);
  border-color: var(--muzzi-blue);
}

.cal-evt-time {
  display: block;
  font-size: 0.62rem;
  color: var(--muzzi-blue-dark);
  font-weight: 600;
}

.cal-evt-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-evt-meta {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-more {
  font-size: 0.65rem;
  color: var(--muzzi-blue);
  padding: 0.15rem 0;
  text-align: left;
}

.cal-more:hover { text-decoration: underline; }

/* 모달 */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(30, 42, 54, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cal-modal-overlay[hidden] { display: none; }

.cal-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem 1rem;
  box-shadow: var(--shadow-md);
}

.cal-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.55rem;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
}

.cal-modal-close:hover { color: var(--text-primary); }

.cal-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-right: 1.5rem;
  line-height: 1.45;
}

.cal-modal-dl {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem 0.65rem;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
}

.cal-modal-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.cal-modal-dl dd {
  color: var(--text-primary);
  margin: 0;
  line-height: 1.45;
}

.cal-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cal-modal-list-btn {
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-bar);
}

.cal-modal-list-btn:hover {
  border-color: var(--muzzi-blue-border);
  background: var(--muzzi-blue-soft);
}

.cal-modal-list-btn strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.cal-modal-list-btn span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 639px) {
  .cal-day { min-height: 5rem; }
  .cal-evt-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

@media (min-width: 768px) {
  .cal-day { min-height: 7.5rem; }
}

/* --- Admin / Footer --- */
.admin-setup {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.admin-setup summary { cursor: pointer; padding: 0.4rem 0; }
.admin-setup-steps {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
  line-height: 1.65;
}

.site-footer {
  background: var(--bg-bar);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 1.75rem;
  margin-top: 0.5rem;
}

.footer-main { font-size: 0.8rem; color: var(--text-secondary); }
.footer-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.footer-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; }

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 2000;
  padding: 0.65rem 1.1rem;
  max-width: calc(100% - 2rem);
  background: var(--muzzi-blue-dark);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  text-align: center;
}
.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Responsive --- */
@media (min-width: 640px) {
  .board-list-head { display: grid; }
  .board-row {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
  }
  .board-row-meta {
    min-width: 220px;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
  .links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  :root { --container: min(920px, 100% - 2.5rem); }
  .hero-title { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
