/* ============================================
   학교 공유 캘린더 - 글래스모피즘 회색 테마
   ============================================ */

:root {
  /* 회색 팔레트 */
  --bg-1: #eef0f3;
  --bg-2: #dfe2e7;
  --bg-3: #c8ccd2;

  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-bg-strong: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(100, 110, 130, 0.18);
  --glass-shadow-sm: 0 4px 16px rgba(100, 110, 130, 0.12);

  --text-1: #1c1c1e;
  --text-2: #3a3a3c;
  --text-3: #6e6e73;
  --text-4: #8e8e93;

  --accent: #6b7280;
  --accent-hover: #4b5563;
  --accent-soft: rgba(107, 114, 128, 0.14);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "SF Pro Display", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text-1);
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.legal-footer {
  max-width: 1180px;
  margin: 20px auto 36px;
  padding: 0 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 13px;
}

.legal-footer a {
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ───────── 배경 블롭 (은은한 장식) ───────── */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.blob-1 { width: 520px; height: 520px; background: #a5b4c3; top: -140px; left: -120px; }
.blob-2 { width: 420px; height: 420px; background: #b8c5d3; bottom: -100px; right: -80px; }
.blob-3 { width: 380px; height: 380px; background: #c4cdd8; top: 40%; left: 50%; transform: translate(-50%, -50%); opacity: 0.35; }

/* ───────── 글래스 베이스 ───────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

/* ───────── 헤더 ───────── */
.app-header {
  position: sticky;
  top: 12px;
  margin: 12px 16px 0;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}
.app-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-1);
}
.header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.app-purpose-inline {
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}
.room-title-action {
  cursor: pointer;
  border-bottom: 1px dashed rgba(107, 114, 128, 0.45);
}
.room-title-action:hover {
  opacity: 0.85;
}
.header-right { display: flex; gap: 8px; align-items: center; }

/* ───────── 탭 네비게이션 ───────── */
.tabs {
  margin: 12px 16px;
  padding: 6px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1;
  min-width: max-content;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab:hover { color: var(--text-1); background: rgba(255,255,255,0.4); }
.tab.active {
  background: rgba(255,255,255,0.85);
  color: var(--text-1);
  box-shadow: var(--glass-shadow-sm);
}

/* 탭 배지 (알림판 새글 카운트) */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--danger);
  color: white;
  border-radius: 9px;
  vertical-align: middle;
}

/* 오늘의 할일 / 이번주 섹션 */
.todo-section { margin-bottom: 24px; }
.todo-heading {
  font-size: 16px;
  margin: 10px 4px 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-radius: 11px;
}

/* 시스템 게시글 (자동 생성 알림) */
.post-card.system {
  background: rgba(107, 114, 128, 0.08);
  border-left: 3px solid var(--accent);
}
.system-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ───────── 컨텐츠 영역 ───────── */
.content { padding: 0 16px 80px; }
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
.search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
}
.search-shell input { margin-bottom: 0; }
.search-results-panel { margin-bottom: 16px; }
.search-results-panel.active { display: block; }
.search-result-group { margin-bottom: 14px; }
.search-result-title {
  margin: 8px 4px;
  font-size: 13px;
  color: var(--text-3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ───────── 버튼 ───────── */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn.full { width: 100%; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-ghost { background: rgba(255,255,255,0.5); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255,255,255,0.8); }
.btn-ghost.selected { background: var(--accent); color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-2);
  transition: all var(--transition);
  position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); }
.icon-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.event-detail-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.event-detail-meta { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.event-detail-desc { font-size: 13px; color: var(--text-2); margin-bottom: 10px; white-space: pre-wrap; }
.event-seen-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.event-comments { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.event-comment-item {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  padding: 9px 10px;
}
.event-comment-head { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.event-comment-body { font-size: 13px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.event-comment-compose textarea { margin-bottom: 8px; }

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ───────── 입력 요소 ───────── */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148,163,184,0.55);
  border-radius: var(--radius-sm);
  background: rgba(243,246,250,0.92);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  margin-bottom: 10px;
  transition: all var(--transition);
  user-select: text;
  -webkit-user-select: text;
}
input::selection,
textarea::selection {
  background: rgba(107, 114, 128, 0.24);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 60px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 8px 0 6px; }

.row { display: flex; gap: 10px; }
.col { flex: 1; }

/* ───────── 모달 ───────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 30, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal.hidden { display: none; }
.modal-card {
  max-width: 420px;
  width: 100%;
  padding: 28px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}
.modal-card.wider { max-width: 560px; }
.modal-card.memo-detail-card {
  max-width: min(900px, calc(100vw - 32px));
  min-height: min(680px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
}
.modal-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ───────── 사이드 패널 ───────── */
.side-panel {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 30, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease;
}
.side-panel.hidden { display: none; }
.side-card {
  width: 380px;
  max-width: 100%;
  height: 100vh;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.side-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(180,188,200,0.3);
}
.side-header h2 { margin: 0; font-size: 18px; }
.side-header-actions { display: flex; gap: 8px; align-items: center; }
.side-body {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}

/* ───────── 모바일 일정 액션 시트 ───────── */
.mobile-actions-sheet {
  display: none;
}
.mobile-actions-panel {
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 14px 12px;
}
.mobile-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mobile-actions-head strong {
  font-size: 14px;
  color: var(--text-2);
}
.mobile-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mobile-actions-grid .icon-btn {
  width: 100%;
  height: auto;
  min-height: 64px;
  border-radius: 12px;
}
.mobile-actions-grid .mobile-action-btn {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.mobile-action-icon {
  font-size: 18px;
  line-height: 1;
}
.mobile-action-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.mobile-actions-grid .mobile-action-btn:hover {
  transform: none;
  border-radius: 12px;
}

/* ───────── 캘린더 ───────── */
.calendar-header {
  margin-bottom: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-header h2 { flex: 1; margin: 0; font-size: 18px; text-align: center; }
.view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: rgba(255,255,255,0.52);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.65);
}
.view-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
}
.view-btn.selected {
  background: rgba(255,255,255,0.9);
  color: var(--text-1);
  box-shadow: var(--glass-shadow-sm);
}

.calendar-grid {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}
.calendar-grid.list-mode {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calendar-list-day {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.55);
}
.calendar-list-day.today {
  border-color: var(--accent);
  background: rgba(107,114,128,0.14);
}
.calendar-list-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
  margin-bottom: 8px;
}
.cal-weekday {
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-4);
}
.cal-weekday.sun { color: #e11d48; }
.cal-weekday.sat { color: #2563eb; }

.cal-day {
  min-height: 70px;
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.cal-day:hover { background: rgba(255,255,255,0.85); transform: translateY(-1px); }
.cal-day.today { background: rgba(107,114,128,0.18); border-color: var(--accent); }
.cal-day.holiday {
  background: rgba(254, 242, 242, 0.62);
  border-color: rgba(239, 68, 68, 0.24);
}
.cal-day.other-month { opacity: 0.35; }
.cal-day .date-num { font-size: 13px; font-weight: 600; color: var(--text-1); }
.cal-day.sun .date-num { color: #e11d48; }
.cal-day.sat .date-num { color: #2563eb; }
.cal-day.holiday .date-num { color: #dc2626; }

.cal-event-dot {
  background: var(--event-color, var(--accent));
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  min-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.cal-event-dot.done { opacity: 0.7; filter: grayscale(0.2); }
.cal-more-dot {
  color: var(--text-3);
  font-size: 10px;
  padding: 1px 5px;
  line-height: 1.4;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.cal-more-dot:hover { color: var(--text-1); text-decoration: underline; }
.cal-event-dot.range-mid {
  border-radius: 0;
  margin-left: -7px;
  margin-right: -7px;
  text-overflow: clip;
  color: transparent;
}
.cal-event-dot.range-start {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: -7px;
}
.cal-event-dot.range-end {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -7px;
  text-overflow: clip;
  color: transparent;
}

.events-list { display: flex; flex-direction: column; gap: 10px; }
.upcoming-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 4px 0;
}
.upcoming-list-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
}
.day-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 4px 12px;
  flex-wrap: wrap;
}
.day-detail-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
}
.event-card {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.event-card .event-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  min-width: 60px;
}
.event-card .event-title { flex: 1; font-weight: 600; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.event-card .event-title.done { text-decoration: line-through; color: var(--text-4); }
.event-card .event-creator { font-size: 11px; color: var(--text-4); }
.event-card .event-actions-wrap { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.event-actions-toggle { display: none; }
.event-card .event-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.event-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(120, 130, 150, 0.35);
  vertical-align: baseline;
}
.holiday-card {
  border-left: 4px solid #ef4444;
  background: rgba(254, 242, 242, 0.62);
}
.holiday-card .event-title { color: #b91c1c; }

/* ───────── 게시판 (알림판) ───────── */
.compose-card {
  padding: 16px 18px;
  margin-bottom: 14px;
}
.compose-card textarea { margin-bottom: 6px; }
.compose-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.memo-toolbar {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.memo-toolbar-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.memo-toolbar-left h2 {
  margin: 0;
  font-size: 18px;
}
.memo-toolbar-right {
  display: flex;
  gap: 8px;
}

/* ───────── 포스트잇 보드 ───────── */
.memo-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px 18px;
  padding: 14px 6px 30px;
}

.postit {
  --rot: 0deg;
  position: relative;
  padding: 22px 18px 14px;
  height: 220px;
  background: #fff8b5;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Comic Sans MS", "Marker Felt", cursive, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #2b2b2b;
  border-radius: 8px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.12),
    0 10px 18px -8px rgba(60,60,60,0.30),
    inset 0 -28px 24px -22px rgba(0,0,0,0.06);
  transform: rotate(var(--rot));
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  word-break: break-word;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}
.postit.postit-expanded {
  height: auto;
  min-height: 220px;
}
.postit:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow:
    0 1px 1px rgba(0,0,0,0.12),
    0 18px 28px -10px rgba(60,60,60,0.40);
}
.postit-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 78px;
  height: 18px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.postit-body {
  flex: 1;
  white-space: pre-wrap;
  overflow: hidden;
  min-height: 0;
}
.postit-has-toggle .postit-body {
  padding-top: 26px;
}
.postit-expanded .postit-body {
  overflow: visible;
}
.postit-content {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 80px;
  max-height: 126px;
  overflow: hidden;
  cursor: pointer;
  user-select: text;
  -webkit-user-select: text;
}
.postit-expanded .postit-content {
  max-height: none;
  cursor: text;
}
.postit-textarea {
  width: 100%;
  min-height: 130px;
  background: rgba(255,255,255,0.45);
  border: 1px dashed rgba(0,0,0,0.18);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.55;
  color: inherit;
  margin-bottom: 8px;
  resize: vertical;
}
.postit-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
  opacity: 0.55;
  transition: opacity var(--transition);
}
.postit-order-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 3px;
  opacity: 0.55;
  transition: opacity var(--transition);
}
.postit:hover .postit-order-actions { opacity: 1; }
.postit-order-actions button,
.postit-more-btn {
  border: none;
  background: rgba(255,255,255,0.38);
  border-radius: 8px;
  cursor: pointer;
  color: #2b2b2b;
  transition: all var(--transition);
  user-select: none;
  -webkit-user-select: none;
}
.postit-order-actions button {
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 12px;
}
.postit-order-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}
.postit-more-btn {
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}
.postit-toggle-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  min-width: 58px;
  letter-spacing: 0;
}
.postit-order-actions button:not(:disabled):hover,
.postit-more-btn:hover {
  background: rgba(255,255,255,0.75);
  transform: translateY(-1px);
}
.postit:hover .postit-actions,
.postit.editing .postit-actions { opacity: 1; }
.postit-actions button {
  border: none;
  background: rgba(255,255,255,0.35);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
  color: #2b2b2b;
  transition: all var(--transition);
  user-select: none;
  -webkit-user-select: none;
}
.postit-actions button:hover {
  background: rgba(255,255,255,0.7);
  transform: translateY(-1px);
}
.postit-actions .postit-del-btn:hover { background: var(--danger); color: white; }

.memo-checklist-preview {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.postit-expanded .memo-checklist-preview {
  max-height: none;
}
.memo-check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 7px;
  margin: 0;
  color: #2b2b2b;
  font-size: inherit;
  font-weight: 500;
  user-select: text;
  -webkit-user-select: text;
}
.memo-check-row input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.memo-check-row span {
  white-space: pre-wrap;
  word-break: break-word;
}
.memo-check-row span.done {
  color: rgba(43,43,43,0.55);
  text-decoration: line-through;
}

.memo-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.memo-detail-view,
.memo-detail-editor {
  flex: 1;
  min-height: 0;
}
.memo-detail-view {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.42);
  overflow: auto;
}
.memo-detail-text-view {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 16px;
  line-height: 1.7;
}
.memo-detail-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.memo-kind-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#memo-detail-text {
  flex: 1;
  min-height: 360px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.7;
}
.memo-checklist-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}
.memo-check-edit-row {
  display: grid;
  grid-template-columns: 22px 1fr 38px;
  gap: 8px;
  align-items: center;
}
.memo-check-edit-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.memo-check-edit-row input[type="text"] {
  margin-bottom: 0;
}
.memo-check-edit-row .icon-btn {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

/* 색상 변형 */
.postit-yellow { background: #fff59c; }
.postit-pink   { background: #ffc1d8; }
.postit-blue   { background: #b8e1ff; }
.postit-green  { background: #c4f0c5; }
.postit-purple { background: #e0c4ff; }
.postit-orange { background: #ffd29d; }
.postit-mint   { background: #b9f2e0; }
.postit-peach  { background: #ffd0b8; }

/* 모양 변형 */
.postit-square {
  border-radius: 4px 4px 12px 4px;
}
.postit-round {
  border-radius: 22px;
}
.postit-round .postit-tape { border-radius: 12px; width: 70px; }

.postit-fold {
  border-radius: 6px;
  position: relative;
}
.postit-fold::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.12) 50%);
  border-radius: 0 0 6px 0;
}

/* 클라우드 모양 (둥근 굴곡) */
.postit-wave {
  border-radius: 30px 8px 30px 8px;
}
.postit-wave:nth-of-type(odd) {
  border-radius: 8px 30px 8px 30px;
}

.postit.editing {
  transform: rotate(0deg) translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 16px 30px -8px rgba(60,60,60,0.45);
  z-index: 5;
}

.memo-result-card {
  padding: 14px 16px;
}
.memo-result-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}
.memo-result-text {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 700px) {
  .memo-board {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 12px;
    padding: 8px 2px 24px;
  }
  .postit {
    height: 176px;
    padding: 18px 14px 10px;
    font-size: 13px;
  }
  .postit-content { max-height: 92px; }
  .postit.postit-expanded {
    height: auto;
    min-height: 176px;
  }
  .postit-expanded .postit-content {
    max-height: none;
  }
  .postit-toggle-btn {
    top: 8px;
    right: 8px;
    z-index: 8;
  }
  .postit-textarea { min-height: 100px; }
  .memo-toolbar { padding: 10px 12px; }
  .memo-toolbar-left h2 { font-size: 16px; }
  .modal-card.memo-detail-card {
    max-width: 100%;
    min-height: calc(100vh - 24px);
  }
  #memo-detail-text { min-height: 300px; }
  .memo-checklist-editor { max-height: 360px; }
}

.posts-list { display: flex; flex-direction: column; gap: 12px; }
.post-card {
  padding: 16px 20px;
}
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.post-author {
  font-weight: 600;
  font-size: 14px;
}
.post-role {
  font-size: 11px;
  color: var(--text-4);
  margin-left: 6px;
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 6px;
}
.post-time { font-size: 11px; color: var(--text-4); }
.post-content { font-size: 14px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.post-actions { display: flex; justify-content: flex-end; margin-top: 8px; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ───────── 과제 ───────── */
.requests-header, .files-header, .members-header {
  margin-bottom: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.requests-header h2, .files-header h2, .members-header h2 { margin: 0; font-size: 18px; }

.requests-list { display: flex; flex-direction: column; gap: 12px; }
.request-card {
  padding: 16px 20px;
  cursor: pointer;
  transition: all var(--transition);
}
.request-card:hover { transform: translateY(-2px); }
.request-card .req-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.request-card .req-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.request-card .req-progress {
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.request-card .req-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width var(--transition);
}
.status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.status-open { background: var(--accent-soft); color: var(--accent-hover); }
.status-completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-overdue { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.assignees-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(180,188,200,0.5);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  max-height: 160px;
  overflow-y: auto;
}
.assignee-chip {
  padding: 6px 12px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(180,188,200,0.5);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
  user-select: none;
}
.assignee-chip.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.repeat-edit-scope {
  margin-bottom: 10px;
}
.repeat-edit-scope label {
  margin-top: 0;
}
.repeat-scope-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.submission-row {
  padding: 10px 14px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.submission-row.confirmed { background: rgba(16, 185, 129, 0.1); }
.submission-row.pending { background: rgba(239, 68, 68, 0.05); }
.submission-row .sub-name { font-weight: 600; font-size: 13px; }
.submission-row .sub-message { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.submission-row .sub-meta { font-size: 11px; color: var(--text-4); margin-top: 2px; }

/* ───────── 파일 바로가기 ───────── */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.file-card {
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.file-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(100,110,130,0.2); }
.file-card .file-emoji { font-size: 40px; line-height: 1; }
.file-card .file-name { font-size: 13px; font-weight: 600; color: var(--text-1); word-break: break-word; }
.file-card .file-creator { font-size: 10px; color: var(--text-4); }
.file-card .del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  width: 24px;
  height: 24px;
  font-size: 11px;
  padding: 0;
}
.file-card:hover .del-btn { opacity: 1; }

/* ───────── 멤버 ───────── */
.members-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.member-card {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.member-card.manageable { align-items: flex-start; }
.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-info .m-name { font-weight: 600; font-size: 14px; }
.member-info .m-role { font-size: 11px; color: var(--text-4); }
.member-card.me { border: 2px solid var(--accent); }
.member-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ───────── 알림 ───────── */
/* 연수 관리 */
.training-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.training-header,
.training-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.training-header {
  padding: 16px 18px;
}
.training-header h2,
.training-card h3 {
  margin: 0;
}
.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.training-sign-grid {
  grid-template-columns: minmax(280px, 1fr);
}
.training-card {
  padding: 16px 18px;
}
.training-wide {
  min-width: 0;
}
.training-inline-form {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.44);
  border: 1px solid rgba(255,255,255,0.55);
}
.signature-pad {
  width: 100%;
  height: 180px;
  display: block;
  border: 1px dashed rgba(107, 114, 128, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.86);
  touch-action: none;
  cursor: crosshair;
  margin-bottom: 10px;
}
.training-actions,
.certificate-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.training-item-actions {
  margin: 10px 0 4px;
}
.certificate-form {
  margin: 10px 0 12px;
  align-items: stretch;
}
.certificate-form input {
  flex: 1 1 260px;
  margin-bottom: 0;
}
.certificate-form .btn {
  flex: 0 0 auto;
}
.certificate-assignee-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.training-assignee-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.training-assignee-list,
.certificate-assignee-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
}
.training-assignee,
.certificate-assignee {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(180,188,200,0.35);
  font-size: 13px;
}
.training-assignee input,
.certificate-assignee input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-bottom: 0;
}
.training-sign-callout {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(236, 253, 245, 0.76);
  border: 1px solid rgba(16, 185, 129, 0.32);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.training-list,
.certificate-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.training-item,
.certificate-row,
.certificate-item {
  padding: 12px 14px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
}
.training-item-head,
.certificate-row,
.signature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.training-progress {
  height: 8px;
  margin: 10px 0;
  border-radius: 999px;
  background: rgba(107, 114, 128, 0.16);
  overflow: hidden;
}
.training-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
}
.training-pending {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.training-sheet-link {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}
.training-signatures {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.signature-row {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.45);
}
.signature-row img {
  width: 112px;
  height: 42px;
  object-fit: contain;
  background: white;
  border: 1px solid rgba(180,188,200,0.45);
  border-radius: 6px;
}
.certificate-row select {
  width: auto;
  min-width: 110px;
  margin-bottom: 0;
}
.certificate-dropzone {
  margin: 10px 0;
  padding: 12px 14px;
  border: 1.5px dashed rgba(59, 130, 246, 0.45);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.7);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.certificate-dropzone:hover,
.certificate-dropzone.dragover {
  background: rgba(219, 234, 254, 0.92);
  border-color: rgba(37, 99, 235, 0.8);
  transform: translateY(-1px);
}
.certificate-submissions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.certificate-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.46);
}
.certificate-submit-row.pending {
  border-left: 3px solid var(--warning);
}
.certificate-submit-row.submitted {
  border-left: 3px solid var(--success);
}

.notif-item {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.notif-item:hover { background: rgba(255,255,255,0.85); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item .n-msg { font-size: 13px; font-weight: 500; color: var(--text-1); padding-right: 28px; }
.notif-item .n-time { font-size: 11px; color: var(--text-4); margin-top: 3px; }
.notif-item .n-dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.notif-item:hover .n-dismiss { opacity: 1; }
.notif-item .n-dismiss:hover { background: var(--danger); color: white; }

/* ───────── 게시글 핀/순서 ───────── */
.post-card.pinned {
  border-left: 4px solid #f59e0b;
  background: rgba(254, 243, 199, 0.35);
}
.post-pin-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  background: #f59e0b;
  color: white;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.post-reorder-btns {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}
.reorder-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255,255,255,0.5);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
}
.reorder-btn:hover { background: rgba(255,255,255,0.9); }

/* ───────── 달력 과제 마커 ───────── */
.cal-task-dot,
.cal-holiday-dot {
  margin-top: 2px;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.4;
  background: rgba(245, 158, 11, 0.22);
  color: #78350f;
  border: 1px solid rgba(245, 158, 11, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-holiday-dot {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 700;
}
.cal-task-dot.submitted { opacity: 0.5; text-decoration: line-through; }
.deadline-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}
.deadline-chip.due-today {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}
.deadline-chip.due-soon {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}
.deadline-chip.overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.request-card.due-today,
.event-card.due-today { border-left: 4px solid var(--danger); }
.request-card.due-soon,
.event-card.due-soon { border-left: 4px solid var(--warning); }

/* ───────── 일정 카드 - 시간 표시 + 핀 + 순서 ───────── */
.event-time-pill {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  margin-right: 6px;
  font-weight: 600;
  font-family: monospace;
}
.event-card.pinned {
  border-left: 4px solid #f59e0b;
  background: rgba(254, 243, 199, 0.35);
}
.event-pin-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  background: #f59e0b;
  color: white;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ───────── 마스터 방 리스트 ───────── */
.master-room-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.6);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.master-room-card .mr-info { flex: 1; }
.master-room-card .mr-name { font-weight: 600; font-size: 14px; }
.master-room-card .mr-code { font-family: monospace; font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ───────── 알림 배너 (헤더와 동일한 크기) ───────── */
.toast-banner {
  position: fixed;
  top: 12px;
  left: 16px;
  right: 16px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 9999;
  animation: toastSlide 0.3s ease;
}
.toast-banner.hidden { display: none; }
.toast-msg {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.4;
}
.toast-banner .close-btn {
  flex-shrink: 0;
  font-size: 16px;
  width: 34px;
  height: 34px;
}
@keyframes toastSlide {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 700px) {
  .toast-banner {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 12px 16px;
  }
  .toast-msg { font-size: 14px; }
}

/* ───────── 유틸 ───────── */
.hidden { display: none !important; }
.muted { color: var(--text-4); }
.small { font-size: 12px; }
hr { border: none; border-top: 1px solid rgba(180,188,200,0.3); margin: 18px 0; }
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
}

/* ───────── 모바일 최적화 ───────── */
@media (max-width: 700px) {
  .app-header { margin: 8px; padding: 12px 16px; }
  .app-title { font-size: 17px; }
  .header-left {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .app-purpose-inline {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tabs {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 80;
    margin: 0;
    padding: 5px;
  }
  .tab { padding: 8px 9px; font-size: 12px; }
  .content { padding: 0 8px calc(96px + env(safe-area-inset-bottom)); }
  .search-shell { margin: 8px 0 12px; }

  .calendar-header {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 6px;
  }
  .calendar-header h2 {
    font-size: 15px;
    order: -1;
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 4px;
  }
  .calendar-header .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .calendar-header .btn {
    padding: 6px 9px;
    font-size: 11px;
    border-radius: 8px;
  }
  .calendar-header .btn-primary {
    padding: 6px 10px;
  }
  .view-switch { flex: 1; justify-content: center; padding: 2px; }
  .view-btn { flex: 1; padding: 5px 6px; font-size: 11px; }

  .calendar-grid { padding: 6px; gap: 3px; margin-bottom: 14px; }
  .cal-weekday { padding: 4px 2px; font-size: 11px; }
  .cal-day {
    min-height: 58px;
    padding: 3px 4px;
    border-radius: 8px;
    gap: 2px;
  }
  .cal-day .date-num { font-size: 12px; font-weight: 700; }
  .cal-event-dot {
    font-size: 9px;
    padding: 1px 3px;
    min-height: 14px;
    border-radius: 4px;
  }
  .cal-more-dot { font-size: 9px; padding: 1px 3px; }
  .cal-task-dot, .cal-holiday-dot {
    font-size: 9px;
    padding: 0 3px;
    border-radius: 4px;
    margin-top: 1px;
  }

  .event-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 44px;
    align-items: start;
    gap: 8px 10px;
  }
  .event-card .event-date { min-width: 0; padding-top: 6px; }
  .event-card .event-actions-wrap {
    margin-left: 0;
    justify-self: end;
    align-self: center;
  }
  .event-actions-toggle { display: inline-flex; }
  .event-card .event-actions {
    display: none !important;
  }
  .event-card.actions-open .event-actions { display: none !important; }

  .mobile-actions-sheet {
    position: fixed;
    inset: 0;
    background: rgba(28, 28, 30, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 120;
    align-items: flex-end;
  }
  .mobile-actions-sheet.open {
    display: flex;
  }
  .mobile-actions-panel {
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
    animation: slideUp 0.2s ease-out;
  }

  .files-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .members-list { grid-template-columns: 1fr 1fr; }

  .side-card { width: 100%; }
  .modal { padding: 12px; }
  .modal-card { padding: 18px; max-height: calc(100vh - 24px); border-radius: 16px; }
  .modal-card h2 { font-size: 17px; }
  .row { flex-direction: column; gap: 0; }
  input, textarea, select { padding: 10px 12px; font-size: 14px; }
}

@media (max-width: 400px) {
  .members-list { grid-template-columns: 1fr; }
}
